/* Header compact utilisé avec le moteur `.blobul-nav`. */
.core-header[data-core-navigation="disclosure"] {
	--core-header-action: #167da3;
	--core-header-action-contrast: #fff;
	--core-header-border: rgba(17, 40, 52, 0.12);
	background: #fff;
	border-bottom: 1px solid var(--core-header-border);
	height: auto !important;
	position: sticky !important;
	top: 0;
	z-index: 1000;
}

body.admin .core-header[data-core-navigation="disclosure"] {
	top: 42px;
}

body.core-shell-v2.core-navigation-disclosure #container,
body.core-shell-v2 #container:has(> #header.core-header[data-core-navigation="disclosure"]) {
	padding-top: 0 !important;
}

.core-header[data-core-navigation="disclosure"] .core-header__inner {
	box-sizing: border-box;
	height: auto;
	margin: 0 auto;
	max-width: 1440px;
	padding: 0;
	position: relative;
	width: 100%;
}

.core-header[data-core-navigation="disclosure"] .core-header__topbar {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	float: none;
	gap: 0.65rem;
	justify-content: flex-end;
	margin: 0;
	padding: 0.55rem clamp(1rem, 3vw, 2.5rem);
	position: static;
	right: auto;
	width: 100%;
}

body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #top_bar.core-header__topbar {
	box-sizing: border-box;
	display: flex !important;
	float: none !important;
	inset: auto !important;
	position: static !important;
	width: 100% !important;
}

.core-header[data-core-navigation="disclosure"] .core-header__topbar > * {
	display: block;
	margin: 0;
	padding-block: 0;
	vertical-align: middle;
}

.core-header[data-core-navigation="disclosure"] .core-header__social {
	display: none !important;
}

.core-header[data-core-navigation="disclosure"] .core-header__main {
	align-items: center;
	display: grid;
	grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
	inset: auto;
	padding: 0.65rem clamp(1rem, 3vw, 2.5rem);
	position: static;
	width: auto;
}

body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #main_menu.core-header__main {
	box-sizing: border-box;
	float: none !important;
	inset: auto !important;
	padding: 0.65rem clamp(1rem, 3vw, 2.5rem) !important;
	position: static !important;
	width: 100% !important;
}

.core-header[data-core-navigation="disclosure"] .core-header__brand {
	align-items: center;
	display: flex !important;
	margin: 0 !important;
	min-width: 0;
	text-align: left;
	width: auto;
}

.core-header[data-core-navigation="disclosure"] .core-header__brand a {
	display: inline-flex;
}

.core-header[data-core-navigation="disclosure"] .core-header__brand img {
	display: block;
	height: auto;
	max-width: 100%;
	width: auto;
}

.core-header[data-core-navigation="disclosure"] .core-header__nav {
	display: block;
	margin: 0;
	min-width: 0;
	padding: 0;
	width: 100%;
}

.core-header[data-core-navigation="disclosure"] .core-header__nav .item.logo {
	display: none !important;
}

.core-header[data-core-navigation="disclosure"] .core-header__toggle {
	align-items: center;
	background: var(--core-header-action);
	border: 1px solid var(--core-header-action);
	border-radius: var(--core-radius-md, 0);
	color: var(--core-header-action-contrast);
	cursor: pointer;
	display: none;
	gap: 0.5rem;
	justify-content: center;
	min-height: 44px;
	padding: 0.6rem 0.8rem;
}

