/* =====================================================
   ACTUMDEV DESIGN SYSTEM — MISSION VIEWER
   Charte graphique ActumDev (Identique à SIGA / Présence)
   Support bimodal complet : Mode Clair (défaut) & Mode Sombre
   ===================================================== */

/* ── DESIGN TOKENS (CHARTE ACTUM-DEV.CI) ────────────── */
:root, html[data-theme="light"] {
  /* Jetons de la charte actum-dev.ci */
  --ink:            #1d2a29;
  --ink-soft:       #5d6766;
  --ink-mute:       #8a9291;
  --line:           #e3e0da;
  --line-soft:      #efece7;
  --inset:          #f5f3ef;
  --teal:           #1f5654;
  --teal-deep:      #123f3d;
  --ok:             #2f7d32;
  --amber:          #c27400;

  --primary:        #123f3d;
  --primary-dark:   #0d2f2d;
  --primary-light:  #1f5654;
  --primary-glow:   rgba(31, 86, 84, 0.12);
  --accent:         #2f7d32;
  --accent-glow:    rgba(47, 125, 50, 0.12);
  --danger:         #b8432f;
  --warning:        #c27400;
  --info:           #1f5654;

  --bg-base:        #faf9f6;
  --bg-surface:     #f5f3ef;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8f7f4;
  --bg-input:       #ffffff;
  --border:         #e3e0da;
  --border-active:  #8a9291;

  --text-primary:   #1d2a29;
  --text-secondary: #5d6766;
  --text-muted:     #8a9291;

  --navbar-bg:      #123f3d;
  --navbar-border:  #0d2f2d;

  --shadow-sm:      0 1px 3px rgba(18,63,61,.06), 0 1px 2px rgba(18,63,61,.04);
  --shadow-md:      0 8px 24px rgba(18,63,61,.08), 0 3px 8px rgba(18,63,61,.04);
  --shadow-lg:      0 16px 36px rgba(18,63,61,.12);

  --badge-success-bg: #e6f1e6;
  --badge-success-tx: #2f7d32;
  --badge-primary-bg: #e3eeed;
  --badge-primary-tx: #123f3d;
  --badge-warning-bg: #f8ecd6;
  --badge-warning-tx: #8f5600;
  --badge-info-bg:    #e3eeed;
  --badge-info-tx:    #1f5654;
  --badge-sec-bg:     #f5f3ef;
  --badge-sec-tx:     #5d6766;

  /* Livrables accents */
  --c-ortho:  #123f3d;
  --c-cog:    #1f5654;
  --c-webp:   #0e6f6a;
  --c-mns:    #c27400;
  --c-mnt:    #8f5600;
  --c-mnh:    #5b3e8e;
  --c-laz:    #1f6475;
  --c-pdf:    #b8432f;
  --c-obj:    #34495e;
  /* Ajouts du 25/10/2026 (menus déroulants, statuts), dans les tons de la charte sarcelle */
  --nav-text:         #cfe0de;
  --nav-text-strong:  #ffffff;
  --calc:             #5b3e8e;
  --badge-calc-bg:    #ece6f5;
  --badge-calc-tx:    #5b3e8e;
  --badge-danger-bg:  #f6e3df;
  --badge-danger-tx:  #b8432f;
  --st-done:  #2f7d32;
  --st-wait:  #c27400;
  --st-calc:  #c27400;   /* comme l'attente QC (décision du 25/10/2026) */
  --st-fail:  #b8432f;
  --st-todo:  #8a9291;
}

