:root {
  --bg: #0b1a20;
  --accent: #20e3a2;
  --amber: #f2b84b;
  --text: #f5f7f6;
  --text-secondary: #9fb8b0;
  --chroma: #FF00FF;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
  background: var(--chroma);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  /* Tout le layout est calculé en px pour 1920×1080.
     On scale l'ensemble pour s'adapter à la taille réelle de la Browser Source. */
  --scale: 1;
  transform-origin: top left;
  transform: scale(var(--scale));
  width: 1920px;
  height: 1080px;
}

/* ── Watermark unique, niveau écran ── */
.screen-watermark {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 100;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.screen-watermark.visible {
  opacity: 0.65;
}

/* ── Transitions entrée/sortie ── */
.overlay-panel {
  position: absolute;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.overlay-panel.visible {
  opacity: 1;
}

/* ══════════════════════════════════════
   Template 1 — Maintenant sur scène
══════════════════════════════════════ */
#tpl-now {
  bottom: 48px;
  left: 0;
  max-width: 520px;
  background: rgba(11, 26, 32, 0.85);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 20px 28px 20px 24px;
  transform: translateX(-24px);
}

#tpl-now.visible {
  transform: translateX(0);
}

#tpl-now .artist-name {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
}

#tpl-now .role-badge {
  display: inline-block;
  background: var(--accent);
  color: #0b1a20;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ══════════════════════════════════════
   Template 2 — À suivre
══════════════════════════════════════ */
#tpl-next {
  top: 48px;
  right: 48px;
  width: 280px;
  background: rgba(11, 26, 32, 0.85);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  transform: translateY(-16px);
}

#tpl-next.visible {
  transform: translateY(0);
}

#tpl-next .next-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

#tpl-next .next-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

#tpl-next .next-role {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ══════════════════════════════════════
   Template 3 — Partenaires
══════════════════════════════════════ */
#tpl-sponsors {
  bottom: 0;
  left: 0;
  right: 0;
  height: 96px;
  background: rgba(11, 26, 32, 0.92);
  border-top: 1px solid rgba(32, 227, 162, 0.3);
  display: flex;
  align-items: center;
  padding: 0 48px;
  gap: 48px;
  transform: translateY(16px);
}

#tpl-sponsors.visible {
  transform: translateY(0);
}

#tpl-sponsors .sponsors-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

#tpl-sponsors .sponsors-logos {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
}

#tpl-sponsors .sponsors-logos img {
  max-height: 52px;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.9;
}

#tpl-sponsors .sponsors-logos .sponsor-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

/* ══════════════════════════════════════
   Template 4 — Compte à rebours
══════════════════════════════════════ */
#tpl-countdown {
  inset: 0;
  background:
    linear-gradient(rgba(11, 26, 32, 0.45), rgba(11, 26, 32, 0.45)),
    url('/logos/bg_countdown.png') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

#tpl-countdown .countdown-logo {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 24px rgba(32, 227, 162, 0.25));
}

#tpl-countdown .countdown-display {
  font-size: 120px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

#tpl-countdown .countdown-display.urgent {
  color: var(--amber);
}

#tpl-countdown .go-text {
  font-size: 80px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
  display: none;
}

/* ══════════════════════════════════════
   Template 5 — Écran de fin
══════════════════════════════════════ */
#tpl-end {
  inset: 0;
  background:
    linear-gradient(rgba(11, 26, 32, 0.50), rgba(11, 26, 32, 0.50)),
    url('/logos/bg_countdown.png') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

#tpl-end .end-logo {
  width: 260px;
  height: 260px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 32px rgba(32, 227, 162, 0.35));
}

#tpl-end .end-merci {
  font-size: 96px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.06em;
  line-height: 1;
}

#tpl-end .end-subtitle {
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

#tpl-end .end-brand {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0.8;
}

@media (prefers-reduced-motion: no-preference) {
  #tpl-end.visible .end-logo,
  #tpl-end.visible .end-merci,
  #tpl-end.visible .end-subtitle,
  #tpl-end.visible .end-brand {
    animation: fadeUp 0.6s ease-out both;
  }
  #tpl-end.visible .end-merci    { animation-delay: 0.15s; }
  #tpl-end.visible .end-subtitle { animation-delay: 0.28s; }
  #tpl-end.visible .end-brand    { animation-delay: 0.40s; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* Étoiles scintillantes */
.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
}

/* ── Animations ── */
@media (prefers-reduced-motion: no-preference) {
  #tpl-countdown .countdown-display.pulse {
    animation: countPulse 0.35s ease-out;
  }

  @keyframes countPulse {
    0%   { transform: scale(1.08); }
    100% { transform: scale(1); }
  }

  .sparkle {
    animation: sparkleAnim var(--duration, 2.4s) var(--delay, 0s) infinite ease-in-out;
  }

  @keyframes sparkleAnim {
    0%, 100% { opacity: 0; }
    50%       { opacity: 0.7; }
  }
}
