/* CheckMyPlace — feuille de style unique pour les fiches logement
   Réutilisée par toutes les fiches générées (achat/vente/location, ancien/neuf).
   Édition : ne modifier que les variables CSS du :root pour rebrander.
*/

:root {
  color-scheme: light;
  --primary: #1a3a52;
  --primary-soft: #e8edf2;
  --accent: #2d8659;
  --accent-soft: #e8f3ec;
  --warn: #c87f1f;
  --warn-soft: #fbf2e3;
  --alert: #b3413c;
  --alert-soft: #f7e6e5;
  --bg: #faf8f5;
  --card: #ffffff;
  --surface: #ffffff;
  --bg-soft: #f6f7f5;
  --border: #e5e0d8;
  --border-strong: #d4ccbe;
  --text: #2c2a26;
  --text-soft: #6b665e;
  --text-faint: #9a948a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* DEMO BANNER */
.demo-banner {
  background: #fff4d6;
  color: #6e4f00;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid #f0d680;
  line-height: 1.5;
}
.demo-banner strong { font-weight: 600; }

/* NAV — header global, identique partout et STICKY (toujours accessible) */
:root { --navh: 58px; }
nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  min-height: var(--navh);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
/* Menu site : prend l'espace central, défile horizontalement si trop étroit. */
nav .nav-links { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; margin: 0 8px;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
nav .nav-links::-webkit-scrollbar { display: none; }
nav .nav-links a { flex: none; white-space: nowrap; padding: 6px 0; }
nav .nav-links a:hover { color: var(--accent); }
nav .nav-links a.current { color: var(--text); font-weight: 600; }
.logo { flex: none; }
.logo { font-weight: 700; font-size: 18px; color: var(--primary); letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
/* Icône de marque : un marqueur de lieu « posé sur la carte » devant le mot. Rendu
   par un masque SVG → prend var(--accent) et s'adapte au thème clair/sombre. */
.logo::before {
  content: ""; display: inline-block; width: 1.05em; height: 1.05em;
  margin-right: 0.3em; vertical-align: -0.16em; background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1.6c-3.9 0-7 3.1-7 7 0 5.2 7 13.3 7 13.3s7-8.1 7-13.3c0-3.9-3.1-7-7-7Zm0 4.3a2.6 2.6 0 110 5.2 2.6 2.6 0 010-5.2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1.6c-3.9 0-7 3.1-7 7 0 5.2 7 13.3 7 13.3s7-8.1 7-13.3c0-3.9-3.1-7-7-7Zm0 4.3a2.6 2.6 0 110 5.2 2.6 2.6 0 010-5.2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.nav-search {
  flex: 1; max-width: 480px; margin: 0 32px;
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px;
  font-size: 14px; color: var(--text-soft);
}
.nav-search::before { content: "⌕"; margin-right: 8px; color: var(--text-faint); font-size: 16px; }
.nav-links { display: flex; gap: 24px; align-items: center; font-size: 14px; }
.nav-links a { color: var(--text-soft); text-decoration: none; }
/* Bascule de langue FR/EN (lien sur les pages serveur, bouton sur l'accueil statique) */
.lang-toggle {
  flex: none;
  display: inline-flex; align-items: center;
  margin-left: 4px; padding: 5px 11px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--text-soft);
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em;
  text-decoration: none; cursor: pointer; line-height: 1;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }
/* Sur la fiche, le toggle est un enfant direct de <nav> (après la loupe de recherche) */
nav > .lang-toggle { margin-left: 12px; }
/* Adresse courante + loupe qui déploie une recherche inline */
.nav-current { flex: 1; min-width: 0; margin: 0 20px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-soft); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nav-current::before { content: "⌕"; color: var(--text-faint); font-size: 16px; }
.nav-find { display: flex; align-items: center; }
.nav-find input { width: 0; padding: 0; border: 1px solid transparent; border-radius: 999px 0 0 999px; font-size: 14px; background: var(--bg); color: var(--text); opacity: 0; outline: none; transition: width .22s ease, opacity .18s ease, padding .22s ease, border-color .18s; }
.nav-find.open input { width: min(230px, 48vw); padding: 9px 14px; border-color: var(--border); border-right: none; opacity: 1; }
.nav-find-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-soft); cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.nav-find-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.nav-find.open .nav-find-btn { border-radius: 0 999px 999px 0; border-left: none; }

/* CONFIDENCE LEGEND */
.legend {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 10px 32px; display: flex; gap: 18px;
  font-size: 12px; color: var(--text-soft); align-items: center; flex-wrap: wrap;
}
.legend strong { color: var(--text); font-weight: 600; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.conf-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.conf-dot.verified { background: var(--accent); }
.conf-dot.estimated { background: var(--warn); }
.conf-dot.missing { background: var(--text-faint); }
.conf-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 6px;
  background: var(--bg); color: var(--text-soft);
  border: 1px solid var(--border); vertical-align: middle; font-weight: 500;
}
.conf-tag.verified { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.conf-tag.estimated { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.conf-tag.missing { background: #efece7; color: var(--text-soft); }

/* CONTAINER */
.container { max-width: 1080px; margin: 0 auto; padding: 32px; }
/* Barre d'ancres sticky de la fiche */
/* Barre de sections de la fiche : SOUS le header global, clairement secondaire
   (fond en retrait, label « Sur cette page »). Sticky elle aussi → les deux
   niveaux restent visibles au scroll, sans se confondre. */
.fiche-nav { position: sticky; top: var(--navh); z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.fiche-nav-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 2px; padding: 0 32px; overflow-x: auto; scrollbar-width: none; }
.fiche-nav-inner::-webkit-scrollbar { display: none; }
.fnav-label { flex: none; margin-right: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); white-space: nowrap; }
.fnav-item { flex: none; padding: 9px 11px 8px; font-size: 13px; font-weight: 600; color: var(--text-soft); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.fnav-item:hover { color: var(--accent); }
.fnav-item.active { color: var(--accent); border-bottom-color: var(--accent); }
/* Ancrage des sections : sous le header (58) + la barre de sections (~40). */
section[id], h2[id] { scroll-margin-top: 104px; }
@media (max-width: 560px) { .fiche-nav-inner { padding: 0 12px; } .fnav-label { display: none; } }

/* HEADER */
.header { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; margin-bottom: 28px; }
.header-info h1 { font-size: 28px; margin: 0 0 4px; font-weight: 600; letter-spacing: -0.015em; }
.header-info .commune { color: var(--text-soft); font-size: 15px; margin-bottom: 20px; }
.header-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.meta-item .label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.meta-item .value { font-size: 18px; font-weight: 600; color: var(--text); }
.verdict {
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: 8px; padding: 20px;
}
.verdict.warn { border-left-color: var(--warn); }
.verdict.alert { border-left-color: var(--alert); }
.verdict h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); font-weight: 600; }
.verdict-line { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 12px; font-size: 17px; }
.verdict-line .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.verdict.warn .verdict-line .dot { background: var(--warn); }
.verdict.alert .verdict-line .dot { background: var(--alert); }
.verdict p { margin: 0 0 10px; color: var(--text-soft); font-size: 14px; }
.verdict p:last-child { margin-bottom: 0; }
.verdict-sub { margin: 0 0 12px 20px; font-size: 14px; color: var(--text-soft); line-height: 1.45; }
.verdict-sub .pos-up { color: var(--warn); white-space: nowrap; }
.verdict-sub .pos-down { color: var(--accent); white-space: nowrap; }

/* PHOTO */
.photo {
  background: linear-gradient(135deg, #d4dde5 0%, #b5c3ce 100%);
  border-radius: 8px; aspect-ratio: 16 / 10; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); font-size: 13px;
  position: relative; overflow: hidden;
}
.photo::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.2) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,0.1) 0%, transparent 50%);
}

