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

:root {
  --bg:        #0d0d0e;
  --bg-card:   #1a1a1a;
  --bg-raise:  #252525;
  --dom-rgb:    215,72,12;
  --dom-rgb-hi: 245,102,42;
  --dom-hue-offset: 0deg;
  --orange:    rgb(var(--dom-rgb));
  --orange-hi: rgb(var(--dom-rgb-hi));
  --red:       #e74c3c;
  --white:     #ffffff;
  --muted:     #9a9a9a;
  --dim:       #505050;
  --border:    rgba(255,255,255,0.09);
  --glow-o:    rgba(var(--dom-rgb),0.35);
}

html, body {
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 40% at 50% 0%, #1e1208 0%, var(--bg) 65%);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 15px;
  overflow-x: hidden;
}

/* ── NAVBAR ───────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 28px;
  background: rgba(10, 10, 12, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 4px 24px rgba(0,0,0,0.4);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img { height: 34px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 8px 13px;
  border-radius: 4px;
  transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--orange); }

/* ── NAV DROPDOWN ─────────────────────────────── */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

/* Pont invisible qui couvre le gap entre le lien et le menu */
.nav-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -12px;
  right: -12px;
  height: 20px;
}

.nav-caret {
  transition: transform .2s ease;
  opacity: .7;
  flex-shrink: 0;
}

.nav-dropdown.open .nav-caret,
.nav-dropdown:hover .nav-caret { transform: rotate(180deg); opacity: 1; }

.nav-dropdown-menu {
  position: fixed;
  top: 0; left: 0;
  transform: translateY(-6px);
  background: rgba(16, 16, 18, 0.55);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 6px;
  min-width: 200px;
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.07) inset,
    0 20px 60px rgba(0,0,0,.7),
    0 2px 8px rgba(0,0,0,.4);
  z-index: 9999;
}

.nav-dropdown-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* arrow tip */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top: 0;
  border-bottom-color: rgba(255,255,255,0.1);
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: none;
  text-decoration: none;
  border-radius: 6px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-dropdown-menu a.active { color: var(--orange); background: rgba(var(--dom-rgb),0.1); }

.nav-dropdown-sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 5px 8px;
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.nav-link-site {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  transition: all .2s;
  cursor: pointer;
}

.nav-link-site:hover { color: var(--white); border-color: rgba(255,255,255,0.25); }

/* ── GLASS HIGHLIGHT (reflet iOS bord haut) ───── */
.player-card::before,
.history-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.18) 30%,
    rgba(255,255,255,0.22) 50%,
    rgba(255,255,255,0.18) 70%,
    transparent 100%
  );
  border-radius: 1px;
  pointer-events: none;
  z-index: 10;
}

/* ── HERO ─────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 104px 0 0;
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(36px) brightness(.38) saturate(1.8);
  transform: scale(1.12);
  transition: opacity 1.5s ease;
  will-change: opacity;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,13,14,.08) 0%, rgba(13,13,14,.40) 55%, var(--bg) 100%);
}

#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  filter: blur(28px);
  opacity: .7;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 36px;
  align-items: start;
  padding: 44px 52px 72px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* ── PLAYER CARD ──────────────────────────────── */
.player-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(14, 14, 16, 0.68);
  backdrop-filter: blur(22px) saturate(200%);
  -webkit-backdrop-filter: blur(22px) saturate(200%);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.08) inset,
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 32px 80px rgba(0,0,0,.55),
    0 8px 24px rgba(0,0,0,.3);
  position: relative;
}

/* Header : artiste / titre / album – pleine largeur */
.player-card-header {
  padding: 36px 52px 28px 72px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.player-card-header::before {
  content: '';
  position: absolute;
  left: 52px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 44px;
  background: var(--orange);
  border-radius: 2px;
}

.player-card-header-text { flex: 1; min-width: 0; }

.player-card-header .badges {
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 4px;
}

/* Body : grille 2 colonnes [cover | infos] */
.player-card-body {
  display: grid;
  grid-template-columns: min(38%, 360px) 1fr;
  flex: 1;
}


.cover-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
 
  padding: 28px 0px 44px 24px;
}

.cover-col .track-buy { width: 80%; max-width: 200px; position: relative; z-index: 10; }
.cover-col .btn-buy-single { width: 100%; justify-content: center; }

@media (max-width: 862px) {
  .cover-col {
 
  
    padding: 0px 0px 0px 0px;
  }
}



.cover-wrap {
  position: relative;
  overflow: hidden;
  background: #0d0d0d;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  /* glass frame + halo audio-réactif */
  border: 1px solid rgba(var(--dom-rgb), 0.45);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 2px 0  rgba(255,255,255,0.12) inset,
    0 -1px 0 rgba(0,0,0,0.4) inset,
    0 24px 64px rgba(0,0,0,0.6),
    0 4px  16px rgba(0,0,0,0.4),
    0 0 0 var(--shine-w, 1px) var(--shine-color, rgba(230,126,34,0.25)),
    0 0 var(--shine-blur, 6px) 0px var(--shine-color, rgba(230,126,34,0.15));
  transition: box-shadow 0.06s linear;
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 13px;
  transition: opacity 1s ease;
}

/* reflet glass : dégradé lumineux en haut à gauche */
.cover-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: 13px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.06) 25%,
      transparent 55%
    );
}

/* vignette bords + fondu vers la droite */
.cover-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 13px;
  background:
    linear-gradient(to right,  transparent 45%, rgba(6,6,6,.70) 100%),
    linear-gradient(to top,    rgba(0,0,0,.60) 0%, transparent 38%),
    linear-gradient(to bottom, rgba(0,0,0,.15) 0%, transparent 20%);
}

/* ── GLITCH AT STATION SWITCH ──────────────
   Brief VHS-style displacement on the cover and RGB-split on the title.
   Triggered by .glitching class added from JS inside switchStation. */
.cover-wrap.glitching img { animation: cover-glitch 380ms linear 1; }

