/**
 * Navigation Bodyfitnet : blanc pur, bleu nuit et accent orange de la page d'accueil.
 * Le menu original reste visible si le logo n'est pas trouve par header-menu.js.
 */
.bfn-header {
	position: sticky;
	top: 0;
	z-index: 999;
	width: 100%;
	background: #ffffff;
	border-bottom: 1px solid rgba(24, 49, 60, 0.09);
	box-shadow: 0 5px 28px rgba(24, 49, 60, 0.055);
	font-family: inherit;
}

body.admin-bar .bfn-header {
	top: 32px;
}

body.bfn-menu-ready .bfn-original-header {
	display: none !important;
}

.bfn-header__inner {
	display: flex;
	align-items: center;
	gap: 34px;
	width: min(100% - 48px, 1240px);
	min-height: 92px;
	margin-inline: auto;
}

.bfn-header__brand {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	width: min(24vw, 218px);
	min-width: 130px;
	max-width: 218px;
	line-height: 1;
}

.bfn-header__brand img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 66px;
	object-fit: contain;
	object-position: left center;
}

.bfn-header__nav {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(28px, 5vw, 88px);
	min-width: 0;
}

.bfn-header__links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(24px, 3vw, 56px);
	margin-right: auto;
	margin-left: auto;
}

.bfn-header__link {
	display: inline-block;
	padding: 13px 4px;
	color: #18313c;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
	white-space: nowrap;
	transition: color 180ms ease;
}

.bfn-header__link:hover,
.bfn-header__link:focus-visible {
	color: #f4732e;
}

