/* ============================================================
   DJ BATTLE DECK • STYLE SYSTEM
   Design orienté performance en conditions réelles (cabine DJ sombre, haute lisibilité, contrastes néons)
   ============================================================ */

:root {
  --bg-main: #07090e;
  --bg-surface: #0e131d;
  --bg-card: #141a27;
  --bg-card-hover: #1b2333;
  --bg-input: #0b0f17;
  --border-subtle: #232c3d;
  --border-active: #3b475d;

  /* Couleurs de signal DJ */
  --neon-cyan: #00f2fe;
  --neon-blue: #38bdf8;
  --neon-green: #00ff87;
  --neon-emerald: #10b981;
  --neon-yellow: #facc15;
  --neon-amber: #f59e0b;
  --neon-red: #ff3366;
  --neon-purple: #c084fc;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-glow-green: 0 0 20px rgba(0, 255, 135, 0.25);
  --shadow-glow-cyan: 0 0 20px rgba(0, 242, 254, 0.25);
  --shadow-glow-red: 0 0 20px rgba(255, 51, 102, 0.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   HEADER DJ
   ============================================================ */
.dj-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  width: 10px;
  height: 10px;
  background-color: var(--neon-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-red);
  animation: pulseLive 1.8s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.logo-icon {
  font-size: 24px;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.logo-text .subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-blue);
  opacity: 0.85;
}

.header-pills {
  display: flex;
  gap: 8px;
}

.pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.pill-green {
  background: rgba(0, 255, 135, 0.1);
  border-color: rgba(0, 255, 135, 0.3);
  color: var(--neon-green);
}

/* ============================================================
   ROUND TIMER DJ
   ============================================================ */
.dj-timer-widget {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-lg);
  gap: 14px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.timer-display {
  display: flex;
  flex-direction: column;
}

.timer-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
  line-height: 1;
}

.timer-digits.urgent {
  color: var(--neon-red);
  text-shadow: 0 0 15px rgba(255, 51, 102, 0.8);
  animation: pulseUrgent 0.6s infinite;
}

@keyframes pulseUrgent {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.timer-controls {
  display: flex;
  gap: 6px;
}

.btn-timer-action, .btn-timer-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-timer-action:hover, .btn-timer-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--neon-cyan);
  transform: translateY(-1px);
}

.timer-presets {
  display: flex;
  gap: 4px;
}

.timer-preset-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.timer-preset-btn:hover {
  border-color: var(--neon-yellow);
  color: var(--text-main);
}