@keyframes cover-glitch {
  0%   { transform: translate(0, 0);     filter: none;                  clip-path: inset(0); }
  8%   { transform: translate(-7px, 0);  filter: contrast(1.25) saturate(1.6); clip-path: inset(6% 0 62% 0); }
  16%  { transform: translate(9px, 0);   filter: hue-rotate(12deg) contrast(1.35); clip-path: inset(38% 0 22% 0); }
  24%  { transform: translate(-4px, 0);  filter: contrast(1.15);        clip-path: inset(60% 0 8% 0); }
  32%  { transform: translate(6px, 0);   filter: hue-rotate(-8deg);     clip-path: inset(12% 0 78% 0); }
  44%  { transform: translate(-2px, 0);  filter: contrast(1.1);         clip-path: inset(42% 0 32% 0); }
  60%  { transform: translate(1px, 0);   filter: none;                  clip-path: inset(0); }
  100% { transform: translate(0, 0);     filter: none;                  clip-path: inset(0); }
}

.player-card-header-text.glitching .track-title,
.player-card-header-text.glitching .track-artist {
  animation: text-glitch 380ms linear 1;
}

@keyframes text-glitch {
  0%   { transform: translate(0, 0);  text-shadow: none; }
  10%  { transform: translate(-2px, 0); text-shadow: 2px 0 0 rgba(255,40,80,.9), -2px 0 0 rgba(0,220,255,.85); }
  22%  { transform: translate(3px, 0);  text-shadow: -3px 0 0 rgba(255,40,80,.9), 3px 0 0 rgba(0,220,255,.85); }
  34%  { transform: translate(-1px, 0); text-shadow: 1px 0 0 rgba(255,40,80,.7), -1px 0 0 rgba(0,220,255,.7); }
  46%  { transform: translate(1px, 0);  text-shadow: -1px 0 0 rgba(255,40,80,.5), 1px 0 0 rgba(0,220,255,.5); }
  60%  { transform: translate(0, 0);    text-shadow: none; }
  100% { transform: translate(0, 0);    text-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cover-wrap.glitching img,
  .player-card-header-text.glitching .track-title,
  .player-card-header-text.glitching .track-artist { animation: none; }
}

.cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
}

.cover-placeholder svg { opacity: .15; }

.player-info {
  padding: 28px 52px 44px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* badges */
.badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.badge-streams { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

.badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 2px;
}

.badge-live {
  color: rgb(var(--dom-rgb));
  background: rgba(var(--dom-rgb),.1);
  border: 1px solid rgba(var(--dom-rgb),.3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgb(var(--dom-rgb));
  flex-shrink: 0;
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(var(--dom-rgb),.5); }
  50%      { opacity: .7; box-shadow: 0 0 0 5px rgba(var(--dom-rgb),0); }
}

.badge-station {
  color: var(--orange);
  background: rgba(var(--dom-rgb),.1);
  border: 1px solid rgba(var(--dom-rgb),.3);
}


.now-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.artist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.track-artist {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  min-height: 18px;
}

.badge-ugt-artist {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--orange);
  border-radius: 4px;
  padding: 2px 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .18s;
}
.badge-ugt-artist:hover {
  opacity: .82;
}

.track-title {
  font-size: 30px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.08;
  color: var(--white);
  min-height: 36px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.track-album {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .04em;
  min-height: 14px;
}

/* ── TRACK META TAGS ──────────────────────────── */
.track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
}

.tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,.1);
  color: #ccc;
  background: rgba(255,255,255,.05);
}

.tag-bpm   { color: var(--orange); border-color: rgba(var(--dom-rgb),.35); background: rgba(var(--dom-rgb),.08); }
.tag-key   { color: #b8d4ff;       border-color: rgba(100,160,255,.3); background: rgba(100,160,255,.07); }
.tag-style { color: #ccc;          border-color: rgba(255,255,255,.12); }
.tag-label { color: #aaa;          border-color: rgba(255,255,255,.08); font-style: italic; letter-spacing: .06em; }

/* ── BUY + STREAMING ──────────────────────────── */
.track-buy { display: flex; flex-direction: column; gap: 10px; }

.btn-buy-single {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  background: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .18s, box-shadow .18s, transform .18s;
  white-space: nowrap;
}
.btn-buy-single:hover {
  background: var(--orange-hi);
  border-color: var(--orange-hi);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(var(--dom-rgb),.4);
}
.btn-buy-single svg { flex-shrink: 0; }

.track-vinyl { margin-top: 8px; }
.btn-vinyl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn-vinyl:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); }
.vinyl-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.vinyl-dot--in  { background: #4cd964; box-shadow: 0 0 5px rgba(76,217,100,.7); }
.vinyl-dot--out { background: #ff3b30; box-shadow: 0 0 5px rgba(255,59,48,.7); }

.streaming-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stream-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 7px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  transition: all .2s;
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stream-link svg { width: 13px; height: 13px; flex-shrink: 0; }

.stream-link:hover {
  color: var(--c, var(--orange));
  border-color: var(--c, var(--orange));
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}

/* ── VIZ STATION (spectre + waveform fusionnés) ── */
.viz-station {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(var(--dom-rgb),0.45);
  padding-bottom: 28px; /* espace réservé pour la waveform */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(var(--dom-rgb),0.15),
    0 8px 32px rgba(0,0,0,0.45),
    0 0 14px rgba(var(--dom-rgb),0.18),
    0 0 32px rgba(var(--dom-rgb),0.08);
  transition: border-color .4s ease, box-shadow .4s ease;
}

/* glow ambiant couleur dominante en bas */
.viz-station::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: radial-gradient(ellipse 80% 100% at 50% 110%,
    rgba(var(--dom-rgb),0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* scanlines rétro */
.viz-station::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 2px,
    rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 3px
  );
  pointer-events: none;
  z-index: 20;
}

/* ── SPECTRE ──────────────────────────────────── */
.viz-wrap {
  position: relative;
  height: 44px;
  overflow: hidden;
  background: transparent;
  z-index: 2;
  margin: 0 1px;
}

#viz-canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter:
    drop-shadow(0 0 5px rgba(var(--dom-rgb),0.55))
    drop-shadow(0 0 14px rgba(var(--dom-rgb),0.20));
}

.viz-idle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.viz-idle span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--dim);
  animation: idle-bar 1.4s ease-in-out infinite;
}

