/* Palette pilotée par le Theme Engine (modules/shared/theme-engine/theme-engine.css) —
   variables --bg/--surface/--text/--accent/--border/--shadow/--zone-* définies par
   thème sous [data-theme="dark"|"light"], appliquées globalement via :root. */
:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Échelle de rayons du Design System (Sprint Polish) — indépendante du thème,
     même langage graphique partout : sm = contrôles/puces, md = cartes, lg = gros
     panneaux (Synthèse nationale, topbar), xl = conteneurs principaux (carte,
     module-panel). */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 28px;

  /* Courbe d'accélération premium (micro-animations) — décélération naturelle,
     jamais un effet brutal. */
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);

  /* Footer institutionnel — hauteur du footer lui-même uniquement (Sprint Correction
     shell : ne sert plus à retrancher quoi que ce soit du budget 100vh de app-shell/
     main-content, cette mécanique créait un vide artificiel — cf. .app-footer). Le
     footer suit le contenu réel en flux normal ; il est atteignable par, au plus, un
     défilement égal à sa propre hauteur (mandat §6), jamais un vide plus grand. */
  --footer-height: 32px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.13), transparent 35%),
    var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  height: calc(100vh - var(--footer-height));
  min-height: calc(100vh - var(--footer-height));
  transition: grid-template-columns 0.2s ease;
}

/* Desktop historique (référence sig.fdsu.net) : labels courts 1 ligne,
   labels longs 2 lignes aux frontières de mot. Pas de nowrap forcé,
   pas d'ellipsis, pas de clipping. Tablette/mobile inchangés. */

.app-shell[data-sidebar-mode="compact"] {
  grid-template-columns: 76px 1fr;
}

.app-shell[data-sidebar-mode="hidden"] {
  grid-template-columns: 0px 1fr;
}

.app-shell[data-sidebar-mode="hidden"] .sidebar {
  padding: 0;
  border: none;
  opacity: 0;
  pointer-events: none;
  width: 0;
  min-width: 0;
  max-width: 0;
  overflow: visible;
}

/* ── Footer institutionnel (Sprint Shell Premium) ──────────────────────────────────────
   Bande pleine largeur sous .app-shell (sidebar + contenu), une seule ligne, glass
   discret — même langage que le reste du shell. Toutes les valeurs proviennent d'état
   déjà calculé ailleurs dans l'application (getDatabaseStatus()/health) ou de l'heure
   locale du poste ; rien n'est inventé, et un état réellement indisponible s'affiche
   comme tel ("—"), jamais une valeur simulée. */
.app-footer {
  height: var(--footer-height);
  min-height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 28px;
  background: var(--glass-panel-bg);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text-muted);
  font-size: 0.76rem;
  overflow: hidden;
}

.app-footer-group {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.app-footer-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.app-footer-item strong {
  color: var(--text);
  font-weight: 600;
}

.app-footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--text-muted);
  display: inline-block;
  flex-shrink: 0;
}

.app-footer-dot.is-ok {
  background: #22c55e;
}

.app-footer-dot.is-error {
  background: #ef4444;
}

@media (max-width: 900px) {
  .app-footer {
    height: auto;
    min-height: var(--footer-height);
    padding: 8px 16px;
  }
}

.sidebar {
  background: var(--glass-panel-bg);
  border-right: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
  transition: padding 0.2s ease, opacity 0.2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex: 0 0 auto;
}

/* Symbole institutionnel FDSU (contour RDC + 4 carrés officiels) — fond neutre, les
   couleurs viennent du symbole lui-même (identité FDSU), pas d'un dégradé décoratif. */
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.brand-mark svg {
  display: block;
}

.brand-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.workspace-switcher {
  margin: 14px 0 12px;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.workspace-switcher-label,
.workspace-context-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-switcher-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 7px 0;
}

.workspace-switch {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.68rem;
  cursor: pointer;
}

.workspace-switch:hover,
.workspace-switch:focus-visible,
.workspace-switch.is-active {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: var(--text);
}

.workspace-switch:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 1px;
}

.workspace-switch[hidden],
.nav-group[hidden] {
  display: none !important;
}

.workspace-switch > span:first-child {
  font-weight: 800;
  color: #38bdf8;
}

.workspace-context-label {
  color: #bae6fd;
  font-size: 0.62rem;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
}

/* Légère séparation entre groupes de navigation (Sprint Polish) — un simple
   espacement supplémentaire ne suffisait pas à distinguer visuellement chaque
   groupe ("Pilotage", "Cartographie & Territoire"...) ; un liseré très discret
   referme chaque groupe précédent. */
.nav-group + .nav-group {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
}

.nav-group-toggle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-group-toggle:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.08);
}

.nav-group-toggle:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 2px;
}

.nav-group[data-open="true"] .nav-group-toggle {
  color: #cbd5e1;
}

.nav-group-icon {
  width: 18px;
  text-align: center;
  opacity: 0.7;
  font-size: 0.65rem;
}

.nav-group-title {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
  word-break: normal;
}

.nav-group-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  opacity: 0.75;
}

.nav-group[data-open="true"] .nav-group-chevron {
  transform: rotate(45deg);
}

.nav-group-panel {
  display: grid;
  gap: 6px;
  padding: 0 0 4px 2px;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.nav-group-panel[hidden] {
  display: none !important;
  margin: 0;
  padding: 0;
  height: 0;
  min-height: 0;
}

.nav-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 12px;
  transition: background 0.22s var(--ease-premium), border-color 0.22s var(--ease-premium),
    color 0.22s var(--ease-premium), transform 0.22s var(--ease-premium), box-shadow 0.22s var(--ease-premium);
}

/* MICRO-SPRINT PWA TERRAIN DÉDIÉE — `[hidden]` (feuille UA, priorité la
   plus basse) perd toujours face à `.nav-item{display:grid}` (feuille
   auteur, même spécificité mais priorité de cascade supérieure) — sans
   cette règle, `#nav-open-fdsu-terrain.hidden = true` (app.js, setWorkspace)
   ne masque jamais réellement le lien pour le Lecteur (même bug de classe
   que .ccn-kpi-grid[hidden], cf. chantier UX CCN 2026/2027). */
.nav-item[hidden] { display: none; }

.nav-item:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 2px;
}

.nav-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-strong);
  transition: background 0.22s var(--ease-premium), color 0.22s var(--ease-premium);
}

.nav-label {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.nav-item:hover {
  background: rgba(56, 189, 248, 0.13);
  border-color: rgba(56, 189, 248, 0.22);
  color: var(--nav-active-text);
  transform: translateX(2px);
  box-shadow: 0 8px 18px -14px rgba(56, 189, 248, 0.55);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(34, 211, 238, 0.13));
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--nav-active-text);
  transform: translateX(2px);
  box-shadow: 0 10px 24px -14px rgba(56, 189, 248, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.nav-item.active .nav-icon {
  background: rgba(56, 189, 248, 0.3);
}

/* Sprint "Finition sidebar" — le bloc Identité/Devise n'est plus un pied de page figé
   mais un simple enchaînement du flux (cf. .nav-menu/.sidebar-footer flex: 0 0 auto,
   correction "Sidebar fluide sans collision") : un écart FIXE (pas auto) le sépare de la
   navigation, pour qu'il remonte naturellement dès que rayons/paddings/largeur diminuent,
   sans jamais coller à la navigation ni rester artificiellement plaqué en bas. */
/* Sprint "Finition sidebar" — le bloc Identité/Devise n'est plus un pied de page figé
   mais un simple enchaînement du flux (cf. .nav-menu/.sidebar-footer flex: 0 0 auto,
   correction "Sidebar fluide sans collision") : un écart FIXE (pas auto) le sépare de la
   navigation, pour qu'il remonte naturellement dès que rayons/paddings/largeur diminuent,
   sans jamais coller à la navigation ni rester artificiellement plaqué en bas. */
.sidebar-footer {
  flex: 0 0 auto;
  margin-top: 16px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.1);
  margin-bottom: 14px;
}

/* Devise institutionnelle — surcharge de lisibilité (Correction "Dashboard entier
   visible") : 0.76rem (~12.16px) passait sous le plancher de lisibilité de 13px.
   Remontée à 13.12px ; l'écart de hauteur ainsi ajouté est compensé par les
   réductions d'espacements ci-dessus (padding sidebar, séparateur). Surcharge
   depuis ce fichier (spécificité .sidebar .sidebar-motto) sans modifier
   dashboard-components.css. */
.sidebar .sidebar-motto {
  padding-top: 8px;
  font-size: 0.82rem;
  line-height: 1.32;
}

.sidebar-status {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.status-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sidebar-status strong {
  font-size: 0.98rem;
}

.main-content {
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px 32px;
  background: var(--glass-panel-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  /* MICRO-SPRINT CONSOLIDÉ, Partie B — cause exacte : `backdrop-filter`
     établit un nouveau contexte d'empilement pour `.topbar` (spec CSS
     Filter Effects), qui piège le `z-index:60` de `.user-menu-panel`
     (menu profil, cf. modules/shared/theme-engine/theme-engine.css) à
     l'INTÉRIEUR de ce contexte — il ne peut alors plus rivaliser avec un
     contexte d'empilement SÉPARÉ créé plus loin dans le DOM par une carte
     du Dashboard (glass premium : transform/backdrop-filter au survol).
     Ce contexte carte, plus tardif dans l'ordre du document, peint alors
     par-dessus tout `.topbar` — menu déroulant compris. Correction : donner
     à `.topbar` lui-même une position/un z-index explicites, cohérents avec
     l'échelle déjà en place dans ce fichier (contenu ≤ 80, recouvrements
     ≥ 200, palette de commandes 3000) — jamais une valeur énorme arbitraire
     sur `.user-menu-panel` seul, qui resterait piégée par le même problème. */
  position: relative;
  z-index: 100;
}

.page-context {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 2.3vw, 2.8rem);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notification-button {
  border: 1px solid var(--border);
  background: var(--chip-bg);
  backdrop-filter: blur(var(--glass-blur, 22px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 22px));
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  transition: background 0.22s var(--ease-premium), border-color 0.22s var(--ease-premium),
    transform 0.22s var(--ease-premium), box-shadow 0.22s var(--ease-premium);
}

.notification-button:hover,
.notification-button:focus-visible {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15), 0 8px 20px rgba(2, 6, 23, 0.35);
  transform: translateY(-1px);
  outline: none;
}

.search-field {
  position: relative;
  width: min(380px, 100%);
}

.search-field input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 10px 16px 10px 44px;
  background: var(--input-bg);
  color: var(--text);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: min(560px, 88vw);
  max-height: 420px;
  overflow: auto;
  background: var(--glass-panel-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 8px;
}

.global-search-results.hidden {
  display: none;
}

.global-search-result {
  width: 100%;
  display: grid;
  gap: 4px;
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.global-search-result:hover,
.global-search-result:focus {
  background: var(--surface-muted);
}

.global-search-result span,
.global-search-empty {
  color: var(--text-muted);
  margin: 0;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: var(--glass-panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: background 0.22s var(--ease-premium), box-shadow 0.22s var(--ease-premium);
}

.profile-card:hover {
  box-shadow: var(--card-shadow);
}

.profile-chevron {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.user-menu-trigger[aria-expanded="true"] .profile-chevron {
  transform: rotate(-135deg);
}

.profile-card p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
}

.profile-card small {
  display: block;
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.15;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #0ea5e9 0%, #22d3ee 100%);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.content-area {
  display: grid;
  gap: 24px;
  min-width: 0;
  overflow-x: hidden;
}

.cartography-module {
  padding: 0 !important;
  gap: 10px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow-x: hidden;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ── Inspecteur SIG unifié ── */
.sig-inspector-shell {
  --sig-inspector-radius: 14px;
  --sig-inspector-padding: 10px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 320px;
  min-height: 0;
  border-radius: var(--sig-inspector-radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sig-inspector-header {
  flex-shrink: 0;
  padding: var(--sig-inspector-padding);
  padding-bottom: 6px;
}

.sig-inspector-header h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.sig-inspector-header .panel-label {
  margin-bottom: 2px;
  font-size: 0.68rem;
}

.sig-inspector-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--sig-inspector-padding) var(--sig-inspector-padding);
}

.sig-zone-card {
  display: block;
  min-height: 90px;
  max-height: 110px;
  width: 100%;
  padding: 8px 10px 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
  box-sizing: border-box;
}

.sig-zone-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 74px;
}

.sig-zone-card-title {
  display: block;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.sig-zone-card-meta,
.sig-zone-card-count {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.sig-zone-card-count {
  color: var(--text);
  font-weight: 600;
}

.sig-map-info-compact {
  position: absolute;
  width: min(138px, calc(100% - 16px)) !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  bottom: 24px !important;
  left: 8px !important;
}

.sig-map-info-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px !important;
  height: 18px !important;
  font-size: 0.9rem !important;
  border-radius: 6px !important;
}

.sig-map-info-grid {
  margin: 0;
  display: grid;
  gap: 2px;
  padding-right: 14px;
}

.sig-map-info-grid div {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 4px;
  align-items: baseline;
}

.sig-map-info-grid dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
}

.sig-map-info-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
  white-space: normal;
}

.leaflet-tooltip.sig-map-tooltip {
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.94);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.38);
  animation: sigTooltipFadeIn 120ms ease-out;
  pointer-events: none;
}

.leaflet-tooltip.sig-map-tooltip::before {
  border-top-color: rgba(15, 23, 42, 0.94);
}

@keyframes sigTooltipFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.map-smart-tooltip {
  display: grid;
  gap: 3px;
  max-width: 240px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.map-smart-tooltip-title {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
}

.map-smart-tooltip-icon {
  flex-shrink: 0;
  line-height: 1.2;
}

.map-smart-tooltip-type {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.map-smart-tooltip-line {
  color: #cbd5e1;
}

.map-smart-tooltip-hint {
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
  font-size: 0.64rem;
  font-style: italic;
}

.cartography-workspace {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.cartography-toolbar-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  max-height: 56px;
  min-height: 48px;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.cartography-search-field {
  display: flex;
  align-items: center;
  flex: 1 1 180px;
  min-width: 120px;
  max-width: 280px;
}

.cartography-search-field input {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font-size: 0.84rem;
}

.cartography-toolbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.cartography-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-height: clamp(420px, calc(100vh - 220px), 760px);
  min-width: 0;
}

.cartography-main-row.has-sidebar-panel {
  grid-template-columns: minmax(0, 1fr) min(320px, 25vw);
}

.cartography-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 320px;
  min-height: 0;
  overflow: hidden;
}

.cartography-sidebar.hidden {
  display: none !important;
}

.cartography-sidebar-panels {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.cartography-sidebar .cartography-drawer {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 10px 12px;
  gap: 6px;
}

.cartography-sidebar .cartography-drawer:not(.hidden) {
  z-index: 2;
}

.cartography-sidebar .cartography-drawer.hidden {
  z-index: 1;
  pointer-events: none;
}

.cartography-map-overlay {
  position: absolute;
  z-index: 520;
  pointer-events: auto;
}

.cartography-command-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
}

.cartography-command-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cartography-command-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.cartography-tool-btn {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 7px 11px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.cartography-tool-btn:hover,
.cartography-tool-btn:focus,
.cartography-tool-btn.is-active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.42);
  outline: none;
}

.cartography-breadcrumb-row {
  top: 10px;
  left: 10px;
  right: auto;
  margin: 0;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.1);
  min-width: 0;
  max-width: calc(100% - 20px);
}

.cartography-status-message {
  top: 46px;
  left: 10px;
  margin: 0;
  padding: 4px 8px;
  min-height: 0;
  max-width: calc(100% - 20px);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
}

