/**
 * Luca Barone — styles du thème enfant (complètent theme.json et le thème parent Onk FSE).
 * Référence : Figma « Luca Barone », page 99 Design, cadre « Accueil — Desktop 1920 - 2 ».
 *
 * Le rendu s'appuie sur les styles de bloc (classes is-style-*, choisis dans l'éditeur → Styles)
 * et sur les attributs natifs (couleur de fond, taille de texte). Aucune classe à saisir à la main.
 * Feuille chargée aussi dans l'éditeur (add_editor_style) : même rendu en back-office.
 */

/* ---------- Réglages communs ---------- */

/* Fonds sombres : Contraste (Encre) et Primaire (Canard). Filets et textes secondaires s'adaptent. */
:root {
	--lb-line-color: var(--wp--preset--color--border);
	--lb-muted: var(--wp--preset--color--contrast-2);
}

:is(.has-contrast-background-color, .has-primary-background-color) {
	--lb-line-color: var(--wp--preset--color--secondary);
	--lb-muted: var(--wp--preset--color--secondary);
}

/* Sections bord à bord : pas d'espace entre elles. */
:where(.wp-block-post-content, .editor-styles-wrapper .is-root-container) > :is(.wp-block-group, .wp-block-cover).alignfull {
	margin-block: 0;
}

/* Pas d'espace entre le contenu et le footer : la dernière section (photo) est bord à bord. */
.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part:last-child {
	margin-block-start: 0;
}

/* ---------- Chasse d'Archivo (axe wdth, réglages du Figma) ---------- */
/* H1, H2, H4 : étroit 62 % ; H3 : 84 % ; chiffres : 77 % ; H5, H6 et texte courant : 100 %. */

:is(h1, h2, h4) {
	font-stretch: var(--wp--custom--font-stretch--etroit);
}

h3 {
	font-stretch: var(--wp--custom--font-stretch--semi-etroit);
}

/* ---------- Paragraphe : Surtitre (style du parent) ---------- */

.is-style-eyebrow {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
}

.is-style-eyebrow.has-text-align-center {
	justify-content: center;
}

.is-style-eyebrow.has-text-align-right {
	justify-content: flex-end;
}

.is-style-eyebrow::before {
	content: "";
	flex: none;
	inline-size: var(--wp--custom--marker);
	block-size: var(--wp--custom--marker);
	background-color: var(--wp--preset--color--accent);
}

:is(.has-contrast-background-color, .has-primary-background-color) .is-style-eyebrow:not(.has-text-color) {
	color: var(--wp--preset--color--secondary);
}

/* ---------- Paragraphe : Lien souligné ---------- */

.is-style-lien a {
	display: inline-block;
	padding-block-end: var(--wp--preset--spacing--20);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--ui);
	color: inherit;
	text-decoration: none;
	border-block-end: var(--wp--custom--border-width--small) solid currentColor;
	transition: color 0.2s ease;
}

.is-style-lien a:hover,
.is-style-lien a:focus-visible {
	color: var(--wp--preset--color--accent);
}

/* ---------- Paragraphe : Lien « Descendre » (filet après le texte) ---------- */

.is-style-defiler {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--label);
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
}

.is-style-defiler a {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	color: inherit;
	text-decoration: none;
}

.is-style-defiler a::after {
	content: "";
	inline-size: calc(2 * var(--wp--preset--spacing--40) + var(--wp--preset--spacing--20)); /* 56 px */
	block-size: var(--wp--custom--border-width--small);
	background-color: currentColor;
	transition: inline-size 0.2s ease;
}

.is-style-defiler a:hover::after {
	inline-size: calc(3 * var(--wp--preset--spacing--40));
}

/* ---------- Liste : Mots-clés à filets (+ format « Méta ») ---------- */

.wp-block-list.is-style-mots-cles {
	padding: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: var(--wp--custom--font-weight--fort);
	line-height: var(--wp--custom--line-height--h-5);
	text-transform: uppercase;
	list-style: none;
	border-block-start: var(--wp--custom--border-width--small) solid var(--lb-line-color);
}

