/* ECS – méga menu automatique (remplace l'affichage de Max Mega Menu dans l'en-tête Divi) */
.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer {
	--mm-green: #043f3e;
	--mm-green-2: #0b5654;
	--mm-mint: #64a891;
	--mm-lime: #a4d266;
	--mm-red: #ed1b26;
	--mm-red-dk: #c4141d;
	--mm-ink: #333;
	--mm-muted: #5f6b6a;
	--mm-line: #dfe6e5;
	--mm-soft: #f2f6f5;
	font-family: "Open Sans Variable", "Open Sans", Arial, sans-serif;
}
.ecs-mm { display: flex; justify-content: flex-end; align-items: center; width: 100%; }
.ecs-mm-panel[hidden], .ecs-mm-drawer[hidden] { display: none !important; }
:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) *, :is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) *::before, :is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) *::after { box-sizing: border-box; }
:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) [hidden] { display: none !important; }
:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) button { cursor: pointer; letter-spacing: normal; text-transform: none; }
:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) :focus-visible { outline: 3px solid var(--mm-lime); outline-offset: 2px; }

/* Barre */
.ecs-mm-nav ul { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 2px; }
.ecs-mm-nav li { margin: 0; padding: 0; list-style: none; }
.ecs-mm .ecs-mm-top { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: #fff !important; font: 700 16px/1.2 "Open Sans Variable", "Open Sans", Arial, sans-serif; padding: 10px 10px; text-decoration: none; border-bottom: 3px solid transparent; border-radius: 0; white-space: nowrap; }
.ecs-mm-top:hover, .ecs-mm-top[aria-expanded="true"], .ecs-mm-top.is-current { border-bottom-color: var(--mm-lime); }
.ecs-mm-chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.ecs-mm-top[aria-expanded="true"] .ecs-mm-chev { transform: rotate(-135deg) translateY(-1px); }
.ecs-mm-burger { display: none; align-items: center; gap: 10px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 10px; padding: 10px 14px; font-weight: 700 !important; font-size: 15px; }
.ecs-mm-burger-ico, .ecs-mm-burger-ico::before, .ecs-mm-burger-ico::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.ecs-mm-burger-ico::before, .ecs-mm-burger-ico::after { content: ""; position: absolute; left: 0; }
.ecs-mm-burger-ico::before { top: -6px; }
.ecs-mm-burger-ico::after { top: 6px; }

/* Panneau (positionné en JS sous l'en-tête) */
.ecs-mm-panel { position: fixed; left: 0; right: 0; top: 0; z-index: 2147482000; background: #fff; color: var(--mm-ink); box-shadow: 0 24px 50px rgba(4,63,62,.22); border-top: 3px solid var(--mm-lime); max-height: calc(100vh - 140px); overflow-y: auto; text-align: left; }
.ecs-mm-wrap { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.ecs-mm-panel.is-single .ecs-mm-wrap { grid-template-columns: minmax(0, 1fr); }
.ecs-mm-side { background: var(--mm-soft); padding: 22px 18px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--mm-line); }
.ecs-mm-side-title { font: 700 13px/1.3 Montserrat, "Open Sans", Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--mm-mint); margin: 0 0 8px 12px; padding: 0; }
.ecs-mm-use { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 11px 12px; border-radius: 10px; color: var(--mm-green); font: 700 15px/1.3 Montserrat, "Open Sans", Arial, sans-serif !important; }
.ecs-mm-use span { font: 600 12px/1.4 "Open Sans", Arial, sans-serif; color: var(--mm-muted); background: #fff; border-radius: 999px; padding: 2px 8px; }
.ecs-mm-use:hover { background: rgba(255,255,255,.75); }
a.ecs-mm-use { text-decoration: none !important; color: var(--mm-green) !important; }
a.ecs-mm-use[aria-current="true"] { color: #fff !important; }
.ecs-mm-title a { color: inherit !important; text-decoration: none; }
.ecs-mm-title a:hover { text-decoration: underline; }
.ecs-mm-dtitle a { color: inherit !important; text-decoration: none; }
.ecs-mm-use[aria-current="true"] { background: var(--mm-green); color: #fff; }
.ecs-mm-use[aria-current="true"] span { background: rgba(255,255,255,.18); color: #fff; }
.ecs-mm-all { display: inline-block; margin-top: 10px; padding: 8px 12px; color: var(--mm-red-dk) !important; font: 700 14px/1.3 Montserrat, "Open Sans", Arial, sans-serif; text-decoration: none; }
.ecs-mm-all:hover { text-decoration: underline; }
.ecs-mm-content { padding: 22px 24px 24px; min-width: 0; }
.ecs-mm-group { display: grid; gap: 16px; }
.ecs-mm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ecs-mm-title { font: 700 20px/1.2 Montserrat, "Open Sans", Arial, sans-serif; color: var(--mm-green); margin: 0; padding: 0; }
.ecs-mm-desc { margin: 2px 0 0; padding: 0; color: var(--mm-muted); font-size: 14px; }
.ecs-mm-motors { display: flex; gap: 6px; flex-wrap: wrap; }
.ecs-mm-motors button { font-family: inherit; border: 1px solid var(--mm-line); background: #fff; color: var(--mm-ink); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; line-height: 1.3; }
.ecs-mm-motors button[aria-pressed="true"] { background: var(--mm-green); border-color: var(--mm-green); color: #fff; }
.ecs-mm-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) .m-elec { background: #2f7de1; }
:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) .m-ess { background: #e08a1e; }
:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) .m-dies { background: #5b5b5b; }
:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) .m-att { background: #8a5cc7; }
.ecs-mm-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ecs-mm-card { display: flex; flex-direction: column; border: 1px solid var(--mm-line); border-radius: 14px; overflow: hidden; background: #fff; text-decoration: none !important; color: var(--mm-ink) !important; transition: border-color .15s, transform .15s, box-shadow .15s; }
.ecs-mm-card:hover { border-color: var(--mm-mint); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(4,63,62,.10); }
.ecs-mm-card img, .ecs-mm-card .ecs-mm-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--mm-soft); }
.ecs-mm-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.ecs-mm-card b { font: 700 15px/1.3 Montserrat, "Open Sans", Arial, sans-serif; color: var(--mm-green); }
.ecs-mm-card small { color: var(--mm-muted); font-size: 13px; line-height: 1.35; }
.ecs-mm-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mm-muted); line-height: 1.3; }
.ecs-mm-ext::after { content: " ↗"; }
.ecs-mm-help { border: 1px dashed var(--mm-mint); border-radius: 14px; background: var(--mm-soft); padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.ecs-mm-help b { font: 700 16px/1.3 Montserrat, "Open Sans", Arial, sans-serif; color: var(--mm-green); }
.ecs-mm-help p { margin: 0; padding: 0; font-size: 14px; color: var(--mm-muted); line-height: 1.45; }
.ecs-mm-cta { display: inline-flex; justify-content: center; align-items: center; align-self: flex-start; background: var(--mm-red); color: #fff !important; border-radius: 999px; padding: 10px 16px; font: 700 14px/1.2 Montserrat, "Open Sans", Arial, sans-serif; text-decoration: none !important; }
.ecs-mm-cta:hover { background: var(--mm-red-dk); }

/* Tiroir mobile */
.ecs-mm-drawer { position: fixed; inset: 0; z-index: 2147483000; background: #fff; color: var(--mm-ink); display: flex; flex-direction: column; text-align: left; }
.ecs-mm-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--mm-line); background: var(--mm-green); }
.ecs-mm-drawer-head img { height: 44px; width: auto; display: block; }
.ecs-mm-drawer-head strong { color: #fff; }
.ecs-mm-close { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font: 700 24px/1 Arial, sans-serif !important; }
.ecs-mm-drawer-body { flex: 1; overflow-y: auto; padding: 4px 16px 20px; -webkit-overflow-scrolling: touch; }
.ecs-mm-acc { border-bottom: 1px solid var(--mm-line); }
.ecs-mm-drawer .ecs-mm-acc > button, .ecs-mm-drawer .ecs-mm-acc > a { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: none; padding: 16px 4px; text-align: left; color: var(--mm-green) !important; font: 700 17px/1.3 Montserrat, "Open Sans", Arial, sans-serif !important; text-decoration: none; }
.ecs-mm-acc > button::after { content: "+"; color: var(--mm-red); font-size: 26px; line-height: 1; }
.ecs-mm-acc > button[aria-expanded="true"]::after { content: "–"; }
.ecs-mm-acc-in { padding: 0 0 14px; display: flex; flex-direction: column; gap: 12px; }
.ecs-mm-dtitle { font: 700 12px/1.3 Montserrat, "Open Sans", Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--mm-mint); margin: 4px 0 2px; padding: 0; }
.ecs-mm-row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none !important; padding: 6px; border-radius: 10px; color: var(--mm-ink) !important; }
.ecs-mm-row:hover { background: var(--mm-soft); }
.ecs-mm-row img, .ecs-mm-row .ecs-mm-noimg { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; display: block; background: var(--mm-soft); }
.ecs-mm-row b { font: 700 15px/1.3 Montserrat, "Open Sans", Arial, sans-serif; color: var(--mm-green); display: block; }
.ecs-mm-drawer-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--mm-line); display: flex; }
.ecs-mm-drawer-foot .ecs-mm-cta { flex: 1; padding: 13px 16px; font-size: 15px; }
html.ecs-mm-lock, html.ecs-mm-lock body { overflow: hidden !important; }

/* Contact mis en avant (entrée Contact du menu, ou toute entrée avec la classe CSS « bouton ») */
.ecs-mm .ecs-mm-top.is-cta { background: var(--mm-red); color: #fff !important; border: 0; border-radius: 999px; padding: 9px 16px; margin-left: 6px; transition: background .15s; }
.ecs-mm .ecs-mm-top.is-cta:hover, .ecs-mm .ecs-mm-top.is-cta.is-current { background: var(--mm-red-dk); }
.et_pb_sticky .ecs-mm .ecs-mm-top.is-cta { color: #fff !important; }

@media (max-width: 1399px) {
	.ecs-mm .ecs-mm-top { font-size: 15px; padding: 10px 9px; }
	.ecs-mm .ecs-mm-top.is-cta { padding: 8px 14px; }
}
@media (max-width: 1340px) {
	.ecs-mm-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ecs-mm .ecs-mm-top { font-size: 14px; padding: 10px 8px; gap: 5px; }
	.ecs-mm .ecs-mm-top.is-cta { padding: 8px 13px; margin-left: 5px; }
}
@media (max-width: 1250px) {
	.ecs-mm .ecs-mm-top { font-size: 13px; }
}
@media (max-width: 1220px) {
	.ecs-mm-nav, .ecs-mm-panels { display: none !important; }
	.ecs-mm-burger { display: inline-flex; }
}
@media (min-width: 1221px) {
	.ecs-mm-drawer { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	:is(.ecs-mm, .ecs-mm-panels, .ecs-mm-drawer) * { transition: none !important; }
}

/* En-tête fixe (fond blanc au défilement) : texte vert, comme l'ancien menu */
.et_pb_sticky .ecs-mm .ecs-mm-top { color: #043f3e !important; }
.et_pb_sticky .ecs-mm .ecs-mm-burger { background: #043f3e; border-color: #043f3e; color: #fff; }

/* Menu centré verticalement dans l'en-tête (logo et menu sur la même ligne médiane) */
@media (min-width: 1221px) {
	.et-l--header .et_pb_row_0_tb_header { display: flex; align-items: center; }
	.et-l--header .et_pb_row_0_tb_header > .et_pb_column { float: none; }
	/* Toujours sur une ligne : si la colonne est un peu étroite, le menu déborde vers la gauche (espace libre à côté du logo) */
	.ecs-mm-nav ul { flex-wrap: nowrap !important; }
	/* Logo calé à gauche (même marge que le menu à droite) pour laisser de l'air entre les entrées */
	.et-l--header .et_pb_image_0_tb_header { margin-left: 0 !important; margin-right: auto !important; }
}
