/* audit-immo · styles applicatifs par-dessus le design system.
   Source : maquettes docs/design/*.html (blocs <style> consolidés, classes .hero
   dédoublonnées en .home-hero / .rep-hero). Tokens : voir ds.css — jamais de couleur en dur. */
@import url("ds-sYx4pcK.css");

/* =============================================================
   LAYOUT GLOBAL
   ============================================================= */
body {
  background-color: var(--bg);
  background-image: radial-gradient(1200px 560px at 80% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 56%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1; }
.footer { margin-top: auto; }

/* Menu « Mon compte » de la nav : <details> natif (pattern du popover Partager — zéro JS,
   CSP-safe) ; la fermeture au clic extérieur / Échap est déléguée dans ui.js. */
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary .chev { width: 12px; height: 12px; transition: transform var(--dur-2); }
.nav-menu[open] > summary { color: var(--fg); background: var(--surface-2); }
.nav-menu[open] > summary .chev { transform: rotate(180deg); }
.nav-menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: 240px; padding: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.nmp-head { padding: 4px 10px 8px; font-size: var(--t-2xs); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nmp-logout { margin: 0; }
/* Déconnexion rendue par un <button> dans un form : reset des styles natifs pour matcher les liens. */
.nmp-logout .nmp-item { width: 100%; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; }
.nmp-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 500; color: var(--fg); }
.nmp-item:hover { background: var(--surface-2); }
.nmp-item .ic { width: 16px; height: 16px; color: var(--faint); }
.nmp-item .num { margin-left: auto; color: var(--accent); font-family: var(--font-mono); }
.nmp-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* nav responsive : icônes seules sur petit écran ; la pastille crédits rejoint le menu compte
   (le solde y figure déjà) pour que la barre reste aérée. Le libellé reste LU par les lecteurs
   d'écran (masquage visuel, pas display:none — audit U11) ; cibles tactiles 40 px mini. */
@media (max-width: 760px) {
  .nav-link .lbl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-link { min-width: 40px; min-height: 40px; justify-content: center; padding: 8px 10px; }
  .nav-in { gap: 8px; }
  .nav-links { gap: 2px; }
  .credits-pill { display: none; }
}
/* téléphone : gouttière 16 px ; le sélecteur de thème quitte la barre (sans quoi elle déborde à
   375 px) et vit dans le pied de page (.footer-theme). */
@media (max-width: 560px) {
  .wrap, .wrap-narrow { padding: 0 16px; }
  .page-wrap, .pa-wrap, .na-wrap, .auth-wrap { padding-left: 16px; padding-right: 16px; }
  .nav-in { gap: 4px; }
  .nav .theme-toggle { display: none; }
}
.footer-theme { display: flex; align-items: center; gap: 10px; margin-top: var(--s5); font-size: var(--t-xs); color: var(--muted); }
.footer-theme .theme-toggle button { padding: 9px; }
#contenu:focus { outline: none; }

/* flashes */
.flash {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px; border-radius: var(--r-md); margin: 16px 0 0;
  font-size: var(--t-sm); font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--fg-2);
}
.flash .ic { flex: none; }
.flash.success { color: var(--pos); background: color-mix(in srgb, var(--pos) 12%, transparent); border-color: color-mix(in srgb, var(--pos) 32%, transparent); }
.flash.error { color: var(--neg); background: color-mix(in srgb, var(--neg) 12%, transparent); border-color: color-mix(in srgb, var(--neg) 32%, transparent); }
.flash.warning { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }

/* spinner (audit en cours) */
.spin {
  display: inline-block; width: .8em; height: .8em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: ai-spin .7s linear infinite; vertical-align: -1px;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }

/* prose (pages légales) */
.prose { max-width: 70ch; line-height: 1.65; }
.prose h2 { margin: 1.8em 0 .5em; font-size: var(--t-h3); }
.prose p, .prose li { color: var(--fg-2); font-size: var(--t-body); }
.prose ul { padding-left: 1.2em; }
.prose a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose p + p { margin-top: .8em; }

/* =============================================================
   PAGES ÉDITORIALES (méthodologie, à propos, contact) & LÉGALES
   Une colonne de lecture, sections en cartes, définitions en <dl> (pas de mono : c'est
   du texte, pas des chiffres), un seul CTA primaire en pied de page.
   ============================================================= */
.ed { padding-bottom: var(--s10); }
.ed-narrow { max-width: 640px; }
.ed-head { margin-bottom: 26px; }
.ed-head h1 { font-size: var(--t-h1); margin-top: 10px; }
.ed-lead { margin-top: 10px; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 62ch; }
.ed-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ed-toc a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-2); font-size: var(--t-xs); font-weight: 600; color: var(--muted); transition: color var(--dur-2), border-color var(--dur-2); }
.ed-toc a:hover { color: var(--fg); border-color: var(--accent-line); }
.ed-card { padding: 24px 26px; margin-bottom: 16px; scroll-margin-top: 80px; }
.ed-h { display: flex; align-items: center; gap: 12px; font-size: var(--t-h4); letter-spacing: -.01em; margin-bottom: 12px; }
.ed-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; place-items: center; color: var(--accent); flex: none; }
.ed-ic .ic { width: 18px; height: 18px; }
.ed-prose { font-size: var(--t-body); line-height: 1.65; color: var(--fg-2); max-width: 68ch; }
.ed-prose p + p { margin-top: .75em; }
.ed-prose b { color: var(--fg); }
.ed-dl { margin: 6px 0 0; }
.ed-dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 24px; padding: 12px 0; border-top: 1px solid var(--line); }
.ed-dl dt { font-size: var(--t-sm); color: var(--fg-2); }
.ed-dl dt b { color: var(--fg); }
.ed-dl dd { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.ed-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ed-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 22px 26px; margin-top: 24px; }
.ed-cta p { margin-top: 4px; font-size: var(--t-sm); }
.ed-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ed-fine { margin-top: 14px; font-size: var(--t-xs); color: var(--muted); }
.contact-card .auth-form .btn { justify-self: start; }
/* honeypot anti-spam : hors écran, jamais focalisable */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) {
  .ed-card { padding: 20px 18px; }
  .ed-dl > div { grid-template-columns: minmax(0, 1fr); }
  .ed-cta .btn, .contact-card .auth-form .btn { width: 100%; }
  .ed-cta-actions { width: 100%; }
}

/* légal : onglets entre les 3 pages + sommaire ancré (pages longues), texte inchangé */
.legal { padding-bottom: var(--s10); }
.legal-head { margin-bottom: 22px; }
.legal-head h1 { font-size: var(--t-h1); margin: 10px 0 18px; }
.legal-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.legal-tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.legal-tabs a:hover { color: var(--fg); }
.legal-tabs a.on { background: var(--surface); color: var(--fg); box-shadow: var(--sh-1); }
.legal-toc { margin: 0 0 8px; padding: 16px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); max-width: 70ch; }
.legal-toc-t { font-size: var(--t-2xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.legal-toc ol { margin: 0; padding: 0; list-style: none; columns: 2 220px; column-gap: 24px; }
.legal-toc li { break-inside: avoid; }
.legal-toc a { display: inline-block; padding: 4px 0; font-size: var(--t-sm); color: var(--fg-2); }
.legal-toc a:hover { color: var(--accent); }
.legal-body h2 { scroll-margin-top: 80px; padding-top: .4em; border-top: 1px solid var(--line); }

/* =============================================================
   HOME — parcours : promesse + champ URL → preuve (rapport réel animé) → sources → vitrine
   ============================================================= */
.home-hero { position: relative; padding: 72px 0 56px; overflow: hidden; isolation: isolate; }
.home-hero .hero-deco { -webkit-mask-image: radial-gradient(720px 360px at 78% 18%, #000, transparent 72%); mask-image: radial-gradient(720px 360px at 78% 18%, #000, transparent 72%); }
.home-hero .hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 920px) { .home-hero .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 10px; border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 600; color: var(--fg-2);
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line-2);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.home-hero h1 { font-size: clamp(36px, 5.2vw, 62px); letter-spacing: -.04em; line-height: 1.0; margin: 20px 0 20px; font-weight: 800; }
.home-hero .sub { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 50ch; }
.home-hero .sub b { color: var(--fg-2); font-weight: 600; }

.paste { display: flex; gap: 10px; margin: 30px 0 14px; max-width: 560px; }
.paste .input { flex: 1; min-width: 0; padding: 15px 16px; box-shadow: var(--sh-1); }
@media (max-width: 560px) { .paste { flex-direction: column; } .paste .btn { width: 100%; } }
/* Compatibilité des portails, sous le champ URL de la home : honnêteté avant le premier geste.
   Deux niveaux de lecture — ce qui marche en clair, la réserve anti-bot en retrait dessous. */
.hp-compat { max-width: 560px; margin: 0 0 14px; font-size: var(--t-xs); line-height: 1.55; color: var(--fg-2); }
.hp-compat-warn { display: block; margin-top: 3px; color: var(--muted); }
.hero-proof { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: var(--t-sm); color: var(--fg-2); }
.hero-proof li { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof .ic { color: var(--accent); }

/* carte d'aperçu = rapport d'exemple réel (DemoReportTeaser) */
.hero-preview { position: relative; }
.mini { padding: 0; }
.mini-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.mini-head { padding: 16px 18px 0; }
.mini-biz { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mini-biz .ic-wrap { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.mini-biz h2 { font-size: 16px; letter-spacing: -.01em; }
.mini-biz p { font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.mini-body { padding: 16px 18px 18px; display: grid; gap: 16px; }
.mini-verdict { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.mini-offer { font-size: var(--t-sm); color: var(--fg-2); }
.mini-offer b { font-size: 17px; color: var(--fg); }
.mini-gauges { display: flex; justify-content: space-around; gap: 6px; }
.mini-gauges .gauge svg { width: 68px; height: 68px; }
.mini-gauges .gv { font-size: 16px; }
.mini-gauges .gl { font-size: var(--t-2xs); }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.mini-kpi { background: var(--surface); padding: 12px 14px; }
.mini-kpi .l { font-size: var(--t-2xs); color: var(--muted); margin-bottom: 5px; }
.mini-kpi .v { margin: 0; white-space: nowrap; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
/* le chiffre décisif (1er : cashflow / effort d'épargne) domine le bloc */
.mini-kpi:first-child .v { font-size: 24px; }
@media (max-width: 560px) { .mini-kpi { padding: 11px 12px; } .mini-kpi .v { font-size: 16px; } .mini-kpi:first-child .v { font-size: 19px; } }
.mini-prov { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-foot { display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); font-size: var(--t-sm); font-weight: 600; color: var(--accent); }
.mini-foot .ic { margin-left: auto; transition: transform var(--dur-2) var(--ease); }
/* lien étiré : toute la carte est cliquable, un seul lien au clavier / lecteur d'écran */
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mini:hover .mini-foot .ic { transform: translateX(3px); }
.mini:has(.stretched:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.mini .stretched:focus-visible { outline: none; }

/* sections home */
.sect { padding: 56px 0; }
.sect-tight { padding: 8px 0 24px; }
.sect-label { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.sect-label h2 { font-size: 28px; letter-spacing: -.025em; }
.sect-label .line { flex: 1; height: 1px; background: var(--line); }
.sect-note { font-size: var(--t-sm); margin-top: 14px; }
@media (max-width: 560px) { .sect { padding: 40px 0; } .sect-label h2 { font-size: 23px; } .sect-label .chip { display: none; } }

/* bande de confiance : sources officielles + usage réel */
.trust { padding: 22px 24px; }
.trust-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; margin-bottom: 18px; }
.trust-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.trust-stats > div { display: flex; align-items: baseline; gap: 8px; font-size: var(--t-sm); }
.tstat { font-size: 26px; font-weight: 800; color: var(--accent); }
.sources { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 920px) { .sources { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sources { grid-template-columns: 1fr; gap: 14px; } }
.sources li { display: flex; gap: 12px; align-items: flex-start; }
.sources .s-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.sources .s-ic .ic { width: 18px; height: 18px; }
.sources b { font-size: var(--t-body); }
.sources p { font-size: var(--t-xs); color: var(--muted); line-height: 1.5; margin-top: 3px; }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 24px; position: relative; }
.step .n { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; margin-bottom: 16px; box-shadow: var(--glow); }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: var(--t-sm); color: var(--muted); line-height: 1.6; }
.step .ic-big { position: absolute; top: 20px; right: 20px; color: var(--line-2); }
.step .ic-big .ic { width: 26px; height: 26px; }

/* vitrine éditoriale (FIX-2) */
/* auto-fit : 2 à 4 cartes remplissent toujours la rangée */
.showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.sc-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 18px; color: var(--fg); }
.sc-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--vc); opacity: .9; }
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); }
.sc-ic .ic { width: 18px; height: 18px; }
.sc-title { font-size: 15.5px; letter-spacing: -.01em; line-height: 1.3; }
.sc-loc { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--muted); }
.sc-loc .ic { color: var(--faint); }
.sc-kpis { display: grid; margin: 4px 0 0; }
.sc-kpis > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.sc-kpis dt { font-size: var(--t-xs); color: var(--muted); }
.sc-kpis dd { margin: 0; font-weight: 700; font-size: var(--t-sm); white-space: nowrap; }
.sc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; font-size: var(--t-xs); }
.sc-go { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--accent); }
.sc-go .ic { transition: transform var(--dur-2) var(--ease); }
.sc-card:hover .sc-go .ic { transform: translateX(3px); }

.profiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 920px) { .profiles { grid-template-columns: repeat(2, 1fr); } }
.profile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.profile .pic { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); flex: none; }
.profile h3 { font-size: 15.5px; }
.profile p { font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 560px) {
  .profiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .profile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .profile .pic { width: 36px; height: 36px; }
  .profile h3 { font-size: 14.5px; }
  .profile p { font-size: var(--t-xs); }
  .step { padding: 20px; }
}