.viz-idle span:nth-child(1)  { height: 10px; animation-delay: 0s; }
.viz-idle span:nth-child(2)  { height: 18px; animation-delay: .1s; }
.viz-idle span:nth-child(3)  { height: 28px; animation-delay: .2s; }
.viz-idle span:nth-child(4)  { height: 20px; animation-delay: .3s; }
.viz-idle span:nth-child(5)  { height: 36px; animation-delay: .4s; }
.viz-idle span:nth-child(6)  { height: 26px; animation-delay: .3s; }
.viz-idle span:nth-child(7)  { height: 16px; animation-delay: .2s; }
.viz-idle span:nth-child(8)  { height: 8px;  animation-delay: .1s; }

@keyframes idle-bar {
  0%,100% { transform: scaleY(1);  opacity: .3; }
  50%      { transform: scaleY(.3); opacity: .12; }
}

/* ── WAVEFORM ─────────────────────────────────── */
.waveform-wrap {
  position: absolute;
  left: 1px; right: 1px;
  bottom: -28px;
  height: 28px;
  opacity: 0;
  transition: opacity .7s ease;
  z-index: 1;
  transform: scaleY(-1);
  transform-origin: top center;
}

.waveform-wrap.waveform-ready { opacity: 1; }

.waveform-bg,
.waveform-played {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: 0 0;
}

/* portion non jouée : couleur dominante désaturée */
.waveform-bg {
  background-color: rgba(var(--dom-rgb), 0.22);
  background-image: none;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 200%;
  -webkit-mask-position: 0 0;
  -webkit-mask-mode: luminance;
  mask-repeat: no-repeat;
  mask-size: 100% 200%;
  mask-position: 0 0;
  mask-mode: luminance;
}

/* portion jouée : masque waveform + couleur dominante exacte */
.waveform-played {
  background-color: rgb(var(--dom-rgb));
  background-image: none;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 200%;
  -webkit-mask-position: 0 0;
  -webkit-mask-mode: luminance;
  mask-repeat: no-repeat;
  mask-size: 100% 200%;
  mask-position: 0 0;
  mask-mode: luminance;
  clip-path: inset(0 100% 0 0);
  filter: drop-shadow(0 0 5px rgba(var(--dom-rgb),0.75));
}

/* curseur lumineux à la position de lecture */
.waveform-cursor {
  position: absolute;
  top: -6px; bottom: -4px;
  left: 0%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom,
    rgba(var(--dom-rgb),0) 0%,
    rgba(var(--dom-rgb),0.95) 30%,
    rgba(var(--dom-rgb),1) 60%,
    rgba(var(--dom-rgb),0.4) 100%
  );
  box-shadow:
    0 0 6px  rgba(var(--dom-rgb),0.9),
    0 0 16px rgba(var(--dom-rgb),0.6),
    0 0 32px rgba(var(--dom-rgb),0.25);
  border-radius: 1px;
  z-index: 5;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.waveform-wrap.waveform-ready .waveform-cursor { opacity: 1; }

/* ── CONTROLS ─────────────────────────────────── */
.controls { display: flex; align-items: center; gap: 28px; margin-top: 16px; }

.btn-play {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--orange);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: background .2s, transform .15s;
  outline: none;
}

.btn-play::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(var(--dom-rgb),.25);
  animation: ring 2s ease-in-out infinite;
}

@keyframes ring {
  0%,100% { opacity: .25; transform: scale(1); }
  50%      { opacity: .6;  transform: scale(1.04); }
}

.btn-play:hover  { background: var(--orange-hi); transform: scale(1.06); }
.btn-play:active { transform: scale(.96); }
.btn-play svg    { pointer-events: none; }

.volume-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.volume-control { display: flex; align-items: center; gap: 10px; }

.vol-icon {
  color: var(--muted);
  flex-shrink: 0;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  line-height: 0;
  transition: color .2s;
}

.vol-icon:hover { color: var(--white); }

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  background: linear-gradient(to right,
    var(--orange) 0%,
    var(--orange) var(--vol, 80%),
    var(--dim)    var(--vol, 80%),
    var(--dim)    100%
  );
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--glow-o);
  cursor: pointer;
  transition: transform .15s;
}

input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.4); }

.vol-value {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  min-width: 30px;
  text-align: right;
}

.listeners-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.listeners-row svg { flex-shrink: 0; }
#listeners-count { color: var(--white); font-weight: 700; font-size: 13px; }

/* ── ERROR ────────────────────────────────────── */
.error-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(231,76,60,.08);
  border: 1px solid rgba(231,76,60,.22);
  border-radius: 6px;
  font-size: 11px;
  color: #e87060;
  font-weight: 500;
}

/* ── STATIONS SECTION ─────────────────────────── */
.stations-section {
  grid-column: 1 / -1;
}

.stations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}

.station-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px 16px 24px;
  background: rgba(14, 14, 16, 0.68);
  backdrop-filter: blur(22px) saturate(200%);
  -webkit-backdrop-filter: blur(22px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  text-decoration: none;
  color: var(--muted);
  position: relative;
  overflow: hidden;
  transition: color .22s, border-color .22s, background .22s, transform .18s, box-shadow .22s;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.05) inset,
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 12px 32px rgba(0,0,0,0.38);
}

/* glass highlight haut */
.station-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 14px; right: 14px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.15) 30%,
    rgba(255,255,255,0.22) 50%,
    rgba(255,255,255,0.15) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.station-btn:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.22);
  background: rgba(28, 28, 32, 0.82);
  transform: translateY(-3px);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.08) inset,
    0 1px 0 rgba(255,255,255,0.14) inset,
    0 24px 52px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.06);
}

.station-btn.active {
  color: var(--orange);
  border-color: rgba(var(--dom-rgb),0.50);
  background: rgba(var(--dom-rgb),0.07);
  box-shadow:
    0 0 0 0.5px rgba(var(--dom-rgb),0.10) inset,
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 20px 52px rgba(0,0,0,0.50),
    0 0 32px rgba(var(--dom-rgb),0.14);
}

.station-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .22s, border-color .22s, box-shadow .22s;
  position: relative;
}

