/* ==========================================================
   Ulia.Radio — Player unique (mini-barre + grand format popup)

   Repris du gabarit de référence fourni (structure .global-player /
   .extended-player / .audio-player) — posé une seule fois via
   includes/player.php (inclus par includes/footer.php sur toutes les
   pages), jamais recréé pendant une navigation pjax.

   Contrairement à l'ancienne version (Plyr + déplacement du nœud vidéo
   entre mini et grand format), les éléments <audio>/<video> restent
   TOUJOURS dans le grand format : minimiser ne fait que masquer le
   popup en opacité/visibilité (le média continue de jouer), la
   mini-barre affiche seulement une pochette statique + des contrôles
   qui pilotent le même média partagé. Zéro relocalisation DOM.
   ========================================================== */

.global-player {
  font-family: var(--font-body, 'Albert Sans', sans-serif);
}

.global-player[hidden] { display: none !important; }

/* Filet de sécurité générique : n'importe quel élément interne qui pose
   son propre display sur sa classe (déjà vu plusieurs fois avec le fond
   img/svg/video de base.css) doit rester masqué quand hidden est posé. */
#ulia-player [hidden] { display: none !important; }

/* ---------- Animation titre / pochette au changement de contenu ----------
   Posée en JS (assets/js/player.js, bumpSwap()) sur .player-title/.extended-title
   et .player-cover/.extended-cover, uniquement quand le titre ou la pochette
   changent réellement (nouveau morceau, bascule d'épisode…) — jamais sur un
   simple re-rendu périodique. */

@keyframes ulp-swap-text {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ulp-swap-cover {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
.ulp-swap { animation: ulp-swap-text .4s cubic-bezier(.2, .7, .2, 1); }
.ulp-swap-cover { animation: ulp-swap-cover .4s cubic-bezier(.2, .7, .2, 1); }

@media (prefers-reduced-motion: reduce) {
  .ulp-swap, .ulp-swap-cover { animation: none; }
}

/* ---------- Overlay (grand format) ---------- */

.player-overlay {
  position: fixed; inset: 0; z-index: 30000;
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
  background: rgba(0, 0, 0, .68);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 1; visibility: visible;
  transition: opacity .3s ease, visibility .3s ease;
}

.global-player.is-collapsed .player-overlay {
  opacity: 0; visibility: hidden; pointer-events: none;
}

/* ---------- Grand player (carte) ---------- */

.extended-player {
  position: relative;
  width: min(1300px, calc(100vw - 60px));
  height: min(680px, calc(100vh - 80px));
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1.88fr) minmax(360px, .95fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  background: #303030;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .48);
  color: #fff;
  transition: opacity .3s ease, transform .3s ease;
}

.global-player.is-collapsed .extended-player {
  opacity: 0; transform: translateY(20px) scale(.985);
}

/* ---------- Forme « podcast » (audio : épisode + radio en direct) ---------- */

.extended-media {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  overflow: hidden; padding: 50px 60px 35px; isolation: isolate;
}

.extended-media-background {
  position: absolute; inset: -50px; z-index: -3;
  background: var(--cover) center / cover no-repeat;
  filter: blur(10px) brightness(.60) saturate(1.25);
  transform: scale(1.18);
}
.extended-media-background::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .05) 45%, rgba(0, 0, 0, .22));
}

/* ---------- Fond clip YouTube (remplace la pochette quand le morceau en
   cours en a un — voir assets/js/player.js, renderBgClip()/ensureYtBg()) ----------
   Le blur/assombrissement de .extended-media-background s'applique à tout
   son sous-arbre (filter n'isole pas ses enfants) : rien à dupliquer ici,
   l'iframe est juste surdimensionnée pour masquer l'habillage YouTube. */
