/* ═══════════════════════════════════════════════
   COMPONENTS.CSS — Composants réutilisables
   CHAMPION. — Jeu de quiz premium
═══════════════════════════════════════════════ */

/* ────────────────────────────────────────────
   PAGE — Conteneur principal
──────────────────────────────────────────── */
.page {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--page-padding);
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  transition: background .45s, color .45s;
  animation: pageIn var(--duration-normal) var(--ease-out) both;
}

.page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--radial-overlay);
  pointer-events: none;
  z-index: 0;
}

.page::after {
  /* Grain subtil pour un rendu pas plat */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.012) 1px, transparent 0);
  background-size: 3px 3px;
  pointer-events: none;
  z-index: 0;
  opacity: .6;
}

.page > * { position: relative; z-index: 1; }

/* ────────────────────────────────────────────
   HEADER NAVIGATION
──────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 3;
  width: 100%;
  flex-shrink: 0;
  animation: headerIn var(--duration-normal) var(--ease-out) both;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  opacity: .42;
  transition: opacity .2s, transform .2s;
  background: none;
  border: none;
  padding: 8px 4px;
  min-height: 44px;
}

.back-btn:hover { opacity: .9; transform: translateX(-2px); }

.page-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text);
  opacity: .35;
  white-space: nowrap;
}

/* ────────────────────────────────────────────
   BRAND MARK — petit logo en haut des écrans clés
──────────────────────────────────────────── */
.brand {
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.brand::after {
  content: '.';
  color: var(--accent-2);
  font-weight: 900;
}

/* ────────────────────────────────────────────
   CARD — Surfaces principales
──────────────────────────────────────────── */
.card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--elevation-2);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), transparent);
  pointer-events: none;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.card--elevated  { box-shadow: var(--elevation-3); }
.card--glass {
  background: var(--glass);
  border-color: var(--glass-border);
  box-shadow: none;
}

/* ────────────────────────────────────────────
   BOUTONS — hiérarchie en 3 niveaux
──────────────────────────────────────────── */

/* Principal : action décisive d'un écran */
.btn-primary {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-btn);
  padding: 16px 36px;
  background: var(--btn-gradient);
  color: var(--btn-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  min-height: var(--btn-height);
  text-align: center;
  white-space: normal;
  transition: transform .18s var(--ease-out), filter .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--elevation-2);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 55%);
  pointer-events: none;
  border-radius: var(--radius-btn);
}

.btn-primary:hover  { transform: translateY(-2px); filter: brightness(1.1); box-shadow: var(--elevation-3); }
.btn-primary:active { transform: scale(.97); }

/* Secondaire : option alternative */
.btn-secondary {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  padding: 14px 22px;
  background: transparent;
  border: 1.5px solid var(--glass-border);
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
  min-width: 0;
  min-height: var(--btn-height);
  text-align: center;
  white-space: normal;
  transition: transform .15s, background .18s, border-color .18s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover  { background: var(--glass-strong); border-color: var(--text); transform: translateY(-1px); }
.btn-secondary:active { transform: scale(.97); }

/* Tertiaire / ghost */
.btn-ghost {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--sub);
  cursor: pointer;
  min-height: 44px;
  transition: color .15s;
}
.btn-ghost:hover { color: var(--text); }

.btn-full { width: 100%; }

.btn-zone {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 14px;
  width: 100%;
}

/* ────────────────────────────────────────────
   BADGE
──────────────────────────────────────────── */
.badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-badge);
  border: 1px solid transparent;
  white-space: nowrap;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge--success {
  color: var(--color-correct);
  background: rgba(45, 186, 110, .14);
  border-color: rgba(45, 186, 110, .42);
}

.badge--danger {
  color: var(--color-error);
  background: rgba(233, 75, 60, .12);
  border-color: rgba(233, 75, 60, .42);
}

.badge--warning {
  color: var(--color-warning);
  background: rgba(224, 161, 0, .14);
  border-color: rgba(224, 161, 0, .42);
}

.badge--glass {
  color: var(--text);
  background: var(--glass-strong);
  border-color: var(--glass-border);
}

