/*
 * NDS — ajustements propres au site WordPress (chargés après maquette.css).
 */

/* Formulaire : champ piège invisible pour les robots, sorti de l'écran (pas réduit à 1 px). */
.nds-hp { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
body .elementor .contact-form .form-status.is-success { color: var(--navy); font-weight: 700; }
body .elementor .contact-form .form-status.is-error { color: #a12a1f; font-weight: 700; }

/* Lien d'évitement du thème (ses feuilles ne sont plus chargées) : visible au clavier seulement. */
.skip-link.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link.screen-reader-text:focus-visible { position: fixed; top: .8rem; left: .8rem; z-index: 100; width: auto; height: auto; padding: .65rem .95rem; margin: 0; clip: auto; background: var(--gold); color: var(--navy-deep); font-weight: 800; }
/* Libellé caché que Xpro place dans son en-tête. */
.xpro-theme-builder-header .xpro-hidden { display: none; }

/* ==========================================================================
   Menu principal — widget « Menu horizontal » de Xpro habillé comme la
   navigation de la maquette (.primary-nav). Les liens viennent du menu
   WordPress « Menu principal » (Apparence › Menus).
   Bascule en menu mobile : 1024 px (seuil fixe de Xpro ; la maquette basculait à 960 px).
   ========================================================================== */
body .elementor .nds-menu.nds-menu { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
body .elementor .nds-menu .xpro-elementor-horizontal-navbar-nav { flex-wrap: nowrap; justify-content: center; gap: clamp(.8rem, 1.3vw, 1.5rem); }
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a {
	position: relative; min-width: 0; margin: 0; padding: 0;
	color: #fff; font: 650 .93rem/1.55 var(--font-sans); white-space: nowrap; transition: color .2s ease;
}
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a::before { content: none; }
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a.xpro-elementor-nav-link::after {
	content: ""; position: absolute; right: 0; bottom: -.45rem; left: 0; height: 2px;
	background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a.xpro-elementor-nav-link:hover::after,
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li.current-menu-item > a::after { transform: scaleX(1); }
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li.current-menu-item > a,
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li.current-menu-ancestor > a,
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li.dropdown:hover > a { color: var(--gold); }
/* Flèche du sous-menu « Interventions » (⌄ dorée de la maquette) */
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a > .xpro-dropdown-menu-toggle { margin-left: .45rem; color: var(--gold); font-size: .8rem; }
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a > .xpro-dropdown-menu-toggle::before { width: .45rem; height: .45rem; border-width: 2px 2px 0 0; top: -.15em; }
body .elementor .nds-menu .xpro-elementor-horizontal-navbar-nav > li.nav-mobile-home { display: none; }

/* Sous-menu (ordinateur) */
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu {
	top: calc(100% + 1.25rem); left: -.9rem; display: grid; min-width: 16rem; padding: .45rem 1rem;
	border: 1px solid rgba(255,255,255,.18); background: var(--navy-deep); box-shadow: 0 18px 35px rgba(9,30,53,.28);
}
body .elementor .nds-menu .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu::before {
	content: ""; position: absolute; left: 0; right: 0; top: -1.3rem; height: 1.3rem; /* pont de survol */
}
body .elementor .nds-menu .xpro-elementor-horizontal-navbar-nav li.dropdown:focus-within > .xpro-elementor-dropdown-menu { opacity: 1; visibility: visible; transform: none; }
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu > li > a {
	display: block; padding: .7rem .15rem; border-bottom: 1px solid rgba(255,255,255,.13);
	background: transparent; color: #fff; font: 650 .88rem/1.55 var(--font-sans);
}
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu > li:last-child > a { border-bottom: 0; }
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu > li > a:hover,
body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar .xpro-elementor-dropdown-menu > li.current-menu-item > a { color: var(--gold); }

@media (max-width: 1240px) {
	body .elementor .nds-menu .xpro-elementor-horizontal-navbar-nav { gap: 1.15rem; }
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a { font-size: .84rem; }
}

/* Menu mobile (≤ 1024 px) : bouton à droite du numéro, panneau plein écran bleu nuit. */
body .elementor .nds-menu .xpro-elementor-horizontal-menu-toggler-wrapper { line-height: 0; }
body .elementor .nds-menu button.xpro-elementor-horizontal-menu-toggler,
body .elementor .nds-menu button.xpro-elementor-horizontal-menu-close {
	width: 2.75rem; height: 2.75rem; padding: .55rem; border: 1px solid rgba(255,255,255,.55); border-radius: .4rem;
	background: transparent; color: #fff; font-size: 1.2rem; cursor: pointer;
}
body .elementor .nds-menu button.xpro-elementor-horizontal-menu-toggler svg { width: 100%; height: 100%; }
@media (max-width: 1024px) {
	body .elementor .nds-menu.nds-menu { order: 3; flex: 0 0 auto; }
	body .elementor.elementor.elementor .header-call { margin-left: auto; }
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-menu-responsive-tablet {
		width: 100%; max-width: none; padding: 1.2rem 1.5rem 3rem; background: var(--navy-deep); text-align: left;
	}
	body .elementor .nds-menu .xpro-elementor-horizontal-menu-responsive-tablet .xpro-elementor-horizontal-navbar-nav { gap: 0; align-items: stretch; padding-top: 1rem; }
	body .elementor .nds-menu .xpro-elementor-horizontal-navbar-nav > li.nav-mobile-home { display: block; }
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-menu-responsive-tablet .xpro-elementor-horizontal-navbar-nav > li > a {
		padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.16); font-size: 1.15rem; white-space: normal;
	}
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a::after { display: none; }
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-menu-responsive-tablet .xpro-elementor-dropdown-menu {
		top: auto; left: 0; min-width: 0; padding: .1rem 1rem .7rem; border: 0; background: rgba(255,255,255,.045); box-shadow: none;
	}
	body .elementor .nds-menu .xpro-elementor-horizontal-menu-responsive-tablet .xpro-elementor-dropdown-menu::before { content: none; }
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-menu-responsive-tablet .xpro-elementor-dropdown-menu > li > a {
		padding: .7rem 0; background: transparent; color: #fff; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,.13);
	}
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-menu-responsive-tablet .xpro-dropdown-menu-toggle { font-size: 1rem; }
	body .elementor .nds-menu .xpro-elementor-horizontal-menu-overlay { background: rgba(9,30,53,.6); }
}
/* Flèche décorative de Xpro au-dessus du sous-menu : absente de la maquette. */
body .elementor .nds-menu .xpro-elementor-horizontal-navbar-nav > li > .xpro-elementor-dropdown-menu::after { content: none; display: none; }
@media (max-width: 1024px) {
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-menu-responsive-tablet .xpro-elementor-horizontal-menu-close { display: flex; margin-left: auto; }
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-menu-responsive-tablet .xpro-elementor-horizontal-navbar-nav > li > a { background: transparent; }
}
@media (max-width: 1450px) and (min-width: 1025px) {
	body .elementor .nds-menu .xpro-elementor-horizontal-navbar-nav { gap: clamp(.55rem, .85vw, .85rem); }
	body .elementor .nds-menu.nds-menu .xpro-elementor-horizontal-navbar-nav > li > a { font-size: clamp(.8rem, .92vw, .89rem); }
}

/* Adaptation téléphone (ajout, absent de la maquette) : à 320 px, « confidentialité. »
   dépassait de l'écran sur les pages légales. */
@media (max-width: 360px) {
	body .elementor.elementor.elementor.elementor .legal-masthead .cdp-t-h1 { font-size: 2.3rem; hyphens: auto; overflow-wrap: break-word; }
}

/* Images de fond en 960 px sur tablette et téléphone (variable --…-m posée par le module Elementor).
   Repli sur l'image pleine taille si la variante n'existe pas. */
@media (max-width: 1000px) {
	body .elementor.elementor.elementor.elementor .hero::before { background-image: var(--hero-img-m, var(--hero-img)); }
	body .elementor.elementor.elementor.elementor .service-card::before { background-image: var(--card-img-m, var(--card-img)); }
	body .elementor.elementor.elementor.elementor :is(.story-photo, .feature-image) { background-image: var(--photo-m, var(--photo)); }
	body .elementor.elementor.elementor.elementor .contact-panel::before { background-image: var(--regional-contact-img-m, var(--regional-contact-img)); }
}

/* Bouton de fermeture du menu mobile Xpro : son icône venait de Font Awesome, retiré pour alléger les pages. */
body .elementor .nds-menu button.xpro-elementor-horizontal-menu-close > :is(i, svg) { display: none; }
body .elementor .nds-menu button.xpro-elementor-horizontal-menu-close::before { content: "✕"; display: block; font: 400 1.15rem/1 var(--font-sans); color: #fff; text-align: center; }

/* Menu mobile ouvert : les boutons flottants (« Être rappelé », Accès CRM) passent sous le panneau, on les masque. */
body:has(.xpro-elementor-horizontal-menu-responsive-tablet.active) :is(.nds-rappel, .nds-acces-crm) { display: none; }