.timer-preset-btn.active {
  background: rgba(250, 204, 21, 0.15);
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-toggles {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.mode-btn:hover {
  color: var(--text-main);
}

.mode-btn.active {
  background: var(--bg-card-hover);
  color: var(--neon-cyan);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
}

.run-duration-presets {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.duration-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

/* ============================================================
   NOUVELLE BARRE DE CATÉGORIES (CATÉ 1 & CATÉ 2)
   ============================================================ */
.category-bar {
  background: #090e17;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.category-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.category-bar-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.cat-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 7px 15px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-filter-btn:hover {
  transform: translateY(-1px);
  color: var(--text-main);
  border-color: var(--border-active);
}

.cat-filter-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.cat-filter-btn.cat-1-btn:hover, .cat-filter-btn.cat-1-btn.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--neon-amber);
  color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.cat-filter-btn.cat-2-btn:hover, .cat-filter-btn.cat-2-btn.active {
  background: rgba(14, 165, 233, 0.16);
  border-color: var(--neon-blue);
  color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.3);
}

.music-filter-wrapper {
  display: flex;
  align-items: center;
}

.music-checkbox-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.music-checkbox-label input[type="checkbox"] {
  accent-color: var(--neon-green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Badges Catégorie sur les cartes athlètes */
.cat-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cat-badge-1 {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.cat-badge-2 {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: var(--neon-cyan);
}

.no-music-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 10px 18px 0;
  font-size: 0.78rem;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Contrôles du mode Battle */
.battle-cat-picker, .battle-run-duration-selector {
  width: 100%;
}

.battle-cat-picker label, .battle-run-duration-selector label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.battle-cat-pills, .battle-duration-pills {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.battle-cat-pill, .battle-duration-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.battle-cat-pill:hover, .battle-duration-pill:hover {
  color: var(--text-main);
  border-color: var(--neon-cyan);
}

.battle-cat-pill.active, .battle-duration-pill.active {
  background: var(--neon-cyan);
  color: #000;
  border-color: var(--neon-cyan);
  font-weight: 800;
}

/* ============================================================
   BARRE DE CONTRÔLE (RECHERCHE & FILTRES)
   ============================================================ */
.control-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

#searchInput {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 42px 10px 40px;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s;
}

#searchInput:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.search-shortcut {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.clear-btn {
  position: absolute;
  right: 38px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
}

.round-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-right: 4px;
}

.round-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.round-filter-btn:hover {
  border-color: var(--border-active);
  color: var(--text-main);
}

.round-filter-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dj-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: border 0.15s;
}

.dj-select:focus {
  border-color: var(--neon-cyan);
}

.btn-subtle {
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-subtle:hover {
  border-color: var(--neon-red);
  color: var(--neon-red);
}

/* ============================================================
   MAIN CONTAINER & ATHLETES GRID
   ============================================================ */
.main-container {
  padding: 24px;
  flex: 1;
}

.athletes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 20px;
}

@media (max-width: 540px) {
  .athletes-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ATHLETE CARD
   ============================================================ */
.athlete-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  position: relative;
}

.athlete-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.athlete-card.played {
  opacity: 0.65;
  filter: grayscale(0.2);
  border-color: rgba(16, 185, 129, 0.3);
}

.athlete-card.played:hover {
  opacity: 0.95;
}

/* Card Header */
.card-header {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.athlete-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.athlete-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  user-select: none;
}

.athlete-titles {
  display: flex;
  flex-direction: column;
}

.athlete-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.athlete-alias {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

.header-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Bouton Déjà Passé */
.btn-played-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.btn-played-toggle:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
}

.athlete-card.played .btn-played-toggle {
  background: rgba(0, 255, 135, 0.15);
  border-color: var(--neon-green);
  color: var(--neon-green);
}

/* Card Notes (si renseignées) */
.card-notes {
  margin: 10px 18px 0;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--neon-amber);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: #fde68a;
  line-height: 1.4;
}

/* Rounds Container */
.card-rounds-list {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Round Row */
.round-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border 0.15s, background 0.15s;
}

.round-row:hover {
  border-color: var(--border-active);
  background: #111724;
}

.round-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.round-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}

