

/* ==========================================================================
   1. VARIABLES & THÈMES (:root)
   ========================================================================== */
:root {
    --accent: #ef4444;
    --accent-soft: rgba(239, 68, 68, 0.14);
    --bg: #f6f7fb;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-soft: rgba(255, 255, 255, 0.75);
    --surface-strong: rgba(255, 255, 255, 0.98);
    --card: rgba(255, 255, 255, 0.78);
    --border: rgba(15, 23, 42, 0.12);
    --text-primary: #0f172a;
    --text-secondary: rgba(15, 23, 42, 0.72);
    --text-muted: rgba(15, 23, 42, 0.55);
    --glass-bg: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(15, 23, 42, 0.08);
    --shadow: 0 40px 120px rgba(15, 23, 42, 0.12);
    --panel: rgba(255, 255, 255, 0.85);
    --panel-border: rgba(15, 23, 42, 0.14);
    --cover-brightness: 1.18;
    --cover-contrast: 1.08;
    --footer-height: 92px;
}

html:not(.dark) {
    background: radial-gradient(circle at 20% -10%, rgba(239, 68, 68, 0.08), transparent 24%), var(--bg);
    color: var(--text-primary);
}

html.dark {
    --bg: #030305;
    --surface: rgba(8, 10, 16, 0.92);
    --surface-soft: rgba(255, 255, 255, 0.05);
    --surface-strong: rgba(255, 255, 255, 0.1);
    --card: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.12);
    --text-primary: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.72);
    --text-muted: rgba(203, 213, 225, 0.65);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    /* Global glassy panel for dark theme: semi-transparent + subtle gradient */
    --panel: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)), rgba(8, 10, 16, 0.56);
    --panel-border: rgba(255, 255, 255, 0.06);
    --cover-brightness: 0.38;
    --cover-contrast: 1;
    --shadow: 0 40px 120px rgba(0, 0, 0, 0.48);
}

/* ==========================================================================
   2. BASES (HTML / BODY)
   ========================================================================== */
html,
body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at 20% -10%, rgba(239, 68, 68, 0.15), transparent 24%), var(--bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior: none;
    contain: layout style;
}

/* ==========================================================================
   3. STRUCTURE DU FEED (Conteneurs & Items)
   ========================================================================== */
.feed-container {
    position: relative;
    height: 100dvh;
    min-height: 100dvh;
    overflow-y: auto;
    scroll-snap-type: y mandatory; /* FIX ÉTAPE 1 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    will-change: transform;
    transform: translateZ(0);
}

.feed-container::-webkit-scrollbar {
    display: none;
}

.feed-item {
    position: relative;
    min-height: 100dvh;
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always; /* FIX ÉTAPE 2 */
    padding-bottom: calc(var(--footer-height) + 2rem + env(safe-area-inset-bottom));
    box-sizing: border-box;
    contain: layout style paint;
    content-visibility: auto;
}

/* Comportement de focus/activation des items */
.feed-item .z-10 {
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.feed-item:not(.active) .z-10 {
    opacity: 0.22;
    transform: translateY(8px) scale(0.995);
}

.feed-item.active .bg-blur-cover {
    filter: blur(36px) brightness(var(--cover-brightness)) contrast(var(--cover-contrast));
    transform: scale(1.03);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.feed-item.active .z-10 {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   4. DESIGN DU PLAYER & VISUELS (Vinyl, Cover Blur)
   ========================================================================== */
.bg-blur-cover {
    position: absolute;
    inset: -40px;
    background-color: #030305;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: blur(36px) saturate(1.12) contrast(1.14) brightness(1.08);
    z-index: 1;
    transform: scale(1.1);
    transition: background-image 0.6s ease-in-out, filter 0.6s ease;
}

/* In light mode, the cover belongs to the vinyl, not to the whole scene. */
html:not(.dark) .bg-blur-cover {
    background-color: #f8f9fc;
    background-blend-mode: luminosity;
    filter: blur(28px) saturate(0.45) contrast(0.9) brightness(1.08);
    transform: scale(1.04);
    opacity: 1;
    mix-blend-mode: multiply;
}

html:not(.dark) .bg-blur-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.94), transparent 34%),
        linear-gradient(145deg, rgba(248, 249, 252, 0.82), rgba(236, 239, 244, 0.88));
    pointer-events: none;
}

html:not(.dark) .feed-item.active .bg-blur-cover {
    filter: blur(28px) saturate(0.45) contrast(0.9) brightness(1.08);
    transform: scale(1.04);
}

html:not(.dark) .feed-item .vinyl-glow {
    border-color: rgba(15, 23, 42, 0.16);
    background-color: rgba(255, 255, 255, 0.62);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.vinyl-glow {
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.15);
    animation: rotateVinyl 20s linear infinite;
}

@keyframes rotateVinyl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: counterRotate 20s linear infinite;
}

.play-overlay .material-symbols-outlined {
    background: rgba(0, 0, 0, 0.45);
    padding: 0.6rem;
    border-radius: 999px;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.play-overlay:not(.playing) .material-symbols-outlined {
    animation: shimmerPulse 1.6s ease-in-out infinite alternate;
}

.play-overlay.playing .material-symbols-outlined {
    background: rgba(239, 68, 68, 0.95);
    box-shadow: 0 0 38px rgba(239, 68, 68, 0.55);
}

@keyframes shimmerPulse {
    from { transform: scale(1); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); }
    to { transform: scale(1.06); box-shadow: 0 12px 40px rgba(239, 68, 68, 0.35); }
}

@keyframes counterRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* ==========================================================================
   5. NAVIGATION DESKTOP & TOP BAR
   ========================================================================== */
.desktop-feed-nav-buttons {
    display: none;
    position: fixed;
    right: 1.5rem;
    top: 46%;
    transform: translateY(-10%);
    z-index: 55;
    flex-direction: column;
    gap: 0.9rem;
    pointer-events: auto;
}

.desktop-feed-nav-button {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    opacity: 1;
    visibility: visible;
}

.desktop-feed-nav-button.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px) scale(0.94);
}

.desktop-feed-nav-button:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.28);
}

.desktop-feed-nav-button:active {
    transform: translateY(0);
}

.desktop-feed-nav-button .material-symbols-outlined {
    font-size: 1.5rem;
}

@media (min-width: 1024px) {
    .desktop-feed-nav-buttons { display: flex; }
}

.top-bar-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.home-topbar {
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
}

