/* LT-Music — thème sombre, angles presque droits (2–3 px). */

:root {
  --bg: #0b0c0e;
  --panel: #111215;
  --raised: #17191d;
  --hover: #1f2227;
  --line: #24272d;
  --line-2: #32363e;
  --text: #eceef1;
  --muted: #979ea8;
  --faint: #626873;
  --accent: #e8303f;
  --accent-hi: #ff4f5c;
  --accent-dim: color-mix(in srgb, var(--accent) 38%, transparent);
  --accent-ink: #ffffff;
  --err: #ff4d4f;

  --r: 3px;
  --r-sm: 2px;
  --side: 240px;
  --player: 88px;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; text-decoration: none; }
img { display: block; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: square; stroke-linejoin: miter;
}

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.kicker {
  font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------ grille */

.app {
  display: grid; height: 100vh; height: 100dvh;
  grid-template-columns: var(--side) minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "side main queue" "player player player";
}

/* ------------------------------------------------------ barre latérale */

.side {
  grid-area: side; min-height: 0;
  display: flex; flex-direction: column;
  padding: 18px 12px 12px;
  background: var(--panel); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 20px; }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--r);
}
.brand-mark .i { width: 18px; height: 18px; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 12px; border-radius: var(--r);
  color: var(--muted); font-weight: 600;
}
.nav a:hover { color: var(--text); background: var(--hover); }
.nav a.on { color: var(--text); background: var(--raised); }
.nav a.on::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--accent);
}

.side-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 6px; padding: 0 4px 0 12px;
  font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.side-pls { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow-y: auto; }
.side-pls a {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px;
  border-radius: var(--r); color: var(--muted); font-size: 13.5px;
}
.side-pls a:hover { color: var(--text); background: var(--hover); }
.side-pls a.on { color: var(--text); background: var(--raised); }
.side-pls .n { margin-left: auto; font: 11px var(--mono); color: var(--faint); }
.side-pls .none { padding: 6px 12px; color: var(--faint); font-size: 13px; }

.side-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.side-user {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 10px;
  border-radius: var(--r); font-weight: 650; text-align: left;
}
.side-user:hover { background: var(--hover); }
.side-user .i { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
.av {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--r-sm);
  font-weight: 800; font-size: 13px;
}
.av.lg { width: 56px; height: 56px; font-size: 24px; }

/* ------------------------------------------------------------ contenu */

.main { grid-area: main; min-height: 0; overflow-y: auto; position: relative; }
.topbar {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 12px; padding: 14px 32px;
  background: rgba(11, 12, 14, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .15s;
}
.main.scrolled .topbar { border-bottom-color: var(--line); }
.arrows { display: flex; gap: 4px; }
.search {
  flex: 1; max-width: 560px; height: 42px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r);
  color: var(--muted); transition: border-color .12s;
}
.search:focus-within { border-color: var(--accent); color: var(--text); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); }
kbd {
  font: 11px/1 var(--mono); color: var(--faint);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 3px 6px;
}
.search:focus-within kbd { display: none; }

.view { padding: 10px 32px 48px; min-height: calc(100% - 71px); }
.view.enter { animation: viewin .18s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(4px); } }

/* ------------------------------------------------------------ boutons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; white-space: nowrap;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--raised); font-weight: 650; font-size: 13px;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--hover); border-color: var(--faint); }
.btn .i { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.ghost { background: transparent; }
.btn.danger:hover { color: var(--err); border-color: var(--err); }
.btn.icon { width: 38px; padding: 0; }

.ib {
  width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none;
  border-radius: var(--r); color: var(--muted); transition: color .12s, background .12s;
}
.ib:hover { color: var(--text); background: var(--hover); }
.ib.sm { width: 28px; height: 28px; }
.ib.sm .i { width: 16px; height: 16px; }
.ib.on { color: var(--accent); }
.ib.on:hover { color: var(--accent-hi); }
.ib.dot { position: relative; }
.ib.dot::after {
  content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px;
  margin-left: -2px; background: var(--accent);
}

.like .i-fill { display: none; }
.like.on .i-empty { display: none; }
.like.on .i-fill { display: block; }
.like.on { color: var(--accent); }

.play-btn {
  width: 40px; height: 40px; display: grid; place-items: center; flex: none;
  border-radius: var(--r); background: var(--accent); color: var(--accent-ink);
  transition: background .12s, transform .08s;
}
.play-btn:hover { background: var(--accent-hi); }
.play-btn:active { transform: scale(.95); }
.play-btn .i { width: 18px; height: 18px; }

.spin {
  width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: var(--muted); font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.link:hover { color: var(--accent); }

/* ------------------------------------------------------------ sections */

.sec { margin: 6px 0 36px; }
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.sec-head h2 { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.015em; }

.page-title { font-size: 34px; font-weight: 800; letter-spacing: -.025em; margin: 8px 0 20px; }

/* ------------------------------------------------------------ accueil */

.hero {
  position: relative; overflow: hidden;
  margin: 6px 0 36px; padding: 30px 32px 28px;
  border: 1px solid var(--line); border-radius: var(--r);
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 0%, transparent) 55%),
    var(--panel);
}
.hero h1 { margin: 10px 0 8px; font-size: 40px; line-height: 1.05; font-weight: 850; letter-spacing: -.035em; }
.hero p { margin: 0; max-width: 560px; color: var(--muted); }
.hero .actions { margin: 20px 0 0; }
.hero-bars {
  position: absolute; right: 32px; bottom: 0; display: flex; align-items: flex-end; gap: 8px;
  height: 100%; padding-top: 30px; opacity: .9; pointer-events: none;
}
.hero-bars i { width: 16px; background: var(--accent); animation: bar 1.6s ease-in-out infinite alternate; }
.hero-bars i:nth-child(1) { height: 38%; animation-delay: -.2s; }
.hero-bars i:nth-child(2) { height: 72%; animation-delay: -.9s; }
.hero-bars i:nth-child(3) { height: 52%; animation-delay: -.5s; }
.hero-bars i:nth-child(4) { height: 88%; animation-delay: -1.3s; }
.hero-bars i:nth-child(5) { height: 30%; animation-delay: -.7s; }
@keyframes bar { to { transform: scaleY(.55); } }
.hero-bars i { transform-origin: bottom; }
.stats-line { margin-top: 18px !important; font: 11.5px/1.5 var(--mono); color: var(--faint) !important; }
.stats-line .sq { display: inline-block; width: 7px; height: 7px; background: var(--accent); margin-right: 6px; vertical-align: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r); color: var(--muted); font-weight: 600; font-size: 13px;
}
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip .i { width: 15px; height: 15px; }