.cartography-panel-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  flex-shrink: 0;
}

.cartography-link-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  padding: 4px 0;
  cursor: pointer;
}

.cartography-link-btn:hover,
.cartography-link-btn:focus {
  text-decoration: underline;
  outline: none;
}

.cartography-classification-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
  flex: 1;
}

.cartography-explorer-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1800;
  transform: translateX(-50%);
  width: min(960px, calc(100vw - 32px));
  max-height: min(62vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 -12px 40px rgba(2, 6, 23, 0.45);
  padding: 14px 18px 18px;
  overflow: hidden;
}

.cartography-explorer-drawer.hidden {
  display: none !important;
}

.cartography-explorer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.cartography-explorer-drawer .attribute-toolbar,
.cartography-explorer-drawer .table-frame,
.cartography-explorer-drawer .attribute-pagination {
  flex-shrink: 0;
}

.cartography-explorer-drawer .table-frame {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.cartography-map-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: clamp(420px, calc(100vh - 220px), 760px);
  height: 100%;
  border-radius: 20px;
  /* visible : évite le clipping des .leaflet-tooltip.sig-map-tooltip */
  overflow: visible;
  border: 1px solid rgba(148, 163, 184, 0.14);
  /* Teinte papier carte — remplacée dès qu'un basemap résilient charge */
  background: #f4f1e8;
  box-shadow: var(--shadow);
}

.cartography-map-stage .leaflet-tile-pane {
  z-index: 200;
}

.cartography-map-stage .map-canvas .leaflet-tile,
.cartography-map-stage .cartography-basemap-tiles {
  filter: none;
  opacity: 1;
}

.cartography-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 2px 12px;
}

.cartography-basemap-fieldset {
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cartography-basemap-fieldset legend {
  padding: 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
}

.cartography-basemap-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 0.92rem;
  color: rgba(241, 245, 249, 0.92);
}

.cartography-basemap-option input {
  accent-color: #38bdf8;
}

/* Mode Focus : immersion dans l'app — jamais de fullscreen natif navigateur */
.cartography-focus-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 40;
}

.cartography-focus-bar[hidden] {
  display: none !important;
}

body.cartography-focus-mode .cartography-focus-bar {
  display: flex !important;
}

.cartography-focus-title {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
}

.cartography-focus-back,
.cartography-focus-exit {
  white-space: nowrap;
}

.cartography-focus-back {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.88rem;
}

/* §chantier « Labels fournisseur Esri + Immersion » — commandes compactes
   FDSU/Esri de la barre Immersion (mandat §6 : compactes, lisibles,
   intégrées, état ON/OFF évident, ne pas agrandir inutilement la barre). */
.cartography-focus-label-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.cartography-focus-label-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.9);
  color: rgba(226, 232, 240, 0.85);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.cartography-focus-label-btn:hover,
.cartography-focus-label-btn:focus-visible {
  border-color: rgba(56, 189, 248, 0.55);
  color: #f8fafc;
  outline: none;
}

.cartography-focus-label-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4);
}

.cartography-focus-label-btn.is-active {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
}

/* §chantier « Labels fournisseur Esri + Immersion » (mandat §9) — l'overlay
   de labels/repères Esri ne doit jamais intercepter un clic/hover destiné
   à une entité en dessous (site, marqueur, entité administrative) ; le
   pane Leaflet dédié (`esriReferenceLabelsPane`, cf. app.js) porte déjà
   `pointer-events: none`, cette règle est la ceinture-et-bretelles au
   niveau des tuiles elles-mêmes, y compris hors de ce pane (ex. usage CCN
   existant, `createGenericLabelsLayer()` sans override de pane). */
.cartography-generic-labels-tiles {
  pointer-events: none;
}

body.cartography-focus-mode .sidebar,
body.cartography-focus-mode .topbar {
  display: none !important;
}

body.cartography-focus-mode .app-shell {
  display: block;
  min-height: 100vh;
}

body.cartography-focus-mode .main-content {
  width: 100%;
  min-height: 100vh;
}

body.cartography-focus-mode .content-area {
  padding: 12px;
  max-width: none;
  width: 100%;
  min-height: calc(100vh - 24px);
}

body.cartography-focus-mode #cartographie-panel {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100vh - 24px);
}

body.cartography-focus-mode .cartography-workspace {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

body.cartography-focus-mode .cartography-main-row {
  flex: 1;
  min-height: 0;
  grid-template-columns: 1fr !important;
}

body.cartography-focus-mode .cartography-map-stage {
  position: relative;
  inset: auto;
  z-index: auto;
  width: 100%;
  height: 100%;
  min-height: var(--carto-stage-h, calc(100vh - 160px));
  max-height: none;
  border-radius: 16px;
}

body.cartography-focus-mode #carto-focus-btn {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.18);
}

.cartography-map-stage .map-canvas {
  position: absolute;
  inset: 0;
  min-height: 100%;
  height: 100%;
  width: 100%;
  max-width: 100%;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
}

.cartography-map-info-panel {
  position: absolute;
  left: 10px;
  bottom: 30px;
  z-index: 510;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
  pointer-events: auto;
}

.cartography-map-info-panel.hidden {
  display: none !important;
}

.cartography-map-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.cartography-map-info-close {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.cartography-map-info-list {
  margin: 0;
  display: grid;
  gap: 4px;
}

.cartography-map-info-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px;
  align-items: baseline;
}

.cartography-map-info-list dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.cartography-map-info-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cartography-drawer-stack {
  display: none;
}

