/*
Theme Name: SkyJobDating
Description: Thème de blocs du site SkyJobDating, cabinet de recrutement et de placement à Maurice. Direction artistique D2, Maurice en grand.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Version: 2.3.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: skyjobdating
*/

/* Polices de repli calées sur les métriques des polices web : limite le décalage au chargement. */
@font-face {
	font-family: "Archivo repli";
	src: local("Arial Bold"), local("Arial-BoldMT");
	font-weight: 700;
	size-adjust: 107.3%;
	ascent-override: 81.8%;
	descent-override: 19.6%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Hanken repli";
	src: local("Arial"), local("ArialMT");
	font-weight: 400;
	size-adjust: 101.3%;
	ascent-override: 98.7%;
	descent-override: 29.9%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Hanken repli";
	src: local("Arial Bold"), local("Arial-BoldMT");
	font-weight: 600;
	size-adjust: 96%;
	ascent-override: 104.2%;
	descent-override: 31.6%;
	line-gap-override: 0%;
}

:root {
	--sjd-quatre: linear-gradient(90deg, var(--wp--custom--filet--rouge) 0 25%, var(--wp--custom--filet--bleu) 0 50%, var(--wp--custom--filet--jaune) 0 75%, var(--wp--custom--filet--vert) 0); /* taste-skill-ignore : aplats francs du drapeau, aucun fondu */
	--sjd-fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='square'/%3E%3C/svg%3E");
	--sjd-focus: var(--wp--preset--color--bleu-marque);
	--sjd-filet-clair: rgb(14 26 59 / 0.14);
	--sjd-filet-sombre: rgb(245 247 250 / 0.16);
}

/* La marge haute du défilement laisse la place à l'en-tête collant. */
html {
	scroll-behavior: smooth;
	scroll-padding-block-start: var(--wp--custom--entete);
}

body {
	-webkit-font-smoothing: antialiased;
}

/* Les sections portent leur propre rythme vertical. Sur une page courte (404), le pied de page reste en bas de l'écran. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh; /* taste-skill-ignore : repli des navigateurs sans svh */
	min-height: 100svh;
}

