/* Parcelle claire : composants réutilisables.
   Se charge après socle.css. Les composants se mettent en page selon la largeur
   de leur conteneur (requêtes de conteneur), pas selon celle de l'écran : la
   fiche verdict et le plan se posent donc tels quels dans une colonne étroite,
   une page large ou une feuille A4.

   Sommaire : logo, pictogrammes, statuts, fiche verdict, plan, origine des faits,
   raisons, points d'attention, encadrés, mesures, tableaux, lexique et bulle, boutons. */

/* ---------- Logo et pictogrammes ---------- */
.logo { display: inline-flex; align-items: center; gap: 0.5em; color: var(--encre); text-decoration: none; }
.logo__signe { width: 1.5em; height: 1.5em; flex: none; }
.logo__point { fill: var(--accent); }
.logo__nom { font-family: var(--serif); font-weight: 600; font-size: 1.12em; letter-spacing: -0.01em; white-space: nowrap; }

.picto { width: 1.5rem; height: 1.5rem; flex: none; }

/* ---------- Statuts : une couleur et une forme ---------- */
.pastille { flex: none; width: 22px; height: 22px; }
.pastille--s { width: 17px; height: 17px; }
.pastille--l { width: 28px; height: 28px; }
.pastille--xl { width: 46px; height: 46px; }
.pastille .disque { fill: var(--c); }
.pastille path { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pastille .plein { fill: #fff; stroke: none; }
.pastille .anneau { fill: none; stroke: var(--s-na); stroke-width: 1.7; stroke-dasharray: 2.7 2.55; }
.pastille--oui { --c: var(--s-oui); }
.pastille--conditions { --c: var(--s-conditions); }
/* L'ocre clair n'a que 2,5 à 2,9:1 contre le papier : un contour foncé (5,8:1 au moins) dessine le disque. */
.pastille--conditions .disque { stroke: var(--s-conditions-texte); stroke-width: 1.5; }
.pastille--limite { --c: var(--s-limite); }
.pastille--non { --c: var(--s-non); }
.pastille--inconnu { --c: var(--s-inconnu); }

.statut { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 620; font-size: var(--t-petit); line-height: 1.2; white-space: nowrap; }
.statut--oui { color: var(--s-oui-texte); }
.statut--conditions { color: var(--s-conditions-texte); }
.statut--limite { color: var(--s-limite-texte); }
.statut--non { color: var(--s-non-texte); }
.statut--inconnu { color: var(--s-inconnu-texte); }
.statut--na { color: var(--s-na-texte); font-weight: 500; }

/* État de lecture d'une règle : une marque au trait, en encre, distincte des statuts */
.certitude { display: inline-flex; align-items: center; gap: 0.4em; font-size: var(--t-mention); font-weight: 600; color: var(--encre-2); line-height: 1.2; white-space: nowrap; }
.certitude__signe { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--encre-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.certitude__signe .plein { fill: var(--encre-2); stroke: none; }
.certitude--a_verifier { color: var(--encre-3); }

/* Marques des points d'attention : cinq formes */
.marque { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.marque .plein { fill: var(--c); stroke: none; }
.marque .plein-contour { fill: var(--c); stroke: var(--c); }
.marque .clair { stroke: #fff; }
.marque .clair-plein { fill: #fff; stroke: none; }
.marque--rouge { --c: var(--s-non); }
.marque--orange { --c: var(--s-limite); }
.marque--jaune { --c: #8a5d00; }  /* ocre foncé : le losange au trait atteint 4,6:1 (l'ocre clair n'en avait que 2,5) */
.marque--info { --c: var(--s-inconnu); }
.marque--gris { --c: var(--s-na); }

/* ---------- La fiche verdict ---------- */
.fiche-verdict { container-type: inline-size; container-name: fiche; }
.fiche-verdict__cadre {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--feuille);
  border: 1px solid var(--filet-fort);
  border-radius: 14px;
  overflow: hidden;
}
/* Double filet, comme le cartouche d'un plan */
.fiche-verdict__cadre::after {
  content: ""; position: absolute; inset: 5px; border: 1px solid var(--filet); border-radius: 9px; pointer-events: none;
}
.fiche-verdict--oui { --teinte: var(--s-oui-fond); --ton: var(--s-oui); }
.fiche-verdict--conditions { --teinte: var(--s-conditions-fond); --ton: var(--s-conditions); }
.fiche-verdict--limite { --teinte: var(--s-limite-fond); --ton: var(--s-limite); }
.fiche-verdict--non { --teinte: var(--s-non-fond); --ton: var(--s-non); }
.fiche-verdict--inconnu { --teinte: var(--s-inconnu-fond); --ton: var(--s-inconnu); }

.fiche-verdict__tete { padding: 1.15rem 1.35rem 0.8rem; }
.fiche-verdict__sep { color: var(--accent); margin: 0 0.15em; }
.fiche-verdict__adresse { font-size: var(--t-petit); color: var(--encre-2); margin-top: 0.15rem; line-height: 1.35; }

/* Le terrain sur son papier quadrillé */
.fiche-verdict__terrain {
  position: relative;
  height: 9.6rem;
  border-block: 1px solid var(--filet);
  background-color: var(--feuille);
  overflow: hidden;
}
.silhouette { width: 100%; height: 100%; padding: 0.85rem 1.2rem; overflow: visible; }
.silhouette__grille { fill: none; stroke: rgba(23, 53, 43, 0.075); stroke-width: 1; vector-effect: non-scaling-stroke; }
.silhouette__cote path { fill: none; stroke: var(--encre-2); stroke-width: 1.2; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.silhouette__cote text { font: 600 17px var(--sans); fill: var(--encre-2); paint-order: stroke; stroke: var(--feuille); stroke-width: 4px; }
.fiche-verdict__echelle { position: absolute; right: 0.75rem; bottom: 0.62rem; display: flex; flex-direction: column; align-items: flex-end; gap: 0.18rem; font-size: 0.7rem; font-weight: 600; color: var(--encre-2); line-height: 1; background: var(--feuille); padding: 0.25rem 0.4rem 0.3rem; border-radius: 4px; }
.fiche-verdict__echelle i { order: 2; display: block; width: 1.1rem; height: 0.32rem; border: 1.25px solid var(--encre-2); border-top: 0; }
.fiche-verdict__echelle::before { content: "une case :"; font-weight: 500; color: var(--encre-3); order: 0; }
.silhouette__terrain { fill: var(--teinte, var(--creux)); stroke: var(--encre); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.silhouette__bati { fill: var(--encre); fill-opacity: 0.86; stroke: var(--feuille); stroke-width: 0.75; vector-effect: non-scaling-stroke; }
.silhouette__voie { fill: none; stroke: var(--accent); stroke-width: 4.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.silhouette--oui { --teinte: var(--s-oui-fond); }
.silhouette--conditions { --teinte: var(--s-conditions-fond); }
.silhouette--limite { --teinte: var(--s-limite-fond); }
.silhouette--non { --teinte: var(--s-non-fond); }
.silhouette--inconnu { --teinte: var(--s-inconnu-fond); }

.nord { position: absolute; top: 0.6rem; right: 0.7rem; width: 1.15rem; color: var(--encre); }
.nord svg { width: 100%; height: auto; overflow: visible; transform-origin: 50% 45%; }
.nord path { fill: currentColor; }
.nord text { font: 700 8.5px var(--sans); fill: currentColor; }

.fiche-verdict__surface {
  position: absolute; left: 0.75rem; bottom: 0.6rem;
  font-size: var(--t-mention); font-weight: 650; line-height: 1;
  background: var(--feuille); border: 1px solid var(--filet-fort); border-radius: 999px; padding: 0.32rem 0.6rem;
}
.fiche-verdict__voie { position: absolute; left: 0.75rem; top: 0.62rem; display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--encre-2); line-height: 1; background: var(--feuille); padding: 0.25rem 0.4rem; border-radius: 4px; }
.fiche-verdict__voie i { display: block; width: 1.1rem; height: 4px; border-radius: 2px; background: var(--accent); }

/* Le verdict */
.fiche-verdict__verdict { position: relative; padding: 1.25rem 1.35rem 1.2rem; }
.fiche-verdict__sceau { position: absolute; top: -27px; right: 1.2rem; padding: 4px; border-radius: 50%; background: var(--feuille); box-shadow: 0 0 0 1px var(--filet); line-height: 0; }
.fiche-verdict__titre { font-size: clamp(1.6rem, 1.25rem + 1.6cqi, 2.15rem); padding-right: 2.6rem; }
.fiche-verdict__phrase { margin-top: 0.6rem; color: var(--encre-2); font-size: 0.97rem; line-height: 1.5; }
.fiche-verdict__panne { margin-top: 0.75rem; font-size: var(--t-mention); line-height: 1.45; color: var(--s-na-texte); }
.fiche-verdict__provisoire { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; font-size: var(--t-mention); font-weight: 600; color: var(--s-inconnu-texte); }
.pouls { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--s-inconnu); animation: pouls 1.4s ease-in-out infinite; }
@keyframes pouls { 50% { opacity: 0.25; transform: scale(0.8); } }
.est-provisoire .fiche-verdict__titre { color: var(--encre-2); }

/* Les cinq projets : en lignes dans une carte étroite */
.fiche-verdict__projets { border-top: 1px solid var(--filet); }
.projet-ligne { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.56rem 1.35rem; }
.projet-ligne + .projet-ligne { border-top: 1px solid var(--filet); }
.projet-ligne__picto { color: var(--encre); line-height: 0; }
.projet-ligne__picto .picto { width: 1.6rem; height: 1.6rem; }
.projet-ligne__nom { font-weight: 600; font-size: 0.95rem; line-height: 1.25; }
.projet-ligne--na .projet-ligne__picto, .projet-ligne--na .projet-ligne__nom { color: var(--s-na-texte); }
.projet-ligne__nom { white-space: nowrap; hyphens: manual; }

/* Cinq statuts égaux : les cinq pictogrammes, puis une seule ligne de statut */
.fiche-verdict__projets--egaux { padding: 0.85rem 1.35rem 0.95rem; display: grid; gap: 0.7rem; }
.projets-egaux__pictos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.4rem; }
.projets-egaux__picto { display: grid; justify-items: center; gap: 0.25rem; text-align: center; font-size: 0.74rem; font-weight: 600; line-height: 1.15; color: var(--encre-2); hyphens: auto; -webkit-hyphens: auto; }
.projets-egaux__picto .picto { width: 1.6rem; height: 1.6rem; color: var(--encre); }
.projets-egaux__statut { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4rem 0.7rem; padding-top: 0.6rem; border-top: 1px solid var(--filet); font-weight: 600; font-size: var(--t-petit); }
.projets-egaux__statut .statut { font-size: 0.95rem; }

.fiche-verdict__pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.7rem 1.35rem 0.85rem; border-top: 1px solid var(--filet); font-size: var(--t-mention); color: var(--encre-3); }
.fiche-verdict__pied .logo { font-size: 0.86rem; }
.fiche-verdict__date { white-space: nowrap; margin-left: auto; }
@container fiche (max-width: 420px) {
  .projet-ligne { padding-block: 0.4rem; }
  .fiche-verdict__terrain { height: 7.6rem; }
  .fiche-verdict__tete { padding-bottom: 0.65rem; }
  .fiche-verdict__verdict { padding-block: 1.1rem 1rem; }
  .fiche-verdict__pied .logo { font-size: 0.8rem; }
  .fiche-verdict__pied { padding-block: 0.6rem 0.7rem; }
  .projets-egaux__picto span { font-size: 0.68rem; }
}
@container fiche (max-width: 599px) { .fiche-verdict__echelle { right: 5rem; } }

/* Carte large : le terrain à gauche, le verdict à droite, les projets en cinq colonnes */
@container fiche (min-width: 600px) {
  .fiche-verdict__cadre { grid-template-columns: minmax(13rem, 37%) minmax(0, 1fr); grid-template-areas: "terrain tete" "terrain verdict" "projets projets" "pied pied"; grid-template-rows: auto 1fr auto auto; }
  .fiche-verdict__tete { grid-area: tete; padding: 1.5rem 1.75rem 0.4rem 2.4rem; }
  .fiche-verdict__terrain { grid-area: terrain; height: auto; min-height: 15rem; border-block: 0; border-right: 1px solid var(--filet); }
  .fiche-verdict__verdict { grid-area: verdict; padding: 0.5rem 1.75rem 1.6rem 2.4rem; }
  .fiche-verdict__sceau { top: 0.2rem; right: auto; left: -28px; }
  .fiche-verdict__titre { padding-right: 0; }
  .fiche-verdict__phrase { font-size: 1rem; }
  .fiche-verdict__projets { grid-area: projets; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fiche-verdict__projets:not(.fiche-verdict__projets--egaux) { padding-inline: 0.65rem; }
  .projet-ligne { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "picto pastille" "nom nom" "texte texte"; align-items: start; gap: 0.1rem 0.4rem; padding: 0.95rem 0.75rem 1rem 0.85rem; }
  .projet-ligne + .projet-ligne { border-top: 0; border-left: 1px solid var(--filet); }
  /* un seul bloc, pas cinq colonnes : les pictos ont leur propre grille */
  .fiche-verdict__projets--egaux { grid-area: projets; grid-template-columns: minmax(0, 1fr); padding: 0.95rem 1.75rem 1rem; }
  .projet-ligne__picto { grid-area: picto; }
  .projet-ligne__picto .picto { width: 1.85rem; height: 1.85rem; }
  .projet-ligne__nom { grid-area: nom; margin-top: 0.5rem; }
  .projet-ligne .statut { display: contents; }
  .projet-ligne .pastille { grid-area: pastille; width: 26px; height: 26px; }
  .projet-ligne .statut__texte { grid-area: texte; font-size: var(--t-mention); white-space: normal; }
  .fiche-verdict__pied { grid-area: pied; padding-inline: 1.75rem; }
}

/* ---------- Le plan du terrain ---------- */
.plan { container-type: inline-size; }
.plan__cadre { position: relative; overflow: hidden; border: 1px solid var(--filet-fort); border-radius: var(--rayon); background: var(--creux); }
.plan__dessin { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan__papier { fill: var(--creux); }
.plan__alentour { fill: #fcf9f2; fill-opacity: 0.12; }
.plan__zonage { opacity: 1; }
.plan__attente { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0.55rem; font-size: var(--t-mention); color: var(--encre-2); pointer-events: none; }
.photo-chargee .plan__attente, .sans-photo .plan__attente { display: none; }
@media print { .plan__attente { display: none; } }
html.papier .plan__attente { display: none; }
.plan__voisines path { fill: none; stroke: #fff; stroke-opacity: 0.85; stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan__batis-voisins path { fill: #fff; fill-opacity: 0.07; stroke: #fff; stroke-opacity: 0.5; stroke-width: 0.75; vector-effect: non-scaling-stroke; }
.plan__batis path { fill: var(--encre); fill-opacity: 0.3; stroke: #fff; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.plan__terrain-halo { fill: none; stroke: #fff; stroke-width: 6.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.plan__terrain { fill: none; stroke: var(--encre); stroke-width: 2.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.plan__voie-halo { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plan__voie { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
/* Sur le plan du terrain et le plan des risques, la limite côté voie est en tirets sur un liseré blanc :
   en noir et blanc, elle ne se confond ni avec le contour du terrain (trait plein foncé, liseré blanc)
   ni avec les limites des zones (trait fin, sans liseré). */
.plan--terrain .plan__voie, .plan--risques .plan__voie { stroke-linecap: butt; stroke-dasharray: 12 6; }
.plan--terrain .l-voie, .plan--risques .l-voie { stroke-linecap: butt; stroke-dasharray: 6 3; }

/* Contraintes : un voile clair, puis une hachure propre à chaque catégorie */
.contrainte-voile { fill: #fcf9f2; fill-opacity: 0.4; }
.contrainte { stroke: var(--trait); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.motif { fill: none; stroke: var(--trait); stroke-width: 2.3; }
.motif-plein { fill: var(--trait); }
.contrainte--ebc, .motif--ebc { --trait: #1f6239; }
.contrainte--er, .motif--er { --trait: #8a1c2c; }
.contrainte--vegetal, .motif--vegetal { --trait: #4a7420; }
.contrainte--patrimoine, .motif--patrimoine { --trait: #8a3d1c; }
.contrainte--inconstructible, .motif--inconstructible { --trait: #17352b; }
.contrainte--gel, .motif--gel { --trait: #3f5567; }
.contrainte--autre, .motif--autre { --trait: #5f5b51; }
.motif--er { stroke-width: 1.7; }

/* Points de lecture du plan de prévention : carré, disque, triangle, petit cercle */
.ppr { stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.ppr--rouge { fill: var(--s-non); }
.ppr--bleu { fill: #2f6db5; }
.ppr--autre { fill: #6b5b95; }
.ppr--recommandation { fill: #fff; stroke: #2f6db5; stroke-width: 2.2; }
.ppr--hors { fill: #fff; stroke: var(--encre); stroke-width: 1.6; }

/* Sans photographie : le dessin passe à l'encre sur papier */
.sans-photo .plan__alentour { fill-opacity: 0; }
.sans-photo .plan__voisines path { stroke: var(--encre); stroke-opacity: 0.4; }
.sans-photo .plan__batis-voisins path { fill: var(--encre); fill-opacity: 0.07; stroke: var(--encre); stroke-opacity: 0.35; }
.sans-photo .plan__terrain-halo, .sans-photo .plan__voie-halo { stroke: var(--creux); }

.plan .nord { top: 0.6rem; right: 0.6rem; width: 1.9rem; padding: 0.3rem 0.4rem 0.15rem; background: rgba(252, 249, 242, 0.94); border-radius: 6px; box-shadow: 0 0 0 1px var(--filet); }
.plan__echelle { position: absolute; left: 0.6rem; bottom: 0.6rem; box-sizing: content-box; padding: 0.3rem 0.5rem 0.4rem; background: rgba(252, 249, 242, 0.94); border-radius: 6px; box-shadow: 0 0 0 1px var(--filet); font-size: 0.72rem; font-weight: 650; line-height: 1; }
.plan__echelle span { display: block; margin-bottom: 0.2rem; white-space: nowrap; }
.plan__echelle::after { content: ""; display: block; height: 5px; border: 1.5px solid var(--encre); border-top: 0; }

.plan__sous { margin-top: 0.7rem; }
.legende { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; font-size: var(--t-mention); color: var(--encre-2); line-height: 1.3; }
.legende li { display: inline-flex; align-items: center; gap: 0.45rem; }
.legende__signe { width: 30px; height: 18px; flex: none; overflow: hidden; }
.l-fond { fill: #8f927c; stroke: var(--filet-fort); stroke-width: 0.6; }
.sans-photo .l-fond { fill: var(--creux); }
.l-terrain-halo { fill: none; stroke: #fff; stroke-width: 4; }
.l-terrain { fill: none; stroke: var(--encre); stroke-width: 2; }
.l-voie-halo { fill: none; stroke: #fff; stroke-width: 6.5; stroke-linecap: round; }
.l-voie { fill: none; stroke: var(--accent); stroke-width: 3.8; stroke-linecap: round; }
.l-bati { fill: #3f564c; stroke: #fff; stroke-width: 1; }
.l-voisine { fill: none; stroke: #fff; stroke-opacity: 0.85; stroke-width: 1; }
.l-zonage { fill: rgba(47, 109, 181, 0.2); stroke: #2f6db5; stroke-width: 2.2; }
/* Limites des zones : un trait fin sur la photographie, sans liseré, comme sur le plan */
.l-zonage-trait { fill: none; stroke: #2f6db5; stroke-width: 1.6; }
.l-contrainte { stroke-width: 1; vector-effect: none; }
.legende .ppr { stroke: var(--encre); stroke-width: 0.8; vector-effect: none; }
.legende .ppr--recommandation { stroke: #2f6db5; stroke-width: 1.6; }
/* Légende des points de lecture du plan de prévention : une phrase qui dit ce qu'est un point, puis une ligne par cas */
.legende-points { margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid var(--filet); font-size: var(--t-mention); line-height: 1.35; color: var(--encre-2); }
.legende-points__titre { color: var(--encre); font-weight: 600; }
.legende--points { flex-direction: column; margin-top: 0.4rem; gap: 0.3rem; }
.plan__credit { margin-top: 0.5rem; }
.plan__sans-photo { display: none; }
.sans-photo .plan__sans-photo { display: inline; }

/* ---------- Origine des faits ---------- */
.origine { margin-top: 0.4rem; font-size: 0.8rem; line-height: 1.45; color: var(--encre-3); }
.origine a { text-decoration-color: var(--filet-fort); text-decoration-thickness: 1px; }
.origine a:hover { color: var(--accent-fonce); text-decoration-color: currentColor; }
.origine__sep { color: var(--filet-fort); }
.origine__source--panne { color: var(--s-na-texte); }
.origine__panne { display: inline-block; width: 0.62em; height: 0.62em; margin-right: 0.4em; border: 1.5px dashed currentColor; border-radius: 50%; vertical-align: baseline; }
.reference { white-space: normal; }
.libelle__code { font-size: 0.86em; font-weight: 450; color: var(--encre-3); letter-spacing: 0.01em; }
.reference--absente { text-decoration: underline dotted; }

/* ---------- Raisons ---------- */
.raison { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 0.8rem; padding: 0.9rem 0; border-top: 1px solid var(--filet); }
.raison__marque { padding-top: 0.12rem; line-height: 0; }
.raison__texte { font-size: 0.97rem; line-height: 1.55; }
.raison--decisive .raison__texte { font-weight: 520; }
.raison__effet { display: block; margin-bottom: 0.1rem; }

/* ---------- Points d'attention ---------- */
.attention { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 0.8rem; padding: 0.85rem 0; border-top: 1px solid var(--filet); }
.attention__titre { font-family: var(--sans); font-size: 0.97rem; font-weight: 650; line-height: 1.35; }
.attention__texte { font-size: 0.95rem; color: var(--encre-2); margin-top: 0.1rem; }

/* ---------- Encadrés ---------- */
.encadre { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 1.1rem 1.25rem; }
.encadre > * + * { margin-top: 0.6rem; }
.encadre--filet { border-left: 3px solid var(--accent); border-radius: 0 var(--rayon) var(--rayon) 0; }
.encadre--creux { background: var(--creux); border-color: transparent; }
.encadre__titre { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; line-height: 1.25; }
.encadre ul.puces { margin-top: 0.5rem; }

ul.puces > li { position: relative; padding-left: 1.1rem; }
ul.puces > li + li { margin-top: 0.3rem; }
ul.puces > li::before { content: ""; position: absolute; left: 0.1rem; top: 0.7em; width: 0.45rem; height: 2px; border-radius: 1px; background: var(--accent); }

/* ---------- Mesures : les chiffres du terrain ---------- */
.mesures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--filet); border: 1px solid var(--filet); border-radius: var(--rayon); overflow: hidden; }
.mesure { background: var(--feuille); padding: 0.85rem 1rem 0.9rem; }
.mesure__nom { display: block; }
.mesure__valeur { display: block; margin-top: 0.25rem; font-family: var(--serif); font-size: 1.45rem; font-weight: 560; line-height: 1.1; letter-spacing: -0.01em; }
.mesure__valeur small { font-family: var(--sans); font-size: 0.8rem; font-weight: 500; color: var(--encre-2); letter-spacing: 0; }
.mesure__detail { display: block; margin-top: 0.3rem; font-size: 0.8rem; line-height: 1.4; color: var(--encre-3); }

/* ---------- Tableaux ---------- */
.table-defile { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-petit); line-height: 1.4; }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.55rem 0.75rem 0.55rem 0; border-top: 1px solid var(--filet); font-weight: 400; }
.table thead th { border-top: 0; padding-bottom: 0.4rem; font-size: var(--t-surtitre); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--encre-2); }
.table tbody th { font-weight: 600; }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table .droite { text-align: right; }
.source__critique { color: var(--accent-fonce); font-weight: 700; }
.source__date { white-space: nowrap; }

.etat { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font-weight: 600; }
.etat__signe { width: 0.7rem; height: 0.7rem; border-radius: 50%; flex: none; }
.etat--ok { color: var(--s-oui-texte); }
.etat--ok .etat__signe { background: var(--s-oui); }
.etat--panne { color: var(--s-na-texte); }
.etat--panne .etat__signe { border: 1.5px dashed var(--s-na); }
.etat--attente { color: var(--s-inconnu-texte); }
.etat--attente .etat__signe { border: 1.5px solid var(--s-inconnu); }

/* Tableau des sources sur écran étroit : chaque source devient une petite fiche */
@container (max-width: 560px) {
  .table--sources thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table--sources, .table--sources tbody { display: block; }
  .table--sources tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--filet); }
  .table--sources th, .table--sources td { border: 0; padding: 0; }
  .table--sources td:nth-child(2) { grid-row: 2; grid-column: 1; font-size: var(--t-mention); color: var(--encre-3); }
  .table--sources td:nth-child(3) { grid-row: 1; grid-column: 2; }
  .table--sources td:nth-child(4) { grid-row: 2; grid-column: 2; font-size: var(--t-mention); color: var(--encre-3); text-align: right; }
}

.textes-cites { font-size: var(--t-mention); line-height: 1.45; }
.textes-cites li { display: flex; flex-wrap: wrap; gap: 0 0.75rem; justify-content: space-between; padding: 0.4rem 0; border-top: 1px solid var(--filet); }
.textes-cites__nom { font-weight: 600; color: var(--encre); }
.textes-cites__url { color: var(--encre-3); text-decoration-color: var(--filet-fort); text-decoration-thickness: 1px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------- Lexique et bulle d'explication ---------- */
.terme { text-decoration: underline dotted var(--encre-3); text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: help; border-radius: 2px; }
.terme:hover, .terme:focus-visible { background: var(--creux); }

.bulle { position: absolute; z-index: 30; padding: 0.7rem 0.85rem 0.8rem; background: var(--encre); color: var(--feuille); border-radius: 8px; font-size: 0.86rem; line-height: 1.45; box-shadow: 0 6px 18px rgba(23, 53, 43, 0.18); pointer-events: none; }
.bulle strong { display: block; margin-bottom: 0.2rem; font-family: var(--serif); font-size: 0.98rem; font-weight: 600; }
.bulle::after { content: ""; position: absolute; left: var(--fleche, 50%); width: 10px; height: 10px; background: var(--encre); transform: translateX(-50%) rotate(45deg); }
.bulle[data-cote="dessus"]::after { bottom: -5px; }
.bulle[data-cote="dessous"]::after { top: -5px; }

.lexique { container-type: inline-size; }
.lexique__entree { padding: 0.65rem 0; border-top: 1px solid var(--filet); }
.lexique__entree dt { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.lexique__entree dd { margin-top: 0.15rem; font-size: 0.93rem; color: var(--encre-2); line-height: 1.5; }
.lexique__entree:target { background: var(--creux); box-shadow: 0 0 0 0.5rem var(--creux); border-radius: 2px; }

/* ---------- Boutons et liens d'action ---------- */
.bouton { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border: 1px solid var(--encre); border-radius: 999px; background: transparent; color: var(--encre); font: 600 var(--t-petit) / 1.2 var(--sans); text-decoration: none; cursor: pointer; }
.bouton:hover { background: var(--encre); color: var(--feuille); }
.bouton--plein { background: var(--encre); color: var(--feuille); }
.bouton--plein:hover { background: #0f2a21; }
.bouton .picto { width: 1.1rem; height: 1.1rem; }

.lien-piece { display: inline-flex; align-items: baseline; gap: 0.35rem; font-weight: 600; }
.lien-piece .picto { width: 0.95em; height: 0.95em; align-self: center; }
.table tr.meme-annee > * { border-top-style: dotted; }

/* Verdict incomplet : une source critique muette, dit en tête */
.fiche-verdict__incomplet { margin: 0 2.8rem 0.9rem 0; padding: 0.7rem 0.85rem; border-radius: var(--rayon-petit); background: var(--s-inconnu-fond); border-left: 3px solid var(--s-inconnu); }
.fiche-verdict__incomplet > * + * { margin-top: 0.35rem; }
.fiche-verdict__incomplet-titre { font-weight: 650; line-height: 1.35; color: var(--s-inconnu-texte); }
.fiche-verdict__incomplet-detail { font-size: var(--t-mention); line-height: 1.45; color: var(--encre-2); }
.fiche-verdict__relire { min-height: 2.75rem; }
.fiche-verdict__adresse--proche { font-size: var(--t-mention); color: var(--encre-3); }
.fiche-verdict__adresse-nature { font-weight: 600; }

/* ---------- Les règles dessinées sur le terrain (rapport vérifié) ---------- */
.possibilites { display: grid; gap: 1.1rem; }
.plan--possibilites .plan__cadre { background: #fbf8f1; }
.plan--possibilites .plan__voisines path { stroke: var(--encre); stroke-opacity: 0.28; }
.plan--possibilites .plan__batis-voisins path { fill: var(--encre); fill-opacity: 0.05; stroke: var(--encre); stroke-opacity: 0.22; }
.poss__terrain { fill: #dfe7c9; fill-opacity: 0.75; stroke: none; }
.poss__bati { fill: #3f564c; stroke: #fbf8f1; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.poss__recul { fill: none; stroke-linecap: butt; stroke-linejoin: round; }
.poss__fond--voie { fill: #c8663c; fill-opacity: 0.2; }
.poss__trait--voie { fill: none; stroke: #a94f2a; stroke-width: 2.4; }
.poss__fond--limites { fill: #b98a2e; fill-opacity: 0.16; }
/* Côté voisins : un semis de points, pour se distinguer en noir et blanc des traits pleins du côté voie */
.poss__point--limites { fill: #7a5a17; stroke: none; }
.poss__chemin { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-dasharray: 9 6; stroke-linecap: butt; vector-effect: non-scaling-stroke; }
.legende .poss__chemin { stroke-width: 3; stroke-dasharray: 5 3; vector-effect: none; }
.legende .poss__terrain { stroke: none; }
.l-terrain-seul { fill: none; }
.poss__terrain--legende { stroke: var(--filet-fort) !important; stroke-width: 0.6; stroke-dasharray: 2 1.5; }
/* Tout le terrain dans le même cas du plan de prévention : des points petits et discrets */
.plan__ppr--uniforme .ppr { opacity: 0.8; stroke-width: 1; }
.legende .poss__bati { stroke-width: 1; vector-effect: none; }
.l-fond--papier { fill: #fbf8f1; }
.legende .poss__recul--voie, .legende .poss__recul--limites { stroke: var(--filet-fort); stroke-width: 0.6; }

.surfaces__titre { font-weight: 600; margin-bottom: 0.45rem; }
.surfaces__liste { display: grid; gap: 0.5rem; }
.surface-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 1rem; align-items: baseline; font-size: 0.93rem; line-height: 1.35; }
.surface-ligne__nom { color: var(--encre); }
.surface-ligne__valeur { font-weight: 600; white-space: nowrap; }
.surface-ligne__barre { grid-column: 1 / -1; display: block; height: 0.6rem; border-radius: 3px; background: var(--creux); box-shadow: inset 0 0 0 1px var(--filet); overflow: hidden; }
.surface-ligne__barre > span { display: block; height: 100%; background: var(--accent); border-radius: 3px 0 0 3px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.surface-ligne--terrain .surface-ligne__barre > span { background: #b9c69a; }
.surface-ligne--bati .surface-ligne__barre > span { background: #3f564c; }
.surfaces .mention { margin-top: 0.5rem; }

.gabarits__liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 13rem)); gap: 0.8rem 1.4rem; }
.gabarit__dessin { display: block; width: 100%; max-width: 13rem; height: auto; }
.gabarit__volume { fill: #dfe7c9; stroke: var(--encre); stroke-width: 1.3; stroke-linejoin: round; }
.gabarit__cote { fill: none; stroke: var(--accent); stroke-width: 1.3; }
.gabarit__repere { fill: none; stroke: var(--accent); stroke-width: 0.7; stroke-dasharray: 2.5 2.5; }
.gabarit__personne { fill: var(--encre-2); }
.gabarit__personne-corps { fill: none; stroke: var(--encre-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gabarit__cote-texte { font: 600 9px var(--sans); fill: var(--accent-fonce); }
.gabarit__sol { fill: none; stroke: var(--encre); stroke-width: 1.3; }
.gabarit__valeur { font-size: 0.93rem; line-height: 1.35; margin-top: 0.2rem; }
.gabarit__valeur strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.gabarit__regle { font-size: var(--t-mention); color: var(--encre-2); }
.gabarits .mention { margin-top: 0.5rem; }
.poss__zonage { opacity: 0.42; }
.sans-zonage .poss__legende-zonage { display: none; }

/* Passage du rapport complet au rapport vérifié : encadré d'écran, dans le rapport et sur la page de suivi. */
.passage { margin: 2rem 0 0; max-width: 46rem; }
.rapport > .passage { margin: 2.5rem auto 0; }
.passage .encadre__titre { margin-top: 0; }
.passage p:last-child { margin-bottom: 0; }
.suivi__passage-suite { margin-top: 1rem; }
