/* ═══════════════════════════════════════════════════════════════
   DARKLINE RECORDS — STUDIO 3D · Interface
   Direction : néon nocturne — l'UI est un verre fumé qui s'efface
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Palette — calée sur le studio réel & la marque DCB */
  --ink:          #07040d;
  --ink-soft:     #0d0816;
  --veil:         rgba(13, 8, 22, 0.62);
  --veil-strong:  rgba(10, 6, 18, 0.86);
  --line:         rgba(196, 165, 255, 0.16);
  --line-strong:  rgba(196, 165, 255, 0.34);
  --text:         #efeaff;
  --text-dim:     rgba(224, 214, 255, 0.62);
  --text-faint:   rgba(224, 214, 255, 0.38);
  --violet:       #8b5cf6;
  --violet-deep:  #6d28d9;
  --pink:         #ff4fd2;
  --cyan:         #22d3ee;
  --glow-pink:    rgba(255, 79, 210, 0.55);
  --glow-violet:  rgba(139, 92, 246, 0.45);

  --font-ui:      "Outfit", ui-sans-serif, sans-serif;
  --font-script:  "Great Vibes", cursive;

  --radius:       16px;
  --radius-sm:    11px;
  --blur:         saturate(1.35) blur(18px);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-panel: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: var(--font-ui); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: rgba(139, 92, 246, 0.45); }

/* ═══════════════ SCÈNE 3D ═══════════════ */

#stage {
  position: fixed;
  inset: 0;
  cursor: grab;
  touch-action: none;
}
#stage.is-dragging { cursor: grabbing; }
#stage.is-hover    { cursor: pointer; }
#stage canvas { display: block; }

/* ═══════════════ ÉCRAN DE CHARGEMENT ═══════════════ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(124, 58, 237, 0.16), transparent 55%),
    radial-gradient(90% 70% at 50% 108%, rgba(34, 211, 238, 0.10), transparent 60%),
    var(--ink);
  transition: opacity 0.9s ease 0.15s, visibility 0.9s step-end 0.15s;
}
#loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(78% 68% at 50% 46%, transparent 40%, rgba(2, 0, 6, 0.82) 100%);
}

/* Grain animé — matière, pas de flat design */
.loader-grain {
  position: absolute;
  inset: -60px;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(3) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-22px, 14px); }
  66%  { transform: translate(16px, -20px); }
  100% { transform: translate(0, 0); }
}

.loader-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 0 24px;
  width: min(560px, 92vw);
}

/* — Enseigne néon SVG — */
.neon-sign { width: 100%; overflow: visible; }

#neon-stroke, #neon-fill {
  font-family: var(--font-script);
  font-size: 118px;
}
#neon-sub {
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 14px;
  fill: var(--cyan);
  opacity: 0;
  animation: subRise 1.1s var(--ease-out) 2.15s forwards;
}
@keyframes subRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 0.92; transform: translateY(0); }
}

/* Tube éteint : tracé qui se dessine */
#neon-stroke {
  fill: none;
  stroke: url(#neonTube);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: neonDraw 2.3s cubic-bezier(0.5, 0, 0.3, 1) 0.25s forwards;
}
@keyframes neonDraw { to { stroke-dashoffset: 0; } }

/* Gaz qui s'allume : flash + respiration permanente très légère */
#neon-fill {
  fill: url(#neonTube);
  opacity: 0;
  animation:
    neonIgnite 0.9s steps(1) 2.05s forwards,
    neonBreath 4.2s ease-in-out 3s infinite;
}
@keyframes neonIgnite {
  0%   { opacity: 0; }
  8%   { opacity: 0.85; }
  16%  { opacity: 0.12; }
  26%  { opacity: 0.95; }
  38%  { opacity: 0.3; }
  52%  { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes neonBreath {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.86; }
}

/* — Progression — */
.loader-progress { width: min(420px, 100%); }

.loader-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(196, 165, 255, 0.13);
  overflow: hidden;
}
#loader-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--pink) 60%, var(--cyan));
  box-shadow: 0 0 14px var(--glow-pink);
  transition: width 0.45s var(--ease-out);
}
.loader-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 12px;
}
#loader-status {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  min-height: 1.2em;
}
#loader-pct {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* — Égaliseur bas d'écran — */
.loader-eq {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 26px;
  opacity: 0.5;
}
.loader-eq i {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--pink), var(--violet-deep));
  animation: eq 1.05s ease-in-out infinite;
  transform-origin: bottom;
}
.loader-eq i:nth-child(odd)  { background: linear-gradient(180deg, var(--cyan), var(--violet-deep)); }
.loader-eq i:nth-child(1)  { height: 30%; animation-delay: 0.00s; }
.loader-eq i:nth-child(2)  { height: 65%; animation-delay: 0.12s; }
.loader-eq i:nth-child(3)  { height: 45%; animation-delay: 0.24s; }
.loader-eq i:nth-child(4)  { height: 90%; animation-delay: 0.06s; }
.loader-eq i:nth-child(5)  { height: 55%; animation-delay: 0.30s; }
.loader-eq i:nth-child(6)  { height: 75%; animation-delay: 0.18s; }
.loader-eq i:nth-child(7)  { height: 40%; animation-delay: 0.36s; }
.loader-eq i:nth-child(8)  { height: 85%; animation-delay: 0.09s; }
.loader-eq i:nth-child(9)  { height: 50%; animation-delay: 0.27s; }
.loader-eq i:nth-child(10) { height: 70%; animation-delay: 0.15s; }
.loader-eq i:nth-child(11) { height: 35%; animation-delay: 0.33s; }
.loader-eq i:nth-child(12) { height: 60%; animation-delay: 0.21s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}

