/* ── Variables ───────────────────────────────────────────── */
:root {
  --bg:        #0a0a0a;
  --surface:   rgba(255,255,255,0.06);
  --surface2:  rgba(255,255,255,0.10);
  --border:    rgba(255,255,255,0.08);
  /* Accent — Acid Lime 2026 */
  --accent:       #C7F94D;
  --accent-rgb:   199,249,77;
  --accent-light: #E4FF8F;
  --accent-bg: rgba(var(--accent-rgb),0.15);
  --gold:      #FFB300;
  --pop:       #FF5C8A;
  --red:       #FF4545;
  --text:      #ffffff;
  --text2:     rgba(255,255,255,0.55);
  --text3:     rgba(255,255,255,0.25);
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r:         18px;
  --r-sm:      12px;
  --r-lg:      24px;
  --safe-b:    env(safe-area-inset-bottom, 20px);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
}

/* ── Typo de marque (titres + chiffres clés) ─────────────── */
h1, h2, h3,
.bmq-wordmark,
.welcome-brand h1,
.reg-top h2,
.success-wrap h2,
.account-pts-big,
.success-pts-badge,
.reward-screen-title {
  font-family: var(--font-display);
  letter-spacing: -.02em;
}

/* ── Background (album art flouté) ───────────────────────── */
.bg {
  position: fixed;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.18) saturate(1.8);
  z-index: 0;
  transition: background-image 1.5s ease;
  pointer-events: none;
}

/* Grille subtile style BeatQuiz */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

/* ── Grain / film noise overlay — tendance 2024-26 ──────── */
.grain-overlay {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain-shift 0.65s steps(1) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-3%, -4%); }
  20%  { transform: translate(-6%,  2%); }
  30%  { transform: translate( 3%, -5%); }
  40%  { transform: translate(-2%,  4%); }
  50%  { transform: translate(-5%,  3%); }
  60%  { transform: translate( 6%,  0%); }
  70%  { transform: translate( 0%,  6%); }
  80%  { transform: translate(-2%,  3%); }
  90%  { transform: translate( 4%,  2%); }
}

/* ── Screen system ───────────────────────────────────────── */
.fade-out {
  opacity: 0 !important;
  transform: translateY(6px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}

.screen {
  display: none;
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
}
.screen.active { display: flex; flex-direction: column; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #000;
  font-size: .95rem;
  font-weight: 700;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  letter-spacing: .2px;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active { opacity: .85; transform: scale(.98); }
.btn-primary:disabled {
  background: rgba(255,255,255,0.1);
  color: var(--text3);
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  padding: 12px 24px;
  background: transparent;
  color: var(--text2);
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-outline:active { border-color: var(--accent); color: var(--accent); }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: .9rem;
  cursor: pointer;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════
   ONBOARDING
══════════════════════════════════════════════════════════ */
#s-welcome, #s-onboarding, #s-login {
  align-items: center;
  justify-content: center;
}

/* ── Welcome screen ──────────────────────────────────────── */
.welcome-wrap {
  position: relative;
  width: 100%; max-width: 420px;
  padding: 0 28px calc(40px + var(--safe-b));
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 28px; flex: 1; justify-content: center;
}

/* ── Welcome top bar ─────────────────────────────────────── */
.welcome-top-bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 0 4px;
}

/* ── Language picker ─────────────────────────────────────── */
.lang-picker {
  display: flex; align-items: center; gap: 0;
}
.lang-picker--welcome {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 4px 6px;
}
.lang-picker--quiz {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 3px 5px;
}
.lang-btn {
  background: none; border: none; cursor: pointer;
  font-size: .8rem; font-weight: 700; color: var(--text3);
  padding: 3px 8px; border-radius: 14px;
  transition: color .2s, background .2s;
  letter-spacing: .5px;
}
.lang-btn.active {
  color: var(--text);
  background: rgba(255,255,255,0.12);
}
.lang-btn:hover:not(.active) { color: var(--text2); }
.lang-sep { color: rgba(255,255,255,0.18); font-size: .7rem; user-select: none; }

/* Hero disc */
.welcome-hero { position: relative; display: flex; justify-content: center; }
.welcome-disc-wrap { position: relative; }
.welcome-disc-glow {
  position: absolute; inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),.25) 0%, transparent 70%);
  pointer-events: none;
}

/* Brand */
.welcome-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.welcome-brand h1 { font-size: 2.4rem; font-weight: 900; letter-spacing: -1px; margin: 0; }

