/**
 * FIX CRITIQUE RESPONSIVE - L'INDIEN DE PORQUEROLLES
 * Correction urgente du menu burger et panier responsive
 */

/* RESET FORÇAGE DU MENU BURGER EN MOBILE */
@media (max-width: 991px) {
    .header-navbar-list {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        margin: 0 15px;
        z-index: 1002;
    }
    
    .mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background: #fff;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
}

/* MENU BURGER ANIMATION */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* PANIER CONTAINER FORÇAGE */
@media (max-width: 991px) {
    .cart-container {
        display: block !important;
        order: 3;
        margin-left: 15px;
    }
    
    .cart-toggle-btn {
        display: flex !important;
        align-items: center;
        gap: 8px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #fff;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.9rem;
    }
    
    .cart-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }
    
    .cart-badge {
        background: #e74c3c;
        color: #fff;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: bold;
        min-width: 18px;
    }
}

/* MENU MOBILE SIDEBAR */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
    z-index: 10002;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    padding: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #204a71;
    color: #ffffff;
}

.mobile-menu-header img {
    height: 40px;
    width: auto;
}

.mobile-menu-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #ffffff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-list li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    color: #1a7be6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
}

.mobile-menu-list li a:hover {
    background: #f0f7ff;
    color: #0d5fb8;
}

.mobile-menu-list li a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #1a7be6;
}

/* OVERLAY MOBILE */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    pointer-events: auto;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* CORRECTIONS HEADER NAVBAR EN MOBILE */
@media (max-width: 991px) {
    .header-navbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        background: #204a71;
        position: relative;
    }
    
    .header-navbar-logo {
        order: 1;
        flex: 0 0 auto;
    }
    
    .header-navbar-logo img {
        height: 50px;
        width: auto;
    }
    
    .mobile-menu-toggle {
        order: 2;
        margin-left: auto;
    }
    
    .cart-container {
        order: 3;
        margin-left: 15px;
    }
}