/* Sound — direction "Halo"
   Base graphite neutre ; la couleur d'accent vient de la pochette en cours (script.js). */

@property --accent { syntax: '<color>'; inherits: true; initial-value: #7c5cfc; }
@property --accent-ink { syntax: '<color>'; inherits: true; initial-value: #0d0820; }
@property --glow { syntax: '<color>'; inherits: true; initial-value: #4a2db8; }

:root {
  --bg: #0d0e12;
  --bg-1: #121318;
  --bg-2: #18191f;
  --bg-3: #1f2129;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --fg: #f2f3f5;
  --fg-2: #a4a9b1;
  --fg-3: #6c717a;
  --danger: #ff6b6b;
  --ok: #5ad19a;

  --accent: #7c5cfc;
  --accent-ink: #0d0820;
  --glow: #4a2db8;

  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-d: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;

  --side: 256px;
  --gutter: 40px;
  --mini-h: 80px;
  --tab-h: 0px;
  --r-art: 6px;
  --r-panel: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* espace sous les onglets : on empiète sur la zone de la barre d'accueil de l'iPhone pour les descendre */
  --tab-pad: min(18px, max(6px, calc(var(--safe-b) - 16px)));

  color-scheme: dark;
  transition: --accent .9s var(--ease), --accent-ink .9s var(--ease), --glow .9s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.45 var(--font);
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 24px; height: 24px; flex: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
input { font: inherit; color: inherit; }
::selection { background: color-mix(in oklab, var(--accent) 45%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Primitives ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 24px/1 var(--font-d); font-variation-settings: 'opsz' 48, 'wdth' 86; letter-spacing: -.035em; }
.brand-mark { width: 26px; height: 26px; color: var(--accent); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  color: var(--fg-2);
  transition: color .2s, background-color .2s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { color: var(--fg); background: rgba(255, 255, 255, .06); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.icon-btn.lg svg { width: 30px; height: 30px; }
.icon-btn.lg { width: 56px; height: 56px; color: var(--fg); }
.icon-btn.round { background: rgba(255, 255, 255, .06); color: var(--fg); }
.icon-btn.round:hover { background: rgba(255, 255, 255, .11); }
.icon-btn[aria-pressed="true"] { color: var(--accent); position: relative; }
.icon-btn[aria-pressed="true"]::after { content: ''; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }

.like-btn.on { color: var(--accent); }
.like-btn { position: relative; }
.burst { position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--accent); pointer-events: none; }

.play-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--fg); color: var(--bg);
  transition: background-color .9s var(--ease);
}
.play-btn svg { grid-area: 1 / 1; width: 20px; height: 20px; transition: transform .28s var(--ease), opacity .2s; }
.play-btn .ic-pause, .is-playing .play-btn .ic-play { opacity: 0; transform: scale(.5) rotate(-30deg); }
.is-playing .play-btn .ic-pause { opacity: 1; transform: none; }
.play-btn.xl { width: 76px; height: 76px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 40px -8px color-mix(in oklab, var(--glow) 80%, transparent); }
.play-btn.xl svg { width: 32px; height: 32px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: -.005em;
  background: rgba(255, 255, 255, .08); color: var(--fg);
  transition: background-color .25s;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { background: rgba(255, 255, 255, .13); }
.btn.primary { background: var(--local, var(--accent)); color: var(--local-ink, var(--accent-ink)); padding: 0 26px 0 20px; }
.btn.primary:hover { filter: brightness(1.08); }

/* Scrubber (barre de progression interactive) */
.scrub { position: relative; height: 20px; flex: 1; cursor: pointer; touch-action: none; --p: 0; }
.scrub-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; transition: transform .2s var(--ease); }
.scrub-track .fill { position: absolute; inset: 0; background: var(--fg); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }
.scrub-thumb { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.scrub-thumb i { position: absolute; left: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--fg); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); transform: scale(0); transition: transform .2s var(--ease); }
.scrub:hover .scrub-thumb i, .scrub.drag .scrub-thumb i, .scrub:focus-visible .scrub-thumb i { transform: scale(1); }
.scrub:hover .scrub-track, .scrub.drag .scrub-track { transform: scaleY(1.5); }
.scrub:hover .scrub-track .fill, .scrub.drag .scrub-track .fill { background: var(--accent); }
.scrub.big .scrub-track .fill { background: var(--accent); }
.scrub.big .scrub-thumb i { transform: scale(.85); background: var(--fg); }
.scrub:focus-visible { outline-offset: 2px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100dvh; }

.side {
  display: flex; flex-direction: column; gap: 24px;
  padding: 26px 18px 18px; min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
.side .brand { padding: 0 8px; }
kbd { font: 500 11px/1 var(--font); color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; }

.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 10px; border-radius: 10px;
  font-weight: 600; color: var(--fg-2); transition: color .2s, background-color .2s;
}
.side-nav a svg { width: 22px; height: 22px; }
.side-nav a:hover { color: var(--fg); background: rgba(255, 255, 255, .04); }
.side-nav a.active { color: var(--fg); background: rgba(255, 255, 255, .06); }
.side-nav a.active svg { color: var(--accent); }

.side-lib { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 18px; }
.side-lib-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px 10px; }
.side-lib-head h2 { font-size: 13px; font-weight: 600; color: var(--fg-3); }
.side-lib ul { overflow-y: auto; display: grid; gap: 2px; scrollbar-width: none; }
.side-lib li button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; border-radius: 10px; text-align: left; transition: background-color .2s; }
.side-lib li button:hover { background: rgba(255, 255, 255, .04); }
.side-lib .crop { display: block; width: 42px; height: 42px; flex: none; border-radius: 4px; overflow: hidden; background: var(--bg-2); }
.side-lib img { width: 100%; height: 100%; object-fit: cover; }
.side-lib .pl-t { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-lib .pl-s { display: block; font-size: 12.5px; color: var(--fg-3); }
.side-lib li button > span { min-width: 0; }
.side-lib li.playing .pl-t { color: var(--accent); }

.side-account { border-top: 1px solid var(--line); padding-top: 14px; }
.acct { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border-radius: 12px; text-align: left; transition: background-color .2s; }
.acct:hover { background: rgba(255, 255, 255, .04); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 15px/1 var(--font-d); flex: none; }
.acct-n { font-weight: 600; font-size: 14px; display: block; }
.acct-s { font-size: 12.5px; color: var(--fg-3); display: block; }
.acct .logout { margin-left: auto; }




.main { position: relative; overflow-y: auto; overflow-x: hidden; min-width: 0; scroll-behavior: auto; scrollbar-color: var(--bg-3) transparent; }
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 var(--gutter); pointer-events: none; }
.topbar > * { pointer-events: auto; }

.topbar-account .chip { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 4px; border-radius: 999px; background: rgba(15, 16, 19, .55); border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: background-color .2s; }
.topbar-account .chip:hover { background: rgba(30, 32, 37, .8); }
.topbar-account .chip .avatar { width: 32px; height: 32px; font-size: 13px; }
.topbar-account .chip.ghost { padding: 0 18px; }

.views { position: relative; min-height: 100%; padding-bottom: calc(var(--mini-h) + 56px); }
.view { padding: 0 var(--gutter); }

/* ---------- Accueil ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 48px; align-items: end; padding: 104px 0 56px; isolation: isolate; }
.light { position: absolute; z-index: -1; pointer-events: none; opacity: 0; }
.light img { width: 100%; height: 100%; object-fit: cover; filter: blur(72px) saturate(1.7); transform: scale(1.2); }
.hero .light { inset: -40px calc(-1 * var(--gutter)) -60px calc(-1 * var(--gutter)); -webkit-mask: radial-gradient(70% 90% at 22% 40%, #000 20%, transparent 75%); mask: radial-gradient(70% 90% at 22% 40%, #000 20%, transparent 75%); }
.hero-art { position: relative; aspect-ratio: 1; border-radius: var(--r-art); transform-style: preserve-3d; will-change: transform; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-art); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); }


.hero-copy { min-width: 0; padding-bottom: 6px; }
.hero-kind { font-size: 14px; color: var(--fg-2); margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.hero-kind img { width: 24px; height: 24px; border-radius: 50%; }
.hero-kind a { font-weight: 600; color: var(--fg); }
.hero-kind a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hero-title {
  font: 760 clamp(64px, 9vw, 148px)/.86 var(--font-d);
  font-variation-settings: 'opsz' 96, 'wdth' 78;
  letter-spacing: -.045em; margin-left: -.04em;
}


.hero-actions { display: flex; align-items: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

.sec { padding: 28px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-head h2 { font: 700 28px/1.1 var(--font-d); font-variation-settings: 'opsz' 40, 'wdth' 88; letter-spacing: -.025em; }
.sec-head p { color: var(--fg-3); font-size: 14px; margin-top: 4px; }
.sec-tools { display: flex; gap: 6px; align-items: center; }
.sec-tools .icon-btn { width: 36px; height: 36px; background: rgba(255, 255, 255, .05); }
.sec-tools .icon-btn:disabled { opacity: .3; cursor: default; }
.link-more { font-size: 14px; font-weight: 600; color: var(--fg-2); padding: 8px 4px; }
.link-more:hover { color: var(--fg); }

/* Classement */
.chart { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); grid-auto-flow: column; column-gap: 32px; }
.trow {
  position: relative; display: grid; grid-template-columns: 34px 52px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 8px 12px 8px 8px; border-radius: 10px; cursor: pointer; text-align: left; width: 100%;
  transition: background-color .2s;
}
.trow:hover { background: rgba(255, 255, 255, .045); }
.trow .rank { position: relative; display: grid; place-items: center; height: 30px; font: 600 20px/1 var(--font-d); font-variation-settings: 'opsz' 24, 'wdth' 80; font-variant-numeric: tabular-nums; color: var(--fg-3); }
.trow .rank svg { position: absolute; width: 20px; height: 20px; color: var(--fg); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease); }
.trow .rank b { font-weight: inherit; transition: opacity .2s; }
.trow:hover .rank b { opacity: 0; }
.trow:hover .rank svg { opacity: 1; transform: none; }
.trow img { width: 52px; height: 52px; border-radius: 4px; background: var(--bg-2); }
.trow .t { min-width: 0; }
.trow .t-title { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t-artist { display: block; color: var(--fg-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .dur { color: var(--fg-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.trow.playing .t-title { color: var(--accent); }
.trow.playing .rank b, .trow.playing:hover .rank svg { opacity: 0; }
.trow .eq { display: none; }
.trow.playing .eq { display: flex; }
.explicit { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 3px; background: var(--fg-3); color: var(--bg); font-size: 10px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }

/* Égaliseur animé (compositeur uniquement) */
.eq { position: absolute; gap: 2px; align-items: flex-end; height: 16px; }
.eq i { width: 3px; height: 16px; border-radius: 2px; background: var(--accent); transform-origin: 50% 100%; transform: scaleY(.3); }
.is-playing .eq i { animation: eq 1s var(--ease) infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.4s !important; animation-duration: .8s !important; }
.eq i:nth-child(3) { animation-delay: -.7s !important; animation-duration: 1.15s !important; }
@keyframes eq { 0% { transform: scaleY(.25); } 40% { transform: scaleY(1); } 70% { transform: scaleY(.45); } 100% { transform: scaleY(.85); } }

/* Rangées horizontales */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 184px; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter) 18px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.tile { position: relative; scroll-snap-align: start; min-width: 0; }
.tile-art { position: relative; aspect-ratio: 1; isolation: isolate; }
.tile-art::before { content: ''; position: absolute; inset: 14% 8% -6%; z-index: -1; border-radius: 50%; background: var(--tglow, transparent); filter: blur(26px); opacity: 0; transform: translateY(8px) scale(.9); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.tile-art .crop { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: var(--r-art); background: var(--bg-2); box-shadow: 0 0 0 1px rgba(255, 255, 255, .05); transition: transform .45s var(--ease); }
.tile-art img { width: 100%; height: 100%; object-fit: cover; }
/* pochettes éditoriales : recadrage haut pour écarter la signature imprimée en pied d'image */
.tile.pl .crop img, .side-lib .crop img { transform: scale(1.22); transform-origin: 50% 0; }
.tile:hover .tile-art .crop { transform: translateY(-4px); }
.tile:hover .tile-art::before { opacity: .7; transform: translateY(4px) scale(1); }
.tile-play { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--tacc, var(--fg)); color: var(--tink, var(--bg)); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(8px) scale(.9); transition: opacity .3s, transform .35s var(--ease), background-color .4s; }
.tile-play svg { width: 22px; height: 22px; }
.tile:hover .tile-play, .tile:focus-within .tile-play { opacity: 1; transform: translateY(-4px); }
.tile-link { position: absolute; inset: 0; z-index: 1; border-radius: var(--r-art); }
.tile-t { margin-top: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-s { color: var(--fg-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.artist .tile-art .crop { border-radius: 50%; }
.tile.artist .tile-link { border-radius: 50%; }
.tile.artist { text-align: center; }
.tile.artist .tile-play { right: 4px; bottom: 4px; }











.tracks { border-top: 1px solid var(--line); padding-top: 8px; }
















.album-foot { color: var(--fg-3); font-size: 13px; padding: 20px 8px 8px; }


/* ---------- Recherche / bibliothèque ---------- */
.page-head { padding: 104px 0 20px; }
.page-head h1 { font: 760 clamp(44px, 5vw, 72px)/.95 var(--font-d); font-variation-settings: 'opsz' 96, 'wdth' 80; letter-spacing: -.04em; }
.big-search { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; margin-top: 22px; border-radius: 14px; background: var(--bg-2); max-width: 640px; transition: box-shadow .2s; }
.big-search:focus-within { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.big-search input { flex: 1; min-width: 0; background: none; border: 0; font-size: 17px; }
.big-search svg { color: var(--fg-3); }
.results { display: grid; gap: 2px; max-width: 760px; }




















.vol { display: flex; align-items: center; gap: 8px; width: 140px; color: var(--fg-2); padding: 0 8px; }
.vol svg { width: 20px; height: 20px; }

.tabbar { display: none; }

/* ---------- Lecture en cours ---------- */
.now {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  visibility: hidden; overflow: hidden;
  --S: clamp(320px, calc(100dvh - 330px), 600px);
}
.now.open { visibility: visible; }
.now-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
.amb { position: absolute; inset: -12%; opacity: 0; will-change: opacity, transform; }
.amb img { width: 100%; height: 100%; object-fit: cover; filter: blur(80px) saturate(1.8) brightness(.85); }
.now-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 16, 19, .25), rgba(15, 16, 19, .55) 55%, rgba(15, 16, 19, .85)), radial-gradient(120% 90% at 30% 45%, transparent 30%, rgba(15, 16, 19, .55)); }
.now-top { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 20px 32px 0; height: 72px; flex: none; }
.now-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; padding: 0 32px 32px; }
.now-main { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.stage { position: relative; width: var(--S); height: var(--S); flex: none; display: grid; place-items: center; touch-action: none; }
.halo { position: absolute; left: -8%; top: -8%; width: 116%; height: 116%; pointer-events: none; }
.now-art { position: relative; width: calc(var(--S) * .6); aspect-ratio: 1; transform-origin: 0 0; will-change: transform; z-index: 1; pointer-events: none; }
.now-art-in { width: 100%; height: 100%; will-change: transform; }
.now-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .07); background: var(--bg-3); }
.seek-tip { position: absolute; left: 0; top: 0; z-index: 3; padding: 5px 9px; border-radius: 8px; background: var(--fg); color: var(--bg); font: 600 13px/1 var(--font); font-variant-numeric: tabular-nums; pointer-events: none; opacity: 0; transition: opacity .15s; will-change: transform; }
.seek-tip.on { opacity: 1; }
.stage.near { cursor: grab; }
.stage.drag { cursor: grabbing; }

.now-meta { display: flex; align-items: center; gap: 16px; width: min(100%, 540px); margin-top: 4px; }
.now-titles { flex: 1; min-width: 0; overflow: hidden; }
.now-title { font: 720 34px/1.08 var(--font-d); font-variation-settings: 'opsz' 48, 'wdth' 86; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-artist { display: inline-block; margin-top: 4px; font-size: 17px; color: var(--fg-2); font-weight: 500; }
.now-artist:hover { color: var(--fg); }
.now-meta .like-btn { width: 48px; height: 48px; }
.now-meta .like-btn svg { width: 26px; height: 26px; }
.now-scrub { width: min(100%, 540px); margin-top: 18px; }
.now-times { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.now-ctl { display: flex; align-items: center; justify-content: space-between; width: min(100%, 440px); margin-top: 10px; }

.now-queue { display: flex; flex-direction: column; min-height: 0; margin-top: 8px; border-radius: 20px; background: rgba(12, 13, 16, .42); border: 1px solid rgba(255, 255, 255, .06); padding: 22px 12px 12px; }
.q-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 12px 12px; }
.q-head h3 { font: 700 22px/1 var(--font-d); font-variation-settings: 'opsz' 32, 'wdth' 88; letter-spacing: -.02em; }
.q-head span { color: var(--fg-3); font-size: 13px; }
.q-list { overflow-y: auto; scrollbar-width: none; display: grid; gap: 2px; align-content: start; }
.q-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 10px; border-radius: 10px; width: 100%; text-align: left; transition: background-color .2s; }
.q-item:hover { background: rgba(255, 255, 255, .06); }
.q-item .q-art { position: relative; width: 48px; height: 48px; }
.q-item img, .q-item .ph { width: 48px; height: 48px; border-radius: 4px; background: var(--bg-3); }
.q-item .t-title { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item .t-artist { display: block; font-size: 13px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item .dur { font-size: 13px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.q-item.past { opacity: .45; }

/* ---------- Connexion ---------- */
.auth { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 560px); visibility: hidden; background: var(--bg); overflow: hidden; }
.auth.open { visibility: visible; }





.auth-intro { position: relative; grid-column: 1; align-self: end; padding: 0 56px 56px; }
.auth-intro .brand { font-size: 30px; }
.auth-intro .brand-mark { width: 32px; height: 32px; }
.auth-line { margin-top: 22px; font: 720 clamp(40px, 4.4vw, 68px)/.98 var(--font-d); font-variation-settings: 'opsz' 96, 'wdth' 82; letter-spacing: -.04em; max-width: 13ch; }
.auth-panel { position: relative; grid-column: 2; display: flex; flex-direction: column; justify-content: center; padding: 48px 64px; overflow-y: auto; }


.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--bg-2); margin-bottom: 36px; }
.tabs button { position: relative; z-index: 1; height: 42px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--fg-2); transition: color .3s; }
.tabs button[aria-selected="true"] { color: var(--fg); }
.tabs-ink { position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: 42px; border-radius: 999px; background: var(--bg-3); box-shadow: 0 2px 10px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset; will-change: transform; }
.panes { display: grid; }
.pane { grid-area: 1 / 1; display: grid; gap: 18px; align-content: start; }
.pane[hidden] { display: grid; visibility: hidden; pointer-events: none; }
.pane-title { font: 720 34px/1.05 var(--font-d); font-variation-settings: 'opsz' 48, 'wdth' 86; letter-spacing: -.03em; }
.pane-sub { color: var(--fg-2); margin-top: -10px; margin-bottom: 6px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }


.link:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.input { position: relative; display: flex; align-items: center; height: 52px; border-radius: 12px; background: var(--bg-1); box-shadow: 0 0 0 1px var(--line-2) inset; transition: box-shadow .2s, background-color .2s; }
.input:focus-within { background: var(--bg-2); box-shadow: 0 0 0 1.5px var(--accent) inset; }
.field.err .input { box-shadow: 0 0 0 1.5px var(--danger) inset; }
.input input:focus-visible, .big-search input:focus-visible { outline: none; }
.input input { flex: 1; min-width: 0; height: 100%; padding: 0 16px; background: none; border: 0; font-size: 16px; }
.input-ic { display: grid; place-items: center; width: 44px; margin-right: -12px; color: var(--fg-3); transition: color .2s; }
.input-ic svg { width: 20px; height: 20px; }
.input:focus-within .input-ic { color: var(--accent); }
.reveal { display: grid; place-items: center; width: 48px; height: 48px; color: var(--fg-3); border-radius: 10px; }
.reveal:hover { color: var(--fg); }
.reveal svg { width: 20px; height: 20px; }
.hint { font-size: 13px; color: var(--fg-3); }
.hint:empty { display: none; }
.hint.ok { color: var(--ok); }
.field.err .hint { color: var(--danger); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.meter i { position: relative; height: 4px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.meter i::after { content: ''; position: absolute; inset: 0; background: var(--mc, var(--accent)); transform: scaleX(var(--m, 0)); transform-origin: 0 50%; transition: transform .35s var(--ease), background-color .3s; }
.submit { position: relative; display: grid; place-items: center; height: 54px; margin-top: 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; overflow: hidden; }
.submit > * { grid-area: 1 / 1; transition: opacity .25s, transform .35s var(--ease); }
.submit .spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; opacity: 0; transform: scale(.6); }
.submit.busy .spinner { opacity: 1; transform: none; animation: spin .7s linear infinite; }
.submit.busy .submit-label, .submit.done .submit-label { opacity: 0; transform: translateY(-10px); }
.submit .submit-ok { width: 26px; height: 26px; opacity: 0; transform: scale(.4); }
.submit.done .submit-ok { opacity: 1; transform: none; }
.submit.done .spinner { opacity: 0; }
@keyframes spin { to { transform: rotate(1turn); } }
.pane-foot { font-size: 14px; color: var(--fg-2); text-align: center; }
.link { font-weight: 600; color: var(--fg); }


/* Menu compte et toast */
.menu { position: fixed; z-index: 70; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px; border-radius: 9px; font-size: 14.5px; font-weight: 500; }
.menu button:hover { background: rgba(255, 255, 255, .06); }
.menu button svg { width: 20px; height: 20px; color: var(--fg-2); }



.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--mini-h) + 36px); display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--fg); color: var(--bg); font-weight: 600; font-size: 14.5px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .6); max-width: calc(100vw - 32px); }
.toast svg { width: 18px; height: 18px; color: var(--ok); }