/* ────────────────────────────────────────────
   AVATAR
──────────────────────────────────────────── */
.avatar {
  width: var(--avatar-md);
  height: var(--avatar-md);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(11px, 2.6vw, 14px);
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .42);
  flex-shrink: 0;
  letter-spacing: -0.02em;
  animation: avPop .42s var(--ease-spring) both;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .14);
}

.avatar--lg {
  width: var(--avatar-lg);
  height: var(--avatar-lg);
  font-size: clamp(18px, 4.5vw, 26px);
  border-width: 3px;
}

.avatar--sm {
  width: var(--avatar-sm);
  height: var(--avatar-sm);
  font-size: clamp(9px, 2vw, 12px);
}

/* ────────────────────────────────────────────
   RULE BADGE
──────────────────────────────────────────── */
.rule-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--glass-strong);
  border: 1.5px solid var(--glass-border);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  flex-shrink: 0;
  opacity: 0;
  animation: slideUp .5s var(--ease-out) 1.3s both, floatBadge 2.8s ease-in-out 2s infinite;
  z-index: 3;
  white-space: nowrap;
}

/* ────────────────────────────────────────────
   TIMER CIRCULAIRE SVG
──────────────────────────────────────────── */
.timer-ring {
  width: var(--timer-size);
  height: var(--timer-size);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timer-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.timer-ring__value {
  font-family: var(--font-display);
  font-size: clamp(17px, 4vw, 26px);
  font-weight: 800;
  color: var(--text);
  position: relative;
  z-index: 1;
  transition: color .3s;
  letter-spacing: -0.04em;
}

.timer-ring--urgent .timer-ring__value { color: var(--color-error); }

/* ────────────────────────────────────────────
   PROGRESS DOTS
──────────────────────────────────────────── */
.progress-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.progress-dot {
  height: 4px;
  width: 16px;
  border-radius: 2px;
  background: var(--glass-border);
  transition: all .3s var(--ease-out);
}

.progress-dot--done    { background: var(--sub); opacity: .9; }
.progress-dot--current { background: var(--text); width: 28px !important; opacity: 1; }

/* ────────────────────────────────────────────
   STREAK BADGE
──────────────────────────────────────────── */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.streak-badge .flame {
  animation: streakFlame .7s ease-in-out infinite;
}

/* ────────────────────────────────────────────
   SCORE CHIP
──────────────────────────────────────────── */
.score-chip {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  transition: border-color .3s, transform .2s;
}

.score-chip--buzzable {
  cursor: pointer;
  user-select: none;
}

.score-chip--buzzable:hover {
  transform: translateY(-2px);
}

.score-chip--leader {
  border-color: var(--accent);
}

.score-chip--active {
  border-color: var(--color-correct);
  box-shadow: 0 0 0 2px rgba(61, 200, 122, .18), 0 10px 28px var(--shadow);
  transform: translateY(-2px);
}

.score-chip__top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.score-chip__name {
  font-size: 11px;
  font-weight: 700;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  letter-spacing: 0;
}

.score-chip__value {
  font-family: var(--font-display);
  font-size: clamp(15px, 3vw, 18px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.score-chip__bar-bg {
  height: 3px;
  border-radius: 2px;
  background: var(--glass);
  overflow: hidden;
}

.score-chip__bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width .6s var(--ease-out);
}

.score-chip__live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-correct);
  animation: dotPulse 1.3s ease-in-out infinite;
  flex-shrink: 0;
}

.score-chip__buzz {
  border-radius: var(--radius-full);
  padding: 2px 6px;
  background: var(--color-correct);
  color: #fff;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────
   STEPPER
──────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: flex-start;
  width: calc(100% - 44px);
  margin: 18px 0 0;
  z-index: 4;
}

.stepper__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.stepper__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  background: var(--glass);
  color: var(--sub);
  border: 1.5px solid var(--glass-border);
  transition: all .3s var(--ease-out);
}

.stepper__dot--active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: scale(1.1);
}

.stepper__dot--done {
  background: var(--sub);
  color: #fff;
  border-color: var(--sub);
}

.stepper__label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sub);
  opacity: .42;
  text-align: center;
  white-space: nowrap;
  transition: all .3s;
}

