/* =============================================================================
   HERO D'ACCUEIL
   Maquette 1440 : en-tête pilule (70 px) dans la colonne gauche, visuel arrondi
   (40 px), trois cartes blanches à droite (230 × 150), carte actualité rose
   à cheval sur le bas du visuel. Fond : la section marine qui l'entoure.

   Variables pilotées par hero.js pendant le défilement épinglé :
     --k1 --k2 --k3   avancement des trois cartes (0 → 1), en escalier
     --p              avancement global (celui de la carte la plus lente)
   Et sur <body> : --split, la place laissée aux cartes (lue par l'en-tête).
   ============================================================================= */

.cci-hero {
	--cartes: clamp(12.5rem, 8rem + 7vw, 14.375rem);  /* 230 px à 1440 */
	--ecart: 1rem;
	--k1: 0;
	--k2: 0;
	--k3: 0;
	--p: 0;
	position: relative;
	color: var(--blanc);
}

/* --- Structure : épinglage (grand écran) ------------------------------------ */
.cci-hero__pin {
	position: relative;
}

/* Indice de défilement : grand écran épinglé uniquement (voir plus bas). */
.cci-hero__indice {
	display: none;
}

.cci-hero__cadre {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--cartes);
	grid-template-rows: minmax(0, 1fr) auto;
	gap: var(--ecart);
	padding: var(--pad) var(--cote, var(--pad));
}

.cci-hero__main {
	display: flex;
	flex-direction: column;
	min-height: 0;
	grid-row: 1 / -1;
	/* La place de l'en-tête du thème, posé en position fixe au-dessus. */
	padding-top: calc(var(--header-h) + 1.3rem);
}

/* --- Visuel ------------------------------------------------------------------ */
.cci-hero__visuel {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
	min-height: 30rem;
	border-radius: var(--r-xl);
	overflow: hidden;
	background: var(--marine);
}

.cci-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.cci-hero .cci-hero__img,
.cci-hero .cci-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(calc(1.07 - var(--p) * 0.07));
	transform-origin: 50% 50%;
}

.cci-hero__video {
	opacity: 0;
	transition: opacity 1.2s ease;
}

.cci-hero__video.is-playing {
	opacity: 1;
}

/* Vimeo : l'iframe 16/9 couvre le cadre comme object-fit: cover. Sans
   plafond de largeur (max-width: 100 % du thème) : sur un écran plus haut que
   le 16/9, l'iframe doit déborder sur les côtés, sinon le lecteur ajoute des
   bandes en haut et en bas où l'image de fond apparaît. */
.cci-hero__vimeo {
	overflow: hidden;
	container-type: size;
	pointer-events: none;
}

.cci-hero__vimeo iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100cqw, 177.78cqh);
	max-width: none;
	height: max(100cqh, 56.25cqw);
	max-height: none;
	border: 0;
	transform: translate(-50%, -50%);
}

/* Voile de lisibilité : dégradé de la maquette (marine opaque à gauche,
   bleu translucide à droite), plus un fond uniforme léger. Les couleurs sont
   des mélanges des tokens : aucune valeur en dur. */
.cci-hero__media::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg,
			color-mix(in srgb, var(--marine) 82%, transparent),
			color-mix(in srgb, var(--marine) 45%, transparent) 55%,
			color-mix(in srgb, var(--marine) 20%, transparent));
}

.cci-hero__contenu {
	position: relative;
	padding: clamp(1.5rem, 1rem + 2.6vw, 3.8rem);
	max-width: 52rem;
	min-width: 0; /* reste dans le visuel : le formulaire se resserre */
}

.cci-hero__titre {
	color: var(--blanc);
}

/* Chaque ligne glisse depuis sa propre fenêtre masquée. */
.cci-hero__ligne {
	display: block;
	overflow: hidden;
	padding-bottom: 0.08em;
	margin-bottom: -0.08em;
}

.cci-hero__ligne > span {
	display: block;
}

/* Bouton pause de la vidéo (posé par le script quand la vidéo démarre). */
.cci-hero__pause {
	position: absolute;
	z-index: 2;
	left: 1rem;
	bottom: 1rem;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	color: var(--blanc);
}

.cci-hero__pause-icone {
	width: 0.75rem;
	height: 0.875rem;
	border-inline: 0.25rem solid currentColor;
}

.cci-hero__pause[aria-pressed='true'] .cci-hero__pause-icone {
	width: 0;
	height: 0;
	margin-left: 0.2rem;
	border-style: solid;
	border-width: 0.4375rem 0 0.4375rem 0.75rem;
	border-color: transparent transparent transparent currentColor;
}

/* Mobile : la recherche occupe le bas du visuel, le bouton pause passe en
   haut à droite pour ne pas la chevaucher. */
@media (max-width: 63.99rem) {
	.cci-hero__pause {
		top: 0.75rem;
		right: 0.75rem;
		bottom: auto;
		left: auto;
		width: 2.25rem;
		height: 2.25rem;
	}
}

/* --- Recherche guidée -------------------------------------------------------- */
.cci-finder {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-top: clamp(1.5rem, 1rem + 1.6vw, 2.8rem);
	padding: 0.1875rem 0.1875rem 0.1875rem 0.5rem; /* pilule de 54 px, bouton de 48 */
	border-radius: var(--r-pill);
	background: var(--blanc);
	color: var(--marine);
	max-width: 100%;
}

.cci-finder__champ {
	position: relative;
	display: flex;
	flex: 0 1 auto;
	align-items: center;
	/* Le formulaire ne dépasse jamais du visuel : les champs se resserrent
	   (réponses tronquées « … ») plutôt que de pousser le bouton dehors. */
	min-width: 0;
}