.pricing { display: grid; grid-template-columns: 1.4fr .6fr; gap: 18px; align-items: stretch; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }
.price-main { padding: 30px; display: flex; flex-direction: column; align-items: flex-start; }
.price-main .amt { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 6px 0 18px; }
.price-main .amt .big { font-family: var(--font-mono); font-size: 46px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.price-feats { display: grid; gap: 12px; margin: 6px 0 22px; }
.price-feats div { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); }
.price-feats .ic { color: var(--accent); width: 17px; height: 17px; flex: none; }
.price-side { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 8px; background: var(--surface-2); }
.price-side p { font-size: var(--t-sm); color: var(--fg-2); }
.price-gift { font-size: 40px; font-weight: 800; color: var(--accent); line-height: 1.1; }

/* ancrage valeur : la perte évitée (rouge) face au prix de l'audit (vert) */
.anchor { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; width: 100%; margin: 14px 0 10px; }
@media (max-width: 560px) { .anchor { grid-template-columns: 1fr; gap: 10px; } .anchor-vs { justify-self: start; } }
.anchor > div { display: flex; flex-direction: column; gap: 6px; }
.anchor-v { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.anchor-l { font-size: var(--t-sm); color: var(--fg-2); line-height: 1.45; }
.anchor-vs { font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 700; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-pill); }
.anchor-note { font-size: var(--t-xs); color: var(--muted); margin-bottom: 18px; }

/* appel final */
.final-cta { position: relative; overflow: hidden; padding: 44px 32px; }
.final-cta .grid-deco { -webkit-mask-image: radial-gradient(520px 240px at 50% 0, #000, transparent 75%); mask-image: radial-gradient(520px 240px at 50% 0, #000, transparent 75%); }
.final-in { position: relative; max-width: 620px; margin: 0 auto; text-align: center; }
.final-in h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; text-wrap: balance; }
.final-in > p { margin-top: 8px; }
.final-in .paste { margin: 24px auto 0; }
@media (max-width: 560px) { .final-cta { padding: 32px 18px; } }

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details summary { padding: 20px 4px; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 16px; }
.faq details summary::-webkit-details-marker { display: none; }
.faq details summary .ic { color: var(--muted); transition: transform var(--dur-2); flex: none; }
.faq details[open] summary .ic { transform: rotate(180deg); color: var(--accent); }
.faq details .a { padding: 0 4px 22px; color: var(--muted); font-size: var(--t-body); line-height: 1.65; max-width: 64ch; }

/* =============================================================
   DASHBOARD / LISTE DES AUDITS (maquette Dashboard.html)
   ============================================================= */
/* En-tête : titre + UN CTA primaire (lancer un audit) ; dessous, vues + compteurs utiles. */
.dash-head { padding: 34px 0 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 20px; flex-wrap: wrap; }
.dash-title { min-width: 0; flex: 1 1 420px; }
.dash-head h1 { font-size: 32px; letter-spacing: -.03em; }
.dash-head p { color: var(--muted); font-size: var(--t-body); margin-top: 6px; max-width: 62ch; }
.dash-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 18px; }
/* contrôle segmenté des vues (liens : chaque vue a son URL) */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.seg a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 600; color: var(--muted); transition: color var(--dur-2), background var(--dur-2); }
.seg a:hover { color: var(--fg); }
.seg a.on { background: var(--surface); color: var(--fg); box-shadow: var(--sh-1); }
.seg-n { font-family: var(--font-mono); font-size: var(--t-2xs); padding: 1px 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.stat-row { display: flex; gap: 28px; margin: 0; }
.stat { display: flex; flex-direction: column-reverse; gap: 2px; }
.stat dd { margin: 0; }
.stat .v { font-family: var(--font-mono); font-weight: 800; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; }
.stat .v.pos { color: var(--pos); }
.stat .l { font-size: var(--t-xs); color: var(--muted); }
.dash-links { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin: -4px 0 16px; font-size: var(--t-xs); }
.dash-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--muted); font-weight: 600; }
.dash-link:hover { color: var(--fg); }
.dash-notice { margin: 0 0 18px; }
.notice-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
.search input { width: 100%; min-height: 40px; padding: 10px 14px 10px 38px; border-radius: var(--r-md); background: var(--field-bg); border: 1px solid var(--line-2); color: var(--fg); font-size: var(--t-sm); }
.search input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { min-height: 36px; padding: 0 13px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-2); font-size: var(--t-xs); font-weight: 600; color: var(--muted); cursor: pointer; transition: var(--dur-2); display: inline-flex; align-items: center; gap: 6px; }
.fchip:hover { color: var(--fg); border-color: var(--line-2); }
.fchip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.fchip .dotc { width: 7px; height: 7px; border-radius: 50%; background: var(--vc, var(--vd-moy)); }
.select-sm { width: auto; min-height: 36px; padding: 6px 12px; font-size: var(--t-xs); }
.sortbtn { margin-left: auto; }

