/* VibePlayer — feuille de style maison (aucune bibliothèque tierce). */

:root {
    --bg: #14121f;
    --bg-elev: #1b1830;
    --panel: #221f3a;
    --panel-hover: #2b2748;
    --text: #eceaf7;
    --muted: #9a96b8;
    --accent: #8b6cff;
    --accent-strong: #a58cff;
    --accent-contrast: #ffffff;
    --heart: #ff5fa2;
    --star: #ffc857;
    --line: #2e2a4b;
    --danger: #ff5d73;
    --ok: #4cd6a0;
    --shadow: 0 8px 28px rgba(0, 0, 0, .45);
    --radius: 10px;
    --sidebar-w: 232px;
    --player-h: 88px;
    --tabbar-h: 56px;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) { --bg: #f6f5fb; --bg-elev: #ffffff; --panel: #ffffff; --panel-hover: #efecfa; --text: #1d1a33; --muted: #6a6688; --accent: #6b4df0; --accent-strong: #5a3cde; --line: #e1ddf1; --shadow: 0 8px 28px rgba(30, 20, 80, .15); color-scheme: light; }
}

:root[data-theme="light"] { --bg: #f6f5fb; --bg-elev: #ffffff; --panel: #ffffff; --panel-hover: #efecfa; --text: #1d1a33; --muted: #6a6688; --accent: #6b4df0; --accent-strong: #5a3cde; --line: #e1ddf1; --shadow: 0 8px 28px rgba(30, 20, 80, .15); color-scheme: light; }

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
a.link:hover, .link-btn:hover { text-decoration: underline; color: var(--accent-strong); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 1.8rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
h1:focus { outline: none; }
p { margin: 0 0 .6em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.upper { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.center { display: flex; justify-content: center; margin: 1.2rem 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }

input[type="text"], input[type="password"], input[type="search"], input[type="number"], select {
    background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; font: inherit; min-width: 0;
}
input[type="file"] { color: var(--muted); }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* Chargement */
.boot { height: 100dvh; display: grid; place-items: center; }
.loading-progress { width: 7rem; height: 7rem; }
.loading-progress circle { fill: none; stroke: var(--line); stroke-width: .6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: var(--accent); stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%; transition: stroke-dasharray .05s ease-in-out; }
.loading-progress-text { position: absolute; text-align: center; font-weight: bold; inset: calc(50% + 4.5rem) 0 auto 0; color: var(--muted); }
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "…"); }

#blazor-error-ui { background: var(--danger); color: #fff; bottom: 0; display: none; left: 0; padding: .6rem 1.2rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: .45rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; font-weight: 600; transition: background .12s; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--panel-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn.primary:hover:not(:disabled) { background: var(--accent-strong); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn.small { padding: .3rem .75rem; font-size: .85rem; }
.btn.block { display: flex; width: 100%; justify-content: center; }
.btn:disabled, .icon-btn:disabled { opacity: .45; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 50%; color: var(--muted); padding: 0; }
a.icon-btn { display: inline-grid; }
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--panel-hover); }
.icon-btn.active { color: var(--accent-strong); }
.icon-btn.fav-on { color: var(--heart); }
.link-btn { background: none; border: 0; color: var(--muted); padding: .2rem .4rem; }
.link-btn.active { color: var(--text); font-weight: 700; }
.icon { flex: none; vertical-align: middle; }