/* INDICATORS */
.indicators { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 36px; }
.ind { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.ind .ind-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.ind .ind-value { font-size: 22px; font-weight: 600; margin-bottom: 2px; }
.ind .ind-sub { font-size: 12px; color: var(--text-soft); }
.ind-good .ind-value { color: var(--accent); }
.ind-warn .ind-value { color: var(--warn); }
.ind-alert .ind-value { color: var(--alert); }

/* SECTIONS */
section.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 28px; margin-bottom: 20px;
}
section.card h2 {
  font-size: 17px; margin: 0 0 4px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
section.card h2 .src {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-faint); font-weight: 500;
  background: var(--bg); padding: 3px 8px; border-radius: 4px; border: 1px solid var(--border);
}
section.card .lede { color: var(--text-soft); margin: 0 0 22px; font-size: 14px; }

/* TABLE */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); font-weight: 500; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dvf-summary {
  display: flex; gap: 24px;
  background: var(--bg); padding: 16px; border-radius: 8px; margin-top: 16px;
  font-size: 14px; flex-wrap: wrap;
}
.dvf-summary div { flex: 1; min-width: 140px; }
.dvf-summary .lbl { color: var(--text-soft); font-size: 12px; margin-bottom: 4px; }
.dvf-summary .val { font-weight: 600; font-size: 16px; }

/* RISK */
.risk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.risk { border: 1px solid var(--border); border-left: 4px solid var(--text-faint); border-radius: 10px; padding: 13px 16px; background: var(--card); display: flex; align-items: flex-start; gap: 11px; }
.risk.low { border-left-color: var(--accent); }
.risk.mid { border-left-color: var(--warn); }
.risk.high { border-left-color: var(--alert); }
.risk.unknown { border-left-color: var(--text-faint); }
.risk .r-ico { width: 11px; height: 11px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--text-faint); }
.risk.low .r-ico { background: var(--accent); }
.risk.mid .r-ico { background: var(--warn); }
.risk.high .r-ico { background: var(--alert); }
.risk .r-body { min-width: 0; flex: 1; }
.risk .r-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 3px; }
.risk .r-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--text-faint); white-space: nowrap; }
.risk.low .r-badge { background: var(--accent); }
.risk.mid .r-badge { background: var(--warn); }
.risk.high .r-badge { background: var(--alert); }
.risk .r-desc { font-size: 13px; color: var(--text-soft); line-height: 1.45; }

