/* Charte Rewamp (rewamp.app, assets/css/style.css): nuit #160a1e, prune
   #4a0e36, magenta #f0388f (le soleil du logo), coucher de soleil #ff9e3d,
   cyan #38d6e0, police Inter. Le thème clair en est la déclinaison de jour. */
:root {
  --bg: #f8f4fb; --fg: #1d0f28; --mut: #6f5f80; --line: #e9e0f0; --card: #ffffff; --card2: #f0e8f5;
  --acc: #d81f7d; --acc-fg: #ffffff; --acc2: #f07a1e; --cyan: #0fa3b1; --hover: #efe5f5; --bar: #ffffffee;
  --shadow: 0 6px 20px #2a0b3a22; --glow: 0 8px 26px rgba(216, 31, 125, 0.28);
  --sun: linear-gradient(135deg, #f0388f, #ff9e3d);
  color-scheme: light;
}
/* Thème: `data-theme` sur <html> (settings.js). Absent = suivre le système;
   « light » / « dark » forcent. Les deux blocs sombres sont identiques. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #160a1e; --fg: #f4f1ff; --mut: #b7a9c9; --line: rgba(244, 241, 255, 0.09); --card: #1e0f2a; --card2: #2a1638;
    --acc: #f0388f; --acc-fg: #ffffff; --acc2: #ff9e3d; --cyan: #38d6e0; --hover: #2b1739; --bar: #160a1eee;
    --shadow: 0 10px 30px #0009; --glow: 0 8px 30px rgba(240, 56, 143, 0.35); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #160a1e; --fg: #f4f1ff; --mut: #b7a9c9; --line: rgba(244, 241, 255, 0.09); --card: #1e0f2a; --card2: #2a1638;
  --acc: #f0388f; --acc-fg: #ffffff; --acc2: #ff9e3d; --cyan: #38d6e0; --hover: #2b1739; --bar: #160a1eee;
  --shadow: 0 10px 30px #0009; --glow: 0 8px 30px rgba(240, 56, 143, 0.35); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  /* viewport-fit=cover (index.html), pour que le plein écran du visualiseur
     sache où sont les barres de Safari (env()): la page, elle, reste dans la
     zone sûre. Nul hors iPhone/iPad. */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
/* Lignes ATTITRÉES: le bandeau masqué (display: none) ne prend pas de ligne,
   et sans ça tout remontait d'un cran — <main> dans « auto », la barre du bas
   dans « 1fr », qui grandissait dès qu'une page était plus courte que la
   fenêtre (réglages) et rétrécissait le lecteur ouvert. */
#appBanner { grid-row: 1; } #top { grid-row: 2; } body > main { grid-row: 3; } #bar { grid-row: 4; }
/* Bandeau « l'app native » (téléphone, tablette): une ligne fermable au-dessus de tout. */
#appBanner { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 16px; background: var(--sun); color: #fff; font-size: 14px; }
#appBanner[hidden] { display: none; }
#appBanner .txt { flex: 1; min-width: 0; line-height: 1.35; }
#appBanner a.get { flex: none; background: #fff; color: #b0105f; font-weight: 700; text-decoration: none; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
#appBanner button { flex: none; color: #fff; font-size: 18px; line-height: 1; padding: 6px 8px; }
#appBanner button:hover { background: #fff3; }
@media (max-width: 640px) { #appBanner { font-size: 13px; padding: 6px 8px 6px 14px; } #appBanner a.get { padding: 5px 12px; } }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; border-radius: 8px; padding: 6px 10px; }
button:hover { background: var(--hover); }
button.main { background: var(--acc); color: var(--acc-fg); width: 42px; height: 42px; border-radius: 50%; font-size: 17px; box-shadow: var(--glow); }
button.main:hover { background: var(--acc); filter: brightness(1.08); }
/* Lecture / pause: deux SVG fixes, le bouton n'en montre qu'un. ⚠️ Safari: le
   DOM sous le pointeur ne doit pas changer entre l'appui et le relâchement
   (sinon pas de click), d'où display seul et pointer-events: none. */
#toggle { display: grid; place-items: center; }
#toggle svg, .controls .tr svg { fill: currentColor; pointer-events: none; display: block; }
#toggle svg { width: 24px; height: 24px; }
#toggle .i-pause, #toggle.playing .i-play { display: none; }
#toggle.playing .i-pause { display: block; }
.controls .tr { display: grid; place-items: center; }
.controls .tr svg { width: 22px; height: 22px; }
button.ghost { color: var(--mut); }
button.on, .ghost.on { color: var(--acc); }
button.primary { background: var(--acc); color: var(--acc-fg); padding: 10px 22px; border-radius: 999px; font-weight: 700; box-shadow: var(--glow); }
button.primary:hover { filter: brightness(1.08); background: var(--acc); }
button.icon { color: var(--mut); opacity: 0; font-size: 17px; }

/* ── En-tête ─────────────────────────────────────────────────────────────── */
#top { display: flex; gap: 18px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; color: var(--fg); text-decoration: none; letter-spacing: -.02em; flex: none; }
.brand img { width: 26px; height: 26px; display: block; }
.brand b { color: var(--acc); font-weight: 700; }
/* Navigation principale: un groupe de pastilles à côté de la marque, l'onglet
   actif en dégradé « soleil » (celui du logo), comme le site rewamp.app. */
.mainnav { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); flex: none; }
.navlink { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px 6px 11px; border-radius: 999px;
  color: var(--mut); text-decoration: none; font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.navlink svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.navlink:hover { color: var(--fg); background: var(--hover); }
.navlink.on { color: #fff; background: var(--sun); box-shadow: var(--glow); }
@media (max-width: 1100px) { .navlink span { display: none; } .navlink { padding: 7px 10px; } }
/* Retour: petit rond à gauche de la marque, seulement sur un écran de DÉTAIL (app.js, route). */
#backBtn { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  color: var(--fg); background: var(--card2); border: 1px solid var(--line); cursor: pointer; margin-right: -8px; }
#backBtn[hidden] { display: none; }
#backBtn:hover { background: var(--hover); }
#backBtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) { #backBtn { margin-right: 0; } #backBtn:not([hidden]) + .brand span { display: none; } }
#moreMenu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: var(--fg); background: var(--card2); border: 1px solid var(--line); }
#moreMenu > summary::-webkit-details-marker { display: none; }
#moreMenu > summary svg { width: 20px; height: 20px; fill: currentColor; }
#moreMenu > summary:hover, #moreMenu[open] > summary { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
#moreMenu .pop { right: 0; left: auto; min-width: 220px; display: grid; padding: 6px; }
#moreMenu .pop a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--fg); font-size: 14px; }
#moreMenu .pop a:hover { background: var(--hover); }
#settingsMenu { margin-left: auto; }
#settingsMenu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: var(--fg); background: var(--card2); border: 1px solid var(--line); }
#settingsMenu > summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#settingsMenu > summary::-webkit-details-marker { display: none; }
#settingsMenu > summary:hover, #settingsMenu[open] > summary { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
#settingsMenu .pop { min-width: 240px; }
.pop .group { padding: 6px 10px 2px; color: var(--mut); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.seg { display: flex; gap: 4px; padding: 6px 8px 8px; }
.seg button { flex: 1; background: var(--card2); border-radius: 8px; padding: 7px 6px; font-size: 13px; font-weight: 600; }
.seg button.on { background: var(--fg); color: var(--bg); }
#settingsMenu .pop { max-height: min(560px, 80vh); }
.account { padding: 4px 10px 10px; max-width: 280px; }
.account form { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.account form button { flex: 1; }
.account input { flex: 1 1 100%; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.account input:focus { outline: none; border-color: var(--acc); }
.account button { background: var(--card2); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; }
.account button:disabled { opacity: .5; }
.account button.link { background: none; padding: 2px 0; color: var(--mut); font-weight: 500; text-decoration: underline; }
.account .acct-msg { margin: 4px 0; color: var(--mut); font-size: 12px; line-height: 1.4; }
.account .acct-msg.err { color: var(--err, #e5484d); }
.account .acct-who { margin: 2px 0; font-size: 13px; font-weight: 600; word-break: break-all; }
#searchForm { flex: 1; max-width: 520px; min-width: 0; position: relative; }
#searchForm .lens { position: absolute; left: 14px; top: 50%; transform: translateY(-52%); color: var(--mut); font-size: 18px; pointer-events: none; }
#q { width: 100%; padding: 10px 16px 10px 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--fg); font: inherit; outline: none; }
/* Raccourci « / » (app.js): rappelé dans le champ vide, au clavier seulement. */
#searchForm .slash { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none;
  min-width: 22px; height: 22px; display: none; place-items: center; padding: 0 5px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg); color: var(--mut); font: 600 12px/1 ui-monospace, monospace; }
@media (hover: hover) and (pointer: fine) { #q:placeholder-shown:not(:focus) + .slash { display: grid; } }
#q:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 25%, transparent); }

main { position: relative; display: flex; min-height: 0; }
#view { flex: 1; overflow: auto; padding: 12px 24px 40px; min-width: 0; }
.pagetitle { font-size: 30px; margin: 14px 0 6px; letter-spacing: -.02em; }
.note { color: var(--mut); padding: 24px 4px; max-width: 560px; }
.banner { color: var(--mut); font-size: 13px; padding: 6px 2px; }
.err { color: #e5484d; }
.t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2 { color: var(--mut); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2 a { color: inherit; text-decoration: none; } .t2 a:hover { color: var(--fg); text-decoration: underline; }
.spin { width: 28px; height: 28px; margin: 40px auto; border: 3px solid var(--line); border-top-color: var(--acc); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Onglets et filtres ───────────────────────────────────────────────────── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0 10px; position: sticky; top: -12px; background: var(--bg); z-index: 3; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 14px; border-radius: 999px; background: var(--card2);
  color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; list-style: none; }
.chip::-webkit-details-marker { display: none; }
.chip:hover { background: var(--hover); }
.chip.on { background: var(--fg); color: var(--bg); }
.chip span { font-weight: 500; opacity: .6; font-size: 12px; }
.chip.clear { background: none; color: var(--mut); }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 12px; }
.filters .spacer { flex: 1; }
.menu { position: relative; }
.menu .pop { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; min-width: 220px; max-height: 360px; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.menu.right .pop { left: auto; right: 0; }
.menu .pop a { display: flex; justify-content: space-between; gap: 16px; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.menu .pop a span { color: var(--mut); font-variant-numeric: tabular-nums; }
.menu .pop a:hover { background: var(--hover); }
.menu .pop a.on { color: var(--acc); font-weight: 700; }
.years { display: flex; gap: 6px; padding: 8px 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.years input { width: 76px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.years button { background: var(--acc); color: var(--acc-fg); }

/* ── Meilleur résultat + morceaux ────────────────────────────────────────── */
.toprow { display: grid; grid-template-columns: minmax(260px, 2fr) 3fr; gap: 24px; margin: 6px 0 18px; }
.toprow h2, .shelf h2 { font-size: 21px; margin: 0 0 10px; letter-spacing: -.01em; }
/* Pochette à gauche, texte à droite (le titre, puis artistes, métadonnées et
   podium): l'espace à côté de la pochette ne reste plus vide. */
.topcard { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-content: start;
  padding: 20px; border-radius: 14px; background: var(--card); text-decoration: none; cursor: pointer;
  transition: background .15s; min-height: 220px; }
.topcard > :not(.tc-art):not(.fab) { grid-column: 2; }
.topcard > .tc-art { grid-column: 1; grid-row: 1 / span 6; width: 128px; height: 128px; }
.topcard:hover { background: var(--hover); }
.tc-art { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; display: block; box-shadow: var(--shadow); }
.tc-art.round { border-radius: 50%; }
.topcard .tc-art.ph { width: 128px; height: 128px; font-size: 48px; }
.tc-title { font-size: 28px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.02em; line-height: 1.1; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tc-meta { margin-top: 6px; } .tc-meta a { color: inherit; }
.tc-pod { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; line-height: 1.35; padding-right: 64px; }
.tc-pod .medal { font-size: 20px; line-height: 1; } .tc-pod a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pill { background: var(--bg); color: var(--fg); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; margin-right: 6px; }
.topsongs header, .shelf header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.shelf header .periods { display: inline-flex; gap: 6px; }
.shelf header.withfilter { justify-content: flex-start; flex-wrap: wrap; }   /* filtre près du titre, pas au bord */
.shelf header .periods .chip { padding: 4px 12px; font-size: 13px; }
.more { color: var(--mut); text-decoration: none; font-size: 13px; font-weight: 700; }
.more:hover { color: var(--fg); text-decoration: underline; }
.count { color: var(--mut); font-weight: 500; font-size: 14px; }

.songs { list-style: none; margin: 0; padding: 0; }
.song { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 36px; gap: 12px; align-items: center; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.song:hover { background: var(--hover); }
.song:hover button.icon { opacity: 1; }
.song.playing .t1, .song.now .t1 { color: var(--acc); }
/* « En cours »: trois barres qui dansent, figées en pause. */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 14px; height: 12px; margin-right: 7px; vertical-align: -1px; flex: none; }
.eq i { display: block; width: 3px; height: 100%; background: var(--acc); border-radius: 1px; transform-origin: bottom;
  animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.35s; }
.eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
body.paused .eq i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; transform: scaleY(0.7); } }
.song .body { min-width: 0; }
.thumb { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; display: block; background: var(--line); }
.art:empty { width: 44px; height: 44px; border-radius: 5px; background: var(--card2); }
.num { color: var(--mut); text-align: center; font-variant-numeric: tabular-nums; }
.dur { color: var(--mut); font-variant-numeric: tabular-nums; font-size: 13px; }
.pod { font-size: 13px; margin-left: 4px; }

/* ── Rangées horizontales (scroller.js) ──────────────────────────────────── */
.hs { position: relative; }
/* Barre de défilement discrète, révélée au survol. */
.hs > .row, .hs > .songgrid { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.hs:hover > .row, .hs:hover > .songgrid { scrollbar-color: color-mix(in srgb, var(--mut) 70%, transparent) transparent; }
.hs > .row::-webkit-scrollbar, .hs > .songgrid::-webkit-scrollbar { height: 8px; }
.hs > .row::-webkit-scrollbar-thumb, .hs > .songgrid::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.hs:hover > .row::-webkit-scrollbar-thumb, .hs:hover > .songgrid::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--mut) 70%, transparent); }
.hs-btn { position: absolute; top: calc(50% - 26px); width: 40px; height: 40px; border-radius: 50%; z-index: 2;
  background: color-mix(in srgb, var(--card) 72%, transparent); color: var(--fg); font-size: 26px; line-height: 1;
  backdrop-filter: blur(8px); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .15s; }
.hs-prev { left: 4px; } .hs-next { right: 4px; }
.hs.scrollable:hover .hs-btn:not([hidden]) { opacity: 1; pointer-events: auto; }
.hs-btn:hover { background: color-mix(in srgb, var(--card) 92%, transparent); }
.hs-btn[hidden] { display: block; opacity: 0 !important; pointer-events: none !important; }
/* Glisser à la souris. */
.hs > .row, .hs > .songgrid { cursor: grab; }
.hs > .dragging { cursor: grabbing; scroll-snap-type: none !important; user-select: none; }
.hs > .dragging * { pointer-events: none; }
.hs img, .hs a { -webkit-user-drag: none; user-select: none; }
@media (hover: none) { .hs-btn { display: none !important; } }
/* Titre d'étagère cliquable: la même étagère en liste verticale (shelflist.js). */
.shelf h2.expandable { cursor: pointer; }
.shelf h2.expandable:hover, .shelf h2.expandable:focus-visible { color: var(--acc); }
.shelf h2 .xchev { margin-left: 6px; color: var(--mut); font-weight: 400; }
.vlist-page .vlist > [hidden] { display: none; }
div.vlist { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
div.vlist .card { display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 6px 10px; }
div.vlist .card .cover { grid-row: 1 / 3; width: 56px; height: 56px; margin: 0; }
div.vlist .card .t1, div.vlist .card .t2 { align-self: end; }
div.vlist .card .t2 { align-self: start; }
div.vlist .card .fab { display: none; }
ol.vlist { margin-top: 10px; }
/* Filtre local d'une rangée qui déborde: collé au titre, « Tout afficher » reste au bord. */
.shelf header:has(.hs-filter) { flex-wrap: wrap; }
.hs-filter { margin-right: auto; }
.hs-filter[hidden] { display: none; }
.hs-filter input { padding: 4px 12px; width: 180px; font-size: 13px; }
.hs > .row > [hidden], .hs > .songgrid > [hidden] { display: none; }

/* ── Parcourir (pages.js browsePage / facetPage) ──────────────────────────── */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.bcard { position: relative; overflow: hidden; height: 108px; border-radius: 14px; padding: 14px 16px; color: #fff; text-decoration: none;
  display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.bcard:hover { transform: translateY(-2px); box-shadow: 0 12px 30px #0006; }
.bc-title { font-weight: 800; font-size: 17px; letter-spacing: -.01em; z-index: 1; }
.bc-sub { font-size: 12px; opacity: .85; z-index: 1; margin-top: 2px; }
.bc-ico { position: absolute; right: -6px; bottom: -14px; font-size: 64px; opacity: .28; transform: rotate(-12deg); line-height: 1; }
.recent { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs { color: var(--mut); font-size: 13px; padding-top: 10px; } .crumbs a { color: inherit; text-decoration: none; } .crumbs a:hover { color: var(--fg); }
.ctx { display: flex; gap: 8px; margin: 8px 0 4px; }
.ctx-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px; font-size: 14px;
  background: color-mix(in srgb, var(--acc) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); }
.ctx-pill a { text-decoration: none; color: var(--mut); width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; }
.ctx-pill a:hover { background: var(--hover); color: var(--fg); }
.facet-filter input { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; width: 220px; }
.taglist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 18px; }
.tagrow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; border-bottom: 1px solid var(--line); }
.tagrow:hover { background: var(--hover); }
.tagrow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ── Étagères et cartes ──────────────────────────────────────────────────── */
/* Morceaux en colonnes de 3 lignes, défilement horizontal (même geste que les cartes). */
.songgrid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); grid-auto-columns: minmax(280px, 360px);
  column-gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; }
.songgrid .song { scroll-snap-align: start; grid-template-columns: 44px minmax(0, 1fr) 36px; }
.songgrid .song .dur { display: none; }
.shelf { margin: 22px 0; }
.shelf .row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 16px; overflow-x: auto;
  padding-bottom: 8px; scroll-snap-type: x proximity; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.card { display: block; padding: 10px; border-radius: 12px; text-decoration: none; transition: background .15s; scroll-snap-align: start; min-width: 0; }
.card:hover { background: var(--card); }
.cover { position: relative; aspect-ratio: 1; margin-bottom: 8px; }
.cov, .ph { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; display: block; box-shadow: var(--shadow); }
.card.round .cov, .ph.round { border-radius: 50%; }
.ph { display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 85%, #000), color-mix(in srgb, var(--acc) 35%, #000)); }
.ph.group { background: linear-gradient(135deg, #2a7a6f, #173d49); }
.fab { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%; background: var(--acc); color: var(--acc-fg); box-shadow: var(--glow);
  font-size: 16px; box-shadow: var(--shadow); opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; }
.card:hover .fab, .topcard:hover .fab { opacity: 1; transform: none; }
.fab:hover { background: var(--acc); filter: brightness(1.1); }
.topcard .fab { right: 20px; bottom: 20px; width: 52px; height: 52px; }

/* ── En-tête de page (album, artiste…) ───────────────────────────────────── */
.hero { display: flex; gap: 24px; align-items: flex-end; padding: 20px 0 24px; }
.hero-art { width: 200px; height: 200px; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow); flex: none; }
.hero-art.round { border-radius: 50%; }
.hero .hero-art.ph { width: 200px; height: 200px; font-size: 70px; }
.song .thumb.ph { width: 44px; height: 44px; font-size: 16px; box-shadow: none; }
.hero-body { min-width: 0; }
.hero .kind { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; }
.hero h1 { margin: 6px 0 8px; font-size: clamp(26px, 5vw, 52px); line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; }
.hero .t2 { white-space: normal; }
.hero .actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.tracklist .song { grid-template-columns: 44px minmax(0, 1fr) auto; }
.links { padding-left: 18px; } .links a { color: var(--mut); }
.aside { margin-top: 18px; }

/* ── File ────────────────────────────────────────────────────────────────── */
#queuePanel { width: 340px; border-left: 1px solid var(--line); overflow: auto; padding: 8px 12px; background: var(--bg); transition: background-color .3s; }
/* Lecteur ouvert et teinté: la file prend sa teinte, un cran plus claire (comme
   le panneau de file de l'app), avec les couleurs claires du lecteur. */
body.np-open.np-tinted #queuePanel { --fg: #f4f1ff; --mut: rgba(244, 241, 255, 0.68); --line: rgba(244, 241, 255, 0.12);
  --card: rgba(255, 255, 255, 0.06); --card2: rgba(255, 255, 255, 0.10); --hover: rgba(255, 255, 255, 0.08);
  color-scheme: dark; color: var(--fg); border-left-color: rgba(255, 255, 255, 0.06);
  /* le même dégradé que le lecteur, un voile clair par-dessus (un cran plus
     clair, comme le panneau de file de l'app) */
  background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), var(--np-bg); background-attachment: fixed; }
body.np-open.np-tinted #queuePanel select { background: var(--card2); color: var(--fg); border-color: var(--line); }
body.np-open.np-tinted #queuePanel select option { background: #222; color: #f4f1ff; }
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qhead h2 { font-size: 16px; margin: 8px 0; }
.qhead h2 { flex: 1; }
.qxf select { font: inherit; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; }
#queueList { list-style: none; margin: 0; padding: 0; }
#queueList li { cursor: pointer; }
#queueList .qrow, #queueList ol li { padding: 6px 8px; border-radius: 8px; }
#queueList .qrow:hover, #queueList ol li:hover { background: var(--hover); }
#queueList li.cur { color: var(--acc); font-weight: 600; }
#queueList li .t2 { font-weight: 400; }
#queueList ol { list-style: none; padding-left: 10px; margin: 4px 0 0; }
#queueList ol li { padding: 4px 8px; font-size: 13px; font-weight: 400; color: var(--mut); }
#queueList ol li.cur { color: var(--acc); }

/* ── Vue « lecteur » (nowview.js) ─────────────────────────────────────────── */
#nowView { position: absolute; inset: 0; z-index: 5; display: grid; /* lueur de soleil couchant, comme le site */ grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr);
  gap: 36px; padding: 32px 40px 24px; overflow: auto; align-items: start;
  background: radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--acc) 16%, var(--bg)), color-mix(in srgb, var(--acc2) 4%, var(--bg)) 45%, var(--bg) 75%); }
#nowView[hidden] { display: none; }
/* Lecteur teinté par la pochette (tint.js): toujours SOMBRE, comme l'app — la
   surface est choisie pour qu'un texte clair y soit lisible. */
#nowView.tinted { --bg: var(--np-base); --fg: #f4f1ff; --mut: rgba(244, 241, 255, 0.68); --line: rgba(244, 241, 255, 0.12);
  --card: rgba(255, 255, 255, 0.06); --card2: rgba(255, 255, 255, 0.10); --hover: rgba(255, 255, 255, 0.08); color-scheme: dark; color: var(--fg);
  background: var(--np-bg); background-attachment: fixed; transition: background-color .4s; }
/* Le dégradé est calé sur la FENÊTRE (attachment fixed): le lecteur et la file
   ouverte à côté en montrent deux morceaux, sans raccord. */
body { --np-bg: radial-gradient(circle at 5% 10%, var(--np-glow), transparent 70%), radial-gradient(circle at 95% 95%, var(--np-alt), transparent 75%), var(--np-base); }
body.queue-open #nowView { right: 340px; }   /* la file reste visible à côté */
.np-media { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; position: sticky; top: 0; }
#npArtBox { width: 100%; max-width: min(560px, 64vh); aspect-ratio: 1; }
#npArtBox[hidden] { display: none; }
#npArt { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; box-shadow: 0 18px 50px #0006; background: var(--card2); }
#npArt:not([src]) { visibility: hidden; }
.np-switch { display: inline-flex; background: var(--card2); border-radius: 999px; padding: 3px; }
.np-switch button { border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 600; color: var(--mut); }
.np-switch button.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 4px #0003; }
.np-info { min-width: 0; padding-top: 6px; }
.np-info .kind { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; }
.np-info h1 { font-size: clamp(24px, 3.2vw, 40px); line-height: 1.08; margin: 6px 0 6px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.np-file { color: var(--mut); font-weight: 600; margin-bottom: 4px; }
.np-artists { font-size: 17px; font-weight: 600; } .np-artists a { color: var(--fg); text-decoration: none; } .np-artists a:hover { text-decoration: underline; }
.np-meta { white-space: normal; margin-top: 4px; }
.np-sec { margin-top: 22px; }
.np-sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--mut); margin: 0 0 8px; }
.np-sec a { color: var(--fg); }
.np-podium { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 12px; padding: 12px 14px; }
.np-podium .medal { font-size: 30px; } .np-podium .t2 { white-space: normal; }
.np-list { list-style: none; margin: 0; padding: 0; } .np-list li { padding: 3px 0; }
.np-list.mono li { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--card2); border-radius: 999px; padding: 3px 10px; font-size: 12px; }
a.tag { color: inherit; text-decoration: none; } a.tag:hover { background: var(--hover); color: var(--acc); }
.np-sec a.ext { color: var(--acc); text-decoration: none; font-weight: 600; } .np-sec a.ext:hover { text-decoration: underline; }
.np-list a.ext { font-size: 12px; font-weight: 500; }
.np-notes { white-space: pre-wrap; color: var(--mut); font-size: 14px; max-height: 260px; overflow: auto; }
.np-notes.np-html { white-space: normal; }   /* note d'album: du HTML, ses <br> font les retours */
.np-tech summary { cursor: pointer; color: var(--mut); font-weight: 600; }
.np-tech pre { white-space: pre-wrap; font-size: 12px; background: var(--card); padding: 10px 12px; border-radius: 10px; color: var(--mut); }
.np-close { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; color: var(--mut); }
#bar #art, #bar .now { cursor: pointer; }
body.np-open #bar .now #title { color: var(--acc); }

/* ── Visualiseur, intégré à la vue (plein écran en option) ────────────────── */
#vizWrap { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 70vh; background: #000; border-radius: 14px;
  overflow: hidden; box-shadow: 0 18px 50px #0006; }
#vizWrap[hidden] { display: none; }
#vizWrap:fullscreen { border-radius: 0; max-height: none; aspect-ratio: auto; width: 100vw; height: 100vh; }
#vizWrap:-webkit-full-screen { border-radius: 0; max-height: none; width: 100vw; height: 100vh; }
/* iPhone (pas de plein écran d'élément): la fenêtre entière, au-dessus de tout
   (nowview.js, pseudoFull). Ses conteneurs (lecteur z5, fenêtre flottante z7)
   passent devant la barre (z8) le temps du mode. */
#vizWrap.pseudo-full { position: fixed !important; inset: 0 !important; z-index: 1000; width: 100vw !important; height: 100vh !important; height: 100dvh !important;
  max-width: none !important; max-height: none !important; aspect-ratio: auto !important; border-radius: 0 !important; }