/* Layout principal */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--player-h); height: 100dvh; }
.sidebar { grid-row: 1; background: var(--bg-elev); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1rem .75rem; gap: 1rem; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; padding: .2rem .5rem; letter-spacing: -.01em; }
.brand.big { font-size: 1.5rem; justify-content: center; margin-bottom: 1rem; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #1e1b4b, var(--accent)); color: #fff; }
.nav { display: flex; flex-direction: column; gap: .15rem; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 8px; color: var(--muted); font-weight: 600; }
.nav a:hover { background: var(--panel-hover); color: var(--text); }
.nav a.active { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.nav a.active .icon { color: var(--accent-strong); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--muted); }
.user-chip { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { grid-row: 1; grid-column: 2; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.25rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.search { flex: 1; display: flex; align-items: center; gap: .5rem; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 999px; padding: 0 .9rem; max-width: 560px; color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; padding: .6rem 0; outline: none; color: var(--text); }
.menu-btn { display: none; }
.content { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem 2rem; min-height: 0; }
.banner { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .5rem 1rem; background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }

/* En-têtes de page */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filter { min-width: 200px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 .6rem; }
.section-head h2 { margin: 0; }
section { margin-bottom: 1rem; }

.hero { display: flex; gap: 1.5rem; align-items: flex-end; margin-bottom: 1.5rem; flex-wrap: wrap; }
.hero-cover, .hero .cover { width: 220px; height: 220px; border-radius: 12px; box-shadow: var(--shadow); object-fit: cover; flex: none; }
.hero-info { flex: 1; min-width: 240px; }
.hero-info h1 { font-size: 2.2rem; }
.hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.hero.compact .playlist-icon.big { width: 160px; height: 160px; }
.disc-title { margin: 1rem 0 .3rem; color: var(--muted); }

/* Pochettes */
.cover { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--panel); }
.cover.mini { width: 40px; height: 40px; border-radius: 5px; flex: none; }
.cover-placeholder { display: grid; place-items: center; color: var(--muted); background: linear-gradient(135deg, var(--panel), var(--panel-hover)); }

/* Grilles et rails */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem 1rem; }
.rail { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .6rem; scroll-snap-type: x proximity; }
.rail .album-card { flex: 0 0 170px; scroll-snap-align: start; }
.album-card { position: relative; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.album-link { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.album-link .cover { transition: transform .2s; }
.album-card:hover .cover { transform: scale(1.03); }
.album-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .3rem; }
.album-artist { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-play { position: absolute; right: 10px; top: calc(100% - 4.9rem); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; opacity: 0; transform: translateY(8px); transition: .15s; box-shadow: var(--shadow); }
.album-card:hover .card-play, .card-play:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .card-play { display: none; } }

.artist-list { display: flex; flex-direction: column; }
.artist-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: .9rem; padding: .55rem .6rem; border-radius: 10px; }
.artist-row:hover { background: var(--panel-hover); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--heart)); color: #fff; font-weight: 800; }
.artist-name { font-weight: 700; }

.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.playlist-card { display: flex; flex-direction: column; gap: .35rem; padding: 1rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.playlist-card:hover { background: var(--panel-hover); }
.playlist-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--heart)); color: #fff; }
.playlist-icon.big { border-radius: 14px; }
.playlist-name { font-weight: 700; }

