/* Chargé sur tout le site : uniquement ce qui doit agir hors du Shadow DOM du tunnel. */

/* Panneau ouvert : on masque les boutons flottants (z-index maximal) et le badge Google, on bloque le scroll. */
html.uep-lock,
html.uep-lock body {
	overflow: hidden !important;
	overscroll-behavior: none;
}
html.uep-lock body a#ue-live-google,
html.uep-lock body #ue-live-google,
html.uep-lock #ue-floating-contact,
html.uep-lock .ue-floating-google,
html.uep-lock a.ue-floating-google {
	display: none !important;
}
/* Le tunnel est en plein écran au-dessus de tout : on masque aussi les en-têtes Divi et Divi Mobile. */
html.uep-lock #main-header,
html.uep-lock #top-header,
html.uep-lock .et-l--header,
html.uep-lock #wpadminbar,
html.uep-lock .divi-mobile-menu,
html.uep-lock #dm-header {
	visibility: hidden !important;
}

/* z-index maximal : Divi Mobile et les boutons flottants l'utilisent aussi ;
   à égalité, #uep-root (ajouté en dernier dans <body>) passe devant. */
#uep-root {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	pointer-events: none;
}
html:not(.uep-lock) #uep-root {
	visibility: hidden;
}
#uep-root.is-open {
	pointer-events: auto;
}

