/* ============================================================
   QUIZZ MÉTIERS DU SON — thème "console de mixage"
   Signature : le duel analogique (ambre, VU-mètre) / numérique
   (cyan, afficheur LED) traverse toute l'interface.
   ============================================================ */

:root {
  /* Fond : bleu-charbon de studio, jamais du noir pur */
  --bg-deep: #12161d;
  --bg-panel: #1b212b;
  --bg-panel-raised: #232a36;
  --border-subtle: #2e3542;
  --border-strong: #3d4656;

  /* Texte */
  --text-primary: #f3efe7;
  --text-muted: #8791a3;
  --text-faint: #5c6577;

  /* Duel analogique / numérique */
  --accent-amber: #e8934a;
  --accent-amber-hot: #f2b15e;
  --accent-cyan: #3fbfb5;
  --accent-cyan-soft: #6fd8d0;

  /* États */
  --danger: #e1615d;
  --success: #59c58a;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-display);
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(63, 191, 181, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(232, 147, 74, 0.06), transparent);
  background-attachment: fixed;
}

button {
  font-family: var(--font-display);
  cursor: pointer;
}

a { color: var(--accent-cyan); }

/* Focus visible pour l'accessibilité clavier */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Layout général ---------- */
.app-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen { display: none; animation: fade-in 0.35s ease; }
.screen.active { display: flex; flex-direction: column; gap: 20px; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Topbar : bandeau console ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.user-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  flex-shrink: 0;
}

.topbar-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.stat-streak { display: flex; align-items: center; gap: 4px; color: var(--accent-amber-hot); }
.stat-xp { color: var(--accent-cyan-soft); }

/* ---------- Titre de section ---------- */
.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin: 0 0 4px;
}

h1.hero {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

h1.hero .accent { color: var(--accent-amber-hot); }

p.lede {
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.5;
  font-size: 15px;
}

/* ---------- Panneau générique (chassis de console) ---------- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* ---------- Profils (écran d'accueil) ---------- */
.profile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.15s, transform 0.15s;
}
.profile-chip:hover { border-color: var(--accent-cyan); transform: translateY(-1px); }

.profile-chip .dot {
  width: 8px; height: 8px; border-radius: 50%;
}

.new-profile-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.input {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 14px;
}
.input:focus { border-color: var(--accent-cyan); }

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: filter 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn:hover { filter: brightness(1.1); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-amber-hot));
  color: #1a1206;
}
.btn-secondary {
  background: var(--bg-panel-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-full { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ---------- Sélecteur de longueur de session ---------- */
.length-selector {
  display: flex;
  gap: 8px;
}
.length-option {
  flex: 1;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.length-option:hover { border-color: var(--border-strong); }
.length-option.selected {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(63, 191, 181, 0.08);
}

/* ---------- Sélecteur d'axes : tranches de console ---------- */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.channel-strip {
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.channel-strip:hover { border-color: var(--border-strong); }
.channel-strip.selected {
  border-color: var(--accent-cyan);
  background: rgba(63, 191, 181, 0.08);
}

.channel-code {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent-cyan-soft);
}
.channel-strip.selected .channel-code { color: var(--accent-cyan); }

.channel-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

.channel-led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.15s, box-shadow 0.15s;
}
.channel-strip.selected .channel-led {
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.channel-strip.master {
  border-style: dashed;
}

/* ---------- Question ---------- */
.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.axis-badge {
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--accent-cyan-soft);
}

.question-text {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.55;
  margin: 8px 0 16px;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Chaque choix ressemble à un fader horizontal */
.choice-fader {
  position: relative;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: left;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.45;
  white-space: normal;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.choice-fader::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--border-strong);
  transition: background 0.15s;
}
.choice-fader:hover:not(:disabled) { border-color: var(--border-strong); background: var(--bg-panel); }
.choice-fader:hover:not(:disabled)::before { background: var(--accent-cyan); }
.choice-fader:disabled { cursor: default; }

.choice-fader.correct {
  border-color: var(--success);
  background: rgba(89, 197, 138, 0.1);
}
.choice-fader.correct::before { background: var(--success); }
.choice-fader.incorrect {
  border-color: var(--danger);
  background: rgba(225, 97, 93, 0.1);
}
.choice-fader.incorrect::before { background: var(--danger); }

/* ---------- VU-mètre (élément signature) ---------- */
.vu-meter {
  height: 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.vu-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent-amber) 75%, var(--danger) 100%);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.vu-meter-fill.flash-correct { animation: vu-pulse-good 0.5s ease; }
.vu-meter-fill.flash-incorrect { background: var(--danger); animation: vu-pulse-bad 0.4s ease; }

@keyframes vu-pulse-good {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.6); }
  100% { filter: brightness(1); }
}
@keyframes vu-pulse-bad {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* ---------- Bande LCD (explication, style scribble-strip) ---------- */
.scribble-strip {
  background: #0d1117;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent-cyan-soft);
  display: none;
}
.scribble-strip.visible { display: block; animation: fade-in 0.3s ease; }
.scribble-strip .verdict {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  margin-bottom: 6px;
  display: block;
}
.scribble-strip.correct .verdict { color: var(--success); }
.scribble-strip.incorrect .verdict { color: var(--danger); }

.explanation-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.source-doc-link {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--accent-cyan);
  border-radius: 999px;
  color: var(--accent-cyan-soft);
  font-size: 12px;
  text-decoration: none;
  transition: background 0.15s;
  margin-top: 0;
}
.source-doc-link:hover {
  background: rgba(63, 191, 181, 0.12);
}
.source-doc-link-inline {
  color: var(--accent-cyan-soft);
  text-decoration: underline;
  font-size: 11px;
}
.source-doc-link-inline:hover {
  color: var(--accent-cyan);
}
.flag-question-btn {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-faint);
  font-size: 12px;
  font-family: var(--font-display);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.flag-question-btn:hover:not(:disabled) {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(225, 97, 93, 0.08);
}
.flag-question-btn.flagged {
  border-color: var(--danger);
  color: var(--danger);
  cursor: default;
}
.flag-question-btn:disabled {
  cursor: default;
  opacity: 0.85;
}

