/* =============================================================
   25m2 — CSS commun (front + aperçu dans l'éditeur)
   Socle 25ème Heure (h25), charte 25m2.
   -------------------------------------------------------------
   CSS natif, sans préprocesseur :
   - tokens  : variables générées par theme.json (--wp--preset--color--primaire,
               --wp--preset--spacing--simple…) + tokens du thème ci-dessous ;
   - nesting : natif (& comme en SCSS) ;
   - @layer  : reset et base sont dans des couches → tout style non-layé
               (blocs core, nos sections) passe devant, sans !important.
   Les styles propres à une section sont dans blocks/<section>/style.css.

   Échelle : 1rem = 10px. Maquette desktop : 1728px (marges 111px).
   Typographie reprise de l'ancien thème (css/scss/_fonts.scss) : mêmes
   tailles fluides, mêmes interlignes, mêmes approches.
   ============================================================= */

@layer reset, base;

/* ---------- Polices de secours ajustées (anti-CLS) ----------
 * Pendant le chargement, le texte s'affiche dans Arial / Arial Narrow
 * RECALÉES sur les métriques d'Archivo / Bricolage (largeur moyenne,
 * hauteurs) : quand la vraie police arrive, le texte ne « saute » presque
 * plus. Valeurs calculées avec fontTools sur les fichiers de assets/fonts
 * (Bricolage mesurée en ExtraBold, la graisse des titres).
 * Les familles sont déclarées dans theme.json (fontFamily).
 */
@font-face {
	font-family: "Archivo Fallback";
	src: local("Arial"), local("ArialMT");
	size-adjust: 101%;
	ascent-override: 86.9%;
	descent-override: 20.8%;
	line-gap-override: 0%;
}
@font-face {
	font-family: "Bricolage Fallback";
	src: local("Arial Narrow Bold"), local("ArialNarrow-Bold"), local("Arial Narrow");
	size-adjust: 87.8%;
	ascent-override: 105.9%;
	descent-override: 30.7%;
	line-gap-override: 0%;
}

/* ---------- Tokens du thème (complètent ceux de theme.json) ---------- */
:root {
	--h25-font: var(--wp--preset--font-family--principale);
	--h25-font-expressive: var(--wp--preset--font-family--expressive);

	/* Couleurs de la charte (rose et gris : techniques, jamais proposés au client) */
	--h25-nude: var(--wp--preset--color--clair);
	--h25-rouge: var(--wp--preset--color--primaire);
	--h25-rouge-fonce: var(--wp--preset--color--secondaire);
	--h25-blanc: var(--wp--preset--color--blanc);
	--h25-noir: var(--wp--preset--color--accent);
	--h25-rose: var(--wp--custom--couleur--rose);
	--h25-gris: var(--wp--custom--couleur--gris);

	/* Mise en page : 111px de marge sur la maquette 1728 (= 6,42 vw), 20px mini */
	--h25-container: 150.6rem;
	--h25-gutter: clamp(2rem, 6.42vw, 11.1rem);
	--h25-radius: 0.6rem;
	--h25-radius-l: 2rem;
	--h25-pill: 3rem;
	/* courbes de l'ancien thème : reveal (ease-out-quint) et interface */
	--h25-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--h25-ease-ui: cubic-bezier(0.25, 0.74, 0.22, 0.99);

	/* Échelle typographique (ancien _fonts.scss ; minimums abaissés pour le mobile) */
	--h25-fs-h1: clamp(6.4rem, 14.47vw, 25rem); /* 250px à 1728 (maquette) */
	--h25-fs-h2: clamp(5rem, 10vw, 15rem);
	--h25-fs-h3: clamp(4.4rem, 5vw, 8rem);
	--h25-fs-h4: clamp(3.4rem, 3.8vw, 6rem);
	--h25-fs-h5: clamp(3rem, 3.4vw, 5rem);
	--h25-fs-h6: clamp(2.6rem, 4vw, 4rem);
	--h25-fs-h7: clamp(2.2rem, 2vw, 3rem);
	--h25-fs-menu: 2.4rem;
	--h25-fs-cta: clamp(2rem, 1.85rem + 0.2vw, 2.2rem);
	--h25-fs-texte: var(--wp--preset--font-size--m); /* 20 → 22 */
	--h25-fs-grand: var(--wp--preset--font-size--l); /* 22 → 24 */
	--h25-fs-petit: clamp(1.8rem, 1.8vw, 2rem);       /* small-medium */
	--h25-fs-mini: var(--wp--preset--font-size--s);   /* 18 */
	--h25-fs-outro: 1.6rem;

	/*
	 * Couleurs CONTEXTUELLES : elles changent selon le fond de la section
	 * (cf. .h25-fond--*). Par défaut = fond nude de la page.
	 *  --h25-fg      : texte courant
	 *  --h25-titre   : titres
	 *  --h25-titre-2 : 2e couleur d'un titre (texte en italique, cf. plus bas)
	 *  --h25-btn-*   : bouton principal (pilule)
	 */
	--h25-fg: var(--h25-noir);
	--h25-titre: var(--h25-rouge);
	--h25-titre-2: var(--h25-blanc);
	--h25-btn-bg: transparent; /* maquette V3 : pilule à contour gris, sans fond */
	--h25-btn-fg: var(--h25-noir);
	--h25-btn-bord: var(--h25-gris);
	--h25-btn-bg-hover: var(--h25-noir);
	--h25-btn-fg-hover: var(--h25-blanc);
	--h25-etoile: var(--h25-blanc);
}

/*
 * "Réglages de la section" (cf. inc/sections.php) → classes h25-fond--* et
 * h25-espace-haut/bas--*.
 * CONTRAT DU SOCLE : slugs de RÔLE — clair (nude, fond de page), primaire
 * (rouge), secondaire (rouge foncé), blanc, accent (noir, détails).
 * Couleurs fidèles à la maquette : leur contraste relève du design.
 */
.h25-fond {
	background-color: var(--h25-bg);
	color: var(--h25-fg);
}
.h25-fond--clair { --h25-bg: var(--h25-nude); }
.h25-fond--blanc {
	--h25-bg: var(--h25-blanc);
	--h25-titre-2: var(--h25-noir);
	--h25-etoile: var(--h25-rouge);
}
.h25-fond--primaire,
.h25-fond--secondaire,
.h25-sur-rouge {
	--h25-fg: var(--h25-blanc);
	--h25-titre: var(--h25-blanc);
	--h25-titre-2: var(--h25-nude);
	--h25-btn-bord: transparent;
	--h25-etoile: var(--h25-nude);
}
/* Bouton par défaut sur fond rouge : contour blanc, sans fond (maquette) ; au survol il se remplit de blanc */
.h25-fond--primaire,
.h25-fond--secondaire {
	--h25-btn-bg: transparent;
	--h25-btn-fg: var(--h25-blanc);
	--h25-btn-bord: var(--h25-blanc);
	--h25-btn-bg-hover: var(--h25-blanc);
	--h25-btn-fg-hover: var(--h25-noir);
}
.h25-fond--primaire { --h25-bg: var(--h25-rouge); }
.h25-fond--secondaire { --h25-bg: var(--h25-rouge-fonce); --h25-titre-2: var(--h25-rose); }

