/* ================================================
   MOBILE HAMBURGER MENU
   Modern, fluid, dynamic dropdown menu
   ================================================ */

/* ========== HAMBURGER BUTTON ========== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.hamburger__line {
    display: block;
    width: 24px;
    height: 2.5px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    transform-origin: center;
}

.hamburger__line:nth-child(1) {
    margin-bottom: 5px;
}

.hamburger__line:nth-child(3) {
    margin-top: 5px;
}

/* Hamburger to X animation */
.hamburger.is-active .hamburger__line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.is-active .hamburger__line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ========== MOBILE NAV OVERLAY ========== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.97), rgba(67, 56, 202, 0.97));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ========== MOBILE NAV LINKS ========== */
.mobile-nav__links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav__links li {
    margin: 1.5rem 0;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.mobile-nav.is-open .mobile-nav__links li {
    transform: translateY(0);
    opacity: 1;
}

/* Staggered animation delays */
.mobile-nav.is-open .mobile-nav__links li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-nav.is-open .mobile-nav__links li:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-nav.is-open .mobile-nav__links li:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-nav.is-open .mobile-nav__links li:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-nav__links a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.5rem 1rem;
    display: inline-block;
    position: relative;
    transition: transform 0.3s ease;
}

.mobile-nav__links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mobile-nav__links a:hover::after,
.mobile-nav__links a:active::after {
    width: 80%;
}

.mobile-nav__links a:active {
    transform: scale(0.95);
}

/* ========== MOBILE NAV CTA BUTTON ========== */
.mobile-nav__cta {
    margin-top: 2.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    transition-delay: 0.5s;
}

.mobile-nav.is-open .mobile-nav__cta {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav__cta .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: white;
    color: #4338ca;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.mobile-nav__cta .btn:hover,
.mobile-nav__cta .btn:active {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ========== CLOSE BUTTON ========== */
/* Caché - on utilise le hamburger qui devient X */
.mobile-nav__close {
    display: none;
}



/* ========== RESPONSIVE: Show hamburger on mobile ========== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav__links {
        display: none !important;
    }

    .nav .btn--primary,
    .nav .nav__contact {
        display: none !important;
    }

    .nav {
        justify-content: space-between;
    }
}

/* ========== PREVENT BODY SCROLL WHEN MENU OPEN ========== */
body.menu-open {
    overflow: hidden;
}

/* ========== HAMBURGER ALWAYS WHITE ========== */
/* Les barres du hamburger sont blanches sur toutes les pages */

/* Force hamburger X to be white when menu is open (all pages) */
.hamburger.is-active .hamburger__line {
    background-color: white !important;
}