.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.yt-wrap { position: fixed; left: -9999px; top: 0; width: 200px; height: 200px; overflow: hidden; pointer-events: none; }
.foot { padding-bottom: 150px; }

/* ---------- barre lecteur : îlot flottant ---------- */
.pl {
  --cv: 52px;
  position: fixed; z-index: 45; left: 0; right: 0; margin: 0 auto;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(1100px, calc(100% - 24px));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center;
  padding: 10px 16px;
  background: rgba(20, 18, 16, 0.78);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: pl-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
  transition: border-color 0.5s ease;
}
.pl.is-playing { border-color: rgba(242, 163, 60, 0.38); }
.pl::after {
  content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity 0.6s ease; pointer-events: none;
}
.pl.is-playing::after { opacity: 0.9; }
@keyframes pl-in { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }

.pl__track { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl__track::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  left: calc(var(--cv) / 2 - 5px); top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 2px rgba(243, 237, 228, 0.14);
}
.pl__disc {
  position: relative; flex: none; width: var(--cv); height: var(--cv); border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 46%, rgba(0, 0, 0, 0.55) 47%, transparent 49%),
    repeating-radial-gradient(circle at 50% 50%, #0b0b0a 0 1px, #1c1a18 2px 3px);
  box-shadow: 0 0 0 1px rgba(243, 237, 228, 0.12), 0 8px 22px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.5s ease;
}
.pl__disc::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 25deg, transparent 0 8%, rgba(255, 255, 255, 0.2) 13%, transparent 19% 58%, rgba(255, 255, 255, 0.14) 63%, transparent 69%);
}
.pl.is-playing .pl__disc { box-shadow: 0 0 0 1px rgba(242, 163, 60, 0.45), 0 8px 26px rgba(242, 163, 60, 0.18), 0 8px 22px rgba(0, 0, 0, 0.6); }
.pl__cover {
  position: absolute; inset: 0; margin: auto; width: 42%; height: 42%;
  object-fit: cover; border-radius: 50%; background: var(--bg2);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
  animation: pl-spin 4s linear infinite; animation-play-state: paused;
}
.pl.is-playing .pl__cover { animation-play-state: running; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
.pl__info { display: grid; min-width: 0; line-height: 1.3; }
.pl__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-d); font-weight: 700; font-size: 0.98rem; }
.pl__artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); font-size: 0.8rem; }

.pl__center { grid-column: 1 / -1; display: grid; gap: 4px; }
.pl__ctrl { display: flex; justify-content: center; align-items: center; gap: 14px; }
.pl__bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.pl__t { color: var(--mute); font-size: 0.75rem; font-variant-numeric: tabular-nums; min-width: 2.6em; }
.pl__bar .pl__t:last-child { text-align: right; }

.pl__right { grid-row: 1; grid-column: 2; display: flex; align-items: center; gap: 14px; }
.pl__vol { display: none; width: 96px; }
.pl__open {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(243, 237, 228, 0.05);
  font-size: 0.8rem; font-weight: 600; white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.pl__open svg { width: 16px; height: 16px; fill: currentColor; }
.pl__open:hover { background: var(--accent); color: var(--dark); border-color: var(--accent); }
.pl__open:active { transform: scale(0.96); }

.pl__btn {
  display: grid; place-items: center; width: 36px; height: 36px;
  color: var(--ink); transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.pl__btn:hover { color: var(--accent); }
.pl__btn:active { transform: scale(0.94); }
.pl__btn svg { width: 22px; height: 22px; fill: currentColor; }
.pl__btn--main { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--dark); }
.pl__btn--main:hover { background: var(--ink); color: var(--dark); }
.pl__btn--main svg { width: 24px; height: 24px; }
.pl__btn .i-pause { display: none; }
.pl__btn[aria-pressed="true"] .i-play { display: none; }
.pl__btn[aria-pressed="true"] .i-pause { display: block; }

/* ---------- sliders ---------- */
.pl-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 16px; margin: 0; background: transparent; cursor: pointer;
  --p: 0%;
}
.pl-range:disabled { cursor: default; opacity: 0.5; }
.pl-range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--ink) var(--p), rgba(243, 237, 228, 0.2) var(--p));
}
.pl-range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(243, 237, 228, 0.2); }
.pl-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink); }
.pl-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%;
  background: var(--ink); transform: scale(0); transition: transform 0.15s ease;
}
.pl-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--ink); transform: scale(0); }
.pl-range:hover::-webkit-slider-thumb, .pl-range:focus-visible::-webkit-slider-thumb { transform: scale(1); }
.pl-range:hover::-moz-range-thumb, .pl-range:focus-visible::-moz-range-thumb { transform: scale(1); }
.pl-range:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--p), rgba(243, 237, 228, 0.2) var(--p)); }
.pl-range:hover::-moz-range-progress { background: var(--accent); }

