@charset 'utf-8';

:root {
	--submenu-shadow: 0 12px 32px rgba(11, 14, 34, 0.12);
	--submenu-gap: 2rem;
	--submenu-bridge: 0.5rem;
	--header-transition: 0.35s ease;
	--header-bar-pad-block: 0.8rem;
	--header-bar-pad-block-scroll: 0.5rem;
	--header-bar-pad-inline-start: 2rem;
	--header-bar-pad-inline-start-scroll: 1.6rem;
	--header-logo-size: 130px;
	--header-logo-size-scroll: 96px;

	/* Pictos de menu : SVG inline en masque CSS (aucune requête, hérite de la couleur du texte) */
	--icon-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21.8c4.4-4.7 6.6-8.5 6.6-11.5a6.6 6.6 0 1 0-13.2 0c0 3 2.2 6.8 6.6 11.5Z'/%3E%3Ccircle cx='12' cy='10.1' r='2.4'/%3E%3C/svg%3E");
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ G E N E R A L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

body.nav-open {
	overflow: hidden;
}
.header {
	position: sticky;
	top: 0;
	z-index: 30;
	width: 100%;
}
.header::before {
	display: none;
}
.header-bar,
.header > .container-fluid > .row {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: nowrap;
	gap: 1.5rem;
	width: 100%;
	margin-right: 0;
	margin-left: 0;
	padding: 1.5rem 0;
}
/* Fallback ancienne structure header (row / col) */
.header > .container-fluid > .row > [class*="col-"] {
	display: flex;
	align-items: center;
	width: auto;
	max-width: none;
	flex: 0 1 auto;
	padding-right: 0;
	padding-left: 0;
}

.header > .container-fluid > .row > .col-lg-8,
.header > .container-fluid > .row > .d-flex {
	flex: 1 1 auto;
	justify-content: flex-end;
}

/* Header flottant sur la page d'accueil */
.header {
	padding-bottom: 0;
	background: none;
}

.header.scroll {
	position: fixed;
	background-color: rgba(255, 255, 255, 1);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.header::before {
	display: none;
}

/* Header — état scroll */
.header.scroll {
	--header-bar-pad-block: var(--header-bar-pad-block-scroll);
	--header-bar-pad-inline-start: var(--header-bar-pad-inline-start-scroll);
	--header-logo-size: var(--header-logo-size-scroll);
}

.header.scroll .header-bar,
.header.scroll > .container-fluid > .row {
	box-shadow: none;
}

.header ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.device {
	z-index: -1000;
	display: block;
	visibility: hidden;
	width: 0;
	height: 0;
	pointer-events: none;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LOGO */

.logo {
	flex-shrink: 0;
	align-self: center;
	max-width: var(--header-logo-size);
	transition: max-width var(--header-transition);
}

.logo img {
	min-width: 180px;
	display: block;
	width: 100%;
	height: auto;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ N A V I G A T I O N
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

.nav {
	color: var(--color-noir);
}

.nav a,
.wpml-ls a {
	display: inline-block;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	color: var(--color-noir);
	cursor: pointer;
}

.nav .menu > li > a {
	font-size: var(--font-s);
	line-height: var(--lineh-s);
}

/* Bouton CTA menu (classe CSS « menu-btn » dans le BO) */
.nav .menu > li.menu-btn > a {
	display: inline-flex;
	align-items: center;
	gap: 0.8rem;
	padding: 1rem 1.8rem;
	color: var(--color-blanc);
	background: var(--color-bleu);
}

.nav .menu > li.menu-btn > a::after {
	content: "";
	display: inline-block;
	width: 0.55rem;
	height: 0.55rem;
	border-top: 2px solid var(--color-blanc);
	border-right: 2px solid var(--color-blanc);
	transform: rotate(45deg);
}

.nav .menu > li.menu-btn > a:hover {
	color: var(--color-blanc);
	opacity: 0.9;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PICTOS DE MENU
   Classe CSS à ajouter sur l'élément de menu dans le BO (ex. « icon-pointer ».
   Nouveau picto : déclarer --icon-xxx dans :root, puis ajouter la classe
   « li.icon-xxx » aux deux sélecteurs ci-dessous + son --menu-icon) */

.nav .menu li.icon-pointer > a {
	display: inline-flex;
	align-items: center;
	gap: 0.8rem;
	background-color: var(--color-vert);
	color: var(--color-blanc);
	border-radius: 3rem;
	border: 1px solid var(--color-vert);
	padding: 0.5rem 2rem;
}

.nav .menu li.icon-pointer > a::before {
	content: "";
	flex: 0 0 auto;
	width: 1.5em;
	height: 1.5em;
	background-color: currentColor;
	-webkit-mask: var(--menu-icon) no-repeat center / contain;
	mask: var(--menu-icon) no-repeat center / contain;
}

.nav .menu li.icon-pointer {
	--menu-icon: var(--icon-pointer);
}
.nav .menu li.icon-pointer > a:hover {
	color: var(--color-blanc)!important;
}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SUB-MENUS — BASE */

.nav .sub-menu {
	overflow: hidden;
	max-height: 0;
	transition: max-height 300ms ease;
}

.nav .sub-menu a {
	font-size: var(--font-s);
	line-height: var(--lineh-s);
	font-weight: 400;
	text-transform: none;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~ BURGER BUTTON */

.burger {
	z-index: 101;
	position: relative;
	flex-shrink: 0;
}

.burger button {
	position: relative;
	display: block;
	width: 3em;
	height: 3rem;
	margin: 0;
	padding: 0;
	outline: none;
	border: none;
	cursor: pointer;
	background: none;
	box-shadow: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	pointer-events: auto;
}

.burger span {
	display: block;
	position: absolute;
	height: 2px;
	width: 60%;
	top: 50%;
	right: 0;
	border-radius: 1px;
	background: var(--color-noir);
	transform: rotate(0deg);
	transition: all .25s ease-in-out;
}

.burger span:nth-child(1) {
	margin-top: -7px;
}

.burger span:nth-child(4) {
	margin-top: 7px;
}

.nav-open .burger span {
	width: 60%;
}

.nav-open .burger span:nth-child(1),
.nav-open .burger span:nth-child(4) {
	width: 0;
	margin-top: 0;
	left: 60%;
}

.nav-open .burger span:nth-child(2) {
	transform: rotate(30deg);
}

.nav-open .burger span:nth-child(3) {
	transform: rotate(-30deg);
}

/*~~~~~~~~~~~~~ SMALL DEVICES  ⟾  DESKTOP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

@media only screen and (min-width: 340px) and (max-width: 991px) {
	.header {
		overflow: visible;
	}

	.header-bar,
	.header > .container-fluid > .row {
		padding-right: 1rem;
		overflow: visible;
	}

	.logo {
		--header-logo-size: 100px;
		--header-logo-size-scroll: 80px;
	}

	/* Overlay fond */
	body.nav-open::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 200;
		background: rgba(11, 14, 34, 0.45);
		opacity: 1;
		pointer-events: auto;
	}

	.nav-open .header {
		z-index: 210;
	}

	.nav-open .burger {
		z-index: 220;
	}

	.nav {
		z-index: 210;
		display: flex;
		flex-direction: column;
		position: fixed;
		top: 0;
		left: 0;
		width: min(88vw, 36rem);
		max-width: 100%;
		height: 100vh;
		height: 100dvh;
		margin: 0;
		padding: 8rem 2rem 3rem;
		overflow-x: hidden;
		overflow-y: auto;
		background: var(--color-blanc);
		box-shadow: 8px 0 32px rgba(11, 14, 34, 0.12);
		transform: translate3d(-100%, 0, 0);
		opacity: 1;
		visibility: visible;
		pointer-events: none;
		transition: transform 0.35s ease;
		will-change: transform;
	}

	.nav-open .nav {
		transform: translate3d(0, 0, 0);
		pointer-events: auto;
	}

	body.nav-animate .nav {
		transition: transform 0.35s ease;
	}

	.nav .menu {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		width: 100%;
	}

	.nav > ul > li {
		width: 100%;
		margin-bottom: 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}

	.nav .menu > li > a {
		display: block;
		width: 100%;
		padding: 1.6rem 0;
		font-size: var(--font-m);
		line-height: var(--lineh-m);
	}

	.nav .menu > li.menu-btn > a {
		justify-content: center;
		width: auto;
		margin-top: 2rem;
	}

	.nav .menu-item-has-children > a {
		position: relative;
		padding-right: 2.4rem;
	}

	.nav .menu-item-has-children > a::after {
		content: "";
		position: absolute;
		right: 0.4rem;
		top: 50%;
		width: 0;
		height: 0;
		border-top: 0.5rem solid currentColor;
		border-right: 0.45rem solid transparent;
		border-left: 0.45rem solid transparent;
		transform: translateY(-50%);
		transition: transform 200ms ease;
	}

	.nav .menu-item-has-children.is-open > a::after {
		transform: translateY(-50%) rotate(180deg);
	}

	@media (prefers-reduced-motion: reduce) {
		.nav .menu-item-has-children > a::after {
			transition: none;
		}
	}

	.nav .sub-menu {
		position: static;
		display: block;
		max-height: 0;
		padding: 0;
		margin: 0;
		background: transparent;
		box-shadow: none;
	}

	.nav .menu-item-has-children.is-open > .sub-menu {
		max-height: 40rem;
		padding-bottom: 1rem;
	}

	.nav .sub-menu li a {
		display: block;
		padding: 0.8rem 0 0.8rem 1.2rem;
		font-size: var(--font-s);
		color: rgba(0, 0, 0, 0.72);
	}
}

@media only screen and (max-width: 736px) {
	.device {
		content: 'phone-portrait';
	}
}

@media only screen and (min-width: 433px) {
	.device {
		content: 'phone-landscape';
	}
}

@media only screen and (min-width: 737px) {
	.device {
		content: 'tablet-portrait';
	}

	.logo {
		--header-logo-size: 110px;
		--header-logo-size-scroll: 90px;
	}
}

@media only screen and (min-width: 801px) {
	.device {
		content: 'tablet-landscape';
	}
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~ M O N I T O R  |  1 0 2 5  ⟾  ∞
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

@media only screen and (min-width: 992px) {
	.device {
		content: 'monitor';
	}

	body.nav-open {
		overflow-y: visible;
	}

	.burger {
		display: none;
	}

	body.nav-open::before {
		display: none;
	}

	.nav {
		display: flex;
		flex: 1;
		justify-content: flex-end;
		align-items: center;
		position: relative;
		top: auto;
		left: auto;
		width: auto;
		height: auto;
		margin: 0;
		padding: 0;
		overflow: visible;
		transform: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		box-shadow: none;
		will-change: auto;
	}

	.header-bar,
	.header > .container-fluid > .row {
		--header-bar-pad-inline-start: 2.4rem;
		--header-bar-pad-inline-start-scroll: 2rem;
	}

	.logo {
		--header-logo-size: 120px;
		--header-logo-size-scroll: 88px;
		margin-right: 1rem;
	}

	.nav .menu {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-end;
		gap: 2rem;
		width: 100%;
	}

	.nav > ul > li {
		position: relative;
		margin-bottom: 0;
	}

	.nav .menu > li > a {
		padding: 0.5rem 2rem;
		white-space: nowrap;
	}

	.nav .menu > li > a:hover,
	.nav .current-menu-item > a,
	.nav .current-menu-ancestor > a {
		color: var(--color-bleu);
	}

	/* Dropdown classique */
	.nav .menu-item-has-children {
		position: relative;
	}

	/* Indicateur de sous-menu (triangle CSS, aucune requête supplémentaire) */
	.nav .menu-item-has-children:not(.menu-btn) > a {
		display: inline-flex;
		align-items: center;
		gap: 0.6rem;
	}

	.nav .menu-item-has-children:not(.menu-btn) > a::after {
		content: "";
		flex: 0 0 auto;
		width: 0;
		height: 0;
		border-top: 0.45rem solid currentColor;
		border-right: 0.4rem solid transparent;
		border-left: 0.4rem solid transparent;
		transition: transform 200ms ease;
	}

	.no-touchevents .nav .menu-item-has-children:not(.menu-btn):hover > a::after,
	.nav .menu-item-has-children:not(.menu-btn):focus-within > a::after,
	.nav .menu-item-has-children.is-open:not(.menu-btn) > a::after {
		transform: rotate(180deg);
	}

	/* Niveaux 2+ : le sous-menu s'ouvre sur le côté, la flèche pointe à droite */
	.nav .sub-menu .menu-item-has-children > a {
		display: flex;
		justify-content: space-between;
	}

	.nav .sub-menu .menu-item-has-children > a::after,
	.no-touchevents .nav .sub-menu .menu-item-has-children:hover > a::after,
	.nav .sub-menu .menu-item-has-children:focus-within > a::after,
	.nav .sub-menu .menu-item-has-children.is-open > a::after {
		transform: rotate(-90deg);
	}

	@media (prefers-reduced-motion: reduce) {
		.nav .menu-item-has-children:not(.menu-btn) > a::after {
			transition: none;
		}
	}

	.nav .sub-menu {
		position: absolute;
		top: calc(100% + var(--submenu-gap));
		left: 0;
		z-index: 40;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		min-width: 22rem;
		max-height: none;
		padding: 2rem 0;
		margin: 0;
		background: var(--color-blanc);
		border-radius: 1.6rem;
		box-shadow: var(--submenu-shadow);
		opacity: 0;
		visibility: hidden;
		transform: translateY(0.2rem);
		transition:
			opacity 150ms ease 120ms,
			transform 150ms ease 120ms,
			visibility 150ms ease 120ms;
		pointer-events: none;
		overflow: visible;
	}

	/* Zone tampon invisible : comble l'espace entre le lien parent et le sous-menu */
	.nav .menu-item-has-children > .sub-menu::before {
		content: "";
		position: absolute;
		top: calc(-1 * (var(--submenu-gap) + var(--submenu-bridge)));
		left: 0;
		width: 100%;
		height: calc(var(--submenu-gap) + var(--submenu-bridge));
	}

	.nav .sub-menu .sub-menu {
		top: 0;
		left: 100%;
		margin-left: 0;
		padding: 0 0 0 0.4rem;
	}

	.nav .sub-menu .menu-item-has-children > .sub-menu::before {
		top: 0;
		left: -0.8rem;
		width: 0.8rem;
		height: 100%;
	}

	.no-touchevents .nav .menu-item-has-children:hover > .sub-menu,
	.no-touchevents .nav .sub-menu .menu-item-has-children:hover > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		transition-delay: 0ms;
		pointer-events: auto;
	}

	.nav .sub-menu li {
		width: 100%;
	}

	.nav .sub-menu li a {
		display: block;
		padding: 0.9rem 1.6rem;
		font-size: var(--font-s);
		line-height: var(--lineh-s);
		color: var(--color-noir);
		white-space: nowrap;
	}

	.nav .sub-menu li a:hover,
	.nav .sub-menu .current-menu-item > a {
		color: var(--color-bleu);
		background: var(--color-bleu-clair);
	}

	.nav .menu > li.menu-btn > a {
		margin-left: 0.8rem;
		padding: 1rem 2rem;
	}

	.wpml-ls {
		position: relative;
		opacity: 1;
		pointer-events: auto;
	}
}

@media only screen and (min-width: 1340px) {
	.device {
		content: 'monitor-laptop-narrow';
	}
}

@media only screen and (min-width: 1540px) {
	.device {
		content: 'monitor-large';
	}
}

@media only screen and (min-width: 1860px) {
	.device {
		content: 'monitor-wide';
	}
}

@media only screen and (min-width: 2440px) {
	.device {
		content: 'monitor-giant';
	}
}