.wp-block-list.is-style-mots-cles:not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--large);
}

/* Taille X-Large = style H4 du Figma (étroit) */
.wp-block-list.is-style-mots-cles.has-x-large-font-size {
	font-weight: var(--wp--custom--font-weight--titre);
	font-stretch: var(--wp--custom--font-stretch--etroit);
}

.wp-block-list.is-style-mots-cles > li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
	margin: 0;
	padding-block: var(--wp--preset--spacing--30);
	border-block-end: var(--wp--custom--border-width--small) solid var(--lb-line-color);
}

/* Éditeur : le texte de chaque ligne est dans un conteneur éditable */
.wp-block-list.is-style-mots-cles > li > .block-editor-rich-text__editable {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
}

.lb-meta {
	flex: none;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	font-stretch: normal;
	line-height: var(--wp--custom--line-height--label);
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	color: var(--lb-muted);
}

/* ---------- Liste : Rubriques en ligne ---------- */

.wp-block-list.is-style-rubriques {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
	padding: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--label);
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	color: var(--lb-muted);
	list-style: none;
}

.wp-block-list.is-style-rubriques > li {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin: 0;
}

.wp-block-list.is-style-rubriques > li + li::before {
	content: "";
	inline-size: var(--wp--custom--marker);
	block-size: var(--wp--custom--marker);
	background-color: var(--wp--preset--color--border);
}

.wp-block-list.is-style-rubriques > li:last-child::before {
	background-color: var(--wp--preset--color--accent);
}

/* ---------- Groupe : Filet en haut ---------- */

.wp-block-group.is-style-filet-haut {
	padding-block-start: var(--wp--preset--spacing--50);
	border-block-start: var(--wp--custom--border-width--small) solid var(--lb-line-color);
}

.wp-block-group.is-style-filet-haut > * {
	margin-block: 0;
}

/* ---------- Groupe : Chiffres clés ---------- */
/* Un sous-groupe par chiffre : 1er paragraphe = valeur, dernier = libellé. */

.wp-block-group.is-style-chiffres {
	display: grid;
	grid-template-columns: repeat(5, auto);
	justify-content: space-between;
	gap: var(--wp--preset--spacing--50);
	padding-block-start: var(--wp--preset--spacing--50);
	border-block-start: var(--wp--custom--border-width--small) solid var(--lb-line-color);
}

.wp-block-group.is-style-chiffres > .wp-block-group {
	display: grid;
	grid-row: span 2;
	grid-template-rows: subgrid;
	row-gap: var(--wp--preset--spacing--40);
	margin: 0;
}

.wp-block-group.is-style-chiffres > .wp-block-group > * {
	margin: 0;
}

.wp-block-group.is-style-chiffres > .wp-block-group > p:first-child {
	align-self: end;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: var(--wp--custom--font-weight--fort);
	font-stretch: var(--wp--custom--font-stretch--chiffre);
	line-height: var(--wp--custom--line-height--h-1);
	letter-spacing: var(--wp--custom--letter-spacing--h-1);
	text-transform: uppercase;
	white-space: nowrap !important; /* l'éditeur force pre-wrap */
}

.wp-block-group.is-style-chiffres > .wp-block-group > p:first-child:not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--huge);
}

/* Valeur en mots (taille X-Large) = style H4 du Figma */
.wp-block-group.is-style-chiffres > .wp-block-group > p:first-child.has-x-large-font-size {
	font-weight: var(--wp--custom--font-weight--titre);
	font-stretch: var(--wp--custom--font-stretch--etroit);
	line-height: var(--wp--custom--line-height--h-4);
	letter-spacing: 0;
	white-space: normal !important;
}

.wp-block-group.is-style-chiffres > .wp-block-group > p:last-child:not(:first-child) {
	max-inline-size: 18em;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--label);
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
}

.wp-block-group.is-style-chiffres > .block-list-appender {
	grid-column: 1 / -1;
}

@media (max-width: 1199px) {
	.wp-block-group.is-style-chiffres {
		grid-template-columns: repeat(3, auto);
	}
}