.round-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.platform-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.platform-youtube {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.platform-spotify {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.platform-soundcloud {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.platform-none {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

/* Le CUE HERO : L'information CRUCIALE pour le DJ */
.cue-hero {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: rgba(0, 255, 135, 0.08);
  border: 1px solid rgba(0, 255, 135, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.cue-hero-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--neon-green);
}

.cue-hero-time {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 135, 0.4);
}

.round-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.drop-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-lead {
  color: var(--neon-yellow);
  font-weight: 700;
  font-family: var(--font-mono);
}

.meta-drop {
  color: var(--text-main);
  font-weight: 600;
}

/* Titre de la musique (Affichage du nom de morceau pour le DJ) */
.track-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.track-music-icon {
  font-size: 0.88rem;
  flex-shrink: 0;
}

.track-name-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.battle-track-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.battle-track-title-box .track-name-text {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--neon-cyan);
}

/* Boutons d'action DJ pour chaque Round */
.round-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* Le bouton d'or pour le DJ : Lancement 1-Click au CUE précis */
.btn-cue-launch {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #061e14;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-cue-launch:hover {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 255, 135, 0.5);
  color: #000;
}

.btn-cue-launch.disabled {
  background: #1e293b;
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-cue-launch .play-icon {
  font-size: 0.95rem;
}

/* Ligne des actions secondaires (Onglet, Copier, Reroll) */
.round-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.round-actions-row > * {
  flex: 1;
  justify-content: center;
  text-align: center;
  min-height: 38px;
}

.btn-secondary-action {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-secondary-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* Panel athlète en mode Battle */
.battle-athlete-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.battle-athlete-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.battle-athlete-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.battle-athlete-name-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.battle-athlete-name {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
}

.battle-athlete-alias {
  color: var(--neon-cyan);
  font-weight: 700;
  font-size: 0.85rem;
}

.battle-athlete-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   VUE 2 : MODE BATTLE 1 VS 1
   ============================================================ */
.battle-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.battle-setup {
  display: grid;
  grid-template-columns: 1fr 280px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .battle-setup {
    grid-template-columns: 1fr;
  }
}

.battle-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.battle-side-header {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.battle-side-header.side-red {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.15) 0%, transparent 100%);
  border-bottom: 2px solid var(--neon-red);
}

.battle-side-header.side-blue {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.15) 0%, transparent 100%);
  border-bottom: 2px solid var(--neon-blue);
}

.side-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.side-red .side-tag { color: var(--neon-red); }
.side-blue .side-tag { color: var(--neon-blue); }

.battle-side-header h2 {
  font-size: 1.3rem;
  font-weight: 900;
}

.battle-select {
  width: 100%;
  padding: 10px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
}

.battle-content {
  padding: 18px;
}

/* Center Deck VS */
.battle-center-deck {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
}

.vs-badge {
  font-size: 2.4rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--neon-red), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

.battle-round-selector label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.battle-round-pills {
  display: flex;
  gap: 6px;
}

.battle-round-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.battle-round-pill:hover {
  color: var(--text-main);
  border-color: var(--neon-cyan);
}

.battle-round-pill.active {
  background: var(--neon-cyan);
  color: #000;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

.battle-deck-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.chrono-badge-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--neon-cyan);
}

.mini-timer {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  line-height: 1;
  transition: color 0.15s;
}

.mini-timer.limit-reached {
  color: var(--neon-red);
  text-shadow: 0 0 20px rgba(255, 51, 102, 0.8);
  animation: pulseUrgent 0.6s infinite;
}

.chrono-progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 4px 0 6px;
}

.chrono-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background 0.2s;
}

.chrono-progress-bar.limit-reached {
  background: var(--neon-red);
  box-shadow: 0 0 10px var(--neon-red);
}

.battle-timer-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-action-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, #0284c7 100%);
  border: none;
  color: #000;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-action-reset {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action-reset:hover {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
}

/* ============================================================
   ZONE DÉCISION DU VAINQUEUR & ENCHAINEMENT DU TOURNOI
   ============================================================ */
.battle-winner-decision-box {
  width: 100%;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.winner-box-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--neon-yellow);
  text-align: center;
}

.winner-buttons-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-declare-winner {
  flex: 1;
  padding: 10px 8px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-declare-winner.winner-red {
  background: rgba(255, 51, 102, 0.12);
  border: 1.5px solid var(--neon-red);
  color: #fff;
}

.btn-declare-winner.winner-red:hover,
.btn-declare-winner.winner-red.is-selected {
  background: var(--neon-red);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 51, 102, 0.5);
  transform: translateY(-1px);
}

.btn-declare-winner.winner-blue {
  background: rgba(0, 242, 254, 0.12);
  border: 1.5px solid var(--neon-cyan);
  color: #fff;
}

.btn-declare-winner.winner-blue:hover,
.btn-declare-winner.winner-blue.is-selected {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.5);
  transform: translateY(-1px);
}

.winner-status-banner {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 222, 89, 0.15);
  border: 1.5px solid var(--neon-yellow);
  color: var(--neon-yellow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(255, 222, 89, 0.2);
}

.btn-cancel-winner {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-muted);
  font-size: 0.72rem;
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cancel-winner:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.battle-next-advance-box {
  width: 100%;
}

.btn-advance-next {
  width: 100%;
  padding: 12px 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: 2px solid #34d399;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.45);
  animation: pulseGreenGlow 1.4s infinite;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.btn-advance-next:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.65);
}

@keyframes pulseGreenGlow {
  0% {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.7), 0 0 40px rgba(52, 211, 153, 0.3);
  }
  100% {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  }
}

