/* ════════════════════════════════════════════════════════════════════
   Tunnels /estimation/ et /estimation-locative/ : habillage dans le langage de l'accueil (DESIGN.md).
   Seule l'apparence change : identifiants, champs, valeurs envoyées au CRM et évènements GA4 sont ceux du site.
   Chargée après les styles de la page ; couleurs en variables uniquement.
   ════════════════════════════════════════════════════════════════════ */
:root {
  --t-ink: #07142A; --t-ink2: #1A2E45; --t-slate: #3A5068; --t-mist: #7B93AA; --t-line: rgba(7, 20, 42, .12); --t-line-2: rgba(7, 20, 42, .22);
  --t-bg: #F5F8FC; --t-white: #FFFFFF; --t-night: #0E4F8C; --t-night-3: #083060; --t-deep: #062448; --t-gold-l: #FFD166; --t-gold: #F0A500; --t-gold-ink: #7A5200;
  --t-blue-h: #0A85E8; --t-blue-xs: #F4F9FF; --t-on-dark: rgba(255, 255, 255, .86); --t-on-dark-2: rgba(255, 255, 255, .7);
  --t-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --t-font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}
body { font-family: var(--t-font); color: var(--t-ink); background: var(--t-bg); }
:focus-visible { outline: 2px solid var(--t-blue-h); outline-offset: 3px; }

/* haut de page : fond plein, titre sans faux italique, sans étiquette au-dessus */
html body .hero-band { background: var(--t-night-3) !important; padding: calc(76px + 28px) 48px 32px; }
.hero-band::before, .hero-band::after { display: none !important; }
.hb-badge { display: none; }
.hb-title { margin: 0; font-family: var(--t-font); font-size: clamp(28px, 3.2vw, 42px); font-weight: 640; letter-spacing: -.03em; line-height: 1.12; color: var(--t-white); font-style: normal; }
.hb-title em, .hb-title i { font-style: normal; color: var(--t-gold-l); }
.hb-sub { color: var(--t-on-dark); font-size: 16.5px; max-width: 56ch; }
.hbs-n { font-family: var(--t-font); font-variant-numeric: tabular-nums; font-weight: 640; color: var(--t-white); }
.hbs-l { color: var(--t-on-dark-2); letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 500; }

/* choix vendre / louer */
.mode-ic, .pill-e, .cc-ico, .succ-ico, .succ-n { display: none !important; }
.mode-switch { background: var(--t-white); border-bottom: 1px solid var(--t-line); }
.mode-tab { border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; box-shadow: none !important; background: transparent; border: 1px solid var(--t-line-2); color: var(--t-ink); }
.mode-tab.active { background: var(--t-ink); color: var(--t-white); border-color: var(--t-ink); }

/* étapes */
.stepper { background: var(--t-white); border-bottom: 1px solid var(--t-line); }
.s-circle { font-variant-numeric: tabular-nums; border-width: 1.5px; }
.step-tab.active .s-circle { background: var(--t-ink); border-color: var(--t-ink); color: var(--t-white); }
.step-tab.done .s-circle { background: var(--t-gold-l); border-color: var(--t-gold-l); color: var(--t-ink); }
.step-tab.active { box-shadow: inset 0 -2px 0 var(--t-gold); }
.s-label { font-weight: 600; color: var(--t-ink); }
.s-sub { color: var(--t-slate); }
.step-tag { display: none !important; }
.step-h { font-family: var(--t-font); font-weight: 640; letter-spacing: -.025em; color: var(--t-ink); }