.core-header[data-core-navigation="disclosure"] .core-header__toggle:hover,
.core-header[data-core-navigation="disclosure"] .core-header__toggle:focus-visible,
.core-header[data-core-navigation="disclosure"] .core-header__toggle[aria-expanded="true"] {
	background: color-mix(in srgb, var(--core-header-action) 84%, #000);
	border-color: color-mix(in srgb, var(--core-header-action) 84%, #000);
	color: var(--core-header-action-contrast);
}

.core-account {
	--core-header-action: #0074b3;
	--core-header-action-contrast: #fff;
	display: none;
}

.core-account-mobile {
	display: none;
}

.core-header[data-core-navigation="disclosure"] .core-account,
.core-account__guest {
	align-items: center;
	display: flex;
	gap: 0.5rem;
}

.core-header[data-core-navigation="disclosure"] .core-account {
	position: relative;
	z-index: 230;
}

body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #top_bar.core-header__topbar > .core-account {
	display: flex !important;
}

.core-header[data-core-navigation="disclosure"] .connexion {
	display: none !important;
}

.core-account__action,
.core-account__toggle {
	align-items: center;
	border: 1px solid var(--core-header-action);
	border-radius: var(--core-radius-pill, 0);
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	gap: 0.45rem;
	justify-content: center;
	min-height: 44px;
	padding: 0.55rem 0.9rem;
	text-decoration: none;
	text-transform: none;
	transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.core-account__action--login,
.core-account__toggle {
	background: #fff;
	color: var(--core-header-action);
}

.core-account__action--signup {
	background: var(--core-header-action);
	color: var(--core-header-action-contrast);
}

.core-account__action:hover,
.core-account__action:focus-visible,
.core-account__toggle:hover,
.core-account__toggle:focus-visible {
	box-shadow: 0 6px 18px rgba(17, 40, 52, 0.14);
	transform: translateY(-1px);
}

.core-account__toggle:hover,
.core-account__toggle:focus-visible {
	background: var(--core-header-action);
	color: var(--core-header-action-contrast);
}

.core-account__toggle {
	appearance: none;
}

.core-account__avatar {
	align-items: center;
	background: color-mix(in srgb, var(--core-header-action) 12%, #fff);
	border-radius: 50%;
	display: inline-flex;
	height: 1.85rem;
	justify-content: center;
	width: 1.85rem;
}

.core-account__chevron {
	transition: transform 180ms ease;
}

.core-account__toggle[aria-expanded="true"] .core-account__chevron {
	transform: rotate(180deg);
}

.core-account__menu {
	background: #fff;
	border: 1px solid var(--core-header-border);
	border-radius: var(--core-radius-lg, 0);
	box-shadow: 0 16px 38px rgba(17, 40, 52, 0.18);
	min-width: 15rem;
	padding: 0.5rem;
	position: absolute;
	right: 0;
	top: calc(100% + 0.5rem);
}

.core-account__menu::before {
	content: "";
	height: 0.5rem;
	left: 0;
	position: absolute;
	right: 0;
	top: -0.5rem;
}

.core-account__menu[hidden] {
	display: none !important;
}

.core-account__menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.core-account__menu a {
	border-radius: var(--core-radius-sm, 0);
	display: block;
	padding: 0.7rem 0.8rem;
	text-decoration: none;
	text-transform: none;
	transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

/* Le menu utilisateur reste au-dessus de la navigation principale et reprend
 * les pictogrammes utilisés dans le front-office. */
body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #top_bar.core-header__topbar {
	position: relative;
	z-index: 300;
}

body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #main_menu.core-header__main {
	position: relative;
	z-index: 100;
}

body.core-shell-v2 .core-account__menu a::before {
	display: inline-block;
	width: 1.35rem;
	margin-right: 0.35rem;
	color: var(--core-header-action);
	font-family: "Font Awesome 6 Free", sans-serif;
	font-weight: 900;
	text-align: center;
}

body.core-shell-v2 .core-account__menu li.profil a::before {
	content: "\f007";
}

body.core-shell-v2 .core-account__menu li.login a::before {
	content: "\f2f6";
}

body.core-shell-v2 .core-account__menu li.signin a::before {
	content: "\f234";
}

body.core-shell-v2 .core-account__menu li.fiche_adherent a::before {
	content: "\f2bb";
}

body.core-shell-v2 .core-account__menu li.mot_de_passe a::before {
	content: "\f084";
}

body.core-shell-v2 .core-account__menu li.logout a::before {
	content: "\f2f5";
}

.core-account__menu a:hover,
.core-account__menu a:focus-visible {
	background: rgba(0, 116, 179, 0.11);
	color: #005f91;
	transform: translateX(3px);
}

.core-header[data-core-navigation="disclosure"] :focus-visible {
	outline: 3px solid var(--core-nav-focus, var(--core-header-action));
	outline-offset: 2px;
}

/*
 * Shell v2 et FlexNav chargent encore des règles historiques après ce
 * composant. En mode disclosure, le header moderne reste l'unique autorité
 * d'affichage du logo et du menu sur grand écran.
 */
@media (min-width: 1200px) {
	/* Reprise du comportement historique : au défilement, la barre
	 * utilitaire se resserre, le logo se réduit et la navigation remonte. */
	body.core-shell-v2.core-header-mini #header.core-header[data-core-navigation="disclosure"] {
		box-shadow: 0 4px 18px rgba(17, 40, 52, 0.1);
	}

	body.core-shell-v2.core-header-mini #header.core-header[data-core-navigation="disclosure"] .core-header__topbar {
		display: flex !important;
		padding-bottom: 0;
		padding-top: 0;
	}

	body.core-shell-v2.core-header-mini #header.core-header[data-core-navigation="disclosure"] .core-header__main {
		padding-bottom: 0.35rem !important;
		padding-top: 0.35rem !important;
	}

	body.core-shell-v2.core-header-mini #header.core-header[data-core-navigation="disclosure"] .core-header__brand img {
		max-height: 3.5rem;
		width: auto;
	}

	body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #main_menu.core-header__main {
		display: grid !important;
		inset: auto !important;
		position: static !important;
		width: auto !important;
	}

	body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #main_menu.core-header__main > .core-header__brand {
		display: flex !important;
		opacity: 1;
		visibility: visible;
	}

	body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #catnav.core-header__nav {
		display: block !important;
		opacity: 1;
		visibility: visible;
	}

	body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #catnav.core-header__nav > ul {
		display: flex !important;
		max-height: none !important;
		overflow: visible !important;
	}
}