/* Espaces haut/bas : Aucun / Simple / Double (tailles : theme.json, spacingSizes) */
.h25-espace-haut--aucun { --h25-pt: 0px; }
.h25-espace-haut--simple { --h25-pt: var(--wp--preset--spacing--simple); }
.h25-espace-haut--double { --h25-pt: var(--wp--preset--spacing--double); }
/* --h25-compense : espace ajouté par une section qui déborde sur celle-ci (ex. bandeau de mots « à cheval ») */
[class*="h25-espace-haut--"] { padding-block-start: calc(var(--h25-pt) + var(--h25-compense, 0px)); }
.h25-espace-bas--aucun { --h25-pb: 0px; }
.h25-espace-bas--simple { --h25-pb: var(--wp--preset--spacing--simple); }
.h25-espace-bas--double { --h25-pb: var(--wp--preset--spacing--double); }
[class*="h25-espace-bas--"] { padding-block-end: var(--h25-pb); } /* --h25-pb réutilisable par les sections */

/* ---------- Reset ---------- */
@layer reset {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}
	html {
		font-size: 62.5%; /* 1rem = 10px */
		-webkit-text-size-adjust: none;
		text-size-adjust: none;
		scroll-behavior: smooth; /* défilement animé vers les ancres */
	}
	body,
	h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd {
		margin: 0;
	}
	ul[class],
	ol[class] {
		padding: 0;
		list-style: none;
	}
	img,
	svg,
	video {
		display: block;
		max-width: 100%;
		height: auto;
	}
	input, button, textarea, select {
		font: inherit;
		color: inherit;
	}
	@media (prefers-reduced-motion: reduce) {
		html {
			scroll-behavior: auto;
		}
		*,
		*::before,
		*::after {
			animation-duration: 0.01ms !important;
			transition-duration: 0.01ms !important;
		}
	}
}

/* ---------- Base typographique ---------- */
@layer base {
	body {
		font-family: var(--h25-font);
		font-size: var(--h25-fs-texte);
		line-height: 1.36; /* 30/22 */
		color: var(--h25-fg);
		background: var(--h25-nude);
		-webkit-font-smoothing: antialiased;
		/* les décors qui débordent (étoiles, bandeaux inclinés) ne créent jamais de défilement horizontal */
		overflow-x: clip;
	}
	/* Titres : Bricolage Grotesque Condensed (stretch 75 %), majuscules */
	h1, h2, h3, h4, h5, h6 {
		font-family: var(--h25-font-expressive);
		font-stretch: 75%;
		font-weight: 800;
		color: var(--h25-titre);
		text-transform: uppercase;
	}
	h1 { font-size: var(--h25-fs-h1); line-height: 0.76; letter-spacing: -0.06em; }
	h2 { font-size: var(--h25-fs-h2); line-height: 0.8; letter-spacing: -0.04em; }
	h3 { font-size: var(--h25-fs-h3); line-height: 0.875; letter-spacing: -0.04em; }
	h4 { font-size: var(--h25-fs-h4); line-height: 0.84; letter-spacing: -0.03em; }
	h5 { font-size: var(--h25-fs-h5); line-height: 1; font-weight: 600; text-transform: none; }
	h6 { font-size: var(--h25-fs-h6); line-height: 0.85; font-weight: 600; text-transform: none; }
	strong, b { font-weight: 700; }
	a {
		color: inherit;
		text-underline-offset: 0.15em;
		text-decoration-thickness: from-font;
	}
	:focus-visible {
		outline: 2px solid currentColor;
		outline-offset: 3px;
	}
}

/*
 * Tailles de titre INDÉPENDANTES du niveau (Bloc > Styles du bloc Titre,
 * cf. inc/editor.php) : la hiérarchie (h2, h3…) suit le sens, la taille suit
 * la maquette. Ex. « On parle de ton projet ? » = un h2 en taille H5.
 */
:is(h1, h2, h3, h4, h5, h6, p).h25-titre-1,
.is-style-titre-1 { font-size: var(--h25-fs-h1); line-height: 0.76; letter-spacing: -0.06em; font-weight: 800; text-transform: uppercase; }
:is(h1, h2, h3, h4, h5, h6, p).h25-titre-2,
.is-style-titre-2 { font-size: var(--h25-fs-h2); line-height: 0.8; letter-spacing: -0.04em; font-weight: 800; text-transform: uppercase; }
:is(h1, h2, h3, h4, h5, h6, p).h25-titre-3,
.is-style-titre-3 { font-size: var(--h25-fs-h3); line-height: 0.875; letter-spacing: -0.04em; font-weight: 800; text-transform: uppercase; }
:is(h1, h2, h3, h4, h5, h6, p).h25-titre-4,
.is-style-titre-4 { font-size: var(--h25-fs-h4); line-height: 0.84; letter-spacing: -0.03em; font-weight: 800; text-transform: uppercase; }
:is(h1, h2, h3, h4, h5, h6, p).h25-titre-5,
.is-style-titre-5 { font-size: var(--h25-fs-h5); line-height: 1; letter-spacing: 0; font-weight: 600; text-transform: none; }
:is(h1, h2, h3, h4, h5, h6, p).h25-titre-6,
.is-style-titre-6 { font-size: var(--h25-fs-h6); line-height: 0.85; letter-spacing: 0; font-weight: 600; text-transform: none; }
/* H7 de la charte : Archivo Expanded ExtraBold (même famille, chasse 125 %) */
:is(h1, h2, h3, h4, h5, h6, p, dt).h25-titre-7,
.is-style-titre-7 {
	font-family: var(--h25-font);
	font-stretch: 125%;
	font-size: var(--h25-fs-h7);
	line-height: 1.1;
	letter-spacing: 0;
	font-weight: 800;
	text-transform: uppercase;
}
/* Titres en casse normale (H5, H6 — « Highlight text », « Comment ça se passe ? ») : couleur du texte, pas du titre (maquette) */
:is(h5, h6, .h25-titre-5, .h25-titre-6, .is-style-titre-5, .is-style-titre-6) { color: var(--h25-fg); }
p:is(.h25-titre-1, .h25-titre-2, .h25-titre-3, .h25-titre-4, .h25-titre-5, .h25-titre-6) {
	font-family: var(--h25-font-expressive);
	font-stretch: 75%;
}
p:is(.h25-titre-1, .h25-titre-2, .h25-titre-3, .h25-titre-4) { color: var(--h25-titre); }

/*
 * Titre en DEUX COULEURS (« Deux offres. / deux objectifs. ») : dans un
 * titre, le texte mis en ITALIQUE (Ctrl+I) prend la 2e couleur du fond.
 * Bricolage n'a pas d'italique : l'italique n'a pas d'autre usage ici.
 */
:is(h1, h2, h3, h4, h5, h6, [class*="h25-titre-"]) em {
	font-style: normal;
	color: var(--h25-titre-2);
}

