/* « Se loger » — les prix réels et l'état du parc.
   Aucune couleur hors des jetons de site.css. Les étiquettes énergie sont
   REDESSINÉES : le vert et le rouge de l'affiche réglementaire n'existent pas
   dans ce journal. Ici l'encre s'épaissit de A vers E, puis le vermillon —
   l'accent unique — marque exactement ce que la loi frappe : F et G. */

/* ── l'ouverture chiffrée ── */
.lg-tete {
  border: 1px solid var(--ink);
  background: var(--paper-hi);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.lg-tete > div { padding: 20px 20px 18px; border-right: 1px solid var(--line); }
.lg-tete > div:last-child { border-right: 0; }
.lg-tete .k {
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
}
.lg-tete .v {
  font-family: var(--display);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 500;
  line-height: 1.02;
  display: block;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 14;
}
.lg-tete .v .u { font-family: var(--text); font-size: .42em; font-weight: 400; }
.lg-tete .s { font-size: 13.5px; color: var(--ink-soft); display: block; margin-top: 7px; line-height: 1.5; }
.lg-tete .lg-alerte { color: var(--wax); }
@media (max-width: 820px) { .lg-tete { grid-template-columns: 1fr; } .lg-tete > div { border-right: 0; border-bottom: 1px solid var(--line); } .lg-tete > div:last-child { border-bottom: 0; } }

/* le cartouche qui dit sur combien de ventes le prix repose */
.lg-fiabilite {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  margin-top: 12px;
}
.lg-fiabilite.mince { border-color: var(--wax); color: var(--wax); }

/* ── la courbe des prix : deux séries, maison et appartement ── */
.lg-courbe { width: 100%; height: auto; display: block; margin-top: 4px; }
.lg-courbe .axe { stroke: var(--line); stroke-width: 1; }
.lg-courbe .grille { stroke: var(--line-soft); stroke-width: 1; }
.lg-courbe .serie { fill: none; stroke: var(--navy); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.lg-courbe .serie.appart { stroke-dasharray: 5 4; }
.lg-courbe .pt { fill: var(--paper-hi); stroke: var(--navy); stroke-width: 1.8; }
.lg-courbe .pt.dernier { fill: var(--wax); stroke: var(--wax); }
.lg-courbe text { font-family: var(--ui); font-size: 11px; fill: var(--muted); }
.lg-courbe text.val { font-family: var(--data); font-size: 13px; font-weight: 600; fill: var(--ink); }

.lg-legende { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; font-family: var(--ui); font-size: 12.5px; color: var(--muted); }
.lg-legende span { display: inline-flex; align-items: center; gap: 8px; }
.lg-legende i { width: 22px; height: 0; border-top: 2px solid var(--navy); display: inline-block; }
.lg-legende i.appart { border-top-style: dashed; }

/* ── le classement dans le voisinage ── */
.lg-rang { list-style: none; margin: 0; padding: 0; }
.lg-rang li {
  display: grid;
  grid-template-columns: 26px 1fr 96px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.lg-rang li:last-child { border-bottom: 0; }
.lg-rang .no { font-family: var(--ui); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lg-rang .nom { font-size: 15px; min-width: 0; }
.lg-rang .nom span { display: block; font-family: var(--ui); font-size: 11.5px; color: var(--muted); }
.lg-rang .px { font-family: var(--data); font-size: 16px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-rang .px .u { font-family: var(--text); font-size: .72em; font-weight: 400; }
.lg-rang .jauge { grid-column: 2 / 4; height: 5px; background: var(--paper-deep); margin-top: -3px; }
.lg-rang .jauge i { display: block; height: 100%; background: var(--navy); opacity: .38; }
/* La ligne de la commune se distingue par le fond, le filet vermillon et sa
   jauge — pas par un texte rouge sur fond crème, qui tombe sous le rapport de
   contraste exigé pour un corps de 16 px. */
.lg-rang li.ici {
  background: var(--paper-deep);
  margin-inline: -10px;
  padding-inline: 8px 10px;
  border-left: 2px solid var(--wax);
}
.lg-rang li.ici .nom, .lg-rang li.ici .px { font-weight: 600; color: var(--ink); }
.lg-rang li.ici .no { color: var(--ink-soft); }
.lg-rang li.ici .jauge { background: var(--paper-hi); }
.lg-rang li.ici .jauge i { background: var(--wax); opacity: 1; }
/* Sur un téléphone, « 25 582 € » ne tient pas dans 80 px : la colonne des prix
   se règle sur son contenu le plus long, pas sur le plus court. */
@media (max-width: 480px) {
  .lg-rang li { grid-template-columns: 20px 1fr 94px; gap: 9px; }
  .lg-rang .px { font-size: 15px; }
  .lg-rang li.ici { margin-inline: -8px; padding-inline: 6px 8px; }
}

/* ── la barre du parc ── */
.lg-barre { display: flex; height: 34px; border: 1px solid var(--ink); margin-top: 4px; }
.lg-barre i { display: block; height: 100%; border-right: 1px solid var(--paper-hi); }
.lg-barre i:last-child { border-right: 0; }
.lg-barre i.p1 { background: var(--navy); }
.lg-barre i.p2 { background: var(--wax); }
.lg-barre i.p3 { background: var(--navy); opacity: .22; }
.lg-barre.fine { height: 16px; }
.lg-barre.fine i.p1 { background: var(--navy); opacity: .58; }
.lg-barre.fine i.p2 { background: var(--navy); opacity: .26; }
.lg-barre.fine i.p3 { background: var(--navy); opacity: .1; }

.lg-cles { list-style: none; margin: 12px 0 0; padding: 0; }
.lg-cles li { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.lg-cles li:last-child { border-bottom: 0; }
.lg-cles .pastille { width: 12px; height: 12px; display: block; transform: translateY(1px); }
.lg-cles .pastille.p1 { background: var(--navy); }
.lg-cles .pastille.p2 { background: var(--wax); }
.lg-cles .pastille.p3 { background: var(--navy); opacity: .22; }
.lg-cles .l { font-size: 15px; }
.lg-cles .n { font-family: var(--data); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-cles .pc { font-family: var(--ui); font-size: 12.5px; color: var(--muted); width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

/* ── l'étiquette énergie, redessinée ──
   Sept lignes, la lettre à gauche, l'encre qui s'épaissit, le vermillon pour
   les deux classes que la loi vise. Un tableau : les chiffres sont lus par les
   lecteurs d'écran comme ils sont lus par l'œil. */
.lg-etiquette { width: 100%; border-collapse: collapse; min-width: 0; }
.lg-etiquette caption {
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding-bottom: 10px;
}
.lg-etiquette th { border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
.lg-etiquette td { padding: 5px 0; border-bottom: 0; vertical-align: middle; }
.lg-etiquette tr + tr td { border-top: 1px solid var(--line-soft); }
.lg-etiquette .lettre {
  width: 34px;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 0;
}
.lg-etiquette .lettre b {
  display: inline-block;
  width: 26px;
  line-height: 26px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600;
}
.lg-etiquette .rail { padding-left: 12px; padding-right: 12px; }
.lg-etiquette .rail i { display: block; height: 13px; min-width: 1px; background: var(--navy); }
.lg-etiquette .n { width: 68px; text-align: right; font-family: var(--data); font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lg-etiquette .pc { width: 54px; text-align: right; font-family: var(--ui); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lg-etiquette tr.visee .lettre b { border-color: var(--wax); background: var(--wax); color: var(--paper-hi); }
.lg-etiquette tr.visee .rail i { background: var(--wax); opacity: 1; }
.lg-etiquette tr.visee .n { color: var(--wax); }
.lg-etiquette tr.seuil td { border-top: 1px solid var(--wax); padding-top: 9px; }

.lg-seuil-dit {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wax);
  margin: 10px 0 0;
  max-width: none;
}

/* ── le calendrier de la loi ── */
.lg-calendrier { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.lg-calendrier li { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.lg-calendrier .quand { font-family: var(--ui); font-size: 12.5px; letter-spacing: .05em; color: var(--muted); }
.lg-calendrier li.passe .quand { color: var(--wax); }
.lg-calendrier .quoi { font-size: 15.5px; }
.lg-calendrier .quoi b { font-weight: 600; }
@media (max-width: 520px) { .lg-calendrier li { grid-template-columns: 1fr; gap: 2px; } }

/* ── le croisement âge du bâti / passoires ── */
.lg-ages { list-style: none; margin: 0; padding: 0; }
.lg-ages li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.lg-ages li:last-child { border-bottom: 0; }
.lg-ages .l { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 5px; }
.lg-ages .l span { font-family: var(--ui); font-size: 13px; color: var(--ink-soft); }
.lg-ages .l b { font-family: var(--data); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-ages .l b .u { font-family: var(--text); font-size: .7em; font-weight: 400; }
.lg-ages .rail { height: 9px; background: var(--paper-deep); }
.lg-ages .rail i { display: block; height: 100%; background: var(--wax); }

/* ── la lecture finale ── */
.lg-lecture {
  border-left: 2px solid var(--wax);
  padding: 4px 0 4px 20px;
  margin-top: 26px;
}
.lg-lecture p { font-family: var(--text); font-size: 18px; line-height: 1.62; margin: 0; max-width: 62ch; }
.lg-lecture p + p { margin-top: 12px; }
.lg-lecture b { font-weight: 600; }

/* ── le chiffre mis en exergue au milieu d'un encart ── */
.lg-exergue {
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.08;
  margin: 2px 0 8px;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 14;
  max-width: none;
}
.lg-exergue .u { font-family: var(--text); font-size: .5em; }
.lg-exergue em { font-style: normal; color: var(--wax); }

.lg-vide { font-family: var(--ui); font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0; max-width: 70ch; }

/* ── réglages ajoutés après relecture du rendu ── */
.lg-suite { margin-top: 26px; }

/* un texte que seul un lecteur d'écran doit entendre : l'en-tête de la colonne
   qui ne porte qu'une barre */
.lg-hors-ecran {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lg-cles .l .sous { display: block; font-family: var(--ui); font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* le saut dans un classement : on le montre, on ne le cache pas */
.lg-rang li.trou { padding: 2px 0; border-bottom: 1px dashed var(--line); }
.lg-rang li.trou .no { text-align: center; letter-spacing: .1em; }
.lg-rang li.trou .nom { font-family: var(--ui); font-size: 11.5px; color: var(--muted); font-style: normal; }

/* l'exergue porte un exposant : il ne doit pas soulever la ligne */
.lg-exergue sup { font-size: .5em; vertical-align: super; line-height: 0; }
.lg-calendrier sup, .lg-vide sup, .note sup { font-size: .72em; vertical-align: super; line-height: 0; }

/* Deux encarts de hauteurs très différentes ne se rattrapent pas : le plus
   court garderait six cents pixels de vide sous son dernier chiffre. */
.lg-duo { align-items: start; }
.lg-duo .note:first-child { margin-top: 0; }

/* les listes de règles : des puces sobres, pas des cartes */
.lg-puces { list-style: none; margin: 0; padding: 0; }
.lg-puces li {
  position: relative;
  padding: 8px 0 8px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  line-height: 1.55;
}
.lg-puces li:last-child { border-bottom: 0; }
.lg-puces li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 7px;
  height: 1px;
  background: var(--wax);
}
.lg-puces li b { font-weight: 600; }

.lg-pile { display: grid; gap: 26px; align-content: start; min-width: 0; }

/* Le croisement âge / type vit désormais dans une demi-colonne : une grille
   qui s'adapte à SON conteneur, pas à la largeur de la fenêtre. */
.lg-croise { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 10px 34px; }
.lg-croise > div { min-width: 0; }
.lg-croise > div + div { margin-top: 6px; }
