/* Fiche Adresse – feuille de style */
/* Polices hébergées sur le site (Inter et Space Grotesk, licence OFL 1.1) : aucune requête vers Google Fonts */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(polices/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(polices/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url(polices/space-grotesk-latin-600-normal.woff2) format('woff2'); }
:root {
  --fond: #F3F5F8; --texte: #16202B; --doux: #4A5663; --tres-doux: #3C4753;
  --bleu: #1D4F91; --bleu-fonce: #123562; --nuit: #0E2442; --bleu-pale: #E6EDF6; --bleu-moyen: #8FA9CB;
  --cuivre: #B8562A; --cuivre-pale: #FBEFE7;
  --bord: #E1E6EC; --filet: #EBEEF2; --gris: #AEB7C2; --blanc: #FFFFFF;
  --vert-fond: #E6F0E9; --vert-bord: #6FA583; --vert-texte: #173F27;
  --ombre: 0 1px 2px rgba(14, 36, 66, .05), 0 6px 20px rgba(14, 36, 66, .06);
  --ombre-forte: 0 2px 4px rgba(14, 36, 66, .06), 0 14px 32px rgba(14, 36, 66, .12);
  --rayon: 16px;
  --titre: 'Space Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; color: var(--texte); font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.55;
  background: var(--fond) linear-gradient(180deg, #E9EEF5 0, var(--fond) 420px) no-repeat;
  -webkit-font-smoothing: antialiased; }
a { color: var(--bleu); text-underline-offset: 2px; } a:hover { color: var(--bleu-fonce); }
:focus-visible { outline: 3px solid #6E9BD6; outline-offset: 2px; border-radius: 4px; }
h1, h2 { font-family: var(--titre); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 42px; line-height: 1.1; }
h2 { font-size: 21px; line-height: 1.25; }
p { margin: 0; }
.doux { color: var(--doux); }
.petit { font-size: 14px; }

/* En-tête du site */
.entete { background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--bord); }
.entete .interieur { max-width: 1440px; margin: 0 auto; padding: 14px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--nuit); min-height: 44px; font-family: var(--titre); font-weight: 600; font-size: 20px; }
.logo svg { width: 34px; height: 34px; padding: 6px; border-radius: 10px; stroke: #fff;
  background: linear-gradient(135deg, var(--bleu), var(--nuit)); box-shadow: 0 2px 6px rgba(29, 79, 145, .35); }
.logo:hover { color: var(--bleu); }
.recherche { flex: 1 1 320px; min-width: 0; display: flex; gap: 8px; margin: 0; max-width: 760px; margin-left: auto; }
.recherche input { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 16px;
  border: 1px solid #C9D1DB; border-radius: 12px; font: inherit; color: var(--texte); background: #F8FAFC;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.recherche input:focus { outline: none; border-color: var(--bleu); background: var(--blanc);
  box-shadow: 0 0 0 4px rgba(29, 79, 145, .14); }
.recherche button { height: 46px; padding: 0 22px; border: 0; border-radius: 12px;
  background: var(--bleu); color: var(--blanc); font: inherit; font-weight: 600; cursor: pointer;
  transition: background .15s; }
.recherche button:hover { background: var(--bleu-fonce); }
.masque { position: absolute; left: -9999px; }

main { max-width: 1440px; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 24px; }

/* Bandeau de provenance (ancien gabarit) */
.bandeau { background: var(--vert-fond); border: 1px solid var(--vert-bord); border-radius: 12px;
  padding: 10px 16px; color: var(--vert-texte); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.bandeau svg { flex: 0 0 auto; margin-top: 1px; }

/* En-tête de page : panneau en dégradé, silhouette de toits */
.identite { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px;
  padding: 32px 36px; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #2C66AD 0%, transparent 55%),
              linear-gradient(135deg, var(--nuit) 0%, var(--bleu-fonce) 45%, var(--bleu) 100%);
  box-shadow: var(--ombre-forte); }
.identite::after { content: ""; position: absolute; right: 0; bottom: 0; width: min(620px, 70%); height: 124px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 120' preserveAspectRatio='xMaxYMax meet'%3E%3Cpath fill='white' d='M0 120V86h40V64l22-18 22 18v22h26V52h12V36l18-16 18 16v16h12v68h20V74l30-26 30 26v46h22V58h14V30l8-14 8 14v28h14v62h24V80l26-22 26 22v40h18V44h10V24l14-18 14 18v20h10v76h22V70l20-16 20 16v50h24V90h30v30z'/%3E%3C/svg%3E") right bottom / contain no-repeat; opacity: .07; pointer-events: none; }
.identite > * { position: relative; z-index: 1; }
.identite .doux, .identite nav, .identite nav a { color: rgba(255, 255, 255, .82); }
.identite nav a:hover { color: #fff; }
.identite a { color: #fff; }
.identite h1 { max-width: 22ch; text-wrap: balance; }
.surtitre { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #F2C3A6; }
.provenance { font-size: 13px; color: rgba(255, 255, 255, .78); margin-top: 4px; }
.provenance svg { color: #9FD3B0; vertical-align: -3px; margin-right: 6px; }
.identite:has(+ .chiffres), .identite:has(+ [hidden] + .chiffres) { padding-bottom: 84px; }
.identite + .chiffres, .identite + [hidden] + .chiffres { margin-top: -80px; padding: 0 20px; position: relative; z-index: 2; }

.etiquettes { display: flex; flex-wrap: wrap; gap: 8px; }
.etiquette { background: var(--bleu-pale); color: var(--bleu-fonce); border-radius: 999px;
  padding: 4px 12px; font-size: 14px; font-weight: 500; }
.identite .etiquette { background: rgba(255, 255, 255, .13); color: #fff; border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(4px); }
.etiquette.neutre { background: #EDEFF2; color: var(--tres-doux); align-self: flex-start; }
.identite .etiquette-patrimoine, .etiquette-patrimoine { background: #F6E7D3; color: #6B4A12; border-color: #F6E7D3; }

/* Chiffres clés */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.chiffre { background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--ombre); }
.chiffre .libelle { font-size: 13px; font-weight: 600; color: var(--doux); text-transform: uppercase; letter-spacing: .04em; }
.chiffre .valeur { font-family: var(--titre); font-weight: 600; font-size: 28px; line-height: 1.2; color: var(--nuit);
  font-variant-numeric: tabular-nums; }
.chiffre .note { font-size: 14px; color: var(--doux); }
.chiffre.principal { position: relative; overflow: hidden; }
.chiffre.principal::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--cuivre); }
.chiffre.principal .valeur { font-size: 36px; line-height: 1.1; color: var(--bleu); }
a.lien-carte { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.lien-carte:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); border-color: var(--bleu-moyen); }

/* Sommaire collant */
.sommaire { position: sticky; top: 0; z-index: 900; margin: 0 -24px; padding: 10px 24px;
  background: rgba(243, 245, 248, .94); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.sommaire-defile { position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.sommaire-defile::-webkit-scrollbar { display: none; }
.sommaire a { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--tres-doux); text-decoration: none; background: var(--blanc); border: 1px solid var(--bord);
  transition: background .15s, color .15s, border-color .15s; }
.sommaire a:hover { color: var(--bleu); border-color: var(--bleu-moyen); background: var(--bleu-pale); }
.sommaire a.actif { color: #fff; background: var(--bleu); border-color: var(--bleu); }
/* Flèches aux bords quand d'autres pastilles sont cachées (boutons et classes posés par recherche.js) */
.sommaire-fleche { position: absolute; top: 0; bottom: 0; z-index: 1; display: none; align-items: center;
  width: 56px; padding: 0; border: 0; cursor: pointer; color: var(--bleu); font: 600 22px/1 inherit; }
.sommaire-fleche span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--blanc); border: 1px solid var(--bord); box-shadow: 0 1px 4px rgba(16, 24, 40, .12); }
.sommaire-fleche.gauche { left: 0; padding-left: 10px; justify-content: flex-start;
  background: linear-gradient(to right, rgb(243, 245, 248) 55%, rgba(243, 245, 248, 0)); }
.sommaire-fleche.droite { right: 0; padding-right: 10px; justify-content: flex-end;
  background: linear-gradient(to left, rgb(243, 245, 248) 55%, rgba(243, 245, 248, 0)); }
.sommaire.suite-gauche .sommaire-fleche.gauche, .sommaire.suite-droite .sommaire-fleche.droite { display: flex; }

/* Cartes de section */
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; grid-auto-flow: row dense; }
@media (max-width: 860px) { .grille { grid-template-columns: minmax(0, 1fr); } }
.carte { background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 26px 28px;
  display: flex; flex-direction: column; gap: 16px; min-width: 0; box-shadow: var(--ombre); scroll-margin-top: 72px; }
.carte.large { grid-column: 1 / -1; }
.carte > h2 { display: flex; align-items: center; gap: 12px; color: var(--nuit); }
.carte[id] > h2::before, .repliable summary h2::before { content: ""; flex: none; width: 36px; height: 36px; border-radius: 11px;
  background: var(--bleu-pale) center / 20px no-repeat; }
#en-bref > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5h.01'/%3E%3C/svg%3E"); }
#evolution > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20h18M6 20V11M11 20V5M16 20v-6'/%3E%3C/svg%3E"); }
#caracteristiques > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1.5'/%3E%3Cpath d='M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2'/%3E%3C/svg%3E"); }
#comparaison > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l3-7 4 14 3-7h4'/%3E%3C/svg%3E"); }
#voisins > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 11l5-4 5 4v9H2zM12 13l5-4 5 4v7H12'/%3E%3C/svg%3E"); }
#taxes > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h12v20l-3-2-3 2-3-2-3 2zM9 7h6M9 11h6M9 15h4'/%3E%3C/svg%3E"); }
#risques > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E"); }
#emplacement > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-6.5 7-12a7 7 0 0 0-14 0c0 5.5 7 12 7 12z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E"); }
#autobus > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='15' rx='3'/%3E%3Cpath d='M4 11h16M8 21v-3M16 21v-3M8 14.5h.01M16 14.5h.01'/%3E%3C/svg%3E"); }
#proximite > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22v-5M6 17h12L12 3z'/%3E%3C/svg%3E"); }
#urgence > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
#internet > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a15 15 0 0 1 20 0'/%3E%3Cpath d='M5 12.5a10 10 0 0 1 14 0'/%3E%3Cpath d='M8.5 16a5 5 0 0 1 7 0'/%3E%3Ccircle cx='12' cy='19.5' r='1'/%3E%3C/svg%3E"); }
#ecoles > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9l10-5 10 5-10 5zM6 11v5c3 2 9 2 12 0v-5'/%3E%3C/svg%3E"); }
#patrimoine > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V10M19 21V10M9.7 21V10M14.3 21V10M2 10l10-7 10 7z'/%3E%3C/svg%3E"); }
#permis > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='18' rx='2'/%3E%3Cpath d='M9 4V2h6v2M9 11h6M9 15h4'/%3E%3C/svg%3E"); }
#sources summary h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3'/%3E%3Cpath d='M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3'/%3E%3C/svg%3E"); }

.resume { background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFD 100%); }
.resume p { font-size: 17px; }
.resume p + p { margin-top: 8px; }
.constats { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.constats li { position: relative; padding: 12px 14px 12px 40px; background: var(--fond); border-radius: 12px; font-size: 15px; }
.constats li::before { content: ""; position: absolute; left: 14px; top: 16px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bleu-pale); box-shadow: inset 0 0 0 4px var(--bleu); }

dl.caract { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 16px; }
dl.caract dt, dl.caract dd { padding: 11px 0; border-bottom: 1px solid var(--filet); }
dl.caract dt { color: var(--doux); }
dl.caract dd { margin: 0; font-weight: 600; text-align: right; color: var(--nuit); }
dl.caract dt:last-of-type, dl.caract dd:last-of-type { border-bottom: 0; }

/* Tableaux */
.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--filet); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { border-bottom: 1px solid var(--bord); font-size: 12px; font-weight: 600; color: var(--doux);
  text-transform: uppercase; letter-spacing: .05em; padding-top: 4px; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: #F7F9FC; }
td.nombre, th.nombre { text-align: right; white-space: nowrap; }
td.ici, th.ici { font-weight: 600; background: var(--bleu-pale); }
tr.ici td, tbody tr.ici:hover td { font-weight: 600; background: var(--bleu-pale); }
tbody tr:last-child td { border-bottom: 0; }
.effectif { display: block; font-weight: 400; font-size: 13px; color: var(--doux); }
td a { font-weight: 500; }

/* Risques, encadrés */
.risque { display: flex; gap: 12px; align-items: flex-start; color: var(--bleu); }
.risque svg { flex: 0 0 auto; margin-top: 2px; }
.risque > div { display: flex; flex-direction: column; gap: 4px; color: var(--texte); }
.separe { border-top: 1px solid var(--filet); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.risque-dedans { color: #A32D20; background: #FDF0EE; border: 1px solid #EDB9B2; border-radius: 12px; padding: 14px; }
.risque-proche { color: #9A5A0A; background: #FEF6EA; border: 1px solid #EFD1A0; border-radius: 12px; padding: 14px; }
.risque-hors { color: #2E7D4F; background: #F1F8F3; border: 1px solid #CFE4D6; border-radius: 12px; padding: 14px; }
.risque-info { color: #2D4A6B; background: #F2F6FA; border: 1px solid #D3DFEB; border-radius: 12px; padding: 14px; }
.incendie { background: #FBF4F2; border: 1px solid #EBD3CC; border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.incendie h3 { margin: 0 0 10px; font-size: 1rem; color: #8A2F1E; }
.incendie dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 10px; }
.incendie dt { font-size: .8rem; color: var(--doux, #5A6472); }
.incendie dd { margin: 0; font-weight: 600; }
.incendie dd.petit { font-weight: 400; }
.risque-patrimoine { color: #6B4A12; background: #FCF6EC; border: 1px solid #EBDAB9; border-radius: 12px; padding: 14px; }
.risque-patrimoine > div { gap: 2px; }

.carte-lot { background: #E4E9EF; border: 1px dashed #7C8896; border-radius: 12px; min-height: 180px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 24px; text-align: center; }

/* Carte et zones inondables */
.carte-osm { height: 360px; border-radius: 14px; border: 1px solid var(--bord); z-index: 0; overflow: hidden; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pastille { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Listes de rues et accueil */
.liste-rues { margin: 0; padding: 0; list-style: none; columns: 3 240px; column-gap: 24px; }
.liste-rues li { padding: 5px 0; break-inside: avoid; }
/* Grandes villes : index des lettres et groupes repliés */
.index-lettres { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.index-lettres a { min-width: 34px; padding: 6px 8px; text-align: center; border-radius: 8px; font-weight: 600;
  color: var(--bleu); text-decoration: none; background: var(--blanc); border: 1px solid var(--bord); }
.index-lettres a:hover { background: var(--bleu-pale); border-color: var(--bleu-moyen); }
.groupe-voies { border-top: 1px solid var(--filet); scroll-margin-top: 70px; }
.groupe-voies > summary { padding: 10px 0; cursor: pointer; font-weight: 600; color: var(--bleu); }
.groupe-voies[open] > summary { margin-bottom: 4px; }
.groupe-voies .liste-rues { padding-bottom: 12px; }
nav a { color: var(--doux); }

.bouton-secondaire { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  min-height: 44px; padding: 0 16px; border: 1px solid #C3D2E6; border-radius: 12px;
  color: var(--bleu); font-weight: 600; text-decoration: none; background: var(--blanc);
  transition: background .15s, border-color .15s, box-shadow .15s; }
.bouton-secondaire:hover { background: var(--bleu-pale); color: var(--bleu-fonce); border-color: var(--bleu-moyen);
  box-shadow: 0 2px 8px rgba(29, 79, 145, .12); }

/* Recherche intelligente */
.recherche-intelligente { position: relative; }
.suggestions { position: absolute; top: 52px; left: 0; right: 0; z-index: 1000; margin: 0; padding: 6px;
  list-style: none; background: var(--blanc); border: 1px solid var(--bord); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(14, 36, 66, .18); max-height: 440px; overflow-y: auto; }
.suggestion { display: flex; flex-direction: column; padding: 9px 12px; cursor: pointer; border-radius: 10px; }
.suggestion:hover, .suggestion[aria-selected="true"] { background: var(--bleu-pale); }
.suggestion-titre { font-weight: 500; }
.suggestion-detail { font-size: 13px; color: var(--doux); }
.suggestion-voie .suggestion-titre { color: var(--bleu); }
.suggestion-vide { padding: 8px 14px; font-size: 14px; color: var(--doux); }

.liste-simple { margin: 4px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.itineraires { display: block; font-size: 13px; color: var(--doux); margin-top: 2px; }

/* Onglets sans JavaScript (boutons radio), en pastilles */
.onglets { display: flex; flex-wrap: wrap; gap: 4px; }
.onglets > input { position: absolute; opacity: 0; pointer-events: none; }
.onglets > label { padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--doux);
  cursor: pointer; background: var(--fond); border: 1px solid var(--bord); transition: background .15s, color .15s; }
.onglets > label:hover { color: var(--bleu); }
.onglets > input:checked + label { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.onglets > input:focus-visible + label { outline: 3px solid #6E9BD6; outline-offset: 2px; }
.onglets > .panneau { display: none; flex-basis: 100%; padding-top: 8px; }
#mode-auto:checked ~ .panneau-auto, #mode-pied:checked ~ .panneau-pied, #mode-bus:checked ~ .panneau-bus { display: block; }

/* Taxes estimées */
.taxe-total { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(135deg, var(--bleu-pale), #F4F7FB); }
.taxe-total .grand { font-family: var(--titre); font-size: 34px; font-weight: 600; color: var(--bleu); line-height: 1.15;
  font-variant-numeric: tabular-nums; }
tr.sous-total td { font-weight: 600; border-top: 2px solid var(--bord); }

/* Autobus */
.pastille-ligne { display: inline-block; min-width: 44px; padding: 3px 8px; border-radius: 8px; text-align: center;
  font-family: var(--titre); font-weight: 600; font-size: 15px; background: #B33A04; color: #fff; }
.pastille-ligne.metrobus { background: var(--bleu); }
.direction { display: block; }
.freq { white-space: nowrap; }

/* Pied de page */
.pied { margin-top: 24px; background: var(--nuit); color: #C3CFDF; font-size: 14px; }
.pied-interieur { max-width: 1440px; margin: 0 auto; padding: 40px 24px 48px; display: grid; gap: 24px 48px;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); }
.pied-marque p { margin-top: 6px; }
.logo-pied { font-family: var(--titre); font-weight: 600; font-size: 20px; color: #fff; }
.pied-texte { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 700px) { .pied-interieur { grid-template-columns: 1fr; } }

@media (max-width: 600px) {
  h1 { font-size: 30px; }
  h2 { font-size: 19px; }
  main { padding: 16px 14px 32px; gap: 18px; }
  .entete .interieur { padding: 12px 14px; gap: 10px; }
  .recherche { flex-basis: 100%; }
  .recherche button { padding: 0 16px; }
  .identite { padding: 24px 20px; border-radius: 18px; }
  .identite:has(+ .chiffres), .identite:has(+ [hidden] + .chiffres) { padding-bottom: 72px; }
  .identite + .chiffres, .identite + [hidden] + .chiffres { margin-top: -64px; padding: 0 10px; }
  .chiffres { grid-template-columns: 1fr 1fr; gap: 10px; }
  .chiffre { padding: 14px 16px; }
  .chiffre.principal { grid-column: 1 / -1; }
  .chiffre .valeur { font-size: 22px; }
  .chiffre.principal .valeur { font-size: 30px; }
  .carte { padding: 20px 18px; }
  .sommaire { margin: 0 -14px; padding: 8px 14px; }
  .sommaire-defile { gap: 5px; }
  .sommaire a { padding: 6px 12px; font-size: 13px; }
  .constats { grid-template-columns: 1fr; }
}

@media print {
  .entete, .sommaire, .pied, .boutons { display: none; }
  .identite { color: var(--texte); background: none; box-shadow: none; padding: 0; }
  .identite .doux, .identite nav, .identite a, .provenance { color: var(--doux); }
  .identite + .chiffres { margin-top: 0; padding: 0; }
  .carte, .chiffre { box-shadow: none; break-inside: avoid; }
}

/* Section repliable (sources) */
.repliable { padding-top: 0; padding-bottom: 0; gap: 0; }
.repliable details { display: flex; flex-direction: column; }
.repliable summary { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px 16px; padding: 22px 44px 22px 0; position: relative; border-radius: 12px; }
.repliable summary::-webkit-details-marker { display: none; }
.repliable summary h2 { display: flex; align-items: center; gap: 12px; color: var(--nuit); }
.repliable summary::after { content: ""; position: absolute; right: 0; top: 50%; width: 32px; height: 32px; margin-top: -16px;
  border-radius: 50%; background: var(--fond) center / 16px no-repeat; transition: transform .2s, background-color .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.repliable summary:hover::after { background-color: var(--bleu-pale); }
.repliable details[open] summary::after { transform: rotate(180deg); }
.resume-pli { font-size: 14px; color: var(--doux); }
.repliable details[open] .resume-pli { display: none; }
.repliable details[open] > .defile { margin-bottom: 16px; }
.repliable > p { padding: 0 0 20px; border-top: 1px solid var(--filet); padding-top: 14px; }
@media print { .repliable details > *:not(summary) { display: block; } }

/* Actions de la fiche (sur l'en-tête) */
.actions-fiche { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bouton-clair { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px;
  font-size: 14px; font-weight: 600; text-decoration: none; color: #fff !important;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); transition: background .15s; }
.bouton-clair:hover { background: rgba(255, 255, 255, .22); }

/* Pastilles de liens (quartiers) */
.pastilles-liens { display: flex; flex-wrap: wrap; gap: 8px; }
.pastilles-liens a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--fond); border: 1px solid var(--bord); text-decoration: none; color: var(--nuit); font-weight: 500;
  font-size: 15px; transition: background .15s, border-color .15s; }
.pastilles-liens a:hover { background: var(--bleu-pale); border-color: var(--bleu-moyen); }
.pastilles-liens span { font-size: 12px; color: var(--doux); font-weight: 400; }

/* Carte de l'accueil */
.entete-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.carte-grande { height: 520px; }
@media (max-width: 600px) { .carte-grande { height: 420px; } }
.bulle-carte { display: flex; flex-direction: column; gap: 2px; font-family: Inter, system-ui, sans-serif; min-width: 180px; }
.bulle-carte a:first-child { font-weight: 600; font-size: 15px; }
.bulle-carte span { color: var(--doux); font-size: 13px; }
.bulle-ouvrir { margin-top: 6px; font-weight: 600; font-size: 13px; }
#carte-accueil > h2::before, #carte-accueil h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l6-3 6 3 6-3v15l-6 3-6-3-6 3z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E"); }
#carte-accueil h2 { display: flex; align-items: center; gap: 12px; color: var(--nuit); }
#carte-accueil h2::before { content: ""; flex: none; width: 36px; height: 36px; border-radius: 11px;
  background-color: var(--bleu-pale); background-position: center; background-size: 20px; background-repeat: no-repeat; }

/* Comparateur */
.choix-comparaison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; position: relative; z-index: 3; }
.identite + .choix-comparaison { margin-top: -64px; padding: 0 20px; }
.identite:has(+ .choix-comparaison) { padding-bottom: 84px; }
@media (max-width: 760px) { .choix-comparaison { grid-template-columns: 1fr; } }
.choix { gap: 10px; padding: 20px; }
.choix .recherche { max-width: none; margin-left: 0; flex: none; }
.choix-lettre, .pastille-lettre { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--bleu); color: #fff; font-family: var(--titre); font-weight: 600; font-size: 15px; }
.choix[data-cote="b"] .choix-lettre { background: var(--cuivre); }
.col-b .pastille-lettre { background: var(--cuivre); }
.tableau-comparaison { table-layout: fixed; }
.tableau-comparaison thead th { text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--nuit); vertical-align: middle; }
.tableau-comparaison thead th:first-child { width: 30%; }
.tableau-comparaison thead th a { margin-left: 8px; font-family: var(--titre); }
.tableau-comparaison tbody th { font-weight: 500; color: var(--doux); text-align: left; }
.tableau-comparaison tr.groupe th { padding-top: 22px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--bleu); border-bottom: 2px solid var(--bleu-pale); }
.tableau-comparaison td.plus-eleve { font-weight: 600; color: var(--nuit); }
.ecart { display: block; font-size: 12px; font-weight: 500; margin-top: 2px; }
.ecart { color: var(--doux); }
.liste-unites { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.lien-bouton { background: none; border: 0; padding: 6px 8px; border-radius: 8px; font: inherit; color: var(--bleu);
  cursor: pointer; text-align: left; width: 100%; }
.lien-bouton:hover { background: var(--bleu-pale); }
dl.caract.indicateurs { grid-template-columns: minmax(0, 1fr) auto; }
dl.caract.indicateurs dd { max-width: 22ch; }

/* Score de marchabilité */
#marchabilite > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13' cy='4' r='2'/%3E%3Cpath d='M9 21l3-7 3 3v5M7 12l3-3 4 1 3 3'/%3E%3C/svg%3E"); }
.marche { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; }
.marche .jauge { flex: 0 0 180px; margin: 0 auto; }
.marche .marche-details { flex: 1 1 260px; }
.jauge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.jauge svg { width: 160px; height: 160px; }
.jauge-arc { stroke: var(--jauge, #1D4F91); }
.jauge-score { font-family: var(--titre); font-weight: 600; font-size: 38px; fill: var(--nuit); }
.jauge-sur { font-size: 12px; fill: var(--doux); }
.jauge strong { font-family: var(--titre); font-size: 18px; color: var(--nuit); }
.niveau-0 { --jauge: #B8562A; } .niveau-1 { --jauge: #C98A1B; } .niveau-2 { --jauge: #2E7D9A; } .niveau-3 { --jauge: #2E7D4F; }
.marche-details { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.marche-ligne { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 500; }
.marche-points { font-variant-numeric: tabular-nums; color: var(--doux); font-weight: 600; }
.barre { height: 6px; border-radius: 999px; background: var(--bleu-pale); overflow: hidden; margin: 4px 0 2px; }
.barre span { display: block; height: 100%; border-radius: 999px; background: var(--bleu); }
.etiquette-marche { text-decoration: none; }
.identite .etiquette-marche { background: rgba(159, 211, 176, .2); border-color: rgba(159, 211, 176, .5); }

/* Lien « Revenir à la fiche » (pages Comparer et Quartier ouvertes depuis une fiche) */
.retour-fiche { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 42px;
  padding: 0 16px 0 12px; border-radius: 999px; background: var(--blanc); border: 1px solid var(--bord);
  box-shadow: var(--ombre); color: var(--bleu); font-weight: 600; text-decoration: none; margin-bottom: -8px;
  transition: background .15s, border-color .15s; }
.retour-fiche:hover { background: var(--bleu-pale); border-color: var(--bleu-moyen); }

/* Navigation de l'en-tête */
.nav-site { display: flex; gap: 4px; }
.nav-site a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--nuit); text-decoration: none; font-weight: 500; font-size: 15px; transition: background .15s, color .15s; }
.nav-site a:hover { background: var(--bleu-pale); color: var(--bleu); }
.nav-site svg { color: var(--bleu); }
@media (max-width: 600px) { .nav-site { margin-left: auto; } .nav-site a { padding: 0 8px; } }

/* Propriétés à vendre (liens de sortie) */
#a-vendre > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E"); }
.sites-annonces { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.site-annonce { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--bord); background: var(--fond); text-decoration: none; transition: background .15s, border-color .15s; }
.site-annonce:hover { background: var(--bleu-pale); border-color: var(--bleu-moyen); }
.site-nom { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--bleu); font-size: 16px; }
.site-note { font-size: 13px; color: var(--doux); }
@media (max-width: 480px) { .nav-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .nav-site a { padding: 0 10px; } }

/* En bref : lecture rapide */
.bref-identite { font-size: 17px; color: var(--texte); }
.bref-chiffres { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.bref-chiffres li { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; min-width: 170px;
  border-radius: 12px; background: var(--fond); }
.bref-chiffres span { font-size: 13px; color: var(--doux); }
.bref-chiffres strong { font-family: var(--titre); font-size: 24px; font-weight: 600; color: var(--nuit);
  font-variant-numeric: tabular-nums; }
.bref-chiffres em { font-style: normal; font-size: 13px; color: var(--doux); }
.positions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--bord); }
.positions h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--doux); text-transform: none; }
.position { display: grid; grid-template-columns: minmax(150px, 260px) minmax(120px, 1fr) 190px; gap: 16px; align-items: center; }
.position-lieu { display: flex; flex-direction: column; font-weight: 500; color: var(--nuit); line-height: 1.3; }
.position-lieu small { font-size: 12px; font-weight: 400; color: var(--doux); }
.position-barre { position: relative; height: 10px; border-radius: 999px; background: var(--bleu-pale); }
.position-barre span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #8FA9CB, var(--bleu)); }
.position-barre i { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: #fff; border: 4px solid var(--bleu); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.position-pct { font-size: 15px; color: var(--doux); text-align: right; white-space: nowrap; }
.position-pct strong { font-size: 18px; color: var(--nuit); font-variant-numeric: tabular-nums; }
.position-variation { font-size: 15px; margin-top: 4px; }
.pastille-sens { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.sens-plus { background: #FBE7DC; color: #9A3B12; } .sens-moins { background: #E2F1E7; color: #2E7D4F; }
.sens-egal { background: var(--bleu-pale); color: var(--bleu); }
@media (max-width: 700px) {
  .position { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .position-barre { grid-column: 1 / -1; grid-row: 2; }
  .bref-chiffres li { flex: 1 1 140px; min-width: 0; }
}

/* Voisins : les plus éloignés repliés (case à cocher, sans script) */
.case-depli { position: absolute; opacity: 0; pointer-events: none; }
tr.loin { display: none; }
.case-depli:checked ~ .defile tr.loin { display: table-row; }
.bouton-depli { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--bord); background: var(--fond); color: var(--bleu); font-weight: 600;
  font-size: 14px; cursor: pointer; transition: background .15s; }
.bouton-depli:hover { background: var(--bleu-pale); }
.bouton-depli::after { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.case-depli:checked ~ .bouton-depli::after { transform: translateY(2px) rotate(-135deg); }
.case-depli:focus-visible ~ .bouton-depli { outline: 3px solid var(--bleu-moyen); outline-offset: 2px; }
.depli-moins, .case-depli:checked ~ .bouton-depli .depli-plus { display: none; }
.case-depli:checked ~ .bouton-depli .depli-moins { display: inline; }
@media print { tr.loin { display: table-row; } .bouton-depli { display: none; } }

/* Licences (section Sources) et liens du pied de page */
.licences { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 16px; padding: 12px 14px; border-radius: 12px;
  background: var(--fond); color: var(--doux); }
.licences strong { color: var(--nuit); }
.pied-texte a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Taxes : immeuble bâti taxé comme terrain vague */
.alerte-taxes { padding: 12px 14px; border-radius: 12px; background: #FDF3EC; border-left: 4px solid #C2662D; font-size: 14px; line-height: 1.5; }
.alerte-taxes .doux { display: block; margin-top: 4px; font-size: 13px; }

/* Services de garde */
#garde > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='7' r='3'/%3E%3Cpath d='M3 21v-2a5 5 0 0 1 5-5h2'/%3E%3Ccircle cx='17' cy='11' r='2.5'/%3E%3Cpath d='M13 21v-1a4 4 0 0 1 8 0v1'/%3E%3C/svg%3E"); }
.pastille-garde { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.type-cpe { background: #E2F1E7; color: #2E7D4F; } .type-subv { background: var(--bleu-pale); color: var(--bleu); }
.type-non_subv { background: #F1F3F6; color: var(--doux); }
tr.sous-groupe th { padding-top: 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); text-align: left; }
.note-garde { padding: 12px 14px; border-radius: 12px; background: #FFF8EC; border: 1px solid #F3DDB5; font-size: 14px; }

/* Comparateur : de 2 à 5 adresses */
.choix-comparaison { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.choix-tete { display: flex; align-items: center; justify-content: space-between; }
.choix-retirer { font: inherit; font-size: 13px; color: var(--doux); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.choix-ajouter { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 140px;
  border: 2px dashed var(--bord); background: rgba(255, 255, 255, .7); color: var(--bleu); font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; }
.choix-ajouter > span:first-child { font-size: 28px; line-height: 1; }
.choix-ajouter:hover { border-color: var(--bleu-moyen); background: #fff; }
.choix[data-cote="c"] .choix-lettre, .lettre-c { background: #2E7D4F; }
.choix[data-cote="d"] .choix-lettre, .lettre-d { background: #6B4FA0; }
.choix[data-cote="e"] .choix-lettre, .lettre-e { background: #2E7D9A; }
.lettre-b { background: var(--cuivre); }
.tableau-comparaison.multi { table-layout: auto; min-width: 760px; }
.tableau-comparaison.multi thead th:first-child { width: 20%; }

/* Ma liste de recherche */
.compte-liste { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--cuivre); color: #fff; font-size: 12px; font-weight: 700; }
.compte-liste[hidden] { display: none; }
.bouton-liste { cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
.bouton-liste[aria-pressed="true"] { background: #F0C9A8; border-color: #F0C9A8; color: #12213A !important; }
.bouton-liste[aria-pressed="true"] svg { fill: currentColor; }
.avis-liste { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #12213A; color: #fff;
  padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: 15px; z-index: 1000; max-width: calc(100% - 32px); }
.avis-liste[hidden] { display: none; }
.avis-liste a { color: #F0C9A8; font-weight: 600; margin-left: 8px; }
section.carte.barre-liste { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 12px 20px; }
.filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.filtres button { font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--bord);
  background: var(--fond); color: var(--nuit); cursor: pointer; }
.filtres button[aria-pressed="true"] { background: var(--nuit); border-color: var(--nuit); color: #fff; }
.tri { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--doux); }
.tri select, .fl-statut { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--bord); background: #fff; }
.barre-liste .ajout-liste { flex: 1 1 300px; margin-left: auto; max-width: 460px; }
#message-liste { flex-basis: 100%; margin: 0; }
#message-liste:empty { display: none; }
.liste-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 20px; }
.fiche-liste { gap: 14px; border-top: 4px solid var(--bleu-pale); }
.fiche-liste.statut-visitee { border-top-color: #2E7D9A; } .fiche-liste.statut-a-visiter { border-top-color: #C98A1B; }
.fiche-liste.statut-offre { border-top-color: #2E7D4F; } .fiche-liste.statut-ecartee { opacity: .62; }
.fl-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fl-titre { display: flex; flex-direction: column; gap: 2px; }
.fl-titre a { font-family: var(--titre); font-size: 20px; font-weight: 600; color: var(--nuit); text-decoration: none; }
.fl-titre a:hover { color: var(--bleu); text-decoration: underline; }
.fl-coeur { font-size: 24px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--cuivre); padding: 4px; }
.fl-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.mini-chiffre { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--fond); min-width: 0; }
.mini-lib { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); }
.mini-chiffre strong { font-family: var(--titre); font-size: 17px; color: var(--nuit); font-variant-numeric: tabular-nums; }
.mini-note { font-size: 11px; color: var(--doux); line-height: 1.3; }
.fl-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.fl-info li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; }
.fl-notes-lib { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--doux); }
.fl-notes { font: inherit; font-size: 14px; font-weight: 400; color: var(--texte); padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--bord); background: #FFFDF7; resize: vertical; }
.fl-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 10px; border-top: 1px solid var(--filet); }
.fl-comparer { font-size: 14px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.fl-retirer { font: inherit; font-size: 14px; color: var(--doux); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.fl-lien { margin-left: auto; font-weight: 600; font-size: 14px; }
.vide-liste { padding: 24px; text-align: center; }

/* Écoles en autobus : lignes à prendre, sous le nom de l'école */
.trajet-bus { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--bleu); }

/* Demi-tuile seule sur sa rangée : pleine largeur (recherche.js, comblerGrilles) */
.grille > .carte.seule { grid-column: 1 / -1; }

/* Pages légales (application provinciale) */
.texte-long h2 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
.texte-long h2:first-child { margin-top: 0; }
.texte-long p, .texte-long li { line-height: 1.6; max-width: 75ch; }
.texte-long ul { padding-left: 1.2em; }
.texte-long li { margin: .3em 0; }
.liens-legaux a { color: inherit; }

/* Comparateur : invitation à Ma liste+ (au-delà de 2 adresses) */
.choix-plus { cursor: default; border-style: dashed; color: var(--doux); }
.choix-plus > span[aria-hidden] { color: var(--cuivre); }

/* Mon compte */
.formulaire-compte { flex: none; margin: 12px 0 6px; max-width: 560px; }
.forfaits { padding-left: 20px; }
.forfaits li { margin: 6px 0; }
.bouton-contour, .bouton-danger { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: 12px; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  color: var(--bleu); background: var(--blanc); border: 1px solid var(--bleu-moyen); }
.bouton-contour:hover { background: var(--bleu-pale); }
.bouton-danger { color: #9B2C1F; border-color: #E0B4AC; margin-top: 4px; }
.bouton-danger:hover { background: #FBEDEA; }

/* Mon compte : option payante pas encore offerte */
.pastille-plus { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 2px; border-radius: 999px;
  border: 1px dashed var(--cuivre); color: var(--cuivre); font-size: 11px; font-weight: 700; white-space: nowrap; }
.nav-bientot { opacity: .8; }
.bouton-contour[disabled] { cursor: not-allowed; color: var(--doux); border-style: dashed; background: var(--fond); }
@media (max-width: 480px) { .pastille-plus { display: none; } }

/* Mon compte : prix prévus de Ma liste+ */
.prix-plus { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 6px; }
.carte-prix { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--bord); border-radius: 14px; background: var(--fond); }
.carte-prix.recommande { border-color: var(--cuivre); background: var(--cuivre-pale); }
.prix-etiquette { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cuivre); }
.prix-montant { font-family: var(--titre); font-size: 28px; font-weight: 700; color: var(--texte); }
.prix-duree { font-weight: 600; color: var(--doux); }

/* Page de municipalité : unités sans adresse civique, repliées par défaut */
#sans-adresse summary h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-6.5 7-12a7 7 0 0 0-14 0c0 5.5 7 12 7 12z'/%3E%3Cpath d='M9.5 9.5l5 5M14.5 9.5l-5 5'/%3E%3C/svg%3E"); }
#sans-adresse details[open] > p { margin-top: 0; }
#sans-adresse details[open] > .pastilles-liens { margin-bottom: 20px; }

#carte-municipalite > h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l6-3 6 3 6-3v15l-6 3-6-3-6 3z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E"); }

/* Cartes : message « Ctrl + molette pour zoomer » */
.aide-zoom { position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; pointer-events: none;
  background: rgba(14, 36, 66, .45); color: #fff; font-weight: 700; font-size: 18px; opacity: 0; transition: opacity .2s; }
.aide-zoom.visible { opacity: 1; }

.ligne-internet { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--filet); }
.ligne-internet .petit { display: block; margin-top: .25rem; }
.paire { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 860px) { .paire { grid-template-columns: minmax(0, 1fr); } }
.note-repliee { font-size: .875rem; }
.note-repliee summary { cursor: pointer; color: var(--bleu); font-weight: 600; padding: 4px 0; }
.note-repliee[open] summary { margin-bottom: 8px; }
.note-repliee p + p { margin-top: 8px; }
#signaler summary h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4F91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 22V4'/%3E%3Cpath d='M4 4h13l-2 4 2 4H4'/%3E%3C/svg%3E"); }
.signaler { display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; max-width: 640px; }
.signaler label { font-weight: 600; font-size: .9rem; margin-top: 6px; }
.signaler select, .signaler textarea, .signaler input { font: inherit; padding: 10px 12px; border: 1px solid #C9D1DB; border-radius: 10px; background: #F8FAFC; color: var(--texte); }
.signaler textarea { resize: vertical; }
.signaler button { align-self: flex-start; margin-top: 8px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--bleu); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.signaler button:hover { background: var(--bleu-fonce); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Impression et PDF (bouton « Imprimer ou PDF » de la fiche) */
.imprime-seulement { display: none; }
@media print {
  @page { margin: 14mm 12mm; }
  html, body { background: #fff; font-size: 11pt; }
  .imprime-seulement { display: block; }
  .entete-impression { font-size: 9pt; color: #555; border-bottom: 1px solid #ccc; padding-bottom: 6px; margin-bottom: 10px; }
  .actions-fiche, .bouton-clair, #signaler, #a-vendre, .note-repliee summary, .itineraires,
  #emplacement .carte-osm, #emplacement .leaflet-container, .etiquette-marche::after { display: none !important; }
  .grille, .paire { display: block; }
  .grille > *, .paire > * { margin-bottom: 12px; }
  .carte { border: 1px solid #ddd; padding: 14px 16px; }
  .carte h2 { break-after: avoid; }
  table, tr, .risque { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .defile { overflow: visible !important; }
  .repliable summary::after { display: none; }
  .identite nav a, .identite .provenance, .identite .provenance a { color: #555 !important; }
  .etiquette, .etiquette-marche, .etiquette-patrimoine { color: #222 !important; background: none !important;
    border: 1px solid #bbb !important; box-shadow: none !important; }
  .identite h1 { color: #111 !important; }
}

/* Voisins sur téléphone : l'année passe sous le type, pour que le tableau tienne dans la largeur */
.annee-mobile { display: none; }
@media (max-width: 600px) {
  #voisins .col-annee { display: none; }
  #voisins .annee-mobile { display: block; font-size: 12px; color: var(--doux); margin-top: 2px; }
  #voisins th, #voisins td { padding-left: 0; padding-right: 8px; }
}

.indice-defile { display: none; }
/* Tableaux sur téléphone : plus compacts ; ceux qui restent trop larges défilent, avec la première colonne
   fixe et une indication (classe « deborde » posée par recherche.js) */
@media (max-width: 600px) {
  table { font-size: 14px; }
  th, td { padding: 9px 8px 9px 0; }
  .defile.deborde { position: relative; }
  .defile.deborde table th[scope="row"], .defile.deborde table thead th:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--blanc); box-shadow: 6px 0 6px -6px rgba(14, 36, 66, .25); }
  .indice-defile { display: block; font-size: 12px; color: var(--doux); margin: -4px 0 6px; }
}

/* À proximité et services de garde sur téléphone : chaque ligne devient une petite fiche empilée */
@media (max-width: 600px) {
  #proximite table, #garde table { display: block; }
  #proximite thead, #garde thead { display: none; }
  #proximite tbody, #garde tbody { display: block; }
  #proximite tbody tr, #garde tbody tr { display: grid; gap: 4px 14px; padding: 12px 0; border-bottom: 1px solid var(--filet); }
  #proximite tbody tr:last-child, #garde tbody tr:last-child { border-bottom: 0; }
  #proximite td, #garde td, #garde tr.sous-groupe th { display: block; padding: 0; border: 0; text-align: left; }
  /* À proximité : service en petite étiquette, puis lieu à gauche et trajet à droite */
  #proximite tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
  #proximite td:first-child { grid-column: 1 / -1; font-size: 11px; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; color: var(--doux); }
  #proximite td:last-child { text-align: right; }
  /* Garde : nom sur toute la largeur, puis type, places, à pied, en voiture */
  #garde tbody tr { grid-template-columns: repeat(3, auto); justify-content: start; align-items: start; }
  #garde td:first-child, #garde td:nth-child(2), #garde td[colspan], #garde tr.sous-groupe th { grid-column: 1 / -1; }
  #garde tr.sous-groupe { display: block; padding: 16px 0 4px; }
  #garde td[data-etiquette]::before { content: attr(data-etiquette); display: block; font-size: 11px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; color: var(--doux); margin-bottom: 2px; }
  #proximite td, #garde td { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
}