html[data-theme="dark"] {
  --ink:            #ececec;
  --ink-soft:       #a8a8a8;
  --ink-mute:       #808080;
  --line:           #2e2e2e;
  --line-soft:      #262626;
  --inset:          #1f1f1f;
  --teal:           #5fb0aa;
  --teal-deep:      #2f7d78;
  --ok:             #6fbf73;
  --amber:          #e0a030;

  --primary:        #2f7d78;
  --primary-dark:   #3b928c;
  --primary-light:  #5fb0aa;
  --primary-glow:   rgba(95, 176, 170, 0.16);
  --accent:         #6fbf73;
  --accent-glow:    rgba(111, 191, 115, 0.18);
  --danger:         #e07a66;
  --warning:        #e0a030;
  --info:           #5fb0aa;

  --bg-base:        #0f0f0f;
  --bg-surface:     #151515;
  --bg-card:        #181818;
  --bg-card-hover:  #222222;
  --bg-input:       #151515;
  --border:         #2e2e2e;
  --border-active:  #5a5a5a;

  --text-primary:   #ececec;
  --text-secondary: #a8a8a8;
  --text-muted:     #808080;

  --navbar-bg:      #0a0a0a;
  --navbar-border:  #262626;

  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.40);
  --shadow-md:      0 8px 24px rgba(0, 0, 0, 0.50);
  --shadow-lg:      0 16px 36px rgba(0, 0, 0, 0.65);

  --badge-success-bg: rgba(111, 191, 115, 0.16);
  --badge-success-tx: #8fd493;
  --badge-primary-bg: rgba(95, 176, 170, 0.16);
  --badge-primary-tx: #8ccdc8;
  --badge-warning-bg: rgba(224, 160, 48, 0.16);
  --badge-warning-tx: #efc06a;
  --badge-info-bg:    rgba(95, 176, 170, 0.16);
  --badge-info-tx:    #8ccdc8;
  --badge-sec-bg:     rgba(168, 168, 168, 0.12);
  --badge-sec-tx:     #a8a8a8;

  --c-ortho:  #5fb0aa;
  --c-cog:    #6fbf73;
  --c-webp:   #76d7c4;
  --c-mns:    #e0a030;
  --c-mnt:    #f39c12;
  --c-mnh:    #a582e0;
  --c-laz:    #5dade2;
  --c-pdf:    #e07a66;
  --c-obj:    #85929e;
  --nav-text:         #cfe0de;
  --nav-text-strong:  #ffffff;
  --calc:             #a582e0;
  --badge-calc-bg:    rgba(165, 130, 224, 0.16);
  --badge-calc-tx:    #c3aef0;
  --badge-danger-bg:  rgba(224, 122, 102, 0.16);
  --badge-danger-tx:  #eea493;
  --st-done:  #6fbf73;
  --st-wait:  #e0a030;
  --st-calc:  #e0a030;
  --st-fail:  #e07a66;
  --st-todo:  #8a9291;
}

:root {
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --ease:      cubic-bezier(.22,.68,0,1);
}

/* ── BASE & TYPOGRAPHY ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-base);
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  transition: background-color .2s ease, color .2s ease;
}

/* ── NAVBAR PRINCIPALE (STYLE ACTUMDEV / SIGA) ─────────────── */
.navbar-main {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--navbar-border);
  padding: 0.65rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: background .2s ease, border-color .2s ease;
}

.navbar-main .brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}

/* Logo officiel (version blanche, la barre est sarcelle foncé dans les deux thèmes) */
.navbar-main .brand-logo {
  display: block;
  height: 34px;
  width: auto;
}

.navbar-main .brand-sub {
  color: var(--nav-text);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.navbar-main .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-main .nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .15s ease;
}

.navbar-main .nav-links a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.navbar-main .nav-links a.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-weight: 600;
}

/* Boutons navbar droite */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--nav-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s ease;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.40);
  color: #ffffff;
}

/* Disposition : rien ne passe à la ligne, la zone des liens absorbe l'espace */
.navbar-main .container-xl { gap: 16px; }
.navbar-main .brand-wrap,
.navbar-main .nav-actions { flex-shrink: 0; }
.navbar-main .nav-links a { white-space: nowrap; }
.navbar-main .nav-links { flex: 1; justify-content: center; min-width: 0; }

/* Écrans moyens : on libère de la place plutôt que de casser les libellés */
@media (max-width: 1199.98px) {
  .navbar-main .brand-sub { display: none; }
  .navbar-main .nav-links { gap: 2px; }
  .navbar-main .nav-links a { padding: 0.45rem 0.6rem; font-size: 0.84rem; }
}
@media (max-width: 1099.98px) {
  .navbar-main .nav-links a i { display: none; }
}

.btn-nav-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #ffffff;
  color: var(--teal-deep) !important;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: all .15s ease;
}

.btn-nav-action:hover {
  background: var(--badge-primary-bg);
  color: var(--teal-deep) !important;
}

html[data-theme="dark"] .btn-nav-action {
  background: var(--primary);
  color: #ffffff !important;
}