/* Styles de paragraphe (Bloc > Styles, cf. inc/editor.php) — « Par défaut » = texte-base 20 → 22 / 30 */
.is-style-large { font-size: var(--h25-fs-grand); line-height: 1.25; font-weight: 500; }
.is-style-small { font-size: var(--h25-fs-petit); line-height: 1.2; font-weight: 500; }
.is-style-xs    { font-size: var(--h25-fs-mini); line-height: 1.11; }
.h25-outro      { font-size: var(--h25-fs-outro); line-height: 1.25; }

/* Graisses (formats de la barre d'outils, cf. editor.js) */
.h25-graisse-fine { font-weight: 400; }
.h25-graisse-medium { font-weight: 500; }
.h25-graisse-semi { font-weight: 600; }

/*
 * Pictogramme dans le texte (bouton « Pictogramme » de l'éditeur) :
 * le SVG sert de masque → le picto prend la couleur et la taille du texte.
 * --h25-picto est défini par picto (inc/assets.php).
 */
img.h25-picto {
	display: inline-block;
	width: auto;
	height: 0.75em;
	margin-inline: 0.08em;
	vertical-align: baseline;
	background: currentColor;
	mask: var(--h25-picto) center / contain no-repeat;
	object-position: -999em 0;
}

/* Éditeur : même fond de page que le site (WordPress impose du blanc, hors couche) */
.editor-styles-wrapper { background: var(--h25-nude); }

/* Texte lu par les lecteurs d'écran uniquement (classe standard WordPress) */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Layout ---------- */
.h25-container {
	width: min(100% - 2 * var(--h25-gutter), var(--h25-container));
	margin-inline: auto;
}
.h25-section {
	/* largeur (--h25-cw) et bord gauche (--h25-cx) du conteneur, pour caler les décors sur le contenu */
	--h25-cw: min(100% - 2 * var(--h25-gutter), var(--h25-container));
	--h25-cx: calc((100% - var(--h25-cw)) / 2);
	position: relative;
	overflow-x: clip;
}
/* Décors : purement visuels, jamais cliquables */
.h25-decor {
	position: absolute;
	pointer-events: none;
	> svg { width: 100%; height: auto; }
}

/*
 * ÉTOILES de section (réglage commun « Étoiles », cf. inc/sections.php) :
 * le motif « deux étincelles » de la charte, dans un coin de la section.
 * Couleur : celle choisie, sinon la couleur d'étoile du fond (--h25-etoile).
 * Comme sur la maquette, elles sont À CHEVAL sur le bord de la section
 * (relevé exact dans Figma, accueil et Builder : 91 px dehors sur 150, soit
 * 60,7 % — le groupe y est tourné de 180°, ses coordonnées brutes trompent), calées sur la marge du contenu, et gardent toujours le
 * même sens (grande étoile en bas à gauche, petite en haut à droite).
 * Fixes (pas d'animation, choix de Yannick).
 */
.h25-etoiles {
	--h25-etoiles-l: clamp(8rem, 7vw, 12rem); /* 120 × 151 px sur la maquette 1728 */
	--h25-etoiles-h: calc(var(--h25-etoiles-l) * 151 / 120);
	position: absolute;
	z-index: 1;
	width: var(--h25-etoiles-l);
	color: var(--h25-etoiles-couleur, var(--h25-etoile));
	pointer-events: none;
	> svg { width: 100%; height: auto; }
	> svg path { fill: currentColor; }
}
.h25-etoiles--haut-gauche  { inset: calc(var(--h25-etoiles-h) * -0.607) auto auto var(--h25-cx); }
.h25-etoiles--haut-droite  { inset: calc(var(--h25-etoiles-h) * -0.607) var(--h25-cx) auto auto; }
.h25-etoiles--bas-gauche   { inset: auto auto calc(var(--h25-etoiles-h) * -0.607) var(--h25-cx); }
.h25-etoiles--bas-droite   { inset: auto var(--h25-cx) calc(var(--h25-etoiles-h) * -0.607) auto; }
.h25-etoiles-couleur--rouge { --h25-etoiles-couleur: var(--h25-rouge); }
.h25-etoiles-couleur--blanc { --h25-etoiles-couleur: var(--h25-blanc); }
.h25-etoiles-couleur--nude  { --h25-etoiles-couleur: var(--h25-nude); }
.h25-etoiles-couleur--rose  { --h25-etoiles-couleur: var(--h25-rose); } /* discrètes sur fond rouge (slider, maquette V3) */
.h25-etoiles-couleur--noir  { --h25-etoiles-couleur: var(--h25-noir); }
/* une section à étoiles ne coupe pas ses étoiles en hauteur */
.h25-section:has(> .h25-etoiles) { overflow: visible; z-index: 1; }

/* Nos <figure> : sans marge (WordPress pose une marge hors couche) */
figure[class*="h25-"] { margin: 0; }

/* Contenu libre (blocs natifs dans nos sections) : rythme vertical */
.h25-prose {
	> * + * { margin-block-start: 1em; }
	> :is(h1, h2, h3, h4, h5, h6) + * { margin-block-start: clamp(2rem, 1.4rem + 1.2vw, 4rem); }
	> * + :is(h1, h2, h3, h4, h5, h6) { margin-block-start: 1.2em; }
	> :is(h1, h2, h3, h4) + :is(h1, h2, h3, h4) { margin-block-start: 0; } /* titres empilés (« Deux offres. » + « deux objectifs. ») */
	ol:not([class]), ol.wp-block-list:not([class*="is-style-"]) { padding-inline-start: 1.2em; }
	/* liste simple : une étoile de la charte devant chaque ligne (Figma Builder) */
	ul:not([class]), ul.wp-block-list:not([class*="is-style-"]) {
		padding-inline-start: 0;
		list-style: none;
		> li { position: relative; padding-inline-start: 1.6em; }
		> li::before {
			content: "";
			position: absolute;
			inset: 0.3em auto auto 0;
			width: 0.65em;
			aspect-ratio: 15 / 20;
			background: currentColor;
			mask: url("../pictos/etoile.svg") center / contain no-repeat;
		}
	}
	li + li { margin-block-start: 0.4em; }
}