/* Bouton Vainqueur directement sur la fiche athlète */
.corner-winner-action-bar {
  width: 100%;
  margin-bottom: 12px;
}

.btn-declare-winner-card {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.battle-side-a .btn-declare-winner-card {
  border-color: var(--neon-red);
  background: rgba(255, 51, 102, 0.1);
  color: #fff;
}

.battle-side-a .btn-declare-winner-card:hover {
  background: var(--neon-red);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 51, 102, 0.5);
  transform: translateY(-1px);
}

.battle-side-b .btn-declare-winner-card {
  border-color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.1);
  color: #fff;
}

.battle-side-b .btn-declare-winner-card:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.5);
  transform: translateY(-1px);
}

.btn-declare-winner-card.is-winner {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.55) !important;
}

.battle-athlete-panel.is-winner-card {
  border-color: #10b981 !important;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.35) !important;
}

.quick-duel-btn.pending-duel {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.match-participant-row.empty-fighter {
  opacity: 0.45;
  cursor: default;
}

/* ============================================================
   PANNEAU DES 4 PASSAGES PAR ATHLÈTE (P1 À P4)
   ============================================================ */
.athlete-all-passages-box {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.passages-box-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--neon-cyan);
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 4px;
}

.passages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.passage-card-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.passage-card-mini:hover {
  border-color: rgba(0, 242, 254, 0.4);
}

.passage-card-mini.active {
  border-color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.passage-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.passage-num-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.passage-num-tag.active-tag {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

.passage-mini-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.passage-mini-cue {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--neon-yellow);
  white-space: nowrap;
}

.btn-play-passage-direct {
  width: 100%;
  padding: 6px 4px;
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-play-passage-direct:hover {
  background: var(--neon-cyan);
  color: #000;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.35);
}

.btn-play-passage-direct.is-active-btn {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25) 0%, rgba(2, 132, 199, 0.25) 100%);
  border-color: var(--neon-cyan);
  color: #fff;
}

.btn-play-passage-direct.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.03);
}



/* ============================================================
   MINI PLAYER FLOTTANT DJ
   ============================================================ */
.floating-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(0,0,0,0.7), 0 0 20px rgba(0, 242, 254, 0.15);
  z-index: 1000;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}

.floating-player.hidden {
  display: none;
}

.floating-player.minimized .player-body {
  display: none;
}

.player-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.now-playing-badge {
  background: var(--neon-green);
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.track-title-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-player-tool {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-player-tool:hover {
  color: var(--text-main);
  border-color: var(--neon-cyan);
}

#playerExternalLinkBtn {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  font-weight: 800;
}

#playerExternalLinkBtn:hover {
  background: var(--neon-cyan);
  color: #000;
}

.player-body {
  padding: 10px;
  background: #000;
}

.frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070a;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(14, 19, 29, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px rgba(0, 255, 135, 0.25);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================================

/* ============================================================
   BOUTONS D'ACTION ET ÉDITION
   ============================================================ */
.btn-action-add {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, #0284c7 100%);
  color: #000;
  border: none;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-action-add:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-edit-athlete {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.btn-edit-athlete:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* ============================================================
   MODAL DE MODIFICATION DES MUSIQUES
   ============================================================ */
.dj-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dj-modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 254, 0.15);
  overflow: hidden;
  animation: slideUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
  from { transform: translateY(20px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}

.dj-modal-header {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 1.5rem;
}

.modal-title-group h2 {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.2;
}

.modal-sub {
  font-size: 0.75rem;
  color: var(--neon-cyan);
  font-weight: 600;
}

.btn-close-modal {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-close-modal:hover {
  border-color: var(--neon-red);
  color: var(--neon-red);
}

.dj-modal-form {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .modal-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.dj-modal-input, .dj-modal-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s;
}

.dj-modal-input:focus, .dj-modal-select:focus {
  border-color: var(--neon-cyan);
}

/* Section des rounds du modal */
.modal-rounds-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rounds-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.rounds-section-header h3 {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--neon-green);
}

.rounds-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.modal-rounds-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-round-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-round-tag {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--neon-cyan);
}

.modal-cue-preview {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--neon-green);
  background: rgba(0, 255, 135, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.modal-round-fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .modal-round-fields {
    grid-template-columns: 1fr;
  }
}

.dj-modal-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-modal-cancel:hover {
  color: var(--text-main);
  border-color: var(--border-active);
}

.btn-modal-save {
  background: linear-gradient(135deg, #059669 0%, var(--neon-green) 100%);
  color: #000;
  border: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 4px 14px rgba(0, 255, 135, 0.3);
}

.btn-modal-save:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ============================================================
   ARBRE DE TOURNOI & DUELS RAPIDES (MODE BATTLE 1VS1)
   ============================================================ */
.tournament-bracket-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.bracket-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.bracket-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bracket-icon {
  font-size: 1.6rem;
  background: rgba(0, 242, 254, 0.1);
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.bracket-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
}

.bracket-subtitle {
  font-size: 0.78rem;
  color: var(--neon-cyan);
  font-weight: 600;
  margin-top: 2px;
}

.bracket-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-toggle-bracket {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(14, 165, 233, 0.25) 100%);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-toggle-bracket:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
  transform: translateY(-1px);
}

.btn-xs {
  font-size: 0.75rem;
  padding: 6px 10px;
}

/* Duels rapides (Bandeau de sélection 1-clic) */
.quick-duels-wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-duels-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
}

.quick-duels-list {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-cyan) rgba(255, 255, 255, 0.05);
}

.quick-duels-list::-webkit-scrollbar {
  height: 6px;
}

.quick-duels-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.quick-duels-list::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 4px;
}

.quick-duel-btn {
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.quick-duel-btn:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.quick-duel-btn.active {
  border-color: var(--neon-yellow);
  background: rgba(255, 222, 89, 0.12);
  box-shadow: 0 0 15px rgba(255, 222, 89, 0.35);
}

.quick-duel-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.quick-duel-btn.active .quick-duel-tag {
  background: var(--neon-yellow);
  color: #000;
}

.quick-duel-fighters {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
}

.fighter-a {
  color: #fda4af;
}

.fighter-vs {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 900;
}

.fighter-b {
  color: #93c5fd;
}

/* Visualisation graphique de l'arbre */
.bracket-visual-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-subtle);
  animation: fadeInModal 0.25s ease-out;
}

.bracket-tree-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  padding: 10px 4px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-green) rgba(255, 255, 255, 0.05);
}

.bracket-tree-scroll::-webkit-scrollbar {
  height: 8px;
}

.bracket-tree-scroll::-webkit-scrollbar-thumb {
  background: var(--neon-green);
  border-radius: 4px;
}

/* Structure en colonnes (Round Columns) */
.bracket-rounds-wrapper {
  display: flex;
  gap: 28px;
  min-width: 900px;
  align-items: stretch;
}

.bracket-round-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 220px;
}

.bracket-col-header {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-cyan);
  padding: 8px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.bracket-col-header.gold {
  color: var(--neon-yellow);
  background: rgba(255, 222, 89, 0.1);
  border-color: rgba(255, 222, 89, 0.3);
}

.bracket-matches-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex-grow: 1;
  gap: 16px;
}

/* Match Card dans l'arbre */
.bracket-match-node {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: all 0.2s;
}

.bracket-match-node:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.bracket-match-node.active-duel {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 16px rgba(255, 222, 89, 0.3);
  background: #111a2e;
}

.match-node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
}

