/**
 * Simulateur d'hypothèque — maquette work/hypotheque-lab.html validée
 * par Gary le 17/08 + deux ajouts validés dans la foulée :
 *   - l'analyseur d'annonce (collez un lien de portail, le simulateur
 *     se remplit seul — inc/listing-analyzer.php) ;
 *   - le verrou de résultats : coordonnées AVANT le verdict (une seule
 *     fois — ensuite le simulateur reste vivant).
 * Sections : hh hero · hs simulateur (hf champs, hr/hv résultats,
 * hl répartition, ht tuiles, hx taux, hd détail, ha analyseur,
 * hk verrou) · hb bande courtier · hg règles d'or · hq FAQ.
 */

.k-hy { font-size: 10px; color: var(--gold); letter-spacing: 0.16em; text-transform: uppercase; display: block; margin-bottom: 14px; }

/* ═══ 1. HERO compact ═══ */
.hh { background: var(--green); padding: calc(var(--r5-header-h, 96px) + 44px) 80px 56px; text-align: center; }
.hh .k-hy { color: var(--gold-light); }
.hh h1 { font-family: var(--font); font-weight: 400; font-size: clamp(28px, 3.6vw, 46px); color: white; line-height: 1.15; max-width: 22ch; margin: 0 auto; }
.hh h1 em { font-style: italic; color: var(--gold-light); }
.hh p { margin: 16px auto 0; font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.8; max-width: 52ch; }

/* ═══ 2. LE SIMULATEUR ═══ */
.hs { background: var(--cream); padding: 0 80px 72px; }
.hs-inner { max-width: 920px; margin: 0 auto; }
.hs-card { background: var(--white); border: 1px solid var(--border); margin-top: 40px; }

.hs-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.hs-tab { padding: 20px 24px; text-align: center; cursor: pointer; background: var(--cream); border: 0;
  font-family: var(--font-sans); transition: background .25s; border-bottom: 2px solid transparent; border-radius: 0 !important; }
.hs-tab .t1 { display: block; font-family: var(--font); font-size: 17px; color: var(--text-muted); }
.hs-tab .t2 { display: block; margin-top: 3px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); }
.hs-tab.on { background: var(--white); border-bottom-color: var(--gold); }
.hs-tab.on .t1 { color: var(--green); }
.hs-tab:first-child { border-right: 1px solid var(--border); }

.hs-body { padding: 36px 40px 40px; }