@media (max-width: 781px) {
	.wp-block-group.is-style-chiffres {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		justify-content: stretch;
	}
}

/* ---------- Colonnes : Frise chronologique ---------- */
/* Une colonne par repère : 1er paragraphe = année, dernier = légende. Le dernier repère a le carré rouge. */

/* Pas de marge basse par défaut des colonnes ; la marge haute reste celle de la mise en page (espace avec le bloc précédent). */
.wp-block-columns.is-style-frise {
	gap: 0;
	margin-block-end: 0;
}

.wp-block-columns.is-style-frise > .wp-block-column {
	position: relative;
	padding-block-start: var(--wp--preset--spacing--50);
	padding-inline-end: var(--wp--preset--spacing--40);
	border-block-start: var(--wp--custom--border-width--small) solid var(--lb-line-color);
}

/* Repère : carré 7 px posé sur le filet (centré sur la ligne) */
.wp-block-columns.is-style-frise > .wp-block-column::before {
	content: "";
	position: absolute;
	inset-block-start: calc(-0.5 * (var(--wp--custom--marker) + var(--wp--custom--border-width--small)) - 0.5 * var(--wp--custom--border-width--small));
	inset-inline-start: 0;
	inline-size: calc(var(--wp--custom--marker) + var(--wp--custom--border-width--small));
	block-size: calc(var(--wp--custom--marker) + var(--wp--custom--border-width--small));
	background-color: currentColor;
}

.wp-block-columns.is-style-frise > .wp-block-column:last-of-type::before {
	background-color: var(--wp--preset--color--accent);
}

.wp-block-columns.is-style-frise > .wp-block-column > * {
	margin: 0;
}

.wp-block-columns.is-style-frise > .wp-block-column > p:first-child {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: var(--wp--custom--font-weight--titre);
	font-stretch: var(--wp--custom--font-stretch--semi-etroit);
	line-height: var(--wp--custom--line-height--h-3);
	text-transform: uppercase;
}

.wp-block-columns.is-style-frise > .wp-block-column > p:first-child:not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--xx-large);
}

.wp-block-columns.is-style-frise > .wp-block-column > p:last-child:not(:first-child) {
	margin-block-start: 0.875rem; /* 14 px */
	line-height: var(--wp--custom--line-height--small);
}

.wp-block-columns.is-style-frise > .wp-block-column > p:last-child:not(:first-child):not(.has-text-color) {
	color: var(--lb-muted);
}

@media (max-width: 781px) {
	/* Défilement horizontal : la frise garde son sens de lecture */
	.wp-block-columns.is-style-frise {
		flex-wrap: nowrap !important;
		padding-block-start: 4px; /* le défilement rognerait les carrés posés sur le filet */
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.wp-block-columns.is-style-frise > .wp-block-column {
		flex: 0 0 62% !important;
		scroll-snap-align: start;
	}
}

/* ---------- Colonnes : Image débordante (gauche / droite) ---------- */
/* La photo touche le bord de l'écran ; le texte s'aligne sur la grille de contenu. */

.wp-block-columns:is(.is-style-debord-gauche, .is-style-debord-droite) {
	--lb-edge: max(var(--wp--style--root--padding-right, 1.25rem), calc((100% - var(--wp--style--global--content-size, 1312px)) / 2));
	margin-block: 0;
}

.wp-block-columns.is-style-debord-gauche {
	padding-inline-end: var(--lb-edge);
}

.wp-block-columns.is-style-debord-droite {
	padding-inline-start: var(--lb-edge);
}

.wp-block-columns:is(.is-style-debord-gauche, .is-style-debord-droite) .wp-block-image {
	margin: 0;
}

.wp-block-columns:is(.is-style-debord-gauche, .is-style-debord-droite) .wp-block-image img {
	inline-size: 100%;
}

@media (max-width: 781px) {
	.wp-block-columns:is(.is-style-debord-gauche, .is-style-debord-droite) {
		padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right);
	}

	/* La photo passe en tête, bord à bord */
	.wp-block-columns:is(.is-style-debord-gauche, .is-style-debord-droite) > .wp-block-column:has(> .wp-block-image) {
		order: -1;
		margin-inline: calc(-1 * var(--wp--style--root--padding-left)) calc(-1 * var(--wp--style--root--padding-right));
	}

	.wp-block-group.alignfull:has(> .wp-block-columns:is(.is-style-debord-gauche, .is-style-debord-droite)) {
		padding-top: 0 !important;
	}
}

