/* playlist-page.css */

:root {
  --pl-mint:    #8EB69B;
  --pl-mint-dim: rgba(142,182,155,.10);
  --pl-mint-bd:  rgba(142,182,155,.15);
  --pl-bg:      #0b1a12;
  --pl-bd:      rgba(255,255,255,0.07);
  --pl-bd2:     rgba(255,255,255,0.13);
  --pl-tx:      #e8eaed;
  --pl-mu:      rgba(232,234,237,0.40);
  --pl-radius:  11px;
}

.main-wrapper-2,
.main-container {
  padding-left: 0  !important;
  padding-right: 0 !important;
  max-width: none  !important;
  width: 100%      !important;
}

#pl-loading-screen {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--pl-bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .3s ease;
}
#pl-loading-screen.hidden { opacity: 0; pointer-events: none; }

.pl-spinner-lg {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid rgba(142,182,155,.2);
  border-top-color: var(--pl-mint);
  animation: pl-spin .75s linear infinite;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }

#pl-hero {
  position: relative;
  margin-left: 0;
  width: 100%;
  height: 320px;
  overflow: hidden;
  transition: height .44s cubic-bezier(.4,0,.2,1), opacity .32s ease;
}
#pl-hero.collapsed { height: 0; opacity: 0; }

.pl-hero-bg {
  position: absolute;
  inset: -30px;
  z-index: 0;
  background-size: cover;
  background-position: center;
  /* filter: blur(28px) brightness(.55) saturate(1.3); */
  transform: unset;
  background-color: #1c6e3c;
  width: unset;
}

.pl-hero-col {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  transform: translateX(-50%);
  width: 180px;
  z-index: 2;
  display: none; align-items: center; justify-content: center;
  overflow: hidden;
  
}
.pl-hero-col img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (min-width: 769px) {
  .pl-hero-col { width: 240px; }
  #pl-hero     { height: 380px; }
}

.pl-hero-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(142,182,155,.3);
  display: flex; align-items: center; justify-content: center;
  color: rgba(142,182,155,.5);
}

.pl-hero-sides {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(to right,
    rgba(9,22,14,.70) 0%,   rgba(9,22,14,.10) 28%,
    transparent 40%,        transparent 60%,
    rgba(9,22,14,.10) 72%,  rgba(9,22,14,.70) 100%);
}

.pl-hero-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 160px; z-index: 4;
  background: linear-gradient(to bottom, transparent, var(--pl-bg));
}

.pl-hero-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 5; padding: 0 24px 22px;
}
.pl-hero-lbl {
  font-size: 9px; text-transform: uppercase;
  letter-spacing: .18em; color: var(--pl-mint);
  margin-bottom: 5px; opacity: .85;
}
.pl-hero-title {
  font-family: 'Cormorant Garamond', 'Amiri', Georgia, serif;
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 600; line-height: 1.15;
  color: var(--pl-tx); margin: 0;
  text-shadow: 0 2px 18px rgba(0,0,0,.7);
}
.pl-hero-sub {
  display: inline-flex; align-items: center; gap: 0;
  font-size: 12px; color: var(--pl-mu); margin-top: 5px;
  text-decoration: none; cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.pl-hero-sub:hover {
  color: var(--pl-tx);
  border-bottom-color: rgba(255,255,255,.25);
}
.pl-hero-dot { margin: 0 4px; }

.pl-hero-actions {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; flex-wrap: wrap;
}
.pl-hero-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  color: rgba(232,234,237,.75);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  text-decoration: none;
  transition: background .14s, color .14s;
  cursor: pointer;
}
.pl-hero-btn:hover { background: rgba(255,255,255,.18); color: var(--pl-tx); }
.pl-hero-btn--mint {
  background: rgba(142,182,155,.18);
  border-color: rgba(142,182,155,.3);
  color: var(--pl-mint);
}
.pl-hero-btn--mint:hover { background: rgba(142,182,155,.3); color: #b2d4bf; }

.pl-fbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 10px;
  background: var(--pl-bg);
  position: sticky; top: 0; z-index: 600;
  border-bottom: 1px solid var(--pl-bd);
}
.pl-fbar-left {
  font-size: 10px; color: var(--pl-mu);
  text-transform: uppercase; letter-spacing: .13em;
}
.pl-dd-wrap { position: relative; }
.pl-dd-btn {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--pl-bd2); border-radius: 20px;
  padding: 7px 13px; font-size: 12px; color: var(--pl-tx);
  cursor: pointer; user-select: none; white-space: nowrap;
  font-family: inherit; transition: background .14s;
}
.pl-dd-btn:hover { background: rgba(255,255,255,.11); }
.pl-dd-chevron { transition: transform .2s; }
.pl-dd-btn[aria-expanded="true"] .pl-dd-chevron { transform: rotate(180deg); }

.pl-dd-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #0e2418;
  border: 1px solid var(--pl-bd2);
  border-radius: 12px;
  min-width: 185px;
  z-index: 700;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .17s, transform .17s;
}