/* __souligné__ dans un champ texte (h25_texte_enrichi) */
.h25-souligne {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

/* ---------- Boutons ----------
 * Mêmes règles pour nos boutons (.h25-btn) et les blocs « Bouton » du
 * contenu libre (.wp-block-button > a). Couleurs : selon le fond (variables
 * --h25-btn-*). Une étoile suit toujours le texte (charte), un chevron pour
 * le style « Lien ».
 *  - par défaut : pilule sans fond, contour gris (fond nude/blanc) ou blanc
 *    (fond rouge) ; survol noir — comme l'ancien .btn-primary ;
 *  - « Rouge » : pilule rouge, texte blanc, sans étoile (maquette V3) ;
 *  - « Lien » : texte seul en majuscules + chevron (« Obtenir mon devis gratuit › »).
 */
.h25-btn,
.wp-block-button > .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 1.2rem 2.4rem;
	border: 1px solid var(--h25-btn-bord);
	border-radius: var(--h25-pill);
	background: var(--h25-btn-bg);
	color: var(--h25-btn-fg);
	font-family: var(--h25-font-expressive);
	font-stretch: 75%;
	font-size: var(--h25-fs-menu);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	max-width: 100%; /* sur petit écran, le libellé passe à la ligne plutôt que de déborder */
	cursor: pointer;
	transition: background-color 0.45s var(--h25-ease-ui), border-color 0.45s var(--h25-ease-ui), color 0.45s var(--h25-ease-ui);

	&::after {
		content: "";
		flex: none;
		width: 1.4rem;
		height: 2rem;
		background: currentColor;
		mask: url("../pictos/etoile.svg") center / contain no-repeat;
		transition: rotate 0.45s var(--h25-ease-ui);
	}
	&:hover,
	&:focus-visible {
		background: var(--h25-btn-bg-hover);
		border-color: var(--h25-btn-bg-hover);
		color: var(--h25-btn-fg-hover);
		&::after { rotate: 90deg; }
	}
}
/*
 * Carte cliquable (offres, prestations…) : façon « stretched-link » de Bootstrap.
 * Un seul vrai lien (le bouton : lu une fois, tabulation une fois) ; son ::before
 * s'étend sur toute la carte. Survoler la carte = survoler le bouton.
 */
.h25-carte-lien {
	position: relative;
	&:has(.h25-btn) { cursor: pointer; }
	.h25-btn::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 1;
	}
	/* Les autres liens de la carte (ex. « Ton local » dans l'offre complète) restent cliquables, au-dessus */
	a:not(.h25-btn) { position: relative; z-index: 2; }
	&:hover .h25-btn {
		background: var(--h25-btn-bg-hover);
		border-color: var(--h25-btn-bg-hover);
		color: var(--h25-btn-fg-hover);
		&::after { rotate: 90deg; }
	}
}
.h25-btn--rouge,
.wp-block-button.is-style-rouge > .wp-block-button__link {
	--h25-btn-bg: var(--h25-rouge);
	--h25-btn-fg: var(--h25-blanc);
	--h25-btn-bord: var(--h25-rouge);
	&::after { content: none; }
}
/* « Blanc » : pilule blanche pleine (pied de page, sections rouges) ; survol noir */
.h25-btn--blanc,
.wp-block-button.is-style-blanc > .wp-block-button__link {
	--h25-btn-bg: var(--h25-blanc);
	--h25-btn-fg: var(--h25-noir);
	--h25-btn-bord: var(--h25-blanc);
	--h25-btn-bg-hover: var(--h25-noir);
	--h25-btn-fg-hover: var(--h25-blanc);
}
.h25-btn--texte,
.wp-block-button.is-style-texte > .wp-block-button__link {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-size: var(--h25-fs-cta);
	&::after {
		width: 0.8rem;
		height: 1.3rem;
		mask-image: url("../pictos/chevron-droite.svg");
		transition: translate 0.45s var(--h25-ease-ui);
	}
	&:hover,
	&:focus-visible {
		background: none;
		color: inherit;
		text-decoration: underline;
		text-underline-offset: 0.2em;
		&::after { rotate: none; translate: 0.4rem 0; }
	}
}
/* « Lien » (ancien .btn-text, cta-niv2) : texte souligné en casse normale + chevron — « Toutes nos offres › » */
.h25-btn--lien,
.wp-block-button.is-style-lien > .wp-block-button__link {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-size: var(--h25-fs-cta);
	font-weight: 600;
	text-transform: none;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	&::after {
		width: 0.7rem;
		height: 1.1rem;
		mask-image: url("../pictos/chevron-droite.svg");
		transition: translate 0.45s var(--h25-ease-ui);
	}
	&:hover,
	&:focus-visible {
		background: none;
		color: inherit;
		text-decoration-thickness: 2px;
		&::after { rotate: none; translate: 0.4rem 0; }
	}
}
.h25-boutons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2rem 3rem;
}
.h25-prose > .wp-block-buttons { margin-block-start: clamp(3rem, 2rem + 2vw, 4rem); }

/* Zones de texte ACF : les retours à la ligne saisis s'affichent (texte brut, sans <br>, cf. inc/typographie.php). */
.h25-lignes { white-space: pre-line; }

/* Bouton qui ressemble à un lien (ex. "Gérer mes cookies") */
.h25-lien-bouton {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	&:hover { text-decoration: underline; }
}

/* ---------- Listes stylées (Bloc Liste > Styles, cf. inc/editor.php) ---------- */

/*
 * « Coches » : liste de contenu des offres (picto coche devant chaque ligne).
 */
.wp-block-list.is-style-coches,
.h25-coches {
	display: grid;
	gap: 0.8rem;
	padding: 0;
	list-style: none;
	> li {
		display: grid;
		grid-template-columns: 2.3rem minmax(0, 1fr);
		gap: 1.6rem;
		margin: 0;
		&::before {
			content: "";
			height: 2rem;
			margin-block-start: 0.25em;
			background: currentColor;
			mask: url("../pictos/coche.svg") center / contain no-repeat;
		}
	}
}

/*
 * « Pastilles » (ex-.tags de l'ancien thème : « Une couleur », « Une
 * expérience »…) : chaque ligne de la liste = une pastille, en vrac,
 * centrées, rotations et couleurs en cycle de 6.
 * 3 pastilles par ligne au plus : comme dans l'ancien thème, un séparateur
 * invisible (li.h25-pastilles__saut, role="none") est inséré toutes les 3
 * pastilles au rendu (inc/editor.php) ; flexbox centre la dernière ligne.
 * Le cycle de couleurs ignore ces séparateurs (:nth-child(… of …)).
 */
.wp-block-list.is-style-pastilles,
.h25-pastilles {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.8rem 0.5rem;
	padding: 0;
	list-style: none;
	/* les pastilles peuvent déborder de la largeur du texte (maquette : 1040px pour un texte de 1002) : centrées sur la section */
	width: calc(100vw - 2 * var(--h25-gutter));
	max-width: var(--h25-container);
	position: relative;
	left: 50%;
	translate: -50% 0;

	> .h25-pastilles__saut {
		flex-basis: 100%;
		height: 0;
		margin: 0;
		padding: 0;
	}

	> li:not(.h25-pastilles__saut) {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin: 0;
		padding: 1rem 2rem;
		border: 1px solid transparent;
		border-radius: var(--h25-radius);
		font-family: var(--h25-font);
		font-stretch: 125%;
		font-size: clamp(2rem, 2.8vw, 3rem);
		font-weight: 800;
		line-height: 1;
		text-transform: uppercase;
		white-space: nowrap;
	}
	/* cycle de l'ancien thème : nude / blanc / contour nude ×2 / nude / blanc */
	> li:nth-child(6n+1 of :not(.h25-pastilles__saut)) { background: var(--h25-nude); color: var(--h25-rouge); }
	> li:nth-child(6n+2 of :not(.h25-pastilles__saut)) { background: var(--h25-blanc); color: var(--h25-rouge); rotate: 5.8deg; }
	> li:nth-child(6n+3 of :not(.h25-pastilles__saut)) { border-color: var(--h25-nude); color: var(--h25-nude); rotate: -4.1deg; }
	> li:nth-child(6n+4 of :not(.h25-pastilles__saut)) { border-color: var(--h25-nude); color: var(--h25-nude); rotate: -6deg; }
	> li:nth-child(6n+5 of :not(.h25-pastilles__saut)) { background: var(--h25-nude); color: var(--h25-rouge); }
	> li:nth-child(6n of :not(.h25-pastilles__saut))   { background: var(--h25-blanc); color: var(--h25-rouge); rotate: 5deg; }
}