/* ---------- Couverture : Hero (voile dégradé vers le bas) ---------- */

.wp-block-cover.is-style-hero .wp-block-cover__background {
	-webkit-mask-image: linear-gradient(to top, #000 6%, transparent);
	mask-image: linear-gradient(to top, #000 6%, transparent);
}

.wp-block-cover.is-style-hero .wp-block-cover__inner-container > .wp-block-group > * {
	margin-block: 0;
}

@media (max-width: 781px) {
	.wp-block-cover.is-style-hero .wp-block-cover__inner-container > .wp-block-group > * {
		flex-basis: 100%;
	}

	.wp-block-cover.is-style-hero .has-text-align-right {
		text-align: start;
	}
}


.wp-block-cover .wp-block-heading a{text-decoration: none;}


/* ---------- Galerie « Logos défilants » : cellules bord à bord, logos en couleur ---------- */

.wp-block-gallery.is-style-logos-defilant.is-marquee {
	-webkit-mask-image: none;
	mask-image: none;
}

.wp-block-gallery.is-style-logos-defilant .onk-marquee__track,
.wp-block-gallery.has-nested-images.is-style-logos-defilant:not(.is-marquee) {
	gap: 0;
}

.wp-block-gallery.has-nested-images.is-style-logos-defilant figure.wp-block-image:not(#individual-image) {
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: clamp(10rem, 16.6667vw, 20rem); /* 320 px à 1920 */
	block-size: clamp(5.5rem, 7.2917vw, 8.75rem); /* 140 px à 1920 */
	margin: 0;
	border: var(--wp--custom--border-width--small) solid var(--lb-line-color);
	border-inline-end: 0;
}

.wp-block-gallery.has-nested-images.is-style-logos-defilant figure.wp-block-image img {
	max-inline-size: 60%;
	block-size: 46%;
	filter: none;
	opacity: 1;
}

/* ---------- Groupe : Carrousel de témoignages ---------- */
/* Contenu : un surtitre (facultatif) puis des blocs Citation. */

.wp-block-group.is-style-temoignages {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	column-gap: var(--wp--preset--spacing--40);
	row-gap: var(--wp--preset--spacing--60);
}

.wp-block-group.is-style-temoignages > * {
	grid-column: 1 / -1;
	margin: 0 !important;
}

.wp-block-group.is-style-temoignages > .is-style-eyebrow:first-child {
	grid-column: 1;
}

.wp-block-group.is-style-temoignages .wp-block-quote {
	margin: 0;
	color: inherit;
}

.wp-block-group.is-style-temoignages .wp-block-quote p {
	max-inline-size: 90%;
}

.wp-block-group.is-style-temoignages .wp-block-quote cite {
	display: block;
	margin-block-start: var(--wp--preset--spacing--50);
	font-family: var(--wp--preset--font-family--body);
	font-style: normal;
	color: var(--lb-muted);
}

.lb-temoignages__compteur {
	grid-column: 2 !important;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	color: var(--lb-muted);
}

.wp-block-group.is-style-temoignages .swiper-slide {
	background-color: var(--wp--preset--color--primary);
}

.lb-temoignages__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
}

.lb-temoignages__segments {
	display: flex;
	gap: var(--wp--preset--spacing--20);
}

.lb-temoignages__segments button {
	inline-size: calc(2 * var(--wp--preset--spacing--40) + var(--wp--preset--spacing--20));
	padding-block: var(--wp--preset--spacing--30);
	padding-inline: 0;
	cursor: pointer;
	background: none;
	border: 0;
}

.lb-temoignages__segments button::before {
	content: "";
	display: block;
	block-size: var(--wp--custom--border-width--medium);
	background-color: var(--wp--preset--color--secondary);
	transition: background-color 0.2s ease;
}

.lb-temoignages__segments button[aria-current="true"]::before,
.lb-temoignages__segments button:hover::before {
	background-color: var(--wp--preset--color--base);
}

.lb-temoignages__fleches {
	display: flex;
	gap: var(--wp--preset--spacing--50);
}

.lb-temoignages__fleches button {
	padding: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--ui);
	color: inherit;
	cursor: pointer;
	background: none;
	border: 0;
}