/* Analyseur d'annonce */
.ha { margin-bottom: 26px; padding: 20px 22px; background: var(--cream); border: 1px solid var(--border); }
.ha-label { display: block; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.ha-row { display: flex; gap: 10px; }
.ha-row input { flex: 1; min-width: 0; padding: 13px 18px; border: 1px solid var(--border); border-radius: 50px;
  font-size: 13px; font-family: var(--font-sans); background: var(--white); color: var(--text); }
.ha-row input:focus { outline: none; border-color: var(--gold); }
.ha-row button { flex-shrink: 0; min-height: 46px; background: var(--green); color: white; border: 0; border-radius: 50px;
  padding: 12px 24px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  font-family: var(--font-sans); transition: background .3s; }
.ha-row button:hover { background: var(--green-mid); }
.ha-row button[disabled] { opacity: 0.6; cursor: wait; }
.ha-hint { margin-top: 8px; font-size: 11px; color: var(--text-light); line-height: 1.6; }
/* Carte du bien analysé */
.ha-card { display: none; margin-top: 14px; padding: 14px 18px; background: var(--white); border: 1px solid var(--border);
  border-left: 3px solid var(--gold); }
.ha-card.on { display: flex; align-items: baseline; gap: 8px 18px; flex-wrap: wrap; }
.ha-card .t { font-family: var(--font); font-size: 15px; color: var(--green); }
.ha-card .d { font-size: 12px; color: var(--text-muted); }
.ha-card .s { margin-left: auto; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.ha-status { margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.ha-status.err { color: var(--danger, #A33D3D); }

/* Champs */
.hf { margin-bottom: 22px; }
.hf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.hf-head label { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.hf-head input { width: 170px; text-align: right; padding: 9px 14px; border: 1px solid var(--border); border-radius: 50px;
  font-size: 15px; font-family: var(--font); color: var(--green); background: var(--white); }
.hf-head input:focus { outline: none; border-color: var(--gold); }
.hf input[type=range] { width: 100%; accent-color: var(--gold); height: 22px; }

/* Affiner */
.hs-more { margin: 4px 0 20px; }
.hs-more summary { cursor: pointer; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
  list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.hs-more summary::-webkit-details-marker { display: none; }
.hs-more summary::after { content: '+'; font-size: 14px; }
.hs-more[open] summary::after { content: '–'; }
.hs-more-grid { margin-top: 18px; padding: 20px 22px; background: var(--cream); border: 1px solid var(--border); }
.hs-check { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin-top: 6px; }
.hs-check input { margin-top: 3px; accent-color: var(--gold); }

/* Zone résultats + verrou */
.hz { position: relative; }
.hz-lock { position: absolute; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(255,255,255,0.92) 38%, var(--white) 72%); }
.hz.locked .hz-lock { display: flex; }
.hz.locked .hz-results { filter: blur(7px); pointer-events: none; user-select: none; }
.hk { width: 100%; max-width: 500px; background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--gold);
  padding: 28px 30px; box-shadow: 0 24px 60px rgba(8,25,56,0.14); }
.hk h2, .hk h3 { font-family: var(--font); font-size: 21px; font-weight: 400; color: var(--green); line-height: 1.3; }
.hk p { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }
.hk-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.hk-form input { padding: 12px 16px; border: 1px solid var(--border); border-radius: 50px; font-size: 13px;
  font-family: var(--font-sans); background: var(--white); color: var(--text); }
.hk-form input:focus { outline: none; border-color: var(--gold); }
.hk-form .w { grid-column: 1 / -1; }
.hk-form button { grid-column: 1 / -1; min-height: 48px; background: var(--gold); color: white; border: 0; border-radius: 50px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; font-family: var(--font-sans);
  transition: background .3s; }
.hk-form button:hover { background: var(--gold-light); }
.hk-form button[disabled] { opacity: 0.6; cursor: wait; }
.hk-conf { margin-top: 10px; font-size: 10.5px; color: var(--text-light); line-height: 1.6; }
.hk-status { margin-top: 8px; font-size: 12px; color: var(--danger, #A33D3D); }

/* LE chiffre (capacité) */
.hr-big { text-align: center; padding: 28px 20px 8px; }
.hr-big .lbl { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.hr-big .num { font-family: var(--font); font-size: clamp(38px, 5.5vw, 58px); color: var(--green); line-height: 1.1; margin-top: 8px; }
.hr-big .why { margin-top: 10px; font-size: 12.5px; color: var(--text-light); }
.hr-big .why strong { color: var(--gold); font-weight: 600; }

/* Verdict (bien en vue) */
.hv { padding: 16px 20px; font-size: 13.5px; line-height: 1.7; border-left: 3px solid var(--green);
  background: rgba(8,25,56,0.05); color: var(--green); margin-top: 24px; }
.hv.warn { border-left-color: var(--gold); background: rgba(139,111,71,0.08); color: #6B5230; }
.hv.ko { border-left-color: #A33D3D; background: rgba(163,61,61,0.07); color: #A33D3D; }

/* Répartition */
.hl { margin-top: 26px; }
.hl-bar { display: flex; height: 14px; overflow: hidden; border-radius: 50px; background: var(--cream); }
.hl-fp { background: var(--gold); transition: width .4s; }
.hl-r1 { background: var(--green); transition: width .4s; }
.hl-r2 { background: var(--green-mid); transition: width .4s; }
.hl-legend { display: flex; gap: 10px 22px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--text-muted); }
.hl-legend strong { color: var(--green); font-weight: 600; }
.hl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* Tuiles */
.ht { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.ht-tile { border: 1px solid var(--border); padding: 18px 18px 15px; text-align: center; }
.ht-tile .v { font-family: var(--font); font-size: 21px; color: var(--green); }
.ht-tile .l { margin-top: 5px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); line-height: 1.5; }
.ht-track { height: 5px; background: var(--cream); border-radius: 50px; margin-top: 10px; overflow: hidden; }
.ht-fill { height: 100%; border-radius: 50px; background: var(--green); transition: width .4s, background .4s; }

/* Taux */
.hx { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.hx .lbl { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.hx-chip { border: 1px solid var(--border); background: var(--cream); color: var(--text-muted); font-size: 12px;
  padding: 9px 16px; border-radius: 50px !important; cursor: pointer; font-family: var(--font-sans); transition: all .22s; }
.hx-chip.on { background: var(--green); border-color: var(--green); color: white; }
.hx-real { margin-left: auto; font-family: var(--font); font-size: 17px; color: var(--green); }
.hx-real span { font-size: 11px; color: var(--text-light); font-family: var(--font-sans); }

/* Détail bancaire */
.hd { margin-top: 20px; }
.hd summary { cursor: pointer; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); list-style: none; }
.hd summary::-webkit-details-marker { display: none; }
.hd table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.hd td { padding: 9px 4px; font-size: 12.5px; color: var(--text-muted); border-bottom: 1px solid var(--cream); }
.hd td:last-child { text-align: right; font-family: var(--font); color: var(--green); white-space: nowrap; }
.hd tr.total td { font-weight: 600; color: var(--green); border-top: 1px solid var(--border); }

/* Ventes récentes comparables */
.hw { margin-top: 30px; padding: 24px 26px; background: var(--green); }
.hw-kicker { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 8px; }
.hw h2, .hw h3 { font-family: var(--font); font-size: 21px; font-weight: 400; color: white; }
.hw-table-wrap { margin-top: 16px; border: 1px solid rgba(255,255,255,0.14); overflow-x: auto; }
.hw-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.hw-table th { text-align: left; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-light); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.14); }
.hw-table td { font-size: 13px; color: rgba(255,255,255,0.85); padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.hw-table td:first-child { font-family: var(--font); color: white; }
.hw-table td:nth-child(5) { font-family: var(--font); color: white; white-space: nowrap; }
.hw-table td:last-child { color: var(--gold-light); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.hw-table tr:last-child td { border-bottom: 0; }
.hw.no-terrain .hw-col-terrain, .hw.no-terrain td:nth-child(4) { display: none; }
.hw.no-terrain .hw-table { min-width: 520px; }
.hw-note { margin-top: 12px; font-size: 11px; color: rgba(255,255,255,0.45); line-height: 1.7; }

/* CTA du simulateur */
.hc { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hc-ghost { display: inline-flex; align-items: center; min-height: 50px; background: none; color: var(--green);
  border: 1px solid var(--border); padding: 14px 26px; border-radius: 50px; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer; text-decoration: none; font-family: var(--font-sans); transition: border-color .3s; }
.hc-ghost:hover { border-color: var(--gold); color: var(--green); }
.hs-note { margin-top: 18px; font-size: 11px; color: var(--text-light); line-height: 1.7; }

/* ═══ 3. Bande courtier ═══ */
.hb { background: radial-gradient(130% 110% at 88% 6%, rgba(26,74,128,0.25) 0%, transparent 52%),
  linear-gradient(135deg, var(--green-800), var(--green-700) 45%, var(--green) 80%, var(--green-mid));
  padding: 72px 80px; text-align: center; }
.hb h2 { font-family: var(--font); font-size: clamp(24px, 3vw, 38px); font-weight: 400; color: white; }
.hb h2 em { font-style: italic; color: var(--gold-light); }
.hb p { margin: 14px auto 28px; font-size: 13.5px; color: rgba(255,255,255,0.7); max-width: 54ch; line-height: 1.8; }
.hb button, .hb a { display: inline-flex; align-items: center; min-height: 52px; background: var(--gold); color: white; border: 0;
  padding: 15px 36px; border-radius: 50px; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; font-family: var(--font-sans); transition: background .3s, transform .3s; }
.hb button:hover, .hb a:hover { background: var(--gold-light); transform: translateY(-2px); color: white; }

/* ═══ 4. Règles d'or ═══ */
.hg { background: var(--cream); padding: 64px 80px 24px; }
.hg-inner { max-width: 920px; margin: 0 auto; }
.hg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.hg-cell { background: var(--white); padding: 26px 22px; }
.hg-cell .num { font-family: var(--font); font-size: 26px; color: var(--gold); }
.hg-cell h3 { margin-top: 6px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.hg-cell p { margin-top: 8px; font-size: 12px; color: var(--text-muted); line-height: 1.7; }

/* ═══ 5. FAQ ═══ */
.hq { background: var(--cream); padding: 40px 80px 72px; }
.hq-inner { max-width: 860px; margin: 0 auto; }
.hq h2 { font-family: var(--font); font-size: clamp(22px, 2.8vw, 32px); font-weight: 400; color: var(--green); margin-bottom: 28px; }
.hq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.hq-item:first-of-type { border-top: 1px solid var(--border); }
.hq-item h3 { font-family: var(--font); font-size: 17px; font-weight: 400; color: var(--green); margin-bottom: 10px; }
.hq-item p { font-size: 13.5px; color: var(--text-muted); line-height: 1.85; }

/* ═══ Responsive ═══ */
@media (max-width: 1000px) {
  .hh, .hs, .hb, .hg, .hq { padding-left: 24px; padding-right: 24px; }
  .hh { padding-bottom: 44px; }
  .hs-body { padding: 26px 20px 30px; }
  .hf-head { flex-wrap: wrap; }
  .hf-head input { width: 140px; font-size: 14px; }
  .ha-row { flex-direction: column; }
  .ha-row button { width: 100%; justify-content: center; display: inline-flex; align-items: center; }
  .ht { grid-template-columns: 1fr; }
  .hx-real { margin-left: 0; width: 100%; }
  .hk { padding: 22px 20px; box-shadow: 0 18px 44px rgba(8,25,56,0.18); }
  .hk-form { grid-template-columns: 1fr; }
  .hg-grid { grid-template-columns: 1fr 1fr; }
  .hc { flex-direction: column; align-items: stretch; }
  .hc-ghost { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .hl-fp, .hl-r1, .hl-r2, .ht-fill, .hx-chip, .hb button, .hb a { transition: none; }
}

@media (max-width: 480px) {
  /* Même filet base.css (section { padding-top: 36px !important })
     sur téléphone : le hero garde son dégagement sous le menu. */
  .hh { padding-top: calc(var(--r5-header-h, 96px) + 34px) !important; }
}

/* La mention « deux limites se cumulent » : elle n'est pas une remarque
   secondaire mais la raison pour laquelle ajouter des fonds ne fait rien
   bouger. Elle se lit, sans crier. */
.hw-et { display: block; margin-top: 6px; color: var(--text-muted); }