/* ------------------------------------------------------------ cartes */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 6px; margin: 0 -10px; }
.card {
  display: block; min-width: 0; padding: 10px; border-radius: var(--r);
  cursor: pointer; transition: background .12s;
}
.card:hover { background: var(--raised); }
.card-cv {
  position: relative; aspect-ratio: 1; overflow: hidden; margin-bottom: 10px;
  background: var(--raised); border-radius: var(--r-sm);
}
.card-cv img { width: 100%; height: 100%; object-fit: cover; }
.card-play {
  position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: var(--r);
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s, background .12s;
}
.card-play:hover { background: var(--accent-hi); }
.card-play .i { width: 18px; height: 18px; }
.card:hover .card-play, .card:focus-within .card-play { opacity: 1; transform: none; }
.card-t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-s { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-s .tag { font: 600 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; }

.mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic.one { grid-template-columns: 1fr; }
.ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--hover), var(--raised)); color: var(--faint);
}
.ph .i { width: 36%; height: 36%; stroke-width: 1.4; }
.ph.likes { background: linear-gradient(135deg, var(--accent-hi), color-mix(in srgb, var(--accent) 55%, #000)); color: #fff; }
.ph.likes .i { stroke-width: 1.6; }

/* ------------------------------------------------------ en-têtes de page */

.head { display: flex; align-items: flex-end; gap: 26px; padding: 14px 0 24px; }
.head-cover {
  width: 208px; aspect-ratio: 1; flex: none; overflow: hidden;
  background: var(--raised); border-radius: var(--r-sm);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5);
}
.head-cover img { width: 100%; height: 100%; object-fit: cover; }
.head-txt { min-width: 0; }
.head h1 {
  margin: 10px 0 12px; font-size: 46px; line-height: 1.04; font-weight: 850; letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.head h1.long { font-size: 34px; }
.head-sub { color: var(--muted); }
.head-sub a { color: var(--text); font-weight: 650; }
.head-sub a:hover { text-decoration: underline; }
.head-sub .dot { margin: 0 6px; color: var(--faint); }
.head-desc { margin: 10px 0 0; color: var(--muted); font-size: 13px; max-width: 640px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }

/* ------------------------------------------------------ listes de titres */

.tl { display: flex; flex-direction: column; }
.tl-row, .tl-head {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 40px minmax(0, 1.5fr) minmax(0, 1fr) 36px 70px 36px;
  padding: 0 8px;
}
.tl.no-album .tl-row, .tl.no-album .tl-head { grid-template-columns: 40px minmax(0, 1fr) 36px 70px 36px; }
.tl-head {
  height: 34px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
  font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.tl-head .r { text-align: right; }
.tl-head .c { text-align: center; }
.tl-row { height: 58px; border-radius: var(--r); cursor: pointer; }
.tl-row:hover { background: var(--raised); }
.tl-row.failed { opacity: .45; }

.tl-n { display: grid; place-items: center; color: var(--muted); font: 13px var(--mono); }
.tl-n > * { grid-area: 1 / 1; }
.tl-n .p, .tl-n .eq { display: none; }
.tl-n .p .i { width: 16px; height: 16px; color: var(--text); }
.tl-row:hover .tl-n .n, .tl-row.on .tl-n .n { visibility: hidden; }
.tl-row:hover .tl-n .p { display: block; }
.tl-row.on:not(:hover) .tl-n .eq { display: flex; }

.eq { align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 35%; background: var(--accent); }
body.is-playing .eq i { animation: eq .8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.35s; height: 70%; }
.eq i:nth-child(3) { animation-delay: -.6s; height: 50%; }
@keyframes eq { 0% { height: 20%; } 100% { height: 100%; } }

.tl-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tl-main img { width: 42px; height: 42px; flex: none; object-fit: cover; background: var(--raised); border-radius: var(--r-sm); }
.tl-txt { min-width: 0; }
.tl-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-row.on .tl-title { color: var(--accent); }
.tl-sub, .tl-album { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-sub a:hover, .tl-album a:hover { color: var(--text); text-decoration: underline; }
.tl-dur {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  color: var(--muted); font: 12.5px var(--mono); font-variant-numeric: tabular-nums;
}
.disk { display: inline-block; width: 6px; height: 6px; background: var(--accent); flex: none; }
.tl-row .like:not(.on), .tl-row .more { opacity: 0; }
.tl-row:hover .like, .tl-row:hover .more, .tl-row .more:focus-visible, .tl-row .like:focus-visible { opacity: 1; }
.tl-row.dragging { opacity: .35; }
.tl-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.tl-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.tl-more { margin-top: 10px; }

/* ------------------------------------------------------------ onglets */

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 26px; }
.tab {
  height: 32px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  color: var(--muted); font-weight: 650; font-size: 13px;
}
.tab:hover { color: var(--text); border-color: var(--faint); }
.tab.on { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ------------------------------------------------------------ états */

.empty {
  padding: 44px 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line-2); border-radius: var(--r);
}
.empty .ph { width: 56px; height: 56px; margin: 0 auto; border-radius: var(--r-sm); }
.empty h3 { margin: 14px 0 6px; color: var(--text); font-size: 18px; }
.empty p { margin: 0 auto; max-width: 420px; }
.empty .btn { margin-top: 18px; }

.sk {
  background: linear-gradient(90deg, var(--raised) 25%, var(--hover) 50%, var(--raised) 75%);
  background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: var(--r-sm);
}
@keyframes sk { to { background-position: -200% 0; } }
.sk-row { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 8px; }
.sk-row .a { width: 42px; height: 42px; }
.sk-row .b { height: 12px; width: 38%; }
.sk-row .c { height: 10px; width: 22%; margin-top: 8px; }

.err-box {
  padding: 18px 20px; border: 1px solid rgba(255, 77, 79, .45); border-left: 3px solid var(--err);
  border-radius: var(--r); background: rgba(255, 77, 79, .06);
}
.err-box h3 { margin: 0 0 4px; font-size: 15px; }
.err-box p { margin: 0; color: var(--muted); }
.err-box .btn { margin-top: 12px; }

/* ------------------------------------------------------------ lecteur */

.player {
  grid-area: player; position: relative; height: var(--player);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center; gap: 18px; padding: 0 16px;
  background: var(--panel); border-top: 1px solid var(--line);
}
.pl-mini { display: none; }
.pl-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl-cover { width: 56px; height: 56px; flex: none; overflow: hidden; background: var(--raised); border-radius: var(--r-sm); }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-cover img:not([src]) { visibility: hidden; }
.pl-meta { min-width: 0; }
.pl-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-title a:hover, .pl-artist a:hover { text-decoration: underline; }
.pl-artist { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-artist.dl { color: var(--accent); font: 600 11.5px var(--mono); letter-spacing: .04em; }
.pl-artist.fail { color: var(--err); }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pl-ctrl { display: flex; align-items: center; gap: 10px; }
.pl-seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; }
.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }

.t { min-width: 40px; text-align: center; font: 11.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }

.bar { position: relative; flex: 1; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.bar-track { position: relative; width: 100%; height: 4px; background: var(--line-2); }
.bar-dl, .bar-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; }
.bar-dl { background: var(--accent-dim); }
.bar-fill { background: var(--text); }
.bar-knob {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px;
  background: var(--text); transform: translate(-50%, -50%); opacity: 0; transition: opacity .1s;
}
.bar:hover .bar-fill, .bar.drag .bar-fill, .bar:focus-visible .bar-fill { background: var(--accent); }
.bar:hover .bar-knob, .bar.drag .bar-knob, .bar:focus-visible .bar-knob { opacity: 1; }
.bar:focus-visible { outline-offset: 0; }
.bar.loading .bar-track {
  background: repeating-linear-gradient(-45deg, var(--line-2) 0 5px, var(--line) 5px 10px);
  background-size: 14.14px 14.14px; animation: stripes .5s linear infinite;
}
.bar.loading .bar-fill, .bar.loading .bar-knob { display: none; }
@keyframes stripes { to { background-position: 14.14px 0; } }
.bar.vol { flex: 0 0 100px; }

/* ------------------------------------------------------ file d'attente */

.queue {
  grid-area: queue; width: 350px; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line);
}
.q-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 12px 12px 20px; border-bottom: 1px solid var(--line);
}
.q-head h2 { margin: 0; font-size: 16px; font-weight: 750; }
.q-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 24px; }
.q-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 16px 8px 6px; font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.q-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  height: 54px; padding: 0 6px 0 8px; border-radius: var(--r); cursor: pointer;
}
.q-row:hover { background: var(--raised); }
.q-row.cur .q-t { color: var(--accent); }
.q-row img { width: 40px; height: 40px; object-fit: cover; background: var(--raised); border-radius: var(--r-sm); }
.q-t { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-a { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row .ib { opacity: 0; width: 30px; height: 30px; }
.q-row:hover .ib, .q-row .ib:focus-visible { opacity: 1; }
.q-row.dragging { opacity: .35; }
.q-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.q-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }

.st { width: 9px; height: 9px; border: 1.5px solid var(--faint); }
.st.ready { background: var(--accent); border-color: var(--accent); }
.st.dl {
  border-color: var(--accent);
  background: linear-gradient(to top, var(--accent) var(--p, 0%), transparent var(--p, 0%));
  animation: blink 1s steps(2) infinite;
}
.st.err { background: var(--err); border-color: var(--err); }
@keyframes blink { 50% { border-color: var(--accent-dim); } }

.q-opt {
  display: flex; align-items: flex-start; gap: 10px; margin: 20px 8px 0; padding-top: 16px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; cursor: pointer;
}
.q-opt input { appearance: none; width: 16px; height: 16px; flex: none; margin: 1px 0 0; border: 1.5px solid var(--faint); border-radius: var(--r-sm); cursor: pointer; }
.q-opt input:checked { background: var(--accent); border-color: var(--accent);
  box-shadow: inset 0 0 0 2.5px var(--panel); }
.q-legend { margin: 14px 8px 0; font: 11px/1.8 var(--mono); color: var(--faint); }
.q-legend .st { display: inline-block; vertical-align: -1px; margin-right: 5px; }
.q-legend span { margin-right: 12px; white-space: nowrap; }
.q-empty { margin: 8px; color: var(--faint); font-size: 13px; }

/* ------------------------------------------------------------ paroles */

.lyrics {
  grid-area: queue; position: relative; width: 380px; min-height: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), color-mix(in srgb, var(--accent) 0%, transparent) 35%), var(--panel);
  border-left: 1px solid var(--line);
}
.ly-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 6px 26px 0 22px; overscroll-behavior: contain; }
.ly-body:focus { outline: none; }
.ly-track { display: flex; align-items: center; gap: 12px; padding: 12px 0 22px; }
.ly-track img { width: 48px; height: 48px; flex: none; object-fit: cover; background: var(--raised); border-radius: var(--r-sm); }
.ly-t { font-weight: 700; }
.ly-a { color: var(--muted); font-size: 13px; }
.ly-line {
  position: relative; margin: 0; padding: 7px 0 7px 16px;
  font-size: 21px; line-height: 1.32; font-weight: 750; letter-spacing: -.01em;
  color: var(--faint); cursor: pointer; overflow-wrap: anywhere; transition: color .25s;
}
.ly-line.past { color: #474c54; }
.ly-line:hover { color: var(--muted); }
.ly-line.on { color: var(--text); }
.ly-line.on::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; background: var(--accent);
}
.ly-gap { display: flex; gap: 6px; padding: 16px 0 16px 16px; }
.ly-gap i { width: 7px; height: 7px; background: var(--line-2); transition: background .25s; }
.ly-gap.on i { background: var(--accent); animation: lygap 1.2s ease-in-out infinite; }
.ly-gap.on i:nth-child(2) { animation-delay: .2s; }
.ly-gap.on i:nth-child(3) { animation-delay: .4s; }
@keyframes lygap { 0%, 100% { opacity: .35; transform: scale(.75); } 50% { opacity: 1; transform: none; } }
.ly-pad { height: 55vh; }
.ly-note { margin: 0 0 14px; font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.ly-plain { padding-bottom: 36px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.ly-empty { margin: 8px 0 16px; color: var(--muted); }
.ly-sk { display: flex; flex-direction: column; gap: 18px; padding: 8px 0 0 16px; }
.ly-sk .sk { height: 18px; }
.ly-resync {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); background: var(--raised);
}

/* ------------------------------------------------------ lecteur plein écran */

.now {
  position: fixed; inset: 0; z-index: 40; overflow: hidden;
  display: flex; flex-direction: column; background: var(--bg);
  animation: nowin .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes nowin { from { transform: translateY(24px); opacity: 0; } }
.now-bg {
  position: absolute; inset: -15%; background-size: cover; background-position: center;
  filter: blur(80px) saturate(1.4); opacity: .32;
}
.now::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, var(--bg)); pointer-events: none; }
.now-head, .now-body { position: relative; z-index: 1; }
.now-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
.now-body {
  flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 20px;
  width: min(460px, 100% - 44px); margin: 0 auto; padding-bottom: max(28px, env(safe-area-inset-bottom));
}
.now-cover {
  width: 100%; max-height: 52vh; aspect-ratio: 1; object-fit: cover; align-self: center;
  background: var(--raised); border-radius: var(--r-sm); box-shadow: 0 28px 70px rgba(0, 0, 0, .6);
}
.now-info { display: flex; align-items: center; gap: 12px; }
.now-meta { flex: 1; min-width: 0; }
.now-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.now-artist { color: var(--muted); margin-top: 3px; }
.now-artist a:hover { color: var(--text); text-decoration: underline; }
.now-artist.dl { color: var(--accent); font: 600 12px var(--mono); }
.now-times { display: flex; justify-content: space-between; margin-top: 2px; }
.now-times .t { text-align: left; min-width: 0; }
.now-ctrl { display: flex; align-items: center; justify-content: space-between; }
.ib.lg { width: 52px; height: 52px; color: var(--text); }
.ib.lg .i { width: 28px; height: 28px; }
.play-btn.lg { width: 68px; height: 68px; }
.play-btn.lg .i { width: 28px; height: 28px; }
.play-btn.lg .spin { width: 22px; height: 22px; border-width: 3px; }
.now-foot { display: flex; justify-content: center; gap: 8px; }