.cartography-drawer {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cartography-drawer.hidden {
  display: none !important;
}

.cartography-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.cartography-drawer-header h3 {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.2;
}

.cartography-drawer-header .panel-label {
  margin-bottom: 1px;
  font-size: 0.66rem;
}

.cartography-drawer-close {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.cartography-drawer-close:hover {
  background: rgba(56, 189, 248, 0.12);
}

.cartography-drawer .cartography-layer-list,
.cartography-drawer-sync-list,
.cartography-drawer-info,
.cartography-drawer-legend {
  overflow: auto;
  min-height: 0;
  flex: 1;
}

.cartography-drawer .cartography-layer-list {
  gap: 4px;
}

.cartography-drawer .cartography-layer-list label {
  gap: 6px;
  font-size: 0.8rem;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.cartography-drawer-legend {
  padding: 0;
  border: none;
  background: transparent;
}

.cartography-drawer-legend .legend-card {
  padding: 0;
  border: none;
  background: transparent;
}

.cartography-drawer-legend .legend-title {
  margin: 0 0 6px;
  font-size: 0.84rem;
}

.cartography-drawer-legend .legend-title-secondary {
  margin-top: 10px;
}

.cartography-drawer-legend .legend-list {
  gap: 5px;
}

.cartography-drawer-legend .legend-list li {
  font-size: 0.76rem;
  gap: 6px;
  line-height: 1.25;
  white-space: normal;
}

.cartography-drawer-sync-list {
  max-height: none;
  font-size: 0.8rem;
}

.cartography-drawer-info {
  font-size: 0.8rem;
  line-height: 1.45;
}

.cartography-drawer-info .zone-detail-label {
  font-size: 0.68rem;
  margin-top: 6px;
}

.cartography-drawer-info .zone-detail-value {
  margin: 2px 0 0;
  font-size: 0.8rem;
  word-break: break-word;
  white-space: normal;
}

.cartography-drawer-info .context-stats,
.cartography-drawer-info .detail-attributes {
  margin-top: 8px;
  gap: 6px;
}

.cartography-chip-button {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.cartography-thematic-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cartography-thematic-controls select {
  min-height: 36px;
  font-size: 0.88rem;
  width: 100%;
}

.cartography-attribute-panel {
  display: none !important;
}

.cartography-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.cartography-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.thematic-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.thematic-controls select {
  min-height: 40px;
}

.cartography-note {
  margin: 0;
  min-height: 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* P1 DASHBOARD BUSINESS NAVIGATION §5/§15 — feedback RBAC générique et
   discret (pas une alerte rouge : information, pas une erreur système). */
.rbac-denied-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.rbac-denied-toast[hidden] {
  display: none;
}

.primary-button {
  border: none;
  border-radius: 16px;
  padding: 12px 18px;
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
}

.legend-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.legend-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.legend-title-secondary {
  margin-top: 18px;
}

.legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-block;
}

/* Marqueurs/légendes avec glyphe (MAP_SYMBOLOGY_REGISTRY) — Phase 3/5 du mandat symbologie.
   Glyphe blanc sur fond de catégorie coloré, contour visible, contraste conservé sur fond sombre. */
.sig-symbol-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(2, 6, 23, 0.45);
  flex-shrink: 0;
}

.sig-symbol-marker-glyph {
  display: inline-flex;
  line-height: 0;
}

.sig-legend-glyph-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.sig-relations-legend-detail {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.sig-relations-legend-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sig-relations-legend-detail-item .sig-legend-glyph-swatch {
  width: 16px;
  height: 16px;
}

.sig-relations-legend-detail-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: italic;
}

.legend-nd { background: var(--zone-nd); }
.legend-ot { background: var(--zone-ot); }
.legend-ce { background: var(--zone-ce); }
.legend-sd { background: var(--zone-sd); }
.legend-et { background: var(--zone-et); }
.legend-boundary { background: #e2e8f0; }
.legend-zone-fill { background: linear-gradient(90deg, var(--zone-ot), var(--zone-ce), var(--zone-et)); }
.legend-province-line { background: #2563eb; }
.legend-territory-line { background: #0891b2; }
.legend-collectivity-line { background: var(--text-muted); }
.legend-groupement-point { background: #a78bfa; border-radius: 999px; }
/* Couleurs pilotées par MAP_SYMBOLOGY_REGISTRY (dashboard/modules/shared/map-symbology/) —
   variables --legend-* posées au chargement via applyLegendCssVariables(), la valeur
   littérale ci-après n'est qu'un repli si le registre n'a pas encore chargé. */
.legend-locality-point { background: var(--legend-locality, #77C53F); border-radius: 999px; }
.legend-site-point { background: var(--legend-fdsu-generic, #F5A623); border-radius: 999px; }
.legend-site-40-point { background: var(--legend-fdsu-40, #c084fc); border-radius: 999px; }
.legend-site-300-point { background: var(--legend-fdsu-300, #38bdf8); border-radius: 999px; }
.legend-site-20476-point { background: var(--legend-fdsu-20476, #F5A623); border-radius: 999px; }
.legend-route-generic { background: var(--legend-road-generic, #EA7104); }
.legend-relations-generic { background: var(--legend-relation-network-coverage, #2BA8F0); border-radius: 999px; }
/* Énergie (Micro-sprint 9.7D) — --legend-energy généré par applyLegendCssVariables()
   depuis MAP_SYMBOLOGY_REGISTRY.SYMBOLS.energy ; le potentiel territorial n'est pas
   un symbole ponctuel du registre (couche polygonale dédiée), repli statique ici. */
.legend-energy { background: var(--legend-energy, #FCC904); border-radius: 999px; }
.legend-energie-potentiel { background: #FCC904; opacity: 0.6; }

.cartography-layer-group-actions {
  display: flex;
  gap: 0.5rem;
  margin: 0.35rem 0 0.5rem;
  flex-wrap: wrap;
}

.fdsu-program-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.05rem 0.35rem;
  margin-right: 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(180, 83, 9, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.fdsu-program-badge[data-badge="40"] {
  background: rgba(126, 34, 206, 0.18);
  color: #e9d5ff;
  border-color: rgba(192, 132, 252, 0.4);
}

.fdsu-program-badge[data-badge="300"] {
  background: rgba(3, 105, 161, 0.18);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.4);
}

.fdsu-program-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
  font-size: 0.75rem;
}

.legend-telecom-vodacom { background: var(--legend-vodacom, #D0453B); border-radius: 999px; }
.legend-telecom-orange { background: var(--legend-orange, #FAA23D); border-radius: 999px; }
.legend-telecom-airtel { background: var(--legend-airtel, #7FB84B); border-radius: 999px; }
.legend-telecom-africell { background: var(--legend-africell, #AC7DC6); border-radius: 999px; }
.legend-telecom-planned { background: var(--legend-mno-planned, #facc15); border-radius: 999px; }
.legend-telecom-generic { background: var(--legend-telecom-generic, #22AEF9); border-radius: 999px; }
.legend-telecom-fiber { background: #60a5fa; border-radius: 999px; }
.legend-telecom-mw { background: #a78bfa; border-radius: 999px; }
.legend-telecom-fiberco { background: #22d3ee; border-radius: 999px; }
.telecom-popup[data-nire-quality="CONFLICT"] { border-left: 3px solid #dc2626; padding-left: 8px; }
.telecom-popup[data-nire-quality="NEEDS_REVIEW"] { border-left: 3px solid #d97706; padding-left: 8px; }
.telecom-popup[data-nire-quality="PROVISIONAL"] { border-left: 3px solid #2563eb; padding-left: 8px; }

.telecom-popup {
  font-size: 0.88rem;
  line-height: 1.45;
}
.legend-mission-point { background: #fb7185; border-radius: 999px; }

.map-breadcrumb {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.map-breadcrumb button {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
}

.map-breadcrumb button[aria-current="location"] {
  border-color: rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
}

.map-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.map-nav-actions .table-action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dashboard-national-map-shell {
  --pilotage-sync-gap: 14px;
  --pilotage-sync-reserve: 0px;
  display: flex;
  flex-direction: column;
  gap: var(--pilotage-sync-gap);
  min-width: 0;
  min-height: 0;
}

.dashboard-national-map-shell:has(.sync-list-body) {
  --pilotage-sync-reserve: min(120px, 16vh);
}

/* Sprint "cartes compactes" — la carte gagne en largeur (cible ~82-86 % de l'emprise utile),
   la colonne des zones se resserre (cible ~14-18 %, 170-210px) sans jamais descendre sous
   180px (lisibilité des libellés de zone). Plafond en px (pas seulement en %) : au-delà d'un
   certain seuil de largeur d'écran, un pourcentage pur ferait grandir la colonne indéfiniment
   et gâcherait la largeur gagnée par la carte — 210px reste la cible même sur écran très large. */
.dashboard-map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 210px);
  gap: 10px;
  align-items: stretch;
}

.dashboard-map-primary {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-zones-sidebar {
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: 210px;
  align-self: stretch;
  min-height: 0;
}

.dashboard-zones-sidebar.sig-inspector-shell {
  max-width: 210px;
}

.dashboard-zones-sidebar .sig-inspector-header {
  padding: 8px 10px 4px;
}

.dashboard-zones-sidebar .sig-inspector-body {
  overflow-y: visible;
  overflow-x: hidden;
  flex: 0 0 auto;
  padding: 0 8px 8px;
}

.dashboard-zones-sidebar-header h3 {
  margin: 0;
  font-size: 0.84rem;
}

.dashboard-zones-list {
  flex: 0 0 auto;
  gap: 7px;
}

/* Cartes de zone compactées (sprint "cartes compactes") — cibles : min-height 54-68px,
   padding 8-12px, gap vertical 6-10px (repris ci-dessus). Accent couleur (.zone-nd/.zone-ot/
   .zone-ce/.zone-sd/.zone-et, border-left) et interaction clic/clavier inchangés. */
.dashboard-zones-list .zone-item,
.dashboard-zones-list .sig-zone-card {
  padding: 8px 10px;
  min-height: 58px;
  max-height: 68px;
  height: auto;
}

.dashboard-zones-list .sig-zone-card-body {
  min-height: 0;
  gap: 2px;
  justify-content: center;
}

.dashboard-zones-list .sig-zone-card-title {
  font-size: 0.76rem;
  line-height: 1.15;
}

/* Nombre de provinces/territoires — plus discret que le nom de la zone (couleur atténuée,
   taille réduite) ; une seule ligne de méta compacte (provinces regroupées avec le reste des
   agrégats disponibles, cf. app.js renderDashboardZonesSidebar — plus de 3e ligne séparée). */
.dashboard-zones-list .sig-zone-card-meta,
.dashboard-zones-list .sig-zone-card-count {
  font-size: 0.64rem;
  line-height: 1.2;
  white-space: normal;
}

.dashboard-national-map {
  width: 100%;
  height: clamp(520px, 62vh, 720px);
  margin-bottom: 0;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
  flex: 0 0 auto;
}

/* Phase B perf — carte Dashboard sans fond de carte externe : fond sombre explicite
   (leaflet.css, chargé après styles.css, imposerait sinon son gris par défaut). */
#dashboard-national-map.leaflet-container {
  background: #0b1220;
}

/* Cadre du bouton plein écran (mandat "capacité plein écran commune") — position:relative
   local pour ancrer .map-fullscreen-btn sans dépendre du panneau de contrôle Leaflet
   (zoom top-left, attribution bottom-right, légende .ux-map-legend bottom-left : le bouton
   reste en haut à droite, aucun chevauchement). */
.dashboard-national-map-frame {
  position: relative;
}

.dashboard-map-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 850;
}

/* Harmonisation carte du Dashboard uniquement (#dashboard-national-map) — ne touche
   ni la légende ni les contrôles Leaflet des autres modules (.ux-map-legend et
   Leaflet sont partagés par toute la plateforme, cf. ux-premium.css). Reprend la
   teinte Dark Glass (fond translucide, bordure fine, ombre douce) mais SANS
   backdrop-filter ici : ces éléments vivent à l'intérieur de #dashboard-map-card,
   la cible de l'API Fullscreen native (MapFullscreenController) — un flou sur un
   descendant de l'élément fullscreen a été identifié comme source de flakiness sur
   les cycles entrée/sortie répétés (cf. tests). Le fond translucide + bordure
   suffisent au rendu premium sans ce risque. */
#dashboard-national-map .ux-map-legend {
  background: var(--glass-panel-bg-strong);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
}

#dashboard-national-map .leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
}

#dashboard-national-map .leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  background: var(--glass-panel-bg-strong) !important;
  color: var(--text) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow);
}

#dashboard-national-map .leaflet-control-zoom a:first-child {
  border-radius: 10px 10px 0 0 !important;
}

#dashboard-national-map .leaflet-control-zoom a:last-child {
  border-radius: 0 0 10px 10px !important;
  border-top: none !important;
}

#dashboard-national-map .leaflet-control-zoom a:hover {
  background: var(--panel-hover) !important;
}

/* Mode plein écran — spécifique à la carte "Cartographie nationale" du Dashboard (chaque
   Business Map déclare sa propre reflow interne, cf. mandat §8 : ce bloc ne concerne QUE
   #dashboard-map-card, pas les autres cartes de la plateforme). */
.map-card.is-map-fullscreen {
  padding: 16px 20px;
  overflow: hidden;
}

.map-card.is-map-fullscreen .dashboard-map-workspace {
  flex: 1;
  min-height: 0;
}

.map-card.is-map-fullscreen .dashboard-national-map-shell {
  flex: 1;
  min-height: 0;
}

.map-card.is-map-fullscreen .dashboard-national-map-frame {
  flex: 1;
  min-height: 0;
  display: flex;
}

.map-card.is-map-fullscreen .dashboard-national-map {
  flex: 1;
  height: auto;
  min-height: 0;
}

.map-card.is-map-fullscreen .dashboard-zones-sidebar {
  max-height: none;
}

.map-card.is-map-fullscreen .dashboard-zones-sidebar .sig-inspector-body {
  overflow-y: auto;
  max-height: none;
}

.dashboard-national-map.leaflet-container {
  font: inherit;
}

.dashboard-national-sync-list {
  max-height: 120px;
  overflow: auto;
}

.dashboard-national-sync-list:not(:has(.sync-list-body)) {
  display: none;
}

.dashboard-status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-height: 760px) {
  .dashboard-national-map {
    height: clamp(440px, 54vh, 600px);
  }

  .dashboard-zones-sidebar .sig-inspector-body {
    overflow-y: auto;
    /* Formule alignée sur les nouvelles cibles carte compacte : 5 cartes (max 68px) +
       4 écarts (7px) + marge de la liste. Scroll interne seulement si la hauteur d'écran
       réelle ne suffit pas — jamais retiré s'il coupe du contenu (mandat §4). */
    max-height: calc(5 * 68px + 4 * 7px + 8px);
  }
}

.dashboard-detail-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-detail-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.dashboard-detail-count {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
}

.dashboard-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 12px;
  min-height: 520px;
}

.dashboard-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 520px;
  max-width: 320px;
}

.dashboard-detail-stats,
.dashboard-detail-list {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
}

.dashboard-detail-list-item {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  min-height: 72px;
  max-height: 100px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  cursor: pointer;
  box-sizing: border-box;
}

.dashboard-detail-list-item span {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-detail-list-item small {
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.dashboard-detail-list-item:hover,
.dashboard-detail-list-item.is-selected {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.12);
}

.dashboard-detail-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 420px;
}

.dashboard-detail-map {
  min-height: 520px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
}

.dashboard-detail-map.leaflet-container {
  font: inherit;
}

.dashboard-detail-stats h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.dashboard-detail-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.dashboard-detail-stats-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.summary-card-zones {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(124, 58, 237, 0.12));
}

@media (max-width: 1100px) {
  .dashboard-detail-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-detail-list {
    max-height: 280px;
  }
}

.map-canvas {
  min-height: 620px;
  border-radius: 26px;
  overflow: visible;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.map-canvas.leaflet-container {
  height: 100%;
  width: 100%;
}

.map-canvas .leaflet-tile {
  filter: grayscale(1) saturate(0.45) brightness(0.62);
}

.cartography-map-stage .map-canvas .leaflet-tile {
  filter: none;
}

.cartography-map-stage.map-canvas--muted .map-canvas .leaflet-tile {
  filter: grayscale(1) saturate(0.45) brightness(0.62);
}

.map-feature-selected {
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.65));
  animation: selectedFeaturePulse 1.8s ease-in-out infinite;
}

@keyframes selectedFeaturePulse {
  0%, 100% { stroke-opacity: 0.95; }
  50% { stroke-opacity: 1; }
}

.zone-selected {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.18), var(--shadow);
}

.zone-detail-label {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.zone-detail-value {
  margin: 6px 0 0;
  color: var(--text);
  font-weight: 600;
}

.zone-detail-empty {
  margin: 0;
  color: var(--text-muted);
}

.detail-attributes {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.layers-panel,
.carto-info-panel,
.carto-sync-panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  padding: 22px;
}

.layer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.layer-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.cartography-layer-group {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.28);
}

.cartography-layer-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cartography-layer-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cartography-layer-group-list label {
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

.info-body {
  color: var(--text-muted);
  line-height: 1.6;
}

.map-synchronized-list {
  display: grid;
  gap: 6px;
  overflow: auto;
}

.sync-list-header {
  display: flex;
  justify-content: space-between;
  color: var(--text);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sync-list-body {
  display: grid;
  gap: 6px;
}

.sync-list-item {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.4);
  color: var(--text);
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
}

.sync-list-item span,
.sync-list-item small {
  display: block;
  white-space: normal;
  word-break: break-word;
}

.sync-list-item small {
  color: var(--text-muted);
  margin-top: 2px;
  font-size: 0.72rem;
}

.sync-list-item:hover,
.sync-list-item.is-hovered {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 116, 144, 0.18);
}

.context-stats,
.smart-side-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.context-stats div,
.smart-side-panel div {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.38);
  border-radius: 8px;
  padding: 8px;
}

.context-stats span,
.smart-side-panel span {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.context-stats strong,
.smart-side-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 0.92rem;
}

.map-profile-button {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

/* R5-A3 — Navigation Premium : les points de rupture spécifiques à la
   Cartographie (.cartography-*) ont été consolidés dans
   modules/shared/cartography-experience/cartography-experience.css, qui se
   charge après ce fichier et contient déjà les paliers 1366px/900px/
   721-900px. Consolidation à comportement identique (déplacement, pas de
   réécriture) — voir R5_A3_NAVIGATION_PREMIUM.md §8. */

/* NTI — thème sombre SIG-FDSU (borné au module) */
#national-territorial-intelligence-panel,
.ntie-panel {
  color: var(--text, #e2e8f0);
}

.ntie-toolbar {
  display: flex;
  gap: 10px;
  align-items: end;
  margin: 16px 0;
  flex-wrap: wrap;
}

.ntie-toolbar label {
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
}

#national-territorial-intelligence-panel .ntie-toolbar input,
.ntie-panel .ntie-toolbar input,
.ntie-toolbar input {
  min-width: 260px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #0b1524;
  color: var(--text, #e2e8f0);
}

#national-territorial-intelligence-panel .ntie-toolbar input:focus-visible,
.ntie-toolbar input:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 2px;
}

.ntie-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

#national-territorial-intelligence-panel .ntie-kpi,
#national-territorial-intelligence-panel .ntie-card,
.ntie-panel .ntie-kpi,
.ntie-panel .ntie-card,
.ntie-kpi,
.ntie-card {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  border-radius: 12px;
  padding: 14px;
  background: var(--surface, #111827);
  color: var(--text, #e2e8f0);
}

.ntie-kpi span,
.ntie-kpi small {
  display: block;
  color: var(--text-muted, #94a3b8);
}

.ntie-kpi strong {
  display: block;
  margin: 8px 0;
  font-size: 1.2rem;
  color: #f8fafc;
}

.ntie-card h3 {
  margin-top: 0;
  color: #f1f5f9;
}

#national-territorial-intelligence-panel .ntie-card .data-table th,
#national-territorial-intelligence-panel .ntie-card .data-table td,
.ntie-panel .ntie-card .data-table th,
.ntie-panel .ntie-card .data-table td {
  color: var(--text, #e2e8f0);
  border-color: rgba(148, 163, 184, 0.18);
}

#national-territorial-intelligence-panel .ntie-card .data-table thead th,
.ntie-panel .ntie-card .data-table thead th {
  background: var(--surface-muted, #1f2937);
  color: #cbd5e1;
}

.ntie-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ntie-wide {
  grid-column: 1 / -1;
}

@media (max-width: 800px) {
  .ntie-grid {
    grid-template-columns: 1fr;
  }

  .ntie-wide {
    grid-column: auto;
  }
}

/* NAR — thème sombre (shell-aligned) ; ne pas utiliser --panel-bg/#fff (absent du DS) */
.national-asset-registry { display: grid; gap: 18px; color: var(--text, #e2e8f0); }
.nfar-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
#national-asset-registry-panel .nfar-kpi,
#national-asset-registry-panel .nfar-card,
.national-asset-registry .nfar-kpi,
.national-asset-registry .nfar-card {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  border-radius: 12px;
  background: var(--surface, #111827);
  color: var(--text, #e2e8f0);
  padding: 14px;
}
.nfar-kpi { display: grid; gap: 6px; }
.nfar-kpi span { color: var(--text-muted, #94a3b8); font-size: 0.78rem; }
.nfar-kpi strong { font-size: 1.35rem; color: #f8fafc; }
.nfar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nfar-card h3 { margin-top: 0; color: #f1f5f9; }
.nfar-card p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text, #e2e8f0);
}
.nfar-card p strong { color: #f8fafc; }
.nfar-card p[data-status="unavailable"] { color: var(--text-muted, #94a3b8); }
.nfar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#national-asset-registry-panel .nfar-toolbar select,
.national-asset-registry .nfar-toolbar select {
  background: #0b1524;
  color: var(--text, #e2e8f0);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
}
#national-asset-registry-panel .data-table th,
#national-asset-registry-panel .data-table td {
  color: var(--text, #e2e8f0);
  border-color: rgba(148, 163, 184, 0.18);
}
#national-asset-registry-panel .data-table thead th {
  background: var(--surface-muted, #1f2937);
  color: #cbd5e1;
}
#national-asset-registry-panel .panel-message { color: var(--text-muted, #94a3b8); }
@media (max-width: 800px) { .nfar-grid { grid-template-columns: 1fr; } }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.summary-card {
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 22px 24px;
}

.clickable-summary {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.clickable-summary:hover,
.clickable-summary:focus {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.08);
}

.summary-label {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.national-summary { margin: 0 0 18px; padding: 20px; border: 1px solid rgba(56, 189, 248, 0.18); border-radius: var(--radius-lg); background: var(--summary-panel-bg); }
.national-summary-header { margin-bottom: 16px; }
.national-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.telecom-executive { margin-top: 16px; }
.telecom-executive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (max-width: 1000px) { .telecom-executive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .telecom-executive-grid { grid-template-columns: 1fr 1fr; } }
.telecom-executive-grid .telecom-kpi-card {
  cursor: pointer;
  position: relative;
  min-height: 118px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.telecom-executive-grid .telecom-kpi-card .summary-label {
  font-weight: 650;
  letter-spacing: 0.04em;
}
.telecom-executive-grid .telecom-kpi-card .summary-value {
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.telecom-kpi-hint {
  margin: 8px 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
}
.telecom-executive-grid .telecom-kpi-card:hover,
.telecom-executive-grid .telecom-kpi-card:focus-visible {
  transform: translateY(-2px);
}
.telecom-executive-grid .telecom-kpi-card:focus-visible {
  outline: 2px solid var(--dashboard-card-accent, var(--accent-strong));
  outline-offset: 2px;
}
.telecom-executive-grid .telecom-kpi-card.is-active {
  border-color: color-mix(in srgb, var(--dashboard-card-accent, var(--accent-strong)) 72%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--dashboard-card-accent, var(--accent-strong)) 45%, transparent),
    0 10px 24px -12px color-mix(in srgb, var(--dashboard-card-accent, var(--accent-strong)) 50%, transparent);
}
.telecom-executive-grid .telecom-kpi-card.is-exclusive {
  background: color-mix(in srgb, var(--dashboard-card-accent, var(--accent-strong)) 10%, var(--card-bg, #0f172a));
}
/* Apparence de la carte pilotée par .dashboard-card/.dashboard-hover (Sprint Premium v1.2,
   dashboard-components.css, chargé après ce fichier) — même Design System que les cartes
   KPI supérieures. .national-kpi-card ne fixe plus que le curseur, conservé ici car
   spécifique au comportement clic/clavier de cette grille (data-national-route). */
.national-kpi-card { cursor: pointer; }
/* P1 DASHBOARD BUSINESS NAVIGATION §14/§12 — .synthesis-card (Population +
   Programmes FDSU) ne porte pas les classes dashboard-card/dashboard-hover
   partagées : curseur + focus clavier explicites ici, même minimalisme que
   .national-kpi-card ci-dessus (aucun nouveau style de survol inventé). */
.synthesis-card { cursor: pointer; }
.synthesis-card:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 2px;
}
.administrative-coverage-card { margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--coverage-panel-bg); }
.administrative-coverage-card h3, .administrative-coverage-card p { margin: 0 0 8px; }
.administrative-coverage-table { overflow-x: auto; }
.administrative-coverage-table table { width: 100%; border-collapse: collapse; }
.administrative-coverage-table th, .administrative-coverage-table td { padding: 9px 10px; border-bottom: 1px solid rgba(148, 163, 184, .12); text-align: left; }
.administrative-coverage-note, .education-disclaimer { color: var(--warning-text); font-size: .86rem; }
.administrative-coverage-warning { display: block; max-width: 28rem; margin-top: .2rem; color: var(--warning-text); font-size: .72rem; line-height: 1.25; }
.education-referential { display: grid; gap: 16px; }
.education-referential.hidden { display: none; }
.education-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.education-kpi-grid article { padding: 15px; border: 1px solid rgba(14, 165, 233, .2); border-radius: 14px; background: rgba(14, 165, 233, .06); }
.education-kpi-grid span, .education-kpi-grid strong { display: block; }
.education-kpi-grid strong { margin-top: 6px; font-size: 1.45rem; }
.education-toolbar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.education-toolbar label { display: grid; gap: 5px; }

@media (max-width: 1000px) { .national-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .education-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .national-kpi-grid, .education-kpi-grid { grid-template-columns: 1fr; } }

.status-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.zone-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.status-list li,
.zone-item:not(.sig-zone-card) {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--text-muted);
}

/* Micro-statuts Premium (Sprint v1.2) — dot reflétant un état déjà calculé (api-status/
   db-status, getDatabaseStatus() dans app.js), jamais une donnée fabriquée pour l'occasion.
   Gris tant que l'état n'est pas connu (chargement), puis vert/rouge une fois résolu. */
.status-value {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
  flex-shrink: 0;
}

.status-dot.is-ok {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.status-dot.is-error {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.zone-item:not(.sig-zone-card) {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.zone-item:hover,
.zone-item:focus,
.legend-list [data-zone]:hover,
.legend-list [data-zone]:focus {
  background: rgba(56, 189, 248, 0.08);
  outline: 1px solid rgba(56, 189, 248, 0.24);
}

.legend-list [data-zone] {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
}

.zone-nd {
  border-left: 4px solid var(--zone-nd);
}

.zone-ot {
  border-left: 4px solid var(--zone-ot);
}

.zone-ce {
  border-left: 4px solid var(--zone-ce);
}

.zone-sd {
  border-left: 4px solid var(--zone-sd);
}

.zone-et {
  border-left: 4px solid var(--zone-et);
}

.status-card-text {
  margin: 0;
  color: var(--text-muted);
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.referentiel-content {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 360px;
  gap: 24px;
}

.referentiel-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.table-toolbar h3 {
  margin: 0;
  font-size: 1.15rem;
}

.toolbar-subtitle {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.table-toolbar input {
  width: min(260px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.table-frame {
  overflow-x: auto;
  border-radius: 24px;
}

.province-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.province-table thead {
  background: rgba(255, 255, 255, 0.04);
}

.province-table th,
.province-table td {
  padding: 18px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.province-table th button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.sort-indicator {
  font-size: 0.8rem;
  color: var(--accent);
}

.province-table tbody tr {
  transition: background 0.2s ease;
}

.province-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08);
}

.province-table tbody tr.selected {
  background: rgba(56, 189, 248, 0.14);
}

.province-table td {
  font-size: 0.95rem;
}

.empty-state {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
}

.referentiel-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.detail-card-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.detail-body {
  display: grid;
  gap: 14px;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.2fr);
  gap: 12px;
  align-items: center;
}

.governance-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.governance-kpi-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  padding: 20px 22px;
}

.governance-kpi-card .summary-value {
  font-size: 1.2rem;
}

.governance-shell {
  display: grid;
  gap: 20px;
}

.normalization-hub {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.normalization-hub-header {
  margin-bottom: 0;
}

.compact-panel-header {
  margin-bottom: 0;
}

.compact-panel-header h3,
.normalization-hub-header h3 {
  margin: 0;
  font-size: 1.08rem;
}

.normalization-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.normalization-summary-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  padding: 18px;
}

.normalization-hub-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 18px;
}

.normalization-statistics-card,
.normalization-report-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  padding: 22px;
  display: grid;
  gap: 16px;
}

.normalization-level-stats {
  display: grid;
  gap: 12px;
}

.normalization-level-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.normalization-level-row span,
.normalization-empty {
  color: var(--text-muted);
}

.normalization-level-row strong {
  color: var(--text);
}

.normalization-report-preview {
  margin: 0;
  min-height: 220px;
  white-space: pre-wrap;
  font-family: Consolas, 'Courier New', monospace;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.65);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  padding: 18px;
}

.governance-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.governance-tab {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  display: grid;
  gap: 6px;
}

.governance-tab:hover,
.governance-tab.active {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.12);
}

.governance-tab-label {
  font-weight: 700;
}

.governance-tab-description {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.governance-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 360px;
  gap: 22px;
}

.governance-main {
  display: grid;
  gap: 16px;
}

.governance-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 20px;
  padding: 14px 16px;
}

.governance-search-wrap {
  flex: 1;
}

.governance-search-wrap input,
.governance-filters select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.governance-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 280px;
}

.governance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.governance-action-button {
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.08);
  color: var(--text);
  font-weight: 600;
}

.governance-state-wrap {
  display: grid;
  gap: 10px;
}

.governance-state {
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
}

.governance-state p {
  margin: 0;
  color: var(--text-muted);
}

.governance-table-frame {
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.01);
}

.governance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}

.governance-table th,
.governance-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  text-align: left;
}

.governance-table th {
  color: var(--text);
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.03);
}

.governance-table td {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.governance-table tbody tr {
  cursor: pointer;
  transition: background 0.2s ease;
}

.governance-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08);
}

.governance-table tbody tr.selected {
  background: rgba(56, 189, 248, 0.14);
}

.explorer-row td:first-child {
  min-width: 360px;
}

.explorer-node {
  display: flex;
  align-items: center;
  gap: 10px;
}

.explorer-toggle {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.08);
  color: var(--text);
  font-weight: 700;
  flex: 0 0 auto;
}

.explorer-toggle.leaf {
  opacity: 0.6;
}

.explorer-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
  flex: 0 0 auto;
}

.explorer-label {
  display: grid;
  gap: 2px;
}

.explorer-label strong {
  color: var(--text);
  font-weight: 700;
}

.explorer-label span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
}

.quality-high {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.28);
  color: #a7f3d0;
}

.quality-medium {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

.quality-warning {
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.28);
  color: #fde68a;
}

.quality-low {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fecaca;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-strong);
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.governance-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.governance-pagination button {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 8px 12px;
}

.governance-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.governance-pagination p {
  margin: 0;
  color: var(--text-muted);
}

.governance-detail-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 24px;
  align-self: start;
}

.territorial-file {
  display: grid;
  gap: 16px;
}

.territorial-file-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.territorial-file-header h4 {
  margin: 6px 0 4px;
  font-size: 1.2rem;
}

.territorial-file-subtitle,
.territorial-file-intro {
  margin: 0;
  color: var(--text-muted);
}

.territorial-file-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mode-chip {
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-strong);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.mode-chip.active {
  background: rgba(56, 189, 248, 0.18);
}

.mode-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.territorial-section {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.territorial-section summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 700;
}

.territorial-section summary::-webkit-details-marker {
  display: none;
}

.territorial-section-toggle {
  color: var(--accent-strong);
  font-size: 1.1rem;
}

.territorial-section-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.territorial-field {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.territorial-field span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.territorial-field strong {
  color: var(--text);
  font-weight: 600;
}

.territorial-source-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.territorial-source-badge {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.publication-flow {
  display: grid;
  gap: 8px;
}

.flow-step {
  display: grid;
  gap: 8px;
  color: var(--text);
}

.flow-step span:first-child {
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 10px 12px;
  background: rgba(56, 189, 248, 0.08);
}

.flow-connector {
  color: var(--text-muted);
  text-align: center;
  font-size: 1.1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.detail-row span:first-child {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.detail-row strong {
  color: var(--text);
}

.relation-detail-row {
  grid-template-columns: minmax(120px, 1fr) minmax(80px, 0.8fr) auto;
}

.relation-list-button {
  justify-self: end;
  white-space: nowrap;
}

.demo-enrichment-section {
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(14, 165, 233, 0.08);
}

.demo-enrichment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.demo-enrichment-header h3 {
  margin: 0 0 6px;
}

.demo-enrichment-header p {
  margin: 0;
  color: var(--text-muted);
}

.demo-enrichment-badge,
.demo-enrichment-fields span,
.demo-enrichment-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.demo-enrichment-badge {
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
  border: 1px solid rgba(250, 204, 21, 0.24);
  white-space: nowrap;
}

.demo-enrichment-meta,
.demo-enrichment-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.demo-enrichment-meta span,
.demo-enrichment-fields span {
  background: rgba(15, 23, 42, 0.44);
  color: var(--text);
}

.demo-enrichment-source {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.32);
}

.demo-enrichment-source small {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.empty-detail {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.source-explorer-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.source-explorer-loader {
  display: grid;
  gap: 8px;
}

.source-explorer-loader label {
  font-weight: 700;
}

.source-explorer-loader input {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.source-explorer-loader p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.source-explorer-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.source-explorer-kpis .summary-card {
  padding: 16px;
}

.source-explorer-kpis .summary-value {
  font-size: 0.95rem;
  line-break: anywhere;
}

.source-explorer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.source-tag {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.source-explorer-table {
  margin-bottom: 16px;
  padding: 16px;
}

.source-explorer-table h3 {
  margin: 0 0 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.info-panel,
.details-panel,
.module-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* .map-card séparé de .module-panel (Sprint "Dashboard Premium") : seul le Dashboard
   utilise cette classe (#dashboard-map-card) — habillage Dark Glass propre au
   Dashboard, sans toucher au panneau générique partagé par tous les autres modules. */
.map-card {
  background: var(--glass-panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--glass-shadow);
  /* Pas de backdrop-filter ici : #dashboard-map-card est aussi la cible de l'API
     Fullscreen native (MapFullscreenController appelle requestFullscreen() sur ce
     même élément) — un filtre CSS sur l'élément fullscreen perturbait les cycles
     entrée/sortie répétés (constaté par test). Le fond translucide + bordure fine +
     ombre suffisent au rendu "verre" sans backdrop-filter sur cet élément précis. */
}

.map-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  --dashboard-map-stack-offset: 398px;
  --pilotage-sync-gap: 14px;
  --pilotage-sync-reserve: 0px;
}

.map-card .panel-header {
  margin-bottom: 0;
  gap: 10px;
  align-items: center;
}

.map-card .panel-header h2 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.map-card .panel-label {
  margin: 0 0 2px;
  font-size: 0.72rem;
}

.map-card .panel-badge {
  padding: 4px 10px;
  font-size: 0.76rem;
}

.map-card .map-nav-actions {
  gap: 6px;
}

.map-card .map-nav-actions .table-action-button,
.map-card .map-nav-actions .primary-button {
  padding: 5px 10px;
  min-height: 30px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.map-card .map-breadcrumb {
  padding: 4px 8px;
  font-size: 0.8rem;
  min-height: 0;
}

.map-placeholder {
  min-height: 420px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(15, 23, 42, 0.85));
  border: 1px dashed rgba(56, 189, 248, 0.3);
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--text-muted);
}

.map-hero {
  width: 100%;
  max-width: 340px;
  height: 240px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 24px;
  padding: 22px;
}

.info-card h2 {
  margin: 0 0 18px;
  font-size: 1.1rem;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--text-muted);
}

.info-list strong {
  color: var(--text);
  font-weight: 600;
}

.secondary-card {
  background: rgba(56, 189, 248, 0.06);
}

.shortcut-list {
  display: grid;
  gap: 12px;
}

.shortcut-list button {
  width: 100%;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 16px;
  padding: 14px 18px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--text);
  text-align: left;
}

.details-panel {
  display: grid;
  gap: 24px;
}

.module-panel.hidden,
#dashboard-panel.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.dashboard-workbench {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.46);
  padding: 16px;
}

.workbench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attribute-panel,
.prototype-panel {
  margin-top: 16px;
}

.attribute-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.attribute-toolbar input,
.attribute-toolbar select,
.source-explorer-loader input {
  min-height: 40px;
}

.attribute-table-frame {
  max-height: 420px;
  overflow: auto;
}

.table-action-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}

.governance-table tbody tr.selected,
.attribute-table-frame tbody tr.selected {
  background: rgba(56, 189, 248, 0.14);
  outline: 1px solid rgba(56, 189, 248, 0.28);
}

.import-preview {
  display: grid;
  gap: 12px;
}

.import-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.import-columns span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--surface-muted);
}

.attribute-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.decision-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.decision-filters input,
.decision-filters select {
  min-height: 40px;
}

.decision-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.decision-results {
  min-width: 0;
}

.decision-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.decision-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.decision-map {
  min-height: 220px;
  border: 1px dashed rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.48);
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 16px;
  color: var(--text-muted);
  text-align: center;
}

.decision-map strong {
  color: var(--text);
}

.decision-map span {
  font-size: 0.86rem;
}

.decision-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
  padding: 16px;
}

.decision-card h3 {
  margin: 4px 0 12px;
  font-size: 1rem;
}

.decision-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.decision-detail-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) minmax(0, 1fr);
  gap: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 7px;
}

.decision-detail-list dt {
  color: var(--text-muted);
}

.decision-detail-list dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.decision-recommendation {
  margin-top: 14px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(56, 189, 248, 0.07);
}

.decision-recommendation p,
.decision-missing {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.decision-missing {
  font-size: 0.84rem;
}

.governance-table tr.selected,
.province-table tr.selected {
  background: rgba(56, 189, 248, 0.12);
}

.entity-profile-drawer {
  position: fixed;
  top: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: min(560px, calc(100vw - 48px));
  overflow: auto;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  padding: 22px;
}

body.entity-profile-open .leaflet-control-container {
  z-index: 400;
}

.entity-profile-drawer.hidden {
  display: none;
}

.entity-profile-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  position: sticky;
  top: 0;
  padding-bottom: 14px;
  background: #0f172a;
  z-index: 2;
}

.entity-profile-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.entity-profile-body {
  display: grid;
  gap: 14px;
}

.profile-actions,
.profile-relations,
.activity-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-section {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.profile-section h3 {
  margin: 0 0 12px;
}

.activity-chip {
  display: grid;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
  padding: 8px 12px;
}

.activity-chip small {
  color: var(--text-muted);
}

.challenge-list,
.potential-grid,
.service-grid {
  display: grid;
  gap: 8px;
}

.potential-grid,
.service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.challenge-item,
.potential-grid div,
.service-grid div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  padding: 8px 0;
}

.rich-text-preview {
  color: var(--text-muted);
  line-height: 1.65;
}

/* Profil socio-économique (Micro-sprint E4) */
.socioeco-block {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.socioeco-block:first-of-type {
  margin-top: 0;
}

.socioeco-block h4 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.socioeco-subgroup {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  padding-bottom: 10px;
}

.socioeco-subgroup:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.socioeco-subgroup-label {
  font-weight: 600;
}

.socioeco-count {
  color: var(--text-muted);
  font-weight: 400;
}

.socioeco-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.socioeco-item {
  display: grid;
  gap: 2px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 10px;
}

.socioeco-item-text {
  color: var(--text);
}

.socioeco-item-source {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.socioeco-precision-badge {
  justify-self: start;
  cursor: help;
}

.socioeco-expand-button {
  justify-self: start;
}

.socioeco-loading {
  color: var(--text-muted);
}

.profile-history {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

/* Fiche territoriale intégrée multi-domaines — sections repliables (détails
   natifs, aucun JS de toggle à écrire/entretenir). */
details.profile-section {
  padding: 0;
}

details.profile-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

details.profile-section > summary::-webkit-details-marker {
  display: none;
}

details.profile-section > summary h3 {
  margin: 0;
}

details.profile-section > summary::after {
  content: '▾';
  color: var(--text-muted);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

details.profile-section:not([open]) > summary::after {
  transform: rotate(-90deg);
}

details.profile-section > .profile-section-body {
  padding: 0 16px 16px;
}

.profile-domain-empty {
  color: var(--text-muted);
  margin: 0;
}

.profile-domain-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 10px 0 0;
}

.profile-kpi-button {
  appearance: none;
  border: 0;
  border-bottom: 1px dotted currentColor;
  background: transparent;
  color: var(--brand-blue, #1769aa);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 0.1rem;
}

.profile-kpi-button:hover,
.profile-kpi-button:focus-visible {
  background: color-mix(in srgb, currentColor 9%, transparent);
  border-radius: 0.2rem;
  outline: 2px solid transparent;
}

.profile-service-subrow {
  padding-left: 0.8rem;
}

/* Fiche territoriale V2 — densité et hiérarchie métier. */
.entity-profile-drawer {
  padding: 16px;
}

.entity-profile-drawer .profile-section {
  margin: 8px 0;
  border-radius: 10px;
}

.entity-profile-drawer .profile-section > summary {
  padding: 9px 11px;
}

.entity-profile-drawer .profile-section-body {
  padding: 8px 11px 11px;
}

.entity-profile-drawer .detail-row {
  min-height: 30px;
  padding: 5px 0;
  gap: 8px;
}

.profile-summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 10px;
}

.profile-summary-metric {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.06);
}

.profile-summary-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.profile-summary-metric strong {
  display: block;
  margin-top: 2px;
  font-size: 0.94rem;
  line-height: 1.2;
}

.profile-parent-scope {
  margin: 0 0 7px;
  padding: 7px 9px;
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.profile-characteristics {
  display: grid;
  gap: 8px;
}

.profile-characteristic h4 {
  margin: 0 0 3px;
  font-size: 0.78rem;
}

.profile-characteristic-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.42;
  white-space: pre-line;
}

.profile-characteristic-text.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.profile-text-toggle {
  margin-top: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-blue, #38bdf8);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 650;
}

@media (min-width: 520px) {
  .profile-summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entity-profile-drawer .detail-attributes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-profile-drawer .detail-row { align-items: start; }
}

.profile-domain-grid {
  display: grid;
  gap: 8px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.panel-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.75rem;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.85rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.metric-card {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.metric-card h3 {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.metric-value {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 700;
}

.enrichment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.enrichment-main,
.enrichment-detail {
  min-width: 0;
}

.enrichment-editor-label {
  display: block;
  margin: 16px 0 8px;
  color: var(--text-muted);
  font-weight: 700;
}

.enrichment-editor {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--text);
  padding: 12px;
  font: inherit;
  line-height: 1.5;
}

.knowledge-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.knowledge-main,
.knowledge-profile {
  min-width: 0;
}

.knowledge-search-results {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.knowledge-origin-panel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.36);
}

.knowledge-origin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.knowledge-origin-header h3 {
  margin: 4px 0 0;
}

.knowledge-origin-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.knowledge-origin-rules span {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.knowledge-origin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.knowledge-origin-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.32);
}

.knowledge-origin-item strong,
.knowledge-origin-item span,
.knowledge-origin-item small {
  overflow-wrap: anywhere;
}

.knowledge-origin-item span {
  color: var(--text-muted);
}

.knowledge-origin-item small {
  color: var(--text-soft);
}

.knowledge-completeness-bars {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.knowledge-completeness-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text-muted);
  font-weight: 700;
}

.knowledge-progress {
  position: relative;
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.knowledge-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.82), rgba(56, 189, 248, 0.9));
}

.knowledge-progress strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  color: var(--text);
}

.knowledge-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.knowledge-tabs button {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.56);
  color: var(--text-muted);
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
}

.knowledge-tabs button.active {
  border-color: rgba(56, 189, 248, 0.55);
  color: var(--text);
  background: rgba(56, 189, 248, 0.14);
}

.knowledge-tab-content {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.36);
}

.knowledge-tab-content h4 {
  margin: 0 0 8px;
}

.knowledge-section-source {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.knowledge-workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.knowledge-workflow span {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .nav-menu {
    width: 100%;
    margin-top: 18px;
  }

  .main-content {
    padding: 24px 24px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  /* Écran moyen (≤1080px) — colonne 170-190px (cible explicite du mandat). */
  .dashboard-map-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 190px);
  }

  .dashboard-zones-list .sig-zone-card {
    min-height: 54px;
    max-height: 62px;
  }

  .dashboard-zones-list .sig-zone-card-title {
    font-size: 0.72rem;
  }

  .dashboard-zones-list .sig-zone-card-meta,
  .dashboard-zones-list .sig-zone-card-count {
    font-size: 0.62rem;
  }

  .dashboard-national-map {
    height: clamp(480px, 58vh, 660px);
  }

  .dashboard-status-row {
    grid-template-columns: 1fr;
  }

  .governance-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .governance-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .governance-main-layout {
    grid-template-columns: 1fr;
  }

  .normalization-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .normalization-hub-layout {
    grid-template-columns: 1fr;
  }

  .governance-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .governance-filters {
    min-width: 0;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-filters {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .decision-layout {
    grid-template-columns: 1fr;
  }

  .enrichment-layout {
    grid-template-columns: 1fr;
  }

  .knowledge-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-field,
  .notification-button,
  .profile-card {
    width: 100%;
  }

  .map-placeholder {
    min-height: 320px;
  }

  .map-card {
    --dashboard-map-stack-offset: 430px;
  }

  .dashboard-map-workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-national-map {
    height: clamp(420px, 52vh, 560px);
  }

  .dashboard-zones-sidebar {
    order: 2;
    max-width: none;
  }

  .dashboard-zones-sidebar .sig-inspector-body {
    overflow-y: visible;
  }

  .dashboard-map-primary {
    order: 1;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .governance-kpis,
  .governance-tabs {
    grid-template-columns: 1fr;
  }

  .normalization-summary-grid {
    grid-template-columns: 1fr;
  }

  .decision-filters {
    grid-template-columns: 1fr;
  }

  .decision-detail-list div {
    grid-template-columns: 1fr;
  }

  .entity-profile-drawer {
    inset: 12px;
    width: auto;
    border-radius: 12px;
    padding: 16px;
  }

  .knowledge-kpi-grid,
  .knowledge-completeness-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .nav-menu {
    width: 100%;
    margin-top: 18px;
  }

  .topbar,
  .module-panel {
    padding: 22px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .search-field,
  .profile-card {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* Sprint 3.3.2 - layout unifie des modules */
.main-content {
  min-height: calc(100vh - var(--footer-height));
  height: calc(100vh - var(--footer-height));
  overflow: auto;
  gap: 11px;
  padding: 10px 24px;
}

.topbar {
  flex: 0 0 auto;
  padding: 5px 22px;
  border-radius: var(--radius-md);
}

.page-context {
  margin-bottom: 4px;
}

.page-title {
  font-size: clamp(1.45rem, 1.8vw, 2.1rem);
  line-height: 1.15;
}

/* Correction ciblée "Dashboard entier visible au premier écran" — sous ~1400px de
   large, "Tableau de bord" passait sur deux lignes (le libellé MODULE aussi),
   gonflant la topbar bien au-delà de sa cible (114px mesurés à 1366×768 contre
   64-68px visés) : la vraie cause du dépassement n'était pas le padding, mais le
   retour à la ligne du titre faute de place. Aucun texte n'est coupé ni supprimé —
   uniquement sa taille, pour qu'il tienne sur une seule ligne dans l'espace réel
   disponible (topbar-left ≈ 290px à 1366px, partagé avec le badge "Version 1.0"). */
@media (max-width: 1400px) {
  .topbar-left {
    gap: 12px;
  }

  .page-context {
    font-size: 0.68rem;
    margin-bottom: 2px;
  }

  .page-title {
    font-size: 1.22rem;
    line-height: 1.2;
  }
}

.content-area {
  min-height: 0;
  display: grid;
  gap: 14px;
  min-width: 0;
  overflow-x: hidden;
}

#dashboard-panel,
.module-panel {
  scroll-margin-top: 0;
  outline: none;
}

/* Correction ciblée "Dashboard entier visible au premier écran" — compacité verticale
   des cartes KPI (Dashboard uniquement, via #dashboard-panel). Surcharge à spécificité
   supérieure (#id + classe) pour agir uniquement depuis ce fichier, sans modifier
   dashboard-components.css (règle partagée par d'autres cartes potentielles). */
#dashboard-panel .dashboard-card {
  padding: 8px 14px;
}

#dashboard-panel .dashboard-kpi-grid {
  gap: 8px;
  margin-bottom: 11px;
}

/* Lisibilité minimale des textes KPI (Correction "Dashboard entier visible") :
   0.68rem (~10.9px) et 1.35rem (~21.6px) passaient sous les planchers de lisibilité
   (13px / 24px). Surcharge à spécificité supérieure (#id + 3 classes) pour agir
   depuis ce fichier sans modifier dashboard-components.css. */
#dashboard-panel .dashboard-card .dashboard-metric .summary-label {
  font-size: 0.82rem;
}

#dashboard-panel .dashboard-card .dashboard-metric .summary-value {
  font-size: 1.5rem;
}

/* Sprint "Finition visuelle — densification" (Dashboard uniquement, via #dashboard-panel) :
   gain d'espace vertical/horizontal façon Fabric/Azure Portal, sans jamais réduire la
   taille des chiffres (summary-value reste 1.5rem, cf. règle ci-dessus). Rayons resserrés
   (registre institutionnel), padding des cartes/badges réduit d'~20%, icônes légèrement
   réduites (couleurs inchangées), respiration rééquilibrée autour du titre "Données
   stratégiques disponibles". Surcharges à spécificité #id, sans toucher
   dashboard-components.css (partagé) ni .panel-header/.panel-badge/.module-panel
   (génériques, utilisés par les autres modules — Centre de Décision, CCN, NIRE...). */
#dashboard-panel .national-summary {
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 14px;
}

#dashboard-panel .national-summary-header {
  margin-bottom: 20px;
}

#dashboard-panel .national-summary .panel-label {
  margin-bottom: 4px;
}

#dashboard-panel .national-summary-header .panel-badge {
  padding: 5px 10px;
  border-radius: 10px;
}

#dashboard-panel .dashboard-card {
  border-radius: 14px;
  padding: 6px 11px;
}

#dashboard-panel .dashboard-kpi-grid {
  gap: 7px;
  margin-bottom: 10px;
}

#dashboard-panel .dashboard-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

#dashboard-panel .dashboard-icon svg {
  width: 15px;
  height: 15px;
}

#dashboard-panel .dashboard-metric-note {
  padding: 1px 6px;
  margin-top: 2px;
  border-radius: 8px;
  line-height: 1.4;
}

.dashboard-grid,
.module-panel {
  margin-top: 0;
}

.module-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  border-radius: 16px;
}

.panel-header {
  margin-bottom: 0;
  gap: 12px;
}

.panel-label {
  margin-bottom: 4px;
}

.panel-header h2 {
  font-size: 1.35rem;
  line-height: 1.2;
}

.panel-badge {
  padding: 6px 10px;
}

.dashboard-main,
.cartography-main,
.cartography-sidebar,
.governance-shell,
.decision-side,
.knowledge-main,
.knowledge-profile,
.enrichment-main,
.enrichment-detail,
.import-preview {
  gap: 12px;
  align-content: start;
}

.dashboard-grid {
  gap: 16px;
}

.cartography-layout,
.referentiel-content,
.governance-main-layout,
.decision-layout,
.knowledge-layout,
.enrichment-layout,
.normalization-hub-layout {
  gap: 14px;
  align-items: start;
}

.summary-grid,
.metrics-grid,
.governance-kpis,
.source-explorer-kpis,
.knowledge-kpi-grid,
.normalization-summary-grid {
  gap: 12px;
  margin-bottom: 12px;
}

.summary-card,
.metric-card,
.governance-kpi-card,
.status-card,
.dashboard-zones-sidebar,
.info-card,
.layers-panel,
.carto-info-panel,
.source-explorer-table,
.normalization-hub,
.normalization-statistics-card,
.normalization-report-card {
  border-radius: 12px;
  padding: 14px;
}

.dashboard-workbench,
.attribute-panel,
.prototype-panel,
.decision-recommendation,
.knowledge-section-source,
.knowledge-workflow {
  margin-top: 0;
}

.decision-filters,
.attribute-toolbar {
  margin: 0 0 12px;
}

.source-explorer-tags {
  margin-bottom: 10px;
}

.map-canvas {
  min-height: clamp(480px, calc(100vh - 220px), 920px);
}

.map-placeholder {
  min-height: clamp(260px, calc(100vh - 300px), 420px);
  padding: 18px;
}

.decision-map {
  min-height: clamp(160px, 24vh, 220px);
}

.normalization-report-preview {
  min-height: clamp(120px, 22vh, 220px);
}

.attribute-table-frame,
.governance-table-wrapper,
.province-table-wrapper,
.source-explorer-table,
.knowledge-table-wrapper,
.enrichment-table-wrapper {
  max-height: calc(100vh - 300px);
  overflow: auto;
}

.entity-profile-drawer {
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(560px, calc(100vw - 24px));
}

@media (min-width: 1600px) {
  .main-content {
    padding: 20px 28px;
  }
}

@media (max-width: 1080px) {
  .main-content {
    height: auto;
    min-height: 100vh;
    padding: 14px;
  }

  .topbar,
  .module-panel {
    padding: 16px;
  }

  .nav-menu {
    margin-top: 12px;
  }
}

@media (max-width: 720px) {
  .main-content {
    gap: 12px;
    padding: 12px;
  }

  .topbar {
    padding: 14px;
  }

  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }
}
.ceni-registry { --ceni-bg: #07111f; --ceni-panel: #0d1b2d; --ceni-panel-2: #102238; --ceni-border: #243a54; --ceni-text: #e8f0fa; --ceni-muted: #91a4ba; color: var(--ceni-text); background: radial-gradient(circle at 92% 4%, rgba(28, 125, 181, .14), transparent 28%), var(--ceni-bg); }
.ceni-registry input, .ceni-registry select, .ceni-registry button { font: inherit; }
.ceni-hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 20px; }
.ceni-hero h2 { margin: 3px 0 6px; font-size: clamp(1.5rem, 2vw, 2.15rem); letter-spacing: -.025em; }
.ceni-hero p { margin: 0; color: var(--ceni-muted); }
.ceni-hero-meta { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.ceni-live { display: inline-flex; gap: 7px; align-items: center; color: #a7f3d0; font-size: .78rem; font-weight: 700; }
.ceni-live i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgba(52,211,153,.12); }
.ceni-kpis { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ceni-kpi { position: relative; display: flex; gap: 12px; align-items: center; min-height: 112px; padding: 16px; overflow: hidden; border: 1px solid var(--ceni-border); border-radius: 14px; background: linear-gradient(145deg, rgba(20,43,68,.96), rgba(10,25,43,.96)); box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.ceni-kpi::after { content: ""; position: absolute; inset: auto -20px -35px auto; width: 80px; height: 80px; border-radius: 50%; background: currentColor; opacity: .06; }
.ceni-kpi-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.08); font-size: 1.1rem; }
.ceni-kpi div { min-width: 0; display: grid; }
.ceni-kpi div > span, .ceni-kpi small { color: var(--ceni-muted); font-size: .7rem; line-height: 1.3; }
.ceni-kpi strong { margin: 2px 0; color: #fff; font-size: 1.45rem; letter-spacing: -.025em; }
.ceni-kpi--blue { color: #38bdf8; } .ceni-kpi--green { color: #34d399; } .ceni-kpi--amber { color: #fbbf24; } .ceni-kpi--violet { color: #a78bfa; } .ceni-kpi--cyan { color: #22d3ee; } .ceni-kpi--rose { color: #fb7185; }
.ceni-filter-card, .ceni-table-card, .ceni-analytics { border: 1px solid var(--ceni-border); border-radius: 16px; background: linear-gradient(155deg, rgba(16,34,56,.98), rgba(8,22,38,.98)); box-shadow: 0 16px 36px rgba(0,0,0,.18); }
.ceni-filter-card { padding: 14px; margin-bottom: 16px; }
.ceni-toolbar { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(145px, 1fr)) auto auto; gap: 10px; align-items: end; }
.ceni-field { display: grid; gap: 5px; min-width: 0; }
.ceni-field > span { color: var(--ceni-muted); font-size: .69rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.ceni-registry input, .ceni-registry select { min-width: 0; height: 42px; padding: 0 11px; color: var(--ceni-text); border: 1px solid #304863; border-radius: 9px; outline: none; background: #091728; }
.ceni-registry input:focus, .ceni-registry select:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,.12); }
.ceni-action { height: 42px; white-space: nowrap; }
.ceni-provenance { margin: 10px 2px 0; color: var(--ceni-muted); font-size: .72rem; overflow-wrap: anywhere; }
.ceni-provenance strong { color: #c9d8e8; }
.ceni-workspace { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(285px, .8fr); gap: 16px; margin-bottom: 16px; }
.ceni-map-stage { position: relative; min-width: 0; min-height: 650px; overflow: hidden; border: 1px solid var(--ceni-border); border-radius: 16px; background: #071421; box-shadow: 0 16px 36px rgba(0,0,0,.22); }
.ceni-map-stage.is-fullscreen { position: fixed; inset: 14px; z-index: 3000; min-height: 0; border-color: #4b6b8c; box-shadow: 0 30px 80px #000; }
.ceni-map { position: absolute; inset: 0; min-height: 650px; background: #071421; }
.ceni-map-stage .leaflet-tile-pane { filter: saturate(.55) brightness(.72) contrast(1.12) hue-rotate(165deg); }
.ceni-map-stage.is-light .leaflet-tile-pane { filter: none; }
.ceni-map-tools { position: absolute; z-index: 700; top: 14px; right: 14px; display: grid; gap: 7px; }
.ceni-map-tools button, .ceni-pagination button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: #dbeafe; border: 1px solid rgba(137,174,207,.38); border-radius: 9px; background: rgba(7,20,34,.92); box-shadow: 0 5px 14px rgba(0,0,0,.25); cursor: pointer; }
.ceni-map-tools button:hover, .ceni-pagination button:hover:not(:disabled) { color: #fff; border-color: #38bdf8; background: #12304c; }
.ceni-map-counter { position: absolute; z-index: 700; top: 14px; left: 56px; display: flex; gap: 7px; align-items: baseline; padding: 8px 11px; border: 1px solid rgba(137,174,207,.3); border-radius: 9px; background: rgba(7,20,34,.9); backdrop-filter: blur(8px); }
.ceni-map-counter strong { font-size: 1rem; } .ceni-map-counter span { color: var(--ceni-muted); font-size: .7rem; }
.ceni-map-legend { position: absolute; z-index: 700; bottom: 15px; left: 15px; display: grid; gap: 5px; max-height: 260px; padding: 11px; overflow: auto; border: 1px solid rgba(137,174,207,.3); border-radius: 10px; background: rgba(7,20,34,.92); font-size: .68rem; backdrop-filter: blur(8px); }
.ceni-map-legend > span { display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: center; }
.ceni-map-legend i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: #fff; background: var(--ceni-category); font-style: normal; }
.ceni-map-legend em { color: var(--ceni-muted); font-style: normal; }
.ceni-map-div-icon { border: 0; background: none; }
.ceni-symbol, .ceni-cluster { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid rgba(255,255,255,.92); border-radius: 9px 9px 9px 2px; color: #fff; background: var(--ceni-category); box-shadow: 0 4px 12px rgba(0,0,0,.42); transform: rotate(-10deg); }
.ceni-symbol { font-size: .8rem; } .ceni-cluster { width: 38px; height: 38px; border-radius: 50%; background: #0879a8; font-size: .65rem; font-weight: 900; transform: none; }
.ceni-analytics { min-height: 650px; padding: 17px; overflow: auto; }
.ceni-analytics h3 { margin: 2px 0 15px; font-size: 1rem; }
.ceni-analytics h4 { margin: 0 0 8px; color: #c7d6e6; font-size: .73rem; text-transform: uppercase; letter-spacing: .06em; }
.ceni-donut-wrap { display: grid; grid-template-columns: 128px 1fr; gap: 15px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--ceni-border); }
.ceni-donut { display: grid; place-items: center; width: 124px; height: 124px; border-radius: 50%; background: conic-gradient(#34d399 0 var(--valid,0%), #fbbf24 var(--valid,0%) var(--suspect,0%), #f87171 var(--suspect,0%) 100%); }
.ceni-donut::before { content: ""; grid-area: 1/1; width: 82px; height: 82px; border-radius: 50%; background: #0d1b2d; }
.ceni-donut span { z-index: 1; grid-area: 1/1; display: grid; text-align: center; }
.ceni-donut strong { font-size: 1.18rem; } .ceni-donut small { color: var(--ceni-muted); }
#ceni-quality-legend p { display: grid; grid-template-columns: 8px 1fr auto; gap: 6px; margin: 7px 0; color: var(--ceni-muted); font-size: .7rem; }
#ceni-quality-legend i { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; } .is-valid { background: #34d399; } .is-suspect { background: #fbbf24; } .is-rejected { background: #f87171; }
.ceni-analytics-block { padding: 15px 0 2px; }
.ceni-bar-row { margin-bottom: 9px; } .ceni-bar-row p { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 4px; color: var(--ceni-muted); font-size: .69rem; } .ceni-bar-row p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ceni-bar-row > i { display: block; height: 5px; overflow: hidden; border-radius: 5px; background: #1e344d; } .ceni-bar-row b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#0ea5e9,#22d3ee); }
.ceni-analytics-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 14px; border-top: 1px solid var(--ceni-border); }
.ceni-analytics ol { margin: 0; padding-left: 18px; } .ceni-analytics li { margin: 7px 0; padding-left: 2px; color: #d6e3f1; font-size: .68rem; } .ceni-analytics li span { display: inline-block; max-width: 64%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; } .ceni-analytics li strong { float: right; color: var(--ceni-muted); }
.ceni-table-card { overflow: visible; }
.ceni-table-header { display: flex; justify-content: space-between; gap: 16px; align-items: end; padding: 17px; border-bottom: 1px solid var(--ceni-border); }
.ceni-table-header h3 { margin: 2px 0 0; } .ceni-table-actions { display: flex; gap: 9px; align-items: center; }
.ceni-columns { position: relative; } .ceni-columns summary { height: 42px; padding: 11px 14px; list-style: none; border: 1px solid #304863; border-radius: 9px; background: #0b1b2e; cursor: pointer; }
.ceni-columns[open] > div { position: absolute; z-index: 30; top: 47px; right: 0; display: grid; gap: 8px; min-width: 190px; padding: 12px; border: 1px solid var(--ceni-border); border-radius: 10px; background: #0b1b2e; box-shadow: 0 12px 30px #000; }
.ceni-columns label { display: flex; gap: 8px; align-items: center; font-size: .75rem; } .ceni-columns input { width: 15px; height: 15px; }
.ceni-table-scroll { max-height: 620px; overflow: auto; }
.ceni-table { width: 100%; min-width: 1050px; border-collapse: collapse; table-layout: fixed; color: var(--ceni-text); background: #091727; }
.ceni-table th { position: sticky; z-index: 5; top: 0; padding: 13px 12px; overflow: hidden; color: #afc1d4; border-bottom: 1px solid #34506d; background: #11263d; font-size: .69rem; text-align: left; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; resize: horizontal; }
.ceni-table th[data-direction="asc"]::after { content: "  ↑"; color: #38bdf8; } .ceni-table th[data-direction="desc"]::after { content: "  ↓"; color: #38bdf8; }
.ceni-table td { padding: 11px 12px; overflow: hidden; border-bottom: 1px solid rgba(53,78,103,.42); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.ceni-table tbody tr:nth-child(even) { background: rgba(25,48,73,.3); } .ceni-table tbody tr { cursor: pointer; transition: background .15s; } .ceni-table tbody tr:hover, .ceni-table tbody tr:focus { outline: none; background: rgba(14,165,233,.13); }
.ceni-table code { color: #7dd3fc; }
.ceni-badge { display: inline-flex; max-width: 100%; padding: 3px 7px; overflow: hidden; border: 1px solid #35506a; border-radius: 999px; color: #c9d8e8; background: #142942; font-size: .64rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ceni-badge--quality[data-value="valid"] { color: #a7f3d0; border-color: rgba(52,211,153,.35); background: rgba(16,185,129,.12); } .ceni-badge--quality[data-value="suspect"] { color: #fde68a; border-color: rgba(251,191,36,.4); background: rgba(245,158,11,.12); } .ceni-badge--quality[data-value="invalid"], .ceni-badge--quality[data-value="outside_country"] { color: #fecaca; border-color: rgba(248,113,113,.4); background: rgba(239,68,68,.12); }
.ceni-pagination { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 12px 17px; color: var(--ceni-muted); font-size: .72rem; } .ceni-pagination p { margin: 0; } .ceni-pagination > div { display: flex; gap: 8px; align-items: center; } .ceni-pagination select { height: 38px; } .ceni-pagination button:disabled { opacity: .35; cursor: not-allowed; }
.ceni-detail-drawer { position: fixed; z-index: 3200; top: 0; right: 0; width: min(510px, 94vw); height: 100vh; padding: 25px; overflow: auto; color: var(--ceni-text); border-left: 1px solid #38516c; background: #081625; box-shadow: -24px 0 70px rgba(0,0,0,.55); transform: translateX(105%); transition: transform .25s ease; }
.ceni-detail-drawer.is-open { transform: translateX(0); } .ceni-detail-drawer > button { position: sticky; z-index: 2; top: 0; float: right; width: 38px; height: 38px; color: #dbeafe; border: 1px solid #38516c; border-radius: 9px; background: #10243a; cursor: pointer; }
.ceni-detail-head { display: flex; gap: 14px; align-items: center; padding: 25px 0 18px; border-bottom: 1px solid var(--ceni-border); } .ceni-detail-head h3 { margin: 3px 0 7px; font-size: 1.25rem; } .ceni-detail-head p { margin: 0; }
.ceni-detail-icon { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border-radius: 14px; color: #fff; background: var(--ceni-category); font-size: 1.35rem; }
.ceni-detail-drawer section { padding: 16px 0; border-bottom: 1px solid var(--ceni-border); } .ceni-detail-drawer h4 { margin: 0 0 11px; color: #7dd3fc; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.ceni-detail-drawer dl { display: grid; grid-template-columns: minmax(125px,.8fr) minmax(0,1.35fr); gap: 8px 12px; margin: 0; } .ceni-detail-drawer dt { color: var(--ceni-muted); font-size: .72rem; } .ceni-detail-drawer dd { margin: 0; overflow-wrap: anywhere; font-size: .76rem; } .ceni-detail-drawer pre { max-height: 280px; padding: 12px; overflow: auto; color: #bde6fb; border-radius: 9px; background: #04101c; font-size: .68rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1450px) { .ceni-kpis { grid-template-columns: repeat(3,1fr); } .ceni-toolbar { grid-template-columns: minmax(220px,1.4fr) repeat(3,1fr); } .ceni-action { grid-row: 2; } }
@media (max-width: 1100px) { .ceni-workspace { grid-template-columns: 1fr; } .ceni-analytics { min-height: auto; } .ceni-toolbar { grid-template-columns: repeat(2,1fr); } .ceni-action { grid-row: auto; } }
@media (max-width: 720px) { .ceni-registry { padding: 14px; } .ceni-hero, .ceni-table-header { flex-direction: column; align-items: stretch; } .ceni-hero-meta { white-space: normal; } .ceni-kpis, .ceni-toolbar { grid-template-columns: 1fr; } .ceni-kpi { min-height: 90px; } .ceni-map-stage, .ceni-map { min-height: 520px; } .ceni-map-counter { left: 12px; top: 64px; } .ceni-donut-wrap { grid-template-columns: 1fr; justify-items: center; } .ceni-table-actions { align-items: stretch; flex-direction: column; } .ceni-table-actions input { width: 100%; } .ceni-pagination { align-items: stretch; flex-direction: column; } .ceni-detail-drawer { padding: 18px; } .ceni-detail-drawer dl { grid-template-columns: 1fr; } }

.dnai-panel { padding: 24px; color: #e8f0fa; background: radial-gradient(circle at 90% 0, rgba(14,165,233,.14), transparent 34%), #07111f; }
.dnai-hero { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:20px; }
.dnai-hero h2 { margin:4px 0; font-size:28px; }
.dnai-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
.dnai-kpi { padding:16px; border:1px solid #27415e; border-radius:12px; background:#0d1b2d; }
.dnai-kpi strong { display:block; font-size:26px; color:#7dd3fc; }
.dnai-search-card { display:flex; gap:12px; align-items:end; padding:16px; border:1px solid #27415e; border-radius:12px; background:#0d1b2d; }
.dnai-search-card label { flex:1; display:grid; gap:7px; }
.dnai-search-card input { height:42px; padding:0 12px; color:#e8f0fa; background:#07111f; border:1px solid #35506e; border-radius:8px; }
.dnai-pending { margin-top:18px; padding:16px; border:1px solid #6b5325; border-radius:12px; background:#201a0d; }
.dnai-pending-item { margin:8px 0; color:#fcd34d; }
@media (max-width: 800px) { .dnai-kpis { grid-template-columns:1fr 1fr; } .dnai-search-card,.dnai-hero { flex-direction:column; align-items:stretch; } }

.ntil-panel { min-height:100vh; padding:26px; color:#edf6ff; background:radial-gradient(circle at 85% 0,rgba(59,130,246,.18),transparent 30%),radial-gradient(circle at 10% 30%,rgba(14,165,233,.08),transparent 28%),#06101d; }
.ntil-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:20px; }
.ntil-hero h2 { margin:4px 0; font-size:30px; }.ntil-score { width:190px; padding:16px; text-align:center; border:1px solid #24638a; border-radius:16px; background:linear-gradient(145deg,#0b2941,#0d1b2d); box-shadow:0 14px 35px rgba(0,0,0,.22); }.ntil-score strong { display:block; font-size:36px; color:#67e8f9; }.ntil-score span { font-size:12px; color:#9fb5ca; }
.ntil-kpis { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:11px; margin-bottom:16px; }.ntil-kpi { padding:14px; border:1px solid #223e59; border-radius:13px; background:rgba(13,27,45,.94); }.ntil-kpi strong { display:block; font-size:24px; color:#bae6fd; }.ntil-kpi span { color:#9fb5ca; font-size:12px; }
.ntil-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.ntil-card { min-width:0; padding:18px; border:1px solid #223e59; border-radius:14px; background:rgba(13,27,45,.94); box-shadow:0 12px 32px rgba(0,0,0,.16); }.ntil-card--wide { grid-column:1/-1; }.ntil-card h3 { margin:0 0 14px; }.ntil-search { display:grid; grid-template-columns:1fr 190px auto; gap:10px; }.ntil-search input,.ntil-search select { height:42px; padding:0 11px; color:#edf6ff; background:#071321; border:1px solid #34516c; border-radius:9px; }
.ntil-bar-row { display:grid; grid-template-columns:110px 1fr 54px; gap:10px; align-items:center; margin:11px 0; }.ntil-bar { height:9px; overflow:hidden; border-radius:9px; background:#172c40; }.ntil-bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#0ea5e9,#67e8f9); }.ntil-family { display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px solid #1e3850; }.ntil-discovery { padding:10px; margin:8px 0; border-left:3px solid #f59e0b; background:#211a0b; }.ntil-history-item { padding:10px 0; border-bottom:1px solid #1e3850; color:#b9c9d8; }
@media (max-width:1050px) { .ntil-kpis { grid-template-columns:repeat(3,1fr); }.ntil-grid { grid-template-columns:1fr; }.ntil-card--wide { grid-column:auto; } } @media (max-width:680px) { .ntil-panel { padding:14px; }.ntil-hero,.ntil-search { display:flex; flex-direction:column; align-items:stretch; }.ntil-score { width:auto; }.ntil-kpis { grid-template-columns:1fr 1fr; } }
/* ── UX L0 : modes sidebar + groupes (restauration contrôlée) ── */
.sidebar-toggle-btn,
.sidebar-reopen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--utility-chip-bg);
  color: var(--text);
  cursor: pointer;
  flex: 0 0 auto;
}

.sidebar-toggle-btn:hover,
.sidebar-reopen-btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
}

.sidebar-reopen-btn {
  position: fixed;
  left: 12px;
  bottom: 18px;
  top: auto;
  z-index: 5000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.app-shell[data-sidebar-mode="compact"] .sidebar {
  padding: 18px 10px;
  align-items: center;
}

.app-shell[data-sidebar-mode="compact"] .brand {
  margin-bottom: 18px;
  justify-content: center;
}

.app-shell[data-sidebar-mode="compact"] .brand-copy,
.app-shell[data-sidebar-mode="compact"] .nav-label,
.app-shell[data-sidebar-mode="compact"] .sidebar-footer {
  display: none !important;
}

.app-shell[data-sidebar-mode="compact"] .nav-item {
  justify-content: center;
  padding: 10px 8px;
  grid-template-columns: auto;
}

.app-shell[data-sidebar-mode="compact"] .nav-icon {
  margin: 0;
}

.app-shell[data-sidebar-mode="compact"] .nav-group {
  width: 100%;
  align-items: center;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.app-shell[data-sidebar-mode="compact"] .nav-group:first-child {
  border-top: none;
  padding-top: 0;
}

.app-shell[data-sidebar-mode="compact"] .nav-group-toggle {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 4px 0 2px;
  min-height: 0;
  pointer-events: none;
}

.app-shell[data-sidebar-mode="compact"] .nav-group-title,
.app-shell[data-sidebar-mode="compact"] .nav-group-chevron {
  display: none !important;
}

.app-shell[data-sidebar-mode="compact"] .nav-group-icon {
  opacity: 0.45;
  font-size: 0.55rem;
}

.app-shell[data-sidebar-mode="compact"] .nav-group-panel,
.app-shell[data-sidebar-mode="compact"] .nav-group-panel[hidden] {
  display: grid !important;
  gap: 6px;
  height: auto !important;
  min-height: 0;
  padding: 0;
  width: 100%;
  justify-items: center;
}

.app-shell[data-sidebar-mode="hidden"] .sidebar > *:not(.sidebar-reopen-btn) {
  display: none !important;
}

.app-shell[data-sidebar-mode="hidden"] .sidebar-reopen-btn {
  display: inline-flex !important;
  pointer-events: auto;
  opacity: 1;
}

.app-shell:not([data-sidebar-mode="hidden"]) .sidebar-reopen-btn {
  display: none !important;
}

.sidebar-footer {
  flex: 0 0 auto;
}

/* ══════════════════════════════════════════════════════════════════════════════════════
   SPRINT B — DARK GLASS PREMIUM (perception uniquement, aucune géométrie touchée)
   ══════════════════════════════════════════════════════════════════════════════════════
   Toutes les dimensions du Sprint A (Sidebar Premium) restent figées : ces règles ne
   déclarent JAMAIS width/height/padding/margin/border-radius/font-size/position — elles
   ne touchent que ce qui ne déplace ni ne redimensionne rien : background (couche +
   dégradé), couleur de bordure (jamais l'épaisseur), box-shadow (contact + ambiante +
   reflets internes via inset) et backdrop-filter. Scopées [data-theme="dark"] : le mode
   clair (Soft Light, sans glass, déjà validé) n'est pas concerné. Spécificité volontaire-
   ment supérieure aux règles de base pour agir uniquement depuis ce fichier, sans modifier
   theme-engine.css / dashboard-components.css / command-center.css (partagés par d'autres
   modules) ni les couleurs métier (zones FDSU, accents KPI). */

/* ── Verre principal (sidebar, topbar, popup recherche, palette Commandes, menu
   utilisateur) — même recette sur les 5 surfaces pour une cohérence "plusieurs couches
   de verre" : base plus transparente qu'avant + deux nappes de lumière (sheen supérieur
   + diagonale très diffuse), bordure quasi invisible (reflet, pas de gris plat), ombre
   double (contact serré + ambiante très diffuse) avec reflet interne haut/bas, flou plus
   qualitatif (saturation légèrement relevée, comme un vrai verre dépoli). */
[data-theme="dark"] .topbar,
[data-theme="dark"] .global-search-results,
[data-theme="dark"] .command-center-panel,
[data-theme="dark"] #user-menu .user-menu-panel {
  background-color: rgba(15, 23, 42, 0.5);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0) 26%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.022) 0%, rgba(255, 255, 255, 0) 58%);
  border-color: rgba(255, 255, 255, 0.16) rgba(255, 255, 255, 0.09) rgba(255, 255, 255, 0.05) rgba(255, 255, 255, 0.09);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.22),
    0 28px 62px -26px rgba(2, 6, 23, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

/* Sidebar : un seul bord visible (border-right) — même recette, appliquée au bon canal. */
[data-theme="dark"] .sidebar {
  background-color: rgba(15, 23, 42, 0.5);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 22%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 55%);
  border-right-color: rgba(255, 255, 255, 0.09);
  box-shadow:
    1px 0 1px rgba(0, 0, 0, 0.18),
    24px 0 56px -30px rgba(2, 6, 23, 0.55),
    inset 1px 0 0 rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

/* ── Carte cartographique (.map-card) — même profondeur de verre, SANS backdrop-filter :
   cet élément est aussi la cible native de la Fullscreen API (MapFullscreenController) ;
   un filtre CSS dessus perturbait les cycles entrée/sortie plein écran (déjà constaté et
   documenté ci-dessus dans ce fichier). Le fond translucide en couches + la bordure fine
   + l'ombre double suffisent au même rendu "verre" sans backdrop-filter. */
[data-theme="dark"] .map-card {
  background-color: rgba(17, 24, 39, 0.62);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0) 20%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.018) 0%, rgba(255, 255, 255, 0) 50%);
  border-color: rgba(255, 255, 255, 0.14) rgba(255, 255, 255, 0.08) rgba(255, 255, 255, 0.05) rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.2),
    0 26px 58px -28px rgba(2, 6, 23, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Panneaux principaux du Dashboard (Synthèse nationale, Couverture nationale,
   Couverture du référentiel administratif) — scopés #dashboard-panel : aucun autre
   module ne partage ces classes, mais le scope évite tout doute. Ajout de profondeur
   (backdrop-filter + ombre double) ; les teintes/bordures déjà validées (accent bleu de
   .national-summary, gris neutre des cartes de couverture) restent inchangées. */
[data-theme="dark"] #dashboard-panel .national-summary {
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.18),
    0 20px 44px -26px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

[data-theme="dark"] #dashboard-panel .synthesis-card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.18),
    0 20px 44px -26px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

[data-theme="dark"] #dashboard-panel .administrative-coverage-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.16),
    0 16px 36px -24px rgba(2, 6, 23, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

/* ── Cartes KPI — "flottement" léger (section 5) : taille, rayon et position inchangés
   (aucune de ces propriétés n'est déclarée ici). Uniquement profondeur + reflet supérieur
   + ombre douce, en surchargeant --card-shadow (theme-engine.css, partagé par d'autres
   cartes potentielles) depuis ce fichier, pour le Dashboard seulement. */
[data-theme="dark"] #dashboard-panel .dashboard-card {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 65%);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.22),
    0 22px 46px -26px rgba(2, 6, 23, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -10px 16px -14px rgba(255, 255, 255, 0.025);
}

[data-theme="dark"] #dashboard-panel .dashboard-hover:hover,
[data-theme="dark"] #dashboard-panel .dashboard-hover:focus-visible {
  box-shadow:
    0 2px 6px -2px color-mix(in srgb, var(--dashboard-card-accent, var(--accent-strong)) 35%, transparent),
    0 20px 40px -18px color-mix(in srgb, var(--dashboard-card-accent, var(--accent-strong)) 45%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Accessibilité — respecte la préférence système "mouvement réduit" pour
   TOUTE l'application (Sprint UX Premium v3, §12) : ne supprime aucune
   transition déclarée par ailleurs, réduit seulement sa durée à quasi zéro. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* E5.1 — lecture métier de la situation socio-économique */
.ch-mode-socio .obsx-choropleth-label-icon{display:none!important}
.obsx-socio-category-legend{display:grid;gap:.35rem;margin:.45rem 0}
.obsx-socio-category-legend button{display:flex;align-items:center;gap:.45rem;border:0;background:transparent;color:inherit;padding:.2rem 0;text-align:left;cursor:pointer;font:inherit}
.obsx-socio-category-legend button:hover{color:#67e8f9}
.obsx-socio-presence-kpi{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:.15rem .65rem;padding:.35rem .1rem}.obsx-socio-presence-kpi strong{font-size:1.65rem;color:#38bdf8}.obsx-socio-presence-kpi span{font-weight:700;color:#f8fafc}.obsx-socio-presence-kpi small{grid-column:1/-1;color:#94a3b8}.obsx-activity-picker{display:grid;gap:.55rem;padding:.75rem;border:1px solid rgba(56,189,248,.18);border-radius:.75rem;background:rgba(15,23,42,.6)}.obsx-activity-picker>label,.obsx-socio-constraint-control>span{font-size:.72rem;font-weight:700;color:#cbd5e1}.obsx-activity-picker input[type=search],.obsx-socio-constraint-control select{width:100%;padding:.55rem .65rem;border:1px solid rgba(148,163,184,.3);border-radius:.55rem;background:#101a2e;color:#f8fafc}.obsx-activity-options{max-height:12rem;overflow:auto;display:grid;gap:.15rem;padding:.25rem}.obsx-activity-options label{display:flex;align-items:center;gap:.55rem;padding:.35rem .4rem;border-radius:.4rem;color:#dbeafe;font-size:.75rem}.obsx-activity-options label:hover{background:rgba(56,189,248,.08)}.obsx-activity-selection-head{display:flex;justify-content:space-between;align-items:center;color:#94a3b8;font-size:.7rem}.obsx-activity-selection-head button{border:0;background:transparent;color:#7dd3fc;cursor:pointer}.obsx-activity-chips{display:flex;flex-wrap:wrap;gap:.35rem}.obsx-activity-chips button{display:flex;gap:.35rem;border:1px solid rgba(56,189,248,.3);border-radius:999px;background:rgba(14,165,233,.12);color:#e0f2fe;padding:.3rem .5rem;font-size:.7rem;cursor:pointer}.obsx-socio-match-mode{display:grid;gap:.45rem;margin:.75rem 0;padding:.7rem;border:1px solid rgba(148,163,184,.16);border-radius:.7rem}.obsx-socio-match-mode legend{padding:0 .3rem;color:#cbd5e1;font-size:.72rem}.obsx-socio-match-mode label{color:#e2e8f0;font-size:.75rem}.obsx-socio-constraint-control{display:grid;gap:.4rem;margin:.7rem 0}.obsx-socio-entity-row{width:100%;display:flex;justify-content:space-between;gap:.75rem;padding:.6rem;border:0;border-bottom:1px solid rgba(148,163,184,.12);background:transparent;color:#f1f5f9;text-align:left;cursor:pointer}.obsx-socio-entity-row:hover{background:rgba(14,165,233,.08)}.obsx-socio-entity-row span{color:#7dd3fc;font-size:.7rem}.obsx-socio-entity-section{margin:.8rem 0}.obsx-socio-entity-section h4{margin:0 0 .45rem;color:#94a3b8;font-size:.7rem;text-transform:uppercase;letter-spacing:.05em}.obsx-socio-entity-section ul{display:grid;gap:.25rem;margin:0;padding:0;list-style:none}.obsx-socio-entity-section li{padding:.25rem .4rem;border-radius:.35rem;color:#cbd5e1;font-size:.75rem}.obsx-socio-entity-section li.is-selected{background:rgba(14,165,233,.12);color:#e0f2fe;font-weight:700}
.obsx-socio-summary-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:.75rem}.obsx-socio-summary-head>div{display:grid;gap:.18rem}.obsx-socio-summary-head strong{font-size:1.05rem;color:#f8fafc}.obsx-socio-summary-head p{max-width:48rem;margin:0;color:#cbd5e1;font-size:.82rem;line-height:1.45}.obsx-socio-kpi-card{display:grid!important;grid-template-columns:1fr auto!important;gap:.12rem .75rem!important;padding:.7rem .8rem!important;border:1px solid rgba(56,189,248,.16);border-radius:.7rem;background:rgba(15,23,42,.58)}.obsx-socio-kpi-card strong{font-size:1.25rem!important}.obsx-socio-kpi-card small{grid-column:1/-1;color:#94a3b8;font-size:.7rem}.obsx-socio-controls{display:grid;gap:.65rem;padding:.75rem;margin-bottom:.8rem;border-radius:.75rem;background:rgba(15,23,42,.58);border:1px solid rgba(148,163,184,.12)}.obsx-socio-controls label{display:grid;grid-template-columns:minmax(6.5rem,.8fr) minmax(0,1.5fr);align-items:center;gap:.6rem;color:#cbd5e1;font-size:.75rem}.obsx-socio-controls select{min-width:0;width:100%;padding:.48rem .6rem;border-radius:.55rem;border:1px solid rgba(148,163,184,.25);background:#111c31;color:#f1f5f9}.obsx-socio-rank-card{width:100%;display:grid;grid-template-columns:1.7rem 1fr;gap:.55rem;text-align:left;padding:.65rem .55rem;border:0;border-bottom:1px solid rgba(148,163,184,.12);background:transparent;color:#e2e8f0;cursor:pointer}.obsx-socio-rank-card:hover,.obsx-socio-rank-card:focus-visible{background:rgba(56,189,248,.08);outline:none}.obsx-socio-rank-index{display:grid;place-items:center;width:1.5rem;height:1.5rem;border-radius:50%;background:rgba(56,189,248,.12);color:#7dd3fc;font-size:.72rem;font-weight:700}.obsx-socio-rank-main{min-width:0;display:grid;grid-template-columns:1fr auto;gap:.12rem .65rem}.obsx-socio-rank-main>strong{overflow:hidden;text-overflow:ellipsis;color:#f8fafc}.obsx-socio-rank-main>span{color:#7dd3fc;font-weight:700}.obsx-socio-rank-main small,.obsx-socio-rank-main em{grid-column:1/-1;color:#94a3b8;font-size:.69rem;font-style:normal}.obsx-socio-rank-main em{opacity:.72}.obsx-socio-see-all{width:100%;margin:.7rem 0}.obsx-socio-section,.obsx-socio-precision{margin-top:1rem;padding-top:.85rem;border-top:1px solid rgba(148,163,184,.13)}.obsx-socio-section h4,.obsx-socio-precision h4{margin:0 0 .7rem;color:#f1f5f9;font-size:.78rem;text-transform:uppercase;letter-spacing:.035em}.obsx-socio-bar{display:grid;gap:.25rem;margin:.45rem 0}.obsx-socio-bar>div{display:flex;justify-content:space-between;gap:.75rem;font-size:.73rem;color:#cbd5e1}.obsx-socio-bar i{display:block;width:var(--bar);height:.28rem;border-radius:1rem;background:linear-gradient(90deg,#0ea5e9,#38bdf8)}.obsx-socio-precision>div>div{display:flex;justify-content:space-between;gap:.75rem;padding:.38rem 0;color:#cbd5e1;font-size:.73rem}.obsx-socio-precision strong{color:#f8fafc}.obsx-socio-legend-note{margin:.45rem 0;color:#cbd5e1;font-size:.7rem;line-height:1.35}

/* PERF-1F — regroupements de la couche Localités (nombre de localités par cellule d'écran) */
.locality-cluster-icon { background: transparent; border: 0; }
.locality-cluster { display: inline-block; text-align: center; border-radius: 50%; background: rgba(124, 58, 237, 0.82); color: #fff; font: 600 11px/1 system-ui, sans-serif; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45); cursor: pointer; }
.locality-cluster:hover { background: rgba(109, 40, 217, 0.95); }

/* ---------------------------------------------------------------------------------------------------------------
   Infobulle carte STRUCTURÉE (partagée : Observatoire, carte CCN) — correctif « tooltip trop étroit ».
   CAUSE EXACTE : un `.leaflet-tooltip` est absolument positionné dans le pane Leaflet, dont la largeur est nulle. Sa
   largeur « shrink-to-fit » vaut donc min(max-content, largeur disponible ≈ 0) = sa largeur MIN-CONTENT. Tant que le texte
   ne pouvait pas se replier (Leaflet : `white-space: nowrap`) c'était sans effet ; dès que le contenu a été rendu
   repliable (`white-space: normal` + `overflow-wrap: anywhere`) la largeur s'est effondrée à ~1 caractère (61 px de large,
   645-822 px de haut mesurés). Correctif : largeur INTRINSÈQUE explicite (`width: max-content`) bornée par min/max, mots
   jamais coupés (`overflow-wrap: break-word`, jamais `anywhere`/`break-all`), grille libellé / valeur, hauteur bornée avec
   défilement interne (sur le contenu, pas sur la flèche), repositionnement dans le cadre carte (cf. `fitTooltipInMap`).
   Portée : uniquement les infobulles créées avec l'option `structured` (ou `iconHtml`) de SigMapTooltips.bind.
   --------------------------------------------------------------------------------------------------------------- */
.leaflet-tooltip.sig-map-tooltip.sig-map-tooltip--structured {
  --sig-tip-min: 15rem;   /* ≈ 240 px : jamais plus étroit */
  --sig-tip-max: 23rem;   /* ≈ 368 px : jamais une grande fiche */
  --sig-tip-edge: 2rem;   /* marge écran minimale (petits écrans) */
  --sig-tip-bg: rgba(11, 20, 36, 0.97);
  box-sizing: border-box;
  /* Typographie du SIG (pile du design system, :root) — Leaflet imposerait sinon Helvetica Neue. */
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  width: max-content;
  min-width: min(var(--sig-tip-min), calc(100vw - var(--sig-tip-edge)));
  max-width: min(var(--sig-tip-max), calc(100vw - var(--sig-tip-edge)));
  padding: 0.6rem 0.75rem 0.65rem;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: var(--sig-tip-bg);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.5);
  /* Ne capture jamais le pointeur : le survol et le clic de l'objet en dessous restent intacts. */
  pointer-events: none;
  /* Décalage de repositionnement (bords de carte) posé par `fitTooltipInMap` — `translate` est indépendante de
     `transform`, que Leaflet utilise pour placer l'infobulle. */
  translate: var(--sig-tip-dx, 0px) var(--sig-tip-dy, 0px);
  /* Fondu seul : l'animation `transform` historique (sigTooltipFadeIn) écraserait le positionnement Leaflet. */
  animation: sigTooltipFadeOnly 120ms ease-out;
}
@keyframes sigTooltipFadeOnly { from { opacity: 0; } to { opacity: 1; } }

/* Flèche : couleur du fond dans les 4 directions, recalée sur l'objet quand l'infobulle a été décalée. */
.leaflet-tooltip.sig-map-tooltip--structured.leaflet-tooltip-top::before { border-top-color: var(--sig-tip-bg); }
.leaflet-tooltip.sig-map-tooltip--structured.leaflet-tooltip-bottom::before { border-bottom-color: var(--sig-tip-bg); }
.leaflet-tooltip.sig-map-tooltip--structured.leaflet-tooltip-left::before { border-left-color: var(--sig-tip-bg); }
.leaflet-tooltip.sig-map-tooltip--structured.leaflet-tooltip-right::before { border-right-color: var(--sig-tip-bg); }
.leaflet-tooltip.sig-map-tooltip--structured.leaflet-tooltip-left::before,
.leaflet-tooltip.sig-map-tooltip--structured.leaflet-tooltip-right::before {
  top: clamp(1rem, calc(50% - var(--sig-tip-dy, 0px)), calc(100% - 1rem));
}

.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip--rows {
  display: grid;
  gap: 0.22rem;
  width: 100%;
  max-width: none;
  /* Au-delà : défilement interne discret (sur le contenu, pas sur l'infobulle — la flèche reste visible). */
  max-height: min(19.5rem, calc(60vh - 1.3rem));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
  font-size: 0.74rem;
  line-height: 1.4;
}
.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip-title {
  min-width: 0;
  color: #f8fafc;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: break-word;
}
.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip-type {
  color: var(--accent, #38bdf8);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}
.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip-rows {
  display: grid;
  grid-template-columns: fit-content(9rem) minmax(0, 1fr);
  column-gap: 0.8rem;
  row-gap: 0.24rem;
  margin: 0.3rem 0 0.05rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip-row { display: contents; }
.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip-row dt {
  margin: 0;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 500;
}
.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip-row dd {
  margin: 0;
  min-width: 0;
  color: #e2e8f0;
  font-weight: 600;
  overflow-wrap: break-word;
}
.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip-row--note dd {
  grid-column: 1 / -1;
  color: #cbd5e1;
  font-weight: 500;
}
.leaflet-tooltip.sig-map-tooltip--structured .map-smart-tooltip-hint {
  margin-top: 0.3rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
@media (prefers-reduced-motion: reduce) {
  .leaflet-tooltip.sig-map-tooltip.sig-map-tooltip--structured { animation: none; }
}

/* Centre de décision (P4C 1.1) — règles de mise en page CRITIQUES ici (feuille chargée d'emblée) : le CSS du module est chargé à la demande ; sans ces règles,
   le panneau change de hauteur à l'arrivée du module (CLS). Les valeurs sont identiques à celles de dcp.css. */
#decision-view-panel > * + * { margin-top: 10px; }
#decision-view-panel .dc-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 12px; min-height: 52px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md, 16px); }
#decision-view-panel .dc-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 38px; margin: 0; }
#decision-view-panel .dc-nav-item { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted); font-size: 0.86rem; font-weight: 600; }
#decision-view-panel .dc-nav-item--aside { margin-left: auto; }
#decision-view-panel .dc-modules { font-size: 0.8rem; }
#decision-view-panel .dcp-root { min-height: 700px; }

/* PERF cartographie — pastille de regroupement serveur (petits zooms) */
.sig-cluster-icon { background: transparent; border: 0; }
.sig-cluster-badge { border-radius: 50%; text-align: center; font: 700 12px/1 system-ui, sans-serif; color: #fff; background: rgba(37, 99, 235, 0.88); border: 2px solid rgba(255, 255, 255, 0.92); box-shadow: 0 1px 6px rgba(15, 23, 42, 0.45); cursor: pointer; }
.sig-cluster-badge:hover { background: rgba(29, 78, 216, 0.96); }

.sig-view-notice { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 700; max-width: min(92%, 760px); padding: 6px 12px; border-radius: 8px; font: 500 12px/1.35 system-ui, sans-serif; color: #e2e8f0; background: rgba(15, 23, 42, 0.86); border: 1px solid rgba(148, 163, 184, 0.45); box-shadow: 0 2px 10px rgba(2, 6, 23, 0.4); pointer-events: none; text-align: center; }

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════
   CARTOGRAPHIE — espace de lecture géospatiale : carte dominante, panneaux flottants, modes Plein écran / Immersion.
   UNE seule carte Leaflet, un seul DOM : seuls la mise en page et la visibilité des outils changent (jamais de rechargement de couche).
   NORMAL     = interface complète dans l'application ; la carte remplit la hauteur disponible (mesurée, pas rigide) ; les tiroirs flottent sur la carte.
   PLEIN ÉCRAN = Mode Focus existant (menu et bandeau masqués) ; barre d'outils métier conservée.
   IMMERSION  = carte plein viewport + barre d'outils flottante compacte et repliable.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════ */
body[data-active-module="cartographie"] .content-area { padding-top: 8px; padding-bottom: 8px; }

#cartographie-panel .cartography-main-row {
  position: relative;
  grid-template-columns: minmax(0, 1fr) !important;       /* un tiroir ne réduit plus la carte */
  min-height: var(--carto-stage-h, clamp(420px, calc(100vh - 168px), 1400px));
}
#cartographie-panel .cartography-map-stage {
  min-height: var(--carto-stage-h, clamp(420px, calc(100vh - 168px), 1400px));
  max-height: none;
}
#cartographie-panel .cartography-sidebar {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 640;
  width: min(340px, calc(100% - 16px));
  max-width: none;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
}
#cartographie-panel .cartography-sidebar .cartography-drawer:not(.hidden) { max-height: none; overflow: auto; }

/* Plein écran : la carte prend toute la hauteur restante */
body.cartography-focus-mode #cartographie-panel .cartography-main-row { flex: 1; min-height: var(--carto-stage-h, 60vh); }
body.cartography-focus-mode .cartography-focus-bar { padding: 6px 12px; border-radius: 12px; }

/* ── IMMERSION : carte plein viewport, outils flottants ── */
.carto-immersion-only { display: none !important; }
body.cartography-immersion-mode .carto-immersion-only { display: inline-flex !important; }
body.cartography-immersion-mode .carto-hide-in-immersion,
body.cartography-immersion-mode #carto-immersion-btn,
body.cartography-immersion-mode #carto-focus-btn,
body.cartography-immersion-mode #cartography-focus-bar,
body.cartography-immersion-mode #cartography-demo-bar { display: none !important; }

body.cartography-immersion-mode #cartographie-panel .cartography-map-stage {
  position: fixed;
  inset: 0;
  z-index: 500;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  border-radius: 0;
  border: 0;
}
body.cartography-immersion-mode .cartography-toolbar-premium {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 700;
  width: auto;
  max-width: calc(100vw - 24px);
  min-height: 44px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  border-radius: 999px;
}
body.cartography-immersion-mode .cartography-toolbar-premium .cartography-premium-btn__label { display: none; }
body.cartography-immersion-mode .cartography-toolbar-premium #carto-immersion-exit .cartography-premium-btn__label { display: inline; }
body.cartography-immersion-mode .cartography-toolbar-group--grow { flex: 0 1 auto; min-width: 0; }
body.cartography-immersion-mode .cartography-search-field { flex: 0 1 auto; min-width: 0; max-width: none; }
body.cartography-immersion-mode .cartography-search-field input { width: 150px; transition: width 0.15s ease; }
body.cartography-immersion-mode .cartography-search-field input:focus { width: min(320px, 60vw); }
body.cartography-immersion-mode .cartography-toolbar-divider { display: none; }
/* barre repliée : seules les poignées « déplier » et « quitter » restent */
body.cartography-immersion-mode.cartography-dock-collapsed .cartography-toolbar-premium .cartography-toolbar-group,
body.cartography-immersion-mode.cartography-dock-collapsed .cartography-toolbar-premium .cartography-toolbar-divider { display: none !important; }
body.cartography-immersion-mode.cartography-dock-collapsed .cartography-toolbar-premium { padding: 4px; gap: 4px; }
body.cartography-immersion-mode #cartographie-panel .cartography-sidebar {
  position: fixed;
  top: 66px;
  right: 10px;
  bottom: 10px;
  z-index: 710;
}
body.cartography-immersion-mode .cartography-map-info-panel { opacity: 0.8; font-size: 0.7rem; }

/* Cibles tactiles ≥ 40 px pour les commandes de mode ; 44 px pour tout le module si le pointeur est grossier */
#carto-focus-btn, #carto-immersion-btn, #carto-immersion-btn-bar, #carto-immersion-exit, #carto-immersion-collapse, #carto-focus-exit, #carto-focus-back { min-height: 40px; min-width: 40px; }
@media (pointer: coarse) {
  #cartographie-panel .cartography-premium-btn, #cartographie-panel .cartography-focus-label-btn, #cartographie-panel .cartography-drawer-close { min-height: 44px; min-width: 44px; }
}

/* Petits écrans : tiroir = feuille basse temporaire ; barre flottante en bas */
@media (max-width: 720px) {
  #cartographie-panel .cartography-sidebar { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(52%, 440px); }
  body.cartography-immersion-mode #cartographie-panel .cartography-sidebar { top: auto; left: 8px; right: 8px; bottom: 70px; height: min(55dvh, 440px); }
  body.cartography-immersion-mode .cartography-toolbar-premium { top: auto; bottom: 10px; max-width: calc(100vw - 16px); overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  #cartographie-panel .cartography-sidebar, #cartographie-panel .cartography-drawer, body.cartography-immersion-mode .cartography-search-field input { animation: none !important; transition: none !important; }
}

/* Fil d'Ariane et message d'état : décalés à droite des commandes de zoom Leaflet (ils étaient masqués dessous) */
#cartographie-panel #map-breadcrumb { top: 10px; left: 56px; max-width: calc(100% - 72px); }
#cartographie-panel #zones-message { top: 50px; left: 56px; max-width: calc(100% - 72px); }

/* Plein écran : barre d'outils sur une ligne, libellés remplacés par des icônes (info-bulles conservées), doublons retirés */
body.cartography-focus-mode:not(.cartography-immersion-mode) .cartography-toolbar-premium .cartography-premium-btn__label { display: none; }
body.cartography-focus-mode #cartographie-panel #carto-focus-btn,
body.cartography-focus-mode #cartographie-panel #carto-immersion-btn { display: none !important; }
@media (max-width: 720px) {
  body.cartography-focus-mode .cartography-focus-title,
  body.cartography-focus-mode .cartography-focus-label-controls { display: none; }
  body.cartography-focus-mode .cartography-focus-bar { flex-wrap: nowrap; gap: 6px; padding: 4px 6px; }
  body.cartography-focus-mode .cartography-focus-bar .cartography-focus-exit { flex: 1; padding: 8px 10px; font-size: 0.85rem; }
  #cartographie-panel .cartography-toolbar-premium { flex-wrap: nowrap !important; max-height: 56px; }
}
