/* ==========================================================================
   Contre-offre, surcouche de boitededev-ui

   Direction : le dossier du notaire et le plan cadastral. Factuel, posé,
   du côté de l'acheteur.
   - Le bleu vif (--sky) veut dire « bon pour l'acheteur » : ventes moins
     chères que l'annonce, offre conseillée, bouton principal. Rien d'autre.
   - Le repère du bien (cercle pointé) est la signature : logo, centre du
     plan, curseur de l'annonce sur la réglette.
   - Les couleurs vives ailleurs ne viennent que des données : étiquette
     énergie, rouge et vert du verdict.
   - Le décor des illustrations prend les couleurs d'une rue d'Amiens :
     brique, enduit crème, ardoise, jardins. Il ne porte jamais un chiffre,
     donc il ne fait pas concurrence au bleu.
   ========================================================================== */

:root {
  /* Neutres de la bibliothèque, réchauffés vers le papier du dossier :
     la brique et l'enduit des illustrations s'y posent sans contraste de
     température. Contrastes : --muted 6,0:1 sur --paper, 7,0:1 en sombre. */
  --ink: light-dark(#1a1815, #ebe7e1);
  --ink-2: light-dark(#34302a, #c9c3b9);
  --muted: light-dark(#615d56, #a39d93);
  --line: light-dark(#e8e3db, #2d2a26);
  --line-strong: light-dark(#d4cdc2, #3d3934);
  --line-hover: light-dark(#bdb5a8, #4f4a43);
  --row-hover: light-dark(#fbfaf7, #201e1b);
  --paper: light-dark(#f7f5f1, #121110);
  --white: light-dark(#ffffff, #1b1a18);

  --brick: light-dark(#bf6a45, #b8694a);
  --render: light-dark(#f3ece1, #211d18);
  --render-deep: light-dark(#e8dcc9, #2e2821);
  --slate: light-dark(#6f7f91, #5c6b7c);
  --leaf: light-dark(#7aa35f, #6c9454);

  /* Vert de la bibliothèque foncé en clair : 4,6:1 sur --paper (au lieu de 3,0:1). */
  --success: light-dark(#15803d, #4ade80);
}

/* Bordure des champs à 3:1 au moins sur leur fond (RGAA 3.3) ; halo de focus plus marqué. */
.input, .select, .textarea { border-color: light-dark(#8a8378, #706a61); }
.input:hover:not(:focus, [aria-invalid="true"]), .select:hover:not(:focus, [aria-invalid="true"]), .textarea:hover:not(:focus, [aria-invalid="true"]) { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 3px light-dark(#bfe8ff, #164e75); }

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
.navbar a.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0;
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
}
.navbar a.wordmark:hover { color: var(--ink); }
.wordmark-mark { width: 21px; height: 28px; display: block; }
/* L'extension du nom (« .fr ») en retrait : on lit « contre-offre », on retient l'adresse */
.wordmark-tld { color: var(--muted); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: var(--sp-2); }

/* Repère du bien sur la réglette */
.scale-pin circle:first-child { fill: none; stroke: currentColor; stroke-width: 2; }
.scale-pin circle:last-child { fill: currentColor; }

.mono { font-family: var(--mono); font-size: 0.9em; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.flash { padding-top: var(--sp-4); }

.site-footer {
  margin-top: var(--sp-8);
  padding-block: var(--sp-6);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.site-footer p { max-width: 72ch; }
main:has(> .cta-band:last-child) + .site-footer { margin-top: 0; }
/* Cible du lien « Aller au contenu » : focalisable, sans cadre */
main:focus { outline: none; }

/* Repliables : annexes du rapport, risques de la commune */
.annex > summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  padding-block: var(--sp-3);
  list-style: none;
  cursor: pointer;
}
.annex > summary::-webkit-details-marker { display: none; }
.annex > summary::before {
  content: "";
  flex: none;
  align-self: center;
  width: 7px;
  height: 7px;
  margin-inline: 2px 4px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform var(--t-fast) var(--ease);
}
.annex[open] > summary::before { transform: rotate(45deg); }
.annex > summary:hover::before { border-color: var(--ink); }
.annex-meta { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--sp-7) 0; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--sp-7);
  align-items: stretch;
}
.hero-text { display: grid; gap: var(--sp-5); }
.hero-text h1 { max-width: 17ch; letter-spacing: -0.03em; }
.hero-preview { display: flex; margin: 0; }
/* La carte d'exemple prend la hauteur de la colonne de gauche : son haut s'aligne
   sur le titre, son bas sur celui du formulaire. L'espace en plus se répartit
   entre ses blocs, sans trou au milieu. */
.hero-preview .preview-card { flex: 1; align-content: space-between; }

@media (max-width: 960px) {
  .hero { padding-block: var(--sp-6) 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
}

/* --------------------------------------------------------------------------
   Formulaire
   -------------------------------------------------------------------------- */
.report-form {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.report-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.report-form legend {
  padding: 0;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-2);
}
.report-form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
@media (max-width: 480px) {
  .report-form-pair { grid-template-columns: 1fr; }
}
/* Code postal court, ville plus large ; côte à côte même sur mobile */
.report-form-place { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (max-width: 480px) {
  .report-form-place { grid-template-columns: 7.5em minmax(0, 1fr); }
}

/* Unité collée dans le champ */
.input-unit { position: relative; }
.input-unit .input { width: 100%; padding-right: 44px; font-variant-numeric: tabular-nums; }
.input-unit > span {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: var(--fs-sm);
  pointer-events: none;
}

/* Choix maison / appartement */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-1);
  padding: var(--sp-1);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.segmented-option { position: relative; }
.segmented-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.segmented-option span {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.segmented-option input:checked + span {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
}
.segmented-option input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* État d'attente : Turbo pose aria-busy sur le formulaire pendant l'envoi */
.report-form-submit .when-busy { display: none; }
.report-form[aria-busy="true"] .report-form-submit { opacity: 0.7; pointer-events: none; }
.report-form[aria-busy="true"] .when-idle { display: none; }
.report-form[aria-busy="true"] .when-busy { display: inline; }

.report-form-note { font-size: var(--fs-xs); color: var(--muted); }

/* --------------------------------------------------------------------------
   Exemple de rapport (landing)
   -------------------------------------------------------------------------- */
.preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.preview-head { display: grid; gap: var(--sp-1); }
.preview-kicker {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.preview-address { font-weight: 500; }
.preview-sales {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Verdict
   -------------------------------------------------------------------------- */
/* Le texte est centré sur la hauteur du chiffre, qu'il tienne sur une ligne ou deux :
   aligné sur la ligne de base, sa deuxième ligne pendait sous le chiffre. */
.verdict {
  display: flex;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  flex-wrap: wrap;
}
.verdict > p { margin: 0; }
.verdict-figure {
  font-family: var(--display);
  font-size: var(--fs-3xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.verdict-text { flex: 1 1 24ch; max-width: 40ch; color: var(--ink-2); line-height: 1.45; }
.verdict-above .verdict-figure { color: var(--danger); }
.verdict-below .verdict-figure { color: var(--success); }

/* --------------------------------------------------------------------------
   Réglette des prix au m²
   Les positions arrivent en % dans --at. Les étiquettes se décalent de la
   même proportion de leur largeur : elles ne débordent jamais aux bords.
   -------------------------------------------------------------------------- */
.scale { display: grid; gap: var(--sp-3); margin: 0; }
.scale-body { position: relative; height: 80px; }
.scale-with-offer .scale-body { height: 108px; }

.scale-track,
.scale-band {
  position: absolute;
  top: 36px;
  height: 12px;
  border-radius: 6px;
}
.scale-track {
  left: 0;
  right: 0;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}
.scale-band {
  left: var(--from);
  width: calc(var(--to) - var(--from));
  background: var(--line-strong);
}
.scale-sale {
  position: absolute;
  top: 32px;
  left: var(--at);
  width: 2px;
  height: 20px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--muted);
  opacity: 0.6;
}
.scale-sale-cheaper { background: var(--sky); opacity: 1; }
.scale-median {
  position: absolute;
  top: 28px;
  left: var(--at);
  width: 3px;
  height: 28px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ink);
}

.scale-mark { position: absolute; top: 0; left: var(--at); }
.scale-label {
  position: absolute;
  left: 0;
  transform: translateX(calc(var(--at) * -1));
  font-size: var(--fs-sm);
  line-height: 20px;
  color: var(--ink-2);
  white-space: nowrap;
}
.scale-label strong { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Annonce : étiquette au-dessus, tige, repère sur la piste */
.scale-asking::before {
  content: "";
  position: absolute;
  top: 22px;
  left: -0.5px;
  width: 1px;
  height: 12px;
  background: var(--ink);
}
.scale-pin {
  position: absolute;
  top: 34px;
  left: -8px;
  width: 16px;
  height: 16px;
  max-width: none;
  color: var(--ink);
  background: var(--white);
  border-radius: 50%;
}

/* Offre conseillée : sous la piste, en bleu */
.scale-offer::before {
  content: "";
  position: absolute;
  top: 38px;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 2px var(--white);
}
.scale-offer::after {
  content: "";
  position: absolute;
  top: 50px;
  left: -0.5px;
  width: 1px;
  height: 10px;
  background: var(--sky-deep);
}
.scale-offer .scale-label { top: 60px; color: var(--sky-deep); }
.scale-offer .scale-label strong { color: var(--sky-deep); }

.scale-axis { position: absolute; left: 0; right: 0; top: 58px; }
.scale-with-offer .scale-axis { top: 88px; }
.scale-axis span {
  position: absolute;
  left: var(--at);
  transform: translateX(calc(var(--at) * -1));
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.scale-caption {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.scale-caption span { display: inline-flex; align-items: center; gap: 6px; }
.scale-key { display: inline-block; border-radius: 2px; }
.scale-key-band { width: 16px; height: 8px; border-radius: 4px; background: var(--line-strong); }
.scale-key-median { width: 3px; height: 12px; background: var(--ink); }
.scale-key-sale { width: 2px; height: 12px; background: var(--muted); }

/* --------------------------------------------------------------------------
   Ventes comparées à l'annonce : une barre par vente, partie de l'annonce.
   Vers la gauche en bleu (moins cher, argument pour l'acheteur), vers la
   droite en gris. La longueur est dans --w, en % d'une demi-piste.
   -------------------------------------------------------------------------- */
.gap-table th,
.gap-table td { padding: 10px 12px; vertical-align: middle; }
.gap-table td:first-child { white-space: normal; min-width: 11em; }
.gap-col { width: 36%; min-width: 120px; }
.gap-head {
  display: grid;
  gap: 2px;
  text-align: center;
  font-family: var(--body);
}
.gap-head strong { color: var(--ink); font-weight: 600; }
.gap-dir { display: flex; justify-content: space-between; gap: var(--sp-2); font-weight: 400; }
.gap-track { position: relative; display: block; height: 20px; }
.gap-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  bottom: -10px;
  border-left: 2px solid var(--ink);
}
.gap-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: calc(var(--w) * 0.5%);
  background: var(--line-strong);
}
.gap-bar-left { right: 50%; border-radius: 4px 0 0 4px; }
.gap-bar-right { left: 50%; border-radius: 0 4px 4px 0; }
.gap-cheaper .gap-bar { background: var(--sky); }
.gap-value { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.gap-cheaper .gap-value { color: var(--sky-deep); }
.gap-table .num { white-space: nowrap; }
.gap-table th:last-child { width: 8em; font-family: var(--body); line-height: 1.3; }
.gap-table th:last-child .gap-optional { display: block; }
.gap-mobile { display: none; }
.gap-table .gap-more td {
  padding-block: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: var(--fs-xs);
  text-align: center;
  white-space: normal;
}
@media (max-width: 640px) {
  .gap-optional { display: none; }
  .gap-mobile { display: inline; font-weight: 600; color: var(--ink); }
  .gap-table th,
  .gap-table td { padding: 8px; }
  .gap-dir { display: none; }
  .gap-table th:last-child .gap-optional { display: none; }
  .gap-col { min-width: 88px; }
  .gap-table td:first-child { min-width: 8em; }
}

/* Cibles tactiles : 44 px sur téléphone (barre du haut, choix maison / appartement) */
@media (max-width: 640px) {
  .navbar .btn-sm { min-height: 44px; }
  .navbar .btn-icon.btn-sm { width: 44px; height: 44px; }
  .segmented-option span { padding-block: 11px; }
}

/* --------------------------------------------------------------------------
   Illustrations de la landing (SVG en ligne, décoratives)
   Même dessin que le plan du rapport : trait encre de 2 px, aplats papier,
   ombre portée décalée. Le bleu ne marque que ce qui est bon pour l'acheteur.
   -------------------------------------------------------------------------- */
.ill { display: block; width: 100%; height: auto; overflow: visible; }
.ill :where(rect, polygon, circle, path, line) { stroke-linejoin: round; stroke-linecap: round; }
.ill text { font-family: var(--mono); font-size: 13px; font-weight: 600; text-anchor: middle; }
.ill-wall { fill: var(--white); stroke: var(--ink); stroke-width: 2; }
.ill-roof { fill: var(--slate); stroke: var(--ink); stroke-width: 2; }
.ill-roof-subject { fill: var(--ink); stroke: var(--ink); stroke-width: 2; }
.ill-roof-patch { fill: var(--muted); stroke: var(--ink); stroke-width: 1.5; }
.ill-win { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.ill-door { fill: var(--slate); stroke: var(--ink); stroke-width: 1.5; }
.ill-wall-brick { fill: var(--brick); }
.ill-wall-render { fill: var(--render-deep); }
.ill-shadow { fill: var(--line); }
.ill-ground { fill: var(--line); }
.ill-edge { stroke: var(--ink); stroke-width: 2; }
.ill-kerb { stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 18 14; }
.ill-cloud { fill: var(--white); stroke: var(--line-strong); stroke-width: 2; }
.ill-tree { fill: var(--leaf); stroke: var(--ink); stroke-width: 2; }
.ill-trunk { fill: var(--ink); }
.ill-tag rect { stroke-width: 1.5; }
.ill-tag-cheaper rect { fill: var(--sky); stroke: var(--sky-deep); }
.ill-tag-cheaper text { fill: var(--on-sky); }
.ill-tag-similar rect { fill: var(--line-strong); stroke: var(--muted); }
.ill-tag-similar text { fill: var(--ink); }
.ill-tag-pricier rect { fill: var(--white); stroke: var(--line-strong); }
.ill-tag-pricier text { fill: var(--muted); }
.ill-pin-ring { fill: var(--white); stroke: var(--ink); stroke-width: 3; }
.ill-pin-dot { fill: var(--ink); }
.ill-label rect { fill: var(--ink); }
.ill-label text { fill: var(--white); font-family: var(--body); }
.ill-photo { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.ill-text-line { fill: var(--line-strong); }
.ill-text-line-soft { fill: var(--line); }
.ill-parcel { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.ill-dot { fill: var(--line-strong); stroke: var(--white); stroke-width: 2; }
.ill-dot-cheaper { fill: var(--sky); }
.ill-lens { fill: var(--white); fill-opacity: 0.85; stroke: var(--ink); stroke-width: 4; }
.ill-handle { stroke: var(--ink); stroke-width: 9; }
.ill .ill-gap { fill: var(--sky-deep); font-size: 14px; }
.ill-ring { fill: none; stroke: var(--ink); stroke-width: 3.5; }
.ill-key { fill: var(--line-strong); stroke: var(--ink); stroke-width: 2; }
.ill-key-alt { fill: var(--white); }
.ill-string { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.ill-keytag rect { fill: var(--sky); stroke: var(--sky-deep); stroke-width: 2; }
.ill-keytag circle { fill: var(--white); stroke: var(--sky-deep); stroke-width: 2; }
.ill-keytag text { fill: var(--on-sky); font-size: 14px; }
.ill-keytag .ill-keytag-small { font-family: var(--body); font-size: 11px; font-weight: 500; }
.ill-board { stroke: var(--ink); stroke-width: 3; }
.ill-crack { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.ill-shutter { fill: var(--slate); stroke: var(--ink); stroke-width: 1.5; }
.ill-plant { fill: var(--leaf); stroke: var(--ink); stroke-width: 1.5; }
.ill .ill-caption { fill: var(--muted); font-family: var(--body); font-size: 14px; font-weight: 500; }
.ill .ill-equals { fill: var(--ink); font-family: var(--display); font-size: 44px; font-weight: 600; }

/* Rue sous le hero : le bien tombe en place à l'arrivée */
.hero-street { margin-top: var(--sp-7); }
.ill-street { max-height: 260px; }
.ill-pin { animation: ill-drop 600ms var(--ease) 200ms both; }
@keyframes ill-drop {
  from { transform: translateY(-14px); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .ill-pin { animation: none; } }
/* Sur téléphone, on ne garde que le centre de la rue, assez grand pour lire
   « Votre annonce » (≈ 11 px) ; les étiquettes de prix tomberaient sous 8 px. */
@media (max-width: 640px) {
  .hero-street { margin-top: var(--sp-5); padding-inline: 0; }
  .ill-street { height: 210px; }
  .ill-street .ill-tag { display: none; }
}

/* ==========================================================================
   Nouveau rendu des maisons (rue + « même prix »)
   Tout est limité à .ill-street et .ill-same-price : les autres illustrations
   (photo, loupe, clés, parcelles…) gardent le style ci-dessus.
   ========================================================================== */
.ill {
  --ill-accent: #0ea5ff;
  --ill-accent-deep: #0284c7;
  --ill-ink: var(--ink, #1a1815);
  --ill-slate: var(--slate, #6f7f91);
  --ill-slate-deep: #55636f;
  --ill-brick: var(--brick, #bf6a45);
  --ill-render: #f4ead9;
  --ill-plain: var(--white, #fbfaf7);
  --ill-far: #e3ecf3;
  --ill-pavement: var(--line, #e7e2d9);
  --ill-road: #cfd3d6;
  --ill-pricier: #c2410c;
  --ill-pricier-bg: #fff4ec;
  --ill-cheaper: #0f8a5f;
  --ill-cheaper-bg: #edf9f3;
  --ill-similar: #55636f;
  --ill-similar-bg: #f3f5f7;
}
.ill-same-price { max-width: 380px; margin-inline: auto; }

/* Fond et sol */
:is(.ill-street, .ill-same-price) .ill-cloud { fill: #fff; stroke: #e3ecf3; stroke-width: 1.5; }
:is(.ill-street, .ill-same-price) .ill-far { fill: var(--ill-far); }
:is(.ill-street, .ill-same-price) .ill-ground { fill: var(--ill-pavement); }
:is(.ill-street, .ill-same-price) .ill-road { fill: var(--ill-road); }
:is(.ill-street, .ill-same-price) .ill-road-mark { stroke: #fff; stroke-width: 2; opacity: .8; }
:is(.ill-street, .ill-same-price) .ill-edge { stroke: var(--ill-ink); stroke-width: 1.5; opacity: .55; }
:is(.ill-street, .ill-same-price) .ill-kerb { stroke: #b8b2a7; stroke-width: 2; stroke-dasharray: none; }
:is(.ill-street, .ill-same-price) .ill-contact { fill: var(--ill-ink); opacity: .08; }
:is(.ill-street, .ill-same-price) .ill-spot-a { stop-color: var(--ill-accent); stop-opacity: .35; }
:is(.ill-street, .ill-same-price) .ill-spot-b { stop-color: var(--ill-accent); stop-opacity: 0; }

/* Bâtiments */
:is(.ill-street, .ill-same-price) .ill-shadow { fill: var(--ill-ink); opacity: .07; }
:is(.ill-street, .ill-same-price) .ill-wall { fill: var(--ill-plain); stroke: var(--ill-ink); stroke-opacity: .12; stroke-width: 1; }
:is(.ill-street, .ill-same-price) .ill-wall-render { fill: var(--ill-render); }
:is(.ill-street, .ill-same-price) .ill-wall-brick { fill: url(#ill-brick); }
:is(.ill-street, .ill-same-price) .ill-wall-worn { filter: saturate(.55) brightness(.97); }
:is(.ill-street, .ill-same-price) .ill-brick-bg { fill: var(--ill-brick); }
:is(.ill-street, .ill-same-price) .ill-brick-joint { stroke: #a95a39; stroke-width: 1; fill: none; }
:is(.ill-street, .ill-same-price) .ill-plinth { fill: var(--ill-ink); opacity: .1; }
:is(.ill-street, .ill-same-price) .ill-band { fill: var(--ill-ink); opacity: .08; }
:is(.ill-street, .ill-same-price) .ill-stain { fill: #5b4a3a; opacity: .14; }
:is(.ill-street, .ill-same-price) .ill-crack { stroke: var(--ill-ink); stroke-opacity: .55; stroke-width: 1.5; fill: none; }

/* Toits */
:is(.ill-street, .ill-same-price) .ill-roof { fill: var(--ill-slate); stroke: none; }
:is(.ill-street, .ill-same-price) .ill-roof-subject { fill: var(--ill-accent); stroke: none; }
:is(.ill-street, .ill-same-price) .ill-roof-tiles { stroke: #fff; stroke-opacity: .16; stroke-width: 1.5; fill: none; }
:is(.ill-street, .ill-same-price) .ill-roof-patch { fill: #3d4752; stroke: none; }
:is(.ill-street, .ill-same-price) .ill-roof-lath { stroke: #8a5a3c; stroke-width: 1.5; fill: none; }
:is(.ill-street, .ill-same-price) .ill-eave { fill: var(--ill-ink); opacity: .22; }
:is(.ill-street, .ill-same-price) .ill-eave-broken { fill: none; stroke: var(--ill-ink); stroke-opacity: .35; stroke-width: 3; opacity: 1; }
:is(.ill-street, .ill-same-price) .ill-chimney { fill: var(--ill-slate-deep); }
:is(.ill-street, .ill-same-price) .ill-house-old .ill-chimney { fill: #6c7781; }
:is(.ill-street, .ill-same-price) .ill-chimney-cap { fill: var(--ill-ink); opacity: .6; }

/* Fenêtres et portes */
:is(.ill-street, .ill-same-price) .ill-win { fill: url(#ill-glass); stroke: #fff; stroke-width: 1.5; }
:is(.ill-street, .ill-same-price) .ill-win-dirty { fill: #b9c3c7; stroke: #e7e2d9; }
:is(.ill-street, .ill-same-price) .ill-glass-a { stop-color: #e6f6ff; }
:is(.ill-street, .ill-same-price) .ill-glass-b { stop-color: #a9dcf7; }
:is(.ill-street, .ill-same-price) .ill-glass-c { stop-color: #7cc4ea; }
:is(.ill-street, .ill-same-price) .ill-win-bar { stroke: #fff; stroke-width: 1.2; opacity: .9; fill: none; }
:is(.ill-street, .ill-same-price) .ill-win-glint { stroke: #fff; stroke-width: 1.5; opacity: .7; }
:is(.ill-street, .ill-same-price) .ill-sill { fill: #d9d2c5; }
:is(.ill-street, .ill-same-price) .ill-shutter { fill: var(--ill-slate); stroke: none; opacity: .85; }
:is(.ill-street, .ill-same-price) .ill-shutter-loose { fill: #8d9aa6; }
:is(.ill-street, .ill-same-price) .ill-board { stroke: #a2774f; stroke-width: 5; stroke-linecap: square; fill: none; }
:is(.ill-street, .ill-same-price) .ill-door { fill: #3b3a36; stroke: none; }
:is(.ill-street, .ill-same-price) .ill-door-worn { fill: #6b6259; }
:is(.ill-street, .ill-same-price) .ill-door-panel { fill: none; stroke: #fff; stroke-opacity: .18; stroke-width: 1; }
:is(.ill-street, .ill-same-price) .ill-knob { fill: #f2c14e; }
:is(.ill-street, .ill-same-price) .ill-step { fill: #cfc8bb; }

/* Végétation, mobilier */
:is(.ill-street, .ill-same-price) .ill-trunk { fill: #8a5a3c; }
:is(.ill-street, .ill-same-price) .ill-tree { fill: #6cbf84; stroke: none; }
:is(.ill-street, .ill-same-price) .ill-tree-shade { fill: #4fa36a; }
:is(.ill-street, .ill-same-price) .ill-tree-light { fill: #9bd8ac; opacity: .8; }
:is(.ill-street, .ill-same-price) .ill-bush { fill: #5fb47a; }
:is(.ill-street, .ill-same-price) .ill-plant { fill: #8a5a3c; stroke: none; }
:is(.ill-street, .ill-same-price) .ill-flower { fill: #f28b6b; }
:is(.ill-street, .ill-same-price) .ill-flower-alt { fill: #f2c14e; }
:is(.ill-street, .ill-same-price) .ill-weed { stroke: #7da35a; stroke-width: 1.5; fill: none; }
:is(.ill-street, .ill-same-price) .ill-sparkle { fill: var(--ill-accent); opacity: .75; }
:is(.ill-street, .ill-same-price) .ill-lamp-post, :is(.ill-street, .ill-same-price) .ill-lamp-head { fill: #4b5560; }
:is(.ill-street, .ill-same-price) .ill-lamp-arm { fill: none; stroke: #4b5560; stroke-width: 2; }
:is(.ill-street, .ill-same-price) .ill-lamp-glow { fill: #ffe39a; }

/* Étiquettes de prix (police --mono conservée, un peu plus petite pour laisser la place à l'icône) */
:is(.ill-street, .ill-same-price) .ill-tag rect { stroke-width: 1.5; filter: drop-shadow(0 1px 1.5px rgba(26, 24, 21, .14)); }
:is(.ill-street, .ill-same-price) .ill-tag text { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
:is(.ill-street, .ill-same-price) .ill-tag .ill-edge { stroke-dasharray: 2 3; opacity: .5; }
:is(.ill-street, .ill-same-price) .ill-tag-anchor { fill: var(--ill-ink); opacity: .5; }
:is(.ill-street, .ill-same-price) .ill-tag-icon { fill: none; stroke-width: 2; }
:is(.ill-street, .ill-same-price) .ill-tag-pricier rect { fill: var(--ill-pricier-bg); stroke: var(--ill-pricier); }
:is(.ill-street, .ill-same-price) .ill-tag-pricier text { fill: var(--ill-pricier); }
:is(.ill-street, .ill-same-price) .ill-tag-pricier .ill-tag-icon { stroke: var(--ill-pricier); }
:is(.ill-street, .ill-same-price) .ill-tag-cheaper rect { fill: var(--ill-cheaper-bg); stroke: var(--ill-cheaper); }
:is(.ill-street, .ill-same-price) .ill-tag-cheaper text { fill: var(--ill-cheaper); }
:is(.ill-street, .ill-same-price) .ill-tag-cheaper .ill-tag-icon { stroke: var(--ill-cheaper); }
:is(.ill-street, .ill-same-price) .ill-tag-similar rect { fill: var(--ill-similar-bg); stroke: var(--ill-similar); }
:is(.ill-street, .ill-same-price) .ill-tag-similar text { fill: var(--ill-similar); }
:is(.ill-street, .ill-same-price) .ill-tag-similar .ill-tag-icon { stroke: var(--ill-similar); }

/* Repère « Votre annonce » */
:is(.ill-street, .ill-same-price) .ill-pin .ill-edge { stroke: var(--ill-accent-deep); opacity: 1; stroke-width: 2; }
:is(.ill-street, .ill-same-price) .ill-pin-halo { fill: var(--ill-accent); opacity: .18; transform-box: fill-box; transform-origin: center; }
:is(.ill-street, .ill-same-price) .ill-pin-ring { fill: var(--ill-accent); stroke: #fff; stroke-width: 3; }
:is(.ill-street, .ill-same-price) .ill-pin-dot { fill: #fff; }
:is(.ill-street, .ill-same-price) .ill-label rect, :is(.ill-street, .ill-same-price) .ill-label-tip { fill: var(--ill-ink); }
:is(.ill-street, .ill-same-price) .ill-label text { font-size: 12px; font-weight: 700; }

/* « Même prix » : signe égal et légendes */
:is(.ill-street, .ill-same-price) .ill-equals-bg { fill: #fff; stroke: var(--ill-accent); stroke-width: 2; }
:is(.ill-street, .ill-same-price) .ill-equals { fill: var(--ill-accent); font-size: 34px; }
:is(.ill-street, .ill-same-price) .ill-caption { font-weight: 600; }
:is(.ill-street, .ill-same-price) .ill-caption-new { fill: var(--ill-cheaper); }
:is(.ill-street, .ill-same-price) .ill-caption-old { fill: var(--ill-pricier); }

@media (prefers-reduced-motion: no-preference) {
  .ill-street .ill-pin-halo { animation: ill-pulse 2.4s ease-out 800ms infinite both; }
}
@keyframes ill-pulse {
  0% { transform: scale(.65); opacity: .35; }
  100% { transform: scale(1.25); opacity: 0; }
}


/* Comment ça marche */
.steps-section { background: var(--white); }
.steps-title { font-size: var(--fs-2xl); letter-spacing: -0.02em; margin-bottom: var(--sp-6); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li { display: grid; gap: var(--sp-2); align-content: start; }
.step-art { margin-bottom: var(--sp-2); }
.step-art .ill { max-width: 200px; }
.steps h3 {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--body);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: 0;
}
.step-num { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); }
.steps p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; max-width: 34ch; }
@media (max-width: 820px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step-art .ill { max-width: 180px; }
}

/* Appel final */
.cta-band { padding-block: clamp(40px, 6vw, 72px); background: var(--render); }
.cta-grid { display: grid; }
.cta-text { display: grid; gap: var(--sp-4); justify-items: start; }
.cta-text h2 { font-size: var(--fs-2xl); letter-spacing: -0.02em; max-width: 22ch; }
.cta-text p { color: var(--muted); }


/* --------------------------------------------------------------------------
   Sections de la landing : titre à gauche, contenu à droite
   -------------------------------------------------------------------------- */
.split-section + .split-section { border-top: 1px solid var(--line); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--sp-7);
  align-items: start;
}
.split-head { display: grid; gap: var(--sp-3); }
.split-head h2 { font-size: var(--fs-2xl); letter-spacing: -0.02em; max-width: 14ch; }
.split-head p { color: var(--muted); max-width: 36ch; }
.limits-art { max-width: 380px; margin-bottom: var(--sp-2); }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-5); }
}

.contents-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5) var(--sp-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.contents-list li { padding-top: var(--sp-4); border-top: 1px solid var(--line-strong); }
.contents-list h3 { font-size: var(--fs-md); font-family: var(--body); font-weight: 600; letter-spacing: 0; margin-bottom: var(--sp-1); }
.contents-list p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.contents-list .contents-wide { grid-column: 1 / -1; }
.contents-wide p { max-width: 64ch; }
@media (max-width: 640px) { .contents-list { grid-template-columns: 1fr; } }

.limits { display: grid; gap: var(--sp-4); max-width: 64ch; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Page rapport : sommaire à gauche, rapport à droite
   -------------------------------------------------------------------------- */
.report-layout { padding-top: var(--sp-6); }
.report-layout.has-toc {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}
.report-toc {
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-6));
  display: grid;
  gap: 2px;
}
.report-toc-title {
  margin-bottom: var(--sp-2);
  padding-inline: 10px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.report-toc a {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.report-toc a:hover { color: var(--ink); }
.report-toc a[aria-current="location"] {
  color: var(--ink);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (max-width: 1100px) {
  .report-layout.has-toc { display: block; }
  .report-toc { display: none; }
}
@media (min-width: 1101px) {
  .has-toc .report-jump { display: none; }
}

.report { display: grid; gap: var(--sp-8); min-width: 0; }
.report-head { display: grid; gap: var(--sp-3); }
.report-head h1 { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.report-kicker { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.report-meta { color: var(--muted); font-variant-numeric: tabular-nums; }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.report-jump { font-size: var(--fs-sm); font-weight: 500; color: var(--sky-deep); }

.report-edit summary {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--sky-deep);
  cursor: pointer;
}
.report-edit[open] summary { margin-bottom: var(--sp-3); }
.report-edit .report-form { max-width: 560px; }

.report-section { display: grid; gap: var(--sp-4); }
.report-section h2 { font-size: var(--fs-xl); letter-spacing: -0.01em; }
.report-section h3 { font-size: var(--fs-md); font-family: var(--body); font-weight: 600; letter-spacing: 0; margin-top: var(--sp-2); }
.report-section a { color: var(--sky-deep); }
.empty-note { color: var(--muted); }

/* En-tête de partie : numéro (celui du sommaire du PDF), titre, résumé en une ligne */
.section-head {
  display: grid;
  margin: 0;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--sp-3);
  row-gap: 2px;
  align-items: baseline;
}
.section-head > :not(.section-num) { grid-column: 2; }
.section-head:not(:has(.section-num)) { grid-template-columns: minmax(0, 1fr); }
.section-head:not(:has(.section-num)) > * { grid-column: 1; }
.section-num {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.section-lede { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Corps de partie posé sur une carte, comme la synthèse du prix */
.section-card {
  display: grid;
  gap: var(--sp-4);
  min-width: 0;
  padding: var(--sp-5) var(--sp-6);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.section-card > h3:first-child { margin-top: 0; }
@media (max-width: 640px) { .section-card { padding: var(--sp-4); } }

/* Synthèse : verdict et réglette, fiche à droite */
.summary {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr);
  gap: var(--sp-6);
  padding: var(--sp-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.summary-main { display: grid; gap: var(--sp-5); align-content: start; min-width: 0; }
.summary .brief { padding-left: var(--sp-6); border-left: 1px solid var(--line); }
@media (max-width: 860px) {
  .summary { grid-template-columns: 1fr; }
  .summary .brief { padding: var(--sp-4) 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Fiche : libellé à gauche, valeur à droite, filets fins */
.brief { display: grid; align-content: start; margin: 0; }
.brief > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.brief > div:first-child { padding-top: 0; }
.brief > div:last-child { border-bottom: 0; padding-bottom: 0; }
.brief dt { font-size: var(--fs-sm); color: var(--muted); }
.brief dd {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.brief dd a { color: inherit; text-decoration: none; }
.brief dd a:hover { color: var(--sky-deep); }
.brief-key dt { color: var(--ink); font-weight: 500; }
.brief-key dd a { font-size: var(--fs-lg); font-weight: 600; color: var(--sky-deep); }
.brief-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-6); }
.brief-inline > div { padding-top: 10px; border-bottom: 0; flex-direction: column; gap: var(--sp-1); }
.brief-inline dd { text-align: left; }
@media (max-width: 640px) { .brief-inline { grid-template-columns: 1fr; } }

/* Ventes comparables */
.comparables { display: grid; gap: var(--sp-3); min-width: 0; }
.comparables-intro { color: var(--ink-2); }
.cell-sub { display: block; font-size: var(--fs-xs); color: var(--muted); }

/* Énergie : étiquette A à G, puis le détail des DPE */
.energy { display: grid; gap: var(--sp-5); }
.energy.has-label {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
}
@media (max-width: 760px) { .energy.has-label { grid-template-columns: 1fr; } }

.energy-label { display: grid; gap: var(--sp-3); margin: 0; }
.energy-label ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.energy-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.energy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex: 0 0 calc(var(--w) * 0.7);
  height: 24px;
  padding: 0 16px 0 8px;
  border-radius: 4px 0 0 4px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  color: #16181d;
}
/* Classes autres que celle du bien : couleur pâlie, texte gardé lisible (opacité seule : 1,3 à 2,3:1). */
.energy-row:not(.is-current) .energy-bar {
  background: color-mix(in srgb, var(--dpe) 35%, var(--white));
  color: var(--ink);
}
.energy-bar b { font-family: var(--display); font-size: var(--fs-md); font-weight: 600; line-height: 1; }
.energy-range { font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.energy-row.is-current .energy-bar { height: 36px; opacity: 1; }
.energy-row.is-current .energy-bar b { font-size: var(--fs-xl); }
.energy-value { display: grid; font-size: var(--fs-xs); line-height: 1.3; color: var(--muted); }
.energy-value strong { font-size: var(--fs-lg); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.energy-label figcaption { font-size: var(--fs-xs); color: var(--muted); max-width: 40ch; }

.dpe-list { display: grid; gap: var(--sp-3); align-content: start; min-width: 0; }
.dpe-list ul { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.dpe-item { display: grid; grid-template-columns: 40px 1fr; gap: var(--sp-3); align-items: start; }
.has-label .dpe-item { grid-template-columns: 1fr; }
.has-label .dpe-item .dpe-class { display: none; }
/* Le DPE retenu, mis en avant ; les autres repliés et plus discrets */
.dpe-item.is-main {
  gap: var(--sp-1);
  padding: var(--sp-4);
  background: var(--render);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.dpe-item.is-main .dpe-main { font-size: var(--fs-md); }
.dpe-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: light-dark(#166534, var(--success));
}
.dpe-others > summary { font-size: var(--fs-sm); color: var(--ink-2); }
.dpe-others ul { padding-left: 20px; }
.dpe-others .dpe-main { font-weight: 400; color: var(--ink-2); }
.dpe-class,
.dpe-chip {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 600;
  color: #16181d;
}
.dpe-class { width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: var(--fs-xl); }
.dpe-chip { width: 22px; height: 22px; border-radius: 4px; font-size: 13px; }
/* Couleurs réglementaires de l'étiquette énergie */
.dpe-a { --dpe: #009c6d; }
.dpe-b { --dpe: #52b153; }
.dpe-c { --dpe: #78bd76; }
.dpe-d { --dpe: #f4e70f; }
.dpe-e { --dpe: #f0b40f; }
.dpe-f { --dpe: #eb8235; }
.dpe-g { --dpe: #d7221f; color: #fff; }
.dpe-a, .dpe-b, .dpe-c, .dpe-d, .dpe-e, .dpe-f, .dpe-g { background: var(--dpe); }
.dpe-main { font-weight: 500; }
.dpe-sub { font-size: var(--fs-sm); color: var(--muted); }

/* Travaux */
.works-total { display: flex; align-items: baseline; gap: var(--sp-4); flex-wrap: wrap; }
.works-total-figure {
  font-family: var(--display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.works-total-text { max-width: 44ch; color: var(--ink-2); }
.works-compare { color: var(--ink-2); max-width: 72ch; }
.works-list { display: grid; border-top: 1px solid var(--line); }
.works-list li {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--sp-5);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.works-name { font-weight: 500; }
.works-reason { font-size: var(--fs-sm); color: var(--muted); max-width: 64ch; }
.works-cost { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 500; }
.works-list-quiet .works-name,
.works-list-quiet .works-cost { color: var(--ink-2); font-weight: 400; }
/* Fourchette de chaque poste sur une échelle commune : on voit d'un coup d'œil ce qui pèse */
.works-figure { display: grid; justify-items: end; gap: 6px; flex: none; }
.works-bar {
  position: relative;
  width: 160px;
  height: 6px;
  background: var(--line);
  border-radius: var(--radius-pill);
}
.works-bar::after {
  content: "";
  position: absolute;
  inset-block: 0;
  left: var(--lo);
  width: max(6px, calc(var(--hi) - var(--lo)));
  background: var(--ink-2);
  border-radius: var(--radius-pill);
}
.works-list-quiet .works-bar::after { background: var(--line-hover); }
@media (max-width: 560px) {
  .works-list li { flex-direction: column; gap: var(--sp-2); }
  .works-figure { justify-items: start; }
}
.works-ok {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--success-soft);
  border-radius: var(--radius);
  color: var(--ink);
}
.works-ok .icon { flex: none; color: var(--success); }

/* Risques */
.risk-list { display: grid; border-top: 1px solid var(--line); }
.risk-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.risk-status { color: var(--ink-2); font-size: var(--fs-sm); text-align: right; }
/* À l'adresse : nom, statut Géorisques, niveau ; du plus important au moins renseigné */
.risk-list-address li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 96px;
  align-items: center;
  column-gap: var(--sp-4);
}
.risk-list-address .risk-name { font-weight: 500; }
.risk-level {
  justify-self: end;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}
.risk-high .risk-level { background: var(--danger-soft); color: var(--danger); }
.risk-medium .risk-level { background: var(--warning-soft); color: var(--warning); }
.risk-low .risk-level { background: var(--paper); color: var(--ink-2); }
.risk-unknown .risk-level { border: 1px dashed var(--line-hover); color: var(--muted); }
.risk-high .risk-name { font-weight: 600; }
.risk-unknown .risk-name { font-weight: 400; color: var(--ink-2); }
@media (max-width: 560px) {
  .risk-list-address li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .risk-list-address .risk-status { grid-column: 1; grid-row: 2; text-align: left; }
  .risk-list-address .risk-level { grid-column: 2; grid-row: 1 / span 2; }
}
.risk-list-quiet .risk-name { color: var(--ink-2); }
.risk-list-quiet .risk-status { color: var(--muted); }
.report-section > .annex > summary { font-weight: 500; }

/* Négociation : la partie que l'acheteur paie, posée sur un fond bleu pâle
   (le bleu dit « bon pour l'acheteur »), le reste du rapport y mène */
.report-section.negotiation {
  padding: var(--sp-6);
  background: var(--sky-soft);
  border-radius: var(--radius-lg);
}
@media (max-width: 640px) { .report-section.negotiation { padding: var(--sp-4); margin-inline: calc(var(--sp-2) * -1); } }
.negotiation > .muted { color: var(--ink-2); }
.offer {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.offer-main {
  display: grid;
  gap: var(--sp-1);
  align-content: center;
  padding: var(--sp-5);
  border-right: 1px solid var(--line);
}
.offer-label { font-size: var(--fs-sm); color: var(--muted); }
.offer-figure {
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--sky-deep);
  font-variant-numeric: tabular-nums;
}
.offer-sub { font-size: var(--fs-sm); color: var(--ink-2); }
.offer-steps { display: grid; align-content: center; margin: 0; padding: var(--sp-2) var(--sp-5); }
.offer-steps > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--sp-4);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.offer-steps > div:last-child { border-bottom: 0; }
.offer-steps dt { font-size: var(--fs-sm); color: var(--muted); }
.offer-steps dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.offer-steps .offer-note { grid-column: 1 / -1; text-align: left; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
@media (max-width: 640px) {
  .offer { grid-template-columns: 1fr; }
  .offer-main { border-right: 0; border-bottom: 1px solid var(--line); }
}

.offer-none { grid-template-columns: auto minmax(0, 1fr); }
.offer-none .offer-figure { color: var(--ink); }
.offer-explain { align-self: center; padding: var(--sp-4) var(--sp-5); color: var(--ink-2); }
@media (max-width: 640px) { .offer-none { grid-template-columns: 1fr; } }

/* Arguments : une carte chacun, numérotés comme dans le message */
.arguments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.argument {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: var(--sp-3);
  row-gap: var(--sp-1);
  align-content: start;
  padding: var(--sp-4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.argument > :not(.argument-num) { grid-column: 2; }
.argument-num {
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--sky-deep);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.argument-title { font-weight: 600; }
.argument-detail { color: var(--ink-2); }
.argument-advice { font-size: var(--fs-sm); color: var(--muted); }

/* Message à l'agent : présenté comme une lettre, prête à copier */
.message { display: grid; gap: var(--sp-3); }
.message-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.message-head h3 { margin: 0; }
.letter {
  padding: var(--sp-5) var(--sp-6) var(--sp-4);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.letter-head {
  display: grid;
  gap: 2px;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px dashed var(--line-strong);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.message-body {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-md);
  line-height: 1.7;
  resize: vertical;
}
.message-body:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; border-radius: 4px; }
@media (max-width: 640px) { .letter { padding: var(--sp-4); } }

/* Annexes : terrain et sources, repliées */
.annexes { display: grid; border-top: 1px solid var(--line); }
.annex-section { border-bottom: 1px solid var(--line); }
.annex-section > summary { padding-block: var(--sp-4); }
.annex-title { font-family: var(--display); font-size: var(--fs-lg); font-weight: 600; line-height: 1.1; color: var(--ink); }
.annex-body { display: grid; gap: var(--sp-4); padding: 0 0 var(--sp-5) 20px; }
.annex-body h3 { font-size: var(--fs-md); font-family: var(--body); font-weight: 600; letter-spacing: 0; }
.annex-body a { color: var(--sky-deep); }
.report-sources .annex-body { color: var(--muted); font-size: var(--fs-sm); max-width: 72ch; }

/* --------------------------------------------------------------------------
   Paiement
   -------------------------------------------------------------------------- */
.paywall {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
  gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-6);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.paywall-text { display: grid; gap: var(--sp-4); }
.paywall-text h2 { font-size: var(--fs-xl); }
.paywall-list { display: grid; gap: var(--sp-3); }
.paywall-list li { display: grid; grid-template-columns: 20px 1fr; gap: var(--sp-3); color: var(--ink-2); }
.paywall-list .icon { margin-top: 3px; color: var(--muted); }
.paywall-buy {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--paper);
  border-radius: var(--radius);
  text-align: center;
}
.paywall-price {
  font-family: var(--display);
  font-size: var(--fs-3xl);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.paywall-price-sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--sp-2); }
.paywall-note { font-size: var(--fs-xs); color: var(--muted); }
.paywall-note a { color: inherit; text-decoration: underline; }
.paywall-consent { display: flex; gap: var(--sp-2); align-items: flex-start; text-align: left; font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.paywall-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--sky-deep); }

/* Méthode et questions fréquentes */
.guide { max-width: 76ch; padding-block: var(--sp-7) var(--sp-8); display: grid; gap: var(--sp-7); }
.guide-head { display: grid; gap: var(--sp-3); }
.guide-head h1 { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.guide section { display: grid; gap: var(--sp-3); scroll-margin-top: var(--sp-5); }
.guide h2 { font-size: var(--fs-xl); letter-spacing: -0.01em; }
.guide p, .guide li { color: var(--ink-2); line-height: 1.65; }
.guide ul { display: grid; gap: var(--sp-2); padding-left: 1.2em; margin: 0; }
.guide a { color: var(--sky-deep); }
.guide-toc { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); padding-block: var(--sp-3); border-block: 1px solid var(--line); font-size: var(--fs-sm); }
.guide-table td, .guide-table th { font-size: var(--fs-sm); vertical-align: top; }
.guide-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.faq { display: grid; }
.faq-item { padding-block: var(--sp-5); border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h2 { font-size: var(--fs-lg); }
.guide-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-5); background: var(--render); border-radius: var(--radius-lg); }
.guide-cta p { margin: 0; font-weight: 500; color: var(--ink); }
.limits-links { font-size: var(--fs-sm); }
.limits-links a { color: var(--sky-deep); }

/* Retrouver mes rapports */
.recovery-form { display: grid; gap: var(--sp-4); max-width: 440px; margin-block: var(--sp-6); }
.recovery-form .btn { justify-self: start; }

/* Pages légales */
.legal { max-width: 76ch; padding-block: var(--sp-7) var(--sp-8); display: grid; gap: var(--sp-6); }
.legal-head { display: grid; gap: var(--sp-2); }
.legal-head h1 { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.legal-updated { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.legal section { display: grid; gap: var(--sp-3); }
.legal h2 { font-size: var(--fs-lg); }
.legal p, .legal li { color: var(--ink-2); line-height: 1.65; }
.legal ul { display: grid; gap: var(--sp-2); padding-left: 1.2em; margin: 0; }
.legal a { color: var(--sky-deep); }
.legal-table td, .legal-table th { vertical-align: top; font-size: var(--fs-sm); }
.legal-todo { background: var(--warning-soft); color: var(--warning); padding: 0 4px; border-radius: 4px; font-weight: 500; }
.legal-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.footer-credit { margin: 0 0 0 auto; }
.footer-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-credit a:hover { color: var(--ink); }
.footer-heart { color: var(--brick); }
.footer-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-links a:hover { color: var(--ink); }
@media (max-width: 760px) { .paywall { grid-template-columns: 1fr; padding: var(--sp-5); } }

/* ——— Impression et PDF (Gotenberg rend le rapport en média « print ») ——— */
@page { size: A4; margin: 16mm 14mm 18mm; }
@media print {
  html { font-size: 13px; }
  body { background: #fff; }
  .navbar, .site-footer, .flash, .report-toc, .report-actions, .report-edit, .theme-toggle { display: none !important; }
  .container { max-width: none; padding-inline: 0; }
  .report-layout { display: block; padding-block: 0; }
  /* Chromium coupe mal une grille d'une page à l'autre (le bas d'un tableau passe sous la
     section suivante) : les conteneurs longs repassent en flux normal, l'espacement en marges. */
  .report, .report-section { display: block; }
  .report > * + * { margin-top: var(--sp-7); }
  .report-section > * + * { margin-top: var(--sp-4); }

  /* Page de garde (titre et sommaire), puis une partie par page : chacune commence en haut
     d'une page et prend celles qu'il lui faut. */
  .report-head { gap: var(--sp-3); padding-top: 2mm; }
  .report-head h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; max-width: 20ch; }
  .report-section { break-before: page; margin-top: 0 !important; }
  /* Terrain et sources, courts tous les deux, partagent la dernière page. */
  .annexes { display: block; break-before: page; margin-top: 0 !important; border-top: 0; }
  .annex-section { border-bottom: 0; }
  .annex-section > summary { padding-top: 0; }
  .annex-section ~ .annex-section { margin-top: var(--sp-7); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
  .annex-title { font-size: var(--fs-xl); letter-spacing: -0.01em; }

  /* Les fonds portent du sens (barres, réglette, étiquettes DPE) : on les garde. */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Pas de bloc coupé en deux quand il tient sur une page. */
  .report-head, .verdict, .brief, .price-scale, .alert, .argument-list > li, .message, .annex-body, .gap-table tr { break-inside: avoid; }
  h2, h3 { break-after: avoid; }

  /* Tout ce qui se replie s'affiche ouvert, sans flèche. */
  .annex > summary { cursor: auto; }
  .annex > summary::before { display: none; }

  .message-print { white-space: pre-wrap; font-size: var(--fs-sm); }
  .section-card, .letter { box-shadow: none; }
  .section-card { display: block; }
  .section-card > * + * { margin-top: var(--sp-4); }
  .report-section.negotiation { padding: var(--sp-5); }
  .argument, .dpe-item.is-main, .risk-list li, .works-list li, .offer { break-inside: avoid; }
  .table-wrap { overflow: visible; }
  /* Ventes comparées : sur la largeur d'une page A4, la colonne de l'adresse prend la place
     de la barre, pour qu'une vente tienne sur deux lignes et le tableau sur une page. */
  .gap-table th,
  .gap-table td { padding: 8px 10px; }
  .gap-table td:first-child { width: 44%; min-width: 0; }
  .gap-col { width: 20%; min-width: 0; }
  .gap-dir { font-size: 10px; }
  .gap-table th:last-child { width: 6.5em; }
  a { color: inherit; text-decoration: none; }
  .shadow, .card, .preview-card { box-shadow: none !important; }
}

/* Logo en tête de la page de garde du PDF */
.pdf-brand { display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 14mm; font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--ink); }
.pdf-brand img { display: block; }

/* Sommaire de la page de garde du PDF (rendu seulement pour Gotenberg) */
.pdf-toc { margin-top: 22mm; }
.pdf-toc h2 { font-size: var(--fs-lg); margin-bottom: var(--sp-3); }
.pdf-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: part; border-top: 1px solid var(--line-strong); }
.pdf-toc li { counter-increment: part; border-bottom: 1px solid var(--line); }
.pdf-toc a { display: grid; grid-template-columns: 2.25em 1fr; column-gap: var(--sp-2); padding-block: var(--sp-3); color: inherit; text-decoration: none; }
.pdf-toc a::before { content: counter(part); grid-row: span 2; font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); padding-top: 2px; }
.pdf-toc-title { font-weight: 600; }
.pdf-toc-about { font-size: var(--fs-sm); color: var(--muted); }