/* ---------- Tablette ---------- */
@media (max-width: 1180px) {
  :root { --side: 224px; --gutter: 32px; }
  
  .vol { display: none; }
  .now-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .hero { gap: 36px; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  
  .now-body { grid-template-columns: 1fr; overflow-y: auto; }
  .now-queue { display: none; }
  .chart { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .auth { grid-template-columns: 1fr; }
  
  .auth-intro { display: none; }
  .auth-panel { grid-column: 1; width: min(520px, 100%); justify-self: center; background: rgba(15, 16, 19, .9); }
}

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; --mini-h: 62px; --tab-h: 56px; }
  .app { display: block; }
  .side { display: none; }
  .main { height: 100dvh; }
  .topbar { position: sticky; height: 56px; padding: 0 var(--gutter); background: linear-gradient(var(--bg) 40%, rgba(15, 16, 19, 0)); }
  .topbar-nav { display: none; }
  
  
  .topbar-account .chip { height: 36px; background: none; border: 0; padding: 0; }
  .topbar-account .chip span:not(.avatar) { display: none; }
  .topbar-account .chip.ghost { padding: 0 14px; border: 1px solid var(--line-2); font-size: 13.5px; }
  .topbar-account .chip.ghost span { display: inline !important; }
  .views { padding-bottom: calc(var(--mini-h) + var(--tab-h) + var(--tab-pad) + 40px); }

  .hero { grid-template-columns: 42% minmax(0, 1fr); gap: 16px; align-items: end; padding: 8px 0 22px; }
  .hero .light { inset: -60px -16px -20px; }
  .hero-title { font-size: clamp(40px, 12vw, 56px); line-height: .9; letter-spacing: -.04em; }
  .hero-kind { font-size: 13px; margin-bottom: 8px; }
  .hero-kind img { display: none; }
  
  .hero-actions { margin-top: 14px; gap: 8px; }
  .hero-actions .btn { height: 40px; padding: 0 14px; font-size: 14px; }
  .hero-actions .btn.primary { padding: 0 16px 0 12px; }
  .hero-actions .btn.secondary { display: none; }
  .hero-actions .icon-btn { width: 40px; height: 40px; background: rgba(255, 255, 255, .07); }
  .sec { padding: 18px 0 4px; }
  .sec-head { margin-bottom: 10px; }
  .sec-head h2 { font-size: 23px; }
  .sec-head p { font-size: 13px; }
  .sec-tools .icon-btn { display: none; }
  .chart { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .chart .trow.extra { display: none; }
  .chart.all .trow.extra { display: grid; }
  .trow { grid-template-columns: 26px 48px minmax(0, 1fr) 36px; gap: 12px; padding: 6px 0; }
  .trow:hover { background: none; }
  .trow img { width: 48px; height: 48px; }
  .trow .rank { font-size: 17px; }
  .trow .dur { display: none; }
  .trow .more { display: grid; }
  
  .rail { grid-auto-columns: 42%; gap: 14px; padding-bottom: 8px; }
  .rail.artists { grid-auto-columns: 30%; }
  .tile-t { font-size: 14px; margin-top: 9px; }
  .tile-s { font-size: 13px; }
  .tile-play { display: none; }

  
  
  
  
  
  
  
  .page-head { padding: 8px 0 16px; }

  
  
  
  
  
  
  
  
  
  
  

  .tabbar {
    position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tab-h) + var(--tab-pad)); padding-bottom: var(--tab-pad);
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--fg-3); padding-top: 10px; transition: color .2s; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.active { color: var(--fg); }

  .toast { bottom: calc(var(--mini-h) + var(--tab-h) + var(--tab-pad) + 18px); }

  .now { --S: min(calc(100vw - 6px), 520px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
  .now-bg { position: fixed; }
  .now-top { padding: 12px 16px 0; height: 60px; position: relative; z-index: 2; }
  .now-top .icon-btn.round { background: none; }
  .now-body { display: block; padding: 0 0 calc(32px + var(--safe-b)); flex: none; }
  .now-main { justify-content: flex-start; padding: 0 24px; }
  .stage { margin: 0 0 18px; }
  .now-meta { margin-top: 0; }
  .now-title { font-size: 26px; }
  .now-artist { font-size: 16px; }
  .now-scrub { margin-top: 14px; }
  .now-ctl { width: 100%; margin-top: 8px; }
  .play-btn.xl { width: 72px; height: 72px; }
  .now-queue { margin: 28px 12px 0; padding: 18px 6px 8px; background: rgba(12, 13, 16, .5); }
  .q-list { overflow: visible; }

  .auth { display: block; overflow-y: auto; }
  
  
  
  
  .auth-intro { position: relative; padding: 112px 24px 0; }
  .auth-intro .brand { font-size: 26px; }
  .auth-line { font-size: 34px; margin-top: 14px; max-width: 14ch; }
  .auth-panel { padding: 28px 24px calc(28px + var(--safe-b)); overflow: visible; justify-content: flex-start; }
  
  .tabs { margin-bottom: 26px; }
  .pane-title { font-size: 28px; }
}


.trow .more { display: none; place-items: center; width: 36px; height: 36px; color: var(--fg-3); }

@media (hover: none) {
  .tile:hover .tile-art .crop { transform: none; }
  .tile:hover .tile-art::before { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  :root { transition: none; }
}

/* =====================================================================
   Application (complète le système Halo pour l'app réelle)
   ===================================================================== */
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; }
.noscript { position: fixed; inset: auto 16px 16px; padding: 14px 18px; border-radius: 12px; background: var(--bg-2); }
body.booting .app, .app.under-now { visibility: hidden; }
.crop { display: block; overflow: hidden; }
.crop img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Démarrage (squelette) ---------- */
.boot { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); background: var(--bg); }
.boot-side { display: grid; align-content: start; gap: 14px; padding: 30px 22px; border-right: 1px solid var(--line); }
.boot-side i { height: 36px; border-radius: 10px; background: var(--bg-1); }
.boot-side i:first-child { width: 110px; height: 28px; margin-bottom: 18px; }
.boot-main { display: grid; align-content: start; gap: 14px; padding: 110px var(--gutter) 0; }
.sk { display: block; border-radius: 8px; background: linear-gradient(100deg, var(--bg-1) 30%, var(--bg-2) 50%, var(--bg-1) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.sk-hero { height: 280px; max-width: 760px; border-radius: 14px; }
.sk-line { height: 18px; max-width: 520px; }
.sk-line.short { max-width: 300px; }
.sk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 180px)); gap: 20px; margin-top: 20px; }
.sk-row .sk { aspect-ratio: 1; }
.sk-hero-wrap { padding-top: 104px; }
.sk-head { display: flex; gap: 32px; align-items: end; margin-bottom: 28px; }
.sk-cover { width: 240px; aspect-ratio: 1; border-radius: var(--r-art); }
.sk-head > div { flex: 1; display: grid; gap: 14px; }
.sk-h1 { height: 64px; max-width: 520px; }
.sk-t { height: 14px; width: 70%; }
.sk-s { height: 12px; width: 40%; margin-top: 8px; }
.sk-rows { display: grid; gap: 6px; margin: 12px 0 28px; }
.sk-trow { display: flex; align-items: center; gap: 14px; padding: 6px 8px; }
.sk-trow > span { flex: 1; }
.sk-sq { width: 48px; height: 48px; flex: none; }
.sk-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 184px; gap: 22px; overflow: hidden; }
.sk-tile { aspect-ratio: 1; border-radius: var(--r-art); margin-bottom: 12px; }