/* Liste de titres */
.tracks { display: flex; flex-direction: column; }
.track-head, .track-row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: .6rem; padding: .35rem .5rem; }
.track-head { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); position: sticky; top: -1px; background: var(--bg); z-index: 2; }
.track-row { border-radius: 8px; position: relative; }
.track-row:hover { background: var(--panel-hover); }
.track-row.current { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.track-row.current .name { color: var(--accent-strong); }
.track-row.drag-over, .queue-row.drag-over { box-shadow: inset 0 2px 0 var(--accent); }
.c-index { text-align: center; color: var(--muted); position: relative; min-height: 28px; display: grid; place-items: center; }
.c-index .play-hover { position: absolute; inset: 0; border: 0; background: transparent; display: none; place-items: center; color: var(--text); }
.track-row:hover .c-index .idx { visibility: hidden; }
.track-row:hover .c-index .play-hover { display: grid; }
.c-title { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.title-text { display: flex; flex-direction: column; min-width: 0; }
.name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.sub { display: none; color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracks.has-sub .sub, .tracks .c-title .sub:only-child { display: block; }
.c-artist, .c-album { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-time { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.c-menu { position: relative; }
.menu-backdrop { position: fixed; inset: 0; z-index: 20; }
.menu { position: absolute; right: 0; top: 100%; z-index: 21; min-width: 210px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: .3rem; display: flex; flex-direction: column; }
.menu button { display: flex; align-items: center; gap: .6rem; background: none; border: 0; text-align: left; padding: .5rem .7rem; border-radius: 6px; }
.menu button:hover:not(:disabled) { background: var(--panel-hover); }
.menu button:disabled { opacity: .4; }
.menu .danger { color: var(--danger); }
.track-row:nth-last-child(-n+3) .menu { top: auto; bottom: 100%; }

/* Étoiles */
.stars { display: inline-flex; gap: 1px; color: var(--line); }
.star { position: relative; display: inline-grid; width: 14px; height: 14px; }
.star .icon, .star .star-fill { grid-area: 1 / 1; }
.star-fill { overflow: hidden; width: 0; color: var(--star); display: block; }
.star.on .star-fill { width: 100%; }
.star.half .star-fill { width: 50%; }
.star-bg { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.star-hit { position: absolute; top: -2px; bottom: -2px; width: 50%; border: 0; background: transparent; padding: 0; cursor: pointer; }
.star-hit.left { left: 0; }
.star-hit.right { right: 0; }
.stars.readonly .star-hit { display: none; }
.c-rating .stars { opacity: .55; transition: opacity .12s; }
.track-row:hover .c-rating .stars, .c-rating .stars:focus-within { opacity: 1; }
.track-row .stars .star-fill { opacity: 1; }

/* Lecteur */
.player { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(300px, 2fr) minmax(180px, 1fr); align-items: center; gap: 1rem; padding: .6rem 1rem; background: var(--bg-elev); border-top: 1px solid var(--line); z-index: 5; }
.player-track { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.player-track .cover { width: 56px; height: 56px; border-radius: 6px; flex: none; }
.cover-btn { border: 0; background: none; padding: 0; border-radius: 6px; flex: none; }
.player-meta { display: flex; flex-direction: column; min-width: 0; }
.player-center { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 0; position: relative; }
.transport { display: flex; align-items: center; gap: .4rem; }
.play-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); display: grid; place-items: center; transition: transform .1s; }
.play-btn:hover:not(:disabled) { transform: scale(1.06); }
.play-btn:disabled { opacity: .4; }
.play-btn.large { width: 64px; height: 64px; }
.seek { display: flex; align-items: center; gap: .6rem; width: 100%; max-width: 640px; }
.seek input { flex: 1; }
.time { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.6rem; text-align: center; }
.buffering { position: absolute; bottom: -.9rem; font-size: .72rem; color: var(--muted); }
.player-right { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; }
.volume { width: 100px; }

input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; height: 20px; cursor: pointer; --pct: 0%; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--pct), var(--line) var(--pct)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--pct), var(--line) var(--pct)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: var(--text); opacity: 0; transition: opacity .1s; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); opacity: 0; }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type="range"]:hover::-moz-range-thumb, input[type="range"]:focus-visible::-moz-range-thumb { opacity: 1; }
input[type="range"].vertical { writing-mode: vertical-lr; direction: rtl; width: 20px; height: 120px; }
input[type="range"].vertical::-webkit-slider-runnable-track { width: 4px; height: auto; background: var(--line); }
input[type="range"].vertical::-webkit-slider-thumb { opacity: 1; margin-top: 0; margin-left: -4px; }

/* « En cours de lecture » plein écran */
.nowplaying { position: fixed; inset: 0; z-index: 50; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 28%, var(--bg)), var(--bg) 60%); display: flex; flex-direction: column; padding: .75rem 1.25rem 1.5rem; overflow-y: auto; }
.nowplaying header { display: flex; align-items: center; justify-content: space-between; }
.np-body { display: flex; gap: 2.5rem; align-items: center; justify-content: center; flex: 1; flex-wrap: wrap; padding: 1rem 0; }
.np-cover { width: min(70vw, 420px); height: min(70vw, 420px); border-radius: 14px; box-shadow: var(--shadow); }
.np-info { width: min(100%, 460px); }
.np-info h2 { font-size: 1.8rem; }
.np-actions { display: flex; align-items: center; gap: .6rem; margin: .8rem 0; }
.seek.big { max-width: none; margin: 1rem 0; }
.transport.big { justify-content: space-between; }
.lyrics { margin-top: 1.5rem; max-height: 30vh; overflow-y: auto; }
.lyrics pre { white-space: pre-wrap; font: inherit; color: var(--muted); margin: 0; }

/* Dialogues */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: grid; place-items: center; z-index: 60; padding: 1rem; }
.dialog { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); width: min(520px, 100%); max-height: 90dvh; display: flex; flex-direction: column; }
.dialog.wide { width: min(780px, 100%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem .4rem 1.25rem; }
.dialog-head h2 { margin: 0; }
.dialog-body { padding: .5rem 1.25rem 1.25rem; overflow-y: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.picker-list { display: flex; flex-direction: column; margin-bottom: 1rem; max-height: 40dvh; overflow-y: auto; }
.picker-item { display: flex; align-items: center; gap: .7rem; background: none; border: 0; padding: .6rem .7rem; border-radius: 8px; text-align: left; }
.picker-item:hover { background: var(--panel-hover); }
.picker-item small { margin-left: auto; }
.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 160px; }

.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; margin: 0; }
.shortcuts dt { white-space: nowrap; }
.shortcuts dd { margin: 0; color: var(--muted); }
kbd { background: var(--panel); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: .05rem .4rem; font-size: .8rem; }

