/*
 * Fuligule — mise en page : conteneur, en-tête, navigation, pied de page,
 * titres de section et grilles.
 */

.fm-conteneur {
	width: 100%;
	max-width: calc(var(--fm-largeur) + 2 * var(--fm-gouttiere));
	margin-inline: auto;
	padding-inline: var(--fm-gouttiere);
}

/* overflow-x: clip coupe les débords décoratifs (aplat bordeaux de la couverture)
   sans créer de conteneur de défilement. */
.fm-main {
	display: block;
	overflow-x: clip;
	padding-bottom: var(--fm-espace-section);
}

.fm-main:focus {
	outline: none;
}

/* Largeur par marges extérieures : une section pleine largeur porte
   fm-pleine-largeur et gère son propre conteneur. */
.fm-main > :not(.fm-pleine-largeur) {
	width: min(100% - 2 * var(--fm-gouttiere), var(--fm-largeur));
	margin-inline: auto;
}

.fm-main > :not(.fm-pleine-largeur) + :not(.fm-pleine-largeur) {
	margin-top: var(--fm-espace-5);
}

/* ---------- Épingle Fuligule ---------- */

.fm-epingle {
	display: inline-block;
	flex: none;
	width: auto;
	height: 1em;
	vertical-align: -0.12em;
}

/* ---------- En-tête ---------- */

.fm-entete {
	position: relative;
	z-index: 20;
	border-bottom: 1px solid var(--fm-filet);
	background: var(--fm-ivoire);
}

.fm-entete__barre {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--fm-espace-2);
	min-height: 60px;
}

.fm-marque {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-right: auto;
	padding-block: var(--fm-espace-2);
	color: var(--fm-encre);
	text-decoration: none;
}

/* Logo « Fuligule » (francemap_logo()) : une petite épingle à la place du point
   du « i ». Taille donnée par le font-size du parent ou de la classe. */
.fm-logo {
	position: relative;
	display: inline-block;
	font-family: var(--fm-police-titre);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
	white-space: nowrap;
}

.fm-logo__i {
	position: relative;
	display: inline-block;
}

.fm-logo .fm-logo__point {
	position: absolute;
	top: -0.2em;
	left: 50%;
	width: auto;
	height: 0.46em;
	transform: translateX(-50%);
}

.fm-marque__nom {
	font-size: 1.75rem;
}

/* Sous 900 px, le guide et le compte sont dans le menu (.fm-navigation__guide,
   .fm-navigation__compte), pas dans la barre. */
.fm-entete__guide,
.fm-entete__compte {
	display: none;
}

.fm-entete__bascule {
	display: inline-flex;
	align-items: center;
	gap: var(--fm-espace-2);
	min-height: 44px;
	padding: 0 var(--fm-espace-4);
	border: 0;
	border-radius: var(--fm-rayon-petit);
	background: var(--fm-encre);
	color: var(--fm-ivoire);
	font-weight: 600;
	cursor: pointer;
}

.fm-entete__bascule[aria-expanded="true"] {
	background: var(--fm-bordeaux);
	color: var(--fm-ivoire);
}

.fm-bascule__icone {
	display: inline-flex;
	flex-direction: column;
	gap: 5px;
	width: 18px;
}

.fm-bascule__icone span {
	display: block;
	height: 2px;
	background: currentColor;
	transition: transform var(--fm-duree) ease;
}

.fm-entete__bascule[aria-expanded="true"] .fm-bascule__icone span:nth-child(1) {
	transform: translateY(3.5px) rotate(45deg);
}

.fm-entete__bascule[aria-expanded="true"] .fm-bascule__icone span:nth-child(2) {
	transform: translateY(-3.5px) rotate(-45deg);
}

/* Navigation sous 900 px : carte blanche flottante sous l'en-tête, par-dessus
   la page voilée, lignes compactes avec icône et chevron, comme une appli.
   Sans script, la même carte reste dans le flux sous la barre. En ligne à
   partir de 900 px. */