/* ---------- Marque ---------- */
.brand { color: var(--fg); }
.brand svg { height: 28px; width: auto; }
.brand .brand-mark { width: 30px; height: 30px; color: var(--accent); }
.brand-kit .brand-logo { height: 26px; width: auto; }
.brand-word { font: 700 24px/1 var(--font-d); letter-spacing: -.035em; }
.rail-brand, .topbar-brand { display: none; }
.auth-brand svg, .auth-brand .brand-logo { height: 38px; }

/* ---------- Coque ---------- */
.side { overflow: hidden; }
.side-lib li a { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; transition: background-color .2s; min-width: 0; }
.side-lib li a:hover { background: rgba(255, 255, 255, .04); }
.side-lib li a.active { background: rgba(255, 255, 255, .07); }
.side-lib li a.active .pl-t { color: var(--accent); }
.pl-text { min-width: 0; display: grid; }
.acct { min-width: 0; }
.acct-text { flex: 1; min-width: 0; }
.acct-n, .acct-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-more { width: 20px; height: 20px; color: var(--fg-3); }
.topbar-nav { display: flex; gap: 8px; }
.topbar-title { flex: 1; min-width: 0; margin: 0 16px; font: 700 17px/1 var(--font-d); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .3s; text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 4px; border-radius: 999px; background: rgba(15, 16, 19, .6); border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: background-color .2s, transform .2s var(--ease); }
.chip:hover { background: rgba(30, 32, 37, .85); }
.chip .avatar { width: 32px; height: 32px; font-size: 13px; }
.chip-n { max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pressed { transform: scale(.96) !important; }
.view { position: relative; isolation: isolate; }
#views { position: relative; }
.view.leaving { pointer-events: none; position: absolute; inset: 0 0 auto; }

/* ---------- Pages (en-tête artiste / album / playlist) ---------- */
.page-light { position: absolute; z-index: -1; inset: 0 calc(-1 * var(--gutter)) auto; height: 560px; pointer-events: none; -webkit-mask: linear-gradient(#000 20%, transparent); mask: linear-gradient(#000 20%, transparent); }
.page-light .light { position: absolute; inset: -80px 0 0; opacity: .55; }
.phero { position: relative; display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-areas: "art copy" "art actions"; column-gap: 40px; row-gap: 22px; align-items: end; padding: 112px 0 30px; }
.phero-art { grid-area: art; position: relative; width: 260px; aspect-ratio: 1; border-radius: var(--r-art); overflow: hidden; background: var(--bg-2); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06); }
.phero-art.round { border-radius: 50%; }
.phero-art img, .phero-art > span { width: 100%; height: 100%; object-fit: cover; }
.phero-copy { grid-area: copy; min-width: 0; }
.phero-kind { font-size: 14px; font-weight: 600; color: var(--fg-2); margin-bottom: 8px; }
.phero-title { font: 760 clamp(48px, 6.6vw, 112px)/.9 var(--font-d); font-variation-settings: 'opsz' 96, 'wdth' 80; letter-spacing: -.04em; margin-left: -.03em; overflow-wrap: anywhere; }
.phero-title.t-m { font-size: clamp(40px, 5vw, 84px); }
.phero-title.t-s { font-size: clamp(32px, 3.8vw, 60px); line-height: .98; }
.phero-desc { margin-top: 14px; max-width: 60ch; color: var(--fg-2); }
.phero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 14px; color: var(--fg-2); font-size: 15px; }
.phero-meta a { font-weight: 600; color: var(--fg); }
.phero-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.play-btn.big { width: 60px; height: 60px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 34px -10px color-mix(in oklab, var(--glow) 80%, transparent); }
.play-btn.big svg { width: 26px; height: 26px; }
.play-btn.local .ic-pause { opacity: 0; transform: scale(.5); }
.play-btn.local .ic-play { opacity: 1; transform: none; }
.play-btn.local.on .ic-play { opacity: 0; transform: scale(.5); }
.play-btn.local.on .ic-pause { opacity: 1; transform: none; }
.icon-btn.lg-ish { width: 48px; height: 48px; }
.icon-btn.lg-ish svg { width: 24px; height: 24px; }
.btn.secondary { background: transparent; box-shadow: 0 0 0 1px var(--line-2) inset; }
.btn.ghost { background: transparent; color: var(--fg-2); height: 42px; padding: 0 16px; }
.btn.ghost:hover { color: var(--fg); background: rgba(255, 255, 255, .06); }
.btn.danger { background: var(--danger); color: #1a0505; }
.btn.danger-ghost { background: transparent; color: var(--danger); box-shadow: 0 0 0 1px color-mix(in oklab, var(--danger) 55%, transparent) inset; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.busy { pointer-events: none; opacity: .7; }
.album-foot { padding-left: 12px; }

/* ---------- Listes de titres ---------- */
.tracks { border-top: 0; padding: 0; display: grid; gap: 2px; }
.tracks .trow {
  display: grid; align-items: center; gap: 14px; padding: 6px 10px 6px 8px; border-radius: 10px; cursor: default;
  grid-template-columns: 34px 48px minmax(0, 1fr) 40px 52px 40px;
  grid-template-areas: "num art main like dur more";
  content-visibility: auto; contain-intrinsic-size: auto 60px;
}
.tracks.no-cover .trow { grid-template-columns: 34px minmax(0, 1fr) 40px 52px 40px; grid-template-areas: "num main like dur more"; }
.tracks .trow.nonum { grid-template-columns: 48px minmax(0, 1fr) 40px 52px 40px; grid-template-areas: "art main like dur more"; }
.tracks.with-album .trow { grid-template-columns: 34px 48px minmax(0, 1.4fr) minmax(0, 1fr) 40px 52px 40px; grid-template-areas: "num art main album like dur more"; }
.tracks.with-meta .trow { grid-template-columns: 34px 48px minmax(0, 1.4fr) minmax(0, .8fr) 40px 52px 40px; grid-template-areas: "num art main meta like dur more"; }
.tracks.reorder .trow { grid-template-columns: 34px 48px minmax(0, 1fr) 40px 52px 40px 36px; grid-template-areas: "num art main like dur more grip"; }
.tracks .trow:hover { background: rgba(255, 255, 255, .045); }
.t-num { grid-area: num; position: relative; display: grid; place-items: center; height: 32px; color: var(--fg-3); font-variant-numeric: tabular-nums; font-size: 15px; }
.t-num b { font-weight: 500; transition: opacity .15s; }
.t-num .eq { display: none; left: 50%; top: 50%; margin: -8px 0 0 -7px; }
.trow.playing .t-num .eq { display: flex; }
.trow.playing .t-num b { opacity: 0; }
.t-play { grid-area: num; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--fg); opacity: 0; transition: opacity .15s; }
.t-play svg { grid-area: 1 / 1; width: 18px; height: 18px; }
.t-play .ic-pause { opacity: 0; }
.is-playing .trow.playing .t-play .ic-play { opacity: 0; }
.is-playing .trow.playing .t-play .ic-pause { opacity: 1; }
.trow:hover .t-play, .t-play:focus-visible { opacity: 1; }
.trow:hover .t-num b, .trow:hover .t-num .eq { opacity: 0; }
.trow.nonum .t-play { grid-area: art; width: 48px; height: 48px; border-radius: 4px; background: rgba(0, 0, 0, .5); }
.t-art { grid-area: art; width: 48px; height: 48px; border-radius: 4px; overflow: hidden; background: var(--bg-2); }
.t-art img { width: 100%; height: 100%; object-fit: cover; }
.t-main { grid-area: main; min-width: 0; display: grid; }
.t-title { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-sub { display: block; font-size: 14px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-sub a:hover, .t-album a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.trow.playing .t-title { color: var(--accent); }
.t-album { grid-area: album; min-width: 0; font-size: 14px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-meta { grid-area: meta; min-width: 0; font-size: 13.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-like { grid-area: like; opacity: 0; }
.t-like.on, .trow:hover .t-like, .t-like:focus-visible { opacity: 1; }
.t-dur { grid-area: dur; text-align: right; color: var(--fg-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.t-more { grid-area: more; opacity: 0; }
.trow:hover .t-more, .t-more:focus-visible, .t-more[aria-expanded="true"] { opacity: 1; }
.t-grip { grid-area: grip; cursor: grab; touch-action: none; color: var(--fg-3); }
.tracks.sorting .trow { transition: transform .2s var(--ease); }
.trow.dragging, .q-item.dragging { z-index: 5; background: var(--bg-3) !important; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .7); transition: none !important; cursor: grabbing; }
.reorder-hint { font-size: 13px; color: var(--fg-3); padding: 0 10px 10px; }
.chart-more { margin-top: 6px; }
@media (min-width: 1300px) {
  .chart-slot .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
}
.list-slot { min-height: 40px; }

/* ---------- Pochettes maison ---------- */
.tcover { position: relative; display: grid; place-items: end start; width: 100%; height: 100%; padding: 12%; overflow: hidden; background: radial-gradient(120% 90% at 85% 10%, hsl(var(--h) 70% 34%), hsl(var(--h) 45% 11%) 70%); color: #fff; }
.tc-ring { position: absolute; right: -28%; top: -28%; width: 92%; aspect-ratio: 1; border-radius: 50%; border: 1.5px solid hsl(var(--h) 80% 70% / .45); }
.tc-ring.r2 { right: -12%; top: -12%; width: 60%; border-color: hsl(var(--h) 80% 75% / .3); }
.tc-dot { position: absolute; right: 18%; top: 18%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: hsl(var(--h) 90% 72%); box-shadow: 0 0 18px hsl(var(--h) 90% 60%); }
.tc-title { position: relative; font: 760 22px/1 var(--font-d); font-variation-settings: 'opsz' 48, 'wdth' 82; letter-spacing: -.03em; overflow-wrap: anywhere; text-wrap: balance; }
.tc-l { font-size: clamp(18px, 2.2vw, 30px); }
.tc-m { font-size: clamp(15px, 1.7vw, 22px); }
.tc-s { font-size: clamp(12px, 1.3vw, 17px); }
.tcover.mini .tc-title, .side-lib .tc-title, .mi-cover .tc-title, .lrow-art .tc-title { display: none; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; background: var(--bg-2); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic.one { grid-template-columns: 1fr; }
.likes-cover { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(110% 90% at 80% 15%, var(--accent), color-mix(in oklab, var(--accent) 35%, #000) 75%); color: var(--accent-ink); }
.likes-cover svg { width: 42%; height: 42%; }

/* ---------- Rangées ---------- */
.rail-wrap { position: relative; }
.rail.artists { grid-auto-columns: 168px; }
.tile.playlist .crop img { transform: none; }

/* ---------- Reprendre ---------- */
.resume { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .resume { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.resume-item { position: relative; display: flex; align-items: center; gap: 14px; padding: 8px 54px 8px 8px; border-radius: 12px; background: rgba(255, 255, 255, .045); text-align: left; transition: background-color .2s, transform .2s var(--ease); min-width: 0; }
.resume-item:hover { background: rgba(255, 255, 255, .085); }
.resume-item img { width: 56px; height: 56px; border-radius: 6px; flex: none; object-fit: cover; }
.resume-item > span:not(.resume-play) { min-width: 0; display: grid; }
.resume-item b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume-item small { font-size: 13.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume-play { position: absolute; right: 12px; top: 50%; width: 36px; height: 36px; margin-top: -18px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .25s var(--ease); }
.resume-play svg { width: 18px; height: 18px; }
.resume-item:hover .resume-play, .resume-item:focus-visible .resume-play { opacity: 1; transform: none; }

/* ---------- Recherche ---------- */
.results { max-width: none; display: block; }
.search-out { padding-top: 8px; }
.clear-q { color: var(--fg-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: flex; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.chips .chip { background: none; border: 0; height: 38px; padding: 0 6px 0 14px; font-weight: 500; }
.chips .chip svg { width: 18px; height: 18px; color: var(--fg-3); }
.chip-x { margin-right: 3px; }

/* ---------- Bibliothèque ---------- */
.page-sub { color: var(--fg-2); margin-top: 10px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; margin-top: 20px; border-radius: 999px; background: var(--bg-2); }
.seg a { height: 38px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--fg-2); transition: color .2s, background-color .2s; }
.seg a:hover { color: var(--fg); }
.seg a[aria-current="page"] { background: var(--bg-3); color: var(--fg); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.lib-list { display: grid; gap: 4px; max-width: 880px; }
.lrow { position: relative; display: flex; align-items: center; }
.lrow-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; padding: 8px; border-radius: 12px; text-align: left; transition: background-color .2s, transform .2s var(--ease); }
.lrow-link:hover { background: rgba(255, 255, 255, .05); }
.lrow-art { width: 64px; height: 64px; flex: none; border-radius: 6px; overflow: hidden; background: var(--bg-2); }
.lrow-art.new { display: grid; place-items: center; background: transparent; box-shadow: 0 0 0 1.5px var(--line-2) inset; color: var(--fg-2); }
.lrow-text { min-width: 0; display: grid; gap: 2px; }
.lrow-text b { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow-text small { color: var(--fg-2); font-size: 14px; }
.lrow-more { position: absolute; right: 8px; }
.lib-hint { color: var(--fg-3); margin-top: 18px; max-width: 60ch; }

/* ---------- Paramètres ---------- */
.settings { display: grid; gap: 18px; max-width: 760px; padding-bottom: 20px; }
.card { padding: 26px; border-radius: var(--r-panel); background: var(--bg-1); border: 1px solid var(--line); }
.card h2 { font: 700 22px/1.1 var(--font-d); letter-spacing: -.02em; margin-bottom: 16px; }
.card-text { color: var(--fg-2); margin-bottom: 14px; }
.card-text.strong { color: var(--fg); font-weight: 600; }
.st-form { display: grid; gap: 16px; }
.st-form .input input { padding-left: 16px; }
.st-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.danger-card { border-color: color-mix(in oklab, var(--danger) 30%, transparent); }
.del-confirm { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; color: var(--fg-2); }
.form-error { color: var(--danger); font-size: 14px; font-weight: 500; }

/* ---------- États vides ---------- */
.empty { display: grid; justify-items: center; gap: 10px; padding: 64px 16px; text-align: center; }
.empty-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--accent); margin-bottom: 6px; }
.empty-ic svg { width: 28px; height: 28px; }
.empty h2 { font: 700 22px/1.15 var(--font-d); letter-spacing: -.02em; }
.empty p { color: var(--fg-2); max-width: 44ch; margin-bottom: 8px; }
.empty.err .empty-ic { color: var(--danger); }
.view > .empty { padding-top: 140px; }

/* ---------- Menus, feuilles, dialogues, toasts ---------- */
.layer { position: relative; z-index: 70; }
.menu-back { position: fixed; inset: 0; z-index: 70; }
.menu-back.sheet-back { background: rgba(0, 0, 0, .55); }
.menu { z-index: 71; max-width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow-y: auto; }
.menu.wide { min-width: 300px; }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-item.danger, .menu-item.danger svg { color: var(--danger); }
.menu-item > span:not(.mi-new):not(.mi-cover) { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-sub { margin-left: auto; width: 16px !important; height: 16px !important; }
.mh-user, .mh-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mh-user > div, .mh-track > div { min-width: 0; display: grid; }
.mh-user b, .mh-track b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-user span:not(.avatar), .mh-track span { font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-track img { width: 44px; height: 44px; border-radius: 4px; flex: none; }
.mh-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mh-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu .menu-item { height: auto; min-height: 42px; }
.mi-new, .mi-cover { width: 36px; height: 36px; flex: none; border-radius: 5px; overflow: hidden; display: grid; place-items: center; }
.mi-new { box-shadow: 0 0 0 1.5px var(--line-2) inset; }
.mi-text { flex: 1; min-width: 0; display: grid; text-align: left; }
.mi-text small { color: var(--fg-3); font-size: 12.5px; }
.mi-form { display: grid; gap: 10px; padding: 8px; }
.mi-form label { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.mi-form input { height: 44px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--bg-1); box-shadow: 0 0 0 1px var(--line-2) inset; }
.mi-form input:focus { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.mi-err { color: var(--danger); font-size: 13px; }
.mi-err:empty { display: none; }
.mi-actions { display: flex; justify-content: flex-end; gap: 8px; }
.menu .mi-actions .btn, .menu .btn.menu-action { width: auto; height: 40px; padding: 0 16px; }
.menu.sheet { left: 0; right: 0; bottom: 0; top: auto; max-width: none; max-height: 82dvh; border-radius: 20px 20px 0 0; padding: 6px 10px calc(14px + var(--safe-b)); border-width: 1px 0 0; }
.menu.sheet .menu-item { min-height: 52px; font-size: 16px; }
.sheet-grab { display: block; width: 40px; height: 5px; margin: 6px auto 10px; border-radius: 3px; background: var(--line-2); }
.dlg-back { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); }
.dlg { width: min(440px, 100%); display: grid; gap: 16px; padding: 26px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.dlg h2 { font: 700 22px/1.15 var(--font-d); letter-spacing: -.02em; }
.dlg-body { color: var(--fg-2); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dlg .input input { padding-left: 16px; }
.toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--mini-h) + 36px); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toasts .toast { position: static; transform: none; opacity: 1; pointer-events: auto; }
.toast.err svg { color: var(--danger); }
.toast-act { margin-left: 6px; padding: 6px 10px; border-radius: 8px; font-weight: 700; color: var(--bg); background: rgba(0, 0, 0, .08); }

/* ---------- Lecteur (barre) ---------- */
.bar {
  position: fixed; z-index: 20; left: calc(var(--side) + 20px); right: 20px; bottom: 16px; height: var(--mini-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(320px, 620px) minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 0 16px 0 10px; border-radius: var(--r-panel);
  background: color-mix(in oklab, var(--bg-2) 92%, var(--glow));
  border: 1px solid var(--line); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .65);
  transition: background-color .9s var(--ease);
}
.bar-progress { display: none; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.bar-progress .fill { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }
.bar-track { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 4px; border-radius: 10px; text-align: left; }
.bar-art { position: relative; width: 56px; height: 56px; flex: none; border-radius: 5px; overflow: hidden; background: var(--bg-3); box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .7); }
.bar-art img { width: 100%; height: 100%; object-fit: cover; }
.bar-text { min-width: 0; display: grid; }
.bar-title, .bar-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title { font-weight: 600; }
.bar-artist { font-size: 13.5px; color: var(--fg-2); }
.bar-center { grid-column: 3; display: grid; gap: 2px; justify-items: center; min-width: 0; }
.bar-ctl { display: flex; align-items: center; gap: 8px; }
.bar-ctl .icon-btn { width: 36px; height: 36px; }
.bar-ctl .icon-btn svg { width: 20px; height: 20px; }
.bar-ctl .play-btn { width: 40px; height: 40px; margin: 0 6px; }
.bar-scrub { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.bar-scrub > span { width: 38px; }
.bar-scrub .t-cur { text-align: right; }
.bar-scrub .t-dur { text-align: left; }
.bar-right { grid-column: 4; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.bar-play-compact { display: none; }
.vol-scrub { flex: 1; }
.buffer { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); opacity: 0; pointer-events: none; }
.is-buffering .buffer { opacity: 1; animation: spin .8s linear infinite; }
body:not(.has-player) .views { padding-bottom: 56px; }

/* ---------- Lecture en cours ---------- */
.now-light { position: absolute; inset: 0; background: radial-gradient(60% 50% at 35% 40%, color-mix(in oklab, var(--glow) 55%, transparent), transparent 70%); opacity: .7; }
.q-item { grid-template-columns: minmax(0, 1fr) auto auto; padding: 4px 6px 4px 4px; }
.q-main { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px; border-radius: 8px; text-align: left; }
.q-art { position: relative; width: 48px; height: 48px; flex: none; }
.q-text { min-width: 0; display: grid; }
.q-text .t-sub { font-size: 13px; }
.q-dur { font-size: 13px; color: var(--fg-3); font-variant-numeric: tabular-nums; padding-right: 8px; }
.q-rm { opacity: 0; }
.q-item:hover .q-rm, .q-rm:focus-visible { opacity: 1; }
.q-grip { cursor: grab; touch-action: none; color: var(--fg-3); }

/* ---------- Connexion ---------- */
.auth { visibility: visible; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 560px); }
.auth-visual { position: absolute; inset: 0 auto 0 0; width: 60%; overflow: hidden; }
.auth-visual canvas { width: 100%; height: 100%; display: block; }
.auth-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, var(--bg)), linear-gradient(0deg, rgba(15, 16, 19, .9), transparent 45%); }
.auth-intro { z-index: 1; }
.auth-line { max-width: 12ch; }
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-panel { background: var(--bg); }

/* ---------- Tablette : rail d'icônes ---------- */
@media (max-width: 1180px) and (min-width: 768px) {
  :root { --side: 84px; --gutter: 32px; }
  .side { padding: 22px 12px; align-items: center; gap: 18px; }
  .side-brand, .side-lib, .side-nav span, .acct-text, .acct-more { display: none; }
  .rail-brand { display: inline-flex; padding: 0; }
  .side-nav a { width: 56px; height: 52px; justify-content: center; padding: 0; }
  .side-nav a svg { width: 26px; height: 26px; }
  .side-account { margin-top: auto; }
  .acct { justify-content: center; padding: 4px; }
  .bar { grid-template-columns: minmax(0, 1fr) auto minmax(260px, 1.4fr) auto; }
  .vol { display: none; }
  .phero { grid-template-columns: 200px minmax(0, 1fr); column-gap: 28px; }
  .phero-art { width: 200px; }
  .tracks.with-album .trow, .tracks.with-meta .trow { grid-template-columns: 34px 48px minmax(0, 1fr) 40px 52px 40px; grid-template-areas: "num art main like dur more"; }
  .t-album, .t-meta { display: none; }
  .now-body { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1000px) and (min-width: 768px) {
  .bar-like { display: none; }
  .now-body { grid-template-columns: 1fr; overflow-y: auto; }
  .now-queue { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-visual { width: 100%; }
  .auth-visual::after { background: rgba(15, 16, 19, .55); }
  .auth-intro { display: none; }
  .auth-panel { grid-column: 1; width: min(520px, 100%); justify-self: center; background: rgba(15, 16, 19, .82); border-radius: 24px; margin: 24px 0; }
}
@media (hover: none) {
  .t-like, .t-more, .q-rm { opacity: 1; }
  .resume-play { opacity: 1; transform: none; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  :root { --gutter: 16px; --mini-h: 62px; --tab-h: 56px; --side: 0px; }
  .app { display: block; }
  .side, .boot-side { display: none; }
  .boot { display: block; }
  .boot-main { padding-top: 72px; }
  .sk-row { grid-template-columns: repeat(2, 1fr); }
  .sk-hero { height: 200px; }
  .main { height: 100dvh; }
  .topbar { position: sticky; height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) var(--gutter) 0; background: linear-gradient(var(--bg) 45%, rgba(15, 16, 19, 0)); }
  body.scrolled .topbar { background: color-mix(in oklab, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); }
  .topbar-nav { display: none; }
  .topbar-brand { display: inline-flex; }
  .topbar-brand svg, .topbar-brand .brand-logo { height: 22px; }
  body.scrolled-far .topbar-title { opacity: 1; }
  body.scrolled-far .topbar-brand { display: none; }
  .chip { height: 38px; padding: 0; background: none; border: 0; }
  .chip-n { display: none; }
  .views { padding-bottom: calc(var(--mini-h) + var(--tab-h) + var(--tab-pad) + 40px); }
  body:not(.has-player) .views { padding-bottom: calc(var(--tab-h) + var(--tab-pad) + 32px); }
  .sk-hero-wrap { padding-top: 12px; }
  .sk-head { flex-direction: column; align-items: center; }
  .sk-cover { width: 60vw; }

  .phero { grid-template-columns: 1fr; grid-template-areas: "art" "copy" "actions"; justify-items: center; text-align: center; padding: 10px 0 18px; row-gap: 18px; }
  .phero-art { width: min(64vw, 260px); }
  .phero-title { font-size: clamp(34px, 10vw, 52px); margin-left: 0; }
  .phero-title.t-m { font-size: clamp(30px, 8.6vw, 44px); }
  .phero-title.t-s { font-size: clamp(24px, 7vw, 34px); }
  .phero-meta { justify-content: center; font-size: 14px; }
  .actions { justify-content: center; }
  .page-light { height: 420px; }
  .page-head { padding: 8px 0 14px; }
  .page-head h1 { font-size: 40px; }
  .seg { margin-top: 14px; }

  .tracks .trow, .tracks.with-album .trow, .tracks.with-meta .trow, .tracks .trow.nonum { grid-template-columns: 48px minmax(0, 1fr) 44px 44px; grid-template-areas: "art main like more"; gap: 10px; padding: 5px 0; }
  .tracks.no-cover .trow { grid-template-columns: 28px minmax(0, 1fr) 44px 44px; grid-template-areas: "num main like more"; }
  .tracks.reorder .trow { grid-template-columns: 48px minmax(0, 1fr) 44px 44px 44px; grid-template-areas: "art main like more grip"; }
  .tracks .trow:hover { background: none; }
  .tracks:not(.no-cover) .t-num, .t-dur, .t-album, .t-meta { display: none; }
  .t-play { grid-area: art; width: 48px; height: 48px; border-radius: 4px; opacity: 0 !important; }
  .tracks.no-cover .t-play { grid-area: num; }
  .t-like, .t-more, .t-grip { width: 44px; height: 44px; }
  .t-title { font-size: 15px; }
  .t-sub { font-size: 13.5px; }
  .chart-slot .tracks { grid-template-columns: 1fr; }

  .resume { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .resume-item { padding: 6px 8px 6px 6px; gap: 10px; }
  .resume-item img { width: 44px; height: 44px; }
  .resume-play { display: none; }
  .lrow-art { width: 56px; height: 56px; }
  .lrow-more { right: 0; width: 44px; height: 44px; }
  .card { padding: 20px; }
  

  .bar {
    left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--tab-pad) + 6px); height: var(--mini-h);
    grid-template-columns: minmax(0, 1fr) auto auto; padding: 0 8px 0 4px; gap: 2px; border-radius: 12px; overflow: hidden;
  }
  .bar-center, .bar-right { display: none; }
  .bar-progress { display: block; }
  .bar-track { gap: 11px; }
  .bar-art { width: 46px; height: 46px; border-radius: 6px; }
  .bar-title { font-size: 14.5px; }
  .bar-artist { font-size: 13px; }
  .bar-like { width: 44px; height: 44px; }
  .bar-play-compact { display: inline-grid; width: 44px; height: 44px; background: none; color: var(--fg); }
  .bar-play-compact svg { width: 26px; height: 26px; }

  .tabbar {
    position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr);
    height: calc(var(--tab-h) + var(--tab-pad)); padding-bottom: var(--tab-pad);
    background: color-mix(in oklab, var(--bg) 94%, transparent); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--fg-3); transition: color .2s; }
  .tabbar a svg { width: 25px; height: 25px; grid-area: 1 / 1; }
  .tabbar a span { grid-row: 2; }
  .tabbar a .on { opacity: 0; }
  .tabbar a.active { color: var(--fg); }
  .tabbar a.active .on { opacity: 1; color: var(--accent); }
  .tabbar a.active .off { opacity: 0; }
  body.now-open .tabbar, body.now-open .bar { visibility: hidden; }
  .toasts { bottom: calc(var(--mini-h) + var(--tab-h) + var(--tab-pad) + 18px); }

  .now-top { padding-top: calc(12px + env(safe-area-inset-top, 0px)); height: calc(60px + env(safe-area-inset-top, 0px)); }
  .q-rm { opacity: 1; }

  .auth { display: block; overflow-y: auto; }
  .auth-visual { position: absolute; inset: 0 0 auto 0; width: auto; height: 340px; }
  .auth-visual::after { background: linear-gradient(180deg, rgba(15, 16, 19, .2), rgba(15, 16, 19, .7) 60%, var(--bg)); }
  .auth-intro { padding: calc(110px + env(safe-area-inset-top, 0px)) 24px 0; }
  .auth-brand svg, .auth-brand .brand-logo { height: 30px; }
  .auth-panel { padding: 26px 20px calc(28px + var(--safe-b)); background: transparent; }
}

/* Retouches */
.hero-kind { display: block; line-height: 1.5; }
.hero-kind a { display: inline; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .hero-kind { font-size: 12.5px; }
}

/* ---------- Temps d'écoute ---------- */
.seg-sm { display: flex; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-top: 12px; background: transparent; padding: 0; gap: 6px; }
.seg-sm a { height: 34px; padding: 0 14px; font-size: 13.5px; box-shadow: 0 0 0 1px var(--line-2) inset; white-space: nowrap; }
.seg-sm a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }

.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 4px; height: 180px; padding: 10px 0 0; border-bottom: 1px solid var(--line-2); }
.day { position: relative; height: 100%; display: flex; align-items: flex-end; border-radius: 4px 4px 0 0; outline-offset: 2px; }
.day i { display: block; width: 100%; height: 100%; border-radius: 4px 4px 1px 1px; background: linear-gradient(var(--accent), color-mix(in oklab, var(--accent) 45%, transparent)); transform-origin: 50% 100%; transform: scaleY(var(--v)); transition: filter .2s; }

.day:hover i, .day:focus-visible i { filter: brightness(1.25); }
.day::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); padding: 6px 10px; border-radius: 8px; background: var(--fg); color: var(--bg); font-size: 12.5px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .2s var(--ease); z-index: 2; }
.day:hover::after, .day:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.day:first-child::after { left: 0; transform: translate(0, 4px); }
.day:last-child::after { left: auto; right: 0; transform: translate(0, 4px); }
.day:first-child:hover::after, .day:last-child:hover::after, .day:first-child:focus-visible::after, .day:last-child:focus-visible::after { transform: none; }

.ph { display: grid; place-items: center; color: var(--fg-3); background: var(--bg-2); }
.ph svg { width: 40%; height: 40%; }

.week-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 260px) auto; align-items: center; gap: 24px; padding: 20px 22px; border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--glow) 45%, transparent), transparent 60%), rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: transform .3s var(--ease), background-color .25s; max-width: 900px; }
.week-card:hover { transform: translateY(-2px); background-color: rgba(255, 255, 255, .07); }
.wk-text { display: grid; gap: 2px; min-width: 0; }
.wk-kind { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.wk-big { font: 760 44px/1 var(--font-d); letter-spacing: -.035em; }
.wk-sub { color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 64px; }
.wk-bars i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: 50% 100%; transform: scaleY(var(--v)); opacity: .85; }
.wk-go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .07); color: var(--fg); }
.wk-go svg { width: 20px; height: 20px; }

@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  
  
  
  
  
  
  .days { height: 130px; gap: 2px; }
  
  
  .week-card { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; padding: 16px; }
  .wk-go { display: none; }
  .wk-big { font-size: 34px; }
  .wk-bars { height: 48px; gap: 4px; }
}

/* Onglets défilants sur téléphone, file visible sur tablette portrait */
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .seg { display: flex; flex-wrap: nowrap; max-width: calc(100% + 2 * var(--gutter)); margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 4px var(--gutter); border-radius: 0; background: transparent; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
  .seg::-webkit-scrollbar { display: none; }
  .seg a { flex: none; white-space: nowrap; background: var(--bg-2); }
  .seg-sm { padding-top: 0; }
  .seg-sm a { background: transparent; }
}
@media (max-width: 1000px) and (min-width: 768px) {
  .now-body { display: block; overflow-y: auto; padding-bottom: 40px; }
  .now-main { padding-top: 12px; }
  .now-queue { display: flex; max-width: 640px; margin: 36px auto 0; }
  .q-list { overflow: visible; }
}

/* Liste avec album + info (historique) */
.tracks.with-album.with-meta .trow { grid-template-columns: 34px 48px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .6fr) 40px 52px 40px; grid-template-areas: "num art main album meta like dur more"; }
.tracks.with-album.with-meta .trow.nonum { grid-template-columns: 48px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .6fr) 40px 52px 40px; grid-template-areas: "art main album meta like dur more"; }
@media (max-width: 1180px) and (min-width: 768px) {
  .tracks.with-album.with-meta .trow { grid-template-columns: 34px 48px minmax(0, 1fr) 40px 52px 40px; grid-template-areas: "num art main like dur more"; }
  .tracks.with-album.with-meta .trow.nonum { grid-template-columns: 48px minmax(0, 1fr) 40px 52px 40px; grid-template-areas: "art main like dur more"; }
}
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .tracks.with-album.with-meta .trow, .tracks.with-album.with-meta .trow.nonum { grid-template-columns: 48px minmax(0, 1fr) 44px 44px; grid-template-areas: "art main like more"; }
}

