/* --- Album Header --- */
.album-header {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 30px;
  background: linear-gradient(135deg, #ff0000 0%, #1a1a1a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* --- Spotify Dark Pages (scoped) --- */
.spotify-page {
  min-height: 100vh;
  padding-top: 96px; /* header fixed-top */
  background: #0f0f0f;
  color: #fff;
}

.spotify-shell {
  background: #0f0f0f;
}

.spotify-hero {
  background: linear-gradient(135deg, rgba(255,0,0,.35), rgba(15,15,15,1) 55%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.spotify-album-cover {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
}

.spotify-card {
  background: #181818;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.spotify-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

.spotify-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.spotify-muted { color: rgba(255,255,255,.7) !important; }

.spotify-btn {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}

.spotify-btn-primary {
  background: #ff0000;
  border: 1px solid rgba(255,0,0,.35);
  color: #fff;
}

.spotify-btn-primary:hover {
  background: #cc0000;
  color: #fff;
}

/* Player bar (YouTube-like progress) */
.spotify-playerbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1090;
  background: rgba(24,24,24,.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.10);
}

.spotify-playerbar .sp-wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 18px;
  align-items: center;
  padding: 10px 14px;
}

.sp-title {
  font-weight: 800;
  line-height: 1.2;
}

.sp-meta {
  font-size: .9rem;
  color: rgba(255,255,255,.70);
}

.sp-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.sp-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sp-icon-btn:hover {
  border-color: rgba(255,255,255,.28);
}

.sp-icon-btn.sp-main {
  background: #ff0000;
  border-color: rgba(255,0,0,.35);
  color: #fff;
}

.sp-progress {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 10px;
  align-items: center;
}

.sp-time {
  font-variant-numeric: tabular-nums;
  font-size: .85rem;
  color: rgba(255,255,255,.70);
  text-align: center;
}

/* Range styling (red progress like YouTube) */
.sp-seek {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  outline: none;
}

.sp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ff0000;
  border: 2px solid rgba(0,0,0,.35);
}

.sp-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ff0000;
  border: 2px solid rgba(0,0,0,.35);
}

@media (max-width: 992px) {
  .spotify-playerbar .sp-wrap {
    grid-template-columns: 1fr;
  }
}

.album-cover {
  width: 220px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.album-header h1 {
  font-size: 2.2rem;
  margin: 0;
  color: #fff;
}

.album-header p {
  margin: 8px 0 0;
  font-size: 1rem;
  color: #bbb;
}

/* --- Controls --- */
.controls {
  margin: 25px;
  display: flex;
  gap: 20px;
}

.controls button {
  background: #ff0000;
  border: none;
  color: #fff;
  padding: 12px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.controls button i {
  margin-right: 8px;
}

.controls button:hover {
  background: #cc0000;
  transform: scale(1.05);
}

/* --- Tracklist --- */
.tracklist {
  list-style: none;
  margin: 0;
  padding: 0 25px;
}

.tracklist li {
  padding: 15px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.3s ease;
}

.tracklist li:hover {
  background-color: rgba(255,0,0,0.1);
}

.tracklist span {
  font-size: 1rem;
  color: #e5e5e5;
}

.track-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.track-num {
  width: 26px;
  text-align: right;
  color: rgba(255,255,255,.6);
  font-variant-numeric: tabular-nums;
}

.track-duration {
  width: 52px;
  text-align: right;
  color: rgba(255,255,255,.7);
  font-variant-numeric: tabular-nums;
}

.track-title {
  font-weight: 700;
}

.track-buttons {
  display: flex;
  gap: 12px;
}

.track-buttons button {
  background: none;
  border: none;
  color: #e5e5e5;
  font-size: 1.4rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

.track-buttons button:hover {
  color: #ff0000;
  transform: scale(1.2);
}

/* --- Audio Player --- */
audio {
  width: 100%;
  margin: 30px 0;
  outline: none;
  border-radius: 8px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .album-header {
    flex-direction: column;
    text-align: center;
  }

  .album-cover {
    width: 160px;
  }

  .controls {
    justify-content: center;
  }

  .tracklist li {
    flex-direction: column;
    align-items: flex-start;
  }

  .track-buttons {
    margin-top: 10px;
  }

  .track-buttons button {
    font-size: 1.6rem; /* plus gros pour le doigt */
  }
}

/* --- Active Track --- */
.tracklist li.active {
  background: linear-gradient(
    90deg,
    rgba(255,0,0,0.25),
    rgba(255,0,0,0.05)
  );
  border-left: 4px solid #ff0000;
}

/* --- Audio Spectrum --- */
.audio-spectrum {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  margin-left: 15px;
}

.audio-spectrum span {
  width: 3px;
  height: 6px;
  background: #ff0000;
  border-radius: 2px;
  animation: spectrum 1s infinite ease-in-out;
}

.audio-spectrum span:nth-child(2) { animation-delay: .2s; }
.audio-spectrum span:nth-child(3) { animation-delay: .4s; }
.audio-spectrum span:nth-child(4) { animation-delay: .6s; }
.audio-spectrum span:nth-child(5) { animation-delay: .8s; }

.tracklist li.active .audio-spectrum {
  display: flex;
}

@keyframes spectrum {
  0% { height: 4px; }
  50% { height: 18px; }
  100% { height: 4px; }
}

.tracklist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.audio-spectrum {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  min-width: 28px;
  flex-shrink: 0;
}

