:root {
  --c-bg: #f1f5f9;
  --c-surface: #ffffff;
  --c-text: #0f172a;
  --c-text-muted: #64748b;
  --c-border: #e2e8f0;
  --c-primary: #6366f1;
  --c-primary-dark: #4f46e5;
  --c-primary-soft: #eef2ff;
  --c-success: #10b981;
  --c-success-soft: #d1fae5;
  --c-danger: #ef4444;
  --c-danger-soft: #fee2e2;
  --c-warning: #f59e0b;
  --c-warning-soft: #fef3c7;
  --c-info: #0ea5e9;
  --c-info-soft: #e0f2fe;
  --sidebar-bg: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -1px rgba(15,23,42,.04);
  --shadow-lg: 0 10px 25px -5px rgba(15,23,42,.10), 0 8px 10px -6px rgba(15,23,42,.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --sidebar-w: 248px;
}

.admin-body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ============ SIDEBAR ============ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #e0e7ff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  z-index: 50;
  box-shadow: 4px 0 24px -8px rgba(15,23,42,.15);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 18px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.sidebar-brand strong { display: block; color: #fff; font-size: 16px; }
.sidebar-brand span { display: block; color: #a5b4fc; font-size: 12px; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #c7d2fe;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav a.active {
  background: rgba(99,102,241,.25);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(165,180,252,.2);
}
.sidebar-nav a svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #e0e7ff;
  transition: background .15s;
  min-width: 0;
}
.user-chip:hover, .user-chip.active { background: rgba(255,255,255,.08); }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.user-meta { min-width: 0; overflow: hidden; }
.user-meta strong { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { display: block; color: #a5b4fc; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #c7d2fe;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.logout-btn:hover { background: rgba(239,68,68,.2); color: #fecaca; }
.logout-btn svg { width: 18px; height: 18px; }

/* ============ SHELL ============ */
.admin-shell.with-sidebar { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.admin-shell:not(.with-sidebar) { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.admin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0;
  z-index: 10;
}
.page-title { margin: 0; font-size: 18px; font-weight: 700; flex: 1; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: background .15s;
}
.header-link:hover { background: #e0e7ff; }
.header-link svg { width: 16px; height: 16px; }

.sidebar-burger { display: none; cursor: pointer; }
.sidebar-burger svg { width: 24px; height: 24px; }
#sidebar-toggle { display: none; }

.admin-main { flex: 1; padding: 32px; max-width: 1400px; width: 100%; box-sizing: border-box; margin: 0 auto; }
.admin-main h1 { font-size: 28px; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.02em; }
.admin-main h2 { font-size: 18px; margin: 0 0 14px; font-weight: 600; }
.admin-main p.muted { color: var(--c-text-muted); margin: 0 0 24px; }

/* ============ CARDS ============ */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  border: 1px solid var(--c-border);
}
.card h2 { margin-top: 0; }

/* ============ STATS GRID avec icones ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 0 0 32px;
}
.stat {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-body { display: flex; flex-direction: column; }
.stat-num { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--c-text); }
.stat-label { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

.stat-icon.indigo { background: #eef2ff; color: #4f46e5; }
.stat-icon.violet { background: #f3e8ff; color: #7c3aed; }
.stat-icon.sky    { background: #e0f2fe; color: #0284c7; }
.stat-icon.emerald{ background: #d1fae5; color: #059669; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.rose   { background: #ffe4e6; color: #e11d48; }
.stat-icon.teal   { background: #ccfbf1; color: #0d9488; }

/* ============ FORMS ============ */
label { display: block; font-weight: 600; font-size: 13px; color: var(--c-text); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], textarea, select {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-family: inherit;
  color: var(--c-text);
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
textarea { resize: vertical; min-height: 70px; font-family: inherit; }

.form-inline { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.form-inline label { flex: 1; min-width: 200px; margin-bottom: 0; }
.form-block { display: flex; flex-direction: column; gap: 14px; }

/* ============ BUTTONS ============ */
.btn, button.btn, button.primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all .15s;
}
.btn:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); }
.btn.primary, button.primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99,102,241,.30);
}
.btn.primary:hover, button.primary:hover {
  background: linear-gradient(135deg, #5b5cf0, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99,102,241,.40);
}
.btn:disabled, button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-link {
  background: none;
  border: none;
  padding: 5px 8px;
  color: var(--c-primary);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  text-decoration: none;
  font-weight: 600;
  border-radius: 5px;
  transition: background .15s;
}
.btn-link:hover { background: var(--c-primary-soft); text-decoration: none; }
.btn-link.danger { color: var(--c-danger); }
.btn-link.danger:hover { background: var(--c-danger-soft); }

/* ============ ALERTS ============ */
.alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin: 0 0 16px;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid transparent;
}
.alert.success { background: var(--c-success-soft); color: #065f46; border-color: #6ee7b7; }
.alert.error { background: var(--c-danger-soft); color: #7f1d1d; border-color: #fca5a5; }
.alert.info { background: var(--c-info-soft); color: #075985; border-color: #7dd3fc; }
.alert-card { padding: 24px; background: var(--c-success-soft); border: 1px solid #6ee7b7; }
.alert-card h2 { color: #065f46; margin-top: 0; }

/* ============ BADGES ============ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
}
.badge.ok { background: var(--c-success-soft); color: #065f46; }
.badge.ko { background: var(--c-danger-soft); color: #7f1d1d; }

/* ============ TABLES ============ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.data-table th {
  padding: 10px 14px;
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.data-table th:first-child { border-top-left-radius: 8px; }
.data-table th:last-child { border-top-right-radius: 8px; }
.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfc; }
.data-table tr.row-inactive { opacity: .55; }
.actions-cell { white-space: nowrap; }
.data-table small.muted { color: var(--c-text-muted); font-size: 12px; }

/* ============ EMPTY STATE ============ */
.empty-state {
  padding: 50px 24px;
  text-align: center;
  color: var(--c-text-muted);
}
.empty-state svg { width: 64px; height: 64px; opacity: 0.4; margin-bottom: 16px; }
.empty-state p { margin: 8px 0; }

/* ============ FORMATIONS / MODULES ============ */
.formation-card {
  padding: 0;
  overflow: hidden;
}
.formation-card .formation-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--c-border);
}
.formation-head h2 { margin: 0 0 6px; font-size: 17px; }
.formation-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.formation-body { padding: 18px 24px; display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.formation-body label { flex: 1; min-width: 200px; margin-bottom: 0; }

.module-edit { background: #fafbfc; border-left: 3px solid var(--c-primary); }
.module-actions { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.question-form .choices {
  border: 1px dashed var(--c-border);
  padding: 14px;
  border-radius: 8px;
  background: #fafbfc;
}
.question-form .choices legend { padding: 0 8px; font-weight: 600; color: var(--c-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.choice-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.choice-row input[type=text] { flex: 1; }
.choice-row input[type=radio] { width: 18px; height: 18px; accent-color: var(--c-primary); }

/* ============ FILTER TABS ============ */
.filter-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  background: var(--c-surface);
  border-radius: 10px;
  border: 1px solid var(--c-border);
  width: fit-content;
}
.filter-tabs a {
  padding: 7px 16px;
  border-radius: 7px;
  color: var(--c-text-muted);
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
  transition: all .15s;
}
.filter-tabs a:hover { color: var(--c-text); }
.filter-tabs a.active { background: var(--c-primary); color: #fff; box-shadow: 0 2px 6px rgba(99,102,241,.25); }

/* ============ PROGRESS ============ */
.progress-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary), #8b5cf6);
  border-radius: 999px;
  transition: width .4s ease;
}

/* ============ CREDENTIALS PANEL ============ */
.credentials {
  margin-top: 14px;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #6ee7b7;
}
.credentials th { text-align: left; padding: 10px 14px; color: var(--c-text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; width: 140px; border-bottom: 1px solid var(--c-border); }
.credentials td { padding: 10px 14px; border-bottom: 1px solid var(--c-border); }
.credentials tr:last-child th, .credentials tr:last-child td { border-bottom: none; }
.credentials code { background: #f1f5f9; padding: 4px 10px; border-radius: 6px; font-family: "SF Mono", Monaco, Consolas, monospace; font-size: 13px; }

/* ============ BREADCRUMB ============ */
.breadcrumb {
  margin: 0 0 18px;
  font-size: 13px;
}
.breadcrumb a {
  color: var(--c-text-muted);
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb a:hover { color: var(--c-primary); }

/* ============ AUTH (login admin) ============ */
.admin-shell:not(.with-sidebar) .admin-main { padding: 0; max-width: 100%; }
.auth-card {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-border);
}
.auth-card h1 { margin: 0 0 8px; font-size: 24px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.auth-card form label { margin-bottom: 0; }
.auth-card button[type=submit] { margin-top: 8px; justify-content: center; }

/* ============ DETAILS / SUMMARY ============ */
details { margin: 0; }
details summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  user-select: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid var(--c-text-muted);
  border-bottom: 2px solid var(--c-text-muted);
  transform: rotate(-45deg);
  transition: transform .15s;
  flex-shrink: 0;
  margin-left: 2px;
}
details[open] summary::before { transform: rotate(45deg); margin-bottom: 4px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s;
  }
  #sidebar-toggle:checked ~ .sidebar { transform: translateX(0); }
  .admin-shell.with-sidebar { margin-left: 0; }
  .sidebar-burger { display: inline-flex; align-items: center; justify-content: center; }
  .admin-main { padding: 22px 18px; }
  .admin-header { padding: 14px 18px; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* ============ MISC ============ */
.muted { color: var(--c-text-muted); }
.small { font-size: 12px; }
.actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
code { background: #f1f5f9; padding: 2px 7px; border-radius: 5px; font-family: "SF Mono", Monaco, Consolas, monospace; font-size: 13px; }

/* Cacher footer du site apprenant en admin */
.admin-body .footer { display: none; }
.admin-body .topbar { display: none; }


/* ============ FORMATIONS GRID ============ */
.formations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.formation-card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  padding: 0;
  margin: 0;
}
.formation-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.formation-banner {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #fff;
  position: relative;
}
.formation-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.25), transparent 60%);
  pointer-events: none;
}
.formation-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.formation-icon { width: 32px; height: 32px; color: #fff; }

.formation-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}
.formation-header h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.formation-desc {
  margin: 0;
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

.formation-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
  background: var(--accent-soft, #f8fafc);
  border-radius: 12px;
  border: 1px solid var(--accent, #e2e8f0);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
}
.metric { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.metric-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-dark, var(--c-text));
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  font-weight: 600;
}

.formation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.formation-btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
  padding: 10px 14px;
  font-size: 13px;
}
.formation-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.formation-btn:hover {
  border-color: var(--accent, #cbd5e1);
  color: var(--accent-dark, var(--c-text));
  background: var(--accent-soft, #f8fafc);
}

.formation-config {
  border-top: 1px dashed var(--c-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.config-form { margin: 0; }
.config-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.config-row label {
  flex: 1;
  margin-bottom: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
}
.threshold-input {
  position: relative;
  margin-top: 6px;
}
.threshold-input input {
  padding-right: 36px;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-dark, var(--c-text));
}
.threshold-input .suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-muted);
  font-weight: 600;
  pointer-events: none;
}
.toggle-form { margin: 0; text-align: left; }
.toggle-form button { padding: 4px 0; }

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


/* ============ FILTER BAR ============ */
.filter-card { padding: 18px 20px; }
.filter-bar {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 1fr 0.7fr auto;
  gap: 14px;
  align-items: end;
}
.filter-field { display: flex; flex-direction: column; gap: 6px; }
.filter-field label {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  font-weight: 700;
}
.input-with-icon { position: relative; }
.input-with-icon svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--c-text-muted);
  pointer-events: none;
}
.input-with-icon input { padding-left: 36px; }
.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.filter-actions .btn { white-space: nowrap; }
@media (max-width: 980px) {
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .filter-actions { grid-column: span 2; }
}
@media (max-width: 560px) {
  .filter-bar { grid-template-columns: 1fr; }
  .filter-actions { grid-column: auto; }
}


/* ============ SIDEBAR CONTEXT (centre courant) ============ */
.sidebar-context {
  padding: 12px 14px;
  margin: 0 0 14px;
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-context .ctx-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  font-weight: 700;
}
.sidebar-context strong {
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}
.sidebar-section-label {
  margin-top: 14px;
  padding: 8px 14px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #818cf8;
  font-weight: 700;
}
