/**
 * ADAMA IA — CSS widget v14 (modale 12 sections)
 *
 * Toutes les règles sont préfixées `.aeia-` pour ne PAS entrer en conflit
 * avec la CSS du site hôte (Tailwind). Chaque section de la modale est un
 * wrapper Tailwind (`bg-white rounded-xl p-6`) auquel on ajoute `.aeia-section`
 * pour la typographie/layout interne (header numéroté + corps).
 *
 * v12 ajoute : section head, verdict banner GO/PRUDENCE/NO-GO, grille prix,
 * deadline card avec urgences, timeline verticale, risk rows, comparables,
 * caractéristiques, plan, description, simulateur (sliders + résultats),
 * coordonnées, checklist.
 */

/* ========== Section wrapper (commun aux 12 blocs) ========== */

.aeia-root { }

.aeia-section {
  /* Le cadre blanc / ombre / rounded vient des classes Tailwind du host.
     Ici on règle uniquement la typo et le layout interne. */
}

.aeia-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.aeia-section-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #6b7a5a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0;
}

.aeia-section-icon { display: none; }

.aeia-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.01em;
}

.aeia-section-body { }

/* ========== Header strip (logo + cache badge) ========== */

.aeia-header-wrapper {
  margin-bottom: 16px;
}
.aeia-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #1a1d16;
  border-radius: 14px 14px 0 0;
}
.aeia-header-wrapper .aeia-header-strip:last-child {
  border-radius: 14px;
}

/* Source banner */
.aeia-source-banner {
  background: #f7f5f0;
  border: 1px solid #e5e2d9;
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: 12px 20px;
}
.aeia-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.aeia-source-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #888;
  text-transform: uppercase;
}
.aeia-source-name {
  font-size: 14px;
  font-weight: 700;
  color: #3a4a2e;
}
.aeia-source-links {
  margin-top: 6px;
  font-size: 12px;
}
.aeia-source-links a {
  color: #6b7a5a;
  text-decoration: underline;
}

/* Kones summary */
.aeia-kones-summary {
  margin-top: 16px;
  background: #f7f5f0;
  border: 1px solid #e5e2d9;
  border-radius: 10px;
  padding: 14px 18px;
}
.aeia-kones-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.aeia-kones-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #6b7a5a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.aeia-kones-title {
  font-size: 13px;
  font-weight: 700;
  color: #3a4a2e;
}
.aeia-kones-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.aeia-kones-loading {
  font-size: 12px;
  color: #888;
  font-style: italic;
}
.aeia-kones-context {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e2d9;
}
.aeia-kones-context .aeia-methodo {
  font-size: 12px;
  margin-bottom: 6px;
}

.aeia-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aeia-logo-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #6b7a5a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.aeia-logo-text {
  color: #e8e6df;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.aeia-cache {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-hover);
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: lowercase;
}

/* ========== Section 1 — Verdict ADAMA IA ========== */

