/**
 * SERVME - BURGER MENU MOBILE
 * Architecture moderne et professionnelle
 * @version 2.0.0
 * @date 2025-11-17
 */

/* ========================================
   BOUTON BURGER - Structure
   ======================================== */

.mobile-menu-btn {
    /* Layout */
    display: none; /* Caché par défaut (desktop) */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    
    /* Size */
    width: 44px;
    height: 44px;
    padding: 0;
    
    /* Style */
    background: transparent;
    border: none;
    cursor: pointer;
    
    /* Position */
    position: relative;
    z-index: 1001;
    
    /* Transition */
    transition: transform 0.2s ease;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Lignes du burger */
.burger-line {
    display: block;
    width: 24px;
    height: 2px;
    /* Couleur blanche par défaut (visible sur fond hero transparent) */
    background-color: #FFFFFF;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Ombre pour visibilité sur fond hero */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* État actif (burger ouvert) - Animation X */
.mobile-menu-btn.active .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Burger sur header scrolled (fond saumon) - lignes blanches */
.landing-header.scrolled .burger-line,
header.scrolled .burger-line {
    background-color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ========================================
   MENU MOBILE - Structure
   ======================================== */

.landing-cta.mobile,
#mobile-menu {
    /* Position - Pleine largeur, descend du haut */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    
    /* Layout */
    display: flex;
    flex-direction: column;
    padding: 0 24px;
    gap: 8px;
    
    /* Style - Rose transparent glassmorphism */
    background: rgba(230, 57, 92, 0.15);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    
    /* Bordure élégante */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
    
    /* Z-index */
    z-index: 1000;
    
    /* Animation - Fermé par défaut */
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                visibility 0.3s ease;
    
    /* Padding top pour ne pas couvrir le header */
    padding-top: 80px;
}

/* Menu ouvert */
.landing-cta.mobile.active,
#mobile-menu.active {
    max-height: 100vh; /* Restauré car mentions légales supprimées */
    opacity: 1;
    visibility: visible;
    padding-bottom: 24px;
}

/* Liens du menu */
.landing-cta.mobile a,
#mobile-menu a {
    /* Layout */
    display: block;
    padding: 16px 20px;
    
    /* Typography */
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    text-decoration: none;
    
    /* Style */
    background: transparent;
    border-radius: 12px;
    
    /* Transition */
    transition: all 0.2s ease;
}

/* Hover liens */
.landing-cta.mobile a:hover,
#mobile-menu a:hover {
    background: rgba(230, 57, 92, 0.15);
    color: #E6395C;
    transform: translateY(-2px);
}

/* Boutons dans le menu */
.landing-cta.mobile .landing-btn,
#mobile-menu .landing-btn {
    margin-top: 16px;
    width: 100%;
    justify-content: center;
}

/* ================================================
   BOUTON PRIMARY - Menu mobile
   Border visible avec background transparent
   ================================================ */

.landing-cta.mobile .landing-btn-primary,
#mobile-menu .landing-btn-primary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

/* ========================================
   OVERLAY - Fond sombre quand menu ouvert
   ======================================== */

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Rose saumon très transparent - cohérent avec brand #E6395C */
    background: rgba(230, 57, 92, 0.08);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    pointer-events: none;
}

body.menu-open::after {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.menu-open {
    overflow: hidden; /* Bloquer scroll */
}

/* ========================================
   RESPONSIVE - Mobile et tablette paysage
   ======================================== */

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: flex; /* Afficher sur mobile et tablette paysage */
    }
    
    /* Cacher navigation desktop sur mobile */
    .landing-cta.desktop,
    .landing-header .landing-cta:not(.mobile) {
        display: none;
    }
}

/* ========================================
   MODE LANDSCAPE - Menu scrollable
   Menu scrollable en paysage (hauteur limitée)
   ======================================== */

@media (max-width: 900px) and (orientation: landscape) {
    /* Rendre le menu scrollable en landscape */
    .landing-cta.mobile.active,
    #mobile-menu.active {
        max-height: 80vh; /* Limite la hauteur */
        overflow-y: auto; /* Active le scroll vertical */
        -webkit-overflow-scrolling: touch; /* Scroll fluide iOS */
    }
    
    /* Ajuster padding pour compenser header compact */
    .landing-cta.mobile,
    #mobile-menu {
        padding-top: 60px; /* Espace sous header réduit en paysage */
    }
}

@media (min-width: 901px) {
    /* Cacher menu mobile ET bouton burger sur desktop */
    .landing-cta.mobile,
    #mobile-menu,
    .mobile-menu-btn {
        display: none;
    }
}


