/* ── POLICES (auto-hébergées : la CSP n'autorise que font-src 'self' ; voir fonts/OFL-*.txt) ── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-serif-display-latin-400-normal.woff2') format('woff2');
}

/* ── TOKENS ── */
:root {
  --bg:        #eef2f8;
  --surface:   #ffffff;
  --surface2:  #f5f8fc;
  --navy:      #1a2744;
  --navy-mid:  #243460;
  --teal:      #0d9488;
  --teal-light:#ccfbf1;
  --amber:     #d97706;
  --amber-light:#fef3c7;
  --red:       #dc2626;
  --red-light: #fee2e2;
  --indigo:    #5558b8;
  --indigo-light:#e0e7ff;
  --muted:     #5a6580;
  --border:    #dde3ef;
  --txt:       #1a2335;
  --txt2:      #4a5568;
  --shadow:    0 1px 3px rgba(26,39,68,.08), 0 2px 8px rgba(26,39,68,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1120;
    --surface: #1a2035;
    --surface2: #222c44;
    --border: #2c3a55;
    --txt: #e8edf5;
    --txt2: #8fa3c0;
    --muted: #6b82a0;
    --teal-light: #042f2e;
    --amber-light: #2d1a00;
    --red-light: #2d0c0c;
    --indigo-light: #1e1f4a;
    --shadow: 0 1px 3px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  }
}
:root[data-theme="dark"] {
  --bg: #0d1120;
  --surface: #1a2035;
  --surface2: #222c44;
  --border: #2c3a55;
  --txt: #e8edf5;
  --txt2: #8fa3c0;
  --muted: #6b82a0;
  --teal-light: #042f2e;
  --amber-light: #2d1a00;
  --red-light: #2d0c0c;
  --indigo-light: #1e1f4a;
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
select { font-family: inherit; }
svg text { font-family: 'DM Sans', sans-serif; }

/* ── HEADER ── */
.header {
  background: var(--navy);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-title {
  font-family: 'DM Serif Display', serif;
  color: #fff;
  font-size: 18px;
  letter-spacing: .01em;
  white-space: nowrap;
}
.header-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  font-weight: 400;
  margin-left: 4px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.snapshot-select {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 5px 28px 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.6)' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  min-width: 160px;
}
.snapshot-select option { background: var(--navy); }
.badge-objective {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.8);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── FILTER BAR ── */
.filter-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: 56px;
  z-index: 90;
  box-shadow: var(--shadow);
}
.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 4px;
}
.filter-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--txt);
  padding: 5px 24px 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%235a6580' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  cursor: pointer;
}
.filter-reset {
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  margin-left: auto;
  font-family: inherit;
}
.filter-toggle {
  padding: 5px 12px;
  background: var(--surface);
  border: 1.5px solid #6366f1;
  border-radius: 8px;
  font-size: 12px;
  color: #6366f1;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
  white-space: nowrap;
}
.filter-toggle.active {
  background: #6366f1;
  color: white;
}
.filter-toggle:hover { opacity: .85; }

/* ── TABS ── */
.tabs-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  gap: 0;
}
.tab-btn {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  position: relative;
}
.tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tab-btn.active { color: #7fa8e0; border-bottom-color: #7fa8e0; }
}
:root[data-theme="dark"] .tab-btn.active { color: #7fa8e0; border-bottom-color: #7fa8e0; }
.tab-btn:hover:not(.active) { color: var(--txt2); }
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── CONTENT ── */
.content {
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── KPI TILES ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.kpi-tile::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--tile-accent, var(--indigo));
  border-radius: 10px 0 0 10px;
}
.kpi-tile.alert { --tile-accent: var(--red); background: var(--red-light); }
.kpi-tile.warning { --tile-accent: var(--amber); background: var(--amber-light); }
.kpi-tile.positive { --tile-accent: var(--teal); }
.kpi-tile.neutral { --tile-accent: var(--muted); }
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
  line-height: 1.3;
}
.kpi-value {
  font-family: 'DM Serif Display', serif;
  font-size: 34px;
  line-height: 1;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.kpi-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.kpi-delta {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.kpi-delta.up { color: var(--red); }
.kpi-delta.down { color: var(--teal); }
.kpi-delta.neutral { color: var(--muted); }
.alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--red);
  color: #fff;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── SECTION HEADERS ── */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 24px 0 12px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--txt);
}
.section-hint {
  font-size: 11px;
  color: var(--muted);
}

