/*
 * header.css — bandeau bleu marine, logo à gauche, menu à droite avec l'espacement
 * volontairement irrégulier de la maquette, burger accessible en mobile.
 */

.stb-header {
	background: var(--stb-navy);
	position: sticky;
	top: 0;
	z-index: 100;
}

.stb-header__inner {
	max-width: var(--stb-container);
	margin-inline: auto;
	/* Padding réduit d'autant que le logo grandit juste en dessous : la hauteur totale du
	   bandeau (padding + logo) ne change pas, seul le logo prend plus de place dedans. */
	padding: 0.24rem clamp(1.25rem, 4vw, 2.5rem);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.stb-header__logo {
	display: flex;
	align-items: center;
	flex: none;
	/* .stb-header__logo est un <p> : sans ce reset, la marge par défaut des paragraphes
	   (base.css, "0 0 1em") le décentre verticalement dans le bandeau. */
	margin: 0;
}

.stb-header__logo svg,
.stb-header__logo img {
	height: 44px;
	width: auto;
	display: block;
}

.stb-header__logo a {
	display: block;
	line-height: 0;
}

/* Menu burger : masqué en desktop, visible en mobile. */
.stb-header__burger {
	display: none;
	background: transparent;
	border: none;
	color: var(--stb-white);
	width: 44px;
	height: 44px;
	cursor: pointer;
	align-items: center;
	justify-content: center;
}

.stb-header__burger svg {
	width: 26px;
	height: 26px;
}

.stb-nav__liste {
	list-style: none;
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	/* Espacement irrégulier volontaire de la maquette : grand vide après "Accueil",
	   items "Formations VAE Contact" resserrés. On fixe donc les marges item par item
	   plutôt qu'un gap uniforme. */
	gap: 0;
}

.stb-nav__liste a {
	display: block;
	color: var(--stb-white);
	text-decoration: none;
	font-weight: 400;
	font-size: 1.05rem;
	padding: 0.4rem 0.9rem;
	border-radius: var(--stb-radius-champ);
}

.stb-nav__liste li:first-child a {
	margin-right: 1.75rem;
}

.stb-nav__liste li:nth-child(2) a {
	margin-right: 1.75rem;
}

.stb-nav__liste a:hover,
.stb-nav__liste a:focus-visible {
	background: rgba(255, 255, 255, 0.12);
}

.stb-nav__liste .current-menu-item > a {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (max-width: 860px) {
	.stb-header__burger {
		display: inline-flex;
	}

	.stb-nav {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(320px, 85vw);
		height: 100vh;
		background: var(--stb-navy);
		transform: translateX(100%);
		transition: transform 0.25s ease;
		box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
		padding: 5rem 1.5rem 2rem;
		overflow-y: auto;
	}

	.stb-nav.is-ouvert {
		transform: translateX(0);
	}

	.stb-nav__liste {
		flex-direction: column;
		align-items: stretch;
		gap: 0.25rem;
	}

	.stb-nav__liste li:first-child a,
	.stb-nav__liste li:nth-child(2) a {
		margin-right: 0;
	}

	.stb-nav__liste a {
		padding: 0.9rem 1rem;
		font-size: 1.15rem;
	}

	.stb-nav__fermer {
		position: absolute;
		top: 1rem;
		right: 1rem;
		background: transparent;
		border: none;
		color: var(--stb-white);
		width: 44px;
		height: 44px;
		cursor: pointer;
	}

	.stb-nav__fermer svg {
		width: 22px;
		height: 22px;
	}

	.stb-nav-overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.45);
		z-index: 99;
	}

	.stb-nav-overlay.is-visible {
		display: block;
	}
}

@media (min-width: 861px) {
	.stb-nav__fermer,
	.stb-nav-overlay {
		display: none;
	}
}
