/* =========================================
   HEADER STYLES (SportCommercer Premium)
   ========================================= */

:root {
	--primary-color: #1a1a1a;       /* Noir doux */
	--accent-color: #e74c3c;        /* Rouge Sport dynamique */
	--light-bg: #ffffff;
	--border-color: #f0f0f0;
	--font-main: 'Montserrat', sans-serif; /* Nouvelle police */
    --header-height: 80px;
}

/* --- Structure Globale --- */
.site-header {
	background: var(--light-bg);
	box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* Ombre légère moderne */
	padding: 0;
	position: sticky;
	top: 0;
	z-index: 1000;
	height: var(--header-height);
	display: flex;
	align-items: center;
    font-family: var(--font-main);
}

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

/* --- 1. Branding (Logo) --- */
.site-branding {
	flex-shrink: 0;
	margin-right: 40px;
}

.site-branding .site-title {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 800; /* Très gras */
	text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1;
}

.site-branding .site-title a {
	color: var(--primary-color);
	text-decoration: none;
}

/* Le mot "COMMERCE" en rouge si pas de logo image */
.site-branding .highlight {
    color: var(--accent-color);
}

.custom-logo {
	max-height: 50px;
	width: auto;
}

/* --- 2. Navigation (Menu) --- */
.main-navigation {
	flex-grow: 1;
}

/* Styles Desktop */
@media screen and (min-width: 900px) {
	.menu-toggle {
		display: none;
	}

    /* Ciblage précis de la liste du menu */
	.main-navigation ul {
		display: flex !important; /* Force le flex */
        flex-wrap: wrap;
		gap: 30px; /* Espace entre les liens */
		margin: 0;
		padding: 0;
		list-style: none;
        justify-content: center; /* Centre le menu */
	}

	.main-navigation li {
		position: relative;
        margin: 0; /* Reset des marges WP par défaut */
	}

	.main-navigation a {
		color: var(--primary-color);
		font-weight: 600;
		font-size: 0.9rem;
		text-transform: uppercase;
        letter-spacing: 0.5px;
		text-decoration: none;
		transition: all 0.3s ease;
        padding: 5px 0;
        position: relative;
	}

    /* Effet de soulignement au survol */
	.main-navigation a:hover {
		color: var(--accent-color);
	}
    
    .main-navigation a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: var(--accent-color);
        transition: width 0.3s ease;
    }

    .main-navigation a:hover::after {
        width: 100%;
    }
}

/* --- 3. Actions (Panier) --- */
.header-actions {
	flex-shrink: 0;
	margin-left: 20px;
}

.header-cart-link {
	position: relative;
	color: var(--primary-color);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	width: 40px;
	height: 40px;
	transition: transform 0.2s ease;
}

.header-cart-link:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.cart-count {
	position: absolute;
	top: 0;
	right: -5px;
	background-color: var(--accent-color);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
    border: 2px solid #fff; /* Petit contour blanc pour détacher */
}

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 899px) {
    .site-branding .site-title {
        font-size: 1.2rem;
    }

	.header-inner.container {
        padding: 10px 15px;
	}

    .menu-toggle {
        display: block;
        background: none;
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
        padding: 8px 12px;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.8rem;
        cursor: pointer;
        border-radius: 4px;
        order: 3; /* Bouton à droite */
    }

    .header-actions {
        order: 2; /* Panier au milieu/droite */
        margin-right: 15px;
    }
    
    .main-navigation {
        order: 4;
        width: 100%;
    }

	.main-navigation ul {
		display: none; /* Caché par défaut */
		background-color: #f9f9f9;
        border-top: 2px solid var(--accent-color);
		margin-top: 15px;
		padding: 0;
        list-style: none;
	}

    /* Classe ajoutée par le JS quand on clique */
	.main-navigation.toggled ul {
		display: block;
        animation: slideDown 0.3s ease-out;
	}

	.main-navigation ul li {
		border-bottom: 1px solid #eee;
	}

	.main-navigation ul li a {
		display: block;
		padding: 15px 20px;
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 600;
	}
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}