/* =========================================================
   Hamon - Menu Responsive
   ========================================================= */

.hmr-wrapper {
	position: relative;
	display: block;
}

/* ---------- Conteneur du bouton (pour l'alignement) ---------- */
.hmr-trigger-wrap {
	display: block;
	width: 100%;
}

/* ---------- Bouton hamburger ---------- */
.hmr-trigger {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 6px;
	width: 40px;
	height: 40px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 10001;
}

.hmr-trigger__bar {
	display: block;
	width: 70%;
	height: 2px;
	background-color: #1a1a1a;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
	transform-origin: center;
}

/* Position fixe du déclencheur */
.hmr-trigger--fixed .hmr-trigger {
	position: fixed;
	top: 16px;
	z-index: 10001;
}
.hmr-trigger--fixed-left .hmr-trigger  { left: 16px; }
.hmr-trigger--fixed-right .hmr-trigger { right: 16px; }

.hmr-trigger--below_header {
	display: block;
	width: 100%;
}

/* ---------- Animations des barres (état ouvert) ---------- */
.hmr-wrapper[data-bar-anim="cross"] .hmr-trigger.is-active .hmr-trigger__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hmr-wrapper[data-bar-anim="cross"] .hmr-trigger.is-active .hmr-trigger__bar:nth-child(2) { opacity: 0; }
.hmr-wrapper[data-bar-anim="cross"] .hmr-trigger.is-active .hmr-trigger__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.hmr-wrapper[data-bar-anim="arrow"] .hmr-trigger.is-active .hmr-trigger__bar:nth-child(1) { transform: translateY(8px) rotate(30deg) scaleX(0.6); }
.hmr-wrapper[data-bar-anim="arrow"] .hmr-trigger.is-active .hmr-trigger__bar:nth-child(3) { transform: translateY(-8px) rotate(-30deg) scaleX(0.6); }

.hmr-wrapper[data-bar-anim="spin"] .hmr-trigger.is-active { transform: rotate(90deg); }

/* ---------- Fond assombri (backdrop) ---------- */
.hmr-backdrop {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
	z-index: 9998;
}
.hmr-wrapper.is-open .hmr-backdrop {
	opacity: 1;
	visibility: visible;
}

/* ---------- Panneau du menu (base commune) ---------- */
.hmr-panel {
	background-color: #fff;
	overflow: hidden;
}

/* ===== Mode PUSH ===== */
.hmr-open--push .hmr-panel {
	position: static;
	max-height: 0;
	transition: max-height ease;
}
.hmr-open--push.is-open .hmr-panel {
	max-height: 2000px;
}

/* ===== Mode OVERLAY ===== */
.hmr-open--overlay .hmr-panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 9999;
	max-height: 0;
	opacity: 0;
	visibility: hidden;
	transition: max-height ease, opacity ease, visibility ease;
}
.hmr-open--overlay.is-open .hmr-panel {
	max-height: 2000px;
	opacity: 1;
	visibility: visible;
}

/* ===== Mode DRAWER ===== */
.hmr-panel--drawer,
.hmr-open--drawer .hmr-panel {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 80%;
	max-width: 420px;
	z-index: 9999;
	transition: transform ease;
	overflow-y: auto;
}
.hmr-drawer--left .hmr-panel {
	left: 0;
	transform: translateX(-100%);
}
.hmr-drawer--right .hmr-panel {
	right: 0;
	transform: translateX(100%);
}
.hmr-open--drawer.is-open .hmr-panel {
	transform: translateX(0);
}

/* ---------- Styles d'animation ---------- */
.hmr-anim--vertical .hmr-panel { transition-property: max-height; }
.hmr-anim--lateral:not(.hmr-open--drawer) .hmr-panel { transform: translateX(-20px); transition-property: max-height, opacity, transform; }
.hmr-anim--lateral:not(.hmr-open--drawer).is-open .hmr-panel { transform: translateX(0); }
.hmr-anim--fade .hmr-panel { transition-property: max-height, opacity; }