.wp-site-blocks > * {
	margin-block: 0;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* Focus clavier : anneau bleu 2 px, version claire sur les fonds sombres. */
:focus-visible {
	outline: 2px solid var(--sjd-focus);
	outline-offset: 3px;
}

.has-encre-ocean-background-color,
.is-style-contact {
	--sjd-focus: var(--wp--custom--filet--bleu-sur-encre);
}

h1,
h2,
h3 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

/* L'équilibrage couperait « Décrivez-nous » sur son trait d'union en mobile. */
.has-titre-contact-font-size {
	text-wrap: wrap;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	text-decoration-thickness: 2px;
}

/* Lien e-mail ou téléphone seul dans son paragraphe : zone tactile de 44 px sans décaler la ligne. */
p > a:is([href^="mailto:"], [href^="tel:"]):only-child {
	display: inline-block;
	padding-block: 0.6875rem;
	margin-block: -0.6875rem;
}

.wp-block-image {
	margin-inline: 0;
}

/* Ligne des quatre : les couleurs du drapeau n'existent qu'en filet, toujours ensemble, dans l'ordre officiel. */
.wp-block-separator.is-style-ligne-des-quatre {
	width: 100%;
	max-width: none;
	height: 3px;
	border: 0;
	background: var(--sjd-quatre);
	opacity: 1;
}

/* Barre de progression du scroll, 2 px en haut d'écran : la traînée du hero continue ici. */
.sjd-progression {
	position: fixed;
	inset-block-start: var(--wp-admin--admin-bar--height, 0px);
	inset-inline: 0;
	z-index: 100001;
	height: 2px;
	pointer-events: none;
	background: var(--sjd-quatre);
	clip-path: inset(0 calc(100% - 100% * var(--sjd-avance, 0)) 0 0);
}

@supports (animation-timeline: scroll()) {
	.sjd-progression {
		animation: sjd-avance linear both;
		animation-timeline: scroll(root block);
	}
}

@keyframes sjd-avance {
	from { clip-path: inset(0 100% 0 0); }
	to { clip-path: inset(0); }
}

@keyframes sjd-entree {
	from {
		opacity: 0;
		transform: translateY(1.5rem);
	}
}

/* En-tête : hauteur fixe (le hero se glisse dessous), collé en haut de l'écran. */
header.wp-block-template-part {
	position: sticky;
	inset-block-start: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	box-sizing: border-box;
	height: var(--wp--custom--entete);
	background: var(--wp--preset--color--ecume);
	border-block-end: 1px solid var(--wp--preset--color--brume);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

header.wp-block-template-part > .wp-block-group {
	display: grid;
	align-content: center;
	height: 100%;
}

/* Les marges automatiques de la mise en page contrainte empêcheraient la ligne de s'étirer dans la grille. */
header.wp-block-template-part > .wp-block-group > * {
	width: 100%;
}

/* Page ouverte par le hero : en-tête transparent sur le ciel tant que la page n'a pas défilé (classe posée par progression.js). */
:root:not(.sjd-defile) body:has(.wp-block-post-content > .is-style-hero:first-child) header.wp-block-template-part {
	background-color: transparent;
	border-block-end-color: transparent;
}

.is-style-logo {
	margin: 0;
}

.is-style-logo a {
	display: block;
	padding-block: 0.25rem;
}

.is-style-logo img {
	display: block;
	width: auto !important;
	height: clamp(2.25rem, 1.8rem + 1.1vw, 3rem) !important;
}

footer .is-style-logo img {
	height: 2.5rem !important;
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.625rem;
	background: var(--sjd-quatre) no-repeat 0 100% / 0 2px;
	text-decoration: none;
	transition: background-size 0.45s var(--wp--custom--courbe--trace);
}

/* aria-current : section en cours de lecture, posé par progression.js. */
.wp-block-navigation .wp-block-navigation-item__content:is(:hover, :focus-visible, [aria-current]) {
	background-size: 100% 2px;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
}

/* Sous 960 px, les cinq liens ne tiennent plus sur une ligne : bouton menu, comme en mobile. */
@media (min-width: 37.5rem) and (max-width: 59.99rem) {
	header .wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none;
	}

	header .wp-block-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

/* Menu mobile plein écran : grands liens séparés de filets, ligne des quatre en pied. */
header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--30) var(--wp--custom--gouttiere) var(--wp--preset--spacing--60);
}

header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	gap: 0;
	padding-top: 4.5rem;
}

header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch;
	gap: 0;
	border-block-start: 1px solid var(--wp--preset--color--brume);
}

header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: stretch;
	border-block-end: 1px solid var(--wp--preset--color--brume);
	animation: sjd-entree 0.6s var(--wp--custom--courbe--entree) both;
}

header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: 0.05s; }
header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: 0.1s; }
header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: 0.15s; }
header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: 0.2s; }

header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.125rem;
	background: none;
	font-family: var(--wp--preset--font-family--titres);
	font-size: var(--wp--preset--font-size--titre-porte);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content::after {
	content: "";
	height: 3px;
	margin-block-start: var(--wp--preset--spacing--60);
	background: var(--sjd-quatre);
}

.sjd-langues {
	display: flex;
	align-items: center;
	font-size: var(--wp--preset--font-size--detail);
	font-weight: 600;
}

.sjd-langues span {
	color: var(--wp--preset--color--givre);
}

.sjd-langues a {
	box-sizing: border-box;
	min-inline-size: 2.75rem;
	padding: 0.625rem 0.75rem;
	background: var(--sjd-quatre) no-repeat 0.75rem 100% / 0 2px;
	color: var(--wp--preset--color--encre-ocean);
	text-align: center;
	text-decoration: none;
	transition: background-size 0.45s var(--wp--custom--courbe--trace);
}

/* Langue de la page soulignée de la ligne des quatre, comme la section en cours dans le menu ; l'autre langue au survol.
   Les deux restent en Encre : l'ardoise tombe à 2,8:1 sur le ciel du hero. */
.sjd-langues a:is(:hover, :focus-visible, [aria-current]) {
	background-size: calc(100% - 1.5rem) 2px;
}

/* Menu mobile ouvert : les deux langues en toutes lettres sous les liens. Ailleurs, le sélecteur de l'en-tête suffit. */
.wp-block-navigation__responsive-container:not(.is-menu-open) .sjd-langues {
	display: none;
}