/* ---------- Blind test ---------- */
.blindtest-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
}
.blindtest-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-panel-raised);
  border: 2px solid var(--accent-amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.blindtest-player { width: 100%; max-width: 320px; }
.blindtest-guess-buttons { display: flex; gap: 10px; width: 100%; }
.blindtest-guess-buttons .btn { flex: 1; }

/* ---------- XP toast / badge débloqué ---------- */
.toast-stack {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
}
.badge-toast {
  background: var(--bg-panel-raised);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toast-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.badge-toast-icon { font-size: 22px; }
.badge-toast-text .label { font-weight: 700; font-size: 14px; }
.badge-toast-text .desc { font-size: 12px; color: var(--text-muted); }

/* ---------- Session summary ---------- */
.summary-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.summary-stat-row:last-child { border-bottom: none; }
.summary-stat-label { color: var(--text-muted); font-size: 14px; }
.summary-stat-value { font-family: var(--font-mono); font-size: 18px; font-weight: 600; }
.summary-stat-value.amber { color: var(--accent-amber-hot); }
.summary-stat-value.cyan { color: var(--accent-cyan-soft); }

/* ---------- Performance dashboard ---------- */
.axis-perf-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.axis-perf-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-cyan-soft);
  width: 32px;
  flex-shrink: 0;
}
.axis-perf-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
}
.axis-perf-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-amber));
  border-radius: 999px;
}
.axis-perf-bar-fill.coverage-fill {
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-amber-hot));
}
.axis-perf-label {
  font-size: 11px;
  color: var(--text-faint);
  width: 64px;
  flex-shrink: 0;
}

/* ---------- Spider chart ---------- */
.spider-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.spider-axis-legend {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.spider-axis-legend-item {
  font-size: 11px;
  color: var(--text-muted);
}
.spider-axis-code {
  font-family: var(--font-mono);
  color: var(--accent-cyan-soft);
  font-weight: 600;
}
.week-session-item {
  display: none; /* remplacé par l'histogramme horizontal, voir .histogram-* */
}

/* ---------- Histogramme horizontal scrollable ---------- */
/* Hauteur fixe quel que soit le nombre de points : la page ne s'allonge
   jamais, un ascenseur horizontal apparaît automatiquement si besoin. */
.histogram-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  margin: 4px -4px 0;
}
.histogram-scroll::-webkit-scrollbar { height: 6px; }
.histogram-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
.histogram-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 150px;
  padding: 0 4px;
  min-width: min-content;
}
.histogram-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  width: 44px;
  height: 100%;
}
.histogram-value {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
}
.histogram-bar-track {
  flex: 1;
  width: 20px;
  display: flex;
  align-items: flex-end;
  background: var(--bg-deep);
  border-radius: 4px;
  overflow: hidden;
}
.histogram-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-amber));
  border-radius: 4px 4px 0 0;
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.histogram-count {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-faint);
  margin-top: 4px;
  white-space: nowrap;
}
.histogram-label {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 6px;
  white-space: nowrap;
}