.stepper__label--active,
.stepper__label--done { opacity: .9; color: var(--text); }

.stepper__line {
  flex: 1;
  height: 2px;
  background: var(--glass-border);
  margin-top: 14px;
  border-radius: 1px;
  transition: background .35s;
}

.stepper__line--done { background: var(--sub); }

/* ────────────────────────────────────────────
   TOGGLE iOS
──────────────────────────────────────────── */
.toggle {
  width: 48px;
  height: 28px;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background .3s;
  flex-shrink: 0;
  background: var(--glass-border);
  border: none;
  padding: 0;
}

.toggle--on  { background: var(--color-correct); }
.toggle--off { background: var(--glass-border); }

.toggle__thumb {
  position: absolute;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #fff;
  transition: left .28s var(--ease-spring);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  pointer-events: none;
}

.toggle--on  .toggle__thumb { left: calc(100% - 26px); }
.toggle--off .toggle__thumb { left: 2px; }

/* ────────────────────────────────────────────
   SLIDER
──────────────────────────────────────────── */
.slider-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--glass-border);
  position: relative;
  z-index: 2;
  cursor: pointer;
  touch-action: none;
  /* Zone tactile étendue sans modifier le rendu visuel */
  padding-block: 12px;
  margin-block: -12px;
  box-sizing: content-box;
  background-clip: content-box;
}

.slider-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  pointer-events: none;
}

.slider-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  cursor: grab;
  transition: transform .1s;
}

.slider-thumb:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.2);
}

/* ────────────────────────────────────────────
   ANSWER BUTTONS A / B / C / D
──────────────────────────────────────────── */
.ans-btn {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
  animation: slideUp .4s var(--ease-out) both;
  position: relative;
  overflow: hidden;
  min-height: 60px;
  color: var(--text);
  box-shadow: var(--elevation-1);
}

.ans-btn:not(.ans-btn--disabled):hover  {
  transform: translateY(-2px);
  border-color: var(--text);
  box-shadow: var(--elevation-2);
}
.ans-btn:not(.ans-btn--disabled):active { transform: scale(.98); }
.ans-btn--disabled { cursor: default; pointer-events: none; }

.ans-btn--correct {
  background: var(--color-correct-bg) !important;
  border-color: var(--color-correct) !important;
  box-shadow: 0 0 0 2px rgba(45, 186, 110, .22), var(--elevation-2) !important;
  animation: correctPop .4s ease both !important;
}

.ans-btn--wrong {
  background: var(--color-error-bg) !important;
  border-color: var(--color-error) !important;
  animation: wrongShake .4s ease both !important;
}

.ans-letter {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--glass-strong);
  color: var(--text);
  transition: all .2s;
  letter-spacing: -0.02em;
}

.ans-btn--correct .ans-letter {
  background: var(--color-correct);
  color: #fff;
}

.ans-btn--wrong .ans-letter {
  background: var(--color-error);
  color: #fff;
}

.ans-text {
  font-family: var(--font-body);
  font-size: clamp(14px, 2.6vw, 17px);
  font-weight: 600;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
  color: var(--text);
  transition: color .2s;
  text-wrap: pretty;
}

.ans-check {
  font-size: 18px;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity .2s;
}

.ans-btn--correct .ans-check,
.ans-btn--wrong   .ans-check { opacity: 1; }

.answers-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.answers-row {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* ────────────────────────────────────────────
   BUZZER — Objet de plateau TV
──────────────────────────────────────────── */
.buzzer-base {
  /* Socle (présent via pseudo, optionnel) */
}

.buzzer {
  width: var(--buzzer-size);
  height: var(--buzzer-size);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, #FF5C5C, #C81515 58%, #7A0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  animation: buzzerIdle 2.4s ease-in-out infinite;
  border: 4px solid #4A0606;
  transition: transform .12s;
  flex-shrink: 0;
  box-shadow:
    inset 0 -10px 18px rgba(0, 0, 0, .35),
    inset 0 4px 10px rgba(255, 200, 200, .25),
    0 12px 28px var(--buzzer-glow),
    0 24px 50px rgba(0, 0, 0, .28);
}

.buzzer::before {
  /* Reflet brillant principal */
  content: '';
  position: absolute;
  top: 10%;
  left: 18%;
  width: 36%;
  height: 18%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .1));
  transform: rotate(-22deg);
  pointer-events: none;
  filter: blur(1px);
}