.station-btn:hover .station-icon {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
}

.station-btn.active .station-icon {
  background: rgba(var(--dom-rgb),0.14);
  border-color: rgba(var(--dom-rgb),0.45);
  box-shadow: 0 0 18px rgba(var(--dom-rgb),0.28);
}

/* pulse ring on active */
.station-btn.active .station-icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(var(--dom-rgb),0.25);
  animation: ring 2s ease-in-out infinite;
}

.station-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.45;
}

.listener-bubble {
  position: absolute;
  top: 7px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  transition: opacity .3s, transform .3s;
}
.listener-bubble[hidden] { display: none; }

@media (max-width: 860px) {
  .stations-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}

@media (max-width: 640px) {
  .stations-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .station-btn   { padding: 22px 10px 18px; gap: 11px; }
  .station-icon  { width: 52px; height: 52px; }
  .station-label { font-size: 9.5px; }
}

@media (max-width: 360px) {
  .stations-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .station-btn   { padding: 18px 8px 14px; gap: 9px; }
  .station-icon  { width: 44px; height: 44px; }
  .station-label { font-size: 8.5px; }
}

/* ── HISTORY PANEL ────────────────────────────── */
.history-panel {
  background: rgba(14, 14, 16, 0.68);
  backdrop-filter: blur(22px) saturate(200%);
  -webkit-backdrop-filter: blur(22px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  padding: 28px 22px;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 112px);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.08) inset,
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 32px 80px rgba(0,0,0,.5),
    0 8px 24px rgba(0,0,0,.25);
}

.history-panel .history-list {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--dim) transparent;
  max-height: 360px ;
}

.history-panel .history-list::-webkit-scrollbar { width: 4px; }
.history-panel .history-list::-webkit-scrollbar-track { background: transparent; }
.history-panel .history-list::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 2px; }
.history-panel .history-list::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.section-title { display: flex; align-items: center; gap: 14px; }

.title-bar {
  width: 4px; height: 30px;
  background: var(--orange);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-title h2 {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.section-title h2 em { font-style: normal; color: var(--orange); }

.history-list { display: flex; flex-direction: column; gap: 3px; }

.history-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: background .15s;
  margin-bottom: 5px;
}

 

.history-item:hover { background: var(--bg-raise); }

.h-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--dim);
  text-align: center;
  letter-spacing: .04em;
}

.h-art {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 3px;
  background: #111;
  display: block;
}

.h-artist {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--orange);
  margin-bottom: 4px;
}

.h-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--white);
}

.h-vinyl { margin-top: 4px; }
.h-vinyl-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .03em;
}
.h-vinyl-link:hover { color: var(--white); }

.h-time { font-size: 10px; color: var(--muted); text-align: right; white-space: nowrap; }
.h-time-val { font-size: 10px; color: var(--muted); }
.h-price {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: .04em;
}

.history-item[style*="cursor"] { transition: background .15s; }
.history-item[style*="cursor"]:hover { background: var(--bg-raise); }
.history-item[style*="cursor"]:hover .h-title { color: var(--orange); }

/* ── SKELETON ─────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shim 1.6s linear infinite;
  border-radius: 3px;
}

@keyframes shim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes spin  { to { transform: rotate(360deg); } }


.spin-icon { animation: spin .8s linear infinite; }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 1200px) {
  .hero-inner  { padding: 36px 36px 56px; }
}

@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 32px 28px 52px;
  }
  .history-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .history-panel .history-list {
    overflow-y: visible;
    max-height: none;
  }
}

/* Quand la couverture + info sont côte à côte mais l'espace se réduit */
@media (max-width: 960px) {
  .player-card-header { padding: 28px 40px 20px 60px; }
  .player-card-header::before { left: 40px; }
  .player-info { padding: 24px 40px 36px 36px; }
  .track-title { font-size: 24px; }
}

@media (max-width: 860px) {
  .player-card-body { grid-template-columns: 1fr; }
  .player-card-header { padding: 24px 32px 16px 52px; }
  .player-card-header::before { left: 32px; }
  .cover-wrap  { width: min(220px, 58%); aspect-ratio: 1/1; height: auto; margin: 24px auto 0; border-radius: 12px; }
  .player-info     { padding: 24px 32px 32px; }
  .track-title     { font-size: 22px; }
  .track-vinyl     { width: 80%; max-width: 80%; margin: 0 auto; }
  .btn-vinyl       { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  .player-card-header { padding: 22px 28px 14px 48px; }
  .player-card-header::before { left: 28px; }
  .player-info  { padding: 20px 28px 28px; }
  .track-title  { font-size: 20px; }
  .controls     { flex-direction: column; align-items: center; gap: 20px; }
  .volume-row   { width: 100%; }
  .volume-control { width: 100%; }
  .listeners-row  { width: 100%; justify-content: center; }
}

@media (max-width: 540px) {
  .nav          { padding: 0 16px; gap: 16px; }
  .nav-links    { display: flex; }
  .nav-links > li:not(.nav-dropdown) { display: none; }
  .hero-inner   { padding: 0px 16px 40px; }
  .player-card-header { padding: 20px 20px 12px 40px; flex-direction: column; gap: 8px; }
  .player-card-header::before { left: 20px; }
  .player-card-header .badges { order: -1; flex-direction: row; align-items: center; align-self: flex-start; }
  .player-info  { padding: 16px 20px 20px; }
  .track-title  { font-size: 19px; }
  .controls     { gap: 16px; }
  .btn-play     { width: 60px; height: 60px; }
  .history-item { grid-template-columns: 44px 1fr auto; gap: 10px; padding: 8px 12px; }
  .h-art        { width: 44px; height: 44px; }
  .h-title      { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot, .btn-play::before, .viz-idle span, .skel { animation: none; }
}

/* ── BOTTOM TICKER BAR ─────────────────────────────── */
body { padding-bottom: 68px; }

.bb {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 150;
  height: 68px;
  background: rgba(6,6,8,0.92);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 -1px 0 rgba(255,255,255,0.04),
    0 -8px 32px rgba(0,0,0,0.55);
  overflow: hidden;
}

/* glass highlight haut */
.bb::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.12) 30%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.12) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 10;
}