.lb-temoignages__fleches button:hover {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.is-style-temoignages button:focus-visible {
	outline: var(--wp--custom--border-width--medium) solid currentColor;
	outline-offset: 2px;
}

/* ---------- Icônes sociales : taille « Énorme » = 72 px (Figma) ---------- */

.wp-block-social-links.has-huge-icon-size {
	font-size: calc(var(--wp--preset--spacing--60) + var(--wp--preset--spacing--20));
}

.wp-block-social-links.is-style-logos-only .wp-social-link {
	padding: 0;
}

/* ---------- Header ---------- */

.onk-header {
	border-bottom: 0;
}

/* ---------- Liste : Puces carrées (page intérieure V3) ---------- */
/* Puce = carré de 5 px en gris (Galet sur fond sombre). Format « Précision » : 2e ligne en petit, grisée. */

.wp-block-list.is-style-puces {
	display: flex;
	flex-direction: column;
	gap: 0.625rem; /* 10 px */
	margin-block-start: var(--wp--preset--spacing--20);
	padding: 0;
	list-style: none;
}

.wp-block-list.is-style-puces:has(.lb-precision) {
	gap: 0.875rem; /* 14 px */
}

.wp-block-list.is-style-puces > li {
	position: relative;
	margin: 0;
	padding-inline-start: calc(5px + 0.875rem);
	line-height: var(--wp--custom--line-height--body);
}

.wp-block-list.is-style-puces > li::before {
	content: "";
	position: absolute;
	inset-block-start: calc(0.75em - 2.5px);
	inset-inline-start: 0;
	inline-size: 5px;
	block-size: 5px;
	background-color: var(--lb-muted);
}

.lb-precision {
	display: block;
	margin-block-start: 2px;
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--small);
	color: var(--lb-muted);
}

/* ---------- Paragraphe : Lien vidéo (bouton lecture rond) ---------- */

.is-style-video a {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--ui);
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.is-style-video a::before {
	content: "";
	flex: none;
	inline-size: 56px;
	block-size: 56px;
	background-color: currentColor;
	-webkit-mask: var(--lb-play) center / contain no-repeat;
	mask: var(--lb-play) center / contain no-repeat;
	--lb-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Ccircle cx='28' cy='28' r='27.5' fill='none' stroke='%23000'/%3E%3Cpath d='M23 20.5v15l12-7.5z' fill='%23000'/%3E%3C/svg%3E");
}

.is-style-video a:hover,
.is-style-video a:focus-visible {
	color: var(--wp--preset--color--accent);
}

/* ---------- Paragraphe : Lien téléchargement (rond + flèche vers le bas) ---------- */
/* Même gabarit que « Lien vidéo ». Le texte peut contenir une précision (format Précision) : « PDF · 4 Mo ». */

.is-style-telechargement a {
	display: inline-grid;
	grid-template-columns: 56px auto;
	align-items: center;
	column-gap: var(--wp--preset--spacing--30);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--ui);
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.is-style-telechargement a::before {
	content: "";
	grid-row: 1 / span 2;
	inline-size: 56px;
	block-size: 56px;
	background-color: currentColor;
	-webkit-mask: var(--lb-dl) center / contain no-repeat;
	mask: var(--lb-dl) center / contain no-repeat;
	--lb-dl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Ccircle cx='28' cy='28' r='27.5' fill='none' stroke='%23000'/%3E%3Cpath d='M28 19v15m-6-6 6 6 6-6M21 37.5h14' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='square'/%3E%3C/svg%3E");
}

/* Sans précision, le texte reste centré sur le rond */
.is-style-telechargement a:not(:has(.lb-precision))::before {
	grid-row: 1;
}