/* BeatMyQuiz wordmark */
.bmq-wordmark {
  display: flex; align-items: center; gap: 10px;
  font-size: 2.6rem; font-weight: 900; letter-spacing: -2px; line-height: 1; font-style: italic;
}
.bmq-icon { height: 48px; width: auto; flex-shrink: 0; }
.bmq-beat { color: #fff; }
.bmq-my {
  background: linear-gradient(100deg, var(--accent) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.bmq-quiz { color: #fff; }

/* Logo du bar (configuré dans branding) */
.venue-logo-wrap { display: flex; justify-content: center; margin-top: 4px; }
.venue-logo { max-height: 56px; max-width: 180px; object-fit: contain; border-radius: 8px; }

.welcome-by {
  font-size: .78rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text3); background: rgba(255,255,255,0.06);
  padding: 3px 10px; border-radius: 20px;
}

/* Pitch */
.welcome-pitch { font-size: 1rem; color: var(--text2); line-height: 1.65; margin: 0; }

/* Steps */
.welcome-steps {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
}
.welcome-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.welcome-step span { font-size: .75rem; color: var(--text2); font-weight: 600; }
.welcome-step-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: rgba(255,255,255,0.08);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
}
.welcome-step-arrow { color: var(--text3); flex-shrink: 0; }

/* CTAs */
.welcome-ctas { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.welcome-btn-login {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  cursor: pointer;
  font-size: .83rem; font-weight: 600; color: var(--text2);
  padding: 7px 16px;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.welcome-btn-login:hover { background: rgba(255,255,255,0.13); color: var(--text); }

.ob-wrap {
  width: 100%;
  max-width: 420px;
  padding: 60px 28px calc(32px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
}

.ob-slide {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}
.ob-slide.hidden { display: none; }

/* Disque vinyle animé */
.ob-visual { display: flex; justify-content: center; margin-bottom: 8px; }
.ob-disc {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: conic-gradient(#1a1a1a 0%, #2a2a2a 25%, #1a1a1a 50%, #2a2a2a 75%, #1a1a1a 100%);
  display: flex; align-items: center; justify-content: center;
  animation: spin 4s linear infinite;
  box-shadow: 0 0 40px rgba(var(--accent-rgb),.3);
}
.ob-disc-inner {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid #333;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ob-wrap h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -.5px; }
.ob-wrap p { color: var(--text2); font-size: 1rem; line-height: 1.7; }

/* Rules */
.ob-rules {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  text-align: left;
}
.ob-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  backdrop-filter: blur(10px);
}
.ob-rule-num {
  min-width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ob-rule strong { display: block; font-size: .95rem; margin-bottom: 2px; }
.ob-rule span { font-size: .82rem; color: var(--text2); }

/* Rewards */
.ob-rewards-title { font-weight: 700; color: var(--text); font-size: 1.3rem; letter-spacing: -.3px; }
.ob-rewards-intro { font-size: .9rem; color: var(--text2); line-height: 1.6; text-align: center; }
.ob-perks { display: flex; flex-direction: column; gap: 12px; width: 100%; text-align: left; }
.ob-perk {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
}
.ob-perk-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ob-perk div { display: flex; flex-direction: column; gap: 2px; }
.ob-perk strong { font-size: .9rem; font-weight: 700; color: var(--text); }
.ob-perk span { font-size: .8rem; color: var(--text2); }
.ob-rewards { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ob-reward {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.ob-reward-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  opacity: .12;
}
.ob-reward-pts { font-weight: 700; font-size: .9rem; min-width: 70px; position: relative; z-index: 1; }
.ob-reward-label { color: var(--text2); font-size: .85rem; position: relative; z-index: 1; }

.ob-footer { display: flex; flex-direction: column; gap: 16px; }
.ob-dots { display: flex; justify-content: center; gap: 6px; }
.ob-dot {
  height: 4px; width: 16px;
  border-radius: 2px;
  background: var(--border);
  transition: width .25s, background .25s;
}
.ob-dot.active { background: var(--accent); width: 28px; }

/* ══════════════════════════════════════════════════════════
   QUIZ MAIN
══════════════════════════════════════════════════════════ */
#s-quiz { flex-direction: column; }

/* ── Sound waves (fond décoratif) ───────────────────────── */
.sound-waves {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.wave {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: wave-expand 3s ease-out infinite;
}
.wave-1 { width: 40px; height: 40px; animation-delay: 0s; }
.wave-2 { width: 40px; height: 40px; animation-delay: 1s; }
.wave-3 { width: 40px; height: 40px; animation-delay: 2s; }
@keyframes wave-expand {
  0%   { width: 20px; height: 20px; opacity: .6; }
  100% { width: 300px; height: 300px; opacity: 0; }
}

/* Header */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 6px;
  flex-shrink: 0;
}
.quiz-remaining {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text2);
}
.quiz-header-right {
  display: flex; align-items: center; gap: 8px;
}
.quiz-pts-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255,179,0,.1);
  padding: 5px 12px;
  border-radius: 20px;
  transition: background .15s;
}
.quiz-pts-badge:active { background: rgba(255,179,0,.18); }
.quiz-pts-badge.user-logged #header-user-icon {
  stroke: var(--accent);
}

/* States */
.quiz-state { flex: 1; display: flex; flex-direction: column; }
.quiz-state.hidden { display: none !important; }
.quiz-state.state-enter {
  animation: stateEnter .3s cubic-bezier(.25,.46,.45,.94) both;
}
@keyframes stateEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── State: Loading ────────────────────────────────────── */
.loading-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px;
}
.loading-disc {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(#222 0%, #333 50%, #222 100%);
  display: flex; align-items: center; justify-content: center;
  animation: spin 3s linear infinite;
}
.loading-disc-inner {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid #333;
}
.loading-wrap p { color: var(--text2); font-size: .9rem; }

/* ── State: Question (plein écran immersif) ────────────── */
#state-question {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.album-art-fs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: blur(14px) brightness(0.35) saturate(0.85);
  transform: scale(1.06);
  transition: filter 1s ease, transform 1s ease;
}
.album-art-fs.revealed {
  filter: blur(0px) brightness(0.88) saturate(1.15);
  transform: scale(1);
}

.album-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.05) 0%,
    rgba(0,0,0,.18) 30%,
    rgba(0,0,0,.62) 58%,
    rgba(0,0,0,.94) 100%
  );
  pointer-events: none;
}

/* Equalizer — dans le panel question, juste au-dessus du texte */
.eq-overlay {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding-bottom: 4px;
  opacity: 0;
  transition: opacity .4s;
}
.eq-overlay.active { opacity: 1; }
.eq-bar {
  width: 4px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  animation: eq-dance 0.8s ease-in-out infinite alternate;
  transform-origin: bottom;
}
.eq-bar:nth-child(1)  { height: 16px; animation-delay: 0s;    animation-duration: 0.7s; }
.eq-bar:nth-child(2)  { height: 34px; animation-delay: 0.1s;  animation-duration: 0.9s; }
.eq-bar:nth-child(3)  { height: 22px; animation-delay: 0.2s;  animation-duration: 0.6s; }
.eq-bar:nth-child(4)  { height: 40px; animation-delay: 0.05s; animation-duration: 0.8s; }
.eq-bar:nth-child(5)  { height: 28px; animation-delay: 0.15s; animation-duration: 1.0s; }
.eq-bar:nth-child(6)  { height: 38px; animation-delay: 0.3s;  animation-duration: 0.75s; }
.eq-bar:nth-child(7)  { height: 26px; animation-delay: 0.08s; animation-duration: 0.85s; }
.eq-bar:nth-child(8)  { height: 36px; animation-delay: 0.22s; animation-duration: 0.65s; }
.eq-bar:nth-child(9)  { height: 18px; animation-delay: 0.12s; animation-duration: 0.95s; }
.eq-bar:nth-child(10) { height: 30px; animation-delay: 0.18s; animation-duration: 0.72s; }
.eq-bar:nth-child(11) { height: 38px; animation-delay: 0.06s; animation-duration: 0.88s; }
.eq-bar:nth-child(12) { height: 12px; animation-delay: 0.25s; animation-duration: 0.78s; }
@keyframes eq-dance {
  from { transform: scaleY(0.2); opacity: .45; }
  to   { transform: scaleY(1);   opacity: 1;   }
}