html[data-theme="dark"] .btn-nav-action:hover {
  background: var(--primary-dark);
}

/* ── BOUTONS DE LA CHARTE (DPT-BTN) ────────────────────────── */
.dpt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
  transition: transform .15s var(--ease), background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.dpt-btn:hover {
  transform: translateY(-1px);
}

.dpt-btn-primary {
  background: var(--teal-deep);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(18, 63, 61, 0.2);
}

.dpt-btn-primary:hover {
  background: var(--teal);
}

html[data-theme="dark"] .dpt-btn-primary {
  background: var(--teal);
  color: #0f0f0f !important;
}

html[data-theme="dark"] .dpt-btn-primary:hover {
  background: var(--primary-light);
}

.dpt-btn-ghost {
  background: var(--bg-card);
  color: var(--ink) !important;
  border-color: var(--line);
}

.dpt-btn-ghost:hover {
  border-color: var(--ink-mute);
  background: var(--inset);
}

.dpt-btn-sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: 6px;
}

.dpt-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-soft) !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.dpt-icon-btn:hover {
  background: var(--inset);
  color: var(--ink) !important;
  border-color: var(--ink-mute);
}

/* ── PANNEAU / CARTE (DPT-PANEL) ───────────────────────────── */
.dpt-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  transition: border-color .15s ease, box-shadow .15s ease, background .2s ease;
}

.dpt-panel:hover {
  box-shadow: var(--shadow-md);
}

.dpt-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dpt-panel-head h2, .dpt-panel-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
}

.dpt-panel-head p {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ── BANDEAU HAUT (DPT-TOP) & MISSION HERO ─────────────────── */
.mission-hero {
  padding: 30px 0 20px;
}

.dpt-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.dpt-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft) !important;
  margin-bottom: 8px;
  text-decoration: none;
  transition: color .15s ease;
}

.dpt-back:hover {
  color: var(--teal) !important;
}

.mission-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mission-title .mission-highlight {
  color: var(--teal-deep);
  position: relative;
}

html[data-theme="dark"] .mission-title .mission-highlight {
  color: var(--teal);
}

.mission-sub {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ── STATUT DE LA CHARTE (DPT-STATUS) ──────────────────────── */
.dpt-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.dpt-status.is-ok {
  color: var(--ok);
  border-color: var(--ok);
  background: var(--badge-success-bg);
}

.dpt-status.is-teal {
  color: var(--teal);
  border-color: var(--teal);
  background: var(--badge-primary-bg);
}

.dpt-status.is-warn {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--badge-warning-bg);
}

.dpt-status.is-calc {
  color: var(--badge-calc-tx);
  border-color: var(--calc);
  background: var(--badge-calc-bg);
}

.dpt-status.is-danger {
  color: var(--badge-danger-tx);
  border-color: var(--danger);
  background: var(--badge-danger-bg);
}

.dpt-status.is-off {
  color: var(--badge-sec-tx);
  border-color: var(--line);
  background: var(--badge-sec-bg);
}

/* Couleurs de texte de la charte (utilisées par les icônes des templates) */
.text-teal  { color: var(--teal) !important; }
.text-ok    { color: var(--ok) !important; }
.text-amber { color: var(--amber) !important; }
.text-calc  { color: var(--calc) !important; }

/* ── BANDEAU DE CHIFFRES (TDB-KPIS DE LA CHARTE) ───────────── */
.tdb-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.tdb-kpis > div {
  padding: 18px 24px;
  min-width: 0;
}

.tdb-kpis > div + div {
  border-left: 1px solid var(--line-soft);
}

.tdb-kpis dt {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mute);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tdb-kpis dd {
  margin: 6px 0 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .tdb-kpis dd {
  color: var(--teal);
}

@media (max-width: 900px) {
  .tdb-kpis { grid-template-columns: repeat(2, 1fr); }
  .tdb-kpis > div:nth-child(3) { border-left: 0; }
  .tdb-kpis > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}

@media (max-width: 500px) {
  .tdb-kpis { grid-template-columns: 1fr; }
  .tdb-kpis > div + div { border-left: 0; border-top: 1px solid var(--line-soft); }
}

/* ── STEPPER DU PIPELINE ────────────────────────────────────── */
.pipeline-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  min-width: 78px;
}