/* ── CHART CONTAINER ── */
.chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow-x: auto;
}
.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt2);
  margin-bottom: 16px;
}

/* ── TABLE ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }
.data-table .td-ecole { font-weight: 600; }
.data-table .td-num { text-align: right; }
.data-table .td-total { font-weight: 700; }
.delta-up { color: var(--red); font-weight: 600; }
.delta-down { color: var(--teal); font-weight: 600; }
.delta-flat { color: var(--muted); }

/* ── WATERFALL TOOLTIP ── */
.wf-tooltip {
  position: fixed;
  background: var(--navy);
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s;
  z-index: 200;
  white-space: nowrap;
}

/* ── ALERT BOX ── */
.alert-box {
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-box .alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.alert-box .alert-content { flex: 1; }
.alert-box .alert-title { font-weight: 700; color: var(--red); font-size: 13px; margin-bottom: 2px; }
.alert-box .alert-text { font-size: 12px; color: var(--txt2); }
.warning-box {
  background: var(--amber-light);
  border: 1px solid var(--amber);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.warning-box .alert-title { color: var(--amber); font-weight: 700; font-size: 13px; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 14px; }

/* ── LEGEND ── */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--txt2);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── TENDANCES ── */
.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.trend-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.trend-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--txt2);
  margin-bottom: 10px;
}
.trend-value-big {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 4px;
}
.trend-since {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ── LISTE DES ALERTES J+70 (locale, sur clic, bas de l'onglet ②) ── */
.alerte-liste-bar { margin: 4px 0 12px; }
.alerte-liste-btn { font: inherit; font-size: 13px; font-weight: 600; color: var(--red); background: var(--red-light); border: 1px solid var(--red); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.alerte-liste-btn:hover { filter: brightness(.97); }
.alerte-liste { background: var(--surface); border: 1px solid var(--red); border-radius: 10px; margin-bottom: 20px; box-shadow: var(--shadow); }
.alerte-liste-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; font-weight: 600; color: var(--red); }
.alerte-liste-lock { font-weight: 400; font-size: 12px; color: var(--muted); }
.alerte-liste-scroll { max-height: 360px; overflow: auto; border-top: 1px solid var(--border); }
.alerte-liste .data-table th { position: sticky; top: 0; background: var(--surface2); }
.alerte-liste-na { font-size: 12px; color: var(--muted); margin: 0 0 16px; }

/* ── TENDANCES : F26 vs N-1 par semaine ── */
.hebdo-head { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; }
.seg-btn { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; padding: 5px 11px; border-radius: 6px; cursor: pointer; }
.seg-btn:hover { color: var(--txt); }
.seg-btn.active { background: var(--surface); color: var(--txt); font-weight: 600; box-shadow: var(--shadow); }
.hebdo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; margin-bottom: 16px; }
.hebdo-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); }
.hebdo-kpi-label { font-size: 12px; font-weight: 600; color: var(--txt2); margin-bottom: 6px; }
.hebdo-kpi-val { font-family: 'DM Serif Display', serif; font-size: 26px; line-height: 1.1; color: #2563eb; font-variant-numeric: tabular-nums; }
.hebdo-kpi-n1 { font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--muted); }
.hebdo-kpi-delta { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.hebdo-kpi-delta.up { color: var(--teal); }
.hebdo-kpi-delta.down { color: var(--red); }
.hebdo-kpi-delta span { font-weight: 400; color: var(--muted); }
.hebdo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hebdo-grid .chart-container { margin-bottom: 0; }
.hebdo-card-wide { grid-column: 1 / -1; }
.hebdo-card-wide .hebdo-card-title { font-size: 16px; }
.hebdo-card-title { font-size: 14px; font-weight: 600; color: var(--txt); margin-bottom: 8px; }
.hebdo-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hebdo-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.hebdo-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hebdo-legend i.dash { width: 16px; height: 0; border-top: 2px dashed; border-radius: 0; vertical-align: 3px; }
.hebdo-note { font-size: 11px; color: var(--muted); margin: 10px 0 8px; }
@media (max-width: 900px) { .hebdo-grid { grid-template-columns: 1fr; } }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .header { padding: 0 16px; height: 48px; }
  .header-title { font-size: 15px; }
  .filter-bar, .tabs-bar { padding: 8px 16px; }
  .content { padding: 16px; }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-value { font-size: 26px; }
}

