/* ==========================================================================
   SwissKH, en-tête : menu mobile et tablette
   Le widget Menu (Elementor Pro) passe en menu déroulant sous 1240 px
   (réglage « Point de rupture » = portable). Ici : panneau sombre plein écran,
   entrées confortables au doigt, sous-menus en accordéon.
   ========================================================================== */

@media (max-width: 1240px) {
	/* Bouton menu : zone tactile de 44 px, tout à droite ; « Demander un devis » juste avant. */
	.skh-header .e-n-menu-toggle { width: 44px; height: 44px; justify-content: center; }
	.skh-header > .e-con-inner > .skh-header-cta { order: 2; margin-left: auto; }
	.skh-header > .e-con-inner > [data-widget_type^="mega-menu"] { order: 3; flex-grow: 0 !important; }

	/* Panneau */
	.skh-header .e-n-menu-wrapper {
		background: #0F1216 !important;
		border-top: 1px solid rgba(255, 255, 255, .08);
		box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .7);
		overscroll-behavior: contain;
		overflow-x: hidden;
		/* Hauteur calculée par Elementor jusqu'au bas de l'écran : le panneau couvre la page. */
		height: var(--n-menu-dropdown-content-box-height, auto);
	}
	.skh-header .e-n-menu-heading { padding: 6px 0 18px; }

	/* Entrées */
	.skh-header .e-n-menu-item { border-bottom: 1px solid rgba(255, 255, 255, .08); }
	/* Entrée ouverte : pas d'élargissement « pleine largeur » du mode bureau (décalage de 8 px). */
	.skh-header .e-n-menu-item, .skh-header .e-n-menu-content { width: 100% !important; max-width: 100% !important; left: 0 !important; right: auto !important; inset-inline-start: 0 !important; margin-inline: 0 !important; }
	.skh-header .e-n-menu-title {
		background: transparent !important; padding: 0 !important; min-height: 56px;
		justify-content: space-between; align-items: stretch; gap: 0;
	}
	.skh-header .e-n-menu-title::after { display: none; }
	.skh-header .e-n-menu-title-container {
		flex: 1; display: flex; align-items: center; margin: 0 !important; padding: 16px var(--skh-gutter, 24px) !important;
		font-size: 1.125rem; letter-spacing: .06em; color: #fff !important;
	}
	.skh-header .e-n-menu-title.e-current .e-n-menu-title-container { color: #fff; box-shadow: inset 3px 0 0 var(--skh-red); }
	.skh-header .e-n-menu-dropdown-icon {
		flex: none !important; width: 60px !important; height: auto !important; margin: 0 !important; padding: 0 !important;
		display: flex !important; justify-content: center; align-items: center;
		border-left: 1px solid rgba(255, 255, 255, .1) !important; color: #fff !important; fill: #fff !important;
	}
	.skh-header .e-n-menu-dropdown-icon svg { width: 14px !important; height: 14px !important; fill: currentColor !important; }
	.skh-header .e-n-menu-title[aria-expanded="true"] .e-n-menu-dropdown-icon,
	.skh-header .e-n-menu-dropdown-icon[aria-expanded="true"] { color: var(--skh-red) !important; }

	/* Sous-menus (contenu des entrées Machines et Société) */
	.skh-header .e-n-menu-content { max-height: none !important; overflow: visible !important; }
	.skh-header .e-n-menu-content > .e-con {
		flex-direction: column !important; gap: 22px !important;
		max-height: none !important; overflow: visible !important;
		padding: 6px var(--skh-gutter, 24px) 26px !important;
		background: #14181D !important; border-top: 1px solid rgba(255, 255, 255, .06);
	}
	.skh-header .e-n-menu-content > .e-con > .e-con-inner { flex-direction: column !important; flex-wrap: nowrap !important; height: auto !important; gap: 22px !important; padding: 0 !important; }
	.skh-header .e-n-menu-content .e-con { width: 100% !important; max-width: 100% !important; }
	.skh-header .e-n-menu-content .elementor-icon-list-item > a,
	.skh-header .e-n-menu-content .elementor-icon-list-item > .elementor-icon-list-text { min-height: 40px; align-items: center; }
	.skh-mega-ops .elementor-icon-list-items { column-gap: 18px; }

	/* Tuile CADRIA : compacte, image réduite */
	.skh-header .skh-mega-feature { padding: 18px !important; }
	.skh-header .skh-mega-feature img { max-height: 140px; width: auto !important; object-fit: contain; }

	/* Page figée derrière le menu ouvert ; la gouttière de la barre de défilement reste
	   réservée pour que le panneau, calé par Elementor, ne se décale pas. */
	html { scrollbar-gutter: stable; }
	html.skh-menu-open, html.skh-menu-open body { overflow: hidden; }
}

@media (max-width: 640px) {
	/* Bouton devis compact à côté du menu */
	.skh-header-cta .elementor-button { padding: 11px 12px !important; font-size: .78rem !important; letter-spacing: .06em; }
	.skh-header-cta .elementor-button-icon { display: none; }
	.skh-header .e-n-menu-title-container { font-size: 1.05rem; }
	.skh-mega-ops .elementor-icon-list-items { columns: 2; }
}
