/* dc26-eiger — entry point PostCSS
   Le CSS du parent (dc26-base) est chargé via la dépendance `dc26-front-styles`.
   Le style des blocs vit dans theme.json et dans les réglages natifs des blocs :
   ici, uniquement ce qu'ils ne peuvent pas exprimer (comportement du header). */

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--site-header-height, 5rem);
}

/* Header : sur la home le parent masque le logo au top et fait chevaucher le hero.
   Ici : marque toujours visible, header dans le flux, fond blanc plein. */

.home .is-style-sticky-header,
.front-page .is-style-sticky-header {
	margin-bottom: 0;
}

.home .is-style-sticky-header.is-top .wp-block-site-logo,
.front-page .is-style-sticky-header.is-top .wp-block-site-logo {
	opacity: 1;
}

.is-style-sticky-header > header.wp-block-group,
.is-style-sticky-header > .wp-block-group {
	background-color: var(--wp--preset--color--white);
}

.is-style-sticky-header.is-scrolled > header.wp-block-group,
.is-style-sticky-header.is-scrolled > .wp-block-group {
	background-color: var(--wp--preset--color--white);
	backdrop-filter: none;
	box-shadow: 0 1px 0 var(--wp--preset--color--gray-light);
}

/* Nav desktop (hook du parent) : visible dès 1024px, burger en dessous. */

.wp-block-group.dc26-nav-desktop {
	display: none;
}

@media (min-width: 1024px) {
	.wp-block-group.dc26-nav-desktop {
		display: flex;
	}
}

/* Bouton contact du header : ne jamais couper le libellé (menus plus longs en DE/IT). */

.dc26-nav-desktop .wp-block-buttons {
	flex-shrink: 0;
}

.dc26-nav-desktop .wp-block-button__link {
	white-space: nowrap;
}

/* Gravity Forms : variables du thème « framework » alignées sur la charte. */

.gform_wrapper.gform-theme--framework {
	--gf-color-primary: var(--wp--preset--color--primary);
	--gf-color-primary-darker: var(--wp--preset--color--primary-hover);
	--gf-color-primary-lighter: var(--wp--preset--color--primary);
	--gf-ctrl-btn-radius: 0;
	--gf-ctrl-radius: 0;
	--gf-radius: 0;
	--gf-ctrl-btn-bg-color-primary: var(--wp--preset--color--primary);
	--gf-ctrl-btn-bg-color-hover-primary: var(--wp--preset--color--primary-hover);
	--gf-ctrl-btn-bg-color-focus-primary: var(--wp--preset--color--primary);
}

.gform_wrapper .gform_footer {
	justify-content: flex-start;
}

/* Pas de coins arrondis : le bouton de fermeture du tiroir (parent) est rond par défaut. */

.dc26-nav-drawer__close {
	border-radius: 0;
}

/* Sélecteur de langue WPML (barre du haut) : codes à droite, alignés sur une même ligne.
   Cible la classe du bloc WPML lui-même — le bloc n’a pas de classe wp-block-* exploitable par theme.json ; ul.horizontal-list.isHorizontal bat la règle inline de WPML. */

.wpml-language-switcher-block ul.horizontal-list.isHorizontal {
	justify-content: flex-end;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
}

.wpml-language-switcher-block li,
.wpml-language-switcher-block li > div,
.wpml-language-switcher-block li > a {
	display: flex;
	align-items: center;
	line-height: 1;
	text-decoration: none;
	color: inherit;
}

.wpml-language-switcher-block [data-wpml='language-item']:first-of-type {
	/* WPML décale le premier item de 5px : sans ça, « FR » est plus bas hors du français. */
	margin-top: 0 !important;
}

.wpml-language-switcher-block a:hover,
.wpml-language-switcher-block a:focus-visible {
	color: var(--wp--preset--color--primary);
}

/* Fond topographique : canvas fixe plein écran derrière le contenu (voir functions/dc26-eiger-topography.php).
   Le blanc du body reste le fond de repli ; le canvas dessine les lignes par-dessus. */

.dc26-topography {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.dc26-topography canvas {
	display: block;
	width: 100%;
	height: 100%;
}