.pipeline-node .node-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--badge-success-bg);
  color: var(--ok);
  border: 2px solid var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  position: relative;
  box-shadow: 0 0 0 3px var(--inset);
}

.pipeline-node .node-check {
  position: absolute;
  /* contre le rond (40 px, centré), pas au coin de l'étape : sinon la coche cache la fin du libellé */
  top: 26px;
  right: calc(50% - 23px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

.pipeline-node .node-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.pipeline-line {
  flex: 1;
  height: 3px;
  background: var(--ok);
  margin: 0 8px;
  margin-bottom: 22px;
  border-radius: 2px;
}

/* ── CARTES DE LIVRABLES (DELIV-CARD) ───────────────────────── */
.deliv-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  /* pas d'overflow:hidden : il couperait le menu ⋮ (les coins sont arrondis sur la bande) */
  transition: transform .15s var(--ease), box-shadow .15s ease, border-color .15s ease;
}

/* Carte dont le menu est ouvert : au-dessus des cartes voisines */
.deliv-card:has(.dropdown-menu.show) { z-index: 5; }

.deliv-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-active);
}

.deliv-stripe {
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--card-accent, var(--teal-deep));
  width: 100%;
}

.deliv-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.deliv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.deliv-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--inset);
  color: var(--card-accent, var(--teal-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  border: 1px solid var(--line-soft);
}

.deliv-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.3;
}

.deliv-desc {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0 0 14px;
  line-height: 1.45;
  flex: 1;
}

.deliv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.deliv-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.deliv-file-row {
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  font-family: 'JetBrains Mono', SFMono-Regular, monospace;
  font-size: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.deliv-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deliv-foot {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.deliv-foot .dpt-btn {
  flex: 1;
}

/* ── PHOTOS BRUTES GRID ─────────────────────────────────────── */
.photo-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--inset);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.photo-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
}

.photo-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-mute);
  padding: 8px;
  text-align: center;
}

.photo-card-placeholder i {
  font-size: 22px;
}

.photo-card-name {
  font-size: 10.5px;
  font-family: monospace;
  font-weight: 600;
  color: var(--ink-soft);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 63, 61, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity .18s ease;
}

.photo-card:hover .photo-overlay {
  opacity: 1;
}

.photo-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--teal-deep);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: transform .1s ease, background .1s ease;
}

.photo-action-btn:hover {
  transform: scale(1.1);
  background: var(--badge-primary-bg);
}

.hidden-photo-col {
  display: none !important;
}

/* ── VISUALISEUR IFRAME & SIDEBAR URLS ──────────────────────── */
.viewer-container {
  height: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  position: relative;
}

.viewer-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--inset);
  padding: 24px;
}

.viewer-placeholder i.vp-big {
  font-size: 48px;
  color: var(--teal);
  margin-bottom: 14px;
}

.map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.code-box {
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'JetBrains Mono', SFMono-Regular, monospace;
  font-size: 12px;
  color: var(--ink);
  word-break: break-all;
  white-space: pre-wrap;
  user-select: all;
  margin: 6px 0 10px;
}

/* ── FOOTER DE LA CHARTE ────────────────────────────────────── */
.site-footer {
  margin-top: 60px;
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  padding: 28px 0;
  transition: background .2s ease;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.footer-brand-sub {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color .15s ease;
}

.footer-links a:hover {
  color: var(--teal);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-mute);
}

/* ── TOAST NOTIFICATION ─────────────────────────────────────── */
.toast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--teal-deep);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 9999;
}

html[data-theme="dark"] .toast-popup {
  background: var(--primary);
}

.toast-popup.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── MODALE DOCUMENT (IDENTIQUE À BASE.HTML) ─────────────────── */
.modal-content {
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.modal-header {
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
}

.modal-footer {
  border-top: 1px solid var(--line);
  padding: 12px 20px;
}

/* Apparition en fondu + léger agrandissement, comme les menus (skill dashboard-interactif) */
.modal.fade .modal-dialog {
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}
.modal.show .modal-dialog { transform: none; opacity: 1; }
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.modal-title i { color: var(--teal); margin-right: 6px; }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1); }

