/*
 * Formulaire d'inscription : sa progression, ses étapes et ses champs.
 * Chargée par Blocs Creator sur les pages qui portent le bloc, et dans
 * l'éditeur. Même dessin que le formulaire de contact (formulaire-contact.css) :
 * une carte crème, des champs blancs, l'orange au focus.
 *
 * L'éditeur sur mesure du formulaire a sa propre feuille, en plus de
 * celle-ci : assets/css/editeur-inscription.css.
 */

.kahel-inscription-section {
	padding-top: 0;
	padding-bottom: clamp(56px, 7vw, 96px);
}

/*
 * En tête de page, le formulaire se lit comme la suite du titre, pas comme
 * une nouvelle section : l'écart titre → formulaire est celui d'un titre à
 * son texte (kahel.css, « Quand le contenu commence par du texte »), un peu
 * plus large pour la patte qui déborde du coin de la carte.
 */
.kahel-page:has(> .kahel-page-header + .kahel-page-content > .kahel-inscription-section:first-child) > .kahel-page-header {
	padding-bottom: 0;
}

.kahel-page > .kahel-page-header + .kahel-page-content.kahel-page-content:has(> .kahel-inscription-section:first-child) {
	margin-top: clamp(28px, 4vw, 48px);
}

/* Une seule colonne, un peu plus large que le texte courant : deux champs y tiennent côte à côte. */
.kahel-inscription-section > .kahel-inscription-colonne {
	position: relative;
	max-width: 800px;
}

.kahel-inscription-carte {
	padding: clamp(26px, 4vw, 48px);
	border-radius: var(--wp--custom--radius--default);
	background: var(--wp--preset--color--cream);
	box-shadow: var(--wp--preset--shadow--card);
	scroll-margin-top: 120px;
}

.kahel-inscription-form {
	margin: 0;
}

/*
 * Ce que le script cache (une étape, « Précédent », « Suivant »…) reste caché,
 * même quand une autre règle lui donne un affichage (les boutons de
 * WordPress, par exemple).
 */
.kahel-inscription-form [hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ *
 * La grille : chaque champ en pleine largeur, ou en demi-largeur
 * ------------------------------------------------------------------ */

:is(.kahel-inscription-contenu, .kahel-inscription-grille) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 16px;
	align-items: start;
}

:is(.kahel-inscription-contenu, .kahel-inscription-grille) > * {
	grid-column: 1 / -1;
	min-width: 0;
	margin: 0;
}

:is(.kahel-inscription-contenu, .kahel-inscription-grille) > .is-moitie {
	grid-column: auto;
}

/* Un formulaire par étapes : la grille est dans chaque étape. */
.kahel-inscription-contenu.has-etapes {
	display: block;
}

.kahel-inscription-grille:empty {
	display: none;
}

/* Les textes posés entre les champs. */
.kahel-inscription-form :is(p, li):where(:not([class*="kahel-inscription-"])) {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.7;
}

.kahel-inscription-form :is(ul, ol):where(:not([class*="kahel-inscription-"])) {
	margin: 0;
	padding-left: 1.2em;
}

.kahel-inscription-form sup {
	line-height: 0;
}

.kahel-inscription-contenu .wp-block-buttons {
	gap: 10px;
}

/*
 * Les boutons posés dans le formulaire (les documents à consulter) : en
 * contour, pour laisser le bouton plein à l'envoi. Une flèche signale ceux
 * qui s'ouvrent dans un nouvel onglet.
 */
.kahel-inscription-contenu .wp-block-button .wp-block-button__link.wp-element-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: var(--wp--custom--button--min-height-sm);
	padding: 0 18px;
	border: 1.5px solid var(--wp--preset--color--orange);
	border-radius: var(--wp--custom--radius--md);
	background: transparent;
	color: var(--wp--preset--color--orange-deep);
	box-shadow: none;
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--button);
	transform: none;
}

.kahel-inscription-contenu .wp-block-button .wp-block-button__link.wp-element-button:is(:hover, :focus-visible) {
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--ink);
	transform: none;
}

.kahel-inscription-contenu .wp-block-button .wp-block-button__link[target="_blank"]::after {
	content: "↗";
	font-weight: 700;
}

/* ------------------------------------------------------------------ *
 * La progression : les étapes numérotées, reliées par un trait
 * ------------------------------------------------------------------ */

