/* Formation : formulaires et pages membres (étape 3).
   Charte : fond #efd9b4, texte #283b6a, vert #45ba56, orange #f9b02c, noir #171717.
   Le texte sur vert et orange est noir (#171717) pour un contraste AAA ; les liens
   utilisent un vert foncé (#1d6b2c) car #45ba56 sur beige est trop pâle pour la lecture. */

:root {
	--fm-bg: #efd9b4;
	--fm-text: #283b6a;
	--fm-green: #45ba56;
	--fm-green-dark: #1d6b2c;
	--fm-orange: #f9b02c;
	--fm-black: #171717;
	--fm-white: #ffffff;
	--fm-base: 18px;
}

.fm-card {
	max-width: 640px;
	margin: 2rem auto;
	padding: 2rem 1.5rem;
	background: var(--fm-white);
	color: var(--fm-text);
	border-radius: 24px;
	font-family: Roboto, Arial, sans-serif;
	font-size: var(--fm-base);
	line-height: 1.7;
	box-sizing: border-box;
}
.fm-card *, .fm-card *::before, .fm-card *::after { box-sizing: inherit; }

.fm-title, .fm-card h3 {
	font-family: Quicksand, Poppins, Arial, sans-serif;
	color: var(--fm-black);
	line-height: 1.3;
	margin: 0 0 1rem;
}
.fm-title { font-size: 1.7em; }
.fm-card h3 { font-size: 1.25em; }

.fm-section { margin: 2rem 0; padding-top: 1.5rem; border-top: 2px solid var(--fm-bg); }

.fm-field { margin: 0 0 1.25rem; }
.fm-field label, .fm-check label { display: block; font-weight: 500; margin-bottom: .35rem; }
.fm-check { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.25rem; }
.fm-check label { margin: 0; }
.fm-check input { width: 24px; height: 24px; accent-color: var(--fm-green-dark); }

.fm-card input[type="text"],
.fm-card input[type="email"],
.fm-card input[type="password"],
.fm-card select {
	width: 100%;
	min-height: 48px;
	padding: .6rem .9rem;
	font: inherit;
	color: var(--fm-text);
	background: var(--fm-white);
	border: 2px solid var(--fm-text);
	border-radius: 14px;
}
.fm-help { display: block; font-size: .85em; margin-top: .3rem; opacity: .9; }

.fm-pw { position: relative; display: flex; gap: .5rem; align-items: stretch; }
.fm-pw input { flex: 1; }
.fm-pw-toggle {
	min-width: 44px; min-height: 48px; padding: 0 .9rem; font: inherit; font-size: .85em; cursor: pointer;
	color: var(--fm-text); background: var(--fm-white); border: 2px solid var(--fm-text); border-radius: 14px;
}

/* Boutons : très arrondis, grande cible (≥ 44 px). */
.fm-btn {
	display: inline-block; min-height: 48px; padding: .75rem 2rem; margin: 0 .5rem .5rem 0;
	font: 700 1em Poppins, Arial, sans-serif; text-align: center; text-decoration: none; cursor: pointer;
	border: 2px solid transparent; border-radius: 9999px; transition: background-color .2s, transform .1s;
}
.fm-btn--next     { background: var(--fm-green);  color: var(--fm-black); }
.fm-btn--back     { background: var(--fm-text);   color: var(--fm-white); }
.fm-btn--validate { background: var(--fm-orange); color: var(--fm-black); }
.fm-btn:hover { filter: brightness(1.08); }
.fm-btn[disabled], .fm-btn[aria-busy="true"] { opacity: .6; cursor: progress; }

.fm-card a:not(.fm-btn) { color: var(--fm-green-dark); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.fm-links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin: 1.5rem 0 0; }

/* Focus toujours visible. */
.fm-card a:focus-visible, .fm-card button:focus-visible, .fm-card input:focus-visible,
.fm-card select:focus-visible, .fm-card summary:focus-visible {
	outline: 3px solid var(--fm-black); outline-offset: 3px;
}

.fm-notice { padding: 1rem 1.25rem; margin: 0 0 1.5rem; border-radius: 14px; border-left: 8px solid; background: var(--fm-bg); color: var(--fm-black); }
.fm-notice--error   { border-color: #b32d2e; }
.fm-notice--success { border-color: var(--fm-green-dark); }
.fm-notice--info    { border-color: var(--fm-orange); }

.fm-details { margin-top: 1.5rem; padding: 1rem 1.25rem; background: var(--fm-bg); border-radius: 14px; }
.fm-details summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; }

.fm-table-wrap { overflow-x: auto; }
.fm-table { width: 100%; border-collapse: collapse; }
.fm-table th, .fm-table td { text-align: left; padding: .75rem .5rem; border-bottom: 2px solid var(--fm-bg); }

/* Champ piège anti-robot : invisible pour les humains. */
.fm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.fm-btn { transition: none; }
}
