/* ==========================================================
   Style moderne et épuré — dashboard bot musique
   Une seule feuille : remplace tout l'ancien CSS.
   Thème clair par défaut, thème sombre automatique.
   ========================================================== */

:root {
    color-scheme: light dark;

    --bg: #f5f3fb;
    --surface: #ffffff;
    --surface-soft: #f0eef8;
    --line: #e6e2f0;
    --text: #191624;
    --muted: #777287;
    --accent: #7258e8;
    --accent-hover: #6045d2;
    --accent-soft: #eeeaff;
    --on-accent: #ffffff;
    --green: #159b72;
    --red: #d94d69;
    --red-soft: #fdecef;

    --radius-s: 11px;
    --radius-m: 17px;
    --radius-l: 26px;
    --shadow: 0 16px 48px rgb(48 35 91 / .08), 0 2px 6px rgb(25 22 36 / .04);
    --shadow-hover: 0 22px 54px rgb(48 35 91 / .14), 0 4px 12px rgb(25 22 36 / .06);

    --font: Inter, "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #090a11;
        --surface: #11131d;
        --surface-soft: #191b28;
        --line: rgb(255 255 255 / .09);
        --text: #f5f3fb;
        --muted: #aaa6bb;
        --accent: #9a83ff;
        --accent-hover: #b19fff;
        --accent-soft: #241e3c;
        --on-accent: #100d19;
        --green: #51d9a4;
        --red: #ff8296;
        --red-soft: #351a25;
        --shadow: 0 24px 70px rgb(0 0 0 / .3), 0 2px 8px rgb(0 0 0 / .18);
        --shadow-hover: 0 30px 80px rgb(0 0 0 / .42), 0 4px 16px rgb(0 0 0 / .22);
    }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 12% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34rem),
        radial-gradient(ellipse at 92% 78%, color-mix(in srgb, var(--green) 7%, transparent), transparent 30rem),
        var(--bg);
    color: var(--text);
    font: 400 14px/1.55 var(--font);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--text); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.03em; }