/* Spacer : laisse exactement cette hauteur d'album art visible au-dessus du contenu */
.album-spacer {
  flex: 0 0 44px;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

/* Wrapper flux : timer + questions empilés, prend tout l'espace restant */
.question-wrap {
  position: relative;
  z-index: 3;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}

/* Panel question + réponses — dans le flux */
.question-panel {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Timer roue SVG — dans le flux, directement au-dessus du panel */
.timer-wheel-wrap {
  position: relative;
  width: 126px; height: 126px;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.7));
  flex-shrink: 0;
  margin-bottom: 6px;
}
.timer-wheel {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}

.tw-bg {
  fill: rgba(0,0,0,0.5);
  stroke: rgba(255,255,255,0.1);
  stroke-width: 7;
}
.tw-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 263.9;
  stroke-dashoffset: 0;
  transition: stroke .4s;
}
.tw-arc.urgent { stroke: var(--red); }
.timer-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.timer-center.pulse {
  animation: timer-pulse .5s ease-in-out infinite alternate;
}
@keyframes timer-pulse {
  from { transform: scale(1);    color: var(--text); }
  to   { transform: scale(1.15); color: var(--red);  }
}

.q-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  padding: 0 14px 8px;
  text-align: center;
  text-shadow: 0 1px 14px rgba(0,0,0,.9);
}

/* Answers — grille 2×2 */
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px calc(10px + var(--safe-b));
  flex: 1;
  align-content: stretch;
}

.answer-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 10px;
  background: rgba(255,255,255,0.055);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  cursor: pointer;
  min-height: 50px;
  transition: border-color .15s, background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.answer-opt:active { transform: scale(0.97); }

/* Ripple effect */
.answer-opt .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transform: scale(0);
  animation: ripple-anim .5s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}
.answer-opt.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb),0.18);
}
.answer-opt.correct-reveal {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb),0.22);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb),.5), 0 0 24px rgba(var(--accent-rgb),.2);
  transform: scale(1.02);
  pointer-events: none;
}
.answer-opt.wrong-reveal {
  border-color: var(--red);
  background: rgba(255,69,69,.15);
  pointer-events: none;
  animation: wrong-shake .4s cubic-bezier(.36,.07,.19,.97);
}
@keyframes wrong-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}
.answer-opt.disabled { pointer-events: none; opacity: .28; }

.answer-text {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.answer-sub {
  font-size: .75rem;
  color: var(--text2);
  margin-top: 3px;
  line-height: 1.2;
}
/* Notes musicales confetti (bonne réponse) */
.note-particle {
  position: fixed;
  pointer-events: none;
  z-index: 1001;
  animation: note-confetti 1.3s ease-out forwards;
}
@keyframes note-confetti {
  0%   { opacity: 1; transform: translateY(0) translateX(0) rotate(0deg) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-150px) translateX(var(--tx,20px)) rotate(var(--rot,30deg)) scale(0.6); }
}

/* Floating +pts */
.float-pts {
  position: fixed;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  pointer-events: none;
  z-index: 1002;
  text-shadow: 0 0 20px rgba(var(--accent-rgb),.6);
  animation: float-pts-anim 1.3s cubic-bezier(.25,.46,.45,.94) forwards;
}
@keyframes float-pts-anim {
  0%   { opacity: 0; transform: translateY(0) scale(0.6); }
  20%  { opacity: 1; transform: translateY(-20px) scale(1.1); }
  80%  { opacity: 1; transform: translateY(-70px) scale(1); }
  100% { opacity: 0; transform: translateY(-100px) scale(0.9); }
}

/* Flash overlay */
.flash-overlay {
  position: fixed; inset: 0;
  z-index: 1000; pointer-events: none;
  opacity: 0;
}
.flash-overlay.flash-correct { animation: flash-correct .55s ease-out forwards; }
.flash-overlay.flash-wrong   { animation: flash-wrong .55s ease-out forwards; }
@keyframes flash-correct {
  0%   { opacity: 0; background: rgba(var(--accent-rgb),.22); }
  30%  { opacity: 1; }
  100% { opacity: 0; background: rgba(var(--accent-rgb),.22); }
}
@keyframes flash-wrong {
  0%   { opacity: 0; background: rgba(255,69,69,.2); }
  30%  { opacity: 1; }
  100% { opacity: 0; background: rgba(255,69,69,.2); }
}

/* Lives dots */
.quiz-slots-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--accent-rgb),.1);
  border: 1px solid rgba(var(--accent-rgb),.25);
  border-radius: 20px;
  padding: 4px 10px 4px 8px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity .3s;
}
.quiz-slots-badge svg { flex-shrink: 0; }
.quiz-slots-badge .slots-used {
  display: flex; gap: 4px; align-items: center;
}
.quiz-slots-badge .slot {
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent);
  transition: background .3s, opacity .3s;
}
.quiz-slots-badge .slot.used {
  background: rgba(255,255,255,.15);
}
.quiz-slots-badge .slots-label {
  color: rgba(255,255,255,.5);
  font-weight: 400;
  font-size: .72rem;
  margin-left: 2px;
}

/* Streak badge */
.streak-badge {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255, 90, 0, .14);
  border: 1px solid rgba(255, 110, 0, .4);
  border-radius: 20px;
  padding: 4px 10px 4px 8px;
  font-size: .78rem; font-weight: 800;
  color: #FF6B00;
}
.streak-flame {
  flex-shrink: 0;
  color: #FF6B00;
  filter: drop-shadow(0 0 4px rgba(255,110,0,.65));
  animation: flame-flicker 0.75s ease-in-out infinite alternate;
}
@keyframes flame-flicker {
  from { transform: scaleY(1)    rotate(-1.5deg); opacity: .88; }
  to   { transform: scaleY(1.12) rotate( 1.5deg); opacity: 1;   }
}
.streak-badge.streak-pop {
  animation: streak-pop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes streak-pop {
  0%   { transform: scale(0.55); }
  100% { transform: scale(1); }
}
.streak-label { font-weight: 500; opacity: .72; }

/* ── State: Result ─────────────────────────────────────── */
.result-cover-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(4px) brightness(0.55) saturate(1.2);
  transform: scale(1.06);
  z-index: 0;
  transition: filter 1.2s ease, transform 1.2s ease;
}
.result-cover-bg--dark {
  filter: blur(32px) brightness(0.22) saturate(1.4);
  transform: scale(1.08);
}
#state-result { position: relative; overflow: hidden; }
.result-wrap {
  position: relative; z-index: 1;
  opacity: 0;
  transition: opacity .6s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px calc(20px + var(--safe-b));
  gap: 14px;
  overflow-y: auto;
}

