/*
 * En-tête, panneau mobile et pied de page.
 * Points de rupture : 1100 px (tablette) et 760 px (mobile).
 */

:root {
	--fgv-foret: var(--wp--preset--color--foret);
	--fgv-foret-fonce: var(--wp--preset--color--foret-fonce);
	--fgv-vert: var(--wp--preset--color--vert);
	--fgv-encre: var(--wp--preset--color--encre);
	--fgv-gris-1: var(--wp--preset--color--gris-1);
	--fgv-gris-2: var(--wp--preset--color--gris-2);
	--fgv-ligne: color-mix(in srgb, var(--fgv-foret) 14%, transparent);
	--fgv-vert-pale: color-mix(in srgb, var(--fgv-vert) 9%, #fff);
	--fgv-gouttiere: max(48px, calc((100% - 1440px) / 2 + 48px));
	--fgv-ease: cubic-bezier(0.22, 0.8, 0.3, 1);
	--fgv-barre-h: 44px;
	--fgv-entete-h: 112px;
}

/*
 * Sous 600 px, la barre d'admin de WordPress n'est plus fixe : elle part avec
 * le défilement. Les barres collantes ne lui réservent donc plus de place.
 */
@media (max-width: 600px) {
	html {
		--wp-admin--admin-bar--height: 0px;
	}
}

/* Décalage des ancres sous les barres collantes. */
:target,
[id] {
	scroll-margin-top: calc(var(--fgv-entete-h) + 16px);
}

.fgv-aller-au-contenu:focus {
	clip: auto !important;
	clip-path: none;
	width: auto;
	height: auto;
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100;
	background: #fff;
	padding: 10px 16px;
	border-radius: 999px;
}

/* ---------- Boutons du thème (en-tête et pied) ---------- */

.fgv-bouton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border: 2px solid var(--fgv-foret);
	border-radius: 999px;
	background: var(--fgv-foret);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s var(--fgv-ease), color 0.2s var(--fgv-ease), border-color 0.2s var(--fgv-ease), transform 0.2s var(--fgv-ease);
}

.fgv-bouton:hover,
.fgv-bouton:focus-visible {
	background: var(--fgv-vert);
	border-color: var(--fgv-vert);
	color: var(--fgv-encre);
}

.fgv-bouton:active {
	transform: scale(0.97);
}