/* Critical header layout to avoid FOUC when Tailwind is deferred */
.topbar-crit { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar-back-column { position: relative; align-self: flex-start; }
.topbar-live-room-trigger {
    position: absolute;
    top: 54px;
    left: 0;
    z-index: 2;
    width: 44px;
    height: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(255, 255, 255, 0.055));
    color: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    font: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    pointer-events: auto;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.topbar-live-room-trigger:hover,
.topbar-live-room-trigger[aria-expanded="true"] {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.27), rgba(255, 255, 255, 0.09));
    color: rgba(255, 255, 255, 0.9);
}
.live-room-equalizer { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.live-room-equalizer i { width: 2px; display: block; border-radius: 999px; background: #f87171; transform: scaleY(0.55); transform-origin: center; animation: liveRoomSpectrum 760ms ease-in-out infinite alternate; }
.live-room-equalizer i:nth-child(1) { height: 8px; animation-delay: -0.18s; }
.live-room-equalizer i:nth-child(2) { height: 14px; animation-delay: -0.52s; }
.live-room-equalizer i:nth-child(3) { height: 10px; animation-delay: -0.34s; }
.live-room-equalizer i:nth-child(4) { height: 6px; animation-delay: -0.08s; }
@keyframes liveRoomSpectrum { from { opacity: 0.65; transform: scaleY(0.35); } to { opacity: 1; transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
    .live-room-equalizer i { animation: none; transform: scaleY(0.72); }
}

.live-room-notice {
    position: absolute;
    top: 108px;
    left: 0;
    z-index: 3;
    width: min(300px, calc(100vw - 2rem));
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045)), rgba(12, 14, 22, 0.54);
    color: var(--text-primary);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(42px) saturate(155%);
    -webkit-backdrop-filter: blur(42px) saturate(155%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.2s ease;
    pointer-events: none;
}
.live-room-notice.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.live-room-notice-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.live-room-notice-kicker { margin: 0 0 0.35rem; color: #ff9898; font-size: 0.57rem; font-weight: 900; letter-spacing: 0.17em; }
.live-room-notice-title { margin: 0; color: var(--text-primary); font-size: 1rem; font-weight: 900; line-height: 1.2; }
.live-room-notice-copy { margin: 0.6rem 0 0.9rem; color: var(--text-secondary); font-size: 0.78rem; line-height: 1.5; }
.live-room-notice-close { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.75); cursor: pointer; }
.live-room-notice-close .material-symbols-outlined { font-size: 1rem; }
.live-room-notice-cta { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.55rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 13px; background: linear-gradient(135deg, #f05252, #dc3545); color: #fff; box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25); font-size: 0.78rem; font-weight: 900; text-decoration: none; transition: transform 0.2s ease, filter 0.2s ease; }
.live-room-notice-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.live-room-notice-cta .material-symbols-outlined { font-size: 1rem; }

html:not(.dark) .live-room-notice {
    border-color: rgba(255, 255, 255, 0.74);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48)), rgba(245, 247, 250, 0.58);
    color: var(--text-primary);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}
html:not(.dark) .live-room-notice-kicker { color: #c2414f; }
html:not(.dark) .live-room-notice-close { border-color: rgba(15, 23, 42, 0.12); background: rgba(15, 23, 42, 0.055); color: rgba(15, 23, 42, 0.72); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .live-room-notice { background: rgba(12, 14, 22, 0.94); }
    html:not(.dark) .live-room-notice { background: rgba(248, 249, 252, 0.97); }
}

    /* Ensure Tailwind 'hidden' utility works before CDN loads */
    .hidden { display: none !important; }
.topbar-crit .flex-1 { flex: 1 1 auto; min-width: 0; }
.topbar-crit .pointer-events-auto { pointer-events: auto; }
/* While in preload state, show a stable skeleton for header to prevent jumps */
.preload #header { visibility: visible; }
.preload .topbar-crit .top-bar-btn { width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; background: rgba(255,255,255,0.04); color: transparent; border-color: rgba(255,255,255,0.06); }
.preload .topbar-crit .top-bar-btn.top-bar-action { min-width:120px; width:96px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.preload .topbar-crit .top-bar-btn svg { visibility: hidden; }
.preload .topbar-crit .top-bar-text, .preload .topbar-crit .top-bar-text-top, .preload .topbar-crit .top-bar-text-bottom { visibility: hidden; }
.preload .topbar-crit .top-bar-btn::after { content: ''; display: block; width: 60%; height: 10px; background: rgba(255,255,255,0.06); border-radius: 6px; margin-top: 4px; }
.preload .topbar-crit * { transition: none !important; transform: none !important; }
.preload #header, .preload .fixed { will-change: auto; }

.top-bar-btn svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.top-bar-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-2px) scale(1.08);
}

.top-bar-btn:active {
    transform: translateY(0) scale(0.98);
}

.top-bar-btn.top-bar-action {
    width: auto;
    min-width: 120px;
    padding: 0 1rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fff;
}

/* Force stable dimensions for action pill to avoid layout shifts */
.top-bar-btn.top-bar-action {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 96px !important;
    height: 44px !important;
    padding: 0.4rem 0.6rem !important;
}

.top-bar-btn.top-bar-action svg {
    width: 1.1rem;
    height: 1.1rem;
    color: #fff;
}

.top-bar-text {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* Two-line layout for top-bar action pills (For / Artists) */
.top-bar-text-top {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1;
    margin: 0;
}
.top-bar-text-bottom {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    line-height: 1.05;
    margin: 0;
}

    @media (max-width: 700px) {
        .top-bar-btn.top-bar-action {
            flex-direction: column;
            align-items: center;
            gap: 0.25rem;
            padding: 0.65rem 0.9rem;
            min-width: 96px;
        }
        .top-bar-text {
            display: block;
            font-size: 0.76rem;
            line-height: 1.15;
        }
    }

.premium-dock-inner {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    overflow-x: visible;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

.premium-dock-inner::-webkit-scrollbar {
    display: none;
}

.fixed.bottom-0.left-0.right-0.z-50 {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
}

.premium-dock {
    width: min(100%, 680px);
    max-width: 680px;
    margin: 0 auto;
    padding: 0.25rem 0.25rem calc(env(safe-area-inset-bottom) + 0.25rem);
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 999px;
}

.dock-btn svg, 
.dock-btn .material-symbols-outlined {
    display: block;
}

.offline-icon {
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 1.4rem;
    overflow: visible;
    color: currentColor;
}

.desktop-feed-nav-button .offline-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-basis: 1.5rem;
}

.dock-btn .dock-label {
    display: inline;
}

.dock-btn {
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border);
    color: #eef2f7;
    box-shadow: none;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
}

.dock-btn.dock-pill {
    width: auto;
    min-width: auto;
    padding: 0 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    background: var(--glass-bg);
    border-color: var(--border);
    color: #eef2f7;
}

.dock-btn.dock-pill:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.42);
}

.dock-btn.icon-only {
    flex: 0 0 auto;
}

.dock-btn.active {
    background: var(--glass-bg);
    border-color: rgba(255,255,255,0.42);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 0 18px rgba(255,255,255,0.14);
}

.dock-btn:hover {
    transform: translateY(-2px) scale(1.08);
    background: linear-gradient(135deg, rgba(245,248,250,0.38), rgba(30,34,43,0.90));
    border-color: rgba(255,255,255,0.70);
}

.dock-btn .material-symbols-outlined {
    font-size: 1.35rem;
    color: #eef2f7 !important;
}

.dock-btn .dock-label {
    color: #fff !important;
}

.dock-btn:not(.dock-pill) .material-symbols-outlined,
.dock-btn:not(.dock-pill) {
    color: #eef2f7 !important;
}

.dock-btn .dock-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.36);
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    display: none;
    animation: dock-loader-spin 640ms linear infinite;
}

.dock-btn.loading .dock-loader {
    display: block;
}

.dock-btn.loading .material-symbols-outlined {
    opacity: 0;
    transform: scale(0.62);
}

.dock-btn:focus,
.dock-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.32), 0 0 0 4px rgba(239,68,68,0.12), inset 0 0 9px rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.36);
}

.dock-btn:active {
    transform: translateY(0px) scale(0.98);
}

/* Secondary floating control: same footprint as the feed artist avatar. */
.secondary-floating-menu {
    position: fixed;
    right: 1rem;
    bottom: calc(var(--footer-height) + 6.75rem + env(safe-area-inset-bottom));
    z-index: 55;
    display: flex;
    align-items: center;
    gap: 10px;
}