/* ------------------------------------------------------ menus, fenêtres */

.menu {
  position: fixed; z-index: 60; min-width: 236px; max-width: 300px; max-height: min(440px, 80vh); overflow-y: auto;
  padding: 5px; background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6); animation: menuin .1s ease-out;
}
@keyframes menuin { from { opacity: 0; transform: translateY(-3px); } }
.menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 36px; padding: 0 10px;
  border-radius: var(--r-sm); text-align: left; font-size: 13.5px; white-space: nowrap;
}
.menu button:hover, .menu button:focus-visible { background: var(--hover); outline: none; }
.menu button .i { width: 18px; height: 18px; color: var(--muted); }
.menu button .m-lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.menu button .chev { width: 14px; height: 14px; }
.menu button.danger { color: var(--err); }
.menu button.danger .i { color: var(--err); }
.menu .sep { height: 1px; margin: 5px 2px; background: var(--line-2); }
.menu .m-head {
  padding: 8px 10px 6px; font: 600 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.modal-back {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .62); animation: fadein .12s;
}
@keyframes fadein { from { opacity: 0; } }
.modal {
  width: min(420px, 100%); padding: 22px; background: var(--panel);
  border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.modal h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.modal p { margin: 0 0 4px; color: var(--muted); }
.field {
  width: 100%; height: 42px; margin-top: 12px; padding: 0 12px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); outline: 0;
}
.field:focus { border-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.btn.danger-fill { background: var(--err); border-color: var(--err); color: #fff; }

.toasts {
  position: fixed; right: 16px; bottom: calc(var(--player) + 14px); z-index: 80;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none;
}
.toast {
  max-width: 380px; padding: 11px 14px; background: var(--raised); color: var(--text);
  border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--r);
  font-weight: 600; font-size: 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  animation: toastin .18s ease-out; transition: opacity .25s, transform .25s;
}
.toast.err { border-left-color: var(--err); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

.tabbar { display: none; }

/* ------------------------------------------------------------ tactile */

@media (hover: none) {
  .card-play { display: none; }
  .tl-row .more { opacity: 1; }
  .q-row .ib { opacity: 1; }
}

/* ------------------------------------------------------------ étroit */

@media (max-width: 1100px) {
  .queue, .lyrics { position: fixed; top: 0; right: 0; bottom: var(--player); z-index: 30; box-shadow: -20px 0 50px rgba(0, 0, 0, .5); }
  .tl-row, .tl-head { grid-template-columns: 40px minmax(0, 1fr) 36px 70px 36px; }
  .tl-album { display: none; }
}

@media (max-width: 760px) {
  :root { --player: 64px; }
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas: "main" "player" "tabbar";
  }
  .side { display: none; }
  .queue { inset: 0; bottom: 0; width: auto; z-index: 45; border: 0; }
  /* Paroles : à la place du contenu, la mini-barre et les onglets restent visibles. */
  .lyrics { position: relative; grid-area: main; inset: auto; width: auto; z-index: 8; border: 0; box-shadow: none; }
  .lyrics .q-head { padding-top: max(14px, env(safe-area-inset-top)); }
  .ly-line { font-size: 23px; }
  .now-foot { gap: 8px; }
  .topbar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .arrows { display: none; }
  .search { max-width: none; }
  kbd { display: none; }
  body:not([data-route="search"]) .topbar { display: none; }
  .view { padding: 14px 16px 28px; padding-top: max(14px, env(safe-area-inset-top)); }
  body[data-route="search"] .view { padding-top: 6px; }

  .player {
    grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 8px 0 10px;
    border-top: 0; background: var(--raised);
  }
  .pl-mini { display: block; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line-2); }
  .pl-mini-fill { height: 100%; width: 0; background: var(--accent); }
  .pl-cover { width: 44px; height: 44px; }
  .pl-left .like { display: none; }
  .pl-seek, .pl-right, #pl-shuffle, #pl-repeat, #pl-prev { display: none; }
  .pl-ctrl { gap: 2px; }
  .pl-center { align-items: flex-end; }

  .tabbar {
    grid-area: tabbar; display: grid; grid-template-columns: repeat(3, 1fr);
    background: var(--panel); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; font-size: 11px; font-weight: 600; color: var(--faint); }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on .i { color: var(--accent); }

  .hero { padding: 22px 20px; margin-bottom: 28px; }
  .hero h1 { font-size: 30px; }
  .hero-bars { display: none; }
  body.no-track .player { display: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .page-title { font-size: 28px; }
  .head { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 4px; }
  .head-cover { width: min(58vw, 230px); align-self: center; }
  .head h1, .head h1.long { font-size: 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 -8px; gap: 2px; }
  .card { padding: 8px; }

  .tl-row, .tl-head, .tl.no-album .tl-row { grid-template-columns: minmax(0, 1fr) auto 32px; gap: 8px; padding: 0 2px; }
  .tl-head, .tl-n, .tl-album, .tl-row .like { display: none !important; }
  .tl-row { height: 60px; }
  .tl-row .more { width: 32px; }

  .toasts { left: 12px; right: 12px; bottom: calc(64px + 64px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; }
  .menu { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); max-width: none; max-height: 70vh; }
  .menu button { height: 44px; font-size: 15px; }
}

/* ------------------------------------------------------------ comptes */

body.booting .app { visibility: hidden; }
body.auth-mode .app, body.auth-mode .now { display: none !important; }

.auth {
  position: fixed; inset: 0; overflow-y: auto; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent), color-mix(in srgb, var(--accent) 0%, transparent) 45%), var(--bg);
}
.auth-card {
  width: min(400px, 100%); padding: 32px 28px 28px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; }