.result-feedback {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all .5s ease;
  overflow: hidden;
}
.result-feedback--small {
  flex-direction: row; gap: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 20px; padding: 6px 14px;
  align-self: center;
}
.result-feedback--small .result-icon { font-size: 0; margin: 0; }
.result-feedback--small .result-icon > div { width: 22px !important; height: 22px !important; }
.result-feedback--small .result-icon > div svg { width: 13px !important; height: 13px !important; }
.result-feedback--small .result-label { font-size: .78rem; opacity: .7; }
.result-feedback--small .result-pts { font-size: .75rem; padding: 2px 8px; }

.result-icon {
  font-size: 36px; line-height: 1;
  text-align: center; margin-top: 4px;
  transition: all .5s ease;
}
.result-label {
  font-size: .9rem; font-weight: 600;
  text-align: center; opacity: .7;
  letter-spacing: .02em;
  transition: all .5s ease;
}
/* +pts en HERO : gros chiffre lime, c'est le shot de dopamine */
.result-pts {
  background: none; color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700; font-size: 2.7rem; line-height: 1;
  padding: 0; margin-top: 2px; letter-spacing: -.02em;
  text-shadow: 0 0 34px rgba(var(--accent-rgb),.4);
  transition: all .5s ease;
}

/* Track reveal */
.track-reveal {
  width: 100%;
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  backdrop-filter: blur(10px);
}
.track-reveal-art {
  width: 60px; height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}
.track-reveal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.track-reveal-info strong {
  font-size: .95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-reveal-info span {
  font-size: .82rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-year { font-size: .75rem !important; color: var(--text3) !important; }

/* Correct answer reveal */
.result-correct-wrap {
  width: 100%;
  background: rgba(255,179,0,.08);
  border: 1px solid rgba(255,179,0,.2);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  text-align: center;
}
.result-correct-label { font-size: .78rem; color: var(--text2); margin-bottom: 4px; }
.result-correct-answer { font-weight: 700; color: var(--gold); font-size: .95rem; }

/* Anecdote résultat — dé-encadrée, filet lime, reveal blur-in (2026) */
.result-anecdote {
  width: 100%;
  background: none;
  border: none;
  border-left: 2px solid rgba(var(--accent-rgb),.55);
  border-radius: 0;
  padding: 3px 0 3px 16px;
  font-size: .9rem;
  font-style: italic;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  line-height: 1.6;
  text-align: left;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: opacity .6s ease, transform .6s ease, filter .6s ease;
}
.result-anecdote--hidden {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  pointer-events: none;
}

/* Footer result */
.result-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

/* Next question countdown */
.next-q-wrap { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.next-q-label { font-size: .78rem; color: var(--text2); text-align: center; }
.next-q-bar-bg {
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
}
.next-q-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  transition: width 1s linear;
}

/* ── Barre fidélité sous le header ─────────────────────── */
.loyalty-bar-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 20px 12px;
  flex-shrink: 0;
}
.loyalty-bar-track {
  flex: 1; height: 6px; background: rgba(255,255,255,.1);
  border-radius: 3px; overflow: visible;
  position: relative;
}
.loyalty-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #FFB300 100%);
  border-radius: 3px;
  transition: width .9s cubic-bezier(.4,0,.2,1);
  position: relative; z-index: 1;
}
.loyalty-marker {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.25);
  z-index: 2;
  transition: background .4s, border-color .4s, box-shadow .4s;
}
.loyalty-marker.unlocked {
  background: #FFB300;
  border-color: #FFB300;
  box-shadow: 0 0 7px rgba(255,179,0,.55);
}
.loyalty-bar-label {
  font-size: .65rem; color: var(--text3); white-space: nowrap;
  font-weight: 700; min-width: 36px; text-align: right;
}