/* DPE */
.dpe-row { display: flex; align-items: center; gap: 20px; }
.dpe-scale { display: flex; flex-direction: column; gap: 3px; flex: 0 0 260px; }
.dpe-bar { display: flex; align-items: center; padding: 6px 12px; color: white; font-weight: 600; font-size: 13px; border-radius: 3px; height: 22px; }
.dpe-A { background: #00a050; width: 60%; }
.dpe-B { background: #4eb746; width: 68%; }
.dpe-C { background: #c8d647; width: 76%; color: #333; }
.dpe-D { background: #fff14e; width: 84%; color: #333; }
.dpe-E { background: #f8b13f; width: 90%; }
.dpe-F { background: #e87b2c; width: 96%; }
.dpe-G { background: #d63831; width: 100%; }
.dpe-bar.active { box-shadow: 0 0 0 3px var(--primary); }
.dpe-A.active { width: 65%; }
.dpe-B.active { width: 73%; }
.dpe-C.active { width: 80%; }
.dpe-D.active { width: 88%; }
.dpe-E.active { width: 94%; }
.dpe-F.active { width: 98%; }
.dpe-info { flex: 1; font-size: 14px; color: var(--text-soft); }
.dpe-info strong { color: var(--text); }

/* PLU / GRID */
.plu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 32px; }
.plu-item { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.plu-item .lbl { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.plu-item .val { font-weight: 500; font-size: 14px; }
.plu-item .val.ok { color: var(--accent); }
.plu-item .val.warn { color: var(--warn); }
.plu-item .sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.vs-nat { font-weight: 700; }
.vs-nat.up { color: var(--accent); }
.vs-nat.down { color: var(--alert); }
.vs-nat.flat { color: var(--text-soft); }

/* ENV */
.env-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.env-block h4 { font-size: 13px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); font-weight: 600; }
.env-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.env-item:last-child { border-bottom: none; }
.env-item .name { font-weight: 500; }
.env-item .meta { color: var(--text-soft); font-size: 13px; }

/* TREND */
.trend-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 18px; }
.trend-cell { background: var(--bg); border-radius: 6px; padding: 10px 8px; text-align: center; }
.trend-cell .t-lbl { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.trend-cell .t-val { font-weight: 600; font-size: 15px; margin-top: 4px; }
.trend-cell .t-val.neg { color: var(--alert); }
.trend-cell .t-val.pos { color: var(--accent); }

/* COST GRID */
.cost-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.cost-cell { background: var(--bg); border-radius: 8px; padding: 14px 16px; }
.cost-cell .c-lbl { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.cost-cell .c-val { font-weight: 600; font-size: 18px; color: var(--primary); }
.cost-cell .c-sub { font-size: 12px; color: var(--text-soft); margin-top: 4px; }

/* MISSING DATA */
.missing-box {
  background: var(--bg); border: 1px dashed var(--border-strong); border-radius: 8px;
  padding: 16px; font-size: 13px; color: var(--text-soft); margin-top: 12px;
}
.missing-box strong { color: var(--text); }
.missing-box a { color: var(--primary); text-decoration: underline; }

/* HIGHLIGHT BOX */
.highlight-box {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 14px 16px; font-size: 13px; color: var(--text); margin-top: 16px;
}
.highlight-box.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.highlight-box.alert { background: var(--alert-soft); border-left-color: var(--alert); }
.highlight-box strong { color: var(--accent); }
.highlight-box.warn strong { color: var(--warn); }
.highlight-box.alert strong { color: var(--alert); }

/* SOURCES */
.sources {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px 28px; margin-top: 28px;
}
.sources h2 { font-size: 13px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); font-weight: 600; }
.sources ul {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px;
  font-size: 13px;
}
.sources li { color: var(--text-soft); }
.sources li strong { color: var(--text); }
.sources li a { color: var(--primary); text-decoration: none; }
.sources li a:hover { text-decoration: underline; }

/* FOOTER */
footer {
  text-align: center; padding: 32px;
  color: var(--text-faint); font-size: 13px;
  border-top: 1px solid var(--border); margin-top: 40px;
}

/* ACTIONS */
.actions { display: flex; gap: 10px; margin-bottom: 32px; }
.btn {
  background: var(--primary); color: white; border: none;
  padding: 10px 18px; border-radius: 6px; font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.btn-secondary { background: white; color: var(--primary); border: 1px solid var(--border-strong); }

@media (max-width: 720px) {
  .header { grid-template-columns: 1fr; }
  .indicators { grid-template-columns: repeat(2, 1fr); }
  .risk-grid, .plu-grid, .env-grid, .cost-grid { grid-template-columns: 1fr; }
  .sources ul { grid-template-columns: 1fr; }
  .trend-grid { grid-template-columns: repeat(3, 1fr); }
  /* Mobile : menu site sur 2 rangées (logo + recherche + langue en haut,
     liens centrés en dessous) → tous les liens visibles, sans scroll ni hamburger. */
  :root { --navh: 94px; }
  nav { padding: 7px 14px; gap: 8px; flex-wrap: wrap; }
  nav .logo { font-size: 16px; order: 1; }
  .nav-find, nav > .lang-toggle { order: 2; }
  nav .nav-links {
    order: 3; flex: 1 0 100%; width: 100%; margin: 7px 0 0; padding: 7px 0 0;
    gap: 20px; font-size: 14px; justify-content: center; flex-wrap: wrap; row-gap: 2px;
    overflow-x: visible; -webkit-mask-image: none; mask-image: none;
    border-top: 1px solid var(--border);
  }
  .nav-find-btn { width: 34px; height: 34px; }
  .nav-search, .nav-current { display: none; }
  section[id], h2[id] { scroll-margin-top: 140px; }
  .container { padding: 20px; }
  .dpe-row { flex-direction: column; align-items: flex-start; }
  .dpe-scale { flex: 1 1 auto; width: 100%; }
}

/* --- CheckMyPlace : renforcement layout mobile --- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  .header-info h1 { font-size: 23px; }
  .dvf-summary { gap: 14px; }
  .table-wrap table { min-width: 540px; }
  .demo-banner { font-size: 12px; padding: 10px 16px; }
  .legend { flex-wrap: wrap; row-gap: 6px; }
  .actions { flex-wrap: wrap; }
}
@media (max-width: 440px) {
  .indicators { grid-template-columns: 1fr; }
  .trend-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 16px; }
  .header-info h1 { font-size: 21px; }
  nav { padding: 10px 14px; }
}

/* --- Évolution des prix (sparkline) --- */
.trend { margin-top: 22px; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px 8px; background: var(--bg); }
.trend-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.trend-head h4 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.trend-pct { font-weight: 700; font-size: 15px; white-space: nowrap; }
.trend-pct small { font-weight: 500; color: var(--text-faint); font-size: 12px; }
.trend-pct.up { color: var(--accent); }
.trend-pct.down { color: var(--alert); }
.trend-pct.flat { color: var(--text-soft); }
.trend-svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 6px auto 2px; }
.trend-svg .tv { font-size: 10px; font-weight: 600; fill: var(--text); }
.trend-svg .ty { font-size: 10px; fill: var(--text-faint); }
.trend-note { font-size: 12px; color: var(--text-faint); margin: 2px 0 6px; line-height: 1.45; }

/* --- Risques : ligne discrète « non concerné » --- */
.risk-muted { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-soft); background: var(--bg); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 9px 12px; line-height: 1.45; }
.risk-muted strong { color: var(--text); }

/* --- Note de source discrète --- */
.src-note { font-size: 12px; color: var(--text-faint); margin: 16px 0 0; line-height: 1.5; }
.src-note strong { color: var(--text-soft); }

/* --- Prix médian par type de bien --- */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.type-cell { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.type-cell .t-lbl { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.type-cell .t-val { font-size: 18px; font-weight: 700; margin-top: 3px; color: var(--text); }
.type-cell .t-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* --- Surcote / décote de la rue --- */
.street-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 8px; background: var(--primary-soft); }
.street-main { font-size: 14px; color: var(--text); }
.street-n { color: var(--text-soft); font-weight: 400; }
.street-pct { font-weight: 700; font-size: 15px; white-space: nowrap; }
.street-pct.up { color: var(--warn); }
.street-pct.down { color: var(--accent); }
.street-pct.flat { color: var(--text-soft); }

@media (max-width: 440px) {
  .type-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Affichage v2 — polish visuel (2026-11-18)
   ============================================================ */

/* Cartes : ombres douces et homogènes */
section.card, .sources { box-shadow: 0 1px 2px rgba(26, 58, 82, 0.04), 0 2px 8px rgba(26, 58, 82, 0.035); }
.verdict { box-shadow: 0 1px 2px rgba(26, 58, 82, 0.05); }
section.card { padding: 26px 28px; }
section.card h2 { font-size: 18px; margin-bottom: 6px; }
section.card .lede { font-size: 14.5px; line-height: 1.55; }

/* Indicateurs : empiler label / valeur / sous-titre
   (les enfants étaient des <span> inline → tout se chevauchait) */
.indicators { gap: 14px; }
.ind {
  display: flex; flex-direction: column; min-height: 108px; padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(26, 58, 82, 0.04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ind:hover { border-color: var(--border-strong); box-shadow: 0 3px 10px rgba(26, 58, 82, 0.08); transform: translateY(-1px); }
.ind .ind-label, .ind .ind-value, .ind .ind-sub { display: block; }
.ind .ind-label { margin-bottom: 8px; }
.ind .ind-value {
  font-size: 24px; line-height: 1.1; margin-bottom: 5px; margin-top: auto;
  white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.ind .ind-sub { line-height: 1.4; }

/* Synthèse : texte fluide (le flex coupait la phrase en colonnes) + prix insécable */
.verdict-line { display: block; }
.verdict-line .dot { display: inline-block; vertical-align: middle; margin-right: 10px; }
.verdict-line strong { white-space: nowrap; }

/* En-tête : plus d'air, photo moins envahissante */
.header { gap: 36px; align-items: start; }
.photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e3e9ee 0%, #cdd8e0 100%);
  color: var(--text-faint); font-size: 12px; letter-spacing: 0.02em;
}

/* Résumé DVF : séparateurs verticaux nets plutôt que simples espaces */
.dvf-summary { gap: 0; padding: 18px 20px; align-items: stretch; }
.dvf-summary div { padding: 2px 22px; border-left: 1px solid var(--border); }
.dvf-summary div:first-child { padding-left: 0; border-left: none; }
.dvf-summary .val { white-space: nowrap; }

/* Liens de source dans les en-têtes : légère teinte de marque */
section.card h2 .src { background: var(--primary-soft); border-color: transparent; color: var(--primary); }

@media (max-width: 720px) {
  .dvf-summary { flex-direction: column; gap: 14px; padding: 16px; }
  .dvf-summary div { padding: 0; border-left: none; }
}

/* Carte de l'adresse (embed OpenStreetMap) */
.map-embed { margin: 0 0 16px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-soft); box-shadow: 0 1px 2px rgba(26,58,82,0.05); }
.map-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; }
.map-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 9px 13px; font-size: 12px; background: var(--card); border-top: 1px solid var(--border); color: var(--text-faint); }
.map-links a { color: var(--primary); text-decoration: none; font-weight: 500; }
.map-links a:hover { text-decoration: underline; }

/* Encart compact « dernières ventes » (coin haut-droit) */
.last-sales { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); padding: 12px 15px; box-shadow: 0 1px 2px rgba(26,58,82,0.04); }
.ls-head { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 600; margin-bottom: 6px; }
.ls-head span { font-weight: 500; }
.last-sales ul { list-style: none; margin: 0; padding: 0; }
.last-sales li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.last-sales li:last-of-type { border-bottom: none; }
.ls-d { color: var(--text-soft); font-size: 12px; white-space: nowrap; }
.ls-t { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-p { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ls-more { display: inline-block; margin-top: 9px; font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 500; }
.ls-more:hover { text-decoration: underline; }

/* Encart « À retenir » (synthèse scannable) */
.keypoints { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px 24px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(26,58,82,0.04); }
.keypoints h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 600; margin: 0 0 12px; }
.keypoints ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 24px; }
.kp { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--text); line-height: 1.4; }
.kp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; position: relative; top: 1px; background: var(--text-faint); }
.kp.low .kp-dot { background: var(--accent); }
.kp.mid .kp-dot { background: var(--warn); }
.kp.high .kp-dot { background: var(--alert); }
.kp.unknown .kp-dot { background: var(--text-faint); }
.kp-note { margin: 15px 0 0; font-size: 12px; color: var(--text-faint); line-height: 1.5; }
@media (max-width: 560px) { .keypoints ul { grid-template-columns: 1fr; } }

/* Page À propos / contenu éditorial */
.about { max-width: 760px; margin: 0 auto; }
.about h1 { font-size: clamp(26px, 5vw, 38px); letter-spacing: -.02em; margin: 8px 0 12px; }
.about .lead { font-size: 17px; color: var(--text-soft); line-height: 1.6; margin: 0 0 26px; }
.about .card h2 { margin-bottom: 12px; }
.about .card p { color: var(--text-soft); font-size: 14.5px; line-height: 1.6; margin: 0 0 12px; }
.about .card p:last-child { margin-bottom: 0; }
.about .card ul { margin: 10px 0 0; padding-left: 20px; }
.about .card li { margin-bottom: 8px; color: var(--text-soft); font-size: 14.5px; line-height: 1.5; }
.about .card li strong { color: var(--text); }
.faq-item { border-top: 1px solid var(--border); padding: 14px 0; }
.faq-item:first-child { border-top: none; padding-top: 2px; }
.faq-item:last-child { padding-bottom: 0; }
.faq-q { font-weight: 600; margin: 0 0 6px; color: var(--text); font-size: 15px; }
.faq-a { margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.55; }
.about-cta { margin-top: 24px; }
.about-cta a { color: var(--primary); text-decoration: none; font-weight: 600; }
.about-cta a:hover { text-decoration: underline; }
.about-credit { margin-top: 14px; font-size: 13px; color: var(--muted, #64748b); }
.about-credit a { color: inherit; font-weight: 600; }

/* Page commune (contenu SEO) */
.commune-page { max-width: 820px; margin: 0 auto; }
.crumbs { font-size: 13px; color: var(--text-faint); margin: 0 0 10px; }
.crumbs a { color: var(--text-soft); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.commune-page h1 { font-size: clamp(24px, 4.5vw, 34px); letter-spacing: -.02em; margin: 2px 0 10px; }
.commune-page h1 .cp { color: var(--text-faint); font-weight: 500; }
.commune-page .lead { font-size: 16px; color: var(--text-soft); line-height: 1.6; margin: 0 0 22px; max-width: 640px; }
.commune-search { display: flex; gap: 10px; margin: 0 0 26px; max-width: 620px; }
.commune-search input { flex: 1; padding: 13px 16px; font-size: 15px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); outline: none; }
.commune-search input:focus { border-color: var(--accent); }
.commune-search button { padding: 13px 20px; font-size: 15px; font-weight: 600; border: none; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; white-space: nowrap; }
.commune-prose { font-size: 15px; color: var(--text); line-height: 1.65; margin: 0 0 24px; max-width: 700px; }
.commune-prose strong { font-weight: 700; }

/* Carte interactive des ventes (Leaflet) */
.sales-map { height: 440px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); margin-top: 6px; background: var(--bg-soft); }
.sales-map .leaflet-container { font-family: inherit; background: var(--bg-soft); }
.sales-map .leaflet-popup-content { font-size: 13px; line-height: 1.4; }
.map-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; font-weight: 600; margin: 2px 0 4px; }
.map-legend .mlg { color: var(--accent); }
.map-legend .mlo { color: var(--warn); }
.map-legend .mlr { color: var(--alert); }
.map-legend .mlt { color: #2563a8; }
.map-legend .mls { color: #7c4dcf; }
@media (max-width: 560px) { .sales-map { height: 340px; } }
@media (max-width: 560px) { .commune-search { flex-direction: column; } }

/* Annonces en vente : écart prix acté (DVF) vs prix demandé, + liens portails */
.ecart { display: flex; align-items: stretch; gap: 10px; margin: 4px 0 18px; }
.ecart-cell { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-soft); }
.ecart-cell.sold { border-color: var(--accent); }
.ecart .ec-lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 4px; }
.ecart .ec-val { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.1; }
.ecart-cell.sold .ec-val { color: var(--accent); }
.ecart .ec-sub { font-size: 12px; color: var(--text-soft); margin-top: 4px; line-height: 1.4; }
.ecart-vs { align-self: center; font-size: 12px; font-weight: 700; color: var(--text-faint); padding: 0 2px; }
.listing-links { display: flex; flex-wrap: wrap; gap: 8px; }
.listing-btn { display: inline-flex; align-items: center; padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 600; transition: border-color .12s, background .12s; }
.listing-btn:hover { border-color: var(--accent); background: var(--bg-soft); }
@media (max-width: 560px) { .ecart { flex-direction: column; } .ecart-vs { padding: 2px 0; } }

/* Estimateur interactif sur la fiche */
.est-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; margin: 4px 0 16px; }
.est-f { display: block; font-size: 12.5px; color: var(--text-soft); font-weight: 600; line-height: 1.25; }
.est-f select, .est-f input[type="range"], .est-f input[type="number"] { display: block; width: 100%; margin-top: 5px; }
.est-f select { padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: 14px; }
.est-f input[type="range"] { accent-color: var(--accent); margin-top: 7px; }
.est-f strong { color: var(--text); }
.est-out { border: 1px solid var(--accent); border-radius: 12px; padding: 16px 18px; background: var(--bg-soft); }
.est-price { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1.05; }
.est-price #ef-price { font-variant-numeric: tabular-nums; }
.est-range { font-size: 13.5px; color: var(--text-soft); margin-top: 4px; }
.est-range strong { color: var(--text); }
.est-detail { font-size: 12.5px; color: var(--text-faint); margin-top: 8px; line-height: 1.45; }
.est-detail strong { color: var(--text-soft); }
@media (max-width: 560px) { .est-grid { grid-template-columns: 1fr; } .est-price { font-size: 26px; } }
.est-f input[type="number"] { padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: 14px; width: 100%; }
.rt-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.rt-tile { text-align: left; }
.rt-tile .rt-l { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); margin-bottom: 3px; }
.rt-tile .rt-v { font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .rt-tiles { grid-template-columns: repeat(2, 1fr); } }
.ask-box { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-strong, var(--border)); }
.ask-verdict { font-size: 14.5px; line-height: 1.5; color: var(--text); }
.ask-fin { font-size: 13.5px; color: var(--text-soft); margin-top: 8px; line-height: 1.5; }
.ask-more { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.ask-more:hover { text-decoration: underline; }
.est-amen { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; margin: 0 0 16px; }
.est-amen .est-f { flex: 0 0 auto; min-width: 150px; }
.est-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--text-soft); cursor: pointer; padding-bottom: 7px; }
.est-chk input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.est-amen [hidden] { display: none !important; }
.est-actions { margin: 14px 0 2px; }
.est-btn { display: inline-block; padding: 10px 18px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: filter .12s; }
.est-btn:hover { filter: brightness(1.06); }
.ef-comps { margin-top: 16px; }
.ef-comps-h { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 600; margin-bottom: 8px; }
.ef-breakdown { margin-top: 12px; }
.bk-h { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 600; margin-bottom: 6px; }
.bk-sub { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-faint); font-size: 12px; }
.bk-list { list-style: none; margin: 0; padding: 0; }
.bk-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text-soft); }
.bk-list li:last-child { border-bottom: none; }
ol.visit-q { margin: 0; padding-left: 22px; }
ol.visit-q li { margin-bottom: 11px; line-height: 1.5; font-size: 14.5px; color: var(--text); }
ol.visit-q li::marker { color: var(--accent); font-weight: 700; }