/* ---------- Paroles ---------- */
.now-tools { display: flex; gap: 8px; }
.icon-btn[data-action="lyrics"][aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); }
.icon-btn[data-action="lyrics"][aria-pressed="true"]::after { display: none; }
.now.lyrics-on .stage { display: none; }
.now-lyrics { position: relative; width: min(100%, 760px); height: var(--S); display: flex; flex-direction: column; flex: none; }
.ly-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px 6px; }
.ly-badge { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ly-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; padding: 16% 0 40%; -webkit-mask: linear-gradient(transparent, #000 14%, #000 78%, transparent); mask: linear-gradient(transparent, #000 14%, #000 78%, transparent); }
.ly-scroll::-webkit-scrollbar { display: none; }
.ly-line { margin: 0; padding: 7px 6px; font: 740 clamp(22px, 2.5vw, 36px)/1.22 var(--font-d); font-variation-settings: 'opsz' 48, 'wdth' 88; letter-spacing: -.02em; color: rgba(255, 255, 255, .3); cursor: pointer; transform-origin: 0 50%; transition: color .35s, transform .5s var(--ease); text-wrap: balance; }
.ly-line:hover { color: rgba(255, 255, 255, .6); }
.ly-line.past { color: rgba(255, 255, 255, .48); }
.ly-line.gap span { letter-spacing: .25em; }
.ly-line.on { transform: scale(1.045); }
.ly-line.on span {
  color: transparent;
  background: linear-gradient(90deg, var(--fg) var(--k, 0%), color-mix(in oklab, var(--accent) 75%, #fff) calc(var(--k, 0%) + 1.5%), rgba(255, 255, 255, .45) calc(var(--k, 0%) + 10%));
  -webkit-background-clip: text; background-clip: text;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  filter: drop-shadow(0 0 18px color-mix(in oklab, var(--glow) 60%, transparent));
}
.ly-line.static { cursor: default; color: var(--fg-2); font-size: clamp(18px, 1.9vw, 24px); font-weight: 600; padding: 3px 6px; }
.ly-state { color: var(--fg-2); font-size: 17px; text-align: center; padding-top: 18%; }

/* ---------- Apparence ---------- */
.look-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.look-mode { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; text-align: left; box-shadow: 0 0 0 1px var(--line-2) inset; transition: box-shadow .2s, background-color .2s; min-width: 0; }
.look-mode:hover { background: rgba(255, 255, 255, .03); }
.look-mode[aria-checked="true"] { box-shadow: 0 0 0 2px var(--accent) inset; background: rgba(255, 255, 255, .045); }
.look-mode b { display: block; font-weight: 600; }
.look-mode small { display: block; color: var(--fg-3); font-size: 13px; }
.lm-dot { width: 30px; height: 30px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15) inset; }
.lm-dot.auto { background: conic-gradient(#2ec4b6, #3d7bff, #ff4fa3, #ff8a3d, #ffd23f, #22c55e, #2ec4b6); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14) inset; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-checked="true"], .swatch.custom.on { box-shadow: 0 0 0 3px var(--bg-1), 0 0 0 5px var(--c); }
.swatch[aria-checked="true"]::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.swatch.custom svg { width: 20px; height: 20px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); pointer-events: none; }
.swatch.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

/* ---------- Pour vous ---------- */
.fy-head { padding-top: 24px; }
.fy-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.fy-kicker::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.mix-head { display: flex; align-items: center; gap: 14px; margin: -2px 0 12px; }
.mix-count { color: var(--fg-3); font-size: 14px; }

@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .now-lyrics { width: 100%; height: min(60dvh, 540px); padding: 0 6px; }
  .ly-line { font-size: 24px; }

  .look-modes { grid-template-columns: 1fr; }

}

/* Karaoké : les paroles prennent l'espace libre au-dessus des commandes */

.now-lyrics { overflow: hidden; }
.ly-scroll { flex: 1 1 0; height: 0; padding: 14vh 0 30vh; }

/* Paroles v2 : ligne active franche, texte lisible, sans remplissage par fragment */
.ly-line { font: 700 clamp(21px, 2.1vw, 30px)/1.28 var(--font); font-variation-settings: 'wdth' 92; letter-spacing: -.012em; padding: 9px 6px; color: rgba(255, 255, 255, .28); transition: color .4s, transform .5s var(--ease), filter .4s; }
.ly-line.past { color: rgba(255, 255, 255, .42); }
.ly-line.on { color: #fff; transform: scale(1.03); text-shadow: 0 0 28px color-mix(in oklab, var(--glow) 70%, transparent); }
.ly-line.on span { color: inherit; background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none; }
.ly-line.gap span { letter-spacing: .3em; font-size: .8em; }

@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .ly-line { font-size: 21px; padding: 8px 4px; }

}
.tracks .trow { content-visibility: visible; contain-intrinsic-size: none; }

/* Titres likés : même en-tête que les autres onglets de la bibliothèque */
.lib-actions { display: flex; align-items: center; gap: 18px; margin: 2px 0 10px; }
.lib-actions .actions { grid-area: auto; }
.lib-actions .likes-count { color: var(--fg-2); font-weight: 600; }
.view-likes .tracks-sec { padding-top: 8px; }

/* ---------- Temps d'écoute v3 (format des apps de stats) ---------- */
.stat-sum { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px; margin: 10px 0 8px; }
.ss-n { font: 780 clamp(56px, 7vw, 96px)/1 var(--font-d); font-variation-settings: 'opsz' 96, 'wdth' 82; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ss-u { font: 700 clamp(22px, 2.2vw, 30px)/1 var(--font-d); color: var(--fg-2); letter-spacing: -.01em; }
.ss-sub { grid-column: 1 / -1; color: var(--fg-2); font-size: 15px; margin-top: 8px; }

.top-artists { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 22px; max-width: 980px; }
.ta { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.ta-img { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--bg-2); margin-bottom: 8px; }
.ta-img img, .ta-img .ph { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transition: transform .4s var(--ease); box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .8); }
.ta:hover .ta-img img { transform: scale(1.04); }
.ta-rank { position: absolute; left: 2%; bottom: 2%; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background: var(--bg); color: var(--fg); font: 760 16px/1 var(--font-d); box-shadow: 0 0 0 3px var(--bg); font-variant-numeric: tabular-nums; }
.top-artists li:first-child .ta-rank { background: var(--accent); color: var(--accent-ink); }
.ta-name { max-width: 100%; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-min { font-size: 13.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }

.top-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); grid-auto-flow: column; column-gap: 32px; row-gap: 2px; max-width: 1180px; }
.tt { display: grid; grid-template-columns: 30px 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 8px 12px 8px 4px; border-radius: 12px; text-align: left; transition: background-color .2s; }
.tt:hover { background: rgba(255, 255, 255, .05); }
.tt-n { font: 700 17px/1 var(--font-d); color: var(--fg-3); text-align: center; font-variant-numeric: tabular-nums; }
.top-tracks li:first-child .tt-n { color: var(--accent); }
.tt-art { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; background: var(--bg-2); }
.tt-art img, .tt-art .ph { width: 100%; height: 100%; object-fit: cover; }
.tt-main { min-width: 0; display: grid; gap: 2px; }
.tt-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-main small { font-size: 13.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-min { font-size: 14px; font-weight: 600; color: var(--fg-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 1180px) {
  .top-tracks { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
}
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .top-artists { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 30%; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 6px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); }
  .top-artists::-webkit-scrollbar { display: none; }
  .top-artists li { scroll-snap-align: start; }
  .ta-rank { min-width: 28px; height: 28px; font-size: 14px; }
  .ta-name { font-size: 14px; }
  .tt { grid-template-columns: 24px 48px minmax(0, 1fr) auto; gap: 12px; padding: 7px 0; }
  .tt-art { width: 48px; height: 48px; }
  .tt:hover { background: none; }
}

/* 5 onglets en bas sur téléphone + carte profil */
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .tabbar { grid-template-columns: repeat(5, 1fr); }
  .tabbar a { font-size: 10.5px; gap: 4px; min-width: 0; }
  .tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar a svg { width: 24px; height: 24px; }
  .topbar-account { display: none; }
}
.me-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 20px; border-radius: var(--r-panel); background: radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--glow) 40%, transparent), transparent 60%), var(--bg-1); border: 1px solid var(--line); }
.me-avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 760 28px/1 var(--font-d); }
.me-text { min-width: 0; display: grid; gap: 2px; }
.me-text b { font: 720 22px/1.15 var(--font-d); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: var(--fg-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-out { height: 44px; padding: 0 18px; }
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .me-card { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .me-avatar { width: 56px; height: 56px; font-size: 24px; }
  .me-out { grid-column: 1 / -1; width: 100%; }
}

/* Connexion toujours turquoise, quel que soit le thème choisi */
.auth { --accent: #2ec4b6; --accent-ink: #032321; --glow: #1f7f78; }
/* Cibles tactiles >= 44 px sur téléphone */
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .q-rm, .q-grip, .t-grip, .ly-head .icon-btn.sm, .clear-q { width: 44px; height: 44px; }
  .now-artist { padding: 10px 0; margin: -6px 0; }
}
.settings { min-width: 0; }
.settings > * { min-width: 0; max-width: 100%; }

/* Paroles v3 : une seule ligne active, survol discret, centrées sur grand écran */
.ly-line { transition: color .18s linear, transform .3s var(--ease); }
.ly-line:hover:not(.on) { color: rgba(255, 255, 255, .5); }
.ly-line.past { color: rgba(255, 255, 255, .32); }
.ly-line:not(.on):not(.past) { color: rgba(255, 255, 255, .22); }
.ly-line.on { color: #fff; transform: scale(1.04); }
@media (min-width: 768px) and (min-height: 501px) {
  .now-lyrics { margin: 0 auto; }
  .ly-head { justify-content: center; gap: 12px; }
  .ly-line { text-align: center; transform-origin: 50% 50%; }
}

/* Playlist perso : album + poignée de tri sur la même ligne */
.tracks.reorder.with-album .trow { grid-template-columns: 34px 48px minmax(0, 1.3fr) minmax(0, 1fr) 40px 52px 40px 36px; grid-template-areas: "num art main album like dur more grip"; }
@media (max-width: 1180px) and (min-width: 768px) {
  .tracks.reorder.with-album .trow { grid-template-columns: 34px 48px minmax(0, 1fr) 40px 52px 40px 36px; grid-template-areas: "num art main like dur more grip"; }
}
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .tracks.reorder.with-album .trow { grid-template-columns: 48px minmax(0, 1fr) 44px 44px 44px; grid-template-areas: "art main like more grip"; }
}

/* Info-bulles */
.tip { position: fixed; left: 0; top: 0; z-index: 200; max-width: 260px; padding: 6px 10px; border-radius: 8px; background: var(--fg); color: var(--bg); font: 600 12.5px/1.3 var(--font); box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .6); pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap; }
.tip.on { opacity: 1; }
@media (hover: none) { .tip { display: none; } }

/* Paroles v4 : toutes les lignes alignées sur la même colonne (à gauche) */
.ly-line, .ly-line.on { text-align: left; transform-origin: 0 50%; }
.ly-line.on { transform: scale(1.03); }
@media (min-width: 768px) and (min-height: 501px) {
  .now-lyrics { width: min(100%, 540px); margin: 0 auto; }
  .ly-head { justify-content: space-between; }
  .ly-line { text-align: left; transform-origin: 0 50%; font-size: clamp(22px, 1.9vw, 28px); padding-left: 0; padding-right: 0; }
  .ly-head { padding-left: 0; padding-right: 0; }
}

@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  .now-lyrics { padding: 0; }
  .ly-line, .ly-head { padding-left: 0; padding-right: 0; }
}