/* ── Modal save CTA ─────────────────────────────────────── */
.save-cta-box {
  text-align: center; padding: 32px 24px 24px;
}
.save-cta-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,179,0,.12); border: 1.5px solid rgba(255,179,0,.4);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.save-cta-title {
  font-size: 1.15rem; font-weight: 800; margin: 0 0 8px;
}
.save-cta-sub {
  font-size: .82rem; color: var(--text2); line-height: 1.6; margin: 0 0 16px;
}
.save-cta-pts-preview {
  font-size: .78rem; color: var(--accent); font-weight: 700;
  margin-bottom: 18px;
}
.save-cta-skip {
  background: none; border: none; color: var(--text3);
  font-size: .78rem; cursor: pointer; padding: 6px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ── Reward enjoy screen ────────────────────────────────── */
.reward-enjoy-wrap {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 40px 24px;
}
.reward-enjoy-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(var(--accent-rgb),.15); border: 2px solid var(--accent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  animation: enjoyPop .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes enjoyPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.reward-enjoy-title {
  font-size: 1.6rem; font-weight: 800; margin: 0 0 8px;
}
.reward-enjoy-sub {
  font-size: 1rem; font-weight: 600; color: var(--accent); margin: 0 0 10px;
}
.reward-enjoy-hint {
  font-size: .85rem; color: var(--text2); line-height: 1.6; margin: 0 0 20px;
}
.reward-enjoy-pts {
  background: rgba(255,179,0,.1); border: 1px solid rgba(255,179,0,.25);
  border-radius: 12px; padding: 10px 20px;
  font-size: .85rem; color: var(--text2);
}
.reward-enjoy-pts strong { color: var(--gold); font-size: 1rem; }

/* ── Waiting comeback ───────────────────────────────────── */
.waiting-comeback {
  background: rgba(var(--accent-rgb),.08); border: 1px solid rgba(var(--accent-rgb),.2);
  border-radius: 16px; padding: 16px; margin-bottom: 20px; text-align: center;
}
.waiting-comeback-icon {
  color: var(--accent); margin-bottom: 8px;
  display: flex; justify-content: center;
}
.waiting-comeback-title {
  font-size: .95rem; font-weight: 700; margin: 0 0 6px;
}
.waiting-comeback-sub {
  font-size: .78rem; color: var(--text2); line-height: 1.6; margin: 0;
}
.waiting-comeback-sub strong { color: var(--gold); }

.result-fun-badge {
  text-align: center; font-size: .74rem; font-weight: 600;
  color: var(--text3); background: none;
  border: none; border-radius: 0;
  padding: 2px 0; margin-bottom: 0;
}

.btn-leaderboard {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 11px 16px;
  background: rgba(255,179,0,.08); border: 1px solid rgba(255,179,0,.25);
  border-radius: var(--r-sm); color: var(--gold);
  font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: background .18s, border-color .18s;
  margin-bottom: 8px;
}
.btn-leaderboard:active { background: rgba(255,179,0,.16); }

/* ── Leaderboard — style arcade terminal ─────────────────── */
.lb-arc-wrap {
  background: #030d03;
  border: 1px solid rgba(var(--accent-rgb),.3);
  border-radius: 4px;
  padding: 20px 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(var(--accent-rgb),.12), inset 0 0 40px rgba(0,0,0,.6);
}
/* Scanlines subtiles */
.lb-arc-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 3px,
    rgba(0,0,0,.10) 3px, rgba(0,0,0,.10) 4px
  );
  pointer-events: none;
  z-index: 5;
}
.lb-arc-header { text-align: center; margin-bottom: 20px; }
.lb-arc-title {
  font-family: 'Press Start 2P', monospace;
  font-size: .6rem;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(var(--accent-rgb),.9), 0 0 18px rgba(var(--accent-rgb),.4);
  letter-spacing: .14em;
  margin-bottom: 10px;
  animation: arc-blink 3s steps(1) infinite;
}
.lb-arc-sub {
  font-family: 'Press Start 2P', monospace;
  font-size: .38rem;
  color: rgba(var(--accent-rgb),.4);
  letter-spacing: .1em;
}
.lb-arc-list { display: flex; flex-direction: column; }
.lb-arc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(var(--accent-rgb),.08);
  font-family: 'Press Start 2P', monospace;
}
.lb-arc-rank { font-size: .42rem; color: rgba(var(--accent-rgb),.4); min-width: 28px; flex-shrink: 0; }
.lb-arc-name {
  flex: 1;
  font-size: .48rem;
  color: var(--accent);
  text-shadow: 0 0 5px rgba(var(--accent-rgb),.45);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: .04em;
}
.lb-arc-score { font-size: .42rem; color: rgba(var(--accent-rgb),.65); flex-shrink: 0; letter-spacing: .06em; }