/* ---------- Accès « Mon espace » ---------- */
.uep-acc { position: relative; font-family: "Plus Jakarta Sans", Helvetica, Arial, sans-serif; }
.uep-acc__btn {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
	border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 9px; background: transparent;
	color: #fff !important; font: 700 13px/1 "Plus Jakarta Sans", Helvetica, Arial, sans-serif;
	letter-spacing: .02em; text-transform: uppercase; text-decoration: none !important; white-space: nowrap;
	padding: 9px 13px; transition: background .2s, border-color .2s;
}
.uep-acc__btn:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.uep-acc__btn:focus-visible { outline: 3px solid rgba(255, 255, 255, .7); outline-offset: 2px; }
.uep-acc__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.uep-acc__menu {
	position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 100000;
	background: #fff; border: 1px solid #DCE4EE; border-radius: 12px; padding: 6px;
	box-shadow: 0 18px 44px rgba(2, 12, 48, .22);
}
.uep-acc__menu[hidden] { display: none; }
.uep-acc__menu a, .uep-acc__menu button {
	display: block; width: 100%; text-align: left; padding: 11px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer;
	color: #011B4C !important; font: 600 14px/1.2 "Plus Jakarta Sans", Helvetica, Arial, sans-serif; text-transform: none; letter-spacing: 0; text-decoration: none !important;
}
.uep-acc__menu a:hover, .uep-acc__menu button:hover, .uep-acc__menu a:focus-visible, .uep-acc__menu button:focus-visible { background: #EEF4F8; outline: none; }
.uep-acc__menu .uep-acc__out { color: #A90304 !important; border-top: 1px solid #E9EEF4; border-radius: 0 0 8px 8px; margin-top: 4px; }

/* Header Divi (ordinateur) : tout le menu + les 2 boutons + « Mon espace » sur UNE ligne.
   Police, espacements et logo s'ajustent progressivement à la largeur d'écran. */
@media (min-width: 981px) {
	#main-header #top-menu > li { padding-right: clamp(9px, calc(1.6vw - 9px), 22px); }
	#main-header #top-menu > li > a { font-size: clamp(11px, calc(0.42vw + 5.6px), 13px) !important; letter-spacing: .01em; }
	#main-header #top-menu > li.btn-appel-action { padding-right: clamp(6px, .6vw, 10px); }
	#main-header #top-menu > li.btn-appel-action > a { padding: 10px clamp(9px, .9vw, 14px) !important; }
	#main-header #top-menu > li.menu-item-has-children > a { padding-right: 16px; }
	#main-header #top-menu > li.menu-item-has-children > a:first-child:after { right: 0; top: 50%; transform: translateY(-50%); }
	#main-header #logo { max-width: clamp(170px, 16vw, 272px); height: auto; }
	#main-header #top-menu { display: flex; align-items: center; flex-wrap: nowrap; }
	#main-header #top-menu > li { float: none; display: inline-flex; align-items: center; }
	/* Divi met tout l'espace SOUS les liens texte : on le répartit dessus/dessous pour les aligner sur les boutons. */
	#main-header:not(.et-fixed-header) #top-menu > li:not(.btn-appel-action):not(.uep-acc) > a { padding-top: 20px; padding-bottom: 20px; }
	#main-header:not(.et-fixed-header) #et-top-navigation { padding-top: 20px !important; padding-bottom: 20px; }
	#main-header.et-fixed-header #top-menu > li:not(.btn-appel-action):not(.uep-acc) > a { padding-top: 10px; padding-bottom: 10px; }
	#main-header.et-fixed-header #et-top-navigation { padding-top: 10px !important; padding-bottom: 10px; }
}
/* Entre 981 et 1239 px, le menu complet ne tient plus sur une ligne : on bascule sur le header
   Divi Mobile (mêmes règles que Divi Mobile applique sous 980 px) plutôt qu'un menu sur deux lignes. */
@media (min-width: 981px) and (max-width: 1239px) {
	html body #main-header, html body #top-header { display: none !important; }
	html body .divi-mobile-menu { display: block !important; }
	html body #dm-header { display: flex !important; }
	html body #page-container { padding-top: 80px !important; }
	html body .uep-acc--float { display: block; }
}
/* Header Divi (ordinateur) : entrée de menu alignée sur les boutons du header. */
#top-menu li.uep-acc--header { padding-right: 0; margin-left: 10px; display: inline-flex; align-items: center; vertical-align: middle; }
/* Divi force « display:block » et des marges sur les liens du menu : on reprend la main (cercle de la hauteur des boutons rouges, icône centrée). */
#main-header #top-menu li.uep-acc--header > .uep-acc__btn { position: relative; display: inline-flex !important; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0 !important; margin: 0; border-radius: 50%; line-height: 1; }
#main-header #top-menu li.uep-acc--header > .uep-acc__btn svg { width: 18px; height: 18px; margin: 0; }
#top-menu li.uep-acc--header .uep-acc__label, #top-menu li.uep-acc--header .uep-acc__btn > svg + .uep-acc__label + svg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#top-menu li.uep-acc--header .uep-acc__btn.is-logged { background: #fff; color: #011B4C !important; border-color: #fff; }
#top-menu li.uep-acc--header .uep-acc__btn.is-logged::after { content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: #1FB35B; border: 2px solid #000; }
.uep-acc__menu .uep-acc__hello { display: block; padding: 10px 12px 8px; color: #5E6875; font: 600 12.5px/1.2 "Plus Jakarta Sans", Helvetica, Arial, sans-serif; text-transform: none; letter-spacing: 0; border-bottom: 1px solid #E9EEF4; margin-bottom: 4px; }

/* Bouton flottant : mobile uniquement (au-dessus du bouton WhatsApp), ou secours si pas de menu Divi. */
.uep-acc--float { display: none; position: fixed; z-index: 99991; right: 14px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.uep-acc--float .uep-acc__btn {
	width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%;
	background: #011B4C; border-color: #011B4C; box-shadow: 0 10px 26px rgba(2, 12, 48, .3);
}
.uep-acc--float .uep-acc__btn:hover { background: #020C30; }
.uep-acc--float .uep-acc__btn svg { width: 22px; height: 22px; }
.uep-acc--float .uep-acc__label, .uep-acc--float .uep-acc__btn svg + .uep-acc__label + svg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.uep-acc--float .uep-acc__btn.is-logged::after { content: ""; position: absolute; top: 3px; right: 3px; width: 11px; height: 11px; border-radius: 50%; background: #1FB35B; border: 2px solid #fff; }
.uep-acc--float .uep-acc__menu { top: auto; bottom: calc(100% + 10px); }
.uep-acc--float.is-fallback { display: block; bottom: auto; top: 96px; }
/* Dans le header Divi Mobile, à gauche du hamburger. */
.uep-acc--float.in-header { bottom: auto; z-index: 2147483647; }
.uep-acc--float.in-header .uep-acc__btn { width: 44px; height: 44px; box-shadow: none; }
.uep-acc--float.in-header .uep-acc__btn svg { width: 20px; height: 20px; }
.uep-acc--float.in-header .uep-acc__menu { top: calc(100% + 10px); bottom: auto; }
body.show-menu .uep-acc--float { display: none !important; }
@media (max-width: 980px) {
	.uep-acc--float { display: block; }
	#top-menu li.uep-acc--header { display: none; }
}
html.uep-lock .uep-acc { display: none !important; }

/* Bouton générique [urgenceau_bouton] */
.uep-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid #E60506;
	border-radius: 9px;
	background: linear-gradient(135deg, #C00304 0%, #E60506 100%);
	box-shadow: 0 12px 28px rgba(230, 5, 6, .22);
	color: #fff;
	font: 700 15px/1 "Plus Jakarta Sans", Helvetica, Arial, sans-serif;
	letter-spacing: .015em;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
}
.uep-trigger:hover {
	transform: translateY(-2px);
	box-shadow: 0 15px 32px rgba(192, 3, 4, .28);
}
.uep-trigger:focus-visible {
	outline: 3px solid rgba(1, 27, 76, .45);
	outline-offset: 3px;
}
