/**
 * AfroMag - Header.
 * Structure : LOGO | MENU PRINCIPAL | RECHERCHE | SOCIAL
 * Le ticker (bande "ACTUALITÉ EN CONTINU") est stylé ici aussi car il vit
 * juste sous le header ; sa logique JS arrive en Phase 2.
 */

.afromag-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--afromag-color-white);
	border-bottom: 1px solid var(--afromag-color-gray-light);
}

.afromag-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--afromag-gap);
	min-height: var(--afromag-header-height);
}

.afromag-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.afromag-logo img {
	height: 56px;
	width: auto;
}

/* Navigation principale (desktop) */
.afromag-nav {
	flex: 1;
	display: none;
}

@media (min-width: 1024px) {
	.afromag-nav {
		display: flex;
		justify-content: center;
	}
}

.afromag-nav__list {
	display: flex;
	align-items: center;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.afromag-nav__list a {
	font-size: 0.95rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--afromag-color-black);
}

.afromag-nav__list a:hover,
.afromag-nav__list .current-menu-item > a {
	color: var(--afromag-color-red);
}

/* Zone droite : recherche + réseaux sociaux */
.afromag-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.afromag-search-toggle,
.afromag-menu-toggle {
	background: none;
	border: none;
	padding: 6px;
	line-height: 0;
	color: var(--afromag-color-black);
}

.afromag-social-list {
	display: none;
	align-items: center;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 1024px) {
	.afromag-social-list {
		display: flex;
	}
}

.afromag-social-list__item {
	line-height: 0;
}

.afromag-social-list__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: var(--afromag-color-black);
}

.afromag-social-list__link svg {
	width: 18px;
	height: 18px;
}

.afromag-social-list__link:hover {
	color: var(--afromag-color-red);
}

/* Variante widget (utilisée par le widget "Suivez-nous" natif) */
.afromag-social-list--widget {
	display: flex;
	flex-wrap: wrap;
}

/* Bouton menu hamburger : visible seulement en dessous de 1024px */
.afromag-menu-toggle {
	display: inline-flex;
}

@media (min-width: 1024px) {
	.afromag-menu-toggle {
		display: none;
	}
}

/* Menu mobile plein écran (déclenché en JS via la classe is-open) */
.afromag-mobile-nav {
	position: fixed;
	inset: 0;
	background-color: var(--afromag-color-white);
	z-index: 200;
	padding: var(--afromag-gap);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow-y: auto;
}

.afromag-mobile-nav.is-open {
	transform: translateX(0);
}

.afromag-mobile-nav__close {
	background: none;
	border: none;
	margin-bottom: 24px;
}

.afromag-mobile-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.afromag-mobile-nav li {
	border-bottom: 1px solid var(--afromag-color-gray-light);
}

.afromag-mobile-nav a {
	display: block;
	padding: 16px 4px;
	font-size: 1.1rem;
	font-weight: 600;
}

/* Panneau de recherche déroulant */
.afromag-search-panel {
	display: none;
	background-color: var(--afromag-color-gray-light);
	border-bottom: 1px solid #e5e5e5;
	padding-block: 16px;
}

.afromag-search-panel.is-open {
	display: block;
}

.afromag-search-panel .afromag-search-form {
	margin: 0;
	max-width: 100%;
}

/* Ticker "ACTUALITÉ EN CONTINU" */
.afromag-ticker {
	background-color: var(--afromag-color-red);
	color: var(--afromag-color-white);
	display: flex;
	align-items: center;
	overflow: hidden;
}

.afromag-ticker__label {
	flex-shrink: 0;
	background-color: var(--afromag-color-red-dark);
	padding: 8px 16px;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
	position: relative;
	z-index: 2;
}

.afromag-ticker__track {
	display: flex;
	white-space: nowrap;
	padding: 8px 0;
	position: relative;
	z-index: 1;
	min-width: 0;
}

.afromag-ticker__track a {
	color: var(--afromag-color-white);
	font-size: 0.85rem;
	margin-right: 40px;
}

.afromag-ticker__track a:hover {
	text-decoration: underline;
}