/* Rank 1 — lueur dorée */
.lb-arc-row--1 .lb-arc-rank  { color: rgba(255,215,0,.55); }
.lb-arc-row--1 .lb-arc-name  { color: #FFD700; text-shadow: 0 0 8px rgba(255,215,0,.7), 0 0 18px rgba(255,215,0,.3); animation: arc-blink-gold 2s steps(1) infinite; }
.lb-arc-row--1 .lb-arc-score { color: rgba(255,215,0,.75); }

/* Ranks 2-3 — vert clair */
.lb-arc-row--2 .lb-arc-name,
.lb-arc-row--3 .lb-arc-name  { color: #7fffa0; text-shadow: 0 0 5px rgba(127,255,160,.4); }
.lb-arc-row--2 .lb-arc-score,
.lb-arc-row--3 .lb-arc-score { color: rgba(127,255,160,.65); }

/* Ma position */
.lb-arc-row--me .lb-arc-name  { color: #fff; text-shadow: 0 0 5px rgba(255,255,255,.35); }
.lb-arc-row--me .lb-arc-score { color: rgba(255,255,255,.55); }
.lb-arc-me-tag { font-size: .32rem; color: rgba(255,255,255,.3); margin-left: 5px; }

.lb-arc-sep {
  font-family: 'Press Start 2P', monospace;
  font-size: .28rem;
  color: rgba(var(--accent-rgb),.18);
  text-align: center;
  padding: 7px 0;
  letter-spacing: .1em;
}
.lb-arc-footer {
  font-family: 'Press Start 2P', monospace;
  font-size: .36rem;
  color: rgba(var(--accent-rgb),.28);
  text-align: center;
  margin-top: 18px;
  letter-spacing: .1em;
  animation: arc-blink 1.4s steps(1) infinite;
}
.lb-arc-empty {
  font-family: 'Press Start 2P', monospace;
  font-size: .44rem;
  color: rgba(var(--accent-rgb),.4);
  text-align: center;
  padding: 24px 0;
  line-height: 2.4;
}
@keyframes arc-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes arc-blink-gold {
  0%, 79% { opacity: 1; }
  80%, 100% { opacity: .6; }
}
.lb-loading { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text2); font-size: .85rem; padding: 28px 0; }
.lb-empty { text-align: center; color: var(--text2); font-size: .88rem; padding: 20px 0; line-height: 1.6; }

/* ── Resume overlay (retour veille téléphone) ─── */
.resume-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  border-radius: var(--r);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.resume-overlay.hidden { display: none; }
.resume-card {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  max-width: 260px;
  width: 90%;
}
.resume-icon { font-size: 2rem; margin-bottom: 10px; }
.play-overlay-icon { width: 64px; height: 64px; margin: 0 auto 14px; }
.play-overlay-icon svg { width: 100%; height: 100%; }
.resume-label { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
.resume-track { font-size: .82rem; color: var(--text2); margin: 0 0 4px; }
.resume-timer { font-size: .78rem; color: var(--gold); font-weight: 600; margin: 0 0 12px; }

/* Quota atteint — ligne discrète au lieu d'un gros bloc */
.result-limit-toast {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: none;
  padding: 4px 0; margin-bottom: 2px;
  text-align: center;
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.result-limit-toast--in { opacity: 1; transform: translateY(0); }
.result-limit-toast strong {
  font-size: .8rem; color: var(--accent); font-weight: 700; opacity: .9;
}
.result-limit-toast span {
  font-size: .72rem; color: var(--text3); line-height: 1.4;
}

.result-waiting {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: .8rem; color: var(--text2); text-align: center;
}
.result-waiting-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  animation: waitingPulse 1.8s ease-in-out infinite;
}
@keyframes waitingPulse {
  0%, 100% { opacity: .3; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
.result-actions { display: flex; justify-content: center; }
#btn-save-pts {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 28px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(110,232,154,.25);
}

/* ── State: Waiting ────────────────────────────────────── */
#state-waiting { position: relative; overflow: hidden; }
.waiting-wrap, .limit-wrap {
  position: relative; z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 28px calc(40px + var(--safe-b));
  text-align: center;
}

/* Attente — waveform compacte "now playing" (remplace le vinyle) */
.waiting-eq {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 4px; height: 40px; margin-bottom: 6px;
}
.waiting-eq span {
  display: block; width: 4px; border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  box-shadow: 0 0 8px rgba(var(--accent-rgb),.4);
  animation: eq-dance 1s ease-in-out infinite alternate;
}
.waiting-eq span:nth-child(1) { height: 14px; animation-delay: 0s;   }
.waiting-eq span:nth-child(2) { height: 26px; animation-delay: .15s; }
.waiting-eq span:nth-child(3) { height: 38px; animation-delay: .30s; }
.waiting-eq span:nth-child(4) { height: 20px; animation-delay: .45s; }
.waiting-eq span:nth-child(5) { height: 32px; animation-delay: .20s; }
.waiting-eq span:nth-child(6) { height: 24px; animation-delay: .35s; }
.waiting-eq span:nth-child(7) { height: 16px; animation-delay: .05s; }

.waiting-wrap h3, .limit-wrap h3 { font-size: 1.3rem; font-weight: 700; }
.waiting-wrap p, .limit-wrap p { color: var(--text2); font-size: .9rem; line-height: 1.6; }

/* Carte track en cours */
.waiting-track-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 12px 14px;
  animation: fadeIn .4s ease;
}
.waiting-track-art {
  width: 52px; height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1e1e1e;
}
.waiting-track-info {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1; min-width: 0;
}
.waiting-track-title {
  font-size: .9rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.waiting-track-artist {
  font-size: .78rem; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.waiting-track-pulse {
  display: flex; align-items: flex-end; gap: 3px; flex-shrink: 0; height: 20px;
}
.waiting-track-pulse span {
  display: block; width: 3px; border-radius: 2px;
  background: var(--accent);
  animation: eq-dance .9s ease-in-out infinite alternate;
}
.waiting-track-pulse span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.waiting-track-pulse span:nth-child(2) { height: 16px; animation-delay: .2s; }
.waiting-track-pulse span:nth-child(3) { height: 11px; animation-delay: .4s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.waiting-pts {
  background: rgba(255,179,0,.1);
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 10px 28px;
  border-radius: 24px;
}

/* Anecdote en attente */
.waiting-anecdote {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 16px 18px;
  min-height: 52px;
  display: flex; align-items: center; justify-content: center;
}
.anecdote-loader { display: flex; gap: 6px; align-items: center; }
.anecdote-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: anecdotePulse 1.2s ease-in-out infinite;
}
.anecdote-dot:nth-child(2) { animation-delay: .2s; }
.anecdote-dot:nth-child(3) { animation-delay: .4s; }
@keyframes anecdotePulse {
  0%, 100% { opacity: .3; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
.anecdote-text {
  display: flex; gap: 10px; align-items: flex-start;
  color: var(--text); font-size: .95rem; line-height: 1.65;
  font-style: italic; font-weight: 500;
}

.limit-icon { color: var(--text2); margin-bottom: 8px; }

/* ── State: WiFi requis ─────────────────────────────────── */
.wifi-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; padding: 32px 24px; text-align: center;
}
.wifi-icon {
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(var(--accent-rgb),.1); border: 1px solid rgba(var(--accent-rgb),.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.wifi-wrap h3 { font-size: 1.2rem; font-weight: 700; }
.wifi-wrap p { color: var(--text2); font-size: .9rem; line-height: 1.65; max-width: 280px; }
#wifi-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.06); border-radius: 16px; padding: 14px;
}
.wifi-network {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px; padding: 8px 18px;
  font-size: .88rem; font-weight: 600; color: var(--text);
}
.wifi-ssid-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(var(--accent-rgb),.08);
  border: 1.5px solid rgba(var(--accent-rgb),.35);
  border-radius: 14px; padding: 12px 20px;
  color: var(--accent); width: 100%; justify-content: center;
}

/* ══════════════════════════════════════════════════════════
   INSCRIPTION
══════════════════════════════════════════════════════════ */
#s-register {
  justify-content: center;
  align-items: center;
}
.reg-wrap {
  max-width: 420px;
  width: 100%;
  padding: 28px 24px calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.reg-top { text-align: center; }
.reg-top h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.reg-top p { color: var(--text2); font-size: .9rem; line-height: 1.6; }
.reg-top strong { color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .8rem; font-weight: 600; color: var(--text2); }
.field input {
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
  backdrop-filter: blur(10px);
  -webkit-appearance: none;
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--text3); }

#reg-form { display: flex; flex-direction: column; gap: 12px; }

.reg-note { font-size: .75rem; color: var(--text3); text-align: center; line-height: 1.5; }

.forgot-pin-link {
  display: block; width: 100%; background: none; border: none;
  color: var(--text3); font-size: .8rem; text-align: center;
  margin-top: 10px; cursor: pointer; text-decoration: underline;
  padding: 4px; font-family: inherit;
}
.forgot-pin-link:hover { color: var(--text2); }

.forgot-pin-success {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 6px; margin-top: 24px;
}
.forgot-pin-success p { color: var(--text); font-size: .95rem; margin: 0; }

/* Social buttons */
.social-section { display: flex; flex-direction: column; gap: 10px; }

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.social-btn:active { opacity: .8; transform: scale(.98); }

/* Google button — conteneur pour le rendu natif Google */
.google-btn {
  background: transparent;
  border: none;
  padding: 4px 0;
  min-height: 52px;
}
/* Iframe Google centrée */
.google-btn iframe { border-radius: 8px !important; }

.apple-btn {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
}

/* PIN input */
.pin-wrap {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 4px;
}
.pin-digit {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  caret-color: var(--accent);
  outline: none;
  transition: border-color .15s;
  /* Cacher les flèches number input */
  -moz-appearance: textfield;
}
.pin-digit::-webkit-outer-spin-button,
.pin-digit::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pin-digit:focus { border-color: var(--accent); }
.pin-digit.filled { border-color: rgba(var(--accent-rgb),.4); }
.social-notice {
  text-align: center;
  font-size: .8rem;
  color: var(--text3);
  padding: 8px;
}

/* Separator */
.reg-sep {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reg-sep span {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.reg-sep p {
  font-size: .78rem;
  color: var(--text3);
  white-space: nowrap;
}

/* Pseudo input */
.pseudo-input-wrap { position: relative; display: flex; gap: 8px; }
.pseudo-input-wrap input { flex: 1; }
.btn-suggest {
  width: 46px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-suggest:hover { border-color: var(--accent); color: var(--accent); }

/* Pseudo feedback */
.field-feedback {
  font-size: .78rem;
  margin-top: 4px;
  min-height: 16px;
  transition: color .2s;
}
.field-feedback.ok { color: var(--accent); }
.field-feedback.err { color: var(--red); }

/* ══════════════════════════════════════════════════════════
   RÉCOMPENSE / QR CODE
══════════════════════════════════════════════════════════ */
#s-reward { align-items: center; justify-content: center; }
.reward-wrap {
  width: 100%; max-width: 420px;
  padding: 60px 28px calc(40px + var(--safe-b));
  display: flex; flex-direction: column;
}
.reward-screen-title { text-align: center; margin-bottom: 4px; }

/* Roue de points */
.pts-wheel-wrap { display: flex; justify-content: center; margin: 16px 0 20px; }

/* Paliers */
.reward-tiers { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.reward-tier-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.06);
}
.reward-tier-row.unlocked { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); }
.reward-tier-row.is-next { border-color: var(--gold); background: rgba(255,179,0,0.06); }
.reward-tier-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.reward-tier-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.reward-tier-label { font-size: .9rem; font-weight: 600; color: var(--text); }
.reward-tier-pts { font-size: .78rem; font-weight: 700; }
.reward-tier-use {
  background: var(--gold); color: #000; border: none;
  border-radius: 10px; padding: 7px 14px;
  font-size: .82rem; font-weight: 800; cursor: pointer;
  flex-shrink: 0; white-space: nowrap;
}
.reward-tier-use:hover { background: #ffc930; }
.reward-tier-locked { font-size: .78rem; color: var(--text3); text-align: right; white-space: nowrap; flex-shrink: 0; }

/* Bouton CGV */
.reward-cgv-btn {
  display: flex; align-items: center; gap: 7px;
  margin-top: 20px; padding: 0;
  background: none; border: none; cursor: pointer;
  font-size: .78rem; color: var(--text3);
  text-decoration: underline; text-underline-offset: 3px;
  align-self: center;
}
.reward-cgv-btn:hover { color: var(--text2); }

/* Modale générique */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none; }
.modal-box {
  width: 100%; max-width: 480px;
  background: #1a1a2e;
  border-radius: 24px 24px 0 0;
  padding: 24px 24px calc(24px + var(--safe-b));
  display: flex; flex-direction: column;
  max-height: 85vh;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-shrink: 0;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.modal-close {
  background: rgba(255,255,255,0.08); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); flex-shrink: 0;
}
.modal-body {
  overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 18px;
  padding-right: 4px;
}
/* ── Modal centré ───────────────────────────────────────── */
.modal-overlay--center {
  align-items: center;
}
.modal-overlay--center .modal-box {
  border-radius: 24px;
  max-width: 360px;
  width: calc(100% - 40px);
}

/* ── Modal compte ───────────────────────────────────────── */
.account-modal-box {
  position: relative;
  text-align: center;
  padding-top: 28px;
}
.account-modal-box .modal-close {
  position: absolute; top: 14px; right: 14px;
}
.account-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(var(--accent-rgb),.15); border: 2px solid var(--accent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.account-avatar.guest {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.2);
  color: var(--text2);
}
.account-name {
  font-size: 1rem; font-weight: 700; margin: 0 0 2px;
}
.account-email {
  font-size: .75rem; color: var(--text2); margin: 0 0 12px;
}
.account-pts-big {
  font-size: 2rem; font-weight: 800; color: var(--gold); line-height: 1;
}
.account-pts-label {
  font-size: .72rem; color: var(--text2); margin-bottom: 14px; display: block;
}
.account-next-reward {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.05); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px;
  font-size: .78rem;
}
.account-next-reward-label { color: var(--text2); }
.account-next-reward-pts { font-weight: 700; color: var(--accent); }
.account-progress-bar {
  width: 100%; height: 4px; background: rgba(255,255,255,.1);
  border-radius: 2px; margin-bottom: 16px; overflow: hidden;
}
.account-progress-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width .6s ease;
}
.account-daily-row {
  font-size: .73rem; color: var(--text3); margin-bottom: 16px;
}
.account-separator {
  border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 0 0 14px;
}

.cgv-section {
  display: flex; gap: 14px; align-items: flex-start;
}
.cgv-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.cgv-section strong { display: block; font-size: .88rem; color: var(--text); margin-bottom: 4px; }
.cgv-section p { font-size: .8rem; color: var(--text3); line-height: 1.6; margin: 0; }

.qr-container {
  display: flex; justify-content: center; margin: 20px 0;
  background: #fff; border-radius: 16px; padding: 16px;
}
.qr-img { width: 220px; height: 220px; display: block; }
.reward-qr-hint {
  text-align: center; font-size: .82rem; color: var(--text2); line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════
   SUCCÈS
══════════════════════════════════════════════════════════ */
#s-success {
  justify-content: center;
  align-items: center;
}
.success-wrap {
  max-width: 420px;
  width: 100%;
  padding: 48px 28px calc(40px + var(--safe-b));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.success-check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 8px;
}
.success-wrap h2 { font-size: 1.6rem; font-weight: 800; }
.success-wrap p { color: var(--text2); font-size: .9rem; }
.success-pts-badge {
  background: rgba(255,179,0,.1);
  color: var(--gold);
  font-weight: 700;
  font-size: 1.3rem;
  padding: 12px 32px;
  border-radius: 24px;
  margin: 8px 0;
}
.success-wrap .btn-primary { margin-top: 8px; }

/* ══════════════════════════════════════════════════════════
   LOADER
══════════════════════════════════════════════════════════ */
.loader {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.loader-ring {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ── Footer légal ────────────────────────────────────────── */
.app-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 20px calc(14px + var(--safe-b));
  font-size: .72rem;
  color: var(--text3);
  text-align: center;
  border-top: 1px solid var(--border);
}
.app-footer a {
  color: var(--text2);
  text-decoration: none;
}
.app-footer a:hover { color: var(--accent); }
.footer-sep { color: var(--text3); }

/* ══ ÉCRAN CLASSEMENT (CE SOIR & CE MOIS) ════════════════════ */
#s-tonight { background: var(--bg, #080808); }

.tn-wrap {
  display: flex; flex-direction: column;
  height: 100%; padding: 0;
  overflow: hidden;
}

/* Header */
.tn-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0; gap: 8px;
}
.tn-live-badge {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,50,50,.12); border: 1px solid rgba(255,50,50,.3);
  border-radius: 20px; padding: 4px 10px;
  font-size: .62rem; font-weight: 800; letter-spacing: .1em; color: #ff4444;
}
.tn-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ff4444;
  animation: tn-pulse 1.2s ease-in-out infinite;
}
@keyframes tn-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.7); }
}