header .is-menu-open .sjd-langues {
	margin: var(--wp--preset--spacing--40) 0 0 -0.75rem;
	font-size: var(--wp--preset--font-size--courant);
	animation: sjd-entree 0.6s var(--wp--custom--courbe--entree) 0.25s both;
}

/* Sous 960 px, le bouton menu ferme la rangée : le sélecteur le précède et ne propose que l'autre langue. */
@media (max-width: 59.99rem) {
	header .wp-block-group:has(> .sjd-langues) {
		column-gap: 0;
	}

	header .wp-block-group > .sjd-langues {
		order: 1;
		margin-inline-start: auto;
	}

	/* Enfant direct : la liste du menu ouvert porte aussi la classe wp-block-navigation. */
	header .wp-block-group > .wp-block-navigation {
		order: 2;
	}

	header .wp-block-group > .sjd-langues :is(a[aria-current], span) {
		display: none;
	}
}

/* Flèches : trait 1,75 px, terminaisons carrées. */
.is-style-porte::after,
.is-style-ligne-secteur::after,
.wp-block-button__link::after,
.is-style-lien-fleche a::after,
header .is-menu-open .wp-block-navigation-item__content::after {
	content: "";
	flex: none;
	width: 1.75rem;
	aspect-ratio: 1;
	background: currentColor;
	-webkit-mask: var(--sjd-fleche) center / contain no-repeat;
	mask: var(--sjd-fleche) center / contain no-repeat;
	transition: transform 0.35s ease;
}

:is(.is-style-porte, .is-style-ligne-secteur, .wp-block-button__link, .is-style-lien-fleche a, header .is-menu-open .wp-block-navigation-item__content):hover::after {
	transform: translateX(6px);
}

/* Lien fléché : texte 600, flèche qui avance au survol, cible de 44 px. */
.is-style-lien-fleche a {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding-block: 0.625rem;
	font-weight: 600;
}

.is-style-lien-fleche a::after {
	width: 1.25rem;
}

/* Lien étendu à toute la surface de la porte ou de la ligne. */
:is(.is-style-porte, .is-style-ligne-secteur) a {
	color: inherit;
	text-decoration: none;
}

:is(.is-style-porte, .is-style-ligne-secteur) a::after {
	content: "";
	position: absolute;
	inset: 0;
}

:is(.is-style-porte, .is-style-ligne-secteur) a:focus-visible {
	outline: 0;
}

:is(.is-style-porte, .is-style-ligne-secteur) a:focus-visible::after {
	outline: 2px solid var(--sjd-focus);
	outline-offset: -4px;
}

/*
 * Hero : la photo occupe l'écran sous l'en-tête transparent, le slogan tient dans le ciel,
 * le bandeau des portes ferme le premier écran.
 * La marge négative est en !important : le bloc garde sa marge haute à 0 dans l'éditeur.
 */
.wp-block-post-content > .is-style-hero:first-child {
	margin-block-start: calc(-1 * var(--wp--custom--entete)) !important;
}

.wp-block-group.is-style-hero {
	display: flex;
	flex-direction: column;
	min-height: 100vh; /* taste-skill-ignore : repli des navigateurs sans svh */
	min-height: 100svh;
}

.wp-block-cover.is-style-photo-hero {
	flex: 1 0 auto;
	min-height: 32rem;
	padding: calc(var(--wp--custom--entete) + 1.75rem) var(--wp--custom--gouttiere) var(--wp--preset--spacing--60);
	overflow: clip;
}

/* Voile clair derrière le texte : le contraste du titre ne dépend pas des nuages. */
.is-style-photo-hero > .wp-block-cover__background.has-background-dim {
	opacity: 1;
	background: radial-gradient(ellipse 72% 62% at 22% 24%, rgb(245 247 250 / 0.6), rgb(245 247 250 / 0) 72%); /* taste-skill-ignore : voile neutre sous le texte, sur la photo */
}

/* Le contenu positionné en haut à gauche se réduirait à la largeur du texte : il reprend la largeur du site.
   Sélecteur doublé : la règle du cœur sur has-custom-content-position est elle-même doublée. */
.wp-block-cover.is-style-photo-hero.is-style-photo-hero.has-custom-content-position .wp-block-cover__inner-container {
	width: 100%;
	color: var(--wp--preset--color--encre-ocean);
}

