/**
 * World Bank–style global header + megamenu (layout not fully present in bundled LOOP CSS).
 */

/* ——— Shell ——— */
.header-wrapper {
	position: relative;
	z-index: 10050;
	font-family: "Open Sans", "Source Sans 3", system-ui, sans-serif;
}

.header.block {
	position: relative;
	z-index: 1;
}

.header.block > div:first-child {
	position: relative;
}

.wbg_ext_global_header {
	background: var(--white, #fff);
}

.wbg_ext_global_header_top_wrapper {
	background: #0045ac;
	color: var(--gray-alpha-white-90-a, #fff);
	padding-top: 10px;
	padding-bottom: 10px;
}

.wbg_ext_global_header__topbar {
	max-width: var(--screen-width, 1200px);
	margin: 0 auto;
	padding: 0.4rem var(--section-gutter-space, 1.25rem);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

/* Top bar search — pill loupe, style institutionnel */
.patn-topbar-search {
	--patn-search-h: 2.625rem;
	display: inline-flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 0;
	margin: 0;
	margin-left: auto;
	padding: 3px;
	border-radius: 999px;
	background: linear-gradient(145deg, #ffffff 0%, #f0f7fc 100%);
	box-shadow:
		0 2px 8px rgba(0, 34, 68, 0.06),
		0 8px 24px rgba(0, 113, 188, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 113, 188, 0.14);
	overflow: hidden;
	transition:
		box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		border-color 0.35s ease,
		transform 0.25s ease;
}

.patn-topbar-search:hover {
	border-color: rgba(0, 113, 188, 0.28);
	box-shadow:
		0 4px 12px rgba(0, 34, 68, 0.08),
		0 12px 28px rgba(0, 113, 188, 0.14),
		inset 0 1px 0 rgba(255, 255, 255, 1);
}

.patn-topbar-search.is-open,
.patn-topbar-search:focus-within {
	border-color: rgba(0, 113, 188, 0.45);
	box-shadow:
		0 4px 16px rgba(0, 113, 188, 0.12),
		0 0 0 3px rgba(0, 113, 188, 0.12),
		inset 0 1px 0 rgba(255, 255, 255, 1);
}

.patn-topbar-search__field {
	box-sizing: border-box;
	width: 0;
	min-width: 0;
	height: calc(var(--patn-search-h) - 6px);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px 0 0 999px;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--blue-100, #002035);
	background: transparent;
	opacity: 0;
	pointer-events: none;
	transition:
		width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
		opacity 0.3s ease,
		padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.patn-topbar-search__field:focus {
	outline: none;
}

.patn-topbar-search__field::placeholder {
	color: rgba(0, 36, 64, 0.45);
	font-weight: 400;
}

.patn-topbar-search__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: calc(var(--patn-search-h) - 6px);
	height: calc(var(--patn-search-h) - 6px);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(145deg, #0088d4 0%, #004370 100%);
	color: #fff;
	cursor: pointer;
	box-shadow:
		0 2px 6px rgba(0, 67, 112, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	transition:
		transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.25s ease,
		background 0.25s ease;
}

.patn-topbar-search__submit:hover,
.patn-topbar-search__submit:focus-visible {
	background: linear-gradient(145deg, #169af3 0%, #0071bc 100%);
	box-shadow:
		0 4px 14px rgba(0, 113, 188, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
	transform: scale(1.04);
	outline: none;
}

.patn-topbar-search__submit:active {
	transform: scale(0.97);
}

.patn-topbar-search__icon {
	display: block;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.patn-topbar-search.is-open .patn-topbar-search__field,
.patn-topbar-search:focus-within .patn-topbar-search__field {
	width: min(240px, 46vw);
	padding: 0 0.25rem 0 1rem;
	opacity: 1;
	pointer-events: auto;
}

.patn-topbar-search.is-open .patn-topbar-search__submit,
.patn-topbar-search:focus-within .patn-topbar-search__submit {
	border-radius: 50%;
}

.wbg_ext_global_header__utilities a:any-link {
	color: inherit;
	text-decoration: none;
	font-size: 0.875rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.wbg_ext_global_header__utilities a:hover {
	text-decoration: underline;
}

.wbg_ext_global_header__main {
	padding-top: 0.65rem;
	padding-bottom: 0.65rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: nowrap;
}

.wbg_ext_global_header__main .patn-logo img {
	max-height: 120px;
	width: auto;
	display: block;
}

.wbg_ext_global_header__nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 1;
	justify-content: flex-end;
	min-width: 0;
}

.wbg_ext_global_header__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.15rem;
}

.wbg_ext_global_header__nav-list > li {
	margin: 0;
	flex-shrink: 0;
}

.wbg_ext_global_header__nav-link {
	appearance: none;
	border: 0;
	background: transparent;
	cursor: pointer;
	font: inherit;
	font-weight: bold;
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	color: #0045ac;
	padding: 0.5rem 0.5rem;
	text-transform: uppercase;
	border-radius: 4px;
	white-space: nowrap;
	text-align: left;
	transition: color 0.15s ease, background 0.15s ease;
}

.wbg_ext_global_header__nav-link:hover,
.wbg_ext_global_header__nav-link:focus-visible {
	color: var(--blue-50-base, #0071bc);
	background: var(--blue-05, #f6fcff);
	outline: none;
}

.wbg_ext_global_header__nav-link[aria-expanded="true"] {
	color: var(--blue-50-base, #0071bc);
	box-shadow: inset 0 -3px 0 var(--blue-50-base, #0071bc);
	border-radius: 4px 4px 0 0;
}

.wbg_ext_global_header__nav-link--home {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	text-decoration: none;
	color: #0045ac;
}

.wbg_ext_global_header__nav-link--home:hover,
.wbg_ext_global_header__nav-link--home:focus-visible {
	color: var(--blue-50-base, #0071bc);
	background: var(--blue-05, #f6fcff);
}

.wbg_ext_global_header__nav-home-icon {
	display: block;
}

/* Hamburger / close — fallback glyphs (LP icon font may be absent) */
.wbg_ext_hamburger_icon,
.wbg_ext_close_navigation {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--blue-70, #004370);
	border-radius: 4px;
}

.wbg_ext_hamburger_icon:hover,
.wbg_ext_close_navigation:hover {
	background: var(--blue-05, #f6fcff);
}

.wbg_ext_hamburger_icon .lp,
.wbg_ext_close_navigation .lp {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	position: relative;
}

.wbg_ext_hamburger_icon .lp-bars::before,
.wbg_ext_hamburger_icon .lp-bars::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

.wbg_ext_hamburger_icon .lp-bars::before {
	top: 4px;
	box-shadow: 0 6px 0 currentColor;
}

.wbg_ext_hamburger_icon .lp-bars::after {
	bottom: 4px;
}

.wbg_ext_close_navigation .lp-times::before,
.wbg_ext_close_navigation .lp-times::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 1.25rem;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

.wbg_ext_close_navigation .lp-times::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.wbg_ext_close_navigation .lp-times::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

/* ——— Megamenu panel ——— */
.wbg_ext_global_header__megamenu.wbg_ext_top_navigation {
	--wbg-mm-ease: cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-12px);
	transition:
		opacity 0.22s var(--wbg-mm-ease),
		transform 0.28s var(--wbg-mm-ease),
		visibility 0.28s;
}

.wbg_ext_global_header__megamenu.wbg_ext_top_navigation.active,
.wbg_ext_global_header__megamenu.wbg_ext_top_navigation.is-open {
	pointer-events: auto;
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.touchui-container.wbg_ext_tab_container {
	position: relative;
	background: var(--white, #fff);
	min-height: 12rem;
}

.wbg_ext_close_navigation {
	position: absolute;
	top: 1rem;
	right: var(--section-gutter-space, 1.25rem);
	z-index: 3;
}

.wbg_ext_back_navigation {
	display: none;
	position: absolute;
	top: 1rem;
	left: var(--section-gutter-space, 1.25rem);
	z-index: 3;
	padding: 0.5rem;
	cursor: pointer;
	color: var(--blue-70, #004370);
}

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

.wbg_ext_menu_list {
	margin: 0;
	padding: 0;
}

.wbg_ext_menu_link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.85rem 1rem;
	font-weight: 700;
	font-size: 0.875rem;
	color: var(--blue-70, #004370);
	text-decoration: none;
	border-left: 4px solid transparent;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wbg_ext_menu_link:hover,
.wbg_ext_menu_link:focus-visible {
	background: var(--blue-05, #f6fcff);
	color: var(--blue-50-base, #0071bc);
	outline: none;
}

.wbg_ext_menu_list.active .wbg_ext_menu_link,
.wbg_ext_menu_list[aria-selected="true"] .wbg_ext_menu_link {
	background: var(--blue-05, #f6fcff);
	border-left-color: var(--blue-50-base, #0071bc);
	color: var(--blue-50-base, #0071bc);
}

.wbg_ext_tabpanels {
	background: var(--neutral-solid-05-s, #f5f7f9);
	border-left: 1px solid var(--neutral-solid-15-s, #dae3eb);
}

.wbg_ext_navigation_menu {
	padding: 0;
}

.wbg_ext_navigation_list {
	padding: 1.25rem var(--section-gutter-space, 1.25rem) 2rem;
}

.wbg_ext_menu_title {
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: var(--neutral-solid-60-s, #4b5e71);
	margin: 0 0 1rem;
	text-transform: uppercase;
}

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

.wbg_ext_menu_wrapper ul li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--neutral-solid-10-s, #e7edf3);
}

.wbg_ext_menu_wrapper ul li:last-child {
	border-bottom: 0;
}

.wbg_ext_menu_wrapper ul a {
	display: block;
	padding: 0.65rem 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--neutral-solid-80-s, #252e37);
	text-decoration: none;
}

.wbg_ext_menu_wrapper ul a:hover,
.wbg_ext_menu_wrapper ul a:focus-visible {
	color: var(--blue-50-base, #0071bc);
	outline: none;
}

/* Desktop: horizontal bar + dropdown from below header */
@media screen and (min-width: 1024px) {
	.wbg_ext_hamburger_icon {
		display: none !important;
	}

	.wbg_ext_global_header__nav-list {
		display: flex !important;
	}

	.wbg_ext_global_header__megamenu.wbg_ext_top_navigation {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 10060;
		max-height: min(70vh, 520px);
		overflow: hidden;
		box-shadow: 0 12px 40px rgba(0, 34, 68, 0.14);
		border-bottom: 1px solid var(--neutral-solid-15-s, #dae3eb);
	}

	.touchui-container.wbg_ext_tab_container {
		display: grid;
		grid-template-columns: minmax(220px, 28%) 1fr;
		max-width: var(--screen-width, 1200px);
		margin: 0 auto;
		min-height: 280px;
		max-height: inherit;
	}

	.wbg_ext_close_navigation {
		display: flex;
	}

	.wbg_ext_back_navigation {
		display: none !important;
	}

	.wbg_ext_menu_item {
		padding: 0.75rem 0;
		border-right: 1px solid var(--neutral-solid-15-s, #dae3eb);
		background: var(--white, #fff);
		overflow-y: auto;
		max-height: min(70vh, 520px);
	}

	.wbg_ext_tabpanels {
		overflow-y: auto;
		max-height: min(70vh, 520px);
	}
}

/* Mobile / tablet: full-screen overlay, slide from top */
@media screen and (max-width: 1023.98px) {
	.wbg_ext_global_header__nav-list {
		display: none !important;
	}

	.wbg_ext_hamburger_icon {
		display: flex !important;
	}

	.wbg_ext_global_header__megamenu.wbg_ext_top_navigation {
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		z-index: 100000;
		max-height: none;
		overflow: hidden;
		transform: translateY(-100%);
		box-shadow: none;
	}

	.wbg_ext_global_header__megamenu.wbg_ext_top_navigation.active,
	.wbg_ext_global_header__megamenu.wbg_ext_top_navigation.is-open {
		transform: translateY(0);
	}

	.touchui-container.wbg_ext_tab_container {
		display: flex;
		flex-direction: column;
		min-height: 100vh;
		max-height: 100vh;
		padding-top: 3.5rem;
	}

	.wbg_ext_close_navigation {
		display: flex;
	}

	.wbg_ext_menu_item {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 0;
		border-bottom: 1px solid var(--neutral-solid-15-s, #dae3eb);
		background: var(--white, #fff);
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.wbg_ext_menu_list {
		flex: 0 0 auto;
	}

	.wbg_ext_menu_link {
		white-space: nowrap;
		border-left: 0;
		border-bottom: 3px solid transparent;
		padding: 0.75rem 1rem;
	}

	.wbg_ext_menu_list.active .wbg_ext_menu_link,
	.wbg_ext_menu_list[aria-selected="true"] .wbg_ext_menu_link {
		border-left: 0;
		border-bottom-color: var(--blue-50-base, #0071bc);
	}

	.wbg_ext_tabpanels {
		flex: 1;
		border-left: 0;
		overflow-y: auto;
		min-height: 0;
	}
}

body.wbg-megamenu-open {
	overflow: hidden;
}

@media screen and (min-width: 1024px) {
	body.wbg-megamenu-open {
		overflow: auto;
	}
}