/* Loader */
.tn-loader {
  flex: 1; display: flex; align-items: center; justify-content: center;
}

/* Content */
.tn-content {
  flex: 1; display: flex; flex-direction: column;
  overflow-y: auto; padding: 20px 16px 0;
  gap: 0;
}

/* ══ DESIGN-1 — MINIMAL CLEAN (CE SOIR & CE MOIS) ════════════ */
.lb-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-shrink: 0;
}
.lb-title { font-size: .95rem; font-weight: 800; color: #fff; }
.lb-sub { font-size: .7rem; color: rgba(255,255,255,.35); margin-top: 2px; }

.lb-list { display: flex; flex-direction: column; }

.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.04);
}
.lb-row:last-child { border-bottom: none; }

.lb-row--me {
  background: rgba(var(--accent-rgb),.07);
  border-radius: 10px;
  padding: 9px 10px;
  margin: 3px -10px;
  border-bottom: none !important;
  border: 1px solid rgba(var(--accent-rgb),.18);
}

.lb-rank {
  font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.3);
  width: 20px; text-align: center; flex-shrink: 0;
}
.lb-rank--1 { color: #FFD700; }
.lb-rank--2 { color: #aab4c8; }
.lb-rank--3 { color: #b07a50; }

.lb-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .64rem; font-weight: 800;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.45);
}
.lb-avatar--me { background: rgba(var(--accent-rgb),.18); color: var(--accent); }

.lb-name {
  flex: 1; font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-row--me .lb-name { color: var(--accent); font-weight: 700; }

.lb-you { font-size: .62rem; color: rgba(var(--accent-rgb),.65); margin-left: 4px; font-weight: 600; }

.lb-score {
  font-size: .78rem; font-weight: 800; color: rgba(255,255,255,.45);
  white-space: nowrap; flex-shrink: 0;
}
.lb-row--me .lb-score { color: var(--accent); }

.lb-sep {
  text-align: center; color: rgba(255,255,255,.12);
  font-size: .68rem; padding: 6px 0; letter-spacing: .06em;
}

/* Footer */
.tn-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px 16px;
  flex-shrink: 0;
}
.tn-players-count { font-size: .72rem; color: rgba(255,255,255,.35); }
.tn-refresh-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.4); font-size: .7rem; font-weight: 600;
  padding: 5px 10px; border-radius: 20px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.tn-refresh-btn:hover { border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.7); }
