/* Lecteur en bas de page. */
.player {
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) minmax(180px, 1fr); align-items: center; gap: 16px;
  padding: 0 18px; background: var(--bg-raised); border-top: 1px solid var(--line); position: relative;
}
.player-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-text { min-width: 0; }
.player-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-artist { color: var(--text-soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-controls { display: grid; gap: 4px; justify-items: center; }
.player-buttons { display: flex; align-items: center; gap: 10px; }
.round { width: 34px; height: 34px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: none; border-color: transparent; }
.round.play { width: 40px; height: 40px; background: var(--text); color: var(--bg); font-size: 15px; }
.player-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.time { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; min-width: 36px; text-align: center; }
.progress { flex: 1; height: 6px; background: var(--line); border-radius: 3px; cursor: pointer; position: relative; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; }
.progress:hover .progress-fill { background: var(--accent-strong); }
.player-extra { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.volume { width: 110px; padding: 0; accent-color: var(--accent); }
/* Survol du lecteur : bande de détails au-dessus (album, année, genre, format) */
.player-details {
  position: absolute; left: 0; right: 0; bottom: 100%; height: var(--player-more-height); z-index: 26;
  display: flex; align-items: center; gap: 14px; padding: 0 18px; overflow: hidden; white-space: nowrap;
  background: var(--bg-raised); border-top: 1px solid var(--line); font-size: 13px; color: var(--text-soft);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .15s, transform .15s;
}
body[data-player="open"] .player-details { opacity: 1; transform: none; pointer-events: auto; }
.player-details:empty { display: none; }
.details-album { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.details-part + .details-part::before, .details-album + .details-part::before { content: "·"; margin-right: 14px; color: var(--text-dim); }
body[data-queue="open"] .queue-toggle { color: var(--accent); }

/* File d'attente : panneau sur toute la largeur, au-dessus du lecteur (et de sa bande de détails) */
:root { --player-more-height: 34px; }
.queue-drawer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--playerbar) + var(--player-more-height)); z-index: 25;
  max-height: min(55vh, 520px); display: flex; flex-direction: column;
  background: var(--bg-raised); border-top: 1px solid var(--line); box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.35);
}
.queue-drawer[hidden] { display: none; }
.queue-head { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.queue-head h2 { margin: 0; font-size: 16px; }
.queue-count { color: var(--text-dim); font-size: 13px; margin-right: auto; }
.queue-actions { display: flex; gap: 8px; }
.queue-actions .link-button { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; font-size: 12px; letter-spacing: .03em; }
.queue-actions .link-button:disabled { opacity: .35; cursor: default; }
.queue-scroll { overflow-y: auto; }
.queue-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.queue-table th { position: sticky; top: 0; background: var(--bg-sunken); color: var(--text-dim); font-weight: 600; text-align: left;
                  font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; }
.queue-table td { padding: 6px 8px; border-top: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 0; }
.queue-row:hover { background: var(--bg-hover); }
.queue-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.queue-row.current { color: var(--accent-strong); font-weight: 600; }
.queue-row { cursor: grab; }                              /* toute la ligne se déplace : la main le dit */
.queue-row:active, .queue-row.dragging { cursor: grabbing; }
.queue-row a, .queue-row button { cursor: pointer; }
.queue-row.dragging { opacity: .4; }
.queue-row.drop-before td { box-shadow: inset 0 2px 0 var(--accent); }
.queue-row.drop-after td { box-shadow: inset 0 -2px 0 var(--accent); }
.queue-table .col-grip { width: 28px; cursor: grab; color: var(--text-dim); text-align: center; letter-spacing: -2px; }
.queue-table .col-num { width: 36px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.queue-table td.col-cover { width: 44px; padding: 3px 4px 3px 0; }
.queue-table th.col-cover { width: 44px; }
.col-cover img.cover { width: 32px; height: 32px; border-radius: 3px; display: block; }
.queue-row.current .col-num { color: var(--accent-strong); }
.queue-table .col-title { width: 30%; }
.queue-table .col-album, .queue-table .col-artist { width: 20%; }
.queue-table .col-album a { color: inherit; }
.queue-table .col-duration, .queue-table .col-year { width: 60px; font-variant-numeric: tabular-nums; }
.queue-table .col-genre { width: 110px; color: var(--text-soft); }
.queue-table .col-format { width: 120px; color: var(--text-soft); }
.queue-table .col-tool { width: 32px; text-align: center; }
.queue-row .col-tool .link-button { opacity: 0; }
.queue-row:hover .col-tool .link-button, .queue-row:focus-within .col-tool .link-button { opacity: 1; }
.queue-table tr.empty td { color: var(--text-dim); padding: 18px; max-width: none; }
@media (max-width: 900px) { .queue-table .col-genre, .queue-table .col-format, .queue-table .col-year { display: none; } }

/* Paroles */
.lyrics-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 4px; }
.lyrics-head h2 { margin: 0; font-size: 16px; }
.lyrics-song { padding: 0 14px 8px; color: var(--text-dim); font-size: 13px; border-bottom: 1px solid var(--line); }
.lyrics-body { position: relative; flex: 1; overflow-y: auto; padding: 30vh 18px; scroll-behavior: smooth; }
.lyric-line, .lyric-plain { margin: 0 0 14px; font-size: 19px; line-height: 1.35; font-weight: 600; }
.lyric-line { color: var(--text-dim); transition: color .25s, transform .25s; transform-origin: left center; }
.lyric-line.current { color: var(--text); transform: scale(1.06); }
.lyric-plain { color: var(--text); font-weight: 500; font-size: 17px; }
.lyrics-message { color: var(--text-dim); text-align: center; }
.lyrics-source { display: block; margin-top: 24px; color: var(--text-dim); font-size: 11px; }
body[data-lyrics="open"] .lyrics-toggle { color: var(--accent); }

/* Vidéo YouTube : en haut du panneau de droite (salon ou paroles en dessous), seulement pendant un titre YouTube.
   La fenêtre reste fixe (pas déplacée dans le DOM : le lecteur YouTube se rechargerait). */
:root { --video-height: calc(var(--chat-width) * 9 / 16); }
.video-window { display: none; position: fixed; top: var(--topbar); right: 0; z-index: 20;
                width: var(--chat-width); height: var(--video-height); background: #000; overflow: hidden;
                border-left: 1px solid var(--line); }
body[data-video="on"] .video-window { display: block; }
body[data-video="on"] .chat-panel, body[data-video="on"] .lyrics-panel { padding-top: var(--video-height); }
.video-window iframe, #video-frame { width: 100%; height: 100%; border: 0; display: block; }
/* un seul lecteur officiel visible : celui de YouTube ou celui de SoundCloud */
body[data-video-source="soundcloud"] #video-frame { display: none; }
body[data-video-source="youtube"] .video-window .soundcloud-frame { display: none; }
/* Écran étroit, sans colonne de droite : petite fenêtre au-dessus du lecteur */
@media (max-width: 820px) {
  .video-window { top: auto; right: 16px; bottom: calc(var(--playerbar) + 12px); z-index: 40;
                  width: 356px; height: 200px; border: 0; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
}

/* anecdotes, au-dessus des paroles */
.facts-box { display: flex; gap: 10px; align-items: flex-start; margin: 10px 14px 0; padding: 10px 12px; text-align: left;
             background: var(--bg-hover); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; }
.fact-photo { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }
.fact-words { display: grid; gap: 3px; min-width: 0; }
.fact-kind { color: var(--accent-strong); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.fact-text { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text-soft); }