.audit-list { display: flex; flex-direction: column; gap: 10px; }
.audit-row {
  --vc: var(--line);
  display: grid; grid-template-columns: auto minmax(0, 1.6fr) .9fr .9fr 1fr .8fr auto; gap: 18px; align-items: center;
  padding: 16px 18px 16px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2), box-shadow var(--dur-2);
  position: relative; overflow: hidden; color: var(--fg);
}
/* liseré gauche à la couleur du verdict (data-v posé par _row) */
.audit-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--vc); opacity: .9; }
.audit-row[data-v="opp"], .dotc[data-v="opp"] { --vc: var(--vd-opp); }
.audit-row[data-v="bon"], .dotc[data-v="bon"] { --vc: var(--vd-bon); }
.audit-row[data-v="moy"], .dotc[data-v="moy"] { --vc: var(--vd-moy); }
.audit-row[data-v="fai"], .dotc[data-v="fai"] { --vc: var(--vd-fai); }
.audit-row[data-v="evi"], .dotc[data-v="evi"] { --vc: var(--vd-evi); }
.audit-row:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--sh-2); }
/* meilleur dossier de la vue : seule ligne « éclairée » de l'écran */
.audit-row.is-best { border-color: var(--accent-line); box-shadow: var(--sh-glow); }
.ar-best { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 5px; padding: 2px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: var(--t-2xs); font-weight: 700; letter-spacing: .02em; }
.ar-best .ic { width: 12px; height: 12px; }
.audit-row.is-pending, .audit-row.is-failed { background: var(--surface-2); }
.ar-biz { min-width: 0; }
.ar-ic { width: 44px; height: 44px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); flex: none; }
.ar-ic-fail { color: var(--neg); }
/* vignette photo de l'annonce (remplace l'icône de profil quand disponible) */
.ar-thumb { width: 64px; height: 48px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); flex: none; position: relative; }
.ar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sold-badge { position: absolute; inset: auto 0 0 0; background: color-mix(in srgb, var(--neg) 85%, black); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 1px 0; }
.new-badge { position: absolute; inset: 0 0 auto 0; background: color-mix(in srgb, var(--pos) 78%, black); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 1px 0; }
.ar-biz h3 { font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-host { font-weight: 500; color: var(--muted); }
.ar-meta { font-size: var(--t-xs); color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* contexte socio-éco de la commune (INSEE) — sous la ligne méta */
.ar-ctx { font-size: 11px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* badges DPE / source dans la ligne méta (palette DPE alignée sur la page rapport) */
.dpe-tag { display: inline-grid; place-items: center; min-width: 17px; height: 17px; border-radius: 4px; font-weight: 800; font-size: 10px; color: #fff; vertical-align: -3px; padding: 0 2px; }
.dpe-tag[data-l="A"] { background: #16a34a; }
.dpe-tag[data-l="B"] { background: #65a30d; }
.dpe-tag[data-l="C"] { background: #ca8a04; }
.dpe-tag[data-l="D"] { background: #ea580c; }
.dpe-tag[data-l="E"] { background: #dc2626; }
.dpe-tag[data-l="F"] { background: #b91c1c; }
.dpe-tag[data-l="G"] { background: #7f1d1d; }
.src-tag { display: inline-block; padding: 1px 8px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface-2); font-size: 10px; font-weight: 700; color: var(--muted); vertical-align: -2px; }
.ar-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ar-col .cl { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.ar-col .cv { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; white-space: nowrap; }
.ar-col .cv.pos { color: var(--pos); }
.ar-col .cv.neg { color: var(--neg); }
/* le cashflow est LE chiffre de décision de la ligne */
.ar-cashflow .cv { font-size: 17px; }
.ar-col .cs { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.ar-end { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
/* boutons favori (cœur) / masquer (œil barré) — toggle fetch via le contrôleur Stimulus flag */
.ar-actions { display: flex; gap: 2px; }
.flagbtn { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--faint); cursor: pointer; transition: var(--dur-2); padding: 0; }
.flagbtn .ic { width: 16px; height: 16px; }
.flagbtn:hover { color: var(--fg); border-color: var(--line-2); background: var(--surface-2); }
.flagbtn.fav.on { color: var(--neg); }
.flagbtn.fav.on .ic { fill: currentColor; }
.flagbtn.hide.on { color: var(--accent); }
.ar-score { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ar-score-l { font-family: var(--font-sans); font-weight: 600; font-size: 10px; color: var(--faint); }
.ar-go { color: var(--faint); transition: var(--dur-2); }
.audit-row:hover .ar-go { color: var(--accent); transform: translateX(2px); }

@media (max-width: 920px) {
  .audit-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .ar-hideable { display: none; }
}
/* téléphone : 2 rangées en flex-wrap — identité du bien, puis cashflow + verdict (le chiffre de
   décision reste visible). Favori/masquer passent en haut à droite (cibles 40 px) ; la ligne
   entière est le lien : chevron et indice de fiabilité s'effacent. */
@media (max-width: 560px) {
  .dash-head .btn-primary { width: 100%; }
  .seg { width: 100%; }
  .seg a { flex: 1; justify-content: center; padding: 0 8px; }
  .search { max-width: none; flex-basis: 100%; }
  .sortbtn { margin-left: 0; }
  .audit-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; padding: 14px 12px 12px 16px; }
  .ar-thumb { width: 56px; height: 44px; }
  .ar-biz { flex: 1 1 calc(100% - 68px); }
  .audit-row:has(.ar-actions) .ar-biz { padding-right: 84px; }
  .ar-cashflow { flex: 0 0 auto; margin-left: 56px; }
  .audit-row.is-pending .ar-cashflow, .audit-row.is-failed .ar-cashflow { display: none; }
  .ar-end { flex: 1 1 auto; align-self: flex-end; }
  .ar-actions { position: absolute; top: 8px; right: 8px; }
  .ar-score, .ar-go { display: none; }
  .flagbtn { width: 40px; height: 40px; }
}

/* Comparateur d'audits (/audits/comparer) : le dossier recommandé (seule carte lumineuse), puis
   le tableau (classes .mk-cmp partagées avec le comparateur de villes). */
.dash-title .crumb { margin-bottom: 10px; }
.cmp-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k cta" "main cta" "figs cta"; gap: 6px 24px; align-items: center; padding: 20px 24px; margin-bottom: 18px; color: var(--fg); }
.cmp-top-k { grid-area: k; display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-2xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.cmp-top-main { grid-area: main; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cmp-top-n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.cmp-top-figs { grid-area: figs; display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: var(--t-sm); }
.cmp-top-figs b { font-size: 17px; }
.cmp-top-l { color: var(--muted); }
.cmp-top-cta { grid-area: cta; }
/* une colonne = un bien : valeurs alignées à gauche sous le nom du bien ; libellés sur une ligne */
.cmp-audits td.num { text-align: left; }
.cmp-audits tbody th { white-space: nowrap; }
.cmp-sub { display: block; margin-top: 2px; font-size: var(--t-2xs); font-weight: 500; color: var(--muted); }
.cmp-best, .cmp-best-legend { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cmp .pos { color: var(--pos); }
.cmp .neg { color: var(--neg); }
@media (max-width: 560px) {
  .cmp-top { grid-template-columns: 1fr; grid-template-areas: "k" "main" "figs" "cta"; padding: 18px; }
  .cmp-top-cta { width: 100%; margin-top: 6px; }
}

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 70px 20px; }
.empty[hidden] { display: none; }
.empty .ill { width: 76px; height: 76px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); margin-bottom: 22px; }
.empty .ill .ic { width: 34px; height: 34px; }
.empty h3 { font-size: 20px; margin-bottom: 8px; }
.empty p { color: var(--muted); font-size: var(--t-body); max-width: 42ch; margin-bottom: 22px; line-height: 1.6; }

/* =============================================================
   RAPPORT D'AUDIT (maquette Rapport d'audit.html)
   ============================================================= */
/* overflow-x: clip (≠ hidden : pas de conteneur de défilement, la barre d'onglets reste collante) —
   les bulles .lex/.prov masquées (visibility:hidden) ne créent plus de défilement horizontal mobile. */
.report { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; padding-top: 28px; overflow-x: clip; }
@media (max-width: 920px) { .report { gap: 20px; } }

.rep-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }

/* onglets du rapport (cf. tabs_controller) — barre horizontale sticky, scrollable sur mobile */
.rep-tabs { position: sticky; top: 64px; z-index: 20; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px; margin: -4px 0 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-lg); }
.rep-tabs::-webkit-scrollbar { display: none; }
.rep-tabs button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 9px 14px; border-radius: var(--r-md); border: 1px solid transparent; background: transparent; color: var(--muted); font-weight: 600; font-size: var(--t-sm); cursor: pointer; transition: var(--dur-2); }
.rep-tabs button:hover { background: var(--surface-2); color: var(--fg); }
.rep-tabs button.active { background: var(--surface-2); color: var(--fg); border-color: var(--line-2); }
.rep-tabs button.active .ic { color: var(--accent); }
.rep-tabs button .ic { width: 16px; height: 16px; color: var(--faint); }
/* panneau masqué par JS — !important pour battre le display des panneaux (.panel-2b = grid).
   Scopé écran : à l'impression rien n'est masqué (tous les onglets sortent dans le PDF/print). */
@media screen { .tab-hidden { display: none !important; } }
@media print { .rep-tabs { display: none !important; } }

.rep-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--muted); }
.crumb a:hover { color: var(--fg); }
.rep-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* panneau d'onglet multi-cartes (Synthèse) : même rythme vertical que .rep-main */
.rep-panel { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.rep-panel:focus-visible, .sec:focus-visible { outline-offset: 6px; }
/* entrée sobre d'un panneau au changement d'onglet (posée par tabs_controller, jamais au chargement) */
@media (prefers-reduced-motion: no-preference) {
  .tab-in { animation: tab-in var(--dur-3) var(--ease-out) backwards; }
  @keyframes tab-in { from { opacity: 0; transform: translateY(8px); } }
}

/* popover natif <details data-popover> (Partager, Actions) — fermeture clic extérieur / Échap : ui.js */
.popover { position: relative; }
.popover > summary { list-style: none; cursor: pointer; }
.popover > summary::-webkit-details-marker { display: none; }
.popover-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(440px, 84vw); text-align: left; box-shadow: var(--sh-3); }
.input-mono { font-size: var(--t-xs); font-family: var(--font-mono); }

/* bandeaux des vues publiques (exemple, partage) : compacts, une ligne sur desktop */
.rep-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 14px 18px; border-color: var(--accent-line); }
.rep-banner-txt p { margin: 0; font-size: var(--t-sm); }
.rep-banner-sw { margin-top: 4px !important; font-size: var(--t-xs) !important; }
.rep-banner-sw a, .rep-banner-sw b { color: var(--accent); }
@media (max-width: 560px) {
  /* Téléphone : le hero de décision passe AVANT le bandeau (sinon la décision tombe sous la
     ligne de flottaison) — le bandeau suit immédiatement le hero, avant les onglets. */
  .rep-head, .notarial-banner, .simple-banner, .rep-hero { order: -1; }
  .rep-banner { padding: 11px 14px; }
  .rep-banner .rb-long { display: none; }
  .rep-banner .btn { width: 100%; }
  .rep-main { gap: 14px; }
  .report { padding-top: 14px; }
  /* en-tête : interrupteurs et boutons réduits à l'icône (le nom reste dans aria-label) */
  .rep-head { flex-wrap: nowrap; gap: 10px; }
  .rep-head .crumb { min-width: 0; white-space: nowrap; overflow: hidden; }
  .rep-actions { flex-wrap: nowrap; gap: 6px; }
  .rep-actions .tp-label { display: none; }
  .rep-actions .toggle-pill { padding: 8px 10px; gap: 6px; }
}

/* menu « Actions » du créateur (ré-auditer, publier, rendre privé, PDF) */
.popover-menu { width: 270px; padding: 6px; }
.popover-menu form { margin: 0; }
.pm-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--fg); font: inherit; font-size: var(--t-sm); font-weight: 500; text-align: left; cursor: pointer; }
.pm-item:hover, .pm-item:focus-visible { background: var(--surface-2); }
.pm-item .ic { color: var(--muted); }

.ic-inline { display: inline; vertical-align: -3px; }
.sec-anchor { scroll-margin-top: 140px; }

/* =============================================================
   HERO DE DÉCISION (Synthèse) — « J'achète, à quel prix, avec quel risque ? »
   Mobile : colonne unique dans l'ordre du DOM (verdict → prix → cashflow → bloquant → action →
   scores). ≥ 921 px : lecture en Z (verdict | prix / scores | chiffres + bloquant / action).
   Cellules séparées par des filets (gap 1 px sur fond --line). LE chiffre héros = le cashflow.
   ============================================================= */
.rep-hero { position: relative; }
.rep-hero.dh { overflow: visible; }
.dh-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dh-cell { background: var(--surface); padding: 18px 22px; min-width: 0; }
.dh-k { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-size: var(--t-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dh-k .lex { text-transform: none; letter-spacing: 0; font-size: var(--t-xs); }
.dh-k .sev { letter-spacing: 0; text-transform: none; }
.dh-note { font-size: var(--t-xs); color: var(--muted); line-height: 1.4; }
/* provenance des chiffres héros : symbole à taille de texte, pas à celle du chiffre */
.dh-asking .prov, .dh-hero .prov, .dh-second .prov { font-size: 15px; vertical-align: 4px; margin-left: 4px; }
/* la note ne dicte pas la largeur de sa colonne (cashflow et rendement restent côte à côte) */
.dh-fig .dh-note { contain: inline-size; }
.dh-pos--neg { color: var(--neg); } .dh-pos--pos { color: var(--pos); } .dh-pos--mid { color: var(--fg); }

/* 1. verdict */
.dh-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.dh-verdict .dh-k { flex-basis: 100%; margin-bottom: 0; }
.dh-conf { margin: 0; font-size: var(--t-sm); color: var(--fg-2); }
.dh-conf .num { font-size: 17px; color: var(--fg); }

/* 2. prix affiché vs juste valeur */
.dh-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.dh-asking { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.dh-delta { font-family: var(--font-mono); font-weight: 700; font-size: var(--t-sm); padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.dh-delta--neg { color: var(--neg); background: color-mix(in srgb, var(--neg) 14%, transparent); }
.dh-delta--pos { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.dh-delta--mid { color: var(--fg); background: var(--surface-3); }
.dh-sub { margin: 6px 0 0; font-size: var(--t-sm); color: var(--muted); line-height: 1.45; }
/* barre compacte : marqueur seul (pas d'étiquette), bornes chiffrées sur une ligne.
   Sélecteurs .posbar.posbar-sm : la base .posbar est déclarée plus bas dans la feuille. */
.posbar.posbar-sm { height: 44px; margin: 12px 0 0; }
.posbar.posbar-sm .track { top: 12px; }
.posbar.posbar-sm .range { top: 9px; }
.posbar.posbar-sm .central { top: 5px; }
.posbar.posbar-sm .marker { top: 0; }
.posbar.posbar-sm .marker .pin { margin: 0; }
.posbar.posbar-sm .bound { top: 27px; line-height: 1.3; }
.posbar.posbar-sm .bound .num { font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.posbar.posbar-sm .bound .bl { color: var(--faint); }

/* 3. cashflow (héros) + rendement net */
.dh-figs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 28px; }
.dh-fig { display: flex; flex-direction: column; min-width: 0; }
.dh-fig .dh-k { margin-bottom: 4px; }
.dh-hero { font-size: clamp(30px, 3.2vw, 40px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; white-space: nowrap; }
.dh-hero small { font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.dh-second { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.dh-cash .dh-note, .dh-yield .dh-note { margin-top: 4px; }

/* 4. point bloquant n°1 */
.dh-block { display: flex; align-items: flex-start; gap: 12px; }
.dh-block-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); flex: none; color: var(--vd-moy); background: color-mix(in srgb, var(--vd-moy) 14%, transparent); }
.dh-block-ic .ic { width: 18px; height: 18px; }
.dh-block--high .dh-block-ic { color: var(--neg); background: color-mix(in srgb, var(--neg) 14%, transparent); }
.dh-block--ok .dh-block-ic, .dh-block--low .dh-block-ic { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.dh-block--high { box-shadow: inset 3px 0 0 var(--neg); }
.dh-block-txt { min-width: 0; }
.dh-block-txt .dh-k { margin-bottom: 4px; }
.dh-block-txt p { margin: 0; font-size: var(--t-sm); color: var(--fg); line-height: 1.45; }
.dh-block-txt a { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* 5. action suivante */
.dh-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.dh-act-main { min-width: 0; flex: 1 1 320px; }
.dh-act-main .dh-k { margin-bottom: 4px; }
.dh-act-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0; }
.dh-act-h { font-weight: 700; font-size: var(--t-body); }
.dh-offer { font-size: 22px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.dh-act-delta { font-size: var(--t-sm); color: var(--muted); }
.dh-act-delta b { color: var(--fg); }
.dh-act-sub { margin: 4px 0 0; font-size: var(--t-sm); color: var(--muted); line-height: 1.45; }
.dh-act-sub b { color: var(--fg); }
.dh-cta { display: flex; flex-wrap: wrap; gap: 8px; }
.dh-cta .btn { min-height: 44px; }

/* 6. scores */
.dh-scores .gauges-row { justify-content: space-around; }
.dh-scores .score-explain { margin: 10px 0 0; }
.dh-scores .score-explain summary { cursor: pointer; font-size: var(--t-sm); }

.dh-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 10px 22px 12px; font-size: var(--t-2xs); color: var(--muted); }
.dh-legend-hint { color: var(--faint); }

@media (max-width: 560px) {
  .hide-sm { display: none; }
  .rep-tabs { padding: 5px; }
  .rep-tabs button { padding: 8px 12px; }
  .dh-verdict .dh-k { display: none; }
  .dh-verdict .verdict.lg { font-size: 17px; padding: 9px 15px 9px 12px; }
  .dh-sub { font-size: var(--t-xs); }
  .posbar.posbar-sm { margin-top: 8px; }
  .dh-hero { font-size: 26px; }
  .dh-hero small { font-size: 12.5px; margin-left: 2px; }
  .dh-figs { gap: 12px 18px; flex-wrap: nowrap; }
  .dh-verdict { gap: 8px 12px; }
  .dh-block-txt p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .dh-block-ic { width: 30px; height: 30px; }
  .dh-cell { padding: 12px 16px; }
  .rep-hero .hero-id { padding: 12px 16px; }
  .dh-legend { padding: 10px 16px 12px; }
  .dh-asking { font-size: 23px; }
  .dh-second { font-size: 22px; }
  .dh-cta { width: 100%; flex-wrap: nowrap; }
  .dh-cta .btn { flex: 1 1 auto; }
  .dh-cta .dh-pdf { flex: 0 0 auto; width: 48px; padding: 0; }
  .dh-cta .dh-pdf .tp-label { display: none; }
  .dh-act-main { flex-basis: 100%; }
}
@media (min-width: 921px) {
  .dh-grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
    grid-template-areas: "verdict price" "scores figs" "scores block" "action action";
  }
  .dh-verdict { grid-area: verdict; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: center; gap: 12px; }
  .dh-verdict .dh-k { flex-basis: auto; }
  .dh-price { grid-area: price; }
  .dh-figs { grid-area: figs; }
  .dh-block { grid-area: block; }
  .dh-action { grid-area: action; }
  .dh-scores { grid-area: scores; }
  .dh-cell { padding: 18px 26px; }
}

.biz { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.biz-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.biz-photo { width: 76px; height: 56px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.biz-photo img { width: 100%; height: 100%; object-fit: cover; }
.biz-ic .ic { width: 24px; height: 24px; }
.biz h1 { font-size: 21px; letter-spacing: -.02em; }
.biz p { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
/* en-tête identité compacte de la Synthèse (la fiche détaillée vit dans « Le bien ») */
.hero-id { display: flex; align-items: center; gap: 13px; padding: 16px 30px; border-bottom: 1px solid var(--line); }
.hero-id .biz-photo.sm, .hero-id .biz-ic { flex: none; }
.biz-photo.sm { width: 58px; height: 44px; border-radius: 10px; }
.hero-id-txt h1 { font-size: 19px; letter-spacing: -.02em; }
.hero-id-txt p { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
@media (max-width: 760px) { .hero-id { padding: 14px 18px; } }
.scoreglob { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 14px; }
.scoreglob .num { font-size: 42px; font-weight: 800; line-height: 1; }
.scoreglob .den { font-size: 18px; color: var(--muted); font-family: var(--font-mono); }
.synth { font-size: 14.5px; line-height: 1.65; color: var(--fg-2); max-width: 46ch; }
.synth b { color: var(--fg); }

/* bloc « À retenir » — clôture opinionée de la Synthèse (phrase de décision + résumé) */
.takeaway .tk-line { font-size: 15.5px; font-weight: 600; line-height: 1.5; color: var(--fg); margin: 6px 0 14px; }
.tk-links a { color: var(--accent); }

/* onglet Marché — carte « Contexte de la commune » (snapshot C5) : rangée de scores compacts */
.cc-scores { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-score { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.cc-score .cc-k { font-size: var(--t-xs); color: var(--muted); }
.cc-score .cc-v { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.cc-score .cc-v small { font-size: 12px; color: var(--muted); font-weight: 600; }
/* « un chiffre clé en tête d'onglet » (macro audits/report/_keys.html.twig) : le premier est
   le chiffre de l'onglet (plus grand, filet d'accent), les suivants le contextualisent. */
.tab-keys { margin-bottom: 18px; }
.tab-keys .cc-score { min-width: 0; }
.tab-keys .cc-v { font-size: 17px; white-space: nowrap; }
.tab-keys .cc-lead { padding: 10px 18px; border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 6%, var(--surface-2)); }
.tab-keys .cc-lead .cc-v { font-size: 24px; letter-spacing: -.02em; }
@media (max-width: 560px) {
  .tab-keys { display: grid; grid-template-columns: 1fr 1fr; }
  .tab-keys .cc-lead { grid-column: 1 / -1; }
  .tab-keys .cc-v { white-space: normal; }
}

/* onglet Dossier — barre proportionnelle des charges + légende (sans lib, print-safe) */
.charges-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 8px 0 14px; background: var(--surface-3); }
.charges-bar .cseg { height: 100%; }
.charges-legend { display: flex; flex-direction: column; gap: 8px; }
.charges-legend .cleg { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); }
.charges-legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.charges-legend .cleg-k { color: var(--fg-2); }
.charges-legend .cleg-v { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

.gauges-row { display: flex; justify-content: space-between; gap: 8px; }

/* Objectif d'investissement en chips radio (formulaire de lancement d'audit). */
.obj-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.obj-chip input { position: absolute; opacity: 0; pointer-events: none; }
.obj-chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
    font-size: var(--t-sm); color: var(--fg-2); cursor: pointer; background: var(--surface); }
.obj-chip span:hover { border-color: var(--accent); }
.obj-chip input:checked + span { border-color: var(--accent); color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.obj-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Explicabilité des scores (« Pourquoi ces scores ? ») : contribution par critère,
   barres proportionnelles au poids — les points somment au score. */
.score-explain { margin: 10px 0 14px; }
.score-explain summary { list-style: none; }
.score-explain summary::-webkit-details-marker { display: none; }
.score-explain[open] summary .ic { transform: rotate(180deg); }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 10px; }
.sx-head { font-size: var(--t-sm); font-weight: 600; margin-bottom: 7px; }
.sx-row { display: grid; grid-template-columns: minmax(90px, 1.4fr) 1fr auto; align-items: center; gap: 8px; padding: 2.5px 0; }
.sx-row .sx-k { font-size: var(--t-xs); color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-row .sx-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.sx-row .sx-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.sx-row .sx-v { font-size: var(--t-xs); font-variant-numeric: tabular-nums; font-weight: 600; }
.sx-row .sx-v small { font-weight: 400; }

/* overflow visible (≠ hidden) pour ne pas clipper les bulles du lexique ; les coins arrondis
   de la grille hairline sont restitués cellule par cellule (grille 2 colonnes, jusqu'à 4 KPI). */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: var(--r-md); border: 1px solid var(--line); }
.kpi { background: var(--surface); padding: 15px 16px; }
.kpi:first-child { border-top-left-radius: calc(var(--r-md) - 1px); }
.kpi:nth-child(2) { border-top-right-radius: calc(var(--r-md) - 1px); }
.kpi:nth-last-child(2):nth-child(odd) { border-bottom-left-radius: calc(var(--r-md) - 1px); }
.kpi:last-child { border-bottom-right-radius: calc(var(--r-md) - 1px); }
.kpi .kl { font-size: var(--t-2xs); color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 9px; }
.kpi .kl .ic { width: 14px; height: 14px; color: var(--faint); }
.kpi .kv { font-family: var(--font-mono); font-weight: 700; font-size: 23px; letter-spacing: -.02em; line-height: 1; }
.kpi .kv small { font-size: 12px; color: var(--muted); font-weight: 500; font-family: var(--font-sans); margin-left: 3px; }
/* Variante UNE SEULE RANGÉE (fiches communes : 3-4 colonnes en ligne) : les règles d'angles
   ci-dessus supposent une grille 2 colonnes → coins arrondis en plein milieu de la rangée. */
.kpi-grid-row .kpi { border-radius: 0; }
.kpi-grid-row .kpi:first-child { border-top-left-radius: calc(var(--r-md) - 1px); border-bottom-left-radius: calc(var(--r-md) - 1px); }
.kpi-grid-row .kpi:last-child { border-top-right-radius: calc(var(--r-md) - 1px); border-bottom-right-radius: calc(var(--r-md) - 1px); }
/* bulles du lexique ouvertes vers l'intérieur de la carte pour rester entièrement visibles :
   colonne droite alignée à droite, rangée du bas ouverte vers le haut. */
.kpi:nth-child(even) .lex-pop { left: auto; right: 0; }
.kpi:nth-child(n+3) .lex-pop { top: auto; bottom: calc(100% + 6px); --lex-y: 3px; }

/* sections du rapport */
.sec { scroll-margin-top: 76px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sec-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); flex: none; }
.sec-head h2 { font-size: 20px; }
.sec-head .sec-sub { font-size: var(--t-sm); color: var(--muted); }

.panel { display: grid; gap: 18px; }
.panel-2 { grid-template-columns: 1.3fr 1fr; }
.panel-2b { grid-template-columns: 1fr 1fr; }
@media (max-width: 920px) { .panel-2, .panel-2b { grid-template-columns: 1fr; } }

.chart-card { padding: 20px 22px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.chart-title { font-size: var(--t-sm); font-weight: 700; }
.chart-box { position: relative; height: 230px; }
details.altdata { margin-top: 12px; }
details.altdata summary { font-size: var(--t-xs); color: var(--muted); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.altdata summary::-webkit-details-marker { display: none; }
details.altdata[open] summary { color: var(--fg); }

/* repli de section (hiérarchisation onglets Marché/Fiscalité) : entrée visible vers tout le détail */
details.sec-more { margin-top: 0; }
details.sec-more > summary { display: flex; width: 100%; font-size: var(--t-sm); color: var(--fg-2); padding: 11px 14px; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface-2); }
details.sec-more > summary:hover { border-color: var(--accent-line); color: var(--fg); }
details.sec-more[open] > summary { margin-bottom: 16px; border-style: solid; }

.stat-list { display: flex; flex-direction: column; }
.stat-list .sl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.stat-list .sl-row:first-child { border-top: 0; }
.stat-list .sl-k { color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat-list .sl-v { font-family: var(--font-mono); font-weight: 600; }

/* échelle DPE */
.dpe { display: flex; flex-direction: column; gap: 4px; }
.dpe-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; }
.dpe-letter { font-weight: 800; font-size: 13px; text-align: center; }
.dpe-bar { height: 18px; border-radius: 4px; position: relative; }
.dpe-row.active .dpe-bar::after { content: ""; position: absolute; right: -7px; top: 50%; transform: translateY(-50%); border-left: 9px solid var(--fg); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.dpe-row.active { font-weight: 700; }
.dpe-val { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted); }

/* onglet « Le bien » : photo de couverture + badges DPE/GES */
.lb-photo img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r-md); display: block; }
/* carrousel de photos (sans lib : défilement natif scroll-snap, enrichi par carousel_controller) */
.lb-gallery { position: relative; overflow: hidden; padding: 0; }
.lb-frame { position: relative; }
.lb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; scroll-snap-align: center; }
.lb-slide img { width: 100%; height: 440px; object-fit: cover; display: block; }
@media (max-width: 760px) { .lb-slide img { height: 280px; } }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); color: var(--fg); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); transition: var(--dur-2); }
.lb-nav:hover { background: color-mix(in srgb, var(--bg) 75%, transparent); }
.lb-nav .ic { width: 18px; height: 18px; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 7px; justify-content: center; }
.lb-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: #fff; opacity: .45; transition: var(--dur-2); }
.lb-dot.on { opacity: 1; }
.lb-cap { padding: 11px 16px; font-size: var(--t-xs); }
.dpe-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.dpe-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: var(--r-pill); color: #fff; font-size: var(--t-sm); }
.dpe-badge b { font-size: 16px; font-weight: 800; }
.dpe-badge .lex { color: #fff; }

/* risques */
.risk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.risk-row:first-child { border-top: 0; }
.risk-k { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); }
.risk-k .ic { width: 18px; height: 18px; color: var(--muted); }
.sev { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }
.sev.low { color: var(--vd-opp); background: color-mix(in srgb, var(--vd-opp) 14%, transparent); }
.sev.mid { color: var(--vd-moy); background: color-mix(in srgb, var(--vd-moy) 16%, transparent); }
.sev.high { color: var(--vd-evi); background: color-mix(in srgb, var(--vd-evi) 14%, transparent); }

/* simulateur « Et avec vos hypothèses ? » (onglet Financier) — ex-<style> inline du body (UX-6 U9) */
.sim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 22px; margin-bottom: 16px; }
.sim-field { display: flex; flex-direction: column; gap: 9px; }
.sim-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sim-head label { font-size: var(--t-sm); color: var(--muted); font-weight: 600; }
.sim-val { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); font-size: 15px; }
.sim-field input[type=range] { width: 100%; accent-color: var(--accent); cursor: pointer; height: 6px; margin: 0; }
.sim-field input[type=number], .sim-field select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); color: var(--fg); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }

/* carte de négociation */
.nego { padding: 22px; }

/* mode lecture simple : masque les indicateurs avancés (.adv : TRI, VAN, DSCR, LTV) */
.simple .adv { display: none; }
.simple-banner { display: none; }
.simple .simple-banner { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: var(--t-sm); color: var(--accent); }
.simple .simple-banner .ic { color: var(--accent); }

/* mode notarial : bannière + toggle */
.notarial-banner { display: none; }
.notarial .notarial-banner { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: var(--t-sm); color: var(--accent); }
.notarial .notarial-banner .ic { color: var(--accent); }

.toggle-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface-2); font-size: var(--t-sm); font-weight: 600; color: var(--fg-2); cursor: pointer; transition: var(--dur-2); }
.toggle-pill:hover { border-color: var(--accent-line); }
.toggle-pill[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.toggle-pill .sw { width: 30px; height: 17px; border-radius: 999px; background: var(--surface-3); position: relative; transition: var(--dur-2); }
.toggle-pill .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--muted); transition: var(--dur-2); }
.toggle-pill[aria-pressed="true"] .sw { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.toggle-pill[aria-pressed="true"] .sw::after { left: 15px; background: var(--accent); }

/* lexique : terme avec définition au survol/focus (CSS pur, markup .lex existant) */
.lex { position: relative; border-bottom: 1px dashed var(--line-2); cursor: help; outline: none; }
.lex:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.lex .lex-pop {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: max-content;
  padding: 10px 12px; font-size: var(--t-xs); font-weight: 400; line-height: 1.45;
  color: var(--fg-2); background: var(--surface-3); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); box-shadow: var(--sh-2); opacity: 0; visibility: hidden;
  /* --lex-dx : décalage horizontal posé par ui.js pour garder la bulle dans l'écran (mobile) */
  max-width: min(260px, calc(100vw - 24px)); text-align: left; white-space: normal;
  transform: translate(var(--lex-dx, 0px), var(--lex-y, -3px)); transition: opacity var(--dur-2), transform var(--dur-2) var(--ease); pointer-events: none;
}
.lex:hover .lex-pop, .lex:focus .lex-pop, .lex:focus-within .lex-pop { opacity: 1; visibility: visible; transform: translate(var(--lex-dx, 0px), 0); }
@media print { .lex { border-bottom: 0; } .lex .lex-pop { display: none !important; } }

/* provenance compacte : symbole + bulle source (pattern .lex, focusable/tap — UX-4). Zone de tap
   élargie par padding négatif-compensé : la ligne ne bouge pas. */
.prov { cursor: help; font-size: .82em; text-decoration: none; margin-left: .15rem; vertical-align: middle; font-family: var(--font-sans); font-weight: 400; letter-spacing: 0; }
.prov.lex { border-bottom: 0; padding: 4px 3px; margin: -4px -3px -4px calc(.15rem - 3px); border-radius: var(--r-xs); }
.prov.lex:hover, .prov.lex:focus-visible { background: var(--surface-3); }
.prov .lex-pop b { color: var(--fg); font-weight: 700; }

/* barre de positionnement prix vs juste valeur DVF (CSS pur) */
/* Position du prix demandé vs la fourchette du quartier (onglet « Le bien ») : bande p25–p75 à
   échelle FIXE (18 % → 82 %), bornes chiffrées dessous, marqueur « annonce » au-dessus (borné aux
   marges via .edge-l/.edge-r pour que son étiquette reste dans la carte). */
.posbar { position: relative; height: 78px; margin: 14px 0 6px; }
.posbar .track { position: absolute; top: 34px; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--surface-3); }
.posbar .range { position: absolute; top: 31px; height: 12px; border-radius: 6px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.posbar .central { position: absolute; top: 27px; width: 2px; height: 20px; background: var(--accent); }
.posbar .marker { position: absolute; top: 6px; transform: translateX(-50%); font-size: var(--t-2xs); font-weight: 600; white-space: nowrap; color: var(--fg); }
.posbar .marker .pin { display: block; width: 0; height: 0; margin: 2px auto 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--fg); }
.posbar .marker.edge-r { transform: translateX(-100%); text-align: right; } .posbar .marker.edge-r .pin { margin-right: 0; }
.posbar .marker.edge-l { transform: none; text-align: left; } .posbar .marker.edge-l .pin { margin-left: 0; }
.posbar .marker.over { color: var(--neg); } .posbar .marker.over .pin { border-top-color: var(--neg); }
.posbar .marker.under { color: var(--pos); } .posbar .marker.under .pin { border-top-color: var(--pos); }
.posbar .bound { position: absolute; top: 50px; transform: translateX(-50%); font-size: var(--t-2xs); color: var(--muted); text-align: center; line-height: 1.5; white-space: nowrap; }
.posbar .bound .num { font-family: var(--font-mono); font-weight: 700; color: var(--fg); }
/* Prix vs fourchette du quartier (comparables…) : vendu au-dessus = rouge doux, sous = vert doux. */
.px-over { color: color-mix(in srgb, var(--neg) 80%, var(--fg)); }
.px-under { color: color-mix(in srgb, var(--pos) 85%, var(--fg)); }

/* Tableaux du rapport (comparables, régimes, scénarios, négociation, tendance) : sous ~360 px
   ils défilent horizontalement dans leur carte au lieu d'écraser les colonnes (UX-3). Focusable
   (role=region) pour le défilement clavier. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.table-scroll > .table { min-width: 320px; }
.table-scroll th, .table-scroll td.num { white-space: nowrap; }
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }

/* Tableaux comparateurs (villes / audits) : posés dans une .card SANS padding (scroll horizontal),
   alors que .table-pad annule le padding des colonnes de bord (prévu pour les cartes rembourrées)
   → le texte collait aux bords arrondis et se faisait rogner. On rétablit une gouttière. */
.cmp th:first-child, .cmp td:first-child { padding-left: 18px; }
.cmp th:last-child, .cmp td:last-child { padding-right: 18px; }
.cmp thead th { padding-top: 14px; }
.cmp tbody tr:last-child td { padding-bottom: 14px; }

@media print {
  .report { grid-template-columns: 1fr; }
  .chart-box { height: 200px; }
}

/* =============================================================
   AUTH (maquette Connexion.html)
   ============================================================= */
.auth-wrap { flex: 1; display: grid; grid-template-columns: 1fr 1fr; max-width: 1100px; margin: 0 auto; width: 100%; padding: 48px 28px; gap: 56px; align-items: center; }
@media (max-width: 920px) { .auth-wrap { grid-template-columns: 1fr; gap: 32px; } .auth-aside { display: none; } }

.auth-aside .eyebrow { margin-bottom: 16px; }
.auth-aside h1 { font-size: 38px; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 18px; }
.auth-aside h1 em { font-style: normal; color: var(--accent); }
.auth-aside p { color: var(--muted); font-size: var(--t-body); line-height: 1.6; max-width: 42ch; margin-bottom: 26px; }
.auth-points { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
.auth-points li { display: flex; align-items: center; gap: 11px; font-size: var(--t-sm); color: var(--fg-2); }
.auth-points .ic { color: var(--accent); flex: none; }

.auth-card { padding: 30px; max-width: 420px; width: 100%; justify-self: center; }
.auth-tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; margin-bottom: 24px; }
.auth-tabs a, .auth-tabs button { flex: 1; padding: 9px; border: none; background: none; border-radius: var(--r-sm); font: inherit; font-weight: 600; font-size: var(--t-sm); color: var(--muted); cursor: pointer; transition: var(--dur-2); text-align: center; }
.auth-tabs .on { background: var(--surface); color: var(--fg); box-shadow: var(--sh-1); }
.auth-form { display: grid; gap: 16px; }
.auth-form .field label { display: flex; align-items: center; justify-content: space-between; }
.auth-form .field label a { font-size: var(--t-xs); color: var(--accent); font-weight: 500; }
.inp-ic { position: relative; }
.inp-ic .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
.inp-ic .input { padding-left: 40px; }
.auth-foot { text-align: center; font-size: var(--t-sm); color: var(--muted); margin-top: 18px; }
.auth-foot a { color: var(--accent); font-weight: 600; }
/* réassurance courte sous le formulaire (seule réassurance visible sur mobile) */
.auth-trust { list-style: none; padding: 16px 0 0; margin: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; font-size: var(--t-xs); color: var(--muted); }
.auth-trust li { display: inline-flex; align-items: center; gap: 6px; }
.auth-trust .ic { width: 14px; height: 14px; color: var(--accent); }
.auth-flash { margin: 0 0 16px; }
.auth-foot sup { font-size: .7em; }
/* écrans à une colonne (mot de passe oublié / nouveau) */
.auth-solo { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.auth-ill { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 16px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); }
.auth-h { font-size: 24px; letter-spacing: -.02em; margin-bottom: 8px; }
.auth-sub { font-size: var(--t-sm); color: var(--muted); margin-bottom: 20px; overflow-wrap: anywhere; }
.auth-sub b { color: var(--fg); }
.auth-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
@media (max-width: 560px) { .auth-wrap { padding-top: 24px; padding-bottom: 24px; } .auth-card { padding: 24px 20px; } }
.bonus { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); font-size: var(--t-sm); font-weight: 600; }