/* Sans JavaScript, les étapes se lisent à la suite : pas de progression. */
.kahel-inscription-progression {
	display: none;
}

.kahel-inscription-carte.is-par-etapes .kahel-inscription-progression {
	display: block;
	margin: 0 0 30px;
	padding-bottom: 26px;
	border-bottom: 1px solid var(--wp--preset--color--line-strong);
}

/*
 * Le contenu de la page espace ses listes (theme.json, core/post-content :
 * retrait à gauche, marge entre les éléments) : la progression n'est pas une
 * liste de texte, elle reprend tout à zéro — sinon l'étape 1 se retrouve plus
 * haut que les autres, et l'ensemble décalé vers la droite.
 */
.kahel-inscription-progression .kahel-inscription-etapes {
	display: grid;
	grid-template-columns: repeat(var(--kahel-etapes, 4), minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.kahel-inscription-progression .kahel-inscription-etapes-item {
	position: relative;
	margin: 0;
	padding: 0;
}

/* Le trait vers l'étape suivante : il se remplit d'orange une fois l'étape passée. */
.kahel-inscription-etapes-item:not(:last-child)::before {
	content: "";
	position: absolute;
	top: 18px;
	left: calc(50% + 26px);
	right: calc(-50% + 26px);
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(var(--wp--preset--color--orange), var(--wp--preset--color--orange)) left center / 0% 100% no-repeat, var(--wp--preset--color--line-strong);
	transition: background-size 480ms var(--wp--custom--motion--ease);
}

.kahel-inscription-etapes-item.is-passee::before {
	background-size: 100% 100%;
}

.kahel-inscription-etapes-bouton {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 9px;
	width: 100%;
	margin: 0;
	padding: 0 6px;
	border: 0;
	background: none;
	color: var(--wp--preset--color--muted);
	font: inherit;
	text-align: center;
	cursor: pointer;
}

.kahel-inscription-etapes-bouton:disabled {
	cursor: default;
}

.kahel-inscription-etapes-bouton:focus {
	outline: none;
}

.kahel-inscription-etapes-numero {
	position: relative;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	width: 38px;
	height: 38px;
	border: 1.5px solid var(--wp--preset--color--line-strong);
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--strong);
	line-height: 1;
	transition: background-color 280ms var(--wp--custom--motion--ease), border-color 280ms var(--wp--custom--motion--ease), color 280ms var(--wp--custom--motion--ease), box-shadow 280ms var(--wp--custom--motion--ease), transform 380ms var(--wp--custom--motion--ease);
}

.kahel-inscription-etapes-numero > span {
	transition: opacity 200ms var(--wp--custom--motion--ease), transform 280ms var(--wp--custom--motion--ease);
}

/* Une étape faite : une coche à la place du numéro. */
.kahel-inscription-etapes-numero::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 6px;
	border-bottom: 2.5px solid currentColor;
	border-left: 2.5px solid currentColor;
	opacity: 0;
	transform: translate(-50%, -70%) rotate(-45deg) scale(0.4);
	transition: opacity 200ms var(--wp--custom--motion--ease), transform 320ms var(--wp--custom--motion--ease);
}

.kahel-inscription-etapes-titre {
	display: -webkit-box;
	overflow: hidden;
	max-width: 16ch;
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 700;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	transition: color 280ms var(--wp--custom--motion--ease);
}

.kahel-inscription-etapes-bouton:not(:disabled):hover .kahel-inscription-etapes-numero {
	border-color: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--orange-deep);
}

.kahel-inscription-etapes-bouton:focus-visible .kahel-inscription-etapes-numero {
	box-shadow: var(--wp--preset--shadow--focus);
}

.kahel-inscription-etapes-item.is-faite .kahel-inscription-etapes-numero {
	border-color: var(--wp--preset--color--orange);
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--ink);
}

.kahel-inscription-etapes-item.is-faite .kahel-inscription-etapes-numero > span {
	opacity: 0;
	transform: scale(0.4);
}

.kahel-inscription-etapes-item.is-faite .kahel-inscription-etapes-numero::after {
	opacity: 1;
	transform: translate(-50%, -70%) rotate(-45deg) scale(1);
}

