/* =========================================================
   Entraînement Découverte — Styles du formulaire
   ========================================================= */

/* ---- Bloc notice avant le formulaire ---- */
.ed-intro-notice {
	background: #fff8f8;
	border-left: 4px solid #dd0000;
	border-radius: 4px;
	padding: 1em 1.2em;
	margin-top: 1.8em;
	margin-bottom: 1.8em;
	font-size: 0.93em;
	color: #333;
	line-height: 1.8;
}

/* ---- Texte d'introduction [inscription_intro] ---- */
.ed-intro-text h3 {
	margin-top: 1.8em;
	margin-bottom: 0.4em;
}

.ed-intro-text p {
	margin-top: 0;
	margin-bottom: 0.9em;
	line-height: 1.65;
}

#ed-inscription-wrapper {
	max-width: 820px;
	margin: 0 auto;
	font-family: inherit;
}

/* Titres de section */
.ed-section-title {
	margin-top: 2em;
	margin-bottom: 0.6em;
	padding-bottom: 0.4em;
	border-bottom: 2px solid #dd0000;
	color: #dd0000;
	font-size: 1.15em;
}

/* Ligne de champs */
.ed-row {
	display: flex;
	gap: 1.2em;
	margin-bottom: 1em;
	flex-wrap: wrap;
}

.ed-field {
	flex: 1;
	min-width: 200px;
	display: flex;
	flex-direction: column;
}

.ed-field--full { flex: 1 1 100%; }
.ed-field--small { flex: 0 1 260px; }
.ed-field--npa { flex: 0 0 110px; min-width: 80px; }

.ed-field label {
	font-weight: 600;
	font-size: 0.88em;
	margin-bottom: 0.3em;
	color: #333;
}

.ed-field input[type="text"],
.ed-field input[type="email"],
.ed-field input[type="tel"],
.ed-field input[type="date"] {
	padding: 0.55em 0.75em;
	border: 1px solid #bbb;
	border-radius: 5px;
	font-size: 0.97em;
	width: 100%;
	box-sizing: border-box;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ed-field input:focus {
	outline: none;
	border-color: #dd0000;
	box-shadow: 0 0 0 3px rgba(221, 0, 0, 0.18);
}

.ed-required { color: #c00; margin-left: 2px; }

/* Indication */
.ed-hint {
	color: #666;
	font-size: 0.88em;
	margin-bottom: 1em;
}

/* ---- Cartes de groupes ---- */
.ed-groupes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 0.9em;
	margin-bottom: 0.5em;
}

.ed-groupe-card {
	display: flex;
	align-items: flex-start;
	gap: 0.65em;
	border: 2px solid #ddd;
	border-radius: 8px;
	padding: 0.9em 1em;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s, background 0.15s, opacity 0.15s;
	user-select: none;
}

.ed-groupe-card:hover {
	border-color: #dd0000;
	background: #fff0f0;
}

.ed-groupe-card.is-checked {
	border-color: #dd0000;
	background: #ffe0e0;
}

.ed-groupe-card.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

.ed-groupe-checkbox {
	margin-top: 3px;
	flex-shrink: 0;
	width: 17px;
	height: 17px;
	accent-color: #dd0000;
	cursor: pointer;
}

.ed-groupe-content {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

.ed-groupe-content strong {
	font-size: 0.93em;
	color: #222;
}

.ed-groupe-desc {
	font-size: 0.8em;
	color: #555;
}

.ed-groupe-date {
	font-size: 0.8em;
	font-weight: 700;
	color: #bb0000;
}

/* ---- RGPD ---- */
.ed-rgpd-block {
	margin: 1.6em 0 1em;
	padding: 1em 1.1em;
	background: #f5f5f5;
	border-left: 4px solid #dd0000;
	border-radius: 4px;
}

.ed-rgpd-label {
	display: flex;
	gap: 0.7em;
	align-items: flex-start;
	font-size: 0.88em;
	cursor: pointer;
	color: #444;
}

.ed-rgpd-label input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
	width: 17px;
	height: 17px;
	accent-color: #dd0000;
}

/* ---- Messages d'erreur ---- */
.ed-error {
	color: #b00;
	font-size: 0.85em;
	margin: 0.4em 0 0;
}

/* ---- Message global (succès / erreur) ---- */
#ed-message {
	padding: 1em 1.4em;
	border-radius: 6px;
	margin-bottom: 1.5em;
	font-weight: 500;
	font-size: 0.97em;
}

#ed-message.ed-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

#ed-message.ed-error-msg {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* ---- Hint info (groupes complets) ---- */
.ed-hint--info {
	color: #8a6000;
	background: #fff8e1;
	border-left: 3px solid #f5a623;
	padding: 0.5em 0.8em;
	border-radius: 3px;
	margin-top: -0.3em;
}

/* ---- Note obligatoire ---- */
.ed-mandatory-note {
	font-size: 0.82em;
	color: #777;
	margin: 0.5em 0 1.2em;
}

/* ---- Note de confirmation avant envoi ---- */
.ed-confirm-note {
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-left: 4px solid #e6a800;
	border-radius: 4px;
	padding: 0.8em 1em;
	font-size: 0.9em;
	color: #6b4900;
	margin-bottom: 1.2em;
}

/* ---- Bouton d'envoi ---- */
.ed-btn {
	display: inline-block;
	background: #dd0000;
	color: #fff;
	border: none;
	padding: 0.75em 2.2em;
	font-size: 1em;
	font-weight: 700;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s;
	letter-spacing: 0.01em;
}

.ed-btn:hover { background: #bb0000; }
.ed-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- Responsive ---- */
@media (max-width: 580px) {
	.ed-row { flex-direction: column; gap: 0.7em; }
	.ed-field--npa { flex: 1 1 100%; }
	.ed-groupes { grid-template-columns: 1fr; }
}