.tn-refresh-btn svg { flex-shrink: 0; }

/* Empty state */
.tn-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 32px 24px;
  color: rgba(255,255,255,.4); font-size: .9rem;
}

/* ══ BTN-A — SNIPPET CONTEXTUEL RÉSULTAT ══════════════════════ */
.result-ranking-snippet {
  cursor: pointer; margin: 2px 0 6px;
  transition: opacity .5s ease, transform .5s ease;
}
.result-ranking-snippet--hidden { opacity: 0; transform: translateY(5px); pointer-events: none; }
.result-ranking-snippet:active { opacity: .75; }

.rsb-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px; gap: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
}
.rsb-wrap:hover { background: rgba(255,255,255,.08); }

.rsb-left { display: flex; align-items: center; gap: 10px; }

.rsb-rank-circle {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb),.1); border: 1.5px solid rgba(var(--accent-rgb),.3);
  font-size: .88rem; font-weight: 900; color: var(--accent);
}
.rsb-rank-circle--guest {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.4);
}

.rsb-text { display: flex; flex-direction: column; gap: 3px; }
.rsb-label { font-size: .84rem; font-weight: 700; color: #fff; }
.rsb-sub   { font-size: .7rem; color: rgba(255,255,255,.4); }

.rsb-arrow { color: rgba(255,255,255,.25); flex-shrink: 0; }

/* ══ TABS DANS #s-tonight ══════════════════════════════════════ */
.tn-back-btn {
  background: none; border: none; color: rgba(255,255,255,.5);
  display: flex; align-items: center; padding: 4px; cursor: pointer;
  border-radius: 8px; transition: color .2s;
}
.tn-back-btn:hover { color: #fff; }

.tn-tabs {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.06); border-radius: 20px; padding: 3px;
}
.tn-tab {
  display: flex; align-items: center; gap: 5px;
  font-size: .62rem; font-weight: 800; letter-spacing: .1em;
  color: rgba(255,255,255,.35); padding: 6px 12px; border-radius: 16px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: color .2s, background .2s;
}
.tn-tab svg { flex-shrink: 0; }
.tn-tab--active {
  background: rgba(255,255,255,.1); color: #fff;
}