.is-style-telechargement a:has(.lb-precision) {
	row-gap: 0;
	align-items: end;
}

.is-style-telechargement a:hover,
.is-style-telechargement a:focus-visible {
	color: var(--wp--preset--color--accent);
}

.is-style-telechargement .lb-precision {
	display: block;
	grid-column: 2;
	align-self: start;
	margin-block-start: 0.375rem;
	font-weight: 400;
	color: inherit;
	opacity: 0.7;
}

/* ---------- Groupe : Formulaire (Formidable Forms) ---------- */
/* Placer le shortcode/bloc Formidable dans un groupe de style « Formulaire ».
   Formidable : désactiver son style pour ce formulaire (Paramètres → Style → « Ne pas utiliser le style Formidable »).
   Classe de mise en page « frm_half » sur les champs à mettre 2 par ligne. */

.is-style-formulaire .frm_forms,
.is-style-formulaire form {
	margin: 0;
}

.is-style-formulaire fieldset {
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.is-style-formulaire legend.frm_screen_reader,
.is-style-formulaire .frm_screen_reader {
	position: absolute !important;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.is-style-formulaire .frm_fields_container {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.is-style-formulaire .frm_fields_container > * {
	grid-column: 1 / -1;
	margin: 0;
}

.is-style-formulaire .frm_fields_container > .frm_half {
	grid-column: span 1;
}

@media (max-width: 781px) {
	.is-style-formulaire .frm_fields_container > .frm_half {
		grid-column: 1 / -1;
	}
}

/* Libellés (UI/Label) */
.is-style-formulaire .frm_primary_label {
	display: block;
	margin-block-end: 0.625rem;
	padding: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--label);
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	color: var(--lb-muted);
}

.is-style-formulaire .frm_required {
	color: inherit;
}

/* Champs : cadre 1 px Galet, sans fond, 56 px ; focus Encre 1,5 px */
.is-style-formulaire :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], select, textarea) {
	box-sizing: border-box;
	inline-size: 100%;
	block-size: 56px;
	margin: 0;
	padding: 0 1.25rem;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
	line-height: var(--wp--custom--line-height--body);
	color: var(--wp--preset--color--contrast);
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.is-style-formulaire textarea {
	block-size: auto;
	min-block-size: 176px;
	padding-block: 1.125rem;
	resize: vertical;
}

.is-style-formulaire select {
	padding-inline-end: 3rem;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' viewBox='0 0 12 6'%3E%3Cpath d='M1 .5l5 5 5-5' fill='none' stroke='%230d1b1e' stroke-width='1.2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1.25rem center;
}

.is-style-formulaire ::placeholder {
	color: var(--wp--preset--color--contrast-2);
	opacity: 1;
}

.is-style-formulaire :is(input, select, textarea):focus {
	border-color: var(--wp--preset--color--contrast);
	outline: 0;
	box-shadow: inset 0 0 0 0.5px var(--wp--preset--color--contrast);
}

/* Boutons radio en étiquettes (Formulaire / Choix) */
.is-style-formulaire .frm_opt_container:has(.frm_radio) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.is-style-formulaire .frm_radio {
	margin: 0;
}

.is-style-formulaire .frm_radio label {
	position: relative;
	display: inline-flex;
	align-items: center;
	block-size: 48px;
	padding-inline: 1.375rem;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--ui);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	border: 1px solid var(--wp--preset--color--border);
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.is-style-formulaire .frm_radio input {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
	margin: 0;
	cursor: pointer;
	opacity: 0;
}

.is-style-formulaire .frm_radio label:hover {
	border-color: var(--wp--preset--color--contrast);
}

.is-style-formulaire .frm_radio label:has(input:checked) {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
}

.is-style-formulaire .frm_radio label:has(input:focus-visible) {
	outline: var(--wp--custom--border-width--medium, 2px) solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Case à cocher (consentement RGPD) */
.is-style-formulaire .frm_checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--small);
	color: var(--lb-muted);
	cursor: pointer;
}