.buzzer::after {
  /* Reflet secondaire en bas */
  content: '';
  position: absolute;
  bottom: 14%;
  right: 22%;
  width: 18%;
  height: 8%;
  border-radius: 50%;
  background: rgba(255, 180, 180, .35);
  filter: blur(2px);
  pointer-events: none;
}

.buzzer:active {
  transform: scale(.92) translateY(5px);
  animation: none;
  box-shadow:
    inset 0 -4px 12px rgba(0, 0, 0, .45),
    0 2px 8px rgba(180, 0, 0, .5);
}

.buzzer--pressed { animation: buzzerGlow .4s ease; }

.buzzer__inner {
  width: calc(var(--buzzer-size) * .76);
  height: calc(var(--buzzer-size) * .76);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, #FF3838, #A50000 70%, #680000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 80, 80, .25);
  box-shadow:
    inset 0 -6px 12px rgba(0, 0, 0, .42),
    inset 0 3px 6px rgba(255, 180, 180, .28);
}

.buzzer__label {
  font-family: var(--font-display);
  font-size: clamp(13px, 3vw, 18px);
  font-weight: 900;
  color: rgba(255, 230, 230, .96);
  letter-spacing: .1em;
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

/* ────────────────────────────────────────────
   COUNTDOWN OVERLAY
──────────────────────────────────────────── */
.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, .25);
}

.countdown-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.countdown-overlay__num {
  font-family: var(--font-display);
  font-size: clamp(96px, 28vw, 200px);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.04em;
  animation: countIn .78s ease both;
  transition: color .3s;
  text-shadow: 0 8px 40px rgba(0, 0, 0, .4);
}

.countdown-overlay__num--go { color: var(--color-correct); }

.countdown-overlay__sub {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
  margin-top: 10px;
}

/* ────────────────────────────────────────────
   STACK (deck de cards menu)
──────────────────────────────────────────── */
.stack {
  position: relative;
  width: clamp(200px, 50vw, 260px);
  height: clamp(240px, 60vw, 320px);
  flex-shrink: 0;
  cursor: pointer;
}

.stack__back,
.stack__mid {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: var(--stack-sub-bg, rgba(155, 142, 199, .80));
  border: 1.5px solid var(--stack-sub-border, rgba(255, 255, 255, .28));
  opacity: 0;
  z-index: 1;
  transition: transform .55s var(--ease-spring), opacity .4s ease, box-shadow .4s ease;
  pointer-events: none;
}

.stack__mid { z-index: 2; }

.stack:hover .stack__back {
  opacity: 1;
  transform: rotate(-22deg) translate(-52px, 30px) scale(.94);
  box-shadow: var(--elevation-3);
}
.stack:hover .stack__mid {
  opacity: 1;
  transform: rotate(18deg) translate(48px, 26px) scale(.94);
  box-shadow: var(--elevation-3);
}
.stack:hover .stack__top {
  transform: translateY(-12px) scale(1.04);
  box-shadow: var(--elevation-4);
}

.stack__top {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: var(--stack-card-bg, #F8F4EA);
  border: 1.5px solid var(--stack-card-border, rgba(255, 255, 255, .50));
  color: var(--stack-card-text, var(--text));
  z-index: 3;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 22px;
  transition: transform .45s var(--ease-spring), box-shadow .4s ease;
  animation: slideUp .55s var(--ease-spring) both;
  box-shadow: var(--elevation-2);
}

.stack__top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  pointer-events: none;
  z-index: 0;
}

/* ────────────────────────────────────────────
   MANCHE HEADER (intros)
──────────────────────────────────────────── */
.manche-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
  flex-shrink: 0;
  padding-bottom: 14px;
  text-align: center;
}

.manche-header__label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--sub);
  animation: subIn var(--duration-normal) ease .1s both;
}