/* Champ replié quand le profil choisi ne le concerne pas (diplôme visé pour
   un adulte) : la pilule se resserre en douceur. */
.cci-finder__champ {
	max-width: 22rem;
	transition: max-width 0.6s var(--ease-out), opacity 0.35s ease;
}

.cci-finder__champ.is-masque {
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
}

.cci-finder__champ + .cci-finder__champ::before {
	/* Séparateur vertical de la maquette (46 px). */
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	height: 2.875rem;
	border-left: 1px solid var(--rose);
	transform: translateY(-50%);
}

.cci-finder__select {
	appearance: none;
	height: 2.75rem;
	padding: 0 2.4rem 0 1.25rem;
	border: 0;
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--marine);
	font-size: var(--fs-base);
	font-weight: var(--fw-medium);
	cursor: pointer;
}

.cci-finder__chevron {
	position: absolute;
	right: 1rem;
	width: 1rem;
	height: 1rem;
	color: var(--rouge);
	pointer-events: none;
	transition: transform 0.4s var(--ease-out);
}

.cci-finder__go {
	position: relative;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	height: 3rem;           /* 48, comme la loupe de l'en-tête */
	min-width: 3rem;
	margin-left: 0.25rem;
	padding: 0 0.6rem;
	border: 0;
	border-radius: var(--r-pill);
	background: var(--rouge);
	color: var(--blanc);
	overflow: hidden;
	transition: background-color 0.4s ease, padding 0.6s var(--ease-out), gap 0.6s var(--ease-out);
}

.cci-finder__go:hover {
	background: var(--marine);
}

.cci-finder__loupe {
	width: 1.625rem;
	height: 1.625rem;
}

/* Le texte du bouton existe toujours (nom accessible du bouton), il n'est
   déplié qu'une fois les choix faits. */
.cci-finder__go-texte {
	max-width: 0;
	opacity: 0;
	white-space: nowrap;
	font-size: 0.9375rem;
	font-weight: var(--fw-semibold);
	transition: max-width 0.7s var(--ease-out), opacity 0.4s ease 0.15s;
}

.cci-finder.is-pret .cci-finder__go {
	gap: 0.5rem;
	padding: 0 1.1rem 0 0.8rem;
}

.cci-finder.is-pret .cci-finder__go-texte {
	max-width: 16rem;
	opacity: 1;
}

.cci-finder.is-pret .cci-finder__go::after {
	/* Reflet qui passe : le bouton invite à cliquer, sans clignoter. */
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
	translate: -120% 0;
	animation: cci-reflet 2.6s var(--ease-out) 0.5s infinite;
}

@keyframes cci-reflet {
	0% { translate: -120% 0; }
	45%, 100% { translate: 120% 0; }
}

/* Version améliorée (script) : boutons à la place des listes natives. */
.cci-finder.is-guide .cci-finder__select {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
}

.cci-finder__sel {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 0.875rem;
	height: 2.75rem;
	padding: 0 1.25rem;
	border: 0;
	border-radius: var(--r-pill);
	background: none;
	color: var(--marine);
	font-size: var(--fs-base);
	font-weight: var(--fw-medium);
	white-space: nowrap;
	min-width: 0;
	max-width: 100%;
}

.cci-finder__sel .cci-finder__chevron {
	flex-shrink: 0;
	position: static;
}

.cci-finder__sel[aria-expanded='true'] .cci-finder__chevron {
	transform: rotate(180deg);
}

.cci-finder__sel.is-choisi .cci-finder__val {
	color: var(--rouge-texte);
	font-weight: var(--fw-semibold);
}

.cci-finder__val {
	display: inline-block;
	min-width: 0;
	max-width: 11rem;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: transform 0.45s var(--ease-out), opacity 0.3s ease;
}

.cci-finder__val.is-sortant {
	transform: translateY(-110%);
	opacity: 0;
}

.cci-finder__val.is-entrant {
	transform: translateY(110%);
	opacity: 0;
	transition: none;
}

/* Pastille rose qui glisse sous l'étape ouverte. */
.cci-finder__surligne {
	position: absolute;
	z-index: 0;
	top: 0.375rem;
	bottom: 0.375rem;
	left: 0;
	width: 0;
	border-radius: var(--r-pill);
	background: var(--rose);
	opacity: 0;
	transition: transform 0.55s var(--ease-out), width 0.55s var(--ease-out), opacity 0.3s ease;
}

/* Panneau des réponses (ajouté au <body> par le script). */
.cci-finder-voile {
	position: fixed;
	inset: 0;
	z-index: 140;
	/* Posé DANS la zone épinglée du hero : l'en-tête du site reste net
	   au-dessus, seul le hero se floute derrière la question posée. */
	background: color-mix(in srgb, var(--marine) 55%, transparent);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.45s ease;
}

.cci-finder-voile.is-ouvert {
	opacity: 1;
	pointer-events: auto;
}

/* ⚠️ PAS D'`isolation` NI DE z-index SUR LE VISUEL ET LE CONTENU : le
   formulaire doit pouvoir passer AU-DESSUS du voile (posé dans la même zone
   épinglée), et un contexte d'empilement intermédiaire l'en empêcherait. */
/* Le titre reste net au-dessus du voile pendant la recherche. */
.cci-hero.is-recherche .cci-hero__titre {
	position: relative;
	z-index: 150;
}

.cci-hero.is-recherche .cci-finder {
	z-index: 150;
	box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.3);
}