.fgv-bouton--clair {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

.fgv-bouton--vert {
	background: var(--fgv-vert);
	border-color: var(--fgv-vert);
	color: var(--fgv-encre);
}

.fgv-bouton--clair:hover,
.fgv-bouton--vert:hover {
	background: #fff;
	border-color: #fff;
	color: var(--fgv-encre);
}

/* Focus visible : anneau commun dans assets/css/theme.css. */

.fgv-icone {
	width: 13px;
	height: 13px;
	flex: none;
	display: block;
}

.fgv-icone--externe {
	width: 12px;
	height: 12px;
	opacity: 0.8;
}

.fgv-court {
	display: none;
}

/* ---------- Barre verte ---------- */

.fgv-barre-verte {
	position: sticky;
	top: 0;
	z-index: 52;
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 9px var(--fgv-gouttiere);
	background: var(--fgv-foret);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	transition: transform 0.3s var(--fgv-ease);
}

.admin-bar .fgv-barre-verte {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.fgv-barre-cachee .fgv-barre-verte {
	transform: translateY(-120%);
}

.fgv-barre-verte__liens,
.fgv-barre-verte__fin {
	display: flex;
	align-items: center;
	gap: 22px;
}

.fgv-barre-verte__liens {
	flex: 1;
	min-width: 0;
}

.fgv-barre-verte a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #fff;
	opacity: 0.9;
	text-decoration: none;
}

.fgv-barre-verte a:hover {
	opacity: 1;
	text-decoration: underline;
}

.fgv-barre-verte .fgv-barre-verte__retour {
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 999px;
	padding: 4px 10px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 1;
}

.fgv-barre-verte .fgv-barre-verte__retour:hover {
	background: #fff;
	color: var(--fgv-foret);
	text-decoration: none;
}

.fgv-barre-verte .fgv-a-venir {
	color: rgba(255, 255, 255, 0.75);
}

.fgv-langue {
	font-weight: 700;
}

.fgv-reseaux {
	display: flex;
	align-items: center;
	gap: 8px;
}

.fgv-reseaux a {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	color: #fff;
	opacity: 1;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.fgv-reseaux .fgv-icone {
	/* Taille paire : centrée au pixel près dans le rond de 28 px, sans demi-pixel. */
	width: 14px;
	height: 14px;
}

.fgv-barre-verte .fgv-reseaux a:hover {
	background: var(--fgv-vert);
	border-color: var(--fgv-vert);
	color: var(--fgv-encre);
	text-decoration: none;
}

/* ---------- Menu principal ---------- */

.fgv-entete {
	position: sticky;
	top: var(--fgv-barre-h);
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px var(--fgv-gouttiere);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	transition: top 0.3s var(--fgv-ease), box-shadow 0.25s ease, padding 0.25s ease;
}

.admin-bar .fgv-entete {
	top: calc(var(--fgv-barre-h) + var(--wp-admin--admin-bar--height, 32px));
}

.fgv-barre-cachee .fgv-entete {
	top: 0;
}

.admin-bar.fgv-barre-cachee .fgv-entete {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.fgv-compact .fgv-entete {
	padding-top: 8px;
	padding-bottom: 8px;
	box-shadow: 0 8px 24px rgba(15, 36, 25, 0.08);
}

.fgv-logo {
	flex: none;
	margin-right: auto;
	display: block;
}

.fgv-logo__image {
	display: block;
	width: auto;
	height: 84px;
	transition: height 0.25s ease;
}

.fgv-compact .fgv-logo__image {
	height: 60px;
}

.fgv-menu__liste {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.fgv-menu__lien {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	border-radius: 999px;
	color: var(--fgv-gris-1);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s var(--fgv-ease), color 0.2s var(--fgv-ease);
}

.fgv-menu__lien--evenement::before {
	content: "";
	width: 10px;
	height: 10px;
	flex: none;
	border-radius: 50%;
	background: var(--ev);
}

.fgv-menu__lien--evenement:hover {
	background: color-mix(in srgb, var(--ev) 18%, transparent);
	color: var(--fgv-encre);
}

.fgv-menu__lien--evenement.est-courant {
	background: color-mix(in srgb, var(--ev) 30%, transparent);
	color: var(--fgv-encre);
}

.fgv-menu__separateur {
	width: 1px;
	height: 22px;
	margin: 0 6px;
	background: var(--fgv-ligne);
}

.fgv-menu__element--parent {
	position: relative;
}

.fgv-menu__lien--parent {
	color: var(--fgv-foret);
	font-weight: 800;
}

.fgv-menu__fleche {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.18s ease;
}

.fgv-menu__element--parent::after {
	content: "";
	position: absolute;
	top: 100%;
	left: -20px;
	right: -20px;
	height: 22px;
}

.fgv-menu__element--parent:hover .fgv-menu__lien--parent,
.fgv-menu__element--parent:focus-within .fgv-menu__lien--parent {
	background: color-mix(in srgb, var(--fgv-vert) 16%, transparent);
}

.fgv-menu__element--parent:hover .fgv-menu__fleche,
.fgv-menu__element--parent:focus-within .fgv-menu__fleche {
	transform: rotate(180deg);
}

.fgv-menu__sous-menu {
	position: absolute;
	top: calc(100% + 18px);
	left: 50%;
	z-index: 60;
	display: none;
	min-width: 250px;
	margin: 0;
	padding: 8px;
	list-style: none;
	transform: translateX(-50%);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(15, 36, 25, 0.18);
}

.fgv-menu__element--parent:hover .fgv-menu__sous-menu,
.fgv-menu__element--parent:focus-within .fgv-menu__sous-menu {
	display: block;
}

.fgv-menu__sous-lien {
	display: block;
	padding: 11px 18px;
	border-radius: 999px;
	color: var(--fgv-encre);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.fgv-menu__sous-lien:hover {
	background: color-mix(in srgb, var(--fgv-vert) 16%, transparent);
	color: var(--fgv-foret);
}

.fgv-entete .fgv-bouton--inscription {
	flex: none;
	margin-left: 4px;
	padding: 0 18px;
	font-size: 13px;
}

.fgv-burger {
	display: none;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--fgv-vert) 7%, transparent);
	cursor: pointer;
}

.fgv-burger span[aria-hidden] {
	display: block;
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: var(--fgv-encre);
	transition: transform 0.25s var(--fgv-ease), opacity 0.2s;
}

.fgv-menu-ouvert .fgv-burger span[aria-hidden]:nth-of-type(2) {
	transform: translateY(7px) rotate(45deg);
}

.fgv-menu-ouvert .fgv-burger span[aria-hidden]:nth-of-type(3) {
	opacity: 0;
}

.fgv-menu-ouvert .fgv-burger span[aria-hidden]:nth-of-type(4) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Panneau mobile ---------- */

.fgv-panneau {
	display: none;
}

.fgv-panneau__groupe {
	display: flex;
	flex-direction: column;
}

.fgv-panneau__lien {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 13px 4px;
	border-bottom: 1px solid var(--fgv-ligne);
	color: var(--fgv-encre);
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
}

.fgv-panneau__lien--evenement::before {
	content: "";
	width: 12px;
	height: 12px;
	flex: none;
	border-radius: 50%;
	background: var(--ev);
}

.fgv-panneau__lien--titre {
	color: var(--fgv-foret);
	font-weight: 800;
}

.fgv-panneau__lien--enfant {
	padding-left: 24px;
	font-size: 15px;
	font-weight: 600;
}

.fgv-panneau > .fgv-bouton {
	align-self: flex-start;
}

.fgv-panneau__secondaire {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 6px;
	padding: 16px 18px;
	border-radius: 18px;
	background: var(--fgv-vert-pale);
}

.fgv-panneau__secondaire-lien,
.fgv-panneau__secondaire .fgv-a-venir {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 11px 0;
	border-bottom: 1px solid var(--fgv-ligne);
	color: var(--fgv-encre);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.fgv-panneau__secondaire .fgv-a-venir {
	color: var(--fgv-gris-2);
}

.fgv-panneau__pied {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 14px;
}

.fgv-panneau__langue {
	padding: 7px 16px;
	border: 2px solid var(--fgv-foret);
	border-radius: 999px;
	color: var(--fgv-foret);
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

.fgv-reseaux--panneau a {
	width: 38px;
	height: 38px;
	border: 0;
	background: var(--fgv-foret);
}

.fgv-reseaux--panneau .fgv-icone {
	width: 16px;
	height: 16px;
}

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

.fgv-pied {
	padding: 120px var(--fgv-gouttiere) 28px;
	background: var(--fgv-foret-fonce);
	color: #fff;
}

.fgv-pied__haut {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 60px;
	align-items: start;
}

.fgv-pied__logo img {
	display: block;
	width: auto;
	height: 44px;
	margin-bottom: 22px;
}

.fgv-pied__titre {
	max-width: 620px;
	margin: 0 0 20px;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.01em;
}

.fgv-reseaux--pied {
	margin-top: 26px;
	gap: 10px;
}

.fgv-reseaux--pied a {
	width: 34px;
	height: 34px;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
}

.fgv-reseaux--pied a:hover {
	background: var(--fgv-vert);
	color: var(--fgv-encre);
}

.fgv-pied__membre {
	padding: 30px;
	border-radius: var(--wp--custom--rayon--grand);
	background: rgba(255, 255, 255, 0.08);
}

.fgv-pied__surtitre {
	display: block;
	margin-bottom: 14px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.fgv-pied__membre-titre {
	margin: 0 0 10px;
	color: #fff;
	font-size: var(--wp--preset--font-size--grand);
}

.fgv-pied__membre p {
	margin: 0 0 18px;
	color: rgba(255, 255, 255, 0.88);
}

.fgv-pied__liens {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 22px;
	margin-top: 44px;
	padding: 44px 0 26px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.fgv-pied__lien,
.fgv-pied .fgv-a-venir {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.fgv-pied__lien .fgv-icone--externe {
	transition: transform 0.2s var(--fgv-ease), opacity 0.2s;
}

.fgv-pied__lien:hover {
	color: #fff;
	text-decoration: underline;
}

.fgv-pied__lien:hover .fgv-icone--externe {
	opacity: 1;
	transform: translate(2px, -2px);
}

.fgv-pied__bas {
	display: flex;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 26px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 11px;
	letter-spacing: 0.06em;
}

.fgv-pied__bas p {
	margin: 0;
}

.fgv-pied__bas a {
	color: inherit;
	text-decoration: none;
}

.fgv-pied__bas a:hover {
	color: #fff;
	text-decoration: underline;
}

.fgv-pied__legal .fgv-icone--externe {
	display: none;
}

/* ---------- Écrans de portable (1181 à 1440 px) ----------
 * Le menu complet (« Tour de l'Île · Découverte » au long) demande environ
 * 1450 px : on le resserre pour que le bouton d'inscription ne soit jamais
 * coupé (commentaires V2, maquette du 21 oct.).
 */

@media (min-width: 1181px) and (max-width: 1360px) {
	.fgv-entete {
		--fgv-gouttiere: 24px;
	}
}

@media (min-width: 1181px) and (max-width: 1440px) {
	.fgv-entete {
		gap: 10px;
	}

	.fgv-logo__image {
		height: 64px;
	}

	.fgv-compact .fgv-logo__image {
		height: 56px;
	}

	.fgv-menu__liste {
		gap: 2px;
	}

	.fgv-menu__lien {
		padding: 8px 9px;
	}

	.fgv-menu__separateur {
		margin: 0 4px;
	}

	.fgv-entete .fgv-bouton--inscription {
		padding: 0 14px;
	}
}

/* Version anglaise, plus longue : liens resserrés à toutes les largeurs,
 * logo réduit jusqu'à 1600 px. */
@media (min-width: 1441px) and (max-width: 1600px) {
	html[lang^="en"] .fgv-logo__image {
		height: 64px;
	}

	html[lang^="en"] .fgv-compact .fgv-logo__image {
		height: 56px;
	}
}

@media (min-width: 1441px) {
	html[lang^="en"] .fgv-entete {
		gap: 10px;
	}

	html[lang^="en"] .fgv-menu__liste {
		gap: 2px;
	}

	html[lang^="en"] .fgv-menu__lien {
		padding: 8px 9px;
	}

	html[lang^="en"] .fgv-menu__separateur {
		margin: 0 4px;
	}

	html[lang^="en"] .fgv-entete .fgv-bouton--inscription {
		padding: 0 14px;
	}
}

/* Plus étroit encore (1181 à 1300 px), surtout pour la version anglaise
 * (« 2027 Registration ») : maquette corrigée du 21 octobre. */
@media (min-width: 1181px) and (max-width: 1300px) {
	.fgv-entete {
		gap: 8px;
	}

	.fgv-logo__image,
	.fgv-compact .fgv-logo__image {
		height: 54px;
	}

	.fgv-menu__lien {
		gap: 6px;
		padding: 8px 7px;
		font-size: 12px;
	}

	.fgv-menu__lien--evenement::before {
		width: 8px;
		height: 8px;
	}

	.fgv-menu__separateur {
		display: none;
	}

	.fgv-entete .fgv-bouton--inscription {
		padding: 0 13px;
		font-size: 12px;
	}
}

/* ---------- Menu burger (1180 px et moins) ---------- */

@media (max-width: 1180px) {
	.fgv-menu {
		display: none;
	}

	.fgv-burger {
		display: flex;
	}

	.fgv-entete {
		gap: 12px;
	}

	.fgv-menu-ouvert .fgv-panneau {
		position: fixed;
		top: calc(var(--fgv-barre-h) + var(--fgv-entete-h));
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 60;
		display: flex;
		flex-direction: column;
		gap: 18px;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 20px max(20px, 4vw) 40px;
		background: #fff;
		border-top: 1px solid var(--fgv-ligne);
	}

	.admin-bar.fgv-menu-ouvert .fgv-panneau {
		top: calc(var(--fgv-barre-h) + var(--fgv-entete-h) + var(--wp-admin--admin-bar--height, 46px));
	}

	.fgv-barre-cachee.fgv-menu-ouvert .fgv-panneau {
		top: var(--fgv-entete-h);
	}

	body.fgv-menu-ouvert {
		overflow: hidden;
	}
}

/* ---------- Tablette (1100 px et moins) ---------- */

@media (max-width: 1100px) {
	.fgv-barre-verte,
	.fgv-barre-verte__liens {
		gap: 14px;
	}

	/* Garder Retour, Bénévoles et Infos circulation (19 oct.). */
	.fgv-barre-verte__externe {
		display: none !important;
	}

	.fgv-barre-verte .fgv-a-venir .fgv-long {
		display: none;
	}

	.fgv-barre-verte .fgv-a-venir .fgv-court {
		display: inline;
	}

}

/* ---------- Mobile (760 px et moins) ---------- */

@media (max-width: 760px) {
	:root {
		--fgv-gouttiere: 20px;
	}

	.fgv-barre-verte .fgv-reseaux {
		display: none;
	}

	.fgv-long {
		display: none;
	}

	.fgv-court {
		display: inline;
	}

	.fgv-logo__image,
	.fgv-compact .fgv-logo__image {
		height: 46px;
	}

	.fgv-entete .fgv-bouton--inscription {
		min-height: 40px;
		padding: 0 14px;
		font-size: 12px;
	}

	.fgv-pied__haut {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.fgv-pied__titre {
		font-size: 28px;
	}

	.fgv-pied__bas {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fgv-barre-verte,
	.fgv-entete,
	.fgv-logo__image,
	.fgv-bouton {
		transition: none;
	}
}