/* ═══════════════ FALLBACK WEBGL ═══════════════ */

#webgl-fallback {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(100% 80% at 50% 0%, rgba(124, 58, 237, 0.14), transparent 60%), var(--ink);
}
#webgl-fallback[hidden] { display: none; }
.fallback-card {
  max-width: 460px;
  text-align: center;
  padding: 46px 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--veil);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-panel);
}
.fallback-mark {
  font-family: var(--font-script);
  font-size: 52px;
  background: linear-gradient(100deg, #ff7ae0, #c26bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px var(--glow-pink));
}
.fallback-card h1 { font-size: 22px; font-weight: 700; margin: 18px 0 10px; }
.fallback-card p  { font-size: 14.5px; line-height: 1.65; color: var(--text-dim); margin: 0 0 26px; }
.fallback-card .btn-primary { justify-content: center; }

/* ═══════════════ UI GÉNÉRALE ═══════════════ */

#ui {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease 0.35s;
}
#ui.is-visible { opacity: 1; }

#ui > * { pointer-events: auto; }
#ui #tooltip { pointer-events: none; }

/* — Wordmark — */
.brand {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  left: 26px;
  display: flex;
  flex-direction: column;
  user-select: none;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6));
}
.brand-script {
  font-family: var(--font-script);
  font-size: 44px;
  line-height: 1;
  background: linear-gradient(100deg, #ffd1f3, #ff6fd8 45%, #b98aff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 79, 210, 0.5));
}
.brand-sub {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 7px 0 0 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 4.5px;
  color: var(--text-dim);
}
.brand-sub i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* — Actions haut droite — */
.actions {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-deep) 100%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(109, 40, 217, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), filter 0.25s;
}
.btn-primary svg { width: 15px; height: 15px; }
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
  box-shadow: 0 14px 38px rgba(139, 92, 246, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.09) inset;
}
.btn-primary:active { transform: translateY(0); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--veil);
  backdrop-filter: var(--blur);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }

/* — Aide gestes — */
.gestures {
  position: absolute;
  left: 26px;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--text-faint);
  user-select: none;
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}
.gestures span { display: inline-flex; align-items: center; gap: 9px; }
.gestures svg { width: 15px; height: 15px; opacity: 0.75; }
.gestures.is-hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }

/* — Dock bas centre — */
.dock {
  position: absolute;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--veil);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-panel);
  max-width: min(94vw, 860px);
}
.dock-group { display: flex; align-items: center; gap: 4px; }
.dock-sep {
  width: 1px;
  height: 24px;
  background: var(--line);
  flex: none;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.dock-btn svg { width: 16px; height: 16px; }
.dock-btn:hover { color: var(--text); background: rgba(196, 165, 255, 0.07); }
.dock-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(109, 40, 217, 0.22));
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.25);
}

.mood-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.mood-btn i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dot1), var(--dot2));
  box-shadow: 0 0 9px var(--dot1);
  flex: none;
}
.mood-btn:hover { color: var(--text); background: rgba(196, 165, 255, 0.07); }
.mood-btn.is-active {
  color: #fff;
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(139, 92, 246, 0.14);
}

