@import url('https://fonts.googleapis.com/css2?family=Average+Sans&family=Montserrat:wght@400;600;700&display=swap');

* { box-sizing: border-box; }

body { margin: 0; padding: 0; overflow-x: hidden; }
html { overflow-x: hidden; max-width: 100%; }

/* ─── HEADER ─── */
.site-header {
	background: #030A4B;
	height: 70px;
	position: sticky;
	top: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	padding: 0 40px;
}

.header-inner {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
}

/* ─── LOGO ─── */
.header-logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	text-decoration: none;
}
.header-logo img {
	height: 42px;
	width: auto;
	display: block;
	transition: opacity .2s;
}
.header-logo:hover img { opacity: .8; }

/* ─── NAV ─── */
.header-nav {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.header-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
}

/* Items top-level */
.header-nav > ul > li {
	position: relative;
	display: flex;
	align-items: center;
}

.header-nav > ul > li > a {
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #ffffff;
	text-decoration: none;
	padding: 0 14px;
	height: 70px;
	display: flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
	transition: opacity .2s;
}
.header-nav > ul > li > a:hover,
.header-nav > ul > li.current-menu-item > a {
	opacity: .75;
}

/* Séparateurs pipe */
.header-nav > ul > li + li::before {
	content: '|';
	color: rgba(255,255,255,.3);
	font-size: 13px;
	font-weight: 300;
	flex-shrink: 0;
}

/* Flèche dropdown */
.header-nav > ul > li.menu-item-has-children > a::after {
	content: '▾';
	font-size: 10px;
	margin-left: 3px;
	line-height: 1;
}

/* ─── SOUS-MENU niveau 2 ─── */
.header-nav ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 99999;
	background: #ffffff;
	border-radius: 0 0 4px 4px;
	box-shadow: 0 10px 30px rgba(0,0,0,.2);
	min-width: 200px;
	padding: 6px 0;
	margin: 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-6px);
	transition: opacity .18s, visibility .18s, transform .18s;
}

.header-nav > ul > li:hover > ul {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.header-nav ul ul li {
	display: block;
	position: relative;
}

.header-nav ul ul li a {
	font-family: 'Montserrat', sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #030A4B;
	text-decoration: none;
	padding: 10px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	white-space: nowrap;
	transition: color .15s, background .15s;
}
.header-nav ul ul li a:hover {
	color: #3B5EE8;
	background: #f0f4ff;
}

/* Flèche ▾ sur les items niveau 2 qui ont un sous-menu */
.header-nav ul ul li.menu-item-has-children > a::after {
	content: '▾';
	font-size: 9px;
	margin-left: 8px;
	flex-shrink: 0;
}

/* ─── SOUS-MENU niveau 3 – panneau séparé sous l'item ─── */
.header-nav ul ul ul {
	display: block;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 100000;
	background: #2a3ea8;
	border-radius: 0 4px 4px 4px;
	box-shadow: 0 10px 28px rgba(0,0,0,.25);
	min-width: 200px;
	max-height: 320px;
	overflow-y: auto;
	padding: 6px 0;
	/* Masqué par défaut – override des règles niveau 2 */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-4px);
	transition: opacity .18s, visibility .18s, transform .18s;
}

.header-nav ul ul li:hover > ul {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

/* Items niveau 3 */
.header-nav ul ul ul li a {
	font-size: 9px;
	letter-spacing: 1.5px;
	color: rgba(255,255,255,.85);
	background: transparent;
	padding: 9px 18px;
	justify-content: flex-start;
}
.header-nav ul ul ul li a:hover {
	color: #fff;
	background: rgba(255,255,255,.12);
}

/* ─── ICÔNE RECHERCHE ─── */
.header-search {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0;
	position: relative;
}
.header-search-form {
	display: flex;
	align-items: center;
	overflow: hidden;
	max-width: 0;
	height: 40px;
	opacity: 0;
	transition: max-width .35s ease, opacity .25s ease, height .35s ease;
	background: rgba(255,255,255,.12);
	border-radius: 30px;
	margin-right: 6px;
}
.header-search-form.open {
	max-width: 240px;
	height: 40px;
	opacity: 1;
}
.header-search-form input {
	background: transparent;
	border: none;
	outline: none;
	color: #fff;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	padding: 7px 14px;
	width: 200px;
	min-width: 0;
}
.header-search-form input::placeholder { color: rgba(255,255,255,.5); }
.header-search-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	color: #fff;
	display: flex;
	align-items: center;
	opacity: .8;
	transition: opacity .2s;
	flex-shrink: 0;
}
.header-search-toggle:hover { opacity: 1; }

/* ─── DROPDOWN RÉSULTATS RECHERCHE ─── */
.header-search-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: rgba(15,20,80,0.98);
	border-radius: 0 0 12px 12px;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height .3s ease, opacity .25s ease;
	border-top: 1px solid rgba(255,255,255,0.1);
	margin-top: -1px;
	z-index: 1000;
	min-width: 240px;
}
.header-search-results.show {
	max-height: 350px;
	overflow-y: auto;
	opacity: 1;
}
.header-search-group {
	padding: 8px 0;
}
.header-search-group:not(:last-child) {
	border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header-search-group-title {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(255,255,255,0.5);
	padding: 8px 14px 4px;
	margin: 0;
}
.header-search-group-items {
	list-style: none;
	margin: 0;
	padding: 0;
}
.header-search-item {
	display: block;
}
.header-search-item a {
	display: block;
	padding: 8px 14px;
	color: #fff;
	text-decoration: none;
	font-size: 12px;
	transition: background .15s;
}
.header-search-item a:hover {
	background: rgba(255,255,255,0.08);
}
.header-search-item__title {
	font-weight: 600;
	display: block;
}
.header-search-item__subtitle {
	font-size: 11px;
	color: rgba(255,255,255,0.6);
	display: block;
}

.header-search-empty {
	padding: 14px;
	color: rgba(255,255,255,0.5);
	font-size: 12px;
	text-align: center;
}

/* Supprime le padding-top ajouté par le JS Divi pour son ancien header fixe */
#page-container { padding-top: 0 !important; }