.kahel-inscription-etapes-item.is-active .kahel-inscription-etapes-numero {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
	box-shadow: 0 0 0 5px rgba(244, 122, 31, 0.2);
	transform: scale(1.08);
}

.kahel-inscription-etapes-item:is(.is-active, .is-faite) .kahel-inscription-etapes-titre {
	color: var(--wp--preset--color--ink);
}

/* Sur un écran étroit, les titres ne tiennent pas : celui de l'étape en cours passe dessous. */
.kahel-inscription-etapes-courante {
	display: none;
	margin: 16px 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	text-align: center;
}

.kahel-inscription-etapes-courante strong {
	display: block;
	margin-top: 2px;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: var(--wp--custom--weight--strong);
}

/* ------------------------------------------------------------------ *
 * Les étapes
 * ------------------------------------------------------------------ */

.kahel-inscription-etape {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

/* Sans JavaScript : les étapes à la suite, séparées d'un filet. */
.kahel-inscription-etape + .kahel-inscription-etape {
	margin-top: 40px;
	padding-top: 34px;
	border-top: 1px solid var(--wp--preset--color--line-strong);
}

.kahel-inscription-carte.is-par-etapes .kahel-inscription-etape + .kahel-inscription-etape {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.kahel-inscription-etape-entete {
	margin: 0 0 24px;
}

.kahel-inscription-etape-numero {
	margin: 0 0 8px;
	color: var(--wp--preset--color--orange-deep);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 800;
	letter-spacing: var(--wp--custom--letter-spacing--kicker);
	line-height: 1.3;
	text-transform: uppercase;
}

.kahel-inscription-etape .kahel-inscription-etape-titre {
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--h-2);
	font-weight: var(--wp--custom--weight--heading);
	letter-spacing: var(--wp--custom--letter-spacing--h-2);
	line-height: 1.1;
	scroll-margin-top: 140px;
}

.kahel-inscription-etape-titre:focus {
	outline: none;
}

.kahel-inscription-etape-titre strong {
	color: var(--wp--preset--color--orange-deep);
	font-weight: inherit;
}

.kahel-inscription-etape-titre em {
	font-family: var(--wp--preset--font-family--source-serif);
	font-weight: 600;
}

.kahel-inscription-etape-intro {
	margin: 12px 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.65;
}

.kahel-inscription-etape-intro > * {
	margin: 0;
}

.kahel-inscription-etape-intro > * + * {
	margin-top: 0.7em;
}

/* Les intertitres d'une étape (« Adhérent 1 », « Paiement »…). */
.kahel-inscription-etape .kahel-inscription-grille > :is(h2, h3, h4, h5, h6) {
	margin: 10px 0 0;
	padding-top: 22px;
	border-top: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: var(--wp--custom--weight--heading);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.kahel-inscription-etape .kahel-inscription-grille > :is(h2, h3, h4, h5, h6):first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.kahel-inscription-grille > :is(h2, h3, h4, h5, h6) strong {
	color: var(--wp--preset--color--orange-deep);
	font-weight: inherit;
}

.kahel-inscription-grille > :is(h2, h3, h4, h5, h6) em {
	font-family: var(--wp--preset--font-family--source-serif);
	font-weight: 600;
}

/*
 * Le passage d'une étape à l'autre : elle glisse du côté où l'on va, et ses
 * champs la suivent l'un après l'autre.
 */
@keyframes kahel-etape-avant {
	from {
		opacity: 0;
		transform: translateX(32px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes kahel-etape-arriere {
	from {
		opacity: 0;
		transform: translateX(-32px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes kahel-etape-champ {
	from {
		opacity: 0;
		transform: translateY(14px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.kahel-inscription-etape.is-entree-avant > .kahel-inscription-etape-entete {
	animation: kahel-etape-avant 460ms var(--wp--custom--motion--ease) both;
}

.kahel-inscription-etape.is-entree-arriere > .kahel-inscription-etape-entete {
	animation: kahel-etape-arriere 460ms var(--wp--custom--motion--ease) both;
}

.kahel-inscription-etape:is(.is-entree-avant, .is-entree-arriere) > .kahel-inscription-grille > * {
	animation: kahel-etape-champ 520ms var(--wp--custom--motion--ease) both;
	animation-delay: 300ms;
}

.kahel-inscription-etape:is(.is-entree-avant, .is-entree-arriere) > .kahel-inscription-grille > :nth-child(1) { animation-delay: 60ms; }
.kahel-inscription-etape:is(.is-entree-avant, .is-entree-arriere) > .kahel-inscription-grille > :nth-child(2) { animation-delay: 100ms; }
.kahel-inscription-etape:is(.is-entree-avant, .is-entree-arriere) > .kahel-inscription-grille > :nth-child(3) { animation-delay: 140ms; }
.kahel-inscription-etape:is(.is-entree-avant, .is-entree-arriere) > .kahel-inscription-grille > :nth-child(4) { animation-delay: 180ms; }
.kahel-inscription-etape:is(.is-entree-avant, .is-entree-arriere) > .kahel-inscription-grille > :nth-child(5) { animation-delay: 220ms; }
.kahel-inscription-etape:is(.is-entree-avant, .is-entree-arriere) > .kahel-inscription-grille > :nth-child(6) { animation-delay: 260ms; }

@media (prefers-reduced-motion: reduce) {
	.kahel-inscription-etape:is(.is-entree-avant, .is-entree-arriere) :is(.kahel-inscription-etape-entete, .kahel-inscription-grille > *) {
		animation: none;
	}

	.kahel-inscription-etapes-item::before,
	.kahel-inscription-etapes-numero,
	.kahel-inscription-etapes-numero > span,
	.kahel-inscription-etapes-numero::after {
		transition: none;
	}
}

/* ------------------------------------------------------------------ *
 * Les rubriques (formulaires d'avant les étapes)
 * ------------------------------------------------------------------ */

.kahel-inscription-contenu {
	counter-reset: kahel-rubrique;
}

.kahel-inscription-rubrique {
	min-width: 0;
	margin: 0;
	padding: 30px 0 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line-strong);
	counter-increment: kahel-rubrique;
}

.kahel-inscription-contenu > .kahel-inscription-rubrique:first-child {
	padding-top: 0;
	border-top: 0;
}

.kahel-inscription-contenu > .kahel-inscription-rubrique + .kahel-inscription-rubrique {
	margin-top: 12px;
}

/* La légende flotte : elle se range alors comme un titre ordinaire, au lieu de chevaucher la bordure. */
.kahel-inscription-rubrique-entete {
	float: left;
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 0 0 20px;
	padding: 0;
}

.kahel-inscription-rubrique-entete + * {
	clear: both;
}

.kahel-inscription-rubrique-numero {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--strong);
	letter-spacing: -0.02em;
}

.kahel-inscription-rubrique-numero::before {
	content: counter(kahel-rubrique, decimal-leading-zero);
}

.kahel-inscription-rubrique-titre {
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--h-3);
	font-weight: var(--wp--custom--weight--heading);
	letter-spacing: var(--wp--custom--letter-spacing--h-3);
	line-height: 1.15;
}

.kahel-inscription-rubrique-titre strong {
	color: var(--wp--preset--color--orange-deep);
	font-weight: inherit;
}

.kahel-inscription-rubrique-titre em {
	font-family: var(--wp--preset--font-family--source-serif);
	font-weight: 600;
}

.kahel-inscription-rubrique-texte {
	clear: both;
	margin: -8px 0 20px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.65;
}

.kahel-inscription-rubrique-texte > * {
	margin: 0;
}

.kahel-inscription-rubrique-texte > * + * {
	margin-top: 0.7em;
}

/* ------------------------------------------------------------------ *
 * Les champs
 * ------------------------------------------------------------------ */

.kahel-inscription-champ {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.kahel-inscription-libelle {
	display: block;
	float: none;
	width: 100%;
	margin: 0;
	padding: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--strong);
	line-height: 1.45;
}

/* La légende d'un groupe de choix flotte, comme celle des rubriques. */
fieldset.kahel-inscription-champ > .kahel-inscription-libelle {
	float: left;
	margin-bottom: 7px;
}

fieldset.kahel-inscription-champ > .kahel-inscription-libelle + * {
	clear: both;
}

.kahel-inscription-libelle strong {
	color: var(--wp--preset--color--orange-deep);
}

.kahel-inscription-facultatif {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

.kahel-inscription-aide {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--caption);
	line-height: 1.5;
}

.kahel-inscription-erreur {
	margin: 0;
	color: #b3261e;
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 600;
}

.kahel-inscription-a-remplir {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	font-weight: 400;
}

/* Les zones de saisie : le dessin du formulaire de contact. */
.kahel-inscription-form :is(input:not([type="radio"], [type="checkbox"], [type="file"], [type="hidden"]), select, textarea) {
	box-sizing: border-box;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 16px;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
	transition: border-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease), box-shadow var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.kahel-inscription-form textarea {
	min-height: 100px;
	resize: vertical;
}

.kahel-inscription-form :is(input, select, textarea):hover {
	border-color: rgba(36, 23, 15, 0.32);
}

.kahel-inscription-form :is(input, select, textarea):focus {
	border-color: var(--wp--preset--color--orange);
	outline: none;
	box-shadow: var(--wp--preset--shadow--focus);
}

.kahel-inscription-form [aria-invalid="true"] {
	border-color: #b3261e;
}

/* La date : le calendrier du navigateur, à la couleur du site. */
.kahel-inscription-form input[type="date"] {
	accent-color: var(--wp--preset--color--orange);
}

.kahel-inscription-form input[type="date"]:invalid,
.kahel-inscription-form input::placeholder,
.kahel-inscription-form textarea::placeholder {
	color: var(--wp--preset--color--muted);
}

/* La liste déroulante, avec son propre chevron. */
.kahel-inscription-select {
	position: relative;
	display: block;
}

.kahel-inscription-select select {
	padding-right: 44px;
	appearance: none;
	cursor: pointer;
}

.kahel-inscription-select select:invalid {
	color: var(--wp--preset--color--muted);
}

.kahel-inscription-select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 18px;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--wp--preset--color--orange-deep);
	border-bottom: 2px solid var(--wp--preset--color--orange-deep);
	pointer-events: none;
	transform: translateY(-70%) rotate(45deg);
}

/* ------------------------------------------------------------------ *
 * Les choix : boutons ronds, cases à cocher
 * ------------------------------------------------------------------ */

.kahel-inscription-options {
	display: grid;
	gap: 8px;
}

.kahel-inscription-options.is-en-ligne {
	display: flex;
	flex-wrap: wrap;
}

/* Des choix de longueur moyenne : deux par rangée quand la place le permet. */
.kahel-inscription-options.is-grille {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

/* Chaque choix est une étiquette cliquable ; celle qui est cochée prend l'orange. */
.kahel-inscription-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 13px 16px;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
	cursor: pointer;
	transition: border-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease), background-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.kahel-inscription-option:hover {
	border-color: rgba(36, 23, 15, 0.32);
}

.kahel-inscription-option:has(input:checked) {
	border-color: var(--wp--preset--color--orange);
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--orange);
}

.kahel-inscription-options.is-en-ligne .kahel-inscription-option {
	flex: 0 1 auto;
	padding-right: 20px;
}

/* La case seule (un engagement, un accord) : du texte courant, sans cadre. */
.kahel-inscription-option.is-seule {
	padding: 0;
	border: 0;
	background: none;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.kahel-inscription-option.is-seule:has(input:checked) {
	background: none;
	box-shadow: none;
}

.kahel-inscription-form :is(input[type="radio"], input[type="checkbox"]) {
	display: grid;
	flex: 0 0 auto;
	place-content: center;
	width: 22px;
	height: 22px;
	margin: 0;
	border: 1.5px solid rgba(36, 23, 15, 0.34);
	border-radius: 6px;
	background: var(--wp--preset--color--surface);
	cursor: pointer;
	appearance: none;
	transition: border-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease), background-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.kahel-inscription-option.is-seule input {
	margin-top: 1px;
}

.kahel-inscription-form input[type="radio"] {
	border-radius: 50%;
}

.kahel-inscription-form :is(input[type="radio"], input[type="checkbox"]):checked {
	border-color: var(--wp--preset--color--orange);
	background: var(--wp--preset--color--orange);
}

.kahel-inscription-form input[type="radio"]:checked::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--ink);
}

.kahel-inscription-form input[type="checkbox"]:checked::before {
	content: "";
	width: 11px;
	height: 6px;
	border-bottom: 2.5px solid var(--wp--preset--color--ink);
	border-left: 2.5px solid var(--wp--preset--color--ink);
	transform: translateY(-2px) rotate(-45deg);
}

.kahel-inscription-form :is(input[type="radio"], input[type="checkbox"]):focus-visible {
	border-color: var(--wp--preset--color--orange);
	outline: none;
	box-shadow: 0 0 0 4px rgba(244, 122, 31, 0.22);
}

.kahel-inscription-champ[aria-invalid="true"] .kahel-inscription-option,
.kahel-inscription-form input[aria-invalid="true"]:is([type="radio"], [type="checkbox"]) {
	border-color: #b3261e;
}

/* ------------------------------------------------------------------ *
 * Le fichier joint
 * ------------------------------------------------------------------ */

.kahel-inscription-form input[type="file"] {
	box-sizing: border-box;
	width: 100%;
	padding: 10px;
	border: 1px dashed rgba(36, 23, 15, 0.3);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--muted);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	cursor: pointer;
}

.kahel-inscription-form input[type="file"]::file-selector-button {
	margin-right: 14px;
	padding: 9px 16px;
	border: 1.5px solid var(--wp--preset--color--orange);
	border-radius: var(--wp--custom--radius--md);
	background: transparent;
	color: var(--wp--preset--color--orange-deep);
	font: inherit;
	font-weight: var(--wp--custom--weight--button);
	cursor: pointer;
	transition: background-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease), color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.kahel-inscription-form input[type="file"]:hover::file-selector-button {
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--ink);
}

/* ------------------------------------------------------------------ *
 * La signature
 * ------------------------------------------------------------------ */

.kahel-inscription-signature {
	position: relative;
	height: 190px;
	overflow: hidden;
	border: 1.5px dashed rgba(36, 23, 15, 0.3);
	border-radius: var(--wp--custom--radius--md);
	background: #fff;
	transition: border-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease), box-shadow var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.kahel-inscription-signature:hover {
	border-color: rgba(36, 23, 15, 0.45);
}

.kahel-inscription-signature.is-en-cours,
.kahel-inscription-signature.is-signe {
	border-style: solid;
	border-color: var(--wp--preset--color--orange);
}

.kahel-inscription-signature.is-en-cours {
	box-shadow: var(--wp--preset--shadow--focus);
}

.kahel-inscription-champ[aria-invalid="true"] .kahel-inscription-signature {
	border-color: #b3261e;
}

.kahel-inscription-signature-toile {
	position: absolute;
	z-index: 2;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	cursor: crosshair;
	touch-action: none;
}

/* La consigne, en italique : la police secondaire du site. */
.kahel-inscription-signature-consigne {
	position: absolute;
	top: 22px;
	left: 0;
	right: 0;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--source-serif);
	font-size: var(--wp--preset--font-size--medium);
	font-style: italic;
	text-align: center;
	pointer-events: none;
	transition: opacity var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.kahel-inscription-signature.is-signe .kahel-inscription-signature-consigne {
	opacity: 0;
}

/* La ligne de signature, avec sa croix, comme sur le papier. */
.kahel-inscription-signature-ligne {
	position: absolute;
	right: 28px;
	bottom: 46px;
	left: 28px;
	height: 0;
	border-bottom: 1.5px solid var(--wp--preset--color--line-strong);
	pointer-events: none;
}

.kahel-inscription-signature-ligne::before {
	content: "×";
	position: absolute;
	bottom: 2px;
	left: 0;
	color: var(--wp--preset--color--orange-deep);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1;
}

.kahel-inscription-signature-effacer {
	position: absolute;
	z-index: 3;
	top: 10px;
	right: 10px;
	padding: 6px 12px;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: var(--wp--preset--font-size--caption);
	font-weight: var(--wp--custom--weight--strong);
	cursor: pointer;
}

.kahel-inscription-signature-effacer:hover,
.kahel-inscription-signature-effacer:focus-visible {
	border-color: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--orange-deep);
	outline: none;
}

.kahel-inscription-signature-effacer[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ *
 * L'envoi
 * ------------------------------------------------------------------ */

/* Le piège à robots : hors de l'écran, pas simplement masqué. */
.kahel-inscription-piege {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.kahel-inscription-noscript {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-left: 3px solid #b3261e;
	background: #fff;
	font-size: var(--wp--preset--font-size--small);
}

.kahel-inscription-envoi {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid var(--wp--preset--color--line-strong);
}

.kahel-inscription-envoi .wp-element-button {
	min-height: 50px;
	padding-inline: 26px;
	cursor: pointer;
}

.kahel-inscription-envoi .wp-block-buttons {
	margin-left: auto;
}

/* « Précédent » : un lien fléché, pour laisser « Suivant » seul en avant. */
.kahel-inscription-precedent {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 auto 0 0;
	padding: 12px 4px;
	border: 0;
	background: none;
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--button);
	cursor: pointer;
	transition: color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.kahel-inscription-precedent > span,
.kahel-inscription-suivant > span {
	display: inline-block;
	transition: transform var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--ease);
}

.kahel-inscription-precedent:is(:hover, :focus-visible) {
	color: var(--wp--preset--color--orange-deep);
	outline: none;
}

.kahel-inscription-precedent:is(:hover, :focus-visible) > span {
	transform: translateX(-3px);
}

.kahel-inscription-suivant:is(:hover, :focus-visible) > span {
	transform: translateX(3px);
}

.kahel-inscription-statut {
	flex: 1 1 100%;
	order: 3;
	margin: 0;
	color: var(--wp--preset--color--leaf);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--weight--strong);
}

.kahel-inscription-statut.is-erreur {
	color: #b3261e;
}

.kahel-inscription-mention {
	margin: 22px 0 0;
	font-size: var(--wp--preset--font-size--caption);
	line-height: 1.6;
}

/* Une fois envoyé, le formulaire laisse place au remerciement. */
.kahel-inscription-carte.is-envoye .kahel-inscription-form {
	display: none;
}

.kahel-inscription-merci {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: clamp(24px, 5vw, 56px) 0;
	text-align: center;
	outline: none;
}

.kahel-inscription-merci[hidden] {
	display: none;
}

.kahel-inscription-merci-picto {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--ink);
	rotate: -14deg;
}

