/*
 * ── LES CHAMPS DE FORMULAIRE DES PAGES V3 ─────────────────────────────────
 *
 * Le dessin des champs imprimés par gv3_champ_formulaire() et ses voisines
 * (parties-v3/formulaires.php). Chargée une fois par page, seulement si un
 * bloc de la page la demande: 'communs' => ['formulaires'] dans son
 * .champs.php (voir template-v3.php).
 *
 * Relevé au navigateur par getComputedStyle sur Astra (form-parts.tsx,
 * request-form.tsx) le 10.09.2026, à 1440, 768 et 390 px : /contact,
 * /entreprises#demande, /devenir-partenaire. L'erreur et le panneau de
 * confirmation ont été relevés en posant leurs classes dans la page d'Astra,
 * sans rien envoyer à son API.
 *
 * Cette feuille ne dessine QUE les classes gv3-form-*. La carte blanche qui
 * entoure le formulaire (fond, bordure, 38 px de marge intérieure) est propre
 * à la mise en page de chaque bloc : elle vit dans la feuille du bloc.
 *
 * ── LES PIÈGES DU THÈME DE 2016, DÉSAMORCÉS ICI ───────────────────────────
 *
 *   label { font-weight: bold }            : les libellés repassent à 500
 *   input { padding: 5px; border: #ddd }   : repris par .gv3-form-saisie
 *   input:focus { border: #04A4CC }        : (0,1,1), battu par (0,2,0)
 *   input[type=checkbox] { width: 15px }   : (0,1,1), idem
 *   fieldset { border: 1px solid silver }  : remis à zéro
 *   p { font-size: 1.2em }                 : chaque p porte sa taille
 *   a:hover { color: #6b8512 }             : le lien du consentement fixe le sien
 *
 * AUCUNE valeur en rem: html est à 62,5 % sur ce thème.
 */

.gv3-form { position: relative; min-width: 0; }

/* La pile de champs: une grille, 24 px entre deux champs (form-fields). */
.gv3 .gv3-form-champs { display: grid; gap: 24px; min-width: 0; margin: 0; padding: 0; border: 0; }

/* Deux champs côte à côte (two-fields). */
.gv3-form-deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }

/* Un champ: le libellé, 9 px, la saisie (field). */
.gv3 .gv3-form-champ { display: flex; flex-direction: column; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; }
.gv3 .gv3-form-champ > label,
.gv3 .gv3-form-legende {
	display: block;
	float: none;
	margin: 0;
	padding: 0;
	font-size: 14.56px;   /* .91rem d'Astra */
	font-weight: 500;
	line-height: 1.6;
	color: var(--foret);
}
.gv3-form-note { margin-left: 5px; font-size: 14px; font-weight: 400; color: #5d6e7e; }

/* La saisie: texte, courriel, téléphone, nombre, zone, sélection. */
.gv3 .gv3-form-saisie {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 13px 15px;
	border: 1px solid #d6dce2;
	border-radius: 5px;
	background: #ffffff;
	color: var(--foret);
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
/* Astra garde les flèches du champ nombre ; le thème les avait retirées. */
.gv3 input.gv3-form-saisie[type="number"] { -webkit-appearance: auto; appearance: auto; }
.gv3 textarea.gv3-form-saisie { resize: vertical; overflow: auto; }
.gv3 .gv3-form-saisie:focus { border-color: var(--foret); box-shadow: 0 0 0 2px #9bb98170; }
.gv3 .gv3-form-saisie:focus-visible { outline: 3px solid #5d6e7e; outline-offset: 3px; }
.gv3 .gv3-form-saisie[aria-invalid="true"] { border-color: #b0584b; }
.gv3 .gv3-form-saisie[readonly] { background: #f3f4f6; }
/* L'indice: le vert forêt à 50 %, relevé chez Astra (oklab 0,33 / 0,5), et non le gris du navigateur. */
.gv3 .gv3-form-saisie::placeholder { color: rgba(24, 62, 49, .5); opacity: 1; }

/*
 * La sélection. Astra dessine un bouton Radix: 51 px de haut et non 52, un
 * rayon de 10 px et non 5, et une ombre d'un pixel. Le <select> natif est
 * habillé à l'identique, chevron de lucide à 50 % d'opacité compris.
 */
.gv3 select.gv3-form-saisie {
	height: 51px;
	padding: 0 42px 0 15px;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23183e31' stroke-opacity='.5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 16px 16px;
	cursor: pointer;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.gv3 select.gv3-form-saisie:focus { box-shadow: 0 0 0 2px #9bb98170; }
.gv3 select.gv3-form-saisie:invalid { color: rgba(24, 62, 49, .5); }

.gv3 .gv3-form-aide,
.gv3 .gv3-form-remarque { margin: 0; font-size: 14px; line-height: 1.6; color: #5d6e7e; }
.gv3 .gv3-form-erreur-champ { margin: 0; font-size: 14px; line-height: 1.6; color: #852c24; }

/* ── Les cases et les boutons radio ─────────────────────────────────────── */
.gv3 .gv3-form-coche {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin: 0;
	padding: 0;
	border: 1px solid #d6dce2;
	border-radius: 4px;
	background: transparent no-repeat center / 12px 12px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	cursor: pointer;
}
.gv3 .gv3-form-coche[type="radio"] { border-radius: 50%; }
.gv3 .gv3-form-coche:checked {
	border-color: var(--foret);
	background-color: var(--foret);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f7f7f0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.gv3 .gv3-form-coche[type="radio"]:checked { background: radial-gradient(circle, var(--foret) 0 4px, transparent 4.5px); }
.gv3 .gv3-form-coche:focus-visible { outline: 3px solid #5d6e7e; outline-offset: 3px; }
.gv3 .gv3-form-coche[aria-invalid="true"] { border-color: #b0584b; }

/* Plusieurs choix, en étiquettes (space-options et needs-grid d'Astra). */
.gv3-form-options { display: grid; gap: 12px; }
.gv3-form-options-ligne { display: flex; flex-wrap: wrap; gap: 10px; }
.gv3-form-options-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.gv3 .gv3-form-option {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 11px 16px;
	border: 1px solid #d6dce2;
	border-radius: 5px;
	font-size: 14.72px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--foret);
	cursor: pointer;
}
.gv3 .gv3-form-option:has(:checked) { background: #f3f4f6; border-color: #5d6e7e; box-shadow: inset 0 0 0 1px #5d6e7e; }
.gv3 .gv3-form-option:hover { color: var(--foret); }

/* Une case seule, son libellé à droite (le consentement). */
.gv3-form-case { display: flex; align-items: flex-start; gap: 12px; }
.gv3 .gv3-form-case > .gv3-form-coche { margin-top: 4px; }
.gv3 .gv3-form-case > label {
	display: block;
	margin: 0;
	padding: 0;
	font-size: 13.6px;   /* .85rem d'Astra */
	font-weight: 400;
	line-height: 1.75;
	color: #5d6e7e;
}
/*
 * Une case d'option (« session partagée » des formations communes) : chez
 * Astra, son libellé est celui d'un champ, 16 px / 25,6 px en vert forêt,
 * pas la petite mention grise du consentement. Relevé le 10.09.2026 :
 * 570 x 26 à 1440, 308 x 51 à 390. La case descend de 1 px pour rester
 * centrée sur la première ligne, plus haute.
 */
.gv3 .gv3-form-case-option > label { font-size: 16px; line-height: 1.6; color: var(--foret); }
.gv3 .gv3-form-case-option > .gv3-form-coche { margin-top: 5px; }
.gv3 .gv3-form-case a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.gv3 .gv3-form-case a:hover { color: var(--foret); }

/* ── Après l'envoi ──────────────────────────────────────────────────────── */
/* Le refus (FormError) : 15 px sous le champ précédent, en plus des 24 de la grille. */
.gv3 .gv3-form-erreur {
	margin: 15px 0 0;
	padding: 15px 18px;
	border: 1px solid #d2ada4;
	border-radius: 5px;
	background: #f8eae3;
	color: #852c24;
	font-size: 14.72px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}
.gv3 .gv3-form-erreur:focus { outline: none; }
.gv3 .gv3-form-erreur:focus-visible { outline: 3px solid #5d6e7e; outline-offset: 7px; }

/*
 * Le bouton: celui du socle (.gv3-button-dark), calé à gauche dans la grille.
 * `width: auto` parce que le socle met TOUT .gv3-button à 100 % sous 600 px
 * (v3.css l. 649) : Astra garde ici son bouton à 250 px à 390 px de large.
 */
.gv3 .gv3-form-bouton { justify-self: start; width: auto; font-family: inherit; cursor: pointer; }
.gv3 .gv3-form-bouton:hover > svg { transform: translate(2px, -2px); }
.gv3 .gv3-form-bouton[disabled] { opacity: .72; cursor: progress; transform: none; }

/* La confirmation (RequestSuccess). */
.gv3-form-succes {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	max-width: 700px;
	margin: auto;
	padding: 55px 15px;
	text-align: center;
}
.gv3-form-succes-icone {
	display: grid;
	place-items: center;
	width: 70px;
	height: 70px;
	margin-bottom: 10px;
	border-radius: 50%;
	background: #eef4cf;
	color: var(--foret);
}
.gv3 .gv3-form-succes > .gv3-form-succes-eyebrow {
	margin: 0;
	font-size: 11px;
	font-weight: 650;
	letter-spacing: .16em;
	line-height: 1.6;
	text-transform: uppercase;
	color: var(--foret);
}
.gv3 .gv3-form-succes h2,
.gv3 .gv3-form-succes h3 { font-size: 52.8px; line-height: 1.04; letter-spacing: -.052em; text-align: center; }
.gv3 .gv3-form-succes [data-gv3-focus]:focus { outline: none; }
.gv3 .gv3-form-succes [data-gv3-focus]:focus-visible { outline: 3px solid #5d6e7e; outline-offset: 7px; border-radius: 4px; }
.gv3 .gv3-form-succes > p:not(.gv3-form-succes-eyebrow) { max-width: 580px; font-size: 16px; line-height: 1.8; color: #5d6e7e; }
/* p.… et non .… : la règle du dessus pèse (0,3,1) avec son:not(), elle gagnait. */
.gv3 .gv3-form-succes > p.gv3-form-succes-note { font-size: 14px; }
.gv3-form-succes-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-top: 18px; }

@media (prefers-reduced-motion: no-preference) {
	.gv3 .gv3-form-option { transition: background .2s, border-color .2s, box-shadow .2s; }
	.gv3-form-succes-icone { animation: gv3-form-pop .5s cubic-bezier(.2, .8, .2, 1); }
	@keyframes gv3-form-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
}

@media (max-width: 600px) {
	.gv3-form-deux { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.gv3-form-options-grille { grid-template-columns: minmax(0, 1fr); }
	.gv3 .gv3-form-option { padding: 10px 12px; font-size: 13.6px; }
	.gv3-form-succes { padding: 30px 5px; }
	.gv3 .gv3-form-succes h2,
	.gv3 .gv3-form-succes h3 { font-size: 43.2px; }
}