/* =============================================================
   COMPTE (maquette Compte.html)
   ============================================================= */
.acc-head { padding: 36px 0 22px; }
.acc-head h1 { font-size: 32px; letter-spacing: -.03em; }
.acc-head .who { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: var(--t-body); color: var(--muted); overflow-wrap: anywhere; }
.acc-head .who .badge { font-size: var(--t-xs); font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.acc-tabs { margin-bottom: 22px; }
.acc-tab-n { font-family: var(--font-mono); font-size: var(--t-2xs); padding: 1px 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }

.acc-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: start; }
@media (max-width: 920px) { .acc-top { grid-template-columns: minmax(0, 1fr); } }

/* Solde : LE chiffre de l'écran, dans la seule carte lumineuse */
.credit-card { position: relative; overflow: hidden; }
.credit-in { position: relative; z-index: 1; padding: 26px; }
.credit-card .balance { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 12px 0 10px; }
.credit-card .balance .b { font-family: var(--font-mono); font-size: 56px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--accent); }
.credit-card .balance .u { font-size: 16px; color: var(--muted); }
.credit-left { font-size: var(--t-sm); color: var(--fg-2); }
.credit-ok { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 9px 12px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); font-size: var(--t-sm); font-weight: 600; }
.credit-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.credit-fine { margin-top: 14px; font-size: var(--t-xs); color: var(--muted); }