/* Paroles : la ligne active ne doit jamais dépasser ni faire bouger la page */
.ly-scroll, .now-lyrics { overflow-x: hidden; }
.ly-line { overflow-wrap: anywhere; }
/* grand écran : l'agrandissement de 3 % est compensé, la ligne agrandie fait pile la largeur */
.ly-line { width: calc(100% / 1.03); }
@media (max-width: 767px), (max-height: 500px) and (max-width: 1000px) {
  /* téléphone : pas d'agrandissement du tout, seulement la couleur — rien ne saute, rien ne dépasse */
  .ly-line { width: auto; }
  .ly-line.on { transform: none; }
}

/* ---------- Barre : nom de l'artiste cliquable, le reste ouvre le lecteur ---------- */
.bar-track { position: relative; }
.bar-open { position: absolute; inset: 0; border-radius: 10px; }
.bar-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar-art, .bar-text { pointer-events: none; }
.bar-artist { justify-self: start; max-width: 100%; pointer-events: auto; position: relative; }
.bar-artist[href]:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.bar-artist:not([href]) { pointer-events: none; }
@media (max-width: 767px) { .bar-artist { pointer-events: none; } }

/* ---------- À suivre ---------- */
.q-head { align-items: center; }
.q-head span { font-variant-numeric: tabular-nums; }
.q-list { -webkit-mask: linear-gradient(#000 calc(100% - 28px), transparent); mask: linear-gradient(#000 calc(100% - 28px), transparent); padding-bottom: 16px; }
.q-item { grid-template-columns: minmax(0, 1fr) 44px 32px 32px; gap: 2px; }
.q-dur { padding-right: 0; text-align: right; }
.q-item .q-rm, .q-item .q-grip { width: 32px; height: 32px; }
.q-grip { opacity: .55; }
.q-item:hover .q-grip, .q-grip:focus-visible { opacity: 1; }
.q-empty { padding: 28px 16px; text-align: center; color: var(--fg-3); font-size: 14px; line-height: 1.5; }
@media (max-width: 767px) {
  .q-list { -webkit-mask: none; mask: none; padding-bottom: 0; }
  .q-item { grid-template-columns: minmax(0, 1fr) 44px 44px; }
  .q-dur { display: none; }
  .q-item .q-rm, .q-item .q-grip { width: 44px; height: 44px; }
  .q-grip { opacity: 1; }
}
@media (max-width: 1000px) and (min-width: 768px) {
  .q-list { -webkit-mask: none; mask: none; padding-bottom: 0; }
}
@media (hover: none) { .q-item:hover { background: none; } }

.st-diag { margin: 28px 0 8px; font-size: 11.5px; line-height: 1.5; color: var(--fg-3); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* iPhone, application sur l'écran d'accueil (iOS 26, barre d'état translucide) :
   iOS raccourcit la page de la hauteur de la barre d'état tant qu'elle est moins haute que l'écran,
   et rien n'est dessiné en dessous (onglets qui flottent au-dessus d'une bande vide).
   Une page au moins aussi haute que l'écran récupère toute la hauteur. Le plafond 100lvh évite
   tout défilement parasite quand la barre d'état est opaque. */
@media (display-mode: standalone) {
  html { min-height: min(100lvh, calc(100% + env(safe-area-inset-top, 0px))); }
}

/* Barre de progression : le curseur se déplace dans la barre sans jamais en sortir
   (avant, son conteneur pleine largeur décalé vers la droite élargissait le lecteur au fil du morceau) */
.scrub-thumb { left: 7px; right: 7px; }
.scrub { overflow: hidden; overflow: clip; }

/* Paroles : une ligne garde exactement la même forme quand elle devient active
   (Safari recalculait le « balance » au changement de style → 2 lignes devenaient 1) */
.ly-line, .ly-line.on { text-wrap: wrap; white-space: normal; }
.ly-line.on span { -webkit-box-decoration-break: slice; box-decoration-break: slice; }

/* En-tête du haut : reste en haut de la page et part avec le défilement (rien ne suit) */
@media (max-width: 1180px), (max-height: 500px) and (max-width: 1000px) {
  .topbar, body.scrolled .topbar { position: relative; background: none; border-bottom: 0; }
}
@media (max-width: 760px) { body.scrolled-far .topbar-brand { display: inline-flex; } }
.topbar-title, body.scrolled-far .topbar-title { display: none; }