.is-style-formulaire .frm_checkbox input {
	flex: none;
	inline-size: 18px;
	block-size: 18px;
	margin: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--contrast-2);
	border-radius: 0;
}

.is-style-formulaire .frm_checkbox input:checked {
	background-color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	box-shadow: inset 0 0 0 3px var(--wp--preset--color--base);
}

.is-style-formulaire .frm_checkbox input:focus-visible {
	outline: var(--wp--custom--border-width--medium, 2px) solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Envoi : bouton Plein + mention « champs obligatoires » */
.is-style-formulaire .frm_submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
}

.is-style-formulaire .frm_submit::after {
	content: "* Champs obligatoires";
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--small);
	color: var(--lb-muted);
}

.is-style-formulaire :is(.frm_submit button, .frm_submit input[type="submit"], .frm_button_submit) {
	margin: 0;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--ui);
	color: var(--wp--preset--color--base);
	cursor: pointer;
	background-color: var(--wp--preset--color--accent);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transition: background-color 0.2s ease;
}

.is-style-formulaire :is(.frm_submit button, .frm_submit input[type="submit"], .frm_button_submit):hover {
	background-color: var(--wp--preset--color--accent-2);
}

/* Messages */
.is-style-formulaire .frm_description {
	margin-block-start: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--lb-muted);
}

.is-style-formulaire .frm_error {
	margin-block-start: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent);
}

.is-style-formulaire .frm_blank_field :is(input, select, textarea) {
	border-color: var(--wp--preset--color--accent);
}

.is-style-formulaire :is(.frm_error_style, .frm_message) {
	margin-block-end: var(--wp--preset--spacing--40);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border-inline-start: var(--wp--custom--marker) solid var(--wp--preset--color--accent);
	background-color: var(--wp--preset--color--base-2);
}

.is-style-formulaire .frm_message {
	border-inline-start-color: var(--wp--preset--color--primary);
}

/* ---------- Focus : visible au clavier seulement ---------- */
/* Au clic souris, aucun cadre. Au clavier (Tab), un trait fin couleur du texte, décalé :
   indispensable en accessibilité, discret visuellement. */

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.wp-element-button:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
	outline: none !important;
	box-shadow: none;
}

a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible,
[tabindex]:focus-visible {
	outline: var(--wp--custom--border-width--small, 1px) solid currentColor !important;
	outline-offset: 4px;
}

a,
button {
	-webkit-tap-highlight-color: transparent;
}

/* ---------- Footer : liens sans soulignement ---------- */

:is(footer.wp-block-template-part, .wp-site-blocks > footer) a:not(.wp-element-button) {
	text-decoration: none;
	transition: color 0.2s ease;
}

:is(footer.wp-block-template-part, .wp-site-blocks > footer) a:not(.wp-element-button):hover {
	color: var(--wp--preset--color--accent);
}

/* ---------- Header transparent : dégradé foncé derrière logo et menu ---------- */
/* Lisibilité sur les photos claires (hero de l'accueil, couvertures des pages intérieures). */

.onk-header--transparent {
	position: relative;
	isolation: isolate;
}

.onk-header--transparent::before {
	content: "";
	position: absolute;
	inset: 0 0 -70% 0; /* déborde sous le header pour un fondu progressif */
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		color-mix(in srgb, var(--wp--preset--color--contrast) 70%, transparent) 0%,
		color-mix(in srgb, var(--wp--preset--color--contrast) 40%, transparent) 55%,
		transparent 100%
	);
}

/* Menu ouvert : le plein écran a son propre fond, pas de dégradé par-dessus */
.onk-header--transparent:has(.is-menu-open)::before {
	opacity: 0;
}

/* ---------- Menu mobile plein écran : liens centrés + bouton Contact ---------- */

.wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	--navigation-layout-justification-setting: center;
	--navigation-layout-justify: center;
	--navigation-layout-align: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: center;
	justify-content: center;
	min-block-size: calc(100dvh - 8rem); /* centrage vertical, sous le bouton de fermeture */
	gap: var(--wp--preset--spacing--60);
	text-align: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: center;
	gap: var(--wp--preset--spacing--40);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	justify-content: center;
}

