/*
 * En-tête du site, commun à toutes les pages (maquette : variante « Kiosque », data-head="v1").
 * Trois rangées : bandeau de réassurance encre, barre burger + navigation / logo / actions, ligne de date.
 * Au défilement, seule la barre reste visible (classe .colle posée par entete.js).
 */

.sh-hote {
	position: sticky;
	top: calc(-1 * var(--sh-info-h, 0px));
	z-index: 95;
}

.sh {
	position: relative;
	z-index: 90;
	background: var(--sable);
	font-family: var(--font-sans);
}

.sh.colle {
	box-shadow: 0 1px 0 var(--trait), 0 10px 24px rgba(30, 27, 23, 0.06);
}

.sh.colle .sh-date {
	height: 0;
	overflow: hidden;
}

/* ---------- Bandeau de réassurance ---------- */
.sh-info {
	overflow: hidden;
	background: var(--encre);
	color: var(--sur-encre);
}

.sh-items {
	list-style: none;
	margin: 0;
	padding: 0 var(--marge-page);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0 34px;
	white-space: nowrap;
	min-height: 38px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: -0.005em;
}

.sh-items li {
	display: inline-flex;
	align-items: center;
	gap: 9px;
}

.sh-items li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--dot, var(--rose-clair));
	flex: none;
}

.sh-items li:nth-child(5n + 1) { --dot: var(--rose-clair); }
.sh-items li:nth-child(5n + 2) { --dot: var(--citron); }
.sh-items li:nth-child(5n + 3) { --dot: var(--pistache); }
.sh-items li:nth-child(5n + 4) { --dot: var(--orange); }
.sh-items li:nth-child(5n + 5) { --dot: var(--rose-clair); }

/* ---------- Barre principale ---------- */
.sh-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 16px 28px;
	padding-block: 24px;
}

.sh-left {
	display: flex;
	align-items: center;
	gap: 6px 24px;
	justify-self: start;
	min-width: 0;
}

.sh-nav {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px 24px;
}

.sh-nav a,
.sh-link {
	color: var(--encre);
	text-decoration: none;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.sh-nav a:hover,
.sh-link:hover,
.sh-nav a[aria-current="page"],
.sh-link[aria-current="page"] {
	color: var(--rose);
}

.sh-logo {
	display: block;
	justify-self: center;
}

.sh-logo img {
	width: 232px;
	max-width: 100%;
	height: auto;
	display: block;
}

.sh-right {
	display: flex;
	align-items: center;
	gap: 8px 24px;
	justify-self: end;
}

.sh .mfaj-btn--sm {
	min-height: 50px;
	padding: 0 24px;
	font-size: 16px;
}

/* Panier affiché : côté droit resserré pour garder autour du logo le même écart qu'à gauche
   (sans cela, l'icône du panier poussait « Échantillons » contre le logo). L'icône garde sa zone
   de clic de 44 px. Sous 1001 px, l'en-tête a sa propre disposition. */
@media (min-width: 1001px) {
	.sh-right--panier {
		gap: 8px 18px;
	}

	.sh-right--panier .sh-panier {
		margin-inline: -6px;
	}

	.sh .sh-right--panier .mfaj-btn--sm {
		padding: 0 20px;
	}
}

/* Panier affiché, navigation déjà dans le menu : « Mon compte » puis « Échantillons » y passent un
   peu plus tôt que sans panier (seuils 1250 et 1000 px plus bas), pour ne jamais toucher le logo. */
@media (max-width: 1320px) {
	.sh-right--panier .sh-log {
		display: none;
	}
}

@media (max-width: 1100px) {
	.sh-right--panier .sh-ech {
		display: none;
	}
}

/* Bouton menu */
.burger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 6px;
	margin-left: -6px;
	border: none;
	background: transparent;
	color: var(--encre);
	font: 600 16px var(--font-sans);
	cursor: pointer;
}

.burger svg {
	width: 24px;
	height: 17px;
}

.burger:hover {
	color: var(--rose);
}

.burger .b1,
.burger .b2,
.burger .b3 {
	transition: transform 0.3s ease, opacity 0.2s ease;
	transform-origin: 10px 7px;
}

