
/* =========================================================
   BEN'S LINE DANCE
   menu.css
   ---------------------------------------------------------
   MENU HAMBURGER + MENU LATÉRAL
   Version propre et sans doublons
   ========================================================= */


/* =========================================================
   1. BOUTON HAMBURGER
   ========================================================= */

.menu-toggle {
    width: 46px;
    height: 46px;

    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #3f352b;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.menu-toggle:hover {
    background: #e8eee5;
}

.menu-toggle:active {
    transform: scale(0.94);
}

.menu-toggle span {
    display: block;

    width: 23px;
    height: 2.5px;

    border-radius: 5px;

    background: currentColor;

    transition:
        transform 0.25s ease,
        opacity 0.2s ease;
}


/* =========================================================
   2. OVERLAY
   ========================================================= */

.menu-overlay {
    position: fixed;
    inset: 0;

    z-index: 9998;

    background: rgba(0, 0, 0, 0.48);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   3. MENU LATÉRAL
   ========================================================= */

.side-menu {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    z-index: 9999;

    width: min(360px, 88vw);

    display: flex;
    flex-direction: column;

    background: #ffffff;

    box-shadow:
        -10px 0 35px rgba(0, 0, 0, 0.18);

    transform: translateX(105%);
    visibility: hidden;

    transition:
        transform 0.28s ease,
        visibility 0.28s ease;

    overflow-y: auto;
    overscroll-behavior: contain;
}

.side-menu.open {
    transform: translateX(0);
    visibility: visible;
}


/* =========================================================
   4. EN-TÊTE
   ========================================================= */

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 22px;

    border-bottom: 1px solid #ddd5c7;

    background: #ffffff;
}


/* =========================================================
   5. MARQUE
   ========================================================= */

.menu-brand {
    display: flex;
    align-items: center;

    gap: 10px;
}

.menu-brand > span {
    color: #667a62;

    font-size: 25px;
    line-height: 1;
}

.menu-brand div {
    display: flex;
    flex-direction: column;
}

.menu-brand strong {
    color: #302a24;

    font-size: 15px;
    letter-spacing: 0.08em;
}

.menu-brand small {
    margin-top: 3px;

    color: #756d63;

    font-size: 9px;
    letter-spacing: 0.15em;
}


/* =========================================================
   6. LOGO
   ========================================================= */

.menu-brand .menu-logo {
    display: block;

    width: auto;
    height: 45px;

    max-width: 200px;

    object-fit: contain;
}


/* =========================================================
   7. BOUTON FERMER
   ========================================================= */

.close-menu {
    flex: 0 0 auto;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #f5f1e8;

    color: #3f352b;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.close-menu:hover {
    background: #e8eee5;

    color: #667a62;

    transform: rotate(90deg);
}


/* =========================================================
   8. NAVIGATION
   ========================================================= */

.mobile-menu {
    display: flex;
    flex-direction: column;

    padding: 16px;
}


/* =========================================================
   9. LIENS DU MENU
   ---------------------------------------------------------
   COULEUR NORMALE :
   Brun

   COULEUR HOVER :
   Vert sauge + fond vert pâle

   COULEUR ACTIVE :
   Vert sauge + fond vert pâle

   HOVER ET ACTIVE UTILISENT EXACTEMENT
   LES MÊMES COULEURS.
   ========================================================= */

.side-menu .menu-link {
    display: flex;
    align-items: center;

    gap: 15px;

    min-height: 54px;

    padding: 15px;

    margin-bottom: 4px;

    border-radius: 12px;

    color: #302a24;

    background: transparent;

    text-decoration: none;

    font-weight: 650;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


/* =========================================================
   10. ICÔNES
   ========================================================= */

.side-menu .menu-link > span {
    width: 30px;
    flex: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    font-size: 20px;
    line-height: 1;

    color: #756d63;

    transition:
        color 0.2s ease;
}


/* =========================================================
   11. TEXTE
   ========================================================= */

.side-menu .menu-link strong {
    font-size: 15px;
    font-weight: 650;
}


/* =========================================================
   12. HOVER
   ---------------------------------------------------------
   MÊME COULEUR QUE ACTIVE
   ========================================================= */

.side-menu .menu-link:hover {
    background: #e8eee5;

    color: #667a62;

    transform: translateX(3px);
}

.side-menu .menu-link:hover > span {
    color: #667a62;
}


/* =========================================================
   13. PAGE ACTIVE
   ---------------------------------------------------------
   EXACTEMENT LA MÊME COULEUR QUE HOVER
   ========================================================= */

.side-menu .menu-link.active {
    background: #e8eee5;

    color: #667a62;

    font-weight: 800;

    transform: none;
}

.side-menu .menu-link.active > span {
    color: #667a62;
}


/* =========================================================
   14. ACTIVE + HOVER
   ---------------------------------------------------------
   L'ACTIVE RESTE VERT SAUGE
   ========================================================= */

.side-menu .menu-link.active:hover {
    background: #e8eee5;

    color: #667a62;

    font-weight: 800;

    transform: translateX(3px);
}

.side-menu .menu-link.active:hover > span {
    color: #667a62;
}


/* =========================================================
   15. SÉPARATEUR
   ========================================================= */

.menu-separator {
    height: 1px;

    margin: 15px 0;

    background: #ddd5c7;
}


/* =========================================================
   16. PIED DU MENU
   ========================================================= */

.menu-footer {
    margin-top: auto;

    padding: 20px;

    border-top: 1px solid #ddd5c7;

    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 3px;

    color: #756d63;

    text-align: center;
}

.menu-footer span {
    font-size: 0.9rem;

    font-weight: 800;

    color: #594a3c;
}

.menu-footer small {
    font-size: 0.72rem;

    color: #756d63;
}


/* =========================================================
   17. EMPÊCHER LE SCROLL
   ========================================================= */

body.menu-open {
    overflow: hidden;
}


/* =========================================================
   18. TABLETTE
   ========================================================= */

@media (max-width: 992px) {

    .side-menu {
        width: min(380px, 88vw);
    }

}


/* =========================================================
   19. MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .menu-toggle {
        width: 44px;
        height: 44px;
    }

    .side-menu {
        width: min(350px, 90vw);
    }

    .side-menu-header {
        padding: 18px 16px;
    }

    .mobile-menu {
        padding: 12px 10px 18px;
    }

    .side-menu .menu-link {
        min-height: 54px;

        padding: 10px 12px;
    }

}


/* =========================================================
   20. PETITS TÉLÉPHONES
   ========================================================= */

@media (max-width: 480px) {

    .side-menu {
        width: 92vw;
    }

    .menu-brand strong {
        font-size: 14px;
    }

    .side-menu .menu-link {
        min-height: 52px;
    }

}


/* =========================================================
   21. ACCESSIBILITÉ
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .side-menu,
    .menu-overlay,
    .menu-toggle,
    .menu-toggle span,
    .close-menu,
    .side-menu .menu-link {
        transition: none;
    }

}