.secondary-floating-menu-actions {
    position: absolute;
    right: 0;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.secondary-floating-menu-actions[aria-hidden="false"] {
    pointer-events: auto;
}

.secondary-floating-menu-action,
.secondary-floating-menu-button,
.secondary-floating-like-button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-strong);
    color: var(--text-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), inset 0 0 0 1px var(--glass-border);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.secondary-floating-menu-button {
    background: var(--accent);
    background: color-mix(in srgb, var(--accent) 78%, #000 22%);
    border-color: color-mix(in srgb, var(--accent) 48%, #fff 52%);
    color: #fff;
    box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 22px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.secondary-floating-like-button {
    position: relative;
    color: var(--accent);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.secondary-floating-like-button.is-loading {
    cursor: wait;
    pointer-events: none;
}

.secondary-floating-like-button.is-loading .offline-icon {
    opacity: 0;
}

.secondary-floating-like-button.is-loading::after {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: dock-loader-spin 640ms linear infinite;
}

.secondary-floating-like-button.is-liked {
    background: #ef3340;
    border-color: #c81e32;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(239, 51, 64, 0.24), 0 8px 20px rgba(0, 0, 0, 0.24);
}

.secondary-floating-like-button.is-liked .offline-icon {
    fill: currentColor;
}

.secondary-floating-like-button.is-unavailable {
    cursor: pointer;
    opacity: 0.55;
}

.secondary-floating-menu-action {
    opacity: 0;
    transform: translateY(8px) scale(0.72);
    pointer-events: none;
}

.secondary-floating-menu-actions[aria-hidden="false"] .secondary-floating-menu-action {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.secondary-floating-menu-action:nth-child(1) { transition-delay: 40ms; }
.secondary-floating-menu-action:nth-child(2) { transition-delay: 80ms; }
.secondary-floating-menu-action:nth-child(3) { transition-delay: 120ms; }
.secondary-floating-menu-action:nth-child(4) { transition-delay: 160ms; }

.secondary-floating-menu-button .offline-icon,
.secondary-floating-menu-action .offline-icon,
.secondary-floating-like-button .offline-icon {
    width: 17px;
    height: 17px;
}

.secondary-floating-menu-button:hover,
.secondary-floating-menu-button:focus-visible,
.secondary-floating-menu-action:hover,
.secondary-floating-menu-action:focus-visible,
.secondary-floating-like-button:not(:disabled):hover,
.secondary-floating-like-button:not(:disabled):focus-visible {
    transform: translateY(-2px) scale(1.06);
    background: color-mix(in srgb, var(--surface-strong) 76%, var(--accent) 24%);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 3px var(--accent-soft);
}

.secondary-floating-like-button.is-liked:not(:disabled):hover,
.secondary-floating-like-button.is-liked:not(:disabled):focus-visible {
    background: #dc2638;
    border-color: #b91c2c;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(239, 51, 64, 0.28), 0 10px 24px rgba(0, 0, 0, 0.3);
}

.secondary-floating-menu-button:hover,
.secondary-floating-menu-button:focus-visible {
    background: color-mix(in srgb, var(--accent) 70%, #000 30%);
    border-color: color-mix(in srgb, var(--accent) 38%, #fff 62%);
    color: #fff;
    box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 24px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.secondary-floating-like-button:not(:disabled):hover,
.secondary-floating-like-button:not(:disabled):focus-visible {
    background: color-mix(in srgb, var(--surface-strong) 76%, var(--accent) 24%);
    border-color: var(--accent);
    color: var(--accent);
}

.secondary-floating-menu-button:active {
    transform: translateY(0) scale(0.96);
}

.secondary-floating-like-button:not(:disabled):active {
    transform: translateY(0) scale(0.96);
}

.secondary-floating-menu-action:active {
    transform: translateY(0) scale(0.96) !important;
}

.secondary-panel-shell {
    position: fixed;
    right: calc(1rem + 32px + 12px);
    bottom: calc(var(--footer-height) + 1.5rem + env(safe-area-inset-bottom));
    z-index: 54;
    display: block;
    pointer-events: none;
    visibility: hidden;
}

.secondary-panel-shell.open {
    pointer-events: auto;
    visibility: visible;
}

.secondary-panel-backdrop {
    position: absolute;
    display: none;
}

.secondary-panel-card {
    position: relative;
    width: min(292px, calc(100vw - 5rem));
    max-height: min(360px, calc(100dvh - 2rem));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    background:
        radial-gradient(circle at 92% 0%, rgba(255, 77, 122, 0.18), transparent 34%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
        rgba(8, 10, 16, 0.84);
    backdrop-filter: blur(34px) saturate(145%);
    -webkit-backdrop-filter: blur(34px) saturate(145%);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    transform: translateX(14px) scale(0.96);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    pointer-events: auto;
}

.secondary-panel-shell.open .secondary-panel-card {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.secondary-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.secondary-panel-eyebrow {
    margin: 0 0 0.35rem;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.secondary-panel-title {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.secondary-panel-close {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
}

.secondary-panel-content {
    overflow-y: auto;
    padding: 0.7rem 0.9rem 0.9rem;
    scrollbar-width: thin;
}

.secondary-panel-list-card {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    box-sizing: border-box;
    padding: 0.65rem 0.7rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.055);
    color: #fff;
    text-align: left;
}

.secondary-panel-list-card > .material-symbols-outlined:first-child {
    color: #ff7394;
    font-size: 1.2rem;
}

.secondary-panel-list-card div {
    min-width: 0;
    flex: 1;
}

.secondary-panel-list-card strong,
.secondary-panel-list-card span:not(.material-symbols-outlined) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.secondary-panel-list-card strong {
    font-size: 0.84rem;
    font-weight: 800;
}

.secondary-panel-list-card span:not(.material-symbols-outlined) {
    margin-top: 0.18rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.7rem;
}

.secondary-panel-list-button {
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.secondary-panel-list-button:hover,
.secondary-panel-list-button:focus-visible {
    border-color: rgba(255, 115, 148, 0.44);
    background: rgba(255, 115, 148, 0.1);
    transform: translateX(-2px);
}

.secondary-panel-list-button .arrow {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.52);
}

.secondary-history-card {
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.secondary-history-card:hover,
.secondary-history-card:focus-within {
    border-color: rgba(255, 115, 148, 0.44);
    background: rgba(255, 115, 148, 0.1);
    transform: translateX(-2px);
}

.secondary-history-cover {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255, 71, 119, 0.7), rgba(255, 139, 93, 0.55));
    background-position: center;
    background-size: cover;
}

.secondary-history-cover > .material-symbols-outlined {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.secondary-history-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    opacity: 0.92;
    cursor: pointer;
    transition: opacity 0.18s ease;
}

.secondary-history-card:hover .secondary-history-play,
.secondary-history-card:focus-within .secondary-history-play {
    opacity: 1;
}

.secondary-history-play .material-symbols-outlined {
    font-size: 1.25rem;
}

.secondary-current-track-action {
    overflow: hidden;
    background-position: center;
    background-size: cover;
    position: relative;
}

.secondary-current-track-action::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 71, 119, 0.42), rgba(8, 10, 16, 0.58));
}

.secondary-current-track-action > * {
    position: relative;
    z-index: 1;
}

.secondary-current-track-action.has-track {
    border-color: rgba(255, 115, 148, 0.72);
    box-shadow: 0 0 18px rgba(255, 71, 119, 0.22);
}

.secondary-current-track-action.has-cover > .material-symbols-outlined {
    display: none;
}

.secondary-current-track-action.is-playing .material-symbols-outlined {
    color: #ff9ab2;
}

.secondary-current-track-card {
    display: grid;
    gap: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
}

.secondary-current-track-art {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 71, 119, 0.72), rgba(255, 139, 93, 0.52));
    background-position: center;
    background-size: cover;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.secondary-current-track-card h3,
.secondary-current-track-card p {
    margin: 0;
}

.secondary-current-track-card h3 {
    overflow: hidden;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.secondary-current-track-card p {
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.8rem;
}

.secondary-current-track-controls {
    display: flex;
    gap: 0.55rem;
}

.secondary-current-track-controls button {
    min-height: 38px;
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
}

.secondary-current-track-controls button.primary {
    background: linear-gradient(135deg, #ff4777, #ff8b5d);
    border-color: transparent;
}

.secondary-panel-hero {
    margin-bottom: 0.7rem;
    padding: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
}

.secondary-panel-hero-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.45rem;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff4777, #ff8b5d);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 71, 119, 0.25);
}

.secondary-panel-hero h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.secondary-panel-hero p {
    display: none;
}

.secondary-panel-empty {
    padding: 1.4rem 0.75rem;
    color: rgba(255, 255, 255, 0.56);
    text-align: center;
}

.secondary-panel-empty .material-symbols-outlined {
    display: block;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.42);
    font-size: 2.4rem;
}

@media (max-width: 640px) {
    .secondary-panel-shell {
        right: calc(0.75rem + 32px + 10px);
        bottom: calc(var(--footer-height) + 4.25rem + env(safe-area-inset-bottom));
    }

    .secondary-panel-card {
        width: min(270px, calc(100vw - 4.5rem));
        max-height: min(340px, calc(100dvh - var(--footer-height) - 2rem));
        border-radius: 20px;
    }
}

.dock-btn.dock-press-bounce {
    animation: dock-long-bounce 420ms cubic-bezier(.2,.9,.2,1.12) both;
}

@keyframes dock-loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes dock-long-bounce {
    0% { transform: scale(1); }
    20% { transform: scale(1.10); }
    45% { transform: scale(0.96); }
    65% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

@keyframes elastic-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.08); }
    55% { transform: scale(0.96); }
    75% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Responsive Dock */
@media (max-width: 640px) {
    .premium-dock { border-radius: 999px; padding-bottom: calc(env(safe-area-inset-bottom) + 0.5rem); }
    .premium-dock-inner { gap: 1.25rem; overflow-x: visible; white-space: nowrap; justify-content: center; }
    .dock-btn { min-width: 0; flex: 0 0 auto; }
    .dock-btn.dock-pill { min-width: 0; }
    .dock-btn.bg-red-600 { min-width: 0; max-width: 140px; margin-left: 0; }
    .dock-btn .dock-label { display: none; }
    .dock-btn.icon-only { flex: 0 0 auto; }
    .dock-btn.dock-pill.icon-only.ai-chat-button { padding: 0.5rem; }
    .dock-btn.dock-pill.icon-only.ai-chat-button .dock-label { display: none; }
    .premium-dock-inner .dock-btn:not(.bg-red-600) .material-symbols-outlined {
        padding: 0;
        width: auto;
        min-width: 0;
        height: auto;
        min-height: 0;
        box-sizing: border-box;
    }
    .dock-btn.dock-pill.icon-only.ai-chat-button {
        min-width: 44px;
        width: 44px;
        padding: 0;
        justify-content: center;
    }
    .dock-btn.dock-pill.icon-only.ai-chat-button .material-symbols-outlined {
        font-size: 1.4rem;
    }
}

/* ==========================================================================
   7. MÉTADONNÉES DE LA PISTE (Track Meta)
   ========================================================================== */
.track-meta {
    position: absolute;
    left: 6rem;
    right: auto;
    bottom: calc(var(--footer-height) + 1.5rem + env(safe-area-inset-bottom));
    z-index: 10;
    max-width: min(82vw, 760px);
    pointer-events: none;
}

.track-meta > div {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.track-meta > div > button:first-child {
    flex: 0 1 auto;
    min-width: max-content;
}

.track-meta button {
    min-width: 0;
}

.track-meta .artist-button {
    min-width: 0;
    max-width: min(52vw, 440px);
    flex: 1 1 auto;
}

.track-meta .artist-button,
.track-meta .artist-button:hover,
.track-meta .artist-button:focus-visible,
.track-meta .artist-button .artist-label,
.track-meta .artist-button .artist-name {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

.track-meta .artist-button .artist-label {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    min-width: 0;
}

.track-meta .artist-button .artist-name {
    display: inline-block;
    min-width: 0;
    max-width: min(15ch, 28vw);
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: nowrap;
}

.track-meta .artist-button .artist-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.track-meta .btn-follow {
    flex: 0 0 116px;
    width: 116px;
    min-width: 116px;
    max-width: 116px;
    white-space: nowrap;
    pointer-events: auto;
    margin-left: 0 !important;
    box-sizing: border-box;
    padding: 0.38rem 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-meta .pointer-events-auto {
    pointer-events: auto;
}

/* ==========================================================================
   8. TOP BAR ACTIONS
   ========================================================================== */
.top-bar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.top-bar-text {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-primary);
    white-space: normal;
    text-align: center;
}

@media (max-width: 640px) {
    .top-bar-btn.top-bar-action {
        white-space: normal;
        padding: 0.65rem 0.85rem;
        min-width: 72px;
    }
    .top-bar-text {
        display: block;
        font-size: 0.72rem;
        line-height: 1.1;
        letter-spacing: 0.12em;
    }
    .top-bar-btn.top-bar-action svg {
        margin-bottom: 0.12rem;
    }
}

/* ==========================================================================
   9. INTERFACES MODALES & RECHERCHE PREMIUM
   ========================================================================== */
/* Menu Premium */
.premium-menu {
    position: fixed;
    top: 74px;
    right: 18px;
    z-index: 60;
    display: none;
    align-items: flex-start;
    justify-content: flex-end;
    pointer-events: none;
}

.premium-menu.open {
    display: flex;
    pointer-events: auto;
}

.premium-menu-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    pointer-events: auto;
}

.premium-menu-panel {
    position: relative;
    width: min(100%, 320px);
    margin: 0;
    border-radius: 24px;
    /* softer, more transparent glassy panel for the menu */
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)), rgba(8, 10, 16, 0.44);
    /* stronger blur + slight saturation for a cleaner glass look */
    backdrop-filter: blur(42px) saturate(150%);
    -webkit-backdrop-filter: blur(42px) saturate(150%);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    overflow: hidden;
    transform: translateY(-8px) scale(0.98);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    max-height: calc(100vh - 120px);
}

.premium-menu.open .premium-menu-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Reduce heavy backdrop effects on small screens for performance and legibility */
@media (max-width: 640px) {
    .premium-menu-panel {
        backdrop-filter: blur(38px) saturate(145%);
        -webkit-backdrop-filter: blur(38px) saturate(145%);
        background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)), rgba(8, 10, 16, 0.46);
        box-shadow: 0 24px 68px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.07);
    }
}

html:not(.dark) .premium-menu-panel {
    background:
        radial-gradient(circle at 78% 4%, rgba(255,255,255,0.52), transparent 28%),
        radial-gradient(circle at 30% 110%, rgba(233,230,220,0.38), transparent 38%),
        linear-gradient(135deg, rgba(250,248,245,0.68), rgba(236,233,227,0.5));
    backdrop-filter: blur(42px) saturate(145%);
    -webkit-backdrop-filter: blur(42px) saturate(145%);
    border: 1px solid rgba(255,255,255,0.82);
    box-shadow: 0 30px 120px rgba(15, 23, 42, 0.20), inset 0 1px 0 rgba(255,255,255,0.92), inset 0 -1px 0 rgba(190,188,178,0.14);
    color: var(--text-primary);
}

html:not(.dark) .premium-menu-panel .premium-menu-title p {
    color: var(--text-secondary) !important;
}

html:not(.dark) .premium-menu-panel .premium-menu-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding-bottom: 12px;
}