/* edges fade */
.bb::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(6,6,8,0.80) 0%, transparent 6%),
    linear-gradient(to left,   rgba(6,6,8,0.80) 0%, transparent 6%);
  pointer-events: none;
  z-index: 5;
}

.bb-track {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bb-slide {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  animation: bb-scroll 60s linear infinite paused;
  will-change: transform;
}


@keyframes bb-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.bb-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  height: 100%;
  text-decoration: none;
  color: rgba(255,255,255,0.55);
  flex-shrink: 0;
  position: relative;
  transition: color .18s, background .18s;
  cursor: pointer;
}

.bb-item:hover { color: var(--white); background: rgba(255,255,255,0.04); }

.bb-item.active {
  color: var(--white);
  background: rgba(var(--dom-rgb),0.07);
}

/* accent bar top for active item */
.bb-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 0 0 2px 2px;
}

/* separator between items */
.bb-divider {
  flex-shrink: 0;
  color: rgba(255,255,255,0.12);
  font-size: 8px;
  margin-left: 8px;
  pointer-events: none;
}

.bb-art {
  width: 40px; height: 40px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: #111;
  border: 1px solid rgba(255,255,255,0.10);
  transition: opacity .35s ease;
}
.bb-art:not([src]),
.bb-art[src=""] { display: none; }

.bb-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bb-station-lbl {
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  transition: color .18s;
}

.bb-item.active .bb-station-lbl { color: var(--orange); }
.bb-item:hover  .bb-station-lbl { color: rgba(255,255,255,0.6); }

.bb-np {
  display: block;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
  width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* pulsing dot for active / playing */
.bb-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  display: none;
  animation: blink 1.4s ease-in-out infinite;
}

.bb-item.active .bb-live { display: block; }

/* ── Wide screens: allow longer titles ── */
@media (min-width: 1400px) {
  .bb-np { width: 360px; }
  .bb-item { padding: 0 26px; }
}

/* ── Tablet ── */
@media (max-width: 960px) {
  .bb-np { width: 220px; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .bb { height: 56px; }
  body { padding-bottom: 56px; }
  .hero { min-height: calc(100vh - 56px); }
  .bb-art { width: 32px; height: 32px; }
  .bb-np  { font-size: 11px; width: 160px; }
  .bb-item { padding: 0 14px; gap: 8px; }
  .bb-station-lbl { font-size: 7px; letter-spacing: .12em; }
}

/* ── Very small screens: hide artwork to save width ── */
@media (max-width: 420px) {
  .bb-art { display: none; }
  .bb-np  { width: 140px; }
  .bb-item { padding: 0 12px; gap: 6px; }
}

/* ── History scroll on mobile ── */
@media (max-width: 1100px) {
  .history-panel .history-list {
    overflow-y: auto;
    max-height: 420px;
    scrollbar-width: thin;
    scrollbar-color: var(--dim) transparent;
  }
  .history-panel .history-list::-webkit-scrollbar { width: 4px; }
  .history-panel .history-list::-webkit-scrollbar-track { background: transparent; }
  .history-panel .history-list::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 2px; }
}

/* ══════════════════════════════════════════════════════════════════
   MODE SOIRÉE — fullscreen immersive overlay
   ══════════════════════════════════════════════════════════════════ */

/* ── MODE SOIRÉE CTA BUTTON ──────────────
   Sits in the hero grid right column, above the history panel.
   Features an animated disco ball + twinkling sparkles + reactive glow. */
.btn-soiree-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px 12px 14px;
  border: 1px solid rgba(var(--dom-rgb, 230,126,34), 0.35);
  border-radius: 12px;
  background:
    linear-gradient(135deg,
      rgba(var(--dom-rgb, 230,126,34), 0.15) 0%,
      rgba(var(--dom-rgb, 230,126,34), 0.06) 50%,
      rgba(255,255,255, 0.03) 100%);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 0 rgba(var(--dom-rgb, 230,126,34), 0.45),
    inset 0 1px 0 rgba(255,255,255,0.06);
  transition: background .25s, border-color .25s, transform .15s, box-shadow .35s;
}
/* Shimmer that sweeps across the button every few seconds */
.btn-soiree-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255,255,255,0.10) 50%,
    transparent 70%);
  transform: translateX(-100%);
  animation: btn-soiree-shimmer 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btn-soiree-shimmer {
  0%, 70%, 100% { transform: translateX(-100%); }
  85%           { transform: translateX(100%); }
}
.btn-soiree-cta:hover {
  border-color: rgba(var(--dom-rgb, 230,126,34), 0.75);
  background:
    linear-gradient(135deg,
      rgba(var(--dom-rgb, 230,126,34), 0.28) 0%,
      rgba(var(--dom-rgb, 230,126,34), 0.12) 60%,
      rgba(255,255,255, 0.04) 100%);
  box-shadow:
    0 0 24px -4px rgba(var(--dom-rgb, 230,126,34), 0.55),
    inset 0 1px 0 rgba(255,255,255,0.10);
}
.btn-soiree-cta:active { transform: scale(0.985); }

/* Icon stage : disco ball + floating sparkles */
.btn-soiree-icon {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-soiree-disco {
  width: 30px;
  height: 30px;
  color: rgb(var(--dom-rgb, 230,126,34));
  filter: drop-shadow(0 0 6px rgba(var(--dom-rgb, 230,126,34), 0.7));
  animation: disco-spin 5s linear infinite;
  transform-origin: 50% 55%; /* tilt the spin axis a touch */
}
.btn-soiree-cta:hover .btn-soiree-disco { animation-duration: 2.2s; }
@keyframes disco-spin {
  from { transform: rotate(0)      scaleY(1)   ; }
  25%  { transform: rotate(90deg)  scaleX(0.4); }
  50%  { transform: rotate(180deg) scaleX(-1) ; }
  75%  { transform: rotate(270deg) scaleX(0.4); }
  to   { transform: rotate(360deg) scaleX(1)  ; }
}

/* Sparkles : each twinkles at its own pace + position */
.btn-soiree-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 14px rgba(255,255,255,0.6);
  opacity: 0;
  animation: spark-twinkle 1.8s ease-in-out infinite;
  pointer-events: none;
}
.btn-soiree-spark.s1 { top: 2px;  left: 2px;  animation-delay: 0s;   }
.btn-soiree-spark.s2 { top: 4px;  right: 0;   animation-delay: .45s; width: 3px; height: 3px; }
.btn-soiree-spark.s3 { bottom: 4px; left: 0;  animation-delay: .9s;  width: 3px; height: 3px; }
.btn-soiree-spark.s4 { bottom: 2px; right: 4px; animation-delay: 1.35s; }
@keyframes spark-twinkle {
  0%, 100%        { opacity: 0; transform: scale(0.4); }
  35%             { opacity: 1; transform: scale(1.2); }
  50%             { opacity: 0.6; transform: scale(1); }
  65%             { opacity: 0;   transform: scale(0.6); }
}
.btn-soiree-cta:hover .btn-soiree-spark { animation-duration: 0.9s; }

