/* ==========================================================================
   FENÊTRE D'ÉCOUTE — player.html
   --------------------------------------------------------------------------
   Une petite fenêtre séparée, ouverte par les boutons « Écouter ». Elle joue
   pendant que l'auditeur parcourt le site : sur un site en pages séparées,
   c'est la seule façon de ne pas couper le son à chaque clic.
   Pensée pour 420 × 680 px, mais elle s'adapte si l'auditeur la redimensionne
   ou si le navigateur l'ouvre en plein onglet (popup bloqué).
   ========================================================================== */

body.is-popup {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(0, 66, 140, 0.55), transparent 70%),
    linear-gradient(180deg, var(--ink-950), var(--ink-900) 60%, var(--ink-950));
  color: var(--text-on-night);
}

.pp {
  max-width: 460px;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-3) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* En-tête : blason et signature ------------------------------------------ */
.pp__head { display: flex; align-items: center; gap: 0.85rem; }
.pp__crest { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.pp__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--white);
}
.pp__line {
  margin: 0.1rem 0 0;
  font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-300);
}

/* Pochette : le fondu enchaîné du site, en carré --------------------------- */
.pp__art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-800);
  box-shadow: var(--shadow-lg);
}
.pp__art .np-card__art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.pp__live {
  position: absolute; left: 0.85rem; top: 0.85rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.32rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(3, 20, 37, 0.78);
  border: 1px solid rgba(244, 133, 36, 0.55);
  backdrop-filter: blur(4px);
  color: var(--gold-300);
  font-size: 0.9375rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* Voile « touchez pour lancer » ------------------------------------------
   Ne paraît que si le navigateur a refusé le démarrage automatique. Il
   couvre la pochette, pas les commandes : le bouton de lecture reste
   accessible dessous pour qui préfère l'utiliser.                        */
.pp__unlock {
  position: absolute; inset: 0; z-index: 3;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem;
  border: 0; margin: 0; padding: var(--sp-4);
  background: rgba(3, 20, 37, 0.72);
  backdrop-filter: blur(3px);
  color: var(--white);
  font-family: inherit; font-size: var(--fs-lg); font-weight: 600;
  text-align: center;
  cursor: pointer;
}
body.autoplay-blocked .pp__unlock { display: flex; }
.pp__unlock-icon {
  width: 66px; height: 66px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-500), var(--gold-400));
  color: var(--ink-900);
  box-shadow: var(--shadow-gold);
}
.pp__unlock-icon svg { width: 28px; height: 28px; }
.pp__unlock .icon-pause { display: none; }

/* Titre en cours ----------------------------------------------------------- */
.pp__now { text-align: center; }
.pp__track {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem; line-height: var(--lh-snug);
  color: var(--white);
}
.pp__artist { margin: 0.2rem 0 0; color: var(--gold-300); font-size: var(--fs-sm); }
.pp__show {
  margin: 0.55rem 0 0;
  font-size: var(--fs-sm);
  color: var(--text-on-night-soft);
}

/* Commandes ---------------------------------------------------------------- */
.pp__controls {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0;
}
.pp__play {
  flex: none;
  width: 76px; height: 76px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-500), var(--gold-400));
  color: var(--ink-900);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.pp__play:hover { transform: scale(1.05); }
.pp__play svg { width: 34px; height: 34px; }
.pp__play .icon-pause { display: none; }
body.is-playing .pp__play .icon-play { display: none; }
body.is-playing .pp__play .icon-pause { display: block; }

.pp__vol { flex: 1; display: flex; align-items: center; gap: 0.7rem; color: var(--gold-300); }
.pp__vol input[type="range"] { flex: 1; min-width: 0; }

/* Derniers titres ---------------------------------------------------------- */
.pp__recent {
  border-top: 1px solid rgba(244, 133, 36, 0.22);
  padding-top: var(--sp-3);
}
.pp__recent h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: var(--gold-300);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.pp__recent .recent-list { max-height: 30vh; overflow-y: auto; }

.pp__foot {
  margin: auto 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--fs-sm);
  color: var(--text-on-night-soft);
  line-height: 1.5;
}
.pp__foot a { color: var(--gold-300); display: inline-block; margin-top: 0.35rem; }
.pp__foot a + a { margin-left: 1rem; }
.pp__lang { font-weight: 600; }

/* Fenêtre étroite ou basse : on resserre sans rien retirer. */
@media (max-height: 640px) {
  .pp { gap: var(--sp-2); padding-top: var(--sp-3); }
  .pp__art { aspect-ratio: 16 / 9; }
  .pp__track { font-size: 1.25rem; }
  .pp__play { width: 64px; height: 64px; }
  .pp__play svg { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .pp__play:hover { transform: none; }
}