.pl-dd-menu.open { 
  opacity: 1; 
  pointer-events: auto; 
  transform: translateY(0); /* ← réapplique un transform */
}

.pl-dd-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 11px 16px; font-size: 13px;
  color: rgba(232,234,237,.65); cursor: pointer;
  background: none; border: none; text-align: left;
  font-family: inherit; transition: background .12s, color .12s;
}

.pl-dd-item:hover { background: rgba(255,255,255,.06); color: var(--pl-tx); }
.pl-dd-item.active { color: var(--pl-mint); }
.pl-dd-check { color: var(--pl-mint); font-size: 13px; }

#pl-list {
  padding: 6px;
}
@media (min-width: 769px) {
  #pl-list { padding: 8px 32px 0; }
}

.pl-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 10px; border-radius: var(--pl-radius);
  cursor: pointer;
  transition: background .14s, transform .1s;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.pl-item:last-child { border-bottom: none; }
.pl-item:hover  { background: rgba(255,255,255,.05); }
.pl-item:active { transform: scale(.99); }
.pl-item.playing {
  background: rgba(142,182,155,.07);
  border-bottom-color: transparent;
}

.pl-item-num {
  width: 24px; min-width: 24px; font-size: 12px;
  color: var(--pl-mu); text-align: center; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.pl-item-eq {
  width: 24px; min-width: 24px; flex-shrink: 0;
  display: none; justify-content: center;
  align-items: flex-end; height: 16px; gap: 2px;
}
.pl-item.playing .pl-item-num { display: none; }
.pl-item.playing .pl-item-eq  { display: flex; }
.pl-eq-b {
  width: 3px; border-radius: 2px; background: var(--pl-mint);
  animation: pl-eq .85s ease-in-out infinite; display: block;
}
.pl-eq-b:nth-child(2) { animation-delay: .14s; }
.pl-eq-b:nth-child(3) { animation-delay: .28s; }
@keyframes pl-eq { 0%,100%{ height:4px; } 50%{ height:15px; } }

.pl-item-icon {
  width: 26px; height: 26px; border-radius: 10px;
  background: var(--pl-mint-dim);
  border: 1px solid var(--pl-mint-bd);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--pl-mint); transition: background .14s;
}
.pl-item:hover   .pl-item-icon,
.pl-item.playing .pl-item-icon { background: rgba(142,182,155,.18); }

.pl-item-info { flex: 1; min-width: 0; }
.pl-item-title {
  font-size: 13px; font-weight: 400; color: var(--pl-tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.35;
}
.pl-item.playing .pl-item-title { color: var(--pl-mint); font-weight: 500; }
.pl-item-sub {
  font-size: 11px; color: var(--pl-mu); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pl-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pl-item-dur {
  font-size: 11px; color: var(--pl-mu);
  font-variant-numeric: tabular-nums;
  min-width: 38px; text-align: right;
}
.pl-item-badge {
  font-size: 9px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .06em; color: rgba(142,182,155,.7);
  background: var(--pl-mint-dim);
  border: 1px solid rgba(142,182,155,.2);
  border-radius: 5px; padding: 3px 7px;
}
.pl-item-more {
  background: none; border: none; cursor: pointer;
  color: var(--pl-mu); padding: 5px 2px;
  display: flex; align-items: center;
  border-radius: 6px; flex-shrink: 0;
  transition: background .12s, color .12s;
}
.pl-item-more:hover { background: rgba(255,255,255,.07); color: var(--pl-tx); }

#pl-sentinel {
  display: flex; align-items: center; justify-content: center;
  padding: 20px; min-height: 60px;
}
.pl-sentinel-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(142,182,155,.2);
  border-top-color: var(--pl-mint);
  animation: pl-spin .75s linear infinite; display: none;
}
.pl-sentinel-spinner.active { display: block; }
#pl-end-msg {
  display: none; text-align: center; padding: 18px;
  font-size: 12px; color: var(--pl-mu); letter-spacing: .04em;
}

#pl-ctx {
  z-index: 9999 !important;
  position: fixed !important;
  background: #0e2418;
  border: 1px solid var(--pl-bd2);
  border-radius: 12px;
  min-width: 195px;
  max-width: 220px;
  width: auto !important;
  max-height: calc(100dvh - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  display: none;
}