h2 { margin: 0; font-size: 18px; }
h3 { font-size: 15px; }
h1 span { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.muted { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.fine-print { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.ambient {
    position: fixed; z-index: 0; display: block; width: 300px; height: 300px;
    border-radius: 50%; filter: blur(100px); opacity: .14; pointer-events: none;
}
.ambient-one { top: -190px; left: -150px; background: #8062ff; }
.ambient-two { right: -180px; bottom: -190px; background: #39d6ac; }

/* ---------- Mise en page ---------- */
.shell { position: relative; z-index: 1; width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

.topbar {
    height: 76px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    text-decoration: none; font-size: 19px; font-weight: 750; letter-spacing: -.045em;
}
.brand-mark {
    display: block; width: 36px; height: 36px; overflow: hidden; border-radius: 12px;
    background: #05060a; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; transform: scale(2.7); transform-origin: 50% 34%; }
.brand-light { color: var(--muted); font-weight: 400; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.nav-link, .text-link { color: var(--muted); text-decoration: none; font-size: 13px; transition: color .15s; }
.nav-link:hover, .text-link:hover { color: var(--text); }
.connection { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.live-dot, .state-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.user-button {
    padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 78%, transparent); color: var(--muted); font-size: 13px;
    transition: background .18s, color .18s, border-color .18s;
}
.user-button:hover { background: var(--surface-soft); color: var(--text); }
.profile-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.profile-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* ---------- Boutons ---------- */
.button {
    display: inline-flex; justify-content: center; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 16px;
    border: 1px solid transparent; border-radius: 999px;
    text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap;
    transition: background .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.button-primary {
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #d0c4ff));
    color: var(--on-accent); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 25%, transparent);
}
.button-primary:hover { background: var(--accent-hover); box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 32%, transparent); transform: translateY(-1px); }
.button-radio, .button-web-listen {
    border-color: var(--line); background: color-mix(in srgb, var(--surface) 82%, transparent);
    color: var(--text); box-shadow: 0 4px 14px rgb(0 0 0 / .04);
}
.button-radio:hover, .button-web-listen:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); background: var(--accent-soft); transform: translateY(-1px); }
.status-link { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button-web-listen { min-height: 34px; font-size: 12px; }
.button:disabled, button:disabled { cursor: not-allowed; opacity: .45; }
.login-link { min-height: 46px; padding: 0 22px; }

/* ---------- Champs ---------- */
input[type="text"], select {
    min-width: 0;
    border: 1px solid var(--line); border-radius: var(--radius-s);
    background-color: var(--surface); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
input[type="text"] { flex: 1; width: 100%; padding: 11px 12px; font-size: 13px; }
select { padding: 10px 32px 10px 12px; font-size: 13px; }
input[type="text"]:hover, select:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
input[type="text"]:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
input::placeholder { color: var(--muted); opacity: .75; }
input[type="range"] { width: 100%; height: 4px; accent-color: var(--accent); }
.field { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.field select { width: 100%; }
.server-picker { display: grid; gap: 6px; width: min(260px, 40%); color: var(--muted); font-size: 12px; font-weight: 500; }
.server-picker select { width: 100%; }

/* ---------- Connexion ---------- */
.login-screen {
    display: grid; grid-template-columns: 1.1fr .9fr; align-items: stretch;
    min-height: 520px; margin: 44px 0; overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: 30px;
    background: linear-gradient(125deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-soft) 64%, transparent));
    box-shadow: var(--shadow); backdrop-filter: blur(20px);
}
.login-editorial { align-self: center; padding: 64px; }
.login-editorial h1 { margin: 16px 0; font-size: clamp(44px, 6vw, 72px); line-height: .98; letter-spacing: -.06em; }
.login-intro { max-width: 390px; margin: 0 0 30px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.login-side {
    position: relative; display: grid; place-items: center; overflow: hidden;
    background:
        radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 42%),
        linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 74%, var(--surface)), color-mix(in srgb, var(--accent) 14%, var(--surface)));
}
.login-side::before, .login-side::after {
    position: absolute; z-index: 0; content: ""; pointer-events: none;
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: 50%;
    box-shadow: 0 0 50px color-mix(in srgb, var(--accent) 8%, transparent);
}
.login-side::before { width: 360px; height: 360px; }
.login-side::after { width: 270px; height: 270px; }
.login-logo {
    position: relative; z-index: 1; display: block; width: min(84%, 420px); aspect-ratio: 1;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 28px;
    object-fit: cover; box-shadow: 0 24px 64px rgb(0 0 0 / .32);
}

/* ---------- Page d'accueil publique ---------- */
.landing { padding-top: 40px; }
.landing-hero {
    display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; min-height: 420px; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface);
}
.hero-copy { padding: 52px 24px 52px 56px; }
.hero-copy h1 { margin: 14px 0; font-size: clamp(42px, 6vw, 68px); line-height: 1; letter-spacing: -.05em; }
.hero-description { max-width: 430px; font-size: 15px; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 26px; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; overflow: hidden; background: var(--accent-soft); }
.visual-glow { display: none; }
.vinyl {
    position: relative; z-index: 1; display: grid; place-items: center;
    width: 230px; height: 230px; border-radius: 50%;
    background: repeating-radial-gradient(circle, var(--text) 0 2px, color-mix(in srgb, var(--text) 88%, var(--bg)) 3px 6px);
}
.vinyl::before { position: absolute; width: 82px; height: 82px; border-radius: 50%; background: var(--accent); content: ""; }
.vinyl span { z-index: 1; color: var(--on-accent); font-size: 26px; }
.orbit { position: absolute; width: 320px; height: 320px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 50%; }
.orbit-two { width: 410px; height: 410px; }
.floating-note { position: absolute; color: var(--accent); font-size: 26px; }
.note-one { top: 20%; right: 14%; }
.note-two { bottom: 22%; left: 12%; }
.visual-caption {
    position: absolute; right: 6%; bottom: 8%; z-index: 2;
    display: grid; grid-template-columns: 10px 1fr; align-items: center; gap: 2px 8px;
    padding: 11px 15px; border: 1px solid var(--line); border-radius: var(--radius-m);
    background: var(--surface); box-shadow: var(--shadow);
}
.visual-caption .live-dot { grid-row: span 2; }
.visual-caption > span:nth-child(2) { color: var(--muted); font-size: 11px; }
.visual-caption strong { font-size: 13px; }

.listen-section, .features-section { padding-top: 60px; scroll-margin-top: 28px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.section-heading h2, .landing-cta h2 { margin: 4px 0 0; font-size: clamp(22px, 3vw, 28px); }
.section-heading > .muted { max-width: 260px; text-align: right; }
.live-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
    border: 1px solid var(--line); border-radius: 999px; color: var(--green); font-size: 12px; font-weight: 600;
}

.web-radio-card {
    display: flex; align-items: center; gap: 18px; min-height: 108px; padding: 18px 20px;
    border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface);
}
.radio-art {
    position: relative; display: grid; place-items: center; flex: 0 0 68px;
    width: 68px; height: 68px; overflow: hidden; border-radius: var(--radius-m);
    background: var(--accent-soft); color: var(--accent); font-size: 26px;
}
.radio-art i { position: absolute; bottom: 0; left: 8px; width: 3px; height: 14px; border-radius: 3px 3px 0 0; background: var(--accent); opacity: .5; }
.radio-art i:nth-of-type(2) { left: 15px; height: 22px; }
.radio-art i:nth-of-type(3) { left: 22px; height: 10px; }
.radio-info { display: grid; flex: 1; min-width: 130px; gap: 3px; }
.radio-info strong { font-size: 16px; font-weight: 650; }
.radio-info > span:last-child { color: var(--muted); font-size: 12px; }
.public-station-picker { width: min(190px, 24%); }
.public-station-picker select { width: 100%; }
.public-audio { width: 190px; height: 36px; accent-color: var(--accent); }
.radio-note { margin: 8px 0 0 4px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.feature-icon {
    display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px;
    border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 18px;
}
.feature-card h3 { margin: 2px 0 6px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.landing-cta {
    display: flex; justify-content: space-between; align-items: center; gap: 24px;
    margin-top: 56px; padding: 28px 32px; border-radius: var(--radius-l);
    background: var(--accent); color: var(--on-accent);
}
.landing-cta h2 { color: inherit; font-size: 21px; }
.landing-cta .eyebrow { color: inherit; opacity: .75; }
.landing-cta .button-primary { background: var(--on-accent); color: var(--accent); }
.landing-cta .button-primary:hover { background: var(--on-accent); opacity: .9; }
.landing-footer {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 26px 2px 32px; color: var(--muted); font-size: 12px;
}
.landing-footer > span:first-child { color: var(--text); font-weight: 600; }

/* ---------- Choix du mode ---------- */
.mode-picker { padding: 48px 0 56px; }
.mode-picker > h1, .media-choice h1 { margin: 6px 0 8px; font-size: clamp(30px, 4vw, 40px); }
.mode-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
.mode-card {
    display: grid; align-content: start; gap: 10px; min-height: 210px; padding: 24px;
    border: 1px solid var(--line); border-radius: var(--radius-m);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-soft) 55%, transparent));
    color: var(--text); text-align: left; box-shadow: var(--shadow);
    transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}
.mode-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.mode-card-number { color: var(--muted); font-size: 12px; }
.mode-card-icon { color: var(--accent); font-size: 24px; }
.mode-card strong { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.mode-card > span:nth-last-child(2) { max-width: 320px; color: var(--muted); font-size: 13px; }
.mode-card-link { display: flex; justify-content: space-between; align-items: center; margin-top: auto; color: var(--accent); font-size: 13px; font-weight: 600; }
.home-listening-stats { margin-top: 40px; }
.home-history-panel { margin-top: 16px; }
.home-stats-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 14px; }
.home-stats-heading h2 { margin: 4px 0 0; font-size: 17px; }
.stats-live { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
.stats-live .live-dot { width: 6px; height: 6px; }
.home-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.home-stat {
    display: grid; gap: 5px; min-width: 0; padding: 15px 17px;
    border: 1px solid var(--line); border-radius: var(--radius-m);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-soft) 58%, transparent));
    box-shadow: var(--shadow);
}
.home-stat-label { color: var(--muted); font-size: 11px; }
.home-stat strong { font-size: 25px; font-weight: 650; font-variant-numeric: tabular-nums; }
.mode-topline { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.back-button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.back-button:hover { color: var(--accent); }
.mode-label { color: var(--accent); font-size: 12px; font-weight: 600; }
.media-choice { padding: 32px 0 20px; }
.media-choice-actions { display: flex; gap: 10px; margin-top: 20px; }
.media-choice-button {
    display: inline-flex; align-items: center; gap: 12px; min-width: 170px; padding: 11px 15px;
    border: 1px solid var(--line); border-radius: var(--radius-s);
    background: var(--surface); font-size: 13px; text-align: left; transition: border-color .15s, background .15s;
}
.media-choice-button > span { color: var(--accent); font-size: 17px; }
.media-choice-button b { margin-left: auto; color: var(--accent); }
.media-choice-button:hover, .media-choice-button.is-selected { border-color: var(--accent); background: var(--accent-soft); }

.web-workspace { margin: 16px 0 40px; }
.web-media-panel { max-width: 760px; }
.web-media-panel h2 { margin: 6px 0 18px; font-size: 22px; }
.web-media-panel > .muted { margin: -8px 0 18px; }
.web-radio-controls { display: grid; grid-template-columns: minmax(200px, 1fr) auto; align-items: end; gap: 12px; max-width: 520px; }
.web-radio-audio { width: min(100%, 520px); margin-top: 20px; accent-color: var(--accent); }
.web-player-container { margin-top: 20px; }
.web-player-container iframe { display: block; width: 100%; max-width: 650px; height: 366px; border: 0; border-radius: var(--radius-m); background: var(--surface-soft); }
.web-listen { margin: 14px 0 0; }
.web-listen-container { margin-top: 10px; }
.web-listen-container iframe { display: block; width: 100%; height: 170px; border: 0; border-radius: var(--radius-m); background: var(--surface-soft); }
.web-listen-container audio { width: 100%; height: 38px; }

/* ---------- Dashboard ---------- */
.dashboard { padding-top: 36px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.overview { display: grid; gap: 14px; margin-bottom: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card {
    display: grid; gap: 4px; min-width: 0; padding: 18px 20px;
    border: 1px solid var(--line); border-radius: var(--radius-m);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-soft) 55%, transparent));
    box-shadow: var(--shadow);
}
.stat-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-detail { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.overview-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; }
.overview-panel { min-height: 220px; }

