/* Menu de navigation — styles front */

.hsam {
	position: relative;
}

.hsam__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 34px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hsam__list li {
	position: relative;
	margin: 0;
}

.hsam__list a {
	display: block;
	padding: 8px 0;
	color: #111;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1px;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 180ms ease;
}

.hsam__list a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Soulignement de la page courante. */
.hsam--underline .hsam__list > .current-menu-item > a,
.hsam--underline .hsam__list > .current-menu-ancestor > a {
	position: relative;
}

.hsam--underline .hsam__list > .current-menu-item > a::after,
.hsam--underline .hsam__list > .current-menu-ancestor > a::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3px;
	background-color: #ffc800;
}

/* --- Sous-menus -------------------------------------------------------- */

.hsam__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	display: none;
	min-width: 220px;
	margin: 0;
	padding: 8px 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
	background-color: #fff;
	list-style: none;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.hsam__list .sub-menu a {
	padding: 8px 16px;
	font-size: 14px;
	letter-spacing: 0;
	text-transform: none;
}

/* Ouverture au survol : le focus clavier ouvre aussi le sous-menu. */
.hsam--submenu-hover .hsam__list > li:hover > .sub-menu,
.hsam--submenu-hover .hsam__list > li:focus-within > .sub-menu,
.hsam__list li.is-open > .sub-menu {
	display: block;
}

.hsam--arrows .menu-item-has-children > a::before {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	margin-right: 6px;
	border-top: 4px solid currentColor;
	border-right: 4px solid transparent;
	border-left: 4px solid transparent;
	vertical-align: middle;
}

/* Bouton ajouté par le script sur les entrées à sous-menu, en mode burger. */
.hsam__sub-toggle {
	position: absolute;
	top: 0;
	right: 0;
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

/* --- Bouton burger ------------------------------------------------------ */

.hsam__bar {
	display: none;
	justify-content: flex-end;
}

.hsam__toggle {
	--hsam-icon: 24px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px;
	border: 0;
	background: transparent;
	color: #111;
	cursor: pointer;
}

.hsam__toggle-text {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.hsam__icon,
.hsam__icon::before,
.hsam__icon::after {
	display: block;
	width: var(--hsam-icon);
	height: 2px;
	background-color: currentColor;
	transition: transform 200ms ease, opacity 200ms ease;
}

.hsam__icon {
	position: relative;
}

.hsam__icon::before,
.hsam__icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.hsam__icon::before {
	top: -7px;
}

.hsam__icon::after {
	top: 7px;
}

.hsam.is-open .hsam__icon {
	background-color: transparent;
}

.hsam.is-open .hsam__icon::before {
	transform: translateY(7px) rotate(45deg);
}

.hsam.is-open .hsam__icon::after {
	transform: translateY(-7px) rotate(-45deg);
}

.hsam-empty {
	padding: 16px;
	border: 1px dashed #c3c4c7;
	color: #50575e;
	text-align: center;
}

/* --- Mode burger : commun aux deux seuils ------------------------------- */

.hsam.is-burger .hsam__bar {
	display: flex;
}

.hsam.is-burger .hsam__panel {
	display: none;
	padding: 20px;
	background-color: #fff;
}

.hsam.is-burger.is-open .hsam__panel {
	display: block;
}

.hsam.is-burger .hsam__list {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.hsam.is-burger .hsam__list li {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.hsam.is-burger .hsam__list a {
	padding: 14px 0;
}

.hsam.is-burger .hsam__list .sub-menu {
	position: static;
	display: none;
	min-width: 0;
	padding: 0 0 8px 16px;
	border: 0;
	box-shadow: none;
}

.hsam.is-burger .hsam__list li.is-open > .sub-menu {
	display: block;
}

.hsam.is-burger .hsam__sub-toggle {
	display: block;
}

.hsam.is-burger .menu-item-has-children > a {
	padding-right: 48px;
}

/* Panneau plein écran. */
.hsam--panel-overlay.is-burger.is-open .hsam__panel {
	position: fixed;
	inset: 0;
	z-index: 9999;
	overflow-y: auto;
	padding-top: 72px;
}

.hsam--panel-overlay.is-burger.is-open .hsam__bar {
	position: relative;
	z-index: 10000;
}

@media (prefers-reduced-motion: reduce) {
	.hsam__list a,
	.hsam__icon,
	.hsam__icon::before,
	.hsam__icon::after {
		transition: none;
	}
}