/* — Panneau info équipement — */
#panel {
  position: absolute;
  top: 50%;
  right: 26px;
  transform: translateY(-50%) translateX(14px);
  width: min(354px, calc(100vw - 48px));
  max-height: min(74vh, 620px);
  overflow-y: auto;
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--veil-strong);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-panel);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.35) transparent;
}
#panel::-webkit-scrollbar { width: 5px; }
#panel::-webkit-scrollbar-thumb { background: rgba(167, 139, 250, 0.35); border-radius: 4px; }
#panel.is-open { opacity: 1; transform: translateY(-50%) translateX(0); }

#panel-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 9px; }
#panel-close svg { width: 14px; height: 14px; }

.panel-kicker {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 3.2px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
}
#panel h2 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.25;
  padding-right: 30px;
}
#panel p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-dim);
}

#panel-specs { margin: 0 0 6px; }
#panel-specs div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid rgba(196, 165, 255, 0.09);
}
#panel-specs dt {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.3px;
}
#panel-specs dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
#panel-cta {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
  font-size: 13px;
  padding: 12px 16px;
}
#panel-cta[hidden] { display: none; }

/* — Tooltip — */
#tooltip {
  position: fixed;
  z-index: 30;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--veil-strong);
  backdrop-filter: var(--blur);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 14px)) scale(0.94);
  transition: opacity 0.18s ease, transform 0.18s var(--ease-out);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
}
#tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 14px)) scale(1);
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 860px) {
  .brand-script { font-size: 36px; }
  .brand-sub { letter-spacing: 3.5px; font-size: 9.5px; }
  #cta-book { padding: 11px 16px; font-size: 12.5px; }
  .gestures { display: none; }

  .dock {
    bottom: max(14px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 20px);
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .dock::-webkit-scrollbar { display: none; }
  .dock-btn { padding: 10px 12px; font-size: 12px; }
  .mood-btn { padding: 10px 11px; font-size: 12px; }

  /* Panneau → bottom sheet */
  #panel {
    top: auto;
    right: 10px;
    left: 10px;
    bottom: 84px;
    width: auto;
    max-height: 46vh;
    transform: translateY(16px);
    border-radius: 18px;
  }
  #panel.is-open { transform: translateY(0); }
}

@media (max-width: 480px) {
  .actions { right: 12px; gap: 7px; }
  .brand { left: 14px; }
  .brand-script { font-size: 27px; }
  .brand-sub { display: none; }
  #cta-book { padding: 10px 13px; font-size: 11.5px; }
  .icon-btn { width: 38px; height: 38px; }
  #neon-stroke, #neon-fill { font-size: 96px; }
  #neon-sub { font-size: 15px; letter-spacing: 10px; }
}

/* ═══════════════ ACCESSIBILITÉ ═══════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  #neon-stroke { stroke-dashoffset: 0; animation: none; }
  #neon-fill { opacity: 1; animation: none; }
  #neon-sub { opacity: 0.92; animation: none; }
  .loader-grain, .loader-eq { display: none; }
}

@supports not (backdrop-filter: blur(4px)) {
  .dock, .icon-btn, #panel, #tooltip, .fallback-card { background: rgba(10, 6, 18, 0.94); }
  .player3d { background: rgba(10, 6, 18, 0.95); }
}

/* ═══════════════ MINI-LECTEUR — LOGO DCB ═══════════════ */

.player3d {
  position: fixed;
  left: 26px;
  top: 100px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 12px 12px;
  max-width: min(392px, calc(100vw - 40px));
  /* verre fumé : translucide + blur fort, teinté violet/cyan aux angles */
  background:
    radial-gradient(130% 170% at 0% 0%, rgba(139, 92, 246, 0.20), transparent 52%),
    radial-gradient(130% 170% at 100% 100%, rgba(34, 211, 238, 0.13), transparent 52%),
    rgba(13, 8, 22, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(26px) saturate(1.7);
  backdrop-filter: blur(26px) saturate(1.7);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.player3d.is-in { opacity: 1; transform: none; }
.player3d::before { /* liseré dégradé, même langage que la carte label */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(139, 92, 246, 0.38) 30%, transparent 55%, rgba(34, 211, 238, 0.32));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.75;
}
.player3d.is-dragging {
  transition: none;
  cursor: grabbing;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 34px var(--glow-violet), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.p3d-disc {
  position: relative;
  flex: none;
  width: 66px; height: 66px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 50% 42%, rgba(139, 92, 246, 0.30), rgba(7, 4, 13, 0.92) 72%);
  cursor: pointer;
  display: grid; place-items: center;
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease-out);
}
.p3d-disc:hover { box-shadow: 0 0 26px var(--glow-violet); }
.p3d-viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.p3d-logo {
  position: relative; z-index: 2;
  width: 62%; height: 62%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.5));
  transform-origin: 50% 50%;
  transition: transform 0.09s linear, filter 0.12s linear;
  pointer-events: none; user-select: none;
}
.p3d-glyph {
  position: absolute; z-index: 3; inset: 0;
  display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 50% 50%, rgba(7, 4, 13, 0.55), transparent 66%);
  opacity: 0; transition: opacity 0.2s;
}
.p3d-disc:hover .p3d-glyph { opacity: 1; }
.p3d-glyph svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65)); }
.p3d-glyph .ic-pause { display: none; }
.player3d[data-state="playing"] .p3d-glyph .ic-play { display: none; }
.player3d[data-state="playing"] .p3d-glyph .ic-pause { display: block; }
.player3d[data-state="idle"] .p3d-glyph { opacity: 1; }
.player3d[data-state="idle"] .p3d-disc { animation: p3dInvite 2.4s ease-in-out infinite; }
@keyframes p3dInvite {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
  50% { box-shadow: 0 0 22px 2px var(--glow-violet); }
}