.burger[aria-expanded="true"] .b1 { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .b2 { opacity: 0; }
.burger[aria-expanded="true"] .b3 { transform: translateY(-6px) rotate(-45deg); }

/* Sur grand écran, la navigation est visible : le libellé « Menu » est réservé aux lecteurs d'écran */
.burger-l {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* Panier : affiché seulement quand il contient au moins un journal (absent de la maquette) */
.sh-panier {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--encre);
	text-decoration: none;
}

.sh-panier svg {
	width: 24px;
	height: 24px;
}

.sh-panier:hover {
	color: var(--rose);
}

.sh-badge {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: var(--radius-pill);
	background: var(--rose);
	color: var(--sur-rose);
	font-size: 11.5px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* ---------- Ligne de date ---------- */
.sh-date-in {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 6px 24px;
	padding-block: 9px;
	border-top: 1px solid var(--trait);
	border-bottom: 1px solid var(--trait);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--encre-3);
}

/* ---------- Menu : panneau qui passe devant la page ---------- */
.sh-menu {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 2;
	max-height: calc(100dvh - var(--sh-menu-top, 140px));
	overflow-y: auto;
	padding-inline: clamp(12px, 3vw, 48px);
	/* Le conteneur défile, donc coupe ce qui dépasse : la marge du bas laisse toute la place à
	 * l'ombre du panneau (30 px de décalage + 70 px de flou). Cette zone est transparente et laisse
	 * passer les clics vers le voile, qui ferme le menu. */
	padding-bottom: 104px;
	pointer-events: none;
}

.shm-in {
	pointer-events: auto;
	max-width: 1264px;
	margin: 10px auto 0;
	background: var(--papier);
	border-radius: 24px;
	border: 1px solid var(--trait-fin);
	box-shadow: var(--ombre-panneau);
	overflow: hidden;
	animation: shm-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shm-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0;
	padding: 32px 40px 28px;
}

.mcol {
	min-width: 0;
	padding: 0 26px;
	border-left: 1px solid var(--trait-fin);
}

.shm-grid > .mcol:nth-child(2) {
	padding-left: 0;
	border-left: 0;
}

/* Pastille de couleur de chaque colonne, dans l'ordre de la maquette */
.shm-grid > .mcol:nth-child(2) { --d: var(--rose); }
.shm-grid > .mcol:nth-child(3) { --d: var(--orange); }
.shm-grid > .mcol:nth-child(4) { --d: var(--citron); }
.shm-grid > .mcol:nth-child(5) { --d: var(--pistache); }
.shm-grid > .mcol:nth-child(6) { --d: var(--rose-clair); }

.shm-main {
	display: none;
	--d: var(--encre);
}

.shm-k {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 11px;
	color: var(--encre-3);
}

.shm-k::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--d, var(--encre));
}

.mcol a {
	display: block;
	padding: 6px 0;
	font-family: var(--font-sans);
	font-size: 16.5px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.005em;
	text-decoration: none;
	color: var(--encre);
}

.mcol a small {
	margin-left: 8px;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--encre-3);
	white-space: nowrap;
}

.mcol a:hover,
.mcol a[aria-current="page"] {
	color: var(--rose);
}

.shm-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px 24px;
	padding: 16px 40px 18px;
	background: var(--papier-2);
	border-top: 1px solid var(--filet-papier);
	font-size: 14px;
	color: var(--encre-2);
}

.sh-backdrop {
	position: fixed;
	inset: 0;
	z-index: 85;
	background: transparent;
}

@keyframes shm-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
}

/* ---------- Points de rupture de la maquette ---------- */
@media (max-width: 1340px) {
	.sh-nav {
		display: none;
	}

	.burger-l {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}

	.shm-main {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 2px 28px;
		grid-column: 1 / -1;
		padding: 0 0 18px;
		margin-bottom: 26px;
		border-bottom: 1px solid var(--trait-fin);
	}

	.shm-grid > .mcol.shm-main {
		padding-left: 0;
		border-left: 0;
	}

	.shm-main .shm-k {
		display: none;
	}

	.shm-main a {
		font-size: 18px;
	}
}

@media (max-width: 1250px) {
	.sh-log {
		display: none;
	}
}

@media (max-width: 1000px) {
	.sh-ech {
		display: none;
	}
}

@media (max-width: 900px) {
	.sh-items {
		justify-content: flex-start;
	}

	.sh-info {
		overflow-x: auto;
		scrollbar-width: none;
	}

	.sh-info::-webkit-scrollbar {
		display: none;
	}

	.shm-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 26px 20px;
		padding: 24px;
	}

	.shm-grid > .mcol,
	.shm-grid > .mcol:nth-child(2) {
		padding: 0;
		border-left: 0;
	}

	.shm-main {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		margin-bottom: 0;
	}

	.shm-main .shm-k {
		display: flex;
	}
}

@media (max-width: 860px) {
	.sh-main {
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: 16px;
	}

	.sh-logo img {
		width: 200px;
	}
}

@media (max-width: 640px) {
	.sh-main {
		grid-template-columns: auto minmax(0, 1fr) auto;
		padding-block: 16px;
	}

	.sh-logo img {
		width: 180px;
	}

	.sh-ech,
	.sh-cta {
		display: none;
	}

	.sh-date-in {
		justify-content: center;
		font-size: 10px;
		letter-spacing: 0.08em;
		white-space: nowrap;
		gap: 4px 14px;
		flex-wrap: wrap;
		text-align: center;
	}

	.sh-date-in .sh-day {
		display: none;
	}

	.shm-foot {
		padding: 14px 24px 18px;
	}

	.sh-right {
		min-width: 44px;
	}
}

@media (max-width: 560px) {
	.mcol a small {
		display: block;
		margin: 1px 0 0;
	}
}

@media (max-width: 359px) {
	.sh-date-in {
		white-space: normal;
		flex-wrap: wrap;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.shm-in,
	.sh-backdrop {
		animation: none;
	}
}
