/* ═══════════════════════════════════════════════════════════════
   diag-overrides.css — surcouche DIAG par-dessus le socle de site.
   Chargé APRÈS site-shell.css : ne corrige que ce qui diffère
   (5 onglets, champs .pf-inp, pied d'action, classes .m-* propres).
   ═══════════════════════════════════════════════════════════════ */

/* Carte plein écran (Leaflet remplit #mapWrap → #map2d) */
html,
body {
  height: 100%;
}
body {
  overflow: hidden;
}
#map2d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 5 onglets STANDARM (site en a 4 par défaut) */
.tab-nav {
  grid-template-columns: repeat(5, 1fr);
}

/* Le <form> de l'onglet Étude empile ses cartes comme un .tab-pane */
#form-struct {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Champs de formulaire (reprennent le style .si de site, sans l'icône) ── */
.pf-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pf-row-half {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.pf-row-half > div,
.pf-row > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pf-lbl {
  display: block;
  margin-bottom: 2px;
  font-size: 8px; /* valeur exacte de site */
}
.pf-inp {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px; /* valeur exacte de site */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--tx);
  font-size: 11px; /* valeur exacte de site */
  font-family: var(--f);
  outline: none;
  transition: border-color 0.2s var(--ease);
}
.pf-inp:focus {
  border-color: var(--cu);
}
.pf-inp::placeholder {
  color: var(--t3);
}
select.pf-inp {
  cursor: pointer;
}
textarea.pf-inp {
  resize: vertical;
  min-height: 64px;
  line-height: 1.45;
}
.ec-val {
  font-size: 11px;
  color: var(--tx);
  font-weight: 600;
}

/* ── Pied d'action : bouton « Lancer le diagnostic » ── */
.pj-foot {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 6px -2px 0;
  padding: 10px 2px 2px;
  background: linear-gradient(to top, rgba(38, 38, 44, 0.96) 72%, transparent);
}
.pj-foot-btn {
  width: 100%;
}
.pj-foot-btn-primary {
  background: linear-gradient(135deg, var(--cu), var(--cu-d));
  color: #1a1206;
  border: none;
  border-radius: var(--r);
  padding: 11px 16px;
  font-weight: 700;
  font-size: 12px;
  font-family: var(--f);
  cursor: pointer;
  transition: filter 0.15s;
}
.pj-foot-btn-primary:hover {
  filter: brightness(1.08);
}
.pj-foot-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Titre des sous-panneaux du ruban ── */
.rp-title {
  font-family: var(--m);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t2);
  margin-right: 4px;
}

/* ── Classes .m-* propres à diag (site ne les définit pas) ── */
.m-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--tx);
  cursor: pointer;
  line-height: 1.35;
}
.m-check input {
  width: auto;
  flex-shrink: 0;
}
.m-rib-btn {
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--t2);
  font-size: 11px;
  font-family: var(--f);
  cursor: pointer;
  transition: all 0.15s;
}
.m-rib-btn:hover {
  color: var(--tx);
  border-color: var(--cu-d);
}
.m-rib-btn.is-active {
  background: rgba(212, 165, 116, 0.12);
  color: var(--cu);
  border-color: rgba(212, 165, 116, 0.3);
}
.m-rib-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--tx);
  cursor: pointer;
}
.m-alea-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--cu);
}
.m-ss-list {
  margin: 8px 0;
  padding-left: 16px;
  font-size: 11px;
  color: var(--t2);
  line-height: 1.5;
}
.m-ss-list li {
  margin-bottom: 3px;
}
.m-error {
  border-color: var(--er) !important;
}
.m-error pre {
  white-space: pre-wrap;
  font-size: 11px;
  color: var(--er);
  font-family: var(--m);
  margin: 0;
}

/* Marqueur d'adresse (divIcon Leaflet) */
.m-map-pin span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--cu);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Widget compte logé dans le ruban (ribbon-right) */
#madiorAccountRoot {
  display: flex;
  align-items: center;
}

/* Cibles tactiles ≥ 44px sur écrans tactiles (WCAG 2.5.5) — boutons localisation */
@media (pointer: coarse) {
  .flex-row .bt {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}
/* La liste de suggestions ne déborde pas de la sidebar */
#sugg.sg {
  max-height: 280px;
  overflow-y: auto;
}