.p3d-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.p3d-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p3d-kicker { flex: 1; min-width: 0; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p3d-count { font-size: 10px; letter-spacing: 0.08em; color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p3d-eq { display: none; align-items: flex-end; gap: 2px; height: 11px; flex: none; }
.player3d[data-state="playing"] .p3d-eq { display: inline-flex; }
.p3d-eq i { width: 3px; border-radius: 1px; background: linear-gradient(180deg, var(--cyan), var(--violet)); transform-origin: bottom; animation: p3dEq 0.9s ease-in-out infinite; }
.p3d-eq i:nth-child(1) { height: 7px; }
.p3d-eq i:nth-child(2) { height: 11px; animation-delay: 0.22s; }
.p3d-eq i:nth-child(3) { height: 5px; animation-delay: 0.45s; }
@keyframes p3dEq { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
.p3d-title { font-size: 13.5px; font-weight: 600; color: var(--text); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 236px; }
.p3d-progress { display: flex; align-items: center; gap: 9px; margin-top: 6px; }
.p3d-track { position: relative; flex: 1; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); cursor: pointer; }
.p3d-track::before { content: ""; position: absolute; inset: -7px 0; } /* zone de clic élargie */
.p3d-track i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  border-radius: 999px; pointer-events: none;
  background: linear-gradient(90deg, var(--violet), var(--pink) 55%, var(--cyan));
  box-shadow: 0 0 10px var(--glow-violet);
}
.p3d-track i::after {
  content: ""; position: absolute; right: -4px; top: 50%; margin-top: -4px;
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px var(--glow-pink); opacity: 0; transition: opacity 0.2s;
}
.p3d-track:hover i::after { opacity: 1; }
.p3d-time { font-size: 10px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p3d-controls { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.p3d-ctrl {
  width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center;
  color: var(--text-dim);
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; cursor: pointer;
  transition: 0.2s;
}
.p3d-ctrl:hover { color: var(--text); background: rgba(196, 165, 255, 0.08); border-color: var(--line); }
.p3d-ctrl svg { width: 17px; height: 17px; }
#p3dMute .ic-muted { display: none; }
.player3d.is-muted #p3dMute .ic-vol { display: none; }
.player3d.is-muted #p3dMute .ic-muted { display: block; }
.player3d.is-muted #p3dMute { color: var(--pink); }
.p3d-book {
  margin-left: 4px;
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  text-decoration: none; white-space: nowrap;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  transition: 0.2s;
}
.p3d-book:hover { color: #fff; border-color: var(--violet); background: rgba(139, 92, 246, 0.16); }
.p3d-grip {
  align-self: stretch;
  display: grid; place-items: center;
  padding: 0 4px;
  color: var(--text-faint);
  font-size: 14px;
  letter-spacing: -1px;
  border-radius: 10px;
  cursor: grab;
}
.p3d-grip:hover { color: var(--text-dim); background: rgba(196, 165, 255, 0.07); }
.player3d.is-dragging .p3d-grip { cursor: grabbing; }

@media (max-width: 860px) {
  .player3d {
    left: 12px;
    top: 88px;
    padding: 9px 6px 9px 9px; gap: 10px;
    max-width: calc(100vw - 24px);
  }
  .p3d-disc { width: 52px; height: 52px; }
  .p3d-book { display: none; }
  .p3d-title { max-width: 150px; font-size: 12.5px; }
}
@media (max-width: 480px) {
  .player3d { top: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  .player3d[data-state="idle"] .p3d-disc { animation: none; }
  .p3d-logo { transition: none; }
  .p3d-eq i { animation: none; }
}