.moves { padding: 22px 24px; }
.moves-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.moves-table td { vertical-align: top; }
.moves-date { white-space: nowrap; color: var(--muted); }
.moves-link { color: var(--accent); font-weight: 600; white-space: nowrap; }
.moves-link:hover { text-decoration: underline; }
.amt-pos { color: var(--pos); font-weight: 700; }
.amt-neg { color: var(--neg); font-weight: 700; }

/* intertitre de section (utilisé aussi par l'admin « crédits ») */
.acc-sub-label { font-size: var(--t-2xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 36px 0 14px; }

/* Projet & paramètres */
.acc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.acc-project.is-incomplete { border-color: var(--accent-line); }
.chip-ok { color: var(--accent); }
.acc-reward { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--fg-2); font-size: var(--t-sm); }
.acc-reward .ic, .acc-reward b { color: var(--accent); }
.acc-lead { margin-bottom: 18px; font-size: var(--t-sm); color: var(--muted); line-height: 1.6; max-width: 72ch; }
.acc-lead b { color: var(--fg-2); }
/* align-items:start : les libellés restent alignés même quand un champ porte une aide */
.acc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px 14px; align-items: start; }
.acc-form-actions { grid-column: 1 / -1; margin-top: 2px; }
.acc-block { margin-bottom: 14px; }
.acc-block .h4, .acc-h { margin-bottom: 10px; }
.acc-alerts { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.acc-check { display: flex; align-items: center; gap: 9px; min-height: 40px; cursor: pointer; font-size: var(--t-sm); }
.acc-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.acc-self-start { justify-self: start; }

.acc-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 760px) { .acc-cols { grid-template-columns: minmax(0, 1fr); } }
.danger-card { border-color: color-mix(in srgb, var(--neg) 35%, var(--line)); }
.danger-card h2 { color: var(--neg); }
.btn-danger { background: transparent; color: var(--neg); border: 1px solid color-mix(in srgb, var(--neg) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--neg) 12%, transparent); }
@media (max-width: 560px) {
  .acc-tabs button { flex: 1; justify-content: center; padding: 9px 6px; }
  .acc-tabs button .ic { display: none; }
  .credit-in { padding: 22px 18px; }
  .credit-card .balance .b { font-size: 46px; }
  .credit-cta .btn { flex: 1; }
  .moves { padding: 18px 16px; }
}