.manche-header__number {
  font-family: var(--font-display);
  font-size: var(--text-giant);
  font-weight: 900;
  line-height: .85;
  color: var(--text);
  letter-spacing: -0.06em;
  text-shadow: 0 8px 36px var(--shadow);
  animation: numIn .8s var(--ease-spring) .16s both;
}

.manche-header__sep {
  height: 3px;
  width: 80px;
  border-radius: 2px;
  background: var(--accent-2);
  animation: lineGrow .58s ease .55s both;
}

.manche-header__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  animation: titleIn var(--duration-normal) ease .72s both;
  opacity: 0;
}

.manche-header__sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sub);
  opacity: 0;
  animation: subIn var(--duration-normal) ease .9s both;
}

/* ────────────────────────────────────────────
   PLAYER ROW
──────────────────────────────────────────── */
.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  opacity: 0;
  animation: playerIn .45s ease both;
  transition: transform .2s;
}

.player-row--eliminated {
  filter: saturate(.5);
  opacity: .7;
}

.player-rank {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  width: 22px;
  text-align: center;
  color: var(--text);
  opacity: .38;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.player-name {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  flex: 1;
}

.player-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sub);
  margin-top: 4px;
}

.player-score {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.03em;
}

/* ────────────────────────────────────────────
   PODIUM — cérémoniel
──────────────────────────────────────────── */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  align-items: end;
  gap: 14px;
  min-height: 360px;
}

.podium__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  animation: podiumRise .8s var(--ease-spring) both;
}

.podium__step:nth-child(1) { animation-delay: .4s; }
.podium__step:nth-child(2) { animation-delay: .1s; }
.podium__step:nth-child(3) { animation-delay: .55s; }

.podium__base {
  width: 100%;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.04em;
  position: relative;
  box-shadow: inset 0 8px 24px var(--shadow-soft);
}

.podium__base::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.15), transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.podium__base--1 {
  height: 160px;
  background: linear-gradient(180deg, var(--accent-2), rgba(201, 102, 58, .35));
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.podium__base--2 { height: 116px; }
.podium__base--3 { height: 88px;  }

/* ────────────────────────────────────────────
   CONFETTIS
──────────────────────────────────────────── */
.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 16px;
  border-radius: 2px;
  animation: confettiFall linear infinite;
}

/* ────────────────────────────────────────────
   SETTINGS
──────────────────────────────────────────── */
.settings-section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sub);
  opacity: .8;
  margin-bottom: 10px;
  padding-left: 4px;
}

.settings-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--elevation-1);
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  position: relative;
  transition: background .15s;
  cursor: pointer;
}

.settings-row:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 1px;
  background: var(--glass-border);
}

.settings-row:hover { background: var(--glass); }

.settings-row__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--glass-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-row__body { flex: 1; }

.settings-row__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}

.settings-row__sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--sub);
  letter-spacing: .04em;
  margin-top: 3px;
}

/* ────────────────────────────────────────────
   STATS GRID (fin de partie)
──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
}

.stat-card__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sub);
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  color: var(--text);
  margin-top: 6px;
  letter-spacing: -0.03em;
}

/* ────────────────────────────────────────────
   VERSUS / DUEL (M3)
──────────────────────────────────────────── */
.versus-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

.vs-center {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 900;
  color: var(--accent-2);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  border: 1.5px solid var(--glass-border);
  letter-spacing: -0.04em;
  animation: popIn .55s var(--ease-spring) 1.25s both;
  align-self: center;
}

.finalist-card {
  padding: 22px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 280px;
  justify-content: center;
}

.finalist-name {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ────────────────────────────────────────────
   LOBBY GRID
──────────────────────────────────────────── */
.lobby-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lobby-code {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: .12em;
  text-align: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  border: 2px dashed var(--glass-border);
  color: var(--text);
}

/* ────────────────────────────────────────────
   FLOATING SCORE
──────────────────────────────────────────── */
.score-float {
  position: absolute;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  pointer-events: none;
  z-index: 10;
  color: var(--color-correct);
  letter-spacing: -0.02em;
  animation: scoreFloat 1s ease-out forwards;
  text-shadow: 0 2px 8px rgba(45, 186, 110, .35);
}