/*
 * Le slogan doit tenir dans le ciel, au-dessus des visages. Les têtes commencent à 41 % de la hauteur de la photo :
 * à 27,3 vw quand elle est cadrée sur la largeur, à 41 svh moins le bandeau quand elle l'est sur la hauteur.
 * On retire l'en-tête, la phrase d'intro et une marge (9,6 rem), il reste trois lignes de titre.
 */
.is-style-photo-hero h1 {
	font-size: min(var(--wp--preset--font-size--manifeste), calc((max(27.3vw, 41svh - 3.5rem) - 9.6rem) / 3)) !important;
}

.is-style-photo-hero img.wp-block-cover__image-background {
	animation: sjd-pose 2.4s var(--wp--custom--courbe--entree) both;
}

@keyframes sjd-pose {
	from { transform: scale(1.06); }
}

.is-style-photo-hero .wp-block-cover__inner-container > * {
	animation: sjd-entree 1s var(--wp--custom--courbe--entree) 0.1s both;
}

.is-style-photo-hero .wp-block-cover__inner-container > h1 {
	animation-delay: 0.2s;
}

/*
 * Très grand écran : la photo cadrée sur la largeur déborde beaucoup en bas et coupe le premier rang de visages.
 * On la remonte, sans jamais faire passer les têtes au-dessus de 26 rem (le bas du slogan) ni découvrir le bas de l'image.
 */
@media (min-width: 48rem) {
	.is-style-photo-hero img.wp-block-cover__image-background {
		object-position: 50% calc(-1 * max(0px, min(27.3vw - 26rem, 66.7vw - 100svh + 8rem))) !important;
	}
}

/* Traînée : quatre brins de 3 px et un avion, dans le ciel libre à droite du slogan. */
/* Elle s'arrête à 78 % de la largeur de l'écran, avant le drapeau de la photo, quelle que soit la largeur. */
.sjd-trainee {
	position: absolute;
	inset-block-start: 0;
	inset-inline-end: calc(22vw - var(--wp--custom--gouttiere));
	width: min(22rem, 26vw);
	pointer-events: none;
}

.sjd-trainee svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.sjd-brin {
	fill: none;
	stroke-width: 3;
}

.sjd-avion-vol path,
.sjd-avion-fixe {
	fill: var(--wp--preset--color--encre-ocean);
}

.sjd-avion-fixe {
	display: none;
}

/* Dans l'éditeur, le séparateur reste un séparateur : il affiche les quatre brins à plat. */
.wp-block-separator.is-style-trainee {
	width: min(26rem, 100%);
	max-width: none;
	height: 15px;
	border: 0;
	background: linear-gradient(var(--wp--custom--filet--rouge) 0 3px, transparent 0 4px, var(--wp--custom--filet--bleu) 0 7px, transparent 0 8px, var(--wp--custom--filet--jaune) 0 11px, transparent 0 12px, var(--wp--custom--filet--vert) 0); /* taste-skill-ignore : aperçu éditeur des quatre brins */
	opacity: 1;
}

