/* Formulaires JIDH. Les couleurs reprennent celles du thème, avec des valeurs de repli. */
.jf {
	--jf-bleu: var(--bleu, #003893);
	--jf-rouge: var(--rouge, #d21034);
	--jf-encre: var(--encre, #1b2634);
	--jf-douce: var(--encre-douce, #4a5668);
	--jf-voile: var(--voile, #e8eef9);
	--jf-erreur: #b42318;
	font-family: var(--texte, "Public Sans", system-ui, sans-serif);
	color: var(--jf-encre);
	max-width: 760px;
	margin-inline: auto;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 0 0 1px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04), 0 14px 32px -14px rgba(16, 24, 40, .14);
}
.jf *, .jf *::before, .jf *::after { box-sizing: border-box; }
.jf [hidden] { display: none !important; }
.jf__form { display: grid; gap: 1.4rem; }

.jf__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.jf__field { display: grid; gap: .4rem; min-width: 0; }
.jf__field label, .jf__field legend { font-weight: 600; font-size: .98rem; line-height: 1.4; }
.jf__field fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.jf__field legend { padding: 0; margin-bottom: .35rem; }
.jf__req { color: var(--jf-rouge); }
.jf__help { margin: 0; font-size: .88rem; line-height: 1.4; color: var(--jf-douce); }
.jf__group { margin: 0; font: 700 .78rem/1 var(--texte, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--jf-douce); }

.jf input[type="text"], .jf input[type="email"], .jf input[type="tel"], .jf select, .jf textarea {
	width: 100%; min-height: 50px; padding: .75rem 1rem;
	font: 400 1rem/1.4 var(--texte, system-ui, sans-serif); color: var(--jf-encre);
	background: #fff; border: 1px solid #c9d1de; border-radius: 10px;
	transition: border-color .15s, box-shadow .15s;
}
.jf textarea { resize: vertical; min-height: 7rem; }
.jf input:focus-visible, .jf select:focus-visible, .jf textarea:focus-visible { outline: none; border-color: var(--jf-bleu); box-shadow: 0 0 0 3px rgba(0, 56, 147, .2); }
.jf [aria-invalid="true"] { border-color: var(--jf-erreur); }
.jf [aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgba(180, 35, 24, .2); }

.jf__error { margin: 0; font-size: .88rem; font-weight: 600; color: var(--jf-erreur); }

.jf__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.jf__option, .jf__consent { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem; border: 1px solid #c9d1de; border-radius: 10px; font-weight: 500; line-height: 1.4; cursor: pointer; transition: border-color .15s, background-color .15s; }
.jf__option:hover, .jf__consent:hover { border-color: var(--jf-bleu); }
.jf__option:has(input:checked), .jf__consent:has(input:checked) { border-color: var(--jf-bleu); background: var(--jf-voile); }
.jf__option:has(input:focus-visible), .jf__consent:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(0, 56, 147, .2); }
.jf input[type="checkbox"] { flex: none; width: 1.2rem; height: 1.2rem; margin: .1rem 0 0; accent-color: var(--jf-bleu); }
.jf__consent { background: #f6f7fb; }
.jf__field--consent { gap: .5rem; }

.jf__summary { padding: 1rem 1.25rem; border-radius: 10px; background: #fdeeec; color: var(--jf-erreur); font-size: .95rem; }
.jf__summary:focus { outline: 3px solid var(--jf-erreur); outline-offset: 2px; }
.jf__summary strong { display: block; margin-bottom: .35rem; }
.jf__summary ul { margin: 0; padding-left: 1.1rem; }
.jf__summary a { color: inherit; font-weight: 600; }

.jf__privacy { margin: 0; font-size: .88rem; color: var(--jf-douce); }
.jf__privacy a { color: var(--jf-bleu); }
.jf__actions { margin: 0; }
.jf__submit {
	display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .8rem 1.8rem;
	font: 700 1rem/1.2 var(--texte, system-ui, sans-serif); color: #fff; background: var(--jf-rouge);
	border: 2px solid transparent; border-radius: 10px; cursor: pointer; transition: background-color .15s;
}
.jf__submit:hover { background: var(--rouge-fonce, #a80d29); }
.jf__submit:focus-visible { outline: 3px solid var(--jf-encre); outline-offset: 3px; }
.jf__submit[disabled] { opacity: .65; cursor: progress; }
.jf__noscript { margin: 0; padding: .9rem 1rem; border-radius: 10px; background: #fff6e5; color: #7a4a05; }

.jf__done { display: grid; justify-items: center; gap: 1rem; padding: clamp(1.5rem, 5vw, 3rem) 1rem; text-align: center; }
.jf__done:focus { outline: none; }
.jf__done p { margin: 0; max-width: 28rem; font-family: var(--titre, Georgia, serif); font-weight: 600; font-size: 1.3rem; line-height: 1.4; }
.jf__done-icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #e6f4ec; color: #127a46; font-size: 1.6rem; font-weight: 700; }

@media (max-width: 600px) { .jf__options { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .jf input, .jf select, .jf textarea, .jf__option, .jf__consent, .jf__submit { transition: none; } }

/* Formulaire à deux colonnes (lettre d'invitation) */
.jf__intro { margin: 0; font-size: 1.02rem; line-height: 1.6; color: var(--jf-douce); }
.jf__section { margin: .75rem 0 0; padding-bottom: .6rem; border-bottom: 1px solid var(--jf-filet, #e4e0d8); font: 700 1.2rem/1.3 var(--titre, Georgia, serif); color: var(--jf-encre, #1b2634); }
.jf__form--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
.jf__form--cols > * { grid-column: 1 / -1; }
.jf__form--cols > .jf__field--half { grid-column: auto; }
@media (max-width: 700px) { .jf__form--cols { grid-template-columns: minmax(0, 1fr); } .jf__form--cols > .jf__field--half { grid-column: 1 / -1; } }