.match-node-fighters {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.match-participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.match-participant-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.match-participant-row.is-winner {
  background: rgba(0, 255, 135, 0.12);
  border-color: var(--neon-green);
  font-weight: 900;
}

.match-participant-row.corner-red {
  border-left: 3px solid var(--neon-red);
}

.match-participant-row.corner-blue {
  border-left: 3px solid var(--neon-blue);
}

.participant-name-text {
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.participant-win-tag {
  font-size: 0.7rem;
}

.btn-load-match-node {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(14, 165, 233, 0.25) 100%);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: var(--neon-cyan);
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-load-match-node:hover {
  background: var(--neon-cyan);
  color: #000;
  border-color: var(--neon-cyan);
}

/* ============================================================
   SONS ALÉATOIRES DE REMPLACEMENT (POUR ATHLÈTES SANS MUSIQUE)
   ============================================================ */
.no-music-banner {
  margin: 10px 18px 0;
  padding: 8px 14px;
  background: rgba(168, 85, 247, 0.1);
  border-left: 3px solid #c084fc;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: #e9d5ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.random-track-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(192, 132, 252, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.random-track-tag strong {
  color: #f3e8ff;
  font-weight: 800;
}

.btn-reroll-track {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(192, 132, 252, 0.3) 100%);
  border: 1px solid #c084fc;
  color: #f3e8ff;
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-reroll-track:hover {
  background: #c084fc;
  color: #000;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.5);
  transform: translateY(-1px);
}

.btn-reroll-track:active {
  transform: scale(0.96);
}

.btn-reroll-all {
  background: rgba(192, 132, 252, 0.25);
  border: 1px solid #c084fc;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-reroll-all:hover {
  background: #c084fc;
  color: #000;
}

/* ============================================================
   RESPONSIVE MOBILE (OPTIMISÉ SPÉCIFIQUEMENT POUR SMARTPHONES DONT SAMSUNG S8+ 360px)
   ============================================================ */
@media (max-width: 768px) {
  /* Évite le zoom automatique incontrôlé sur Android Chrome et iOS Safari */
  input, select, textarea {
    font-size: 16px !important;
  }

  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Padding bas de sécurité pour ne jamais masquer les boutons sous le mini-lecteur flottant */
  .main-container {
    padding: 10px 8px 130px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Header mobile ultra compact & tactile */
  .dj-header {
    padding: 8px 10px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .header-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
  }

  .logo-badge {
    gap: 8px;
  }

  .logo-badge h1 {
    font-size: 1.05rem;
    letter-spacing: 0.4px;
  }

  .logo-badge .subtitle {
    display: none;
  }

  .header-pills {
    display: none; /* Masqué sur mobile pour préserver l'espace */
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
  }

  .mode-toggles {
    flex: 1;
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px;
    border-radius: var(--radius-md);
  }

  .mode-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 8px 6px;
    font-size: 0.8rem;
    font-weight: 800;
    min-height: 40px;
  }

  .btn-icon {
    min-height: 40px;
    min-width: 40px;
    padding: 6px;
    flex-shrink: 0;
  }

  /* Chrono header sur mobile */
  .dj-timer-widget {
    order: 3;
    width: 100%;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-height: 46px;
  }

  .timer-display {
    flex-shrink: 0;
  }

  .timer-label {
    font-size: 0.58rem;
  }

  .timer-digits {
    font-size: 1.65rem;
  }

  .timer-controls {
    display: flex;
    gap: 6px;
  }

  .btn-timer-action, .btn-timer-icon {
    min-height: 38px;
    min-width: 38px;
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .run-duration-presets {
    padding: 2px 6px;
    gap: 4px;
  }

  .duration-label {
    font-size: 0.6rem;
  }

  .timer-preset-btn {
    min-height: 32px;
    padding: 4px 6px;
    font-size: 0.72rem;
  }

  /* Barres de filtres */
  .category-bar {
    padding: 8px 10px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .category-bar-label {
    display: none;
  }

  .category-filters {
    display: flex;
    width: 100%;
    gap: 6px;
  }

  .cat-filter-btn {
    flex: 1;
    padding: 8px 4px;
    font-size: 0.76rem;
    white-space: nowrap;
    justify-content: center;
    text-align: center;
    min-height: 40px;
  }

  .music-filter-wrapper {
    width: 100%;
    justify-content: center;
    padding: 2px 0;
  }

  .music-checkbox-label {
    font-size: 0.78rem;
  }

  /* Barre de recherche et options */
  .control-bar {
    padding: 8px 10px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .search-wrapper {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  #searchInput {
    font-size: 16px !important;
    padding: 10px 36px 10px 38px;
  }

  .search-shortcut {
    display: none;
  }

  .round-filters {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 4px;
  }

  .filter-label {
    display: none;
  }

  .round-filter-btn {
    flex: 1;
    min-height: 36px;
    padding: 6px 2px;
    font-size: 0.76rem;
    justify-content: center;
    text-align: center;
  }

  .sort-wrapper {
    width: 100%;
    display: flex;
    gap: 6px;
  }

  .dj-select {
    flex: 1;
    width: auto;
    min-height: 40px;
    font-size: 16px !important;
  }

  .btn-action-add, .btn-subtle {
    min-height: 40px;
    font-size: 0.78rem;
    padding: 6px 10px;
    justify-content: center;
  }

  /* Grille des athlètes */
  .athletes-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .athlete-card {
    width: 100%;
    overflow: hidden;
  }

  .card-header {
    padding: 10px 10px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .athlete-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .athlete-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .athlete-titles {
    flex: 1;
    min-width: 0;
  }

  .athlete-name {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-status-actions {
    display: flex;
    gap: 6px;
    width: 100%;
  }

  .header-status-actions > * {
    flex: 1;
    justify-content: center;
    min-height: 38px;
  }

  .card-rounds-list {
    padding: 8px 8px;
    gap: 8px;
  }

  .round-row {
    padding: 10px 10px;
    gap: 8px;
    width: 100%;
    overflow: hidden;
  }

  .round-row-top {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .round-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .random-track-tag {
    font-size: 0.7rem;
    white-space: normal;
    word-break: break-word;
    margin-top: 2px;
  }

  .cue-hero {
    width: 100%;
    justify-content: space-between;
    padding: 6px 10px;
  }

  .cue-hero-time {
    font-size: 1.25rem;
  }

  .track-title-row {
    padding: 6px 8px;
    width: 100%;
    overflow: hidden;
  }

  .track-name-text {
    font-size: 0.8rem;
    min-width: 0;
  }

  .round-info-bar {
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Actions de round */
  .round-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .btn-cue-launch {
    width: 100%;
    min-height: 48px;
    font-size: 0.88rem;
    font-weight: 900;
  }

  .round-actions-row {
    display: flex;
    gap: 6px;
    width: 100%;
  }

  .round-actions-row > * {
    flex: 1;
    min-height: 40px;
    font-size: 0.78rem;
    justify-content: center;
    text-align: center;
  }

  /* Mode Battle 1vs1 sur mobile */
  .battle-setup {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .battle-center-deck {
    order: -1; /* Placé en tête pour accès direct du DJ au Chrono et aux Rounds */
    padding: 12px 10px;
    gap: 10px;
    width: 100%;
  }

  .vs-badge {
    font-size: 1.5rem;
  }

  .battle-cat-pills, .battle-round-pills, .battle-duration-pills {
    display: flex;
    width: 100%;
    gap: 4px;
  }

  .battle-cat-pill, .battle-round-pill, .battle-duration-pill {
    flex: 1;
    min-height: 38px;
    padding: 6px 2px;
    font-size: 0.78rem;
    text-align: center;
    justify-content: center;
  }

  .mini-timer {
    font-size: 2.3rem;
  }

  .battle-timer-actions {
    display: flex;
    gap: 6px;
    width: 100%;
  }

  .battle-timer-actions button {
    min-height: 46px;
    font-size: 0.88rem;
    font-weight: 900;
  }

  .battle-card {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
  }

  .battle-side-header {
    padding: 10px 10px;
    gap: 6px;
  }

  .battle-side-header h2 {
    font-size: 1rem;
  }

  .battle-select {
    font-size: 16px !important;
    min-height: 44px;
    width: 100%;
    padding: 8px;
  }

  .battle-content {
    padding: 10px 10px;
  }

  .battle-athlete-panel {
    gap: 10px;
  }

  .battle-athlete-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .battle-athlete-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .battle-athlete-actions .cue-hero {
    flex: 1;
    justify-content: space-between;
  }

  /* Tournoi & Duels Rapides */
  .tournament-bracket-section {
    padding: 10px 8px;
    margin-bottom: 12px;
    width: 100%;
    overflow: hidden;
  }

  .bracket-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: 8px;
  }

  .bracket-icon {
    font-size: 1.3rem;
    padding: 6px;
  }

  .bracket-title {
    font-size: 0.95rem;
  }

  .bracket-subtitle {
    font-size: 0.72rem;
  }

  .bracket-actions-group {
    display: flex;
    width: 100%;
    gap: 6px;
  }

  .btn-toggle-bracket {
    flex: 1;
    justify-content: center;
    min-height: 38px;
  }

  .quick-duels-wrapper {
    margin-top: 8px;
    width: 100%;
  }

  .quick-duels-list {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 8px;
    gap: 6px;
  }

  .quick-duel-btn {
    padding: 6px 10px;
    min-height: 40px;
  }

  .quick-duel-tag {
    font-size: 0.6rem;
  }

  .quick-duel-fighters {
    font-size: 0.75rem;
  }

  .bracket-tree-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Lecteur flottant DJ ancré en bas de l'écran tactile */
  .floating-player {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 14px 14px 0 0 !important;
    border: 1px solid var(--neon-cyan) !important;
    border-bottom: none !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.95) !important;
    z-index: 2500;
  }

  .player-header {
    padding: 8px 10px;
  }

  .track-title-text {
    max-width: 160px;
    font-size: 0.75rem;
  }

  .player-body {
    padding: 6px;
  }

  .frame-wrapper {
    max-height: 200px;
  }

  /* Toast visible au dessus du lecteur */
  .toast {
    bottom: 80px;
    padding: 8px 16px;
    font-size: 0.8rem;
    max-width: 90%;
    text-align: center;
  }

  /* Modal édition */
  .dj-modal-backdrop {
    padding: 8px;
  }

  .dj-modal-content {
    max-height: 95vh;
  }

  .dj-modal-header {
    padding: 12px 14px;
  }

  .dj-modal-form {
    padding: 14px 10px;
    gap: 12px;
  }

  .modal-form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .modal-round-fields {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dj-modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .btn-modal-save, .btn-modal-cancel {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    text-align: center;
  }
}

/* ============================================================
   FINE-TUNING SPÉCIFIQUE SAMSUNG GALAXY S8+ ET ÉCRANS <= 400PX (360PX VIEWPORT)
   ============================================================ */
@media (max-width: 400px) {
  .main-container {
    padding: 8px 6px 130px;
  }

  .logo-text h1 {
    font-size: 0.95rem;
    letter-spacing: 0.2px;
  }

  .dj-timer-widget {
    padding: 6px 8px;
    gap: 6px;
  }

  .timer-digits {
    font-size: 1.45rem;
  }

  .btn-timer-action, .btn-timer-icon {
    min-height: 36px;
    min-width: 36px;
    padding: 4px 6px;
  }

  .timer-preset-btn {
    padding: 3px 5px;
    font-size: 0.68rem;
  }

  .mode-btn {
    font-size: 0.74rem;
    padding: 6px 4px;
  }

  .cat-filter-btn {
    font-size: 0.7rem;
    padding: 6px 2px;
  }

  .btn-cue-launch {
    font-size: 0.82rem;
    padding: 8px 6px;
  }

  .round-actions-row > * {
    font-size: 0.72rem;
    padding: 6px 4px;
  }

  .cue-hero-time {
    font-size: 1.1rem;
  }

  .battle-timer-actions button {
    font-size: 0.8rem;
    padding: 8px 6px;
  }

  .athlete-name {
    font-size: 0.95rem;
  }

  .battle-athlete-name {
    font-size: 1.1rem;
  }

  .btn-declare-winner {
    font-size: 0.74rem;
    padding: 8px 4px;
  }

  .btn-declare-winner-card {
    font-size: 0.76rem;
    padding: 8px 6px;
  }

  .btn-advance-next {
    font-size: 0.8rem;
    padding: 10px 6px;
  }

  .winner-status-banner {
    font-size: 0.75rem;
    padding: 6px 8px;
  }

  .passages-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