/* Liens latéraux : autres communes du département */
.nearby h2 { margin-bottom: 14px; }
.nb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-chip { display: inline-flex; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); text-decoration: none; color: var(--text); font-size: 13.5px; }
.nb-chip:hover { border-color: var(--accent); color: var(--accent); }
.nb-all { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none; }
.nb-all:hover { text-decoration: underline; }

/* Encart services / partenaires (monétisation) */
.partners .lede { margin-bottom: 16px; }
.partner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.partner-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); text-decoration: none; color: var(--text); transition: border-color .15s ease, transform .15s ease; }
.partner-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.pc-label { font-weight: 600; font-size: 15px; }
.pc-desc { font-size: 13px; color: var(--text-soft); line-height: 1.45; }
.pc-cta { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--accent); }
.partner-disc { margin: 14px 0 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
@media (max-width: 560px) { .partner-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Dark mode — suit la préférence système (prefers-color-scheme).
   Placé en toute fin pour primer sur les règles « Affichage v2 »
   (même spécificité → l'ordre source départage).
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --primary: #8fb6d6;
    --primary-soft: #223243;
    --accent: #4bb07e;
    --accent-soft: #163122;
    --warn: #e0a043;
    --warn-soft: #3a2d14;
    --alert: #e5736b;
    --alert-soft: #3a1f1d;
    --bg: #14161a;
    --card: #1e2127;
    --surface: #1e2127;
    --bg-soft: #23272e;
    --border: #30343c;
    --border-strong: #454b55;
    --text: #e8e6e1;
    --text-soft: #a7a299;
    --text-faint: #7c776e;
  }

  /* Bannière démo (jaune clair en dur) → ambre sombre */
  .demo-banner { background: #2a2512; color: #e7c978; border-bottom-color: #4a3f1a; }

  /* Placeholder photo (dégradé clair en dur) → dégradé sombre */
  .photo { background: linear-gradient(135deg, #2b313a 0%, #1d222a 100%); color: var(--text-faint); }

  /* Badge « à vérifier » (fond clair en dur) */
  .conf-tag.missing { background: #2a2d33; color: var(--text-soft); }

  /* Ombres : plus marquées sur fond sombre */
  section.card, .sources { box-shadow: 0 1px 2px rgba(0,0,0,0.35), 0 2px 10px rgba(0,0,0,0.25); }
  .verdict { box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
  .ind { box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
  .ind:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.4); }

  /* Les barres DPE gardent leurs couleurs réglementaires. */
}

/* ---- Compacité & cohérence verticale (harmonisation du layout) ----
   Toutes les sections partagent le même rythme : padding et marges resserrés,
   pour supprimer l'espace vertical perdu entre des cartes juxtaposées, sans
   retirer de contenu. */
section.card { padding: 20px 24px; margin-bottom: 14px; }
section.card .lede { margin-bottom: 14px; }
.plu-grid { gap: 12px 28px; }
.plu-item { padding-bottom: 9px; }
.src-note { margin-top: 12px; }
.keypoints { padding: 16px 22px; margin-bottom: 14px; }
.trend { margin-top: 18px; }
@media (max-width: 560px) {
  section.card { padding: 16px; margin-bottom: 12px; }
  .keypoints { padding: 14px 16px; }
}

/* ---- Bloc groupé « Le quartier » : les 5 sections commune (Commune, Revenus,
   Logements, Sécurité, Commerces) dans une seule carte, en sous-sections aplaties
   sous un titre unique → fin de page plus courte et cohérente. ---- */
.area .area-title { font-size: 17px; font-weight: 600; color: var(--primary); margin: 0; }
.area > section.card { background: transparent; border: none; box-shadow: none; border-radius: 0; padding: 0; margin: 18px 0 0; }
.area > section.card:first-of-type { margin-top: 12px; }
.area > section.card + section.card { border-top: 1px solid var(--border); padding-top: 18px; }
.area > section.card h2 { font-size: 14px; color: var(--text-soft); }
.area > section.card h2 .src { font-size: 10px; }

/* --- Simplification affichage (2026-11-21) ---
   On ne dévoile plus les sources sous chaque section (badges de source masqués ;
   la méthode et les sources restent sur /a-propos), et le tag « vérifié » (du bruit
   sur une donnée officielle) est retiré. « estimé » et « à vérifier » restent utiles. */
section.card h2 .src { display: none; }
.conf-tag.verified { display: none; }

/* --- Sobriété / fluidité (2026-11-21, retour Gautier) ---
   On retire tout le méta-bruit visuel en gardant TOUTE la donnée.
   Méthode, sources et avertissements restent sur /a-propos. */
.demo-banner { display: none; }
.legend { display: none; }
.conf-tag { display: none; }       /* estimé / à vérifier : pastilles en moins */
.src-note { display: none; }       /* notes de méthode sous les tableaux en moins */

/* ============================================================
   Design v3 (2026-11-21) — refonte de cohérence
   Un seul système pour toutes les fiches (FR + pays) :
   - une échelle : rayon 14 (cartes) / 10 (blocs internes), une ombre ;
   - deux niveaux de libellés : TITRES DE SOUS-BLOC en petites capitales,
     libellés de donnée en casse normale (fini le « tout en capitales ») ;
   - les chiffres en tuiles (valeur en gros, libellé au-dessus) sur 3 colonnes
     (2 sur mobile) au lieu de longues listes soulignées sur 2 colonnes ;
   - indicateurs clés en un seul bandeau, pas 4 cartes flottantes.
   Aucune donnée retirée.
   ============================================================ */
:root {
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(26, 58, 82, 0.05), 0 4px 16px rgba(26, 58, 82, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root { --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.25); }
}

.container { max-width: 1040px; padding: 28px 32px 8px; }
.fiche-nav-inner { max-width: 1040px; }

/* --- Titre de la fiche + bouton de partage --- */
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.title-main { min-width: 0; }
.title-row h1 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; margin: 0 0 5px; font-weight: 700; letter-spacing: -0.025em; }
.title-row .commune { color: var(--text-soft); font-size: 15.5px; }

/* --- Synthèse + dernières ventes : deux cartes de même hauteur --- */
.header { grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.header.solo { grid-template-columns: 1fr; }
.header > div { min-width: 0; display: flex; flex-direction: column; }
.verdict { flex: 1; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.verdict h3 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 10px; }
.verdict-line { font-size: 19px; line-height: 1.4; letter-spacing: -0.01em; margin-bottom: 10px; }
.verdict-sub { margin: 0 0 12px; font-size: 14.5px; }
.verdict p { font-size: 13.5px; color: var(--text-faint); }
.header-side .last-sales { flex: 1; margin-top: 0; }
.last-sales { border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.ls-head { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 8px; }
.last-sales li { padding: 9px 0; font-size: 13.5px; }

/* --- Indicateurs clés : un seul bandeau à séparateurs --- */
.indicators {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow);
}
.ind {
  background: none; border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin: 0 -1px -1px 0; border-radius: 0; box-shadow: none; min-height: 0; padding: 16px 20px; transition: none;
}
.ind:hover { transform: none; box-shadow: none; border-color: var(--border); }
.ind .ind-label { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text-soft); margin-bottom: 6px; }
.ind .ind-value { font-size: 22px; font-weight: 700; margin-top: 0; margin-bottom: 4px; }
.ind .ind-sub { color: var(--text-faint); }

/* --- Cartes de section --- */
section.card, .keypoints, .sources { border-radius: var(--radius); box-shadow: var(--shadow); }
section.card { padding: 24px 28px; margin-bottom: 16px; }
.keypoints { padding: 18px 24px; margin-bottom: 16px; }
.keypoints h2 { font-size: 12px; font-weight: 700; }
.kp { font-size: 14.5px; }
section.card h2, .area .area-title { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 4px; }
section.card .lede { font-size: 14.5px; margin: 0 0 16px; }

/* --- Titres de sous-bloc : un seul style partout --- */
.sub-h, .env-block h4, .trend-head h4, .ef-comps-h, .bk-h {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint);
}
.sub-h { margin: 26px 0 10px; }

/* --- Chiffres en tuiles --- */
.plu-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plu-item { background: var(--bg-soft); border: 0; border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.plu-item .lbl { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text-soft); margin-bottom: 3px; }
.plu-item .val { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.plu-item .sub { margin-top: 3px; line-height: 1.4; }

/* --- Blocs internes : même rayon, mêmes libellés --- */
.dvf-summary, .trend, .trend-cell, .cost-cell, .type-cell, .ecart-cell, .est-out, .street-box, .missing-box, .risk, .risk-muted { border-radius: var(--radius-sm); }
.cost-cell, .type-cell { background: var(--bg-soft); border: 0; padding: 12px 14px; }
.cost-grid, .type-grid { gap: 10px; }
.cost-cell .c-lbl, .type-cell .t-lbl, .ecart .ec-lbl, .rt-tile .rt-l {
  text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text-soft);
}
.cost-cell .c-val { font-size: 17px; font-weight: 700; color: var(--text); }
.type-cell .t-val { font-size: 17px; }
.dvf-summary { background: var(--bg-soft); margin-top: 0; }
.dvf-summary .val { font-size: 18px; font-weight: 700; }
.trend { background: var(--bg-soft); }
th { font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }

/* --- Blocs groupés (Énergie & accès, Le quartier) : sous-sections nettes --- */
.area > section.card { margin: 22px 0 0; }
.area > section.card:first-of-type { margin-top: 16px; }
.area > section.card + section.card { padding-top: 22px; }
.area > section.card h2 { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: 0; }
.area > section.card .lede { font-size: 13.5px; margin-bottom: 12px; }

/* --- Estimateur : une rangée d'actions, prix qui ne casse pas --- */
.est-price { font-size: clamp(23px, 6.2vw, 30px); }
.est-price #ef-price { white-space: nowrap; }
.est-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 2px; }
.est-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; }
.est-btn:empty { display: none; }

/* --- Fin de page : partage + méthode --- */
.share-end { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 24px; margin: 0 0 16px; box-shadow: var(--shadow); }
.method-link { margin: 22px 0 0; font-size: 12.5px; color: var(--text-faint); line-height: 1.6; }
.method-link a { color: var(--accent); text-decoration: none; font-weight: 600; }
.method-link a:hover { text-decoration: underline; }
footer { margin-top: 28px; }

@media (max-width: 720px) {
  .container { padding: 18px 14px 4px; }
  .title-row { margin-bottom: 14px; gap: 10px; }
  .header { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
  .verdict { padding: 18px; }
  .verdict-line { font-size: 17px; }
  .indicators { margin-bottom: 12px; }
  .ind { padding: 13px 16px; }
  .ind .ind-value { font-size: 20px; }
  section.card { padding: 18px 16px; margin-bottom: 12px; }
  .keypoints { padding: 16px; margin-bottom: 12px; }
  section.card h2, .area .area-title { font-size: 18px; }
  .plu-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .plu-item { padding: 10px 12px; }
  .plu-item .val { font-size: 16px; }
  .cost-grid, .type-grid { grid-template-columns: repeat(2, 1fr); }
  .share-end { padding: 14px 16px; margin-bottom: 12px; }
}
@media (max-width: 480px) {
  /* En-tête : le bouton de partage devient une icône ronde. */
  .title-row .sh-toggle { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .title-row .sh-toggle span { display: none; }
}
/* Résumé des prix : les libellés/valeurs imbriqués n'héritent plus du retrait des colonnes. */
.dvf-summary div div { padding: 0; border-left: 0; min-width: 0; }
/* En-tête à une seule colonne (fiches pays sans colonne de droite) : pleine largeur. */
.header > :only-child { grid-column: 1 / -1; }