/* Liens en grandes capitales étroites, comme les titres du site */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: var(--wp--custom--font-weight--titre);
	font-stretch: var(--wp--custom--font-stretch--etroit);
	line-height: var(--wp--custom--line-height--h-4);
	text-transform: uppercase;
}

/* Bouton Contact & Devis : copié dans le menu (assets/js/menu-mobile.js), visible seulement menu ouvert */
.wp-block-navigation__responsive-container:not(.is-menu-open) .lb-menu-cta {
	display: none;
}

.wp-block-navigation__responsive-container.is-menu-open .lb-menu-cta {
	display: flex;
	justify-content: center;
	margin: 0;
}

/* ---------- Espacement entre les mots ---------- */
/* Archivo condensé (62 %) + interlettrage négatif : l'espace entre les mots se resserre avec la chasse.
   On l'élargit sur les titres étroits et, plus légèrement, sur l'italique des accroches et citations.
   Réglages : theme.json → settings.custom.word-spacing (titre, lead). */

:is(h1, h2, h3, h4),
.wp-block-list.is-style-mots-cles.has-x-large-font-size,
.wp-block-group.is-style-chiffres > .wp-block-group > p:first-child.has-x-large-font-size {
	word-spacing: var(--wp--custom--word-spacing--titre);
}

.is-style-lead,
.wp-block-quote,
.wp-block-pullquote {
	word-spacing: var(--wp--custom--word-spacing--lead);
}

/* ---------- Vidéo en fenêtre (lien « Lien vidéo ») ---------- */

html.lb-video-ouverte {
	overflow: hidden;
}

dialog.lb-video {
	box-sizing: border-box;
	inline-size: 100vw;
	block-size: 100dvh;
	max-inline-size: none;
	max-block-size: none;
	margin: 0;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30);
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--base);
}

dialog.lb-video[open] {
	display: grid;
	place-items: center;
	animation: lb-video-entree 0.3s ease-out;
}

dialog.lb-video::backdrop {
	background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 92%, transparent);
}

.lb-video__cadre {
	inline-size: min(100%, 1280px, calc((100dvh - 8rem) * 16 / 9));
	aspect-ratio: 16 / 9;
	background-color: #000;
}

.lb-video__cadre :is(iframe, video) {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	border: 0;
}

.lb-video__fermer {
	position: absolute;
	inset-block-start: var(--wp--preset--spacing--30);
	inset-inline-end: var(--wp--preset--spacing--30);
	inline-size: 48px;
	block-size: 48px;
	padding: 0;
	cursor: pointer;
	color: inherit;
	background: transparent;
	border: var(--wp--custom--border-width--small, 1px) solid currentColor;
	border-radius: 50%;
	transition: color 0.2s ease;
}

.lb-video__fermer::before,
.lb-video__fermer::after {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	inline-size: 18px;
	block-size: 1.5px;
	background-color: currentColor;
	translate: -50% -50%;
	rotate: 45deg;
}

.lb-video__fermer::after {
	rotate: -45deg;
}

.lb-video__fermer:hover {
	color: var(--wp--preset--color--accent);
}

@keyframes lb-video-entree {
	from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	dialog.lb-video[open] {
		animation: none;
	}
}

/* ---------- Divers ---------- */

/* Texte réservé aux lecteurs d'écran (h1 du hero, la signature étant une image) */
.screen-reader-text {
	position: absolute !important;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* WordPress nomme les variables custom en kebab-case (h1 → h-1) : alias pour les thèmes parents antérieurs à 1.6.1. */
:root {
	--wp--custom--line-height--h1: var(--wp--custom--line-height--h-1);
	--wp--custom--line-height--h2: var(--wp--custom--line-height--h-2);
	--wp--custom--line-height--h3: var(--wp--custom--line-height--h-3);
	--wp--custom--line-height--h4: var(--wp--custom--line-height--h-4);
	--wp--custom--letter-spacing--h1: var(--wp--custom--letter-spacing--h-1);
	--wp--custom--letter-spacing--h2: var(--wp--custom--letter-spacing--h-2);
}