/* Champs de saisie des modales (remplace les styles écrits dans chaque champ) */
.dpt-form .form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.dpt-form .form-control {
  background: var(--bg-input);
  border-color: var(--line);
  color: var(--ink);
}
.dpt-form .form-control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent);
}
.dpt-form .form-control::placeholder { color: var(--ink-mute); opacity: .75; }
.dpt-form .form-text { font-size: 12px; color: var(--ink-mute); }

/* Tableaux des panneaux : Bootstrap pose un fond blanc sur chaque cellule, visible en thème sombre */
.dpt-panel .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line-soft);
}
.dpt-form .is-code { text-transform: uppercase; font-family: 'JetBrains Mono', monospace; font-weight: 700; }

/* Modale de confirmation : question, puis attente (la page se recharge ensuite avec le résultat) */
.dpt-btn-primary.is-danger { background: var(--danger); box-shadow: none; }
.dpt-btn-primary.is-danger:hover { background: var(--danger); filter: brightness(1.08); }
.confirm-question { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }
.confirm-wait { display: none; align-items: center; gap: 12px; padding: 6px 0; color: var(--ink-soft); }
.confirm-wait .spinner-border { color: var(--teal); width: 1.6rem; height: 1.6rem; }
#confirmModal.is-busy .confirm-question,
#confirmModal.is-busy .modal-footer,
#confirmModal.is-busy .btn-close { display: none; }
#confirmModal.is-busy .confirm-wait { display: flex; }

/* En-tête de panneau avec un bouton d'action à droite (ex. « Nouvelle équipe ») */
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.panel-bar h3 { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .modal.fade .modal-dialog { transition: none !important; }
}

/* ── MENUS DÉROULANTS ANIMÉS (skill dashboard-interactif) ─────────
   Bootstrap affiche/masque d'un coup (display:none/block). Ici le menu reste dans le flux
   (display:block) et apparaît en fondu + léger agrandissement depuis son bouton, sur la classe
   .show que Bootstrap pose déjà. Rien à changer côté JS. */
.dropdown-menu {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: top right;
  transform: scale(0.95) translateY(-6px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  padding: 6px;
  font-size: 0.88rem;
  transition: opacity 180ms cubic-bezier(0.16,1,0.3,1), transform 180ms cubic-bezier(0.16,1,0.3,1),
              visibility 180ms cubic-bezier(0.16,1,0.3,1), background-color .2s ease, border-color .2s ease;
}
.dropdown-menu.show { opacity: 1; visibility: visible; pointer-events: auto; transform: scale(1) translateY(0); }
.dropdown-menu-start, .dropdown-menu:not(.dropdown-menu-end) { transform-origin: top left; }
.dropup .dropdown-menu { transform-origin: bottom left; transform: scale(0.95) translateY(6px); }
.dropup .dropdown-menu.show { transform: scale(1) translateY(0); }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--ink);
  transition: background-color 120ms ease, padding-left 120ms cubic-bezier(0.16,1,0.3,1), color 120ms ease;
}
.dropdown-item i { width: 16px; text-align: center; color: var(--ink-mute); }
.dropdown-item:hover, .dropdown-item:focus { padding-left: 14px; background: var(--inset); color: var(--ink); }
.dropdown-item:hover i, .dropdown-item.active i { color: var(--teal); }
.dropdown-item.active, .dropdown-item:active { background: var(--badge-primary-bg); color: var(--badge-primary-tx); }
.dropdown-item.is-danger, .dropdown-item.is-danger i { color: var(--danger); }
.dropdown-divider { border-top-color: var(--line); margin: 6px 4px; }
.dropdown-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 6px 10px 4px;
}

/* ── BARRE : BOUTONS À MENU (cloche, compte, menu petit écran) ──── */
.nav-drop-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--nav-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.nav-drop-btn:hover, .nav-drop-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.36);
  color: var(--nav-text-strong);
}
.nav-drop-btn.dropdown-toggle::after { border-top-color: currentColor; opacity: .7; margin-left: 2px; }
.nav-drop-btn.no-caret::after { display: none; }

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-bell-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--st-fail);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  border: 2px solid var(--navbar-bg);
  font-variant-numeric: tabular-nums;
}