.cci-finder-panneau {
	position: fixed;
	z-index: 160;
	left: 0;
	top: 0;
	width: min(29rem, calc(100vw - 1.5rem));
	padding: 1.25rem 1.375rem 1rem;
	border-radius: var(--r-lg);
	background: var(--blanc);
	color: var(--marine);
	box-shadow: 0 1.875rem 5rem rgba(0, 0, 0, 0.3);
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
	scale: 0.94;
	translate: 0 -0.5rem;
	pointer-events: none;
	transition: opacity 0.35s ease, scale 0.5s var(--ease-out), translate 0.5s var(--ease-out), left 0.6s var(--ease-out), top 0.6s var(--ease-out);
}

.cci-finder-panneau.is-ouvert {
	opacity: 1;
	scale: 1;
	translate: 0 0;
	pointer-events: auto;
}

.cci-finder-panneau__etapes {
	display: flex;
	gap: 0.375rem;
	margin-bottom: 1rem;
}

.cci-finder-panneau__etapes i {
	position: relative;
	flex: 1;
	height: 4px;
	border-radius: 4px;
	background: var(--creme);
	overflow: hidden;
}

.cci-finder-panneau__etapes i::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--rouge);
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform 0.6s var(--ease-out);
}

.cci-finder-panneau__etapes i.on::after {
	transform: scaleX(1);
}

.cci-finder-panneau__num {
	margin-bottom: 0.25rem;
	color: var(--rouge-texte);
	font-size: 0.8125rem;
	font-weight: var(--fw-semibold);
}