/* ---------- Header ----------
 * Barre blanche collante (comme l'ancien #header : sticky + ombre).
 * Le logo DÉBORDE sous la barre (maquette : 138px de haut pour une barre
 * de 130px, posé à 40px du haut). Menu centré sur toute la largeur
 * (grille 1fr auto 1fr), bouton « Nous appeler » à droite.
 */
.h25-skip {
	position: absolute;
	inset-block-start: -10rem;
	inset-inline-start: 1rem;
	z-index: 100;
	padding: 1rem 1.6rem;
	background: var(--h25-blanc);
	color: var(--h25-noir);
	font-weight: 600;
	&:focus { inset-block-start: 1rem; }
}

/*
 * Hauteurs : en haut de page (h0) et une fois défilé (header resserré,
 * classe h25-header--reduit posée par main.js).
 *
 * Header STICKY (dans le flux, comme l'ancien #header) : la 1re section
 * démarre naturellement sous lui, sans compensation. Pour que le contenu
 * ne « saute » pas quand il se resserre, la hauteur perdue est rendue en
 * marge basse, avec la même durée et la même courbe : hauteur + marge
 * restent constantes pendant toute l'animation.
 */
:root {
	--h25-header-h0: 7.2rem;
	--h25-logo-h0: 7.8rem;
	--h25-header-reduit: 6.6rem;
	--h25-logo-reduit: 7.4rem;
	--h25-header-duree: 0.25s; /* resserrement au défilement : court et net */
	@media (min-width: 64em) {
		--h25-header-h0: clamp(9.6rem, 6.4vw, 11rem);
		--h25-logo-h0: clamp(10rem, 7.3vw, 12.6rem);
		--h25-header-reduit: 9rem;
		--h25-logo-reduit: 11.6rem;
	}
	--h25-header-h: var(--h25-header-h0);
	--h25-logo-h: var(--h25-logo-h0);
}
html { scroll-padding-top: calc(var(--h25-header-reduit) + 3rem); } /* les ancres s'arrêtent sous le header */

.h25-header {
	position: sticky;
	inset-block-start: 0;
	z-index: 50;
	margin-block-end: calc(var(--h25-header-h0) - var(--h25-header-h));
	background: var(--h25-blanc);
	color: var(--h25-noir);
	box-shadow: 0 1.3rem 1.3rem rgb(0 0 0 / 0.13);
	transition: margin-block-end var(--h25-header-duree) var(--h25-ease-ui);
	.admin-bar & { inset-block-start: var(--wp-admin--admin-bar--height, 0); }
}
.h25-header--reduit {
	--h25-header-h: var(--h25-header-reduit);
	--h25-logo-h: var(--h25-logo-reduit);
}
.h25-header__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 2rem;
	min-height: var(--h25-header-h);
	transition: min-height var(--h25-header-duree) var(--h25-ease-ui);
}
.h25-header__logo {
	position: absolute;
	inset-block-start: calc(var(--h25-header-h) * 0.3);
	inset-inline-start: 0;
	z-index: 3;
	line-height: 0;
	transition: inset-block-start var(--h25-header-duree) var(--h25-ease-ui);
	> img { width: auto; height: var(--h25-logo-h); transition: height var(--h25-header-duree) var(--h25-ease-ui); }
}
.h25-header__actions {
	grid-column: 3;
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 1.2rem;
}
.h25-nav {
	grid-column: 2;
	a { text-decoration: none; }
}

/* Bouton « Nous appeler » : plus compact sur mobile */
@media (max-width: 63.99em) {
	.h25-header .h25-appeler {
		white-space: nowrap;
		gap: 0.8rem;
		padding: 1rem 1.6rem;
		font-size: 1.8rem;
		&::after { width: 1.1rem; height: 1.6rem; }
	}
}

/* Fil d'Ariane (SEOPress) : sous la barre, après le logo, seulement tout en haut de page (comme l'ancien) */
/*
 * Fil d'Ariane (SEOPress) — maquette V3 : 30px à droite du logo, 28px sous le
 * bandeau blanc (son bas tombe sur le bas du logo), lignes de 20px, chevron
 * 6×8 entouré de 10px. Sélecteurs « ol li » : SEOPress imprime après nous
 * `.breadcrumb li { display: inline-block }`, de même poids.
 */