/* ═══ Étapes STANDARM dans le ruban (après « Couches ») + zone centrale commutable ═══ */
/* Onglets d'étape (data-step) : état désactivé + pastille « données saisies ». */
.ribbon-tab.is-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ribbon-tab.is-step.has-data::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: middle;
}

/* Volet vertical agrandi + équilibré : démarre juste sous les onglets (top 2 au lieu
   de 8) et descend presque au bas (bottom 8 au lieu de 32 — diag n'a pas la barre de
   coordonnées de site). Plus de marge verte en haut, le pied « Lancer » respire. */
#S {
  top: 2px;
  bottom: 8px;
}

/* Étape 1 (Étude) = #S étroit (formulaire) + carte visible à droite ;
   étapes 2-5 = #S large qui remplit la zone centrale, carte masquée derrière. */
#S.s-wide {
  width: auto;
  right: 8px;
  background: rgba(30, 30, 34, 0.97);
}
#S.s-wide .tab-pane.act {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Mobile : contenu plein écran */
@media (max-width: 720px) {
  #S {
    left: 8px;
    right: 8px;
    width: auto;
  }
}

/* ═══ Sous-onglets du volet Étude (Projet · Terrain · Bâtiment · Réglem. · Export ·
   Dossiers) — Fond/Couches sont dans la barre horizontale au-dessus de la carte ═══ */
#etude-subnav.sub-nav {
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 4px;
}
/* ═══ Barre horizontale « Fond / Couches » au-dessus de la carte (façon site) ═══
   Les sous-onglets Fond/Couches d'Étude l'affichent ; elle dégage le volet #S à gauche. */
.map-toolbar {
  position: absolute;
  top: 8px;
  left: 406px;
  right: 8px;
  z-index: 1200;
  display: none;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 6px 12px;
  background: rgba(30, 30, 34, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.map-toolbar.act {
  display: flex;
}
[data-theme='light'] .map-toolbar {
  background: rgba(255, 255, 255, 0.95);
}
.mt-section {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.mt-section.act {
  display: flex;
}
/* Onglets internes de la barre (Fond de carte / Couches) — segmented façon site */
.mt-tabs {
  display: flex;
  gap: 3px;
  margin-right: 8px;
}
.mt-tab {
  font-family: var(--fm, monospace);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--t2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}
.mt-tab:hover {
  color: var(--cu);
}
.mt-tab.act {
  background: rgba(212, 165, 116, 0.15);
  color: var(--cu);
  border-color: var(--cu);
}
@media (max-width: 720px) {
  .map-toolbar {
    left: 8px;
    top: 4px;
  }
}

/* Sous-nav Examen (cockpit : Photo · Fissures · Tassement · Désordre · Mesure · Suivi) */
#examen-subnav.sub-nav {
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 4px;
}

/* Outil de mesure d'ouverture (canvas interactif + résultat) */
.mesure-canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  cursor: crosshair;
  background: #fff;
}
.m-mes-step {
  margin-top: 6px;
}
.m-mes-out {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 4px;
}
.m-mes-val {
  font-family: var(--fm, monospace);
  font-size: 22px;
  font-weight: 700;
  color: var(--cu);
}
.mesure-or {
  display: block;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--t2, var(--tx));
}

