/* --- 1. ALIGNEMENT LOGO ET MENU --- */
@media (min-width: 992px) {
    .header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    .header .navbar-brand {
        margin-bottom: 0;
    }
}


/* --- 2. HEADER FIXED EN PERMANENCE (CORRECTION PAGINATION) --- */
.header {
    position: fixed !important; /* Fixe le header par rapport à l'écran, insensible au contenu */
    top: 0 !important;
    left: 0;
    width: 100% !important;
    z-index: 1050 !important; /* Passe au-dessus de TOUT le contenu */
    background-color: var(--cassiopeia-color-white, #ffffff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Crée un espace de sécurité en haut du site pour éviter que le header fixed ne cache le début des articles */
body {
    padding-top: 220px !important; /* À ajuster selon la hauteur réelle de votre header */
}

/* --- 3. COLONNES LATÉRALES FIXES SYNCHRONISÉES --- */
@media (min-width: 992px) {
    .site-grid {
        align-items: start !important;
    }
    .sidebar-left, 
    .sidebar-right,
    [class*="sidebar-"] {
        position: sticky !important;
        top: 120px !important; /* Calé à 120px du haut de l'écran */
        max-height: calc(100vh - 140px) !important;
        overflow-y: auto;
    }
}