/* ---------- Barre de lecture ---------- */

.playerbar {
  grid-area: player;
  position: relative;
  height: var(--player-h);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr) minmax(max-content, 1fr);
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-3);
  background: var(--bg-2);
  border-radius: var(--radius-l) var(--radius-l) 0 0; /* haut arrondi comme les panneaux, bas collé au bord */
}
.pb-now { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.pb-track { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.pb-art { padding: 0; border: 0; border-radius: var(--radius-s); background: none; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); transition: transform 0.15s; }
.pb-art:hover { transform: scale(1.04); }
.pb-text { min-width: 0; }
.pb-title { font-size: var(--fs-caption); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-title a:hover { text-decoration: underline; }
.pb-artists { font-size: var(--fs-caption); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-center { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); width: 100%; max-width: 720px; justify-self: center; }
.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.pb-progress, .mini-play { display: none; }
.transport { display: flex; align-items: center; gap: var(--sp-4); }
.play-btn { width: 36px; height: 36px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--text); color: var(--bg-2); transition: transform 0.12s; }
.play-btn:hover { transform: scale(1.06); }
.play-btn:active { transform: scale(0.96); }
.play-btn .icon[viewBox] { margin-left: 0; }
.mode-btn[aria-pressed="true"]::after { content: ""; position: absolute; bottom: 1px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.repeat-one { position: absolute; top: 4px; right: 3px; min-width: 13px; height: 13px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); font-size: 9px; font-weight: 800; line-height: 13px; }
.seek:hover .range, .volume:hover .range { --fill: var(--accent); }
.seek:hover .range::-webkit-slider-thumb, .volume:hover .range::-webkit-slider-thumb { opacity: 1; }
.seek:hover .range::-moz-range-thumb, .volume:hover .range::-moz-range-thumb { opacity: 1; }
.play-btn .icon, .mini-play .icon { animation: icon-in 0.18s var(--ease); }
@keyframes icon-in { from { transform: scale(0.6); opacity: 0; } }
.playerbar[data-status="error"] .pb-artists { color: var(--danger); }

.seek { --p: 0%; --b: 0%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: var(--sp-2); width: 100%; }
.seek .time { font-size: var(--fs-caption); color: var(--text-3); font-variant-numeric: tabular-nums; }
.seek .time:first-child { text-align: right; }
.seek-track { position: relative; display: flex; align-items: center; }
.seek-tip { position: absolute; bottom: 20px; transform: translateX(-50%); padding: var(--sp-1) var(--sp-2); border-radius: var(--r-sm); background: var(--menu-bg); color: var(--text); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.1s; white-space: nowrap; }
.seek-track:hover .seek-tip { opacity: 1; }
@media (hover: none) { .seek-tip { display: none; } }

.volume { --p: 80%; position: relative; display: flex; align-items: center; gap: 2px; width: 150px; min-width: 130px; flex: none; }
.volume-track { flex: 1; display: flex; align-items: center; }
.volume-pop-mute { display: none; }
.volume .range::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--fill) var(--p), var(--track) var(--p)); }
.volume .range::-moz-range-track { background: var(--track); }
@media (max-width: 1199px), (pointer: coarse) {
  .pb-wide-only { display: none; }
  .volume { width: auto; min-width: 0; }
  .volume-track { display: none; position: absolute; right: 0; bottom: calc(100% + var(--sp-3)); width: 240px; padding: var(--sp-2) var(--sp-3); gap: var(--sp-2); border-radius: var(--r-md); background: var(--menu-bg); box-shadow: 0 18px 50px var(--scrim), 0 0 0 1px var(--line); z-index: var(--z-overlay); max-width: calc(100vw - 2 * var(--sp-3)); box-sizing: border-box; }
  .volume.open .volume-track { display: flex; }
  .volume-pop-mute { display: grid; }
  .volume .range { flex: 1; min-width: 160px; height: 32px; --fill: var(--accent); --track: var(--line-strong); }
  .volume .range::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(to right, var(--accent) var(--p), var(--line-strong) var(--p)); }
  .volume .range::-moz-range-track { height: 6px; background: var(--line-strong); }
  .volume .range::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; opacity: 1; }
  .volume .range::-moz-range-thumb { width: 24px; height: 24px; opacity: 1; }
  .volume .range { touch-action: none; }
}
.q-heading { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-caption); font-weight: 750; }
.q-heading a { color: var(--text-2); font-weight: 600; }
.q-heading a:hover { color: var(--text); text-decoration: underline; }
.q-from { color: var(--text-3); font-weight: 500; }
.q-heading-row { display: flex; align-items: center; justify-content: space-between; }
.q-heading-row .text-btn { margin-top: var(--sp-3); font-size: var(--fs-caption); }
.q-current { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2); border-radius: var(--r-sm); background: var(--hover); }
.q-current .q-title { color: var(--accent); }
.q-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.q-row { position: relative; display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-2) var(--sp-2) 2px; border-radius: var(--r-sm); background: var(--bg-2); transition: background 0.12s, transform 0.15s; cursor: default; }
.q-row:hover { background: var(--hover); }
.q-row.dragging { z-index: var(--z-raised); background: var(--surface-3); box-shadow: var(--shadow); transition: none; }
.q-handle { display: grid; place-items: center; width: 22px; height: 32px; padding: 0; border: 0; background: none; color: var(--text-3); cursor: grab; touch-action: none; opacity: 0.5; }
.q-row:hover .q-handle { opacity: 1; }
.q-row.dragging .q-handle { cursor: grabbing; }
.q-text { flex: 1; min-width: 0; }
.q-title { font-size: var(--fs-caption); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-sub { display: block; font-size: var(--fs-caption); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-remove, .q-more { width: 30px; height: 30px; opacity: 0; }
.q-row:hover .q-remove, .q-row:hover .q-more, .q-row:focus-within .q-remove, .q-row:focus-within .q-more { opacity: 1; }
@media (hover: none) { .q-remove { display: none; } .q-more { opacity: 1; } .q-handle { opacity: 1; } }
.q-end, .q-more-count { margin-top: var(--sp-4); font-size: var(--fs-caption); }

.lyrics { position: relative; }
.ly-lines { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-4) 0 40vh; }
.ly-line { display: block; width: 100%; padding: var(--sp-1) 0; border: 0; background: none; text-align: left; font-weight: 750; letter-spacing: -0.015em; color: var(--text-3); cursor: pointer; transition: color 0.25s, opacity 0.25s; }
.lyrics.small .ly-line { font-size: var(--fs-section); line-height: 1.35; }
.ly-line.past { color: var(--text-2); }
.ly-line.current { color: var(--text); }
.ly-line:hover { color: var(--text); }
.ly-plain { white-space: pre-wrap; font-size: var(--fs-body); line-height: 1.75; color: var(--text-2); padding-top: var(--sp-3); }
.ly-credit { margin-top: var(--sp-5); font-size: var(--fs-caption); color: var(--text-3); }
.ly-loading { padding-top: var(--sp-5); }
.ly-loading .sk-line { height: 18px; margin: var(--sp-4) 0; }

.info { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-3); }
.info-cover { width: 100% !important; height: auto !important; aspect-ratio: 1; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: var(--sp-2); }
.info-title { font-size: var(--fs-section); font-weight: 800; letter-spacing: -0.02em; }
.info-artists { color: var(--text-2); font-weight: 600; }
.info-line { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-caption); color: var(--text-2); }
.info-line:hover { color: var(--text); }
.info-line a:hover { text-decoration: underline; }
.info-heading { margin-top: var(--sp-4); font-size: var(--fs-caption); font-weight: 750; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.info-yt { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--radius); background: var(--surface); }
.info-yt:hover { background: var(--surface-2); }
.info-yt .icon { color: #ff3b30; }
.info-yt span { min-width: 0; display: flex; flex-direction: column; }
.info-yt strong { font-size: var(--fs-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-yt small { color: var(--text-2); font-size: var(--fs-caption); }
.info .btn { align-self: flex-start; margin-top: var(--sp-1); }


.q-by { display: block; color: var(--accent); font-size: var(--fs-caption); }
.playerbar.track-change .pb-art, .playerbar.track-change .pb-text { animation: fade-swap 0.35s var(--ease); }
@keyframes fade-swap { from { opacity: 0; transform: translateY(4px); } }
.panel-toggle { position: relative; }
.panel-toggle.is-active { color: var(--accent); }
.panel-toggle.is-active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }

@media (max-width: 1099px) {
  .playerbar { grid-template-columns: minmax(160px, 1fr) minmax(0, 1.6fr) auto; }
  .pb-right .btn-icon[aria-label="À propos du titre"] { display: none; }
}

@media (max-width: 767px) {
  /* Mini-lecteur */
  .playerbar { margin: 0 var(--sp-2) var(--sp-2); height: 60px; display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2); border-radius: var(--r-md); background: rgb(var(--aura-dark, 44, 48, 60)); transition: background 0.6s; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); overflow: hidden; margin-left: calc(var(--sp-2) + var(--safe-left)); margin-right: calc(var(--sp-2) + var(--safe-right)); }
  .pb-now { flex: 1; gap: var(--sp-3); cursor: pointer; touch-action: pan-y; }
  .pb-track { flex: 1; gap: var(--sp-3); touch-action: pan-y; }
  .pb-art { box-shadow: none; }
  .pb-art .cover { --size: 44px !important; width: 44px; height: 44px; }
  .pb-title { font-size: var(--fs-caption); color: var(--white); }
  .pb-artists { font-size: var(--fs-caption); color: rgba(255, 255, 255, 0.72); }
  .pb-artists a { pointer-events: none; }
  .pb-title a { pointer-events: none; }
  .pb-text { flex: 1; }
  .pb-like { flex: none; margin-right: calc(var(--sp-2) * -1); }
  .pb-like .btn-icon { width: 40px; height: 40px; color: rgba(255, 255, 255, 0.85); }
  .pb-center, .pb-right { display: none; }
  .mini-play { display: grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 0; background: none; color: var(--white); }
  .pb-progress { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, 0.2); }
  .pb-progress span { display: block; height: 100%; width: 0; border-radius: 1px; background: var(--white); }
}