/* Bandeau des portes, au pied du hero */
.wp-block-group.is-style-portes {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

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

.wp-block-group.is-style-porte {
	position: relative;
	gap: 1.5rem;
	padding: 1.5rem 0;
	transition: background-color 0.35s ease, padding 0.35s ease;
}

.wp-block-group.is-style-porte:is(:hover, :focus-within) {
	padding-inline: 1.5rem;
	background: var(--wp--preset--color--bleu-marque);
}

.is-style-porte .has-givre-color {
	transition: color 0.35s ease;
}

.is-style-porte:is(:hover, :focus-within) .has-givre-color {
	color: var(--wp--preset--color--ciel) !important;
}

@media (min-width: 48rem) {
	.wp-block-group.is-style-portes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wp-block-group.is-style-porte {
		padding-block: 2rem;
	}

	.is-style-porte:first-child {
		padding-inline-end: 2.5rem;
	}

	.is-style-porte + .is-style-porte {
		padding-inline-start: 2.5rem;
	}
}

/* Sous 960 px, l'en-tête n'a plus que le logo et le bouton menu : la traînée vole dans l'espace libre entre les deux.
   Elle rétrécit : les brins gardent une épaisseur lisible et se touchent en ruban. */
@media (max-width: 59.99rem) {
	.sjd-trainee {
		inset-block-start: calc(-0.6rem - var(--wp--custom--entete) - 1.75rem);
		inset-inline-end: 3.5rem;
		width: 12rem;
	}

	.sjd-brin {
		vector-effect: non-scaling-stroke;
		stroke-width: 1.75px;
	}

	/* Avec le sélecteur de langue, la traînée s'arrête avant lui. */
	body:has(.sjd-langues) .sjd-trainee {
		inset-inline-end: 6.25rem;
	}
}

/* Mobile : la photo portrait garde le groupe entier, le texte tient dans son ciel. */
@media (max-width: 47.99rem) {
	.wp-block-cover.is-style-photo-hero {
		min-height: calc(100svh - 4.5rem);
	}

	.is-style-photo-hero .wp-block-cover__inner-container > p:first-child {
		font-size: var(--wp--preset--font-size--etiquette) !important;
	}

	.is-style-photo-hero h1 {
		font-size: min(clamp(1.875rem, 4.6svh, 2.5rem), 8.9vw) !important;
	}

	.sjd-trainee {
		inset-block-start: calc(-0.75rem - var(--wp--custom--entete) - 1.75rem);
		width: 9.5rem;
	}

	body:has(.sjd-langues) .sjd-trainee {
		width: 7.5rem;
	}
}

/* Quatre piliers : un tiret aux couleurs du drapeau au-dessus de chaque mot, dans l'ordre officiel. */
.wp-block-group.is-style-piliers {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
}

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

.is-style-piliers > ::before {
	content: "";
	display: block;
	width: 2.5rem;
	height: 4px;
	margin-block-end: 1.25rem;
	background: var(--sjd-c, var(--wp--custom--filet--rouge));
}

.is-style-piliers > :nth-child(2) { --sjd-c: var(--wp--custom--filet--bleu); }
.is-style-piliers > :nth-child(3) { --sjd-c: var(--wp--custom--filet--jaune); }
.is-style-piliers > :nth-child(4) { --sjd-c: var(--wp--custom--filet--vert); }

@media (min-width: 40rem) {
	.wp-block-group.is-style-piliers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	.wp-block-group.is-style-piliers {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Index des secteurs, sur fond ciel pâle : chaque ligne est une bande Écume, la ligne survolée passe au bleu de la marque. */
.wp-block-group.is-style-index-secteurs {
	display: grid;
	gap: 4px;
}

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

.wp-block-group.is-style-ligne-secteur {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 1.375rem;
	align-items: center;
	gap: 0.25rem 1.5rem;
	padding: 1.5rem;
	background: var(--wp--preset--color--ecume);
	transition: background-color 0.35s ease, color 0.35s ease, padding 0.35s ease;
}

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

.is-style-ligne-secteur > p {
	color: var(--wp--preset--color--ardoise);
	font-size: var(--wp--preset--font-size--detail);
	transition: color 0.35s ease;
}

.is-style-ligne-secteur::after {
	width: 1.375rem;
}

.wp-block-group.is-style-ligne-secteur:is(:hover, :focus-within) {
	padding-inline-start: 2.25rem;
	background: var(--wp--preset--color--bleu-marque);
	color: var(--wp--preset--color--ecume);
}

.is-style-ligne-secteur:is(:hover, :focus-within) > p {
	color: var(--wp--preset--color--ciel);
}

@media (max-width: 47.99rem) {
	.wp-block-group.is-style-ligne-secteur {
		grid-template-areas: "nom fleche" "detail fleche";
		grid-template-columns: minmax(0, 1fr) 1.375rem;
		padding: 1.25rem;
	}

	.wp-block-group.is-style-ligne-secteur:is(:hover, :focus-within) {
		padding-inline-start: 1.25rem;
	}

	.is-style-ligne-secteur > :first-child {
		grid-area: nom;
	}

	.is-style-ligne-secteur > p {
		grid-area: detail;
	}

	.is-style-ligne-secteur::after {
		grid-area: fleche;
	}
}

/* Bandeau photo pleine largeur et son étiquette (pattern disponible, hors accueil). */
.wp-block-group.is-style-bandeau {
	position: relative;
}

.is-style-bandeau > .wp-block-image {
	margin: 0;
}

.is-style-bandeau > .wp-block-image img {
	display: block;
	width: 100%;
	height: clamp(17.5rem, 43vw, 40rem);
	object-fit: cover;
}

.wp-block-group.is-style-bandeau > .wp-block-group {
	position: absolute;
	inset-block-end: 2.25rem;
	inset-inline-start: var(--wp--custom--gouttiere);
	margin: 0;
}

/* À l'image de Maurice : un grand portrait, deux petits empilés, le texte en regard. */
.wp-block-group.is-style-mosaique {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--30);
}

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

.wp-block-group.is-style-mosaique > .wp-block-group {
	grid-column: 1 / -1;
	margin-block-end: var(--wp--preset--spacing--50);
}

.is-style-mosaique > .wp-block-image:nth-child(2) {
	grid-column: 1 / -1;
}

.is-style-mosaique > .wp-block-image img {
	display: block;
	width: 100%;
}

@media (min-width: 48rem) {
	.wp-block-group.is-style-mosaique {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--40);
	}

	/* Le grand portrait prend la hauteur des deux petits. */
	.is-style-mosaique > .wp-block-image:nth-child(2) {
		position: relative;
		grid-area: 2 / 1 / 4 / 3;
	}

	.is-style-mosaique > .wp-block-image:nth-child(2) img {
		position: absolute;
		inset: 0;
		height: 100%;
	}

	.is-style-mosaique > .wp-block-image:nth-child(3) {
		grid-area: 2 / 3;
	}

	.is-style-mosaique > .wp-block-image:nth-child(4) {
		grid-area: 3 / 3;
	}
}

/* Tablette : titre à gauche, engagement à droite, au-dessus de la mosaïque. */
@media (min-width: 48rem) and (max-width: 79.99rem) {
	.wp-block-group.is-style-mosaique > .wp-block-group {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: flex-end;
		column-gap: var(--wp--preset--spacing--60);
	}

	.wp-block-group.is-style-mosaique > .wp-block-group > * {
		flex: 1 1 0;
	}
}

/* Grand écran : colonne de texte à gauche, groupée en haut, qui suit la lecture le long des photos. */
@media (min-width: 80rem) {
	.wp-block-group.is-style-mosaique {
		grid-template-columns: minmax(0, 22rem) repeat(3, minmax(0, 1fr));
	}

	.wp-block-group.is-style-mosaique > .wp-block-group {
		grid-area: 1 / 1 / 3 / 2;
		align-self: start;
		position: sticky;
		inset-block-start: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--entete) + var(--wp--preset--spacing--50));
		margin: 0;
		padding-inline-end: var(--wp--preset--spacing--50);
	}

	.is-style-mosaique > .wp-block-image:nth-child(2) {
		grid-area: 1 / 2 / 3 / 4;
	}

	.is-style-mosaique > .wp-block-image:nth-child(3) {
		grid-area: 1 / 4;
	}

	.is-style-mosaique > .wp-block-image:nth-child(4) {
		grid-area: 2 / 4;
	}
}