.h25-ariane {
	position: absolute;
	inset-block-start: calc(100% + 2.8rem);
	inset-inline-start: calc(var(--h25-logo-h) * 1.24 + 3rem);
	font-size: var(--h25-fs-mini);
	line-height: 2rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s var(--h25-ease-ui);
	.h25-header--haut & { opacity: 1; pointer-events: auto; }
	/* page qui commence par une section rouge (classe posée par inc/navigation.php) : fil d'Ariane blanc, comme la maquette */
	:is(.h25-haut-primaire, .h25-haut-secondaire) & { color: var(--h25-blanc); }
	ol, ul { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
	:is(ol, ul) li { display: inline-flex; align-items: center; gap: 1rem; padding: 0; margin: 0; }
	:is(ol, ul) li:not(:last-child) { margin-inline-end: 1rem; }
	:is(ol, ul) li:not(:last-child)::after {
		content: "";
		display: block;
		flex: none;
		margin: 0; /* SEOPress : margin 5px de chaque côté */
		width: 0.6rem;
		height: 0.8rem;
		background: currentColor;
		mask: url("../pictos/chevron-droite.svg") center / contain no-repeat;
	}
	a { text-decoration: none; &:hover { text-decoration: underline; } }
	@media (max-width: 63.99em) { display: none; }
}

/* Barre de progression de lecture (comme l'ancien .scroll-progress) */
.h25-progression {
	position: absolute;
	inset: auto 0 0;
	height: 0.4rem;
	background: var(--h25-rouge);
	transform-origin: 0 50%;
	scale: var(--h25-progression, 0) 1;
	pointer-events: none;
}

/* Burger (mobile) : 3 barres ; la barre du milieu se raccourcit au survol (ancien .hamburger) */
.h25-burger {
	display: grid;
	place-content: center;
	gap: 0.6rem;
	width: 4.4rem;
	height: 4.4rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: inherit;
	cursor: pointer;
	transition: background-color 0.25s var(--h25-ease-ui);
	&:hover { background: rgb(0 0 0 / 0.06); }
	> span:not(.screen-reader-text) {
		display: block;
		width: 2.8rem;
		height: 0.3rem;
		border-radius: 0.3rem;
		background: currentColor;
		transition: width 0.25s var(--h25-ease-ui), rotate 0.3s var(--h25-ease-ui), translate 0.3s var(--h25-ease-ui), opacity 0.3s var(--h25-ease-ui);
	}
	&:hover > span:nth-child(2) { width: 1.8rem; }
}

/* Ordinateur : menu en ligne, centré */
@media (min-width: 64em) {
	.h25-burger,
	.h25-nav__entete,
	.h25-nav__plus { display: none; }
	.h25-nav {
		/* le popover est neutralisé : menu en ligne */
		display: block;
		position: static;
		inset: auto;
		width: auto;
		height: auto;
		margin: 0;
		padding: 0;
		border: 0;
		overflow: visible;
		background: none;
		color: inherit;
		&,
		ul { display: flex; align-items: center; gap: clamp(1.6rem, 2.3vw, 4rem); }
		/* Instagram à droite du menu : icône 20px, sans le soulignement des liens */
		.h25-nav__reseaux--bureau a {
			padding: 0.5rem;
			margin: -0.5rem;
			background: none;
			line-height: 0;
			transition: color 0.25s var(--h25-ease-ui);
			&:hover,
			&:focus-visible { color: var(--h25-rouge); }
		}
		.h25-nav__reseaux--bureau svg { width: 2rem; height: auto; }
		a {
			display: block;
			padding-block: 1rem;
			font-family: var(--h25-font-expressive);
			font-stretch: 75%;
			font-size: var(--h25-fs-menu);
			font-weight: 500;
			line-height: 1;
			text-transform: uppercase;
			background: linear-gradient(currentColor, currentColor) no-repeat 0 85% / 0% 1px;
			transition: background-size 0.45s var(--h25-ease-ui);
			&:hover,
			&:focus-visible,
			&[aria-current="page"] { background-size: 100% 1px; }
		}
	}
}

/*
 * Menu MOBILE : écran plein rouge, sans librairie (attribut popover : Échap,
 * clic hors du menu, retour du focus gérés par le navigateur).
 * - en-tête : logo + croix au même endroit que le burger (les barres
 *   pivotent en croix à l'ouverture, comme l'ancien hamburger) ;
 * - grands liens Bricolage qui montent l'un après l'autre (même courbe et
 *   même pas de 0,06 s que les reveals) ;
 * - bas : devis, appel, Instagram ; deux étoiles nude en décor.
 */
@media (max-width: 63.99em) {
	.h25-nav {
		--h25-fg: var(--h25-blanc);
		--h25-btn-bg: var(--h25-blanc); /* pilule blanche pleine (le bouton par défaut est sans fond) */
		--h25-btn-bord: transparent;
		position: fixed;
		inset: 0;
		width: 100%;
		max-width: none;
		height: 100dvh;
		max-height: none;
		margin: 0;
		padding: 0 var(--h25-gutter) 4rem;
		border: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--h25-rouge);
		color: var(--h25-blanc);

		&:popover-open { display: flex; flex-direction: column; }

		/* ouverture / fermeture : fondu + panneau qui descend */
		transition: opacity 0.35s var(--h25-ease), translate 0.45s var(--h25-ease), display 0.45s allow-discrete, overlay 0.45s allow-discrete;
		&:not(:popover-open) { opacity: 0; translate: 0 -3rem; }
		@starting-style { &:popover-open { opacity: 0; translate: 0 -3rem; } }

		/* étoiles de décor */
		&::after {
			content: "";
			position: absolute;
			inset: auto var(--h25-gutter) 18rem auto;
			width: 9rem;
			aspect-ratio: 120 / 151;
			background: var(--h25-nude);
			mask: url("../svg/stars.svg") center / contain no-repeat;
			opacity: 0.9;
			pointer-events: none;
		}
	}
	html:has(.h25-nav:popover-open) { overflow: hidden; }

	.h25-nav__entete {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: var(--h25-header-h);
	}
	.h25-nav__logo {
		align-self: flex-start;
		margin-block-start: calc(var(--h25-header-h) * 0.3);
		line-height: 0;
		> img { width: auto; height: var(--h25-logo-h); }
	}
	/* la croix = le burger dont les barres ont pivoté */
	.h25-nav .h25-burger {
		&:hover { background: rgb(255 255 255 / 0.12); }
		> span:not(.screen-reader-text) { width: 2.8rem; }
		> span:nth-child(1) { translate: 0 0.9rem; rotate: 45deg; }
		> span:nth-child(2) { opacity: 0; }
		> span:nth-child(3) { translate: 0 -0.9rem; rotate: -45deg; }
	}
	@starting-style {
		.h25-nav:popover-open .h25-burger > span:not(.screen-reader-text) { translate: 0 0; rotate: 0deg; opacity: 1; }
	}

	.h25-nav__liste {
		display: grid;
		gap: 0.4rem;
		margin-block: 6rem 4rem;
		li { overflow: clip; } /* chaque lien monte depuis sous sa ligne */
		a {
			display: block;
			font-family: var(--h25-font-expressive);
			font-stretch: 75%;
			font-size: clamp(4.8rem, 14vw, 8rem);
			font-weight: 800;
			line-height: 1;
			letter-spacing: -0.04em;
			text-transform: uppercase;
			transition: translate 0.6s var(--h25-ease), color 0.25s var(--h25-ease-ui);
			&:hover,
			&:focus-visible,
			&[aria-current="page"] { color: var(--h25-noir); }
		}
		li:nth-child(2) a { transition-delay: 0.06s; }
		li:nth-child(3) a { transition-delay: 0.12s; }
		li:nth-child(4) a { transition-delay: 0.18s; }
		li:nth-child(5) a { transition-delay: 0.24s; }
		li:nth-child(6) a { transition-delay: 0.3s; }
	}
	.h25-nav:not(:popover-open) .h25-nav__liste a { translate: 0 110%; }
	@starting-style { .h25-nav:popover-open .h25-nav__liste a { translate: 0 110%; } }

	.h25-nav__plus {
		display: grid;
		justify-items: start;
		gap: 2rem;
		margin-block-start: auto;
		padding-block-start: 2rem;
		border-block-start: 1px solid rgb(255 255 255 / 0.4);
	}
	.h25-nav .h25-nav__reseaux--bureau { display: none; } /* sélecteur renforcé : passe devant .h25-nav__reseaux ci-dessous */
	.h25-nav__reseaux { display: flex; gap: 1.6rem; a { line-height: 0; } svg { width: 2.9rem; height: auto; } }
}

/* ---------- Pied de page ----------
 * 1. Bandeau « Suivez-nous » : blanc, contour noir, incliné de 1,5°, qui
 *    défile (même moteur que les autres bandeaux) et chevauche le haut du rouge.
 * 2. Pied rouge : logo · « On parle de ton projet ? » + devis · menu + réseaux.
 * 3. Bas : signature, ©, liens légaux (ouverts en fenêtre).
 */
