/* FeeMusic — thème sombre, épuré, pensé pour l'iPhone (application plein écran depuis Safari).

   Principes
   · Grille de 4 pt : tous les espacements sont des multiples de 4 (8 / 12 / 16 / 20 / 24 / 32).
   · Métriques iOS : barre d'onglets 49 pt + zone sûre, champ de recherche 36 pt, gouttière 20 pt,
     zones tactiles ≥ 44 pt, styles de texte Apple (34 / 22 / 17 / 15 / 13 / 12).
   · Noir pur (#000) comme fond : fond de l'icône, écran de lancement et écrans OLED se confondent.
   · Un seul accent, discret ; pas de dégradés criards, pas d'animation de fond.
   · Filets de 0,5 px (1 pixel physique sur écran @2x, 1,5 sur @3x) pour des séparations fines. */

:root {
  color-scheme: dark;
  --bg: #000;
  --s1: #0f0f11;               /* surface 1 : panneaux */
  --s2: #1a1a1d;               /* surface 2 : champs, feuilles, boutons secondaires */
  --s3: #242428;               /* surface 3 : éléments actifs */
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --t1: #f5f5f7;
  --t2: rgba(245, 245, 247, .64);
  --t3: rgba(245, 245, 247, .40);
  --accent: #9db4ff;
  --danger: #f08a8a;
  --hair: .5px;

  --g: 20px;                   /* gouttière */
  --gap: 12px;
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-xl: 24px;

  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --tab-h: 49px;
  --mini-h: 56px;
  --side-w: 248px;
  --card-w: min(176px, calc((100vw - 2 * var(--g) - var(--gap)) / 2.35));   /* 144 pt sur iPhone 390 : 2 cartes + un aperçu */

  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--t1); font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; }
body { position: fixed; inset: 0; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; font-size: 17px; line-height: 22px; letter-spacing: -.024em; touch-action: manipulation; }
input, textarea { -webkit-user-select: text; user-select: text; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
img { display: block; -webkit-user-drag: none; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(157, 180, 255, .3); }
svg.i { width: 1em; height: 1em; flex: none; stroke-width: 1.7; }
svg.i.f { stroke-width: 1.2; }

/* ───────── Structure ───────── */
#app { position: fixed; inset: 0; }
.shell { position: absolute; inset: 0; display: flex; }
.main { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 0 calc(var(--g) + var(--sar)) calc(var(--tab-h) + var(--sab) + var(--mini-h) + 32px) calc(var(--g) + var(--sal)); scrollbar-width: none; }
.main::-webkit-scrollbar { display: none; }
.page { max-width: 1040px; margin: 0 auto; padding-top: calc(var(--sat) + 8px); animation: pageIn .28s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
.gap16 { height: 16px; }

/* ───────── Barre d'onglets (iPhone) ───────── */
.sidebar { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + var(--sab)); padding: 0 var(--sal) var(--sab) var(--sar);
  display: flex; background: rgba(12, 12, 14, .86); border-top: var(--hair) solid var(--line2);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--t3); font-size: 10px; line-height: 12px; font-weight: 500; letter-spacing: .01em; transition: color .2s; }
.tab .i { font-size: 25px; }
.tab:active { opacity: .6; }
.tab.active { color: var(--accent); }
.tab.active .i { fill: currentColor; fill-opacity: .18; }

/* ───────── Titres & texte ───────── */
.head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
h1.title { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .012em; margin: 0; }
h2.sec { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: .016em; margin: 32px 0 12px; display: flex; align-items: baseline; justify-content: space-between; }
h2.sec a, h2.sec button { color: var(--accent); font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: -.016em; }
.sub { color: var(--t2); font-size: 15px; line-height: 20px; letter-spacing: -.016em; }
.sub.desc { text-align: center; margin: 12px 0 0; }
.back { display: inline-flex; align-items: center; gap: 2px; height: 44px; margin-left: -6px; padding-right: 12px; color: var(--accent); font-size: 17px; }
.back .i { font-size: 24px; }
.back:active { opacity: .6; }
.avatar-btn, .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--s3); border: var(--hair) solid var(--line2); font-weight: 600; font-size: 15px; display: grid; place-items: center; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }

/* ───────── Recherche ───────── */
.searchbar { display: flex; align-items: center; gap: 8px; height: 36px; border-radius: 10px; padding: 0 8px; background: rgba(118, 118, 128, .24); color: var(--t2); margin: 8px 0 0; }
.searchbar .i { font-size: 18px; flex: none; }
.searchbar input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--t1); font: inherit; font-size: 17px; letter-spacing: -.024em; -webkit-appearance: none; appearance: none; }   /* 17 px : iOS ne zoome pas */
.searchbar input::placeholder { color: var(--t2); }
.searchbar input::-webkit-search-cancel-button, .searchbar input::-webkit-search-decoration { -webkit-appearance: none; }
.searchbar .clear { display: none; color: var(--t2); font-size: 17px; width: 28px; height: 28px; margin-right: -4px; place-items: center; }
.searchbar.has .clear { display: grid; }
.sticky-search { position: sticky; top: 0; z-index: 5; margin: calc(-1 * (var(--sat) + 8px)) calc(-1 * var(--g)) 0; padding: calc(var(--sat) + 8px) var(--g) 12px; background: rgba(0, 0, 0, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.sticky-search .searchbar { margin-top: 4px; }

/* ───────── Rangées horizontales & cartes ───────── */
.hscroll { display: flex; align-items: flex-start; gap: var(--gap); overflow-x: auto; margin: 0 calc(-1 * var(--g)); padding: 0 var(--g); scroll-padding: 0 var(--g); scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.card { flex: none; width: var(--card-w); scroll-snap-align: start; text-align: left; display: block; min-width: 0; }
.card .art { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; background: var(--s2); transition: transform .18s var(--ease); }
.card .art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 var(--hair) rgba(255, 255, 255, .12); pointer-events: none; }
.card.round .art { border-radius: 50%; }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card .ct { margin-top: 8px; font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: -.016em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .cs { font-size: 13px; line-height: 18px; color: var(--t2); letter-spacing: -.006em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.round .ct, .card.round .cs { text-align: center; }
.card:active .art { transform: scale(.97); }
.card.new .art { display: grid; place-items: center; background: transparent; color: var(--t2); font-size: 32px; border: 1px dashed var(--line2); }
.card.new .art::after { display: none; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--gap); }
.grid .card { width: auto; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } .card { width: 168px; } }

.mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; background: var(--s2); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic.one { grid-template-columns: 1fr; }
.art .ph, .big .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--t3); font-size: 36px; }

/* ───────── Lignes de titres ───────── */
.tracks { display: flex; flex-direction: column; }
.tr { display: flex; align-items: center; gap: 12px; min-height: 64px; margin: 0 -8px; padding: 8px 8px; border-radius: 10px; position: relative; cursor: pointer; transition: background .12s; }
.tr::after { content: ""; position: absolute; left: 68px; right: 8px; bottom: 0; height: var(--hair); background: var(--line); }
.tr:last-child::after { display: none; }
.tr:active { background: rgba(255, 255, 255, .07); }
@media (hover: hover) { .tr:hover { background: rgba(255, 255, 255, .05); } }
.tr .tn { width: 24px; text-align: center; color: var(--t2); font-variant-numeric: tabular-nums; font-size: 15px; flex: none; }
.tr:has(.tn)::after { left: 44px; }
.tr .cv { position: relative; width: 48px; height: 48px; border-radius: var(--r-s); overflow: hidden; background: var(--s2); flex: none; }
.tr .cv::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 var(--hair) rgba(255, 255, 255, .12); pointer-events: none; }
.tr .cv img { width: 100%; height: 100%; object-fit: cover; }
.tr .cv .eq { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); display: none; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 14px; }
.tr .cv .eq i { width: 3px; background: var(--accent); border-radius: 2px; height: 6px; animation: eq .9s ease-in-out infinite; }
.tr .cv .eq i:nth-child(2) { animation-delay: .25s; }
.tr .cv .eq i:nth-child(3) { animation-delay: .5s; }
@keyframes eq { 50% { height: 18px; } }
.tr.now .cv .eq { display: flex; }
.tr.now.paused .cv .eq i { animation-play-state: paused; }
.tr.now .tt { color: var(--accent); }
.tr .meta { flex: 1; min-width: 0; }
.tr .tt { font-size: 17px; line-height: 22px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr .ta { font-size: 15px; line-height: 20px; letter-spacing: -.016em; color: var(--t2); display: flex; align-items: center; gap: 6px; min-width: 0; }
.tr .ta .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tr .dur { color: var(--t2); font-size: 15px; font-variant-numeric: tabular-nums; flex: none; }
.tr .more { width: 44px; height: 44px; display: grid; place-items: center; color: var(--t2); font-size: 22px; border-radius: 50%; flex: none; margin-right: -10px; }
.tr .more:active { background: rgba(255, 255, 255, .1); }
.badge { font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: .02em; padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); color: var(--t2); flex: none; text-transform: uppercase; }
.badge.full { color: var(--accent); background: rgba(157, 180, 255, .14); }
@media (max-width: 599px) { .tr .dur { display: none; } }