.auth h1 { margin: 0 0 4px; font-size: 28px; font-weight: 850; letter-spacing: -.03em; }
.auth-sub { margin: 0 0 24px; color: var(--muted); }
.lbl { display: block; margin: 0 0 14px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.lbl .field { margin-top: 6px; color: var(--text); font-size: 14px; font-weight: 400; }
.modal .lbl { margin: 14px 0 0; }
.hint { margin: -4px 0 14px; font-size: 12px; color: var(--faint); }
.auth-err {
  margin: 0 0 14px; padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--text);
  background: rgba(255, 77, 79, .08); border: 1px solid rgba(255, 77, 79, .4); border-left: 3px solid var(--err);
  border-radius: var(--r);
}
.modal .auth-err { margin: 14px 0 0; }
.btn.big { width: 100%; height: 44px; font-size: 14px; }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.link-btn { color: var(--accent); font-weight: 650; }
.link-btn:hover { text-decoration: underline; }

.acc-card {
  display: flex; align-items: center; gap: 16px; max-width: 560px; margin: 0 0 32px; padding: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
}
.acc-name { margin-bottom: 5px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.form { max-width: 420px; }
.muted { margin: 0 0 14px; color: var(--muted); }

.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 13.5px; cursor: pointer; }
.check input {
  appearance: none; width: 18px; height: 18px; flex: none; margin: 1px 0 0; cursor: pointer;
  border: 1.5px solid var(--faint); border-radius: var(--r-sm);
}
.check input:checked { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--panel); }
.check.big { max-width: 640px; margin: 0; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.check.big .muted { display: block; margin: 4px 0 0; font-size: 13px; }

.users { display: flex; flex-direction: column; max-width: 920px; }
.u-row {
  display: grid; grid-template-columns: 36px minmax(0, 1.4fr) 90px 120px 130px 36px;
  align-items: center; gap: 12px; height: 54px; padding: 0 8px; border-radius: var(--r);
}
.u-row:not(.u-head):hover { background: var(--raised); }
.u-head {
  height: 34px; margin-bottom: 6px; border-bottom: 1px solid var(--line); border-radius: 0;
  font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.u-row .t { text-align: left; min-width: 0; }
.role {
  padding: 3px 7px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.role.on { border-color: var(--accent); color: var(--accent); }
.me { margin-left: 6px; font: 600 10.5px var(--mono); color: var(--faint); }

@media (max-width: 760px) {
  .u-row { grid-template-columns: 32px minmax(0, 1fr) auto 36px; gap: 10px; }
  .u-row > :nth-child(4), .u-row > :nth-child(5) { display: none; }
  .auth-card { padding: 26px 20px 22px; }
}

/* =========================================================================
   Verre dépoli et fond animé (thème, vitesse et couleurs : js/theme.js)
   ========================================================================= */

@property --blob1 { syntax: '<color>'; inherits: true; initial-value: #a3142a; }
@property --blob2 { syntax: '<color>'; inherits: true; initial-value: #5e0b1a; }
@property --blob3 { syntax: '<color>'; inherits: true; initial-value: #d4432b; }
@property --blob4 { syntax: '<color>'; inherits: true; initial-value: #2c0710; }

:root {
  --bg-speed: 1;
  --r-panel: 6px;
  --glass: rgba(14, 14, 18, .5);
  --glass-strong: rgba(16, 16, 20, .78);
  --glass-line: rgba(255, 255, 255, .07);
  --tint: rgba(255, 255, 255, .045);
  --tint-2: rgba(255, 255, 255, .09);
  transition: --blob1 1.6s ease, --blob2 1.6s ease, --blob3 1.6s ease, --blob4 1.6s ease;
}
body { background: #07070a; }
body.glass {
  --raised: rgba(255, 255, 255, .06);
  --hover: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
}

.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 110%, var(--blob4), #07070a 72%);
}
/* Le fond n'existe qu'avec l'effet verre ; il est animé par js/theme.js (30 images/s au plus). */
body:not(.glass) { background: var(--bg); }
body:not(.glass) .bg { display: none; }
.bg i { position: absolute; width: 78vmax; height: 78vmax; border-radius: 50%; opacity: .72; will-change: transform; }
.bg .b1 { left: -26vmax; top: -32vmax; background: radial-gradient(circle, var(--blob1) 0, transparent 64%); }
.bg .b2 { right: -32vmax; top: -12vmax; background: radial-gradient(circle, var(--blob2) 0, transparent 64%); }
.bg .b3 { left: 6vmax; bottom: -44vmax; opacity: .55; background: radial-gradient(circle, var(--blob3) 0, transparent 60%); }
.bg .b4 { right: -22vmax; bottom: -38vmax; opacity: .45; background: radial-gradient(circle, var(--blob1) 0, transparent 60%); }
/* Pochette : une image de 100 px floutée puis agrandie (flou quasi gratuit), qui tourne. */
.bgc { display: none; position: absolute; left: 50%; top: 50%; width: 100px; height: 100px; margin: -50px 0 0 -50px; will-change: transform; }
.bgc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(5px) saturate(1.35); transition: opacity 1.4s ease; }
.bgc img.on { opacity: 1; }
body.bg-cover .bg i { display: none; }
body.bg-cover .bgc { display: block; }
.bg::after { content: ""; position: absolute; inset: 0; background: rgba(6, 6, 9, .34); }
body.bg-cover .bg::after { background: rgba(6, 6, 9, .5); }

/* ---- disposition en panneaux */

.app {
  position: relative; z-index: 1; padding: 8px; gap: 8px;
  grid-template-columns: var(--side) minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "side main right" "player player player";
}
.side, .main, .rp { border: 1px solid var(--glass-line); border-radius: var(--r-panel); background: var(--panel); }
.side, .rp { overflow: hidden; }
.rp { grid-area: right; }
body.glass .side, body.glass .main, body.glass .rp {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(1.4); backdrop-filter: blur(28px) saturate(1.4);
}
.topbar { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.main.scrolled .topbar { background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
body:not(.glass) .main.scrolled .topbar { background: var(--panel); }
.player { height: 80px; padding: 0 10px; background: transparent; border: 0; }
body.glass .player { border-radius: var(--r-panel); background: rgba(8, 8, 12, .28); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.menu { background: rgba(28, 28, 34, .96); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.toast { background: rgba(28, 28, 34, .96); }
.auth { z-index: 2; background: transparent; }
body.glass .auth-card { background: var(--glass-strong); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); }
.modal { background: rgba(22, 22, 28, .97); }

/* ---- barre latérale : bibliothèque avec pochettes */

.side-head { margin: 20px 0 8px; }
.lib { list-style: none; flex: 1; min-height: 0; margin: 0 -4px; padding: 0; overflow-y: auto; }
.lib a { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: var(--r); color: var(--text); }
.lib a:hover { background: var(--hover); }
.lib a.on { background: var(--tint-2); }
.lib-cv { width: 44px; height: 44px; flex: none; overflow: hidden; background: var(--raised); border-radius: var(--r-sm); }
.lib-cv > * { width: 100%; height: 100%; }
.lib-txt { min-width: 0; }
.lib-txt b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-txt small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib a.on .lib-txt b { color: var(--accent-hi); }
.lib .none { padding: 8px; color: var(--faint); font-size: 13px; }

/* ---- accueil : accès rapide */

.greet { margin: 8px 0 18px; font-size: 30px; font-weight: 800; letter-spacing: -.025em; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 30px; }
.qt {
  position: relative; display: flex; align-items: center; gap: 12px; height: 56px; padding-right: 10px;
  overflow: hidden; border-radius: var(--r); background: var(--tint-2); cursor: pointer; transition: background .15s;
}
.qt:hover { background: rgba(255, 255, 255, .15); }
.qt-cv { width: 56px; height: 56px; flex: none; background: var(--raised); }
.qt-cv > * { width: 100%; height: 100%; }
.qt-cv img { object-fit: cover; }
.qt b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-play {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--r);
  background: var(--accent); color: var(--accent-ink); opacity: 0; transform: translateY(3px);
  transition: opacity .15s, transform .15s; box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
}
.qt-play .i { width: 15px; height: 15px; }
.qt:hover .qt-play, .qt:focus-within .qt-play { opacity: 1; transform: none; }
.sec.box { padding: 16px 18px 14px; background: var(--tint); border-radius: var(--r-panel); }
.sec.box .sec-head { border-bottom-color: transparent; padding-bottom: 0; }
@media (max-width: 1350px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- recherche : liste déroulante */

.search { position: relative; }
.sugg {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 50;
  max-height: min(70vh, 640px); overflow-y: auto; padding: 6px;
  background: rgba(24, 24, 30, .95); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid var(--line-2); border-radius: var(--r-panel); box-shadow: 0 26px 60px rgba(0, 0, 0, .6);
  color: var(--text); cursor: default;
}
.sugg-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px; font-size: 12.5px; color: var(--muted); }
.sugg-head .k {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 5px; padding: 0 5px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); font: 11px var(--mono); color: var(--text);
}
.sugg-label { padding: 6px 8px 4px; font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.sugg-sep { height: 1px; margin: 6px 8px; background: var(--line); }
.sg { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: var(--r); cursor: pointer; }
.sg.hi { background: var(--hover); }
.sg-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--tint-2); border-radius: var(--r); color: var(--muted); }
.sg-q { font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-q b { color: var(--text); font-weight: 700; }
.sg img { width: 44px; height: 44px; flex: none; object-fit: cover; background: var(--raised); border-radius: var(--r-sm); }
.sg-txt { flex: 1; min-width: 0; }
.sg-t, .sg-s { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-t { font-weight: 600; }
.sg-s { font-size: 13px; color: var(--muted); }
.sg-act { margin-left: auto; }

/* ---- panneau « En lecture » */

.nowp { width: 360px; display: flex; flex-direction: column; }
.nowp .q-head h2 { min-width: 0; }
.np-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 16px; }
.np-cover {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  background: var(--raised); border-radius: var(--r-panel); box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
.np-cover:not([src]) { visibility: hidden; }
.np-info { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; }
.np-meta { flex: 1; min-width: 0; }
.np-title { font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.np-artist { margin-top: 3px; color: var(--muted); }
.np-artist a:hover { color: var(--text); text-decoration: underline; }
.nowp.empty .ly-card { display: none; }

.ly-card { overflow: hidden; background: color-mix(in srgb, var(--accent) 70%, #000); border-radius: var(--r-panel); box-shadow: 0 12px 34px rgba(0, 0, 0, .35); }
.ly-card-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px 16px; }
.ly-card-head h3 { margin: 0; font-size: 16px; font-weight: 800; color: #fff; }
.ly-card-head .ib { color: rgba(255, 255, 255, .8); }
.ly-card-head .ib:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.ly-card .ly-body { height: 320px; padding: 0 16px; }
.ly-card .ly-line { padding: 5px 0; font-size: 18px; color: rgba(0, 0, 0, .55); }
.ly-card .ly-line.past { color: rgba(255, 255, 255, .6); }
.ly-card .ly-line:hover { color: rgba(255, 255, 255, .85); }
.ly-card .ly-line.on { color: #fff; }
.ly-card .ly-line.on::before { display: none; }
.ly-card .ly-gap { padding: 10px 0; }
.ly-card .ly-gap i { background: rgba(0, 0, 0, .3); }
.ly-card .ly-gap.on i { background: #fff; }
.ly-card .ly-pad { height: 160px; }
.ly-card .ly-empty, .ly-card .ly-note, .ly-card .ly-plain { color: rgba(255, 255, 255, .85); }
.ly-card .ly-sk { padding-left: 0; }
.ly-card .ly-sk .sk { background: rgba(0, 0, 0, .18); animation: none; }
.lyrics .q-head > div { display: flex; gap: 2px; }

/* ---- paramètres */

.set { max-width: 780px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 8px; padding: 16px 18px; background: var(--tint); border-radius: var(--r-panel);
}
.set-row > div:first-child { min-width: 0; }
.set-row b { display: block; font-weight: 650; }
.set-row .muted { margin: 3px 0 0; font-size: 13px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { position: relative; width: 38px; height: 38px; border-radius: var(--r); background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.sw.on { box-shadow: 0 0 0 2px #0b0b0f, 0 0 0 4px var(--c); }
.sw.on::after { content: ""; position: absolute; inset: 14px; background: #fff; }
.switch {
  appearance: none; position: relative; width: 44px; height: 24px; flex: none; margin: 0; cursor: pointer;
  background: var(--line-2); border-radius: var(--r); transition: background .15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 2px; transition: transform .15s;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.rng-wrap { display: flex; align-items: center; gap: 12px; flex: none; }
.rng { width: 200px; accent-color: var(--accent); }
.rng-wrap output { min-width: 64px; font: 12px var(--mono); color: var(--muted); }
.seg { display: inline-flex; flex: none; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r); }
.seg button { padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--text); color: #111; }

/* ---- écrans moyens et petits */

@media (max-width: 1100px) {
  .rp { position: fixed; top: 8px; right: 8px; bottom: 96px; z-index: 30; box-shadow: -20px 0 50px rgba(0, 0, 0, .5); }
}
@media (max-width: 760px) {
  .app {
    padding: 0; gap: 0;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas: "main" "player" "tabbar";
  }
  .main { border: 0; border-radius: 0; }
  body.glass .main { background: rgba(10, 10, 14, .5); }
  .nowp { display: none !important; }
  .queue { position: fixed; inset: 0; width: auto; z-index: 45; border: 0; border-radius: 0; }
  .lyrics { position: relative; grid-area: main; inset: auto; width: auto; z-index: 8; border: 0; border-radius: 0; box-shadow: none; }
  .player, body.glass .player { height: 64px; border-radius: 0; background: rgba(22, 22, 28, .92); }
  .tabbar { background: rgba(10, 10, 14, .9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .greet { font-size: 26px; }
  .sugg { position: fixed; left: 8px; right: 8px; top: 62px; max-height: calc(100dvh - 200px); }
  .set-row { flex-wrap: wrap; }
  .rng { width: 150px; }
}

.set-row.off { opacity: .45; pointer-events: none; }
.dep-note { margin: 4px 2px 0; font-size: 13px; }

/* ---- paroles : remplissage mot par mot, carrés des pauses (piloté par js/lyrics.js) */
.ly-body { --ly-hot: var(--text); --ly-cold: var(--faint); }
.ly-card .ly-body { --ly-hot: #fff; --ly-cold: rgba(0, 0, 0, .55); }
.ly-line.on { color: var(--ly-cold); }
.ly-line.on .w {
  background-image: linear-gradient(90deg, var(--ly-hot) calc(var(--p, -12%) - 12%), var(--ly-cold) calc(var(--p, -12%) + 12%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ly-gap i { background: var(--ly-hot); opacity: .28; transition: none; transform-origin: center bottom; }
.ly-gap.on i { animation: none; }
.ly-card .ly-gap i, .ly-card .ly-gap.on i { background: #fff; }

/* ---- carte des paroles en mode verre : transparente, légère teinte du thème.
   Pas de backdrop-filter ici : le panneau parent est déjà flouté. */
body.glass .ly-card {
  background: color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, .03));
  border: 1px solid var(--glass-line); box-shadow: none;
}
body.glass .ly-card .ly-body { --ly-cold: rgba(255, 255, 255, .42); }
body.glass .ly-card .ly-line { color: rgba(255, 255, 255, .42); }
body.glass .ly-card .ly-line.past { color: rgba(255, 255, 255, .72); }
body.glass .ly-card .ly-line:hover { color: rgba(255, 255, 255, .9); }
body.glass .ly-card .ly-sk .sk { background: rgba(255, 255, 255, .08); }

/* ---- photo de profil, connexion Google */
.av { overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acc-card { flex-wrap: wrap; }
.acc-id { flex: 1; min-width: 140px; }
.acc-photo { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--faint); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.btn.google { background: #fff; color: #1f1f1f; border-color: #fff; text-decoration: none; }
.btn.google:hover { background: #ececec; border-color: #ececec; }
.btn.google { gap: 10px; }
.btn.google .g-logo { width: 18px; height: 18px; flex: none; }
.pl-add .i { width: 19px; height: 19px; }
@media (max-width: 760px) { .pl-left .pl-add { display: none; } }

/* ---- logo (symbole à la couleur du thème, mot à la couleur du texte) */
.logo { display: block; height: 30px; width: auto; }
.logo-tile { fill: var(--accent); }
.logo-glyph { fill: var(--accent-ink); }
.logo-word { fill: currentColor; }
.brand { color: var(--text); padding: 4px 10px 20px; }
.brand .logo { height: 28px; }
.auth-brand .logo { height: 32px; }

/* ---- amis (js/friends.js) : pastilles, panneau « Activité des amis », page, profil */
.badge {
  min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; text-align: center;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--r-sm); font: 700 11px/18px var(--mono);
}
.cnt {
  position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 3px; text-align: center;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--r-sm); font: 700 9.5px/15px var(--mono);
}
.fr-btn { position: relative; margin-left: auto; }
.fr-btn.on { color: var(--accent); }
.av.md { width: 40px; height: 40px; font-size: 17px; }

.friends { width: 340px; display: flex; flex-direction: column; }
.friends .q-head > div { display: flex; gap: 2px; }
.fr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px 20px; }
.fr-body .q-label:first-child { margin-top: 10px; }
.fr-manage { display: block; margin: 18px 8px 0; }
.fr-empty { padding: 36px 16px 8px; text-align: center; color: var(--muted); }
.fr-empty .ph { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: var(--r-sm); }
.fr-empty p { margin: 0 0 16px; }

.fa { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r); }
.fa:hover { background: var(--hover); }
.fa-av { position: relative; flex: none; }
.fa-txt { flex: 1; min-width: 0; }
.fa-top { display: flex; align-items: baseline; gap: 8px; }
.fa-name { min-width: 0; font-weight: 700; }
a.fa-name:hover { text-decoration: underline; }
.fa-when { flex: none; margin-left: auto; font: 11px var(--mono); color: var(--faint); }
.fa-when.live { color: var(--accent); font-weight: 700; }
.fa-track {
  display: flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 2px;
  color: var(--muted); font-size: 13px; text-align: left;
}
.fa-track:hover { color: var(--text); }
.fa-track:hover .ell { text-decoration: underline; }
.fa-art { color: var(--faint); }
.fa-track .fa-ic { width: 12px; height: 12px; flex: none; }
.fa-none { margin-top: 2px; font-size: 13px; color: var(--faint); }
.fa-btns { display: flex; gap: 6px; flex: none; }
.fa .ib.ok { color: var(--accent); }
.fa .ib.ok:hover { color: var(--accent-ink); background: var(--accent); }
.fa .more { flex: none; }
/* Égaliseur des amis en écoute : il bouge même quand on n'écoute rien soi-même. */
.fa-eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 12px; height: 11px; flex: none; }
.fa-eq i { width: 3px; height: 40%; background: var(--accent); animation: eq .8s ease-in-out infinite alternate; }
.fa-eq i:nth-child(2) { animation-delay: -.35s; height: 80%; }
.fa-eq i:nth-child(3) { animation-delay: -.6s; height: 55%; }
@media (prefers-reduced-motion: reduce) { .fa-eq i { animation: none; } }

.fr-me { max-width: 640px; margin-top: -8px; margin-bottom: 26px; }
.fr-list { display: flex; flex-direction: column; gap: 2px; max-width: 760px; }
.fr-list .fa { padding: 10px 12px; background: var(--tint); }
.fr-list .fa:hover { background: var(--tint-2); }
.fr-list.big .fa-track { font-size: 13.5px; }
.fr-now { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); }
.fr-now b { color: var(--text); }
.ph.initial { font-size: 72px; font-weight: 850; color: var(--accent-ink); background: var(--accent); }
.dep-note2 { margin: 4px 2px 0; font-size: 13px; }
.tab-ic { position: relative; display: flex; }
.tab-ic .cnt { top: -4px; right: -10px; }

@media (max-width: 760px) {
  .fr-btn, .friends { display: none !important; }
  .tabbar { grid-template-columns: repeat(4, 1fr); }
  .fa-btns .btn { padding: 0 12px; }
  .fr-list .fa { flex-wrap: wrap; }
  .fr-list .fa.req .fa-btns { width: 100%; padding-left: 52px; }
}

/* ---- amis : photos de profil rondes (panneau, page Amis, demandes, en-tête du profil) */
.fa .av, body[data-route="profile"] .head-cover, .ph.initial { border-radius: 50%; }