/* =============================================================
   NOUVEL AUDIT (maquette Nouvel audit.html)
   ============================================================= */
.na-wrap { max-width: 760px; margin: 0 auto; padding: 40px 28px 0; width: 100%; }
.na-head { margin-bottom: 26px; }
.na-head h1 { font-size: 32px; letter-spacing: -.03em; }
.na-head p { color: var(--muted); font-size: var(--t-body); margin-top: 6px; }
.na-card { padding: 28px; }
.na-card .field { margin-bottom: 20px; }
.na-card .field:last-of-type { margin-bottom: 0; }
.input-lg { padding: 15px 16px; font-size: var(--t-body); }
.src-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cost { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.cost .ci { display: flex; align-items: center; gap: 9px; font-size: var(--t-sm); }
.cost .ci .num { font-weight: 700; }
.na-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
/* PROD-1 : repli « collez le texte de l'annonce » (portails qui bloquent notre lecteur) */
.na-paste > summary { align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.na-paste > label { display: block; margin-bottom: 7px; }
.na-paste-text { min-height: 168px; resize: vertical; font-size: var(--t-sm); line-height: 1.5; }
.na-paste-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px 14px; flex-wrap: wrap; margin-top: 7px; }
.na-paste-count { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.na-paste-count.is-full { color: var(--warn); }

/* =============================================================
   TEASER (audit d'autrui sans crédits) : scores réels + cases verrouillées qui reprennent la
   structure du hero de décision — aucune valeur dans le HTML (masquage côté serveur)
   ============================================================= */
.teaser { text-align: center; padding: 40px 28px; }
.teaser-h { font-size: 26px; letter-spacing: -.02em; margin-bottom: 6px; }
.teaser-sub { margin-bottom: 18px; font-size: var(--t-sm); }
.teaser-gauges { max-width: 420px; margin: 0 auto 18px; }
.teaser-copy { max-width: 46ch; margin: 0 auto 8px; }
.teaser-ill { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 20px; margin-bottom: 22px; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent); }
.teaser-locks { list-style: none; padding: 0; margin: 0 auto 20px; max-width: 460px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; text-align: left; }
.teaser-locks li { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface-2); font-size: var(--t-xs); color: var(--muted); }
.teaser-locks li .ic { display: inline; vertical-align: -3px; color: var(--faint); }
.teaser-locks .skel { display: block; width: 70%; height: 14px; }
@media (max-width: 560px) { .teaser { padding: 28px 16px; } }

/* =============================================================
   ATTENTE D'AUDIT — affichage progressif (_pending_progress.html.twig)
   ============================================================= */