/* Text block */
.btn-soiree-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.btn-soiree-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
}
.btn-soiree-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  line-height: 1.2;
}

/* Trailing fullscreen-corners hint */
.btn-soiree-arrow {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.55);
  transition: transform .25s, color .25s;
}
.btn-soiree-cta:hover .btn-soiree-arrow {
  color: #fff;
  transform: scale(1.15);
}

@media (prefers-reduced-motion: reduce) {
  .btn-soiree-cta::before,
  .btn-soiree-disco,
  .btn-soiree-spark { animation: none; }
  .btn-soiree-spark { opacity: 0.7; }
}

/* Right column container : stacks the Mode Soirée CTA on top of the
   "Derniers titres joués" history panel so they read as one block. */
.hero-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Overlay container */
.soiree-overlay {
  position: fixed;
  inset: 0;
  background: #040407;
  color: #fff;
  font-family: 'Montserrat', system-ui, sans-serif;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
  overflow: hidden;
  --soiree-color: 230, 126, 34;
  --beat: 0;     /* 0..1, peaks on each detected kick, decays per frame */
  --bass: 0;     /* 0..1, raw sub-bass level (continuous) */
  --flash: 0;    /* 0..1, used by global radial flash overlay */
  --shake-x: 0px;
  --shake-y: 0px;
}
.soiree-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility 0s linear 0s;
}
.soiree-overlay.idle { cursor: none; }
body.soiree-on { overflow: hidden; }

/* Full-screen blurred cover wallpaper — the cover IS the background.
   Saturation, brightness and scale all pulse on the kick so the whole
   scene thumps with the music. URL set from JS via --soiree-bg-cover-url. */
.soiree-bg-cover {
  position: absolute;
  inset: -8%;
  z-index: 0;
  background-image: var(--soiree-bg-cover-url, none);
  background-size: cover;
  background-position: center;
  /* Very calm reactivity : the bass channel is what kept saturating
     everything on heavy techno. Almost no continuous reaction now; only
     short beat-driven micro pulses. */
  filter:
    blur(28px)
    saturate(calc(1.0 + var(--beat) * 0.08))
    brightness(calc(0.72 + var(--beat) * 0.04));
  opacity: 1;
  transform: scale(calc(1.10 + var(--beat) * 0.006)) translateZ(0);
}

/* Performance mode (auto-enabled when FPS drops, typically Smart TV) :
   the big CSS blur is the #1 cost on weak GPUs, so we slash it. */
.soiree-overlay.perf-mode .soiree-bg-cover {
  filter:
    blur(12px)
    saturate(calc(1.0 + var(--beat) * 0.06))
    brightness(calc(0.74 + var(--beat) * 0.03));
}
.soiree-overlay.perf-mode .soiree-cover-halo {
  filter: blur(calc(10px + var(--beat) * 12px));
}
.soiree-overlay.perf-mode .soiree-cover {
  /* drop the expensive glow shadow on the sharp cover too */
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 20px 40px rgba(0,0,0,0.6);
}
.soiree-overlay.perf-mode .soiree-bottom .soiree-bpm {
  /* lighter text shadow chain */
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.soiree-overlay.perf-mode .soiree-title {
  /* drop the heavy multi-layer text shadow + RGB split */
  text-shadow:
    0 4px 24px rgba(0,0,0,0.7),
    0 0 calc(8px + var(--beat) * 12px) rgba(var(--soiree-color), calc(var(--beat) * 0.35));
}
.soiree-overlay.perf-mode .soiree-vignette {
  /* simplified vignette - fixed values, no per-frame recompute */
  background: radial-gradient(ellipse 82% 62% at 50% 50%, transparent 30%, rgba(0,0,0,0.55) 100%);
  transition: none;
}
.soiree-overlay.perf-mode .soiree-cover-wrap {
  /* disable the continuous breathe animation on perf — wastes cycles */
  animation: none;
  pointer-events: none;
  transition: background-image .5s ease, filter 120ms linear, transform 120ms cubic-bezier(.2,.9,.2,1);
}
/* Barely-there darken : just enough to keep the title readable but
   the cover should still feel like the dominant visual element. */
.soiree-bg-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0,0,0,0.10) 0%, rgba(4,4,7,0.35) 100%);
}

/* Reactive canvas background */
.soiree-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* Subtle vignette to focus the eye toward the cover —
   slightly opens up on bass to give the scene room to breathe. */
.soiree-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse calc(82% + var(--bass) * 3%) calc(62% + var(--bass) * 4%)
      at 50% 50%,
      transparent 30%,
      rgba(0,0,0, calc(0.55 - var(--bass) * 0.04)) 100%);
  transition: background 80ms linear;
}

/* Top header (station name + live + listeners).
   Extra right padding leaves room for the absolutely-positioned close
   button (44px wide at right: 5vw) so the Live/listeners stack stays
   clear of the X. */