html:not(.dark) .premium-menu-panel .premium-menu-actions {
    gap: 14px;
}

html:not(.dark) .premium-menu-panel button {
    background: linear-gradient(180deg, rgba(255,255,253,0.98), rgba(235,232,225,0.96));
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: var(--text-primary);
    box-shadow: inset 0 1px rgba(255,255,255,0.98), 0 9px 20px rgba(15, 23, 42, 0.07), 0 0 0 1px rgba(255,255,255,0.80);
}

html:not(.dark) .premium-menu-panel button:hover {
    background: linear-gradient(180deg, rgba(248,246,243,0.99), rgba(222,219,213,0.95));
    color: var(--text-primary);
}

html:not(.dark) .premium-menu-close {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(232,230,224,0.96));
    color: var(--text-primary) !important;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: inset 0 1px rgba(255,255,255,0.98), 0 8px 18px rgba(15, 23, 42, 0.08);
}

html:not(.dark) .menu-theme-toggle {
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(238,235,230,0.96));
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: inset 0 1px rgba(255,255,255,0.98), 0 8px 16px rgba(15, 23, 42, 0.07);
}

html:not(.dark) .menu-theme-toggle .theme-toggle-knob {
    background: rgba(31, 34, 40, 0.96);
}

html:not(.dark) .menu-theme-toggle .theme-toggle-knob .material-symbols-outlined {
    color: #ffffff !important;
}

