/* HEADER FIXE */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-second);
    z-index: 100; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: 140px;
    height: 70px;
    transition: opacity 0.2s;
}

.logo a:hover img {
    opacity: 0.85;
}

/* NAVIGATION */
.main-nav ul {
    display: flex;
    gap: 35px;
}

.main-nav a {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-main);
    transition: opacity 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    opacity: 0.6;
}

/* HEADER ACTIONS */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-moncompte-header {
    background-color: var(--color-main);
    color: var(--color-white);
    padding: 10px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    box-sizing: border-box;
}

.btn-moncompte-header:hover {
    opacity: 0.85;
}

/* BURGER MENU (caché sur desktop) */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--color-main);
    border-radius: 2px;
}

/* BOUTON PANIER */
.btn-cart-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--color-main);
    color: var(--color-white);
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    position: relative;
    height: 40px;
    box-sizing: border-box;
    line-height: 1;
}

.btn-cart-header:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.cart-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    font-size: 16px;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background-color: var(--color-orange-btn);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
    flex-shrink: 0;
    line-height: 1;
}

.cart-count.active {
    animation: pulse 0.3s ease-in-out;
}

.btn-login-header {
    background-color: var(--color-main);
    color: var(--color-white);
    padding: 10px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    box-sizing: border-box;
}

.btn-login-header:hover {
    opacity: 0.85;
}

@keyframes pulse {
    0% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* RESPONSIVE - MOBILE */
@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    .logo img {
        width: 100px;
        height: 50px;
    }

    /* BURGER MENU VISIBLE */
    .burger-menu {
        display: flex !important;
    }

    /* NAVIGATION MOBILE - À MASQUER PAR DÉFAUT */
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-second) !important; /* Force la couleur */
        flex-direction: column;
        padding: 20px 0;
        display: none !important; /* Force le masquage par défaut */
        z-index: 99;
        overflow-y: auto;
    }

    /* Menu ACTIF = VISIBLE */
    .main-nav.active {
        display: flex !important; /* Force l'affichage */
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 16px;
        color: var(--color-main);
    }

    .main-nav a:hover,
    .main-nav a.active {
        background-color: rgba(0, 0, 0, 0.1);
        opacity: 1;
    }

    /* HEADER ACTIONS MOBILE */
    .header-actions {
        gap: 10px;
    }

    .btn-moncompte-header,
    .btn-login-header {
        padding: 8px 16px;
        font-size: 14px;
        height: 36px;
    }

    .btn-cart-header {
        padding: 8px 12px;
        font-size: 14px;
        height: 36px;
    }

    .cart-count {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }

    .logo img {
        width: 80px;
        height: 40px;
    }

    .btn-moncompte-header,
    .btn-login-header {
        padding: 8px 14px;
        font-size: 12px;
    }
}