/* ═══════════════════════════════════════════════════════════════
   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;
}

/* ── 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);
}

/* ── 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.is-active {
  background: rgba(212, 165, 116, 0.12);
  color: var(--cu);
  border-color: rgba(212, 165, 116, 0.3);
}
.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: 8px;
  bottom: 32px;
}

/* É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;
}
.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.act {
  background: rgba(212, 165, 116, 0.15);
  color: var(--cu);
  border-color: var(--cu);
}

/* 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;
}

/* 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-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-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);
}
.sv-d.up {
  color: var(--er, #f87171);
}
.sv-d.down {
  color: var(--ok, #34d399);
}

/* Matériaux & sols — fiches de caractéristiques de référence */
.materiaux-ref-out {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Copilote IA (ruban) — fil de discussion streamé ancré normes */
.copilot-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(720px, 100%);
}
.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-input-group .pf-inp {
  flex: 1;
}

/* 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);
}

/* 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;
}

/* 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);
}
/* 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;
}
.sub-pane.act {
  display: flex;
}
/* Liste des dossiers enregistrés */
.m-dossiers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.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;
}

/* 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);
}

/* ── Sondages BSS BRGM (forages réels via hydrogeo.bss) ── */
.m-bss-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 6px 0 4px;
}

/* 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.is-done {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════
   Cockpit GÉOTECHNIQUE — zone résultats (droite) + cartes de calcul
   ═══════════════════════════════════════════════════════════════════════ */
