:root,
[data-theme="marron-dark"] {
  --bg-dark: #161210;
  --bg-sidebar: #0e0b09;
  --bg-panel: #1f1916;
  --bg-card: #2b221e;
  --bg-hover: #382c26;
  --accent: #a85a2a;
  --accent-hover: #c46d38;
  --accent-text: #ffffff;
  --accent-soft: #332016;
  --hero-grad: #332016;
  --special: #c084fc;
  --danger: #e53935;
  --text-main: #f8f2ec;
  --text-muted: #bfa99a;
  --border: #3d3029;
}

[data-theme="marron-light"] {
  --bg-dark: #faf5ef;
  --bg-sidebar: #f1e6d8;
  --bg-panel: #ffffff;
  --bg-card: #f4ebe1;
  --bg-hover: #e8d9c8;
  --accent: #7c3f1d;
  --accent-hover: #964f27;
  --accent-text: #ffffff;
  --accent-soft: #ebd9c6;
  --hero-grad: #ebd9c6;
  --special: #7e22ce;
  --danger: #d32f2f;
  --text-main: #2b1d14;
  --text-muted: #6e5544;
  --border: #dccab6;
}

[data-theme="vert-pastel"] {
  --bg-dark: #eff8f6;
  --bg-sidebar: #dff1ed;
  --bg-panel: #ffffff;
  --bg-card: #e6f4f1;
  --bg-hover: #d2ebe5;
  --accent: #008980;
  --accent-hover: #00a398;
  --accent-text: #ffffff;
  --accent-soft: #ccebe5;
  --hero-grad: #ccebe5;
  --special: #6d28d9;
  --danger: #d32f2f;
  --text-main: #123330;
  --text-muted: #4b736f;
  --border: #bddcd6;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, sans-serif; }
body { background: var(--bg-dark); color: var(--text-main); height: 100vh; height: 100dvh; overflow: hidden; }
.hidden { display: none !important; }
.muted-text { color: var(--text-muted); font-size: 0.85rem; }

.offline-banner {
  background: #4a3b12; color: #ffd54f; padding: 6px 10px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600; text-align: center;
}

/* Auth & Modales */
.auth-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85);
  display: flex; align-items: center; justify-content: center; z-index: 250;
}
.auth-card {
  background: var(--bg-panel); padding: 26px; border-radius: 12px; width: 360px; max-width: 92vw;
  display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--border);
}
.auth-card input, .request-form input, .queue-search-wrap input {
  padding: 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-main); width: 100%;
}
.error-msg { color: #ff5555; font-size: 0.85rem; min-height: 18px; }

/* Boutons */
button, .btn-link-ext { cursor: pointer; border: none; border-radius: 6px; transition: 0.15s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-with-icon { gap: 6px; }
.btn-primary { background: var(--accent); color: var(--accent-text); font-weight: bold; padding: 10px 14px; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-special { background: #3b1f54; color: #e9d5ff; padding: 8px 12px; border: 1px solid #6b21a8; font-weight: 600; font-size: 0.85rem; }
.btn-special:hover { background: #581c87; }
.btn-secondary { background: var(--bg-card); color: var(--text-main); padding: 8px 12px; border: 1px solid var(--border); font-size: 0.85rem; }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger { background: #3b1c1c; color: #ff7b7b; padding: 8px 12px; border: 1px solid #5c2828; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-link { background: transparent; color: var(--text-muted); font-size: 0.85rem; }
.icon-btn { background: var(--bg-card); color: var(--text-main); width: 36px; height: 36px; border-radius: 50%; font-size: 0.95rem; flex-shrink: 0; }
.icon-btn:hover { background: var(--bg-hover); }

/* Layout */
.app-layout { display: flex; height: calc(100vh - 86px); height: calc(100dvh - 86px); position: relative; }

/* Sidebar */
.sidebar {
  width: 245px; background: var(--bg-sidebar); padding: 18px; display: flex; flex-direction: column;
  gap: 12px; border-right: 1px solid var(--border); flex-shrink: 0;
  transition: transform 0.25s ease, width 0.25s ease, padding 0.25s ease;
}
.sidebar-top-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sidebar-close-btn,
.sidebar-toggle-btn {
  display: none;
}
.sidebar-backdrop {
  display: none;
}
.logo { font-size: 1.4rem; font-weight: bold; color: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-btn {
  text-align: left; justify-content: flex-start; padding: 10px; background: transparent; color: var(--text-muted); font-weight: 600;
}
.nav-btn.active, .nav-btn:hover { background: var(--bg-card); color: var(--text-main); }
.playlists-header { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; margin-top: 6px; }
.playlists-header button { background: transparent; color: var(--text-main); font-size: 1.2rem; }
.playlists-list { list-style: none; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.playlists-list li {
  padding: 8px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between;
  font-size: 0.9rem; color: var(--text-muted);
}
.playlists-list li:hover, .playlists-list li.active { background: var(--bg-card); color: var(--text-main); }
.sidebar-footer { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.user-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: var(--text-muted); }

/* Réduction manuelle possible aussi sur grand écran */
body.sidebar-collapsed .sidebar {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
  border-right: none;
}

/* Main & Topbar */
.main-content { flex: 1; overflow-y: auto; padding: 20px 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-box { display: none; position: relative; }
.search-box.active { display: block; }
#search-input {
  width: 260px; max-width: 65vw; padding: 8px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-main); outline: none;
}
#search-results {
  display: none; position: absolute; top: 100%; left: 0; width: 100%; margin-top: 6px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px;
  list-style: none; z-index: 20; max-height: 240px; overflow-y: auto;
}
#search-results li {
  padding: 10px; border-bottom: 1px solid var(--border); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.9rem;
}
#search-results li:hover { background: var(--bg-hover); }

/* Hero morceau en cours */
.hero {
  display: flex; align-items: center; gap: 20px; background: linear-gradient(135deg, var(--hero-grad), var(--bg-panel));
  padding: 20px; border-radius: 12px; border: 1px solid var(--border);
}
.hero img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; background: var(--bg-card); flex-shrink: 0; }
.hero-info { flex: 1; min-width: 0; }
.hero-main { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.hero-main > div { min-width: 0; }
.hero-main h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-main p { color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-extra { display: none; gap: 20px; margin-top: 12px; font-size: 0.9rem; color: var(--text-muted); flex-wrap: wrap; }
.hero-extra.active { display: flex; }

/* Liste des pistes & partage */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.share-chip {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 3px 10px; font-size: 0.8rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px;
}
.share-chip button { background: transparent; color: #ff7b7b; font-size: 0.8rem; }
#track-count { color: var(--text-muted); font-size: 0.85rem; }
.tracks-list { display: flex; flex-direction: column; gap: 4px; }
.track-row {
  display: grid; grid-template-columns: 44px 1fr 1fr 60px 160px; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
}
.track-row.shuffle-row {
  grid-template-columns: 28px 44px 1fr 1fr 60px 160px;
}
.track-num {
  font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-align: center;
}
.track-row.playing .track-num {
  color: var(--accent);
}
.track-row:hover { background: var(--bg-hover); }
.track-row.playing { background: var(--accent-soft); color: var(--accent); }
.track-row > div { min-width: 0; }
.track-row > div > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-row img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--bg-card); }
.track-sub { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-actions { display: flex; gap: 5px; justify-content: flex-end; }
.track-actions button { background: transparent; color: var(--text-muted); font-size: 0.95rem; padding: 2px 4px; }
.track-actions button:hover { color: var(--text-main); }

/* Tiroirs latéraux (File d'attente / Historique / Paroles) */
.side-drawer {
  width: 350px; max-width: 92vw; background: var(--bg-panel); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0; z-index: 30;
}
.drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--border); gap: 8px;
}
.drawer-tabs { display: flex; gap: 6px; flex: 1; }
.drawer-tab {
  background: transparent; color: var(--text-muted); padding: 6px 10px;
  font-size: 0.84rem; font-weight: 600; border-radius: 6px;
}
.drawer-tab.active, .drawer-tab:hover { background: var(--bg-card); color: var(--text-main); }
.drawer-tab.active { color: var(--accent); }
.drawer-tab-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.queue-search-wrap { padding: 12px 16px 0; position: relative; }
.queue-search-results {
  margin-top: 6px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; max-height: 210px; overflow-y: auto;
}
.queue-search-item {
  padding: 8px 10px; border-bottom: 1px solid var(--border); display: flex;
  justify-content: space-between; align-items: center; gap: 8px; font-size: 0.85rem;
}
.queue-search-item:last-child { border-bottom: none; }
.queue-search-btns { display: flex; gap: 4px; flex-shrink: 0; }
.queue-search-btns button { background: var(--bg-hover); color: var(--text-main); padding: 4px 7px; font-size: 0.75rem; border-radius: 4px; }
.queue-search-btns button:hover { background: var(--accent); color: #000; }
.queue-label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.04em; display: flex; justify-content: space-between; align-items: center; }
.queue-list { display: flex; flex-direction: column; gap: 6px; }
.queue-item {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px;
  background: var(--bg-card); cursor: pointer;
}
.queue-item.current { border: 1px solid var(--accent); background: var(--accent-soft); }
.queue-item img { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.queue-item-info { flex: 1; min-width: 0; }
.queue-item-title { font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item-artist { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item-actions { display: flex; gap: 3px; flex-shrink: 0; }
.queue-item-actions button { background: transparent; color: var(--text-muted); font-size: 0.85rem; padding: 3px; }
.queue-item-actions button:hover { color: var(--text-main); }

/* Paroles synchronisées */
.lyrics-body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 40px; }
.lyric-line {
  font-size: 0.95rem; line-height: 1.5; color: var(--text-muted); cursor: pointer;
  padding: 4px 6px; border-radius: 6px; transition: 0.2s;
}
.lyric-line:hover { color: var(--text-main); background: var(--bg-card); }
.lyric-line.active { color: var(--accent); font-weight: 700; font-size: 1.05rem; }
.lyrics-plain { white-space: pre-wrap; line-height: 1.7; font-size: 0.92rem; color: var(--text-main); }

/* Mode Blindtest Plein Écran */
.blindtest-overlay {
  position: fixed; inset: 0; background: radial-gradient(circle at top, #1f1630 0%, #0d0d0d 70%);
  z-index: 200; display: flex; flex-direction: column; padding: 24px 32px;
}
.blindtest-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.blindtest-brand { font-size: 1.3rem; font-weight: 800; color: var(--special); }
.blindtest-top-actions { display: flex; align-items: center; gap: 10px; }
.blindtest-select {
  background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 6px; font-size: 0.85rem;
}
.blindtest-stage {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; text-align: center;
}
.bt-mystery-box, .bt-revealed-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 600px;
}
.bt-mystery-cover {
  width: 260px; height: 260px; border-radius: 20px; background: linear-gradient(135deg, #2b1d42, #181818);
  border: 2px dashed #6b21a8; display: flex; align-items: center; justify-content: center;
  font-size: 5rem; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.bt-revealed-box img {
  width: 300px; height: 300px; max-width: 75vw; max-height: 75vw; object-fit: cover;
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75); border: 2px solid var(--accent);
}
.bt-revealed-box h1 { font-size: 2rem; line-height: 1.2; }
.bt-revealed-box p { font-size: 1.25rem; color: var(--accent); font-weight: 600; }
.bt-controls { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.bt-big-btn { padding: 12px 24px; font-size: 1rem; border-radius: 24px; }

/* Minuteur */
.timer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.timer-custom-row { display: flex; gap: 8px; }

/* Propositions & Gestion utilisateurs */
.request-form {
  background: var(--bg-panel); padding: 18px; border-radius: 10px; border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.requests-list, .users-list { display: flex; flex-direction: column; gap: 10px; }
.req-card, .user-card {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.user-card { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.req-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.req-meta { font-size: 0.85rem; color: var(--text-muted); }
.req-actions, .user-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge { padding: 3px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge-pending { background: #4a3b12; color: #ffd54f; }
.badge-queued { background: #1a334d; color: #64b5f6; }
.badge-downloading { background: #2d1f47; color: #ce93d8; }
.badge-completed { background: #1b3d24; color: #69f0ae; }
.badge-rejected { background: #3b1c1c; color: #ff8a80; }
.badge-failed { background: #4a1515; color: #ff5252; }
.badge-admin { background: #4a3b12; color: #ffd54f; }
.badge-special { background: #3b1f54; color: #e9d5ff; }
.badge-standard { background: #2a2a2a; color: #b3b3b3; }

/* Lecteur bas — Icônes SVG & Grille anti-superposition */
.player-bar {
  height: 86px; background: var(--bg-panel); border-top: 1px solid var(--border);
  padding: 0 18px; display: grid; grid-template-columns: 1.1fr 1.8fr 1.1fr;
  grid-template-areas: "track controls right";
  align-items: center; gap: 12px; z-index: 60;
}
.player-track { grid-area: track; display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-track img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--bg-card); flex-shrink: 0; }
.player-meta { min-width: 0; flex: 1; }
.p-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.92rem; }
.p-artist { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-fav-btn {
  background: transparent; color: var(--text-muted); width: 36px; height: 36px;
  border-radius: 50%; flex-shrink: 0;
}
.player-fav-btn:hover { background: var(--bg-card); color: var(--text-main); }
.player-fav-btn .icon-heart-filled { display: none; }
.player-fav-btn.is-fav .icon-heart-outline { display: none; }
.player-fav-btn.is-fav .icon-heart-filled { display: block; }

.player-controls { grid-area: controls; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.control-buttons { display: flex; align-items: center; gap: 14px; }
.p-ctrl-btn {
  background: transparent; color: var(--text-muted); width: 34px; height: 34px;
  border-radius: 50%; flex-shrink: 0;
}
.p-ctrl-btn:hover { background: var(--bg-card); color: var(--text-main); }
.p-ctrl-btn.active { color: var(--accent); background: var(--accent-soft); }

.play-main {
  background: var(--accent) !important; color: var(--accent-text) !important;
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.play-main:hover { background: var(--accent-hover) !important; }
.play-main .icon-pause { display: none; }
.play-main.is-playing .icon-play { display: none; }
.play-main.is-playing .icon-pause { display: block; }

.progress-row { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 480px; font-size: 0.74rem; color: var(--text-muted); }
.progress-row span { flex-shrink: 0; font-variant-numeric: tabular-nums; }
#seek-bar { flex: 1; min-width: 0; accent-color: var(--accent); height: 4px; cursor: pointer; }

.player-right { grid-area: right; display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-shrink: 0; }
.player-tool-btn {
  background: transparent; color: var(--text-muted); min-width: 34px; height: 34px; padding: 0 7px;
  gap: 4px; border-radius: 8px; flex-shrink: 0;
}
.player-tool-btn:hover, .player-tool-btn.active { background: var(--bg-card); color: var(--accent); }
#timer-badge { font-size: 0.72rem; font-weight: 700; }
.player-volume { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
#volume-bar { width: 85px; accent-color: var(--accent); }

/* --- Responsive Téléphone & Tablette --- */
@media (max-width: 820px) {
  .sidebar-toggle-btn,
  .sidebar-close-btn {
    display: inline-flex;
  }

  /* Barre latérale cachée par défaut sur téléphone pour laisser l'écran en grand */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px;
    max-width: 82vw;
    padding: 16px;
    z-index: 120;
    transform: translateX(-100%);
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.65);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 110;
  }

  .app-layout {
    height: calc(100vh - 114px);
    height: calc(100dvh - 114px);
  }

  .main-content {
    width: 100%;
    padding: 14px 14px 20px;
    gap: 14px;
  }

  .hero {
    padding: 12px;
    gap: 12px;
  }
  .hero img {
    width: 68px;
    height: 68px;
  }
  .hero-main h2 {
    font-size: 1rem;
  }

  .track-row {
    grid-template-columns: 40px 1fr auto;
    padding: 8px;
    gap: 10px;
  }
  .track-row.shuffle-row {
    grid-template-columns: 24px 40px 1fr auto;
  }
  .track-row > :nth-child(3):not(.track-actions),
  .track-row > :nth-child(4):not(.track-actions) {
    display: none;
  }
  .track-row.shuffle-row > :nth-child(4),
  .track-row.shuffle-row > :nth-child(5) {
    display: none;
  }
  .track-actions {
    gap: 2px;
  }

  /* Barre de lecture mobile 2 niveaux : zéro superposition */
  .player-bar {
    height: auto;
    min-height: 112px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "track right"
      "controls controls";
    gap: 6px 6px;
  }

  .player-track img {
    width: 38px;
    height: 38px;
  }
  .p-title {
    font-size: 0.86rem;
  }
  .p-artist {
    font-size: 0.75rem;
  }

  .player-right {
    gap: 2px;
  }
  .player-tool-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 5px;
  }
  .player-volume {
    display: none;
  }

  .player-controls {
    flex-direction: column-reverse;
    gap: 5px;
    width: 100%;
  }
  .progress-row {
    max-width: 100%;
    gap: 6px;
    font-size: 0.7rem;
  }
  .control-buttons {
    width: 100%;
    max-width: 340px;
    justify-content: space-between;
    gap: 6px;
  }
  .p-ctrl-btn {
    width: 36px;
    height: 36px;
  }
  .play-main {
    width: 42px;
    height: 42px;
  }

  .side-drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 112px;
    width: 100vw;
    max-width: 100vw;
    z-index: 90;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.6);
  }
}

/* Drag & Drop File d'attente */
.queue-item.draggable-item {
  user-select: none;
  -webkit-user-select: none;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transition: transform 0.12s, opacity 0.12s, border-color 0.12s;
}
.queue-item.dragging {
  opacity: 0.4;
  background: var(--bg-hover);
}
.queue-item.drag-over-top {
  border-top-color: var(--accent);
}
.queue-item.drag-over-bottom {
  border-bottom-color: var(--accent);
}
.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  font-size: 1.05rem;
  padding: 4px 2px;
  line-height: 1;
  flex-shrink: 0;
  touch-action: none;
}
.drag-handle:active {
  cursor: grabbing;
  color: var(--accent);
}

/* Double onglet Ajout à la playlist (Builder + Zone de dépôt) */
.builder-sources {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  flex-wrap: wrap;
}
.builder-source-btn {
  flex: 1;
  min-width: 70px;
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 7px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
}
.builder-source-btn:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}
.builder-source-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.builder-playlist-picker {
  padding: 10px 16px 0;
}
.builder-playlist-picker select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.builder-hint {
  padding: 8px 16px 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.builder-item {
  cursor: grab;
}
.builder-item:active {
  cursor: grabbing;
}
.builder-item.in-playlist {
  opacity: 0.55;
}
.tracks-section.playlist-dropzone-active {
  outline: 2px dashed var(--accent);
  outline-offset: 8px;
  border-radius: 10px;
  background: rgba(168, 90, 42, 0.12);
  transition: background 0.15s, outline-color 0.15s;
}

/* Sélecteur de thème */
.theme-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  cursor: pointer;
}