/* ---------- progression animée ---------- */
.pl.is-playing #pl-seek::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--accent) var(--p), rgba(243, 237, 228, 0.2) var(--p));
}
.pl.is-playing #pl-seek::-moz-range-progress { background: var(--accent); }
.pl.is-playing #pl-seek::-webkit-slider-thumb {
  transform: scale(1); background: var(--accent);
  animation: pl-pulse 1.6s ease-out infinite;
}
.pl.is-playing #pl-seek::-moz-range-thumb {
  transform: scale(1); background: var(--accent);
  animation: pl-pulse 1.6s ease-out infinite;
}
@keyframes pl-pulse {
  0% { box-shadow: 0 0 0 0 var(--accent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}

/* ---------- forme d'onde ---------- */
.pl__wave { position: relative; display: block; height: 34px; min-width: 0; border-radius: 4px; }
.pl__wave:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.pl__wave .pl-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 2; }
.pl__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* ---------- page paroles ---------- */
.ly {
  --bass: 0; --prog: 0%;
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-rows: auto 1fr;
  background: #0d0c0b; overflow: hidden;
}
.ly[hidden] { display: none; }
.ly__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #0d0c0b; pointer-events: none; }
.ly__bg img {
  position: absolute; left: -15%; top: -15%; width: 130%; height: 130%; object-fit: cover;
  filter: blur(70px) saturate(1.5) brightness(0.5);
}
.ly__bg::before {
  content: ""; position: absolute; inset: -20%; z-index: 1;
  background: repeating-radial-gradient(circle at 28% 42%, transparent 0 46px, rgba(242, 163, 60, 0.1) 47px 48px);
  -webkit-mask-image: radial-gradient(circle at 28% 42%, #000 0, transparent 72%);
  mask-image: radial-gradient(circle at 28% 42%, #000 0, transparent 72%);
  opacity: calc(0.55 + var(--bass) * 0.9);
  animation: ly-contour 30s ease-in-out infinite alternate;
}
.ly__bg::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(ellipse at 30% 42%, transparent 0, rgba(0, 0, 0, 0.6) 100%), rgba(0, 0, 0, 0.2);
}
@keyframes ly-contour { from { transform: scale(1) rotate(0deg); } to { transform: scale(1.18) rotate(6deg); } }

.ly__close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: #fff;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background 0.2s ease, color 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.ly__close:hover { background: var(--accent); color: var(--dark); transform: rotate(90deg); }
.ly__close svg { width: 20px; height: 20px; }

.ly:not([hidden]) .ly__side { animation: ly-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ly:not([hidden]) .ly__body { animation: ly-fade 0.9s ease 0.2s both; }
.ly__bg img { animation: ly-drift 40s ease-in-out infinite alternate; }
@keyframes ly-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes ly-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ly-drift { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-3%, 2%, 0); } }
@keyframes ly-swap { from { opacity: 0; filter: blur(14px); } to { opacity: 1; filter: blur(0); } }

.ly__side {
  position: relative; z-index: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 56px 24px 8px; text-align: center;
}
.ly__cover {
  width: min(46vw, 24vh); height: auto; aspect-ratio: 1; object-fit: cover;
  background: var(--bg); border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: scale(0.86);
  scale: calc(1 + var(--bass) * 0.05);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.8s ease, scale 0.09s linear;
}
.ly.is-playing .ly__cover {
  transform: scale(1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 calc(30px + var(--bass) * 90px) rgba(242, 163, 60, calc(0.12 + var(--bass) * 0.35));
}
.ly__cover.is-swap { animation: ly-swap 0.6s ease both; }
.ly__title { margin: 8px 0 0; max-width: 100%; font-family: var(--font-d); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.ly__artist { margin: 0; max-width: 100%; color: rgba(255, 255, 255, 0.62); font-size: 0.95rem; overflow-wrap: anywhere; }
.ly__prog { width: min(100%, 340px); height: 4px; margin-top: 10px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.ly__prog i { display: block; height: 100%; width: var(--prog, 0%); border-radius: 2px; background: var(--accent); }
.ly__time {
  display: flex; justify-content: space-between; width: min(100%, 340px);
  font-size: 0.75rem; color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums;
}
.ly__ctrl { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 6px; }
.ly__ctrl .pl__btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.ly__ctrl .pl__btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; transform: scale(1.08); }
.ly__ctrl .pl__btn:active { transform: scale(0.94); }
.ly__ctrl .pl__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ly__ctrl .pl__btn svg { width: 24px; height: 24px; }
.ly__ctrl .pl__btn--main { width: 64px; height: 64px; background: var(--accent); color: var(--dark); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.ly__ctrl .pl__btn--main:hover { background: #fff; color: var(--dark); }
.ly__ctrl .pl__btn--main svg { width: 30px; height: 30px; }

.ly__vol { display: flex; align-items: center; gap: 10px; width: min(100%, 260px); margin-top: 14px; }
.ly__mute {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.ly__mute:hover { background: rgba(255, 255, 255, 0.22); }
.ly__mute:active { transform: scale(0.94); }
.ly__mute:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ly__mute svg { width: 20px; height: 20px; fill: currentColor; }
.ly__mute .i-mute { display: none; }
.ly__mute[aria-pressed="true"] .i-vol { display: none; }
.ly__mute[aria-pressed="true"] .i-mute { display: block; }
.ly__vol .pl-range::-webkit-slider-thumb { transform: scale(1); background: #fff; }
.ly__vol .pl-range::-moz-range-thumb { transform: scale(1); background: #fff; }
.ly__vol .pl-range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, 0.22) var(--p)); }
.ly__vol .pl-range::-moz-range-progress { background: var(--accent); }

.ly__body {
  position: relative; z-index: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 24px var(--pad) 45vh; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 82%, transparent 100%);
}
.ly__body::-webkit-scrollbar { display: none; }
.ly__line {
  position: relative; display: block; width: 100%; text-align: left; padding: 10px 0 10px 22px;
  font-family: var(--font-d); font-weight: 800; line-height: 1.15;
  font-size: clamp(1.6rem, 6vw, 2.9rem);
  color: rgba(255, 255, 255, 0.62);
  opacity: max(0.3, calc(1 - var(--d, 3) * 0.2));
  filter: blur(calc(var(--d, 3) * 1.2px));
  transform: scale(0.9) translateY(4px); transform-origin: left center;
  transition: color 0.5s ease, opacity 0.6s ease, filter 0.6s ease, text-shadow 0.6s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--d, 3) * 25ms);
  overflow-wrap: anywhere;
}
.ly__line::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 0;
  border-radius: 2px; background: var(--accent); transform: translateY(-50%);
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.ly__line.is-past { color: rgba(255, 255, 255, 0.42); }
.ly__line:hover { opacity: 0.9; filter: none; }
.ly__line:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
.ly__line.is-active {
  color: #fff; opacity: 1; filter: none; transform: scale(1) translateY(0);
  text-shadow: 0 0 32px rgba(255, 255, 255, 0.22);
  transition-delay: 0s;
}
.ly__line.is-active::before { height: 62%; }
.ly__w { display: inline-block; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.ly__line.is-active .ly__w {
  --p: -15;
  color: transparent; text-shadow: none;
  background-image: linear-gradient(90deg, #fff calc(var(--p) * 1%), rgba(255, 255, 255, 0.4) calc(var(--p) * 1% + 14%));
  -webkit-background-clip: text; background-clip: text;
}
.ly__line.is-active .ly__w.is-cur { transform: translateY(-3px) scale(1.04); }
.ly__empty { max-width: 34ch; color: var(--mute); font-size: 1.1rem; }

@media (min-width: 900px) {
  .pl { --cv: 56px; grid-template-columns: 1fr minmax(280px, 480px) 1fr; gap: 8px 16px; padding: 12px 22px; }
  .pl__center { grid-column: 2; grid-row: 1; }
  .pl__right { grid-column: 3; justify-content: flex-end; }
  .pl__vol { display: block; }
  .foot { padding-bottom: 120px; }

  .ly { grid-template-rows: 1fr; grid-template-columns: minmax(340px, 460px) 1fr; }
  .ly__side { gap: 12px; padding: 48px 40px; }
  .ly__cover { width: min(100%, 380px, 34vh); border-radius: 22px; }
  .ly__title { font-size: 2.3rem; }
  .ly__artist { font-size: 1.05rem; }
  .ly__ctrl { gap: 26px; margin-top: 14px; }
  .ly__line { font-size: clamp(2rem, 3.4vw, 3.4rem); }
  .ly__body { padding: 22vh var(--pad) 45vh 0; }
}

/* mobile : îlot compact, titre + lecture + paroles, onde en dessous */
@media (max-width: 899px) {
  .pl {
    --cv: 42px;
    grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px;
    width: calc(100% - 16px); bottom: max(8px, env(safe-area-inset-bottom));
    padding: 8px 12px 8px; border-radius: 20px;
  }
  .pl__title { font-size: 0.88rem; }
  .pl__artist { font-size: 0.72rem; }
  .pl__center { display: contents; }
  .pl__ctrl { grid-column: 2; grid-row: 1; }
  .pl__ctrl .pl__btn:not(.pl__btn--main) { display: none; }
  .pl__btn--main { width: 40px; height: 40px; }
  .pl__right { grid-column: 3; grid-row: 1; }
  .pl__open { padding: 9px; }
  .pl__open span { display: none; }
  .pl__bar { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr; }
  .pl__bar .pl__t { display: none; }
  .pl__wave { height: 18px; }
  .foot { padding-bottom: 110px; }
  .ly__ctrl { gap: 16px; }
  .ly__ctrl .pl__btn--main { width: 58px; height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .pl, .pl__cover, .ly__bg::before { animation: none; }
  .pl__disc { transition: none; }
  .pl.is-playing #pl-seek::-webkit-slider-thumb, .pl.is-playing #pl-seek::-moz-range-thumb { animation: none; }
  .pl.is-playing .pl__eq i { transform: scaleY(0.6); }
  .pl__btn, .pl__open, .ly__line, .ly__line::before, .ly__w, .ly__cover, .ly__close, .ly__ctrl .pl__btn, .pl-range::-webkit-slider-thumb { transition: none; }
  .ly:not([hidden]) .ly__side, .ly:not([hidden]) .ly__body, .ly__bg img, .ly__cover.is-swap { animation: none; }
  .ly__cover { scale: none; }
  .ly__line.is-active .ly__w.is-cur { transform: none; }
}