.toasts { position: fixed; bottom: calc(var(--player-h) + 14px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 100; pointer-events: none; }
.toast { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .6rem 1.1rem; box-shadow: var(--shadow); animation: pop .15s ease-out; }
.toast.success { border-color: var(--ok); }
.toast.error { border-color: var(--danger); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }

/* Formulaires, cartes, tableaux */
.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--accent) 30%, transparent), transparent), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--bg-elev); border: 1px solid var(--line); border-radius: 16px; padding: 1.75rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .9rem; }
.auth-card h1 { text-align: center; font-size: 1.4rem; }
label { display: flex; flex-direction: column; gap: .3rem; }
label > span { color: var(--muted); font-size: .85rem; }
.form-error { color: var(--danger); margin: 0; }
.lang-switch { display: flex; justify-content: center; gap: .4rem; }
.card, .card-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.card-form { display: flex; flex-direction: column; gap: .8rem; max-width: 420px; background: transparent; border: 0; padding: .5rem 0; }
.card h2 { margin-bottom: .8rem; }
.settings { max-width: 760px; }
.row { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row > span:first-child { color: var(--text); font-size: 1rem; }
.range-wrap { display: flex; align-items: center; gap: .6rem; min-width: 200px; }
.range-wrap input { flex: 1; }
.presets { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.eq { display: flex; justify-content: space-between; gap: .3rem; }
.eq-band { align-items: center; gap: .4rem; }
.eq-band output, .eq-band span { font-size: .75rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; align-items: end; }
.form-grid .span2 { grid-column: span 2; }
.check { flex-direction: row; align-items: center; gap: .5rem; }
.rule-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; flex-wrap: wrap; }
.rule-row > * { flex: 1 1 140px; }
.rule-row .icon-btn { flex: none; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
table.data th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
table.data .actions { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; padding: 3rem 1rem; color: var(--muted); }

/* File d'attente */
.queue-list { list-style: none; margin: 0; padding: 0; }
.queue-row { display: flex; align-items: center; gap: .3rem; border-radius: 8px; }
.queue-row:hover { background: var(--panel-hover); }
.queue-row.current { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.queue-row.current .name { color: var(--accent-strong); }
.q-main { flex: 1; display: grid; grid-template-columns: 34px 40px minmax(0, 1fr) auto; align-items: center; gap: .7rem; text-align: left; background: none; border: 0; padding: .4rem .5rem; min-width: 0; }
.q-main .sub { display: block; }
.q-index { text-align: center; color: var(--muted); }
.q-actions { display: flex; opacity: .7; }

.tabbar { display: none; }

/* Mobile */
@media (max-width: 860px) {
    :root { --player-h: 138px; }
    .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--player-h) var(--tabbar-h); }
    .main { grid-column: 1; }
    .sidebar { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 82vw; max-width: 320px; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
    .app.menu-open .sidebar { transform: none; }
    .menu-btn { display: inline-grid; }
    .topbar { padding: .5rem .75rem; }
    .content { padding: 1rem .9rem 1.5rem; }
    .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); grid-row: 3; background: var(--bg-elev); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
    .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; color: var(--muted); }
    .tabbar a.active { color: var(--accent-strong); }
    .player { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: .35rem; padding: .5rem .8rem; }
    .player-track { grid-row: 1; }
    .player-center { grid-row: 2; }
    .player-right { display: none; }
    .player .seek { order: 2; }
    .transport { gap: 0; }
    .toasts { bottom: calc(var(--player-h) + var(--tabbar-h) + 10px); }
    .track-head { display: none; }
    .track-row { display: flex; }
    .track-row .c-title { flex: 1; }
    .c-index { width: 30px; }
    .c-artist, .c-album, .c-rating, .c-time { display: none; }
    .tracks .sub { display: block; }
    .hero { align-items: center; flex-direction: column; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-cover, .hero .cover { width: 200px; height: 200px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .rail .album-card { flex-basis: 140px; }
    .row { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
