/* Pages de formulaire (Fluent Forms) — absentes de la maquette, ADR-023. Aussi le formulaire Ticket bêta
 * de Mon compte (.sdl-beta-tickets__new, ADR-075 ; mesures de Mon compte dans beta-tickets.css).
 * Champs et bouton repris du formulaire newsletter de la maquette (l. 395-411) : 56 px, bordure line-3,
 * fond base à 80 %, rayon 11 px, texte 17 px. Styles par défaut de Fluent Forms coupés (inc/forms.php) ;
 * sa feuille de structure (fluent-forms-public.css) reste chargée, ses couleurs sont remplacées ici. */

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform {
	--fluentform-primary: var(--wp--preset--color--accent);
	--fluentform-secondary: var(--wp--preset--color--muted);
	--fluentform-danger: var(--wp--preset--color--accent-soft);
	--fluentform-border-color: var(--wp--preset--color--line-3);
	--fluentform-border-radius: var(--sdl-field-radius);
	font-family: inherit;
	color: var(--wp--preset--color--text);
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-group {
	margin-bottom: var(--wp--preset--spacing--28);
}

/* Intertitres de groupe (formulaire Accès B2B, ADR-063) : h3 22 px de la maquette (Sora 600, -0.01em,
   accueil l. 250), filet line-2 dessous comme les séparateurs de liste.
   Le premier suit le chapô ; les suivants séparent nettement les groupes. */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-section-break {
	margin: 0 0 var(--wp--preset--spacing--24);
}

/* Précédé d'un vrai champ (le champ piège caché ne compte pas). */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-group:not(.ff-hpsf-container) ~ .ff-el-section-break {
	margin-top: var(--wp--preset--spacing--48);
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-section-title {
	margin: 0;
	padding-bottom: var(--wp--preset--spacing--12);
	border-bottom: 1px solid var(--wp--preset--color--line-2);
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--22);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: var(--wp--custom--line-height--card);
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-section-break .ff-section_break_desk:empty,
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-section-break hr {
	display: none;
}

/* Libellés */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-input--label {
	margin-bottom: var(--wp--preset--spacing--10);
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-input--label label {
	display: inline-block;
	margin: 0;
	color: var(--wp--preset--color--text);
	font-size: var(--wp--preset--font-size--16);
	font-weight: 600;
	line-height: 1.4;
}

/* Champs texte, email, zone de texte */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-form-control {
	display: block;
	width: 100%;
	min-height: var(--wp--custom--button--height);
	margin: 0;
	padding: 0 var(--sdl-field-px);
	border: 1px solid var(--wp--preset--color--line-3);
	border-radius: var(--sdl-field-radius);
	background: color-mix(in srgb, var(--wp--preset--color--base) 80%, transparent);
	color: var(--wp--preset--color--text);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--17);
	line-height: normal;
}

/* Texte indicatif : couleur du thème (faint), quelle que soit la feuille de Fluent Forms. */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-form-control::placeholder {
	color: var(--wp--preset--color--faint);
	opacity: 1;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform textarea.ff-el-form-control {
	min-height: 140px;
	padding: 14px 18px;
	resize: vertical;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-form-control:focus {
	border-color: var(--wp--preset--color--line-3);
}

/* Focus : anneau global de la maquette (l. 30), seul état propre au champ. */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-form-control:focus-visible,
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-form-check-input:focus-visible {
	outline: 2px solid var(--wp--preset--color--link);
	outline-offset: 3px;
}

/* Aides : sous le champ, toujours visibles (pas d'infobulle, règle 7). */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-help-message {
	margin-top: var(--wp--preset--spacing--8);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--14);
	font-style: normal;
	line-height: 1.5;
}

/* Choix (radio, cases, consentement) : chaque ligne fait au moins 48 px de haut (règle 7). */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-form-check label.ff-el-form-check-label {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--12);
	min-height: 48px;
	margin: 0;
	color: var(--wp--preset--color--text-2);
	font-size: var(--wp--preset--font-size--16);
	line-height: 1.4;
	cursor: pointer;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-form-check-input {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--wp--preset--color--accent);
	cursor: pointer;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-tc label.ff-el-form-check-label {
	align-items: flex-start;
	padding-block: 13px;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff_tc_checkbox {
	display: flex;
	flex: none;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff_t_c {
	margin: 0;
	padding: 0;
}

/* Lien vers la page Confidentialité (ADR-025) : souligné comme les liens du contenu (WCAG 1.4.1). */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff_t_c a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Erreurs : 14 px accent-soft sous le champ, bordure inchangée, comme les formulaires MailPoet (ADR-014). */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-is-error .ff-el-form-control {
	border-color: var(--wp--preset--color--line-3);
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .text-danger,
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-is-error .text-danger {
	margin-top: 6px;
	color: var(--wp--preset--color--accent-soft);
	font-size: var(--wp--preset--font-size--14);
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-el-is-error .ff-el-form-check-label {
	color: var(--wp--preset--color--text-2);
}

:is(.sdl-page, .sdl-beta-tickets__new) .ff-errors-in-stack:not(:empty) {
	margin-top: var(--wp--preset--spacing--16);
	color: var(--wp--preset--color--accent-soft);
	font-size: var(--wp--preset--font-size--14);
}

/* Message global (refus anti-robot, ADR-056) : une seule marge ; croix de fermeture de Fluent Forms
   (simple span, inaccessible au clavier) masquée. */
:is(.sdl-page, .sdl-beta-tickets__new) .ff-errors-in-stack .text-danger {
	margin-top: 0;
}

:is(.sdl-page, .sdl-beta-tickets__new) .ff-errors-in-stack .error-clear {
	display: none;
}

/* Bouton d'envoi : bouton plein du thème (56 px, accent). */
:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff_submit_btn_wrapper {
	margin: var(--wp--preset--spacing--8) 0 0;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-btn-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	min-height: var(--wp--custom--button--height);
	margin: 0;
	padding: 0 var(--sdl-btn-px-xl);
	border: 0;
	border-radius: var(--sdl-btn-radius);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	font-family: inherit;
	font-size: var(--sdl-btn-fs-xl);
	font-weight: 600;
	line-height: 1.3;
	white-space: normal;
	cursor: pointer;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-btn-submit:hover {
	background: var(--wp--preset--color--accent-hover);
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-btn-submit:focus-visible {
	outline: 2px solid var(--wp--preset--color--link);
	outline-offset: 3px;
}

:is(.sdl-page, .sdl-beta-tickets__new) .fluentform .ff-btn-submit[disabled] {
	cursor: progress;
}

/* Message après envoi : remplace le formulaire, comme la confirmation newsletter de la maquette (l. 409). */
:is(.sdl-page, .sdl-beta-tickets__new) .ff-message-success {
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	background: none;
	color: var(--wp--preset--color--accent-pale);
	font-family: var(--wp--preset--font-family--mono);
}