.pgv { display: grid; gap: 14px; margin-top: 14px; }
.pgv-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center; padding: 4px 0 0; margin: 0; font-size: var(--t-sm); }
.pgv-step { display: flex; align-items: center; gap: 8px; color: var(--faint); font-weight: 600; }
.pgv-step.now { color: var(--fg); }
.pgv-step.done { color: var(--muted); }
.pgv-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; }
.pgv-step.done .pgv-dot { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pgv-dot .spin { width: 12px; height: 12px; }
.pgv-dot .ic { width: 13px; height: 13px; }
.pgv-card { text-align: left; }
.pgv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pgv-head-tight { margin-bottom: 6px; }
.pgv-main { min-width: 0; }
.pgv-gauges { max-width: 420px; margin: 0 auto; }
.pgv-note { text-align: center; margin: 8px 0 0; font-size: var(--t-sm); color: var(--muted); }
/* squelettes : largeurs variées (ex-styles inline) pour un rendu « texte » crédible */
.pgv-skel-title { width: 38%; }
.pgv-skel-title-sm { width: 30%; }
.pgv-skel-facts { margin-top: 14px; }
.pgv-skel-facts > div:nth-child(1) .skel { width: 72%; } .pgv-skel-facts > div:nth-child(1) .skel-lg { width: 54%; }
.pgv-skel-facts > div:nth-child(2) .skel { width: 64%; } .pgv-skel-facts > div:nth-child(2) .skel-lg { width: 46%; }
.pgv-skel-facts > div:nth-child(3) .skel { width: 58%; } .pgv-skel-facts > div:nth-child(3) .skel-lg { width: 40%; }
.pgv-skel-facts > div:nth-child(4) .skel { width: 68%; } .pgv-skel-facts > div:nth-child(4) .skel-lg { width: 50%; }
.pgv-bien { display: flex; gap: 18px; align-items: flex-start; }
/* la colonne texte prend toute la largeur restante : sinon la grille des faits se replie sur une colonne */
.pgv-bien > div:last-child { flex: 1 1 auto; }
.pgv-cover { flex: none; width: 138px; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.pgv-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgv-title { display: flex; align-items: center; gap: 9px; font-size: 19px; letter-spacing: -.01em; margin-bottom: 14px; min-width: 0; }
.pgv-tic { color: var(--accent); flex: none; }
.pgv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 18px; }
.pgv-fact .l { display: block; font-size: var(--t-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.pgv-fact .v { font-weight: 700; }
/* Apparition d'une carte fraîchement remplie (le fragment n'est remplacé QUE s'il change). */
.pgv-in { animation: pgv-in .55s var(--ease) both; }
@keyframes pgv-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* Squelettes « shimmer » des blocs pas encore remplis. */
.skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
.skel-lg { height: 18px; margin-top: 8px; border-radius: 7px; }
.skel-ring { width: 68px; height: 68px; border-radius: 50%; flex: none; }
.pgv-skel-rings { display: flex; gap: 30px; justify-content: center; margin-top: 16px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pgv-in, .skel { animation: none; } }
@media (max-width: 560px) { .pgv-bien { flex-direction: column; } .pgv-cover { width: 100%; } }

/* =============================================================
   ALÉAS CLIMATIQUES (carte de l'onglet Risques, lecture prospective)
   ============================================================= */
.clim-row { padding: 12px 0; border-top: 1px solid var(--line); }
.clim-row:first-child { border-top: 0; padding-top: 4px; }
.clim-impact { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }

/* =============================================================
   PARAMÈTRES (maquette Parametres.html)
   ============================================================= */
.pa-wrap { max-width: 920px; margin: 0 auto; padding: 36px 28px 0; width: 100%; }
.pa-head h1 { font-size: 32px; letter-spacing: -.03em; }
.pa-head p { color: var(--muted); font-size: var(--t-body); margin-top: 6px; max-width: 60ch; }
.notice { display: flex; gap: 11px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); margin: 22px 0 28px; font-size: var(--t-sm); color: var(--fg-2); line-height: 1.55; }
.notice .ic { color: var(--accent); flex: none; margin-top: 1px; }
.pa-section { margin-bottom: 18px; }
.pa-card { padding: 22px 24px; }
.pa-card .ph { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.pa-card .ph .pic { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); }
.pa-card .ph h3 { font-size: var(--t-h4); }
.pa-card .psub { font-size: var(--t-sm); color: var(--muted); margin: 0 0 8px 44px; }
.pa-rows { margin-top: 8px; }
.pa-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.pa-row .k { color: var(--fg-2); }
.pa-row .v { font-family: var(--font-mono); font-weight: 700; }
.badge-ro { font-size: var(--t-2xs); font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); background: var(--chip-bg); border: 1px solid var(--line); color: var(--muted); margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }

/* =============================================================
   PAGES MARCHÉ (/ou-investir, /marche/{slug})
   ============================================================= */
.city-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 920px) { .city-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .city-grid { grid-template-columns: 1fr; } }
.city-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; color: var(--fg); }
.city-card .cc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.city-card h3 { font-size: 17px; letter-spacing: -.01em; }
.city-card .cc-dept { font-size: var(--t-2xs); color: var(--faint); font-family: var(--font-mono); }
.city-card .cc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: var(--t-xs); }
.city-card .cc-kpis .k { color: var(--muted); }
.city-card .cc-kpis .v { font-family: var(--font-mono); font-weight: 700; font-size: var(--t-sm); }
.city-card .cc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* Repères quartiles (lecture rapide des listes de KPIs, cf. MetricBands) : teinte douce —
   ≥ P75 vert marque, ≤ P25 rouge. Réservé aux métriques à direction univoque. */
.q-top { color: color-mix(in srgb, var(--accent) 85%, var(--fg)); }
.q-low { color: color-mix(in srgb, var(--neg) 80%, var(--fg)); }

/* gros score avec libellé (tension / attractivité) */
.score-big { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 12px; }
.score-big .num { font-size: 40px; font-weight: 800; line-height: 1; }
.score-big .den { font-size: 16px; color: var(--muted); font-family: var(--font-mono); }

/* =============================================================
   PAGES GÉNÉRIQUES (tarifs, contact, légal)
   ============================================================= */
.page-wrap { max-width: 880px; margin: 0 auto; padding: 40px 28px 0; width: 100%; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 32px; letter-spacing: -.03em; }
.page-head p { color: var(--muted); font-size: var(--t-body); margin-top: 6px; max-width: 60ch; }