#vizWrap.pseudo-full .viz-top { left: max(10px, env(safe-area-inset-left)); top: max(10px, env(safe-area-inset-top)); }
#vizWrap.pseudo-full .viz-full { right: max(10px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); }
body.viz-max { overflow: hidden; }
body.viz-max #npClose { display: none; }
body.viz-max #nowView, body.viz-max #vizFloat { z-index: 40 !important; }
#viz { width: 100%; height: 100%; display: block; }
/* Contrôles en incrustation, effacés après 3 s d'inactivité. */
.viz-ui { transition: opacity .25s; }
#vizWrap.idle .viz-ui { opacity: 0; pointer-events: none; }
#vizWrap.idle { cursor: none; }
.viz-top { position: absolute; left: 10px; top: 10px; right: 60px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
#vizModes, #vizOpts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
#vizModes button, #vizOpts button, #vizOpts select { background: #000a; color: #ddd; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 0; }
#vizModes button:hover, #vizOpts button:hover { background: #000d; color: #fff; }
#vizModes button.on, #vizOpts button.on { background: var(--acc); color: var(--acc-fg); }
.viz-preset { background: #000a; color: #ddd; font-size: 12px; padding: 5px 10px; border-radius: 999px; max-width: 46ch;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-preset:empty { display: none; }
.viz-full { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 50%; background: #000a; color: #fff; font-size: 18px; }
.viz-full:hover { background: #000d; }
/* « Auto » de la notation et du piano: rendre la vue automatique après un geste.
   En bas à gauche: le haut est aux modes et options. */
.viz-auto { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 14px; background: #00000073; color: #fff; font-size: 11px; }
.viz-auto:hover { background: #000a; }
.viz-auto[hidden] { display: none; }
#vizWrap.pseudo-full .viz-auto { left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); }

/* ── Barre de lecture ────────────────────────────────────────────────────── */
/* Colonnes NOMMÉES: placés dans l'ordre, un élément masqué (les actions ♡ ＋ ⋯
   hors connexion) décalait tout d'une colonne — la progression tombait dans
   une colonne étroite et les outils prenaient la large (« la barre s'arrête
   bien avant »). */
#bar { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto minmax(160px, 2fr) auto;
  grid-template-areas: "art now acts ctl seek tools"; gap: 14px; align-items: center;
  padding: 10px 16px; border-top: 1px solid var(--line); background: var(--bar); backdrop-filter: blur(12px);
  /* ⚠️ backdrop-filter crée un contexte d'empilement: sans z-index, la barre ET
     ses menus (mode sommeil, playlists) passaient SOUS le lecteur (z 5) et la
     fenêtre du visualiseur (z 7). */
  position: relative; z-index: 8; }
#art { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--line); }
#art:not([src]) { visibility: hidden; }
.now { min-width: 0; }
#title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sub { color: var(--mut); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sub a { color: inherit; text-decoration: none; } #sub a:hover { color: var(--fg); text-decoration: underline; }
.controls { display: flex; gap: 6px; align-items: center; }
.seek { display: flex; gap: 10px; align-items: center; color: var(--mut); font-size: 12px; font-variant-numeric: tabular-nums; }
.seek input { flex: 1; accent-color: var(--acc); }
.tools { display: flex; gap: 4px; align-items: center; }
#bar > #art { grid-area: art; } #bar > .now { grid-area: now; } #bar > .nowacts { grid-area: acts; }
#bar > .controls { grid-area: ctl; } #bar > .seek { grid-area: seek; } #bar > .tools { grid-area: tools; }
.tools > #sleepMenu { display: flex; }

@media (max-width: 860px) {
  .toprow { grid-template-columns: minmax(0, 1fr); }
  .topcard { min-height: 0; height: auto; column-gap: 14px; }
  .topcard > .tc-art, .topcard .tc-art.ph { width: 88px; height: 88px; } .tc-title { font-size: 22px; }
}
@media (max-width: 760px) {
  #top { padding: 10px 12px 8px; gap: 8px 10px; flex-wrap: wrap; } #view { padding: 6px 12px 24px; }
  /* Téléphone: la navigation passe en DEUXIÈME rangée, pleine largeur, icône
     au-dessus du libellé (barre d'onglets). Masquée, Parcourir n'avait plus
     AUCUN accès et Accueil ne restait que sur le logo. */
  .mainnav { order: 10; flex: 1 0 100%; border-radius: 14px; }
  .navlink { flex: 1; flex-direction: column; gap: 2px; padding: 5px 4px; border-radius: 11px; justify-content: center; min-width: 0; }
  .navlink span { display: block; font-size: 11px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Trois rangées: pochette + titre + actions, la progression sur toute la
     largeur (les temps ne se cassent plus), puis les contrôles centrés —
     aléatoire et répétition compris — et les outils à droite. */
  #bar { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "art now acts" "seek seek seek" "ctl ctl tools"; gap: 6px 12px; padding: 8px 12px; }
  .nowacts { grid-area: acts; } .controls { justify-content: center; }
  .seek span { white-space: nowrap; flex: none; }
  #art { width: 48px; height: 48px; grid-area: art; } .now { grid-area: now; } .controls { grid-area: ctl; }
  .seek { grid-area: seek; min-width: 0; } .tools { grid-area: tools; }
  #queuePanel { position: absolute; inset: 0; width: auto; z-index: 6; }
  #nowView { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; gap: 20px; }
  .np-media { position: static; }
  body.queue-open #nowView { right: 0; }
  .song { grid-template-columns: 40px minmax(0, 1fr) 32px; } .song .dur { display: none; } button.icon { opacity: 1; }
  .hero { flex-direction: column; align-items: flex-start; gap: 14px; } .hero-art, .hero .hero-art.ph { width: 150px; height: 150px; }
  .shelf .row { grid-auto-columns: 140px; } .songgrid { grid-auto-columns: 82vw; } .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .filters .spacer { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
  .chips::-webkit-scrollbar { display: none; }
}

/* ── Menu ⚙: liens vers les pages ───────────────────────────────────────── */
.menu-links { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

/* ── Bibliothèque / Statistiques ────────────────────────────────────────── */
.signin-card { background: var(--card); border-radius: 14px; padding: 22px; max-width: 560px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.signin-card p { margin: 0; line-height: 1.5; color: var(--mut); }
a.primary { background: var(--acc); color: var(--acc-fg); padding: 10px 22px; border-radius: 999px; font-weight: 700; box-shadow: var(--glow); text-decoration: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 18px; }
.tile { background: var(--card); border-radius: 12px; padding: 14px 16px; }
.tile .tv { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; background: var(--card); border-radius: 12px; padding: 10px; }
.bars span { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.bars span:hover { background: var(--hover); border-radius: 3px; }
.bars i { display: block; width: 100%; min-height: 1px; background: linear-gradient(var(--acc2), var(--acc)); border-radius: 3px 3px 0 0; }
.bars-axis { display: flex; justify-content: space-between; padding: 4px 10px 0; font-size: 12px; }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 720px; }
.ranks li { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr auto; gap: 12px; align-items: center; font-size: 14px; }
.ranks .rl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranks .rbar { height: 8px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.ranks .rbar i { display: block; height: 100%; background: var(--acc); border-radius: 4px; }

/* ── Réglages ───────────────────────────────────────────────────────────── */
.settings-page { max-width: 720px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.set-group { background: var(--card); border-radius: 14px; padding: 16px 18px; }
.set-group h2 { margin: 0 0 10px; font-size: 16px; }
.set-group > p.t2 { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 6px 0; }
.set-row .seg { padding: 0; min-width: 260px; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.set-group button.ghost { background: var(--card2); color: var(--fg); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.set-group button.ghost:disabled { opacity: .6; }
.set-group .account { max-width: 420px; padding: 0; }

/* ── À propos ───────────────────────────────────────────────────────────── */
.about { max-width: 820px; line-height: 1.55; }
.about-head { display: flex; align-items: center; gap: 18px; margin: 8px 0 14px; }
.about-head img { width: 72px; height: 72px; }
.about-head h1 { margin: 0; font-size: 34px; font-weight: 800; }
.about-head h1 b { color: var(--acc); }
.about-head p { margin: 2px 0 0; }
.about-links { padding-left: 18px; }
.about-links a, .credits a { color: var(--acc); }
.credits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 18px; }
.credits li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.credits .t2 { font-size: 12.5px; }
.credits .lic { font-size: 11.5px; color: var(--mut); background: var(--card2); padding: 1px 7px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
.song.off { opacity: .45; cursor: default; }
.song.off:hover { background: none; }
.set-row .seg button { white-space: nowrap; }
/* Réglages: accueil (une ligne par section) et listes de pages (moteurs). */
.set-home { display: grid; gap: 2px; }
.settings-page > .set-home { background: var(--card); border-radius: 14px; padding: 6px; }
.set-link { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; color: var(--fg); text-decoration: none; }
.set-link:hover { background: var(--hover); }
.set-link .ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); color: var(--acc); }
.set-link .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.set-link .ico svg.mi { fill: currentColor; stroke: none; }
.set-link .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.set-link .txt b { font-weight: 600; }
.set-link .txt small { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-link .chev { color: var(--mut); font-size: 22px; line-height: 1; }
.set-group .set-home { margin: 0 -8px; }
.set-foot { display: flex; justify-content: flex-end; }
.set-foot button.ghost, .set-actions button.ghost { background: var(--card2); color: var(--fg); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.set-group button.ghost.danger { color: var(--err, #e5484d); }

/* Réglages → Moteurs: liste des moteurs. */
.eng-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 2px; }
.eng-list li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.eng-list li a { font-weight: 600; color: var(--fg); text-decoration: none; min-width: 120px; } .eng-list li a:hover { text-decoration: underline; }
.eng-list .eng-dot { color: var(--acc); font-size: 10px; }
.eng-list .t2 { font-size: 12.5px; }

/* Réglages → Lecture: sous-titres, aides, curseurs, interrupteurs. */
.set-group h3 { margin: 16px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.set-group p.help { margin: 2px 0 6px; font-size: 12.5px; line-height: 1.45; white-space: normal; overflow: visible; text-overflow: clip; }
.set-row small { font-size: 12px; }
/* « Valeur par défaut », à côté du nom d'un réglage modifié (l'app: _ResetDot). */
.reset-dot { display: inline-flex; vertical-align: -3px; margin-left: 6px; padding: 3px; border-radius: 50%; color: var(--mut); background: none; }
.reset-dot:hover { color: var(--acc); background: var(--hover); }
.reset-dot .mi { fill: currentColor; display: block; }
.rng { display: inline-flex; align-items: center; gap: 10px; min-width: 260px; }
.rng input { flex: 1; accent-color: var(--acc); }
.rng output { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--mut); }
.tgl { position: relative; width: 42px; height: 24px; flex: none; }
.tgl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tgl span { position: absolute; inset: 0; border-radius: 999px; background: var(--card2); transition: background .15s; pointer-events: none; }
.tgl span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--fg); transition: transform .15s; }
.tgl input:checked + span { background: var(--acc); }
.tgl input:checked + span::after { transform: translateX(18px); background: var(--acc-fg); }
.tgl input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.set-row input.clr { width: 48px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.set-row :disabled { opacity: .45; }
.set-row select { min-width: 260px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); color: var(--fg); font: inherit; }
.song .fav { color: var(--acc); font-size: 12px; margin-left: 4px; }

/* ── Lecteur: modes, actions sur le morceau en cours ────────────────────── */
.controls .mode { width: 34px; height: 34px; border-radius: 50%; color: var(--mut); position: relative; display: grid; place-items: center; }
.controls .mode svg { width: 18px; height: 18px; }
.controls .mode.on { color: var(--acc); }
.controls .mode.on::after { content: ""; position: absolute; bottom: 1px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--acc); }
.controls .mode b { position: absolute; font-size: 9px; font-weight: 800; top: 50%; left: 50%; transform: translate(-50%, -48%); }
.nowacts { display: flex; gap: 2px; align-items: center; }
.nowacts[hidden] { display: none; }
.nowacts .act { width: 32px; height: 32px; border-radius: 50%; color: var(--mut); font-size: 17px; display: grid; place-items: center; list-style: none; cursor: pointer; }
.nowacts .act::-webkit-details-marker { display: none; }
.nowacts .act:hover { color: var(--fg); background: var(--hover); }
.nowacts .act.on { color: var(--acc); }
.menu.up .pop { top: auto; bottom: calc(100% + 8px); }
#plPop { min-width: 240px; }
#plPop .pad { padding: 6px 10px; margin: 0; }
.plnew, .qsave { display: flex; gap: 6px; padding: 6px 8px; }
.plnew input, .qsave input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.plnew button, .qsave button { background: var(--acc); color: var(--acc-fg); border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 13px; }
#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 30; background: var(--fg); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 24px #0005; max-width: calc(100vw - 32px); }
#toast a { color: inherit; font-weight: 700; margin-left: 8px; }

/* ── File: outils, mode édition, glisser-déposer ────────────────────────── */
.qtools { display: flex; gap: 2px; }
.qtools .qt { width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; color: var(--mut); position: relative; }
.qtools .qt svg { width: 20px; height: 20px; fill: currentColor; }
.qtools .qt:hover { color: var(--fg); background: var(--hover); }
.qtools .qt.on { color: var(--acc); }
.qtools .qt.armed { color: #fff; background: var(--err, #e5484d); }
.qtools .qt:disabled { opacity: .35; cursor: default; background: none; }
.qxf { display: block; color: var(--mut); font-size: 12px; padding: 0 0 8px; }
/* Visualiseur flottant (bouton ◉): par défaut en haut à droite de la zone de
   contenu; file ouverte ⇒ il prend la moitié HAUTE de sa colonne et la file
   descend dessous. Déplaçable par sa barre, redimensionnable par son coin
   (alors « détaché »: la file garde toute sa hauteur); double-clic sur la
   barre = retour à la place par défaut. */
main { --vf-h: 0px; }
#vizFloat { position: absolute; z-index: 7; top: 12px; right: 12px; width: min(440px, calc(100% - 24px)); aspect-ratio: 16 / 10;
  min-width: 220px; min-height: 150px; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  background: #000; box-shadow: 0 14px 40px #0008; border: 1px solid #ffffff1f; resize: both; }
#vizFloat[hidden] { display: none; }
body.queue-open #vizFloat.docked { top: 0; right: 0; width: 340px; height: 50%; aspect-ratio: auto; border-radius: 0; resize: none; box-shadow: none; border: 0; border-bottom: 1px solid var(--line); }
body.queue-open.vf-docked #queuePanel { margin-top: var(--vf-h); }
.vf-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; background: #160a1ee6; color: #f4f1ff; font-size: 12.5px; font-weight: 600; cursor: grab; user-select: none; touch-action: none; }
.vf-bar span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-bar .vf-close { color: #f4f1ffcc; padding: 2px 8px; font-size: 14px; }
.vf-bar .vf-close:hover { background: #ffffff22; color: #fff; }
#vizFloat.dragging .vf-bar { cursor: grabbing; }
.vf-bar .mi { fill: currentColor; display: block; }
.vf-body { flex: 1; min-height: 0; position: relative; }
.vf-body #vizWrap { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; aspect-ratio: auto; border-radius: 0; }
.vf-body #vizWrap .viz-top { flex-wrap: wrap; }
/* Intégrée (bouton de la barre): une colonne dans le flux de <main>, le
   contenu se pousse; file ouverte ⇒ comme ancrée, au-dessus de la file. */
#vizFloat.embed { position: relative; top: auto; right: auto; flex: none; width: var(--vf-ew, 380px); height: auto; aspect-ratio: auto;
  min-height: 0; border-radius: 0; resize: none; box-shadow: none; border: 0; border-left: 1px solid var(--line); }
body.queue-open #vizFloat.embed { position: absolute; top: 0; right: 0; width: 340px; height: 50%; border-left: 0; border-bottom: 1px solid var(--line); }
#vizFloat.embed .vf-bar { cursor: default; }
.vf-edge { display: none; }
#vizFloat.embed .vf-edge { display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; cursor: ew-resize; z-index: 2; touch-action: none; }
body.queue-open #vizFloat.embed .vf-edge { display: none; }
body.vf-embed:not(.queue-open) #nowView { right: var(--vf-w); }
@media (max-width: 760px) { #vizFloat { width: calc(100% - 24px); } body.queue-open #vizFloat.docked, body.queue-open #vizFloat.embed { width: 100%; height: 40%; }
  body.vf-embed:not(.queue-open) main { flex-direction: column; }
  #vizFloat.embed { order: -1; width: 100%; height: 40%; border-left: 0; border-bottom: 1px solid var(--line); }
  #vizFloat.embed .vf-edge { display: none; }
  body.vf-embed:not(.queue-open) #nowView { right: 0; top: var(--vf-hh); } }

/* Icônes Material (micons.js) dans les contrôles du visualiseur. */
.viz-ui .mi, #vizFull .mi { fill: currentColor; display: block; }
.viz-ui button:has(.mi) { display: inline-grid; place-items: center; }
.viz-preset { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: underline dotted transparent; }
.viz-preset:hover { text-decoration-color: currentColor; }
.viz-preset { display: inline-grid !important; justify-items: start; line-height: 1.15; text-align: left; }
.viz-preset .vp-n, .viz-preset .vp-p { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-preset .vp-p { font-size: 10px; opacity: .65; }
/* Navigateur de presets projectM, dans le visualiseur (pmpicker.js). */
.pm-picker { position: absolute; z-index: 4; top: 8px; right: 8px; bottom: 8px; width: min(360px, calc(100% - 16px)); display: flex; flex-direction: column; gap: 6px;
  padding: 10px; border-radius: 12px; background: #120818ee; color: #f4f1ff; box-shadow: 0 10px 30px #0009; backdrop-filter: blur(8px); font-size: 13px; }
.pm-picker[hidden] { display: none; }
.pm-picker .mi { fill: currentColor; flex: none; opacity: .85; }
.pmp-head { display: flex; gap: 6px; align-items: center; }
.pmp-head select { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid #ffffff26; background: #ffffff14; color: inherit; font: inherit; }
.pmp-head select option { background: #1d0f28; }
.pmp-x { padding: 4px; color: inherit; }
.pmp-search { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: #ffffff14; }
.pmp-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: inherit; font: inherit; }
.pmp-up { display: flex; align-items: center; gap: 4px; color: #f4f1ffb3; font-size: 12px; padding: 2px 4px; text-align: left; }
.pmp-list { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 1px; }
.pmp-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 6px; color: inherit; text-align: left; font: inherit; }
.pmp-row:hover { background: #ffffff1a; }
.pmp-row.on { background: #ffffff14; }
.pmp-row .mi { flex: none; fill: currentColor; }
.pmp-title { flex: 1; font-size: 13px; padding: 0 2px; }
.pmp-list h4 { margin: 8px 6px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #f4f1ff8c; font-weight: 600; }
.pmp-empty { margin: 2px 6px; font-size: 12px; }
.pmp-foot { display: flex; align-items: center; gap: 8px; padding: 8px 6px 2px; border-top: 1px solid #ffffff1f; color: inherit; text-decoration: none; }
.pmp-foot span { flex: 1; } .pmp-foot:hover { color: #fff; } .pmp-foot .mi { fill: currentColor; }
.pmp-cur { display: flex; align-items: center; gap: 6px; margin: 0; padding: 4px 6px; color: #f4f1ffcc; font-size: 12px; } .pmp-cur .mi { fill: currentColor; flex: none; }
.pmp-cur span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmp-new { display: flex; align-items: center; gap: 8px; padding: 4px 6px; } .pmp-new .mi { fill: currentColor; flex: none; }
.pmp-new input { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid #ffffff26; background: #ffffff14; color: inherit; font: inherit; }
.pmp-ok { padding: 6px 10px; border-radius: 8px; background: var(--acc); color: var(--acc-fg); font: inherit; font-weight: 600; }
.pmp-row span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmp-row span em { display: block; font-style: normal; color: #f4f1ff8c; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.pmp-row small { color: #f4f1ff8c; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }

/* Mode sommeil: lune dans la barre (minutes restantes à côté), menu des durées. */
#sleepMenu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; color: var(--mut);
  padding: 6px 8px; border-radius: 8px; line-height: 1; }
#sleepMenu > summary:hover { background: var(--hover); }
#sleepMenu > summary::-webkit-details-marker { display: none; }
#sleepMenu > summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
#sleepMenu > summary.on { color: var(--acc); }
#sleepMenu > summary.on svg { fill: currentColor; }
#sleepLeft { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
#sleepPop { min-width: 230px; padding: 10px; }
#sleepPop .sleep-left { margin: 2px 2px 8px; font-size: 12.5px; }
.sleep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sleep-grid button, #sleepPop .sleep-off { background: var(--card2); border-radius: 8px; padding: 8px 4px; font-size: 13px; font-weight: 600; }
.sleep-grid button:hover { background: var(--acc); color: var(--acc-fg); }
#sleepPop .sleep-off { width: 100%; margin-top: 8px; color: var(--err, #e5484d); }

/* Infobulle IMMÉDIATE des éléments [data-tip] (app.js): UN élément en
   position fixe, recalé dans la fenêtre — un ::after serait rogné par les
   panneaux qui défilent (la file). */
#tip { position: fixed; z-index: 50; max-width: 260px; padding: 6px 9px; border-radius: 8px; pointer-events: none;
  background: #1d0f28f2; color: #f4f1ff; font: 500 12px/1.35 "Inter", system-ui, sans-serif; box-shadow: 0 6px 18px #0005; }
#tip[hidden] { display: none; }
#queueList .qrow { display: flex; align-items: center; gap: 8px; }
#queueList .qbody { flex: 1; min-width: 0; }
#queueList .qbody .t1, #queueList .qbody .t2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#queueList .qauto { color: var(--acc2); font-weight: 700; margin-right: 4px; }
#queueList li.auto:not(.cur) .t1 { color: var(--mut); }
#queueList.editing > li { cursor: grab; user-select: none; }
#queueList .qhandle { color: var(--mut); cursor: grab; touch-action: none; padding: 4px 2px; font-size: 16px; }
#queueList .qrm { color: var(--mut); width: 26px; height: 26px; border-radius: 50%; flex: none; }
#queueList .qrm:hover { color: var(--err, #e5484d); background: var(--hover); }
#queueList > li.dragging { position: relative; z-index: 2; opacity: .9; background: var(--card2); border-radius: 8px; box-shadow: 0 6px 20px #0004; cursor: grabbing; }
#queueList > li.drop-before { box-shadow: inset 0 2px 0 var(--acc); }
#queueList > li.drop-after { box-shadow: inset 0 -2px 0 var(--acc); }

/* ── Statistiques: sélection de cases du graphique ──────────────────────── */
.bars.selectable { cursor: pointer; user-select: none; touch-action: pan-y; }
.bars.has-sel span:not(.sel) i { opacity: .3; }
.bars span.sel { background: color-mix(in srgb, var(--acc) 14%, transparent); border-radius: 3px; }
#selInfo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#selInfo .chip { padding: 3px 10px; font-size: 12px; }

/* Entrée regroupée des écoutés récents (album / fichier à sous-chansons). */
.song.group .chev { color: var(--mut); font-size: 20px; padding: 0 10px; }
.song.group { cursor: pointer; }

/* Sous-chanson écartée de la file (trop courte): grisée, jouable au clic. */
.song.short .t1, .song.short .num, .song.short .dur { opacity: .45; }

/* ── Écran album: infos (get_album_details) ──────────────────────────────── */
.album-info { margin: 4px 0 18px; max-width: 760px; }
.album-info .ai-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.album-info .ai-row:last-of-type { border-bottom: 0; }
.album-info .ai-row a { color: var(--fg); }
.album-info .ai-row .np-list { margin: 0; padding: 0; list-style: none; }
.album-info .ai-podium { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; }
.album-info .ai-podium .medal { font-size: 26px; }
.album-info .ai-desc { margin-top: 12px; font-size: 14px; line-height: 1.55; }
.album-info .ai-notes h3, .album-info .ai-notes h4 { margin: 10px 0 4px; } .album-info .ai-notes a { color: var(--acc); }
@media (max-width: 640px) { .album-info .ai-row { grid-template-columns: 1fr; gap: 2px; } }

/* ── Accueil: accès rapide aux sections (reste en haut au défilement) ───── */
.jump { position: sticky; top: 0; height: 0; z-index: 8; display: flex; justify-content: flex-start; }
.jump summary { width: 38px; height: 38px; margin-top: 12px; border-radius: 50%; display: grid; place-items: center; list-style: none; cursor: pointer;
  background: var(--card); color: var(--fg); box-shadow: 0 2px 10px #0003; font-size: 17px; }
.jump summary::-webkit-details-marker { display: none; }
.jump summary:hover, .jump details[open] summary { background: var(--acc); color: var(--acc-fg); }
.jump .pop { top: calc(100% + 6px); max-height: min(70vh, 520px); }
.jump .pop a.on { color: var(--acc); font-weight: 700; }
#view .shelf { scroll-margin-top: 8px; }
body.np-open .jump { display: none; }   /* le lecteur recouvre l'accueil: pas de menu par-dessus */
.jump + .pagetitle { padding-left: 52px; }   /* le bouton occupe le coin haut-gauche */
.jump .pop { width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 560px); }
.jump .pop a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── ♡ / ＋ des pages (album, artiste, playlist) ────────────────────────── */
.libbtns { display: inline-flex; gap: 6px; align-items: center; }
.libbtns[hidden] { display: none; }
.libbtns .act { width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid var(--line); color: var(--mut); font-size: 18px; display: grid; place-items: center; }
.libbtns .act:hover { color: var(--fg); background: var(--hover); }
.libbtns .act.on { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 50%, transparent); }
#sub a.sublink { color: var(--acc); }

/* Réglages → Visualiseurs → projectM: playlists de presets. */
.settings-page .icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--mut); background: none; }
.settings-page .icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--fg); }
.settings-page .icon-btn:disabled { opacity: .3; }
.settings-page .icon-btn .mi, .pl-head > .mi, .pl-new > .mi { fill: currentColor; flex: none; }
.pl-card { border-radius: 10px; padding: 4px 8px; margin: 4px 0; }
.pl-card.on { background: var(--card2); }
.pl-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.pl-head > .mi { color: var(--acc); }
.pl-name { flex: 1; min-width: 0; display: grid; } .pl-name b, .pl-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-badge { font-size: 12px; font-weight: 600; color: var(--acc); padding: 0 6px; }
.pl-rename { display: flex; gap: 6px; } .pl-rename input, .pl-new input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); color: var(--fg); font: inherit; }
.pl-items { list-style: none; margin: 0 0 6px 30px; padding: 0; display: grid; gap: 1px; counter-reset: pl; }
.pl-items li { display: flex; align-items: center; gap: 2px; padding: 2px 0 2px 4px; border-radius: 8px; counter-increment: pl; }
.pl-items li::before { content: counter(pl); width: 2ch; color: var(--mut); font-size: 12px; text-align: right; margin-right: 8px; }
.pl-items li:hover { background: var(--hover); }
.pl-items li > span { flex: 1; min-width: 0; display: grid; } .pl-items li > span, .pl-items li small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-new { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--acc); }

/* À propos: version, formats pris en charge. */
.about-ver { margin: -4px 0 14px; font-size: 13px; white-space: normal; }
#formats header { flex-wrap: wrap; gap: 8px 14px; }
#formats header .ghost { margin-left: auto; }
.fmt-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; }
.fmt-tools input { flex: 1; min-width: 200px; max-width: 360px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--fg); font: inherit; }
.fmt-body { max-height: 420px; overflow: auto; }
.fmt-list { display: flex; flex-wrap: wrap; gap: 4px; }
.fmt-list span { font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card2); border-radius: 6px; padding: 0 6px; }
.fmt-eng { margin: 0 0 12px; } .fmt-eng h3 { margin: 0 0 6px; font-size: 13px; }
.fmt-tools .seg button { white-space: nowrap; }

/* ── Partage (share.js) ──────────────────────────────────────────────────── */
.share-btn { display: inline-flex; align-items: center; justify-content: center; }
.share-btn .mi { fill: currentColor; display: block; }
#npInfo h1 .share-btn { vertical-align: middle; margin-left: 10px; padding: 6px; }
/* Lien partagé, son refusé sans geste: UN clic n'importe où lance la lecture. */
#playGate { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #0009; backdrop-filter: blur(6px); color: #fff; text-align: center; padding: 16px; cursor: pointer; }
#playGate .gate-play { width: 112px; height: 112px; border-radius: 50%; background: var(--acc); color: var(--acc-fg); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow); margin-bottom: 10px; }
#playGate .gate-play .mi { fill: currentColor; }
#playGate p { margin: 0; font-size: 17px; font-weight: 600; }
#playGate p.t2 { color: #ddd; font-size: 14px; font-weight: 400; max-width: 32em; }

/* « Lire avec… » (playwith.js): moteur, banque / SoundFont / modèle, mémoriser. */
.np-acts { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; } .np-acts button { display: inline-flex; align-items: center; gap: 6px; } .np-acts .mi { fill: currentColor; }
dialog.pw { padding: 0; border: 0; border-radius: 16px; background: var(--card2, var(--bg)); color: var(--fg); width: min(440px, calc(100vw - 32px));
  max-height: min(86vh, 760px); box-shadow: 0 24px 60px #0009; }
dialog.pw::backdrop { background: #0008; }
.pw-body { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 8px; max-height: min(86vh, 760px); box-sizing: border-box; overflow: auto; }
.pw-body h2 { margin: 0 0 4px; font-size: 19px; } .pw-body h3 { margin: 8px 0 0; font-size: 14px; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; }
.pw-group { display: flex; flex-direction: column; }
.pw-opt, .pw-check { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.pw-opt:hover, .pw-check:hover { background: var(--hover); }
.pw-opt input, .pw-check input { margin-top: 3px; accent-color: var(--acc); flex: none; }
.pw-opt small, .pw-check small { display: block; color: var(--mut); font-size: 12px; margin-top: 1px; }
.pw-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.pw-filter { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.pw-seg { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.pw-seg button { flex: 1; padding: 7px 10px; border-radius: 0; background: none; color: var(--fg); }
.pw-seg button + button { border-left: 1px solid var(--line); }
.pw-seg button.on { background: var(--acc); color: var(--acc-fg); }
.pw-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.pw-body p.t2 { padding: 8px; margin: 0; }
.hero .actions .pw-album { display: inline-flex; align-items: center; gap: 6px; } .hero .actions .pw-album .mi { fill: currentColor; }
.pw-note { margin: 4px 0 0; }

/* Modes du visualiseur: les icônes de l'app (nowview.js VIZ_ICON). */
#vizModes button.vm { padding: 6px 8px; display: inline-grid; place-items: center; }
#vizModes .mi { display: block; }

/* Plein écran: transport + progression (révélés avec les contrôles) et carte du
   morceau (révélée avec eux, et seule 5 s à chaque changement). Pas de fond:
   glyphes et texte détourés, lisibles sur un preset clair. */
.fs-transport, .fs-card { display: none; }
#vizWrap.is-fs .fs-transport { display: flex; }
#vizWrap.is-fs .fs-card { display: flex; }
.fs-transport { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); flex-direction: column; align-items: center; gap: 2px; z-index: 2; }
.fs-btns { display: flex; align-items: center; gap: 6px; }
.fs-btns button { color: #fff; padding: 4px; background: none; border: 0; display: grid; place-items: center; filter: drop-shadow(0 0 1.5px #000) drop-shadow(0 0 1px #000); }
.fs-btns button .mi { fill: currentColor; display: block; }
.fs-btns button:hover { color: var(--acc); }
.fs-seek { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.fs-seek input { width: min(320px, 60vw); accent-color: var(--acc); }
.fs-card { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(96px, calc(env(safe-area-inset-bottom) + 82px)); gap: 10px; align-items: center;
  max-width: min(420px, calc(100% - 28px)); color: #fff; pointer-events: none; opacity: 0; transition: opacity .5s; z-index: 2;
  text-shadow: 0 0 2px #000, 0 0 2px #000, 0 1px 3px #000; }
#vizWrap.is-fs.flash .fs-card, #vizWrap.is-fs:not(.idle) .fs-card { opacity: 1; transition-duration: .2s; }
.fs-art { width: 54px; height: 54px; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 2px 8px #0008; }
.fs-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fs-text > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-t1 { font-size: 16px; font-weight: 700; } .fs-t2 { font-size: 13px; } .fs-t3 { font-size: 12px; opacity: .85; } .fs-t4 { font-size: 11px; opacity: .75; }

/* Feuille « Voix et vitesse » (voices.js), sur le modèle de dialog.pw. */
dialog.vx { width: min(520px, calc(100vw - 32px)); }
.vx-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vx-head h2 { margin: 0; } .vx-head .t2 { flex: 1; min-width: 0; white-space: normal; }
.vx-head button, .vx-speed button { display: inline-flex; align-items: center; gap: 6px; }
.vx .mi { fill: currentColor; flex: none; }
.vx-close { margin-left: auto; }
.vx-speed { display: flex; align-items: center; gap: 10px; }
.vx-lab { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--acc); }
.vx-lab + .vx-val { min-width: 3.4em; font-variant-numeric: tabular-nums; color: var(--acc); }
.vx-speed input[type=range] { flex: 1; min-width: 80px; accent-color: var(--acc); }
.vx-mode { margin: -4px 0 0 30px; white-space: normal; }
.vx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.vx-chip header { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 6px 0; }
.vx-chip header .mi { color: var(--acc); } .vx-chip header span:first-of-type { flex: 1; }
.vx-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.vx-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 16px; font-size: 13px; font-weight: 600;
  background: var(--acc); color: var(--acc-fg, #fff); border: 1.5px solid transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.vx-pill.off { background: var(--card); color: var(--mut); text-decoration: line-through; opacity: .7; }
.vx-pill.solo { border-color: var(--fg); box-shadow: 0 0 0 2px var(--acc) inset; }

/* Retour au morceau en cours (app.js, updateLocate): dock COLLANT de hauteur
   nulle en bas du panneau (ne pousse rien), bouton rond translucide dedans. */
.qlocate-dock { position: sticky; bottom: 0; height: 0; }
.qlocate { position: absolute; right: 2px; bottom: 14px; width: 38px; height: 38px; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--acc) 55%, transparent); color: #fff; border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 4px 14px #0006; opacity: .8; transition: opacity .15s, transform .15s; }
.qlocate:hover, .qlocate:focus-visible { opacity: 1; transform: scale(1.06); background: var(--acc); }
.qlocate[hidden] { display: none; }
.qlocate .mi { fill: currentColor; }

/* Liste des raccourcis clavier (shortcuts.js, touche ?), sur le modèle de dialog.pw. */
dialog.pw.kb { width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 760px); overflow: auto; }
dialog.pw.kb .pw-body { padding: 16px 20px 20px; }
.kb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kb-head h2 { margin: 0; font-size: 1.15rem; }
.kb-hint { margin: 8px 0 0; font-size: .85rem; line-height: 1.4; opacity: .72; white-space: normal; }
dialog.pw.kb h3 { margin: 18px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
dialog.pw.kb dl { margin: 0; }
dialog.pw.kb dl > div { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line, #8882); }
dialog.pw.kb dt { flex: 0 0 9.5em; white-space: nowrap; }
dialog.pw.kb dd { margin: 0; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid var(--line, #8886); border-bottom-width: 2px;
  border-radius: 5px; font: 600 .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; background: var(--card, #8881); }

/* ── Pochettes: jamais rognées, jamais déformées ─────────────────────────────
   Une pochette non carrée (vgmrips: recto-verso en paysage, CD japonais,
   capture 4:3) était recadrée par object-fit: cover. Chaque grande image reçoit
   au chargement son rapport largeur/hauteur RÉEL (--ar, posé par app.js) et
   s'inscrit dans l'espace réservé en l'AGRANDISSANT au besoin (une pochette de
   256 px remplit sa place) — l'ombre et les coins suivent l'image. Les petites
   vignettes de liste gardent leur carré (alignement) avec l'image entière
   dedans. Les ronds (artistes) restent recadrés: un cadre de portrait. */
/* ⚠️ container-type: inline-size, PAS size: Firefox ignore aspect-ratio sur un
   élément à containment de TAILLE — la case des cartes d'étagère tombait à une
   hauteur nulle, donc 100cqh = 0, image de largeur nulle jamais chargée
   (loading=lazy) — seules les vignettes 56×56 de liste, de taille explicite,
   s'affichaient (Firefox / Ubuntu, 2026-11-18). La case est CARRÉE partout
   (aspect-ratio: 1, ou 56×56), donc sa hauteur vaut sa largeur: 100cqw. */
.cover { display: flex; align-items: center; justify-content: center; container-type: inline-size; }
.card:not(.round) img.cov { width: min(100cqw, calc(100cqw * var(--ar, 1))); height: auto; aspect-ratio: var(--ar, 1); object-fit: contain; }
/* Lecteur: la pochette prend TOUTE la largeur de sa colonne, hauteur bornée par
   l'écran — une image en paysage n'est plus réduite à la largeur d'un carré. */
#npArtBox { width: 100%; max-width: none; aspect-ratio: auto; display: flex; justify-content: center; }
#npArt { width: min(100%, calc(min(66vh, 760px) * var(--ar, 1))); height: auto; aspect-ratio: var(--ar, 1); object-fit: contain; background: none; }
img.hero-art:not(.round) { --s: 200px; width: min(var(--s), calc(var(--s) * var(--ar, 1))); height: auto; aspect-ratio: var(--ar, 1); object-fit: contain; }
@media (max-width: 760px) { img.hero-art:not(.round) { --s: 150px; width: min(var(--s), calc(var(--s) * var(--ar, 1))); height: auto; } }
/* Palmarès: la colonne de l'image reste fixe (le texte ne bouge pas), l'ombre suit l'image. */
img.tc-art:not(.round) { object-fit: contain; box-shadow: none; filter: drop-shadow(0 6px 14px #0005); }
img.thumb, #art, .fs-art { object-fit: contain; background: none; }
.fs-art { box-shadow: none; filter: drop-shadow(0 2px 6px #0008); }

/* Pochette en grand (artview.js): clic sur l'image d'en-tête. Aspect conservé,
   rien de rogné; --ar posé au chargement comme pour les autres pochettes. */
img.hero-art:not(.ph), #npArt[src] { cursor: zoom-in; }
dialog.artview { padding: 0; border: 0; background: none; max-width: none; max-height: none; overflow: visible; cursor: zoom-out; }
dialog.artview::backdrop { background: #000c; }
dialog.artview .artview-img { display: block; width: min(92vw, calc(88vh * var(--ar, 1)), 1400px); height: auto; aspect-ratio: var(--ar, 1);
  object-fit: contain; border-radius: 8px; box-shadow: 0 12px 48px #000a; }
dialog.artview .artview-x { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #0008; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
