/* ============================================
		Custom Nav Menu — MyCarto
   ============================================ */

:root {
	--nav-primary: #00267F;
	--nav-primary-hover: #152366;
	--nav-text: #262E6F;
	--nav-link-hover-bg: #EEF2FF;
	--nav-link-hover-txt: #2d47b9;
	--nav-height: 72px;
	--nav-z: 9999;
	--radius-btn: 8px;
	--radius-dropdown: 16px;
	--dropdown-shadow: 0 8px 48px rgba(0, 0, 0, .13), 0 0 0 1px rgba(0, 0, 0, .06);
}

/* ── Offset body so fixed header doesn't overlap content ── */
body {
	padding-top: var(--header-bottom, var(--nav-height)) !important;
}

/* ── Header shell ── */
.site-header {
	position: fixed !important;
	top: 0;
	inset-inline: 0;
	z-index: var(--nav-z);
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 38, 127, 0.6);
	padding-block-end: 0rem !important;
	padding-block-start: 0rem !important;
	animation: nav-fade-in 0.4s ease both;
}

@keyframes nav-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes nav-from-left {
	from {
		opacity: 0;
		transform: translateX(-24px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes nav-from-right {
	from {
		opacity: 0;
		transform: translateX(24px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Logo slide depuis la gauche */
.nav-logo {
	animation: nav-from-left 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Items nav : opacity uniquement (pas de transform pour ne pas casser position:fixed du dropdown) */
.nav-item:nth-child(1) {
	animation: nav-fade-in 0.4s ease 0.25s both;
}

.nav-item:nth-child(2) {
	animation: nav-fade-in 0.4s ease 0.32s both;
}

.nav-item:nth-child(3) {
	animation: nav-fade-in 0.4s ease 0.39s both;
}

.nav-item:nth-child(4) {
	animation: nav-fade-in 0.4s ease 0.46s both;
}

.nav-item:nth-child(5) {
	animation: nav-fade-in 0.4s ease 0.53s both;
}

/* Boutons slide depuis la droite */
.nav-actions {
	animation: nav-from-right 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.main-nav {
	height: var(--nav-height);
	display: flex;
	align-items: center;
	width: 100%;
}

.nav-container {
	width: 100%;
	padding-inline: 32px;
	gap: 8px;
	display: flex;
	align-items: center;
}

/* ── Logo ── */
.nav-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	margin-right: 24px;
	text-decoration: none;
}

.nav-logo img {
	height: 50px;
	width: auto;
	display: block;
}

.nav-logo-text {
	font-size: 18px;
	font-weight: 700;
	color: var(--nav-primary);
}

/* ── Menu list ── */

.container-item-menu {
	display: flex;
	justify-content: center;
	width: 100%;
}

.nav-menu {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 20px;
}

/* Reset SVG bullets injected by functions.php on nav items */
.nav-menu li svg:not(.chevron) {
	display: none !important;
}

.nav-menu span {
	display: contents;
}

/* ── Nav item ── */
.nav-item {
	position: relative;
}

.nav-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	color: #262E6F;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
	line-height: 1;
}

.nav-link:hover {
	color: #2DA6F9;
	background: #F0F3F8;
}

/* État actif au click uniquement */
.nav-item.is-active .nav-link,
.nav-item.is-open .nav-link {
	background: #F0F3F8;
	color: #2DA6F9;
}

.nav-link .chevron,
.mobile-nav-link .chevron {
	width: 16px !important;
	height: 16px !important;
	flex-shrink: 0;
	transition: transform 0.2s ease;
	margin-left: 6px !important;
	margin-right: 0 !important;
	margin-top: 0 !important;
}

.nav-item.is-open .nav-link .chevron,
.mobile-nav-item.is-open .mobile-nav-link .chevron {
	transform: rotate(180deg);
}

/* ── Dropdown panel ── */
.dropdown-panel {
	display: block;
	position: fixed;
	top: var(--header-bottom, var(--nav-height));
	left: 50%;
	transform: translateX(-50%);
	width: 1250px;
	max-width: calc(100vw - 48px);
	background: #fff;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	border-bottom-left-radius: 20px;
	border-bottom-right-radius: 20px;
	padding: 50px 70px 0;
	overflow: hidden;
	z-index: calc(var(--nav-z) + 1);
	clip-path: inset(0 0 100% 0 round 0 0 20px 20px);
	visibility: hidden;
	pointer-events: none;
	transition: clip-path 0.8s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.8s;
}

/* Barre colorée pleine largeur en haut */
.dropdown-panel::before {
	content: '';
	display: block;
	height: 5px;
	background: rgba(66, 153, 213, 0.05);
	margin: -50px -70px 45px;
}

/* Barre colorée pleine largeur en bas */
.dropdown-panel::after {
	content: '';
	display: block;
	height: 18px;
	background: rgba(66, 153, 213, 0.05);
	margin: 30px -70px 0;
}

.nav-item.is-open .dropdown-panel {
	visibility: visible;
	pointer-events: auto;
	clip-path: inset(0 0 0% 0 round 0 0 20px 20px);
}



/* ── Dropdown inner layout ── */
.dropdown-inner {
	display: flex;
	align-items: stretch;
	gap: 0;
}

.dropdown-inner .dropdown-grid {
	flex: 1;
	min-width: 0;
}

/* Quand featured actif : 2 colonnes pour les items */
.dropdown-panel.has-featured .dropdown-grid {
	grid-template-columns: repeat(2, 1fr);
}

.dropdown-panel.has-featured .dropdown-grid::before {
	left: 50%;
}

.dropdown-panel.has-featured .dropdown-grid::after {
	display: none;
}

/* ── Panneau mis en avant ── */
.dropdown-featured {
	flex-shrink: 0;
	width: 280px;
	border-left: 1px solid #E2E8F0;
	padding: 14px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	background: #2DA6F91A;
	border-radius: 10px;
	margin-left: 14px;
}

.dropdown-featured-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.dropdown-featured-label {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.dropdown-featured-title {
	font-size: 16px;
	font-weight: 700;
	color: #25377C;
	line-height: normal
}

.dropdown-featured-img {
	height: 56px;
	width: auto;
	max-width: 140px;
	border-radius: 8px;
	object-fit: contain;
	display: block;
	flex-shrink: 0;
}

.dropdown-featured-desc {
	font-size: 16px;
	color: #25377C;
	font-style: normal;
	font-weight: 400;
	line-height: normal;
	margin: 0;
	margin-block-end: 0px !important;
}

.dropdown-featured-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 16px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	background: #00267F;
	color: #fff !important;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
	align-self: flex-start;
}

.dropdown-featured-btn:hover {
	background: #4299d5;
}

/* ── Dropdown grid ── */
.dropdown-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px 32px;
	position: relative;
}

/* Séparateurs verticaux pleine hauteur */
.dropdown-grid::before,
.dropdown-grid::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: #E2E8F0;
	pointer-events: none;
}

.dropdown-grid::before {
	left: 33.333%;
}

.dropdown-grid::after {
	left: 66.666%;
}

/* ── Overlay body quand dropdown ouvert ── */
body.dropdown-open {
	overflow: hidden;
}

body.dropdown-open::before {
	content: '';
	position: fixed;
	inset: 0;
	background: rgba(240, 243, 248, 0.55);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	z-index: calc(var(--nav-z) - 1);
	pointer-events: none;
}

.dropdown-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: background 0.15s;
	max-height: fit-content;
}

.dropdown-item:hover {
	background: #f5f7ff;
}

.dropdown-item:hover .dropdown-title {
	color: #4299d5;
}

.dropdown-icon-wrap {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dropdown-icon {
	width: 33px;
	height: 28px;
	object-fit: contain;
	aspect-ratio: 33/28;
}

.dropdown-text {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dropdown-title {
	font-size: 18px;
	color: #262E6F;
	font-weight: 500;
	line-height: normal;
}

.dropdown-desc strong,
.dropdown-desc b,
.dropdown-featured-desc strong,
.dropdown-featured-desc b {
	color: #4299d5;
}

.dropdown-desc {
	font-size: 14px;
	color: #767676;
	margin: 0;
	font-style: normal;
	font-weight: 400;
	line-height: normal;
	margin-block-end: 0 !important;
}

/* ── CTA buttons ── */
.nav-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	margin-left: auto;
}

.btn {
	display: inline-flex;
	align-items: center;
	padding: 9px 18px;
	border-radius: var(--radius-btn);
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	border: 2px solid transparent;
}

.btn-primary {
	background: linear-gradient(to bottom, #00267F, #4299d5);
	color: #fff !important;
	padding: 12px 14px;
	text-decoration: none !important;
	border: none;
	transition: transform 0.2s ease;
}

.btn-primary:hover {
	background: linear-gradient(to bottom, #00267F, #4299d5);
	transform: translateY(-2px);
}

.btn-secondary {
	background: #fff;
	color: #00267F;
	border: 2px solid transparent;
	background-image: linear-gradient(#fff, #fff), linear-gradient(to bottom, #00267F, #4299d5);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	text-decoration: none !important;
	padding: 10px 14px;
	transition: transform 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
	color: #4299d5 !important;
	transform: translateY(-2px);
}

/* ── Language switcher ── */
.lang-btn {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 6px;
	border: 1.5px solid #d1d9e8;
	font-size: 16px;
	font-weight: 600;
	color: #262E6F !important;
	text-decoration: none !important;
	transition: border-color 0.15s, color 0.15s;
}

.lang-btn:hover {
	border-color: #4299d5;
	color: #4299d5 !important;
}

/* ── Hamburger (mobile) ── */
.nav-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 36px;
	height: 36px;
	padding: 6px;
	border: none;
	background: transparent;
	cursor: pointer;
	margin-left: auto;
	border-radius: 6px;
	transition: background 0.15s;
}

.nav-hamburger:hover {
	background: #EEF6FE;
}

.nav-hamburger span {
	display: block;
	height: 2px;
	background: var(--nav-text);
	border-radius: 2px;
	transition: transform 0.25s, opacity 0.25s;
}

/* ── Responsive ≤ 1500px ── */
@media (max-width: 1500px) {

	body.menu-open {
		overflow: hidden;
	}

	.nav-hamburger {
		display: flex;
		order: 3;
		margin-left: 12px;
	}

	.container-item-menu {
		display: none;
	}

	/* Hamburger → croix */
	.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
		opacity: 0;
	}

	.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}
}

/* ── Mobile overlay ── */
.mobile-overlay {
	display: flex;
	flex-direction: column;
	position: fixed;
	inset: 0;
	z-index: calc(var(--nav-z) + 2);
	background: #fff;
	overflow-y: auto;
	overflow-x: hidden;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.mobile-overlay.is-open {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
}

/* ── Top bar: logo + actions + close ── */
.mobile-overlay-top {
	display: flex;
	align-items: center;
	padding: 0 24px;
	height: var(--nav-height);
	border-bottom: 1px solid rgba(0, 0, 0, .07);
	flex-shrink: 0;
	gap: 12px;
}

.mobile-overlay-top .nav-logo {
	margin-right: auto;
}

.mobile-overlay-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mobile-overlay-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 6px;
	border: none;
	background: transparent;
	cursor: pointer;
	color: var(--nav-text);
	flex-shrink: 0;
	margin-left: 4px;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.mobile-overlay-close:hover {
	background: #EEF6FE;
	color: #4299d5;
}

/* ── CTA band en bas de l'overlay (visible seulement quand les boutons du header disparaissent) ── */
.mobile-overlay-cta {
	display: none;
	gap: 12px;
	padding: 16px 24px;
	border-top: 1px solid rgba(0, 0, 0, .07);
	flex-shrink: 0;
	position: sticky;
	bottom: 0;
	background: #fff;
}

.mobile-overlay-cta .btn {
	flex: 1;
	justify-content: center;
}

@media (max-width: 1024px) {
	.elementor-10 .elementor-element.elementor-element-fafd710 {
		margin-top: -23%;
	}
}

@media (max-width: 768px) {
	.mobile-overlay-cta {
		display: flex;
	}
}

/* ── Nav list inside overlay ── */
.mobile-overlay-list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
}

.mobile-nav-item {
	border-bottom: 1px solid #f0f3f8;
}

.mobile-nav-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 18px 32px;
	font-size: 18px;
	font-weight: 600;
	color: #262E6F;
	text-decoration: none;
	transition: color 0.15s, background 0.15s;
}

.mobile-nav-link:hover,
.mobile-nav-item.is-open .mobile-nav-link {
	color: #4299d5;
	background: #f8faff;
}

.mobile-nav-item.is-open .mobile-nav-link .chevron {
	transform: rotate(180deg);
	width: 16px;
}

/* ── Mobile accordion dropdown ── */
.mobile-dropdown {
	max-height: 0;
	overflow: hidden;
	background: #f8faff;
	transition: max-height 0.3s ease, padding 0.3s ease;
	padding: 0 32px;
}

.mobile-nav-item.is-open .mobile-dropdown {
	max-height: 2000px;
	padding: 8px 32px 16px;
}

.mobile-dropdown .dropdown-item {
	border-bottom: 1px solid #eef0f8;
	border-radius: 0;
	padding: 12px 0;
}

.mobile-dropdown .dropdown-item:last-child {
	border-bottom: none;
}

.mobile-dropdown-featured {
	width: auto !important;
	border-left: none !important;
	border-top: 1px solid #E2E8F0;
	margin-left: 0 !important;
	margin-top: 8px;
}

/* ── ≤ 768px : masquer les boutons CTA dans le header et le top bar de l'overlay ── */
@media (max-width: 768px) {

	.nav-actions .btn,
	.mobile-overlay-actions .btn {
		display: none;
	}

	.dropdown-title {
		font-size: 16px;
	}

	.dropdown-desc {
		font-size: 14px;
	}

	.mobile-dropdown-featured {
		padding: 12px 12px !important;
	}

	.mobile-nav-item.is-open .mobile-dropdown {
		padding: 14px 24px !important;
	}

	.nav-container {
		padding-inline: 8px;
	}

	.btn {
		font-size: 12px;
	}

	.lang-btn {
		font-size: 12px;
	}

	.mobile-nav-link {
		font-size: 16px;
	}

	.elementor-10 .elementor-element.elementor-element-fafd710 {
		margin-top: -9%;
	}
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: #00267F;
	border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
	background: #5bbdfb;
}

/* Firefox */
* {
	scrollbar-width: thin;
	scrollbar-color: #00267F transparent;
}