@media (max-width: 1199.98px) {
	.core-header[data-core-navigation="disclosure"] .core-header__topbar {
		flex-wrap: wrap;
		padding: 0.5rem 1rem;
	}

	.core-header[data-core-navigation="disclosure"] .core-header__search {
		display: none !important;
	}

	.core-header[data-core-navigation="disclosure"] .core-header__main {
		grid-template-columns: minmax(0, 1fr) auto;
		min-height: 106px;
		padding: 0.5rem 1rem;
	}

	.core-header[data-core-navigation="disclosure"] .core-header__brand {
		grid-column: 1;
	}

	body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #main_menu.core-header__main {
		align-items: center !important;
		min-height: 106px !important;
		padding: 0.5rem 1rem !important;
		position: relative !important;
	}

	body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] .core-header__toggle {
		clear: none !important;
		display: inline-flex !important;
		float: none !important;
		margin: 0 !important;
		width: auto !important;
	}

	body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #catnav.core-header__nav {
		background: #fff;
		border-top: 1px solid var(--core-header-border);
		display: none !important;
		left: 0;
		max-height: calc(100vh - 8rem);
		overflow: auto;
		position: absolute;
		right: 0;
		top: 100%;
		z-index: 220;
	}

	body.core-shell-v2.core-nav-open #header.core-header[data-core-navigation="disclosure"] #catnav.core-header__nav {
		display: block !important;
	}

	body.core-shell-v2 #header.core-header[data-core-navigation="disclosure"] #catnav.core-header__nav > ul {
		max-height: none !important;
		overflow: visible !important;
	}

	.core-account__action span {
		display: none;
	}

	.core-account__action {
		min-width: 44px;
		padding: 0.55rem;
	}
}

@media (max-width: 640px) {
	body.admin .core-header[data-core-navigation="disclosure"] {
		top: 0;
	}

	.core-header[data-core-navigation="disclosure"] .core-header__topbar {
		justify-content: space-between;
	}

	.core-header[data-core-navigation="disclosure"] .core-header__language {
		margin-right: auto;
	}
}

@media (min-width: 481px) and (max-width: 1024px) {
	body.core-shell-v2 #header.core-header #main_menu.core-header__main {
		align-items: end !important;
		min-height: 124px !important;
		padding: 16px 2.5% 0 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.core-account__action,
	.core-account__toggle,
	.core-account__chevron,
	body.core-shell-v2 #header.core-header,
	body.core-shell-v2 #header.core-header .core-header__topbar,
	body.core-shell-v2 #header.core-header .core-header__main,
	body.core-shell-v2 #header.core-header .logo_site img {
		transition: none;
	}
}