.panel {
    min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-m);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 97%, transparent), color-mix(in srgb, var(--surface-soft) 42%, transparent));
    box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.panel-heading { display: flex; justify-content: space-between; align-items: start; min-height: 36px; margin-bottom: 18px; }
.panel-sparkle { color: var(--accent); font-size: 20px; }
.workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.queue-panel { grid-column: 1 / -1; }
.queue-panel .panel-heading { align-items: center; }

.server-health, .history-list, .queue-list { display: grid; gap: 6px; }
.health-row, .history-item, .queue-item {
    display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px;
    border-radius: var(--radius-s); background: var(--surface-soft);
}
.health-row strong { overflow: hidden; flex: 1; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.health-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.health-dot.is-online { background: var(--green); }
.health-latency { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.history-artwork, .artwork {
    display: grid; place-items: center; overflow: hidden;
    background: var(--accent-soft); color: var(--accent);
}
.history-artwork { flex: 0 0 38px; width: 38px; height: 38px; border-radius: var(--radius-s); font-size: 15px; }
.artwork { flex: 0 0 76px; width: 76px; height: 76px; border-radius: var(--radius-m); font-size: 28px; }
.history-artwork img, .artwork img { width: 100%; height: 100%; object-fit: cover; }
.history-copy { display: grid; flex: 1; min-width: 0; gap: 1px; }
.history-copy strong, .history-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-copy strong { font-size: 13px; font-weight: 500; }
.history-copy span { color: var(--muted); font-size: 12px; }
.history-type { color: var(--accent); font-size: 11px; font-weight: 600; }
.history-type.is-radio { color: var(--green); }

.state-pill, .queue-count {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px;
    border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; white-space: nowrap;
}
.state-pill .state-dot { background: var(--muted); opacity: .6; }
.state-pill.is-playing { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); color: var(--green); }
.state-pill.is-playing .state-dot { background: var(--green); opacity: 1; }

.now-playing { display: flex; align-items: center; gap: 16px; min-width: 0; }
.track-info { min-width: 0; }
.track-info h3 { overflow: hidden; margin: 2px 0 4px; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.progress-wrap { margin-top: 22px; }
.progress-track { height: 4px; overflow: hidden; border-radius: 9px; background: var(--surface-soft); }
.progress-track progress { display: block; width: 100%; height: 4px; border: 0; appearance: none; background: transparent; }
.progress-track progress::-webkit-progress-bar { background: var(--surface-soft); }
.progress-track progress::-webkit-progress-value { border-radius: 9px; background: var(--accent); }
.progress-track progress::-moz-progress-bar { border-radius: 9px; background: var(--accent); }
.progress-labels { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.transport { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 18px 0 20px; }
.icon-button, .play-button { display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.icon-button { min-width: 32px; height: 34px; font-size: 17px; transition: color .15s; }
.icon-button:hover { color: var(--text); }
.play-button {
    width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
    color: var(--on-accent); font-size: 14px;
    box-shadow: 0 9px 24px color-mix(in srgb, var(--accent) 28%, transparent);
    transition: background .18s, box-shadow .18s, transform .18s;
}
.play-button:hover { background: var(--accent-hover); box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 38%, transparent); transform: scale(1.05); }
.disconnect-button { margin-left: auto; font-size: 20px; }
.disconnect-button:hover { color: var(--red); }

.volume-control { padding-top: 15px; border-top: 1px solid var(--line); }
.volume-control label { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.volume-control strong { color: var(--text); font-weight: 500; }

.song-form { display: grid; gap: 8px; }
.song-form > label { color: var(--muted); font-size: 13px; }
.input-action { display: flex; gap: 8px; }
.song-results { display: grid; gap: 10px; margin-top: 14px; }
.song-results .button { justify-self: start; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { flex: 1; height: 1px; background: var(--line); content: ""; }
.field-grid { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.channel-grid { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.radio-icon { font-size: 16px; }
.bass-control { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.bass-control > div { display: flex; align-items: center; gap: 10px; }
.bass-icon { color: var(--accent); font-size: 22px; }
.bass-control strong, .bass-control small { display: block; }
.bass-control strong { font-size: 13px; font-weight: 600; }
.bass-control small { color: var(--muted); font-size: 12px; }
.bass-control select { padding: 8px 28px 8px 10px; font-size: 12px; }

.queue-empty { margin: 0; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius-s); color: var(--muted); text-align: center; font-size: 13px; }
.queue-number { width: 20px; color: var(--muted); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.queue-item-copy { flex: 1; min-width: 0; }
.queue-item-copy strong, .queue-item-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item-copy strong { font-size: 13px; font-weight: 500; }
.queue-item-copy span, .queue-duration { color: var(--muted); font-size: 12px; }
.queue-duration { margin: 0; font-variant-numeric: tabular-nums; }

.dashboard-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 8px; padding: 22px 2px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.dashboard-footer > span:first-child { color: var(--text); font-weight: 600; }

/* ---------- États ---------- */
.notice { margin: -6px 0 18px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); border-radius: var(--radius-s); background: var(--red-soft); color: var(--red); font-size: 13px; }
.empty-state { padding: 64px 20px; border: 1px dashed var(--line); border-radius: var(--radius-l); text-align: center; }
.empty-icon { color: var(--accent); font-size: 28px; }
.empty-state h2 { margin: 12px 0 6px; }
.empty-state p { max-width: 390px; margin: 0 auto; color: var(--muted); font-size: 13px; }
.toast {
    position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(380px, calc(100% - 48px));
    padding: 12px 16px; border-radius: var(--radius-m);
    background: var(--text); color: var(--bg); box-shadow: 0 12px 32px rgb(0 0 0 / .18); font-size: 13px;
}
.toast.toast-error { background: var(--red); color: #fff; }

/* ---------- Animation (un seul mouvement, désactivable) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .vinyl { animation: spin 24s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .shell { width: min(100% - 32px, 560px); }
    .topbar { height: 60px; }
    .status-link { min-height: 32px; padding: 0 9px; }
    .connection, .nav-link { display: none; }
    .dashboard { padding-top: 26px; }
    .page-heading { align-items: stretch; flex-direction: column; gap: 16px; }
    .server-picker { width: 100%; }
    .overview-grid, .workspace, .mode-card-grid { grid-template-columns: 1fr; }
    .home-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .home-stats-heading { align-items: start; flex-direction: column; }
    .queue-panel { grid-column: auto; }
    .login-screen, .landing-hero { grid-template-columns: 1fr; margin-top: 24px; }
    .login-editorial { padding: 36px 26px 28px; }
    .login-side, .hero-visual { min-height: 260px; }
    .login-logo { width: min(72%, 280px); border-radius: 24px; }
    .login-side::before { width: 250px; height: 250px; }
    .login-side::after { width: 200px; height: 200px; }
    .hero-copy { padding: 36px 26px 12px; }
    .vinyl { width: 180px; height: 180px; }
    .vinyl::before { width: 66px; height: 66px; }
    .orbit { width: 250px; height: 250px; }
    .orbit-two { width: 310px; height: 310px; }
    .listen-section, .features-section { padding-top: 44px; }
    .web-radio-card { flex-wrap: wrap; }
    .radio-info { flex-basis: calc(100% - 90px); }
    .public-station-picker { flex: 1; width: auto; }
    .public-audio { width: 100%; }
    .landing-cta { align-items: start; flex-direction: column; margin-top: 38px; padding: 24px; }
    .media-choice-actions { flex-wrap: wrap; }
    .media-choice-button { flex: 1; }
    .web-radio-controls { grid-template-columns: 1fr; }
    .web-player-container iframe { height: min(366px, 56vw); }
}
@media (max-width: 430px) {
    .shell { width: calc(100% - 28px); }
    .panel { padding: 17px; }
    .input-action { flex-wrap: wrap; }
    .input-action .button { width: 100%; }
    .channel-grid { grid-template-columns: 1fr; }
    .hero-actions { align-items: flex-start; flex-direction: column; gap: 14px; }
    .section-heading > .muted { display: none; }
    .media-choice-button { min-width: 0; }
    .dashboard-footer, .landing-footer { flex-wrap: wrap; }
}