/* ───────── En-têtes (album / artiste / playlist) ───────── */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 4px; }
.hero .big { position: relative; width: min(calc(100vw - 112px), 280px); aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; background: var(--s2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); margin-bottom: 20px; }
.hero .big::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 var(--hair) rgba(255, 255, 255, .12); pointer-events: none; }
.hero .big.round { border-radius: 50%; }
.hero .big img { width: 100%; height: 100%; object-fit: cover; }
.hero .txt { width: 100%; }
.hero h1 { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: .01em; margin: 0; }
.hero .by { display: block; color: var(--accent); font-size: 17px; line-height: 22px; font-weight: 500; margin-top: 2px; }
.hero .info { color: var(--t2); font-size: 13px; line-height: 18px; letter-spacing: -.006em; margin-top: 4px; }
.actions { display: flex; gap: var(--gap); width: 100%; max-width: 420px; margin: 20px auto 0; }
.actions.flush { margin-left: 0; margin-top: 16px; }
.btn { flex: 1; height: 48px; border-radius: var(--r-m); background: var(--s2); color: var(--t1); font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s var(--ease), opacity .12s; }
.btn:active { transform: scale(.97); opacity: .8; }
.btn .i { font-size: 18px; }
.btn.primary { background: #fff; color: #000; }
.btn.round { flex: none; width: 48px; font-size: 22px; }
.btn:disabled { opacity: .5; }
@media (min-width: 700px) {
  .hero { flex-direction: row; text-align: left; align-items: flex-end; gap: 28px; }
  .hero .big { width: 232px; margin: 0; flex: none; }
  .hero .txt { flex: 1; padding-bottom: 4px; }
  .hero h1 { font-size: 34px; line-height: 41px; }
  .actions { margin-left: 0; }
}
.bio { color: var(--t2); font-size: 15px; line-height: 20px; letter-spacing: -.016em; }
.bio p { margin: 0; white-space: pre-line; }
.bio p.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.more-link { color: var(--accent); font-size: 15px; line-height: 20px; font-weight: 500; margin-top: 8px; height: 28px; }

/* ───────── États ───────── */
.empty { text-align: center; color: var(--t2); padding: 56px 24px; font-size: 15px; line-height: 20px; }
.empty .i { font-size: 40px; color: var(--t3); margin: 0 auto 12px; display: block; }
.empty b { display: block; color: var(--t1); font-size: 17px; line-height: 22px; font-weight: 600; margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-s); }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-title { width: 144px; height: 24px; margin: 32px 0 12px; }
.sk-row { height: 56px; margin: 8px 0; }
.sk-cards { display: flex; gap: var(--gap); overflow: hidden; }
.sk-card { width: var(--card-w); height: calc(var(--card-w) + 28px); flex: none; border-radius: var(--r-m); }
.err { color: var(--danger); background: rgba(240, 138, 138, .08); border: var(--hair) solid rgba(240, 138, 138, .3); padding: 12px 16px; border-radius: var(--r-m); margin: 16px 0; font-size: 15px; line-height: 20px; }

header.head + .list-nav { margin-top: 8px; }
.list-nav { border-radius: var(--r-m); overflow: hidden; background: var(--s1); border: var(--hair) solid var(--line); }
.list-nav button, .list-nav a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; font-size: 17px; text-align: left; position: relative; }
.list-nav button + button::before, .list-nav a + a::before { content: ""; position: absolute; left: 52px; right: 0; top: 0; height: var(--hair); background: var(--line); }
.list-nav .i { color: var(--t2); font-size: 22px; }
.list-nav a:active, .list-nav button:active { background: rgba(255, 255, 255, .06); }
.list-nav .chev { margin-left: auto; color: var(--t3); font-size: 16px; display: flex; }
.list-nav .chev.out { color: var(--t2); font-size: 15px; gap: 6px; align-items: center; }