.nav-menu-account { min-width: 230px; }
.nav-menu-account .who {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.nav-menu-account .who strong { display: block; color: var(--ink); font-size: 0.9rem; }
.nav-menu-account .who span { color: var(--ink-mute); font-size: 0.76rem; }

.nav-menu-bell { width: 340px; max-width: calc(100vw - 24px); }
.bell-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.bell-item:hover { background: var(--inset); color: var(--ink); }
.bell-item .bell-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: var(--badge-primary-bg);
  color: var(--badge-primary-tx);
}
.bell-item .bell-icon.is-success { background: var(--badge-success-bg); color: var(--badge-success-tx); }
.bell-item .bell-icon.is-warning { background: var(--badge-warning-bg); color: var(--badge-warning-tx); }
.bell-item .bell-icon.is-danger  { background: var(--badge-danger-bg);  color: var(--badge-danger-tx); }
.bell-item .bell-title { font-size: 0.83rem; font-weight: 600; line-height: 1.3; }
.bell-item.is-unread .bell-title::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 6px;
  vertical-align: middle;
}
.bell-item .bell-time { font-size: 0.72rem; color: var(--ink-mute); }
.bell-empty { padding: 18px 10px; text-align: center; color: var(--ink-mute); font-size: 0.85rem; }
.bell-foot {
  display: block;
  text-align: center;
  padding: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-deep);
  text-decoration: none;
}
.bell-foot:hover { color: var(--teal); }

/* Le menu « petit écran » remplace les liens de la barre sous 992 px */
.nav-small-only { display: none; }
@media (max-width: 991.98px) { .nav-small-only { display: inline-flex; } }

/* Les menus passent au-dessus de la barre collante et des cartes MapLibre */
.navbar-main .dropdown-menu { z-index: 1040; }

@media (prefers-reduced-motion: reduce) {
  .dropdown-menu, .dropdown-item, .nav-drop-btn { transition: none !important; }
}

/* Téléphone : la barre doit tenir dans l'écran (sinon toute la page déborde à droite) */
@media (max-width: 575.98px) {
  .navbar-main .brand-logo { height: 26px; }
  .navbar-main .container-xl { gap: 8px; }
  .nav-actions { gap: 6px; }
  .nav-drop-btn .nav-label { display: none; }
  .nav-drop-btn { padding: 0 9px; }
}

/* ── PASTILLES DE STATUT ET COMPTEURS DANS LES MENUS ────────────── */
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--st-todo);
}
.status-dot.is-done { background: var(--st-done); }
.status-dot.is-wait { background: var(--st-wait); }
.status-dot.is-fail { background: var(--st-fail); }
.status-dot.is-todo { background: var(--st-todo); }

.dropdown-item .drop-count {
  margin-left: auto;
  padding-left: 14px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.dropdown-item.active .drop-count { color: inherit; }

/* Bouton de filtre : signale qu'un filtre est actif */
.filter-drop.is-active {
  border-color: var(--teal);
  background: var(--badge-primary-bg);
  color: var(--badge-primary-tx) !important;
}
.dpt-btn.dropdown-toggle::after { margin-left: 2px; opacity: .7; }

/* ── BASCULE D'AFFICHAGE (tableau / cartes) ─────────────────────── */
.view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--inset);
  border: 1px solid var(--line);
}
.view-toggle button {
  width: 34px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.view-toggle button:hover { color: var(--ink); }
/* actif : fond + bordure + ombre ensemble (lisible aussi en sombre, leçon du skill console-ui) */
.view-toggle button.active {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--teal);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 2px 6px rgba(0,0,0,.10);
}

/* Livrables en tableau */
.deliv-table thead th {
  background: var(--inset) !important;
  color: var(--ink-mute);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line) !important;
  white-space: nowrap;
}
.deliv-table td { color: var(--ink); border-color: var(--line-soft); background: var(--bg-card); font-size: .9rem; }
.deliv-row-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  align-items: center;
  justify-content: center;
  background: var(--inset);
  color: var(--teal);
  margin-right: 6px;
}
.deliv-row-code {
  font-family: 'JetBrains Mono', SFMono-Regular, monospace;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--inset);
  padding: 2px 6px;
  border-radius: 5px;
}

