/* Dashboard — refonte « tableau de bord » : menu à plat, panneau principal en retrait arrondi,
   cartes de stats avec pastille, graphique avec sélecteur de période. Chargé en dernier. */
.dash-page { --dsb: #f4f4f5; --dpanel: #ffffff; }
html[data-theme="dark"] .dash-page { --dsb: #101010; --dpanel: #0a0a0a; }
html[data-theme="dark"] body.dash-page, body.dash-page { background: var(--dsb); }

/* ---------- Structure : menu à plat + panneau principal en retrait ---------- */
.dash-page .dash-shell { background: var(--dsb); grid-template-columns: 256px minmax(0, 1fr); }
.dash-page .dash-shell.collapsed { grid-template-columns: 72px minmax(0, 1fr); }
.dash-page .dash-side, html[data-theme="dark"] .dash-page .dash-side { background: transparent; border-right: 0; }
.dash-page .dash-shell, .dash-page .dash-col { background: var(--dsb); }
.dash-page .dash-col { margin: 8px 8px 8px 0; min-height: calc(100vh - 16px); min-height: calc(100dvh - 16px); background: var(--dpanel); border: 1px solid var(--line); border-radius: 14px; overflow: clip; }
.dash-page .dash-top, html[data-theme="dark"] .dash-top { background: var(--dpanel); border-bottom: 1px solid var(--line); min-height: 56px; padding: 0 20px; gap: 12px; justify-content: flex-start; position: sticky; top: 0; z-index: 30; }
.dash-page .dash-top-t { flex: 1; min-width: 0; }
.dash-page .dash-top-title { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.dash-top-sep { width: 1px; height: 18px; background: var(--line-strong); flex: none; }
.dash-page .dash-main { padding: 24px 24px 48px; }
.dash-page .dash-top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.dash-gh { font-size: 14px; font-weight: 500; color: var(--text); padding: 6px 8px; border-radius: 8px; }
.dash-gh:hover { background: var(--bg-soft); }
.dash-page .dash-top-r .dash-avatar { display: none; }
.dash-page .dash-side-head .dash-toggle { display: none; }
.dash-toggle.top { display: inline-flex; flex: none; margin-left: -6px; }

/* ---------- Menu ---------- */
.dash-quick { display: flex; gap: 8px; padding: 4px 12px 8px; }
.dash-quick-btn { flex: 1; display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 10px; background: #0a0a0a; color: #ffffff; font-size: 14px; font-weight: 600; text-decoration: none; }
.dash-quick-btn:hover { background: #262626; }
html[data-theme="dark"] .dash-quick-btn { background: #ffffff; color: #0a0a0a; }
html[data-theme="dark"] .dash-quick-btn:hover { background: #e6e6e6; }
.dash-quick-btn .ic { width: 18px; height: 18px; display: inline-flex; }
.dash-quick-btn .ic svg { width: 18px; height: 18px; }
.dash-quick-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); }
.dash-quick-ico:hover { background: var(--bg-soft); }
.dash-quick-ico .ic svg { width: 16px; height: 16px; }
.dash-page .dash-sideback { display: none; }
.dash-page .dash-shell.collapsed .dash-quick { flex-direction: column; padding: 4px 8px 8px; }
.dash-page .dash-shell.collapsed .dash-quick-btn .lbl, .dash-page .dash-shell.collapsed .dash-quick-btn { justify-content: center; padding: 0; }
.dash-page .dash-shell.collapsed .dash-quick-btn .lbl { display: none; }
.dash-page .dash-side-head { background: transparent; border: 1px solid var(--line); border-radius: 12px; }

/* Compte en bas du menu */
.dash-page .dash-side-foot { display: block; margin-top: 4px; padding: 10px 12px 14px; border-top: 1px solid var(--line); }
.dash-page .dash-side-foot .dash-online { display: none; }
.dash-page .dash-user { display: flex; align-items: center; gap: 10px; padding: 6px; }
.dash-page .dash-user .txt { min-width: 0; display: grid; line-height: 1.25; flex: 1; }
.dash-page .dash-user strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-page .dash-user .txt span { font-size: 12px; color: var(--muted); }
.dash-page .dash-user .chev { display: none; }
.dash-page .dash-shell.collapsed .dash-user .txt { display: none; }
.dash-page .dash-user .dash-avatar { width: 34px; height: 34px; border-radius: 10px; }

/* ---------- Cartes de stats ---------- */
.dash-page .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dash-page .stat { padding: 20px 22px 22px; border-radius: 14px; background: linear-gradient(160deg, var(--card), var(--dpanel) 70%); border: 1px solid var(--line); box-shadow: none; display: flex; flex-direction: column; gap: 10px; }
.dash-page .stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.dash-page .stat-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.dash-page .stat-ic { display: none; }
.dash-page .stat-val { font-family: var(--display); font-size: clamp(28px, 2.6vw, 36px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.dash-page .stat-foot { display: block; margin-top: auto; font-size: 13.5px; color: var(--muted); }
.dash-page .stat-foot .spark { display: none; }
.dash-page .stat-note { color: var(--muted); }
.stat-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.stat-badge .ic svg { width: 12px; height: 12px; }
.stat-badge.down { color: var(--text); }
@media (max-width: 1180px) { .dash-page .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .dash-page .stats-grid { grid-template-columns: 1fr; } }

/* ---------- Cartes / graphiques ---------- */
.dash-page .dash-card, .dash-page .panel { border-radius: 14px; box-shadow: none; }
.dash-page .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.dash-page .panel-head .ph-t { display: grid; gap: 4px; min-width: 0; }
.dash-page .panel-head h3 { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.dash-page .panel-head .dash-muted { font-size: 13.5px; }
.dash-page .panel-head .dash-tabs[role="group"] { flex: none; }
.dash-page .dash-tabs[role="group"], html[data-theme="dark"] .dash-page .dash-tabs[role="group"] { background: transparent; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0; overflow: hidden; gap: 0; }
.dash-page .dash-tabs[role="group"] .dash-tab { border-radius: 0; padding: 7px 14px; font-size: 13.5px; font-weight: 500; color: var(--text); border-left: 1px solid var(--line-strong); }
.dash-page .dash-tabs[role="group"] .dash-tab:first-child { border-left: 0; }
.dash-page .dash-tabs[role="group"] .dash-tab[aria-pressed="true"] { background: var(--line); color: var(--text); }
.dash-page .ov-head { margin-bottom: 18px; }

/* Boutons contour, comme « Customize Columns » */
.dash-page .btn-ghost, .dash-page .eb-b { border-radius: 10px; }

@media (max-width: 960px) {
  .dash-page .dash-col { margin: 0; border: 0; border-radius: 0; min-height: 100vh; }
  .dash-page .dash-toggle.top { display: none; }
  .dash-top-sep { display: none; }
  .dash-page .dash-top-r .dash-avatar { display: inline-grid; }
  .dash-gh { display: none; }
  .dash-page .dash-main { padding: 18px 16px 40px; }
}

/* =====================================================================
   En direct
   ===================================================================== */
.dash-page .live { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 16px; align-items: start; }
.dash-page .live-left, .dash-page .live-right { display: grid; gap: 16px; min-width: 0; align-content: start; }
.dash-page .live-right > *, .dash-page .live-right .dash-row, .dash-page .live-right .grow { min-width: 0; }
.dash-page .live-right select { width: 100%; min-width: 0; }
.dash-page .live-right .dash-row { flex-wrap: nowrap; }

/* Carte du lecteur : à plat, sans image de fond */
.dash-page .live-hero, .dash-page .live-idle { background: linear-gradient(160deg, var(--card), var(--dpanel) 70%); border: 1px solid var(--line); border-radius: 14px; }
.dash-page .live-bg, .dash-page .live-hero::after { display: none; }
.dash-page .live-hero-in { padding: 24px; gap: 24px; }
.dash-page .live-top { display: flex; align-items: center; gap: 10px; }
.dash-page .live-top .live-chip { margin-left: auto; border-radius: 999px; }
.dash-page .live-now { display: flex; align-items: center; gap: 20px; }
.dash-page .live-art { width: 112px; height: 112px; border-radius: 14px; flex: none; box-shadow: none; }
.dash-page .live-meta { min-width: 0; }
.dash-page .live-meta .ttl { font-family: var(--display); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; }
.dash-page .live-meta .sub { font-size: 14px; color: var(--muted); }
.dash-page .live-prog { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dash-page .live-bar { flex: 1; }
.dash-page .live-ctl { display: flex; justify-content: center; gap: 12px; }
.dash-page .live-opts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.dash-page .live-vol { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }

/* Boutons ronds : contour fin, bouton principal plein, aucune couleur d'alerte */
.dash-page .live-btn, .dash-page .live-btn.danger { background: transparent; border: 1px solid var(--line-strong); color: var(--text); box-shadow: none; }
.dash-page .live-btn:hover:not(:disabled), .dash-page .live-btn.danger:hover:not(:disabled) { background: var(--line); border-color: var(--line-strong); color: var(--text); }
html[data-theme="dark"] .dash-page .live-btn.main, .dash-page .live-btn.main { background: var(--text); color: var(--dpanel); border: 0; box-shadow: none; }
html[data-theme="dark"] .dash-page .live-btn.main:hover:not(:disabled) { background: #dcdcdc; color: #0a0a0a; }
.dash-page .live-btn.main .ic { color: inherit; }

/* Sélecteur Player 1 / Player 2 : même segment que le reste */
.dash-page .live-switch .dash-tabs { width: fit-content; }
.dash-page .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.dash-page .live-dot.on { background: var(--text); }

/* File d'attente en lignes */
.dash-page .live-queue-card, .dash-page .live-right .dash-card { padding: 20px 22px; }
.dash-page .live-queue { gap: 0; border-top: 1px solid var(--line); margin-top: 12px; }
.dash-page .live-queue .q-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 10px 4px; }
.dash-page .live-queue .q-item:hover { background: var(--bg-soft); }
.dash-page .live-queue .pos, .dash-page .live-queue .dur { color: var(--muted); font-variant-numeric: tabular-nums; }

/* =====================================================================
   Réglages
   ===================================================================== */
.dash-page .set-hero .live-top { display: none; }
.dash-page .set-hero .live-hero-in { padding: 24px; gap: 22px; }
.dash-page .set-hero .live-art.ph.sm { width: 72px; height: 72px; border-radius: 12px; box-shadow: none; }
.dash-page .set-hero .live-meta .ttl { font-size: 20px; }
.dash-page .set-block { padding-top: 20px; border-top: 1px solid var(--line); }
.dash-page .set-block .lbl { display: block; margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--text); }
.dash-page .dash-swatches { gap: 8px; }
.dash-page .dash-swatch, .dash-page .set-hero .dash-swatch { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-strong); }
.dash-page .dash-swatch:hover { transform: none; border-color: var(--text); }
.dash-page .dash-swatch[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 2px; }
.dash-page .dash-swatch.default { background: repeating-linear-gradient(135deg, var(--line) 0 5px, transparent 5px 10px); }
.dash-page .dash-color input[type="color"] { border-radius: 9px; border: 1px solid var(--line-strong); }
.dash-page .set-hero .dash-color input[type="text"] { background: transparent; border-radius: 10px; }
.dash-page .set-vol-big { font-family: var(--display); font-size: clamp(40px, 5vw, 52px); font-weight: 600; letter-spacing: -0.045em; }
.dash-page .set-chip { border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.dash-page .set-chip::before { background: var(--muted-soft); box-shadow: none; }
.dash-page .set-chip.changed { color: var(--text); border-color: var(--text); }
.dash-page .set-chip.changed::before { background: var(--text); box-shadow: none; }
.dash-page .set-save .btn { flex: 1; border-radius: 10px; }

/* Curseurs et interrupteurs en noir et blanc */
.dash-page input[type="range"] { accent-color: var(--text); }
.dash-page .pt-sw input:checked + .pt-knob { background: var(--text); }
.dash-page .pt-sw input:checked + .pt-knob::after { background: var(--dpanel); }
@media (max-width: 1100px) { .dash-page .live { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   Menu réduit
   ===================================================================== */
.dash-page .dash-shell.collapsed .dash-quick { align-items: center; gap: 8px; padding: 6px 0 10px; }
.dash-page .dash-shell.collapsed .dash-quick-btn { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 10px; }
.dash-page .dash-shell.collapsed .dash-quick-ico { flex: none; width: 40px; height: 40px; }
.dash-page .dash-shell.collapsed .dash-side-head { flex: none; border: 0; background: transparent; padding: 0; margin: 2px 0 10px; min-height: 0; align-items: center; justify-content: center; }
.dash-page .dash-shell.collapsed .dash-side-head .dash-avatar,
.dash-page .dash-shell.collapsed .dash-side-head .dash-gicon { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.dash-page .dash-shell.collapsed .dash-navbtn { width: 40px; height: 40px; margin: 0 auto; border-radius: 10px; }
.dash-page .dash-shell.collapsed .dash-side-foot { padding: 10px 0 14px; display: grid; place-items: center; }
.dash-page .dash-shell.collapsed .dash-user { flex: none; padding: 0; width: 40px; height: 40px; border: 0; background: transparent; justify-content: center; }
.dash-page .dash-shell.collapsed .dash-user .dash-avatar { width: 40px; height: 40px; border-radius: 10px; flex: none; }

/* =====================================================================
   Tiroir mobile : fond plein (le menu est transparent sur ordinateur)
   ===================================================================== */
@media (max-width: 960px) {
  .dash-page .dash-side, html[data-theme="dark"] .dash-page .dash-side { background: var(--dpanel); border-right: 1px solid var(--line-strong); }
  .dash-page .dash-side.open { box-shadow: 16px 0 48px rgba(0, 0, 0, .35); }
  .dash-page .dash-quick-ico { display: none; }
  .dash-page .dash-quick { padding: 4px 12px 10px; }
  .dash-page .dash-quick-btn { height: 44px; }
  .dash-page .dash-scrim { background: rgba(0, 0, 0, .55); }
  .dash-page .dash-brandrow { padding: 14px 12px 10px; }
  .dash-page .dash-close { margin-left: auto; }
}
@media (max-width: 960px) {
  .dash-page .dash-side-body { overflow: hidden; min-height: 0; }
  .dash-page .dash-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 960px) {
  .dash-page .dash-side { padding-bottom: 0; }
  .dash-page .dash-side-body { padding-bottom: 0; }
  .dash-page .dash-side-foot { padding: 8px 12px max(12px, env(safe-area-inset-bottom)); margin-top: 0; }
  .dash-page .dash-account { padding-bottom: 6px; }
}
@media (max-width: 960px) { .dash-page .dash-side.open .dash-side-body { max-height: none; } }

/* =====================================================================
   Connexion
   ===================================================================== */
.dash-page .dash.in-login { max-width: none; padding: 0; }
.dash-page .login { min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); max-width: 1180px; margin: 0 auto; padding: 48px clamp(20px, 4vw, 48px); grid-template-columns: minmax(0, 1.1fr) minmax(0, 440px); gap: clamp(32px, 7vw, 96px); align-items: center; position: relative; }
.dash-page .login::before { content: ""; position: absolute; inset: 0 -50vw; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 35% 45%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 60% 55% at 35% 45%, #000 0%, transparent 75%); }
.login-copy { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.dash-page .login-logo { width: auto; height: 44px; display: inline-flex; align-items: center; gap: 12px; padding: 0 16px 0 7px; border-radius: 12px; background: transparent; color: var(--text); font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -0.02em; text-decoration: none; }
.dash-page .login-logo img { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: #0a0a0a; box-sizing: border-box; }
html[data-theme="dark"] .dash-page .login-logo img { background: #000; box-shadow: inset 0 0 0 1px var(--line-strong); }
.login-copy h1 { font-family: var(--display); font-size: clamp(42px, 6.4vw, 76px); line-height: 1; letter-spacing: -0.055em; font-weight: 600; margin: 8px 0 0; }
.login-copy h1 .dim { color: var(--muted-soft); }
.login-copy .lead { max-width: 44ch; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; color: var(--muted); margin: 0; }

/* Aperçu décoratif du lecteur */
.login-peek { width: min(100%, 400px); margin-top: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(160deg, var(--card), var(--dpanel) 70%); display: grid; gap: 16px; }
.lp-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text); animation: lpPulse 1.8s ease-in-out infinite; }
.lp-now { display: flex; align-items: center; gap: 14px; }
.lp-art { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--muted); }
.lp-art .ic, .lp-art svg { width: 20px; height: 20px; }
.lp-now b { display: block; font-size: 15px; font-weight: 600; }
.lp-now small { font-size: 13px; color: var(--muted); }
.lp-prog { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.lp-bar.a { display: block; height: 100%; width: 42%; border-radius: 4px; background: var(--text); animation: lpProg 6s ease-in-out infinite alternate; }
.lp-eq { display: flex; align-items: flex-end; gap: 4px; height: 22px; }
.lp-eq .lp-bar { width: 4px; border-radius: 2px; background: var(--muted-soft); animation: lpEq 1.1s ease-in-out infinite; }
.lp-eq .e1 { animation-delay: -.1s; } .lp-eq .e2 { animation-delay: -.5s; } .lp-eq .e3 { animation-delay: -.3s; } .lp-eq .e4 { animation-delay: -.8s; } .lp-eq .e5 { animation-delay: -.2s; } .lp-eq .e6 { animation-delay: -.6s; } .lp-eq .e7 { animation-delay: -.4s; }
@keyframes lpEq { 0%, 100% { height: 18%; } 50% { height: 100%; } }
@keyframes lpProg { from { width: 28%; } to { width: 72%; } }
@keyframes lpPulse { 50% { opacity: .35; } }

/* Carte de connexion */
.dash-page .login-col { align-items: stretch; gap: 16px; }
.dash-page .dash-login { padding: 36px 32px 28px; border-radius: 18px; text-align: left; background: var(--dpanel); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .45); }
.dash-page .dash-login h2 { font-family: var(--display); font-size: 28px; letter-spacing: -0.04em; font-weight: 600; margin: 0; }
.dash-page .dash-login > p { margin: 10px 0 24px; font-size: 15px; color: var(--muted); }
.dash-page .login-btn { height: 48px; border-radius: 12px; font-size: 15px; }
.login-perks { list-style: none; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.login-perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.login-perks li b { color: var(--text); font-weight: 600; }
.login-perks .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--text); }
.login-perks .ic svg { width: 18px; height: 18px; }
.dash-page .dash-login .login-note { margin: 20px 0 0; padding: 0; text-align: left; font-size: 13.5px; }
.dash-page .login-note a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.login-back { align-self: center; font-size: 13.5px; color: var(--muted); text-decoration: none; }
.login-back:hover { color: var(--text); }
@media (max-width: 900px) {
  .dash-page .login { grid-template-columns: minmax(0, 1fr); padding-top: 28px; gap: 32px; min-height: 0; }
  .login-peek { display: none; }
  .login-copy h1 { font-size: clamp(38px, 11vw, 56px); }
}
@media (prefers-reduced-motion: reduce) { .lp-dot, .lp-bar { animation: none !important; } }
html[data-theme="dark"] .dash-page .login-logo, .dash-page .login-logo { background: transparent; box-shadow: none; border: 0; }

/* =====================================================================
   Écran de chargement : épuré, un trait de progression en haut
   ===================================================================== */
html.js.booting .boot { background: var(--dsb, var(--bg)); place-items: center; padding: 24px; }
html[data-theme="dark"].js.booting .boot { background: #0a0a0a; }
.boot-line { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: transparent; overflow: hidden; }
.boot-line .boot-fill { display: block; height: 100%; width: 0; border-radius: 0 2px 2px 0; background: var(--text); box-shadow: 0 0 12px var(--text); transition: width .12s linear; }
.boot .boot-in { width: auto; gap: 0; animation: bootIn .5s cubic-bezier(.2, .7, .2, 1) both; }
.boot-mark { width: 40px; height: 40px; padding: 9px; box-sizing: border-box; border-radius: 12px; background: #0a0a0a; animation: bootBreath 2.4s ease-in-out infinite; }
html[data-theme="dark"] .boot-mark { background: #000; box-shadow: inset 0 0 0 1px var(--line-strong); }
.boot .boot-msg { margin: 20px 0 0; min-height: 20px; font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em; color: var(--muted); }
.boot .boot-pct { position: absolute; right: 24px; bottom: 22px; margin: 0; font-family: var(--display); font-size: 13px; font-weight: 500; color: var(--muted-soft); font-variant-numeric: tabular-nums; }
.boot .boot-logo, .boot .boot-eq, .boot .boot-title, .boot .boot-bar { display: none; }
@keyframes bootIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bootBreath { 50% { transform: scale(.94); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .boot-mark, .boot .boot-in { animation: none; } }

/* =====================================================================
   Squelettes + effet « chargé »
   ===================================================================== */
.dash-page .sk { border-radius: 12px; background: linear-gradient(90deg, var(--line) 25%, var(--bg-soft) 50%, var(--line) 75%); background-size: 200% 100%; }
html[data-theme="dark"] .dash-page .sk { background: linear-gradient(90deg, #161616 25%, #202020 50%, #161616 75%); background-size: 200% 100%; }
.dash-page .sk, html[data-theme="dark"] .dash-page .sk { animation: sk-shimmer 1.4s linear infinite; }
.sk-wrap.sk-flat { padding: 0; gap: 16px; }
.sk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sk-stat { height: 124px; border-radius: 14px; }
.sk-chart { height: 300px; border-radius: 14px; }
.sk-card { border-radius: 14px; }
.sk-pill { height: 38px; width: 190px; border-radius: 10px; }
.sk-hero { height: 360px; border-radius: 14px; }
@media (max-width: 1180px) { .sk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sk-stats { grid-template-columns: 1fr; } .sk-chart { height: 220px; } }

/* Les blocs réels arrivent en fondu, l'un après l'autre */
@keyframes loadedIn { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.loaded > * { animation: loadedIn .5s cubic-bezier(.2, .7, .2, 1) both; }
.loaded > *:nth-child(2) { animation-delay: .06s; } .loaded > *:nth-child(3) { animation-delay: .12s; }
.loaded > *:nth-child(4) { animation-delay: .18s; } .loaded > *:nth-child(n+5) { animation-delay: .24s; }
.dash-page .dash-main > .ov, .dash-page .dash-main > .pt, .dash-page .dash-main > .live { animation: loadedIn .35s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) { .loaded > *, .dash-page .dash-main > * { animation: none !important; } .dash-page .sk { animation: none; } }

/* =====================================================================
   Dégradés (mode sombre surtout)
   ===================================================================== */
html[data-theme="dark"] .dash-page { --dsb: #0e0e0e; }
html[data-theme="dark"] .dash-page .dash-shell { background: linear-gradient(180deg, #131313 0%, #0b0b0b 100%); }
html[data-theme="dark"] .dash-page .dash-col { background: radial-gradient(1100px 380px at 50% -120px, rgba(255, 255, 255, .075), transparent 70%), linear-gradient(180deg, #0f0f0f 0%, #080808 100%); border-color: #1f1f1f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
html[data-theme="dark"] .dash-page .dash-top { background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 100%), #0c0c0c; backdrop-filter: blur(8px); }
html[data-theme="dark"] .dash-page .stat,
html[data-theme="dark"] .dash-page .dash-card,
html[data-theme="dark"] .dash-page .panel,
html[data-theme="dark"] .dash-page .live-hero,
html[data-theme="dark"] .dash-page .live-idle { background: radial-gradient(420px 160px at 0% 0%, rgba(255, 255, 255, .06), transparent 70%), linear-gradient(160deg, #181818 0%, #0d0d0d 70%); border-color: #232323; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
html[data-theme="dark"] .dash-page .stat-val { background-image: linear-gradient(180deg, #ffffff 30%, #8a8a8a 130%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="dark"] .dash-page .dash-top-title, html[data-theme="dark"] .dash-page .set-vol-big { background-image: linear-gradient(180deg, #ffffff 30%, #8e8e8e 130%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="dark"] .dash-page .dash-navbtn[aria-current="page"] { background: linear-gradient(90deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
html[data-theme="dark"] .dash-page .dash-quick-btn, html[data-theme="dark"] .dash-page .login-btn,
html[data-theme="dark"] .dash-page .btn-primary { background: linear-gradient(180deg, #ffffff, #cfcfcf); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 24px -12px rgba(255, 255, 255, .35); }
html[data-theme="dark"] .dash-page .live-btn.main { background: linear-gradient(180deg, #ffffff, #cfcfcf); }
html[data-theme="dark"] .dash-page .lp-bar.a, html[data-theme="dark"] .dash-page .live-bar .fill { background: linear-gradient(90deg, #7a7a7a, #ffffff); }
html[data-theme="dark"] .dash-page .login::after { content: ""; position: absolute; inset: 0 -50vw; z-index: -2; pointer-events: none; background: radial-gradient(50% 45% at 30% 30%, rgba(255, 255, 255, .08), transparent 70%); }
html[data-theme="dark"] .dash-page .dash-login { background: radial-gradient(360px 140px at 0% 0%, rgba(255, 255, 255, .07), transparent 70%), linear-gradient(160deg, #181818, #0b0b0b 75%); }
/* Mode clair : un voile à peine visible */
html:not([data-theme="dark"]) .dash-page .dash-col { background: radial-gradient(1000px 300px at 50% -100px, rgba(0, 0, 0, .035), transparent 70%), #ffffff; }
html:not([data-theme="dark"]) .dash-page .stat-val { background-image: linear-gradient(180deg, #0a0a0a 30%, #6a6a6a 130%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* =====================================================================
   En direct — scène (pochette + file) et barre de lecture en bas
   ===================================================================== */
.dash-page .live { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-page .live-dock { grid-column: 1 / -1; }
.dash-page .live-dock[hidden], .dash-page .live-qbox[hidden], .dash-page .live-launch[hidden] { display: none; }

/* Pochette */
.dash-page .live-cover { position: relative; overflow: hidden; padding: 0; border-radius: 16px; }
.dash-page .live-cover .live-bg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(48px) saturate(1.3); opacity: .38; transform: scale(1.4); pointer-events: none; }
.dash-page .live-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--dpanel) 100%); opacity: .55; pointer-events: none; }
.dash-page .live-cover-in { position: relative; z-index: 1; display: grid; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.dash-page .live-cover .live-art { width: 100%; max-width: 320px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6); }
.dash-page .live-cover .live-art.ph { display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); }
.dash-page .live-cover .live-art.ph svg { width: 48px; height: 48px; }
.dash-page .live-cover .live-meta { display: grid; gap: 4px; justify-items: center; min-width: 0; max-width: 100%; }
.dash-page .live-cover .live-meta .ttl { font-size: clamp(20px, 2vw, 26px); line-height: 1.15; }
.dash-page .live-cover .live-meta .sub { font-size: 14.5px; color: var(--muted); }
.dash-page .live-cover .live-top { justify-content: center; flex-wrap: wrap; }
.dash-page .live-cover .live-top .live-chip { margin-left: 0; }
.dash-page .live-open { margin-top: 2px; }

/* Panneau de droite avec onglets */
.dash-page .live-right { display: block; border: 1px solid var(--line); border-radius: 16px; background: var(--dpanel); overflow: hidden; }
.live-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.live-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: color .15s; }
.live-tab .ic, .live-tab svg { width: 17px; height: 17px; }
.live-tab:hover { color: var(--text); }
.live-tab.on { color: var(--text); }
.live-tab.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--text); }
.live-tab .count { margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: var(--line); font-size: 11.5px; color: var(--muted); }
.dash-page .live-right .live-queue-card, .dash-page .live-right .live-launch { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 18px; }
.dash-page .live-right .live-queue-card h3 { font-size: 14px; font-weight: 600; color: var(--muted); }
.dash-page .live-right .live-queue { margin-top: 12px; border-top: 0; display: grid; gap: 8px; }
.dash-page .live-right .live-queue .q-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); transition: border-color .15s, background .15s; }
.dash-page .live-right .live-queue .q-item:hover { border-color: var(--line-strong); background: var(--card); }
.dash-page .live-right .live-queue .pos { display: none; }
.q-thumb { width: 48px; height: 48px; flex: none; border-radius: 9px; object-fit: cover; }
.q-thumb.ph { display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted-soft); }
.q-thumb.ph svg { width: 18px; height: 18px; }
.dash-page .live-queue .info { min-width: 0; flex: 1; display: grid; gap: 2px; }
.dash-page .live-queue .info a, .dash-page .live-queue .info > span { font-size: 15px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.q-sub { font-size: 13px; color: var(--muted); }
.q-sub:empty { display: none; }
.dash-page .live-queue .dur { display: none; }

/* Barre de lecture collée en bas */
.dash-page .live-dock { position: sticky; bottom: 12px; z-index: 25; margin-top: 8px; border: 1px solid var(--line-strong); border-radius: 18px; background: color-mix(in srgb, var(--dpanel) 88%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .dash-page .live-dock { background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0)), rgba(12, 12, 12, .86); }
.ld-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 20px; padding: 14px 20px; }
.ld-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ld-art { width: 52px; height: 52px; flex: none; border-radius: 11px; object-fit: cover; }
.ld-art.ph { display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--muted); }
.ld-meta { display: grid; min-width: 0; line-height: 1.3; }
.ld-meta b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-meta small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-mid { display: grid; gap: 8px; min-width: 0; }
.ld-mid .live-ctl { gap: 10px; }
.ld-mid .live-btn { width: 38px; height: 38px; }
.ld-mid .live-btn.main { width: 48px; height: 48px; }
.ld-mid .live-prog { max-width: 560px; width: 100%; margin: 0 auto; }
.ld-end { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
.ld-end .live-vol { min-width: 0; flex: 1; max-width: 200px; }
.ld-end .dash-num { width: 54px; height: 34px; padding: 0 8px; }
.ld-end .dash-muted { display: none; }
@media (max-width: 1100px) {
  .dash-page .live { grid-template-columns: minmax(0, 1fr); }
  .ld-in { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; }
  .ld-end { justify-content: space-between; }
  .dash-page .live-dock { bottom: 8px; }
}
.ld-end { flex-wrap: nowrap; }
.ld-end .live-vol { display: flex; align-items: center; gap: 10px; flex: 1 1 90px; min-width: 90px; max-width: 180px; }
.ld-end .live-vol input[type="range"] { flex: 1; min-width: 0; width: 100%; }
.ld-end .dash-num { display: none; }
.ld-end .dash-tabs { flex: none; width: auto; }
.ld-end .dash-tab { padding: 0 12px; }
.ld-mid .live-prog { display: flex; align-items: center; gap: 12px; }
.ld-mid .live-prog > span { flex: none; min-width: 34px; text-align: center; }
@media (max-width: 600px) {
  .dash-page .live-cover .live-art { max-width: 220px; }
  .dash-page .live-cover-in { padding: 18px; gap: 10px; }
  .ld-end .live-vol { max-width: none; }
}

/* =====================================================================
   Correctifs : file d'attente sans défilement interne, cartes des réglages, pied de page
   ===================================================================== */
.dash-page .live-queue { max-height: none; overflow: visible; padding-right: 0; }
.dash-page .live-right .live-queue .q-item .acts { flex: none; }
.dash-page .live.split .live-right { display: grid; gap: 16px; align-content: start; border: 0; border-radius: 0; background: none; overflow: visible; }
.dash-page .live.split .live-left { min-width: 0; }

/* Pied de page : même fond que le dashboard, aligné sur le panneau */
body.dash-page { background: var(--dsb); }
html[data-theme="dark"] body.dash-page { background: #0b0b0b; }
.dash-page .site-footer, html[data-theme="dark"] .dash-page .site-footer { background: transparent; border: 0; padding: 12px 0 22px; }
.dash-page .site-footer .footer-bottom { color: var(--muted-soft); }
.dash-page .site-footer a { color: var(--muted); }
.dash-page .site-footer a:hover { color: var(--text); }

/* =====================================================================
   File d'attente : glisser-déposer à la souris
   ===================================================================== */
.dash-page .live-queue .q-item { cursor: grab; user-select: none; -webkit-user-select: none; }
.dash-page .live-queue .q-item .info a { pointer-events: auto; }
.dash-page .live-queue .grip { opacity: .55; width: 20px; touch-action: none; cursor: grab; }
.dash-page .live-queue .q-item:hover .grip { opacity: 1; }
.dash-page .live-queue .q-item.dragging { cursor: grabbing; opacity: 1; background: var(--card); border-color: var(--text); box-shadow: 0 24px 50px -12px rgba(0, 0, 0, .7), 0 0 0 1px var(--line-strong); transform: scale(1.015); }
.dash-page .live-queue .q-ph { list-style: none; border: 1px dashed var(--line-strong); border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); }
body.q-dragging, body.q-dragging * { cursor: grabbing !important; user-select: none !important; }
/* Monter / descendre : discrets, visibles au survol (le glisser-déposer reste le geste principal) */
.dash-page .live-right .live-queue .acts .dash-x:not(:last-child) { opacity: 0; transition: opacity .15s; }
.dash-page .live-right .live-queue .q-item:hover .acts .dash-x, .dash-page .live-right .live-queue .q-item:focus-within .acts .dash-x { opacity: 1; }
@media (hover: none) { .dash-page .live-right .live-queue .acts .dash-x:not(:last-child) { opacity: 1; } }

/* Barre du haut : fond plein (plus de transparence au défilement) */
html[data-theme="dark"] .dash-page .dash-top, .dash-page .dash-top { backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-theme="dark"] .dash-page .dash-top { background: #0c0c0c; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.dash-page .dash-top { border-radius: 14px 14px 0 0; }
.dash-page .dash-top .dash-gh, .dash-page .dash-top-r * { -webkit-font-smoothing: antialiased; }

/* =====================================================================
   Playlists : lignes déplaçables
   ===================================================================== */
.dash-page .pl-tracks .dash-tracks { display: grid; gap: 8px; margin-top: 12px; }
.dash-page .pl-tracks .dash-tracks li.pl-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: grab; user-select: none; -webkit-user-select: none; transition: border-color .15s; }
.dash-page .pl-tracks .dash-tracks li.pl-row:first-child { border-top-color: var(--line); }
.dash-page .pl-tracks .dash-tracks li.pl-row:hover { border-color: var(--line-strong); background: var(--card); }
.dash-page .pl-row .grip { flex: none; width: 20px; display: grid; place-items: center; color: var(--muted-soft); opacity: .55; cursor: grab; touch-action: none; }
.dash-page .pl-row:hover .grip { opacity: 1; color: var(--text); }
.dash-page .pl-row .grip svg { width: 16px; height: 16px; }
.dash-page .pl-row .pos { width: 22px; text-align: center; }
.dash-page .pl-row .info a { color: var(--text); font-weight: 600; text-decoration: none; }
.dash-page .pl-row.dragging { cursor: grabbing; border-color: var(--text); box-shadow: 0 24px 50px -12px rgba(0, 0, 0, .7), 0 0 0 1px var(--line-strong); transform: scale(1.015); }
.dash-page .q-ph { list-style: none; border: 1px dashed var(--line-strong); border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.dash-page .pl-row .acts .dash-x:not(:last-child):not(:first-child) { opacity: 0; transition: opacity .15s; }
.dash-page .pl-row:hover .acts .dash-x, .dash-page .pl-row:focus-within .acts .dash-x { opacity: 1; }
@media (hover: none) { .dash-page .pl-row .acts .dash-x { opacity: 1 !important; } }
@media (max-width: 700px) { .dash-page .pl-row .grip { display: none; } }

/* Playlists : titres à gauche (large), liste des playlists à droite ; les lignes ne dépassent plus de la carte */
.dash-page .live:has(> .live-right .pl-list), .dash-page .live:has(.pl-side) { grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); }
.dash-page .live:has(.pl-list) > .live-left { min-width: 0; }
.dash-page .pl-tracks, .dash-page .pl-tracks .dash-tracks { min-width: 0; width: 100%; }
.dash-page .pl-tracks .dash-tracks { grid-template-columns: minmax(0, 1fr); }
.dash-page .pl-tracks .dash-tracks li.pl-row { min-width: 0; }
.dash-page .pl-row .info { min-width: 0; flex: 1; }
.dash-page .pl-row .info a, .dash-page .pl-row .info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-page .pl-tracks .dash-tracks, .dash-page .pl-tracks .dash-tracks li.pl-row { margin-left: 0; margin-right: 0; }
.dash-page .pl-tracks .dash-tracks { padding: 0; }

/* Haut de page : le panneau touche le bord supérieur (plus de bande sombre ni de liseré au-dessus de la barre) */
@media (min-width: 961px) {
  .dash-page .dash-col { margin-top: 0; min-height: calc(100vh - 8px); border-top: 0; border-radius: 0 0 14px 14px; }
  html[data-theme="dark"] .dash-page .dash-col { box-shadow: none; }
  .dash-page .dash-top, html[data-theme="dark"] .dash-page .dash-top { border-radius: 0; box-shadow: none; }
}

/* Mode clair : graphiques lisibles */
html:not([data-theme="dark"]) .dash-page .chart-svg .grid { stroke: rgba(0, 0, 0, .08); }
html:not([data-theme="dark"]) .donut-track { stroke: rgba(0, 0, 0, .08); }
html:not([data-theme="dark"]) .dash-page .chart-svg .bar { opacity: .9; }