/* Photos : dévoilement de haut en bas à l'entrée dans l'écran, classes posées par progression.js. */
/* overflow: clip retient la photo agrandie, sinon elle déborde la page en largeur. */
.sjd-revele {
	overflow: clip;
	clip-path: inset(0 0 100% 0);
	transition: clip-path 1.1s var(--wp--custom--courbe--trace);
}

.sjd-revele img {
	transform: scale(1.12);
	transition: transform 1.6s var(--wp--custom--courbe--entree);
}

.sjd-revele.est-visible {
	clip-path: inset(0);
}

.sjd-revele.est-visible img {
	transform: none;
}

.is-style-mosaique > .sjd-revele:nth-child(3),
.is-style-mosaique > .sjd-revele:nth-child(3) img {
	transition-delay: 0.12s;
}

.is-style-mosaique > .sjd-revele:nth-child(4),
.is-style-mosaique > .sjd-revele:nth-child(4) img {
	transition-delay: 0.24s;
}

/* Entrée des sections : classes posées par progression.js, jamais sans script, jamais en mouvement réduit. */
.sjd-entre:not(.est-visible) {
	opacity: 0;
}

.sjd-entre.est-visible {
	animation: sjd-entree 0.8s var(--wp--custom--courbe--entree) var(--sjd-delai, 0s) both;
}

