/*
 * 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; }
}

/* ==========================================================================
   Fenêtre « Vidéos et cookies » (maquette Nord, regional.css) : imprimée sur
   wp_footer, hors du document Elementor — ses règles ne peuvent donc pas passer
   par la couche de fidélité préfixée. Copie fidèle des règles de la maquette.
   ========================================================================== */
.privacy-dialog { position: fixed; inset: auto 1rem 1rem auto; margin: 0; z-index: 150; width: min(510px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.5rem; border: 1px solid var(--gold); background: var(--paper, #f8f6f1); color: var(--navy); box-shadow: 0 8px 30px #091e3530; font: 400 1rem/1.55 var(--font-sans); }
.privacy-dialog h2 { margin: 0 0 .8rem; font: 400 1.8rem/1.2 var(--font-serif); color: var(--navy); }
.privacy-dialog p { margin: 0 0 .8rem; font-size: .9rem; line-height: 1.55; }
.privacy-dialog a { color: inherit; text-decoration: underline; }
.privacy-dialog::backdrop { background: #091e355c; }
.privacy-dialog .privacy-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.privacy-dialog .button { display: inline-flex; align-items: center; justify-content: center; gap: .68rem; min-height: 44px; padding: .8rem 1rem; border: 1.5px solid transparent; border-radius: .55rem; background: var(--gold); color: var(--navy-deep); font: 750 .8rem/1.15 var(--font-sans); text-align: center; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.privacy-dialog .button:hover { background: #f0c458; transform: translateY(-2px); }
.privacy-dialog .button--privacy { background: var(--navy); color: #fff; }
.privacy-dialog .button--privacy:hover { background: var(--navy-soft); }
.privacy-dialog :focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .privacy-dialog .button { transition: none; } .privacy-dialog .button:hover { transform: none; } }
/* Les deux éléments flottants partagent le coin bas droit : le bouton de rappel s'efface tant que la fenêtre est ouverte. */
body:has(.privacy-dialog[open]) .nds-rappel { display: none; }

/* Rangées de liens « Près de chez vous » / « À proximité » ajoutées au maillage
   (même composant que la maquette : .regional-links + .text-link). */
body .elementor.elementor.elementor .nds-liens-proches { margin-top: clamp(2.2rem, 4vw, 3.2rem); padding-top: 1.6rem; border-top: 1px solid var(--line); }
body .elementor.elementor.elementor .nds-liens-proches .eyebrow { margin: 0; }
body .elementor.elementor.elementor .nds-liens-proches .regional-links { margin-top: 1.1rem; }
body .elementor.elementor.elementor .hero .nds-liens-proches,
body .elementor.elementor.elementor .section--dark .nds-liens-proches { border-top-color: rgba(255,255,255,.2); }

/* Bloc « Repères officiels » des pages locales : liens vers les sites des villes, soulignés pour rester visibles dans le texte. */
body .elementor.elementor.elementor .nds-reperes-officiels a { text-decoration: underline; text-underline-offset: .18em; }
body .elementor.elementor.elementor .nds-reperes-officiels a:hover,
body .elementor.elementor.elementor .nds-reperes-officiels a:focus-visible { text-decoration-thickness: 2px; }

/* nds-rappel-a-cote-fenetre : sur grand écran, « Être rappelé » reste visible à gauche de la fenêtre de confidentialité au lieu de disparaître à la première visite. Sur mobile la fenêtre occupe la largeur, le bouton revient dès le choix fait. */
@media (min-width: 900px) {
  body:has(.privacy-dialog[open]) .nds-rappel { display: flex; right: 542px; }
}
