/* =========================================================
   MENU RAP ET IMT
   ========================================================= */

.site-menu {
    --menu-primary: #075985;
    --menu-dark: #082f49;
    --menu-light: #e0f2fe;

    position: relative;
    z-index: 1000;

    width: 100%;

    border-bottom: 1px solid #e2e8f0;

    background: rgba(255, 255, 255, 0.96);
    color: #172033;

    box-shadow:
        0 7px 25px rgba(15, 23, 42, 0.07);

    backdrop-filter: blur(16px);
}

.site-menu-rap {
    --menu-primary: #237f47;
    --menu-dark: #123d28;
    --menu-light: #dcfce7;
}

.site-menu-imt {
    --menu-primary: #075985;
    --menu-dark: #082f49;
    --menu-light: #e0f2fe;
}

.site-menu *,
.site-menu *::before,
.site-menu *::after {
    box-sizing: border-box;
}

.site-menu a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   CONTENEUR
   ========================================================= */

.site-menu-container {
    width: min(1320px, calc(100% - 40px));
    min-height: 92px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 40px;
}


/* =========================================================
   LOGO ET NOM
   ========================================================= */

.site-menu-brand {
    min-width: 0;
    margin-right: auto;

    display: flex;
    align-items: center;
    gap: 15px;
}

.site-menu-logo {
    width: 64px;
    height: 64px;
    padding: 7px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    overflow: hidden;

    border-radius: 17px;

    background: var(--menu-light);
}

.site-menu-logo img {
    width: 100%;
    height: 100%;

    display: block;
    object-fit: contain;
}

.site-menu-brand-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-menu-brand-text strong {
    color: var(--menu-dark);

    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.site-menu-brand-text span {
    color: #64748b;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}


/* =========================================================
   NAVIGATION ORDINATEUR
   ========================================================= */

.site-menu-navigation {
    display: flex;
    align-items: center;
    gap: 5px;
}

.site-menu-link {
    min-height: 44px;
    padding: 11px 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    color: #475569;

    font-size: 14px;
    font-weight: 700;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease;
}

.site-menu-link:hover {
    transform: translateY(-1px);

    background: var(--menu-light);
    color: var(--menu-primary);
}

.site-menu-link.actif {
    background: var(--menu-primary);
    color: #ffffff;

    box-shadow:
        0 10px 22px color-mix(
            in srgb,
            var(--menu-primary) 22%,
            transparent
        );
}


/* =========================================================
   BOUTON MOBILE
   ========================================================= */

.site-menu-toggle {
    width: 48px;
    height: 48px;
    padding: 0;

    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    border: 1px solid #dce3eb;
    border-radius: 14px;

    background: #ffffff;

    cursor: pointer;

    transition:
        border-color 0.25s ease,
        background-color 0.25s ease;
}

.site-menu-toggle:hover {
    border-color: var(--menu-primary);
    background: var(--menu-light);
}

.site-menu-toggle span {
    width: 22px;
    height: 2px;

    display: block;

    border-radius: 999px;

    background: var(--menu-dark);

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.site-menu.ouvert .site-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-menu.ouvert .site-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.site-menu.ouvert .site-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   MENU MOBILE
   ========================================================= */

.site-menu-mobile {
    width: min(100% - 30px, 600px);
    max-height: 0;
    margin: 0 auto;

    display: none;
    overflow: hidden;

    opacity: 0;

    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        padding 0.35s ease;
}

.site-menu.ouvert .site-menu-mobile {
    max-height: 500px;
    padding: 10px 0 25px;

    opacity: 1;
}

.site-menu-mobile-link {
    width: 100%;
    min-height: 57px;
    padding: 13px 17px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border-bottom: 1px solid #e2e8f0;

    color: #475569;

    font-size: 15px;
    font-weight: 700;

    transition:
        padding-left 0.25s ease,
        color 0.25s ease,
        background-color 0.25s ease;
}

.site-menu-mobile-link:first-child {
    border-top: 1px solid #e2e8f0;
}

.site-menu-mobile-link span {
    color: var(--menu-primary);
    font-size: 20px;
}

.site-menu-mobile-link:hover {
    padding-left: 23px;

    background: var(--menu-light);
    color: var(--menu-primary);
}

.site-menu-mobile-link.actif {
    color: var(--menu-primary);
    font-weight: 850;
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media screen and (max-width: 1050px) {

    .site-menu-container {
        min-height: 82px;
    }

    .site-menu-navigation {
        display: none;
    }

    .site-menu-toggle {
        display: flex;
    }

    .site-menu-mobile {
        display: block;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 600px) {

    .site-menu-container {
        width: calc(100% - 30px);
        min-height: 76px;
        gap: 15px;
    }

    .site-menu-logo {
        width: 54px;
        height: 54px;
        border-radius: 15px;
    }

    .site-menu-brand-text strong {
        max-width: 215px;

        overflow: hidden;

        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-menu-brand-text span {
        font-size: 10px;
    }

    .site-menu-toggle {
        width: 45px;
        height: 45px;
        flex: 0 0 auto;
    }
}


/* =========================================================
   PETITS MOBILES
   ========================================================= */

@media screen and (max-width: 400px) {

    .site-menu-brand-text {
        display: none;
    }
}

/* =========================================================
   CORRECTION RESPONSIVE PRIORITAIRE
   À placer tout en bas du fichier CSS
   ========================================================= */

@media screen and (max-width: 1050px) {

    .site-menu-container {
        width: calc(100% - 30px) !important;
        min-height: 80px;
    }

    .site-menu-navigation {
        display: none !important;
    }

    .site-menu-toggle {
        display: flex !important;
        flex: 0 0 auto;
    }

    .site-menu-mobile {
        display: block !important;
    }
}

@media screen and (max-width: 600px) {

    .site-menu-container {
        width: calc(100% - 24px) !important;
        min-height: 72px;
        gap: 12px;
    }

    .site-menu-brand {
        min-width: 0;
        overflow: hidden;
    }

    .site-menu-logo {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }

    .site-menu-brand-text {
        min-width: 0;
        overflow: hidden;
    }

    .site-menu-brand-text strong {
        display: block;
        max-width: 180px;
        overflow: hidden;
        font-size: 13px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-menu-brand-text span {
        font-size: 9px;
    }

    .site-menu-toggle {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
    }

    .site-menu-mobile {
        width: calc(100% - 24px) !important;
    }
}

@media screen and (max-width: 390px) {

    .site-menu-brand-text {
        display: none !important;
    }
}