/* ---------- Détail par axe (cartes enrichies, scroll horizontal) ---------- */
.axis-cards-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.axis-cards-scroll::-webkit-scrollbar { height: 6px; }
.axis-cards-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
.axis-detail-card {
  min-width: 220px;
  flex-shrink: 0;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}
.axis-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.palier-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.palier-Découverte { border-color: var(--text-faint); color: var(--text-faint); }
.palier-En-construction { border-color: var(--accent-amber); color: var(--accent-amber-hot); }
.palier-Consolidation { border-color: var(--accent-cyan); color: var(--accent-cyan-soft); }
.palier-Maîtrise { border-color: var(--success); color: var(--success); }

/* ---------- Conseils (règles) ---------- */
.advice-item {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin: 0;
}
.advice-item:last-child { border-bottom: none; }

/* ---------- Bilan du coach ---------- */
.coach-advice-card {
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 12px;
}
.coach-advice-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-amber-hot);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.coach-advice-card p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}
.axis-perf-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.weak-concept-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.weak-concept-item:last-child { border-bottom: none; }
.weak-concept-tag { font-family: var(--font-mono); color: var(--text-primary); }
.weak-concept-pct { color: var(--danger); font-family: var(--font-mono); }

/* ---------- Badges grid ---------- */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}
.badge-cell {
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.badge-cell .icon { font-size: 24px; }
.badge-cell.locked { opacity: 0.35; filter: grayscale(1); }
.badge-cell .label { font-size: 10px; color: var(--text-muted); line-height: 1.3; }

/* ---------- Navigation basse ---------- */
.bottom-nav {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}
.bottom-nav .btn { flex: 1; }

.link-quiet {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 12px;
  text-decoration: underline;
  padding: 0;
  align-self: center;
}

/* ---------- Admin ---------- */
.admin-question-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-question-card .meta-row {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  flex-wrap: wrap;
}
.admin-question-card .meta-row .flag-low-confidence {
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 4px;
  padding: 1px 6px;
}
.admin-question-card .meta-row .flag-player-reported {
  color: var(--accent-amber-hot);
  border: 1px solid var(--accent-amber);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ---------- Mise à jour de la bibliothèque ---------- */
.update-panel {
  border-color: var(--accent-amber);
}
.update-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.update-checkbox input {
  cursor: pointer;
}
.update-log {
  margin-top: 14px;
  background: #0d1117;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan-soft);
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Filtres admin ---------- */
/* ---------- Tableau statistique (admin) ---------- */
.stats-table-scroll {
  overflow-x: auto;
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}
.stats-table th, .stats-table td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
}
.stats-table th:first-child, .stats-table td:first-child {
  text-align: left;
}
.stats-table th {
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
}
.stats-axis-cell {
  color: var(--accent-cyan-soft);
  font-weight: 600;
}
.stats-total-row {
  font-weight: 700;
  color: var(--accent-amber-hot);
  border-top: 2px solid var(--border-strong);
}
.stats-total-row td { border-bottom: none; }

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-row .input {
  flex: 1;
  min-width: 140px;
}
select.input {
  cursor: pointer;
}

/* ---------- Badges de statut et d'ID (admin + joueur) ---------- */
.question-id-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 8px;
}
.status-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  border-radius: 4px;
  padding: 1px 8px;
}
.status-badge.status-active {
  color: var(--success);
  border: 1px solid var(--success);
}
.status-badge.status-inactive {
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
}
.status-badge.status-deactivated {
  color: var(--accent-amber-hot);
  border: 1px solid var(--accent-amber);
}
.admin-textarea, .admin-input {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 14px;
  padding: 8px 10px;
  width: 100%;
  resize: vertical;
}
.admin-textarea {
  min-height: 90px;
  line-height: 1.5;
}
.admin-textarea.admin-textarea-sm {
  min-height: 44px;
}
.admin-choices-list { display: flex; flex-direction: column; gap: 6px; }
.admin-actions { display: flex; gap: 8px; margin-top: 4px; }
.admin-actions .btn { flex: 1; }
.btn-danger { background: rgba(225,97,93,0.15); color: var(--danger); border: 1px solid var(--danger); }
.btn-success { background: rgba(89,197,138,0.15); color: var(--success); border: 1px solid var(--success); }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
  .channel-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  h1.hero { font-size: 26px; }
}