.fm-navigation {
	flex-basis: 100%;
	order: 5;
	margin-bottom: var(--fm-espace-4);
	padding: var(--fm-espace-2);
	border-radius: var(--fm-rayon-grand);
	background: var(--fm-blanc);
	box-shadow: var(--fm-ombre-survol);
}

.fm-js .fm-navigation {
	display: none;
}

.fm-js .fm-navigation.est-ouvert {
	display: block;
	position: absolute;
	z-index: 2;
	top: calc(100% + var(--fm-espace-2));
	right: var(--fm-gouttiere);
	width: min(100% - 2 * var(--fm-gouttiere), 26rem);
	margin: 0;
	animation: fm-menu-entree var(--fm-duree) ease-out;
}

@keyframes fm-menu-entree {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.fm-js .fm-navigation.est-ouvert {
		animation: none;
	}
}

.fm-entete__voile {
	position: fixed;
	z-index: 1;
	inset: 0;
	background: rgb(41 21 29 / 30%);
}

.fm-entete__voile[hidden] {
	display: none;
}

.fm-navigation__liste {
	list-style: none;
}

.fm-navigation__liste a {
	display: flex;
	align-items: center;
	gap: var(--fm-espace-3);
	min-height: 52px;
	padding: 0 var(--fm-espace-3);
	border-radius: var(--fm-rayon);
	color: var(--fm-encre);
	font-size: 1.0625rem;
	font-weight: 600;
	text-decoration: none;
}

.fm-navigation__liste a:hover,
.fm-navigation__guide:hover {
	background: var(--fm-ivoire);
}

/* Page ouverte (2026-11-12, l'utilisateur confondait la mise en avant de la
   carte et du guide avec la page ouverte) : seul cet état a le fond teinté et
   le trait bordeaux à gauche ; plus de chevron, on y est déjà. */
.fm-navigation__liste a[aria-current="page"],
.fm-navigation__guide[aria-current="page"] {
	background: var(--fm-ivoire-fonce);
	box-shadow: inset 3px 0 0 var(--fm-bordeaux);
	color: var(--fm-bordeaux);
}

.fm-navigation [aria-current="page"] .fm-navigation__chevron {
	visibility: hidden;
}

/* Sur le fond teinté, la pastille de l'icône passe en blanc pour rester visible. */
.fm-navigation [aria-current="page"] .fm-navigation__icone:not(.fm-navigation__icone--plein) {
	background: var(--fm-blanc);
}

.fm-navigation__icone {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--fm-ivoire-fonce);
	color: var(--fm-bordeaux);
}

.fm-navigation__icone--plein {
	background: var(--fm-bordeaux);
	color: var(--fm-ivoire);
}

.fm-navigation__libelle {
	display: grid;
	flex: 1;
	line-height: 1.25;
}

/* Phrase sous « La carte » et « Le guide » : ce qui les distingue, sans
   ressembler à un état. */
.fm-navigation__sous {
	color: var(--fm-gris);
	font-size: var(--fm-taille-mini);
	font-weight: 400;
}

.fm-navigation__chevron {
	display: inline-flex;
	color: var(--fm-gris-clair);
}

/* Le guide : une ligne comme les autres, distinguée par sa phrase (plus de
   fond teinté permanent, qui se lisait comme la page ouverte). */
.fm-navigation__guide {
	display: flex;
	align-items: center;
	gap: var(--fm-espace-3);
	min-height: 52px;
	padding: 0 var(--fm-espace-3);
	border-radius: var(--fm-rayon);
	color: var(--fm-encre);
	font-size: 1.0625rem;
	font-weight: 600;
	text-decoration: none;
}

/* Compte : ligne sous un filet, en bas de la carte. */
.fm-navigation__compte {
	display: flex;
	align-items: center;
	gap: var(--fm-espace-3);
	min-height: 52px;
	margin-top: var(--fm-espace-2);
	padding: var(--fm-espace-2) var(--fm-espace-3) 0;
	border-top: 1px solid var(--fm-filet);
	color: var(--fm-encre);
	font-weight: 600;
	text-decoration: none;
}