/* panneau du formulaire */
.fpanel { border: 1px solid var(--t-line); border-radius: 10px; box-shadow: 0 18px 40px -30px rgba(7, 20, 42, .25); }
.fpanel::before, .fpanel-bar { display: none !important; }
.exp-av { background: var(--t-night) !important; }
.flbl { text-transform: none !important; letter-spacing: 0 !important; font-size: 14px !important; font-weight: 600 !important; color: var(--t-ink2) !important; }
.fin, .fsel { min-height: 48px; border: 1px solid var(--t-line-2) !important; border-radius: 6px !important; font-family: var(--t-font); font-size: 16px !important; color: var(--t-ink); background-color: var(--t-white); }
.fin:focus, .fsel:focus { border-color: var(--t-blue-h) !important; box-shadow: 0 0 0 3px rgba(10, 133, 232, .18) !important; outline: none; }
.addr-row { border: 1px solid var(--t-line-2) !important; border-radius: 6px !important; }
.pill, .ccell, .ck { border: 1px solid var(--t-line-2) !important; border-radius: 8px !important; background: var(--t-white) !important; box-shadow: none !important; min-height: 48px; transition: border-color 160ms, background-color 160ms, transform 160ms var(--t-ease); }
.pill:active, .ccell:active, .ck:active { transform: scale(.98); }
.pill.on, .ccell.on, .ck.on { border-color: var(--t-ink) !important; background: var(--t-blue-xs) !important; box-shadow: inset 0 0 0 1px var(--t-ink) !important; color: var(--t-ink) !important; }
/* 09/11/2026 : les pages des tunnels gardent leur ancien choix coché (texte blanc sur fond bleu) ; le fond devient clair ici, le texte doit suivre */
.ccell.on .cc-n { color: var(--t-ink) !important; } .ccell.on .cc-s { color: var(--t-slate) !important; }
@media (hover: hover) and (pointer: fine) { .pill:hover, .ccell:hover, .ck:hover { border-color: var(--t-ink) !important; } }
.cc-n { font-weight: 600; color: var(--t-ink); } .cc-s { color: var(--t-slate); }
.ck-box { border-radius: 4px; }
.dpe-c { border-radius: 6px; min-height: 44px; }
/* 09/11/2026 (demande de Benjamin) : lettres DPE et coche des équipements lisibles, contraste WCAG d'au moins 4,5:1, même teinte que la classe.
   Coché : A 5,4:1, B 5,4:1, D 5,4:1 (avant 2,3, 4,4 et 4,5:1) ; non coché : A, B, C, D au-dessus de 5:1 ; coche blanche sur l'encre du site (18:1, avant 2,1:1) */
