/* =====================================================
   ENLA 2.0 — MODULE DOS
   Fichier : assets/css/navbar.css
   Rôle : Styles de la barre de navigation supérieure
===================================================== */

/* =====================================================
   BARRE SUPÉRIEURE
===================================================== */

#navbar {
    position: sticky;
    top: 0;
    z-index: 900;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #eae7f1;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
    padding: 14px 28px;
}

/* =====================================================
   PARTIE GAUCHE
===================================================== */

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.navbar-page-info {
    min-width: 0;
}

.navbar-page-info h1 {
    margin: 0;
    color: #29243a;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
}

.navbar-page-info p {
    margin: 4px 0 0;
    color: #898499;
    font-size: 0.84rem;
    line-height: 1.5;
}

/* =====================================================
   BOUTON DU MENU LATÉRAL
===================================================== */

.navbar-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #514c63;
    background-color: #f6f4fc;
    border: 1px solid #eae7f1;
    border-radius: 9px;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.navbar-menu-button i {
    font-size: 1.35rem;
    line-height: 1;
}

.navbar-menu-button:hover {
    color: #165BFB;
    background-color: #edf2ff;
    border-color: #d6e1ff;
}

.navbar-menu-button:focus-visible {
    outline: 3px solid rgba(22, 91, 251, 0.25);
    outline-offset: 2px;
}

/* =====================================================
   PARTIE DROITE — IDENTITÉ DE L'ÉCOLE
===================================================== */

.navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.navbar-school {
    display: flex;
    align-items: center;
    gap: 11px;
}

.navbar-school-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: #165BFB;
    background-color: #edf2ff;
    border-radius: 12px;
}

.navbar-school-icon i {
    font-size: 1.3rem;
}

.navbar-school-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.navbar-school-name {
    color: #29243a;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
}

.navbar-school-version {
    color: #898499;
    font-size: 0.75rem;
    line-height: 1.3;
}

/* =====================================================
   RESPONSIVE — TABLETTES ET MOBILES
===================================================== */

@media (max-width: 991px) {
    .navbar-menu-button {
        display: inline-flex;
    }

    .navbar-container {
        min-height: 72px;
        padding: 12px 20px;
    }

    .navbar-page-info h1 {
        font-size: 1.1rem;
    }

    .navbar-page-info p {
        font-size: 0.8rem;
    }
}

/* =====================================================
   PETITS ÉCRANS
===================================================== */

@media (max-width: 600px) {
    .navbar-container {
        gap: 10px;
        padding: 10px 14px;
    }

    .navbar-left {
        gap: 10px;
    }

    .navbar-page-info h1 {
        font-size: 1rem;
    }

    .navbar-page-info p {
        max-width: 230px;
        font-size: 0.75rem;
    }

    .navbar-school {
        gap: 0;
    }

    .navbar-school-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .navbar-school-info {
        display: none;
    }
}

/* =====================================================
   ACCESSIBILITÉ
===================================================== */

@media (prefers-reduced-motion: reduce) {
    .navbar-menu-button {
        transition: none;
    }
}