#pl-ctx.open { display: block; }
.pl-ctx-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 12px 16px; font-size: 13px;
  color: rgba(232,234,237,.7);
  background: none; border: none; text-align: left;
  cursor: pointer; font-family: inherit;
  transition: background .11s, color .11s;
}
.pl-ctx-item:hover { background: rgba(255,255,255,.06); color: var(--pl-tx); }
.pl-ctx-item--red { color: #d96666; }
.pl-ctx-item--red:hover { background: rgba(180,60,60,.1); color: #e07777; }
.pl-ctx-sep { height: 1px; background: var(--pl-bd); margin: 3px 0; }

#pl-ov { display: none; position: fixed; inset: 0; z-index: 450; }
#pl-ov.on { display: block; }

@media (min-width: 769px) {
  .pl-item { padding: 12px 14px; }
  .pl-item-title { font-size: 14px; }
  .pl-item-icon { width: 46px; height: 46px; }
}

@media (max-width: 1023px) {
  .pl-fbar {
    top: var(--nt-mobile-topbar-h);
  }

  #pl-list {
    padding-inline: clamp(8px, 2.5vw, 24px);
  }
}

@media (max-width: 520px) {
  #pl-hero {
    height: clamp(220px, 64vw, 280px);
  }

  .pl-hero-info {
    padding: 0 16px 16px;
  }

  .pl-hero-title {
    font-size: clamp(24px, 8vw, 32px);
  }

  .pl-fbar {
    gap: 8px;
    padding: 10px 12px;
  }

  .pl-fbar-left {
    display: none;
  }

  .pl-dd-btn {
    padding-inline: 10px;
  }

  .pl-dd-menu {
    min-width: min(185px, calc(100vw - 24px));
  }

  .pl-item {
    gap: 8px;
    padding: 11px 6px;
  }

  .pl-item-num,
  .pl-item-eq {
    width: 18px;
    min-width: 18px;
  }

  .pl-item-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .pl-item-right {
    gap: 5px;
  }

  .pl-item-badge {
    display: none;
  }

  #pl-ctx {
    min-width: 0;
    width: min(220px, calc(100vw - 24px)) !important;
  }
}

body.light-mode {
  --pl-bg:  #f4f6f3;
  --pl-bd:  rgba(0,0,0,.08);
  --pl-bd2: rgba(0,0,0,.14);
  --pl-tx:  #1a2e20;
  --pl-mu:  rgba(26,46,32,.45);
}
body.light-mode .pl-hero-fade {
  background: linear-gradient(to bottom, transparent, var(--pl-bg));
}
body.light-mode .pl-fbar        { background: var(--pl-bg); }
body.light-mode .pl-dd-btn      { background: rgba(0,0,0,.06); border-color: var(--pl-bd2); color: var(--pl-tx); }
body.light-mode .pl-dd-menu     { background: #f0f4f1; }
body.light-mode .pl-dd-item     { color: rgba(26,46,32,.65); }
body.light-mode .pl-item:hover  { background: rgba(0,0,0,.04); }
body.light-mode .pl-item.playing{ background: rgba(142,182,155,.12); }
body.light-mode #pl-ctx         { background: #f0f4f1; }
body.light-mode .pl-ctx-item    { color: rgba(26,46,32,.7); }
body.light-mode #pl-loading-screen { background: var(--pl-bg); }

#pl-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 64px 24px 40px; text-align: center; gap: 12px;
}
.pl-empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--pl-mint-dim); border: 1px solid var(--pl-mint-bd);
  display: flex; align-items: center; justify-content: center;
  color: var(--pl-mint); margin-bottom: 8px;
}
.pl-empty-title { font-size: 16px; font-weight: 500; color: var(--pl-tx); margin: 0; }
.pl-empty-sub { font-size: 13px; color: var(--pl-mu); margin: 0; line-height: 1.6; }
.pl-empty-link {
  color: var(--pl-mint); text-decoration: none;
  border-bottom: 1px solid rgba(142,182,155,.3);
  transition: border-color .14s;
}
.pl-empty-link:hover { border-color: var(--pl-mint); }

/* ── Animations items liste ── */
@keyframes pl-item-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pl-item--hidden {
  opacity: 0;
  transform: translateY(10px);
}

.pl-item--visible {
  animation: pl-item-in .32s cubic-bezier(.22,.68,0,1.1) both;
  animation-delay: var(--item-delay, 0ms);
}

/* Ripple au clic sur un item */
@keyframes pl-ripple {
  to { transform: scale(2.5); opacity: 0; }
}
.pl-item-ripple {
  position: absolute; border-radius: 50%;
  pointer-events: none; width: 60px; height: 60px;
  background: rgba(142,182,155,.12);
  transform: scale(0);
  animation: pl-ripple .45s ease-out forwards;
}

.banner-alert-text {
  /* border-radius: */
}

/* Curseur par défaut sur l'item entier */
.pl-item {
  cursor: default;
}

/* Curseur pointer uniquement sur l'icône et le bouton ⋮ */
.pl-item-icon {
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}

.pl-item-icon:hover {
  background: rgba(142,182,155,0.25) !important;
  transform: scale(1.08);
}

.pl-item-more {
  cursor: pointer;
}

/* Bouton téléchargement cache — sans fond */
.pl-dl-btn {
  background: none !important;
  border: none;
  cursor: pointer;
  color: var(--pl-mu);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.18s;
}

.pl-dl-btn:hover {
  color: var(--pl-mint);
  background: none !important;
}

/* Icône cached — verte sans fond */
.pl-dl-btn .pl-dl-icon-cached {
  color: var(--pl-mint);
}