.cci-finder-panneau__question {
	margin-bottom: 1rem;
	font-size: var(--fs-lg);
	font-weight: var(--fw-semibold);
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.cci-finder-panneau__options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cci-finder-panneau__opt {
	padding: 0.625rem 1rem;
	border: 1.5px solid var(--rose);
	border-radius: var(--r-pill);
	background: var(--blanc);
	color: var(--marine);
	font-size: 0.9375rem;
	font-weight: var(--fw-medium);
	opacity: 0;
	translate: 0 0.75rem;
	animation: cci-opt 0.5s var(--ease-out) forwards;
	animation-delay: calc(var(--k) * 45ms + 80ms);
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cci-finder-panneau__opt:hover {
	background: var(--rose);
}

.cci-finder-panneau__opt[aria-pressed='true'] {
	border-color: var(--rouge);
	background: var(--rouge);
	color: var(--blanc);
}

@keyframes cci-opt {
	to {
		opacity: 1;
		translate: 0 0;
	}
}

.cci-finder-panneau__pied {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.125rem;
	padding-top: 0.875rem;
	border-top: 1px solid var(--creme);
	font-size: 0.875rem;
}

.cci-finder-panneau__pied button {
	padding: 0.25rem 0.125rem;
	border: 0;
	background: none;
	color: var(--rouge-texte);
	font-weight: var(--fw-semibold);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* --- Cartes d'accès ---------------------------------------------------------- */
.cci-hero__acces {
	display: flex;
	flex-direction: column;
	gap: var(--ecart);
	min-height: 0;
}

.cci-hero__carte {
	--k: var(--k1);
	position: relative;
	flex: 1;
	display: flex;
	align-items: flex-end;
	min-height: 7.5rem;
	padding: 1.25rem 1.5rem 1.4rem 1.75rem;
	border-radius: var(--r-lg);
	background: var(--blanc);
	color: var(--marine);
	text-decoration: none;
	transform: translateX(calc(var(--k) * (var(--cartes) + var(--ecart) + var(--pad) + (100vw - var(--vue, 100vw)) / 2 + 1.25rem)));
}

.cci-hero__carte:nth-child(2) { --k: var(--k2); }
.cci-hero__carte:nth-child(3) { --k: var(--k3); }

.cci-hero__carte-label {
	max-width: 8em;
	font-size: var(--fs-lg);
	font-weight: var(--fw-semibold);
	line-height: 1.2;
}

.cci-hero__carte .pastille {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
}

.cci-hero__carte:hover .pastille,
.cci-hero__carte:focus-visible .pastille {
	background: var(--rouge);
	color: var(--blanc);
	transform: rotate(45deg);
}

/* Coin de l'encoche (grand écran seulement, voir plus bas). */
.cci-hero__actu-coin {
	display: none;
}

@media (min-width: 64rem) {
	.cci-hero__actu-coin {
		display: block;
	}
}

/* --- Carte actualité --------------------------------------------------------
   À cheval sur le visuel. L'anneau de la couleur du fond (box-shadow) dessine
   l'encoche de la maquette : le visuel semble découpé autour de la carte. */
.cci-hero__actu {
	--k: var(--k3);
	position: relative;
	grid-column: 2;
	grid-row: 2;
	justify-self: end;
	display: flex;
	align-items: stretch;
	gap: 1rem;
	width: min(32.2rem, 38vw);
	min-height: 9.375rem;
	padding: 0.5rem;
	border-radius: var(--r-lg);
	background: var(--rose);
	color: var(--marine);
	box-shadow: 0 0 0 var(--ecart) var(--bg);
	transform: translateX(calc(var(--k) * (100% + var(--pad) + (100vw - var(--vue, 100vw)) / 2 + 2rem)));
}

.cci-hero__actu-texte {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	flex: 1;
	padding: 0.5rem 0.25rem 0.5rem 1.25rem;
}

.cci-hero__actu-tag {
	padding: 0.0625rem 0.6875rem;
	border-radius: var(--r-pill);
	background: var(--rouge);   /* blanc sur rouge : 4,8:1, conforme AA */
	color: var(--blanc);
	font-size: var(--fs-xs);
	font-weight: var(--fw-medium);
}

.cci-hero__actu-titre {
	margin-top: auto;
	font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
	font-weight: var(--fw-semibold);
	line-height: 1.2;
}

.cci-hero .cci-hero__actu-lien {
	color: inherit;
	font-size: var(--fs-xs);
	font-weight: var(--fw-medium);
	/* Écrit explicitement : Elementor retire le soulignement des liens. */
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Toute la carte est cliquable (un seul lien, étendu). */
.cci-hero__actu-lien::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.cci-hero .cci-hero__actu-img {
	width: 43%;
	max-width: 13.9rem;
	object-fit: cover;
	border-radius: var(--r-md);
}

/* --- Arrivée (après le voile d'accueil) -------------------------------------
   `.cci-avant-intro` est posé par le voile et retiré quand le rideau se lève :
   les transitions ci-dessous jouent alors. Sans voile, rien n'est masqué. */
.cci-hero__visuel {
	transition: opacity 0.9s ease, scale 2.2s var(--ease-out);
}

.cci-hero__ligne > span {
	transition: translate 1.1s var(--ease-out) calc(0.35s + var(--i, 0) * 0.09s);
}

.cci-finder {
	transition: translate 0.9s var(--ease-out) 0.75s, opacity 0.7s ease 0.75s, box-shadow 0.5s ease, transform 0.6s var(--ease-out);
}

.cci-hero__carte,
.cci-hero__actu {
	transition: translate 1.1s var(--ease-out) calc(0.3s + var(--i, 3) * 0.1s), opacity 0.8s ease calc(0.3s + var(--i, 3) * 0.1s);
}

.cci-avant-intro .cci-hero__visuel {
	opacity: 0;
	scale: 1.06;
}

.cci-avant-intro .cci-hero__ligne > span {
	translate: 0 108%;
}

.cci-avant-intro .cci-finder {
	translate: 0 1rem;
	opacity: 0;
}

.cci-avant-intro .cci-hero__carte,
.cci-avant-intro .cci-hero__actu {
	translate: 3rem 0;
	opacity: 0;
}

/* --- Grand écran : épinglage et proportions de la maquette ----------------
   Tout le hero est dimensionné en « pixels maquette » : --u vaut 1 px à
   1440 px de large et suit la largeur de l'écran (bornée), si bien que la
   composition reste celle de Figma quel que soit l'écran : cartes 229 × 150,
   écart 14, H1 80, carte actu 600 × 210 (agrandie à la demande de Beekom).
   Hauteur : 85 % de l'écran, bornée (voir --hero-h). */
@media (min-width: 64rem) {
	body.has-cci-hero {
		/* Jamais plus grand que la maquette. Sur les écrans larges mais bas
		   (portable 13 pouces : 1470 × 830 utiles), l'unité suit aussi la
		   hauteur : toute la composition (titre, cartes, actualité) se réduit
		   au lieu de se tasser. Référence : 1000 px de haut utiles. */
		--u: min(clamp(0.8px, 100vw / 1440, 1px), clamp(0.72px, (100svh - var(--wp-admin--admin-bar--height, 0px)) / 1000, 1px));
		--split: calc(229 * var(--u) + 14 * var(--u));
	}

	.cci-hero {
		--cartes: calc(229 * var(--u));
		--ecart: calc(14 * var(--u));
		--carte-h: calc(150 * var(--u));
		--actu-h: calc(210 * var(--u));
		--actu-ecart: calc(21 * var(--u));
		/* 85 % de l'écran (demande Beekom), jamais moins que la composition de
		   la maquette, jamais plus que l'écran. Les cartes d'accès se
		   partagent la hauteur restante au-dessus de l'actu. */
		--hero-h: min(100svh, max(36rem, 85svh, calc(var(--carte-h) * 3 + var(--ecart) * 2 + var(--actu-ecart) + var(--actu-h) + var(--pad) * 2)));
	}

	.cci-hero__cadre {
		grid-template-rows: minmax(0, 1fr) var(--actu-h);
		row-gap: var(--actu-ecart);
		height: var(--hero-h);
	}

	.cci-hero__main {
		/* Pendant l'épinglage, la colonne gagne la place des cartes. */
		grid-column: 1 / -1;
		margin-right: calc((var(--cartes) + var(--ecart)) * (1 - var(--k3)));
		padding-top: calc(var(--header-h) + 22 * var(--u));
	}

	.cci-hero__visuel {
		min-height: 0;
	}

	.cci-hero__contenu {
		max-width: none;
		padding: calc(40 * var(--u)) calc(62 * var(--u));
		/* --cci-degage : remontée pour ne pas croiser la carte actualité
		   (script). Le contenu est centré verticalement dans le visuel : la
		   marge basse compte double pour remonter de --cci-degage. */
		padding-bottom: calc(40 * var(--u) + 2 * var(--cci-degage, 0px));
	}

	.cci-hero .titre--hero {
		font-size: calc(80 * var(--u) * var(--cci-titre-echelle, 1));
		line-height: 0.98;
	}

	/* Une ligne saisie = une ligne affichée, comme sur la maquette. */
	.cci-hero__ligne {
		white-space: nowrap;
	}

	.cci-hero__acces {
		grid-column: 2;
		grid-row: 1;
	}

	.cci-hero__carte {
		min-height: 0;
		padding: calc(20 * var(--u)) calc(24 * var(--u)) calc(24 * var(--u)) calc(28 * var(--u));
	}

	.cci-hero__carte-label {
		max-width: 6em; /* « Je trouve / ma voie », « Pré- / inscription » */
		font-size: max(1.125rem, calc(24 * var(--u)));
	}

	.cci-finder {
		margin-top: calc(56 * var(--u));
	}

	/* La carte actualité reste en place pendant tout le défilement épinglé :
	   seules les trois cartes d'accès s'en vont. */
	.cci-hero__actu {
		width: calc(600 * var(--u));
		min-height: 0;
		height: var(--actu-h);
		box-shadow: 0 0 0 var(--actu-ecart) var(--bg);
		transform: none;
	}

	/* Encoche de la maquette : l'anneau marine (box-shadow) découpe le
	   visuel autour de la carte, et les deux angles du visuel qui bordent
	   l'encoche sont arrondis comme ses autres angles. Chaque angle est un
	   carré marine percé d'un quart de cercle transparent, posé à la jonction :
	     ::before — au-dessus de l'encoche, contre le bord droit du visuel
	                (qui se décale quand les cartes s'en vont : --k3) ;
	     ::after  — à gauche de l'encoche, contre le bas du visuel. */
	.cci-hero__actu::before,
	.cci-hero__actu::after {
		content: '';
		position: absolute;
		width: var(--r-xl);
		height: var(--r-xl);
		background: radial-gradient(circle at 0 0, transparent calc(var(--r-xl) - 0.5px), var(--bg) var(--r-xl));
		pointer-events: none;
	}

	.cci-hero__actu::before {
		bottom: calc(100% + var(--actu-ecart));
		right: calc((var(--cartes) + var(--ecart)) * (1 - var(--k3)));
	}

	/* Le pseudo de gauche couvre aussi la bande de l'anneau : l'anneau
	   (box-shadow) arrondit son angle bas-gauche et laissait voir un coin
	   de photo entre lui et le bas du visuel. */
	.cci-hero__actu::after {
		bottom: 0;
		left: calc(-1 * var(--actu-ecart) - var(--r-xl));
		width: calc(var(--r-xl) + var(--actu-ecart));
		background:
			radial-gradient(circle at 0 0, transparent calc(var(--r-xl) - 0.5px), var(--bg) var(--r-xl)) 0 0 / var(--r-xl) 100% no-repeat,
			linear-gradient(var(--bg), var(--bg)) 100% 0 / var(--actu-ecart) 100% no-repeat;
	}

	/* Angle haut-droit : l'anneau (box-shadow) s'arrondit et laissait voir un
	   coin de vidéo une fois le visuel élargi jusqu'au bord. Ce carré marine,
	   percé du quart de cercle de la carte, rend l'angle extérieur droit. */
	.cci-hero__actu-coin {
		position: absolute;
		top: calc(-1 * var(--actu-ecart));
		right: calc(-1 * var(--actu-ecart));
		width: calc(var(--r-lg) + var(--actu-ecart));
		height: calc(var(--r-lg) + var(--actu-ecart));
		background: radial-gradient(circle at 0 100%, transparent calc(var(--r-lg) - 0.5px), var(--bg) var(--r-lg));
		pointer-events: none;
	}

	.cci-hero__actu-texte {
		padding: calc(10 * var(--u)) calc(8 * var(--u)) calc(14 * var(--u)) calc(24 * var(--u));
	}

	/* Étiquette, titre et lien groupés et centrés verticalement : avec la
	   carte agrandie, le titre poussé en bas laissait un grand vide dessous
	   l'étiquette. */
	.cci-hero__actu-texte {
		justify-content: center;
		gap: calc(12 * var(--u));
	}

	.cci-hero__actu-titre {
		margin-top: calc(4 * var(--u));
		font-size: max(1.0625rem, calc(21 * var(--u))); /* 2 lignes sur grand écran */
	}

	.cci-hero .cci-hero__actu-img {
		width: 46%;
		max-width: none;
	}

	/* Épinglé, le cadre (85 %) est posé en haut d'un écran entier : la bande
	   restante accueille l'indice de défilement. */
	/* La bande de l'indice n'existe que PENDANT l'épinglage : la marge
	   négative fait remonter la suite de la page (le texte révélé) d'autant ;
	   hero.js la maintient dans la bande et l'y fait apparaître en fondu à la
	   place de l'indice. Pas de grand vide marine une fois le hero passé. */
	.cci-hero--epingle {
		--pin-h: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
		height: calc(max(var(--pin-h), var(--hero-h)) + var(--hero-longueur) * 100svh);
		margin-bottom: calc(var(--hero-h) - max(var(--pin-h), var(--hero-h)));
	}

	.cci-hero--epingle .cci-hero__pin {
		height: max(var(--pin-h), var(--hero-h));
	}

	/* Centré dans la bande sous le hero. */
	.cci-hero__indice {
		position: absolute;
		left: 50%;
		top: calc(var(--hero-h) + (max(var(--pin-h), var(--hero-h)) - var(--hero-h)) / 2);
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0.625rem;
		color: var(--blanc);
		font-size: var(--fs-xs);
		font-weight: var(--fw-medium);
		letter-spacing: 0.08em;
		text-transform: uppercase;
		white-space: nowrap;
		/* Reste affiché pendant toute la sortie des cartes et s'efface sur la
		   fin, pendant que le texte apparaît à sa place (hero.js). */
		opacity: var(--fondu, 1); /* posé par hero.js : relais avec le texte */
		transform: translate(-50%, -50%);
		pointer-events: none;
	}

	/* Bande trop étroite : pas d'indice. */
	@media (min-aspect-ratio: 21 / 9) {
		.cci-hero__indice {
			display: none;
		}
	}

	/* Trait vertical : une goutte de lumière y descend en boucle, vers le
	   bas, dans le sens du défilement. */
	.cci-hero__indice-trait {
		position: relative;
		width: 2px;
		height: 2.75rem;
		overflow: hidden;
		border-radius: 1px;
		background: color-mix(in srgb, var(--blanc) 25%, transparent);
	}

	.cci-hero__indice-trait::after {
		content: '';
		position: absolute;
		inset: 0;
		background: linear-gradient(transparent, var(--blanc));
		animation: cci-indice 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
	}

	@keyframes cci-indice {
		0% { transform: translateY(-100%); }
		60%, 100% { transform: translateY(100%); }
	}

	/* Apparition discrète, une fois la page arrivée. */
	@keyframes cci-indice-entree {
		from { opacity: 0; }
	}

	.cci-hero__indice {
		animation: cci-indice-entree 0.8s ease 1.6s backwards;
	}

	.cci-avant-intro .cci-hero__indice {
		animation-play-state: paused;
	}

	/* ⚠️ Épinglé SOUS la barre d'administration WordPress quand elle est là
	   (connecté) : épinglé à 0, le hero remontait de 32 px au premier coup de
	   molette et passait sous le menu, qui, lui, reste fixe. */
	.cci-hero--epingle .cci-hero__pin {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		overflow: clip;
	}
}

/* --- Tablette et mobile ------------------------------------------------------ */
@media (max-width: 63.99rem) {
	.cci-hero__cadre {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-rows: auto;
		gap: 0.625rem;
		padding: 0.625rem;
	}

	.cci-hero__main {
		grid-column: 1 / -1;
		grid-row: auto;
		padding-top: calc(var(--header-h) + 1.25rem);
	}

	.cci-hero__visuel {
		min-height: min(70svh, 36rem);
		align-items: flex-end;
	}

	.cci-hero__acces {
		display: contents;
	}

	.cci-hero__carte {
		min-height: 7rem;
		padding: 0.875rem;
		transform: none;
	}

	.cci-hero__carte-label {
		font-size: 1rem;
	}

	.cci-hero__carte .pastille {
		width: 2.25rem;
		height: 2.25rem;
	}

	.cci-hero__actu {
		grid-column: 1 / -1;
		grid-row: auto;
		width: auto;
		justify-self: stretch;
		box-shadow: none;
		transform: none;
	}

	.cci-finder {
		flex-wrap: wrap;
		border-radius: var(--r-lg);
		padding: 0.375rem;
		width: 100%;
	}

	.cci-finder__champ,
	.cci-finder__sel {
		flex: 1 1 auto;
	}

	.cci-finder__surligne {
		display: none;
	}

	.cci-finder__go {
		flex: 1 0 100%;
		margin: 0.25rem 0 0;
		height: 2.75rem;
	}

	.cci-finder__go-texte {
		max-width: 16rem;
		opacity: 1;
	}

	.cci-finder__go {
		gap: 0.5rem;
	}

	.cci-finder-panneau {
		left: 0.75rem !important;
		right: 0.75rem;
		top: auto !important;
		bottom: 0.75rem;
		width: auto;
		translate: 0 1.5rem;
	}
}

@media (max-width: 40rem) {
	.cci-hero__carte {
		min-height: 6rem;
		padding: 0.75rem 0.625rem 0.75rem 0.75rem;
		border-radius: var(--r-md);
	}

	.cci-hero__carte-label {
		font-size: 0.875rem;
		line-height: 1.15;
	}

	.cci-hero__carte .pastille {
		top: 0.375rem;
		right: 0.375rem;
		width: 1.875rem;
		height: 1.875rem;
	}

	.cci-finder__champ::before {
		display: none;
	}

	.cci-hero .cci-hero__actu-img {
		width: 34%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cci-finder.is-pret .cci-finder__go::after,
	.cci-hero__indice-trait::after {
		animation: none;
	}
}

/* Grand écran : la recherche guidée est l'action principale de la page.
   Mise en avant par la LONGUEUR plutôt que la hauteur (retour Beekom) :
   pilule de 62 px, texte 18 px, et la barre s'étire sur ~820 px maquette ;
   chaque champ prend une part égale, libellé à gauche, chevron à droite. */
@media (min-width: 64rem) {
	.cci-finder {
		display: flex;
		/* Longueur minimale de la maquette ; la barre peut s'allonger quand
		   le bouton « Voir les formations » se déplie, au lieu d'écraser
		   les choix (« Langues étrang… »). */
		width: auto;
		min-width: min(100%, calc(820 * var(--u)));
		max-width: 100%;
		padding: 0.25rem 0.25rem 0.25rem 0.5rem;
		box-shadow: 0 1.25rem 3rem rgba(9, 22, 38, 0.28);
	}

	/* Le profil a les réponses les plus longues : un peu plus de place. */
	.cci-finder__champ {
		flex: 1 1 auto;
		min-width: 0;
		max-width: 26rem;
	}

	.cci-finder__champ:first-of-type {
		flex-grow: 1.3;
	}

	.cci-finder__champ.is-masque {
		flex-grow: 0;
	}

	.cci-finder__sel {
		display: flex;
		justify-content: space-between;
		width: 100%;
		height: 3.25rem;
		gap: 0.75rem;
		padding: 0 1.5rem;
		font-size: 1.125rem;
	}

	/* Le choix prend toute la place du champ (plus de coupure à 14rem). */
	.cci-finder__val {
		flex: 0 1 auto;
		min-width: 0;
		max-width: 16rem;
	}

	.cci-finder__sel .cci-finder__chevron {
		flex: none;
	}

	.cci-finder__chevron {
		width: 1.0625rem;
		height: 1.0625rem;
	}

	.cci-finder__champ + .cci-finder__champ::before {
		height: 2.25rem;
	}

	.cci-finder__go {
		flex: none;
		height: 3.375rem;
		min-width: 3.375rem;
		margin-left: 0.375rem;
	}

	.cci-finder .cci-finder__loupe {
		width: 1.625rem;
		height: 1.625rem;
	}

	.cci-finder.is-pret .cci-finder__go {
		padding: 0 1.25rem 0 1rem;
		font-size: 1rem;
	}
}

/* --- Recherche guidée, version allégée (retour client) -----------------------
   Une simple liste sous le champ : une réponse par ligne, coche sur la
   réponse choisie, la question en petit intitulé. Plus d'étapes ni de
   « Passer cette étape » ; voile léger, sans flou. */
/* Voile : le même que la fenêtre de recherche de l'en-tête (marine 50 %,
   flou 4 px), pour que les deux recherches se ressemblent (retour Beekom). */
.cci-finder-voile {
	background: rgba(14, 33, 51, 0.5);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.cci-finder-panneau {
	width: min(21rem, calc(100vw - 1.5rem));
	padding: 0.5rem;
	border-radius: var(--r-md);
	box-shadow: 0 1.25rem 3.5rem rgba(9, 22, 38, 0.28);
}

.cci-finder-panneau__etapes,
.cci-finder-panneau__num,
.cci-finder-panneau__pied {
	display: none;
}

/* La question en petit intitulé, posé sur un filet : il « coiffe » la
   liste au lieu de flotter au-dessus. Même retrait que les réponses. */
.cci-finder-panneau__question {
	margin: 0 1rem 0.25rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid color-mix(in srgb, var(--marine) 10%, transparent);
	color: var(--rouge-texte);
	font-size: 0.75rem;
	font-weight: var(--fw-semibold);
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.cci-finder-panneau:focus {
	outline: none;
}

.cci-finder-panneau__options {
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 0;
}

.cci-finder-panneau__options li {
	position: relative;
}

/* Filets fins entre les réponses : la liste a une structure, les lignes
   ne flottent plus dans le blanc. Masqués autour de la ligne survolée. */
.cci-finder-panneau__options li + li::before {
	content: '';
	position: absolute;
	left: 1rem;
	right: 1rem;
	top: 0;
	height: 1px;
	background: color-mix(in srgb, var(--marine) 8%, transparent);
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.cci-finder-panneau__options li:hover::before,
.cci-finder-panneau__options li:hover + li::before,
.cci-finder-panneau__options li:has(> [aria-pressed='true'])::before,
.cci-finder-panneau__options li:has(> [aria-pressed='true']) + li::before {
	opacity: 0;
}

.cci-finder-panneau__opt {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: 0.75rem;
	background: transparent;
	font-size: 1rem;
	line-height: 1.3;
	text-align: left;
	translate: 0 0.375rem;
	animation-delay: calc(var(--k) * 30ms + 40ms);
	transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.3s var(--ease-out);
}

/* Survol : rose pâle, texte rouge, la réponse glisse légèrement. */
.cci-finder-panneau__opt:hover,
.cci-finder-panneau__opt:focus-visible {
	padding-left: 1.25rem;
	background: color-mix(in srgb, var(--rose) 45%, var(--blanc));
	color: var(--rouge-texte);
}

/* Clavier : anneau rose fin à l'intérieur, plutôt que le contour sombre. */
.cci-finder-panneau__opt:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px var(--rouge);
}

.cci-finder-panneau__opt[aria-pressed='true'] {
	background: var(--rose);
	color: var(--rouge-texte);
}

.cci-finder-panneau__coche {
	flex: none;
	width: 1rem;
	height: 1rem;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.2s ease, transform 0.3s var(--ease-out);
}

.cci-finder-panneau__opt[aria-pressed='true'] .cci-finder-panneau__coche {
	opacity: 1;
	transform: none;
}

.cci-finder.is-souris .cci-finder__sel:focus-visible,
.cci-finder.is-souris .cci-finder__go:focus-visible {
	outline: none;
	box-shadow: none;
}

/* Champ suivant à remplir : halo rose qui respire deux fois. */
@keyframes cci-suivant {
	0%, 100% { box-shadow: 0 0 0 0 rgba(229, 0, 67, 0); }
	50% { box-shadow: 0 0 0 0.375rem rgba(229, 0, 67, 0.18); }
}

.cci-finder__sel.is-suivant {
	animation: cci-suivant 1.2s ease-in-out 2;
}

@media (min-width: 64rem) {
	/* Assez large pour que les réponses tiennent sur une ligne. */
	.cci-finder-panneau {
		width: 25rem;
	}

	.cci-finder-panneau__opt {
		font-size: 1.0625rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cci-finder__sel.is-suivant {
		animation: none;
	}
}

/* Bandeau d'accès (bas d'écran) : feuille partagée shared/bandeau.css
   (dépendance du widget), aussi utilisée sur toutes les pages du site. */

/* Peu de place sous le champ : réponses sur deux colonnes (moins haut). */
.cci-finder-panneau.is-colonnes {
	/* Assez large pour que chaque réponse tienne sur une ligne (« Collégien,
	   lycéen, étudiant ou alternant ») ; peut dépasser la barre de recherche. */
	width: max-content;
	min-width: min(34rem, calc(100vw - 1.5rem));
	max-width: min(56rem, calc(100vw - 1.5rem));
}

.cci-finder-panneau.is-colonnes .cci-finder-panneau__options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, auto));
	column-gap: 1.5rem;
}

.cci-finder-panneau.is-colonnes .cci-finder-panneau__options li:nth-child(2)::before {
	opacity: 0;
}

/* Recherche ouverte avec peu de place dessous : le titre et le formulaire
   remontent ensemble pour laisser la liste s'ouvrir sous le champ.
   ⚠️ `transform` (et pas `translate`, déjà pris par l'apparition du
   formulaire), et sur le titre et le formulaire eux-mêmes, pas sur leur
   conteneur : un contexte d'empilement sur le conteneur les ferait passer
   sous le voile. */
.cci-hero__titre,
.cci-hero .cci-finder {
	transform: translateY(calc(var(--cci-remonte, 0px) * -1));
}

.cci-hero__titre {
	transition: transform 0.6s var(--ease-out);
}

/* --- Mobile et tablette : en-tête resserré (retour du 4 nov.) ----------------
   · titre en 3 lignes, sur toute la largeur du visuel (taille calée sur la
     plus longue ligne, « Trouvez la formation ») ;
   · les trois choix l'un sous l'autre, en lignes pleine largeur ;
   · les réponses s'ouvrent dans une feuille qui monte du bas de l'écran
     (poignée, question en titre, grandes lignes faciles à toucher, page
     figée derrière). */
@media (max-width: 63.99rem) {
	.cci-hero__contenu {
		width: 100%;
		max-width: none;
		padding: 1.25rem;
	}

	.cci-hero .cci-hero__titre {
		font-size: clamp(1.625rem, 8.7vw, 2.75rem);
		line-height: 1.04;
		letter-spacing: -0.025em;
	}

	.cci-hero .cci-finder {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		margin-top: 1.25rem;
		padding: 0.375rem;
	}

	.cci-hero .cci-finder__champ {
		flex: none;
		max-width: none;
	}

	.cci-hero .cci-finder__champ.is-masque {
		max-height: 0;
	}

	.cci-hero .cci-finder__champ + .cci-finder__champ::before {
		display: block;
		left: 1rem;
		right: 1rem;
		top: 0;
		height: 0;
		border-left: 0;
		border-top: 1px solid color-mix(in srgb, var(--marine) 10%, transparent);
		transform: none;
	}

	.cci-hero .cci-finder__sel {
		justify-content: space-between;
		width: 100%;
		height: 3rem;
		padding: 0 1rem;
	}

	.cci-hero .cci-finder__val {
		max-width: none;
	}

	.cci-hero .cci-finder__go {
		flex: none;
		margin: 0.375rem 0 0;
		height: 3rem;
	}

	/* Feuille du bas. */
	.cci-finder-panneau {
		left: 0 !important;
		right: 0;
		top: auto !important;
		bottom: 0;
		width: auto;
		max-height: min(80svh, 34rem) !important;
		padding: 1.75rem 0.75rem calc(1rem + env(safe-area-inset-bottom, 0px));
		border-radius: var(--r-lg) var(--r-lg) 0 0;
		box-shadow: 0 -0.75rem 3rem rgba(9, 22, 38, 0.3);
		opacity: 1;
		scale: 1;
		translate: 0 105%;
		transition: translate 0.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.5s;
		visibility: hidden;
	}

	.cci-finder-panneau.is-ouvert {
		translate: 0 0;
		visibility: visible;
		transition: translate 0.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
	}

	/* Poignée. */
	.cci-finder-panneau::before {
		content: '';
		position: absolute;
		top: 0.625rem;
		left: 50%;
		width: 2.5rem;
		height: 0.25rem;
		border-radius: 1rem;
		background: color-mix(in srgb, var(--marine) 18%, transparent);
		translate: -50% 0;
	}

	.cci-finder-panneau__question {
		margin: 0 1rem 0.5rem;
		padding: 0 2.5rem 0.75rem 0;
		color: var(--marine);
		font-size: 1.125rem;
		letter-spacing: -0.01em;
		text-transform: none;
	}

	.cci-finder-panneau__opt {
		min-height: 3.25rem;
		padding: 0.875rem 1rem;
		font-size: 1.0625rem;
	}

	.cci-finder-panneau__opt:hover,
	.cci-finder-panneau__opt:focus-visible {
		padding-left: 1rem;
	}

	/* Une seule colonne dans la feuille : elle défile si besoin. */
	.cci-finder-panneau.is-colonnes .cci-finder-panneau__options {
		display: flex;
		grid-template-columns: none;
	}

	.cci-finder-panneau .cci-finder-panneau__fermer {
		display: grid;
	}
}

/* Bouton de fermeture de la feuille (mobile seulement). */
.cci-finder-panneau__fermer {
	position: absolute;
	top: 1.25rem;
	right: 1rem;
	display: none;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--creme);
	color: var(--marine);
	font-size: 1.25rem;
	line-height: 1;
}

/* Page figée derrière la feuille ouverte. */
html.cci-feuille-ouverte,
html.cci-feuille-ouverte body {
	overflow: hidden;
}

@media (max-width: 63.99rem) and (prefers-reduced-motion: reduce) {
	.cci-finder-panneau,
	.cci-finder-panneau.is-ouvert {
		transition: none;
	}
}

/* Écrans d'ordinateur peu hauts (portables 13-14 pouces) : l'en-tête prend
   toute la hauteur utile, moins la bande de l'indice « Faites défiler », pour
   aérer la composition réduite (voir --u). Bloc autonome, en fin de fichier,
   pour primer sur la hauteur par défaut. */
@media (min-width: 64rem) and (max-height: 62rem) {
	.cci-hero {
		--hero-h: max(36rem, calc(100svh - var(--wp-admin--admin-bar--height, 0px) - 4.75rem));
	}
}