/* ── MULTI-SÉLECTION ÉCOLES ── */
.multi-select { position: relative; }
.multi-btn { min-width: 170px; text-align: left; color: var(--txt); }
.multi-btn.active { border-color: var(--indigo); color: var(--indigo); font-weight: 600; }
.multi-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 120;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 230px;
}
.multi-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--txt);
  cursor: pointer;
}
.multi-panel label:hover { background: var(--surface2); }
.multi-panel .multi-tag { margin-left: auto; font-size: 10px; color: var(--muted); }
.multi-panel .multi-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding: 6px 8px 2px;
}
.multi-panel .multi-actions button { font-size: 11px; color: var(--indigo); text-decoration: underline; }
.scope-note {
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--txt2);
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 8px 12px;
}

/* ── TABLEAU À BASCULER : colonnes groupées + campus repliables ── */
.table-grouped th { vertical-align: bottom; }
.table-grouped .th-group {
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--txt2);
}
.table-grouped .th-pot  { color: var(--teal); }
.table-grouped .th-nope { color: var(--red); }
.table-grouped .th-sub  { font-size: 10px; text-transform: none; letter-spacing: 0; }
.table-grouped .th-group, .table-grouped .th-sub.th-pot, .table-grouped .th-sub.th-nope,
.table-grouped .td-grp-start { border-left: 1px solid var(--border); }
.th-hint { font-size: 10px; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }
.row-expandable { cursor: pointer; }
.row-expandable:hover td { background: var(--indigo-light); }
.row-expandable .caret { display: inline-block; width: 12px; color: var(--indigo); }
.row-campus td { background: var(--surface2); font-size: 12px; color: var(--txt2); }
.row-campus .td-campus { padding-left: 32px; font-weight: 400; }
.row-total td { border-top: 2px solid var(--border); font-weight: 700; }

/* ── ONGLET 6 : tableaux ajustés à la largeur (pas de défilement horizontal) ── */
.att-fit { overflow-x: visible; }
.att-fit .data-table { table-layout: auto; font-size: 12px; }
.att-fit .data-table th { white-space: normal; padding: 6px 6px; vertical-align: bottom; line-height: 1.25; }
.att-fit .data-table td { padding: 7px 6px; }
.att-fit .data-table td.td-ecole { white-space: nowrap; }
@media (max-width: 900px) { .att-fit { overflow-x: auto; } }

/* ── SESSION (en-tête) ── */
.user-badge {
  color: rgba(255,255,255,.8);
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout-btn {
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.logout-btn:hover { background: rgba(255,255,255,.1); }

/* ── MESSAGE GLOBAL (chargement, accès refusé, base vide) ── */
.app-status {
  max-width: 1400px;
  margin: 20px auto 0;
  padding: 0 24px;
  color: var(--muted);
  font-size: 13px;
}
.app-status:empty { display: none; }
.app-status .alert-box, .app-status .warning-box { margin-bottom: 0; }
.app-status .btn-primary { margin-top: 10px; }

/* ── BANNIÈRE FILTRE TYPE D'INSCRIPTION ── */
.sit-banner {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 999;
  background: #1a2744;
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  max-width: 320px;
}
.sit-banner-close {
  margin-left: 10px;
  background: #dc2626;
  color: #fff;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
}

/* ── ONGLET IMPORT (admin) ── */
.tab-admin { margin-left: auto; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-grid {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 20px;
}
.admin-grid legend {
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admin-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt2);
}
.admin-grid .admin-wide { grid-column: 1 / -1; }
.admin-grid input, .admin-grid select {
  font: inherit;
  font-weight: 400;
  color: var(--txt);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  min-width: 0;
}
.admin-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-busy { font-size: 12px; color: var(--muted); }
.btn-primary {
  background: var(--navy);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-confirm { background: var(--teal); }
.import-preview { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.import-preview .alert-text ul { margin: 6px 0 0 18px; }
.import-preview .success-box {
  background: var(--teal-light);
  border: 1px solid var(--teal);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
}
.import-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.import-preview .success-box .alert-title { font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.import-preview .success-box ul { list-style: none; }
.auth-page { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
/* auth/local.html : jeton d'accès local (mode sans SSO sous docker compose) ; erreur affichée via #erreur, sans script */
.local-login { display: grid; gap: 10px; width: min(420px, 100% - 32px); padding: 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.local-login h1 { font-size: 18px; }
.local-login input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit;
  background: var(--surface2); color: inherit; }
.auth-error { display: none; padding: 8px 10px; border-radius: 6px; background: var(--red-light); color: var(--red); }
.auth-error:target { display: block; }
