:root {
  --bg-dark: #07090e;
  --card-bg: #0f172a;
  --border: #1e293b;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --spotify-green: #1db954;
  --apple-red: #fc3c44;
  --accent: #38bdf8;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-primary); min-height: 100vh; display: flex; flex-direction: column; }

/* Navigation Haut */
header {
  background: #0b1120;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 14px; align-items: center; }
.nav-btn {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.nav-btn:hover { background: #1e293b; color: #fff; }

/* Studio Switcher */
.studio-switcher {
  display: flex;
  justify-content: center;
  padding: 18px 24px 0 24px;
}
.switcher-bar {
  background: #0f172a;
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 30px;
  display: flex;
  gap: 6px;
}
.switch-btn {
  padding: 8px 24px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.25s ease;
}
.switch-btn.active-spotify {
  background: var(--spotify-green);
  color: #000;
  box-shadow: 0 0 15px rgba(29, 185, 84, 0.4);
}
.switch-btn.active-apple {
  background: var(--apple-red);
  color: #fff;
  box-shadow: 0 0 15px rgba(252, 60, 68, 0.4);
}

/* Corps de l'Application Responsive */
main {
  flex-grow: 1;
  padding: 24px;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
}
@media (max-width: 880px) {
  main { grid-template-columns: 1fr; padding: 14px; }
}

/* Cartes de Studio */
.studio-pane {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pane-title {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Now Playing Grand Lecteur */
.now-playing-box {
  background: #070a12;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.vinyl-art {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid var(--border);
  margin-bottom: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  background: radial-gradient(circle, #334155 10%, #0f172a 70%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}
.vinyl-art.spinning { animation-play-state: running; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.track-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.track-artist { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; }

/* Commandes de Transport Grandes */
.big-transport {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}
.btn-circle:hover { transform: scale(1.08); background: #334155; }
.btn-circle-play {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Sliders & Barres */
.control-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.slider-custom {
  flex-grow: 1;
  height: 6px;
  border-radius: 3px;
  cursor: pointer;
}

/* Liste Playlists */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.playlist-card {
  background: #090e18;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.playlist-card:hover { background: #141f33; }
.playlist-name { font-weight: 700; font-size: 0.86rem; margin-bottom: 2px; }
.playlist-meta { font-size: 0.74rem; color: var(--text-muted); }
.btn-play-mini {
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}
.btn-del-mini {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 8px;
  font-size: 0.8rem;
}
.btn-del-mini:hover { color: var(--apple-red); }

/* Formulaire Nouvelle Playlist */
.new-pl-box {
  background: #090e18;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.input-text {
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 0.82rem;
}

.btn-app-launch {
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.btn-app-launch:hover { opacity: 0.9; }