/* Bouton ▾ collé à un champ (choix de la semaine) */
.week-picker-btn {
  background: var(--inset);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.week-picker-btn:hover, .week-picker-btn[aria-expanded="true"] { background: var(--line-soft); color: var(--ink); }

/* ── CARTE DE RESTITUTION FAÇON SIG DE BUREAU (skill maplibre-desktop-like) ─────────────
   Plans (piège n° 3 du skill) : cartes 0-1 < rideau 1 (plugin) < barre d'état 5 < barre d'outils 10
   < barre du rideau 12 < panneaux 25. Couleurs = jetons de la charte, sans variable alias (piège n° 2). */
.mm-root { position: relative; }
.mm-stage {
  position: relative;
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e9ecea;
}
.mm-map { position: absolute; inset: 0; }
.mm-root.is-fullscreen .mm-stage { height: 100vh; border-radius: 0; border: 0; }

/* Barres d'icônes (IconControlGroup), posées au-dessus des deux cartes du rideau */
.mm-toolbar {
  position: absolute; top: 10px; left: 10px; z-index: 10;
  display: flex; flex-direction: column; gap: 8px;
}
.mm-toolbar .maplibregl-ctrl { margin: 0; }
.maplibregl-ctrl-icon-group {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.maplibregl-ctrl-icon-group button {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--ink-soft);
  border: 0; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; padding: 0; font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.maplibregl-ctrl-icon-group button:last-child { border-bottom: 0; }
.maplibregl-ctrl-icon-group button:hover { background: var(--inset); color: var(--ink); }
.maplibregl-ctrl-icon-group button.active { background: color-mix(in srgb, var(--teal) 16%, var(--bg-card)); color: var(--teal); }
.maplibregl-ctrl-icon-group button:disabled { opacity: .4; cursor: not-allowed; }

/* Panneaux ancrés à leur bouton (positionPanel), apparition fondu + agrandissement */
.mm-panel {
  position: absolute; top: 0; left: 0; z-index: 25;
  width: 280px; max-height: calc(100% - 16px);
  display: flex; flex-direction: column;
  background: var(--bg-card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform-origin: left top;
  transform: scale(0.94) translateX(-8px);
  transition: opacity .16s ease, transform .16s var(--ease), visibility .16s;
}
.mm-panel.is-flipped { transform-origin: right top; transform: scale(0.94) translateX(8px); }
.mm-panel.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.mm-panel::before {   /* flèche vers le bouton */
  content: ""; position: absolute; left: -7px; top: var(--mm-arrow-top, 12px);
  border: 6px solid transparent; border-left: 0; border-right-color: var(--bg-card);
  filter: drop-shadow(-1px 0 0 var(--line));
}
.mm-panel.is-flipped::before { left: auto; right: -7px; border: 6px solid transparent; border-right: 0; border-left-color: var(--bg-card); filter: drop-shadow(1px 0 0 var(--line)); }
.mm-panel-wide { width: 320px; }
.mm-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.mm-panel-head i { color: var(--teal); margin-right: 6px; }
.mm-panel-body { padding: 6px 10px 10px; overflow-y: auto; }
.mm-panel-foot { padding: 10px 12px; border-top: 1px solid var(--line-soft); background: var(--inset); border-radius: 0 0 10px 10px; }
.mm-panel-foot small { display: block; color: var(--ink-mute); font-size: 11.5px; margin-top: 3px; }
.mm-close {
  width: 28px; height: 28px; border-radius: 6px; border: 0;
  background: transparent; color: var(--ink-mute); cursor: pointer;
}
.mm-close:hover { background: var(--inset); color: var(--ink); }
.mm-close i { color: inherit; margin: 0; }

/* Gestionnaire de couches en dossiers */
.mm-folder { border-bottom: 1px solid var(--line-soft); }
.mm-folder:last-child { border-bottom: 0; }
.mm-folder-head {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 9px 4px; border: 0; background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; border-radius: 6px;
}
.mm-folder-head:hover { background: var(--inset); }
.mm-chevron { font-size: 10px; color: var(--ink-mute); transition: transform .18s ease; }
.mm-folder.open .mm-chevron { transform: rotate(90deg); }
.mm-folder-icon { color: #c27400; }
.mm-folder.open .mm-folder-icon::before { content: "\f07c"; }   /* dossier ouvert (Font Awesome) */
.mm-count {
  margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--ink-mute);
  background: var(--inset); border-radius: 8px; padding: 1px 7px;
}
.mm-folder-body { max-height: 0; overflow: hidden; transition: max-height .2s ease; padding-left: 22px; }
.mm-folder.open .mm-folder-body { max-height: 320px; }
.mm-layer { padding: 6px 0; }
.mm-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; margin: 0; }
.mm-check input { accent-color: var(--teal); width: 15px; height: 15px; }
.mm-opacity { display: flex; align-items: center; gap: 8px; padding: 4px 0 0 23px; }
.mm-opacity input { flex: 1; accent-color: var(--teal); height: 4px; }
.mm-opacity span { font-size: 11px; color: var(--ink-mute); width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.mm-swatch { display: inline-block; width: 14px; height: 10px; }
.mm-swatch.is-dashed { border: 2px dashed #e0b000; }
.mm-swatch.is-dot { width: 11px; height: 11px; border-radius: 50%; background: #1f6f6b; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }

/* Galerie de fonds de carte */
.mm-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding-top: 6px; }
.mm-basemap {
  position: relative; display: flex; flex-direction: column; gap: 5px;
  padding: 5px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-card); color: var(--ink-soft); cursor: pointer; text-align: left;
  transition: border-color .15s ease, transform .15s var(--ease);
}
.mm-basemap:hover { border-color: var(--ink-mute); transform: translateY(-1px); }
.mm-basemap.active { border-color: var(--teal); box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 30%, transparent); color: var(--ink); }
.mm-basemap-thumb {
  display: block; height: 64px; border-radius: 5px;
  background: repeating-linear-gradient(45deg, var(--inset) 0 8px, var(--line-soft) 8px 16px);
  background-size: cover; background-position: center;
}
.mm-basemap-label { font-size: 12px; font-weight: 600; }
.mm-basemap-wait { position: absolute; top: 28px; left: calc(50% - 8px); color: #fff; display: none; }
.mm-basemap.is-loading .mm-basemap-wait { display: block; }
.mm-basemap.is-loading .mm-basemap-thumb { filter: brightness(.6); }

/* Légende */
.mm-legend-item { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.mm-legend-item:last-child { border-bottom: 0; }
.mm-legend-item strong { display: block; font-size: 12.5px; margin-bottom: 6px; }
.mm-legend-item img { display: block; max-width: 100%; background: #fff; padding: 4px; border-radius: 6px; }
.mm-empty { font-size: 12.5px; color: var(--ink-mute); margin: 8px 0; }

/* Rideau : barre de choix en haut au centre, curseur aux couleurs de la charte */
.mm-compare-bar {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 12;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 12px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.mm-compare-bar[hidden] { display: none; }
.mm-compare-bar select {
  margin-left: 6px; font-size: 12.5px; padding: 3px 6px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--ink);
}
.mm-compare-bar > i { color: var(--teal); }
.mm-root .maplibregl-compare { background: #fff; }
.mm-root .maplibregl-compare .compare-swiper-vertical {
  background-color: var(--teal); width: 44px; height: 44px; left: -22px; margin-top: -22px;
  box-shadow: 0 0 0 3px #fff, var(--shadow-md);
}

/* Barre d'état : toujours sombre, comme le pied d'un logiciel (principe du skill) */
.mm-status {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 14px;
  height: 28px; padding: 0 10px;
  background: rgba(16, 24, 24, .78); color: #d9e2e1;
  font-size: 11.5px; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}
.mm-status > span { white-space: nowrap; flex-shrink: 0; }
.mm-status i { opacity: .7; }
.mm-status .maplibregl-ctrl-scale {
  margin: 0; background: transparent; color: #d9e2e1;
  border-color: #d9e2e1; font-size: 10.5px; line-height: 1.4; padding: 0 4px;
}
.mm-status > .mm-status-info { margin-left: auto; color: #ffd27a; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }
.mm-root .maplibregl-ctrl-bottom-right { bottom: 28px; }   /* attribution au-dessus de la barre d'état */

@media (max-width: 575.98px) {
  .mm-stage { height: 480px; }
  .mm-panel, .mm-panel-wide { width: 250px; }
  .mm-compare-bar { font-size: 11px; gap: 6px; }
  .mm-compare-bar label { display: flex; flex-direction: column; }
  .mm-status [data-mm-zoom] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-panel, .mm-folder-body, .mm-chevron, .mm-basemap { transition: none !important; }
}
