/* © 2026 LikeBand — Tous droits réservés à Vincent Sirois. Reproduction interdite. */
/* Bouton retour accueil */
.studio-home-btn {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  text-decoration: none;
  transition: background .2s, transform .15s;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
}
.studio-home-btn:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: scale(1.1);
}
.studio-home-btn:active {
  transform: scale(0.95);
}

/* ═══════ AVATAR 3D INTERACTIF ═══════ */
/* ── Conteneur avatars côte à côte ── */
.studio-avatars-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  margin: 8px auto 0;
  position: relative;
  z-index: 50;
}

.studio-avatar-3d {
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .15s ease, box-shadow .2s ease;
}

/* État drag (long-press) */
.studio-avatar-3d.avatar3d--dragging {
  position: fixed !important;
  z-index: 99999 !important;
  cursor: grabbing !important;
  transform: scale(1.15);
  filter: drop-shadow(0 0 20px rgba(255,255,255,.5)) drop-shadow(0 8px 24px rgba(0,0,0,.6));
  opacity: .92;
  transition: none !important;
}
.studio-avatar-3d.avatar3d--dragging .avatar3d-scene {
  animation: avatar3d-drag-wobble .5s ease-in-out infinite !important;
}
.studio-avatar-3d.avatar3d--drag-ready {
  cursor: grab !important;
  animation: avatar3d-drag-ready-pulse .6s ease;
}

/* Indicateur visuel avant drag */
.avatar3d-drag-hint {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,.7);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}
.avatar3d--drag-ready .avatar3d-drag-hint {
  opacity: 1;
}

/* Placeholder (ombre à l'emplacement d'origine) */
.avatar3d-placeholder {
  width: 72px;
  height: 72px;
  border: 2px dashed rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

@keyframes avatar3d-drag-wobble {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
@keyframes avatar3d-drag-ready-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.avatar3d-scene {
  width: 72px;
  height: 72px;
  perspective: 600px;
  transform-style: preserve-3d;
  transition: transform .15s ease-out;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tête */
.avatar3d-head {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
  transform-style: preserve-3d;
  background:
    radial-gradient(ellipse at 30% 25%, #ff4444 0%, #cc0000 40%, #880000 80%, #440000 100%);
  box-shadow:
    0 4px 20px rgba(255, 0, 0, .5),
    0 0 40px rgba(255, 0, 0, .25),
    inset 0 -8px 16px rgba(0, 0, 0, .4),
    inset 0 4px 8px rgba(255, 150, 150, .3);
  border: 2px solid rgba(255, 100, 100, .4);
  animation: avatar3d-idle 3s ease-in-out infinite;
}

/* Visage */
.avatar3d-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 4px;
}

/* Yeux */
.avatar3d-eye {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at 35% 35%, #fff 30%, #ddd 60%, #aaa 100%);
  border-radius: 50%;
  position: absolute;
  top: 38%;
  box-shadow: 0 0 6px rgba(255,255,255,.6), inset 0 1px 2px rgba(0,0,0,.3);
  transition: transform .1s ease-out;
}
.avatar3d-eye--l { left: 30%; }
.avatar3d-eye--r { right: 30%; }

/* Bouche */
.avatar3d-mouth {
  width: 14px;
  height: 4px;
  background: #220000;
  border-radius: 4px;
  position: absolute;
  bottom: 28%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
  transition: all .2s ease;
}

/* Oreilles */
.avatar3d-ear {
  width: 10px;
  height: 14px;
  background: radial-gradient(ellipse at 50% 30%, #ee3333, #990000);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: inset 0 1px 3px rgba(255,150,150,.3), 0 2px 6px rgba(0,0,0,.5);
}
.avatar3d-ear--l { left: -5px; }
.avatar3d-ear--r { right: -5px; }

/* Casque audio */
.avatar3d-headphone {
  position: absolute;
  inset: -6px -10px;
  pointer-events: none;
}
.avatar3d-hp-band {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 20px;
  border: 3px solid #333;
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #555, #222);
  box-shadow: 0 -2px 6px rgba(0,0,0,.5), inset 0 1px 2px rgba(255,255,255,.1);
}
.avatar3d-hp-pad {
  position: absolute;
  width: 14px;
  height: 20px;
  top: 44%;
  border-radius: 4px;
  background: radial-gradient(ellipse at 40% 30%, #555, #1a1a1a);
  box-shadow:
    0 2px 8px rgba(0,0,0,.6),
    inset 0 1px 2px rgba(255,255,255,.1),
    inset 0 -1px 3px rgba(0,0,0,.5);
  border: 1px solid #444;
}
.avatar3d-hp-pad--l { left: -2px; }
.avatar3d-hp-pad--r { right: -2px; }

/* Glow halo */
.avatar3d-glow {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,0,0,.15) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity .3s;
  opacity: .6;
}
.studio-avatar-3d:hover .avatar3d-glow,
.avatar3d--hover .avatar3d-glow { opacity: 1; }
.avatar3d--active .avatar3d-glow {
  opacity: 1;
  animation: avatar3d-glow-pulse 1.5s ease-in-out infinite;
}

/* Anneau orbital */
.avatar3d-ring {
  position: absolute;
  width: 68px;
  height: 68px;
  border: 2px solid rgba(255, 80, 80, .25);
  border-radius: 50%;
  animation: avatar3d-ring-spin 6s linear infinite;
  pointer-events: none;
}
.avatar3d--active .avatar3d-ring {
  border-color: rgba(255, 80, 80, .5);
  box-shadow: 0 0 12px rgba(255, 0, 0, .2);
}

/* Label */
.avatar3d-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ff6666;
  text-shadow: 0 0 8px rgba(255, 0, 0, .5), 0 1px 2px rgba(0,0,0,.8);
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
}

/* ── Animations ── */
@keyframes avatar3d-idle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.02); }
}