.fm-navigation__compte:hover,
.fm-navigation__compte[aria-current="page"] {
	color: var(--fm-bordeaux);
}

/* Menu ouvert : la page ne défile plus ; la largeur de la barre de défilement
   est rendue en marge pour que rien ne bouge (navigation.js). */
.fm-menu-ouvert {
	overflow: hidden;
	padding-right: var(--fm-barre-defilement, 0);
}

@media (min-width: 900px) {
	.fm-entete__barre {
		flex-wrap: nowrap;
		gap: var(--fm-espace-6);
		min-height: 72px;
	}

	.fm-marque {
		margin-right: 0;
	}

	.fm-marque__nom {
		font-size: 2rem;
	}

	.fm-entete__bascule,
	.fm-navigation .fm-navigation__guide,
	.fm-navigation .fm-navigation__compte {
		display: none;
	}

	.fm-js .fm-navigation,
	.fm-navigation {
		display: flex;
		justify-content: center;
		flex: 1;
		order: 0;
		margin: 0;
		padding: 0;
		border-radius: 0;
		background: none;
		box-shadow: none;
	}

	.fm-entete__voile,
	.fm-navigation__icone,
	.fm-navigation__chevron,
	.fm-navigation__sous {
		display: none;
	}

	.fm-navigation__liste {
		display: flex;
		justify-content: center;
		gap: var(--fm-espace-6);
	}

	/* Menu en Playfair, comme la marque : présent sans crier. */
	.fm-navigation__liste a {
		min-height: 44px;
		padding: 0;
		border-radius: 0;
		font-family: var(--fm-police-titre);
		font-size: 1.375rem;
		font-weight: 700;
		letter-spacing: -0.01em;
		text-decoration: underline;
		text-decoration-color: transparent;
		text-decoration-thickness: 3px;
		text-underline-offset: 0.3em;
		transition: text-decoration-color var(--fm-duree) ease, color var(--fm-duree) ease;
	}

	.fm-navigation__liste a:hover {
		background: none;
		color: var(--fm-bordeaux);
		text-decoration-color: var(--fm-rose);
	}

	.fm-navigation__liste a[aria-current="page"] {
		background: none;
		box-shadow: none;
		color: var(--fm-encre);
		font-style: italic;
		text-decoration-color: var(--fm-bordeaux);
	}

	.fm-entete__guide {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: var(--fm-espace-2);
		min-height: 44px;
		color: var(--fm-encre);
		font-weight: 600;
		text-decoration: none;
		padding: 0 var(--fm-espace-5);
		border: 1.5px solid var(--fm-encre);
		border-radius: var(--fm-rayon-petit);
		transition: background-color var(--fm-duree) ease, color var(--fm-duree) ease;
	}

	.fm-entete__guide:hover,
	.fm-entete__guide[aria-current="page"] {
		background: var(--fm-encre);
		color: var(--fm-ivoire);
	}

	/* « Mon compte » (2026-11-17) : plus discret que le guide, sans cadre ;
	   l'icône dans une pastille teintée, comme dans le menu mobile. */
	.fm-entete__compte {
		display: inline-flex;
		align-items: center;
		gap: var(--fm-espace-2);
		min-height: 44px;
		margin-left: calc(-1 * var(--fm-espace-3));
		color: var(--fm-encre);
		font-weight: 600;
		text-decoration: none;
		white-space: nowrap;
		transition: color var(--fm-duree) ease;
	}

	.fm-entete__compte-icone {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 2.5rem;
		height: 2.5rem;
		border-radius: 50%;
		background: var(--fm-ivoire-fonce);
		color: var(--fm-bordeaux);
		transition: background-color var(--fm-duree) ease, color var(--fm-duree) ease;
	}

	.fm-entete__compte:hover,
	.fm-entete__compte[aria-current="page"] {
		color: var(--fm-bordeaux);
	}

	.fm-entete__compte:hover .fm-entete__compte-icone,
	.fm-entete__compte[aria-current="page"] .fm-entete__compte-icone {
		background: var(--fm-bordeaux);
		color: var(--fm-ivoire);
	}
}