.dpe-a { color: #00704A !important; } .dpe-b { color: #267A26 !important; } .dpe-c2 { color: #4D6E00 !important; } .dpe-d { color: #856000 !important; }
.dpe-a.on { background: #007A4D !important; border-color: #007A4D !important; color: #FFFFFF !important; }
.dpe-b.on { background: #267A26 !important; border-color: #267A26 !important; color: #FFFFFF !important; }
.dpe-c2.on, .dpe-e.on, .dpe-f.on, .dpe-g.on { color: #FFFFFF !important; }
.dpe-d.on { background: #8A6400 !important; border-color: #8A6400 !important; color: #FFFFFF !important; }
.ck.on .ck-box { background: var(--t-ink) !important; border-color: var(--t-ink) !important; color: #FFFFFF !important; }
.dpe-hint { font-size: 13px !important; color: var(--t-slate) !important; }

/* boutons : principal or, retour en lien */
.btn-next { background: var(--t-gold-l) !important; color: var(--t-ink) !important; border-radius: 6px !important; min-height: 48px; padding: 0 22px !important; font-family: var(--t-font); font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .5) !important; transition: transform 160ms var(--t-ease), background-color 200ms; }
.btn-next:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .btn-next:not(.lock):hover { background: var(--t-gold) !important; } }
.btn-next.lock { opacity: .45; }
.btn-prev { background: transparent !important; border: 1px solid var(--t-line-2) !important; border-radius: 6px !important; min-height: 48px; color: var(--t-ink) !important; font-weight: 600; text-transform: none !important; letter-spacing: 0 !important; }
.geo-btn { min-height: 44px; font-weight: 600; color: var(--t-ink) !important; }

/* récapitulatif et encarts */
html body .scard-dark { background: var(--t-ink) !important; border-radius: 10px !important; }
.rc-grp { text-transform: none !important; letter-spacing: 0 !important; font-size: 12.5px !important; color: var(--t-on-dark-2) !important; }
.sc-title { font-weight: 600; }

/* écran de résultat */
.succ-fourchette { background: var(--t-ink) !important; border-radius: 10px !important; box-shadow: 0 18px 40px -26px rgba(7, 20, 42, .5) !important; }
.succ-fourchette::before { display: none !important; }
.succ-f-label { text-transform: none !important; letter-spacing: 0 !important; font-size: 14px !important; color: var(--t-on-dark-2) !important; font-weight: 500 !important; }
.succ-f-val { font-family: var(--t-font); font-variant-numeric: tabular-nums; font-weight: 640 !important; letter-spacing: -.02em; }
.succ-h { font-family: var(--t-font); font-weight: 640; letter-spacing: -.025em; }

/* contenu sous le formulaire (sourcé, généré par build_site.py) */
.t-content { max-width: 860px; margin: 0 auto; padding: 56px 20px 64px; font-family: var(--t-font); color: var(--t-ink); }
.t-content h2 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 620; letter-spacing: -.02em; line-height: 1.2; margin: 44px 0 14px; }
.t-content h2:first-child { margin-top: 0; }
.t-content h3 { font-size: 20px; font-weight: 620; margin: 28px 0 10px; }
.t-content p, .t-content li { font-size: 16.5px; line-height: 1.6; color: var(--t-ink2); max-width: 68ch; }
.t-content p + p { margin-top: 12px; }
.t-content ol { padding-left: 1.2em; display: grid; gap: 8px; }
.t-content ol + p, .t-content p + ol { margin-top: 14px; }
.t-content sup { font-size: .7em; line-height: 0; }   /* 1er : sans écarter les lignes */
.t-content .tbl { overflow-x: auto; margin-top: 16px; border: 1px solid var(--t-line); border-radius: 8px; background: var(--t-white); }
.t-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.t-content th, .t-content td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--t-line); font-variant-numeric: tabular-nums; }
.t-content thead th { font-size: 12.5px; font-weight: 600; color: var(--t-slate); background: var(--t-bg); }
.t-content tbody tr:last-child > * { border-bottom: 0; }
.t-content tr.tot > * { background: var(--t-bg); font-weight: 600; }
.t-content a { color: var(--t-ink); text-underline-offset: 3px; }
.t-content .src { margin-top: 10px; font-size: 13px; color: var(--t-slate); }
.t-content .src a { color: var(--t-slate); }
.t-content .box { margin-top: 16px; padding: 18px 20px; background: var(--t-white); border: 1px solid var(--t-line); border-radius: 8px; }
.t-content .box-t { font-weight: 620; color: var(--t-ink); }
.t-content .faq { border-top: 1px solid var(--t-line); margin-top: 8px; }
.t-content .qa { border-bottom: 1px solid var(--t-line); }
.t-content .qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px; padding: 14px 0; font-weight: 600; font-size: 17px; }
.t-content .qa summary::-webkit-details-marker { display: none; }
.t-content .qa summary::after { content: ''; flex: none; width: 10px; height: 10px; border-right: 1.6px solid var(--t-slate); border-bottom: 1.6px solid var(--t-slate); transform: rotate(45deg) translateY(-3px); transition: transform 200ms var(--t-ease); }
.t-content .qa[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.t-content .qa > div { padding: 0 0 18px; }

@media (max-width: 820px) {
  .hero-band { padding: calc(68px + 20px) 20px 24px; grid-template-columns: 1fr !important; gap: 18px !important; }
  .hb-stats { gap: 18px !important; }
  .t-content { padding: 40px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; } }

/* Contraste (audit passe 8) : le gris « mist » des tunnels d'origine (3,2:1 sur blanc) passe à 5,5:1 ; les aides en « ghost » (1,7:1) aussi. */
:root { --mist: #566B80; }
span[style*="color:var(--ghost)"] { color: var(--mist) !important; }

/* détail du calcul sous la fourchette (passe 9) */
.succ-detail { list-style: none; margin: 4px 0 14px; padding: 12px 0 0; border-top: 1px solid rgba(255, 255, 255, .18); display: grid; gap: 6px; text-align: left; font-size: 13px; line-height: 1.4; }
.succ-detail li { display: flex; justify-content: space-between; gap: 14px; color: rgba(255, 255, 255, .82); }
.succ-detail b { color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.succ-detail .succ-detail-note { display: block; color: rgba(255, 255, 255, .7); font-size: 12px; }

/* ventes comparables autour de l'adresse (passe 13, js/comparables.js) */
.comp { margin: 6px 0 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .18); text-align: left; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
.comp-t { margin: 0 0 6px; font-size: 15px; color: #fff; }
.comp b { color: #fff; font-variant-numeric: tabular-nums; }
.comp-wait, .comp-note { color: rgba(255, 255, 255, .72); font-size: 13px; }
.comp-tbl { overflow-x: auto; margin: 8px 0; }
.comp-tbl table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.comp-tbl th, .comp-tbl td { padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, .12); text-align: left; font-weight: 400; }
.comp-tbl thead th { color: rgba(255, 255, 255, .66); font-size: 12px; }
.comp-tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.comp-ecart { font-size: 13px; }
.comp-src { font-size: 12px; color: rgba(255, 255, 255, .62); }

/* cibles tactiles d'au moins 24 px (WCAG 2.5.8, passe 10) : liens des tableaux par arrondissement */
th > a { display: inline-block; min-width: 24px; padding-block: 4px; }

/* reprise d'un formulaire interrompu (passe 10, js/brouillon.js) */
.brouillon-note { max-width: 760px; margin: 12px auto 0; padding: 10px 14px; border: 1px solid var(--border, #D8E2EC); border-radius: 8px; background: #F4F8FB; font-size: 14px; line-height: 1.5; color: #1A2E45; }
.brouillon-note button { margin-left: 6px; min-height: 24px; padding: 2px 4px; border: 0; background: none; font: inherit; color: #0B4F8A; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* passe 13 (lot 4) : créneau de rappel en ligne (js/rendezvous.js) et première fourchette avant les coordonnées (js/fourchette-avant.js), désactivés par défaut */
/* créneau de rappel en ligne (rendezvous.js) : sous la carte de la fourchette, sur fond clair, même bouton que « Recevoir mon estimation » */
.rdv { margin: 20px 0 6px; text-align: center; }
.rdv .rdv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 6px; background: var(--t-gold-l); color: var(--t-ink); font-family: var(--t-font); font-weight: 600; text-decoration: none; transition: background-color 160ms ease, transform 120ms ease; }
.rdv .rdv-btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .rdv .rdv-btn:hover { background: var(--t-gold); } }
.rdv-note { margin: 8px auto 0; max-width: 36ch; font-size: 13px; line-height: 1.5; color: var(--t-slate); }
.fav { margin: 0 0 18px; padding: 14px 16px; border-radius: 10px; background: #F4F8FB; border: 1px solid #D8E2EC; color: #1A2E45; }
.fav-t { margin: 0; font-size: 13px; font-weight: 600; }
.fav-v { margin: 4px 0; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; color: #07142A; }
.fav-s { margin: 0; font-size: 13px; line-height: 1.45; }
/* Passe 13 (lot 5) : phrase de confidentialité exacte sous les coordonnées (legal_textes.py), sans pictogramme ; case de
   consentement pour l'agence partenaire, présente seulement si TRANSMISSION_EG_AGENCY est activé */
.tun-rgpd { margin: 0; padding: 12px 14px; border-radius: 9px; background: var(--t-blue-xs); font-size: 13px; line-height: 1.55; color: var(--t-ink2, #33435C); }
.tun-rgpd a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tun-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--t-ink2, #33435C); cursor: pointer; }
.tun-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--t-ink, #07142A); }