html:not(.dark) .premium-menu-panel .grid.gap-3 > button {
    border-radius: 18px;
    min-height: 54px;
    padding: 0 18px;
    background: linear-gradient(180deg, rgba(255,255,252,0.98), rgba(230,228,222,0.96));
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: inset 0 1px rgba(255,255,255,0.96), 0 12px 22px rgba(15, 23, 42, 0.07);
}

.premium-menu-header {
    min-width: 0;
}

.premium-menu-title {
    min-width: 54px;
    flex: 0 0 auto;
}

.premium-menu-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex: 1 1 auto;
    margin-left: auto;
}

.menu-theme-toggle {
    width: 58px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.premium-menu-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    margin-left: 10px;
    line-height: 1;
}

.premium-menu-close:hover {
    background: rgba(255,255,255,0.08);
}

/* Recherche Premium */
.premium-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.premium-search-overlay.open {
    display: flex;
    pointer-events: auto;
}

.premium-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 16, 0.62);
    backdrop-filter: blur(18px);
}

.premium-search-panel {
    position: relative;
    margin: 1.4rem auto;
    width: min(calc(100vw - 2.8rem), 460px);
    max-width: calc(100vw - 2.8rem);
    max-height: calc(100vh - 3rem);
    overflow: hidden;
    overflow-x: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    box-sizing: border-box;
}

.premium-search-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%);
    pointer-events: none;
}

.premium-search-panel .search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.4rem 0.75rem;
}

.premium-search-panel .search-title {
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.premium-search-input-wrapper {
    position: relative;
    padding: 0 1.4rem 1rem;
}

.premium-search-input-wrapper .material-symbols-outlined {
    position: absolute;
    left: 1.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.62);
    font-size: 1.1rem;
    pointer-events: none;
}

.premium-search-input {
    width: 100%;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1rem 1.25rem 1rem 3.4rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.premium-search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.premium-search-input:focus {
    border-color: rgba(239, 68, 68, 0.72);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
    background: rgba(255, 255, 255, 0.12);
}

.premium-search-stats {
    padding: 0 1.4rem 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.premium-search-results {
    display: grid;
    gap: 0.95rem;
    padding: 0 1.4rem 1.4rem;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 250px);
    scrollbar-width: thin;
    scrollbar-color: rgba(248, 113, 113, 0.9) rgba(255, 255, 255, 0.06);
    min-width: 0;
}

.premium-search-results::-webkit-scrollbar { width: 12px; }
.premium-search-results::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); margin: 0.5rem 0; }
.premium-search-results::-webkit-scrollbar-corner { background: transparent; }

@media (min-width: 1024px) {
    .premium-search-results { padding-right: 3.4rem; }
}

.premium-search-results::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.95), rgba(244, 63, 94, 0.85));
    border-radius: 999px;
    border: 3px solid rgba(18, 22, 42, 0.98);
    min-height: 52px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 18px rgba(248, 113, 113, 0.18);
}

.premium-search-results::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(248, 113, 113, 1), rgba(236, 72, 153, 0.95));
}