@keyframes avatar3d-bounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2) rotate(8deg); }
  60% { transform: scale(0.9) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes avatar3d-glow-pulse {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes avatar3d-ring-spin {
  0% { transform: rotateX(65deg) rotateZ(0deg); }
  100% { transform: rotateX(65deg) rotateZ(360deg); }
}

/* Actif : yeux brillent */
.avatar3d--active .avatar3d-eye {
  background: radial-gradient(circle at 35% 35%, #fff 20%, #ffcccc 50%, #ff6666 100%);
  box-shadow: 0 0 10px rgba(255,255,255,.9), 0 0 20px rgba(255,0,0,.4);
}
.avatar3d--active .avatar3d-head {
  box-shadow:
    0 4px 24px rgba(255, 0, 0, .6),
    0 0 50px rgba(255, 0, 0, .35),
    0 0 80px rgba(255, 0, 0, .1),
    inset 0 -8px 16px rgba(0, 0, 0, .4),
    inset 0 4px 8px rgba(255, 150, 150, .35);
}
.avatar3d--active .avatar3d-label {
  animation: mixer-rec-blink 1s infinite;
  color: #ff4444;
}

/* ═══ AVATAR PLAY VERT — TRIANGLE 3D ═══ */
.avatar3d-head--play {
  width: 56px !important;
  height: 56px !important;
  border-radius: 0 !important;
  clip-path: polygon(10% 0%, 100% 50%, 10% 100%) !important;
  background:
    linear-gradient(135deg, #66ff66 0%, #00cc00 30%, #008800 65%, #004400 100%) !important;
  box-shadow: none !important;
  border: none !important;
  position: relative;
  filter: drop-shadow(0 4px 16px rgba(0,255,0,.5)) drop-shadow(0 0 30px rgba(0,255,0,.2));
}
/* Reflet 3D sur le triangle */
.avatar3d-head--play::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  clip-path: polygon(10% 0%, 100% 50%, 10% 100%);
  background: linear-gradient(160deg, rgba(255,255,255,.35) 0%, transparent 45%, rgba(0,0,0,.3) 100%);
  pointer-events: none;
}
/* Bord lumineux interne */
.avatar3d-head--play::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 3px;
  clip-path: polygon(12% 4%, 96% 50%, 12% 96%);
  background: linear-gradient(145deg, rgba(150,255,150,.2) 0%, transparent 50%);
  pointer-events: none;
}

/* Visage adapté au triangle */
.avatar3d-face--play {
  padding-left: 10px !important;
  justify-content: center !important;
}
.avatar3d-eye--play {
  background: radial-gradient(circle at 40% 35%, #fff 30%, #aaffaa 70%, #44cc44 100%) !important;
  box-shadow: 0 0 6px rgba(200,255,200,.8), inset 0 1px 2px rgba(0,0,0,.3) !important;
}
.avatar3d-eye--play.avatar3d-eye--l { left: 32% !important; top: 34% !important; }
.avatar3d-eye--play.avatar3d-eye--r { right: 34% !important; top: 34% !important; }
.avatar3d-mouth--play {
  bottom: 32% !important;
  left: 36% !important;
  width: 10px !important;
  background: #003300 !important;
}

.avatar3d-ear--play {
  display: none !important;
}
.avatar3d-glow--play {
  background: radial-gradient(circle, rgba(0,255,0,.18) 0%, transparent 70%) !important;
}
.avatar3d-ring--play {
  border-color: rgba(80, 255, 80, .25) !important;
}
.avatar3d-label--play {
  color: #66ff66 !important;
  text-shadow: 0 0 8px rgba(0, 255, 0, .5), 0 1px 2px rgba(0,0,0,.8) !important;
}

/* Hover sur Play triangle */
.studio-avatar-3d--play:hover .avatar3d-glow--play { opacity: 1; }
.studio-avatar-3d--play:hover .avatar3d-head--play {
  filter: drop-shadow(0 4px 20px rgba(0,255,0,.7)) drop-shadow(0 0 40px rgba(0,255,0,.35)) brightness(1.15);
}

/* État actif Play triangle */
.avatar3d--playing .avatar3d-eye--play {
  background: radial-gradient(circle at 35% 35%, #fff 20%, #ccffcc 50%, #66ff66 100%) !important;
  box-shadow: 0 0 10px rgba(255,255,255,.9), 0 0 20px rgba(0,255,0,.4) !important;
}
.avatar3d--playing .avatar3d-head--play {
  filter: drop-shadow(0 4px 24px rgba(0,255,0,.8)) drop-shadow(0 0 60px rgba(0,255,0,.5)) brightness(1.2) !important;
}
.avatar3d--playing .avatar3d-ring--play {
  border-color: rgba(80, 255, 80, .5) !important;
  box-shadow: 0 0 12px rgba(0, 255, 0, .2);
}
.avatar3d--playing .avatar3d-label--play {
  animation: mixer-rec-blink 1s infinite;
  color: #44ff44 !important;
}

/* ═══ AVATAR STOP BLANC — CARRÉ 3D ═══ */
.avatar3d-head--stop {
  width: 50px !important;
  height: 50px !important;
  border-radius: 8px !important;
  background:
    linear-gradient(145deg, #ffffff 0%, #e8e8e8 25%, #cccccc 50%, #b0b0b0 75%, #999 100%) !important;
  box-shadow:
    0 6px 24px rgba(255,255,255,.35),
    0 0 40px rgba(255,255,255,.15),
    inset 0 2px 6px rgba(255,255,255,.9),
    inset 0 -4px 10px rgba(0,0,0,.25),
    inset 4px 0 8px rgba(255,255,255,.4),
    inset -4px 0 8px rgba(0,0,0,.15) !important;
  border: 2px solid rgba(255,255,255,.6) !important;
  animation: avatar3d-idle 3s ease-in-out infinite;
  position: relative;
}
/* Reflet 3D brillant en haut à gauche */
.avatar3d-head--stop::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 55%;
  height: 40%;
  border-radius: 6px 6px 50% 0;
  background: linear-gradient(160deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.2) 40%, transparent 100%);
  pointer-events: none;
}
/* Éclat de lumière */
.avatar3d-head--stop::after {
  content: '';
  position: absolute;
  bottom: 6px; right: 6px;
  width: 30%;
  height: 25%;
  border-radius: 4px;
  background: radial-gradient(circle, rgba(255,255,255,.3) 0%, transparent 70%);
  pointer-events: none;
}

/* Visage sur carré blanc */
.avatar3d-face--stop {
  justify-content: center !important;
}
.avatar3d-eye--stop {
  background: radial-gradient(circle at 40% 35%, #222 30%, #444 60%, #666 100%) !important;
  box-shadow: 0 0 4px rgba(0,0,0,.4), inset 0 1px 1px rgba(255,255,255,.5) !important;
}
.avatar3d-eye--stop.avatar3d-eye--l { left: 28% !important; top: 36% !important; }
.avatar3d-eye--stop.avatar3d-eye--r { right: 28% !important; top: 36% !important; }
.avatar3d-mouth--stop {
  bottom: 26% !important;
  width: 14px !important;
  height: 3px !important;
  background: #555 !important;
  border-radius: 2px !important;
}

.avatar3d-glow--stop {
  background: radial-gradient(circle, rgba(255,255,255,.2) 0%, transparent 70%) !important;
}
.avatar3d-ring--stop {
  border-color: rgba(255, 255, 255, .2) !important;
  border-width: 2px !important;
}
.avatar3d-label--stop {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255,255,255,.6), 0 0 20px rgba(255,255,255,.3), 0 1px 2px rgba(0,0,0,.8) !important;
  letter-spacing: 3px !important;
}

/* Hover Stop */
.studio-avatar-3d--stop:hover .avatar3d-glow--stop { opacity: 1; }
.studio-avatar-3d--stop:hover .avatar3d-head--stop {
  box-shadow:
    0 6px 30px rgba(255,255,255,.5),
    0 0 50px rgba(255,255,255,.25),
    inset 0 2px 6px rgba(255,255,255,.95),
    inset 0 -4px 10px rgba(0,0,0,.2),
    inset 4px 0 8px rgba(255,255,255,.5),
    inset -4px 0 8px rgba(0,0,0,.1) !important;
  border-color: rgba(255,255,255,.8) !important;
}

/* État actif Stop (quand il arrête) */
.avatar3d--stopping .avatar3d-eye--stop {
  background: radial-gradient(circle at 35% 35%, #000 20%, #333 50%, #555 100%) !important;
  box-shadow: 0 0 8px rgba(0,0,0,.6), 0 0 12px rgba(255,255,255,.3) !important;
}
.avatar3d--stopping .avatar3d-head--stop {
  box-shadow:
    0 6px 30px rgba(255,255,255,.6),
    0 0 60px rgba(255,255,255,.35),
    0 0 90px rgba(255,255,255,.1),
    inset 0 2px 6px rgba(255,255,255,1),
    inset 0 -4px 10px rgba(0,0,0,.2) !important;
  background: linear-gradient(145deg, #fff 0%, #f0f0f0 30%, #ddd 60%, #ccc 100%) !important;
}
.avatar3d--stopping .avatar3d-ring--stop {
  border-color: rgba(255,255,255,.5) !important;
  box-shadow: 0 0 14px rgba(255,255,255,.3);
}
.avatar3d--stopping .avatar3d-label--stop {
  animation: avatar3d-stop-flash .6s ease;
  color: #fff !important;
}

@keyframes avatar3d-stop-flash {
  0% { opacity: 1; text-shadow: 0 0 20px #fff, 0 0 40px #fff; }
  50% { opacity: .4; text-shadow: 0 0 4px rgba(255,255,255,.3); }
  100% { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,.6), 0 0 20px rgba(255,255,255,.3); }
}

/* Responsive */
@media (max-width: 768px) {
  .studio-avatars-row { gap: 14px; }
  .avatar3d-scene { width: 56px; height: 56px; }
  .avatar3d-head { width: 44px; height: 44px; }
  .avatar3d-ring { width: 52px; height: 52px; }
  .avatar3d-eye { width: 6px; height: 6px; }
  .avatar3d-mouth { width: 10px; }
  .avatar3d-hp-band { width: 38px; height: 16px; }
  .avatar3d-hp-pad { width: 11px; height: 16px; }
}

/* Fond d'écran personnalisé pour la page studio */
body.studio-bg {
  background: url('/images/studio-animer.webp') no-repeat center center fixed;
  background-size: cover;
}

.studio-blank-stage {
  position: relative;
  min-height: 100vh;
}

.studio-connect-screen {
  position: absolute;
  left: 49.5%;
  top: 32.5%;
  transform: translate(-50%, -50%);
  width: 639px;
  height: 300px;
  max-width: 95vw;
  background: #05050c;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #7c3aed44;
  box-shadow: 0 10px 28px #05050c88;
  z-index: 10;
}

/* ── Toolbar redimensionnement studio ── */
.studio-resize-toolbar {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10,10,30,.85);
  border: 1px solid #7c3aed;
  border-radius: 10px;
  padding: 6px 12px;
  backdrop-filter: blur(8px);
}
.studio-resize-toolbar button {
  width: 28px;
  height: 28px;
  border: 1px solid #8b5cf6;
  border-radius: 6px;
  background: #1e1b4b;
  color: #c4b5fd;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.studio-resize-toolbar button:hover { background: #7c3aed; color: #fff; }
.studio-resize-label {
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 700;
  margin-right: 4px;
}
.studio-resize-toolbar span {
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
}
.studio-resize-sep {
  color: #8b5cf6;
  font-size: 14px;
  margin: 0 2px;
}

.studio-connect-screen-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  background: #11112acc;
  color: #ddd6fe;
  border: 1px solid #7c3aed66;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.studio-connect-screen-viewport {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, #1a1a40 0%, #0b0b1d 40%, #05050c 100%);
  border-radius: 12px;
  overflow: hidden;
}

/* ═══ Caméra USB — vidéo + panneau ═══ */
.studio-cam-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: none;
  border-radius: 11px;
}

.studio-cam-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 8px 12px 10px;
  background: linear-gradient(0deg, #05050cee 0%, #05050cbb 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-cam-panel-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-cam-icon {
  font-size: 16px;
  filter: drop-shadow(0 0 4px #0af4);
}

.studio-cam-panel select {
  flex: 1;
  background: #111 !important;
  color: #0ff;
  border: 1px solid #0af4 !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  width: auto !important;
}

.studio-cam-btn-sm {
  background: #222 !important;
  color: #aaa;
  border: 1px solid #555 !important;
  border-radius: 4px !important;
  padding: 2px 8px !important;
  font-size: 13px;
  cursor: pointer;
  width: auto !important;
  transition: background .15s;
}
.studio-cam-btn-sm:hover { background: #444 !important; color: #fff; }

.studio-cam-btn-connect {
  background: linear-gradient(180deg, #0a5a8a 0%, #06304a 100%) !important;
  color: #0df;
  border: 1px solid #0af6 !important;
  border-radius: 4px !important;
  padding: 4px 14px !important;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: auto !important;
  box-shadow: 0 0 8px #0af3;
  transition: all .15s;
}
.studio-cam-btn-connect:hover {
  background: linear-gradient(180deg, #0d7ab0 0%, #0a5a8a 100%) !important;
  box-shadow: 0 0 14px #0af5;
}

.studio-cam-btn-disconnect {
  background: linear-gradient(180deg, #7a2020 0%, #4a1010 100%) !important;
  color: #faa;
  border: 1px solid #f446 !important;
  border-radius: 4px !important;
  padding: 4px 14px !important;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: auto !important;
  box-shadow: 0 0 8px #f003;
  transition: all .15s;
}
.studio-cam-btn-disconnect:hover {
  background: linear-gradient(180deg, #a03030 0%, #7a2020 100%) !important;
}

.studio-cam-status {
  color: #0f8;
  font-size: 10px;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 6px #0f84;
}

.studio-cam-help {
  color: #888;
  font-size: 9px;
  line-height: 1.4;
  border-top: 1px solid #ffffff10;
  padding-top: 4px;
  margin-top: 2px;
}
.studio-cam-help strong {
  color: #bbb;
}

/* ═══════ TABLE DE MIXAGE RÉALISTE ═══════ */
.mixer-console {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(1100px, 98vw);
  height: min(340px, 42vh);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  z-index: 40;
  box-shadow: 0 -6px 40px #000a, 0 0 80px #0008;
  border: 1px solid #444;
  border-bottom: none;
}

.mixer-console-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  pointer-events: none;
  z-index: 0;
  filter: brightness(0.85) contrast(1.05) saturate(1.1);
}

/* Top bar */
.mixer-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg, #1a1a1aee 0%, #1a1a1acc 100%);
  border-bottom: 1px solid #333;
}

.mixer-device-zone {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mixer-label {
  color: #ccc;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.mixer-device-zone select {
  background: #111 !important;
  color: #0f0;
  border: 1px solid #444 !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  max-width: 220px;
  width: auto !important;
}

.mixer-btn-sm {
  background: #222;
  color: #aaa;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.mixer-btn-sm:hover { background: #333; color: #fff; }

.mixer-btn-connect {
  background: linear-gradient(180deg, #1a6b1a 0%, #0d4a0d 100%);
  color: #0f0;
  border: 1px solid #2a2;
  border-radius: 4px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 6px #0f04;
  transition: all .15s;
}
.mixer-btn-connect:hover {
  background: linear-gradient(180deg, #28a028 0%, #1a6b1a 100%);
  box-shadow: 0 0 12px #0f06;
}

.mixer-status {
  color: #0f8;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 6px #0f84;
  white-space: nowrap;
}

/* ── Faders zone ── */
.mixer-faders-zone {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding: 14px 18px 8px;
  height: calc(100% - 110px);
  background: transparent;
  border-top: none;
  border-bottom: none;
}

/* Reset global styles leaking into mixer controls */
.mixer-console input,
.mixer-console select,
.mixer-console button {
  width: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

.mixer-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 62px;
  flex-shrink: 0;
  padding: 6px 4px 4px;
  background: transparent;
  border-radius: 0;
  border: none;
}

.mixer-ch-label {
  color: #999;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px #000;
}
.mixer-ch-label--master {
  color: #f44;
  font-size: 10px;
}

/* VU meter */
.mixer-vu {
  width: 8px;
  height: 50px;
  background: #111;
  border: 1px solid #333;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 4px #000;
}
.mixer-vu--master {
  width: 12px;
  height: 60px;
}

.mixer-vu-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: #00ff88;
  border-radius: 1px;
  transition: height .06s linear;
  box-shadow: 0 0 4px currentColor;
}

/* Vertical fader (slider) — realistic console style */
.mixer-fader {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 28px !important;
  height: 100px;
  background: transparent !important;
  cursor: ns-resize;
  position: relative;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

.mixer-fader::-webkit-slider-runnable-track {
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #555 0%, #222 100%);
  border: 1px solid #111;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px #000;
}

.mixer-fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 12px;
  background: linear-gradient(180deg, #ddd 0%, #888 30%, #666 50%, #888 70%, #ddd 100%);
  border: 1px solid #333;
  border-radius: 2px;
  box-shadow: 0 2px 6px #0008, inset 0 1px 0 #fff4;
  cursor: grab;
  margin-left: -10px;
}
.mixer-fader::-webkit-slider-thumb:active { cursor: grabbing; }

.mixer-fader::-moz-range-track {
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #555 0%, #222 100%);
  border: 1px solid #111;
  border-radius: 3px;
}

.mixer-fader::-moz-range-thumb {
  width: 26px;
  height: 12px;
  background: linear-gradient(180deg, #ddd 0%, #888 30%, #666 50%, #888 70%, #ddd 100%);
  border: 1px solid #333;
  border-radius: 2px;
  box-shadow: 0 2px 6px #0008, inset 0 1px 0 #fff4;
  cursor: grab;
}

.mixer-fader--master {
  height: 120px;
}
.mixer-fader--master::-webkit-slider-thumb {
  background: linear-gradient(180deg, #fdd 0%, #c44 30%, #a22 50%, #c44 70%, #fdd 100%);
  border-color: #822;
  width: 30px;
  height: 14px;
}
.mixer-fader--master::-moz-range-thumb {
  background: linear-gradient(180deg, #fdd 0%, #c44 30%, #a22 50%, #c44 70%, #fdd 100%);
  border-color: #822;
  width: 30px;
  height: 14px;
}

/* Pan knob (small horizontal slider) */
.mixer-pan {
  -webkit-appearance: none;
  appearance: none;
  width: 38px !important;
  height: 12px;
  background: #222 !important;
  border: 1px solid #444 !important;
  border-radius: 6px !important;
  cursor: ew-resize;
  outline: none;
  padding: 0 !important;
  margin: 2px 0 !important;
}
.mixer-pan::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #fff 20%, #888 100%);
  border: 1px solid #333;
  border-radius: 50%;
  cursor: grab;
}
.mixer-pan::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #fff 20%, #888 100%);
  border: 1px solid #333;
  border-radius: 50%;
  cursor: grab;
}

/* Mute / Solo buttons */
.mixer-mute, .mixer-solo {
  width: 24px !important;
  height: 18px;
  font-size: 9px;
  font-weight: 900;
  border: 1px solid #444 !important;
  border-radius: 3px !important;
  cursor: pointer;
  text-transform: uppercase;
  padding: 0 !important;
  margin: 1px 0 !important;
  transition: all .12s;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mixer-mute {
  background: #333;
  color: #888;
}
.mixer-mute.active {
  background: #d44;
  color: #fff;
  border-color: #f66;
  box-shadow: 0 0 6px #f004;
}
.mixer-solo {
  background: #333;
  color: #888;
}
.mixer-solo.active {
  background: #cc0;
  color: #000;
  border-color: #ee2;
  box-shadow: 0 0 6px #ff04;
}

/* Master separator */
.mixer-master-sep {
  width: 2px;
  height: 80%;
  background: linear-gradient(180deg, transparent, #555, transparent);
  align-self: center;
  margin: 0 6px;
}

.mixer-master {
  width: 72px;
  background: rgba(60, 10, 10, 0.35);
  border-color: rgba(255, 60, 60, 0.15);
}

/* ── Transport ── */
.mixer-transport {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 0;
  background: linear-gradient(0deg, #111e 0%, #1119 100%);
}

.mixer-transport-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  position: relative;
  /* 3D illusion */
  background: radial-gradient(ellipse at 35% 25%, #555 0%, #2a2a2a 50%, #111 100%);
  box-shadow:
    0 6px 14px rgba(0,0,0,.7),
    0 2px 4px rgba(0,0,0,.5),
    inset 0 2px 3px rgba(255,255,255,.12),
    inset 0 -2px 4px rgba(0,0,0,.4);
}
.mixer-transport-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 2px 6px rgba(0,0,0,.6),
    inset 0 2px 6px rgba(0,0,0,.5);
}

.mixer-btn-rew {
  background: radial-gradient(ellipse at 35% 25%, #555 0%, #2a2a2a 50%, #111 100%);
  color: #bbb;
}
.mixer-btn-rew:hover {
  background: radial-gradient(ellipse at 35% 25%, #666 0%, #3a3a3a 50%, #1a1a1a 100%);
  color: #fff;
  box-shadow:
    0 6px 18px rgba(0,0,0,.7),
    0 0 10px rgba(255,255,255,.06),
    inset 0 2px 3px rgba(255,255,255,.15),
    inset 0 -2px 4px rgba(0,0,0,.4);
}

.mixer-btn-play {
  background: radial-gradient(ellipse at 35% 25%, #2a5a2a 0%, #1a3a1a 50%, #0a1a0a 100%);
  color: #4eff4e;
  border: 1px solid #2a7a2a55;
  box-shadow:
    0 6px 14px rgba(0,0,0,.7),
    0 0 8px rgba(0,255,0,.1),
    inset 0 2px 3px rgba(100,255,100,.12),
    inset 0 -2px 4px rgba(0,0,0,.4);
}
.mixer-btn-play:hover {
  background: radial-gradient(ellipse at 35% 25%, #3a7a3a 0%, #2a5a2a 50%, #1a3a1a 100%);
  box-shadow:
    0 6px 20px rgba(0,0,0,.7),
    0 0 16px rgba(0,255,0,.2),
    inset 0 2px 3px rgba(100,255,100,.18),
    inset 0 -2px 4px rgba(0,0,0,.4);
  color: #6fff6f;
}

.mixer-btn-stop {
  background: radial-gradient(ellipse at 35% 25%, #555 0%, #2a2a2a 50%, #111 100%);
  color: #ccc;
}
.mixer-btn-stop:hover:not(:disabled) {
  background: radial-gradient(ellipse at 35% 25%, #666 0%, #3a3a3a 50%, #1a1a1a 100%);
  color: #fff;
  box-shadow:
    0 6px 18px rgba(0,0,0,.7),
    0 0 10px rgba(255,255,255,.06),
    inset 0 2px 3px rgba(255,255,255,.15),
    inset 0 -2px 4px rgba(0,0,0,.4);
}
.mixer-btn-stop:disabled { opacity: .4; cursor: default; }

/* ── REC button : gros, rouge, lumineux ── */
.mixer-btn-rec {
  width: 64px;
  height: 64px;
  font-size: 26px;
  margin: 0 6px;
  background: radial-gradient(ellipse at 35% 25%, #cc3333 0%, #881111 45%, #440000 100%);
  color: #ff6666;
  border: 2px solid #ff333344;
  box-shadow:
    0 6px 18px rgba(0,0,0,.7),
    0 0 20px rgba(255,0,0,.2),
    0 0 40px rgba(255,0,0,.08),
    inset 0 2px 4px rgba(255,150,150,.2),
    inset 0 -3px 6px rgba(0,0,0,.5);
}
.mixer-btn-rec:hover:not(:disabled) {
  background: radial-gradient(ellipse at 35% 25%, #ee4444 0%, #aa2222 45%, #660000 100%);
  color: #ff8888;
  box-shadow:
    0 6px 22px rgba(0,0,0,.7),
    0 0 30px rgba(255,0,0,.35),
    0 0 60px rgba(255,0,0,.12),
    inset 0 2px 4px rgba(255,180,180,.25),
    inset 0 -3px 6px rgba(0,0,0,.5);
  transform: scale(1.05);
}
.mixer-btn-rec:active:not(:disabled) {
  transform: scale(0.96) translateY(2px);
  box-shadow:
    0 2px 8px rgba(0,0,0,.7),
    0 0 15px rgba(255,0,0,.2),
    inset 0 3px 8px rgba(0,0,0,.6);
}
.mixer-btn-rec:disabled { opacity: .35; cursor: default; }
.mixer-btn-rec.recording {
  animation: rec-pulse-3d 1.2s ease-in-out infinite;
  background: radial-gradient(ellipse at 35% 25%, #ff4444 0%, #cc0000 45%, #660000 100%);
  color: #fff;
  border-color: #ff4444aa;
}

@keyframes rec-pulse-3d {
  0%, 100% {
    box-shadow:
      0 6px 18px rgba(0,0,0,.7),
      0 0 20px rgba(255,0,0,.25),
      inset 0 2px 4px rgba(255,150,150,.2),
      inset 0 -3px 6px rgba(0,0,0,.5);
  }
  50% {
    box-shadow:
      0 6px 24px rgba(0,0,0,.7),
      0 0 50px rgba(255,0,0,.5),
      0 0 80px rgba(255,0,0,.15),
      inset 0 2px 4px rgba(255,180,180,.3),
      inset 0 -3px 6px rgba(0,0,0,.5);
  }
}

/* ── Output zone ── */
.mixer-output-zone {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 14px 8px;
  background: #111c;
  flex-wrap: wrap;
}

.mixer-output-zone video {
  height: 120px;
  max-width: 220px;
  border-radius: 6px;
  background: #000;
}

.mixer-rec-timer {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #ff3333;
  font-weight: bold;
  text-shadow: 0 0 8px #ff000088;
  animation: mixer-rec-blink 1s infinite;
}
@keyframes mixer-rec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.mixer-btn-play.recording {
  background: radial-gradient(ellipse at 35% 25%, #2a7a2a 0%, #1a5a1a 50%, #0a2a0a 100%) !important;
  color: #4eff4e !important;
  border-color: #0f0 !important;
  animation: play-pulse-3d 1s infinite;
}
@keyframes play-pulse-3d {
  0%, 100% {
    box-shadow:
      0 6px 14px rgba(0,0,0,.7),
      0 0 10px rgba(0,255,0,.15),
      inset 0 2px 3px rgba(100,255,100,.12),
      inset 0 -2px 4px rgba(0,0,0,.4);
  }
  50% {
    box-shadow:
      0 6px 20px rgba(0,0,0,.7),
      0 0 30px rgba(0,255,0,.3),
      0 0 50px rgba(0,255,0,.1),
      inset 0 2px 3px rgba(100,255,100,.2),
      inset 0 -2px 4px rgba(0,0,0,.4);
  }
}

.mixer-download-link {
  color: #6cf;
  font-size: 11px;
  text-decoration: underline;
}
.mixer-download-link:hover { color: #9df; }

.mixer-download-mp4 {
  color: #4ade80;
  font-weight: bold;
  font-size: 12px;
}
.mixer-download-mp4:hover { color: #86efac; }

.mixer-convert-btn {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #fff !important;
  border: 1px solid #3b82f666 !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-size: 11px !important;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.mixer-convert-btn:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  transform: scale(1.05);
}
.mixer-convert-btn:disabled {
  opacity: .5;
  cursor: wait;
}

.mixer-convert-status {
  font-size: 10px;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}

#mixerConvertZone {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Responsive mixer ── */
@media (max-width: 768px) {
  .mixer-console {
    width: 100vw;
    height: min(300px, 46vh);
    border-radius: 10px 10px 0 0;
  }
  .mixer-transport-btn { width: 38px; height: 38px; font-size: 14px; }
  .mixer-btn-rec { width: 52px; height: 52px; font-size: 20px; }
  .mixer-3ch { right: 8px; bottom: 20px; gap: 8px; }
}

/* ═══════════════════════════════════════════════
   PANNEAU FOCUSRITE — Configuration carte son
   ═══════════════════════════════════════════════ */

/* ── Bouton d'ouverture ── */
.fr-open-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 12;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #c22 0%, #e44 100%);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  transition: transform .15s, box-shadow .15s;
}
.fr-open-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(200,30,30,.5);
}

/* ── Panneau principal ── */
.focusrite-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 2px solid #c22;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(200,30,30,.35), 0 8px 32px rgba(0,0,0,.6);
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #eee;
}

/* ── Header ── */
.fr-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #c22 0%, #911 100%);
  border-radius: 14px 14px 0 0;
}
.fr-logo {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}
.fr-model {
  flex: 1;
  font-size: 13px;
  color: rgba(255,255,255,.7);
}
.fr-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s;
}
.fr-close:hover { background: rgba(0,0,0,.6); }

/* ── Body ── */
.fr-body {
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Sections ── */
.fr-section {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 14px;
}
.fr-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #c22;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ── Knob rows ── */
.fr-knob-row,
.fr-monitor-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}
.fr-knob-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fr-knob-label {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Knob (range input → rotary look) ── */
.fr-knob-wrap {
  position: relative;
  width: 64px;
  height: 64px;
}
.fr-knob {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 0; left: 0;
  width: 64px;
  height: 64px;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  opacity: 0;  /* invisible, superposed on ring */
}
.fr-knob-ring {
  position: absolute;
  top: 0; left: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(
    #c22 0deg,
    #e55 calc(var(--angle, 135deg)),
    #333 calc(var(--angle, 135deg)),
    #333 360deg
  );
  box-shadow: inset 0 0 0 8px #1a1a1a, 0 2px 8px rgba(0,0,0,.5);
  pointer-events: none;
  transition: background .08s;
}
.fr-knob-ring::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 6px;
  height: 22px;
  background: #fff;
  border-radius: 3px;
  transform-origin: center bottom;
  transform: translate(-50%, -100%) rotate(calc(var(--angle, 135deg) - 180deg));
  box-shadow: 0 0 4px rgba(200,30,30,.6);
}
.fr-knob-val {
  font-size: 12px;
  font-weight: 600;
  color: #e55;
  font-variant-numeric: tabular-nums;
  min-width: 50px;
  text-align: center;
}

/* ── Toggles ── */
.fr-toggle-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.fr-toggle-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fr-toggle-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.5);
}
.fr-toggle {
  width: 52px;
  height: 26px;
  border: 2px solid #555;
  border-radius: 13px;
  background: #333;
  color: #888;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.fr-toggle[data-active="true"] {
  background: #2a6;
  border-color: #2a6;
  color: #fff;
  box-shadow: 0 0 10px rgba(40,160,100,.4);
}
.fr-toggle--phantom[data-active="true"] {
  background: #e83;
  border-color: #e83;
  box-shadow: 0 0 10px rgba(230,130,50,.4);
}
.fr-toggle--air[data-active="true"] {
  background: #38c;
  border-color: #38c;
  box-shadow: 0 0 10px rgba(50,130,200,.4);
}
.fr-toggle--pad[data-active="true"] {
  background: #a5a;
  border-color: #a5a;
  box-shadow: 0 0 10px rgba(160,80,160,.4);
}
.fr-toggle--monitor[data-active="true"] {
  background: #c22;
  border-color: #c22;
  box-shadow: 0 0 10px rgba(200,30,30,.4);
}

/* ── Selects ── */
.fr-select-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.fr-select-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fr-select-label {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.fr-select {
  padding: 6px 10px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #222;
  color: #eee;
  font-size: 13px;
  cursor: pointer;
  min-width: 130px;
}
.fr-select:focus {
  border-color: #c22;
  outline: none;
  box-shadow: 0 0 6px rgba(200,30,30,.3);
}

/* ── Meters ── */
.fr-meter-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.fr-meter-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 120px;
}
.fr-meter-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
}
.fr-meter {
  position: relative;
  width: 100%;
  height: 12px;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #444;
}
.fr-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, #2a6 0%, #ee0 60%, #e33 90%);
  transition: width .06s linear;
}
.fr-meter-fill--out {
  background: linear-gradient(90deg, #38c 0%, #6cf 60%, #fff 90%);
}
.fr-meter-clip {
  position: absolute;
  top: 1px; right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  border: 1px solid #555;
  transition: background .1s;
}
.fr-meter-clip.clipping {
  background: #f22;
  border-color: #f44;
  box-shadow: 0 0 6px rgba(255,30,30,.6);
}
.fr-meter-db {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #aaa;
  min-width: 60px;
  text-align: center;
}

/* ── Bouton Appliquer ── */
.fr-apply-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 4px;
}
.fr-apply-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #c22 0%, #e44 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(200,30,30,.35);
  transition: transform .12s, box-shadow .12s;
}
.fr-apply-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 5px 18px rgba(200,30,30,.5);
}
.fr-apply-btn:active {
  transform: scale(.97);
}
.fr-apply-info {
  font-size: 12px;
  color: #2a6;
  font-weight: 600;
  min-width: 100px;
}

/* ── Scrollbar du panneau ── */
.focusrite-panel::-webkit-scrollbar { width: 6px; }
.focusrite-panel::-webkit-scrollbar-track { background: transparent; }
.focusrite-panel::-webkit-scrollbar-thumb { background: #c22; border-radius: 3px; }

/* ── Responsive Focusrite ── */
@media (max-width: 560px) {
  .focusrite-panel {
    width: 96vw;
    max-height: 88vh;
  }
  .fr-knob-row, .fr-monitor-row { gap: 16px; }
  .fr-toggle-row { gap: 10px; }
}

/* ═══════ 3 CANAUX EN BAS À DROITE ═══════ */
.mixer-3ch {
  position: absolute;
  right: 20px;
  bottom: 30px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

/* ═══════════════════════════════════════════════
   AVATAR SLIDER 3D — le slider EST un avatar
   La tête = curseur, le corps = piste, la base = socle
   ═══════════════════════════════════════════════ */

/* Conteneur principal */
.av-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 86px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

/* ══════ CUBE 3D ══════ */
.av-cube {
  width: 80px;
  height: 200px;
  position: relative;
  perspective: 600px;
  transform-style: preserve-3d;
  /* légère rotation par défaut pour voir les faces latérales */
  transform: rotateX(-2deg) rotateY(-8deg);
  transition: transform .4s ease-out;
}
.av-cube:hover {
  transform: rotateX(-4deg) rotateY(-12deg);
}

.av-cube-face {
  position: absolute;
  backface-visibility: visible;
  pointer-events: none;
}

/* ── FRONT face (face avant, vitre nette) ── */
.av-cube-face--front {
  width: 80px;
  height: 200px;
  top: 0; left: 0;
  transform: translateZ(20px);
  background: linear-gradient(180deg,
    rgba(255,255,255,.03) 0%,
    transparent 40%,
    rgba(255,255,255,.04) 100%);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  box-shadow:
    inset 0 0 12px rgba(255,255,255,.02),
    0 0 10px rgba(0,0,0,.2);
}
/* Reflet diagonal discret sur le verre */
.av-cube-face--front::before {
  content: '';
  position: absolute;
  top: 8px; left: 6px;
  width: 20px;
  height: 40%;
  background: linear-gradient(155deg,
    rgba(255,255,255,.06) 0%,
    transparent 50%);
  border-radius: 4px;
  pointer-events: none;
}

/* ── BACK face ── */
.av-cube-face--back {
  width: 80px;
  height: 200px;
  top: 0; left: 0;
  transform: translateZ(-20px) rotateY(180deg);
  background: linear-gradient(180deg,
    rgba(0,0,0,.6) 0%,
    rgba(0,0,0,.8) 100%);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 6px;
}

/* ── LEFT face ── */
.av-cube-face--left {
  width: 40px;
  height: 200px;
  top: 0;
  left: -20px;
  transform: rotateY(-90deg);
  transform-origin: right center;
  background: linear-gradient(180deg,
    rgba(255,255,255,.03) 0%,
    rgba(0,0,0,.4) 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
}

/* ── RIGHT face ── */
.av-cube-face--right {
  width: 40px;
  height: 200px;
  top: 0;
  right: -20px;
  transform: rotateY(90deg);
  transform-origin: left center;
  background: linear-gradient(180deg,
    rgba(0,0,0,.2) 0%,
    rgba(0,0,0,.5) 100%);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 4px;
}

/* ── TOP face ── */
.av-cube-face--top {
  width: 80px;
  height: 40px;
  top: -20px;
  left: 0;
  transform: rotateX(90deg);
  transform-origin: center bottom;
  background: linear-gradient(180deg,
    rgba(255,255,255,.08) 0%,
    rgba(255,255,255,.02) 100%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
}

/* ── BOTTOM face ── */
.av-cube-face--bottom {
  width: 80px;
  height: 40px;
  bottom: -20px;
  left: 0;
  transform: rotateX(-90deg);
  transform-origin: center top;
  background: linear-gradient(0deg,
    rgba(0,0,0,.6) 0%,
    rgba(0,0,0,.3) 100%);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 4px;
}

/* ── Variante DARK : arêtes bleutées ── */
.av-cube--dark .av-cube-face--front {
  border-color: rgba(80,140,255,.2);
  box-shadow:
    inset 0 0 20px rgba(60,120,255,.04),
    0 0 12px rgba(60,120,255,.08),
    0 4px 20px rgba(0,0,0,.4);
}
.av-cube--dark .av-cube-face--left,
.av-cube--dark .av-cube-face--right {
  border-color: rgba(80,140,255,.12);
}
.av-cube--dark .av-cube-face--top {
  border-color: rgba(80,140,255,.15);
  background: linear-gradient(180deg,
    rgba(60,120,255,.08) 0%,
    rgba(60,120,255,.02) 100%);
}

/* ── Variante RED : arêtes rouges ── */
.av-cube--red .av-cube-face--front {
  border-color: rgba(255,60,60,.25);
  box-shadow:
    inset 0 0 20px rgba(255,0,0,.05),
    0 0 15px rgba(255,0,0,.1),
    0 4px 20px rgba(0,0,0,.4);
}
.av-cube--red .av-cube-face--front::before {
  background: linear-gradient(155deg,
    rgba(255,150,150,.08) 0%,
    transparent 50%);
}
.av-cube--red .av-cube-face--left,
.av-cube--red .av-cube-face--right {
  border-color: rgba(255,40,40,.12);
}
.av-cube--red .av-cube-face--top {
  border-color: rgba(255,40,40,.18);
  background: linear-gradient(180deg,
    rgba(255,0,0,.08) 0%,
    rgba(255,0,0,.02) 100%);
}
.av-cube--red .av-cube-face--back {
  background: linear-gradient(180deg,
    rgba(40,0,0,.6) 0%,
    rgba(20,0,0,.8) 100%);
}

/* ── Hover : le cube brille plus ── */
.av-slider:hover .av-cube--dark .av-cube-face--front {
  border-color: rgba(80,160,255,.35);
  box-shadow:
    inset 0 0 30px rgba(60,140,255,.08),
    0 0 25px rgba(60,140,255,.15),
    0 4px 25px rgba(0,0,0,.5);
}
.av-slider:hover .av-cube--red .av-cube-face--front {
  border-color: rgba(255,80,80,.4);
  box-shadow:
    inset 0 0 30px rgba(255,0,0,.08),
    0 0 25px rgba(255,0,0,.18),
    0 4px 25px rgba(0,0,0,.5);
}

/* ── VU Active : le cube pulse ── */
.av-slider--vu-active .av-cube--dark .av-cube-face--front {
  box-shadow:
    inset 0 0 30px rgba(0,255,136,.06),
    0 0 20px rgba(0,255,136,.1),
    0 4px 20px rgba(0,0,0,.4);
  border-color: rgba(0,255,136,.2);
}
.av-slider--vu-active .av-cube--red .av-cube-face--front {
  box-shadow:
    inset 0 0 30px rgba(255,80,0,.08),
    0 0 20px rgba(255,50,0,.12),
    0 4px 20px rgba(0,0,0,.4);
  border-color: rgba(255,80,40,.25);
}

/* ═══════════════════════════════════════════════
   FUMÉE RÉACTIVE À L'INTÉRIEUR DU CUBE
   ═══════════════════════════════════════════════ */

/* Conteneur fumée — remplit le cube */
.cube-smoke {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.cube-smoke--active {
  opacity: 1;
}

/* Particule de fumée individuelle — ÉCLATANTE */
.smoke-p {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  filter: blur(4px);         /* blur réduit → couleurs plus VIVES */
  mix-blend-mode: screen;
  will-change: transform, opacity, background, box-shadow;
  transition: transform .08s ease-out, opacity .08s ease-out, background .12s, box-shadow .12s;
}

/* Positions de départ — particules plus grosses et mieux réparties */
.smoke-p[data-sp="0"] { left: 8%;  bottom: 3%;  width: 32px; height: 32px; }
.smoke-p[data-sp="1"] { left: 56%; bottom: 6%;  width: 28px; height: 28px; }
.smoke-p[data-sp="2"] { left: 22%; bottom: 15%; width: 26px; height: 26px; }
.smoke-p[data-sp="3"] { left: 62%; bottom: 20%; width: 30px; height: 30px; }
.smoke-p[data-sp="4"] { left: 12%; bottom: 32%; width: 28px; height: 28px; }
.smoke-p[data-sp="5"] { left: 48%; bottom: 38%; width: 34px; height: 34px; }
.smoke-p[data-sp="6"] { left: 28%; bottom: 52%; width: 24px; height: 24px; }
.smoke-p[data-sp="7"] { left: 42%; bottom: 62%; width: 30px; height: 30px; }

/* Fumée qui déborde par le haut — CHEMINÉE ROUGE */
.cube-smoke-overflow {
  position: absolute;
  top: -40px;
  left: -8px;
  right: -8px;
  height: 50px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
  overflow: visible;
}
.cube-smoke-overflow--active {
  opacity: 1;
}
.cube-smoke-overflow::before,
.cube-smoke-overflow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  mix-blend-mode: screen;
  background: var(--oc, rgba(255, 20, 5, 0.8));
}
/* Grosse boule centrale */
.cube-smoke-overflow::before {
  width: 44px; height: 44px;
  left: 18%; bottom: 0;
  animation: smoke-chimney1 0.9s ease-out infinite;
}
/* Deuxième boule décalée */
.cube-smoke-overflow::after {
  width: 36px; height: 36px;
  left: 48%; bottom: 0;
  animation: smoke-chimney2 1.1s ease-out infinite;
}

/* dB indicator */
.cube-smoke-db {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Consolas', monospace;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s, color .2s;
}
.cube-smoke-db--active {
  opacity: 1;
}

/* ── Animations fumée ÉCLATANTE ── */
@keyframes smoke-rise {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: .8; }
  40%  { transform: translateY(-35px) scale(1.3); opacity: .6; }
  70%  { transform: translateY(-65px) scale(1.6); opacity: .3; }
  100% { transform: translateY(-100px) scale(2); opacity: 0; }
}

/* Cheminée boule 1 — monte haut, grosse */
@keyframes smoke-chimney1 {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  10%  { opacity: .9; transform: scale(1); }
  30%  { transform: translateY(-25px) scale(1.3); opacity: .85; }
  60%  { transform: translateY(-55px) scale(1.7); opacity: .5; }
  85%  { transform: translateY(-80px) scale(2.0); opacity: .2; }
  100% { transform: translateY(-100px) scale(2.2); opacity: 0; }
}

/* Cheminée boule 2 — décalée, différente */
@keyframes smoke-chimney2 {
  0%   { transform: translateY(0) translateX(0) scale(0.5); opacity: 0; }
  15%  { opacity: .85; transform: scale(0.9); }
  40%  { transform: translateY(-30px) translateX(-8px) scale(1.4); opacity: .7; }
  70%  { transform: translateY(-65px) translateX(5px) scale(1.8); opacity: .35; }
  100% { transform: translateY(-90px) translateX(-3px) scale(2.1); opacity: 0; }
}

@keyframes smoke-escape {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  20%  { opacity: .8; }
  60%  { transform: translateY(-30px) scale(1.6); opacity: .5; }
  100% { transform: translateY(-55px) scale(2); opacity: 0; }
}

@keyframes smoke-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

/* Scène 3D — maintenant à l'intérieur du cube */
.av-slider-scene {
  width: 72px;
  height: 180px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  margin: 10px auto;
  transform-style: preserve-3d;
  pointer-events: auto;
}

/* ──── TÊTE (= curseur du slider) ──────────── */
.av-slider-thumb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: top .05s linear;
  pointer-events: auto;
}
.av-slider-thumb:active { cursor: grabbing; }

.av-slider-head {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  position: relative;
  transform-style: preserve-3d;
  animation: av-slider-float 3s ease-in-out infinite;
  transition: transform .12s ease-out, box-shadow .2s;
}

/* Dark variant (Video / Carte) */
.av-slider-head--dark {
  background:
    radial-gradient(ellipse at 35% 25%, #999 0%, #555 20%, #2a2a2a 50%, #0a0a0a 100%);
  box-shadow:
    0 4px 16px rgba(0,0,0,.9),
    0 0 20px rgba(80,140,255,.2),
    0 0 40px rgba(60,120,255,.08),
    inset 0 3px 6px rgba(255,255,255,.3),
    inset 0 -4px 8px rgba(0,0,0,.7);
  border: 2px solid rgba(120,180,255,.3);
}
.av-slider-head--dark::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 50%);
  pointer-events: none;
}

/* Red variant (Main) */
.av-slider-head--red {
  background:
    radial-gradient(ellipse at 35% 25%, #ff8888 0%, #dd2222 25%, #991111 55%, #440808 100%);
  box-shadow:
    0 4px 16px rgba(255,0,0,.45),
    0 0 25px rgba(255,0,0,.2),
    0 0 50px rgba(255,0,0,.08),
    inset 0 3px 6px rgba(255,180,180,.3),
    inset 0 -4px 8px rgba(0,0,0,.6);
  border: 2px solid rgba(255,80,80,.4);
}
.av-slider-head--red::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Reflet brillant sur le front */
.av-slider-headshine {
  position: absolute;
  top: 4px; left: 6px;
  width: 14px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.5) 0%, transparent 70%);
  pointer-events: none;
}
.av-slider-headshine--red {
  background: radial-gradient(ellipse, rgba(255,200,200,.45) 0%, transparent 70%);
}

/* Yeux */
.av-slider-eye {
  width: 6px;
  height: 6px;
  background: radial-gradient(circle at 35% 35%, #fff 25%, #ddd 60%, #aaa 100%);
  border-radius: 50%;
  position: absolute;
  top: 34%;
  box-shadow: 0 0 6px rgba(255,255,255,.6), 0 0 12px rgba(100,160,255,.3);
  transition: transform .08s ease-out;
}
.av-slider-eye--l { left: 22%; }
.av-slider-eye--r { right: 22%; }
.av-slider-eye--red {
  background: radial-gradient(circle at 35% 35%, #fff 20%, #ffcccc 55%, #ff6666 100%) !important;
  box-shadow: 0 0 6px rgba(255,180,180,.7), 0 0 14px rgba(255,0,0,.25) !important;
}

/* Pupille (pseudo-element) */
.av-slider-eye::after {
  content: '';
  width: 2.5px;
  height: 2.5px;
  background: #111;
  border-radius: 50%;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.av-slider-eye--red::after {
  background: #440000;
}

/* Bouche */
.av-slider-mouth {
  width: 10px;
  height: 3px;
  background: #111;
  border-radius: 0 0 5px 5px;
  position: absolute;
  bottom: 24%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.5);
  transition: height .15s, border-radius .15s;
}
.av-slider-mouth--red {
  background: #330000;
}

/* Halo lumineux autour de la tête */
.av-slider-halo {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .4;
  transition: opacity .3s, transform .3s;
  animation: av-slider-halo-pulse 2.5s ease-in-out infinite;
}
.av-slider-halo--dark {
  background: radial-gradient(circle, rgba(80,140,255,.2) 0%, rgba(60,120,255,.05) 50%, transparent 70%);
}
.av-slider-halo--red {
  background: radial-gradient(circle, rgba(255,40,40,.2) 0%, rgba(255,0,0,.05) 50%, transparent 70%);
}

/* ──── CORPS (= piste du fader) ────────────── */
.av-slider-body {
  width: 16px;
  height: 120px;
  border-radius: 8px;
  position: relative;
  margin-top: -6px;
  overflow: hidden;
  z-index: 1;
}
.av-slider-body--dark {
  background: linear-gradient(180deg, #1a1a2a 0%, #0a0a14 50%, #050510 100%);
  border: 1.5px solid rgba(80,140,255,.2);
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,.9),
    inset 0 0 16px rgba(60,120,255,.06),
    0 0 12px rgba(0,0,0,.6);
}
.av-slider-body--red {
  background: linear-gradient(180deg, #2a1010 0%, #140808 50%, #100505 100%);
  border: 1.5px solid rgba(255,60,60,.2);
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,.9),
    inset 0 0 16px rgba(255,0,0,.06),
    0 0 12px rgba(0,0,0,.6);
}

/* Remplissage VU dans le corps */
.av-slider-vu-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  border-radius: 0 0 6px 6px;
  transition: height .06s linear;
}
.av-slider-body--dark .av-slider-vu-fill {
  background: linear-gradient(0deg, rgba(0,200,100,.6) 0%, rgba(0,255,136,.3) 50%, rgba(80,160,255,.2) 100%);
  box-shadow: 0 0 8px rgba(0,255,136,.3), inset 0 0 6px rgba(0,255,136,.15);
}
.av-slider-body--red .av-slider-vu-fill {
  background: linear-gradient(0deg, rgba(255,60,0,.6) 0%, rgba(255,100,50,.3) 50%, rgba(255,40,40,.2) 100%);
  box-shadow: 0 0 8px rgba(255,50,0,.3), inset 0 0 6px rgba(255,50,0,.15);
}

/* Marquages cran sur le corps */
.av-slider-track-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 10px,
      rgba(255,255,255,.06) 10px,
      rgba(255,255,255,.06) 11px
    );
}

/* ──── BASE / SOCLE ────────────────────────── */
.av-slider-base {
  width: 36px;
  height: 10px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  margin-top: -2px;
  z-index: 1;
}
.av-slider-base--dark {
  background: linear-gradient(180deg, #222 0%, #0a0a14 100%);
  box-shadow: 0 3px 8px rgba(0,0,0,.7), 0 0 12px rgba(60,120,255,.06);
  border: 1px solid rgba(80,140,255,.12);
}
.av-slider-base--red {
  background: linear-gradient(180deg, #2a1010 0%, #140505 100%);
  box-shadow: 0 3px 8px rgba(0,0,0,.7), 0 0 12px rgba(255,0,0,.08);
  border: 1px solid rgba(255,40,40,.15);
}

/* ──── LABEL & VALEUR ──────────────────────── */
.av-slider-label {
  color: #8ab;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 4px #000, 0 0 8px rgba(60,120,255,.15);
  margin-top: 6px;
}
.av-slider-label--red {
  color: #f66;
  text-shadow: 0 1px 4px #000, 0 0 8px rgba(255,0,0,.2);
}

.av-slider-val {
  color: #0f8;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  text-shadow: 0 0 6px #0f84;
  margin-top: 2px;
}
.av-slider-val--red {
  color: #f55;
  text-shadow: 0 0 6px #f004;
}

/* Input réel caché (accessibilité) */
.av-slider-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ──── HOVER & ACTIVE STATES ───────────────── */
.av-slider:hover .av-slider-halo { opacity: .8; transform: scale(1.15); }
.av-slider:hover .av-slider-head--dark {
  box-shadow:
    0 4px 20px rgba(0,0,0,1),
    0 0 30px rgba(80,140,255,.3),
    0 0 50px rgba(60,120,255,.1),
    inset 0 3px 6px rgba(255,255,255,.35),
    inset 0 -4px 8px rgba(0,0,0,.6);
}
.av-slider:hover .av-slider-head--red {
  box-shadow:
    0 4px 20px rgba(255,0,0,.55),
    0 0 35px rgba(255,0,0,.3),
    0 0 55px rgba(255,0,0,.1),
    inset 0 3px 6px rgba(255,180,180,.35),
    inset 0 -4px 8px rgba(0,0,0,.5);
}

/* Quand on drag (JS ajoute .av-slider--dragging) */
.av-slider--dragging .av-slider-head {
  animation: none !important;
  transform: scale(1.12);
}
.av-slider--dragging .av-slider-halo { opacity: 1; }
.av-slider--dragging .av-slider-eye {
  box-shadow: 0 0 10px rgba(255,255,255,1);
}
.av-slider--dragging .av-slider-mouth {
  height: 6px;
  border-radius: 50%;
}

/* Réaction au volume (JS ajoute .av-slider--vu-active) */
.av-slider--vu-active .av-slider-head--dark {
  box-shadow:
    0 4px 16px rgba(0,0,0,.9),
    0 0 20px rgba(0,255,136,.25),
    inset 0 3px 6px rgba(255,255,255,.3),
    inset 0 -4px 8px rgba(0,0,0,.7);
}
.av-slider--vu-active .av-slider-head--red {
  box-shadow:
    0 4px 16px rgba(255,0,0,.5),
    0 0 22px rgba(255,40,0,.3),
    inset 0 3px 6px rgba(255,180,180,.3),
    inset 0 -4px 8px rgba(0,0,0,.6);
}
.av-slider--vu-active .av-slider-eye {
  box-shadow: 0 0 8px rgba(255,255,255,.9), 0 0 16px rgba(100,200,255,.3);
}

/* ──── ANIMATIONS ──────────────────────────── */
@keyframes av-slider-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
@keyframes av-slider-halo-pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: .55; transform: scale(1.08); }
}

/* ──── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  .mixer-3ch { right: 8px; bottom: 20px; gap: 10px; }
  .av-slider { width: 62px; }
  .av-cube { width: 60px; height: 160px; }
  .av-cube-face--front,
  .av-cube-face--back { width: 60px; height: 160px; }
  .av-cube-face--left,
  .av-cube-face--right { width: 30px; height: 160px; }
  .av-cube-face--top,
  .av-cube-face--bottom { width: 60px; height: 30px; }
  .av-cube-face--front { transform: translateZ(15px); }
  .av-cube-face--back { transform: translateZ(-15px) rotateY(180deg); }
  .av-cube-face--top { top: -15px; }
  .av-cube-face--bottom { bottom: -15px; }
  .av-cube-face--left { left: -15px; width: 30px; }
  .av-cube-face--right { right: -15px; width: 30px; }
  .av-slider-scene { width: 56px; height: 140px; }
  .av-slider-head { width: 30px; height: 30px; }
  .av-slider-thumb { width: 36px; height: 36px; }
  .av-slider-body { height: 90px; width: 12px; }
  .av-slider-eye { width: 4px; height: 4px; }
  .av-slider-base { width: 28px; }
}

/* (anciens VU/fader/val supprimés — intégrés dans av-slider) */

/* Main strip highlight */
.mixer-3ch-main {
  border-color: rgba(255, 50, 50, 0.2);
  background: rgba(40, 0, 0, 0.6);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.1);
}

/* (anciennes val de mixer-3ch supprimées — intégrées dans av-slider) */

@media (max-width: 768px) {
  .studio-connect-screen {
    left: 50.3%;
    top: 23.9%;
    width: min(30.9vw, 270px);
  }
}

body.studio-bg .bg-photo {
  background-image: url('/images/studio-animer.webp');
  opacity: 0.85;
  filter: saturate(1.2) contrast(1.1);
}
.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  padding: 12px 24px 24px;
}
.studio-card {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px #05050c66;
}
.studio-card-header h2 {
  margin: 0 0 6px 0;
  font-size: 20px;
  color: #f5f3ff;
}
.studio-card-header p {
  margin: 0 0 16px 0;
  color: #c4b5fd;
  font-size: 13px;
}
.studio-live-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05050c;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #7c3aed44;
  margin-bottom: 14px;
}
.studio-live-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.studio-live-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  background: #dc2626;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 0 10px #dc262688;
}
.studio-live-controls input,
.studio-audio-controls select,
.studio-audio-controls input {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #7c3aed44;
  background: #11112a;
  color: #ece7ff;
}
.studio-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.studio-control-row button {
  width: auto;
  padding: 10px 14px;
}
.studio-status {
  margin: 10px 0;
  color: #a3e635;
  font-size: 13px;
}
.studio-audio-controls label {
  display: block;
  margin-bottom: 6px;
  color: #e9d5ff;
  font-size: 13px;
}
.studio-audio-panel {
  border: 1px solid #6d28d933;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #0f0d2290;
  backdrop-filter: blur(4px);
}
.studio-audio-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #f5f3ff;
  margin-bottom: 8px;
}
.studio-radio-group {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.studio-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #e9d5ff;
}
.studio-radio input {
  width: auto;
}
.studio-audio-controls audio {
  width: 100%;
  margin-top: 10px;
}
/* Styles pour le composant hero karaoké */
.karaoke-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
  gap: 24px;
  background: linear-gradient(135deg, #1a0a2e 0%, #0d1a3a 50%, #1a0a1a 100%);
  border: 1px solid #7c3aed44;
  border-radius: 16px;
  margin-bottom: 24px;
}
.karaoke-hero-text {
  flex: 1;
}
.karaoke-hero-badge {
  display: inline-block;
  background: #ff5722;
  color: #fff;
  font-size: 0.9em;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.karaoke-hero-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}
.karaoke-hero-visual {
  font-size: 3em;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #222;
  box-shadow: 0 2px 8px #0002;
}
.btn-sing-solo, .btn-sing-group, .btn-watch-video {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1em;
  cursor: pointer;
  background: linear-gradient(90deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  transition: background 0.2s;
}
.btn-sing-group {
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%);
}
.btn-watch-video {
  background: linear-gradient(90deg, #f59e42 0%, #f43f5e 100%);
}
.btn-sing-solo:hover, .btn-sing-group:hover, .btn-watch-video:hover {
  opacity: 0.85;
}
/* Styles pour la liste des chansons karaoké */
.karaoke-song-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.karaoke-song-item {
  display: flex;
  align-items: center;
  background: #222;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 2px 8px #0002;
  min-width: 260px;
  max-width: 350px;
}
.karaoke-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-right: 16px;
  object-fit: cover;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2em;
}
.karaoke-song-info {
  flex: 1;
  color: #fff;
}
.karaoke-song-info strong {
  font-size: 1.2em;
}
/* Bouton de téléchargement sur l’avatar chanson */
.tab-song-download-btn {
  margin-top: 10px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: #ece7ff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 1em;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 1px 4px #0002;
}
.tab-song-download-btn:hover, .tab-song-download-btn:focus {
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  color: #fff;
  outline: none;
}
/* Avatar interactif pour le choix des chansons */
.band-room-tabs-avatar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  margin-bottom: 16px;
}
.tab-song-avatar {
  background: linear-gradient(135deg, #7c3aed 60%, #4f46e5 100%);
  border-radius: 14px;
  box-shadow: 0 2px 8px #0004;
  color: #ece7ff;
  padding: 14px 18px 10px 18px;
  min-width: 120px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  outline: none;
  border: 2px solid transparent;
}
.tab-song-avatar.selected,
.tab-song-avatar:focus {
  border: 2px solid #a78bfa;
  box-shadow: 0 4px 16px #7c3aed55;
  transform: scale(1.04);
}
.tab-song-avatar-img {
  font-size: 2.2em;
  margin-bottom: 6px;
}
.tab-song-avatar-title {
  font-weight: bold;
  font-size: 1.05em;
  text-align: center;
  margin-bottom: 2px;
}
.tab-song-avatar-artist {
  font-size: 0.95em;
  color: #d1c4e9;
  text-align: center;
}
/* Amélioration du style du select pour un rendu plus professionnel */
select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #8b5cf6cc;
  border-color: #8b5cf6cc;
}

select::-ms-expand {
  display: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #0e0b21 url('data:image/svg+xml;utf8,<svg fill="%23f5f3ff" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 12px center/18px 18px;
  padding-right: 36px;
  cursor: pointer;
}

/* Optionnel : survol plus doux */
select:hover {
  border-color: #a78bfa;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: #ece7ff;
  background: #05050c;
  font-family: "Segoe UI", "Inter", Arial, sans-serif;
}

.bg-concert {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 10%, #1b0f3a, transparent 45%),
    radial-gradient(circle at 85% 15%, #0e1438, transparent 40%),
    radial-gradient(circle at 50% 60%, #05050c 10%, #04040a 65%);
  overflow: hidden;
}

.bg-photo {
  position: absolute;
  inset: -6% -8% -10% -8%;
  background-image: url("/images/site-bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  filter: saturate(1.15) contrast(1.05);
  transform: translate(
      calc((var(--mx, 0.5) - 0.5) * 16px),
      calc((var(--my, 0.5) - 0.5) * 16px)
    )
    scale(1.04);
  transition: transform 0.2s ease-out;
}

.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  pointer-events: none;
}

.color-sheen {
  position: absolute;
  inset: -20%;
  background: conic-gradient(
    from 0deg,
    #22d3ee55,
    #8b5cf655,
    #ec489955,
    #f59e0b55,
    #10b98155,
    #22d3ee55
  );
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: hueSpin 18s linear infinite, sheenPulse 7s ease-in-out infinite;
}

.color-orbit {
  position: absolute;
  inset: 10% 5% auto 5%;
  height: 60vh;
  background: radial-gradient(circle at 30% 30%, #ec489933, transparent 60%),
    radial-gradient(circle at 70% 20%, #22d3ee33, transparent 55%),
    radial-gradient(circle at 50% 70%, #f59e0b33, transparent 60%);
  filter: blur(12px);
  opacity: 0.5;
  animation: orbitDrift 14s ease-in-out infinite;
}

.stage-glow {
  position: absolute;
  inset: auto -10% -25% -10%;
  height: 50vh;
  background: radial-gradient(ellipse at center, #1c1144 0%, transparent 70%);
  opacity: 0.8;
  filter: blur(10px);
  animation: stagePulse 6s ease-in-out infinite;
}

.spot {
  position: absolute;
  width: 35vw;
  height: 35vw;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.25;
  mix-blend-mode: screen;
  animation: swing 7s ease-in-out infinite;
  transform: translate(
    calc((var(--mx, 0) - 0.5) * 6vw),
    calc((var(--my, 0) - 0.5) * 6vh)
  );
}

.spot-left { left: -12vw; top: -10vw; background: #6d28d9; }
.spot-right { right: -12vw; top: -8vw; background: #2563eb; animation-delay: 1.2s; }
.spot-top { left: 20vw; top: -18vw; background: #22d3ee; animation-delay: 2.4s; }

.beam {
  position: absolute;
  width: 28vw;
  height: 80vh;
  top: -10vh;
  background: linear-gradient(180deg, #9f7aea66 0%, transparent 75%);
  filter: blur(2px);
  opacity: 0.5;
  transform-origin: top center;
  animation: beamSweep 5.5s ease-in-out infinite;
  transform: translate(
      calc((var(--mx, 0) - 0.5) * 4vw),
      calc((var(--my, 0) - 0.5) * 3vh)
    )
    rotate(-6deg);
}

.beam-left { left: 5vw; animation-delay: 0.6s; }
.beam-right { right: 5vw; animation-delay: 1.1s; }
.beam-center { left: 36vw; animation-delay: 2.2s; }

.particles {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#a78bfa55 1px, transparent 1px),
    radial-gradient(#38bdf855 1px, transparent 1px);
  background-size: 18px 18px, 32px 32px;
  background-position: 0 0, 10px 10px;
  animation: drift 16s linear infinite;
}

.mist {
  position: absolute;
  inset: auto 0 0 0;
  height: 35vh;
  background: linear-gradient(to top, #ffffff18, transparent);
  animation: mistMove 10s ease-in-out infinite;
}

.smoke {
  position: absolute;
  bottom: -10vh;
  width: 45vw;
  height: 45vh;
  background: radial-gradient(circle at center, #ffffff25, transparent 65%);
  filter: blur(20px);
  opacity: 0.5;
  animation: smokeRise 12s ease-in-out infinite;
}

.smoke-left { left: -10vw; animation-delay: 1.5s; }
.smoke-right { right: -12vw; animation-delay: 3s; }

.pulse-overlay {
  display: none;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: #ffffff08;
  backdrop-filter: blur(2px);
  position: relative;
  z-index: 10000;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.qr-donate-wrap {
  position: relative;
}
.qr-donate-img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid rgba(192, 132, 252, 0.3);
}
.qr-donate-img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.5);
}
.qr-donate-bubble {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 320px;
  background: #1e1b4b;
  border: 1px solid rgba(109, 40, 217, 0.4);
  border-radius: 14px;
  padding: 18px 20px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: tooltipFadeIn 0.2s ease;
}
.qr-donate-bubble::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 18px;
  width: 14px;
  height: 14px;
  background: #1e1b4b;
  border-top: 1px solid rgba(109, 40, 217, 0.4);
  border-left: 1px solid rgba(109, 40, 217, 0.4);
  transform: rotate(45deg);
}
.qr-donate-wrap:hover .qr-donate-bubble {
  display: block;
}
.qr-donate-bubble h4 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #c084fc;
}
.qr-donate-bubble p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #e0e7ff;
}
.qr-donate-bubble .qr-donate-hint {
  display: block;
  text-align: center;
  font-size: 11px;
  color: #a5b4fc;
  opacity: 0.7;
  margin-top: 4px;
}
/* Modal QR Code agrandi */
.qr-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999999;
  justify-content: center;
  align-items: flex-start;
  padding-top: 18vh;
  backdrop-filter: blur(6px);
}
.qr-modal-overlay.active {
  display: flex;
}
.qr-modal-card {
  position: relative;
  background: #1e1b4b;
  border: 1px solid rgba(109, 40, 217, 0.4);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  animation: tooltipFadeIn 0.25s ease;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}
.qr-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #a5b4fc;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: auto;
}
.qr-modal-close:hover {
  color: #c084fc;
}
.qr-modal-img {
  width: 260px;
  height: 260px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.qr-modal-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #c084fc;
}
.qr-modal-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #e0e7ff;
}
.topbar a { color: #c4b5fd; text-decoration: none; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-actions span {
  color: #ddd6fe;
}
.topbar-actions button {
  width: auto;
  padding: 8px 12px;
}

/* ── Barre de recherche utilisateurs (topbar) ──────────────── */
.topbar-search-wrap {
  flex: 1;
  max-width: 420px;
  margin: 0 24px;
  position: relative;
  z-index: 9999;
}
.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}
.topbar-search-icon {
  position: absolute;
  left: 12px;
  color: #a78bfa;
  pointer-events: none;
}
.topbar-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border-radius: 24px;
  border: 1px solid #7c3aed55;
  background: #1a1033;
  color: #e2dff0;
  font-size: .92rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.topbar-search input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px #7c3aed33;
}
.topbar-search input::placeholder { color: #8b7faa; }
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1e1535;
  border: 1px solid #7c3aed55;
  border-radius: 12px;
  max-height: 380px;
  overflow-y: auto;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid #ffffff0a;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #7c3aed22; }
.search-result-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.search-result-info {
  flex: 1;
  min-width: 0;
}
.search-result-info h4 {
  margin: 0;
  font-size: .92rem;
  color: #e2dff0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-info p {
  margin: 2px 0 0;
  font-size: .78rem;
  color: #8b80a8;
}
.search-result-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.search-result-actions button, .friend-action-btn {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: .78rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  width: auto;
  max-width: 70%;
  transition: background .15s, transform .1s;
}
.search-result-actions button:active, .friend-action-btn:active {
  transform: scale(.95);
}
.btn-add-friend {
  background: #7c3aed;
  color: #fff;
}
.btn-add-friend:hover { background: #6d28d9; }
.btn-pending {
  background: #44403c;
  color: #a8a29e;
  cursor: default;
}
.btn-already-friend {
  background: #16a34a22;
  color: #4ade80;
  cursor: default;
}
.btn-remove-friend {
  background: #dc262622;
  color: #f87171;
}
.btn-remove-friend:hover { background: #dc262644; }

.btn-follow {
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: #fff;
}
.btn-follow:hover { background: linear-gradient(90deg, #6d28d9, #4338ca); }
.btn-following {
  background: #22c55e22;
  color: #4ade80;
}
.btn-following:hover { background: #dc262622; color: #f87171; }

.search-no-results {
  padding: 16px;
  text-align: center;
  color: #8b80a8;
  font-size: .88rem;
}

/* ── Liste d'amis & demandes ──────────────────────────────── */
.friends-count {
  font-size: .82rem;
  color: #a78bfa;
  font-weight: 400;
  margin-left: 4px;
}
.friend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #ffffff08;
}
.friend-item:last-child { border-bottom: none; }
.friend-item img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.friend-item-info {
  flex: 1;
  min-width: 0;
}
.friend-item-info h4 {
  margin: 0;
  font-size: .88rem;
  color: #e2dff0;
}
.friend-remove-link {
  color: #f87171;
  font-size: .75rem;
  text-decoration: none;
  margin-left: 6px;
  opacity: .6;
  transition: opacity .15s;
}
.friend-remove-link:hover {
  opacity: 1;
}
.friend-block-link {
  color: #f59e0b;
  font-size: .75rem;
  text-decoration: none;
  margin-left: 6px;
  opacity: .6;
  transition: opacity .15s;
}
.friend-block-link:hover {
  opacity: 1;
}
.friend-item-info p {
  margin: 1px 0 0;
  font-size: .76rem;
  color: #8b80a8;
}
.friend-request-actions {
  display: flex;
  gap: 6px;
}
.btn-accept-friend {
  background: #16a34a;
  color: #fff;
}
.btn-accept-friend:hover { background: #15803d; }
.btn-reject-friend {
  background: #44403c;
  color: #a8a29e;
}
.btn-reject-friend:hover { background: #57534e; }

/* ── Friends compact card + button ── */
.friends-compact-card {
  display: inline-block;
}
.friends-compact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f0d22cc;
  border: 1px solid #6d28d944;
  border-radius: 12px;
  color: #a78bfa;
  cursor: pointer;
  padding: 10px 16px;
  font-size: .92rem;
  font-weight: 600;
  transition: background .2s, border-color .2s, transform .15s;
  width: auto;
}
.friends-compact-btn:hover {
  background: #1a1540;
  border-color: #7c3aed;
  transform: scale(1.03);
}
.friends-compact-btn .friends-count {
  background: #7c3aed;
  color: #fff;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  padding: 0 5px;
}
.friend-request-badge {
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  padding: 0 4px;
  margin-left: 4px;
  animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.expand-friends-btn {
  background: none;
  border: 1px solid #6d28d944;
  border-radius: 8px;
  color: #a78bfa;
  cursor: pointer;
  padding: 6px;
  transition: background .2s, color .2s;
  display: flex;
  align-items: center;
}
.expand-friends-btn:hover {
  background: #7c3aed22;
  color: #c4b5fd;
}

/* ── Friends modal overlay ── */
.friends-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 12, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.friends-modal {
  background: linear-gradient(135deg, #181336, #1a1040);
  border: 1px solid #6d28d933;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.25);
}
.friends-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #ffffff0a;
}
.friends-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
}
.close-friends-modal {
  background: none;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background .2s;
}
.close-friends-modal:hover {
  background: #7c3aed22;
}
.friends-modal-list {
  padding: 16px 24px 24px;
  overflow-y: auto;
  flex: 1;
}
.friends-modal-list .friend-item {
  padding: 12px 0;
}
.friends-modal-list .friend-item img {
  width: 48px;
  height: 48px;
}
.friends-modal-list .friend-item-info h4 {
  font-size: 1rem;
}
.friends-modal-list .friend-item-info p {
  font-size: .85rem;
}

@media (max-width: 768px) {
  .topbar-search-wrap {
    max-width: 200px;
    margin: 0 8px;
  }
}
@media (max-width: 520px) {
  .topbar-search-wrap {
    display: none;
  }
}

.hidden {
  display: none !important;
}

/* Layout avec sidebar */
.app-container {
  display: flex;
  min-height: calc(100vh - 70px);
}

.app-container > main {
  flex: 1;
  min-width: 0;
}

/* Sidebar Navigation */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #0f0d22cc;
  border-right: 1px solid #6d28d933;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.nav-menu {
  list-style: none;
  padding: 12px 0;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  color: #a1a1aa;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: #151136;
  color: #c4b5fd;
}

.nav-item.active {
  background: #181336;
  color: #7c3aed;
  border-left-color: #7c3aed;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-item span {
  font-size: 15px;
  font-weight: 500;
}

/* Main Content */
.main-content {
  flex: 1;
  overflow-y: auto;
}

.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page Headers */
.page-header {
  padding: 24px 24px 16px;
  position: relative;
}

.page-header h1 {
  margin: 0 0 8px 0;
  font-size: 36px;
  color: #ffffff;
}

.page-header p {
  margin: 0;
  color: #f3f4f6;
  font-size: 14px;
}
.msg-security-info {
  margin-top: 8px;
  color: #a78bfa;
  font-size: .82rem;
  line-height: 1.5;
  opacity: .85;
}

/* Content Grids */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}

.music-library {
  padding: 0 24px 24px;
  display: grid;
  gap: 16px;
}

/* ── Bibliothèque Musique (cartes upload) ─────────── */
.music-library-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.music-lib-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background .2s, border-color .2s;
}
.music-lib-card:hover { background: #1e1750; border-color: #7c3aed55; }
.music-lib-card.playing { border-color: var(--accent); background: #1e1750; }
.music-lib-avatar {
  width: 52px; height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.music-lib-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); font-size: 24px; color: var(--muted);
}
.music-lib-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.music-lib-title {
  font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-lib-sub {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-lib-play {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .2s;
}
.music-lib-play:hover { transform: scale(1.1); background: #6d28d9; }

/* Live Events */
.live-event {
  position: relative;
  border-color: #7c3aed !important;
}

.live-badge {
  display: inline-block;
  background: #dc2626;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 12px;
}

/* Game Cards */
.game-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

/* ── Guitar Hero Card ───────────────────────── */
.guitar-hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f0d22ee 0%, #0e1a2dee 100%) !important;
  border: 1px solid #22d3ee33 !important;
}
.guitar-hero-card::before {
  content: '';
  position: absolute;
  top: -60%; left: -60%;
  width: 220%; height: 220%;
  background: radial-gradient(circle, #22d3ee08 0%, transparent 60%);
  pointer-events: none;
}
.gh-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.gh-card-header h3 {
  margin: 0;
  background: linear-gradient(90deg, #22d3ee, #f472b6, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gh-play-link {
  display: block;
  margin-top: 10px;
  padding: 10px 0;
  text-align: center;
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-radius: 10px;
  transition: transform .15s, box-shadow .2s;
}
.gh-play-link:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px #22d3ee33;
}

/* ── Note Challenge Pro ─────────────────────── */
.note-challenge-pro {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f0d22ee 0%, #1a1040ee 100%) !important;
  border: 1px solid #7c3aed44 !important;
}
.note-challenge-pro::before {
  content: '';
  position: absolute;
  top: -60%; left: -60%;
  width: 220%; height: 220%;
  background: radial-gradient(circle, #7c3aed10 0%, transparent 60%);
  pointer-events: none;
}

.nc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.nc-header h3 {
  margin: 0;
  font-size: 20px;
  background: linear-gradient(90deg, #e9d5ff, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nc-guitar-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.nc-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: #a1a1aa;
}

/* Start button */
.nc-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 28px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.nc-start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px #7c3aed55;
}

/* Panel */
.nc-panel {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

/* Difficulty tabs */
.nc-difficulty {
  display: flex;
  gap: 6px;
}
.nc-diff-btn {
  flex: 1;
  padding: 6px 0;
  border: 1px solid #6d28d944;
  border-radius: 8px;
  background: transparent;
  color: #a1a1aa;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.nc-diff-btn:hover { color: #e9d5ff; border-color: #7c3aed88; }
.nc-diff-btn.active {
  background: #7c3aed33;
  color: #e9d5ff;
  border-color: #7c3aed;
  font-weight: 600;
}

/* Progress bar */
.nc-progress-wrap {
  height: 4px;
  border-radius: 4px;
  background: #1e1b4b;
  overflow: hidden;
}
.nc-progress-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #7c3aed, #fbbf24);
  transition: width 0.4s ease;
}

/* HUD */
.nc-hud {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.nc-hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.nc-hud-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #71717a;
}
.nc-hud-value {
  font-size: 16px;
  font-weight: 700;
  color: #e9d5ff;
}

/* Guitar strings visualization */
.nc-strings-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, #1a1040 0%, #0f0a25 100%);
  border: 1px solid #6d28d922;
  position: relative;
  overflow: hidden;
}
.nc-strings-wrap::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background: linear-gradient(180deg, #92400e, #78350f);
  border-radius: 10px 0 0 10px;
}
.nc-string {
  height: 2px;
  border-radius: 1px;
  margin-left: 12px;
  transition: box-shadow 0.15s;
}
.nc-string[data-s="1"] { background: #fde68a; height: 1px; }
.nc-string[data-s="2"] { background: #fcd34d; height: 1.2px; }
.nc-string[data-s="3"] { background: #f59e0b; height: 1.4px; }
.nc-string[data-s="4"] { background: #d97706; height: 1.6px; }
.nc-string[data-s="5"] { background: #b45309; height: 1.8px; }
.nc-string[data-s="6"] { background: #92400e; height: 2px; }

.nc-string.vibrating {
  animation: ncVibrate 0.08s linear 12;
}
@keyframes ncVibrate {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-2px); }
  75% { transform: translateY(2px); }
}
.nc-string.vibrating[data-s="1"] { box-shadow: 0 0 8px #fde68a88; }
.nc-string.vibrating[data-s="2"] { box-shadow: 0 0 8px #fcd34d88; }
.nc-string.vibrating[data-s="3"] { box-shadow: 0 0 8px #f59e0b88; }
.nc-string.vibrating[data-s="4"] { box-shadow: 0 0 8px #d9770688; }
.nc-string.vibrating[data-s="5"] { box-shadow: 0 0 8px #b4530988; }
.nc-string.vibrating[data-s="6"] { box-shadow: 0 0 8px #92400e88; }

/* Play button */
.nc-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #7c3aed66;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #e9d5ff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.nc-play-btn:hover {
  background: linear-gradient(135deg, #312e81, #4c1d95);
  border-color: #a855f7;
  box-shadow: 0 0 16px #7c3aed33;
}
.nc-play-btn:active { transform: scale(0.97); }
.nc-play-btn.nc-playing {
  border-color: #fbbf24;
  box-shadow: 0 0 20px #fbbf2433;
}

/* Choices */
.nc-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.nc-choice-btn {
  position: relative;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid #6d28d944;
  background: #151136;
  color: #e9d5ff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}
.nc-choice-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7c3aed11, transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.nc-choice-btn:hover:not(:disabled)::before { opacity: 1; }
.nc-choice-btn:hover:not(:disabled) {
  border-color: #a855f7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #7c3aed22;
}
.nc-choice-btn:active:not(:disabled) { transform: scale(0.97); }
.nc-choice-btn:disabled { cursor: default; }

.nc-choice-btn.good {
  border-color: #22c55e;
  background: linear-gradient(135deg, #052e16, #064e3b);
  box-shadow: 0 0 16px #22c55e22;
}
.nc-choice-btn.good::after {
  content: '✓';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #4ade80;
}
.nc-choice-btn.bad {
  border-color: #ef4444;
  background: linear-gradient(135deg, #3a1010, #450a0a);
  box-shadow: 0 0 16px #ef444422;
}
.nc-choice-btn.bad::after {
  content: '✗';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #fca5a5;
}

/* Feedback */
.nc-feedback {
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #94a3b8;
  background: #0f0a2588;
  text-align: center;
  transition: all 0.3s;
}
.nc-feedback.good {
  color: #4ade80;
  background: #052e1688;
  border-left: 3px solid #22c55e;
}
.nc-feedback.bad {
  color: #fca5a5;
  background: #3a101088;
  border-left: 3px solid #ef4444;
}

/* Actions */
.nc-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.nc-next-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.nc-next-btn:hover { box-shadow: 0 4px 16px #7c3aed44; }
.nc-reset-btn {
  padding: 10px 18px;
  border: 1px solid #6d28d944;
  border-radius: 10px;
  background: transparent;
  color: #a1a1aa;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.nc-reset-btn:hover { color: #e9d5ff; border-color: #7c3aed; }

/* Score pulse animation */
@keyframes ncScorePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); color: #fbbf24; }
  100% { transform: scale(1); }
}
.nc-score-pulse { animation: ncScorePulse 0.35s ease; }

/* End screen */
.nc-end-screen {
  text-align: center;
  padding: 16px 0;
}
.nc-end-screen h4 {
  font-size: 20px;
  margin: 0 0 4px;
  background: linear-gradient(90deg, #e9d5ff, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nc-end-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 12px 0;
}
.nc-end-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nc-end-stat .nc-stat-val {
  font-size: 28px;
  font-weight: 800;
  color: #e9d5ff;
}
.nc-end-stat .nc-stat-lbl {
  font-size: 11px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.nc-end-grade {
  font-size: 40px;
  margin: 6px 0;
}
.nc-play-again-btn {
  margin-top: 10px;
  padding: 12px 32px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.nc-play-again-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px #7c3aed55;
}

/* ═══════════════════════════════════════════════
   MUSI'QUIZ — Quiz musical immersif
   ═══════════════════════════════════════════════ */
.musiquiz-card { position: relative; }
.mq-panel {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background:
    linear-gradient(160deg, rgba(10,5,32,.82) 0%, rgba(21,13,53,.72) 50%, rgba(13,16,37,.85) 100%),
    url('/images/musiquiz-bg.webp') center center / cover no-repeat;
  background-attachment: fixed;
  overflow-y: auto;
  animation: mqFadeIn .3s ease;
}
.mq-panel::before,
.mq-panel::after { display: none; }
@keyframes mqFadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.mq-screen { padding: 32px 24px; max-width: 720px; margin: 0 auto; }
.mq-close {
  position: fixed; top: 16px; right: 20px;
  width: 40px !important; height: 40px;
  font-size: 20px; background: #ffffff15; border: 1px solid #ffffff22;
  border-radius: 50%; color: #fff; cursor: pointer; z-index: 12001;
}
.mq-close:hover { background: #ef4444; }

/* Menu */
.mq-menu-header { text-align: center; margin-bottom: 24px; }
.mq-logo { font-size: 56px; margin-bottom: 8px; }
.mq-menu-header h2 {
  font-size: 32px; font-weight: 900;
  background: linear-gradient(90deg, #a855f7, #3b82f6, #22c55e);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin: 0;
}
.mq-sub { color: #94a3b8; font-size: 14px; margin: 6px 0 0; }
.mq-catpick h4 { margin: 0 0 10px; font-size: 14px; color: #c4b5fd; }
.mq-cat-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.mq-cat-btn {
  width: auto !important;
  padding: 8px 14px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  background: #1e1b4b !important;
  border: 1px solid #7c3aed44 !important;
  color: #c4b5fd;
  cursor: pointer;
  transition: all .2s;
}
.mq-cat-btn:hover { background: #312e81 !important; border-color: #7c3aed !important; }
.mq-cat-btn.active {
  background: linear-gradient(135deg, var(--cat-c, #7c3aed), #4f46e5) !important;
  color: #fff; border-color: transparent !important;
  box-shadow: 0 0 12px var(--cat-c, #7c3aed55);
}
.mq-cat-btn small { opacity: .7; margin-left: 3px; }
.mq-rules {
  display: flex; gap: 16px; justify-content: center;
  margin-bottom: 24px; font-size: 13px; color: #94a3b8;
}
.mq-primary {
  width: auto !important; padding: 14px 40px !important;
  font-size: 16px !important; font-weight: 800;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #7c3aed, #3b82f6) !important;
  color: #fff; border: none !important; cursor: pointer;
  display: block; margin: 0 auto;
  transition: transform .15s, box-shadow .2s;
}
.mq-primary:hover { transform: scale(1.04); box-shadow: 0 0 24px #7c3aed88; }
.mq-secondary {
  width: auto !important; padding: 12px 28px !important;
  font-size: 14px !important;
  border-radius: 12px !important;
  background: #1e1b4b !important;
  border: 1px solid #7c3aed55 !important;
  color: #c4b5fd; cursor: pointer;
}

/* HUD */
.mq-back-btn {
  width: auto !important; padding: 6px 14px !important;
  border-radius: 8px !important; font-size: 12px !important;
  background: #ffffff12 !important; border: 1px solid #ffffff22 !important;
  color: #c4b5fd; cursor: pointer; transition: all .15s;
}
.mq-back-btn:hover { background: #7c3aed !important; color: #fff; }
.mq-hud {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 13px; color: #94a3b8;
}
.mq-hud span:last-child { font-weight: 800; color: #a855f7; font-size: 16px; }

/* Timer */
.mq-timer {
  position: relative; height: 8px; border-radius: 8px;
  background: #1e1b4b; margin-bottom: 20px; overflow: hidden;
}
.mq-timer-bar {
  height: 100%; width: 100%; border-radius: 8px;
  background: #22c55e; transition: width 1s linear;
}
.mq-timer span {
  position: absolute; right: 6px; top: -18px;
  font-size: 12px; color: #94a3b8; font-weight: 700;
}

/* Cat label */
.mq-cat-label {
  display: inline-block; padding: 4px 14px;
  border-radius: 20px; font-size: 12px; font-weight: 700;
  color: #fff; margin-bottom: 12px;
}

/* Question */
.mq-question {
  font-size: 20px; font-weight: 700; color: #f1f5f9;
  margin: 0 0 20px; line-height: 1.4;
}

/* Choix */
.mq-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mq-choice-btn {
  width: 100%; padding: 14px 16px !important;
  border-radius: 12px !important;
  font-size: 14px !important; font-weight: 600;
  background: #1a1640 !important;
  border: 2px solid #7c3aed44 !important;
  color: #e2e8f0; cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.mq-choice-btn:hover:not(:disabled) {
  background: #2d2670 !important; border-color: #7c3aed !important;
  transform: translateY(-2px);
}
.mq-choice-btn.correct {
  background: #166534 !important; border-color: #22c55e !important;
  color: #fff;
}
.mq-choice-btn.wrong {
  background: #7f1d1d !important; border-color: #ef4444 !important;
  color: #fff;
}

/* Feedback */
.mq-feedback {
  min-height: 24px; font-size: 14px; font-weight: 600;
  margin: 0 0 14px; color: #94a3b8;
}
.mq-feedback.correct { color: #4ade80; }
.mq-feedback.wrong   { color: #fca5a5; }

/* Jokers */
.mq-jokers { display: flex; gap: 8px; justify-content: center; }
.mq-joker-btn {
  width: auto !important; padding: 8px 16px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  background: #1e1b4b !important;
  border: 1px solid #7c3aed55 !important;
  color: #c4b5fd; cursor: pointer;
  transition: all .15s;
}
.mq-joker-btn:hover:not(:disabled) { background: #312e81 !important; }
.mq-joker-btn:disabled { opacity: .35; cursor: not-allowed; }
.mq-joker-count {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: #7c3aed; color: #fff; font-size: 11px;
  font-weight: 800; margin-left: 4px;
}

/* Résultats */
.mq-results-title { text-align: center; font-size: 26px; margin: 0 0 8px; }
.mq-grade {
  text-align: center; font-size: 28px; font-weight: 900;
  margin-bottom: 24px;
}
.mq-results-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 24px;
}
.mq-stat {
  background: #1a1640; border-radius: 14px; padding: 16px;
  text-align: center; border: 1px solid #7c3aed33;
}
.mq-stat strong { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 6px; }
.mq-stat span { font-size: 22px; font-weight: 800; color: #a855f7; }

/* Historique */
.mq-history { max-height: 260px; overflow-y: auto; margin-bottom: 20px; }
.mq-history-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 4px;
  font-size: 13px; background: #0f0a25;
}
.mq-history-item.correct { border-left: 3px solid #22c55e; }
.mq-history-item.wrong   { border-left: 3px solid #ef4444; }
.mq-hist-num { font-weight: 800; color: #7c3aed; min-width: 24px; }
.mq-hist-q { flex: 1; color: #cbd5e1; }
.mq-hist-a { font-weight: 600; white-space: nowrap; }
.mq-result-actions { display: flex; gap: 12px; justify-content: center; }

@media (max-width: 600px) {
  .mq-choices { grid-template-columns: 1fr; }
  .mq-results-grid { grid-template-columns: 1fr; }
  .mq-rules { flex-direction: column; align-items: center; gap: 6px; }
}

/* Rhythm Battle - Arcade lumineux */
.rhythm-battle {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.rhythm-shell {
  position: relative;
  border-radius: 22px;
  padding: 0;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #a855f744;
  box-shadow: 0 0 60px #a855f722, 0 20px 40px #03060dcc;
  font-family: "Rajdhani", "Oswald", "Segoe UI", sans-serif;
}
/* Background image layer */
.rhythm-bg-img {
  position: absolute;
  inset: 0;
  background: url('/images/avatar-band-star.webp') center center / cover no-repeat;
  z-index: 0;
}
.rhythm-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, #0ea5e944 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, #a855f744 0%, transparent 55%),
    linear-gradient(180deg, #020617cc 0%, #0b0c1fdd 40%, #04070cee 100%);
  z-index: 0;
}
.rhythm-ambient {
  position: absolute;
  inset: -20% -10%;
  background: conic-gradient(from 120deg, #22d3ee33, #a855f733, #ec489933, #22d3ee33);
  opacity: 0.5;
  filter: blur(50px);
  animation: rhythmPulse 8s ease-in-out infinite;
  z-index: 0;
}
.rhythm-screen {
  position: relative;
  z-index: 1;
  padding: 24px;
}
.rhythm-title {
  font-size: 52px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: transparent;
  background: linear-gradient(135deg, #22d3ee 0%, #a855f7 40%, #ec4899 70%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px #a855f788);
  animation: rhythmTitleGlow 3s ease-in-out infinite alternate;
}
@keyframes rhythmTitleGlow {
  0%   { filter: drop-shadow(0 0 18px #22d3ee66); }
  50%  { filter: drop-shadow(0 0 30px #a855f788); }
  100% { filter: drop-shadow(0 0 18px #ec489966); }
}
.rhythm-subtitle {
  color: #e0f2fe;
  margin: 8px 0 22px;
  font-size: 15px;
  text-shadow: 0 0 12px #06b6d455;
  letter-spacing: 0.5px;
}
.rhythm-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0 24px;
}
.rhythm-primary,
.rhythm-secondary {
  width: auto;
  padding: 14px 28px;
  border-radius: 16px;
  border: none;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
}
.rhythm-primary {
  background: linear-gradient(135deg, #22d3ee, #a855f7, #ec4899);
  background-size: 200% 200%;
  animation: rhythmBtnShift 4s ease infinite;
  color: #fff;
  box-shadow: 0 0 20px #a855f766, 0 8px 24px #22d3ee44;
  text-shadow: 0 1px 4px #0008;
}
.rhythm-primary:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 32px #a855f7aa, 0 12px 32px #22d3ee66;
}
@keyframes rhythmBtnShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.rhythm-secondary {
  background: #0f172acc;
  color: #e2e8f0;
  border: 1px solid #a855f744;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 12px #a855f711;
}
.rhythm-secondary:hover {
  border-color: #22d3ee88;
  background: #1e293bcc;
  transform: translateY(-2px);
  box-shadow: 0 0 16px #22d3ee44;
}
.rhythm-keys {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.rhythm-key {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, #1e293bcc, #0f172acc);
  border: 2px solid;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.rhythm-key:nth-child(1) { border-color: #22d3ee88; color: #22d3ee; box-shadow: 0 0 14px #22d3ee33, inset 0 0 10px #22d3ee11; }
.rhythm-key:nth-child(2) { border-color: #a855f788; color: #a855f7; box-shadow: 0 0 14px #a855f733, inset 0 0 10px #a855f711; }
.rhythm-key:nth-child(3) { border-color: #34d39988; color: #34d399; box-shadow: 0 0 14px #34d39933, inset 0 0 10px #34d39911; }
.rhythm-key:nth-child(4) { border-color: #f472b688; color: #f472b6; box-shadow: 0 0 14px #f472b633, inset 0 0 10px #f472b611; }
.rhythm-key::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, currentColor, transparent 70%);
  opacity: 0.08;
}
.rhythm-key:hover {
  transform: translateY(-3px) scale(1.1);
}
.rhythm-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 8px;
  text-shadow: 0 0 8px #94a3b822;
}
.rhythm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.rhythm-header h3 {
  margin: 0;
  color: #e2e8f0;
}
.rhythm-back {
  width: auto;
  background: #0f172acc;
  color: #94a3b8;
  border: 1px solid #334155;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}
.rhythm-back:hover {
  border-color: #22d3ee55;
  color: #e2e8f0;
}
.rhythm-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.rhythm-song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.rhythm-song-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #1e293b;
  background: #0b1120cc;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(4px);
}
.rhythm-song-card:hover {
  border-color: #a855f755;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px #a855f722;
}
.rhythm-song-card.active {
  border-color: #a855f7;
  transform: translateY(-3px);
  box-shadow: 0 0 20px #a855f744, inset 0 0 12px #a855f711;
}
.rhythm-song-cover {
  height: 75px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 32px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #0ea5e9, #a855f7, #ec4899);
  box-shadow: inset 0 -16px 24px #0006;
}
.rhythm-song-meta {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 13px;
}
.rhythm-song-sub {
  color: #94a3b8;
  font-size: 11px;
}
.rhythm-difficulty {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.rhythm-diff-btn {
  padding: 12px;
  border-radius: 14px;
  background: #0f172acc;
  border: 1px solid #1e293b;
  color: #cbd5f5;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}
.rhythm-diff-btn:hover {
  border-color: #a855f755;
  background: #1e293bcc;
}
.rhythm-diff-btn.active {
  border-color: #a855f7;
  color: #a7f3d0;
  background: #1e1b4bcc;
  box-shadow: 0 0 14px #a855f733;
}
.rhythm-song-preview {
  background: #0b1120cc;
  border: 1px solid #a855f722;
  border-radius: 16px;
  padding: 14px;
  color: #e2e8f0;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 20px #0004;
}
.rhythm-option-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.rhythm-option-row label {
  grid-column: span 2;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}
.rhythm-option-row select,
.rhythm-option-row input[type="text"],
.rhythm-option-row input[type="file"] {
  background: #0f172acc;
  border: 1px solid #334155;
  border-radius: 12px;
  color: #e2e8f0;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(4px);
}
.rhythm-option-row select:focus,
.rhythm-option-row input[type="text"]:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 12px #a855f733;
}
.rhythm-option-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2394a3b8' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}
.rhythm-option-row button {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: 0 1px 3px #0006;
}
.rhythm-option-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #a855f744;
}
.rhythm-option-row input[type="checkbox"] {
  accent-color: #a855f7;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
}
.rhythm-track {
  position: relative;
  height: 540px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 50% 100%, #0ea5e911 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, #a855f711 0%, transparent 50%),
    linear-gradient(180deg, #020617 0%, #080d1f 50%, #0b0f1f 100%);
  border: 1px solid #a855f733;
  overflow: hidden;
  box-shadow: inset 0 -60px 80px -40px #22d3ee11, inset 0 0 60px #0008;
}
.rhythm-lanes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.rhythm-lane {
  border-right: 1px solid #1e293b55;
  position: relative;
}
.rhythm-lane::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 75%, var(--lane-glow) 100%);
  opacity: 0.08;
  pointer-events: none;
}
.rhythm-lane.lane-0 { --lane-glow: #22d3ee; }
.rhythm-lane.lane-1 { --lane-glow: #a855f7; }
.rhythm-lane.lane-2 { --lane-glow: #34d399; }
.rhythm-lane.lane-3 { --lane-glow: #f472b6; }
.rhythm-lane:last-child {
  border-right: none;
}
.rhythm-hit-zone {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 80px;
  height: 4px;
  background: linear-gradient(90deg, #22d3ee, #a855f7, #ec4899);
  box-shadow: 0 0 24px #a855f7aa, 0 0 60px #22d3ee44;
  z-index: 2;
}
.rhythm-hit-zone::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -8px; bottom: -8px;
  background: linear-gradient(90deg, #22d3ee22, #a855f722, #ec489922);
  filter: blur(6px);
}
.rhythm-hit-buttons {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 14px;
  z-index: 3;
}
.rhythm-hit-btn {
  border-radius: 16px;
  border: 2px solid;
  background: #0c1225ee;
  color: #e2e8f0;
  font-weight: 800;
  font-size: 16px;
  padding: 12px 0;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.1s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.rhythm-hit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 120%, currentColor, transparent 70%);
  opacity: 0.1;
}
.rhythm-hit-btn.lane-0 { border-color: #22d3ee88; color: #22d3ee; }
.rhythm-hit-btn.lane-1 { border-color: #a855f788; color: #a855f7; }
.rhythm-hit-btn.lane-2 { border-color: #34d39988; color: #34d399; }
.rhythm-hit-btn.lane-3 { border-color: #f472b688; color: #f472b6; }
.rhythm-hit-btn.is-pressed {
  transform: translateY(-4px) scale(1.08);
  background: #172554;
}
.rhythm-hit-btn.lane-0.is-pressed { box-shadow: 0 0 28px #22d3eecc, inset 0 0 20px #22d3ee33; border-color: #22d3ee; }
.rhythm-hit-btn.lane-1.is-pressed { box-shadow: 0 0 28px #a855f7cc, inset 0 0 20px #a855f733; border-color: #a855f7; }
.rhythm-hit-btn.lane-2.is-pressed { box-shadow: 0 0 28px #34d399cc, inset 0 0 20px #34d39933; border-color: #34d399; }
.rhythm-hit-btn.lane-3.is-pressed { box-shadow: 0 0 28px #f472b6cc, inset 0 0 20px #f472b633; border-color: #f472b6; }
.rhythm-hit-btn.is-miss {
  transform: translateY(-2px) scale(1.05);
  border-color: #ef4444;
  color: #fecaca;
  box-shadow: 0 0 24px #ef4444cc;
  animation: rhythmShake 0.3s ease;
}
@keyframes rhythmShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.rhythm-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.rhythm-note {
  position: absolute;
  width: 60px;
  height: 20px;
  border-radius: 10px;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--note-glow, #0008);
  border: 1px solid;
}
.rhythm-note.lane-0 { background: linear-gradient(180deg, #22d3ee, #0ea5e9); border-color: #22d3ee88; --note-glow: #22d3ee66; }
.rhythm-note.lane-1 { background: linear-gradient(180deg, #a855f7, #7c3aed); border-color: #a855f788; --note-glow: #a855f766; }
.rhythm-note.lane-2 { background: linear-gradient(180deg, #34d399, #10b981); border-color: #34d39988; --note-glow: #34d39966; }
.rhythm-note.lane-3 { background: linear-gradient(180deg, #f472b6, #ec4899); border-color: #f472b688; --note-glow: #f472b666; }
.rhythm-note::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: linear-gradient(180deg, #fff3 0%, transparent 60%);
}
.rhythm-feedback-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.rhythm-feedback-hit {
  position: absolute;
  font-weight: 900;
  font-size: 15px;
  text-shadow: 0 0 16px currentColor, 0 0 8px #000;
  letter-spacing: 1px;
}
.rhythm-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 80px;
  font-weight: 900;
  color: #e2e8f0;
  background: #020617dd;
  text-shadow: 0 0 40px #a855f788;
  z-index: 5;
}
.rhythm-starbar {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  height: 10px;
  background: #0f172a88;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #334155;
  z-index: 3;
}
.rhythm-starbar div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #22d3ee, #a855f7, #ec4899);
  transition: width 0.1s linear;
  box-shadow: 0 0 8px #a855f7aa;
}
.rhythm-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: #111827;
  z-index: 3;
}
.rhythm-progress div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #34d399, #22d3ee, #a855f7);
  box-shadow: 0 0 6px #22d3ee88;
}
.rhythm-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0b1120cc;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 10px 16px;
  backdrop-filter: blur(8px);
  margin-bottom: 10px;
}
.rhythm-hud-title {
  font-weight: 800;
  font-size: 16px;
  color: #e2e8f0;
  text-shadow: 0 0 8px #22d3ee44;
}
.rhythm-hud-meta {
  font-size: 12px;
  color: #7dd3fc;
}
.rhythm-hud-score {
  text-align: right;
  font-weight: 900;
  font-size: 22px;
  color: transparent;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 6px #a855f766);
}
#rhythmGameCombo {
  font-size: 13px;
  font-weight: 700;
  color: #a7f3d0;
  text-shadow: 0 0 8px #34d39944;
}
.rhythm-game-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.rhythm-results {
  background: radial-gradient(ellipse at 50% 0%, #0ea5e911, transparent 60%), #0b1120ee;
  border: 1px solid #a855f733;
  border-radius: 22px;
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.rhythm-results h3 {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: transparent;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
}
.rhythm-result-score {
  font-size: 48px;
  font-weight: 900;
  color: transparent;
  background: linear-gradient(135deg, #22d3ee, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 16px #a855f766);
}
.rhythm-result-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 8px 0;
}
.rhythm-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.rhythm-result-grid div {
  background: #0f172a;
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 4px;
}
.rhythm-result-message {
  color: #94a3b8;
  font-size: 13px;
}
.rhythm-result-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.rhythm-scores-list {
  display: grid;
  gap: 8px;
}
.rhythm-score-item {
  display: flex;
  justify-content: space-between;
  background: #0b1120cc;
  border: 1px solid #a855f722;
  border-radius: 14px;
  padding: 12px 14px;
  color: #e2e8f0;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease;
}
.rhythm-score-item:hover {
  border-color: #a855f755;
}
@keyframes rhythmPulse {
  0%, 100% { opacity: 0.3; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.6; transform: scale(1.05) rotate(3deg); }
}

/* Music Library */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.album-item {
  text-align: center;
}

.album-cover {
  width: 100%;
  aspect-ratio: 1;
  background: #181336;
  border: 1px solid #8b5cf633;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 8px;
}

.playlist-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}

.playlist-list li {
  padding: 10px;
  background: #181336;
  border: 1px solid #8b5cf633;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.playlist-list li:hover {
  background: #1f1a40;
}

/* ─── MP4 Converter ───────────────────────────────────────── */
.btn-convert {
  background: #60a5fa;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.btn-convert:hover { background: #3b82f6; }
.btn-convert:active { transform: scale(0.97); }

/* ═══════════════════════════════════════════════════════════════════════
   TRANSFERT FICHIERS — Style WeTransfer
   ═══════════════════════════════════════════════════════════════════════ */

/* Carte-lien sur la page musique */
.wt-link-card {
  cursor: pointer;
  border: 1.5px solid #409cff33 !important;
  background: linear-gradient(160deg, #0c0e1f 0%, #111428 60%, #0d0f22 100%) !important;
  transition: border-color .25s, transform .2s, box-shadow .25s;
}
.wt-link-card:hover {
  border-color: #409cff88 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px #409cff22;
}
.wt-link-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px;
}
.wt-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #409cff 0%, #7c3aed 100%);
  font-size: 22px;
  flex-shrink: 0;
}
.wt-link-text { flex: 1; }
.wt-link-text h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #ece7ff;
}
.wt-link-text p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #9a8fbf;
}
.wt-link-arrow {
  font-size: 22px;
  color: #409cff;
  flex-shrink: 0;
  transition: transform .2s;
}
.wt-link-card:hover .wt-link-arrow { transform: translateX(4px); }

/* Panneau plein écran overlay */
.wt-panel {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: linear-gradient(160deg, rgba(8,6,24,.96) 0%, rgba(14,12,38,.94) 50%, rgba(10,8,28,.97) 100%);
  overflow-y: auto;
  display: none;
  animation: wtPanelIn .3s ease;
}
.wt-panel.open { display: block; }
@keyframes wtPanelIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.wt-panel-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  position: relative;
}
.wt-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px !important;
  height: 40px;
  border-radius: 50% !important;
  border: 1px solid #ffffff15 !important;
  background: #ffffff0a !important;
  color: #ece7ff !important;
  font-size: 18px !important;
  cursor: pointer;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.wt-close:hover { background: #ffffff1a !important; }

.wt-panel-header {
  text-align: center;
  padding: 20px 0 32px;
}
.wt-panel-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #409cff 0%, #7c3aed 100%);
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px #409cff33;
}
.wt-panel-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #ece7ff;
}
.wt-panel-header p {
  margin: 8px 0 0;
  font-size: 14px;
  color: #9a8fbf;
}

.wt-panel-body {
  background: #0f0d22cc;
  border: 1px solid #409cff22;
  border-radius: 20px;
  overflow: hidden;
}

.wt-card {
  border: 1.5px solid #409cff33 !important;
  background: linear-gradient(160deg, #0c0e1f 0%, #111428 60%, #0d0f22 100%) !important;
  padding: 0 !important;
  overflow: hidden;
}
.wt-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid #ffffff0a;
}
.wt-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.wt-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #409cff 0%, #7c3aed 100%);
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.wt-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ece7ff;
}
.wt-subtitle {
  font-size: 13px;
  color: #9a8fbf;
  margin-top: 2px;
}

/* Drop zone */
.wt-send-zone {
  padding: 20px 28px 24px;
}
.wt-dropzone {
  border: 2px dashed #409cff44;
  border-radius: 16px;
  background: #0e112266;
  padding: 40px 20px;
  text-align: center;
  transition: all .25s ease;
  cursor: pointer;
}
.wt-dropzone.wt-drag-over {
  border-color: #409cff;
  background: #409cff0d;
  transform: scale(1.01);
}
.wt-drop-icon {
  font-size: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px #409cff44);
}
.wt-drop-text {
  font-size: 16px;
  font-weight: 600;
  color: #d4d0e8;
  margin: 0 0 4px;
}
.wt-drop-sub {
  font-size: 13px;
  color: #6b6088;
  margin: 4px 0 12px;
}
.wt-browse-btn {
  display: inline-block;
  padding: 10px 28px !important;
  border-radius: 50px !important;
  background: linear-gradient(135deg, #409cff 0%, #7c3aed 100%) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600;
  cursor: pointer;
  border: none !important;
  width: auto !important;
  transition: transform .15s, box-shadow .2s;
}
.wt-browse-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 20px #409cff44;
}
.wt-drop-formats {
  font-size: 12px;
  color: #5a5272;
  margin: 14px 0 0;
}

/* File preview */
.wt-file-preview {
  margin-top: 16px;
  background: #14172a;
  border: 1px solid #409cff22;
  border-radius: 12px;
  padding: 14px 18px;
  animation: wtSlideIn .25s ease;
}
@keyframes wtSlideIn { from { opacity: 0; transform: translateY(-8px); } }
.wt-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wt-file-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.wt-file-info strong {
  display: block;
  font-size: 14px;
  color: #ece7ff;
  word-break: break-all;
}
.wt-file-size {
  font-size: 12px;
  color: #7a70a0;
}
.wt-file-remove {
  margin-left: auto;
  background: #ff4d6322 !important;
  color: #ff6b81 !important;
  border: none !important;
  width: 32px !important;
  height: 32px;
  border-radius: 50% !important;
  font-size: 14px !important;
  cursor: pointer;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.wt-file-remove:hover { background: #ff4d6344 !important; }

/* Recipient / Message */
.wt-recipient-row,
.wt-message-row {
  margin-top: 16px;
}
.wt-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #9a8fbf;
  margin-bottom: 6px;
}
.wt-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #409cff22;
  background: #14172a;
  color: #ece7ff;
  font-size: 14px;
  appearance: none;
  cursor: pointer;
}
.wt-select:focus { border-color: #409cff; outline: none; }
.wt-email-input {
  width: 100% !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  border: 1px solid #409cff22 !important;
  background: #14172a !important;
  color: #ece7ff !important;
  font-size: 14px !important;
}
.wt-email-input:focus { border-color: #409cff !important; outline: none; }
.wt-email-input::placeholder { color: #5a5272; }
.wt-email-hint {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  min-height: 18px;
}
.wt-email-hint.valid { color: #34d399; }
.wt-email-hint.invalid { color: #ff6b81; }
.wt-email-hint.checking { color: #9a8fbf; }

/* ── Friend selector ── */
.wt-friend-selector {
  border: 1px solid #409cff22;
  border-radius: 12px;
  background: #14172a;
  overflow: hidden;
}
.wt-friend-search-wrap {
  padding: 8px 12px;
  border-bottom: 1px solid #409cff15;
}
.wt-friend-search {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #409cff22;
  background: #0e1122;
  color: #ece7ff;
  font-size: 14px;
}
.wt-friend-search:focus { border-color: #409cff; outline: none; }
.wt-friend-search::placeholder { color: #5a5272; }
.wt-friend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}
.wt-friend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s;
}
.wt-friend-item:hover {
  background: #1a1e35;
}
.wt-friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.wt-friend-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1f2240;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.wt-friend-name {
  font-size: 14px;
  color: #ece7ff;
  font-weight: 500;
}
.wt-friend-empty {
  text-align: center;
  color: #5a5272;
  font-size: 13px;
  padding: 20px 16px;
  margin: 0;
}
.wt-friend-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #14172a;
  border: 1px solid #409cff44;
}
.wt-friend-selected img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.wt-friend-selected span {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #ece7ff;
}
.wt-friend-deselect {
  background: none;
  border: none;
  color: #ff6b81;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.wt-friend-deselect:hover {
  background: #ff6b8122;
}

.wt-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #409cff22;
  background: #14172a;
  color: #ece7ff;
  font-size: 14px;
  min-height: 60px;
  resize: vertical;
  font-family: inherit;
}
.wt-textarea:focus { border-color: #409cff; outline: none; }

/* Send button */
.wt-send-btn {
  margin-top: 20px;
  width: 100% !important;
  padding: 14px 24px !important;
  border-radius: 12px !important;
  border: none !important;
  background: linear-gradient(135deg, #409cff 0%, #7c3aed 100%) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .15s, opacity .15s, box-shadow .2s;
}
.wt-send-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
}
.wt-send-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px #409cff44;
}
.wt-send-icon { font-size: 18px; }

/* Progress */
.wt-progress {
  margin-top: 16px;
  background: #14172a;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  height: 36px;
}
.wt-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #409cff, #7c3aed);
  width: 0%;
  transition: width .3s ease;
  border-radius: 10px;
}
.wt-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.wt-status {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  min-height: 20px;
}
.wt-status.success { color: #34d399; }
.wt-status.error   { color: #ff6b81; }

/* Tabs */
.wt-tabs {
  display: flex;
  border-top: 1px solid #ffffff0a;
  border-bottom: 1px solid #ffffff0a;
}
.wt-tab {
  flex: 1;
  padding: 14px 16px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  color: #7a70a0 !important;
  font-size: 14px !important;
  font-weight: 600;
  cursor: pointer;
  width: auto !important;
  border-radius: 0 !important;
  transition: color .2s, border-color .2s;
}
.wt-tab:hover { color: #ece7ff !important; }
.wt-tab.active {
  color: #409cff !important;
  border-bottom-color: #409cff !important;
}

/* Transfer list */
.wt-list {
  padding: 16px 28px 24px;
  max-height: 420px;
  overflow-y: auto;
}
.wt-empty {
  text-align: center;
  color: #5a5272;
  font-size: 14px;
  padding: 32px 0;
}

/* Transfer item */
.wt-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #14172a;
  border: 1px solid #ffffff08;
  margin-bottom: 10px;
  transition: border-color .2s;
}
.wt-item:hover { border-color: #409cff33; }
.wt-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #1a1d36;
}
.wt-item-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #409cff33, #7c3aed33);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.wt-item-body {
  flex: 1;
  min-width: 0;
}
.wt-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #ece7ff;
}
.wt-item-file {
  font-size: 12px;
  color: #9a8fbf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-top: 2px;
}
.wt-item-msg {
  font-size: 12px;
  color: #6b6088;
  font-style: italic;
  margin-top: 3px;
}
.wt-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #5a5272;
  margin-top: 3px;
}
.wt-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.wt-dl-btn {
  padding: 8px 16px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #409cff 0%, #7c3aed 100%) !important;
  color: #fff !important;
  border: none !important;
  font-size: 13px !important;
  font-weight: 600;
  cursor: pointer;
  width: auto !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .15s;
}
.wt-dl-btn:hover { transform: scale(1.04); }
.wt-del-btn {
  padding: 8px 12px !important;
  border-radius: 8px !important;
  background: #ff4d6318 !important;
  color: #ff6b81 !important;
  border: 1px solid #ff4d6322 !important;
  font-size: 13px !important;
  cursor: pointer;
  width: auto !important;
  transition: background .15s;
}
.wt-del-btn:hover { background: #ff4d6333 !important; }
.wt-badge-new {
  display: inline-block;
  background: #409cff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

@media (max-width: 600px) {
  .wt-send-zone { padding: 16px; }
  .wt-list { padding: 12px 16px; }
  .wt-header { padding: 16px; }
  .wt-item { flex-wrap: wrap; }
  .wt-item-actions { width: 100%; margin-top: 8px; }
  .wt-dl-btn, .wt-del-btn { flex: 1; justify-content: center; }
}

.convert-info-banner {
  border: 1.5px solid #a78bfa44 !important;
  background: linear-gradient(135deg, #1a1040 0%, #0f0b1c 100%) !important;
  line-height: 1.7;
  color: #cbd5e1;
  font-size: 14px;
}
.convert-info-banner p { margin: 6px 0; }
.convert-info-banner p:first-child { margin-top: 0; }
.convert-info-banner p:last-child { margin-bottom: 0; }

.convert-section {
  border: 1.5px solid #60a5fa33 !important;
  background: linear-gradient(135deg, #101426 0%, #0f0b1c 100%) !important;
}

.convert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.convert-header h3 {
  margin: 0;
  font-size: 18px;
  color: #e5e7eb;
}

.convert-note {
  font-size: 12px;
  color: #94a3b8;
}

.convert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.convert-row input[type="file"] {
  flex: 1 1 220px;
  background: #0f1224;
  color: #e5e7eb;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px;
}

.convert-select {
  background: #0f1224;
  color: #e5e7eb;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 120px;
}

.convert-status {
  margin-top: 10px;
  font-size: 12px;
  color: #cbd5f5;
}

.convert-status.is-error {
  color: #fca5a5;
}

.convert-result {
  margin-top: 10px;
}

.convert-result a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.convert-result a:hover {
  text-decoration: underline;
}



/* ═══════ Notifications ═══════ */
.notifications-list {
  padding: 0 24px 24px;
  display: grid;
  gap: 12px;
}

.notification-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px !important;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  position: relative;
}

.notification-item:hover {
  background: rgba(109, 40, 217, 0.12) !important;
  border-color: #6d28d9 !important;
}

.notification-item.notif-unread {
  border-left: 3px solid #6d28d9 !important;
  background: rgba(109, 40, 217, 0.06) !important;
}

.notification-item .notif-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(109, 40, 217, 0.15);
}

.notification-item .notif-body {
  flex: 1;
  min-width: 0;
}

.notification-item .notif-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.notification-item .notif-msg {
  font-size: 13px;
  color: #b0b0c0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-time {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-empty {
  text-align: center;
  color: #666;
  padding: 48px 0;
  font-size: 15px;
}

/* ── Notification transfert enrichie ── */
.notif-transfer-card {
  width: 100%;
}
.notif-transfer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.notif-transfer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.notif-transfer-avatar-ph {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1f2240;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.notif-transfer-info {
  flex: 1;
  min-width: 0;
}
.notif-transfer-sender {
  font-size: 14px;
  font-weight: 600;
  color: #ece7ff;
}
.notif-transfer-file {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0e1122;
  border: 1px solid #409cff22;
  border-radius: 12px;
  padding: 12px 16px;
}
.notif-transfer-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.notif-transfer-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-transfer-name {
  font-size: 14px;
  font-weight: 600;
  color: #ece7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-transfer-size {
  font-size: 12px;
  color: #5a5272;
}
.notif-transfer-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #409cff);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .15s;
}
.notif-transfer-dl:hover {
  opacity: 0.85;
}

/* Badge de notification */
.nav-notif-wrap {
  position: relative;
  display: inline-flex;
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  box-shadow: 0 0 0 2px #0d0b1a;
  animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Bouton "Tout marquer comme lu" */
.notif-read-all-btn {
  width: auto !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  background: transparent !important;
  border: 1px solid #6d28d9 !important;
  color: #a78bfa !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: background .2s, color .2s;
  margin-top: 8px;
}

.notif-read-all-btn:hover {
  background: #6d28d9 !important;
  color: #fff !important;
}

/* Profile */
.profile-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 24px;
  display: grid;
  gap: 16px;
}

.profile-header {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1f1a42 0%, #151136 100%);
}

.profile-avatar-image {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #8b5cf6;
  flex-shrink: 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.profile-info h2 {
  margin: 0 0 6px;
  font-size: 30px;
}

.profile-info p {
  margin: 3px 0;
  color: #c4b5fd;
  font-size: 15px;
}

.profile-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #c4b5fd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: #8b5cf622;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.profile-edit-link:hover {
  color: #fff;
  background: #8b5cf644;
}

.profile-edit-card.hidden {
  display: none !important;
}

.pedit-header {
  position: relative;
}

.pedit-close-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: #c4b5fd;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.pedit-close-btn:hover {
  background: #8b5cf633;
  color: #fff;
}

/* --- Lien signalement profil --- */
.profile-report-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #f87171;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  background: #f8717111;
  border: 1px solid #f8717122;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.profile-report-link:hover {
  background: #f8717122;
  color: #fca5a5;
  border-color: #f8717144;
}

/* --- Page Signalement --- */
.report-page-shell {
  max-width: 720px;
  padding: 32px 28px 40px;
}
.report-page-shell h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: #f87171;
}
.report-intro {
  color: #c4b5fd;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.report-form {
  display: grid;
  gap: 0;
}
.report-section {
  border-top: 1px solid #6d28d922;
  padding: 20px 0 12px;
}
.report-section:first-child {
  border-top: none;
  padding-top: 0;
}
.report-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ddd6fe;
  margin: 0 0 14px;
}
.report-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .report-row { grid-template-columns: 1fr; }
}
.report-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.report-label {
  font-size: 13px;
  font-weight: 600;
  color: #a78bfa;
}
.report-label .required {
  color: #f87171;
}
.report-field input,
.report-field textarea,
.report-field select {
  background: #1a1635;
  border: 1px solid #6d28d944;
  border-radius: 10px;
  padding: 10px 14px;
  color: #ece7ff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.report-field input:focus,
.report-field textarea:focus,
.report-field select:focus {
  outline: none;
  border-color: #8b5cf6;
}
.report-field select {
  appearance: none;
  cursor: pointer;
}
.report-field textarea {
  resize: vertical;
  min-height: 100px;
}
.report-hint {
  font-size: 13px;
  color: #9ca3af;
  margin: 0 0 10px;
}
.report-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.report-checkbox-group input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #f87171;
  min-width: 18px;
  min-height: 18px;
}
.report-checkbox-label {
  font-size: 13px;
  color: #c4b5fd;
  line-height: 1.5;
}
.report-actions {
  padding-top: 16px;
}
.report-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #dc2626, #f87171);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.report-submit-btn:hover {
  opacity: 0.9;
}
.report-submit-btn:active {
  transform: scale(0.98);
}
.report-success {
  text-align: center;
  padding: 32px 16px;
}
.report-success h2 {
  color: #4ade80;
  margin-bottom: 12px;
}
.report-success p {
  color: #c4b5fd;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 10px;
}
.report-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #6d28d922;
  text-align: center;
}
.report-footer p {
  font-size: 13px;
  color: #9ca3af;
  margin: 4px 0;
}
.report-back-link {
  display: inline-block;
  margin-top: 12px;
  color: #c4b5fd;
  text-decoration: underline;
  font-size: 14px;
}
.report-back-link:hover {
  color: #fff;
}

.profile-main-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  gap: 16px;
  align-items: start;
}

.profile-left-col,
.profile-right-col {
  display: grid;
  gap: 16px;
}

.profile-edit-card {
  display: grid;
  gap: 12px;
}

.profile-upload-btn {
  justify-content: center;
}

.profile-photo-editor {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #2a2347;
  border-radius: 12px;
  background: #12102d;
}

.profile-photo-editor h4 {
  margin: 0;
  font-size: 14px;
  color: #ddd6fe;
}

#profilePhotoCanvas {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  border: 1px solid #3b2f67;
  background: #0b0a18;
  justify-self: center;
}

.profile-photo-controls {
  display: grid;
  gap: 6px;
}

.profile-photo-controls label {
  font-size: 12px;
  color: #c4b5fd;
}

.profile-posts-manager {
  display: grid;
  gap: 10px;
}

.member-posts-scroll {
  max-height: none;
  overflow: visible;
  display: grid;
  gap: 12px;
  padding-right: 0;
}

.user-profile-back {
  color: #a78bfa;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-right: 16px;
}
.user-profile-back:hover {
  color: #c4b5fd;
  text-decoration: underline;
}
#page-user .page-header {
  display: flex;
  align-items: center;
}

.member-post-item {
  border: 1px solid #332a5a;
  border-radius: 14px;
  padding: 14px;
  background: #151136;
  display: grid;
  gap: 10px;
}

.member-post-meta {
  margin: 0;
  color: #a1a1aa;
  font-size: 12px;
}

.member-post-preview {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #d4d0e8;
  white-space: pre-wrap;
  word-break: break-word;
}

.member-post-edit-link {
  color: #a78bfa;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.member-post-edit-link:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

.member-post-edit {
  display: grid;
  gap: 10px;
}

.member-post-text {
  min-height: 74px;
  resize: vertical;
}

.member-post-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-post-controls button,
.member-post-controls select {
  width: auto;
}

/* ═══ Page Abonnement ═══ */
#page-abonnement .page-header h1 {
  background: linear-gradient(90deg, #c084fc, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.abonnement-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.abonnement-bio-card {
  margin-top: 32px;
  background: rgba(30, 27, 75, 0.5);
  border: 1px solid rgba(109, 40, 217, 0.25);
  border-radius: 16px;
  padding: 24px 28px;
  line-height: 1.7;
  color: #e0e7ff;
  font-size: 15px;
}

.abonnement-bio-card h3 {
  font-size: 20px;
  margin: 0 0 12px;
  background: linear-gradient(90deg, #c084fc, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══ Section Abonnement ═══ */
.subscription-section {
  margin: 20px 0;
}

.subscription-header {
  text-align: center;
  margin-bottom: 24px;
}

.subscription-header h2 {
  font-size: 28px;
  margin: 0 0 8px;
  background: linear-gradient(90deg, #c084fc, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subscription-subtitle {
  color: #a1a1aa;
  font-size: 15px;
  margin: 0;
}

.subscription-launch-banner {
  margin-top: 16px;
  padding: 20px 28px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(15, 10, 40, 0.85));
  border: 1px solid #7c3aed66;
  border-radius: 14px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.subscription-launch-banner p {
  margin: 5px 0;
  font-size: 15px;
  color: #ece7ff;
  font-weight: 600;
}
.subscription-launch-banner p:first-child {
  font-size: 20px;
  color: #c4b5fd;
  margin-bottom: 10px;
}
.subscription-launch-banner .launch-separator {
  height: 8px;
  margin: 0;
}

.subscription-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}

.subscription-plans.subscription-plans-3 {
  grid-template-columns: 1fr 1fr 1fr;
  max-width: 1100px;
}

.subscription-card {
  position: relative;
  background: linear-gradient(180deg, #1a1540 0%, #0f0d22 100%);
  border: 1px solid #6d28d944;
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.subscription-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px #7c3aed30;
}

.plan-premium-pro {
  border-color: #f59e0b55;
  background: linear-gradient(180deg, #1f1a0e 0%, #0f0d22 100%);
}

.plan-premium-pro:hover {
  box-shadow: 0 12px 40px #f59e0b30;
}

.plan-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 18px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.plan-badge {
  font-size: 20px;
  font-weight: 700;
  color: #c084fc;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.plan-badge.badge-pro {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-icon {
  font-size: 48px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-amount {
  font-size: 40px;
  font-weight: 800;
  color: #fff;
}

.price-period {
  font-size: 16px;
  color: #a1a1aa;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-features li {
  font-size: 14px;
  color: #d4d4d8;
  padding: 6px 0;
  border-bottom: 1px solid #ffffff0a;
  position: relative;
  cursor: default;
}

.plan-features li[data-tooltip] {
  cursor: help;
}

.plan-features li[data-tooltip]:hover {
  z-index: 9999;
}

.subscription-card:has(li[data-tooltip]:hover) {
  z-index: 9999;
}

.plan-features li[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #1e1b4b;
  color: #e0e7ff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #6d28d966;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 12px #7c3aed30;
  white-space: normal;
  width: max-content;
  max-width: 340px;
  z-index: 100;
  pointer-events: none;
  animation: tooltipFadeIn 0.18s ease;
}

.plan-features li[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1e1b4b;
  z-index: 101;
  pointer-events: none;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-promo {
  font-size: 13px;
  color: #c4b5fd;
  text-align: center;
  min-height: 20px;
  margin: 0;
}

.plan-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
  margin-top: auto;
}

.plan-btn-premium {
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: #fff;
}

.plan-btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px #7c3aed50;
}

.plan-btn-pro {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #fff;
}

.plan-btn-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px #f59e0b50;
}

.plan-annual-tag {
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.plan-free {
  border-color: #3f3f4633;
  background: linear-gradient(180deg, #18182b 0%, #0f0d22 100%);
}

.plan-free:hover {
  box-shadow: 0 12px 40px #52525230;
}

.badge-free {
  color: #a1a1aa;
}

.plan-btn-free {
  background: #27272a;
  color: #a1a1aa;
  cursor: default;
}

.feature-locked {
  opacity: 0.7;
  font-weight: 700;
  color: #fff;
}

.x-red {
  color: #ef4444;
  filter: none;
}

@media (max-width: 700px) {
  .subscription-plans {
    grid-template-columns: 1fr;
  }

  .subscription-plans.subscription-plans-3 {
    grid-template-columns: 1fr;
  }

  .subscription-header h2 {
    font-size: 22px;
  }

  .price-amount {
    font-size: 32px;
  }
}

@media (max-width: 980px) {
  .profile-main-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    align-items: flex-start;
  }

  .profile-avatar-image {
    width: 92px;
    height: 92px;
  }

  .profile-info h2 {
    font-size: 24px;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.stat-item {
  text-align: center;
  padding: 12px;
  background: #181336;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-item strong {
  font-size: 24px;
  color: #7c3aed;
}

.stat-item span {
  font-size: 13px;
  color: #a1a1aa;
}

.layout {
  display: grid;
  grid-template-columns: 2.6fr 1fr;
  gap: 16px;
  padding: 16px;
}

.layout-col {
  display: grid;
  gap: 16px;
  align-content: start;
}

.feed-card {
  min-height: 60vh;
}

.card {
  background: #0f0d22cc;
  border: 1px solid #6d28d933;
  border-radius: 16px;
  padding: 14px;
}

.profile-mini {
  overflow: hidden;
  padding: 0;
}

.profile-cover {
  height: 80px;
  background: linear-gradient(120deg, #6d28d9, #22d3ee, #f59e0b);
  background-size: 200% 200%;
  animation: coverShift 10s ease-in-out infinite;
}

.profile-body {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px 4px;
}

.profile-mini .profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #151136;
  border: 2px solid #7c3aed;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.profile-mini h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.profile-mini p {
  margin: 0;
  color: #a1a1aa;
  font-size: 13px;
}

.profile-stats {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px 14px;
  font-size: 12px;
  color: #c4b5fd;
}

.composer h2 {
  margin: 0 0 12px;
}

.composer-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.composer-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #151136;
  border: 1px solid #7c3aed55;
  flex-shrink: 0;
}

.composer textarea {
  min-height: 80px;
  resize: vertical;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

/* ─ Composer Editor (contenteditable) ─ */
.composer-editor {
  width: 100%;
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  resize: vertical;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #6d28d955;
  background: #151136;
  color: #ece7ff;
  padding: 10px;
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.5;
  cursor: text;
}
.composer-editor:empty::before {
  content: attr(data-placeholder);
  color: #6b6b8a;
  pointer-events: none;
}
.composer-editor:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}
.composer-editor img.custom-emoji-inline,
.composer-editor img.ce-sticker {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  object-fit: contain;
  margin: 0 2px;
  pointer-events: none;
}
.composer-editor .inline-avatar {
  display: inline-block;
  vertical-align: middle;
  pointer-events: none;
}

/* ─ Emoji Picker ─ */
.emoji-picker-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.emoji-toggle-btn {
  background: none !important;
  border: none !important;
  font-size: 22px;
  cursor: pointer;
  padding: 2px 6px;
  width: auto !important;
  transition: transform .15s;
}
.emoji-toggle-btn:hover { transform: scale(1.2); }
.emoji-picker-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px;
  background: #1a1640;
  border: 1px solid #6d28d955;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  width: 300px;
  max-height: 300px;
  overflow-y: auto;
}
.emoji-pick {
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background .12s, transform .12s;
  line-height: 1;
  user-select: none;
}
.emoji-pick:hover {
  background: #7c3aed33;
  transform: scale(1.25);
}

/* ─ Custom Emoji Stickers Picker ─ */
.custom-emoji-toggle-btn {
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 2px 4px;
  width: auto !important;
  transition: transform .15s;
  line-height: 1;
}
.custom-emoji-toggle-btn:hover { transform: scale(1.15); }
.custom-emoji-picker-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 51;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px;
  background: #1a1040f0;
  border: 1px solid #6d28d944;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  width: 360px;
  max-height: 360px;
  overflow-y: auto;
}
.custom-emoji-pick {
  width: 56px;
  height: 68px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color .15s, transform .12s, background .15s;
}
.custom-emoji-pick:hover {
  border-color: #7c3aed55;
  background: #7c3aed15;
  transform: scale(1.12);
}
.custom-emoji-pick img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
}
.custom-emoji-label {
  font-size: 7px;
  color: #a1a1aa;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 54px;
}
/* Inline sticker dans messages/posts */
.custom-emoji-inline {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  object-fit: contain;
  margin: 0 1px;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.composer-actions select,
.composer-actions button,
.composer-actions .upload-btn {
  width: auto;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #151136;
  border: 1px solid #6d28d955;
  cursor: pointer;
  font-size: 13px;
}

.upload-btn input {
  display: none;
}

/* ── High-Light button with color pulsation ── */
.highlight-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  animation: highlightPulse 2s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  width: 70px;
  height: 70px;
}
.highlight-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.highlight-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 0 20px rgba(218, 165, 32, 0.7), 0 0 35px rgba(184, 134, 11, 0.5);
}
@keyframes highlightPulse {
  0%   { box-shadow: 0 0 8px rgba(218, 165, 32, 0.4), 0 0 16px rgba(184, 134, 11, 0.2); }
  50%  { box-shadow: 0 0 18px rgba(218, 165, 32, 0.7), 0 0 30px rgba(184, 134, 11, 0.4); }
  100% { box-shadow: 0 0 8px rgba(218, 165, 32, 0.4), 0 0 16px rgba(184, 134, 11, 0.2); }
}

.upload-name {
  font-size: 12px;
  color: #a1a1aa;
  flex: 1;
  min-width: 140px;
}
.album-btn {
  background: #151136;
  border: 1px solid #6d28d955;
  color: #e9d5ff;
}
.composer-album {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #a1a1aa;
}
.album-name {
  color: #e9d5ff;
}
.album-clear {
  padding: 6px 10px;
  font-size: 12px;
  background: #151136;
  border: 1px solid #6d28d955;
  color: #e9d5ff;
}
.composer-preview {
  display: none;
  gap: 8px;
  border-radius: 12px;
  border: 1px dashed #6d28d955;
  padding: 10px;
  background: #0f0d22;
}
.composer-preview.active {
  display: grid;
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c4b5fd;
  font-size: 12px;
}
.preview-clear {
  padding: 6px 10px;
  font-size: 12px;
  background: #151136;
  border: 1px solid #6d28d955;
  color: #e9d5ff;
}
.preview-body img,
.preview-body video {
  width: 100%;
  border-radius: 10px;
}
.preview-body audio {
  width: 100%;
}

.composer-hint {
  margin: 0;
  color: #71717a;
  font-size: 12px;
}

.stack { display: grid; gap: 10px; }

input, textarea, select, button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #6d28d955;
  background: #151136;
  color: #ece7ff;
  padding: 10px;
}

button {
  cursor: pointer;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  border: none;
  transition: transform .2s ease;
}
button:hover { transform: translateY(-1px); }

.post-card, .artist-card {
  background: linear-gradient(135deg, #181336 0%, #1a1040 100%);
  border: 1px solid #8b5cf622;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.artist-friend-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color .15s;
}
.artist-friend-link:hover {
  color: #c4b5fd;
  text-decoration: underline;
}
.post-card:hover {
  border-color: #8b5cf644;
  box-shadow: 0 4px 24px #7c3aed11;
}

/* ─ Header ─ */
.pc-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px 0;
}
.pc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #7c3aed44;
}
.pc-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.pc-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #7c3aed44;
}
.pc-author h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ece7ff;
}
.pc-meta {
  font-size: 12px;
  color: #71717a;
}
.pc-follow-btn {
  margin: 0 auto;
  width: auto;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: #fff;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.pc-follow-btn:hover { transform: scale(1.05); }
.pc-follow-btn.following {
  background: #22c55e22;
  color: #4ade80;
}
.pc-follow-btn.following:hover {
  background: #dc262622;
  color: #f87171;
}
.pc-menu-btn {
  margin-left: auto;
  background: none !important;
  border: none;
  color: #71717a;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.pc-menu-btn:hover {
  background: #ffffff0d !important;
  color: #ece7ff;
}

/* ─ Content ─ */
.pc-content {
  padding: 10px 16px 4px;
}
.pc-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #d4d0e8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─ Media ─ */
.post-card .post-media {
  display: block;
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
  background: #0a0a14;
  border-radius: 0;
  margin-top: 8px;
}

/* ─ Stats ─ */
.pc-stats {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  font-size: 12px;
  color: #71717a;
}

/* ─ Action bar ─ */
.pc-actions {
  display: flex;
  border-top: 1px solid #ffffff0a;
  border-bottom: 1px solid #ffffff0a;
}
.pc-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  background: none !important;
  border: none;
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
}
.pc-action-btn:hover {
  background: #ffffff08 !important;
  color: #e9d5ff;
  transform: none;
}
.pc-action-btn.liked {
  color: #ef4444;
}
.pc-action-btn svg {
  flex-shrink: 0;
}

/* ─ Share panel ─ */
.pc-share-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #0f0a2588;
  border-top: 1px solid #ffffff08;
  animation: pcSlideDown 0.25s ease;
}
@keyframes pcSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pc-share-label {
  font-size: 12px;
  color: #71717a;
  margin-right: 4px;
  width: 100%;
  margin-bottom: 2px;
}
.pc-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}
.pc-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #ffffff11;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  background: #181336;
  color: #d4d0e8;
}
.pc-share-btn:hover { transform: translateY(-1px); }

.pc-share-facebook { border-color: #1877f222; }
.pc-share-facebook:hover { background: #1877f222; color: #60a5fa; border-color: #1877f2; }

.pc-share-instagram { border-color: #e1306c22; }
.pc-share-instagram:hover { background: #e1306c22; color: #f472b6; border-color: #e1306c; }

.pc-share-linkedin { border-color: #0a66c222; }
.pc-share-linkedin:hover { background: #0a66c222; color: #60a5fa; border-color: #0a66c2; }

.pc-share-youtube { border-color: #ff000022; }
.pc-share-youtube:hover { background: #ff000022; color: #f87171; border-color: #ff0000; }

.pc-share-tiktok { border-color: #00f2ea22; }
.pc-share-tiktok:hover { background: #00f2ea22; color: #2dd4bf; border-color: #00f2ea; }

.pc-share-copy { border-color: #71717a33; }
.pc-share-copy:hover { background: #71717a22; color: #e9d5ff; border-color: #71717a; }

.pc-share-profile { border-color: #7c3aed33; }
.pc-share-profile:hover { background: #7c3aed22; color: #c4b5fd; border-color: #7c3aed; }

/* ─ Comment section ─ */
.pc-comment-section {
  padding: 0 16px 14px;
}
.pc-comment-form {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
}
.pc-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 4px;
}
.pc-comment-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pc-comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #6d28d933;
  background: #0f0a25;
  color: #ece7ff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 48px;
  transition: border-color 0.2s;
}
.pc-comment-form textarea:focus {
  border-color: #7c3aed;
}
.pc-comment-submit {
  align-self: flex-end;
  padding: 6px 18px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(90deg, #7c3aed, #4f46e5) !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.pc-comment-submit:hover {
  opacity: 0.85;
  background: linear-gradient(90deg, #7c3aed, #4f46e5) !important;
  color: #fff !important;
}

/* ── Comment Emoji Toolbar ── */
.pc-comment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.pc-comment-emoji-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  position: relative;
}
.pc-comment-emoji-btn,
.pc-comment-avatar-btn,
.pc-comment-sticker-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 16px;
  line-height: 1;
  color: #a1a1aa;
  transition: background .15s, border-color .15s;
  width: auto;
}
.pc-comment-emoji-btn:hover,
.pc-comment-avatar-btn:hover,
.pc-comment-sticker-btn:hover {
  background: #7c3aed22;
  border-color: #7c3aed55;
}

/* ── Comment Picker Panels (dropdown vers le bas) ── */
.pc-comment-picker-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  position: fixed;
  width: 320px;
  max-height: 300px;
  overflow-y: auto;
  background: #1a1040f0;
  border: 1px solid #6d28d944;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  z-index: 10000;
}
.pc-cmt-emoji-pick {
  font-size: 22px;
  cursor: pointer;
  padding: 3px;
  border-radius: 6px;
  transition: background .12s, transform .12s;
  line-height: 1;
}
.pc-cmt-emoji-pick:hover {
  background: #7c3aed33;
  transform: scale(1.2);
}
/* Sticker picks dans commentaire */
.pc-cmt-sticker .custom-emoji-pick {
  width: 52px;
  height: 52px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color .15s, transform .12s;
}
.pc-cmt-sticker .custom-emoji-pick:hover {
  border-color: #7c3aed55;
  background: #7c3aed15;
  transform: scale(1.1);
}
.pc-cmt-sticker .custom-emoji-pick img {
  width: 36px;
  height: 36px;
}
.pc-cmt-sticker .custom-emoji-label {
  font-size: 6px;
  color: #a1a1aa;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50px;
}
/* Avatar picks dans commentaire */
.pc-cmt-avatar .av-pick {
  width: 48px;
  height: 60px;
}
.pc-cmt-avatar .av-pick .lb-avatar {
  width: 32px !important;
  height: 32px !important;
}
.pc-cmt-avatar .av-label {
  font-size: 6px;
}

.pc-comment-form input {
  flex: 1;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #6d28d933;
  background: #0f0a25;
  color: #ece7ff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.pc-comment-form input:focus {
  border-color: #7c3aed;
}
.pc-comment-form button {
  background: none !important;
  border: none;
  color: #7c3aed;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
}
.pc-comment-form button:hover {
  background: #7c3aed22 !important;
  color: #a855f7;
}
.pc-comments {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pc-comments li {
  padding: 6px 0;
  font-size: 13px;
  color: #d4ceff;
  border-bottom: 1px solid #ffffff06;
}
.pc-comments li:last-child {
  border-bottom: none;
}
.pc-comments li strong {
  color: #e9d5ff;
  margin-right: 6px;
}

.post-card header img, .artist-card img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.post-media, .media-player {
  width: 100%;
  border-radius: 10px;
  margin-top: 8px;
}

/* Placeholder "cliquer pour lire" pour les videos stockees en base64 */
.video-preview-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 160px;
  background: linear-gradient(135deg, #1a1830 60%, #2a2060);
  border-radius: 10px;
  margin-top: 8px;
  cursor: pointer;
  overflow: hidden;
  border: none;
  transition: border-color 0.2s;
}
.video-preview-placeholder .video-thumb {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
  background: #000;
}
.video-preview-placeholder .video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  transition: background 0.2s;
}
.video-preview-placeholder:hover .video-play-overlay {
  background: rgba(0,0,0,0.15);
}
.video-preview-placeholder:hover {
  background: linear-gradient(135deg, #22204a 60%, #332880);
  border-color: #7c6ff7;
  color: #fff;
}
.video-preview-placeholder svg {
  opacity: 0.75;
  filter: drop-shadow(0 2px 8px #7c6ff7aa);
  transition: opacity 0.2s;
}
.video-preview-placeholder:hover svg { opacity: 1; }

.youtube-embed {
  aspect-ratio: 16 / 9;
  border: 0;
  background: #0a0818;
}

/* ─── YouTube Carousel ─────────────────────────────────────────────────── */
#ytCarouselWrap {
  background: #0b0920;
  border: 1px solid #6d28d930;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.yt-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.yt-carousel-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2d9ff;
  display: flex;
  align-items: center;
}
.yt-carousel-nav {
  display: flex;
  gap: 6px;
}
.yt-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #6d28d955;
  background: #181336;
  color: #c4b5fd;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.yt-nav-btn:hover { background: #6d28d944; }
.yt-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: #6d28d944 transparent;
}
.yt-carousel::-webkit-scrollbar { height: 4px; }
.yt-carousel::-webkit-scrollbar-thumb { background: #6d28d966; border-radius: 4px; }
.yt-card {
  flex: 0 0 200px;
  background: #12102a;
  border: 1px solid #6d28d930;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.yt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px #7c3aed33;
}
.yt-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #070515;
}
.yt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.yt-card:hover .yt-thumb { transform: scale(1.06); }
.yt-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00000055;
  opacity: 0;
  transition: opacity .2s;
}
.yt-card:hover .yt-play-btn { opacity: 1; }
.yt-play-btn svg {
  filter: drop-shadow(0 0 6px #000c);
}
.yt-card-title {
  padding: 8px 10px;
  font-size: 11px;
  color: #c4b5fd;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Carte YouTube intégrée dans le fil d'actualité ─────────────────────── */
.yt-feed-card {
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  border: 1px solid #ff444422 !important;
}
.yt-feed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px #ff000022;
  border-color: #ff444466 !important;
}
.yt-feed-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1c0505;
  border: 2px solid #ff444433;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yt-feed-thumb-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
  aspect-ratio: 16/9;
  background: #0a0a10;
}
.yt-feed-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.yt-feed-card:hover .yt-feed-thumb { transform: scale(1.04); }
.yt-feed-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00000055;
  opacity: 0;
  transition: opacity .22s;
}
.yt-feed-card:hover .yt-feed-play { opacity: 1; }
.yt-feed-play svg {
  filter: drop-shadow(0 2px 12px #000);
  margin-left: 6px;
}
/* Modal lecteur YouTube */
.yt-modal-overlay {
  position: fixed;
  inset: 0;
  background: #000000bb;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s;
}
.yt-modal-overlay.open { opacity: 1; }
.yt-modal-box {
  background: #0f0d22;
  border: 1px solid #6d28d944;
  border-radius: 16px;
  width: min(860px, 96vw);
  overflow: hidden;
  box-shadow: 0 20px 60px #000a;
  transform: translateY(12px);
  transition: transform .25s;
}
.yt-modal-overlay.open .yt-modal-box { transform: translateY(0); }
.yt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #130f2a;
  border-bottom: 1px solid #6d28d922;
}
.yt-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: #e2d9ff;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}
.yt-modal-close {
  background: #7f1d1d55;
  border: 1px solid #dc2626;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #fca5a5;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.yt-modal-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.yt-modal-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Admin YouTube section */
.yt-admin-add {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.yt-admin-add label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.yt-admin-add input { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; color: #ece7ff; font-size: 13px; }
.yt-playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.yt-playlist-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.yt-playlist-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.yt-playlist-item-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.yt-playlist-item-title {
  font-size: 12px;
  color: #c4b5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yt-playlist-item-id {
  font-size: 11px;
  color: var(--muted);
}

.pc-comments {
  margin: 8px 0 0;
  padding-left: 0;
  color: #d4ceff;
}

.player-shell { margin: 0 16px 16px; }

.page-register { min-height: 100vh; display: grid; place-items: center; }
.register-shell {
  width: min(720px, 92vw);
  background: #100d26dd;
  border: 1px solid #8b5cf633;
  border-radius: 16px;
  padding: 20px;
}
.register-form { display: grid; gap: 10px; margin-top: 12px; }
.terms-box {
  margin: 16px 0 12px;
  padding: 12px 14px;
  border: 1px solid #8b5cf633;
  border-radius: 12px;
  background: #0f0b24aa;
}
.terms-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #ddd6fe;
}
.terms-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #cfc6ff;
  font-size: 0.95rem;
  line-height: 1.4;
}
.terms-accept {
  margin: 14px 0 12px;
}
.terms-accept-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #d9d1ff;
}
.terms-accept input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #8b5cf6;
}
.terms-link {
  color: #c4b5fd;
  text-decoration: underline;
}
.terms-page-shell {
  max-height: min(92vh, 980px);
  overflow: auto;
}
.terms-page-shell p {
  margin: 10px 0;
  line-height: 1.55;
  color: #ddd6fe;
}
.terms-page-shell .terms-title {
  margin-top: 18px;
  margin-bottom: 8px;
}
.terms-page-shell .terms-list {
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .terms-page-shell {
    width: min(720px, 96vw);
    padding: 16px;
  }
}
.ghost-link { color: #c4b5fd; text-decoration: none; }
.status { min-height: 20px; color: #ddd6fe; }

@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: .7; } }
@keyframes swing { 0%,100% { transform: translateY(0); } 50% { transform: translateY(35px); } }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(24px); } }
@keyframes mistMove { 0%,100% { opacity:.25; } 50% { opacity:.6; } }
@keyframes stagePulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes beamSweep {
  0%,100% { opacity: .35; transform: translateY(0) rotate(-6deg); }
  50% { opacity: .75; transform: translateY(15px) rotate(6deg); }
}
@keyframes smokeRise {
  0% { transform: translateY(0) scale(1); opacity: .4; }
  50% { transform: translateY(-30px) scale(1.1); opacity: .65; }
  100% { transform: translateY(-60px) scale(1.2); opacity: .35; }
}
@keyframes coverShift {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes hueSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes sheenPulse {
  0%,100% { opacity: 0.25; }
  50% { opacity: 0.45; }
}
@keyframes orbitDrift {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(20px) scale(1.05); }
}
@keyframes stagePulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes beamSweep {
  0%,100% { opacity: .35; transform: translateY(0) rotate(-6deg); }
  50% { opacity: .75; transform: translateY(15px) rotate(6deg); }
}
@keyframes smokeRise {
  0% { transform: translateY(0) scale(1); opacity: .4; }
  50% { transform: translateY(-30px) scale(1.1); opacity: .65; }
  100% { transform: translateY(-60px) scale(1.2); opacity: .35; }
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .post-card .post-media {
    max-height: 480px;
  }
  
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid #6d28d933;
  }
  
  .nav-menu {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  
  .nav-item {
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-left: none;
    border-bottom: 3px solid transparent;
    min-width: 80px;
  }
  
  .nav-item.active {
    border-left-color: transparent;
    border-bottom-color: #7c3aed;
  }
  
  .nav-item svg {
    width: 20px;
    height: 20px;
  }
  
  .nav-item span {
    font-size: 12px;
  }
}

/* BandPro - Collaborative Tablature Styles */
/* Removed BandPro-specific styles */

/* Available Bands */
.available-bands {
  max-width: 900px;
  margin: 0 auto;
}

.bands-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.bands-header h3 {
  margin: 0;
  color: #7c3aed;
}

.bands-list {
  display: grid;
  gap: 16px;
}

.band-item {
  background: linear-gradient(135deg, #181336, #1a1444);
  border: 2px solid #6d28d955;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.band-item:hover {
  border-color: #7c3aed;
  transform: translateX(5px);
  box-shadow: 0 8px 20px #7c3aed30;
}

.band-item.band-full {
  opacity: 0.6;
  border-color: #3f3f46;
}

.band-item.band-full:hover {
  transform: none;
}

.band-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.band-avatar-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid #7c3aed66;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
}

.band-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band-avatar-btn.disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.band-avatar-btn:not(.disabled):hover {
  transform: translateY(-1px) scale(1.03);
}

.band-preview-panel {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #7c3aed44;
  background: #100d29;
}

.band-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #ddd6fe;
  font-size: 13px;
}

.band-preview-members {
  display: grid;
  gap: 8px;
}

.band-preview-member {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: #181336;
  border: 1px solid #8b5cf633;
}

.band-preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}

.band-preview-avatar.has-image {
  background: #1b153a;
  border: 1px solid #7c3aed55;
}

.band-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band-preview-member-info {
  min-width: 0;
  display: grid;
}

.band-preview-member-info strong {
  color: #ddd6fe;
  font-size: 13px;
}

.band-preview-member-info span {
  color: #a1a1aa;
  font-size: 12px;
}

.band-preview-status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.band-preview-status.online {
  color: #10b981;
  border-color: #10b98144;
  background: #064e3b44;
}

.band-preview-status.offline {
  color: #f59e0b;
  border-color: #f59e0b44;
  background: #78350f44;
}

.band-preview-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.band-preview-actions .btn-secondary,
.band-preview-actions .btn-join-band {
  width: auto;
}

.band-info h4 {
  margin: 0 0 8px 0;
  color: #c4b5fd;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.band-info {
  flex: 1;
  min-width: 0;
}

.band-creator {
  margin: 0;
  color: #a1a1aa;
  font-size: 13px;
}

.band-members {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #7c3aed30;
  padding: 8px 16px;
  border-radius: 20px;
}

.member-count {
  font-weight: bold;
  color: #7c3aed;
  font-size: 16px;
}

.member-icon {
  font-size: 20px;
}

.band-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #6d28d955;
}

.band-date {
  font-size: 13px;
  color: #71717a;
}

.btn-join-band {
  padding: 10px 24px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-join-band:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px #7c3aed60;
}

.btn-join-band.btn-disabled {
  background: #3f3f46;
  color: #71717a;
  cursor: not-allowed;
}

.btn-join-band.btn-disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Private Band Login */
.private-band-login {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  padding: 40px;
}

.private-band-login h3 {
  margin: 0 0 12px 0;
  color: #7c3aed;
  font-size: 24px;
}

.private-band-login p {
  margin: 0 0 24px 0;
  color: #a1a1aa;
}

.private-login-form h4 {
  margin: 0 0 20px 0;
  color: #c4b5fd;
  font-size: 20px;
}

#privateAccessCode {
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  font-size: 16px;
  text-align: center;
  letter-spacing: 2px;
}

.private-actions {
  display: flex;
  gap: 12px;
}

.private-actions button {
  flex: 1;
}

.instruments-grid {
  background: #0f0d22cc;
}

.instruments-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.instrument-slot {
  background: linear-gradient(135deg, #181336, #1a1444);
  border: 2px solid #6d28d955;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.instrument-slot:hover {
  border-color: #7c3aed;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px #7c3aed30;
}

.instrument-slot.occupied {
  border-color: #22c55e;
  background: linear-gradient(135deg, #1a3323, #0f1f15);
}

.instrument-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.instrument-slot h4 {
  margin: 8px 0;
  color: #c4b5fd;
  font-size: 16px;
}

 slot-status {
  margin: 12px 0;
  min-height: 40px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.available {
  background: #22c55e30;
  color: #22c55e;
  border: 1px solid #22c55e;
}

.status-badge.occupied {
  background: #f59e0b30;
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.player-name {
  display: block;
  color: #c4b5fd;
  font-size: 13px;
  margin-top: 4px;
  font-weight: 600;
}

.join-slot-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.join-slot-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px #7c3aed50;
}

.join-slot-btn:disabled {
  background: #3f3f46;
  color: #71717a;
  cursor: not-allowed;
  transform: none;
}

/* Tablature Viewer */
.tablature-viewer {
  background: #0a0818;
  border: 2px solid #7c3aed;
  padding: 20px;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #6d28d955;
}

.viewer-header h3 {
  margin: 0;
  color: #7c3aed;
  font-size: 24px;
}

/* Playback Controls */
.playback-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: #151136;
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.control-btn {
  padding: 10px 20px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px #7c3aed50;
}

.control-btn:active {
  transform: translateY(0);
}

.tempo-control {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.tempo-control label {
  color: #c4b5fd;
  font-size: 14px;
  white-space: nowrap;
}

#tempoSlider {
  flex: 1;
  height: 6px;
  background: #181336;
  border-radius: 10px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

#tempoSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#tempoSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.position-indicator {
  color: #c4b5fd;
  font-size: 14px;
  padding: 0 12px;
}

.position-indicator strong {
  color: #7c3aed;
  font-size: 18px;
}

/* Tablature Content */
.tablature-content {
  background: #000000;
  border: 1px solid #6d28d955;
  border-radius: 12px;
  padding: 24px;
  min-height: 400px;
  max-height: 500px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  color: #10b981;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

.tablature-content::-webkit-scrollbar {
  width: 8px;
}

.tablature-content::-webkit-scrollbar-track {
  background: #0f0d22;
  border-radius: 10px;
}

.tablature-content::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 10px;
}

.tab-line {
  white-space: pre;
  margin: 2px 0;
}

.tablature-progress-row {
  align-items: center;
}

#tablatureProgressBar {
  flex: 1;
}

.tab-pdf-page {
  margin: 14px 0;
  padding: 10px;
  background: #0a0a0a;
  border-left: 3px solid #7c3aed;
  border-radius: 8px;
}

.tab-pdf-image {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #6d28d955;
  background: #000;
}

.tab-measure {
  margin: 20px 0;
  padding: 16px 20px;
  background: #0a0a0a;
  border-left: 3px solid #7c3aed;
  min-width: fit-content;
}

.measure-number {
  color: #7c3aed;
  font-weight: bold;
  margin-bottom: 8px;
}

.current-measure {
  background: #1a1444;
  box-shadow: 0 0 20px #7c3aed50;
}

/* Metronome */
.metronome {
  margin-top: 20px;
  padding: 16px;
  background: #151136;
  border-radius: 12px;
  text-align: center;
}

.beat-indicator {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.beat {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #181336;
  border: 2px solid #6d28d955;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #71717a;
  transition: all 0.2s ease;
}

.beat.active {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  border-color: #7c3aed;
  box-shadow: 0 0 20px #7c3aed80;
  transform: scale(1.1);
}

/* Participants List */
.participants-list {
  background: #0f0d22cc;
}

.participants-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.participants {
  margin-top: 16px;
}

.participant-band-rail {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #7c3aed44;
  background: #120f2b;
}

.participant-band-rail-title {
  margin: 0 0 8px;
  color: #c4b5fd;
  font-size: 12px;
}

.participant-band-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.participant-band-btn {
  width: auto;
  min-width: 74px;
  border: 1px solid #6d28d955;
  background: #181336;
  border-radius: 10px;
  padding: 6px;
  color: #ddd6fe;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.participant-band-btn small {
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: #a1a1aa;
}

.participant-band-btn.active {
  border-color: #22c55e;
  background: #11251b;
}

.participant-band-btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.participant-band-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  font-size: 12px;
  font-weight: 700;
}

.participant-band-avatar.has-image {
  background: #1b153a;
  border: 1px solid #7c3aed55;
}

.participant-band-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #181336;
  border: 1px solid #8b5cf633;
  border-radius: 8px;
  margin-bottom: 8px;
}

.participant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.participant-avatar span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.participant-avatar.has-image {
  background: #1b153a;
  border: 1px solid #7c3aed55;
}

.participant-avatar.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.participant-info {
  flex: 1;
}

.participant-info strong {
  display: block;
  color: #c4b5fd;
  font-size: 14px;
}

.participant-info span {
  font-size: 12px;
  color: #a1a1aa;
}

.participant-status {
  font-size: 12px;
  margin-top: 4px;
}

.participant-status.online {
  color: #10b981;
}

.participant-status.offline {
  color: #f59e0b;
}

.participant-item.offline {
  opacity: 0.6;
}

.empty-state {
  text-align: center;
  color: #71717a;
  padding: 20px;
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .session-form {
    grid-template-columns: 1fr;
  }
  
  .instruments-list {
    grid-template-columns: 1fr;
  }
  
  .playback-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .tempo-control {
    width: 100%;
  }
}

/* ===== TABLATURE LIBRARY STYLES ===== */
.current-song-info {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #7c3aed22, #4f46e522);
  border-left: 4px solid #7c3aed;
  border-radius: 8px;
  color: #c4b5fd;
  font-size: 14px;
}

.current-song-info strong {
  color: #ffffff;
}

.video-tutorial {
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #0a0818, #151136);
  border: 2px solid #7c3aed;
  border-radius: 12px;
}

.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.video-header h4 {
  margin: 0;
  color: #7c3aed;
  font-size: 18px;
}

.btn-close {
  width: 32px;
  height: 32px;
  background: #dc262655;
  border: 1px solid #dc2626;
  border-radius: 50%;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-close:hover {
  background: #dc2626;
  transform: rotate(90deg);
}

.sync-controls {
  margin-bottom: 20px;
  padding: 16px;
  background: #0f0d22;
  border: 1px solid #8b5cf633;
  border-radius: 12px;
  display: grid;
  gap: 16px;
}

.sync-section h4 {
  margin: 0 0 10px 0;
  color: #c4b5fd;
  font-size: 16px;
}

.sync-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

#tempoPercent,
#metronomeVolume {
  flex: 1;
  min-width: 160px;
}

.tablature-card {
  background: linear-gradient(135deg, #0f0d22, #181336);
  border: 1px solid #8b5cf633;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.tabs-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  padding: 6px 2px;
}

.tab-song-avatar-btn {
  border: 1px solid #8b5cf633;
  background: #120f2c;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tab-song-avatar {
  --tab-avatar-x: 20%;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
  border: 2px solid #93c5fd66;
  box-shadow: 0 0 0 2px #0b0a16, 0 8px 16px rgba(37, 99, 235, 0.35);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
}

/* ── Photo avatar : image propre et nette ── */
.tab-photo-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--tab-avatar-x) center;
  display: block;
  filter: brightness(0.9) contrast(1.05) saturate(1.05);
  transition: filter .3s ease, transform .3s ease;
}

/* Hover : légère luminosité + zoom subtil */
.tab-song-avatar-btn:hover .tab-photo-avatar {
  filter: brightness(1) contrast(1.08) saturate(1.1);
  transform: scale(1.05);
}

/* Pas de pseudo-éléments animés */
.tab-song-avatar::after,
.tab-song-avatar::before {
  display: none;
}

.tab-song-avatar-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab-song-avatar-meta strong {
  color: #f5f3ff;
  font-size: 14px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tab-song-avatar-artist {
  color: #ddd6fe;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-song-avatar-meta small {
  color: #c4b5fd;
  font-size: 12px;
  line-height: 1.2;
}

.tab-song-avatar-btn:hover {
  transform: translateY(-2px);
  border-color: #a78bfa;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.22);
}

.tab-song-avatar-btn:hover .tab-song-avatar {
  transform: scale(1.03);
  border-color: #bfdbfe;
  box-shadow: 0 0 0 2px #0b0a16, 0 10px 22px rgba(37, 99, 235, 0.45);
}

/* ── Animation rock fluide — seul le personnage bouge ── */
@keyframes tabAvatarRockSmooth {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  15% {
    transform: translateY(-0.5px) rotate(1.8deg) scale(1.01);
  }
  30% {
    transform: translateY(0) rotate(-1.2deg) scale(1);
  }
  50% {
    transform: translateY(-1px) rotate(2deg) scale(1.015);
  }
  65% {
    transform: translateY(0) rotate(-1.5deg) scale(1);
  }
  80% {
    transform: translateY(-0.5px) rotate(1.4deg) scale(1.01);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

/* Ombre qui suit le mouvement du personnage */
@keyframes tabAvatarShadow {
  0%, 100% {
    opacity: 0.7;
    transform: translateX(-50%) scaleX(1);
  }
  25% {
    opacity: 0.5;
    transform: translateX(-48%) scaleX(0.9);
  }
  50% {
    opacity: 0.75;
    transform: translateX(-52%) scaleX(1.05);
  }
  75% {
    opacity: 0.5;
    transform: translateX(-50%) scaleX(0.92);
  }
}

/* Animation ancienne conservée pour compatibilité */
@keyframes tabAvatarRockNoBlur {
  0%,
  100% {
    transform: translateY(0) rotate(-1.5deg) scale(1.01);
  }
  25% {
    transform: translateY(-1px) rotate(1.9deg) scale(1.02);
  }
  50% {
    transform: translateY(0) rotate(-1.2deg) scale(1.01);
  }
  75% {
    transform: translateY(-1px) rotate(1.6deg) scale(1.02);
  }
}

.tablature-song-detail-top {
  margin-bottom: 12px;
}

.tabs-back-btn {
  background: #1d4ed855;
  border: 1px solid #3b82f6;
  color: #bfdbfe;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
  cursor: pointer;
}

.tabs-back-btn:hover {
  background: #1d4ed8;
  color: #fff;
}

.tablature-card:hover {
  border-color: #7c3aed;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
  transform: translateY(-2px);
}

.tablature-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
}

.tablature-header h3 {
  margin: 0 0 4px 0;
  color: #ffffff;
  font-size: 20px;
}

.tablature-artist {
  margin: 0;
  color: #a1a1aa;
  font-size: 14px;
}

.tablature-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-genre {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
}

.badge-difficulty {
  color: white;
}

.badge-debutant {
  background: linear-gradient(135deg, #10b981, #059669);
}

.badge-intermediaire {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-avance {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.tablature-instruments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.instrument-tab-btn {
  padding: 8px 16px;
  background: #181336;
  border: 1px solid #8b5cf633;
  border-radius: 8px;
  color: #c4b5fd;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.instrument-tab-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  border-color: #7c3aed;
  transform: translateY(-1px);
}

.instrument-tab-btn:active {
  transform: translateY(0);
}

.instrument-tab-btn.has-video {
  background: linear-gradient(135deg, #181336, #1f1855);
  border-color: #7c3aed66;
  position: relative;
}

.instrument-tab-btn.has-video::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== LIVE STREAMING STYLES =====*/
#page-live {
  position: relative;
  overflow: hidden;
}
.live-smoke-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#page-live > *:not(.live-smoke-bg) {
  position: relative;
  z-index: 1;
}
.live-container {
  padding: 0 24px 24px;
}

/* Mode Selector */
.live-mode-selector {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 24px;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.mode-btn {
  padding: 32px 24px;
  background: linear-gradient(135deg, #181336, #1a1444);
  border: 2px solid #6d28d955;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.mode-btn:hover {
  border-color: #7c3aed;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px #7c3aed40;
}

.mode-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
}

.mode-btn strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
  color: #c4b5fd;
}

.mode-btn p {
  margin: 0;
  color: #a1a1aa;
  font-size: 14px;
}

/* Universe picker selected state */
.universe-pick-btn.selected {
  border-color: #a855f7;
  background: linear-gradient(135deg, #1e1050, #2d1a6e);
  box-shadow: 0 0 25px rgba(168, 85, 247, .35), inset 0 0 20px rgba(168, 85, 247, .08);
  transform: translateY(-4px);
}
.universe-pick-btn.selected::after {
  content: '✓';
  position: absolute;
  top: 10px; right: 14px;
  font-size: 1.2rem;
  color: #a855f7;
}
.universe-pick-btn { position: relative; }

/* ── Carte Démarrer un Live avec icônes univers ── */
.start-live-card {
  cursor: default !important;
}
.start-live-card:hover {
  transform: none !important;
  box-shadow: none !important;
}
.start-live-universes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 92, 246, .15);
}
.start-live-univ-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1.5px solid rgba(139, 92, 246, .2);
  background: linear-gradient(135deg, #12102a, #1a1444);
  cursor: pointer;
  transition: all .25s ease;
  width: 100%;
}
.start-live-univ-btn:hover {
  border-color: #a855f7;
  background: linear-gradient(135deg, #1e1050, #2d1a6e);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, .3);
}
.start-live-univ-emoji {
  font-size: 1.6em;
  line-height: 1;
}
.start-live-univ-label {
  font-size: .72rem;
  font-weight: 600;
  color: #c4b5fd;
  white-space: nowrap;
}

/* Stream Setup */
.stream-setup {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px;
}

.stream-setup input,
.stream-setup select {
  width: 100%;
  margin-bottom: 16px;
}

.stream-controls {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-go-live {
  flex: 1;
  padding: 16px;
  background: linear-gradient(90deg, #dc2626, #ef4444);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-go-live:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #dc262680;
}

/* Stream Active Layout */
.stream-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  margin-top: 20px;
}

/* Video Section */
.stream-video-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  max-height: 400px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #7c3aed;
}

#localVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.9);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.stream-stats {
  display: flex;
  gap: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

.stat-icon {
  font-size: 16px;
}

/* Hearts Animation Container */
.hearts-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -50px;
  font-size: 32px;
  animation: floatUp 5s ease-in forwards;
  opacity: 0;
}

@keyframes floatUp {
  0% {
    bottom: -50px;
    opacity: 0;
    transform: translateX(0) scale(0);
  }
  10% {
    opacity: 1;
    transform: scale(1);
  }
  90% {
    opacity: 1;
  }
  100% {
    bottom: 100%;
    opacity: 0;
    transform: translateX(calc(var(--random, 0) * 50px)) scale(0.5);
  }
}

/* Stream Controls Bar */
.stream-controls-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: #0f0d22cc;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.control-icon-btn {
  width: 50px;
  height: 50px;
  font-size: 24px;
  background: #181336;
  border: 1px solid #6d28d955;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-icon-btn:hover {
  background: #1f1a40;
  border-color: #7c3aed;
  transform: scale(1.05);
}

/* Sidebar */
.stream-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.stream-info {
  padding: 20px;
}

.stream-info h3 {
  margin: 0 0 8px 0;
  color: #7c3aed;
  font-size: 18px;
}

.stream-info p {
  margin: 0 0 12px 0;
  color: #c4b5fd;
  font-size: 14px;
}

.stream-category {
  display: inline-block;
  padding: 4px 12px;
  background: #7c3aed30;
  border: 1px solid #7c3aed;
  border-radius: 20px;
  font-size: 12px;
  color: #c4b5fd;
}

/* Viewers List */
.viewers-list {
  padding: 16px;
}

.viewers-list h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #c4b5fd;
}

.viewers-scroll {
  max-height: 200px;
  overflow-y: auto;
}

.viewer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #181336;
  border-radius: 8px;
  margin-bottom: 6px;
}

.viewer-avatar {
  font-size: 20px;
}

.viewer-name {
  font-size: 13px;
  color: #c4b5fd;
}

/* Live Chat */
.live-chat {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.live-chat h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #c4b5fd;
}

.chat-messages {
  flex: 1;
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding: 12px;
  background: #0a0818;
  border-radius: 8px;
  border: 1px solid #6d28d955;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 10px;
}

.chat-welcome {
  text-align: center;
  color: #71717a;
  font-style: italic;
  font-size: 13px;
}

.chat-message {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  animation: slideIn 0.3s ease;
}

.chat-message.streamer-message {
  background: #7c3aed20;
  padding: 8px;
  border-radius: 8px;
  border-left: 3px solid #7c3aed;
}

.message-avatar {
  font-size: 18px;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
}

.message-author {
  display: block;
  font-size: 12px;
  color: #7c3aed;
  margin-bottom: 2px;
}

.message-text {
  display: block;
  font-size: 14px;
  color: #ece7ff;
  word-wrap: break-word;
}

.chat-system-message {
  text-align: center;
  font-size: 12px;
  color: #a1a1aa;
  padding: 6px;
  margin-bottom: 8px;
  font-style: italic;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-input-container {
  display: flex;
  gap: 8px;
}

#chatInput {
  flex: 1;
  padding: 10px;
  background: #181336;
  border: 1px solid #6d28d955;
  border-radius: 8px;
  color: #ece7ff;
  font-size: 14px;
}

.send-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px #7c3aed60;
}

/* Quick Actions */
.quick-actions {
  padding: 16px;
}

.quick-actions h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #c4b5fd;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-btn {
  padding: 12px;
  background: linear-gradient(135deg, #181336, #1a1444);
  border: 1px solid #6d28d955;
  border-radius: 8px;
  color: #c4b5fd;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.action-btn:hover {
  background: #1f1a40;
  border-color: #7c3aed;
  transform: translateX(5px);
}

/* Streams List (Viewer Mode) */
.streams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stream-card {
  background: #181336;
  border: 1px solid #8b5cf633;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stream-card:hover {
  border-color: #7c3aed;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px #7c3aed40;
}

.stream-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0818;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumbnail-placeholder {
  font-size: 80px;
}

.live-badge-small {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(220, 38, 38, 0.9);
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 11px;
}

.stream-viewers {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.stream-card-info {
  padding: 16px;
}

.stream-card-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #c4b5fd;
}

.stream-card-info p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #a1a1aa;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #151136;
  border: 1px solid #6d28d955;
  font-size: 12px;
  color: #e9d5ff;
}

.btn-join-stream {
  width: 100%;
  padding: 10px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-join-stream:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px #7c3aed60;
}

/* Responsive Live */
@media (max-width: 1024px) {
  .stream-layout {
    grid-template-columns: 1fr;
  }

  .stream-sidebar {
    max-height: none;
  }

  .mode-buttons {
    grid-template-columns: 1fr;
  }

  .streams-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== JAM ZONE AUTO-SCROLL VIEWER ===== */
.jamzone-viewer {
  background: #07060f;
  border: 2px solid #7c3aed;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.jamzone-viewer .viewer-header {
  padding: 14px 18px;
  margin: 0;
  background: #100d22;
  border-bottom: 1px solid #6d28d933;
}

.jamzone-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: #12102b;
  border-bottom: 1px solid #6d28d933;
}

/* Transport buttons */
.jz-transport {
  display: flex;
  gap: 8px;
  align-items: center;
}

.jz-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #7c3aed66;
  background: #181336;
  color: #c4b5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.jz-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.jz-btn:hover {
  background: #7c3aed33;
  border-color: #7c3aed;
  transform: scale(1.08);
}

.jz-play {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px #7c3aed60;
}

.jz-play:hover {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-color: transparent;
  transform: scale(1.1);
}

.jz-play.active-play {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px #10b98160;
}

.jz-play.active-play:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
}

/* Tempo group */
.jz-tempo-group,
.jz-progress-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  flex: 1;
}

.jz-label {
  font-size: 11px;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.jz-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jz-value {
  font-size: 13px;
  font-weight: 600;
  color: #c4b5fd;
  min-width: 38px;
  text-align: right;
}

/* Sliders */
.jz-slider {
  flex: 1;
  height: 5px;
  background: #2a2347;
  border-radius: 999px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.jz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px #7c3aed80;
  transition: transform 0.15s ease;
}

.jz-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.jz-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px #7c3aed80;
}

.jz-progress-range {
  height: 5px;
  background: linear-gradient(to right, #7c3aed 0%, #2a2347 0%);
}

/* Tablature content scroll area */
.jamzone-viewer .tablature-content {
  flex: 1;
  background: #000000;
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: 450px;
  max-height: 75vh;
  overflow-y: scroll;
  overflow-x: auto;
  scroll-behavior: auto;
}

/* PDF viewer mode */
.tablature-content.pdf-mode {
  padding: 0;
  background: #111;
}

.tab-pdf-page {
  display: block;
  margin: 0 auto 6px;
  position: relative;
  max-width: 900px;
}

.tab-pdf-page-img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #2a2347;
  image-rendering: high-quality;
}

.tab-pdf-page-num {
  position: absolute;
  bottom: 8px;
  right: 12px;
  background: #7c3aed99;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  pointer-events: none;
}

/* Loading spinner */
.tab-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: #a1a1aa;
  font-size: 14px;
}

.tab-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #2a2347;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: jzSpin 0.8s linear infinite;
}

@keyframes jzSpin {
  to { transform: rotate(360deg); }
}

/* PDF badge on instrument buttons */
.instrument-tab-btn.has-pdf {
  background: linear-gradient(135deg, #0f2818, #1a3323);
  border-color: #22c55e66;
  color: #86efac;
  position: relative;
}

.instrument-tab-btn.has-pdf::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

.instrument-tab-btn.has-pdf:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
  .jamzone-controls {
    gap: 10px;
    padding: 8px 12px;
  }

  .jz-tempo-group,
  .jz-progress-group {
    min-width: 100px;
  }

  .jz-play {
    width: 42px;
    height: 42px;
  }
}

/* ===== TABSPRO READING LINE + KARAOKE NOTES ===== */

/* ── Barre de lecture sticky (style TabsPro) ── */
.tab-reading-line {
  position: sticky;
  top: 130px;           /* hauteur depuis le haut visible du container */
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 20;
  pointer-events: none;

  /* Trait lumineux cyan/violet */
  background: linear-gradient(90deg,
    transparent 0%,
    #22d3ee 15%,
    #a78bfa 50%,
    #22d3ee 85%,
    transparent 100%
  );
  box-shadow:
    0 0  6px #22d3eecc,
    0 0 16px #a78bfa99,
    0 0 32px #22d3ee55;
  animation: readingLinePulse 2s ease-in-out infinite;
  border-radius: 2px;
}

/* Halo vertical diffus sous la barre */
.tab-reading-line::after {
  content: "";
  position: absolute;
  inset: -12px 0;
  background: linear-gradient(
    to bottom,
    transparent,
    #7c3aed18 50%,
    transparent
  );
  pointer-events: none;
}

@keyframes readingLinePulse {
  0%, 100% { opacity: 0.85; box-shadow: 0 0  6px #22d3eecc, 0 0 16px #a78bfa99, 0 0 32px #22d3ee55; }
  50%       { opacity: 1;    box-shadow: 0 0 10px #22d3eeff, 0 0 28px #a78bfacc, 0 0 50px #22d3ee88; }
}

/* ── Rangées et texte de tablature ── */
.tab-lines {
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre;
  min-width: fit-content;
}

/* ── Drums : affichage élargi ── */
.tab-lines.tab-lines--drums {
  font-size: 17px;
  line-height: 2;
  letter-spacing: 1.5px;
}

.tab-row {
  display: block;
  min-height: 1.7em;
}

/* Caractère neutre (tirets, barres, espaces) */
.tab-plain {
  color: #4ade8055;       /* vert atténué */
  transition: color 0.1s;
}

/* ── Note (chiffre) — état normal ── */
.tab-note {
  display: inline-block;
  color: #4ade80;         /* vert tablature */
  font-weight: 700;
  border-radius: 3px;
  transition: color 0.08s, text-shadow 0.08s, background 0.08s, transform 0.05s;
  position: relative;
}

/* ── Technique (h b p s ~ /) — état normal ── */
.tab-technique {
  color: #a78bfa;         /* violet technique */
}

/* ── Note ACTIVE — effet karaoke ── */
.tab-note--active {
  color: #ffffff !important;
  background: #7c3aedcc;
  text-shadow:
    0 0  4px #fff,
    0 0 10px #a78bfa,
    0 0 22px #7c3aed;
  transform: scale(1.25);
  border-radius: 4px;
  animation: noteFlash 0.18s ease-out;
  z-index: 2;
}

/* Technique active */
.tab-technique.tab-note--active {
  background: #22d3ee99;
  text-shadow:
    0 0  4px #fff,
    0 0 12px #22d3ee;
}

/* Flash d'entrée sur la note active */
@keyframes noteFlash {
  0%   { transform: scale(1.5); background: #ffffff55; }
  50%  { transform: scale(1.3); background: #7c3aedcc; }
  100% { transform: scale(1.25); }
}

/* ── Numéro de mesure ── */
.tab-measure .measure-number {
  color: #7c3aed88;
  font-size: 11px;
  font-family: sans-serif;
  font-weight: 400;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Halo visible sous la ligne de lecture (PDF + texte) ── */
.tablature-content.pdf-mode .tab-reading-line {
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    #ef444499 10%,
    #f97316 40%,
    #fbbf24 50%,
    #f97316 60%,
    #ef444499 90%,
    transparent 100%
  );
  box-shadow:
    0 0  8px #f9731699,
    0 0 20px #ef444466;
  animation: scanLinePulse 1.5s ease-in-out infinite;
}

@keyframes scanLinePulse {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1; box-shadow: 0 0 14px #f97316cc, 0 0 36px #ef4444aa; }
}

/* ===== KARAOKÉ PAGE ===== */
.karaoke-hero {
  background: linear-gradient(135deg, #1a0a2e 0%, #0d1a3a 50%, #1a0a1a 100%);
  border: 1px solid #7c3aed44;
  padding: 0;
  overflow: hidden;
  margin-bottom: 20px;
}
.karaoke-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
  gap: 24px;
}
.karaoke-hero-badge {
  background: linear-gradient(90deg, #f97316, #ef4444);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}
.karaoke-hero-text h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}
.karaoke-hero-text p {
  color: #a78bfa;
  font-size: 1.05rem;
  margin: 0 0 20px;
}
.karaoke-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.karaoke-hero-visual {
  width: 80px;
  height: 80px;
  font-size: 3rem;
  opacity: 0.92;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border: 1px solid #a78bfa88;
  box-shadow: 0 0 0 2px #0b0a16, 0 10px 22px #0008;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  transform-style: preserve-3d;
}
.karaoke-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffffff33, transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}
.karaoke-hero-inner:hover .karaoke-hero-visual {
  transform: rotateX(10deg) rotateY(-10deg) scale(1.05);
  box-shadow: 0 0 0 2px #0b0a16, 0 14px 30px #7c3aed66;
  filter: saturate(1.1);
}
.btn-sing-solo {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-sing-solo:hover { transform: translateY(-2px); box-shadow: 0 6px 18px #7c3aed55; }
.btn-sing-group {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-sing-group:hover { transform: translateY(-2px); box-shadow: 0 6px 18px #0ea5e955; }

/* Catégories */
.karaoke-categories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.karaoke-cat {
  background: #1e1a2e;
  border: 1px solid #3a3560;
  color: #a0a0c0;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}


/* Barre de recherche */
.karaoke-search-bar {
  margin-bottom: 20px;
}
.karaoke-search-bar input {
  width: 100%;
  background: #1a1730;
  border: 1px solid #3a3560;
  color: #fff;
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.karaoke-search-bar input:focus { border-color: #7c3aed; }

/* Grille chansons */
.karaoke-songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.karaoke-song-card {
  background: linear-gradient(145deg, #1a1730, #0f0e1a);
  border: 1px solid #2a2550;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, border-color 0.2s;
  cursor: default;
}
.karaoke-song-card:hover {
  transform: translateY(-4px);
  border-color: #7c3aed77;
}
.karaoke-song-cover {
  font-size: 3rem;
  text-align: center;
  background: #1e1a2e;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 700px;
}
.karaoke-song-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border: 1px solid #a78bfa88;
  box-shadow: 0 0 0 2px #0b0a16, 0 10px 22px #0008;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  transform-style: preserve-3d;
  position: relative;
}
.karaoke-song-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffffff33, transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}
.karaoke-song-card:hover .karaoke-song-avatar {
  transform: rotateX(10deg) rotateY(-10deg) scale(1.06);
  box-shadow: 0 0 0 2px #0b0a16, 0 14px 30px #7c3aed66;
  filter: saturate(1.1);
}
.karaoke-song-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.karaoke-song-name {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}
.karaoke-song-artist {
  color: #a78bfa;
  font-size: 0.82rem;
}
.karaoke-song-count {
  color: #6b7280;
  font-size: 0.78rem;
  margin-bottom: 8px;
}
.karaoke-song-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.karaoke-song-btns .btn-sing-solo,
.karaoke-song-btns .btn-sing-group {
  flex: 1;
  padding: 7px 10px;
  font-size: 0.8rem;
  text-align: center;
}

/* Rooms */
.karaoke-rooms-section h3 {
  color: #e2e8f0;
  margin-bottom: 14px;
  font-size: 1.1rem;
}
.karaoke-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.karaoke-room-card {
  background: #1a1730;
  border: 1px solid #7c3aed44;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.karaoke-room-emoji { font-size: 2.2rem; }
.karaoke-room-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.karaoke-room-info strong { color: #fff; font-size: 0.9rem; }
.karaoke-room-info span { color: #a0a0c0; font-size: 0.8rem; }
.karaoke-room-count { color: #7c3aed !important; font-weight: 600; }

/* ===== STUDIO KARAOKÉ ===== */
.karaoke-studio-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
.karaoke-video-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.karaoke-dual-video {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  align-items: stretch;
}
.karaoke-video-panel {
  min-width: 0;
}
.karaoke-video-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0814;
  aspect-ratio: 16/9;
  min-height: 420px;
}
/* ── Panneau connexion caméra karaoké ── */
.karaoke-cam-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(11,10,22,.92);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 20; border-top: 1px solid #8b5cf644;
}
.karaoke-cam-panel-row {
  display: flex; gap: 6px; align-items: center;
}
.karaoke-cam-panel select {
  flex: 1; padding: 5px 8px; border-radius: 6px;
  border: 1px solid #6d28d955; background: #151136;
  color: #ece7ff; font-size: 12px;
}
.karaoke-cam-btn-sm {
  width: 30px; height: 30px; border: 1px solid #8b5cf655;
  border-radius: 6px; background: #1e1b4b; color: #c4b5fd;
  font-size: 15px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .2s;
}
.karaoke-cam-btn-sm:hover { background: #312e81; }
.karaoke-cam-btn-connect {
  flex: 1; padding: 6px 12px; border: none; border-radius: 6px;
  background: linear-gradient(90deg,#7c3aed,#4f46e5); color: #fff;
  font-size: 12px; cursor: pointer; transition: opacity .2s;
}
.karaoke-cam-btn-connect:hover { opacity: .85; }
.karaoke-cam-btn-connect:disabled { opacity: .5; cursor: default; }
.karaoke-cam-btn-disconnect {
  flex: 1; padding: 6px 12px; border: 1px solid #f87171aa; border-radius: 6px;
  background: #2a1114; color: #fecdd3;
  font-size: 12px; cursor: pointer; transition: background .2s;
}
.karaoke-cam-btn-disconnect:hover { background: #3f1219; }
.karaoke-cam-status {
  font-size: 11px; color: #00ff88; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.karaoke-cam-help {
  font-size: 10px; color: #a78bfa99; line-height: 1.4;
}
.karaoke-cam-help a { color: #60a5fa; }
/* ── Panneau connexion caméra Live ── */
.live-cam-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(11,10,22,.92);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 20; border-top: 1px solid #8b5cf644;
}
.live-cam-panel-row {
  display: flex; gap: 6px; align-items: center;
}
.live-cam-panel select {
  flex: 1; padding: 5px 8px; border-radius: 6px;
  border: 1px solid #6d28d955; background: #151136;
  color: #ece7ff; font-size: 12px;
}
.live-cam-btn-sm {
  width: 30px; height: 30px; border: 1px solid #8b5cf655;
  border-radius: 6px; background: #1e1b4b; color: #c4b5fd;
  font-size: 15px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .2s;
}
.live-cam-btn-sm:hover { background: #312e81; }
.live-cam-btn-connect {
  flex: 1; padding: 6px 12px; border: none; border-radius: 6px;
  background: linear-gradient(90deg,#7c3aed,#4f46e5); color: #fff;
  font-size: 12px; cursor: pointer; transition: opacity .2s;
}
.live-cam-btn-connect:hover { opacity: .85; }
.live-cam-btn-connect:disabled { opacity: .5; cursor: default; }
.live-cam-btn-disconnect {
  flex: 1; padding: 6px 12px; border: 1px solid #f87171aa; border-radius: 6px;
  background: #2a1114; color: #fecdd3;
  font-size: 12px; cursor: pointer; transition: background .2s;
}
.live-cam-btn-disconnect:hover { background: #3f1219; }
.live-cam-status {
  font-size: 11px; color: #00ff88; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-cam-help {
  font-size: 10px; color: #a78bfa99; line-height: 1.4;
}
.live-cam-help a { color: #60a5fa; }
.karaoke-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.karaoke-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  pointer-events: none;
}
.karaoke-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239,68,68,0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
  letter-spacing: 1px;
}
.karaoke-participants {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.karaoke-part-badge {
  background: rgba(0,0,0,0.65);
  color: #e2e8f0;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #7c3aed55;
}

/* Vidéo chanson — bandeau pleine largeur en haut du studio */
.karaoke-lyrics-box {
  background: #0a0814;
  border: 1px solid #3a3560;
  border-radius: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.karaoke-song-video-wrap {
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #0a0814;
  border: 0;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  position: relative;
}
.karaoke-song-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.karaoke-unmute-btn {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border: 1px solid #3a3560;
  background: #181336e6;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 3;
}
.karaoke-unmute-btn:hover {
  background: #241d4de6;
}
.karaoke-audio-diag {
  position: absolute;
  right: 10px;
  top: 10px;
  background: #05050ccc;
  border: 1px solid #3a3560;
  color: #c4b5fd;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.72rem;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 760px) {
  .karaoke-dual-video {
    grid-template-columns: 1fr;
  }
  .karaoke-video-wrap,
  .karaoke-song-video-wrap {
    min-height: 320px;
  }
}

/* Contrôles */
.karaoke-controls-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: #1a1730;
  border: 1px solid #2a2550;
  border-radius: 14px;
  padding: 12px 16px;
}
.karaoke-ctrl-btn {
  background: #2a2550;
  border: 1px solid #3a3560;
  color: #e2e8f0;
  font-size: 1.3rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.karaoke-ctrl-btn:hover { background: #3a3560; transform: scale(1.1); }

/* Sidebar karaoké */
.karaoke-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.karaoke-song-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}
.karaoke-song-emoji {
  font-size: 2.5rem;
  background: #1e1a2e;
  border-radius: 12px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.karaoke-song-info h3 { color: #fff; font-size: 1rem; margin: 0 0 2px; }
.karaoke-song-info p { color: #a78bfa; font-size: 0.85rem; margin: 0 0 4px; }

/* Score */
.karaoke-score-card { text-align: center; }
.karaoke-score-display {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 14px #fbbf2477;
  margin: 8px 0;
}
.karaoke-score-bar-wrap {
  height: 8px;
  background: #2a2550;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}
.karaoke-score-bar {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  border-radius: 8px;
  transition: width 0.5s ease;
  width: 0%;
}

.karaoke-mixer-card {
  padding: 0;
  border: 1px solid #3a3560;
  border-radius: 18px;
  overflow: hidden;
  background: url("/images/mixer-board-reference.webp") center / cover no-repeat;
  box-shadow: 0 10px 28px #00000066, inset 0 0 0 1px #ffffff0a;
}
.karaoke-mixer-surface {
  padding: 14px 14px 16px;
  background: transparent;
  backdrop-filter: none;
}
.karaoke-mixer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.karaoke-mixer-head h4 {
  margin: 0;
  color: #f8fafc;
  text-shadow: 0 0 12px #000000aa;
}
.karaoke-mixer-status {
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: #22d3ee;
  background: #0f172acc;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 3px 8px;
}
.karaoke-mixer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.karaoke-mixer-channel {
  display: grid;
  gap: 8px;
  padding: 10px 10px 9px;
  border-radius: 12px;
  border: 1px solid #2e2a56;
  background: linear-gradient(180deg, #0f1329cc, #090d1ecc);
  box-shadow: inset 0 1px 0 #ffffff12, inset 0 -1px 0 #00000080;
}
.karaoke-mixer-label {
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  text-shadow: 0 0 10px #000000aa;
}
.karaoke-mixer-slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.karaoke-mixer-channel input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  outline: none;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 10px,
      #ffffff12 10px,
      #ffffff12 11px
    ),
    linear-gradient(90deg, #1f2547, #2b3562 35%, #1f2547 100%);
  border: 1px solid #46507f;
  box-shadow: inset 0 2px 4px #00000088, inset 0 -1px 0 #ffffff22;
}
.karaoke-mixer-channel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f8fafc, #94a3b8);
  border: 1px solid #334155;
  box-shadow: 0 2px 6px #00000099, inset 0 1px 0 #ffffffcc;
  cursor: pointer;
}
.karaoke-mixer-channel input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f8fafc, #94a3b8);
  border: 1px solid #334155;
  box-shadow: 0 2px 6px #00000099, inset 0 1px 0 #ffffffcc;
  cursor: pointer;
}
.karaoke-mixer-meter {
  height: 7px;
  border-radius: 6px;
  background: #0f172a;
  overflow: hidden;
  border: 1px solid #334155;
  box-shadow: inset 0 1px 3px #00000099;
}
.karaoke-mixer-meter-fill {
  width: 83%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  transition: width 0.15s linear;
}
.karaoke-mixer-value {
  color: #f8fafc;
  font-size: 0.75rem;
  min-width: 44px;
  text-align: right;
  font-weight: 700;
  text-shadow: 0 0 10px #000000aa;
}

/* Groupe */
.karaoke-invite-wrap {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.karaoke-room-code {
  flex: 1;
  background: #0f0e1a;
  border: 1px solid #7c3aed;
  color: #a78bfa;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  font-weight: 700;
}
.karaoke-copy-btn {
  background: #7c3aed;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.karaoke-copy-btn:hover { background: #6d28d9; }
.karaoke-group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.karaoke-group-member {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e1a2e;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  color: #e2e8f0;
}
.karaoke-member-score { margin-left: auto; color: #fbbf24; font-weight: 700; }

/* ============================================
   REDIFFUSION KARAOKÉ EN DIRECT — Live Feed
   ============================================ */
.kf-section {
  margin-top: 28px;
  background: linear-gradient(135deg, #1a0a2e 0%, #0f0a1a 100%);
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 18px;
  padding: 20px 20px 16px;
  overflow: hidden;
}
.kf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.kf-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kf-header-left h3 {
  color: #e2d9f3;
  font-size: 1.1rem;
  margin: 0;
}
.kf-dot-pulse {
  color: #ef4444;
  font-size: 1rem;
  animation: kf-blink 1.2s ease-in-out infinite;
}
@keyframes kf-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.2; }
}
.kf-subtitle {
  color: #9ca3af;
  font-size: 0.82rem;
}

/* Track défilant */
.kf-track-wrap {
  overflow: hidden;
  width: 100%;
  cursor: pointer;
}
.kf-track-inner {
  display: flex;
  gap: 14px;
  animation: kf-scroll 38s linear infinite;
  width: max-content;
}
.kf-track-inner:hover { animation-play-state: paused; }
@keyframes kf-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Carte karaoké */
.kf-card {
  width: 210px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 14px;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.kf-card:hover {
  border-color: rgba(139,92,246,0.7);
  background: rgba(139,92,246,0.12);
  transform: translateY(-3px);
}
.kf-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
}
.kf-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 2px solid #a855f766;
  box-shadow: 0 0 10px #a855f733;
}
.kf-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.kf-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.kf-username {
  color: #e2d9f3;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}
.kf-time { color: #6b7280; font-size: 0.7rem; }
.kf-live-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  animation: kf-blink 1.4s ease-in-out infinite;
  white-space: nowrap;
}
.kf-song-area {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kf-song-emoji { font-size: 1.4rem; }
.kf-song-title {
  color: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.kf-song-artist { color: #9ca3af; font-size: 0.7rem; }
.kf-score-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kf-score-lbl { color: #9ca3af; font-size: 0.68rem; min-width: 35px; }
.kf-score-bar-bg {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.kf-score-bar {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.kf-score-num { color: #fbbf24; font-size: 0.72rem; font-weight: 700; min-width: 22px; text-align: right; }
.kf-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kf-viewers-sm { color: #6b7280; font-size: 0.7rem; }
.kf-watch-hint { color: #8b5cf6; font-size: 0.7rem; font-weight: 600; }

/* ====== Modal Spectateur Karaoké ====== */
.kf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.kf-modal {
  background: linear-gradient(145deg, #1e1130 0%, #12091e 100%);
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.kf-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #cbd5e1;
  font-size: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kf-modal-close:hover { background: rgba(239,68,68,0.3); color: #fff; }
.kf-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kf-modal-avatar-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #a855f766;
  box-shadow: 0 0 14px #a855f744;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
}
.kf-modal-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.message-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #a855f744;
}
.kf-modal-hinfo h3 { color: #e2d9f3; margin: 0 0 2px; font-size: 1rem; }
.kf-modal-hinfo p { color: #9ca3af; margin: 0; font-size: 0.85rem; }
.kf-modal-hinfo p:last-child { font-size: 0.78rem; color: #6b7280; }
.kf-live-badge-lg {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  animation: kf-blink 1.2s ease-in-out infinite;
}
.kf-modal-stage {
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kf-modal-emoji { font-size: 2rem; }
.kf-modal-score-wrap { display: flex; align-items: baseline; gap: 3px; }
.kf-modal-score-num {
  color: #fbbf24;
  font-size: 2rem;
  font-weight: 900;
}
.kf-modal-score-pts { color: #9ca3af; font-size: 0.9rem; }
.kf-modal-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.kf-modal-bar {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #ec4899, #fbbf24);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.kf-modal-chat {
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
  padding: 10px;
  height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kf-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.kf-action-btn {
  background: rgba(139,92,246,0.2);
  border: 1px solid rgba(139,92,246,0.35);
  color: #e2d9f3;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.kf-action-btn:hover { background: rgba(139,92,246,0.4); }
.kf-modal-viewers { margin-left: auto; color: #9ca3af; font-size: 0.8rem; }

/* ============================================
   PANNEAU LIVE — Studio Karaoké Broadcaster
   ============================================ */
.kao-live-panel {
  border: 1px solid rgba(239,68,68,0.4) !important;
  background: rgba(239,68,68,0.07) !important;
  padding: 14px !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kao-live-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #fecaca;
}
.kao-live-dot {
  color: #ef4444;
  font-size: 0.9rem;
  animation: kf-blink 1s ease-in-out infinite;
}
.kao-live-url-row {
  display: flex;
  gap: 6px;
}
.kao-live-url {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 8px;
  color: #e2d9f3;
  font-size: 0.72rem;
  padding: 6px 10px;
  min-width: 0;
}

/* ============================================
   SECTION "REJOINDRE UN KARAOKÉ LIVE"
   ============================================ */
.krtc-join-section {
  margin-top: 20px;
  background: linear-gradient(135deg, #0f1a2e 0%, #0a0f1e 100%) !important;
  border: 1px solid rgba(96,165,250,0.35) !important;
  padding: 18px 18px 16px !important;
}
.krtc-join-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.krtc-join-header h3 {
  color: #93c5fd;
  font-size: 1rem;
  margin: 0;
}
.krtc-session-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 8px;
}
.krtc-session-card:hover {
  background: rgba(96,165,250,0.18);
  border-color: rgba(96,165,250,0.5);
}
.krtc-session-emoji { font-size: 1.4rem; }
.krtc-session-info { flex: 1; }
.krtc-session-info strong { display: block; color: #e2d9f3; font-size: 0.85rem; }
.krtc-session-info span { color: #9ca3af; font-size: 0.75rem; }
.krtc-manual-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.krtc-code-input {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(96,165,250,0.3);
  border-radius: 8px;
  color: #e2d9f3;
  font-size: 0.82rem;
  padding: 8px 12px;
  min-width: 0;
}
.krtc-code-input::placeholder { color: #6b7280; }
.krtc-code-input:focus { outline: none; border-color: rgba(96,165,250,0.6); }

/* ============================================
   MODAL WEBRTC VIEWER
   ============================================ */
.krtc-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.krtc-modal-head h3 {
  color: #e2d9f3;
  font-size: 1rem;
  margin: 0;
  flex: 1;
}
.krtc-status-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: kf-blink 1.2s ease-in-out infinite;
}
.krtc-video-wrap {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  max-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.krtc-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.krtc-status-msg {
  position: absolute;
  color: #aaa;
  font-size: 0.88rem;
  text-align: center;
  padding: 8px;
  pointer-events: none;
}

/* === Carte live réelle dans le feed + modal aperçu caméra === */
.kf-live-real {
  border: 1px solid rgba(239, 68, 68, 0.55) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}
.kf-avatar-video-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.kf-avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kf-live-badge-you {
  background: #ef4444;
  animation: kf-blink 0.8s ease-in-out infinite;
}
.kf-live-you-label {
  color: #fca5a5;
  font-size: 0.7rem;
  font-weight: 600;
}
.krtc-modal-style {
  background: linear-gradient(145deg, #1e1130 0%, #12091e 100%);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* ═══════════════════════════════════════════════
   OUTIL DE DÉCOUPE / CAPTURE D'ÉCRAN
   ═══════════════════════════════════════════════ */

/* Toolbar flottante */
.snip-toolbar {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999;
  display: flex;
  gap: 6px;
}
.snip-toolbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(10,10,20,.8);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, transform .15s;
}
.snip-toolbar-btn:hover {
  background: rgba(124,58,237,.5);
  border-color: rgba(124,58,237,.6);
  transform: scale(1.08);
}
.snip-toolbar-btn--active {
  background: rgba(34,197,94,.4) !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 16px rgba(34,197,94,.3);
}

/* Overlay plein écran */
.snip-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
}
.snip-overlay--inspect {
  cursor: crosshair;
}
.snip-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* Info dimensions pendant sélection */
.snip-info {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.85);
  color: #22c55e;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(34,197,94,.3);
  white-space: nowrap;
  z-index: 99991;
}

/* Hint en bas */
.snip-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.75);
  color: #a5b4fc;
  font-size: 12px;
  padding: 6px 18px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 99991;
}

/* Highlight inspection */
.snip-inspect-hl {
  position: fixed;
  border: 2px solid #22c55e;
  background: rgba(34,197,94,.08);
  pointer-events: none;
  z-index: 99991;
  border-radius: 3px;
  transition: all .06s ease-out;
}
.snip-inspect-label {
  position: fixed;
  background: #22c55e;
  color: #000;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 99992;
  pointer-events: none;
}

/* Panneau résultat */
.snip-result {
  position: fixed;
  top: 60px;
  right: 12px;
  width: 360px;
  max-height: calc(100vh - 80px);
  z-index: 99999;
  background: linear-gradient(180deg, #1a1a2e 0%, #0e0e1a 100%);
  border: 1px solid rgba(124,58,237,.4);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.snip-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(124,58,237,.15);
  border-bottom: 1px solid rgba(124,58,237,.2);
  color: #ddd6fe;
  font-weight: 700;
  font-size: 14px;
}
.snip-result-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}
.snip-result-close:hover { color: #ef4444; }

.snip-result-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  font-size: 12px;
  color: #c4b5fd;
  max-height: 500px;
}
.snip-result-actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.snip-result-btn {
  flex: 1;
  background: rgba(124,58,237,.2);
  border: 1px solid rgba(124,58,237,.3);
  color: #ddd6fe;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s;
}
.snip-result-btn:hover {
  background: rgba(124,58,237,.4);
}

/* Sections dans le résultat */
.snip-r-section { margin-bottom: 12px; }
.snip-r-title {
  font-size: 12px;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 6px;
}
.snip-r-code {
  background: rgba(0,0,0,.4);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'Consolas', monospace;
  font-size: 11px;
  color: #22c55e;
}
.snip-r-img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
}
.snip-r-el {
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 6px;
}
.snip-r-sel {
  font-family: 'Consolas', monospace;
  font-size: 11px;
  color: #60a5fa;
  font-weight: 700;
  margin-bottom: 2px;
  word-break: break-all;
}
.snip-r-pos {
  font-size: 10px;
  color: #a5b4fc;
  margin-bottom: 3px;
}
.snip-r-css {
  font-family: 'Consolas', monospace;
  font-size: 10px;
  line-height: 1.5;
  color: #94a3b8;
}
.snip-r-prop { color: #c084fc; }
.snip-r-val { color: #86efac; }

@media (max-width: 600px) {
  .snip-result { width: calc(100vw - 24px); right: 12px; left: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   BAR — Page indépendante
   ═══════════════════════════════════════════════════════════ */



/* ── Fond de page Bar ── */
.bar-bg {
  margin: 0;
  min-height: 100vh;
  background: url('/images/bar-bg.jpeg') center center / cover no-repeat fixed;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* ── Fond de page Producer ── */
.producer-bg {
  margin: 0;
  min-height: 100vh;
  background: url('/images/RHF_LABOM_108lr.webp') center center / cover no-repeat fixed #08061a;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* Producer : ligne des 2 écrans côte à côte */
.producer-screens-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
}
.producer-screens-row > .bar-cam-slot,
.producer-screens-row > .producer-screencast {
  flex: 1 1 0;
  min-width: 0;
  max-width: 560px;
  position: static !important;
  width: 50% !important;
}

/* Producer : caméra même format que l'écran rediffusion */
.producer-bg .bar-cam-slot {
  width: 50% !important;
  max-width: 560px !important;
}
.producer-bg .bar-cam-3d-scene {
  perspective: none;
  padding: 0;
}
.producer-bg .bar-cam-monitor {
  transform: none;
}
.producer-bg .bar-cam-monitor:hover {
  transform: none;
}
.producer-bg .bar-cam-bezel {
  border-radius: 16px;
  padding: 0;
  background: rgba(10, 5, 20, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow:
    0 0 0 2px rgba(139,92,246,.12),
    0 10px 40px -10px rgba(0,0,0,.7),
    0 0 30px -5px rgba(139,92,246,.1);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.producer-bg .bar-cam-bezel::before {
  display: none;
}
.producer-bg .bar-cam-screen {
  border-radius: 0;
  aspect-ratio: auto;
}
.producer-bg .bar-cam-header {
  border-bottom: 1px solid rgba(139,92,246,.15);
  padding: 10px 14px;
}
.producer-bg .bar-cam-video {
  aspect-ratio: 16 / 9;
  min-height: auto;
  width: 100%;
}
.producer-bg .bar-cam-placeholder {
  min-height: auto;
  height: 100%;
}
.producer-bg .bar-cam-controls {
  border-top: 1px solid rgba(139,92,246,.15);
  padding: 10px 14px;
}
.producer-bg .bar-cam-stand {
  display: none;
}

/* Producer : écran Screen Share */
.producer-screencast {
  background: rgba(10, 5, 20, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 2px rgba(139,92,246,.12),
    0 10px 40px -10px rgba(0,0,0,.7),
    0 0 30px -5px rgba(139,92,246,.1);
  z-index: 5;
}
.producer-sc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(139,92,246,.15);
}
.producer-sc-badge {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: #374151;
  color: #9ca3af;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.producer-sc-badge--live {
  background: #dc2626;
  color: #fff;
  animation: producerScPulse 1.5s infinite;
}
@keyframes producerScPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.producer-sc-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #c4b5fd;
}
.producer-sc-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050510;
  display: flex;
  align-items: center;
  justify-content: center;
}
.producer-sc-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #6b7280;
}
.producer-sc-placeholder span {
  font-size: 2.5rem;
}
.producer-sc-placeholder p {
  font-size: 0.8rem;
  margin: 0;
}
.producer-sc-controls {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(139,92,246,.15);
}
.producer-sc-btn {
  flex: 1;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, background .2s;
  font-family: inherit;
}
.producer-sc-btn:hover {
  transform: scale(1.03);
}
.producer-sc-btn--start {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
}
.producer-sc-btn--stop {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
}

/* Producer : ligne sélecteur audio */
.producer-audio-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}
.producer-audio-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c4b5fd;
  white-space: nowrap;
}
.producer-audio-select {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(139,92,246,.3);
  background: rgba(10,5,20,.8);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
}
.producer-audio-select:focus {
  outline: none;
  border-color: rgba(139,92,246,.6);
  box-shadow: 0 0 0 2px rgba(139,92,246,.15);
}

/* ═══════════════════════════════════════════════════════
   LIVE RECORDER — Indicateur REC + Popup téléchargement
   ═══════════════════════════════════════════════════════ */

/* Indicateur REC (point rouge clignotant) */
.live-rec-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ff4444;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 8px;
  animation: liveRecPulse 1.2s ease-in-out infinite;
}
.live-rec-dot-circle {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  box-shadow: 0 0 6px #ff4444;
}
@keyframes liveRecPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Overlay sombre */
.live-rec-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: liveRecFadeIn .3s ease;
}
@keyframes liveRecFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Popup */
.live-rec-popup {
  background: linear-gradient(145deg, #1a1035, #0f0a20);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  padding: 0;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.6),
    0 0 40px rgba(139,92,246,.12);
  overflow: hidden;
  animation: liveRecSlideUp .35s ease;
}
@keyframes liveRecSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.live-rec-popup-header {
  background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(79,70,229,.2));
  padding: 24px 28px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(139,92,246,.15);
}
.live-rec-popup-icon {
  font-size: 2rem;
}
.live-rec-popup-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ece7ff;
}

.live-rec-popup-body {
  padding: 20px 28px;
}
.live-rec-popup-source {
  font-size: 0.95rem;
  color: #a78bfa;
  font-weight: 600;
  margin: 0 0 12px;
}
.live-rec-popup-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}
.live-rec-popup-stats span {
  font-size: 0.85rem;
  color: #94a3b8;
}
.live-rec-popup-msg {
  margin: 0;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.live-rec-popup-actions {
  padding: 16px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.live-rec-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s;
  font-family: inherit;
}
.live-rec-btn:hover {
  transform: translateY(-1px);
}
.live-rec-btn--download {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,.3);
}
.live-rec-btn--download:hover {
  box-shadow: 0 6px 28px rgba(124,58,237,.45);
}
.live-rec-btn--close {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.live-rec-btn--close:hover {
  background: rgba(139, 92, 246, 0.18);
}

.festival-bg {
  margin: 0;
  min-height: 100vh;
  background: url('/images/festival-bg.jpeg') center center / cover no-repeat fixed;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  cursor: default;
}

/* ══ SCÈNE 3D IMMERSIVE — Canvas fond ══ */
.fest-scene-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ══ Haze / fumée ambiante ══ */
.fest-haze {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(100,50,180,.06) 30%,
    rgba(80,20,140,.12) 60%,
    rgba(40,10,80,.25) 85%,
    rgba(10,5,30,.4) 100%
  );
  mix-blend-mode: screen;
  animation: festHazeWave 8s ease-in-out infinite alternate;
}
@keyframes festHazeWave {
  0%   { opacity: .7; }
  100% { opacity: 1; }
}

/* ══ Confettis layer ══ */
.fest-confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.fest-confetti {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: .85;
  animation: festConfettiFall linear forwards;
  will-change: transform;
}
@keyframes festConfettiFall {
  0%   { transform: translateY(-20px) rotateZ(0deg) rotateX(0deg); opacity: .9; }
  50%  { opacity: .8; }
  100% { transform: translateY(110vh) rotateZ(720deg) rotateX(360deg); opacity: 0; }
}

/* ── Titre Festival ── */
.fest-title {
  display: block;
  text-align: center;
  margin: 12px auto 0;
  z-index: 10;
  position: relative;
}
.fest-title svg {
  display: block;
  margin: 0 auto;
  overflow: visible;
}

/* ── Toolbar redimensionnement écran ── */
.fest-resize-toolbar {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10,10,30,.85);
  border: 1px solid #7c3aed;
  border-radius: 10px;
  padding: 6px 12px;
  backdrop-filter: blur(8px);
}
.fest-resize-toolbar button {
  width: 28px;
  height: 28px;
  border: 1px solid #8b5cf6;
  border-radius: 6px;
  background: #1e1b4b;
  color: #c4b5fd;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.fest-resize-toolbar button:hover { background: #7c3aed; color: #fff; }
.fest-resize-label {
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 700;
  margin-right: 4px;
}
.fest-resize-toolbar span {
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
}
.fest-resize-sep {
  color: #8b5cf6;
  font-size: 14px;
  margin: 0 2px;
}

/* ═══ Festival — Effets lumières intenses derrière l'écran ═══ */
.fest-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.fest-light--1 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #ff00ff 0%, transparent 70%);
  top: -80px;
  left: -60px;
  animation: festPulse1 3s ease-in-out infinite alternate;
}
.fest-light--2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #00eaff 0%, transparent 70%);
  top: -50px;
  right: -70px;
  animation: festPulse2 4s ease-in-out infinite alternate;
}
.fest-light--3 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, #ff3300 0%, transparent 70%);
  bottom: -40px;
  left: 30%;
  animation: festPulse3 3.5s ease-in-out infinite alternate;
}
.fest-light--4 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #7b2dff 0%, transparent 70%);
  top: 30%;
  left: -90px;
  animation: festPulse4 2.8s ease-in-out infinite alternate;
}
.fest-light--5 {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, #00ff88 0%, transparent 70%);
  bottom: -60px;
  right: -40px;
  animation: festPulse5 3.2s ease-in-out infinite alternate;
}
.fest-light--6 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #ffe500 0%, transparent 70%);
  top: -40px;
  left: 40%;
  animation: festPulse6 4.5s ease-in-out infinite alternate;
}

@keyframes festPulse1 {
  0%   { opacity: 0.5; transform: scale(1) translate(0, 0); }
  100% { opacity: 0.85; transform: scale(1.2) translate(15px, 10px); }
}
@keyframes festPulse2 {
  0%   { opacity: 0.45; transform: scale(1) translate(0, 0); }
  100% { opacity: 0.8; transform: scale(1.15) translate(-20px, 15px); }
}
@keyframes festPulse3 {
  0%   { opacity: 0.4; transform: scale(1) translate(0, 0); }
  100% { opacity: 0.75; transform: scale(1.25) translate(10px, -10px); }
}
@keyframes festPulse4 {
  0%   { opacity: 0.5; transform: scale(1) translate(0, 0); }
  100% { opacity: 0.9; transform: scale(1.1) translate(20px, -5px); }
}
@keyframes festPulse5 {
  0%   { opacity: 0.4; transform: scale(1) translate(0, 0); }
  100% { opacity: 0.7; transform: scale(1.3) translate(-15px, -10px); }
}
@keyframes festPulse6 {
  0%   { opacity: 0.35; transform: scale(1) translate(0, 0); }
  100% { opacity: 0.75; transform: scale(1.15) translate(10px, 12px); }
}

/* ═══════════════════════════════════════════════════════════
   BEACH PAGE — Ambiance plage / sunset
   ═══════════════════════════════════════════════════════════ */

.beach-bg {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(12,26,58,.55) 0%, rgba(26,58,92,.4) 25%, rgba(45,106,138,.3) 45%, rgba(232,185,90,.25) 70%, rgba(245,208,138,.2) 85%, rgba(240,194,127,.15) 100%),
    url('/images/beach-bg.webp') center center / cover no-repeat fixed;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ── Titre Beach ── */
.beach-title {
  display: block;
  text-align: center;
  margin: 12px auto 0;
  z-index: 10;
  position: relative;
}
.beach-title svg {
  display: block;
  margin: 0 auto;
  overflow: visible;
}

/* ── Vagues animées ── */
.beach-waves {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.beach-wave {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  height: 60px;
  border-radius: 50% 50% 0 0;
  opacity: 0.4;
}
.beach-wave--1 {
  background: rgba(34, 211, 238, 0.3);
  height: 50px;
  animation: beachWave1 4s ease-in-out infinite;
}
.beach-wave--2 {
  background: rgba(6, 182, 212, 0.25);
  height: 40px;
  bottom: 8px;
  animation: beachWave2 5s ease-in-out infinite;
}
.beach-wave--3 {
  background: rgba(14, 116, 144, 0.2);
  height: 35px;
  bottom: 15px;
  animation: beachWave3 6s ease-in-out infinite;
}

@keyframes beachWave1 {
  0%, 100% { transform: translateX(0) scaleY(1); }
  50%      { transform: translateX(3%) scaleY(1.3); }
}
@keyframes beachWave2 {
  0%, 100% { transform: translateX(0) scaleY(1); }
  50%      { transform: translateX(-2%) scaleY(1.4); }
}
@keyframes beachWave3 {
  0%, 100% { transform: translateX(0) scaleY(1); }
  50%      { transform: translateX(4%) scaleY(1.2); }
}

/* ── Lumières Beach (sunset glow) ── */
.beach-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
.beach-light--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #ff9500 0%, transparent 70%);
  top: -60px;
  left: 20%;
  animation: beachGlow1 4s ease-in-out infinite alternate;
}
.beach-light--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #ff5e62 0%, transparent 70%);
  top: -40px;
  right: 10%;
  animation: beachGlow2 3.5s ease-in-out infinite alternate;
}
.beach-light--3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #00d2ff 0%, transparent 70%);
  bottom: -30px;
  left: 40%;
  animation: beachGlow3 5s ease-in-out infinite alternate;
}
.beach-light--4 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #f7b733 0%, transparent 70%);
  top: 30%;
  right: -60px;
  animation: beachGlow4 3s ease-in-out infinite alternate;
}

@keyframes beachGlow1 {
  0%   { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.75; transform: scale(1.2) translate(10px, 8px); }
}
@keyframes beachGlow2 {
  0%   { opacity: 0.35; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.15) translate(-15px, 10px); }
}
@keyframes beachGlow3 {
  0%   { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.25) translate(8px, -8px); }
}
@keyframes beachGlow4 {
  0%   { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.8; transform: scale(1.1) translate(-10px, 5px); }
}

/* ═══════════════════════════════════════════════════════════
   NIGHT SHOW — fond + effets
   ═══════════════════════════════════════════════════════════ */

.nightshow-bg {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(5,5,20,.6) 0%, rgba(20,10,50,.45) 30%, rgba(40,15,80,.3) 60%, rgba(10,5,30,.5) 100%),
    url('/images/nightshow-bg.jpeg') center center / cover no-repeat fixed;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ── Titre Night Show ── */
.nightshow-title {
  display: block;
  text-align: center;
  margin: 12px auto 0;
  z-index: 10;
  position: relative;
}
.nightshow-title svg {
  display: block;
  margin: 0 auto;
  overflow: visible;
}

/* ── Lasers animés ── */
.nightshow-lasers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.nightshow-laser {
  position: absolute;
  top: 0;
  width: 3px;
  height: 120%;
  opacity: 0.25;
  transform-origin: top center;
}
.nightshow-laser--1 {
  left: 30%;
  background: linear-gradient(180deg, #a855f7 0%, transparent 80%);
  animation: nightLaser1 5s ease-in-out infinite alternate;
}
.nightshow-laser--2 {
  left: 50%;
  background: linear-gradient(180deg, #06b6d4 0%, transparent 80%);
  animation: nightLaser2 4s ease-in-out infinite alternate;
}
.nightshow-laser--3 {
  left: 70%;
  background: linear-gradient(180deg, #ec4899 0%, transparent 80%);
  animation: nightLaser3 6s ease-in-out infinite alternate;
}

@keyframes nightLaser1 {
  0%   { transform: rotate(-15deg); opacity: 0.15; }
  100% { transform: rotate(15deg); opacity: 0.35; }
}
@keyframes nightLaser2 {
  0%   { transform: rotate(10deg); opacity: 0.2; }
  100% { transform: rotate(-10deg); opacity: 0.4; }
}
@keyframes nightLaser3 {
  0%   { transform: rotate(-8deg); opacity: 0.15; }
  100% { transform: rotate(12deg); opacity: 0.3; }
}

/* ── Lumières Night Show (neon glow) ── */
.nightshow-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
.nightshow-light--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #a855f7 0%, transparent 70%);
  top: -60px;
  left: 20%;
  animation: nightGlow1 4s ease-in-out infinite alternate;
}
.nightshow-light--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: -40px;
  right: 10%;
  animation: nightGlow2 3.5s ease-in-out infinite alternate;
}
.nightshow-light--3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  bottom: -30px;
  left: 40%;
  animation: nightGlow3 5s ease-in-out infinite alternate;
}
.nightshow-light--4 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  top: 30%;
  right: -60px;
  animation: nightGlow4 3s ease-in-out infinite alternate;
}

@keyframes nightGlow1 {
  0%   { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.75; transform: scale(1.2) translate(10px, 8px); }
}
@keyframes nightGlow2 {
  0%   { opacity: 0.35; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.15) translate(-15px, 10px); }
}
@keyframes nightGlow3 {
  0%   { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.25) translate(8px, -8px); }
}
@keyframes nightGlow4 {
  0%   { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.8; transform: scale(1.1) translate(-10px, 5px); }
}

/* ═══════════════════════════════════════════════════════════
   LAKE SIDE NIGHT — fond + étoiles filantes + effets
   ═══════════════════════════════════════════════════════════ */

.lakeside-bg {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(5,10,30,.35) 0%, rgba(10,20,50,.25) 40%, rgba(5,15,40,.3) 70%, rgba(10,10,25,.5) 100%),
    url('/images/lakeside-bg.jpeg') center center / cover no-repeat fixed;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ── Overlay galaxie superposée ── */
.lakeside-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.lakeside-overlay-img {
  position: absolute;
  top: 0; left: 0;
  width: 121%; height: 108%;
  object-fit: cover;
  opacity: 0.13;
  mix-blend-mode: screen;
  filter: saturate(1.4) brightness(1.0);
  transform: translate(-503px, -213px) scale(0.39);
  animation: galaxyPulse 12s ease-in-out infinite alternate;
}
@keyframes galaxyPulse {
  0%   { opacity: 0.50; filter: saturate(1.3) brightness(0.95); }
  100% { opacity: 0.60; filter: saturate(1.5) brightness(1.05); }
}

/* ── Titre Lake Side Night ── */
.lakeside-title {
  display: block;
  text-align: center;
  margin: 12px auto 0;
  z-index: 10;
  position: relative;
}
.lakeside-title svg {
  display: block;
  margin: 0 auto;
  overflow: visible;
}

/* ── Conteneur étoiles filantes ── */
.lakeside-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 45%;
  height: 45%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ── Étoile filante (base) ── */
.shooting-star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  box-shadow:
    0 0 6px 2px rgba(255,255,255,.8),
    0 0 12px 4px rgba(96,165,250,.5),
    0 0 20px 6px rgba(96,165,250,.2);
}
.shooting-star::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.1) 30%, rgba(255,255,255,.8) 100%);
  transform: translateY(-50%);
  border-radius: 2px;
}

/* ── 12 étoiles filantes — coin supérieur gauche ── */
.shooting-star--1 {
  top: 5%; left: 2%;
  animation: shootingStar 2.5s ease-in 0s infinite;
}
.shooting-star--2 {
  top: 12%; left: 18%;
  animation: shootingStar 3s ease-in 2s infinite;
}
.shooting-star--3 {
  top: 3%; left: 30%;
  animation: shootingStar 2.8s ease-in 4.5s infinite;
}
.shooting-star--4 {
  top: 20%; left: 8%;
  animation: shootingStar 2.2s ease-in 7s infinite;
}
.shooting-star--5 {
  top: 8%; left: 38%;
  animation: shootingStar 3.2s ease-in 1.5s infinite;
}
.shooting-star--6 {
  top: 1%; left: 15%;
  animation: shootingStar 2.6s ease-in 5.5s infinite;
}
.shooting-star--7 {
  top: 16%; left: 5%;
  animation: shootingStar 2.9s ease-in 8s infinite;
}
.shooting-star--8 {
  top: 25%; left: 22%;
  animation: shootingStar 2.4s ease-in 3.5s infinite;
}
.shooting-star--9 {
  top: 6%; left: 10%;
  animation: shootingStar 3.1s ease-in 6s infinite;
}
.shooting-star--10 {
  top: 18%; left: 28%;
  animation: shootingStar 2.7s ease-in 9s infinite;
}
.shooting-star--11 {
  top: 10%; left: 0%;
  animation: shootingStar 2.3s ease-in 10.5s infinite;
}
.shooting-star--12 {
  top: 14%; left: 35%;
  animation: shootingStar 3.4s ease-in 12s infinite;
}

@keyframes shootingStar {
  0%   { opacity: 0; transform: translate(0, 0) rotate(-35deg) scale(0.5); }
  5%   { opacity: 1; transform: translate(0, 0) rotate(-35deg) scale(1); }
  70%  { opacity: 1; transform: translate(300px, 200px) rotate(-35deg) scale(1); }
  100% { opacity: 0; transform: translate(400px, 280px) rotate(-35deg) scale(0.3); }
}

/* ── Lumières Lakeside (lueur feu de camp + reflets) ── */
.lakeside-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
.lakeside-light--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
  top: -60px;
  left: 20%;
  animation: lakesideGlow1 4s ease-in-out infinite alternate;
}
.lakeside-light--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
  top: -40px;
  right: 10%;
  animation: lakesideGlow2 3.5s ease-in-out infinite alternate;
}
.lakeside-light--3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #818cf8 0%, transparent 70%);
  bottom: -30px;
  left: 40%;
  animation: lakesideGlow3 5s ease-in-out infinite alternate;
}
.lakeside-light--4 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #f97316 0%, transparent 70%);
  top: 30%;
  right: -60px;
  animation: lakesideGlow4 3s ease-in-out infinite alternate;
}

@keyframes lakesideGlow1 {
  0%   { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.2) translate(10px, 8px); }
}
@keyframes lakesideGlow2 {
  0%   { opacity: 0.25; transform: scale(1); }
  100% { opacity: 0.55; transform: scale(1.15) translate(-15px, 10px); }
}
@keyframes lakesideGlow3 {
  0%   { opacity: 0.2; transform: scale(1); }
  100% { opacity: 0.5; transform: scale(1.25) translate(8px, -8px); }
}
@keyframes lakesideGlow4 {
  0%   { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.65; transform: scale(1.1) translate(-10px, 5px); }
}

/* ═══════════════════════════════════════════════════════════
   NEPTUNE — fond + titre + bulles + lumières
   ═══════════════════════════════════════════════════════════ */
.neptune-bg {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(2,8,25,.6) 0%, rgba(5,20,60,.4) 30%, rgba(8,40,90,.25) 55%, rgba(6,25,60,.4) 75%, rgba(2,10,30,.6) 100%),
    url('/images/neptune-bg.avif') center center / cover no-repeat fixed;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ── Titre Neptune ── */
.neptune-title {
  display: block;
  text-align: center;
  margin: 12px auto 0;
  z-index: 10;
  position: relative;
}
.neptune-title svg {
  display: block;
  margin: 0 auto;
  overflow: visible;
}

/* ── Bulles animées ── */
.neptune-bubbles {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.neptune-bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(6,182,212,.25), rgba(6,182,212,.05));
  border: 1px solid rgba(6,182,212,.15);
  animation: neptuneBubbleRise linear infinite;
}
.neptune-bubble--1 { width: 12px; height: 12px; left: 10%; animation-duration: 8s; animation-delay: 0s; }
.neptune-bubble--2 { width: 18px; height: 18px; left: 25%; animation-duration: 10s; animation-delay: 1.5s; }
.neptune-bubble--3 { width: 8px; height: 8px; left: 40%; animation-duration: 7s; animation-delay: 3s; }
.neptune-bubble--4 { width: 14px; height: 14px; left: 55%; animation-duration: 9s; animation-delay: 0.5s; }
.neptune-bubble--5 { width: 10px; height: 10px; left: 70%; animation-duration: 11s; animation-delay: 2s; }
.neptune-bubble--6 { width: 16px; height: 16px; left: 85%; animation-duration: 8.5s; animation-delay: 4s; }
.neptune-bubble--7 { width: 6px; height: 6px; left: 15%; animation-duration: 6s; animation-delay: 5s; }
.neptune-bubble--8 { width: 20px; height: 20px; left: 60%; animation-duration: 12s; animation-delay: 2.5s; }

@keyframes neptuneBubbleRise {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* ── Lumières Neptune (reflets sous-marins) ── */
.neptune-light {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}
.neptune-light--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  top: -50px;
  left: -80px;
  animation: neptuneGlow1 4s ease-in-out infinite alternate;
}
.neptune-light--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
  top: 20%;
  right: -60px;
  animation: neptuneGlow2 5s ease-in-out infinite alternate;
}
.neptune-light--3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
  bottom: -30px;
  left: 40%;
  animation: neptuneGlow3 6s ease-in-out infinite alternate;
}
.neptune-light--4 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #0e7490 0%, transparent 70%);
  top: 30%;
  right: -60px;
  animation: neptuneGlow4 3.5s ease-in-out infinite alternate;
}

@keyframes neptuneGlow1 {
  0%   { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.2) translate(10px, 8px); }
}
@keyframes neptuneGlow2 {
  0%   { opacity: 0.25; transform: scale(1); }
  100% { opacity: 0.55; transform: scale(1.15) translate(-15px, 10px); }
}
@keyframes neptuneGlow3 {
  0%   { opacity: 0.2; transform: scale(1); }
  100% { opacity: 0.5; transform: scale(1.25) translate(8px, -8px); }
}
@keyframes neptuneGlow4 {
  0%   { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.65; transform: scale(1.1) translate(-10px, 5px); }
}

.bar-main {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 16px 40px;
  z-index: 1;
}

/* ── Layout principal ── */
.bar-layout {
  display: block;
  position: relative;
  min-height: 600px;
  max-width: 960px;
  margin: 0 auto;
}

/* Écrans positionnés en absolu */
.bar-layout > .bar-screens,
.bar-layout > .bar-cam-slot {
  position: absolute !important;
}

/* L'écran karaoke prend toute la largeur */
.bar-layout > .bar-screens {
  width: 100%;
  max-width: 1200px;
}

/* ═══ TIROIR KARAOKÉ (sous la vidéo) ═══ */
.bar-drawer-wrap {
  margin-top: 8px;
  width: 100%;
}

/* Bouton d'ouverture */
.bar-drawer-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(168,85,247,.2);
  border-radius: 12px;
  background: rgba(10,5,20,.75);
  backdrop-filter: blur(12px);
  color: #c4b5fd;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.bar-drawer-toggle:hover {
  background: rgba(168,85,247,.12);
  border-color: rgba(168,85,247,.35);
  box-shadow: 0 0 16px rgba(139,92,246,.15);
}
.bar-drawer-toggle--active {
  background: rgba(168,85,247,.18);
  border-color: #a855f7;
}
.bar-drawer-icon { font-size: 1.1rem; }
.bar-drawer-arrow {
  font-size: 0.65rem;
  transition: transform .3s;
}
.bar-drawer-toggle--active .bar-drawer-arrow {
  transform: rotate(180deg);
}

/* Tiroir caché */
.bar-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s;
  opacity: 0;
  background: rgba(10,5,20,.85);
  border: 1px solid rgba(168,85,247,.15);
  border-top: none;
  border-radius: 0 0 14px 14px;
  backdrop-filter: blur(14px);
}
.bar-drawer--open {
  max-height: 400px;
  opacity: 1;
  border-top: 1px solid rgba(168,85,247,.1);
}

.bar-kl-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(168, 85, 247, .1);
}
.bar-kl-search {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(168, 85, 247, .2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.bar-kl-search:focus {
  border-color: #a855f7;
}
.bar-kl-search::placeholder { color: #64748b; }

.bar-kl-scroll {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px 8px 10px;
}
.bar-kl-scroll::-webkit-scrollbar { width: 5px; }
.bar-kl-scroll::-webkit-scrollbar-track { background: transparent; }
.bar-kl-scroll::-webkit-scrollbar-thumb { background: rgba(168,85,247,.3); border-radius: 4px; }

.bar-kl-empty {
  color: #64748b;
  font-size: 0.82rem;
  text-align: center;
  padding: 20px 0;
}

.bar-kl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: default;
  transition: background .15s;
  border: 1px solid transparent;
}
.bar-kl-item:hover {
  background: rgba(168, 85, 247, .1);
}
.bar-kl-item--playing1 {
  background: rgba(168, 85, 247, .15);
  border-color: rgba(168, 85, 247, .4);
}
.bar-kl-btn--play {
  background: rgba(168, 85, 247, .18);
  font-size: 0.85rem;
}
.bar-kl-btn--play:hover {
  background: rgba(168, 85, 247, .35);
}

.bar-kl-emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.bar-kl-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.bar-kl-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-kl-artist {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-kl-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.bar-kl-btn {
  width: 30px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: #e2e8f0;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background .15s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bar-kl-btn:hover {
  background: rgba(168, 85, 247, .25);
  transform: scale(1.1);
}
.bar-kl-btn:active { transform: scale(0.92); }

/* ═══ ÉCRAN LIVE ═══ */
.bar-screens {
  flex: 1;
  min-width: 0;
  overflow: visible;
}

/* ── Scène 3D avec perspective ── */
.bar-3d-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px 50px;
}

/* Moniteur 3D — poussé vers le fond de la pièce */
.bar-3d-monitor {
  position: relative;
  width: 100%;
  max-width: 1100px;
}

/* Reflet néon en haut */
.bar-3d-glow-top {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 80px;
  background: radial-gradient(ellipse at center, rgba(139,92,246,.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Reflet néon en bas */
.bar-3d-glow-bottom {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 60px;
  background: radial-gradient(ellipse at center, rgba(168,85,247,.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Sol réfléchissant (reflet de l'écran) */
.bar-3d-floor {
  position: absolute;
  bottom: -5px; left: 50%;
  transform: translateX(-50%) rotateX(60deg);
  width: 60%;
  height: 50px;
  background: linear-gradient(to bottom, rgba(139,92,246,.08), transparent);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

/* ═══ ÉCRAN INCURVÉ SANS BORD ═══ */
.bar-curved-screen {
  position: relative;
  background: #030308;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  clip-path: url(#barScreenCurveClip);
  /* Ombre portée large sans rebord */
  box-shadow:
    0 0 0 1px rgba(139,92,246,.1),
    0 8px 60px -8px rgba(0,0,0,.95),
    0 0 80px -15px rgba(139,92,246,.12),
    inset 0 0 80px -30px rgba(139,92,246,.06);
}

/* Reflet de lumière incurvé sur l'écran */
.bar-curved-shine {
  position: absolute;
  inset: 0;
  border-radius: 0;
  pointer-events: none;
  z-index: 5;
  background:
    /* Reflet en haut à gauche */
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.04) 0%, transparent 50%),
    /* Lumière ambiante sur les bords (simule la courbure) */
    linear-gradient(90deg,
      rgba(139,92,246,.1) 0%,
      transparent 6%,
      transparent 94%,
      rgba(139,92,246,.1) 100%
    ),
    /* Trait lumineux en haut */
    linear-gradient(180deg,
      rgba(168,85,247,.15) 0%,
      transparent 3%
    );
}

/* Edge glow qui accentue la courbure */
.bar-curved-screen::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -1px;
  width: 5px;
  background: linear-gradient(180deg,
    transparent 5%,
    rgba(139,92,246,.25) 30%,
    rgba(168,85,247,.2) 50%,
    rgba(139,92,246,.25) 70%,
    transparent 95%
  );
  border-radius: 0;
  z-index: 6;
  filter: blur(1px);
}
.bar-curved-screen::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  right: -1px;
  width: 5px;
  background: linear-gradient(180deg,
    transparent 5%,
    rgba(139,92,246,.25) 30%,
    rgba(168,85,247,.2) 50%,
    rgba(139,92,246,.25) 70%,
    transparent 95%
  );
  border-radius: 0;
  z-index: 6;
  filter: blur(1px);
}


.bar-screen-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(168, 85, 247, .12);
}
.bar-screen-badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  background: #ef4444;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
  animation: barLivePulse 2s ease-in-out infinite;
}
@keyframes barLivePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(239,68,68,.4); }
  50%      { opacity: .7; box-shadow: 0 0 12px rgba(239,68,68,.7); }
}
.bar-screen-now {
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-screen-video {
  position: relative;
  width: 100%;
  aspect-ratio: 32/9;
  background: #050510;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
/* Scanline overlay pour effet moniteur */
.bar-screen-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,.03) 0px,
    rgba(0,0,0,.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
}
.bar-screen-placeholder {
  text-align: center;
  color: #4a4a6a;
}
.bar-screen-placeholder span {
  font-size: 3rem;
  display: block;
  margin-bottom: 6px;
  opacity: .5;
}
.bar-screen-placeholder p {
  font-size: 0.78rem;
  margin: 0;
}

.bar-video-player {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.bar-screen-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(168, 85, 247, .12);
}
.bar-scr-btn {
  width: 32px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: #e2e8f0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background .15s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bar-scr-btn:hover {
  background: rgba(168, 85, 247, .2);
}
.bar-scr-btn:active { transform: scale(0.9); }

.bar-scr-btn--fullscreen {
  margin-left: auto;
}

/* ── Bouton Agrandir flottant sur l'écran karaoké ── */
.bar-enlarge-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  background: linear-gradient(135deg, rgba(139,92,246,.85), rgba(109,40,217,.9));
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(139,92,246,.4), 0 0 20px rgba(139,92,246,.15);
  backdrop-filter: blur(8px);
  transition: transform .2s, box-shadow .2s, background .2s;
  animation: barEnlargePulse 3s ease-in-out infinite;
}
.bar-enlarge-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(139,92,246,.55), 0 0 30px rgba(139,92,246,.25);
  background: linear-gradient(135deg, rgba(167,139,250,.95), rgba(139,92,246,.95));
}
.bar-enlarge-btn:active {
  transform: scale(.95);
}
.bar-enlarge-btn svg {
  flex-shrink: 0;
}
@keyframes barEnlargePulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(139,92,246,.4), 0 0 20px rgba(139,92,246,.15); }
  50% { box-shadow: 0 4px 20px rgba(139,92,246,.6), 0 0 30px rgba(139,92,246,.3); }
}

/* État agrandi — plein écran centré */
.bar-screens.bar-screens--enlarged {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bar-screens--enlarged .bar-3d-scene {
  width: 100%;
  height: 100%;
  padding: 0;
}
.bar-screens--enlarged .bar-3d-monitor {
  width: 100%;
  height: 100%;
}
.bar-screens--enlarged .bar-curved-screen {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  clip-path: none !important;
}
.bar-screens--enlarged .bar-screen-video,
.bar-screens--enlarged .bar-video-player {
  width: 100% !important;
  height: 100% !important;
}
.bar-screens--enlarged .bar-3d-glow-top,
.bar-screens--enlarged .bar-3d-glow-bottom,
.bar-screens--enlarged .bar-3d-floor,
.bar-screens--enlarged .bar-curved-shine {
  display: none;
}
.bar-screens--enlarged .bar-enlarge-btn span::after {
  content: '';
}
.bar-screens--enlarged .bar-drawer-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
}

.bar-scr-volume {
  flex: 1;
  max-width: 90px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,.12);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}
.bar-scr-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
}

/* ── Responsive bar layout ── */
@media (max-width: 900px) {
  .bar-3d-scene { padding: 20px 10px 40px; }
  .bar-cam-slot { width: 100%; max-width: 400px; }
}
@media (max-width: 600px) {
  .bar-main { padding: 50px 8px 30px; }

  .bar-3d-bezel { padding: 5px; border-radius: 10px; }
  .bar-3d-stand-base { width: 60px; }
  .bar-drawer-toggle { font-size: 0.78rem; padding: 8px 12px; }
  .bar-cam-bezel { padding: 4px; border-radius: 50%; }
  .bar-cam-stand-base { width: 40px; }
}

/* ═══ ÉCRANS LIVE CAMÉRA ═══ */
/* Par défaut les 2 cams côte à côte via flex-wrap du parent */
.bar-cam-slot {
  width: 48%;
  max-width: 420px;
  transition: transform .3s ease;
}
.bar-cam-slot--active {
  transform: translateY(-2px);
}

/* Scène 3D caméra */
.bar-cam-3d-scene {
  position: relative;
  perspective: 700px;
  perspective-origin: 50% 45%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 30px;
}
.bar-cam-monitor {
  position: relative;
  transform: rotateX(2deg) rotateY(0deg);
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.22,.68,0,1.4);
}
.bar-cam-monitor:hover {
  transform: rotateX(0deg) rotateY(0deg) scale(1.02);
}
.bar-cam-bezel {
  position: relative;
  padding: 8px;
  background: linear-gradient(145deg, #1a1a2e, #0d0d1a);
  border-radius: 50%;
  box-shadow:
    0 0 0 3px rgba(139,92,246,.25),
    0 0 0 6px rgba(139,92,246,.08),
    0 14px 50px -8px rgba(0,0,0,.85),
    0 0 50px -5px rgba(139,92,246,.15),
    inset 0 1px 0 rgba(255,255,255,.06);
  transform-style: preserve-3d;
}
.bar-cam-bezel::before {
  content: '';
  position: absolute;
  top: 4%; left: 25%; right: 25%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,.5), transparent);
  border-radius: 1px;
  z-index: 5;
}
.bar-cam-slot--active .bar-cam-bezel {
  box-shadow:
    0 0 0 3px rgba(34,197,94,.35),
    0 0 0 6px rgba(34,197,94,.1),
    0 14px 50px -8px rgba(0,0,0,.85),
    0 0 50px -5px rgba(34,197,94,.2),
    inset 0 1px 0 rgba(255,255,255,.06);
}
.bar-cam-slot--active .bar-cam-bezel::before {
  background: linear-gradient(90deg, transparent, rgba(34,197,94,.6), transparent);
}

.bar-cam-screen {
  background: #050510;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1;
}
.bar-cam-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(168,85,247,.1);
  position: relative;
  z-index: 3;
}
.bar-cam-badge {
  font-size: 0.52rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 3px;
  background: #374151;
  color: #9ca3af;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: background .3s, color .3s;
}
.bar-cam-badge--live {
  background: #ef4444;
  color: #fff;
  animation: barLivePulse 2s ease-in-out infinite;
}
.bar-cam-user {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-cam-slot--active .bar-cam-user {
  color: #94a3b8;
}

.bar-cam-video {
  position: relative;
  width: 100%;
  flex: 1;
  background: #0a0a18;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Scanline overlay */
.bar-cam-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,.02) 0px,
    rgba(0,0,0,.02) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
}
.bar-cam-placeholder {
  text-align: center;
  color: #3a3a5a;
}
.bar-cam-placeholder span {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 4px;
  opacity: .4;
}
.bar-cam-placeholder p {
  font-size: 0.72rem;
  margin: 0;
  opacity: .6;
}

.bar-cam-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.bar-cam-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border-top: 1px solid rgba(168,85,247,.1);
  position: relative;
  z-index: 3;
}
.bar-cam-btn {
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: #e2e8f0;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background .15s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  gap: 4px;
}
.bar-cam-btn:hover {
  background: rgba(168,85,247,.2);
}
.bar-cam-btn:active { transform: scale(0.92); }

.bar-cam-btn--connect {
  flex: 1;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(34,197,94,.15), rgba(34,197,94,.08));
  border: 1px solid rgba(34,197,94,.2);
  color: #4ade80;
}
.bar-cam-btn--connect:hover {
  background: linear-gradient(135deg, rgba(34,197,94,.25), rgba(34,197,94,.15));
}
.bar-cam-btn--disconnect {
  background: linear-gradient(135deg, rgba(239,68,68,.15), rgba(239,68,68,.08)) !important;
  border: 1px solid rgba(239,68,68,.2) !important;
  color: #f87171 !important;
}
.bar-cam-btn--disconnect:hover {
  background: linear-gradient(135deg, rgba(239,68,68,.25), rgba(239,68,68,.15)) !important;
}
.bar-cam-btn--mute,
.bar-cam-btn--flip {
  width: 34px;
  height: 30px;
  padding: 0;
  font-size: 0.9rem;
}

/* Pied mini moniteur cam */
.bar-cam-stand {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-style: preserve-3d;
}
.bar-cam-stand-neck {
  width: 10px;
  height: 14px;
  background: linear-gradient(180deg, #1a1a2e, #111125);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.bar-cam-stand-base {
  width: 50px;
  height: 6px;
  background: linear-gradient(180deg, #1a1a2e, #0d0d1a);
  border-radius: 0 0 8px 8px;
  box-shadow:
    0 3px 12px rgba(0,0,0,.4),
    0 0 14px rgba(139,92,246,.04);
}

/* ═══════════════════════════════════════════════════════════
   AVATARS MICRO ANTIQUE 3D — Bar page
   ═══════════════════════════════════════════════════════════ */

.bar-avatars-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 38px;
  padding: 18px 0 12px;
  position: relative;
  z-index: 10;
  min-height: 140px;
}

/* Container avatar (draggable) */
.bar-avatar-mic {
  position: relative;
  cursor: grab;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .15s ease, filter .2s ease;
}
.bar-avatar-mic:hover { transform: translateY(-3px); }
.bar-avmic--dragging {
  cursor: grabbing !important;
  transform: scale(1.15) !important;
  filter: drop-shadow(0 0 20px rgba(255,255,255,.45)) drop-shadow(0 8px 24px rgba(0,0,0,.6));
  opacity: .92;
  transition: none !important;
}
.bar-avmic--dragging .bar-avmic-scene {
  animation: bar-avmic-drag-wobble .5s ease-in-out infinite !important;
}
.bar-avmic--bounce .bar-avmic-head {
  animation: bar-avmic-bounce .6s ease !important;
}

/* Scene 3D (perspective container) */
.bar-avmic-scene {
  width: 80px;
  height: 120px;
  perspective: 600px;
  transform-style: preserve-3d;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Tête du micro (sphère en haut) ── */
.bar-avmic-head {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  position: relative;
  transform-style: preserve-3d;
  animation: bar-avmic-idle 3s ease-in-out infinite;
  z-index: 2;
}

/* Micro 1 → Doré vintage */
.bar-avmic-head--1 {
  background:
    radial-gradient(ellipse at 30% 25%, #ffd700 0%, #daa520 35%, #b8860b 65%, #7a5c00 100%);
  box-shadow:
    0 4px 20px rgba(255, 215, 0, .45),
    0 0 36px rgba(255, 200, 0, .2),
    inset 0 -8px 16px rgba(0,0,0,.35),
    inset 0 4px 8px rgba(255,240,150,.4);
  border: 2px solid rgba(255,215,0,.45);
}

/* Micro 2 → Chrome argenté */
.bar-avmic-head--2 {
  background:
    radial-gradient(ellipse at 30% 25%, #eee 0%, #c0c0c0 35%, #888 65%, #555 100%);
  box-shadow:
    0 4px 20px rgba(200,200,220,.45),
    0 0 36px rgba(180,180,200,.2),
    inset 0 -8px 16px rgba(0,0,0,.35),
    inset 0 4px 8px rgba(255,255,255,.5);
  border: 2px solid rgba(200,200,200,.5);
}

/* ── Grille (lignes horizontales du micro) ── */
.bar-avmic-grille {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  pointer-events: none;
  z-index: 0;
}
.bar-avmic-grille-line {
  height: 1.5px;
  border-radius: 1px;
}
.bar-avmic-grille--1 .bar-avmic-grille-line {
  background: linear-gradient(90deg, transparent 8%, rgba(139,105,20,.5) 25%, rgba(139,105,20,.7) 50%, rgba(139,105,20,.5) 75%, transparent 92%);
}
.bar-avmic-grille--2 .bar-avmic-grille-line {
  background: linear-gradient(90deg, transparent 8%, rgba(100,100,120,.5) 25%, rgba(100,100,120,.7) 50%, rgba(100,100,120,.5) 75%, transparent 92%);
}

/* ── Visage (yeux + bouche) ── */
.bar-avmic-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 1;
}

.bar-avmic-eye {
  width: 7px;
  height: 7px;
  background: radial-gradient(circle at 35% 35%, #fff 30%, #ddd 60%, #aaa 100%);
  border-radius: 50%;
  position: absolute;
  top: 36%;
  box-shadow: 0 0 6px rgba(255,255,255,.7), inset 0 1px 2px rgba(0,0,0,.3);
  transition: transform .1s ease-out;
}
.bar-avmic-eye--l { left: 28%; }
.bar-avmic-eye--r { right: 28%; }

.bar-avmic-mouth {
  width: 12px;
  height: 3.5px;
  border-radius: 4px;
  position: absolute;
  bottom: 27%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
  transition: all .2s ease;
}
.bar-avatar-mic--1 .bar-avmic-mouth { background: #4a3500; }
.bar-avatar-mic--2 .bar-avmic-mouth { background: #333; }

.bar-avmic-mouth--open {
  height: 8px !important;
  width: 10px !important;
  border-radius: 50% !important;
}

/* ── Collar (jonction tête / manche) ── */
.bar-avmic-collar {
  width: 22px;
  height: 8px;
  border-radius: 0 0 4px 4px;
  position: relative;
  z-index: 1;
  margin-top: -2px;
}
.bar-avmic-collar--1 {
  background: linear-gradient(180deg, #b8860b, #8b6914);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.bar-avmic-collar--2 {
  background: linear-gradient(180deg, #999, #666);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

/* ── Body / Manche du micro ── */
.bar-avmic-body {
  width: 14px;
  height: 40px;
  border-radius: 0 0 7px 7px;
  position: relative;
  z-index: 1;
}
.bar-avmic-body--1 {
  background: linear-gradient(180deg, #8b6914 0%, #5a4210 40%, #3a2a08 100%);
  box-shadow:
    2px 0 4px rgba(0,0,0,.3),
    -2px 0 4px rgba(0,0,0,.3),
    inset 2px 0 4px rgba(255,200,50,.15);
}
.bar-avmic-body--2 {
  background: linear-gradient(180deg, #777 0%, #444 40%, #222 100%);
  box-shadow:
    2px 0 4px rgba(0,0,0,.3),
    -2px 0 4px rgba(0,0,0,.3),
    inset 2px 0 4px rgba(255,255,255,.1);
}

/* ── Glow halo ── */
.bar-avmic-glow {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 82px;
  height: 82px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .5;
  transition: opacity .3s;
  z-index: 0;
}
.bar-avmic-glow--1 {
  background: radial-gradient(circle, rgba(255,215,0,.2) 0%, transparent 70%);
}
.bar-avmic-glow--2 {
  background: radial-gradient(circle, rgba(180,180,220,.2) 0%, transparent 70%);
}
.bar-avatar-mic:hover .bar-avmic-glow { opacity: 1; }

/* ── Anneau orbital ── */
.bar-avmic-ring {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  pointer-events: none;
  animation: bar-avmic-ring-spin 6s linear infinite;
  z-index: 0;
}
.bar-avmic-ring--1 {
  border: 2px solid rgba(255,200,50,.25);
}
.bar-avmic-ring--2 {
  border: 2px solid rgba(180,180,200,.25);
}
.bar-avatar-mic:hover .bar-avmic-ring {
  border-width: 2.5px;
}
.bar-avmic-ring--1:hover { box-shadow: 0 0 10px rgba(255,200,0,.15); }
.bar-avmic-ring--2:hover { box-shadow: 0 0 10px rgba(180,180,220,.15); }

/* ── Label sous l'avatar ── */
.bar-avmic-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.bar-avmic-label--1 {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255,215,0,.5), 0 1px 2px rgba(0,0,0,.8);
}
.bar-avmic-label--2 {
  color: #c0c0c0;
  text-shadow: 0 0 8px rgba(200,200,220,.5), 0 1px 2px rgba(0,0,0,.8);
}

/* ── Animations ── */
@keyframes bar-avmic-idle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.02); }
}

@keyframes bar-avmic-bounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2) rotate(8deg); }
  60% { transform: scale(.9) rotate(-4deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes bar-avmic-ring-spin {
  0% { transform: translateX(-50%) rotateX(65deg) rotateZ(0deg); }
  100% { transform: translateX(-50%) rotateX(65deg) rotateZ(360deg); }
}

@keyframes bar-avmic-drag-wobble {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

@keyframes bar-avmic-glow-pulse {
  0%, 100% { opacity: .5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

/* ═══════════════════════════════════════════════════════════
   BAR — SMOKE CANVAS + FLASH LIGHTS + SPOTLIGHTS
   ═══════════════════════════════════════════════════════════ */

/* Canvas fumée plein écran */
.bar-smoke-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Flash overlay (strobe blanc) */
.bar-flash-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity .05s;
}

/* ── Spots de lumière ── */
.bar-spotlights {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bar-spot {
  position: absolute;
  top: -10%;
  width: 8vw;
  height: 120vh;
  opacity: 0;
  filter: blur(12px);
  transform-origin: top center;
  mix-blend-mode: screen;
}

/* Couleurs & positions des faisceaux */
.bar-spot--1 {
  left: 10%;
  background: linear-gradient(180deg, rgba(139,92,246,.7) 0%, transparent 70%);
  animation: bar-spot-sweep1 4s ease-in-out infinite, bar-spot-flash 3s ease-in-out infinite;
}
.bar-spot--2 {
  left: 30%;
  background: linear-gradient(180deg, rgba(236,72,153,.65) 0%, transparent 70%);
  animation: bar-spot-sweep2 5s ease-in-out infinite, bar-spot-flash 2.5s ease-in-out .5s infinite;
}
.bar-spot--3 {
  left: 50%;
  background: linear-gradient(180deg, rgba(59,130,246,.6) 0%, transparent 70%);
  animation: bar-spot-sweep3 3.5s ease-in-out infinite, bar-spot-flash 4s ease-in-out 1s infinite;
}
.bar-spot--4 {
  left: 70%;
  background: linear-gradient(180deg, rgba(16,185,129,.6) 0%, transparent 70%);
  animation: bar-spot-sweep4 4.5s ease-in-out infinite, bar-spot-flash 3.2s ease-in-out 1.5s infinite;
}
.bar-spot--5 {
  left: 88%;
  background: linear-gradient(180deg, rgba(245,158,11,.6) 0%, transparent 70%);
  animation: bar-spot-sweep5 5.5s ease-in-out infinite, bar-spot-flash 2.8s ease-in-out .8s infinite;
}

/* Sweep (balancement) des spots */
@keyframes bar-spot-sweep1 {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(12deg); }
}
@keyframes bar-spot-sweep2 {
  0%, 100% { transform: rotate(10deg); }
  50% { transform: rotate(-18deg); }
}
@keyframes bar-spot-sweep3 {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(14deg); }
}
@keyframes bar-spot-sweep4 {
  0%, 100% { transform: rotate(12deg); }
  50% { transform: rotate(-10deg); }
}
@keyframes bar-spot-sweep5 {
  0%, 100% { transform: rotate(-14deg); }
  50% { transform: rotate(8deg); }
}

/* Flash (apparition/disparition) du faisceau */
@keyframes bar-spot-flash {
  0%, 100% { opacity: 0; }
  15% { opacity: .85; }
  30% { opacity: .2; }
  45% { opacity: .9; }
  60% { opacity: .1; }
  75% { opacity: .7; }
  85% { opacity: .05; }
}

/* ═══════════════════════════════════════════════════════
   LIVE AVATARS — Barre spectateurs temps réel
   ═══════════════════════════════════════════════════════ */

.live-avatars-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 40px;
  padding: 8px 18px;
  z-index: 9999;
  max-width: 90vw;
  overflow-x: auto;
  scrollbar-width: none;
}
.live-avatars-bar::-webkit-scrollbar { display: none; }

.live-avatars-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #c4b5fd;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  padding-right: 10px;
  border-right: 1px solid rgba(139,92,246,.25);
}
.live-avatars-eye { font-size: 1.1rem; }

.live-avatars-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Chip avatar ── */
.live-avatar-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 30px;
  padding: 4px 12px 4px 4px;
  opacity: 0;
  transform: translateY(20px) scale(.8);
  transition: opacity .4s ease, transform .4s ease;
}
.live-avatar-chip--in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.live-avatar-chip--out {
  opacity: 0;
  transform: translateY(-20px) scale(.7);
  transition: opacity .4s ease, transform .4s ease;
}

.live-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(139,92,246,.3);
}
.live-avatar-initials {
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.live-avatar-name {
  color: #e2d9f3;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Toast notifications ── */
.live-toast-container {
  position: fixed;
  top: 70px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 99999;
  pointer-events: none;
}

.live-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 10px 18px;
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity .4s ease, transform .4s ease;
  border: 1px solid rgba(139,92,246,.3);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.live-toast--join {
  border-left: 3px solid #10b981;
}
.live-toast--leave {
  border-left: 3px solid #ef4444;
}
.live-toast--visible {
  opacity: 1;
  transform: translateX(0);
}
.live-toast--exit {
  opacity: 0;
  transform: translateX(60px);
}
.live-toast-icon {
  font-size: 1.2rem;
}
.live-toast-text {
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   STUDIO – Backing Track intégré dans le Mixer
   ═══════════════════════════════════════════════════════════ */
.mixer-bt {
  position: absolute;
  left: 12px;
  top: 42px;
  bottom: 8px;
  width: 280px;
  z-index: 6;
  background: rgba(8, 10, 20, 0.88);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: width .3s ease, opacity .3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.mixer-bt.collapsed {
  width: 38px;
}
.mixer-bt.collapsed .mixer-bt-body { display: none; }
.mixer-bt.collapsed .mixer-bt-title { display: none; }

.mixer-bt-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.mixer-bt-title {
  font-size: .72rem;
  font-weight: 600;
  color: #d4d0ff;
  letter-spacing: .5px;
  white-space: nowrap;
}
.mixer-bt-toggle {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: .75rem;
  padding: 2px 5px;
  border-radius: 4px;
  transition: background .2s;
  flex-shrink: 0;
}
.mixer-bt-toggle:hover { background: rgba(255,255,255,0.1); }

.mixer-bt-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px 8px 8px;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* Upload compact */
.mixer-bt-upload { flex-shrink: 0; }
.mixer-bt-dropzone {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 7px;
  cursor: pointer;
  font-size: .75rem;
  color: #999;
  transition: border-color .2s, background .2s;
}
.mixer-bt-dropzone.drag-over {
  border-color: #6c5ce7;
  background: rgba(108,92,231,0.1);
}
.mixer-bt-browse {
  color: #a29bfe;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}
.mixer-bt-progress { margin-top: 4px; }
.mixer-bt-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.mixer-bt-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  border-radius: 2px;
  transition: width .2s;
}
.mixer-bt-progress-text {
  font-size: .65rem;
  color: #777;
  text-align: right;
  display: block;
}

/* Transport compact */
.mixer-bt-transport {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.mixer-bt-btn {
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  color: #ccc;
  font-size: .78rem;
  cursor: pointer;
  transition: background .15s;
  line-height: 1;
}
.mixer-bt-btn:hover { background: rgba(255,255,255,0.12); }
.mixer-bt-btn--loop.active {
  border-color: #6c5ce7;
  color: #a29bfe;
  background: rgba(108,92,231,0.15);
}
.mixer-bt-btn--rec {
  border-color: rgba(255,60,60,0.3);
  color: #ff6b6b;
}
.mixer-bt-btn--rec.recording {
  background: rgba(255,60,60,0.2);
  border-color: #ff4444;
  animation: bt-rec-pulse 1s ease-in-out infinite;
}
@keyframes bt-rec-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,60,60,0.3); }
  50% { box-shadow: 0 0 8px 3px rgba(255,60,60,0.2); }
}
.mixer-bt-rec-timer {
  font-size: .72rem;
  font-family: 'Courier New', monospace;
  color: #ff6b6b;
  font-weight: 700;
}

/* Track list compact */
.mixer-bt-tracks {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
}
.mixer-bt-tracks::-webkit-scrollbar { width: 4px; }
.mixer-bt-tracks::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
}
.mixer-bt-empty {
  text-align: center;
  color: #555;
  font-size: .72rem;
  padding: 10px 0;
}

/* Track row compact */
.mixer-bt-track {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
  transition: background .15s;
  flex-shrink: 0;
}
.mixer-bt-track:hover { background: rgba(0,0,0,0.45); }

.mixer-bt-track-color {
  width: 4px;
  height: 22px;
  border-radius: 2px;
  flex-shrink: 0;
}
.mixer-bt-track-info {
  flex: 1;
  min-width: 0;
}
.mixer-bt-track-name {
  font-size: .7rem;
  font-weight: 500;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mixer-bt-track-meta {
  font-size: .6rem;
  color: #666;
}
.mixer-bt-track-vol {
  width: 48px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}
.mixer-bt-track-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a29bfe;
  border: 1.5px solid #6c5ce7;
  cursor: pointer;
}
.mixer-bt-track-btn {
  background: none;
  border: none;
  font-size: .78rem;
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 3px;
  transition: background .12s;
  color: #999;
  line-height: 1;
}
.mixer-bt-track-btn:hover { background: rgba(255,255,255,0.08); }
.mixer-bt-track-btn.playing { color: #55efc4; }
.mixer-bt-track-btn.muted { color: #555; }

/* Downloads */
.mixer-bt-downloads { text-align: center; flex-shrink: 0; }
.mixer-bt-dl {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 600;
  transition: opacity .2s;
}
.mixer-bt-dl:hover { opacity: .85; }

/* Responsive */
@media (max-width: 700px) {
  .mixer-bt {
    width: 220px;
    left: 4px;
    top: 38px;
  }
  .mixer-bt.collapsed { width: 34px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MESSAGERIE CHIFFRÉE
   ══════════════════════════════════════════════════════════════════════════════ */

/* Badge messages (reprend le style notif-badge) */
.msg-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #8b5cf6;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  box-shadow: 0 0 0 2px #0d0b1a;
  animation: notifPulse 2s ease-in-out infinite;
}

/* Conteneur principal : sidebar + chat côte à côte */
.msg-container {
  display: flex;
  height: calc(100vh - 200px);
  min-height: 500px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #6d28d933;
  background: #0a0818;
}

/* Sidebar conversations */
.msg-sidebar {
  width: 340px;
  min-width: 280px;
  border-right: 1px solid #6d28d933;
  display: flex;
  flex-direction: column;
  background: #0d0b1a;
}

.msg-search-bar {
  padding: 16px;
  border-bottom: 1px solid #6d28d933;
  position: relative;
}

.msg-search-bar input {
  width: 100%;
  padding: 10px 14px;
  background: #181336;
  border: 1px solid #6d28d955;
  border-radius: 10px;
  color: #ece7ff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.msg-search-bar input:focus {
  border-color: #8b5cf6;
}

.msg-search-results {
  position: absolute;
  top: 100%;
  left: 16px;
  right: 16px;
  background: #1a1440;
  border-radius: 0 0 10px 10px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.msg-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: #ece7ff;
  transition: background 0.2s;
}

.msg-search-item:hover {
  background: #7c3aed33;
}

.msg-search-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.msg-search-empty {
  padding: 12px;
  text-align: center;
  color: #71717a;
  font-size: 13px;
}

/* Liste des conversations */
.msg-convo-list {
  flex: 1;
  overflow-y: auto;
}

.msg-convo-list::-webkit-scrollbar {
  width: 6px;
}
.msg-convo-list::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 10px;
}

.msg-convo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid #6d28d915;
  transition: background 0.2s;
}

.msg-convo-item:hover {
  background: #151136;
}

.msg-convo-item.active {
  background: #7c3aed22;
  border-left: 3px solid #8b5cf6;
}

.msg-convo-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.msg-convo-info {
  flex: 1;
  min-width: 0;
}

.msg-convo-name {
  display: block;
  font-weight: 600;
  color: #ece7ff;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-convo-preview {
  display: block;
  font-size: 12px;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.msg-convo-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.msg-convo-time {
  font-size: 11px;
  color: #71717a;
}

.msg-convo-unread {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #8b5cf6;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.msg-empty {
  padding: 40px 20px;
  text-align: center;
  color: #71717a;
  font-size: 14px;
}

/* Zone de chat */
.msg-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0a0818;
}

.msg-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #6d28d933;
  background: #0d0b1a;
}

.msg-back-btn {
  display: none;
  background: none;
  border: none;
  color: #c4b5fd;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.msg-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.msg-chat-info {
  flex: 1;
}

.msg-chat-name {
  display: block;
  font-weight: 600;
  color: #ece7ff;
  font-size: 15px;
}

.msg-chat-encrypt {
  display: block;
  font-size: 11px;
  color: #22c55e;
  margin-top: 1px;
}

/* Zone messages */
.msg-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg-messages::-webkit-scrollbar {
  width: 6px;
}
.msg-messages::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 10px;
}

.msg-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #71717a;
  gap: 12px;
  padding: 40px;
}

.msg-welcome h3 {
  color: #c4b5fd;
  font-size: 18px;
  margin: 0;
}

.msg-welcome p {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.5;
}

.msg-welcome-chat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #71717a;
  gap: 8px;
  padding: 40px;
  font-size: 14px;
}

.msg-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #71717a;
  font-size: 14px;
}

/* Bulles de messages */
.msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  position: relative;
  animation: msgFadeIn 0.25s ease;
}

@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-bubble-me {
  align-self: flex-end;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-bubble-other {
  align-self: flex-start;
  background: #1a1440;
  color: #ece7ff;
  border-bottom-left-radius: 4px;
}

.msg-bubble-text {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.msg-bubble-time {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  text-align: right;
  opacity: 0.6;
}

/* Zone d'envoi */
.msg-input-area {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #6d28d933;
  background: #0d0b1a;
}

.msg-input-area input {
  flex: 1;
  padding: 12px 16px;
  background: #181336;
  border: 1px solid #6d28d955;
  border-radius: 24px;
  color: #ece7ff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.msg-input-area input:focus {
  border-color: #8b5cf6;
}

.msg-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.msg-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 16px #7c3aed55;
}

/* ── Responsive Mobile ── */
@media (max-width: 768px) {
  .msg-container {
    height: calc(100vh - 160px);
    flex-direction: column;
    position: relative;
  }

  .msg-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #6d28d933;
  }

  .msg-chat {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
  }

  .msg-chat.msg-chat-active {
    display: flex;
  }

  .msg-back-btn {
    display: block;
  }
}

/* ═══════════════════════════════════════════════════════════════
   GIFT BANK — Magasin de cadeaux, Banque & Système de dons
   ═══════════════════════════════════════════════════════════════ */

/* ── Magasin de cadeaux ── */
.gift-shop {
  background: linear-gradient(135deg, #1a0a2e 0%, #0f0a1a 100%) !important;
  border: 1px solid rgba(139,92,246,0.35) !important;
  padding: 20px !important;
}
.gift-shop h3 { color: #e2d9f3; margin: 0 0 4px; font-size: 1.1rem; }

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.gift-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(139,92,246,0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  color: #e2d9f3;
  font-family: inherit;
}
.gift-item:hover {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.5);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139,92,246,0.2);
}
.gift-item-selected {
  background: rgba(139,92,246,0.25) !important;
  border-color: #a855f7 !important;
  box-shadow: 0 0 16px rgba(168,85,247,0.4) !important;
  transform: scale(1.05) !important;
}
.gift-item-legendary {
  border-color: rgba(251,191,36,0.5) !important;
  background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(245,158,11,0.05)) !important;
}
.gift-item-legendary:hover {
  border-color: rgba(251,191,36,0.8) !important;
  box-shadow: 0 6px 24px rgba(251,191,36,0.3) !important;
}
.gift-emoji { font-size: 1.8rem; line-height: 1; }
.gold-guitar-icon { display: flex; align-items: center; justify-content: center; }
.gold-guitar-icon img { width: 48px; height: 48px; object-fit: contain; border-radius: 0; filter: drop-shadow(0 0 6px rgba(255,215,0,0.6)) drop-shadow(0 0 12px rgba(255,183,0,0.3)); animation: goldPulse 2s ease-in-out infinite; }
.gold-guitar-icon svg { filter: drop-shadow(0 0 6px rgba(255,215,0,0.6)) drop-shadow(0 0 12px rgba(255,183,0,0.3)); animation: goldPulse 2s ease-in-out infinite; }
@keyframes goldPulse { 0%,100% { filter: drop-shadow(0 0 6px rgba(255,215,0,0.6)) drop-shadow(0 0 12px rgba(255,183,0,0.3)); } 50% { filter: drop-shadow(0 0 10px rgba(255,215,0,0.9)) drop-shadow(0 0 20px rgba(255,183,0,0.5)); } }
.gift-item-bg { position: relative; overflow: hidden; min-height: 100px; justify-content: flex-end; }
.gift-item-bg .gift-name, .gift-item-bg .gift-price { position: relative; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.7); font-weight: 700; }
.gift-item-bg .gift-emoji { display: none; }
.gift-item-bg[data-gift="goldguitar"] { background: url('/images/gold-guitar.png') center/cover no-repeat !important; }
.gift-item-bg[data-gift="magicsheet"] { background: url('/images/magicsheet.png') center/cover no-repeat !important; }
.gift-item-bg[data-gift="lightpiano"] { background: url('/images/lightpiano.png') center/cover no-repeat !important; }
.gift-item-bg[data-gift="goldmic"] { background: url('/images/goldmic.png') center/cover no-repeat !important; }
.gift-item-bg[data-gift="studiophones"] { background: url('/images/studiophones.png') center/cover no-repeat !important; }
.gift-name { font-size: 0.75rem; text-align: center; color: #cbd5e1; line-height: 1.2; }
.gift-price {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251,191,36,0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── Badge solde sur la boutique ── */
#giftShopBalanceBadge {
  float: right;
  background: linear-gradient(135deg, #1e3a5f, #0f2642);
  border: 1px solid rgba(96,165,250,0.4);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
}

/* ── Panneau Banque ── */
.gift-bank-card {
  background: linear-gradient(135deg, #0a1628 0%, #0f0a1a 100%) !important;
  border: 1px solid rgba(96,165,250,0.3) !important;
  padding: 20px !important;
}
.gift-bank-card h3 { color: #93c5fd; margin: 0 0 16px; font-size: 1.1rem; }

.gift-bank-balance-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: 16px;
  margin-bottom: 16px;
}
.gift-bank-balance-icon { font-size: 2rem; }
.gift-bank-balance-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251,191,36,0.3);
}
.gift-bank-balance-label { font-size: 0.8rem; color: #9ca3af; }

.gift-bank-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.gift-bank-stat {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.gift-bank-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #e2d9f3;
}
.gift-bank-stat-label {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 2px;
}

.gift-bank-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gift-bank-btn {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(96,165,250,0.3);
  background: rgba(96,165,250,0.1);
  color: #93c5fd;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-width: 120px;
  text-align: center;
}
.gift-bank-btn:hover {
  background: rgba(96,165,250,0.25);
  border-color: rgba(96,165,250,0.6);
}
.gift-bank-btn-gold {
  border-color: rgba(251,191,36,0.4) !important;
  background: rgba(251,191,36,0.1) !important;
  color: #fbbf24 !important;
}
.gift-bank-btn-gold:hover {
  background: rgba(251,191,36,0.2) !important;
  border-color: rgba(251,191,36,0.6) !important;
}

/* ── Panneau d'envoi de cadeau ── */
#giftSendPanel {
  margin-top: 12px;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 14px;
  padding: 16px;
}
.gift-send-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.gift-send-emoji { font-size: 2.2rem; }
.gift-send-name { font-size: 1rem; font-weight: 700; }
.gift-send-price { font-size: 0.85rem; color: #fbbf24; font-weight: 700; }
.gift-send-subtitle { color: #9ca3af; font-size: 0.85rem; margin: 0 0 10px; }
.gift-send-empty {
  color: #6b7280;
  font-size: 0.85rem;
  text-align: center;
  padding: 14px;
  background: rgba(239,68,68,0.06);
  border-radius: 10px;
  border: 1px solid rgba(239,68,68,0.15);
  line-height: 1.5;
}

.gift-send-streamers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.gift-send-streamer-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.25);
  color: #e2d9f3;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.gift-send-streamer-btn:hover {
  background: rgba(96,165,250,0.2);
  border-color: rgba(96,165,250,0.5);
  transform: translateX(4px);
}
.gift-send-live-dot { font-size: 0.65rem; animation: kf-blink 1.2s ease-in-out infinite; }
.gift-send-screen-label { margin-left: auto; font-size: 0.75rem; color: #6b7280; }

.gift-send-cancel {
  width: 100%;
  padding: 8px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  font-family: inherit;
}
.gift-send-cancel:hover { background: rgba(239,68,68,0.2); }

/* ── Top donateurs ── */
.gift-top-donors-card {
  background: linear-gradient(135deg, #1a1005 0%, #0f0a1a 100%) !important;
  border: 1px solid rgba(251,191,36,0.3) !important;
  padding: 16px !important;
}
.gift-top-donors-card h3 { color: #fbbf24; margin: 0 0 12px; font-size: 1rem; }

.top-donor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 4px;
  transition: background 0.15s;
}
.top-donor-row:hover { background: rgba(251,191,36,0.08); }
.top-donor-first {
  background: rgba(251,191,36,0.1) !important;
  border: 1px solid rgba(251,191,36,0.25);
}
.top-donor-rank { font-size: 1.1rem; width: 28px; text-align: center; }
.top-donor-name { flex: 1; color: #e2d9f3; font-size: 0.85rem; font-weight: 600; }
.top-donor-total { color: #fbbf24; font-weight: 800; font-size: 0.9rem; }
.top-donor-count { color: #6b7280; font-size: 0.72rem; }

/* ── Historique ── */
.gift-history-card {
  background: linear-gradient(135deg, #0a1020 0%, #0f0a1a 100%) !important;
  border: 1px solid rgba(139,92,246,0.2) !important;
  padding: 16px !important;
}
.gift-history-card h3 { color: #a78bfa; margin: 0 0 12px; font-size: 1rem; }

.gift-history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 2px;
}
.gift-history-sent { border-left: 3px solid #f87171; }
.gift-history-received { border-left: 3px solid #4ade80; }
.gift-history-deposit { border-left: 3px solid #60a5fa; }
.gift-history-purchase { border-left: 3px solid #fbbf24; }
.gift-history-time { margin-left: auto; color: #4b5563; font-size: 0.72rem; }

/* ═══════════════════════════════════════════
   PANIER D'ACHAT
   ═══════════════════════════════════════════ */
.gift-cart-panel {
  margin-top: 16px;
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 14px;
  padding: 16px;
  animation: fadeIn 0.3s ease;
}
.gift-cart-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.gift-cart-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  font-size: 0.85rem;
}
.gift-cart-emoji { font-size: 1.2rem; }
.gift-cart-name { flex: 1; font-weight: 600; }
.gift-cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gift-cart-qty-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ece7ff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.gift-cart-qty-btn:hover { background: rgba(251,191,36,0.2); }
.gift-cart-qty {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  color: #fbbf24;
}
.gift-cart-price {
  color: #fbbf24;
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}
.gift-cart-footer {
  border-top: 1px solid rgba(251,191,36,0.15);
  padding-top: 12px;
}
.gift-cart-total {
  text-align: center;
  font-size: 0.95rem;
  color: #ece7ff;
  margin-bottom: 10px;
}
.gift-cart-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.gift-cart-pay {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a0a2e;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gift-cart-pay:hover {
  transform: scale(1.04);
  box-shadow: 0 0 16px rgba(251,191,36,0.4);
}
.gift-cart-clear {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.25);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.gift-cart-clear:hover { background: rgba(239,68,68,0.25); }

/* ═══════════════════════════════════════════
   PORTEFEUILLE
   ═══════════════════════════════════════════ */
.gift-wallet-card {
  background: linear-gradient(135deg, #0d1a2e 0%, #0f0a1a 100%) !important;
  border: 1px solid rgba(167,139,250,0.3) !important;
  padding: 18px !important;
}
.gift-wallet-card h3 {
  color: #c4b5fd;
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.gift-wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.gift-wallet-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  position: relative;
}
.gift-wallet-item:hover {
  transform: translateY(-3px);
  background: rgba(167,139,250,0.1);
  box-shadow: 0 4px 16px rgba(139,92,246,0.2);
}
.gift-wallet-emoji { font-size: 1.6rem; }
.gift-wallet-name { font-size: 0.72rem; font-weight: 600; text-align: center; }
.gift-wallet-qty {
  background: rgba(251,191,36,0.2);
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 8px;
}

/* ── Animation de cadeau — overlay ── */
.gift-anim-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  z-index: 100000;
  background: rgba(15,10,26,0.95);
  border-radius: 20px;
  padding: 24px 36px;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(139,92,246,0.5);
  transition: all 0.5s cubic-bezier(.175,.885,.32,1.275);
}
.gift-anim-show {
  opacity: 1;
  transform: translate(-50%,-50%) scale(1);
}
.gift-anim-hide {
  opacity: 0;
  transform: translate(-50%,-50%) scale(0.8) translateY(-30px);
}
.gift-anim-tier-legendary {
  border-color: rgba(251,191,36,0.8) !important;
  box-shadow: 0 0 60px rgba(251,191,36,0.3), 0 0 120px rgba(251,191,36,0.1) !important;
}
.gift-anim-tier-epic {
  border-color: rgba(192,132,252,0.7) !important;
  box-shadow: 0 0 40px rgba(168,85,247,0.25) !important;
}
.gift-anim-tier-rare {
  border-color: rgba(96,165,250,0.6) !important;
  box-shadow: 0 0 30px rgba(59,130,246,0.2) !important;
}
.gift-anim-emoji { font-size: 3.5rem; margin-bottom: 8px; animation: gift-bounce 0.6s ease; }
@keyframes gift-bounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.gift-anim-label { font-size: 0.95rem; color: #cbd5e1; margin-bottom: 6px; }
.gift-anim-from { color: #60a5fa; font-weight: 700; }
.gift-anim-to { color: #4ade80; font-weight: 700; }
.gift-anim-name { font-weight: 800; }
.gift-anim-price { font-size: 1.2rem; font-weight: 900; color: #fbbf24; }

/* ── Notification 3D univers ── */
.gift-3d-notif {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99998;
  pointer-events: none;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(.175,.885,.32,1.275);
}
.gift-3d-show { transform: translateX(0); }
.gift-3d-hide { transform: translateX(120%); }

.gift-3d-notif-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15,10,26,0.92);
  border: 1px solid rgba(139,92,246,0.5);
  border-radius: 14px;
  padding: 12px 18px;
  backdrop-filter: blur(8px);
  max-width: 320px;
}
.gift-3d-tier-legendary .gift-3d-notif-inner,
.gift-3d-notif-inner.gift-3d-tier-legendary {
  border-color: rgba(251,191,36,0.6);
  box-shadow: 0 0 24px rgba(251,191,36,0.2);
}
.gift-3d-tier-epic .gift-3d-notif-inner,
.gift-3d-notif-inner.gift-3d-tier-epic {
  border-color: rgba(192,132,252,0.6);
  box-shadow: 0 0 20px rgba(168,85,247,0.2);
}
.gift-3d-emoji { font-size: 1.8rem; }
.gift-3d-text { font-size: 0.82rem; color: #cbd5e1; line-height: 1.4; }

/* ── Notification banque toast ── */
.gift-bank-notif {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15,10,26,0.95);
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: 12px;
  padding: 12px 24px;
  color: #e2d9f3;
  font-size: 0.9rem;
  z-index: 100001;
  backdrop-filter: blur(8px);
  transition: transform 0.35s cubic-bezier(.175,.885,.32,1.275), opacity 0.35s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.gift-bank-notif-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.gift-bank-notif-hide {
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .gift-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
  .gift-item { padding: 8px 4px; }
  .gift-emoji { font-size: 1.4rem; }
  .gift-bank-balance-amount { font-size: 1.6rem; }
  .gift-anim-box { padding: 16px 20px; }
  .gift-anim-emoji { font-size: 2.5rem; }
  .gift-3d-notif { right: 8px; top: 8px; }
  .gift-3d-notif-inner { max-width: 260px; padding: 8px 12px; }
}

/* ═══ LANG TOGGLE BTN (register / terms pages) ═══ */
.lang-toggle-btn {
  background: #6d28d933;
  color: #c4b5fd;
  border: 1px solid #6d28d955;
  border-radius: 8px;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.lang-toggle-btn:hover { background: #6d28d966; }

/* ═══ SITE FOOTER COPYRIGHT ═══ */
.site-footer {
  width: 100%;
  padding: 18px 0;
  background: #07060f;
  border-top: 1px solid #6d28d933;
  text-align: center;
  margin-top: 40px;
}
.site-footer-inner p {
  color: #9e8ccc;
  font-size: 0.85rem;
  margin: 0;
  letter-spacing: 0.3px;
}

/* ═══ MOBILE: Composer pleine largeur (cacher avatar) ═══ */
@media (max-width: 768px) {
  .composer-header > #composerAvatarImg,
  .composer-header > .composer-avatar {
    display: none !important;
  }
  .composer-header {
    gap: 0 !important;
  }
  #postForm {
    width: 100% !important;
  }
  .composer-editor {
    width: 100% !important;
    min-height: 60px;
  }
}

/* ══════════════════════════════════════
   LIKECRUSH — match-3 game
   ══════════════════════════════════════ */

/* ----- card ----- */
.likecrush-card {
  background: linear-gradient(135deg, #1a1025 0%, #2d1b47 50%, #1a1025 100%) !important;
  border: 1px solid rgba(197,125,255,.25) !important;
}
.likecrush-card h3 { color: #c77dff; }
.likecrush-card p  { color: #bbb;    }
.likecrush-card button#likeCrushStartBtn {
  background: linear-gradient(135deg,#c77dff,#ff4d6d);
  color: #fff; border: none; border-radius: 10px;
  padding: 10px 28px; font-size: 1.05rem;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.likecrush-card button#likeCrushStartBtn:hover {
  transform: scale(1.05); box-shadow: 0 0 18px rgba(199,125,255,.5);
}

/* ----- panel (fullscreen overlay) ----- */
.lc-panel {
  position: fixed; inset: 0; z-index: 10000;
  background: #0d0d1a url('/img/games/likecrush-bg.jpg') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lc-panel::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(5,5,12,.55);
  pointer-events: none;
}
.lc-screen {
  width: 100%; max-width: 520px; padding: 24px;
  display: flex; flex-direction: column; align-items: center;
  color: #e0e0e0; position: relative; z-index: 1;
}

/* ----- close button ----- */
.lc-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: #aaa; font-size: 1.6rem;
  cursor: pointer; z-index: 2; line-height: 1;
}
.lc-close:hover { color: #fff; }

/* ----- menu screen ----- */
.lc-menu-header { text-align: center; margin-bottom: 18px; }
.lc-logo { font-size: 3rem; margin-bottom: 6px; }
.lc-menu-header h2 {
  font-size: 2rem; letter-spacing: 4px;
  background: linear-gradient(135deg,#c77dff,#ff4d6d);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin: 0;
}
.lc-sub { color: #999; font-size: .9rem; margin: 6px 0 0; }
.lc-rules {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 22px; font-size: .88rem; color: #bbb;
}
.lc-rules > div {
  background: rgba(255,255,255,.04); border-radius: 8px; padding: 8px 12px;
}
.lc-primary {
  background: linear-gradient(135deg,#c77dff,#ff4d6d);
  color: #fff; border: none; border-radius: 12px;
  padding: 14px 40px; font-size: 1.15rem; cursor: pointer;
  font-weight: 600; transition: transform .15s, box-shadow .15s;
}
.lc-primary:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(199,125,255,.45); }
.lc-secondary {
  background: rgba(255,255,255,.08); color: #ccc; border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 10px 28px; font-size: 1rem; cursor: pointer;
  transition: background .15s;
}
.lc-secondary:hover { background: rgba(255,255,255,.14); color: #fff; }
.lc-save-info {
  font-size: .85rem; color: #c77dff; margin: 6px 0 2px; text-align: center;
}
.lc-reset-btn { font-size: .9rem; padding: 8px 20px; margin-top: 4px; }

/* ----- HUD ----- */
.lc-hud {
  display: flex; gap: 16px; justify-content: center;
  margin-bottom: 14px; flex-wrap: wrap;
}
.lc-hud-item {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 16px;
  min-width: 70px;
}
.lc-hud-label { font-size: .72rem; text-transform: uppercase; color: #888; }
.lc-hud-value { font-size: 1.3rem; font-weight: 700; color: #fff; }
.lc-combo { color: #ff4d6d !important; }
.lc-sound-btn {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: .82rem;
  cursor: pointer;
}
.lc-sound-btn:hover { background: rgba(255,255,255,.16); }

/* ----- grid ----- */
.lc-grid-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.lc-grid {
  display: inline-grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  background: rgba(100,180,255,.35);
  border-radius: 12px;
  padding: 6px;
  max-width: 100%;
  width: 100%;
  max-width: 440px;
}
.lc-cell {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  cursor: pointer; user-select: none;
  transition: transform .12s;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(100,180,255,.6);
  box-sizing: border-box;
  box-shadow: 0 0 7px rgba(0,0,0,.55);
  animation: lcPulseGlow 1.4s ease-in-out infinite;
  will-change: box-shadow, filter;
  --pulse-main: rgba(77,150,255,.75);
  --pulse-soft: rgba(77,150,255,.25);
}
.lc-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.32), rgba(255,255,255,0) 55%);
  mix-blend-mode: screen;
  animation: lcPulseHalo 1.4s ease-in-out infinite;
}
.lc-cell:nth-child(6n + 1), .lc-cell:nth-child(6n + 1)::after { animation-delay: 0s; }
.lc-cell:nth-child(6n + 2), .lc-cell:nth-child(6n + 2)::after { animation-delay: .2s; }
.lc-cell:nth-child(6n + 3), .lc-cell:nth-child(6n + 3)::after { animation-delay: .4s; }
.lc-cell:nth-child(6n + 4), .lc-cell:nth-child(6n + 4)::after { animation-delay: .6s; }
.lc-cell:nth-child(6n + 5), .lc-cell:nth-child(6n + 5)::after { animation-delay: .8s; }
.lc-cell:nth-child(6n + 6), .lc-cell:nth-child(6n + 6)::after { animation-delay: 1s; }
@keyframes lcPulseGlow {
  0%   { box-shadow: 0 0 8px var(--pulse-main), inset 0 0 5px var(--pulse-soft); filter: saturate(1.05) brightness(1.02); }
  50%  { box-shadow: 0 0 16px var(--pulse-main), inset 0 0 9px var(--pulse-soft); filter: saturate(1.28) brightness(1.14); }
  100% { box-shadow: 0 0 8px var(--pulse-main), inset 0 0 5px var(--pulse-soft); filter: saturate(1.05) brightness(1.02); }
}
@keyframes lcPulseHalo {
  0%, 100% { opacity: .22; transform: scale(1); }
  50% { opacity: .75; transform: scale(1.07); }
}
.lc-cell:hover { transform: scale(1.08); }
.lc-cell.lc-selected {
  box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(199,125,255,.85);
  transform: scale(1.1);
  animation: lcPulseGlow 1.1s ease-in-out infinite;
}
.lc-cell.lc-selected::after {
  animation: lcPulseHalo 1.1s ease-in-out infinite;
  opacity: .5;
}

.lc-cell.lc-pulse-banane {
  --pulse-main: rgba(255,217,61,.9);
  --pulse-soft: rgba(255,217,61,.3);
}
.lc-cell.lc-pulse-piano {
  --pulse-main: rgba(107,203,119,.9);
  --pulse-soft: rgba(107,203,119,.3);
}
.lc-cell.lc-pulse-guitare {
  --pulse-main: rgba(255,77,109,.9);
  --pulse-soft: rgba(255,77,109,.3);
}
.lc-cell.lc-pulse-micro {
  --pulse-main: rgba(199,125,255,.9);
  --pulse-soft: rgba(199,125,255,.3);
}
.lc-cell.lc-pulse-cerveau {
  --pulse-main: rgba(255,105,180,.9);
  --pulse-soft: rgba(255,105,180,.3);
}
.lc-cell.lc-pulse-trompette {
  --pulse-main: rgba(77,150,255,.9);
  --pulse-soft: rgba(77,150,255,.3);
}

/* ----- cell drop animation ----- */
@keyframes lcDrop {
  from { transform: translateY(-80px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.lc-drop { animation: lcDrop .3s ease-out; }

/* ----- explode animation ----- */
@keyframes lcExplode {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.35); opacity: .6; }
  100% { transform: scale(0);   opacity: 0; }
}
.lc-explode { animation: lcExplode .35s ease-in forwards; }

/* ----- particles ----- */
.lc-particle {
  position: absolute; width: 6px; height: 6px;
  border-radius: 50%; pointer-events: none;
  animation: lcParticle .55s ease-out forwards;
}
@keyframes lcParticle {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(.3); }
}

/* ----- level toast ----- */
.lc-level-toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  background: linear-gradient(135deg,#c77dff,#ff4d6d);
  color: #fff; font-size: 1.6rem; font-weight: 700;
  padding: 14px 32px; border-radius: 14px;
  z-index: 10010; pointer-events: none;
  animation: lcToastPop .8s ease forwards;
}
@keyframes lcToastPop {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  30%  { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
  60%  { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(.8); opacity: 0; }
}

/* ----- results screen ----- */
.lc-results-title { font-size: 1.6rem; margin-bottom: 18px; }
.lc-results-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 22px; width: 100%; max-width: 320px;
}
.lc-stat {
  background: rgba(255,255,255,.05); border-radius: 10px;
  padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.lc-stat strong { font-size: .8rem; text-transform: uppercase; color: #999; }
.lc-stat span   { font-size: 1.5rem; font-weight: 700; color: #fff; }
.lc-result-actions { display: flex; gap: 12px; }

/* ----- mobile ----- */
@media (max-width: 520px) {
  .lc-panel { align-items: flex-start; padding-top: 10px; }
  .lc-grid { width: 100%; max-width: 100%; gap: 3px; padding: 5px; border-radius: 10px; }
  .lc-cell { width: auto; height: auto; aspect-ratio: 1; border-radius: 6px; font-size: 0; }
  .lc-hud { gap: 6px; flex-wrap: wrap; justify-content: center; }
  .lc-hud-item { padding: 6px 8px; min-width: 50px; }
  .lc-hud-value { font-size: 1rem; }
  .lc-hud-label { font-size: .65rem; }
  .lc-rules { grid-template-columns: 1fr; }
  .lc-screen { padding: 12px 8px; max-width: 100vw; }
  .lc-grid-wrap { width: 100%; overflow: hidden; }
  .lc-menu-header h2 { font-size: 1.4rem; }
  .lc-primary { padding: 12px 24px; font-size: .95rem; }
  .lc-close { top: 8px; right: 8px; font-size: 1.4rem; }
  .lc-result-actions { flex-direction: column; width: 100%; }
  .lc-result-actions button { width: 100%; }
}
@media (max-width: 380px) {
  .lc-grid { gap: 2px; padding: 3px; }
  .lc-cell { border-width: 1px; }
  .lc-hud-item { padding: 4px 6px; min-width: 44px; }
  .lc-hud-value { font-size: .9rem; }
}

/* ══════════════════════════════════════
   LIKELOGIC — flow puzzle game
   ══════════════════════════════════════ */

/* ----- card ----- */
.likelogic-card {
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%) !important;
  border: 1px solid rgba(0,245,212,.25) !important;
}
.likelogic-card h3 { color: #00f5d4; }
.likelogic-card p  { color: #bbb; }
.likelogic-card button#likeLogicStartBtn {
  background: linear-gradient(135deg,#00f5d4,#4d96ff);
  color: #020617; border: none; border-radius: 10px;
  padding: 10px 28px; font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.likelogic-card button#likeLogicStartBtn:hover {
  transform: scale(1.05); box-shadow: 0 0 18px rgba(0,245,212,.5);
}

/* ----- panel (fullscreen overlay) ----- */
.ll-panel {
  position: fixed; inset: 0; z-index: 10000;
  background: #020617 url('/img/games/likelogic-bg.jpg') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  overflow: auto;
}
.ll-panel::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(2,6,23,.62);
  pointer-events: none;
}
.ll-screen {
  width: 100%; max-width: 520px; padding: 24px;
  display: flex; flex-direction: column; align-items: center;
  color: #e0e0e0; position: relative; z-index: 1;
}

/* ----- close button ----- */
.ll-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: #aaa; font-size: 1.6rem;
  cursor: pointer; z-index: 2; line-height: 1;
}
.ll-close:hover { color: #fff; }

/* ----- menu screen ----- */
.ll-menu-header { text-align: center; margin-bottom: 18px; }
.ll-logo { font-size: 3rem; margin-bottom: 6px; }
.ll-menu-header h2 {
  font-size: 2rem; letter-spacing: 4px;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  text-shadow: 0 2px 14px rgba(0,0,0,.8), 0 0 10px rgba(255,255,255,.35);
  margin: 0;
}
.ll-sub { color: #ffffff; font-size: .95rem; margin: 6px 0 0; text-shadow: 0 2px 10px rgba(0,0,0,.85); }
.ll-rules {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 22px; font-size: .92rem; color: #ffffff;
}
.ll-rules > div {
  background: rgba(0,0,0,.38); border-radius: 8px; padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.14);
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.ll-primary {
  background: linear-gradient(135deg,#00f5d4,#4d96ff);
  color: #020617; border: none; border-radius: 12px;
  padding: 14px 40px; font-size: 1.15rem; cursor: pointer;
  font-weight: 700; transition: transform .15s, box-shadow .15s;
}
.ll-primary:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(0,245,212,.45); }
.ll-secondary {
  background: rgba(255,255,255,.08); color: #ccc; border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 10px 28px; font-size: 1rem; cursor: pointer;
  transition: background .15s;
}
.ll-secondary:hover { background: rgba(255,255,255,.14); color: #fff; }
.ll-save-info {
  font-size: .9rem; color: #ffffff; margin: 6px 0 2px; text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.85);
}
.ll-reset-btn { font-size: .9rem; padding: 8px 20px; margin-top: 4px; }

/* ----- HUD ----- */
.ll-hud {
  display: flex; gap: 16px; justify-content: center;
  margin-bottom: 14px; flex-wrap: wrap;
}
.ll-hud-item {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 16px;
  min-width: 70px;
}
.ll-hud-label { font-size: .72rem; text-transform: uppercase; color: #888; }
.ll-hud-value { font-size: 1.3rem; font-weight: 700; color: #fff; }
.ll-pairs { color: #00f5d4 !important; }

/* ----- grid ----- */
.ll-grid-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.ll-grid {
  display: inline-grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  background: rgba(255,255,255,.02);
  border-radius: 12px;
  padding: 6px;
}
.ll-cell {
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  cursor: pointer; user-select: none;
  background: #78b8ff;
  transition: background .12s, box-shadow .12s;
  position: relative;
  box-sizing: border-box;
}
.ll-cell:hover { background: #91c6ff; }
.ll-cell.ll-endpoint {
  border: 2px solid rgba(255,255,255,.35);
  z-index: 1;
  background-size: cover;
  background-position: center;
}
.ll-cell.ll-obstacle {
  background: #000 !important;
  cursor: default;
  border-radius: 4px;
}
.ll-cell.ll-glow {
  transition: background .08s;
}
.ll-cell.ll-connected {
  opacity: 1 !important;
  border: 1px solid rgba(255,255,255,.2);
}
.ll-cell.ll-endpoint.ll-connected {
  border: 2px solid rgba(255,255,255,.6);
  filter: brightness(1.2);
}
.ll-cell.ll-drawing {
  animation: llPulse .6s ease infinite;
}
@keyframes llPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.08); }
}

/* ----- toast ----- */
.ll-toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  background: linear-gradient(135deg,#00f5d4,#4d96ff);
  color: #020617; font-size: 1.4rem; font-weight: 700;
  padding: 14px 32px; border-radius: 14px;
  z-index: 10010; pointer-events: none;
  animation: llToastPop .8s ease forwards;
}
@keyframes llToastPop {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  30%  { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
  60%  { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(.8); opacity: 0; }
}

/* ----- results screen ----- */
.ll-results-title { font-size: 1.6rem; margin-bottom: 18px; }
.ll-results-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 22px; width: 100%; max-width: 320px;
}
.ll-stat {
  background: rgba(255,255,255,.05); border-radius: 10px;
  padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.ll-stat strong { font-size: .8rem; text-transform: uppercase; color: #999; }
.ll-stat span   { font-size: 1.5rem; font-weight: 700; color: #fff; }
.ll-result-actions { display: flex; gap: 12px; }

/* ----- mobile ----- */
@media (max-width: 520px) {
  .ll-cell { width: 38px; height: 38px; border-radius: 8px; }
  .ll-grid { gap: 3px; padding: 4px; border-radius: 10px; }
  .ll-hud { gap: 8px; }
  .ll-hud-item { padding: 6px 10px; min-width: 56px; }
  .ll-hud-value { font-size: 1.1rem; }
  .ll-rules { grid-template-columns: 1fr; }
  .ll-screen { padding: 16px 10px; }
}
@media (max-width: 380px) {
  .ll-cell { width: 32px; height: 32px; }
}

/* ══════════════════════════════════════
   LIKEBRAIN — matchstick puzzle game
   ══════════════════════════════════════ */

/* ----- card ----- */
.likebrain-card {
  background: linear-gradient(135deg, #1a0800 0%, #3d1500 50%, #1a0800 100%) !important;
  border: 1px solid rgba(255,140,50,.25) !important;
}
.likebrain-card h3 { color: #ff8c32; }
.likebrain-card p  { color: #bbb; }
.likebrain-card button#likeBrainStartBtn {
  background: linear-gradient(135deg,#ff8c32,#ff4d4d);
  color: #fff; border: none; border-radius: 10px;
  padding: 10px 28px; font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.likebrain-card button#likeBrainStartBtn:hover {
  transform: scale(1.05); box-shadow: 0 0 18px rgba(255,140,50,.5);
}

/* ----- panel (fullscreen overlay) ----- */
.lb-panel {
  position: fixed; inset: 0; z-index: 10000;
  background: #1a0800 url('/img/games/likebrain-bg.jpg') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  overflow: auto;
}
.lb-panel::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,100,20,.08) 0%, rgba(0,0,0,.5) 100%);
  pointer-events: none;
}
.lb-screen {
  width: 100%; max-width: 520px; padding: 24px;
  display: flex; flex-direction: column; align-items: center;
  color: #e0e0e0; position: relative; z-index: 1;
}

/* ----- close button ----- */
.lb-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: #aaa; font-size: 1.6rem;
  cursor: pointer; z-index: 2; line-height: 1;
}
.lb-close:hover { color: #fff; }

/* ----- menu screen ----- */
.lb-menu-header { text-align: center; margin-bottom: 18px; }
.lb-logo { font-size: 3rem; margin-bottom: 6px; }
.lb-menu-header h2 {
  font-size: 2rem; letter-spacing: 4px;
  color: #ff8c32;
  text-shadow: 0 2px 14px rgba(0,0,0,.8), 0 0 10px rgba(255,140,50,.4);
  margin: 0;
}
.lb-sub { color: #ddd; font-size: .95rem; margin: 6px 0 0; text-shadow: 0 2px 10px rgba(0,0,0,.85); }
.lb-rules {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 22px; font-size: .92rem; color: #ffffff;
}
.lb-rules > div {
  background: rgba(0,0,0,.38); border-radius: 8px; padding: 8px 12px;
  border: 1px solid rgba(255,140,50,.2);
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.lb-primary {
  background: linear-gradient(135deg,#ff8c32,#ff4d4d);
  color: #fff; border: none; border-radius: 12px;
  padding: 14px 40px; font-size: 1.15rem; cursor: pointer;
  font-weight: 700; transition: transform .15s, box-shadow .15s;
}
.lb-primary:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,140,50,.45); }
.lb-secondary {
  background: rgba(255,255,255,.08); color: #ccc; border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 10px 28px; font-size: 1rem; cursor: pointer;
  transition: background .15s;
}
.lb-secondary:hover { background: rgba(255,255,255,.14); color: #fff; }
.lb-save-info {
  font-size: .9rem; color: #ddd; margin: 6px 0 2px; text-align: center;
}

/* ----- HUD ----- */
.lb-hud {
  display: flex; gap: 16px; justify-content: center;
  margin-bottom: 14px; flex-wrap: wrap;
}
.lb-hud-item {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 16px;
  min-width: 70px;
}
.lb-hud-label { font-size: .72rem; text-transform: uppercase; color: #888; }
.lb-hud-value { font-size: 1.3rem; font-weight: 700; color: #fff; }

/* ----- level info ----- */
.lb-level-info {
  text-align: center; margin-bottom: 12px;
  background: rgba(0,0,0,.65); border-radius: 10px; padding: 8px 14px;
}
.lb-level-info h3 {
  font-size: 1.2rem; color: #ff8c32; margin: 0 0 4px;
}
.lb-level-info p {
  font-size: .9rem; color: #aaa; margin: 0;
}

/* ----- canvas ----- */
.lb-canvas-wrap {
  display: flex; justify-content: center; margin-bottom: 14px;
  position: relative;
}
#lbCanvas {
  border-radius: 12px;
  background: #0d0d1a;
  touch-action: none;
}

/* ----- game actions ----- */
.lb-game-actions {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.lb-validate {
  background: linear-gradient(135deg,#22c55e,#16a34a);
  color: #fff; border: none; border-radius: 12px;
  padding: 14px 40px; font-size: 1.15rem; cursor: pointer;
  font-weight: 700; transition: transform .15s, box-shadow .15s;
}
.lb-validate:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(34,197,94,.45); }

/* ----- toast ----- */
.lb-toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  background: linear-gradient(135deg,#ff8c32,#ff4d4d);
  color: #fff; font-size: 1.4rem; font-weight: 700;
  padding: 14px 32px; border-radius: 14px;
  z-index: 10010; pointer-events: none;
  animation: lbToastPop .8s ease forwards;
}
@keyframes lbToastPop {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  30%  { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
  60%  { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(.8); opacity: 0; }
}

/* ----- results screen ----- */
.lb-results-title { font-size: 1.6rem; margin-bottom: 18px; color: #ff8c32; }
.lb-results-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 22px; width: 100%; max-width: 320px;
}
.lb-stat {
  background: rgba(255,255,255,.05); border-radius: 10px;
  padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.lb-stat strong { font-size: .8rem; text-transform: uppercase; color: #999; }
.lb-stat span   { font-size: 1.5rem; font-weight: 700; color: #fff; }
.lb-result-actions { display: flex; gap: 12px; }

/* category selector */
.lb-category-select { display: flex; gap: 8px; margin-bottom: 16px; justify-content: center; }
.lb-cat-btn {
  padding: 10px 20px; border: 2px solid rgba(255,255,255,.15); border-radius: 12px;
  background: rgba(255,255,255,.06); color: #ccc; font-size: .95rem; cursor: pointer;
  transition: all .2s;
}
.lb-cat-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.lb-cat-active { border-color: #ff6600; color: #ff6600; background: rgba(255,102,0,.12); font-weight: 700; }

/* level grid */
.lb-level-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px;
  margin-bottom: 16px; max-height: 260px; overflow-y: auto;
}
.lb-level-card {
  padding: 12px 8px; border-radius: 10px; background: rgba(20,10,5,.75);
  border: 1px solid rgba(255,140,50,.3); cursor: pointer; text-align: center;
  transition: all .2s;
}
.lb-level-card:hover { background: rgba(40,20,8,.85); border-color: rgba(255,140,50,.5); transform: scale(1.03); }
.lb-level-card.lb-level-done { border-color: #22c55e; }
.lb-level-card.lb-level-done::after { content: ' ✓'; color: #22c55e; }
.lb-level-icon { font-size: 1.8rem; margin-bottom: 4px; }
.lb-level-name { font-size: .82rem; color: #ddd; font-weight: 600; }
.lb-level-sub { font-size: .72rem; color: #999; margin-top: 2px; }

/* ----- mobile ----- */
@media (max-width: 520px) {
  .lb-hud { gap: 8px; }
  .lb-hud-item { padding: 6px 10px; min-width: 56px; }
  .lb-hud-value { font-size: 1.1rem; }
  .lb-rules { grid-template-columns: 1fr; }
  .lb-screen { padding: 16px 10px; }
}
