/* =============================================
   Blue Radio — Critical CSS (above-the-fold)
   Inliné dans <head> pour éliminer le blocage
   du rendu sur mobile.
   ============================================= */

:root {
    --blue: #2950aa;
    --blue-light: #3a6fd8;
    --blue-muted: rgba(41, 80, 170, 0.08);
    --bg-primary: #ffffff;
    --bg-secondary: #f4f6fa;
    --bg: var(--bg-secondary);
    --text-primary: #1a1a2e;
    --text-secondary: #122044;
    --text-muted: #122044;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --radius-md: 20px;
    --transition-smooth: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Alexandria', sans-serif;
    --container-max: 1600px;
    --sidebar-bg: #ffffff;
    --sidebar-border: rgba(0, 0, 0, 0.06);
    --topbar-bg: rgba(255, 255, 255, 0.92);
    --sidebar-width: 260px;
    --mobile-topbar-height: 60px;
}

[data-theme="dark"] {
    --bg-primary: #0f1014;
    --bg-secondary: #16171b;
    --bg: var(--bg-secondary);
    --text-primary: #f8fafc;
    --text-secondary: #ffffff;
    --text-muted: #ffffff;
    --border-color: rgba(255, 255, 255, 0.08);
    --sidebar-bg: #121317;
    --sidebar-border: rgba(255, 255, 255, 0.06);
    --topbar-bg: rgba(15, 16, 20, 0.85);
    color-scheme: dark;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body { font-family: var(--font); background: var(--bg-secondary); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; min-height: 100vh; }

img { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); color: inherit; }
input, textarea { font-family: var(--font); border: none; outline: none; }

.main-content { margin-left: var(--sidebar-width); min-height: 100vh; padding-bottom: 120px; }

.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-width); background: var(--sidebar-bg); z-index: 1000; overflow: hidden; }

@media (max-width: 900px) {
    .main-content { margin-left: 0; padding-top: var(--mobile-topbar-height); }
    .sidebar { transform: translateX(-100%); }
}

.mobile-topbar { display: none; position: fixed; top: 0; left: 0; right: 0; height: var(--mobile-topbar-height); background: var(--topbar-bg); z-index: 999; align-items: center; justify-content: space-between; padding: 0 16px; }

@media (max-width: 900px) { .mobile-topbar { display: flex; } }

.mobile-logo { width: 120px; height: 38px; object-fit: contain; display: block; }

.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.35s ease-out, transform 0.35s ease-out; will-change: opacity, transform; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

/* ═══════════════════════════════════════════
   CLS ANTI-SHIFT — Sections dynamiques (CRITIQUE)
   ═══════════════════════════════════════════ */
.ad-section { padding: 20px 0; background: var(--bg); min-height: calc(90px + 48px); overflow: hidden; }
@media (max-width: 768px) { .ad-section { min-height: calc(250px + 48px); } }
.ad-section--loaded { min-height: 0; }
.ad-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 8px; text-transform: uppercase; letter-spacing: 1px; }

.stations-grid--skeleton:empty {
    min-height: 380px;
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--border-color) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 20px;
}
@media (max-width: 768px) { .stations-grid--skeleton:empty { min-height: 260px; } }
.stations-grid--skeleton:not(:empty) { background: none; animation: none; min-height: 0; }