/* #main-content = colonne verticale : volet horizontal (fixe) + résultats (scroll). */
#main-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.calc-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 20px 44px 0;
  margin-left: 408px; /* décalage EXACT de site (#S 390 + gauche 8 + 10) */
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (max-width: 900px) {
  .calc-results {
    margin-left: 0;
    padding: 16px;
    max-width: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   VOLET HORIZONTAL — parité charte structure (.pjx-topbar + .m-ws-tab)
   Bande calée à droite du volet vertical #S : identité de section +
   sous-onglets de résultat + puces méthode. Forme le cadre en L (volet
   vertical + volet horizontal) qui encadre la zone graphique dans structure.
   ═══════════════════════════════════════════════════════════════════════ */
.geo-topbar,
.geo-mod-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 0 408px; /* ruban PLAT décalé 408 — copie .ribbon-panel de site */
  padding: 6px 14px;
  background: rgba(30, 30, 34, 0.94);
  backdrop-filter: var(--glass-l, blur(6px));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.geo-mod-head {
  min-height: 40px;
  box-sizing: border-box;
}
html[data-theme='light'] .geo-topbar,
html[data-theme='light'] .geo-mod-head {
  background: rgba(250, 248, 245, 0.94);
}
.geo-tb-id {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.geo-tb-ico {
  font-size: 16px;
  line-height: 1;
}
.geo-tb-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.geo-tb-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
  white-space: nowrap;
}
.geo-tb-sub {
  font-size: 10.5px;
  color: var(--t2, #8a8a94);
  white-space: nowrap;
}
/* Sous-onglets résultat (pills, façon .m-ws-tab de structure) */
.geo-vsub {
  display: flex;
  gap: 3px;
  padding: 3px;
  margin-left: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.geo-vsub::-webkit-scrollbar {
  height: 0;
}
.geo-vtab {
  flex: none;
  padding: 4px 11px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--t2, #8a8a94);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.14s var(--ease, ease),
    color 0.14s var(--ease, ease);
}
.geo-vtab:hover {
  color: var(--tx);
}
.geo-vtab.act {
  background: rgba(212, 165, 116, 0.14); /* tuile cuivre */
  color: var(--cu, #d4a574);
  box-shadow: inset 0 -2px 0 var(--cu, #d4a574);
}
/* Puces méthode (façon signaux .bat-sig, à droite) */
.geo-tb-meta {
  display: flex;
  gap: 5px;
  margin-left: auto;
  flex: none;
}
.geo-chip {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--m, monospace);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--t2, #8a8a94);
  letter-spacing: 0.02em;
}
@media (max-width: 900px) {
  .geo-topbar {
    margin: 10px 12px 6px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .geo-tb-meta {
    margin-left: 0;
  }
}
.calc-empty {
  color: var(--t2, #8a8a94);
  font-size: 14px;
  line-height: 1.6;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: var(--rl, 10px);
  background: rgba(255, 255, 255, 0.02);
}
.calc-badge {
  font-family: var(--m, monospace);
  font-weight: 700;
}
.calc-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.calc-kv span {
  color: var(--t2, #8a8a94);
}
.calc-kv b {
  color: var(--tx);
  font-family: var(--m, monospace);
}
.calc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 4px;
}
.calc-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cs-n {
  font-family: var(--m, monospace);
  font-size: 19px;
  font-weight: 700;
  color: var(--cu, #d4a574);
  font-variant-numeric: tabular-nums;
}
.cs-l {
  font-size: 11px;
  color: var(--t2, #8a8a94);
}
.calc-etat {
  font-family: var(--m, monospace);
  font-weight: 600;
}
/* Mapping état → couleur (verdicts portance/tassement + niveaux d'aléa) */
.calc-etat.is-acceptable,
.calc-etat.is-faible,
.calc-etat.is-negligeable,
.calc-etat.is-ok,
.calc-etat.is-OK {
  color: var(--ok, #34d399);
}
.calc-etat.is-modere,
.calc-etat.is-moyen,
.calc-etat.is-eleve,
.calc-etat.is-limite,
.calc-etat.is-ATTENTION {
  color: var(--wa, #fbbf24);
}
.calc-etat.is-fort,
.calc-etat.is-excessif,
.calc-etat.is-critique,
.calc-etat.is-inacceptable,
.calc-etat.is-insuffisant,
.calc-etat.is-TASSEMENT_EXCESSIF {
  color: var(--er, #f87171);
}
.calc-etat.is-neutre,
.calc-etat.is-indicatif {
  color: var(--cu, #d4a574);
}
.calc-warn {
  padding: 10px 14px;
}
.calc-warn summary {
  cursor: pointer;
  color: var(--wa, #fbbf24);
  font-size: 13px;
}
.calc-warn ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--t2, #8a8a94);
}
.calc-err .calc-errpre {
  white-space: pre-wrap;
  font-size: 12px;
  color: var(--er, #f87171);
  font-family: var(--m, monospace);
  margin: 0;
}
/* Harmonise les couches (classes m-couche* de styles.css) avec le cockpit sombre */
.m-couche {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.m-couche-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.m-couche-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.m-couche-fields input,
.m-couche-fields select {
  width: 100%;
}
.m-btn-remove {
  background: none;
  border: none;
  color: var(--t3, #5a5a64);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.m-btn-remove:hover {
  color: var(--er, #f87171);
}

/* ═══════════════════════════════════════════════════════════════════════
   SHELL PRO (parité x-structure) — intégration ruban m-ds-header + onglets
   ═══════════════════════════════════════════════════════════════════════ */

/* Le cuivre du shell (var(--m-copper) de shell.css) suit le cuivre geotech. */
:root {
  --m-copper: #d4a574;
  --m-copper-dark: #d4a574;
  --m-copper-light: #e0b890;
}
html[data-theme='light'] {
  --m-copper-dark: #a9743f;
}

/* Onglet de vue ACTIF : force le cuivre geotech (mêmes sélecteurs que shell.css,
   chargé après → gagne le départage). */
.m-rib-tab.active,
html[data-theme='dark'] .m-rib-tab.active,
html[data-theme='light'] .m-rib-tab.active {
  color: var(--cu, #d4a574);
  border-bottom-color: var(--cu, #d4a574);
  background: rgba(212, 165, 116, 0.12);
}

/* Corps = colonne verticale : header (auto) + contenu plein cadre (scrolle en interne). */
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.m-ds-header {
  flex: none;
  z-index: 1200;
}
#tab-content {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

/* Onglet ÉTUDE : le cockpit #L (site-shell) vit maintenant SOUS le header
   (plus de ruban fixe) → annule le décalage haut, remplit le conteneur. */
#tab-content #L.etude-cockpit {
  margin-top: 0;
  height: 100%;
}

/* ── Onglet PROJETS ─────────────────────────────────────────────────────── */
.geo-proj {
  display: flex;
  height: 100%;
  min-height: 0;
}
.geo-proj-side {
  flex: none;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  margin: 8px 0 8px 8px;
  background: rgba(38, 38, 44, 0.92);
  backdrop-filter: var(--glass, blur(10px));
  border: 1px solid var(--line);
  border-radius: var(--rl, 12px);
  box-shadow: var(--sh);
  overflow-y: auto;
}
html[data-theme='light'] .geo-proj-side {
  background: rgba(255, 255, 255, 0.9);
}
.geo-proj-side-h {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
}
.geo-proj-resume {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.geo-proj-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.geo-proj-n {
  font-family: var(--m, monospace);
  font-size: 20px;
  font-weight: 700;
  color: var(--cu, #d4a574);
  font-variant-numeric: tabular-nums;
}
.geo-proj-l {
  font-size: 12px;
  color: var(--t2, #8a8a94);
}
.geo-proj-new {
  width: 100%;
}
.geo-proj-hint {
  font-size: 11px;
  line-height: 1.5;
  color: var(--t3, #6a6a74);
  margin: 0;
}
.geo-proj-err {
  color: var(--er, #f87171);
  font-size: 13px;
}
.geo-proj-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.geo-proj-topbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 8px;
}
.geo-proj-subtabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.geo-proj-subtab {
  padding: 5px 14px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--t2, #8a8a94);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.14s var(--ease, ease);
}
.geo-proj-subtab:hover {
  color: var(--tx);
}
.geo-proj-subtab.act {
  background: rgba(212, 165, 116, 0.14);
  color: var(--cu, #d4a574);
  box-shadow: inset 0 -2px 0 var(--cu, #d4a574);
}
.geo-proj-count {
  font-size: 12px;
  color: var(--t2, #8a8a94);
  margin-left: auto;
}
.geo-proj-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 16px 24px;
}
.geo-proj-list,
.geo-proj-docs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 820px;
}
.geo-proj-item,
.geo-proj-doc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(30, 30, 34, 0.6);
  color: var(--tx);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s var(--ease, ease);
}
html[data-theme='light'] .geo-proj-item,
html[data-theme='light'] .geo-proj-doc {
  background: rgba(255, 255, 255, 0.7);
}
.geo-proj-item:hover,
.geo-proj-doc:hover {
  border-color: var(--cu, #d4a574);
}
.geo-proj-item-t,
.geo-proj-doc-t {
  font-size: 14px;
  font-weight: 600;
}
.geo-proj-item-m {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--t2, #8a8a94);
}
.geo-proj-item-d {
  margin-left: auto;
}
.geo-proj-item-s {
  font-size: 12px;
  color: var(--t2, #8a8a94);
}
.geo-proj-doc-c {
  font-size: 12px;
  color: var(--t2, #8a8a94);
}
.geo-proj-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}
.geo-proj-badge.is-act {
  color: var(--ok, #34d399);
  border: 1px solid var(--ok, #34d399);
}
.geo-proj-badge.is-arch {
  color: var(--t3, #6a6a74);
  border: 1px solid var(--line);
}
.geo-proj-vide {
  max-width: 460px;
  margin: 40px auto;
  text-align: center;
  color: var(--t2, #8a8a94);
}
.geo-proj-vide-ico {
  font-size: 40px;
  margin-bottom: 8px;
}
.geo-proj-vide p {
  margin: 6px 0;
}
.geo-proj-load {
  color: var(--t2, #8a8a94);
  font-size: 13px;
}

/* ── Page calculateur (module) ──────────────────────────────────────────── */
/* ── COCKPIT calculateur : volet horizontal + volet vertical + zone graphique
   Métriques ALIGNÉES sur l'onglet Étude de sol (= cockpit « site ») pour une
   parité EXACTE : volet vertical #S (absolute, gauche 8px / haut 2px, LARGEUR
   390px, pleine hauteur), volet horizontal .geo-topbar (flottant, décalé 414px,
   hauteur 44px), contenu .calc-results (décalé 414px). Le gabarit partagé
   (.geo-mod-head + .geo-mod-work[form|res]) reproduit ces cotes sans toucher la
   logique de chaque calculateur. ─────────────────────────────────────────── */
.geo-mod {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
/* VOLET HORIZONTAL — ruban PLAT décalé 408px, bord bas (copie exacte de la
   .ribbon-panel de site.madior.io ; PAS d'arrondi). */
/* Fil d'ariane : Sous-applications › Ouvrage (ancêtres cliquables) */
.geo-crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-width: 0;
}
.geo-mod-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--tx);
}
.geo-mod-norme {
  margin-left: auto;
  font-family: var(--m, monospace);
  font-size: 11px;
  color: var(--cu, #d4a574);
}
/* Corps du cockpit : occupe tout l'espace sous le ruban. Le volet vertical est
   flottant (absolute) → geo-mod-work reste STATIQUE pour que #S se positionne
   par rapport à .geo-mod. */
.geo-mod-work {
  flex: 1 1 auto;
  min-height: 0;
  position: static;
  display: flex;
  overflow: hidden;
  padding: 0;
  max-width: none;
}
/* VOLET VERTICAL — copie EXACTE de #S (site) : top 8, gauche 8, bas 32, L 390,
   padding 16, fond rgba(38,38,44,.92), bordure + radius var(--rl). */
.geo-mod-form {
  position: absolute;
  top: 8px;
  left: 8px;
  bottom: 32px;
  width: 390px;
  box-sizing: border-box;
  z-index: 1100;
  margin: 0;
  padding: 16px;
  overflow-y: auto;
  background: rgba(38, 38, 44, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--rl, 10px);
}
html[data-theme='light'] .geo-mod-form {
  background: rgba(255, 255, 255, 0.92);
}
/* VOLET À ONGLETS — barre segmentée (Géotechnique · Charge · Hypothèses · … ) */
.geo-voltab-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 3px;
  margin: 0 0 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: 9px;
  position: sticky;
  top: -16px;
  z-index: 2;
}
.geo-voltab {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 3px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--t2, #8a8a94);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.2px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    background 0.12s,
    color 0.12s;
}
.geo-voltab:hover:not(:disabled):not(.is-active) {
  color: var(--t1, #e8e6e3);
}
.geo-voltab.is-active {
  background: rgba(212, 165, 116, 0.18);
  color: var(--cu, #d4a574);
  box-shadow: inset 0 0 0 1px rgba(212, 165, 116, 0.3);
}
.geo-voltab:disabled {
  opacity: 0.4;
  cursor: default;
}
.geo-voltab-panel {
  display: none;
}
.geo-voltab-panel.is-active {
  display: block;
}
.geo-voltab-note {
  font-size: 12px;
  color: var(--t2, #8a8a94);
  line-height: 1.5;
  margin: 4px 0 12px;
}
/* VOLET HORIZONTAL — onglets de sortie (Vue · Résultats · Note · Export),
   en haut de la zone graphique (façon onglets de bureau Robot). */
.geo-htabs {
  display: flex;
  gap: 2px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg1, #14141a);
}
html[data-theme='light'] .geo-htabs {
  background: #faf7f2;
}
.geo-htab {
  padding: 7px 15px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--t2, #8a8a94);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 0.12s,
    border-color 0.12s;
}
.geo-htab:hover:not(:disabled):not(.is-active) {
  color: var(--t1, #e8e6e3);
}
.geo-htab.is-active {
  color: var(--cu, #d4a574);
  border-bottom-color: var(--cu, #d4a574);
}
.geo-htab:disabled {
  opacity: 0.4;
  cursor: default;
}
.geo-hpanel {
  display: none;
}
.geo-hpanel.is-active {
  display: block;
}
/* Le schéma (1er enfant d'un panneau de sortie) = carte graphique épinglée. */
.geo-hpanel > .geo-svg-wrap:first-child {
  position: sticky;
  top: 40px;
  z-index: 2;
  margin: 0 0 14px;
  padding: 16px 14px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(rgba(212, 165, 116, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(212, 165, 116, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg2, #1a1a20);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.geo-hpanel > .geo-svg-wrap:first-child .geo-svg {
  max-width: 520px;
  margin: 0 auto;
}
.geo-svg-cap {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.2px;
  color: var(--t2, #8a8a94);
}
.geo-hpanel > .calc-empty {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* COCKPIT MULTI-FENÊTRES — la zone de droite devient un plan de travail :
   [barre d'onglets fixe | panneau actif qui remplit], sans scroll de page.
   Scopé à :has(.geo-htabs) pour ne PAS toucher les calculs non-cockpit. */
.geo-mod-res:has(.geo-htabs) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px 12px 10px 0;
}
.geo-mod-res:has(.geo-htabs) .geo-htabs {
  flex: none;
  margin-bottom: 8px;
}
.geo-mod-res:has(.geo-htabs) .geo-hpanels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}
.geo-mod-res:has(.geo-htabs) .geo-hpanel {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}
.geo-mod-res:has(.geo-htabs) .geo-hpanel.is-active {
  display: flex;
  flex-direction: column;
}
/* Vue = grille de fenêtres (.geo-vp-grid) qui remplit le panneau. */
.geo-hpanel[data-outpanel='vue'] {
  padding: 0;
}
/* Résultats · Note · Export = contenu défilant. */
.geo-mod-res:has(.geo-htabs) .geo-hpanel[data-outpanel='resultats'],
.geo-mod-res:has(.geo-htabs) .geo-hpanel[data-outpanel='note'],
.geo-mod-res:has(.geo-htabs) .geo-hpanel[data-outpanel='export'] {
  overflow-y: auto;
  padding-right: 2px;
}

/* ── NOTE DE CALCUL — document imprimable (onglet « Note de calcul ») ──────── */
.geo-note-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 26px 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg2, #1a1a20);
}
.geo-note-head {
  border-bottom: 2px solid var(--cu, #d4a574);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.geo-note-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--cu, #d4a574);
}
.geo-note-title {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--t1, #e8e6e3);
}
.geo-note-norme {
  font-size: 12px;
  color: var(--t2, #8a8a94);
  margin-top: 3px;
}
.geo-note-fig {
  margin: 0 0 16px !important;
  position: static !important;
}
.geo-note-body {
  font-size: 13px;
}
.geo-note-foot {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  font-style: italic;
  color: var(--t2, #8a8a94);
}

/* ── IMPRESSION — ne sortir QUE la note de calcul, en noir sur blanc ────────── */
@media print {
  /* masquer tout le chrome de l'application */
  .m-ds-header,
  .geo-domain-tabs,
  .geo-nav2,
  .geo-mod-head,
  .geo-mod-form,
  .geo-htabs,
  #m-particles,
  .m-account-widget,
  .geo-hpanel:not([data-outpanel='note']) {
    display: none !important;
  }
  /* dérouler la chaîne d'ancêtres (flex/overflow/marges) pour laisser couler la note */
  html,
  body,
  #tab-content,
  .geo-mod,
  .geo-mod-work,
  .geo-mod-res,
  .geo-hpanels,
  .geo-hpanel[data-outpanel='note'] {
    display: block !important;
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }
  .geo-note-doc {
    max-width: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
  }
  .geo-note-title,
  .geo-note-body,
  .geo-note-doc .calc-stat b,
  .geo-note-doc .cs-n {
    color: #000 !important;
  }
  .geo-note-fig {
    break-inside: avoid;
  }
  @page {
    margin: 14mm;
  }
}
/* Bouton d'action persistant sous les onglets (Calculer) */
.geo-mod-form .pj-foot {
  position: sticky;
  bottom: -16px;
  margin: 14px -16px -16px;
  padding: 12px 16px;
  background: inherit;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--rl, 10px) var(--rl, 10px);
}
/* ZONE PRINCIPALE (graphique + résultats) — décalée 408px (comme le contenu site). */
.geo-mod-res {
  flex: 1 1 auto;
  margin-left: 408px;
  min-width: 0;
  max-width: none;
  padding: 12px 14px 24px 0;
  box-sizing: border-box;
  overflow-y: auto;
}
/* ZONE GRAPHIQUE — le schéma (1er enfant) devient un canvas épinglé en haut. */
.geo-mod-res > .geo-svg-wrap:first-child {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 14px;
  padding: 16px 14px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(rgba(212, 165, 116, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(212, 165, 116, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg2, #1a1a20);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
html[data-theme='light'] .geo-mod-res > .geo-svg-wrap:first-child {
  background:
    linear-gradient(rgba(212, 165, 116, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(212, 165, 116, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    #faf7f2;
}
.geo-mod-res > .geo-svg-wrap:first-child .geo-svg {
  max-width: 520px;
  margin: 0 auto;
}
/* Placeholder de la zone graphique avant calcul. */
.geo-mod-res > .calc-empty {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.geo-mod-note {
  margin-top: 4px;
}
.geo-mod-soon {
  max-width: 520px;
  margin: 30px auto;
  text-align: center;
}
.geo-mod-soon-ico {
  font-size: 42px;
  margin-bottom: 6px;
}

/* ── Responsive shell ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .geo-proj {
    flex-direction: column;
  }
  .geo-proj-side {
    width: auto;
    margin: 8px;
  }
  .geo-mod {
    overflow-y: auto;
    display: block;
  }
  .geo-mod-head {
    margin: 8px 10px 4px;
  }
  .geo-mod-work {
    display: block;
    overflow: visible;
    padding: 10px;
  }
  .geo-mod-form {
    position: static;
    width: auto;
    inset: auto;
    overflow: visible;
    margin-bottom: 12px;
  }
  .geo-mod-res {
    margin-left: 0;
    height: auto;
    overflow: visible;
    padding: 0 0 24px;
  }
  .geo-mod-res > .geo-svg-wrap:first-child {
    position: static;
  }
}

/* ── Carte Leaflet (Projets → Carte) ────────────────────────────────────── */
.geo-map-wrap {
  height: 100%;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.geo-map {
  height: 100%;
  min-height: 320px;
  background: #16161a;
}
.geo-map-pin {
  background: none;
  border: none;
}
.geo-map-pin-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cu, #d4a574);
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.geo-map-note {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 800;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(30, 30, 36, 0.92);
  border: 1px solid var(--line);
  color: var(--t2, #8a8a94);
  font-size: 12px;
  line-height: 1.5;
}
html[data-theme='light'] .geo-map-note {
  background: rgba(255, 255, 255, 0.94);
}
.geo-map-pop {
  font-family: inherit;
}
.geo-map-pop-t {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}
.geo-map-pop-s {
  font-size: 11px;
  color: #888;
  margin-bottom: 6px;
}
.geo-map-pop-btn {
  padding: 3px 10px;
  border: none;
  border-radius: 6px;
  background: var(--cu, #d4a574);
  color: #1a1a1a;
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
}

/* ── Sélecteur de mission NF P94-500 (en-tête carte Sondage) ────────────── */
.geo-mission {
  flex: none;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cu, #d4a574);
  font-family: var(--m, monospace);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.geo-mission:hover {
  border-color: var(--cu, #d4a574);
}
html[data-theme='light'] .geo-mission {
  background: rgba(255, 255, 255, 0.9);
}

/* ── Rangée d'essai pressiométrique (z · pl* · EM) ──────────────────────── */
.geo-pressio-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

/* ── Semelle sous torseur (multi-cas) : formulaire large + tableaux ──────── */
.geo-torseur-form {
  margin: 8px 20px 24px 414px;
  max-width: 1100px;
}
.geo-tor-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.geo-tor-table,
.geo-snd-table,
.geo-cpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.geo-tor-table th,
.geo-snd-table th,
.geo-cpt-table th {
  text-align: left;
  padding: 7px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--t2, #8a8a94);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.geo-tor-table td,
.geo-snd-table td,
.geo-cpt-table td {
  padding: 3px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.geo-tor-in,
.geo-snd-in,
.geo-cpt-in {
  min-width: 68px;
  padding: 4px 6px;
  font-size: 12px;
}
.geo-snd-in[data-f='nom'] {
  min-width: 52px;
}
.geo-tor-in[data-f='label'] {
  min-width: 74px;
}
.geo-tor-del,
.geo-snd-del,
.geo-cpt-del {
  background: none;
  border: none;
  color: var(--t3, #6a6a74);
  cursor: pointer;
  font-size: 13px;
}
.geo-tor-del:hover,
.geo-snd-del:hover,
.geo-cpt-del:hover {
  color: var(--er, #f87171);
}
/* Barre de sélection de phase (écran de soutènement) */
.geo-ec-phbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.geo-ec-phbar .ec-phbtn {
  font-size: 11px;
  padding: 4px 10px;
}
.geo-ec-phbar .ec-phbtn.is-active {
  background: var(--cu, #d4a574);
  border-color: var(--cu, #d4a574);
  color: #1a1a20;
  font-weight: 600;
}
.geo-tor-out td {
  padding: 6px 8px;
  font-family: var(--m, monospace);
  font-variant-numeric: tabular-nums;
}
.geo-t3 {
  color: var(--t3, #6a6a74);
}

/* ── Schémas SVG des éléments calculés (coupes cotées) ──────────────────── */
.geo-svg-wrap {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}
.geo-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
}
.geo-svg-cap {
  margin-top: 4px;
  font-size: 11px;
  color: var(--t2, #8a8a94);
}
.geo-svg-excav {
  fill: rgba(0, 0, 0, 0.18);
}
.geo-svg-struct {
  fill: rgba(212, 165, 116, 0.22);
  stroke: var(--cu, #d4a574);
  stroke-width: 1.6;
}
.geo-svg-circle {
  fill: rgba(248, 113, 113, 0.06);
  stroke: var(--er, #f87171);
  stroke-width: 1.4;
  stroke-dasharray: 5 3;
}
.geo-svg-dim {
  stroke: var(--t2, #8a8a94);
  stroke-width: 0.8;
}
.geo-svg-dimt {
  fill: var(--t2, #8a8a94);
  font-size: 9px;
  font-family: var(--m, monospace);
}
.geo-svg-load {
  stroke: var(--cu, #d4a574);
  stroke-width: 1.8;
}
.geo-svg-loadt {
  fill: var(--cu, #d4a574);
  font-size: 9px;
  font-weight: 600;
  font-family: var(--m, monospace);
}
/* Vue en plan : aire effective réduite (A′=B′·L′) + point d'application de charge. */
.geo-svg-eff {
  fill: rgba(212, 165, 116, 0.3);
  stroke: var(--cu, #d4a574);
  stroke-width: 1;
  stroke-dasharray: 4 2;
}
.geo-svg-loadpt {
  fill: var(--er, #f87171);
  stroke: var(--bg2, #1a1a20);
  stroke-width: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════
   FENÊTRES GRAPHIQUES MULTIPLES (façon Arche / Robot / Foxta)
   La zone principale devient un plan de travail 100 % graphique : grille de
   fenêtres avec barre de titre (Élévation · Plan · 3D · Courbes) ; les
   résultats textuels vivent dans le VOLET VERTICAL (.geo-volet-results).
   ═══════════════════════════════════════════════════════════════════════ */
/* La zone résultats passe en « plan de travail » : plus de scroll de page,
   les fenêtres remplissent la hauteur disponible. */
.geo-mod-res.geo-vp-host {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px 12px 10px 0;
}
.geo-vp-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(0, 1fr);
}
.geo-vp-grid.geo-vp-n1 {
  grid-template-columns: 1fr;
}
.geo-vp-grid.geo-vp-n3 .geo-vp-wide {
  grid-column: 1 / -1;
}
/* Fenêtre agrandie : elle seule reste visible, pleine zone. */
.geo-vp-grid.geo-vp-has-max {
  grid-template-columns: 1fr;
}
.geo-vp-grid.geo-vp-has-max .geo-vp {
  display: none;
}
.geo-vp-grid.geo-vp-has-max .geo-vp.geo-vp-maxed {
  display: flex;
  grid-column: 1 / -1;
}
.geo-vp {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(rgba(212, 165, 116, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(212, 165, 116, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg2, #1a1a20);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
html[data-theme='light'] .geo-vp {
  background:
    linear-gradient(rgba(212, 165, 116, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(212, 165, 116, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    #faf7f2;
}
.geo-vp-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: rgba(30, 30, 34, 0.94);
  border-bottom: 1px solid var(--line);
}
html[data-theme='light'] .geo-vp-bar {
  background: rgba(250, 248, 245, 0.94);
}
.geo-vp-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--cu, #d4a574);
  flex: none;
}
.geo-vp-title {
  font-family: var(--m, monospace);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t2, #8a8a94);
}
.geo-vp-hint {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--t3, #6a6a74);
  white-space: nowrap;
}
.geo-vp-btn {
  flex: none;
  margin-left: 6px;
  width: 22px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--t2, #8a8a94);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.geo-vp-btn:hover {
  color: var(--cu, #d4a574);
  border-color: var(--cu, #d4a574);
}
.geo-vp-hint + .geo-vp-btn {
  margin-left: 6px;
}
.geo-vp-btn:first-of-type {
  margin-left: auto;
}
.geo-vp-hint ~ .geo-vp-btn {
  margin-left: 6px;
}
.geo-vp-body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
/* Fenêtres SVG/HTML : contenu centré, défilement interne si besoin. */
.geo-vp-body.geo-vp-flat {
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.geo-vp-body.geo-vp-flat .geo-svg {
  max-width: min(560px, 100%);
  max-height: 100%;
  height: auto;
}
.geo-vp-body.geo-vp-flat .geo-svg-wrap {
  border: none;
  background: transparent;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* ── Résultats dans le VOLET VERTICAL ──────────────────────────────────── */
.geo-volet-results {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid rgba(212, 165, 116, 0.35);
}
.geo-volet-results-head {
  font-family: var(--m, monospace);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cu, #d4a574);
  margin-bottom: 8px;
}
/* Les cartes de stats passent en 2 colonnes (volet 390px) et se compactent. */
.geo-volet-results .calc-stats {
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 8px 0 4px;
}
.geo-volet-results .calc-stat {
  padding: 7px 9px;
}
.geo-volet-results .cs-n {
  font-size: 15px;
}
.geo-volet-results .cs-l {
  font-size: 10px;
}
.geo-volet-results .calc-kv {
  font-size: 12px;
  padding: 4px 0;
}
.geo-volet-results .card {
  margin-top: 8px;
}
.geo-volet-results h4 {
  font-size: 12px;
  margin: 10px 0 4px;
}
.geo-volet-results .geo-tor-wrap {
  overflow-x: auto;
}
.geo-volet-results table {
  font-size: 11px;
}

/* Responsive : fenêtres empilées, hauteur fixe par fenêtre. */
@media (max-width: 900px) {
  .geo-mod-res.geo-vp-host {
    overflow-y: auto;
    padding: 10px;
  }
  .geo-vp-grid {
    display: flex;
    flex-direction: column;
  }
  .geo-vp {
    min-height: 260px;
  }
  .geo-vp-grid.geo-vp-has-max .geo-vp {
    display: flex;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   ATELIER PLAN DE COFFRAGE — zone graphique CAO plein cadre (engine2d)
   ═══════════════════════════════════════════════════════════════════════ */
.geo-plan-wrap {
  position: absolute;
  inset: 0;
  top: 44px; /* sous le ruban .geo-mod-head */
  overflow: hidden;
  background: var(--bg2, #1a1a20);
  display: flex;
}
.geo-plan-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.geo-plan-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.geo-plan-hud {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.geo-plan-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 165, 116, 0.14);
  border: 1px solid rgba(212, 165, 116, 0.3);
  color: var(--cu, #d4a574);
  font-family: var(--m, monospace);
  font-size: 11px;
  font-weight: 600;
}
.geo-plan-hint {
  font-family: var(--m, monospace);
  font-size: 11px;
  color: var(--t2, #8a8a94);
  font-variant-numeric: tabular-nums;
}

/* Barre d'outils flottante (haut-gauche de la scène) */
.geo-plan-toolbar {
  position: absolute;
  top: 10px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.geo-plan-tool {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(20, 20, 26, 0.82);
  border: 1px solid rgba(212, 165, 116, 0.28);
  color: var(--t1, #e8e6e3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.geo-plan-tool:hover {
  border-color: var(--cu, #d4a574);
}
.geo-plan-tool.is-on {
  background: rgba(212, 165, 116, 0.22);
  border-color: var(--cu, #d4a574);
  color: var(--cu, #d4a574);
}

/* Overlay des textes (repères / cotes) — projeté via camera.worldToScreen */
.geo-plan-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.geo-plan-lab {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
.geo-plan-lab-rep {
  font-family: var(--m, monospace);
  font-size: 12px;
  font-weight: 700;
  color: var(--cu, #d4a574);
}
.geo-plan-lab.is-ok .geo-plan-lab-rep {
  color: #34d399;
}
.geo-plan-lab.is-no .geo-plan-lab-rep {
  color: #f87171;
}
.geo-plan-lab-sub {
  font-family: var(--m, monospace);
  font-size: 10px;
  color: var(--t2, #b8b4ae);
  font-variant-numeric: tabular-nums;
}

/* Volet vertical droit — outils + résultats (pas de texte sur la zone graphique) */
.geo-plan-side {
  flex: 0 0 320px;
  width: 320px;
  overflow-y: auto;
  padding: 12px;
  box-sizing: border-box;
  background: var(--bg1, #14141a);
  border-left: 1px solid rgba(212, 165, 116, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.geo-plan-sec {
  background: var(--card, rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(212, 165, 116, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}
.geo-plan-sec-grow {
  flex: 1 1 auto;
  min-height: 120px;
  display: flex;
  flex-direction: column;
}
.geo-plan-sec-h {
  font-size: 12px;
  font-weight: 700;
  color: var(--cu, #d4a574);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.geo-plan-count {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--t2, #8a8a94);
}
.geo-plan-row3 {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.geo-plan-row3 > label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10.5px;
  color: var(--t2, #8a8a94);
}
.geo-plan-row3 .pf-inp {
  padding: 4px 6px;
  font-size: 12px;
}
.geo-plan-full {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
}
.geo-plan-file {
  display: block;
  text-align: center;
  cursor: pointer;
}
.geo-plan-chk {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--t2, #b8b4ae);
  margin: 8px 0 4px;
}
.geo-plan-note {
  font-size: 10.5px;
  color: var(--t2, #8a8a94);
  margin: 6px 0 0;
  line-height: 1.4;
}
.geo-plan-results {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.geo-plan-rescard {
  border: 1px solid rgba(212, 165, 116, 0.14);
  border-left: 3px solid rgba(212, 165, 116, 0.4);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.12s;
}
.geo-plan-rescard:hover {
  background: rgba(212, 165, 116, 0.06);
}
.geo-plan-rescard.is-ok {
  border-left-color: #34d399;
}
.geo-plan-rescard.is-no {
  border-left-color: #f87171;
}
.geo-plan-resh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.geo-plan-verdict {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}
.geo-plan-verdict.is-ok {
  color: #34d399;
  background: rgba(52, 211, 153, 0.14);
}
.geo-plan-verdict.is-no {
  color: #f87171;
  background: rgba(248, 113, 113, 0.14);
}
.geo-plan-resd {
  font-size: 11.5px;
  color: var(--t1, #e8e6e3);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
@media (max-width: 720px) {
  .geo-plan-wrap {
    flex-direction: column;
  }
  .geo-plan-side {
    flex: 0 0 auto;
    width: 100%;
    max-height: 45%;
    border-left: none;
    border-top: 1px solid rgba(212, 165, 116, 0.16);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   NAVIGATION 3 NIVEAUX — domaines (ruban) · ouvrages (sous-onglets) · méthodes (sélecteur)
   ═══════════════════════════════════════════════════════════════════════ */
/* Domaines dans le RUBAN (zone verte) — TOUJOURS visibles : ce sont eux qui
   mènent aux calculateurs (l'onglet « Sous-applications » a été supprimé). */
.geo-domain-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 18px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}
.geo-domain-tabs::-webkit-scrollbar {
  display: none;
}
.geo-domain-tab {
  padding: 5px 11px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--t2, #8a8a94);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.12s,
    color 0.12s;
}
.geo-domain-tab:hover {
  color: var(--tx, #e8e6e3);
  background: rgba(212, 165, 116, 0.1);
}
.geo-domain-tab.active {
  color: var(--cu, #d4a574);
  background: rgba(212, 165, 116, 0.16);
  box-shadow: inset 0 0 0 1px rgba(212, 165, 116, 0.3);
}
/* Zone calcul : sous-onglets d'ouvrages (fixe) + host (remplit la hauteur). */
#tab-content:has(.geo-calc-host) {
  display: flex;
  flex-direction: column;
}
.geo-nav2 {
  flex: none;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg1, #14141a);
  scrollbar-width: thin;
}
html[data-theme='light'] .geo-nav2 {
  background: #faf7f2;
}
.geo-ouvrage-tab {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--t2, #8a8a94);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 0.12s,
    border-color 0.12s,
    background 0.12s;
}
.geo-ouvrage-tab:hover {
  color: var(--tx, #e8e6e3);
  border-color: var(--cu, #d4a574);
}
.geo-ouvrage-tab.active {
  color: var(--cu, #d4a574);
  background: rgba(212, 165, 116, 0.14);
  border-color: var(--cu, #d4a574);
}
.geo-calc-host {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
/* CALCULATEURS : le volet vertical monte PLEINE HAUTEUR ; la barre d'ouvrages
   (sous-onglets) se SUPERPOSE à droite (décalée 408px) pour ne pas chevaucher
   le volet — même géométrie que .geo-mod-head (copie du cockpit site). */
#tab-content:has(.geo-nav2-over) {
  display: block;
  position: relative;
}
.geo-nav2.geo-nav2-over {
  position: absolute;
  top: 0;
  left: 408px;
  right: 0;
  z-index: 600;
}
#tab-content:has(.geo-nav2-over) .geo-calc-host {
  position: absolute;
  inset: 0;
}
/* Le ruban plat du calculateur (titre · type de calcul · norme) passe SOUS la
   barre d'ouvrages — deux volets horizontaux empilés à droite du volet vertical. */
#tab-content:has(.geo-nav2-over) .geo-mod-head {
  margin-top: 46px;
}
/* Vue ÉTUDE (barre en flux) : boutons alignés sur la zone de droite. */
.geo-nav2:not(.geo-nav2-over) {
  padding-left: 416px;
}
@media (max-width: 900px) {
  .geo-nav2:not(.geo-nav2-over) {
    padding-left: 12px;
  }
  /* Petits écrans : retour au flux empilé (le volet passe en pleine largeur). */
  #tab-content:has(.geo-nav2-over) {
    display: flex;
    flex-direction: column;
  }
  .geo-nav2.geo-nav2-over {
    position: static;
  }
  #tab-content:has(.geo-nav2-over) .geo-calc-host {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    min-height: 0;
  }
  #tab-content:has(.geo-nav2-over) .geo-mod-head {
    margin-top: 0;
  }
}
/* Sélecteur « Type de calcul » (méthodes) dans la tête du calculateur. */
.geo-method-pick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.geo-method-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t3, #6a6a74);
  white-space: nowrap;
}
.geo-method-sel {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg2, #1a1a20);
  color: var(--tx, #e8e6e3);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  max-width: 280px;
}
html[data-theme='light'] .geo-method-sel {
  background: #fff;
}