/* Suivi d'évolution (re-photo datée) : courbe SVG + qualification + points */
.suivi-wrap {
  width: min(640px, 92%);
  max-height: 100%;
  overflow-y: auto;
  padding: 18px 20px;
  background: var(--surface, #26262c);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.suivi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.suivi-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--tx);
}
.suivi-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.suivi-badge.is-ok {
  color: var(--ok, #34d399);
  background: rgba(52, 211, 153, 0.12);
}
.suivi-badge.is-warn {
  color: var(--wa, #fbbf24);
  background: rgba(251, 191, 36, 0.12);
}
.suivi-badge.is-alert {
  color: var(--er, #f87171);
  background: rgba(248, 113, 113, 0.14);
}
.suivi-svg {
  width: 100%;
  height: auto;
  display: block;
}
.suivi-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 4px;
}
.suivi-stats > div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sv-n {
  font-family: var(--m, monospace);
  font-size: 17px;
  font-weight: 700;
  color: var(--cu, #d4a574);
  font-variant-numeric: tabular-nums;
}
.sv-l {
  font-size: 11px;
  color: var(--t2, #8a8a94);
}
.suivi-alert {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.suivi-alert.is-ok {
  color: var(--ok, #34d399);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.suivi-alert.is-warn {
  color: var(--wa, #fbbf24);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.suivi-alert.is-alert {
  color: var(--er, #f87171);
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.suivi-plist {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 6px;
}
.sv-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 2px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.sv-date {
  font-family: var(--m, monospace);
  color: var(--t2, #8a8a94);
  min-width: 90px;
}
.sv-mm {
  font-family: var(--m, monospace);
  font-weight: 600;
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}
.sv-d {
  font-family: var(--m, monospace);
  font-size: 12px;
  color: var(--t2, #8a8a94);
}
.sv-d.up {
  color: var(--er, #f87171);
}
.sv-d.down {
  color: var(--ok, #34d399);
}
.sv-del {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--t3, #5a5a64);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 5px;
}
.sv-del:hover {
  color: var(--er, #f87171);
  background: rgba(248, 113, 113, 0.1);
}

/* Matériaux & sols — fiches de caractéristiques de référence */
.materiaux-ref-out {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mr-fiche {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cu, #d4a574);
  border-radius: 8px;
  background: var(--surface, #26262c);
}
.mr-fiche-sol {
  border-left-color: var(--wa, #fbbf24);
}
.mr-fiche-t {
  font-weight: 600;
  color: var(--tx);
  font-size: 13.5px;
  margin-bottom: 4px;
}
.mr-sol-nom {
  font-size: 12.5px;
  color: var(--t2, #8a8a94);
  margin: 0 0 4px;
}
.mr-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  padding: 2px 0;
  border-bottom: 1px dashed var(--line);
}
.mr-kv span {
  color: var(--t2, #8a8a94);
}
.mr-kv b {
  color: var(--tx);
  font-family: var(--m, monospace);
  white-space: nowrap;
}
.mr-rga-fort {
  color: var(--er, #f87171);
}
.mr-rga-moyen {
  color: var(--wa, #fbbf24);
}
.mr-avert {
  margin-top: 2px;
  font-style: italic;
}

/* Copilote IA (ruban) — fil de discussion streamé ancré normes */
.copilot-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(720px, 100%);
}
.copilot-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.copilot-title {
  font-weight: 600;
  color: var(--tx);
  font-size: 14px;
}
.copilot-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 46vh;
  min-height: 120px;
  overflow-y: auto;
  padding: 6px 2px;
}
.copilot-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.copilot-msg.is-user {
  align-self: flex-end;
  background: rgba(212, 165, 116, 0.16);
  border: 1px solid rgba(212, 165, 116, 0.32);
  color: var(--tx);
}
.copilot-msg.is-assistant {
  align-self: flex-start;
  background: var(--surface, #26262c);
  border: 1px solid var(--line);
  color: var(--tx);
}
.copilot-msg p {
  margin: 0 0 0.4em;
}
.copilot-msg p:last-child {
  margin-bottom: 0;
}
.copilot-msg ul {
  margin: 0.2em 0 0.4em;
  padding-left: 1.1em;
}
.copilot-msg li {
  margin: 0.1em 0;
}
.copilot-msg .cop-h {
  display: block;
  color: var(--cu, #d4a574);
  margin: 0.4em 0 0.2em;
}
.copilot-typing {
  color: var(--t2, #8a8a94);
  font-style: italic;
}
.copilot-err {
  color: var(--er, #f87171);
}
.copilot-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.copilot-chip {
  font-size: 12px;
  color: var(--t2, #8a8a94);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  text-align: left;
}
.copilot-chip:hover {
  color: var(--cu, #d4a574);
  border-color: var(--cu, #d4a574);
}
.copilot-input-group {
  display: flex;
  gap: 8px;
}
.copilot-input-group .pf-inp {
  flex: 1;
}
.copilot-cost {
  font-size: 12px;
  color: var(--t2, #8a8a94);
  padding: 6px 10px;
  background: rgba(52, 211, 153, 0.06);
  border-radius: 6px;
}
.copilot-cost-val {
  font-family: var(--m, monospace);
  font-weight: 600;
  color: var(--ok, #34d399);
}

/* Synthèse rédigée par l'IA (rapport) — bloc éditable + aperçu Markdown */
.m-synthese-ia {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.synthese-ia-text {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 10px 12px;
  font-family: var(--fm, monospace);
  font-size: 13px;
  line-height: 1.5;
  color: var(--tx);
  background: var(--bg2, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}
.synthese-ia-preview {
  margin-top: 10px;
  padding: 14px 16px;
  background: var(--bg2, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.55;
}
.synthese-ia-preview h2,
.synthese-ia-preview h3,
.synthese-ia-preview h4 {
  color: var(--cu);
  margin: 0.7em 0 0.3em;
}
.synthese-ia-preview h2 {
  font-size: 16px;
}
.synthese-ia-preview h3 {
  font-size: 14px;
}
.synthese-ia-preview ul {
  margin: 0.3em 0 0.6em;
  padding-left: 1.2em;
}
.synthese-ia-preview li {
  margin: 0.15em 0;
}
.synthese-ia-preview p {
  margin: 0.4em 0;
}

/* Détection AUTO de la largeur : aperçu annoté (fissure retenue) + pastille de confiance */
.m-auto-overlay {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.m-conf-haute,
.m-conf-moyenne,
.m-conf-faible {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.m-conf-haute {
  color: #1a7f45;
  background: #e8f6ee;
}
.m-conf-moyenne {
  color: #9a6a00;
  background: #fdf3e0;
}
.m-conf-faible {
  color: #a3382e;
  background: #fbe9e7;
}

/* Fiches « désordre de façade » (lecture photo ancrée corpus AQC) */
.m-fac-card {
  margin-top: 10px;
  padding: 12px;
  background: var(--c1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cu);
  border-radius: var(--r);
}
.m-fac-mec {
  margin: 6px 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tx);
}
.m-fac-sec {
  margin-top: 8px;
}
.m-fac-sec-t {
  display: block;
  font-family: var(--fm, monospace);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cu);
  margin-bottom: 3px;
}
.m-fac-list {
  margin: 0;
  padding-left: 16px;
}
.m-fac-list li {
  font-size: 12px;
  line-height: 1.45;
  color: var(--t2, var(--tx));
  margin-bottom: 2px;
}
.m-fac-cite {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 10px;
  color: var(--t2, var(--tx));
  font-style: italic;
}
/* Sous-navs Analyses / Rapport (cockpit : défilement vers section) */
#analyses-subnav.sub-nav,
#rapport-subnav.sub-nav {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 4px;
}

/* ═══ Zone graphique à droite (cockpit par onglet) — photo / visuel / aperçu ═══ */
.diag-graphic {
  position: absolute;
  inset: 0;
  z-index: 1; /* au-dessus de la carte (#mapWrap), sous le ruban (DOM) et #S (z-index) */
  display: none;
  align-items: center;
  justify-content: center;
  /* dégage le ruban (haut) et le panneau #S (gauche, 390px + marges) */
  padding: 60px 24px 24px 414px;
  background: var(--bg, #1e1e22);
}
.diag-graphic.act {
  display: flex;
}
.diag-graphic-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}
.diag-graphic-empty {
  max-width: 380px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--t3, #8a8a94);
}
@media (max-width: 720px) {
  .diag-graphic {
    padding: 56px 14px 14px;
  }
}

.sub-pane {
  display: none;
  flex-direction: column;
  gap: 10px;
}
.sub-pane.act {
  display: flex;
}
/* Liste des dossiers enregistrés */
.m-dossiers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m-dossier-item {
  text-align: left;
  padding: 9px 12px;
  background: var(--c1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--tx);
  font-family: var(--f);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.m-dossier-item:hover {
  border-color: var(--cu-d);
}
.m-dossier-item.act {
  border-color: var(--cu);
  color: var(--cu);
}

/* Lignes label/valeur des cartes Terrain (Eurocodes, Risques, Classe de sol…) */
.m-trow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.m-trow .pf-lbl {
  margin: 0;
}

/* ═══ Fiche dossier façon site (sélecteur + actions + points + 3 colonnes) ═══ */
.pj-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pj-head .pj-select {
  flex: 1;
  min-width: 0;
}
.pj-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--tx);
  font-size: 14px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.pj-btn:hover {
  border-color: var(--cu-d);
  color: var(--cu);
}
.pj-btn-del:hover {
  border-color: var(--er);
  color: var(--er);
}
.pj-cost {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 7px 10px;
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: var(--r);
}
.pj-cost-ico {
  font-size: 13px;
}
.pj-cost-lbl {
  flex: 1;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t2);
}
.pj-cost-val {
  font-family: var(--m);
  font-weight: 700;
  font-size: 13px;
  color: var(--ok);
}
.pf-row-third {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.pf-row-third > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pf-textarea {
  resize: vertical;
  min-height: 48px;
  line-height: 1.4;
  font-family: var(--f);
}

/* Sous-titre de section dans une carte (ex. « Géorisques » dans Eurocodes) */
.pf-subhead {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-family: var(--m);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t2);
}

/* Synthèse Eurocodes : badge viabilité A→E + listes contraintes/recommandations */
.m-via-badge.is-A {
  background: rgba(52, 211, 153, 0.16);
  color: var(--ok);
}
.m-via-badge.is-B {
  background: rgba(96, 165, 250, 0.16);
  color: var(--in);
}
.m-via-badge.is-C {
  background: rgba(251, 191, 36, 0.16);
  color: var(--wa);
}
.m-via-badge.is-D,
.m-via-badge.is-E {
  background: rgba(248, 113, 113, 0.18);
  color: var(--er);
}
.m-synth-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.m-synth-list li {
  position: relative;
  padding-left: 14px;
  font-size: 11px;
  color: var(--tx);
  line-height: 1.35;
}
.m-synth-list li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--t3);
}
.m-synth-list .m-via-alert {
  color: var(--er);
}
.m-synth-list .m-via-warn {
  color: var(--wa);
}
.m-synth-list .m-via-info {
  color: var(--t2);
}
.m-synth-reco li::before {
  content: '→';
  color: var(--cu);
}

/* ── Sondages BSS BRGM (forages réels via hydrogeo.bss) ── */
.m-bss-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 6px 0 4px;
}
.m-bss-stat {
  font-size: 11px;
  color: var(--t2);
}
.m-bss-stat strong {
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}
.m-bss-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.m-bss-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 10.5px;
  line-height: 1.3;
  padding: 2px 0;
  border-top: 1px solid var(--bd, rgba(255, 255, 255, 0.06));
}
.m-bss-id {
  font-weight: 600;
  color: var(--tx);
  white-space: nowrap;
}
.m-bss-meta {
  flex: 1;
  color: var(--t3);
}
.m-bss-fiche {
  color: var(--cu);
  text-decoration: none;
  white-space: nowrap;
}
.m-bss-fiche:hover {
  text-decoration: underline;
}

/* Analyse de plan : bouton « Analyser » + table « Données techniques extraites » */
.m-doc-analyze {
  margin-top: 3px;
  align-self: flex-start;
  padding: 2px 8px;
  background: rgba(212, 165, 116, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.25);
  border-radius: 4px;
  color: var(--cu);
  font-family: var(--f);
  font-size: 10px;
  cursor: pointer;
}
.m-doc-analyze:hover {
  background: rgba(212, 165, 116, 0.18);
}
.m-doc-analyze.is-done {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.08);
}
.m-ex-doc {
  margin-bottom: 8px;
}
.m-ex-head {
  font-size: 10px;
  font-weight: 700;
  color: var(--cu);
  margin-bottom: 4px;
}
.m-ex-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.m-ex-table th {
  text-align: left;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t3);
  padding: 2px 4px;
  border-bottom: 1px solid var(--line);
}
.m-ex-table td {
  padding: 3px 4px;
  color: var(--tx);
  border-bottom: 1px solid var(--line);
}