.h25-pied {
	position: relative;
	margin-block-start: var(--wp--preset--spacing--simple);
	overflow-x: clip;
}
.h25-pied__bandeau {
	position: relative;
	z-index: 2;
	display: block;
	width: 120vw;
	margin-inline-start: -10vw;
	margin-block-end: calc(var(--h25-bandeau-h) / -2);
	border-block: 1px solid var(--h25-noir);
	background: var(--h25-blanc);
	color: var(--h25-noir);
	rotate: 1.5deg;
	overflow: clip;
	text-decoration: none;
	--h25-bandeau-h: clamp(9rem, 11vw, 19rem);
}
.h25-pied__piste {
	display: flex;
	align-items: center;
	width: max-content;
	min-height: var(--h25-bandeau-h);
}
.h25-pied__passage {
	display: flex;
	align-items: center;
	gap: clamp(1.4rem, 2vw, 3.4rem);
	padding-inline-end: clamp(1.4rem, 2vw, 3.4rem);
	font-family: var(--h25-font-expressive);
	font-stretch: 75%;
	font-size: clamp(5rem, 6.95vw, 12rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	svg { flex: none; width: clamp(3.6rem, 4.7vw, 8.1rem); height: auto; }
}
.h25-footer {
	--h25-fg: var(--h25-blanc);
	--h25-btn-bg: var(--h25-blanc); /* maquette V3 : pilule blanche pleine */
	--h25-btn-bord: transparent;
	position: relative;
	padding-block-start: calc(var(--h25-bandeau-pad, 0px) + clamp(8rem, 11vw, 19.4rem));
	background: var(--h25-rouge);
	color: var(--h25-blanc);
	a { text-decoration: none; }
}
.h25-pied:has(.h25-pied__bandeau) .h25-footer { --h25-bandeau-pad: calc(clamp(9rem, 11vw, 19rem) / 2); }
.h25-footer__grille {
	display: grid;
	gap: 4.8rem;
	padding-block-end: clamp(6rem, 8vw, 13rem);
}
.h25-footer__logo {
	justify-self: start;
	line-height: 0;
	> img { width: clamp(16rem, 15.2vw, 26.3rem); height: auto; }
}
.h25-footer__appel {
	display: grid;
	justify-items: start;
	gap: 4rem;
	h2 { color: var(--h25-blanc); }
	p { margin-block-start: 1rem; }
}
.h25-footer__nav {
	display: grid;
	align-content: start;
	gap: 1.6rem;
	ul { display: grid; gap: 1.6rem; }
	a {
		font-family: var(--h25-font-expressive);
		font-stretch: 75%;
		font-size: var(--h25-fs-menu);
		font-weight: 500;
		line-height: 1;
		text-transform: uppercase;
		&:hover,
		&:focus-visible { color: var(--h25-rose); }
	}
}
.h25-footer__reseaux {
	display: flex;
	gap: 1.6rem;
	a { line-height: 0; transition: color 0.25s var(--h25-ease-ui); &:hover { color: var(--h25-nude); } }
	svg { width: 2.9rem; height: auto; }
}
.h25-footer__bas {
	padding-block: 4rem 4.4rem;
	border-block-start: 1px solid rgb(255 255 255 / 0.4);
	text-align: center;
	> .h25-container { display: grid; justify-items: center; gap: 0.8rem; }
	p:first-child { font-size: clamp(1.8rem, 1.6rem + 0.2vw, 2rem); font-weight: 500; line-height: 1.2; }
	ul {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.4rem 1.6rem;
		padding: 0;
		list-style: none;
		font-size: var(--h25-fs-mini);
		line-height: 1.11;
		> li:first-child { font-weight: 500; }
	}
	a:hover, .h25-lien-bouton:hover { text-decoration: underline; }
}
@media (min-width: 48em) {
	.h25-footer__grille {
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 6rem;
	}
	.h25-footer__nav { grid-column: 2; }
}
@media (min-width: 64em) {
	/* maquette 1728 : logo 263 · 115 · texte 625 · 258 · menu 246 */
	.h25-footer__grille {
		grid-template-columns: minmax(0, 263fr) minmax(0, 115fr) minmax(0, 625fr) minmax(0, 258fr) minmax(0, 246fr);
		column-gap: 0;
	}
	.h25-footer__logo { grid-column: 1; }
	.h25-footer__appel { grid-column: 3; }
	.h25-footer__nav { grid-column: 5; }
}

/* ---------- Fenêtres (pages légales, demande de devis) ---------- */
.h25-dialog {
	width: min(100% - 2 * var(--h25-gutter), 90rem);
	max-height: min(90dvh, 100% - 2 * var(--h25-gutter));
	padding: 0;
	border: 0;
	border-radius: var(--h25-radius-l);
	background: var(--h25-nude);
	color: var(--h25-noir);
	overscroll-behavior: contain;

	&::backdrop {
		background: rgb(0 0 0 / 0.55);
		backdrop-filter: blur(4px);
	}
	/* ouverture : fondu + légère montée */
	@media (prefers-reduced-motion: no-preference) {
		transition: opacity 0.35s var(--h25-ease), translate 0.45s var(--h25-ease), display 0.45s allow-discrete, overlay 0.45s allow-discrete;
		&:not([open]) { opacity: 0; translate: 0 3rem; }
		@starting-style { &[open] { opacity: 0; translate: 0 3rem; } }
		&::backdrop { transition: opacity 0.35s var(--h25-ease), display 0.35s allow-discrete, overlay 0.35s allow-discrete; }
		&:not([open])::backdrop { opacity: 0; }
		@starting-style { &[open]::backdrop { opacity: 0; } }
	}
}
html:has(.h25-dialog[open]) { overflow: hidden; }
.h25-dialog__panneau {
	position: relative;
	padding: clamp(2.8rem, 4vw, 5.6rem);
}
.h25-dialog__titre {
	margin-block-end: 2.4rem;
	padding-inline-end: 5rem;
	font-size: var(--h25-fs-h4);
}
/* Croix dessinée (deux barres), pas de glyphe « × » jamais centré (ancien .modal__close) */
.h25-dialog__fermer {
	position: absolute;
	inset: 1.4rem 1.4rem auto auto;
	button {
		position: relative;
		width: 4.4rem;
		height: 4.4rem;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: rgb(0 0 0 / 0.08);
		color: var(--h25-noir);
		cursor: pointer;
		transition: background-color 0.25s var(--h25-ease-ui), rotate 0.45s var(--h25-ease-ui);
		&::before,
		&::after {
			content: "";
			position: absolute;
			inset: 50% auto auto 50%;
			width: 1.6rem;
			height: 2px;
			background: currentColor;
			translate: -50% -50%;
			rotate: 45deg;
		}
		&::after { rotate: -45deg; }
		&:hover,
		&:focus-visible { background: rgb(0 0 0 / 0.16); rotate: 90deg; }
	}
}
/* Les sections d'une page légale perdent fonds et espacements dans la fenêtre */
.h25-dialog__contenu {
	font-size: var(--h25-fs-mini);
	line-height: 1.4;
	.h25-section { padding: 0; background: none; color: inherit; }
	.h25-section + .h25-section { margin-block-start: 2.4rem; }
	.h25-container { width: auto; }
	.h25-etoiles { display: none; }
	/* « Contenu à droite » : la fenêtre a déjà son titre → une seule colonne, sans le titre de gauche */
	.h25-contenu-droite__gauche { display: none; }
	.h25-contenu-droite__grille { display: block; }
	/* rythme du texte légal (blocs natifs hors section) */
	> * + *, .h25-container > * + * { margin-block-start: 1em; }
	> * + :is(h2, h3, h4), .h25-container > * + :is(h2, h3, h4) { margin-block-start: 1.6em; }
	h2 { font-size: var(--h25-fs-h6); }
	h3, h4 { font-size: var(--h25-fs-h7); }
}

/* ---------- Défilement infini (« marquee », cf. main.js) ----------
 * Le JS pose data-h25-defilement-actif + la largeur d'un passage
 * (--h25-defilement-decalage) et la durée (vitesse constante, en px/s).
 * data-h25-sens="inverse" : défile vers la droite (hero de l'ancien thème).
 */
@media (prefers-reduced-motion: no-preference) {
	[data-h25-defilement-actif] {
		animation: h25-defilement var(--h25-defilement-duree, 30s) linear infinite;
	}
	[data-h25-defilement-actif][data-h25-sens="inverse"] { animation-direction: reverse; }
	/* calque dédié (carte graphique) ; en pause hors de l'écran (cf. main.js) */
	[data-h25-defilement-actif] { will-change: transform; }
	[data-h25-defilement-actif][data-h25-pause] { animation-play-state: paused; }
}
@keyframes h25-defilement {
	to { transform: translateX(calc(-1 * var(--h25-defilement-decalage, 50%))); }
}

/* ---------- Apparition au défilement (« reveal » de l'ancien thème) ----------
 * main.js ajoute .est-visible quand l'élément entre dans les 92 % hauts de
 * l'écran (IntersectionObserver, rootMargin -8 %), 50 ms après, une seule fois.
 * Classes (à poser dans les render.php) :
 *   h25-reveal            fondu seul
 *   h25-reveal--haut      arrive d'en haut      (ex revealFT)
 *   h25-reveal--bas       arrive d'en bas       (ex revealFB)
 *   h25-reveal--gauche    arrive de la gauche   (ex revealFL)
 *   h25-reveal--droite    arrive de la droite   (ex revealFR)
 *   style="--h25-rang: n" décalage de n × 0,06 s (ex reveal1…reveal9, sans limite)
 * Garde-fous : rien n'est caché sans JS (scripting), sous « réduire les
 * animations », ni dans l'éditeur (le client doit tout voir).
 */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
	body:not(.editor-styles-wrapper) .h25-reveal {
		--h25-reveal-d: 1.8rem;
		opacity: 0;
		transition:
			transform 0.45s var(--h25-ease),
			opacity 0.35s var(--h25-ease);
		transition-delay: calc(0.05s + var(--h25-rang, 0) * 0.06s);

		&.h25-reveal--haut { transform: translateY(calc(var(--h25-reveal-d) * -1)); }
		&.h25-reveal--bas { transform: translateY(var(--h25-reveal-d)); }
		&.h25-reveal--gauche { transform: translateX(calc(var(--h25-reveal-d) * -2)); }
		&.h25-reveal--droite { transform: translateX(calc(var(--h25-reveal-d) * 2)); }
		&.est-visible { opacity: 1; transform: none; }
	}
	/*
	 * Lettre par lettre (h25_lettres(), cf. inc/helpers.php) : chaque lettre
	 * monte de 0,2 em, décalée de --i × 0,04 s. La phrase réelle est lue par
	 * les lecteurs d'écran (texte masqué à côté), les lettres sont aria-hidden.
	 */
	body:not(.editor-styles-wrapper) .h25-lettres__ligne.h25-reveal {
		opacity: 1;
		transform: none;
		.h25-lettre {
			display: inline-block;
			opacity: 0;
			transform: translateY(0.2em);
			transition: transform 0.45s var(--h25-ease), opacity 0.35s var(--h25-ease);
			transition-delay: calc(0.05s + var(--h25-rang, 0) * 0.06s + var(--i) * 0.04s);
		}
		&.est-visible .h25-lettre { opacity: 1; transform: none; }
	}
}
.h25-lettres { display: block; }
.h25-lettres__ligne { display: block; }
.h25-mot { display: inline-block; white-space: nowrap; }
.h25-lettre { display: inline-block; }

