/* ===== HEADER E-COMMERCE ===== */

.ecommerce-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100vw;
    left: 0;
    margin: 0;
    padding: 0;
}

.promo-highlight {
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.header-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.header-navbar-logo img {
    height: 50px;
    width: auto;
}

.header-navbar-list {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-around;
    margin-left: 32px;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-navbar-list li {
    position: relative;
}

.header-navbar-list a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-navbar-list a:hover {
    background: #f8f9fa;
    color: #1e3c72;
}

.header-navbar-list a i {
    font-size: 16px;
}

/* Dropdown Menus */
.dropdown {
    position: relative;
}

.dropdown-toggle .fa-chevron-down {
    font-size: 12px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.3s ease;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #1e3c72;
}

/* Header Actions */
.header-navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 40px 8px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: #666;
    padding: 5px 10px;
    border-radius: 50%;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #1e3c72;
}

.user-menu {
    position: relative;
}

.user-toggle {
    background: none;
    border: none;
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.user-toggle:hover {
    background: #f8f9fa;
    color: #1e3c72;
}

/* Cart */
.cart-container {
    position: relative;
}

.cart-btn {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.cart-count {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    min-width: 350px;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 10px;
}

.cart-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.cart-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cart-close:hover {
    background: #f8f9fa;
    color: #333;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.cart-empty i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 15px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.cart-total {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.cart-checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}


/* ===== MENU MOBILE BURGER ===== */

/* Bouton Burger - visible uniquement sur mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.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, -7px);
}

/* Menu Mobile - panneau coulissant */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 10002;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    padding: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.mobile-menu-header img {
    height: 40px;
    width: auto;
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    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 #e9ecef;
}

.mobile-menu-list a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
}

.mobile-menu-list a:hover {
    background: #f8f9fa;
    color: #1e3c72;
    padding-left: 25px;
}

.mobile-menu-list a i {
    font-size: 18px;
    color: #1e3c72;
    width: 25px;
}

/* Overlay pour fermer le menu en cliquant à l'extérieur */
.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 {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* Panier Toggle Button */
.cart-toggle-btn {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.cart-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.cart-badge {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* ===== RESPONSIVE ===== */

/* Tablettes et petits écrans */
@media (max-width: 1024px) {
    .header-navbar-list {
        gap: 15px;
        margin-left: 20px;
    }

    .header-navbar-list a {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Mobile - Afficher le menu burger, cacher la navbar desktop */
@media (max-width: 768px) {
       .header-navbar {
        display: flex;
        padding: 0 10px;
        height: 55px;
        flex-direction: row;
    }

    .header-navbar-logo img {
        height: 40px;
    }

    /* Cacher la navigation desktop */
    .header-navbar-list {
        display: none !important;
    }

    /* Afficher le bouton burger */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Panier en mode mobile */
    .cart-toggle-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .cart-toggle-btn span:not(.cart-badge) {
        display: none;
    }

    .cart-container {
        margin-left: 10px;
    }

    .cart-dropdown {
        right: 0;
        min-width: 300px;
        max-width: calc(100vw - 20px);
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
        .header-navbar {
        display: flex;
        padding: 0 10px;
        height: 55px;
        flex-direction: row;
    }

    .header-navbar-logo img {
        height: 35px;
    }

    .mobile-menu {
        width: 260px;
    }

    .mobile-menu-toggle {
        width: 26px;
        height: 20px;
    }

    .mobile-menu-toggle span {
        height: 2.5px;
    }

    .cart-toggle-btn {
        padding: 6px 10px;
    }

    .cart-badge {
        font-size: 10px;
        min-width: 16px;
        height: 16px;
    }
}