.extended-media-clip { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.extended-media-clip[hidden] { display: none; }
.extended-media-clip iframe {
  position: absolute; top: 50%; left: 50%; width: 160%; height: 160%;
  transform: translate(-50%, -50%); border: 0; pointer-events: none;
}

.extended-cover {
  width: min(375px, 55%); aspect-ratio: 1; object-fit: cover;
  border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

/* ---------- Forme « video » (vidéo à la demande) ---------- */

.extended-player.shape-video {
  height: auto; min-height: 0;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: stretch;
}
.shape-video .extended-media-video {
  position: relative; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9;
}

/* ---------- Forme « live » (radio en direct, vidéo) ---------- */

.extended-player.shape-live {
  width: min(1200px, calc(100vw - 60px));
  height: auto; min-height: 0;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}
.shape-live .extended-media-video {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
}

/* ---------- Vidéo commune (native + hôte YouTube) ---------- */

.extended-media-video { position: relative; padding: 0; overflow: hidden; background: #000; }

.extended-video, .ulp-yt-host {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  object-fit: contain; background: #000; border: 0;
}
/* Sans ce z-index explicite (plus bas que .video-controls ci-dessous),
   l'iframe YouTube peut se peindre au-dessus des contrôles selon les
   navigateurs — un iframe n'obéit pas toujours à l'empilement normal
   d'un élément sans z-index propre, même positionné avant dans le DOM. */
.ulp-yt-host iframe { position: relative; z-index: 1; width: 100%; height: 100%; display: block; }

/* ---------- Contrôles (grand format) ---------- */

.extended-controls {
  display: flex; align-items: center; justify-content: center; gap: 23px; margin-top: 50px;
}

.extended-skip {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: transparent; color: rgba(255, 255, 255, .34); cursor: pointer;
  transition: color .18s ease, transform .18s ease;
}
.extended-skip i { font-size: 21px; }
.extended-skip:hover { color: #fff; transform: scale(1.08); }
.extended-skip[hidden] { display: none; }

.player-play-circle {
  width: 48px; height: 48px; flex: 0 0 48px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; margin-bottom: 10px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.player-play-circle i { font-size: 20px; }
.player-play-circle .fa-play { transform: translateX(1px); }
.player-play-circle:hover { transform: scale(1.05); background: rgba(255, 255, 255, .19); border-color: rgba(255, 255, 255, .22); }

/* ---------- Timeline (grand format) ---------- */

.extended-progress { width: 80%; margin-top: 43px; }
.extended-progress[hidden] { display: none; }
.extended-progress-times {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px;
  font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, .83);
}
.extended-progress-track {
  position: relative; width: 100%; height: 5px; overflow: hidden; border-radius: 999px;
  background: rgba(255, 255, 255, .20); cursor: pointer;
}
.extended-progress-current {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: #fff; border-radius: inherit;
}

/* ---------- Contrôles vidéo (overlay dégradé, video + live) ---------- */

.video-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 90px 60px 35px;
  background: linear-gradient(to top, rgba(0, 0, 0, .74), transparent);
}
.video-controls .extended-controls { margin: 0 0 25px; }
.video-controls .extended-progress { width: 100%; margin: 0; }

/* ---------- Statut « en direct » (grand format) ---------- */

.extended-live-status {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 12px;
}
.extended-live-status[hidden] { display: none; }
.extended-live-line { height: 1px; background: rgba(255, 255, 255, .18); }
.extended-live-label {
  display: flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .60);
  font-size: 10px; font-weight: 700; letter-spacing: .55px;
}

.live-dot {
  position: relative; display: inline-block; width: 6px; height: 6px; flex: 0 0 6px;
  border-radius: 50%; background: #ff4b4b; box-shadow: 0 0 6px rgba(255, 75, 75, .45);
}
.live-dot::after {
  content: ''; position: absolute; inset: -4px; border: 1px solid rgba(255, 75, 75, .35);
  border-radius: 50%; animation: ulpLivePulse 1.8s ease-out infinite;
}
@keyframes ulpLivePulse {
  0% { opacity: .75; transform: scale(.55); }
  70%, 100% { opacity: 0; transform: scale(1.5); }
}

/* ---------- Croix de réduction (posée sur la vidéo, forme live) ---------- */

.live-extended-close {
  position: absolute; top: 18px; right: 18px; z-index: 20;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid rgba(255, 255, 255, .15); border-radius: 50%;
  background: rgba(30, 30, 30, .45); color: #fff;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  cursor: pointer; transition: background .18s ease, transform .18s ease;
}
.live-extended-close i { font-size: 17px; }
.live-extended-close:hover { background: rgba(50, 50, 50, .70); transform: scale(1.05); }

/* ---------- Panneau d'infos (masqué pour la forme live) ---------- */

.extended-info {
  position: relative; min-width: 0; display: flex; flex-direction: column;
  padding: 34px 34px 28px; overflow-y: auto; background: #303030;
}
.extended-info[hidden] { display: none; }

.extended-close {
  position: absolute; top: 20px; right: 20px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: none; color: #fff; cursor: pointer;
  transition: opacity .18s ease, transform .18s ease;
}
.extended-close i { font-size: 21px; }
.extended-close:hover { opacity: .65; transform: scale(1.06); }

.extended-category {
  align-self: flex-start; max-width: calc(100% - 45px); margin-bottom: 8px;
  padding: 4px 8px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  font-family: var(--font-display, inherit); font-size: 10px; line-height: 1; font-weight: 800;
  text-transform: uppercase;
}
.extended-category[hidden] { display: none; }

.extended-artist {
  max-width: 90%; margin-bottom: 4px;
  font-family: var(--font-display, inherit); font-size: 13px; font-weight: 700;
  color: rgba(255, 255, 255, .68);
}
.extended-artist[hidden] { display: none; }

.extended-title {
  max-width: 90%; margin: 0; font-size: 26px; line-height: .98; font-weight: 800;
}
.extended-meta { margin-top: 6px; font-size: 9px; color: rgba(255, 255, 255, .60); }
.extended-meta[hidden] { display: none; }

/* ---------- Description ---------- */

.extended-description-block { margin-top: 32px; }
.extended-description-block[hidden] { display: none; }

.extended-description {
  position: relative; max-height: 205px; overflow: hidden; margin: 0;
  font-size: 13px; line-height: 1.22; color: rgba(255, 255, 255, .91);
  transition: max-height .3s ease;
}
.extended-description.open { max-height: 450px; }
.extended-description:not(.open)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  background: linear-gradient(transparent, #303030);
}

.description-more {
  display: block; margin: 5px 0 0 auto; padding: 0; border: 0; background: none;
  color: #fff; font-family: inherit; font-size: 9px; font-weight: 700; cursor: pointer;
}

/* ---------- Chapitres ---------- */

.extended-chapters { margin-top: 29px; }
.extended-chapters[hidden] { display: none; }
.extended-section-title { margin-bottom: 6px; font-family: var(--font-display, inherit); font-size: 12px; font-weight: 800; }

.extended-chapter {
  width: 100%; display: flex; align-items: center; gap: 7px; margin-bottom: 4px;
  padding: 6px 9px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .13);
  color: #fff; font-family: inherit; cursor: pointer; transition: background .18s ease;
}
.extended-chapter:hover { background: rgba(255, 255, 255, .19); }
.extended-chapter-time { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.extended-chapter-title { min-width: 0; overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Titres similaires (radio en direct) ---------- */

.extended-similar { margin-top: 29px; }
.extended-similar[hidden] { display: none; }

.extended-similar-track {
  display: flex; align-items: center; gap: 9px; width: 100%; margin-bottom: 4px;
  padding: 6px 8px; border-radius: 7px; background: rgba(255, 255, 255, .06);
  color: #fff; text-decoration: none; transition: background .18s ease;
}
.extended-similar-track:hover { background: rgba(255, 255, 255, .19); }

.extended-similar-cover {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 7px; object-fit: cover;
  background: rgba(255, 255, 255, .1);
}

.extended-similar-info { min-width: 0; }
.extended-similar-title { overflow: hidden; font-size: 12.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.extended-similar-artist {
  margin-top: 1px; overflow: hidden; font-size: 11px; color: rgba(255, 255, 255, .55);
  white-space: nowrap; text-overflow: ellipsis;
}

/* ---------- Actions (j'aime / partager) ---------- */

.extended-actions { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 20px; }

.extended-action {
  height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px;
  background: rgba(255, 255, 255, .11); color: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.extended-action[hidden] { display: none; }
.extended-action.is-liked { background: #ff4d67; border-color: transparent; }

/* ==========================================================
   Petit player (mini-barre flottante)
   ========================================================== */

.audio-player-wrap {
  position: fixed; left: 0; right: 0; bottom: 18px; z-index: 29900;
  display: flex; justify-content: center; padding: 0 20px;
  pointer-events: none; visibility: hidden;
  transition: visibility 0s linear .28s;
}
.global-player.is-collapsed .audio-player-wrap {
  visibility: visible; transition-delay: 0s;
}

.audio-player {
  position: relative; width: 100%; max-width: 1300px; height: 92px;
  display: grid; grid-template-columns: 300px minmax(400px, 1fr) 360px;
  align-items: center; gap: 24px; padding: 0 24px; color: #fff;
  background: rgba(70, 70, 70, .48);
  -webkit-backdrop-filter: blur(28px) saturate(135%);
  backdrop-filter: blur(28px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .13), inset 0 1px 0 rgba(255, 255, 255, .08);
  pointer-events: none; opacity: 0; transform: translateY(16px);
  transition: opacity .22s ease, transform .28s cubic-bezier(.2, .7, .2, 1);
}

/* Animate the filtered element itself: ancestor opacity restricts its backdrop. */
.global-player.is-collapsed .audio-player {
  pointer-events: auto; opacity: 1; transform: translateY(0);
}

.compact-close {
  position: absolute; top: -8px; right: -8px; z-index: 20; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%;
  background: rgba(75, 75, 75, .72);
  -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px);
  color: rgba(255, 255, 255, .85); cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.compact-close i { font-size: 11px; }
.compact-close:hover { color: #fff; background: rgba(100, 100, 100, .85); transform: scale(1.08); }

.player-info { display: flex; align-items: center; min-width: 0; gap: 13px; }
.player-info-link {
  display: flex; align-items: center; min-width: 0; gap: 13px;
  color: inherit; text-decoration: none;
}
.player-info-link.is-disabled { pointer-events: none; cursor: default; }
.player-cover {
  width: 58px; height: 58px; flex: 0 0 58px; object-fit: cover; border-radius: 9px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .20);
  background-color: var(--u-skeleton, #e9ebf0);
  background-image: linear-gradient(100deg, var(--u-skeleton, #e9ebf0) 30%, var(--u-skeleton-shine, #f0f1f4) 50%, var(--u-skeleton, #e9ebf0) 70%);
  background-size: 200% 100%;
  animation: u-skeleton-shimmer 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .player-cover { animation: none; background-image: none; }
}
.player-text { min-width: 0; }
.player-title {
  max-width: 215px; font-size: 14px; line-height: 1.15; font-weight: 400; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-show {
  max-width: 215px; margin-top: 3px; font-size: 13px; line-height: 1; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.player-center { width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.player-controls { height: 42px; display: flex; align-items: center; justify-content: center; gap: 17px; }

.player-control {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: transparent; color: rgba(255, 255, 255, .55); cursor: pointer;
  transition: color .18s ease, transform .18s ease;
}
.player-control i { font-size: 18px; }
.player-control:hover { color: #fff; transform: scale(1.08); }
.player-control[hidden] { display: none; }

.player-control-play {
  width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.player-control-play i { font-size: 18px; }
.player-control-play .fa-play { transform: translateX(1px); }

.player-progress {
  width: 100%; margin-top: 7px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 58px;
  align-items: center; gap: 9px;
}
.player-progress[hidden] { display: none; }
.player-time { font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, .35); font-variant-numeric: tabular-nums; }
.player-time:first-child { text-align: right; }

.progress-track {
  position: relative; width: 100%; height: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); overflow: hidden; cursor: pointer;
}
.progress-current { position: absolute; left: 0; top: 0; width: 0%; height: 100%; background: rgba(255, 255, 255, .95); border-radius: inherit; }

.compact-live-status {
  width: 100%; margin-top: 7px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 10px;
}
.compact-live-status[hidden] { display: none; }
.compact-live-line { height: 1px; background: rgba(255, 255, 255, .12); }
.compact-live-label {
  display: flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 600;
  letter-spacing: .55px; color: rgba(255, 255, 255, .42);
}

.player-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }

.player-action {
  flex: 0 0 40px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.player-action i { font-size: 16px; }
.player-action[hidden] { display: none; }
.player-action.is-liked { background: #ff4d67; border-color: transparent; }

.player-volume {
  height: 40px; display: flex; align-items: center; padding: 0 14px 0 6px;
  border: 1px solid rgba(255, 255, 255, .13); border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.player-volume-button {
  width: 35px; height: 38px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: none; color: #fff; cursor: pointer;
}
.volume-range {
  width: 72px; height: 4px; appearance: none; -webkit-appearance: none;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, .25); cursor: pointer;
}
.volume-range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 0; height: 0; }
.volume-range::-moz-range-thumb { width: 0; height: 0; border: 0; }

/* ---------- Menu réglages (qualité radio / vitesse de lecture) ---------- */

.ulp-settings { position: relative; }

.ulp-settings__menu {
  position: absolute; bottom: calc(100% + 16px); right: 0; z-index: 5;
  width: 260px; max-width: calc(100vw - 96px); box-sizing: border-box;
  padding: 10px; border-radius: 20px; overflow: hidden;
  background: rgba(55, 55, 55, .96);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .20), inset 0 1px 0 rgba(255, 255, 255, .08);
  color: #fff;
}
.ulp-settings__menu[hidden] { display: none; }

.ulp-settings__title {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px 12px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  color: rgba(255, 255, 255, .65);
}
.ulp-settings__title i { color: rgba(255, 255, 255, .8); font-size: 12px; }
.ulp-settings__empty { padding: 14px 10px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }

.ulp-settings__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 11px 12px; border: 1px solid transparent; border-radius: 12px;
  background: transparent; color: #fff;
  font-family: inherit; text-align: left; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.ulp-settings__item + .ulp-settings__item { margin-top: 3px; }
.ulp-settings__item:hover { background: rgba(255, 255, 255, .07); }
.ulp-settings__item.is-active { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .13); }
.ulp-settings__item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ulp-settings__item-label { font-size: 13px; font-weight: 600; }
.ulp-settings__item-sub { font-size: 11px; color: rgba(255, 255, 255, .6); }
.ulp-settings__check { flex: 0 0 auto; font-size: 12px; color: #fff; opacity: 0; }
.ulp-settings__item.is-active .ulp-settings__check { opacity: 1; }
.ulp-settings__item.is-active .ulp-settings__item-label { color: #fff; }

.ulp-settings__speed-row {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .05);
}
.ulp-settings__speed-chip {
  flex: 1 1 0; min-width: 0; padding: 10px 0; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: rgba(255, 255, 255, .7); font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.ulp-settings__speed-chip:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ulp-settings__speed-chip.is-active { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .14); color: #fff; }
.ulp-settings__item:focus-visible,
.ulp-settings__speed-chip:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 1100px) {
  .audio-player { grid-template-columns: 250px minmax(300px, 1fr) auto; gap: 15px; }
  .volume-range { width: 55px; }
}

@media (max-width: 850px) {
  .audio-player { height: 82px; grid-template-columns: minmax(0, 1fr) auto auto; }
  /* .player-center reste dans le flux normal de la grille (3e colonne, ne
     contient plus que le bouton lecture) : le laisser en position:absolute
     comme avant le retirait entièrement de la grille, et avance/retour 15s
     étant masqués ci-dessous, plus rien n'y restait visible — c'était le
     bouton lecture lui-même qui disparaissait de la mini-barre. */
  .player-center { position: static; width: auto; }
  #ulpMiniBack, #ulpMiniForward { display: none; }
  .player-progress {
    /* left doit dégager la pochette + son padding (24px de marge de
       .audio-player + 58px de pochette + 13px de gap .player-info = 95px) —
       en-deçà, la piste/le badge « En direct » chevauchent la pochette. */
    position: absolute; left: 95px; right: 210px; bottom: 9px; top: auto;
    grid-template-columns: 1fr; margin: 0;
  }
  .player-time { display: none; }
  .compact-live-status { position: absolute; left: 95px; right: 210px; bottom: 9px; top: auto; grid-template-columns: 1fr; }
}

/* ---------- Mobile : grand format « écran plein », façon Spotify/Deezer ----------
   Contrairement au bureau (carte centrée avec fond assombri), le grand
   format devient un vrai plein écran edge-to-edge sur mobile : pochette en
   haut, feuille arrondie en dessous portant TOUT ce que le player propose
   déjà (réglages qualité/vitesse, description, chapitres, j'aime,
   partager) — on ne retire aucune option, seule la mise en page change. */
@media (max-width: 760px) {
  .player-overlay { padding: 0; align-items: stretch; }

  .extended-player:not(.shape-live) {
    width: 100%; height: 100vh; height: 100dvh; min-height: 0;
    grid-template-columns: 1fr; grid-template-rows: auto 1fr;
    border-radius: 0; border: 0;
  }

  .extended-media { padding: max(28px, env(safe-area-inset-top)) 24px 30px; }
  .extended-cover { width: min(280px, 60vw); }
  .extended-controls { gap: 32px; margin-top: 32px; }
  .extended-progress { width: 100%; margin-top: 28px; }

  .extended-info {
    overflow-y: auto;
    padding: 24px 22px calc(24px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: #262626;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, .2);
  }
  .extended-close { top: max(16px, env(safe-area-inset-top)); }
  .extended-title { font-size: 22px; }
  .extended-action { height: 38px; font-size: 12px; }
  .extended-chapter { padding: 9px 11px; }

  .extended-player.shape-video { grid-template-rows: auto 1fr; }
  .shape-video .extended-media-video { aspect-ratio: 16 / 9; }
  .video-controls { padding: 60px 20px calc(20px + env(safe-area-inset-bottom)); }

  .extended-player.shape-live {
    width: 100%; height: 100vh; height: 100dvh; border-radius: 0;
  }
}

/* ---------- Mobile : mini-barre flottante ----------
   Même habillage que la barre desktop (fond légèrement assombri + flou,
   coins arrondis, flottante au-dessus du bord) — juste plus compacte :
   ligne de progression fine en haut plutôt qu'une timeline avec temps
   (illisible à cette largeur), badge "En direct" masqué faute de place. Les
   contrôles secondaires (avance/retour 15s, réglages qualité/vitesse)
   restent visibles quand le contenu le permet. */
@media (max-width: 650px) {
  .audio-player-wrap {
    /* Reste flottant (comme le bureau, voir .audio-player-wrap plus haut) :
       pas de bottom:0/edge-to-edge, la marge de la zone sûre s'ajoute à un
       flottement minimal plutôt que de le remplacer. */
    bottom: max(14px, env(safe-area-inset-bottom));
    padding: 0 12px;
  }

  .audio-player {
    /* Ni background/backdrop-filter/border-radius/box-shadow ici : on
       hérite volontairement du même habillage semi-transparent flouté que
       la version bureau (règle de base .audio-player) — seules la taille et
       la disposition changent sur mobile. Pas d'overflow:hidden ici (l'idée
       initiale, pour éviter que la ligne de progression ne déborde des
       coins arrondis) : ça coupait aussi le bouton fermer (positionné à
       cheval sur le bord) et le menu réglages (qui s'ouvre au-dessus de la
       barre) — voir left/right sur .player-progress ci-dessous à la place. */
    height: 68px; padding: 0 10px;
    grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px;
  }

  /* Ligne de progression fine sur le bord supérieur de la barre : left/right
     calés sur le rayon des coins de .audio-player (border-radius: 20px,
     hérité de la règle de base) pour ne jamais déborder dessus, sans avoir
     besoin d'overflow:hidden sur la carte entière. bottom:auto annule le
     bottom:9px hérité du palier 850px ci-dessus (sans ça, top:0 ET
     bottom:9px actifs en même temps étireraient la boîte au lieu d'un
     simple trait fin calé sur le haut). */
  .player-progress {
    position: absolute; top: 0; bottom: auto; left: 20px; right: 20px; z-index: 2;
    grid-template-columns: 1fr; margin: 0; padding: 0;
  }
  .player-time { display: none; }
  .progress-track { height: 3px; border-radius: 0; }

  /* Pas assez de place pour l'afficher lisiblement à cette largeur — la
     lecture live reste signalée par ailleurs (titre/pochette). */
  .compact-live-status { display: none; }

  .player-cover { width: 44px; height: 44px; flex-basis: 44px; border-radius: 7px; }
  .player-title { max-width: 38vw; font-size: 12.5px; }
  .player-show { max-width: 38vw; font-size: 11px; }

  .player-control-play { width: 38px; height: 38px; }
  .player-control-play i { font-size: 16px; }

  .player-actions { gap: 4px; }
  .player-volume, #ulpLikeMini, #ulpShareMini { display: none; }
  .player-action, #ulpMiniExpand { width: 34px; height: 34px; flex-basis: 34px; }
  .compact-close { top: -6px; right: -6px; }
}

/* Subtle feedback shared by the compact and expanded player. */
#ulia-player .player-action,
#ulia-player .player-volume-button,
#ulia-player .player-control-play {
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
@media (hover: hover) {
  #ulia-player .player-action:hover,
  #ulia-player .player-control-play:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, .2);
    border-color: rgba(255, 255, 255, .25);
  }
}
#ulia-player .player-action:active,
#ulia-player .player-control:active,
#ulia-player .player-play-circle:active,
#ulia-player .player-volume-button:active { transform: scale(.94); }
#ulia-player button:focus-visible { outline: 2px solid rgba(255, 255, 255, .85); outline-offset: 3px; }
@keyframes ulp-menu-enter {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ulp-settings__menu:not([hidden]) {
  transform-origin: bottom right;
  animation: ulp-menu-enter .18s cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-reduced-motion: reduce) {
  #ulia-player *, #ulia-player *::before, #ulia-player *::after {
    animation: none !important;
    transition: none !important;
  }
  #ulia-player .audio-player,
  #ulia-player .extended-player,
  #ulia-player button { transform: none !important; }
}