/* Méthode : un segment de la ligne des quatre au-dessus de chaque étape, dessiné à l'arrivée dans l'écran. */
.wp-block-group.is-style-etapes > * {
	position: relative;
}

.is-style-etapes > ::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 3px;
	background: var(--sjd-c, var(--wp--custom--filet--rouge));
	transform-origin: 0 50%;
	transition: transform 0.9s var(--wp--custom--courbe--trace);
}

.is-style-etapes > :nth-child(2) { --sjd-c: var(--wp--custom--filet--bleu-sur-encre); }
.is-style-etapes > :nth-child(3) { --sjd-c: var(--wp--custom--filet--jaune); }
.is-style-etapes > :nth-child(4) { --sjd-c: var(--wp--custom--filet--vert); }

.is-style-etapes.sjd-attente > ::before {
	transform: scaleX(0);
}

.is-style-etapes.sjd-attente > :not(:first-child)::before {
	transition-delay: 0.18s;
}

.is-style-etapes.sjd-attente > :nth-child(3)::before { transition-delay: 0.36s; }
.is-style-etapes.sjd-attente > :nth-child(4)::before { transition-delay: 0.54s; }

.is-style-etapes.est-visible > ::before {
	transform: none;
}

/* Portrait marqué de la ligne des quatre */
.wp-block-image.is-style-signe {
	position: relative;
}

.wp-block-image.is-style-signe::before {
	content: "";
	position: absolute;
	inset-block-start: 1.75rem;
	inset-inline-start: 1.75rem;
	z-index: 1;
	width: 3rem;
	height: 3px;
	background: var(--sjd-quatre);
}

/* Bouton : il s'enfonce légèrement à l'appui, comme la porte et la ligne secteur. */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.875rem;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.wp-block-button__link:active,
.is-style-porte:active,
.is-style-ligne-secteur:active {
	transform: scale(0.985);
}

.wp-block-button__link::after {
	width: 1.25rem;
}

/* Contact sur la photo assombrie : mêmes marges que les autres sections, textes clairs, bouton qui s'inverse au survol. */
.wp-block-cover.is-style-contact {
	padding-inline: var(--wp--custom--gouttiere);
}

.wp-block-cover.is-style-contact .wp-block-cover__inner-container {
	color: var(--wp--preset--color--ecume);
}

.is-style-contact .wp-block-button__link:hover {
	background: var(--wp--preset--color--ecume);
	color: var(--wp--preset--color--encre-ocean);
}

/* Secteur choisi dans l'index : rappelé au-dessus du bouton, repris dans l'objet de l'e-mail (progression.js). */
.sjd-secteur-choisi {
	margin-block: var(--wp--preset--spacing--50) 0;
	font-weight: 600;
	color: var(--wp--preset--color--ecume);
	animation: sjd-entree 0.6s var(--wp--custom--courbe--entree) both;
}

/* Le rappel prend la place du grand écart : la rangée du bouton s'en rapproche (marge du bloc en ligne, d'où !important). */
.sjd-secteur-choisi + .wp-block-group {
	margin-block-start: var(--wp--preset--spacing--50) !important;
}

/* Pied de page sur fond Encre : liens clairs, cibles tactiles de 44 px. */
footer.wp-block-template-part a {
	display: inline-block;
	padding-block: 0.75rem;
	color: inherit;
}

footer.wp-block-template-part a:hover {
	color: var(--wp--preset--color--ecume);
}

footer.wp-block-template-part .is-style-logo a {
	padding-block: 0.25rem;
}

/* Drapeau en bloc : en ligne, il se posait au bas de sa ligne de texte, 4 px sous le centre de la raison sociale. */
footer.wp-block-template-part .wp-block-image:not(.is-style-logo) img {
	display: block;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}

	.sjd-progression {
		display: none;
	}

	/* La traînée est déjà dessinée, l'avion déjà arrivé. Une animation SMIL passe devant une règle CSS normale : !important. */
	.sjd-brin {
		stroke-dashoffset: 0 !important;
	}

	.sjd-avion-vol {
		display: none;
	}

	.sjd-avion-fixe {
		display: inline;
	}
}
