/* Menu de l'en-tête – avocat-montreal.ca */
#site-header {
	--b: #0a6bb5; --b-fonce: #08568f; --b-clair: #e6f0fa; --marine: #0f1f3a; --gris: #6b7587;
	background: rgba(255, 255, 255, .96); border-bottom: 1px solid rgba(15, 31, 58, .06); box-shadow: none;
	transition: box-shadow .25s, background .25s;
}
#site-header .theme-header-area { padding-top: 14px !important; padding-bottom: 14px !important; background: transparent !important; transition: padding .25s; }
#site-header.am-defile { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(1.6) blur(12px); backdrop-filter: saturate(1.6) blur(12px); box-shadow: 0 8px 28px rgba(15, 31, 58, .08); }
#site-header.am-defile .theme-header-area { padding-top: 8px !important; padding-bottom: 8px !important; }
#site-header .theme-header-logo img { max-height: 46px; width: auto; transition: max-height .25s, transform .25s; }
#site-header.am-defile .theme-header-logo img { max-height: 38px; }
#site-header .theme-header-logo a:hover img { transform: rotate(-8deg); }

/* Icônes (dessin au trait, couleur héritée) */
#menu-header > li > a::before, #menu-header > li.am-menu-contact > a::before {
	content: "" !important; display: inline-block !important; flex: 0 0 auto; width: 17px; height: 17px; margin: 0 8px 0 0; position: static !important;
	background: currentColor !important; opacity: .8; transform: none !important; border: 0 !important;
	-webkit-mask: var(--icone) no-repeat center / contain; mask: var(--icone) no-repeat center / contain;
}
#menu-header > li.menu-item-36215, #menu-header > li.am-ic-modeles { --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E"); }
#menu-header > li.menu-item-36216, #menu-header > li.am-ic-lettre { --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
#menu-header > li.menu-item-36221, #menu-header > li.am-ic-avocat { --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
#menu-header > li.menu-item-36996, #menu-header > li.am-ic-simulateurs { --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 11h.01M12 11h.01M16 11h.01M8 15h.01M12 15h.01M16 15h.01M8 18h8'/%3E%3C/svg%3E"); }
#menu-header > li.menu-item-36895, #menu-header > li.am-ic-apropos { --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5h.01'/%3E%3C/svg%3E"); }
#menu-header > li.am-menu-contact { --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E"); }

@media (min-width: 992px) {
	/* Capsule et pastille glissante */
	#site-header #menu-header {
		position: relative; isolation: isolate; display: flex; align-items: center; gap: 2px; padding: 5px; margin: 0; background: transparent;
	}
	/* Capsule grise sur tout le menu, Contact compris. */
	#site-header #menu-header::after {
		content: ""; position: absolute; left: 0; top: 0; bottom: 0; right: var(--am-fin, 0px); z-index: -1;
		border-radius: 999px; background: #f2f5fa; box-shadow: inset 0 0 0 1px rgba(15, 31, 58, .05);
	}
	#site-header #menu-header > .am-pastille {
		position: absolute; left: 0; top: 5px; bottom: 5px; z-index: 0; border-radius: 999px; background: #fff; opacity: 0; pointer-events: none;
		box-shadow: 0 2px 10px rgba(15, 31, 58, .1), 0 0 0 1px rgba(15, 31, 58, .04);
		transition: transform .32s cubic-bezier(.3, .8, .3, 1.15), width .32s cubic-bezier(.3, .8, .3, 1.15), opacity .2s;
	}
	#site-header #menu-header > li { position: relative; z-index: 1; margin: 0 !important; padding: 0 !important; }
	#site-header #menu-header > li > a {
		display: inline-flex !important; align-items: center; padding: 9px 15px !important; border-radius: 999px;
		color: var(--marine) !important; font-size: 14.5px !important; font-weight: 600 !important; line-height: 1.2 !important;
		text-transform: none !important; letter-spacing: 0 !important; white-space: nowrap; transition: color .2s;
	}
	#site-header #menu-header > li > a::after { display: none !important; }
	#site-header #menu-header > li:hover > a,
	#site-header #menu-header > li.current-menu-item > a,
	#site-header #menu-header > li.current-menu-ancestor > a,
	#site-header #menu-header > li.current-menu-parent > a { color: var(--b) !important; }
	#site-header #menu-header > li.menu-item-has-children > a { padding-right: 30px !important; }
	#site-header #menu-header > li.menu-item-has-children > a + .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
	#site-header #menu-header > li.menu-item-has-children::after {
		content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px; pointer-events: none;
		border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--gris); transform: rotate(45deg); transition: transform .2s, margin .2s;
	}
	#site-header #menu-header > li.menu-item-has-children:hover::after { transform: rotate(225deg); margin-top: -1px; color: var(--b); }
	#site-header #menu-header > li > a > i, #site-header #menu-header > li > .dropdown-toggle, #site-header #menu-header > li > a .themeicon { display: none !important; }

	/* Sous-menu en carte */
	#site-header #menu-header .sub-menu {
		left: 50% !important; top: calc(100% + 12px) !important; min-width: 300px; margin: 0 !important; padding: 8px !important;
		border: 0 !important; border-radius: 16px !important; background: #fff !important; box-shadow: 0 22px 50px rgba(15, 31, 58, .16), 0 0 0 1px rgba(15, 31, 58, .05) !important;
		transform: translate(-50%, 8px) !important; transition: opacity .2s, transform .2s, visibility .2s !important;
	}
	#site-header #menu-header > li:hover > .sub-menu, #site-header #menu-header > li:focus-within > .sub-menu { transform: translate(-50%, 0) !important; }
	#site-header #menu-header .sub-menu li { margin: 0 !important; padding: 0 !important; border: 0 !important; }
	#site-header #menu-header .sub-menu li a {
		display: flex !important; flex-direction: column; gap: 2px; padding: 12px 14px 12px 58px !important; border-radius: 12px; position: relative;
		color: var(--marine) !important; text-transform: none !important; transition: background .15s;
	}
	#site-header #menu-header .sub-menu li a::before {
		content: "" !important; position: absolute !important; left: 12px; top: 50%; width: 36px; height: 36px; margin-top: -18px; border-radius: 10px;
		background: var(--b-clair) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a6bb5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19h16M7 16V9M12 16V5M17 16v-4'/%3E%3C/svg%3E") no-repeat center / 18px !important;
		display: block !important; opacity: 1; transform: none !important;
	}
	#site-header #menu-header .sub-menu li a:hover { background: #f4f8fd; }
	#site-header #menu-header .sub-menu li a::after { display: none !important; }
	.am-sm-titre { font-size: 15px; font-weight: 700; line-height: 1.3; }
	.am-sm-desc { color: var(--gris); font-size: 13px; font-weight: 400; line-height: 1.35; }

	/* Bouton Contact : même style que les autres liens, dans la capsule */
	#site-header #menu-header > li.am-menu-contact { margin-left: 0 !important; }
}

/* Mobile */
@media (max-width: 991px) {
	#site-header #menu-header > li > a { display: flex !important; align-items: center; color: var(--marine) !important; font-weight: 600 !important; text-transform: none !important; }
	#site-header #menu-header > .am-pastille { display: none; }
	.am-sm-desc { display: block; color: var(--gris); font-size: 12.5px; font-weight: 400; }
}
@media (min-width: 992px) { #site-header #menu-header > li.am-menu-contact > a::before { display: inline-block !important; } }