.aeia-verdict-banner {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.aeia-verdict-reco-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.75;
  margin-bottom: 4px;
}
.aeia-verdict-reco {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.aeia-verdict-go { background: #eef5e8; border: 1px solid #b8d4a0; color: #3a5a2a; }
.aeia-verdict-prudence { background: #faf5e6; border: 1px solid #e8dbb8; color: #8a7a3a; }
.aeia-verdict-nogo { background: #f5e8e8; border: 1px solid #d4a0a0; color: #8a3a3a; }
.aeia-verdict-unknown { background: var(--bg-hover); border: 1px solid var(--border-color); color: var(--text-secondary); }

.aeia-verdict-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 14px 0;
}
.aeia-metric {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-hover);
}
.aeia-metric-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.aeia-metric-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.aeia-verdict-summary {
  margin: 0;
  padding-left: 20px;
}
.aeia-verdict-summary li {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

@media (max-width: 640px) {
  .aeia-verdict-metrics { grid-template-columns: 1fr; }
}

/* ========== Section 2 — Prix et décote ========== */

.aeia-prix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 12px 0;
}
.aeia-prix-card {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-hover);
}
.aeia-prix-card.aeia-prix-ecart {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.aeia-prix-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.aeia-prix-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}
.aeia-prix-pct {
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin-left: 4px;
}
.aeia-prix-note {
  margin-top: 4px;
  font-size: 11.5px;
  font-style: italic;
  color: var(--text-muted);
}

.aeia-warn-note {
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  border-radius: 6px;
  color: #78350f;
}

@media (max-width: 900px) {
  .aeia-prix-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .aeia-prix-grid { grid-template-columns: 1fr; }
}

/* ========== Section 3 — Deadline et timeline ========== */

.aeia-deadline-card {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.aeia-deadline-normal { background: var(--bg-hover); border: 1px solid var(--border-color); }
.aeia-deadline-warning { background: #faf5e6; border: 1px solid #e8dbb8; }
.aeia-deadline-critical { background: #f5e8e8; border: 1px solid #d4a0a0; }
.aeia-deadline-passed { background: var(--bg-hover); border: 1px solid var(--border-color); opacity: 0.6; }

.aeia-deadline-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.75;
  margin-bottom: 2px;
}
.aeia-deadline-date {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.aeia-deadline-time {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
}
.aeia-deadline-loc {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.9;
}
.aeia-deadline-urgency {
  margin-top: 8px;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Timeline verticale */
.aeia-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.aeia-timeline::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: #e5e7eb;
  z-index: 0;
}
.aeia-tl-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  z-index: 1;
}
.aeia-tl-dot {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid #cbd5e1;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.aeia-tl-body { flex: 1; padding-top: 3px; }
.aeia-tl-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.aeia-tl-when {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}
.aeia-tl-auction .aeia-tl-dot {
  background: #0a1e3f;
  border-color: var(--text-primary);
  color: #ffffff;
  box-shadow: 0 0 0 3px #dbeafe;
}
.aeia-tl-auction .aeia-tl-label { color: var(--text-primary); font-weight: 800; }

/* ========== Section 4 — Risques juridiques ========== */

.aeia-risk-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label pill"
    "note  note";
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 6px;
  background: var(--bg-hover);
}
.aeia-risk-row:last-of-type { margin-bottom: 0; }

.aeia-risk-label {
  grid-area: label;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.aeia-risk-pill {
  grid-area: pill;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.aeia-risk-note {
  grid-area: note;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.aeia-risk-ok     { border-left: 3px solid #10b981; }
.aeia-risk-ok .aeia-risk-pill     { background: #ecfdf5; color: #065f46; }
.aeia-risk-ok .aeia-risk-level { color: #3a6a3a; background: #eef5e8; border: 1px solid #b8d4a0; }

.aeia-risk-warn   { border-left: 3px solid #f59e0b; background: #fffbeb; }
.aeia-risk-warn .aeia-risk-pill   { background: #fef3c7; color: #92400e; }
.aeia-risk-warn .aeia-risk-level { color: #8a7a3a; background: #faf5e6; border: 1px solid #e8dbb8; }

.aeia-risk-killer { border-left: 3px solid #dc2626; background: #fef2f2; }
.aeia-risk-killer .aeia-risk-pill { background: #fee2e2; color: #7f1d1d; }
.aeia-risk-killer .aeia-risk-level { color: #8a3a3a; background: #f5e8e8; border: 1px solid #d4a0a0; }

.aeia-risk-todo   { border-left: 3px solid #94a3b8; }
.aeia-risk-todo .aeia-risk-pill   { background: var(--bg-hover); color: var(--text-secondary); }
.aeia-risk-todo .aeia-risk-level { color: var(--text-secondary); background: var(--bg-hover); border: 1px solid var(--border-color); }

/* ========== Section 5 — Comparables adjudications ========== */

.aeia-comp-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-hover);
  margin-bottom: 8px;
}
.aeia-comp-row:last-child { margin-bottom: 0; }

.aeia-comp-main { min-width: 0; }
.aeia-comp-addr {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.aeia-comp-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.aeia-comp-decote {
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  min-width: 80px;
}
.aeia-comp-decote-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.75;
}
.aeia-comp-decote-value {
  font-size: 16px;
  font-weight: 800;
  margin-top: 2px;
}
.aeia-decote-strong { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.aeia-decote-normal { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.aeia-decote-weak   { background: var(--bg-hover); color: var(--text-secondary); border: 1px solid #cbd5e1; }

.aeia-comp-link {
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .aeia-comp-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "decote"
      "link";
  }
  .aeia-comp-main { grid-area: main; }
  .aeia-comp-decote { grid-area: decote; justify-self: start; }
  .aeia-comp-link { grid-area: link; }
}

/* ========== Section 6 — Localisation (onglets + adresse) ========== */

.aeia-loc-addr {
  padding: 10px 12px;
  background: var(--bg-hover);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.aeia-loc-coords {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

#aeia-detail-map {
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

/* ---- Tab bar (héritage v10, toujours utilisé par la section 6) ---- */

.aeia-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  margin: 0 0 14px 0;
  padding: 0;
}
.aeia-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.aeia-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.aeia-tab.is-active { color: var(--text-primary); border-bottom-color: var(--text-primary); background: var(--bg-card); }
.aeia-tab:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

.aeia-pane-host { min-height: 80px; }
.aeia-tab-pane { animation: aeia-fadein 0.18s ease-out; }

@keyframes aeia-fadein {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Generic prose (utilisé partout) */

.aeia-p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}
.aeia-p:last-child { margin-bottom: 0; }

.aeia-sub {
  margin: 14px 0 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.aeia-bullets { margin: 6px 0 0 0; padding-left: 20px; }
.aeia-bullets li {
  margin-bottom: 4px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.aeia-empty { margin: 0; font-size: 13px; color: var(--text-muted); font-style: italic; }

/* Verdict card (onglet analyse d'évolution) */
.aeia-verdict-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  margin: 0 0 12px 0;
}
.aeia-verdict-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; opacity: 0.75; margin-bottom: 4px;
}
.aeia-verdict-dir {
  font-size: 20px; font-weight: 800; letter-spacing: 0.3px; line-height: 1.2;
}
.aeia-verdict-meta { margin-top: 4px; font-size: 12.5px; opacity: 0.85; }
.aeia-verdict-synthese { margin-top: 8px; font-size: 13.5px; line-height: 1.55; font-style: italic; }
.aeia-verdict-hausse { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.aeia-verdict-baisse { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.aeia-verdict-stable { background: var(--bg-hover); border-color: var(--border-color); color: var(--text-secondary); }

/* Arguments list (onglet analyse) */
.aeia-args { list-style: none; padding: 0; margin: 4px 0 0 0; }
.aeia-arg {
  display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-color);
  background: var(--bg-hover); font-size: 13.5px; line-height: 1.5; color: var(--text-primary);
  margin-bottom: 6px;
}
.aeia-arg:last-child { margin-bottom: 0; }
.aeia-arg-marker {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 11px;
  font-weight: 800; flex-shrink: 0;
}
.aeia-arg-pos { border-left: 3px solid #10b981; }
.aeia-arg-pos .aeia-arg-marker { background: #ecfdf5; color: #065f46; }
.aeia-arg-neg { border-left: 3px solid #ef4444; }
.aeia-arg-neg .aeia-arg-marker { background: #fef2f2; color: #7f1d1d; }
.aeia-arg-neu { border-left: 3px solid #94a3b8; }
.aeia-arg-neu .aeia-arg-marker { background: var(--bg-hover); color: var(--text-secondary); }

/* Items projets (onglet projets) */
.aeia-items { list-style: none; padding: 0; margin: 0; }
.aeia-item {
  padding: 12px 14px; background: var(--bg-hover); border: 1px solid var(--border-color);
  border-radius: 8px; margin-bottom: 10px;
}
.aeia-item:last-child { margin-bottom: 0; }
.aeia-item-title {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 6px; font-size: 14px; color: var(--text-primary);
}
.aeia-item-title strong { font-weight: 700; }
.aeia-item-meta { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 4px; }
.aeia-item-note { margin: 6px 0 0 0; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.aeia-item-projet { border-left: 3px solid #0ea5e9; }
.aeia-item-amenagement { border-left: 3px solid #6366f1; }
.aeia-item-risque { border-left: 3px solid #f59e0b; background: #fffbeb; }

/* Badges (partagés) */
.aeia-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: #e2e8f0; color: var(--text-secondary);
  text-transform: lowercase; line-height: 1.4;
}
.aeia-badge-type { background: #dbeafe; color: #1e40af; }
.aeia-badge-statut { background: #fef3c7; color: #92400e; }
.aeia-badge-dist { background: #f3e8ff; color: #6b21a8; }
.aeia-badge-poids { background: #e0e7ff; color: #3730a3; text-transform: none; }
.aeia-badge-impact { text-transform: none; }
.aeia-impact-positif { background: #ecfdf5; color: #065f46; }
.aeia-impact-neutre { background: var(--bg-hover); color: var(--text-secondary); }
.aeia-impact-negatif { background: #fef2f2; color: #7f1d1d; }

/* Gaps / méthodo */
.aeia-gaps-details {
  margin-top: 10px; padding: 8px 10px; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 6px;
  font-size: 12.5px; color: #78350f;
}
.aeia-gaps-details summary { cursor: pointer; font-weight: 600; }
.aeia-gaps-list { margin: 6px 0 0 0; padding-left: 18px; }
.aeia-gaps-list li { margin-bottom: 3px; }
.aeia-methodo {
  margin: 10px 0 0 0; font-size: 11.5px; color: var(--text-secondary);
  font-style: italic; line-height: 1.5;
}

/* ========== Section 7 & 11 — Caractéristiques / Coordonnées (grille 2 col) ========== */

.aeia-car-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}
.aeia-car-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 13.5px;
  min-width: 0;
}
.aeia-car-row:nth-child(odd) { border-right: 1px solid #e5e7eb; }
.aeia-car-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
}
.aeia-car-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

@media (max-width: 720px) {
  .aeia-car-grid { grid-template-columns: 1fr; }
  .aeia-car-row:nth-child(odd) { border-right: 0; }
}

/* ========== Section 9 — Description détaillée ========== */

.aeia-desc-fr, .aeia-desc-he {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-hover);
  margin-bottom: 8px;
}
.aeia-desc-fr:last-child, .aeia-desc-he:last-child { margin-bottom: 0; }
.aeia-desc-he { direction: rtl; text-align: right; font-family: "Heebo", "Arial Hebrew", "Segoe UI", sans-serif; }

/* RTL général (utilisé si on affiche de l'hébreu ailleurs) */
.aeia-rtl {
  direction: rtl;
  text-align: right;
  font-family: "Heebo", "Arial Hebrew", "Segoe UI", sans-serif;
}

/* ========== Section 10 — Simulateur financement ========== */

.aeia-sim-sliders {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 18px;
  margin: 10px 0 14px 0;
}
.aeia-sim-row {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-hover);
}
.aeia-sim-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12.5px;
}
.aeia-sim-row-head label {
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 11.5px;
}
.aeia-sim-val {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
}
.aeia-sim-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: #cbd5e1;
  outline: none;
  margin: 4px 0 2px 0;
}
.aeia-sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #0a1e3f;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}
.aeia-sim-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #0a1e3f;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.aeia-sim-results {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.aeia-sim-result {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  text-align: left;
}
.aeia-sim-result-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.aeia-sim-result-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}
.aeia-sim-highlight {
  color: #065f46;
  background: #ecfdf5;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
}

@media (max-width: 900px) {
  .aeia-sim-sliders { grid-template-columns: 1fr; }
  .aeia-sim-results { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .aeia-sim-results { grid-template-columns: 1fr; }
}

/* ========== Section 12 — Checklist actions ========== */

.aeia-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: aeia-check;
}
.aeia-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-hover);
  margin-bottom: 6px;
  counter-increment: aeia-check;
}
.aeia-check-item:last-child { margin-bottom: 0; }
.aeia-check-cb {
  width: 18px; height: 18px;
  margin: 2px 0 0 0;
  accent-color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.aeia-check-label {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
  cursor: pointer;
  flex: 1;
}
.aeia-check-label::before {
  content: counter(aeia-check) ". ";
  font-weight: 800;
  color: var(--text-primary);
  margin-right: 2px;
}
.aeia-check-cb:checked + .aeia-check-label {
  text-decoration: line-through;
  color: var(--text-secondary);
}

/* ========== Liens ========== */

.aeia-link {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.aeia-link:hover { color: #1e3a8a; }

/* ========== Loading spinner ========== */

.aeia-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 20px;
  color: var(--text-secondary);
  font-size: 13px;
}
.aeia-loading p { margin: 0; font-size: 14px; }
.aeia-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e8e6df;
  border-top-color: #6b7a5a;
  border-radius: 50%;
  animation: aeia-spin 0.8s linear infinite;
}
@keyframes aeia-spin { to { transform: rotate(360deg); } }

/* ========== Errors + retry ========== */

.aeia-error-section { } /* wrapper pour compat — cadre déjà fourni par bg-white rounded-xl p-6 */

.aeia-error {
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
}
.aeia-error-title { font-weight: 700; margin: 0 0 4px 0; font-size: 14px; }
.aeia-error-msg { margin: 0 0 10px 0; font-size: 13px; line-height: 1.5; }

.aeia-retry {
  appearance: none;
  border: 1px solid #fecaca;
  background: var(--bg-card);
  color: #991b1b;
  padding: 6px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.aeia-retry:hover { background: #fef2f2; }

/* ================================================================== */
/* v13 — Section 13 Documents d'inscription                            */
/* ================================================================== */

.aeia-doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aeia-doc-item {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
}
.aeia-doc-item--found  { border-left: 4px solid #16a34a; }
.aeia-doc-item--todo   { border-left: 4px solid #f59e0b; background: #fffbeb; }

.aeia-doc-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}
.aeia-doc-he {
  font-family: "Heebo", "Arial Hebrew", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  direction: rtl;
  unicode-bidi: embed;
}
.aeia-doc-fr {
  font-size: 13.5px;
  color: #4b5563;
  font-weight: 500;
}
.aeia-doc-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: auto;
}
.aeia-doc-pill.aeia-doc-found { background: #dcfce7; color: #166534; }
.aeia-doc-pill.aeia-doc-todo  { background: #fef3c7; color: #92400e; }

.aeia-doc-role {
  margin: 0 0 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.aeia-doc-actions { font-size: 13px; color: var(--text-primary); }
.aeia-doc-meta    { font-size: 12px; color: var(--text-muted); }

.aeia-doc-extras {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
}
.aeia-doc-extras-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aeia-doc-extra-row { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.aeia-doc-extra-label { font-weight: 500; }

/* ================================================================== */
/* v13 — Section reléguée en bas (donnée manquante / non sourcée)      */
/* ================================================================== */

.aeia-section--missing {
  background: var(--bg-hover) !important;
  border: 1px dashed #d1d5db !important;
  box-shadow: none !important;
  opacity: 0.92;
}
.aeia-section--missing .aeia-section-num {
  background: #e5e7eb;
  color: var(--text-muted);
}
.aeia-section--missing .aeia-section-title {
  color: var(--text-muted);
}

.aeia-missing-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #faf5e6;
  border: 1px solid #e8dbb8;
  border-radius: 10px;
  font-size: 12px;
  color: #8a7a3a;
  line-height: 1.4;
}
.aeia-missing-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #e8dbb8;
  color: #8a7a3a;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .aeia-doc-pill { margin-left: 0; }
  .aeia-doc-head { gap: 6px; }
}

/* ========== v20 — Nouvelles sections Phase 1 ========== */

/* Prix d'ouverture */
.aeia-price-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-hover);
}
.aeia-price-card.aeia-price-published {
  background: #ecfdf5;
  border-color: #86efac;
}
.aeia-price-card.aeia-price-pending {
  background: #fffbeb;
  border-color: #fde68a;
}
.aeia-price-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.aeia-price-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.aeia-price-value.aeia-empty {
  color: #92400e;
  font-size: 20px;
}
.aeia-price-note {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Description enrichie — bloc prose */
.aeia-desc-block {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-hover);
  border-left: 3px solid #64748b;
  border-radius: 6px;
}
.aeia-desc-block .aeia-sub {
  margin: 0 0 6px 0;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.aeia-desc-block .aeia-p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
}
.aeia-desc-links {
  margin-top: 14px;
  font-size: 13px;
}

/* v20 : override local pour table comparables (6 colonnes, pas 3) */
.aeia-comp-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.aeia-comp-table .aeia-comp-row {
  display: grid;
  grid-template-columns: 2fr 80px 60px 110px 80px 90px;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 0;
  margin-bottom: 0;
  border-top: none;
  font-size: 12.5px;
}
.aeia-comp-table .aeia-comp-row:first-child { border-top: 1px solid var(--border-color); border-radius: 6px 6px 0 0; }
.aeia-comp-table .aeia-comp-row:last-child { border-radius: 0 0 6px 6px; }
.aeia-comp-table .aeia-comp-head {
  background: var(--bg-hover);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.aeia-comp-table .aeia-comp-addr { font-weight: 600; color: var(--text-primary); }
.aeia-comp-table .aeia-comp-price { font-weight: 700; color: var(--text-primary); }

.aeia-market-synth {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .aeia-comp-table .aeia-comp-row {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }
  .aeia-comp-table .aeia-comp-head { display: none; }
}

/* ===================================================================== */
/* v21 — Photo de l'annonce (section 1)                                  */
/* ===================================================================== */

.aeia-photo-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.aeia-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aeia-photo-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted, #64748b);
  font-style: italic;
}
.aeia-photo-link {
  margin-top: 6px;
  font-size: 14px;
}
.aeia-photo-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: rgba(148, 163, 184, 0.08);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #64748b);
  gap: 10px;
}
.aeia-photo-placeholder-icon {
  font-size: 44px;
  line-height: 1;
  opacity: 0.6;
}

/* ===================================================================== */
/* v21 — Loader exclusif dans la section ADAMA IA — Score                */
/* ===================================================================== */

.aeia-section-verdict-loading {
  position: relative;
}
.aeia-score-loading {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 8px;
  min-height: 88px;
}
.aeia-score-loading .aeia-spinner {
  flex: 0 0 auto;
}
.aeia-score-loading-text {
  flex: 1 1 auto;
}
.aeia-score-loading-title {
  margin: 0 0 4px 0;
  font-weight: 600;
  font-size: 16px;
  color: var(--text, #0f172a);
}
.aeia-score-loading-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, #64748b);
}

/* ===================================================================== */
/* v21 — Iframe Google Maps (remplace Leaflet/CartoDB)                   */
/* ===================================================================== */

.aeia-gmaps-iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ===================================================================== */
/* v21 — Table transactions marché : ajout colonne Prix/m²               */
/* Override de la grid 6 colonnes v20 → 7 colonnes                       */
/* ===================================================================== */

.aeia-comp-table .aeia-comp-row {
  display: grid;
  grid-template-columns: 2fr 70px 60px 110px 110px 80px 90px;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  align-items: center;
  font-size: 13px;
}
.aeia-comp-ppsq {
  font-weight: 600;
  color: #1d4ed8;
}
.aeia-comp-ppsq-val {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .aeia-comp-table {
    overflow-x: auto;
  }
  .aeia-comp-table .aeia-comp-row {
    min-width: 640px;
  }
  .aeia-gmaps-iframe {
    min-height: 280px;
  }
}

/* ===================================================================== */
/* v24 — Refonte CSS : héritage complet des variables du site            */
/*                                                                        */
/* Le widget utilise désormais var(--bg-card), var(--text-primary),      */
/* var(--accent), etc. Il s'adapte automatiquement au mode light/dark.   */
/* Ci-dessous, les styles sémantiques qui dépendent encore du theme :    */
/* - badges colorés (warning/danger/success) via rgba() translucides     */
/* - liens (couleur accent)                                               */
/* ===================================================================== */

.aeia-card {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.aeia-section-head { border-bottom: 1px solid var(--border-color); }
.aeia-section-title { color: var(--text-primary); }
.aeia-section-num {
  background: var(--accent-bg);
  color: var(--accent);
}

/* Source banner + kones summary */
.aeia-source-banner,
.aeia-kones-summary,
.aeia-kones-context {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Verdict cards principales — alphas semi-transparents (fonctionnent light + dark) */
.aeia-verdict-go {
  background: rgba(107, 122, 90, 0.12);
  border: 1px solid rgba(107, 122, 90, 0.35);
  color: var(--accent);
}
.aeia-verdict-prudence {
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.38);
  color: #b08a1a;
}
[data-theme="dark"] .aeia-verdict-prudence { color: #fde68a; }
.aeia-verdict-nogo {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.32);
  color: #b91c1c;
}
[data-theme="dark"] .aeia-verdict-nogo { color: #fca5a5; }
.aeia-verdict-unknown {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.aeia-verdict-reco-label { color: var(--text-muted); }
.aeia-verdict-summary { color: var(--text-secondary); }

/* Métriques verdict */
.aeia-metric {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}
.aeia-metric-label { color: var(--text-muted); }
.aeia-metric-value { color: var(--text-primary); }

/* Prix cards / ouverture / décote */
.aeia-prix-card,
.aeia-price-card,
.aeia-decote-card {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}
.aeia-prix-label,
.aeia-price-label,
.aeia-decote-label { color: var(--text-muted); }
.aeia-prix-value,
.aeia-price-value,
.aeia-decote-value { color: var(--text-primary); }

.aeia-price-card.is-published {
  background: rgba(34, 197, 94, 0.10);
  border-left: 3px solid #22c55e;
  color: #166534;
}
[data-theme="dark"] .aeia-price-card.is-published { color: #86efac; }
.aeia-price-card.is-pending {
  background: rgba(234, 179, 8, 0.10);
  border-left: 3px solid #eab308;
  color: #854d0e;
}
[data-theme="dark"] .aeia-price-card.is-pending { color: #fde68a; }

/* Warning banner "Attention: Décote..." */
.aeia-warn-note {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-left: 3px solid #eab308;
  color: #854d0e;
}
[data-theme="dark"] .aeia-warn-note { color: #fde68a; }
.aeia-warn-note strong { color: inherit; }

.aeia-prix-note {
  margin-top: 4px;
  font-size: 11.5px;
  font-style: italic;
  color: var(--text-muted);
}

/* Deadline cards */
.aeia-deadline-card {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.aeia-deadline-normal {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}
.aeia-deadline-warning {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
}
.aeia-deadline-critical {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.aeia-deadline-passed {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  opacity: 0.65;
}
.aeia-deadline-label { color: var(--text-muted); }
.aeia-deadline-date,
.aeia-deadline-time { color: var(--text-primary); }
.aeia-deadline-loc,
.aeia-deadline-urgency { color: var(--text-secondary); }

/* Caractéristiques du bien */
.aeia-car-grid {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}
.aeia-car-row { border-bottom: 1px solid var(--border-color); }
.aeia-car-label { color: var(--text-muted); }
.aeia-car-value { color: var(--text-primary); }

/* Description */
.aeia-desc-block {
  background: var(--bg-hover);
  border-left: 3px solid var(--accent);
  color: var(--text-primary);
}
.aeia-desc-block .aeia-sub {
  color: var(--text-muted);
}
.aeia-desc-block .aeia-p { color: var(--text-primary); }
.aeia-desc-links { border-top: 1px solid var(--border-color); }

/* Comparables / transactions marché : table */
.aeia-comp-table {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}
.aeia-comp-head {
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-weight: 600;
}
.aeia-comp-row {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}
.aeia-comp-row:hover { background: var(--bg-hover); }
.aeia-comp-ppsq { color: var(--accent); font-weight: 700; }

/* Placeholders / textes vides / méthodologie */
.aeia-empty {
  color: var(--text-muted);
  font-style: italic;
}
.aeia-methodo {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.aeia-price-value.aeia-empty { color: var(--text-muted); }

/* Tabs quartier */
.aeia-tabs {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}
.aeia-tab { color: var(--text-muted); }
.aeia-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.aeia-tab.is-active {
  background: var(--bg-card);
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}
.aeia-tab-pane { color: var(--text-primary); }

/* Simulateur financement */
.aeia-sim-row,
.aeia-sim-result {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.aeia-sim-label,
.aeia-sim-row label { color: var(--text-secondary); }
.aeia-sim-value,
.aeia-sim-result-value { color: var(--text-primary); }
input[type="range"].aeia-slider { background: var(--border-color); }

/* Chip "Donnée manquante" */
.aeia-missing-chip {
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #854d0e;
}
[data-theme="dark"] .aeia-missing-chip { color: #fde68a; }

/* Loading / spinner */
.aeia-loading p,
.aeia-score-loading-title { color: var(--text-primary); }
.aeia-score-loading-sub { color: var(--text-muted); }
.aeia-spinner {
  border-color: var(--border-color);
  border-top-color: var(--accent);
}

/* Erreurs */
.aeia-error-section {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.30);
}
.aeia-error-title { color: #b91c1c; }
[data-theme="dark"] .aeia-error-title { color: #fca5a5; }
.aeia-error-msg { color: var(--text-primary); }
.aeia-retry {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  cursor: pointer;
}
.aeia-retry:hover { background: var(--accent-light); }

/* Photo wrap */
.aeia-photo-wrap {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}
.aeia-photo-caption { color: var(--text-muted); }
.aeia-photo-placeholder {
  background: var(--bg-hover);
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
}

/* Section manquante */
.aeia-section--missing {
  border: 1px dashed var(--border-color);
  opacity: 0.85;
}

/* Sub-headers H4 */
.aeia-sub {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

/* Verdict cards secondaires (hausse/baisse/stable) */
.aeia-verdict-hausse {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #065f46;
}
[data-theme="dark"] .aeia-verdict-hausse { color: #86efac; }
.aeia-verdict-baisse {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #991b1b;
}
[data-theme="dark"] .aeia-verdict-baisse { color: #fca5a5; }
.aeia-verdict-stable {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Arguments */
.aeia-arg {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.aeia-arg-pos { border-left: 3px solid #22c55e; }
.aeia-arg-pos .aeia-arg-marker {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}
[data-theme="dark"] .aeia-arg-pos .aeia-arg-marker { color: #86efac; }
.aeia-arg-neg { border-left: 3px solid #ef4444; }
.aeia-arg-neg .aeia-arg-marker {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}
[data-theme="dark"] .aeia-arg-neg .aeia-arg-marker { color: #fca5a5; }
.aeia-arg-neu { border-left: 3px solid var(--text-muted); }
.aeia-arg-neu .aeia-arg-marker {
  background: var(--bg-card);
  color: var(--text-secondary);
}

/* Bullets */
.aeia-bullets li { color: var(--text-primary); }

/* Risques (au cas où) */
.aeia-risk-warn {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.10);
}
.aeia-risk-warn .aeia-risk-pill {
  background: rgba(245, 158, 11, 0.20);
  color: #b45309;
}
[data-theme="dark"] .aeia-risk-warn .aeia-risk-pill { color: #fde68a; }
.aeia-risk-killer {
  border-left: 3px solid #dc2626;
  background: rgba(220, 38, 38, 0.10);
}
.aeia-risk-killer .aeia-risk-pill {
  background: rgba(220, 38, 38, 0.20);
  color: #b91c1c;
}
[data-theme="dark"] .aeia-risk-killer .aeia-risk-pill { color: #fca5a5; }

/* Doc items */
.aeia-doc-item--todo {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.aeia-doc-pill.aeia-doc-todo {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}
[data-theme="dark"] .aeia-doc-pill.aeia-doc-todo { color: #fde68a; }
.aeia-doc-item {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}

/* Liens partout dans le widget */
.aeia-card a,
.aeia-section a {
  color: var(--accent);
}
.aeia-card a:hover,
.aeia-section a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* Strong / em / b / i héritent toujours du texte parent */
.aeia-card strong,
.aeia-card em,
.aeia-card b,
.aeia-card i { color: inherit; }

/* iframe Google Maps : atténuer en dark */
[data-theme="dark"] .aeia-gmaps-iframe {
  filter: brightness(0.92);
}

/* Catch-all : tous les textes bruts du widget */
.aeia-section p,
.aeia-section li,
.aeia-section span:not(.aeia-missing-icon) {
  color: inherit;
}

/* v24 — Compléments : classes alertes/decote hardcodées en bas */
.aeia-decote-strong {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #065f46;
}
[data-theme="dark"] .aeia-decote-strong { color: #86efac; }

.aeia-decote-normal {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #854d0e;
}
[data-theme="dark"] .aeia-decote-normal { color: #fde68a; }

.aeia-decote-weak {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.aeia-impact-positif {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}
[data-theme="dark"] .aeia-impact-positif { color: #86efac; }
.aeia-impact-negatif {
  background: rgba(239, 68, 68, 0.14);
  color: #991b1b;
}
[data-theme="dark"] .aeia-impact-negatif { color: #fca5a5; }
.aeia-impact-neutre {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.aeia-gaps-details {
  background: rgba(234, 179, 8, 0.10);
  border: 1px solid rgba(234, 179, 8, 0.30);
  color: #854d0e;
}
[data-theme="dark"] .aeia-gaps-details { color: #fde68a; }

.aeia-item-risque {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.10);
}

.aeia-price-card.aeia-price-published {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #166534;
}
[data-theme="dark"] .aeia-price-card.aeia-price-published { color: #86efac; }
.aeia-price-card.aeia-price-pending {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #854d0e;
}
[data-theme="dark"] .aeia-price-card.aeia-price-pending { color: #fde68a; }

.aeia-badge-statut {
  background: rgba(234, 179, 8, 0.18);
  color: #854d0e;
}
[data-theme="dark"] .aeia-badge-statut { color: #fde68a; }

/* Inputs, sliders, boutons — cohérents avec le site */
.aeia-card input,
.aeia-card select,
.aeia-card textarea {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-input, var(--border-color));
}
.aeia-card button.aeia-btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
}
.aeia-card button.aeia-btn-primary:hover { background: var(--accent-light); }