/* ---------- Layout du menu déroulé ---------- */
.hmr-menu {
	list-style: none;
	margin: 0;
	padding: 16px;
	display: flex;
	width: auto;
	max-width: 100%;
}
.hmr-menu--vertical   { flex-direction: column; align-items: stretch; }
.hmr-menu--horizontal { flex-direction: row; flex-wrap: wrap; width: 100%; }

.hmr-menu__item { position: relative; width: 100%; }

.hmr-menu__link {
	display: inline-block;
	text-decoration: none;
	color: #1a1a1a;
	transition: color 0.2s ease;
}
.hmr-menu__link:hover { color: #7B4F2E; }
.hmr-menu__item.is-current .hmr-menu__link { text-decoration: none; }

.hmr-panel__logo { margin-bottom: 20px; }
.hmr-panel__logo img { max-height: 40px; width: auto; }

body.hmr-no-scroll { overflow: hidden; }

/* =============================================================
   MODE DESKTOP : liens toujours visibles, hamburger masqué.
   ============================================================= */

/* Au-dessus du breakpoint : hamburger caché, panel toujours visible */
.hmr-has-desktop-mode:not(.hmr-is-mobile) .hmr-trigger-wrap,
.hmr-has-desktop-mode:not(.hmr-is-mobile) .hmr-backdrop {
	display: none !important;
}

/* Panel réinitialisé — on surcharge tous les modes d'ouverture */
.hmr-has-desktop-mode:not(.hmr-is-mobile).hmr-open--push .hmr-panel,
.hmr-has-desktop-mode:not(.hmr-is-mobile).hmr-open--overlay .hmr-panel,
.hmr-has-desktop-mode:not(.hmr-is-mobile).hmr-open--drawer .hmr-panel {
	position: static !important;
	max-height: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	transition: none !important;
	overflow: visible !important;
	width: auto !important;
}

/* Desktop horizontal */
.hmr-has-desktop-mode:not(.hmr-is-mobile).hmr-desktop--horizontal .hmr-menu {
	flex-direction: row;
	align-items: center;
	padding: 0;
	gap: 2em;
}
.hmr-has-desktop-mode:not(.hmr-is-mobile).hmr-desktop--horizontal .hmr-menu__item {
	width: auto !important;
	margin-right: 0 !important;
	margin-bottom: 0 !important;
}

/* Desktop vertical */
.hmr-has-desktop-mode:not(.hmr-is-mobile).hmr-desktop--vertical .hmr-menu {
	flex-direction: column;
	padding: 0;
	gap: 0.75em;
}
.hmr-has-desktop-mode:not(.hmr-is-mobile).hmr-desktop--vertical .hmr-menu__item {
	width: auto !important;
	margin-right: 0 !important;
	margin-bottom: 0 !important;
}

/* En mobile : retour au comportement hamburger */
.hmr-has-desktop-mode.hmr-is-mobile .hmr-trigger-wrap {
	display: block !important;
}
.hmr-has-desktop-mode.hmr-is-mobile.hmr-open--push .hmr-panel {
	position: static !important;
	max-height: 0 !important;
	overflow: hidden !important;
	opacity: 1 !important;
	visibility: visible !important;
	transition: max-height ease !important;
}
.hmr-has-desktop-mode.hmr-is-mobile.hmr-open--push.is-open .hmr-panel {
	max-height: 2000px !important;
}
.hmr-has-desktop-mode.hmr-is-mobile.hmr-open--overlay .hmr-panel {
	position: absolute !important;
	max-height: 0 !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transition: max-height ease, opacity ease, visibility ease !important;
}
.hmr-has-desktop-mode.hmr-is-mobile.hmr-open--overlay.is-open .hmr-panel {
	max-height: 2000px !important;
	opacity: 1 !important;
	visibility: visible !important;
}