/* ---------- Éditeur uniquement : aide visuelle au client ---------- */
.h25-placeholder {
	display: grid;
	place-items: center;
	min-height: 24rem;
	padding: 2rem;
	border: 2px dashed currentColor;
	border-radius: var(--h25-radius);
	opacity: 0.6;
	font-size: var(--h25-fs-mini);
	text-align: center;
}

/* ---------- Page 404 (404.php) ---------- */
.h25-404__inner {
	display: grid;
	justify-items: start;
	gap: clamp(2.4rem, 2vw, 4rem);
}
.h25-404__titre {
	display: grid;
	gap: 2rem;
}
.h25-404__code {
	font-size: clamp(16rem, 30vw, 44rem);
	line-height: 0.76;
	letter-spacing: -0.06em;
}
.h25-404__phrase {
	display: block;
	font-size: var(--h25-fs-h4);
	line-height: 0.9;
	letter-spacing: -0.02em;
	color: var(--h25-noir);
}

/* Surtitre (style de paragraphe) : petite ligne en capitales au-dessus d'un titre */
.is-style-surtitre {
	font-family: var(--h25-font-expressive);
	font-stretch: 75%;
	font-size: var(--h25-fs-mini);
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--h25-titre-2);
	.h25-fond--blanc & { color: var(--h25-rouge); }
	& + :is(h2, h3, h4) { margin-block-start: 1.2rem !important; }
}
/* Séparateur (bloc natif) : trait pointillé de la charte — sélecteur renforcé : le CSS du bloc WordPress passe après base.css */
.h25-prose > hr.wp-block-separator {
	height: 0;
	margin-block: clamp(3.2rem, 2.4rem + 1.6vw, 4.8rem);
	border: 0;
	border-block-start: 1px dashed currentColor;
	background: none;
	opacity: 1;
	color: inherit;
}

/* Photo encadrée de blanc (charte) — hero, deux colonnes, bandeau d’images, slider */
.h25-cadre {
	margin: 0;
	border: clamp(0.4rem, 0.4vw, 0.7rem) solid var(--h25-blanc);
	background: var(--h25-blanc);
	box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.12);
	overflow: clip;
	img { width: 100%; height: 100%; object-fit: cover; }
}

/*
 * SURFACES BLANCHES posées dans une section (cartes du carrousel, offres,
 * prestations, carte du formulaire, chiffres clés, questionnaire…) : boutons
 * « fond clair », même si la section est rouge. Sinon ils héritent du réglage
 * de la section rouge — survol BLANC, invisible sur la carte blanche.
 * Nouvelle carte blanche = l'ajouter ici.
 */
.h25-slider__carte,
.h25-offre,
.h25-presta,
.h25-formulaire__carte,
.h25-chiffre,
.h25-questionnaire__apercu,
.h25-questionnaire__sans-js {
	--h25-btn-bg: var(--h25-blanc);
	--h25-btn-fg: var(--h25-noir);
	--h25-btn-bord: var(--h25-gris);
	--h25-btn-bg-hover: var(--h25-noir);
	--h25-btn-fg-hover: var(--h25-blanc);
}