/* ---------- Titre de section : petit trait arrondi, titre, lien à droite ---------- */

/* Petit trait au-dessus d'un titre, au lieu d'un filet sur toute la largeur */
.fm-titre-section,
.fm-bloc > h2 {
	--fm-trait: var(--fm-gris-clair);
	padding-top: var(--fm-espace-5);
	background:
		radial-gradient(circle at 2px 2px, var(--fm-trait) 2px, transparent 2.5px) 0 0 / 4px 4px no-repeat,
		radial-gradient(circle at 2px 2px, var(--fm-trait) 2px, transparent 2.5px) 52px 0 / 4px 4px no-repeat,
		linear-gradient(var(--fm-trait), var(--fm-trait)) 2px 0 / 52px 4px no-repeat;
}

.fm-titre-section {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--fm-espace-2) var(--fm-espace-6);
	margin-bottom: var(--fm-espace-5);
}

.fm-titre-section > div {
	display: grid;
	justify-items: start;
	gap: var(--fm-espace-2);
}

.fm-titre-section h2 {
	font-size: clamp(1.875rem, 3.4vw, 2.75rem);
}

.fm-titre-section--ocre {
	--fm-trait: var(--fm-ocre);
}

.fm-sombre .fm-titre-section {
	--fm-trait: var(--fm-rose);
}

/* Bloc secondaire (Découvrez aussi, listes) */
.fm-bloc {
	padding-top: var(--fm-espace-7);
}

.fm-main > .fm-bloc {
	margin-top: 0;
}

.fm-bloc > h2 {
	margin-bottom: var(--fm-espace-5);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
}

/* ---------- Grilles ---------- */

.fm-grille {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: var(--fm-espace-5);
	list-style: none;
}

.fm-grille--etroite {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
	gap: var(--fm-espace-5) var(--fm-espace-4);
}

/* « À découvrir à proximité » (2026-11-17, demande de l'utilisateur) : des
   cartes de même taille quel que soit leur nombre (1 à 3), proches de celle
   des produits ; réduites encore le même jour : 2 colonnes sur téléphone,
   3 dès 640 px, 4 dès 900 px, 5 dès 1200 px. */
.fm-grille--voisins {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--fm-espace-4) var(--fm-espace-3);
}

@media (min-width: 640px) {
	.fm-grille--voisins {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--fm-espace-4);
	}
}

/* Colonnes toujours égales (minmax(0, 1fr), 2026-11-17) : avec 1fr seul, une
   carte au contenu large (étiquettes de métiers) élargissait sa colonne. */