.soiree-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 4vh 5vw;
  padding-right: calc(5vw + 64px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  pointer-events: none;
}
.soiree-top-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.soiree-logo {
  height: clamp(44px, 7vh, 84px);
  width: auto;
  display: block;
  filter:
    drop-shadow(0 2px 14px rgba(0,0,0,0.7))
    drop-shadow(0 0 calc(var(--beat) * 18px) rgba(var(--soiree-color), calc(var(--beat) * 0.8)))
    brightness(calc(1 + var(--beat) * 0.25));
  opacity: 0.95;
  transform: scale(calc(1 + var(--beat) * 0.06));
  transition: transform 90ms cubic-bezier(.2,.9,.2,1), filter 90ms linear;
}
.soiree-station {
  font-size: clamp(12px, 1.6vh, 20px);
  font-weight: 800;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  text-shadow:
    0 2px 12px rgba(0,0,0,0.6),
    0 0 calc(var(--beat) * 20px) rgba(255,255,255, calc(var(--beat) * 0.4));
  transform: scale(calc(1 + var(--beat) * 0.04));
  transition: transform 90ms cubic-bezier(.2,.9,.2,1), text-shadow 90ms linear;
}
.soiree-top-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.soiree-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(12px, 1.5vh, 18px);
  font-weight: 800;
  letter-spacing: .3em;
  color: #ff3946;
  text-transform: uppercase;
}
.soiree-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3946;
  box-shadow:
    0 0 calc(12px + var(--beat) * 30px) #ff3946,
    0 0 calc(24px + var(--beat) * 60px) rgba(255,57,70, calc(0.45 + var(--beat) * 0.4));
  animation: soiree-livepulse 1.1s ease-in-out infinite;
  transform: scale(calc(1 + var(--beat) * 0.3));
  transition: transform 90ms cubic-bezier(.2,.9,.2,1), box-shadow 90ms linear;
}
@keyframes soiree-livepulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .35; transform: scale(.7); }
}
.soiree-listeners {
  font-size: clamp(11px, 1.3vh, 14px);
  font-weight: 500;
  letter-spacing: .15em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}

/* Center stage : cover + title */
.soiree-main {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5vh;
  padding: 14vh 5vw;
  pointer-events: none;
}
.soiree-cover-wrap {
  position: relative;
  width: clamp(220px, 36vh, 460px);
  aspect-ratio: 1 / 1;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
  /* Slow pendulum rotation — clockwise then counter-clockwise — paired
     with a gentle scale breath. Keeps the cover alive instead of static. */
  animation: soiree-breathe 9s ease-in-out infinite;
  transform-origin: center;
}
.soiree-cover-wrap::before {
  /* Inner wrapper trick: the keyframe animation owns one transform,
     so we apply the reactive ones on the .soiree-cover img instead. */
  content: '';
}
@keyframes soiree-breathe {
  0%   { transform: scale(1)     rotate(-2.5deg); }
  25%  { transform: scale(1.025) rotate(0deg); }
  50%  { transform: scale(1.04)  rotate(2.5deg); }
  75%  { transform: scale(1.025) rotate(0deg); }
  100% { transform: scale(1)     rotate(-2.5deg); }
}
.soiree-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 30px 80px rgba(0,0,0,0.7),
    0 0 calc(15px + var(--beat) * 40px) rgba(var(--soiree-color), calc(0.12 + var(--beat) * 0.4));
  transform:
    scale(calc(1 + var(--beat) * 0.05 + var(--bass) * 0.015));
  filter:
    saturate(calc(1 + var(--bass) * 0.10 + var(--beat) * 0.15))
    brightness(calc(1 + var(--beat) * 0.06))
    contrast(calc(1 + var(--bass) * 0.04));
  transition: transform 90ms cubic-bezier(.2,.9,.2,1), filter 90ms linear, box-shadow 120ms linear;
}
.soiree-cover-halo {
  position: absolute;
  inset: -12%;
  border-radius: 18%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%,
    rgba(var(--soiree-color), calc(0.10 + var(--beat) * 0.25)) 0%,
    rgba(var(--soiree-color), calc(0.04 + var(--bass) * 0.05)) 40%,
    rgba(var(--soiree-color), 0) 70%);
  filter: blur(calc(18px + var(--beat) * 22px));
  transition: filter .1s ease, background .08s ease;
  z-index: -1;
  transform: scale(calc(1 + var(--beat) * 0.07));
}

