/* ── 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:    #1DB954;
  --accent-bg: rgba(29,185,84,0.15);
  --gold:      #FFB300;
  --red:       #FF4545;
  --text:      #ffffff;
  --text2:     rgba(255,255,255,0.55);
  --text3:     rgba(255,255,255,0.25);
  --r:         14px;
  --r-sm:      10px;
  --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: 100dvh;
  min-height: 100vh;
  overscroll-behavior: none;
}

/* ── 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;
}

/* ── 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: 100dvh;
  min-height: 100vh;
}
.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(29,185,84,.25) 0%, transparent 70%);
  pointer-events: none;
}

/* Brand */
.welcome-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.welcome-brand h1 { font-size: 2.4rem; font-weight: 900; letter-spacing: -1px; margin: 0; }
.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(29,185,84,.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: 14px 20px 10px;
  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 ───────────────────────────────────── */
#state-question {
  padding: 0 0 calc(12px + var(--safe-b));
  display: flex;
  flex-direction: column;
}

.album-wrap {
  padding: 16px 16px 0;
  flex-shrink: 0;
  position: relative;
}
.album-art {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 20px;
  background: var(--surface);
  display: block;
  aspect-ratio: 1;
  transition: filter .6s ease;
}
.album-art.blurred {
  filter: blur(14px) brightness(0.3) saturate(0.7);
}

/* Equalizer overlay sur pochette */
.eq-overlay {
  position: absolute;
  bottom: 0; left: 20px; right: 20px;
  height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 0 12px 8px;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%);
  border-radius: 0 0 var(--r) var(--r);
  opacity: 0;
  transition: opacity .4s;
}
.eq-overlay.active { opacity: 1; }
.eq-bar {
  width: 4px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  animation: eq-dance 0.8s ease-in-out infinite alternate;
  transform-origin: bottom;
}
.eq-bar:nth-child(1)  { height: 10px; animation-delay: 0s;     animation-duration: 0.7s; }
.eq-bar:nth-child(2)  { height: 22px; animation-delay: 0.1s;   animation-duration: 0.9s; }
.eq-bar:nth-child(3)  { height: 14px; animation-delay: 0.2s;   animation-duration: 0.6s; }
.eq-bar:nth-child(4)  { height: 28px; animation-delay: 0.05s;  animation-duration: 0.8s; }
.eq-bar:nth-child(5)  { height: 18px; animation-delay: 0.15s;  animation-duration: 1.0s; }
.eq-bar:nth-child(6)  { height: 32px; animation-delay: 0.3s;   animation-duration: 0.75s; }
.eq-bar:nth-child(7)  { height: 18px; animation-delay: 0.08s;  animation-duration: 0.85s; }
.eq-bar:nth-child(8)  { height: 26px; animation-delay: 0.22s;  animation-duration: 0.65s; }
.eq-bar:nth-child(9)  { height: 12px; animation-delay: 0.12s;  animation-duration: 0.95s; }
.eq-bar:nth-child(10) { height: 20px; animation-delay: 0.18s;  animation-duration: 0.72s; }
.eq-bar:nth-child(11) { height: 30px; animation-delay: 0.06s;  animation-duration: 0.88s; }
.eq-bar:nth-child(12) { height: 8px;  animation-delay: 0.25s;  animation-duration: 0.78s; }
@keyframes eq-dance {
  from { transform: scaleY(0.25); opacity: .7; }
  to   { transform: scaleY(1);    opacity: 1;  }
}

/* ── Timer roue SVG — positionné sur la pochette ────────── */
.timer-wheel-wrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  z-index: 3;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.6));
}
.timer-wheel {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.tw-bg {
  fill: rgba(0,0,0,0.45);
  stroke: rgba(255,255,255,0.12);
  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.2rem;
  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: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  padding: 0 16px 10px;
  text-align: center;
}

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

.answer-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
  background: rgba(255,255,255,0.055);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  cursor: pointer;
  min-height: 68px;
  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(29,185,84,0.18);
}
.answer-opt.correct-reveal {
  border-color: var(--accent);
  background: rgba(29,185,84,0.18);
  pointer-events: none;
}
.answer-opt.wrong-reveal {
  border-color: var(--red);
  background: rgba(255,69,69,.12);
  pointer-events: none;
}
.answer-opt.disabled { pointer-events: none; opacity: .35; }

.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;
}

/* Particules notes musicales (correct answer) */
.note-particle {
  position: fixed;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 999;
  animation: note-fly 1.2s ease-out forwards;
}
@keyframes note-fly {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(-120px) rotate(25deg) scale(1.4); }
}

/* ── 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: 20px 20px calc(20px + var(--safe-b));
  gap: 16px;
  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: 1rem; font-weight: 600;
  text-align: center; opacity: .85;
  transition: all .5s ease;
}
.result-pts {
  background: var(--accent-bg); color: var(--accent);
  font-weight: 700; font-size: .85rem;
  padding: 5px 16px; border-radius: 24px;
  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 */
.result-anecdote {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: .92rem;
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  line-height: 1.65;
  text-align: center;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .5s ease, transform .5s ease;
}
.result-anecdote--hidden {
  opacity: 0;
  transform: translateY(10px);
  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), #6ee89a);
  border-radius: 2px;
  transition: width 1s linear;
}

/* Loyalty mini */
.loyalty-mini { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.loyalty-mini-bar-bg {
  height: 7px;
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  overflow: hidden;
}
.loyalty-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #6ee89a);
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
#loyalty-mini-label { font-size: 1rem; font-weight: 600; color: var(--text1); text-align: center; letter-spacing: .02em; }

/* ── Barre fidélité sous le header ─────────────────────── */
.loyalty-bar-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px 10px;
  flex-shrink: 0;
}
.loyalty-bar-track {
  flex: 1; height: 3px; background: rgba(255,255,255,.1);
  border-radius: 2px; overflow: hidden;
}
.loyalty-bar-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width .8s ease;
}
.loyalty-bar-label {
  font-size: .65rem; color: var(--text3); white-space: nowrap;
  font-weight: 600;
}

/* ── 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(29,185,84,.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(29,185,84,.08); border: 1px solid rgba(29,185,84,.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: .75rem; font-weight: 600;
  color: var(--text2); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
  padding: 4px 12px; margin-bottom: 6px;
}

/* ── 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; }

.result-limit-toast {
  display: flex; flex-direction: column; gap: 3px;
  background: rgba(29,185,84,.12); border: 1px solid rgba(29,185,84,.3);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 8px;
  text-align: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s ease, transform .4s ease;
}
.result-limit-toast--in { opacity: 1; transform: translateY(0); }
.result-limit-toast strong {
  font-size: .82rem; color: var(--accent); font-weight: 700;
}
.result-limit-toast span {
  font-size: .76rem; color: var(--text2); 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;
}

/* Disque attente */
.waiting-disc {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(#1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  display: flex; align-items: center; justify-content: center;
  animation: spin 6s linear infinite;
  margin-bottom: 8px;
}
.waiting-disc-inner {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid #333;
}

.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(29,185,84,.1); border: 1px solid rgba(29,185,84,.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);
}

/* ══════════════════════════════════════════════════════════
   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; }

/* 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(29,185,84,.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(29,185,84,.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); }