/* Genres / ambiances : tuiles discrètes, teinte propre à chaque nom (saturation basse) */
.genre-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
@media (min-width: 600px) { .genre-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); } }
.genre { position: relative; height: 80px; border-radius: var(--r-m); overflow: hidden; padding: 12px 16px; display: flex; align-items: flex-end; font-weight: 600; font-size: 17px; line-height: 22px; background: linear-gradient(160deg, hsl(var(--h) 22% 17%), hsl(var(--h) 24% 10%)); border: var(--hair) solid var(--line); transition: transform .15s var(--ease); }
.genre:active { transform: scale(.97); }
.genre span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── Mini lecteur ───────── */
.mini {
  position: fixed; left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); bottom: calc(var(--tab-h) + var(--sab) + 8px); z-index: 31;
  height: var(--mini-h); border-radius: 14px; display: flex; align-items: center; gap: 12px; padding: 0 4px 0 8px; margin: 0 auto; max-width: 560px; cursor: pointer;
  background: rgba(30, 30, 33, .88); border: var(--hair) solid var(--line2); box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  transition: transform .35s var(--ease), opacity .25s;
}
.mini.off { transform: translateY(160%); opacity: 0; pointer-events: none; }
.mini:active { background: rgba(40, 40, 44, .9); }
.mini .mcv { width: 40px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--s3); flex: none; }
.mini .mcv img { width: 100%; height: 100%; object-fit: cover; }
.mini .mm { flex: 1; min-width: 0; }
.mini .mt { font-weight: 500; font-size: 15px; line-height: 20px; letter-spacing: -.016em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .ma { font-size: 13px; line-height: 18px; letter-spacing: -.006em; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mb { width: 44px; height: 44px; display: grid; place-items: center; font-size: 24px; border-radius: 50%; }
.mini .mb:active { background: rgba(255, 255, 255, .1); }
.mini .mprog { position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.mini .mprog i { display: block; height: 100%; width: 100%; background: rgba(255, 255, 255, .8); transform: scaleX(0); transform-origin: left; }

/* ───────── Lecteur plein écran ───────── */
.np { position: fixed; inset: 0; z-index: 60; background: #000; transform: translateY(100%); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; display: flex; flex-direction: column; overflow: hidden; will-change: transform; }
.np.open { transform: none; visibility: visible; transition: transform .45s var(--ease); }
.np.drag { transition: none; }
.np-bg { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(64px) saturate(1.25) brightness(.42); transform: scale(1.2); transition: background-image .6s; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .7) 75%, #000); }
.np-in { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; max-width: 480px; width: 100%; margin: 0 auto; padding: calc(var(--sat) + 8px) 28px calc(var(--sab) + 24px); min-height: 0; }
.np-grab { align-self: center; width: 36px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .3); margin: 0 0 16px; flex: none; cursor: pointer; position: relative; }
.np-grab::before { content: ""; position: absolute; inset: -20px -24px; }
.np-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.np-art { position: relative; width: min(100%, 420px, 46dvh); aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; background: var(--s2); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); transition: transform .5s var(--ease); transform: scale(.88); }
.np.playing .np-art { transform: none; }
.np-art img { width: 100%; height: 100%; object-fit: cover; }
.np-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 var(--hair) rgba(255, 255, 255, .14); pointer-events: none; z-index: 3; }
/* Lecteur YouTube : la vidéo 16:9 est rognée au carré central (les pochettes « art track » y sont centrées) */
.np.alt .np-art { position: absolute; left: -9999px; top: 0; width: 240px; }   /* hors écran mais toujours rendu : la lecture YouTube continue */
.panel { display: none; position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -webkit-mask-image: linear-gradient(180deg, transparent, #000 6%, #000 92%, transparent); mask-image: linear-gradient(180deg, transparent, #000 6%, #000 92%, transparent); }
.panel::-webkit-scrollbar { display: none; }
.np.lyrics #lyricsPanel, .np.queue #queuePanel { display: block; }
.lyrics-in { padding: 32px 0 120px; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.01em; }
.lyrics-in p { margin: 0 0 20px; color: rgba(255, 255, 255, .36); transition: color .3s, transform .3s; transform-origin: left; cursor: pointer; }
.lyrics-in p.cur { color: #fff; transform: scale(1.02); }
.lyrics-in.plain p { color: rgba(255, 255, 255, .88); font-size: 20px; line-height: 28px; font-weight: 600; margin-bottom: 4px; cursor: default; }
.lyrics-msg { color: var(--t2); text-align: center; padding-top: 40px; font-size: 17px; font-weight: 500; }

.np-meta { display: flex; align-items: center; gap: 12px; margin-top: 24px; flex: none; }
.np-meta .nm { flex: 1; min-width: 0; }
.np-title { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 17px; line-height: 22px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-size: 20px; flex: none; }
.round-btn:active { background: rgba(255, 255, 255, .2); }
.round-btn.on { color: var(--accent); }
.np-prog { margin-top: 20px; flex: none; }
.np-times { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--t2); font-variant-numeric: tabular-nums; margin-top: 4px; }
.np-note { text-align: center; font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--t3); margin-top: 8px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; margin: 0; --p: 0%; touch-action: none; display: block; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, .9) var(--p), rgba(255, 255, 255, .22) var(--p)); transition: height .15s; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .9); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 4px; margin-top: 0; opacity: 0; }
.np-prog input:active::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; }
.np-ctrl { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 0; flex: none; }
.np-ctrl button { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; font-size: 32px; transition: transform .12s var(--ease), opacity .2s; }
.np-ctrl button:active { transform: scale(.9); opacity: .7; }
.np-ctrl .play { width: 72px; height: 72px; font-size: 32px; background: #fff; color: #000; }
.np-ctrl .sm { width: 44px; height: 44px; font-size: 22px; color: var(--t3); }
.np-ctrl .sm.on { color: var(--accent); }
.np-bottom { display: flex; align-items: center; justify-content: center; gap: 32px; margin-top: 16px; flex: none; }
.np-bottom button { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: var(--t3); }
.np-bottom button.on { color: var(--accent); background: rgba(157, 180, 255, .12); }
.np-vol { display: none; align-items: center; gap: 12px; color: var(--t2); font-size: 16px; margin-top: 12px; flex: none; }
@media (hover: hover) and (min-width: 900px) { .np-vol { display: flex; } }
@media (max-height: 700px) { .np-meta { margin-top: 16px; } .np-prog { margin-top: 12px; } .np-ctrl .play { width: 64px; height: 64px; } .np-ctrl button { width: 52px; height: 52px; } .np-bottom { margin-top: 8px; } }

/* File d'attente */
.q-head { font-size: 17px; line-height: 22px; font-weight: 600; padding: 16px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.q-head small { font-size: 13px; color: var(--t2); font-weight: 500; }
.qrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.qrow img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; background: var(--s3); }
.qrow .qm { flex: 1; min-width: 0; }
.qrow .qt { font-size: 16px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow.cur .qt { color: var(--accent); }
.qrow .qa { font-size: 13px; line-height: 18px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow button.rm { width: 44px; height: 44px; margin-right: -10px; display: grid; place-items: center; color: var(--t3); font-size: 18px; border-radius: 50%; }

/* ───────── Feuilles (menus ⋯, modales) ───────── */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 480px; max-height: 86dvh; overflow-y: auto; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 8px 16px calc(var(--sab) + 16px); animation: sheetUp .36s var(--ease); background: var(--s2); border-top: var(--hair) solid var(--line2); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .22); margin: 0 auto 12px; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: var(--r-xl); max-height: 80vh; border: var(--hair) solid var(--line2); } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 16px; border-bottom: var(--hair) solid var(--line2); margin-bottom: 8px; }
.sheet-head img { width: 52px; height: 52px; border-radius: var(--r-s); object-fit: cover; background: var(--s3); flex: none; }
.sheet-head b { display: block; font-size: 17px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head span { color: var(--t2); font-size: 15px; line-height: 20px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .sm { flex: 1; min-width: 0; }
.act { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 0 8px; margin: 0 -8px; width: calc(100% + 16px); font-size: 17px; text-align: left; border-radius: 10px; }
.act:active { background: rgba(255, 255, 255, .08); }
.act .i { font-size: 22px; color: var(--t2); width: 24px; }
.act.danger, .act.danger .i { color: var(--danger); }
.act small { margin-left: auto; color: var(--t2); font-size: 13px; }
.sheet h3 { margin: 4px 0 8px; font-size: 20px; line-height: 25px; font-weight: 600; letter-spacing: .01em; }
.field { width: 100%; height: 52px; border-radius: var(--r-m); background: var(--s3); border: var(--hair) solid var(--line2); color: var(--t1); font: inherit; font-size: 17px; letter-spacing: -.024em; padding: 0 16px; outline: 0; margin: 8px 0; -webkit-appearance: none; appearance: none; }
.field::placeholder { color: var(--t3); }
.field:focus { border-color: rgba(157, 180, 255, .7); }
.sheet .btns { display: flex; gap: var(--gap); margin-top: 8px; }
.pl-mini { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; background: var(--s3); flex: none; }
.pl-mini .mosaic { grid-template-columns: 1fr 1fr; }

#toasts { position: fixed; top: calc(var(--sat) + 8px); left: 0; right: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 24px; font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: -.016em; max-width: calc(100vw - 40px); animation: toastIn .35s var(--ease); display: flex; align-items: center; gap: 8px; background: rgba(36, 36, 40, .94); border: var(--hair) solid var(--line2); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .i { color: var(--t2); font-size: 18px; }
.toast.out { opacity: 0; transform: translateY(-12px); transition: .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } }

/* ───────── Connexion ───────── */
.auth { position: absolute; inset: 0; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: calc(var(--sat) + 24px) 24px calc(var(--sab) + 24px); }
.auth-card { width: 100%; max-width: 360px; text-align: center; animation: pageIn .5s var(--ease); }
.auth-logo { width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 0 0 var(--hair) var(--line2), 0 12px 32px rgba(0, 0, 0, .6); }
.auth-logo img { width: 100%; height: 100%; }
.auth h1 { margin: 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .012em; }
.auth p.tag { margin: 4px 0 32px; color: var(--t2); font-size: 17px; }
.seg { display: flex; padding: 2px; border-radius: 9px; background: rgba(118, 118, 128, .24); margin-bottom: 16px; }
.seg button { flex: 1; height: 32px; border-radius: 7px; font-weight: 500; font-size: 14px; color: var(--t1); transition: background .2s; }
.seg button.on { background: #636366; font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.auth .field { text-align: left; margin: 8px 0; }
.auth .btn { width: 100%; flex: none; margin-top: 16px; height: 52px; }
.auth .msg { color: var(--danger); font-size: 15px; line-height: 20px; min-height: 20px; margin-top: 12px; }
.auth .hint { color: var(--t3); font-size: 13px; line-height: 18px; margin-top: 16px; }

/* ───────── Grand écran (iPad / ordinateur) : barre latérale plate ───────── */
@media (min-width: 900px) {
  .tabbar { display: none; }
  .main { left: var(--side-w); padding: 0 40px 140px; }
  .page { padding-top: 28px; }
  .sticky-search { margin-top: -28px; padding-top: 28px; }
  .sidebar { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); padding: 20px 12px 12px; z-index: 30; background: var(--s1); border-right: var(--hair) solid var(--line); }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 12px 16px; font-weight: 700; font-size: 20px; line-height: 24px; letter-spacing: .01em; }
  .side-brand img { width: 28px; height: auto; }
  .side-search { display: flex; align-items: center; gap: 8px; background: rgba(118, 118, 128, .24); border-radius: 10px; padding: 0 8px; height: 36px; margin: 0 0 12px; color: var(--t2); }
  .side-search span { font-size: 15px; }
  .side-scroll { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
  .side-scroll::-webkit-scrollbar { display: none; }
  .side-title { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: .06em; padding: 20px 12px 8px; display: flex; justify-content: space-between; align-items: center; }
  .side-title button { color: var(--t2); font-size: 18px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; }
  .side-title button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .nav { display: flex; align-items: center; gap: 12px; width: 100%; height: 36px; padding: 0 12px; border-radius: var(--r-s); font-size: 15px; font-weight: 500; letter-spacing: -.016em; color: var(--t1); text-align: left; transition: background .15s; }
  .nav .i { font-size: 19px; color: var(--t2); }
  .nav:hover { background: rgba(255, 255, 255, .05); }
  .nav.active { background: rgba(255, 255, 255, .09); }
  .nav.active .i { color: var(--accent); }
  .nav .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .side-foot { margin-top: 8px; padding-top: 12px; border-top: var(--hair) solid var(--line); display: flex; align-items: center; gap: 12px; padding-left: 8px; }
  .side-foot .un { flex: 1; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-foot button { color: var(--t2); font-size: 20px; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; }
  .side-foot button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .mini { left: calc(var(--side-w) + 16px) !important; right: 16px !important; bottom: 16px !important; max-width: none !important; }
  .only-mobile { display: none !important; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tabbar { background: #0c0c0e; } .mini { background: #1e1e21; } .sticky-search { background: #000; } .toast { background: #242428; }
}