.bfn-header__cta {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 52px;
	padding: 13px 26px;
	border: 1px solid #fe7541;
	border-radius: 999px;
	background: #fe7541;
	box-shadow: 0 8px 24px rgba(254, 117, 65, 0.19);
	color: #fff;
	font-size: 15px;
	font-weight: 750;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.bfn-header__cta::after {
	content: "→";
	font-size: 21px;
	font-weight: 400;
	line-height: 1;
}

.bfn-header__cta:hover,
.bfn-header__cta:focus-visible {
	background: #e96227;
	border-color: #e96227;
	box-shadow: 0 10px 28px rgba(254, 117, 65, 0.25);
	color: #fff;
	transform: translateY(-1px);
}

.bfn-header :is(a, button):focus-visible {
	outline: 3px solid rgba(254, 133, 68, 0.5);
	outline-offset: 4px;
}

.bfn-header__toggle {
	display: none;
}

@media (max-width: 920px) {
	.bfn-header__inner {
		gap: 22px;
		width: min(100% - 36px, 1240px);
		min-height: 82px;
	}

	.bfn-header__brand {
		max-width: 174px;
	}

	.bfn-header__nav {
		gap: 20px;
	}

	.bfn-header__links {
		gap: 18px;
	}

	.bfn-header__link {
		font-size: 15px;
	}

	.bfn-header__cta {
		padding: 12px 18px;
		font-size: 14px;
	}
}

@media (max-width: 767px) {
	.bfn-header__inner {
		gap: 12px;
		min-height: 70px;
		width: calc(100% - 32px);
	}

	.bfn-header__brand {
		width: min(46vw, 172px);
		min-width: 108px;
	}

	.bfn-header__brand img {
		max-height: 48px;
	}

	.bfn-header__toggle {
		display: flex;
		flex: 0 0 auto;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 5px;
		width: 44px;
		height: 44px;
		margin-left: auto;
		padding: 10px;
		border: 1px solid #fe7541 !important;
		border-radius: 12px;
		background: #fe7541 !important;
		color: #ffffff !important;
		cursor: pointer;
	}

	.bfn-header__toggle span {
		display: block;
		width: 21px;
		height: 2px;
		border-radius: 2px;
		background: currentColor;
		transition: transform 180ms ease, opacity 180ms ease;
	}

	.bfn-header.is-open .bfn-header__toggle {
		border-color: #fe7541 !important;
		background: #fe7541 !important;
		color: #ffffff !important;
	}

	.bfn-header.is-open .bfn-header__toggle span:first-child {
		transform: translateY(7px) rotate(45deg);
	}

	.bfn-header.is-open .bfn-header__toggle span:nth-child(2) {
		opacity: 0;
	}

	.bfn-header.is-open .bfn-header__toggle span:last-child {
		transform: translateY(-7px) rotate(-45deg);
	}

	.bfn-header__nav {
		position: absolute;
		top: calc(100% + 8px);
		right: 16px;
		left: 16px;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 22px;
		min-width: 0;
		margin: 0;
		padding: 24px;
		border: 1px solid rgba(24, 49, 60, 0.10);
		border-radius: 16px;
		background: #ffffff;
		box-shadow: 0 15px 42px rgba(24, 49, 60, 0.13);
	}

	.bfn-header.is-open .bfn-header__nav {
		display: flex;
	}

	.bfn-header__links {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0;
	}

	.bfn-header__link {
		display: block;
		padding: 13px 0;
		font-size: 17px;
	}

	.bfn-header__link + .bfn-header__link {
		border-top: 1px solid rgba(24, 49, 60, 0.08);
	}

	.bfn-header__cta {
		width: 100%;
		min-height: 50px;
		padding: 12px 16px;
		font-size: 14px;
	}
}

@media (max-width: 782px) {
	body.admin-bar .bfn-header {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bfn-header :is(a, button, span) {
		transition: none !important;
	}
}


/* Sous-menu des programmes */
.bfn-header__programs {
	position: relative;
}
.bfn-header__programs-row {
	display: flex;
	align-items: center;
	gap: 2px;
}
.bfn-header__submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #18313c;
	font-size: 20px;
	cursor: pointer;
	transition: color 180ms ease, transform 180ms ease;
}
.bfn-header .bfn-header__submenu-toggle,
.bfn-header .bfn-header__submenu-toggle:hover,
.bfn-header .bfn-header__submenu-toggle:focus,
.bfn-header .bfn-header__submenu-toggle:focus-visible,
.bfn-header .bfn-header__programs.is-submenu-open .bfn-header__submenu-toggle {
	border: 1px solid #fe7541 !important;
	border-radius: 12px !important;
	background: #fe7541 !important;
	background-color: #fe7541 !important;
	color: #ffffff !important;
	box-shadow: none !important;
}
.bfn-header .bfn-header__submenu-toggle span {
	color: #ffffff !important;
}
.bfn-header__programs.is-submenu-open .bfn-header__submenu-toggle {
	transform: rotate(180deg);
}
.bfn-header__submenu {
	position: absolute;
	top: 100%;
	left: -18px;
	z-index: 1001;
	display: none;
	min-width: 260px;
	max-height: min(72vh, 520px);
	overflow-y: auto;
	margin: 0;
	padding: 10px;
	list-style: none;
	border: 1px solid rgba(24, 49, 60, 0.1);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(24, 49, 60, 0.15);
}
.bfn-header__programs:hover .bfn-header__submenu,
.bfn-header__programs:focus-within .bfn-header__submenu,
.bfn-header__programs.is-submenu-open .bfn-header__submenu {
	display: block;
}
.bfn-header__submenu li {
	margin: 0;
	padding: 0;
}
.bfn-header__submenu-link {
	display: block;
	padding: 10px 12px;
	border-radius: 7px;
	color: #18313c;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	white-space: nowrap;
}
.bfn-header__submenu-link:hover,
.bfn-header__submenu-link:focus-visible {
	background: rgba(254, 117, 65, 0.1);
	color: #e96227;
}

@media (max-width: 767px) {
	.bfn-header__programs-row {
		border-bottom: 1px solid rgba(24, 49, 60, 0.08);
	}
	.bfn-header__programs-row .bfn-header__link {
		flex: 1;
	}
	.bfn-header__submenu {
		position: static;
		min-width: 0;
		max-height: 40vh;
		margin: 0;
		padding: 4px 0 8px 12px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}
	.bfn-header__programs:hover .bfn-header__submenu,
	.bfn-header__programs:focus-within .bfn-header__submenu {
		display: none;
	}
	.bfn-header__programs.is-submenu-open .bfn-header__submenu {
		display: block;
	}
	.bfn-header__submenu-link {
		padding: 10px 12px;
		white-space: normal;
	}
	.bfn-header__links > .bfn-header__link {
		border-bottom: 1px solid rgba(24, 49, 60, 0.08);
	}
}


/* Dropdown programmes desktop : panneau plus lisible et chevron discret. */
@media (min-width: 768px) {
	.bfn-header__programs-row {
		gap: 7px;
	}

	.bfn-header .bfn-header__submenu-toggle,
	.bfn-header .bfn-header__submenu-toggle:hover,
	.bfn-header .bfn-header__submenu-toggle:focus,
	.bfn-header .bfn-header__submenu-toggle:focus-visible,
	.bfn-header .bfn-header__programs.is-submenu-open .bfn-header__submenu-toggle {
		width: 24px;
		height: 24px;
		border: 0 !important;
		border-radius: 50% !important;
		background: transparent !important;
		background-color: transparent !important;
		color: #f4732e !important;
		box-shadow: none !important;
	}

	.bfn-header .bfn-header__submenu-toggle span {
		color: #f4732e !important;
	}

	.bfn-header__submenu-toggle span {
		display: block;
		width: 8px;
		height: 8px;
		border-right: 1.8px solid currentColor;
		border-bottom: 1.8px solid currentColor;
		font-size: 0;
		transform: translateY(-2px) rotate(45deg);
		transition: transform 180ms ease;
	}

	.bfn-header__programs.is-submenu-open .bfn-header__submenu-toggle span {
		transform: translateY(2px) rotate(225deg);
	}

	.bfn-header__programs::after {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		height: 10px;
		content: "";
	}

	.bfn-header__submenu {
		top: calc(100% + 8px);
		left: -18px;
		display: none;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 5px;
		width: min(520px, 90vw);
		min-width: 0;
		max-height: min(72vh, 520px);
		padding: 18px;
		border: 1px solid rgba(24, 49, 60, 0.08);
		border-radius: 18px;
		box-shadow: 0 20px 52px rgba(24, 49, 60, 0.16);
	}

	.bfn-header__submenu::before {
		grid-column: 1 / -1;
		margin: 0 4px 7px;
		padding: 2px 8px 11px;
		border-bottom: 1px solid rgba(24, 49, 60, 0.08);
		color: #8a969b;
		content: "NOS PROGRAMMES";
		font-size: 11px;
		font-weight: 800;
		letter-spacing: 0.12em;
		line-height: 1.3;
	}

	.bfn-header__programs:hover .bfn-header__submenu,
	.bfn-header__programs:focus-within .bfn-header__submenu,
	.bfn-header__programs.is-submenu-open .bfn-header__submenu {
		display: grid;
	}

	.bfn-header__submenu-link {
		position: relative;
		display: flex;
		align-items: center;
		min-height: 44px;
		padding: 10px 13px;
		border: 1px solid transparent;
		border-radius: 10px;
		font-size: 14px;
		font-weight: 650;
		white-space: normal;
		transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
	}

	.bfn-header__submenu-link::after {
		margin-left: auto;
		padding-left: 8px;
		color: #f4732e;
		content: "↗";
		font-size: 14px;
		opacity: 0;
		transform: translate(-3px, 3px);
		transition: opacity 160ms ease, transform 160ms ease;
	}

	.bfn-header__submenu-link:hover,
	.bfn-header__submenu-link:focus-visible {
		border-color: rgba(244, 115, 46, 0.14);
		background: #fff5ef;
		color: #d95c24;
		transform: translateY(-1px);
	}

	.bfn-header__submenu-link:hover::after,
	.bfn-header__submenu-link:focus-visible::after {
		opacity: 1;
		transform: translate(0, 0);
	}
}


/* The server-rendered menu replaces the original theme header from first paint. */
body.bfn-menu-ready #masthead,
body.bfn-menu-ready header.site-header,
body.bfn-menu-ready .elementor-location-header {
	display: none !important;
}