/* Tarifs : ancrage valeur + packs (le recommandé porte la seule bordure lumineuse) */
.anchor-card { padding: 24px 26px; margin-bottom: 22px; }
.anchor-card .anchor-note { margin-bottom: 0; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; margin: 0 0 14px; }
@media (max-width: 760px) { .packs { grid-template-columns: 1fr; } .pack-reco { order: -1; } }
.pack { padding: 24px; display: flex; flex-direction: column; }
.pack-reco { background-color: var(--surface); }
@media (min-width: 761px) { .pack-reco { transform: translateY(-6px); } }
.pack-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.pack-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--t-2xs); font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.pack-price { margin: 12px 0 4px; }
.pack-price .big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.pack-unit { font-size: var(--t-sm); color: var(--fg-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pack-save { font-size: var(--t-2xs); font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.pack .price-feats { list-style: none; padding: 0; margin: 18px 0 20px; flex: 1; align-content: start; }
.pack .price-feats li { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); }
.pack .price-feats .ic { color: var(--accent); width: 17px; height: 17px; flex: none; }
.pack-cta .btn { width: 100%; }
.pricing-note { display: flex; align-items: center; gap: 7px; font-size: var(--t-sm); margin: 6px 0 24px; }
.pass-door { border-style: dashed; }
.pricing-page { max-width: 1040px; }

/* =============================================================
   MARCHÉ — lot 3 premium (/ou-investir, /marche/{slug}, autour, comparateur)
   « Où investir, et pourquoi là ? » : un chiffre héros par écran (rendement / prix / loyer)
   avec sa fiabilité visible, classement serveur paginé, carte chargée à la demande.
   Section autonome (préfixe .mk-) : ne réécrit aucune règle des sections précédentes.
   ============================================================= */
/* Héros pleine largeur (fond vivant + trame) */
.mk-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.mk-hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: center; padding-top: 44px; padding-bottom: 38px; }
@media (max-width: 920px) { .mk-hero-in { grid-template-columns: 1fr; gap: 26px; padding-top: 28px; padding-bottom: 28px; } }
.mk-h1 { font-size: var(--t-display); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin-top: 12px; }
.mk-h1-sm { font-size: var(--t-h1); }
.mk-lead { font-size: 17px; line-height: 1.55; color: var(--muted); margin-top: 14px; max-width: 58ch; }
.mk-crumb-here { color: var(--fg); }
.mk-stats { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 24px; }
.mk-stat .v { display: block; font-weight: 800; font-size: 28px; line-height: 1.1; }
.mk-stat .l { font-size: var(--t-xs); color: var(--muted); }
.mk-near { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; max-width: 560px; }
.mk-near .search { flex: 1 1 220px; max-width: none; }
.mk-near .select { width: auto; padding: 10px 12px; }
@media (max-width: 560px) {
  .mk-near .btn { flex: 1 1 auto; } .mk-h1 { font-size: 36px; }
  .mk-stats { gap: 12px 20px; } .mk-stat .v { font-size: 23px; }
}

/* Carte de décision du héros (une seule .glow-card par écran) */
.mk-top { display: flex; flex-direction: column; gap: 6px; padding: 26px; color: var(--fg); transition: transform var(--dur-2) var(--ease); }
.mk-top:hover { transform: translateY(-2px); }
.mk-top-k { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-2xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.mk-top-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.mk-big { font-size: clamp(46px, 6vw, 64px); font-weight: 800; letter-spacing: -.035em; line-height: 1; color: var(--pos); margin: 4px 0 10px; }
.mk-big.neg { color: var(--neg); }
.mk-big small { font-size: .38em; font-weight: 600; color: var(--muted); font-family: var(--font-sans); letter-spacing: 0; margin-left: 4px; }
.mk-top-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.mk-top-kpis .k, .mk-hk .k { display: block; font-size: var(--t-2xs); color: var(--muted); margin-bottom: 2px; }
.mk-top-kpis .v { font-weight: 700; font-size: var(--t-body); }
.mk-top-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.mk-go { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 700; color: var(--accent); }
.mk-top:hover .mk-go .ic { transform: translateX(2px); }
.mk-go .ic { transition: transform var(--dur-2) var(--ease); }
.mk-dp { font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 500; color: var(--faint); margin-left: 6px; letter-spacing: 0; }

/* Classement serveur + carte collante */
.mk-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 20px; align-items: start; margin: 32px 0 28px; }
@media (max-width: 920px) { .mk-split { grid-template-columns: 1fr; } }
.mk-rank { overflow: hidden; }
.mk-rank-head { display: grid; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.mk-rank-title { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.mk-rank-title h2 { font-size: 20px; letter-spacing: -.015em; }
.mk-rank-count { font-size: var(--t-xs); }
.mk-dept-form { display: flex; gap: 6px; align-items: center; }
.mk-dept-form .select { padding: 8px 10px; font-size: var(--t-sm); min-width: 0; }
.mk-note { font-size: var(--t-xs); color: var(--muted); line-height: 1.5; }
.mk-list { list-style: none; margin: 0; padding: 0; }
.mk-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 13px 20px; border-top: 1px solid var(--line); color: var(--fg); min-height: 56px; transition: background var(--dur-2); }
.mk-list li:first-child .mk-row { border-top: 0; }
.mk-row:hover { background: var(--surface-2); }
.mk-row:hover .mk-nm { color: var(--accent); }
.mk-rk { font-family: var(--font-mono); font-size: var(--t-sm); font-variant-numeric: tabular-nums; color: var(--faint); text-align: right; }
.mk-row.is-podium .mk-rk { color: var(--accent); font-weight: 800; }
.mk-id { min-width: 0; }
.mk-nm { font-weight: 700; font-size: 15px; transition: color var(--dur-2); }
.mk-sub { display: block; margin-top: 3px; font-size: var(--t-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-val { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.mk-val > .num { font-size: 19px; font-weight: 800; white-space: nowrap; }
@media (max-width: 560px) {
  .mk-rank-head { padding: 16px; }
  .mk-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 16px; }
  .mk-val > .num { font-size: 17px; }
  .mk-dept-form { flex-wrap: wrap; } .mk-dept-form .select { flex: 1 1 200px; }
}
/* Pagination (liens crawlables, cibles ≥ 40 px) */
.mk-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 16px 20px; border-top: 1px solid var(--line); }
.mk-pager a, .mk-pager .pg-n { min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 600; color: var(--muted); transition: color var(--dur-2), border-color var(--dur-2); }
.mk-pager a:hover { color: var(--fg); border-color: var(--line-2); }
.mk-pager [aria-current="page"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.mk-pager .gap { color: var(--faint); padding: 0 2px; }
.mk-pager .pg-of { display: none; font-size: var(--t-xs); color: var(--muted); }
@media (max-width: 560px) {
  .mk-pager .pg-n, .mk-pager .gap { display: none; }
  .mk-pager .pg-of { display: inline; padding: 0 10px; }
}

/* Carte (Leaflet) aux couleurs du thème */
.mk-map-card { overflow: hidden; position: sticky; top: 76px; }
@media (max-width: 920px) { .mk-map-card { position: static; } }
.mk-map-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mk-map-title { font-size: var(--t-xs); color: var(--muted); margin-right: 2px; }
.mk-tab { appearance: none; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: inherit; font-size: var(--t-xs); font-weight: 600; padding: 7px 12px; min-height: 36px; border-radius: var(--r-pill); cursor: pointer; transition: color var(--dur-2), border-color var(--dur-2), background var(--dur-2); }
.mk-tab:hover { color: var(--fg); border-color: var(--accent-line); }
.mk-tab.is-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.mk-map-wrap { position: relative; height: min(70vh, 640px); min-height: 400px; }
@media (max-width: 920px) { .mk-map-wrap { height: 380px; min-height: 0; } }
.mk-map { position: absolute; inset: 0; background: var(--surface-2); }
.mk-map-status { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; font-size: var(--t-sm); color: var(--muted); pointer-events: none; }
.mk-map-card.is-ready .mk-map-status { display: none; }
.mk-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .mk-pulse { animation: mk-pulse 1.2s ease-in-out infinite alternate; }
  @keyframes mk-pulse { from { opacity: .35; transform: scale(.8); } to { opacity: 1; transform: none; } }
}
.mk-legend { position: absolute; left: 10px; bottom: 12px; z-index: 500; max-width: calc(100% - 20px); padding: 8px 11px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line-2); box-shadow: var(--sh-2); font-size: var(--t-2xs); }
.mk-leg-title { font-weight: 700; margin-bottom: 5px; }
.mk-leg-title span { color: var(--muted); font-weight: 500; }
.mk-leg-scale { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.mk-leg-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.mk-leg-item i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.mk-map.leaflet-container { font-family: var(--font-sans); background: var(--surface-2); }
.mk-map .leaflet-popup-content-wrapper, .mk-map .leaflet-popup-tip { background: var(--surface); color: var(--fg); border: 1px solid var(--line-2); box-shadow: var(--sh-3); }
.mk-map a.leaflet-popup-close-button { color: var(--muted); }
.mk-map .leaflet-bar a { background: var(--surface); color: var(--fg); border-color: var(--line-2); }
.mk-map .leaflet-bar a:hover { background: var(--surface-2); }
.mk-map .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--muted); }
.mk-map .leaflet-control-attribution a { color: var(--fg-2); }
.mk-pop h4 { margin: 0 0 6px; font-size: 14px; }
.mk-pop h4 em { color: var(--muted); font-style: normal; font-weight: 500; font-size: 11px; margin-left: 4px; }
.mk-pop > div { display: flex; justify-content: space-between; gap: 18px; font-size: 12px; padding: 1px 0; }
.mk-pop > div span { color: var(--muted); }
.mk-map a.mk-pop-link { display: inline-block; margin-top: 7px; color: var(--accent); font-weight: 700; font-size: 12px; }

/* Action suivante + index des départements */
.mk-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 28px; margin-bottom: 24px; }
.mk-cta h3 { font-size: 19px; margin-bottom: 6px; }
.mk-cta p { font-size: var(--t-sm); max-width: 60ch; }
@media (max-width: 560px) { .mk-cta { padding: 22px; } .mk-cta .btn { width: 100%; } }
.mk-depts-box { padding: 0; margin-bottom: 40px; }
.mk-depts-box > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px; min-height: 56px; cursor: pointer; list-style: none; font-weight: 700; }
.mk-depts-box > summary::-webkit-details-marker { display: none; }
.mk-depts-box > summary .ic { color: var(--accent); }
.mk-depts-box > summary .chev { margin-left: auto; color: var(--muted); transition: transform var(--dur-2); }
.mk-depts-box[open] > summary .chev { transform: rotate(180deg); }
.mk-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; padding: 0 20px 20px; }
@media (max-width: 560px) { .mk-depts { grid-template-columns: 1fr 1fr; padding: 0 14px 14px; } .mk-depts-box > summary .chip { display: none; } }
.mk-dept { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); font-size: var(--t-sm); color: var(--fg-2); min-width: 0; transition: border-color var(--dur-2), color var(--dur-2); }
.mk-dept:hover { border-color: var(--accent-line); color: var(--fg); }
.mk-dept .cd { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--faint); min-width: 24px; }
.mk-dept .n { margin-left: auto; font-family: var(--font-mono); font-size: var(--t-2xs); color: var(--muted); }
.mk-dept[aria-current="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
@media (max-width: 560px) { .mk-dept { font-size: var(--t-xs); padding: 8px 10px; } .mk-dept .cd { min-width: 0; } }

/* Fiche commune (/marche/{slug}) — UX-2 : tuiles en grille responsive (plus de repeat(4,1fr) inline) */
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.mk-chip-warn { color: var(--warn); }
.mk-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.mk-hero-cta form { margin: 0; }
@media (max-width: 560px) { .mk-hero-cta .btn, .mk-hero-cta form { width: 100%; } .mk-hero-cta .btn { white-space: normal; text-align: center; } }
.mk-big-weak { color: var(--fg-2); }
.mk-big-plain { color: var(--fg); }
.mk-formula { font-size: var(--t-2xs); color: var(--faint); font-family: var(--font-mono); }
.mk-city { padding-top: 28px; }
.mk-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.mk-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 920px) { .mk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 920px) and (min-width: 561px) { .mk-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mk-kpis-3 > :last-child { grid-column: 1 / -1; } }
.mk-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px 16px; box-shadow: var(--sh-1); min-width: 0; }
.mk-kpi .kl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--t-2xs); color: var(--muted); margin-bottom: 9px; }
.mk-kpi .kl > .ic { width: 14px; height: 14px; color: var(--faint); }
.mk-kpi .kv { font-weight: 700; font-size: 23px; line-height: 1.1; overflow-wrap: anywhere; }
.mk-kpi .kv small { font-size: 12px; color: var(--muted); font-weight: 500; font-family: var(--font-sans); margin-left: 3px; letter-spacing: 0; }
@media (max-width: 560px) { .mk-kpi { padding: 13px 14px; } .mk-kpi .kv { font-size: 20px; } }
.mk-block { margin-bottom: 18px; }
.mk-city .panel { margin-top: 18px; }
.mk-fine { font-size: var(--t-xs); color: var(--muted); margin-top: 12px; line-height: 1.55; }
.mk-sources { margin: 0 0 24px; }
.mk-w { font-weight: 400; }
.mk-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mk-table { min-width: 460px; }
.mk-yield { color: var(--accent); }
.mk-tlink { color: var(--accent); font-weight: 600; }
.mk-tlink:hover { text-decoration: underline; }
.mk-head-wrap { flex-wrap: wrap; }
.mk-links { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; }
.mk-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: var(--t-xs); font-weight: 600; }
.mk-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 560px) { .mk-cta-actions .btn { white-space: normal; } }

/* Autour de chez moi (/ou-investir/autour) */
.mk-around, .mk-compare { padding-top: 28px; }
.mk-sect { margin-bottom: 16px; }
.mk-sect h2 { font-size: 22px; }
.mk-sorts { align-items: center; margin-bottom: 12px; }
.mk-sorts-l { font-size: var(--t-xs); margin-right: 2px; }
.mk-legend-q { margin-bottom: 16px; }
.mk-cgrid { margin-bottom: 28px; }
.mk-cc-hero { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.mk-cc-big { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.mk-cc-lab { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--t-xs); color: var(--muted); }
.mk-cc-dvf { font-size: var(--t-2xs); color: var(--muted); margin: 0; }
.mk-back { margin: 0 0 24px; }

/* Comparateur (/marche/comparer) */
.mk-hero-1 { grid-template-columns: minmax(0, 1fr); max-width: 1200px; }
.mk-wins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 760px) { .mk-wins { grid-template-columns: 1fr; } }
.mk-win { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; color: var(--fg); transition: transform var(--dur-2) var(--ease), border-color var(--dur-2); }
.mk-win:hover { transform: translateY(-2px); }
.mk-win-v { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 4px; }
.mk-win-n { font-weight: 700; font-size: 16px; }
.mk-cmp { min-width: 540px; }
.mk-cmp tbody th { text-align: left; text-transform: none; letter-spacing: 0; font-size: var(--t-sm); font-weight: 500; color: var(--fg-2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.mk-cmp tbody th:first-child { padding-left: 18px; }
.mk-cmp-key th, .mk-cmp-key td { font-weight: 700; }
.mk-cmp .mk-cmp-city { vertical-align: top; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: var(--t-sm); }
/* colonne des indicateurs figée pendant le défilement horizontal (mobile) */
.mk-cmp tbody th, .mk-cmp thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.mk-cmp tr:hover th { background: var(--surface-2); }
.mk-cmp-x { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 4px; border-radius: var(--r-xs); color: var(--faint); }
.mk-cmp-x:hover { color: var(--neg); background: color-mix(in srgb, var(--neg) 12%, transparent); }
.mk-weak { color: var(--muted); }
