/* ============================================================
   EN-TÊTE « à l'identique de mantes-sud-insoumis.fr » :
   bandeau blanc pleine largeur (80px), ombre douce,
   logo contenu à gauche, filet vertical, nav + boutons à droite,
   carré violet 80×80 collé au bord droit (burger toujours visible).
   ============================================================ */

:root {
	--msi-hauteur-header: 80px;
	--msi-hauteur-bandeau: var(--msi-hauteur-header);
	--msi-largeur-burger: 80px;
}

/* --- Conteneur principal : bandeau blanc, ombre douce, sticky --- */
.msi-header {
	background-color: #ffffff !important;
	box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
	position: sticky;
	top: 0;
	z-index: 999;
	border-top: none;
	border-image: none;
	display: flex !important;
	flex-direction: column;
}

/* --- Bandeau interne : logo à gauche, nav + boutons à droite --- */
.msi-header-inner {
	flex: 1 1 auto;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	/* Hauteur FIXE : les éléments wrappés en 2e ligne sont coupés par overflow */
	height: var(--msi-hauteur-header);
	overflow-y: hidden;
	/* !important : le layout WP génère flex-wrap:nowrap qui annulerait le wrap */
	flex-wrap: wrap !important;
	align-content: flex-start;
	align-items: center;
	justify-content: space-between !important;
	gap: 10px 20px;
	padding: 0 20px;
	padding-right: calc(var(--msi-largeur-burger) + 10px);
}

/* --- Logo tout à gauche : contenu dans la barre (112×64 max), non compressible --- */
.msi-logo {
	flex: 0 0 auto;
	flex-shrink: 0;
	margin: 0 !important;
	height: var(--msi-hauteur-header);
	display: flex;
	align-items: center;
}

.msi-logo img {
	width: auto !important;
	height: 80px !important;
	max-height: 80px;
	object-fit: contain;
	display: block;
}

/* --- Nav : collée à droite (juste avant les boutons) --- */
.msi-nav-links {
	margin-left: auto;
	gap: 25px;
	height: var(--msi-hauteur-bandeau);
	align-items: center;
	flex-wrap: nowrap;
}

.msi-nav-item {
	margin: 0 !important;
	white-space: nowrap;
}

.msi-nav-item a {
	font-family: 'Public Sans', sans-serif;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.5em;
	color: #111111;
	text-transform: uppercase;
	text-decoration: none;
}

.msi-nav-item a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* --- Zone d'actions : AP + don, collées à droite --- */
.msi-header-actions {
	gap: 10px;
	align-items: center;
	margin-left: 10px;
	flex-wrap: nowrap;
	align-self: center;
}

/* Pastille « Action populaire » : fond jaune, radius 8px, 44px */
.msi-btn-ap {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	padding: 5px 10px;
	background-color: rgb(255, 236, 0);
	border-radius: 8px;
	text-decoration: none;
	transition: filter 0.15s ease;
	white-space: nowrap;
}

.msi-btn-ap:hover {
	filter: brightness(0.94);
}

.msi-btn-ap img {
	width: 24px;
	height: 28px;
	object-fit: contain;
}

.msi-btn-ap-text {
	font-family: 'Public Sans', sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	color: rgb(0, 35, 44);
	text-align: left;
}

/* Bouton « FAIRE UN DON » : même gabarit que la pastille jaune */
.msi-btn-don {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 5px 10px;
	background-color: rgb(123, 19, 214);
	border-radius: 8px;
	font-family: 'Public Sans', sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 16.8px;
	letter-spacing: 0.01em;
	color: #ffffff;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.msi-btn-don:hover {
	background-color: rgb(104, 16, 182);
	color: #ffffff;
}

/* ============================================================
   BURGER : carré violet 80×80 collé au coin droit, toujours visible
   ============================================================ */

.msi-burger {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1000;
	width: var(--msi-largeur-burger);
	height: var(--msi-hauteur-bandeau);
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	transform: none !important;
	cursor: pointer;
	background-color: rgb(123, 19, 214) !important;
	outline: none;
	transition: background-color 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}

/* Pas de changement de couleur au hover : sur tactile le :hover reste collé
   après un tap et donne un burger rouge permanent. */
.msi-burger:hover,
.msi-burger:focus-visible {
	background-color: rgb(123, 19, 214) !important;
	outline: none;
	box-shadow: none;
}

.msi-burger svg {
	width: 28px;
	height: 32px;
	display: block;
}

/* ============================================================
   MENU DÉROULANT (sous le bandeau)
   ============================================================ */

.msi-mobile-menu {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 10px 10px rgba(0, 0, 0, 0.15);
}

.msi-mobile-menu[hidden] {
	display: none;
}

.msi-mobile-menu a {
	display: flex;
	align-items: center;
	height: 60px;
	padding: 0 20px;
	font-family: 'Public Sans', sans-serif;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.01em;
	color: #111111;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.msi-mobile-menu a:hover {
	background: rgba(123, 19, 214, 0.05);
}

.msi-mobile-menu a.msi-mobile-don {
	background-color: rgb(123, 19, 214);
	color: #ffffff;
	font-weight: 700;
	justify-content: center;
	border-bottom: none;
}

/* Lien courant du menu : souligné (comme la source) */
.msi-nav-item.is-current a {
	text-decoration: underline;
	text-underline-offset: 3px;
}


/* ============================================================
   RESPONSIVE : hauteur FIXE + overflow-y hidden.
   Les éléments « wrappés » (2ᵉ ligne) sortent du cadre et
   disparaissent naturellement — sans display:none.
   Ordre de disparition quand l'écran rétrécit :
   1. les liens de menu (msi-nav-links)
   2. le bouton Action Populaire (msi-btn-ap)
   (FAIRE UN DON + burger restent toujours)
   ============================================================ */


.msi-logo {
	align-self: center;
	flex-shrink: 0;
}

.msi-nav-links {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	align-self: center;
}

.msi-header-actions {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* Petits écrans : logo lisible, centré verticalement, marge gauche réduite */
@media (max-width: 480px) {
	.msi-header-inner {
		padding-left: 10px;
	}
}