.premium-search-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    min-height: 78px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.premium-search-card:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.premium-search-card img, 
.premium-search-card .search-avatar {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.premium-search-card .search-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.premium-search-card .search-title {
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #fff;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.premium-search-card .search-subtitle {
    margin: 0.22rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.premium-search-card .search-meta {
    margin-top: 0.38rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.premium-search-card .search-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.premium-search-card .search-meta .material-symbols-outlined {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 640px) {
    .premium-search-panel { width: calc(100% - 1.5rem); margin: 0.75rem; max-height: calc(100vh - 1.5rem); }
    .premium-search-results { max-height: calc(100vh - 250px); }
}

/* Modales d'interactions Bloquantes (Premium CTA Scroll) */
.premium-scroll-cta {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    pointer-events: none;
}

.premium-scroll-cta.open {
    display: flex;
    pointer-events: auto;
}

.premium-scroll-cta-backdrop {
    display: none;
}

.premium-scroll-cta-panel {
    position: relative;
    width: min(100%, 960px);
    background: rgba(10, 11, 22, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 1rem 1.1rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #fff;
}

.premium-scroll-cta-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.premium-scroll-cta-copy h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.premium-scroll-cta-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
    font-size: 0.92rem;
}

.premium-scroll-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
}

.premium-scroll-cta button {
    min-width: 130px;
    border-radius: 999px;
    border: none;
    padding: 0.85rem 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.premium-scroll-cta .btn-primary {
    background: #ef4444;
    color: #fff;
}

.premium-scroll-cta .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.premium-scroll-cta button:hover {
    transform: translateY(-1px);
}

.feed-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 100dvh;
    box-sizing: border-box;
}

.soft-cta-card {
    width: min(100%, 680px);
    max-width: 720px;
    background: rgba(12, 14, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.26);
    text-align: center;
    color: #f8fafc;
    backdrop-filter: blur(20px);
}

.soft-cta-label {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: #ff9aa3;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}

.soft-cta-card h2 {
    margin: 0;
    font-size: clamp(1.8rem, 2.2vw, 2.8rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.soft-cta-copy {
    margin: 1rem auto 1.5rem;
    max-width: 46rem;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
    font-size: 1rem;
}

.soft-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.soft-cta-actions button {
    min-width: 165px;
    padding: 0.95rem 1.25rem;
    border-radius: 999px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.soft-cta-primary {
    background: #ef4444;
    color: #fff;
}

.soft-cta-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.soft-cta-actions button:hover {
    transform: translateY(-1px);
}

.soft-cta-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.95rem;
}

.soft-cta-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.soft-cta-confetti-piece {
    position: absolute;
    top: 10%;
    width: 9px;
    height: 20px;
    border-radius: 999px;
    opacity: 0.95;
    animation: softCtaConfetti 1.1s ease-out forwards;
}

.soft-cta-confetti-exit .soft-cta-confetti-piece {
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes softCtaConfetti {
    0% {
        transform: translateY(0) scale(0.8) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(220px) translateX(20px) scale(1) rotate(360deg);
        opacity: 0;
    }
}

.theme-toggle {
    backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
}

.theme-toggle-knob {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--surface-strong);
    position: absolute;
    top: 3px;
    left: 3px;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .theme-toggle-knob {
    left: 29px;
    background: var(--surface-strong);
}

.theme-toggle-knob .material-symbols-outlined {
    font-size: 14px;
    color: var(--text-primary);
}

/* ==========================================================================
   11. ÉTATS DE CHARGEMENT & AGENCEMENT (Loading / Empty States)
   ========================================================================== */
.feed-loading-state {
    position: absolute;
    inset: 0;
    min-height: 100dvh;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(7, 8, 13, 0.40);
    backdrop-filter: blur(28px);
    z-index: 9999;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.feed-loading-state.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.feed-loading-panel {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    background: rgba(9, 10, 14, 0.44);
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feed-loading-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100dvh;
    gap: 1.5rem;
    padding: 3rem 1.5rem calc(var(--footer-height) + 2rem + env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.feed-loading-copy {
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
}

.feed-loading-title {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 0.45rem;
}

.feed-loading-subtext {
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 34rem;
}

.feed-loading-hero {
    display: grid;
    place-items: center;
    gap: 1rem;
    width: 100%;
}

.skeleton-circle {
    width: 256px;
    height: 256px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 4px solid rgba(255, 255, 255, 0.10);
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.skeleton-line {
    width: 100%;
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.skeleton-line::before,
.skeleton-circle::before,
.skeleton-avatar::before,
.skeleton-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.18) 45%, rgba(255, 255, 255, 0.05) 100%);
    transform: translateX(-120%);
    animation: skeletonShimmer 1.6s ease-in-out infinite;
}

.line-xl { max-width: 76%; height: 20px; }
.line-lg { max-width: 64%; height: 18px; }
.line-md { max-width: 52%; }
.line-sm { max-width: 38%; }

.feed-loading-info {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 14rem;
    justify-items: center;
}

.feed-loading-meta {
    position: absolute;
    left: 1.5rem;
    bottom: calc(var(--footer-height) + 1.5rem + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: calc(100% - 3rem);
}

.skeleton-avatar {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.feed-loading-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.skeleton-pill {
    width: 180px;
    height: 46px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.skeleton-pill.short {
    width: 110px;
}

@media (max-width: 720px) {
    .feed-loading-panel {
        padding: 0;
        min-height: calc(100dvh - calc(var(--footer-height) + 1.5rem + env(safe-area-inset-bottom)));
    }
    .skeleton-circle {
        width: 224px;
        height: 224px;
    }
    .feed-loading-stage {
        gap: 1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@keyframes skeletonShimmer {
    100% { transform: translateX(120%); }
}

.feed-loading-link {
    color: #fb7185;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.feed-loading-link:hover {
    border-color: #fb7185;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.status-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 65;
    background: rgba(12, 14, 24, 0.96);
    color: #f8fafc;
    text-align: center;
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
    line-height: 1.4;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.status-banner.hidden {
    display: none;
}

.offline-playback-toast {
    position: fixed;
    top: calc(0.75rem + env(safe-area-inset-top));
    left: 50%;
    z-index: 80;
    width: min(calc(100vw - 2rem), 420px);
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(18, 20, 28, 0.94);
    color: #f8fafc;
    font-size: 0.82rem;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    transform: translate(-50%, -140%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.offline-playback-toast.visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.feed-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    color: #f8fafc;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    pointer-events: none;
    z-index: 10;
}

.feed-empty-state.hidden {
    display: none;
}

.feed-empty-state p {
    margin: 0 0 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.feed-empty-state button {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.feed-empty-state button:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

/* ==========================================================================
   12. SÉLECTEURS DE POLICES & MICRO-CLASSES (Icones, Muted)
   ========================================================================== */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
    font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 32;
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    min-width: 1.4rem;
    height: 1.4rem;
    min-height: 1.4rem;
    text-align: center;
    white-space: nowrap;
}

.icon-muted { color: #cbd5e1; }
.icon-active { color: #ef4444; }

/* ==========================================================================
   13. SURCHARGES MODE CLAIR :not(.dark)
   ========================================================================== */
html:not(.dark) .dock-btn:not(.bg-red-600) {
    background-color: rgba(15, 23, 42, 0.05) !important;
    color: var(--text-secondary) !important;
}

html:not(.dark) .dock-btn:not(.bg-red-600) .material-symbols-outlined {
    color: var(--text-secondary) !important;
}

html:not(.dark) .dock-btn:not(.bg-red-600):hover {
    background-color: rgba(15, 23, 42, 0.1) !important;
}

html:not(.dark) .btn-follow,
html:not(.dark) .premium-menu-panel button,
html:not(.dark) .premium-menu-panel [class*="text-white"],
html:not(.dark) .premium-menu-panel .material-symbols-outlined,
html:not(.dark) .theme-toggle-knob .material-symbols-outlined,
html:not(.dark) .track-title,
html:not(.dark) .top-bar-btn,
html:not(.dark) .filter-select,
html:not(.dark) .feed-item .track-title,
html:not(.dark) .play-overlay .material-symbols-outlined {
    color: var(--text-primary) !important;
}

html:not(.dark) .premium-menu-panel [class*="text-white/40"],
html:not(.dark) .premium-menu-panel p,
html:not(.dark) .premium-menu-panel [class*="text-white/20"] {
    color: var(--text-secondary) !important;
}

html:not(.dark) #current-track-title {
    text-shadow: 0 1px 10px rgba(255, 255, 255, 0.35);
}

html:not(.dark) .premium-menu-panel button:hover {
    color: var(--text-primary) !important;
}

html:not(.dark) .btn-follow {
    background-color: rgba(15, 23, 42, 0.12) !important;
    color: var(--text-primary) !important;
}

html:not(.dark) .filter-select {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
}

html:not(.dark) .top-bar-btn {
    background-color: var(--glass-bg) !important;
    border-color: var(--border) !important;
}

/* Preserve semantic accent colors in the light glass theme. */
html:not(.dark) .top-bar-btn.top-bar-action {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.28), rgba(239, 68, 68, 0.18)) !important;
    border-color: rgba(220, 38, 38, 0.42) !important;
    color: #991b1b !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.72), 0 8px 18px rgba(239, 68, 68, 0.12);
}

html:not(.dark) .top-bar-btn.top-bar-action .top-bar-text {
    color: #7f1d1d !important;
}

html:not(.dark) .btn-follow {
    background: linear-gradient(135deg, #ff2d55, #ff496f) !important;
    border-color: rgba(225, 29, 72, 0.28) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(255, 45, 85, 0.24) !important;
}

html:not(.dark) .btn-follow:hover {
    background: linear-gradient(135deg, #ff1747, #ff3d69) !important;
    color: #fff !important;
}

html:not(.dark) .dock-btn.active {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.34) !important;
    color: #b91c1c !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.08), 0 8px 18px rgba(239, 68, 68, 0.12);
}

html:not(.dark) .dock-btn.active .offline-icon {
    color: #b91c1c !important;
}

html:not(.dark) [class*="border-white/10"] {
    border-color: rgba(15, 23, 42, 0.12) !important;
}

html:not(.dark) .premium-search-results::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.05);
}

html:not(.dark) .premium-search-results::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
}







#luminaLanding {
  display: none; /* Caché par défaut pour éviter le flash */
  position: fixed;
  inset: 0;
  z-index: 999999;
    background: linear-gradient(180deg, #050508, #10090b, #050508);
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  opacity: 1;
}

/* --- AMBIANCE GLOW ROUGE TIKTOK --- */
.lumina-bg {
  position: absolute;
  width: 150vw;
  height: 150vw;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.075) 0%, transparent 55%);
  filter: blur(120px);
  animation: rotateGlow 18s linear infinite;
  pointer-events: none;
}

.lumina-liquid {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.11) 0%, transparent 70%);
  filter: blur(80px);
  animation: liquidMove 8s ease infinite;
  pointer-events: none;
}

/* --- PANNEAU CENTRAL (Centrage Absolu & Stable) --- */
.lumina-center {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px;
  max-width: 650px;
  width: 90%;
  /* Aligne les éléments à l'intérieur verticalement */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* --- LOGO ROUGE VIBRANT --- */
.lumina-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff004c, #ff4575);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 900;
  color: white;
  box-shadow: 0 0 50px rgba(255, 0, 76, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: floatLogo 5s infinite ease-in-out;
}

.landing-artists {
    width: min(680px, 100%);
    overflow: hidden;
    padding: 10px 0 18px;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.landing-artists-track {
    display: flex;
    width: max-content;
    animation: landingArtistsLoop 30s linear infinite;
    will-change: transform;
}

.landing-artists-track:hover,
.landing-artists-track:focus-within {
    animation-play-state: paused;
}

.landing-artist {
    display: flex;
    flex: 0 0 92px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    cursor: pointer;
}

.landing-artist + .landing-artist {
    margin-left: 14px;
}

.landing-artist-avatar,
.landing-artist-more {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.14), inset 0 0 0 3px rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.landing-artist-avatar {
    display: block;
    object-fit: cover;
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.4));
}

.landing-artist:hover .landing-artist-avatar,
.landing-artist:focus-visible .landing-artist-avatar,
.landing-artist:hover .landing-artist-more,
.landing-artist:focus-visible .landing-artist-more {
    transform: translateY(-5px) scale(1.06);
    border-color: rgba(239, 68, 68, 0.62);
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.28), inset 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.landing-artist-name {
    width: 92px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-artist-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    line-height: 1.05;
}

.landing-artists-status {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    letter-spacing: 0.02em;
}

.lumina-center .landing-stats {
    display: grid;
    gap: 4px;
    margin-top: 10px;
}

.lumina-center .landing-stats p {
    margin: 0;
}

.lumina-center .landing-artists-status {
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    font-weight: 600;
}

.lumina-center .landing-visits-status {
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.landing-quick-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: min(240px, 100%);
    margin-top: 18px;
}
.landing-quick-circle {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.08);
    box-shadow: 0 10px 28px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.landing-quick-circle:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.3);
    box-shadow: 0 14px 34px rgba(0,0,0,.36), 0 0 0 4px rgba(255,255,255,.04);
}
.landing-quick-circle:active { transform: scale(.97); }
.landing-ranking-flag {
    display: grid;
    width: 24px;
    height: 20px;
    place-items: center;
    overflow: hidden;
    border-radius: 3px;
}
.landing-ranking-flag img {
    display: block;
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
}
.landing-ranking-flag .material-symbols-outlined { font-size: 22px; }
.landing-ai-button .material-symbols-outlined { font-size: 21px; }
.landing-artist-cta.top-bar-btn.top-bar-action {
    flex: 0 0 96px;
    min-width: 96px !important;
    width: 96px !important;
    height: 44px !important;
    /* Keep exactly the existing top-bar For Artists treatment. */
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: none;
    color: #fff;
    text-decoration: none;
}
@media (max-width: 700px) {
    .landing-quick-actions { margin-top: 14px; gap: 8px; }
    .landing-quick-circle { flex-basis: 38px; width: 38px; height: 38px; }
    .landing-ranking-flag { width: 22px; height: 18px; }
    .landing-ranking-flag img { width: 22px; height: 16px; }
}

@keyframes landingArtistsLoop {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.lumina-center h1 {
  margin: 30px 0 0 0;
  font-size: 44px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
}

.lumina-center p {
  margin: 14px 0 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
}

/* --- BOUTONS D'ACTION (Positionnement équilibré) --- */
.lumina-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px; /* Réduit pour éviter de pousser vers le bas */
  width: 100%;
  max-width: 400px; /* Aligne proprement la largeur des boutons */
}

.music-btn {
  height: 60px;
  border: none;
  border-radius: 26px;
  font-size: 18px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, #ff004c, #ff3366);
  box-shadow: 0 10px 40px rgba(255, 0, 76, 0.35);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.music-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.continue-btn {
  height: 60px;
  border: none;
  border-radius: 26px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.continue-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* --- SOUS-BOUTONS --- */
.lumina-secondary {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.lumina-secondary button {
  height: 44px;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lumina-secondary button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* --- ANIMATIONS --- */
@keyframes liquidMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -20px) scale(1.1); }
}

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes landingFade {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

/* --- RESPONSIVE --- */
@media (max-width: 700px) {
  .lumina-center h1 { font-size: 32px; margin-top: 24px; }
  .lumina-center p { font-size: 16px; }
    .landing-artists { width: calc(100vw - 28px); }
    .landing-artist { flex-basis: 78px; }
    .landing-artist + .landing-artist { margin-left: 10px; }
    .landing-artist-avatar, .landing-artist-more { width: 58px; height: 58px; }
    .landing-artist-name { width: 78px; font-size: 11px; }
    .lumina-actions { margin-top: 28px; gap: 14px; }
  .music-btn, .continue-btn { height: 56px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .landing-artists-track,
    .lumina-logo,
    .lumina-bg,
    .lumina-liquid { animation: none; }
}




   #lumina-update-modal {
      position: fixed; inset: 0; z-index: 99999;
      display: flex; align-items: center; justify-content: center;
      background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
      opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #lumina-update-modal.active { opacity: 1; visibility: visible; }
    .update-card {
      background: #111; border: 1px solid rgba(255,255,255,0.1);
      width: 90%; max-width: 400px; padding: 40px; border-radius: 32px;
      text-align: center; transform: translateY(20px); transition: 0.4s;
      box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    }
    #lumina-update-modal.active .update-card { transform: translateY(0); }
    .update-icon {
      width: 80px; height: 80px; background: rgba(239, 68, 68, 0.1);
      color: #ef4444; border-radius: 50%; display: flex;
      align-items: center; justify-content: center; margin: 0 auto 24px;
            font-size: 32px; animation: luminaUpdatePulse 2s infinite;
    }
        @keyframes luminaUpdatePulse {
      0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
      70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
      100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    }
    .btn-update {
      width: 100%; background: #ef4444; color: white; padding: 16px;
      border-radius: 16px; font-weight: 900; text-transform: uppercase;
      margin-top: 30px; cursor: pointer; border: none; transition: 0.3s;
    }
    .btn-update:hover { transform: scale(1.02); filter: brightness(1.1); }
    .btn-later {
      margin-top: 15px; color: #555; font-size: 12px; font-weight: 700;
      text-transform: uppercase; cursor: pointer; background: none; border: none;
    }
    #install-toast {
      position: fixed;
      left: 50%;
            top: calc(env(safe-area-inset-top, 0px) + 7.5rem);
      transform: translateX(-50%);
      width: min(92vw, 380px);
      max-width: 420px;
      border-radius: 24px;
            background: rgba(13, 17, 29, 0.58);
            border: 1px solid rgba(255,255,255,0.18);
            box-shadow: 0 24px 68px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.08);
            backdrop-filter: blur(34px) saturate(150%);
            -webkit-backdrop-filter: blur(34px) saturate(150%);
      padding: 1rem 1.2rem;
      display: none;
      align-items: flex-start;
      gap: 0.85rem;
      color: #f8fafc;
      z-index: 100001;
      line-height: 1.4;
      pointer-events: auto;
    }
    #install-toast.active {
      display: flex;
    }
        html:not(.dark) #install-toast {
            background: rgba(248, 250, 252, 0.82);
            border-color: rgba(255, 255, 255, 0.82);
            box-shadow: 0 24px 68px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.9);
            color: var(--text-primary);
        }
    #install-toast-icon {
      width: 42px;
      height: 42px;
      border-radius: 999px;
      background: rgba(239, 68, 68, 0.12);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #ef4444;
      font-size: 1.4rem;
    }
    #install-toast-text {
      flex: 1 1 100%;
      font-size: 0.94rem;
            color: var(--text-secondary);
      min-width: 0;
    }
    #install-toast-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
      align-items: center;
      justify-content: flex-end;
      width: 100%;
      margin-top: 0.5rem;
    }
    #install-toast button {
      border-radius: 999px;
      padding: 0.7rem 0.95rem;
      border: none;
      font-weight: 700;
      font-size: 0.82rem;
      cursor: pointer;
      transition: all 0.2s ease;
      pointer-events: auto;
    }
    #install-toast button:hover {
      transform: scale(1.05);
      opacity: 0.9;
    }
    #install-toast .btn-primary {
      background: #ef4444;
      color: #fff;
      flex: 0 1 auto;
    }
    #install-toast .btn-secondary {
      background: rgba(255,255,255,0.12);
      color: #f8fafc;
      flex: 0 1 auto;
    }
        html:not(.dark) #install-toast .btn-secondary {
            background: rgba(15, 23, 42, 0.07);
            color: var(--text-primary);
        }
    #install-toast .btn-secondary:hover {
      background: rgba(255,255,255,0.18);
    }
    #user-toast {
      position: fixed;
      left: 50%;
            top: calc(env(safe-area-inset-top, 0px) + 7.5rem);
            transform: translateX(-50%) translateY(-8px) scale(0.98);
      width: min(90vw, 360px);
      max-width: 420px;
      padding: 0.95rem 1rem;
      border-radius: 22px;
            background: rgba(13, 17, 29, 0.52);
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: 0 20px 54px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(34px) saturate(150%);
            -webkit-backdrop-filter: blur(34px) saturate(150%);
      color: #f8fafc;
      display: none;
      z-index: 100002;
      font-size: 0.95rem;
      line-height: 1.4;
            pointer-events: none;
      text-align: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.2s ease;
    }
    #user-toast.active {
      display: block;
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0) scale(1);
        }
        #user-toast[data-type="error"] {
            border-color: rgba(248, 113, 113, 0.38);
            background: rgba(92, 24, 34, 0.58);
        }
        #user-toast[data-type="success"] {
            border-color: rgba(74, 222, 128, 0.42);
            background: rgba(12, 65, 43, 0.76);
            box-shadow: 0 20px 54px rgba(0, 0, 0, 0.3), 0 0 24px rgba(34, 197, 94, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }
        html:not(.dark) #user-toast {
            border-color: rgba(255, 255, 255, 0.78);
            background: rgba(248, 250, 252, 0.76);
            box-shadow: 0 20px 54px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.88);
            color: var(--text-primary);
        }
        html:not(.dark) #user-toast[data-type="error"] {
            border-color: rgba(220, 38, 38, 0.3);
            background: rgba(254, 226, 226, 0.82);
            color: #7f1d1d;
    }
        html:not(.dark) #user-toast[data-type="success"] {
            border-color: rgba(22, 163, 74, 0.3);
            background: rgba(220, 252, 231, 0.94);
            color: #14532d;
        }
        #install-toast.active ~ #user-toast {
            top: calc(env(safe-area-inset-top, 0px) + 19rem);
        }
    #user-toast-text {
      margin: 0;
      font-weight: 600;
      letter-spacing: 0.01em;
    }
    #install-hint-overlay {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.4rem;
      background: rgba(15, 23, 42, 0.88);
      z-index: 100000;
    }
    #install-hint-overlay.active { display: flex; }
    #install-hint-card {
      width: min(100%, 420px);
      border-radius: 28px;
      background: rgba(10, 11, 16, 0.98);
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: 0 28px 90px rgba(0,0,0,0.35);
      padding: 1.6rem;
      text-align: center;
      color: #f8fafc;
      position: relative;
    }
    #install-hint-card h2 {
      margin: 0 0 0.85rem;
      font-size: 1.25rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }
    #install-hint-card p {
      margin: 0 1rem 1.5rem;
      color: rgba(248,248,248,0.84);
      line-height: 1.7;
      font-size: 0.96rem;
    }
    #install-hint-card .install-hint-icon {
      font-size: 2.5rem;
      margin-bottom: 1rem;
      display: inline-flex;
      width: 72px;
      height: 72px;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      background: rgba(239, 68, 68, 0.12);
      color: #ef4444;
    }
    #install-hint-card .install-hint-close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 36px;
      height: 36px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(255,255,255,0.05);
      color: #fff;
      font-size: 1.1rem;
      cursor: pointer;
    }