@media (min-width: 900px) {
	.fm-grille {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.fm-grille.fm-grille--voisins {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.fm-grille--etroite {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.fm-grille {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.fm-grille.fm-grille--voisins {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

/* ---------- Pied de page ---------- */

.fm-pied {
	--fm-epingle: var(--fm-rose);
	--fm-epingle-centre: var(--fm-encre);
	border-radius: var(--fm-rayon-grand) var(--fm-rayon-grand) 0 0;
	background: var(--fm-encre);
	color: var(--fm-gris-clair);
	font-size: var(--fm-taille-petit);
}

.fm-pied a {
	color: var(--fm-ivoire);
	text-decoration: none;
}

.fm-pied a:hover {
	text-decoration: underline;
	text-decoration-color: var(--fm-rose);
}

.fm-pied :focus-visible {
	outline-color: var(--fm-rose);
}

.fm-pied__haut {
	display: grid;
	gap: var(--fm-espace-6);
	padding-block: var(--fm-espace-7) var(--fm-espace-6);
}

.fm-pied__marque {
	display: inline-flex;
	align-items: center;
	gap: 0.15em;
	color: var(--fm-ivoire);
	font-family: var(--fm-police-titre);
	font-size: clamp(2.25rem, 5vw, 3.25rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
}

.fm-pied a.fm-pied__marque:hover {
	text-decoration: none;
}

.fm-pied__accroche {
	max-width: 26rem;
	margin-top: var(--fm-espace-3);
	color: var(--fm-gris-clair);
	font-size: 1rem;
}

/* Réseaux du site : pastilles rondes à icône, contour clair. */
.fm-pied__reseaux {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fm-espace-2);
	margin-top: var(--fm-espace-5);
	list-style: none;
}

.fm-pied__reseaux a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--fm-filet-sombre);
	border-radius: 50%;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.fm-pied__reseaux a:hover {
	border-color: var(--fm-rose);
	background: var(--fm-rose);
	color: var(--fm-encre);
}

.fm-pied__reseaux .fm-icone-reseau {
	width: 18px;
	height: 18px;
}

/* Groupes de liens en lignes (essai 2026-11-12) : titre à gauche, liens à la
   suite ; sous 640 px le titre passe au-dessus de ses liens. */
.fm-pied__colonnes {
	display: grid;
	align-content: center;
	gap: var(--fm-espace-3);
}

.fm-pied__colonne {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 var(--fm-espace-5);
}

/* Titre de groupe : Playfair, petit trait arrondi rose devant (pas de filet plein). */
.fm-pied__titre-colonne {
	display: flex;
	flex: 0 0 8rem;
	align-items: center;
	gap: var(--fm-espace-2);
	color: var(--fm-ivoire);
	font-family: var(--fm-police-titre);
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.fm-pied__titre-colonne::before {
	content: "";
	flex: none;
	width: 14px;
	height: 3px;
	border-radius: 2px;
	background: var(--fm-rose);
}

.fm-pied__liste {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--fm-espace-5);
	list-style: none;
}

.fm-pied__liste a {
	display: inline-flex;
	align-items: center;
	gap: var(--fm-espace-2);
	min-height: 40px;
	color: var(--fm-gris-clair);
}

.fm-pied__liste a:hover {
	color: var(--fm-ivoire);
}

.fm-pied__bas {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 var(--fm-espace-5);
	padding-block: var(--fm-espace-3);
	/* Place du bouton « Haut de page » (44 px, à 16-24 px du bord) en bas de page */
	padding-right: 56px;
	border-top: 1px solid var(--fm-filet-sombre);
	font-size: 0.875rem;
}

/* Le canard (mascotte) dans une pastille blanc rosé, à gauche du © */
.fm-pied__copyright {
	display: inline-flex;
	align-items: center;
	gap: var(--fm-espace-2);
}

.fm-pied__canard {
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

.fm-pied__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--fm-espace-5);
	list-style: none;
}

.fm-pied__legal a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	color: var(--fm-gris-clair);
}

.fm-pied__legal a:hover {
	color: var(--fm-ivoire);
}

/* Tablette et téléphone : pied compact (marque plus petite, sans la phrase,
   liens plus serrés). */
@media (max-width: 899.98px) {
	.fm-pied__haut {
		gap: var(--fm-espace-5);
		padding-block: var(--fm-espace-6) var(--fm-espace-5);
	}

	.fm-pied__marque {
		font-size: 1.75rem;
	}

	.fm-pied__accroche {
		display: none;
	}

	.fm-pied__reseaux {
		margin-top: var(--fm-espace-3);
	}

	.fm-pied__titre-colonne {
		font-size: 1rem;
	}

	.fm-pied__liste {
		gap: 0 var(--fm-espace-4);
	}

	.fm-pied__liste a {
		min-height: 34px;
		line-height: 1.3;
	}
}

@media (max-width: 639.98px) {
	.fm-pied__titre-colonne {
		flex-basis: 100%;
		margin-bottom: var(--fm-espace-1);
	}

	.fm-pied__bas {
		padding-block: var(--fm-espace-2) var(--fm-espace-3);
	}

	.fm-pied__legal {
		gap: 0 var(--fm-espace-4);
	}

	.fm-pied__legal a {
		min-height: 32px;
	}
}

@media (min-width: 900px) {
	.fm-pied__haut {
		grid-template-columns: 4fr 7fr;
		gap: var(--fm-espace-7);
	}
}