.kahel-inscription-merci-picto .kahel-picto {
	width: 36px;
	height: 36px;
}

.kahel-inscription-merci-texte {
	max-width: 34ch;
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--feature);
	font-weight: var(--wp--custom--weight--heading);
	letter-spacing: var(--wp--custom--letter-spacing--feature);
	line-height: 1.25;
}

@media (max-width: 640px) {
	.kahel-inscription-carte.is-par-etapes .kahel-inscription-progression {
		margin-bottom: 26px;
		padding-bottom: 20px;
	}

	.kahel-inscription-etapes-numero {
		width: 32px;
		height: 32px;
		font-size: var(--wp--preset--font-size--caption);
	}

	.kahel-inscription-etapes-item:not(:last-child)::before {
		top: 15px;
		left: calc(50% + 21px);
		right: calc(-50% + 21px);
	}

	/* La patte passe au coin du bas : en haut, elle couvrirait la dernière étape. */
	.kahel-inscription-colonne > .kahel-pastille.is-haut-droite {
		top: auto;
		bottom: var(--kahel-pastille-debord);
	}

	/* Les titres restent lus par les lecteurs d'écran. */
	.kahel-inscription-etapes-titre {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.kahel-inscription-etapes-courante {
		display: block;
	}

	.kahel-inscription-carte.is-par-etapes .kahel-inscription-etape-numero {
		display: none;
	}

	.kahel-inscription-etape-titre {
		font-size: var(--wp--preset--font-size--h-3);
	}
}

@media (max-width: 600px) {
	:is(.kahel-inscription-contenu, .kahel-inscription-grille) > .is-moitie {
		grid-column: 1 / -1;
	}

	.kahel-inscription-rubrique-entete {
		gap: 12px;
	}

	.kahel-inscription-rubrique-numero {
		width: 34px;
		height: 34px;
	}
}

/* ------------------------------------------------------------------ *
 * Le bandeau d'un aperçu serveur (si l'éditeur sur mesure manquait)
 * ------------------------------------------------------------------ */

.kahel-inscription-bandeau {
	padding: 20px 24px;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--muted);
	font-size: 13px;
	line-height: 1.5;
}

.kahel-inscription-bandeau p {
	margin: 0;
}

.kahel-inscription-bandeau-titre {
	margin-bottom: 6px !important;
	color: var(--wp--preset--color--orange-deep);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