@media (min-width: 1024px) {
    /* Keep the secondary controls and their panel left of the desktop nav arrows. */
    .secondary-floating-menu {
        right: calc(1.5rem + 52px + 1.5rem);
    }

    .secondary-panel-shell {
        right: calc(1.5rem + 52px + 1.5rem + 74px + 12px);
    }
}

html:not(.dark) .secondary-panel-card {
    border-color: var(--border);
    background:
        radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 36%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
    color: var(--text-primary);
}

html:not(.dark) .secondary-panel-header {
    border-bottom-color: var(--border);
}

html:not(.dark) .secondary-panel-eyebrow,
html:not(.dark) .secondary-current-track-card p,
html:not(.dark) .secondary-panel-list-card span:not(.material-symbols-outlined),
html:not(.dark) .secondary-panel-list-button .arrow,
html:not(.dark) .secondary-panel-empty {
    color: var(--text-secondary);
}

html:not(.dark) .secondary-panel-title,
html:not(.dark) .secondary-panel-list-card,
html:not(.dark) .secondary-panel-list-card strong,
html:not(.dark) .secondary-current-track-card h3,
html:not(.dark) .secondary-current-track-controls button:not(.primary) {
    color: var(--text-primary);
}

html:not(.dark) .secondary-panel-close {
    border-color: var(--border);
    background: var(--surface-soft);
    color: var(--text-secondary);
}

html:not(.dark) .secondary-panel-list-card,
html:not(.dark) .secondary-current-track-card,
html:not(.dark) .secondary-panel-hero {
    border-color: var(--border);
    background: color-mix(in srgb, var(--surface-strong) 86%, var(--accent) 14%);
}

html:not(.dark) .secondary-panel-list-card > .material-symbols-outlined:first-child,
html:not(.dark) .secondary-panel-empty .material-symbols-outlined {
    color: var(--accent);
}

html:not(.dark) .secondary-panel-list-button:hover,
html:not(.dark) .secondary-panel-list-button:focus-visible,
html:not(.dark) .secondary-history-card:hover,
html:not(.dark) .secondary-history-card:focus-within {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
    background: color-mix(in srgb, var(--surface-strong) 78%, var(--accent) 22%);
}

html:not(.dark) .secondary-current-track-controls button:not(.primary) {
    border-color: var(--border);
    background: var(--surface-soft);
}

html:not(.dark) .secondary-panel-hero h3 {
    color: var(--text-primary);
}

html:not(.dark) .secondary-panel-hero-icon {
    background: color-mix(in srgb, var(--accent) 14%, white);
    color: var(--accent);
    box-shadow: none;
}