.soiree-meta {
  text-align: center;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6vh;
}
.soiree-artist {
  font-size: clamp(14px, 2.4vh, 28px);
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  /* White text with a colored glow → always readable, regardless of the
     cover's dominant color (was invisible when both were the same hue). */
  color: #fff;
  text-shadow:
    0 2px 12px rgba(0,0,0,0.75),
    0 0 calc(12px + var(--beat) * 30px) rgba(var(--soiree-color), calc(0.5 + var(--beat) * 0.4)),
    0 0 calc(6px + var(--bass) * 14px) rgba(var(--soiree-color), calc(0.3 + var(--bass) * 0.25));
  min-height: 1em;
  transform: scale(calc(1 + var(--beat) * 0.04));
  transition: transform 90ms cubic-bezier(.2,.9,.2,1), text-shadow 100ms linear;
}
.soiree-title {
  font-size: clamp(36px, 8.5vh, 120px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.02;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 4px 30px rgba(0,0,0,0.7),
    0 0 calc(15px + var(--beat) * 25px) rgba(var(--soiree-color), calc(var(--beat) * 0.5)),
    calc(var(--beat) * -1.5px) 0 0 rgba(255, 40, 80, calc(var(--beat) * 0.3)),
    calc(var(--beat) *  1.5px) 0 0 rgba(0, 220, 255, calc(var(--beat) * 0.3));
  min-height: 1em;
  transform: scale(calc(1 + var(--beat) * 0.025));
  transition: transform 90ms cubic-bezier(.2,.9,.2,1), text-shadow 100ms linear;
  /* 3D perspective for the inner flip animation */
  perspective: 1400px;
  perspective-origin: 50% 50%;
}

/* Inner span carries the random punctual animations (tilt / glitch / bounce)
   so they don't conflict with the beat-driven scale on .soiree-title. */
.soiree-title-inner {
  display: inline-block;
  transform-origin: center;
  will-change: transform, filter;
}
.soiree-title-inner.anim-tilt   { animation: title-tilt   1.6s cubic-bezier(.5,.05,.5,1) 1; }
.soiree-title-inner.anim-glitch { animation: title-glitch 0.55s steps(1, end) 1; }
.soiree-title-inner.anim-bounce { animation: title-bounce 0.9s cubic-bezier(.36,.07,.19,.97) 1; }
.soiree-title-inner.anim-flip3d { animation: title-flip3d 1.8s cubic-bezier(.55,.05,.45,1) 1; }

@keyframes title-tilt {
  0%   { transform: rotate(0deg); }
  18%  { transform: rotate(-4deg); }
  52%  { transform: rotate(4deg); }
  78%  { transform: rotate(-1.5deg); }
  100% { transform: rotate(0deg); }
}

@keyframes title-glitch {
  0%, 100% { transform: translate(0, 0); filter: none; }
  12%      { transform: translate(-4px, 1px);
             filter: drop-shadow(3px 0 0 rgba(255,40,80,.85)) drop-shadow(-3px 0 0 rgba(0,220,255,.85)); }
  25%      { transform: translate(5px, -1px);
             filter: drop-shadow(-4px 0 0 rgba(255,40,80,.85)) drop-shadow(4px 0 0 rgba(0,220,255,.85)); }
  40%      { transform: translate(-2px, 1px);
             filter: drop-shadow(2px 0 0 rgba(255,40,80,.65)) drop-shadow(-2px 0 0 rgba(0,220,255,.65)); }
  60%      { transform: translate(1px, 0); filter: none; }
  75%      { transform: translate(-1px, 0);
             filter: drop-shadow(1px 0 0 rgba(255,40,80,.55)) drop-shadow(-1px 0 0 rgba(0,220,255,.55)); }
}

@keyframes title-bounce {
  0%   { transform: scale(1) translateY(0); }
  22%  { transform: scale(1.10) translateY(-8px); }
  48%  { transform: scale(0.96) translateY(3px); }
  72%  { transform: scale(1.03) translateY(-1px); }
  100% { transform: scale(1) translateY(0); }
}

/* Full 360° flip around the horizontal axis — like a panel turning over. */
@keyframes title-flip3d {
  0%   { transform: rotateX(0deg); }
  100% { transform: rotateX(360deg); }
}

/* Same flip on the cover wrap. Overrides the breathe animation while
   active; once the class is removed, breathe resumes. The transform
   includes perspective() inline because the parent (.soiree-main)
   doesn't declare a perspective. */
.soiree-cover-wrap.anim-flip3d {
  animation: cover-flip3d 1.85s cubic-bezier(.55,.05,.45,1) 1;
}
@keyframes cover-flip3d {
  0%   { transform: perspective(1400px) rotateX(0deg)   scale(1); }
  50%  { transform: perspective(1400px) rotateX(180deg) scale(1.02); }
  100% { transform: perspective(1400px) rotateX(360deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .soiree-title-inner.anim-tilt,
  .soiree-title-inner.anim-glitch,
  .soiree-title-inner.anim-bounce,
  .soiree-title-inner.anim-flip3d { animation: none; }
}
.soiree-album {
  font-size: clamp(12px, 1.6vh, 18px);
  font-weight: 500;
  letter-spacing: .1em;
  /* Brighter + a real text shadow so the album line stays readable on
     bright covers (it used to disappear on the same-hue background). */
  color: rgba(255,255,255,0.80);
  text-shadow:
    0 2px 10px rgba(0,0,0,0.75),
    0 0 8px rgba(0,0,0,0.5);
  text-transform: uppercase;
  margin-top: 0.4vh;
}

/* Bottom footer (BPM + hint) */
.soiree-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  padding: 4vh 5vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  pointer-events: none;
}
.soiree-bpm {
  font-size: clamp(24px, 5vh, 64px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.85);
  letter-spacing: -.02em;
  line-height: 1;
  text-shadow:
    0 2px 16px rgba(0,0,0,0.6),
    0 0 calc(10px + var(--beat) * 40px) rgba(var(--soiree-color), calc(var(--beat) * 0.7));
  transform: scale(calc(1 + var(--beat) * 0.08));
  transition: transform 90ms cubic-bezier(.2,.9,.2,1), text-shadow 100ms linear;
  display: none;
}
.soiree-bpm.has-bpm { display: block; }
.soiree-bpm span {
  font-size: .35em;
  font-weight: 700;
  opacity: 0.55;
  margin-left: .35em;
  letter-spacing: .25em;
}
.soiree-hint {
  font-size: clamp(10px, 1.2vh, 13px);
  font-weight: 500;
  letter-spacing: .25em;
  color: rgba(255,255,255,0.32);
  text-transform: uppercase;
  text-align: right;
  max-width: 60vw;
  transition: opacity .6s ease;
}
/* Idle mode : only hide the cursor (clean look on a TV).
   The user wants info — station, live, listeners, BPM, close button —
   to stay visible without focus. So we never dim those when idle. */

/* Close button */
.soiree-close {
  position: absolute;
  top: 3vh;
  right: 5vw;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.soiree-close:hover {
  background: rgba(255,57,70,0.85);
  color: #fff;
  border-color: rgba(255,57,70,0.9);
}
.soiree-close:active { transform: scale(0.93); }

/* Reduce motion: kill heavy animations */
@media (prefers-reduced-motion: reduce) {
  .soiree-cover-wrap { animation: none; }
  .soiree-live-dot   { animation: none; }
}

/* Compact mobile : keep things readable but airy */
@media (max-width: 640px) {
  .soiree-top, .soiree-bottom { padding: 3vh 5vw; }
  .soiree-main { padding: 12vh 4vw 14vh; gap: 4vh; }
  .soiree-cover-wrap { width: clamp(180px, 40vw, 280px); }
  .soiree-listeners { display: none; }
  .soiree-hint { letter-spacing: .15em; }
}

/* Hide overlay markup completely from accessibility when inactive */
.soiree-overlay[aria-hidden="true"] * { pointer-events: none; }
.soiree-overlay.active[aria-hidden="false"] .soiree-cover-wrap,
.soiree-overlay.active[aria-hidden="false"] .soiree-close { pointer-events: auto; }

