/**
 * Formulaire de recrutement Nirmata (frontend).
 * Styles volontairement minimaux et neutres : le formulaire s'adapte au thème.
 */

.nirmata-recruitment {
	/* Aligné sur la colonne de contenu du thème (theme.json) ; fallback
	 * 640px pour les thèmes classiques sans variables globales. */
	max-width: var( --wp--style--global--content-size, 640px );
	margin: 1.5em 0;
}

.nirmata-recruitment__notice {
	padding: 0.75em 1em;
	margin: 0 0 1em;
	border-radius: 4px;
	font-size: 0.95em;
	line-height: 1.5;
}

.nirmata-recruitment__notice--success {
	background: #e6f4e6;
	border: 1px solid #5a9e5a;
	color: #1f4d1f;
}

.nirmata-recruitment__notice--error {
	background: #fde8e8;
	border: 1px solid #c44;
	color: #7a1f1f;
}

.nirmata-recruitment__notice--info {
	background: #eef4fa;
	border: 1px solid #5a8ec4;
	color: #1f3d5a;
}

.nirmata-recruitment__form {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
}

.nirmata-recruitment__field label,
.nirmata-recruitment__consent label {
	display: block;
	margin-bottom: 0.2em;
	font-weight: 600;
}

.nirmata-recruitment__field .required {
	color: #c44;
}

.nirmata-recruitment__field input[type="text"],
.nirmata-recruitment__field input[type="email"],
.nirmata-recruitment__field input[type="tel"],
.nirmata-recruitment__field textarea {
	width: 100%;
	padding: 0.5em 0.6em;
	border: 1px solid #ccd;
	border-radius: 4px;
	font-size: 1em;
	box-sizing: border-box;
}

/* Mention fine sous un champ (ex. info NIR) : petits caractères,
   couleur atténuée, collée sous l'input pour peser peu visuellement. */
.nirmata-recruitment__hint {
	display: block;
	margin: 0.25em 0 0;
	font-size: 0.78em;
	font-weight: 400;
	line-height: 1.4;
	color: #777;
}

.nirmata-recruitment__consent label {
	font-weight: 400;
	font-size: 0.9em;
	line-height: 1.45;
	display: flex;
	gap: 0.5em;
	align-items: flex-start;
}

.nirmata-recruitment__consent input[type="checkbox"] {
	margin-top: 0.2em;
	flex: 0 0 auto;
}

.nirmata-recruitment__button {
	padding: 0.6em 1.2em;
	font-size: 1em;
	font-weight: 600;
	border-radius: 4px;
	border: 1px solid #345;
	background: #345;
	color: #fff;
	cursor: pointer;
}

.nirmata-recruitment__button:hover {
	background: #234;
}

.nirmata-recruitment__button:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* Honeypot : invisibles aux humains, présents dans le DOM pour les bots. */
.nirmata-recruitment__honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.nirmata-recruitment__honeypot input {
	width: 1px !important;
	height: 1px !important;
}

@media (prefers-color-scheme: dark) {
	.nirmata-recruitment__field input,
	.nirmata-recruitment__field textarea {
		background: #1e1e1e;
		color: #eee;
		border-color: #444;
	}
	.nirmata-recruitment__button {
		background: #456;
		border-color: #456;
	}
	.nirmata-recruitment__hint {
		color: #9a9a9a;
	}
}
/* Étape 2 : sélection d'événement + préférences. */
.nirmata-recruitment__event-info {
	background: rgba(42, 42, 61, 0.06);
	border-left: 3px solid #2a2a3d;
	padding: 8px 12px;
	margin: 0 0 12px;
	border-radius: 2px;
}

.nirmata-recruitment__prefs {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 10px 14px;
	margin: 0 0 14px;
}

.nirmata-recruitment__prefs legend {
	font-weight: 600;
	padding: 0 4px;
}

/* Sections de préférences repliables (<details>/<summary>). */
.nirmata-recruitment__prefs > summary {
	font-weight: 600;
	cursor: pointer;
	padding: 2px 4px;
	list-style-position: inside;
}

.nirmata-recruitment__prefs[open] > summary {
	margin-bottom: 6px;
}

/* Encadré « Préférences » regroupant postes + tranches horaires. */
.nirmata-recruitment__preferences {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 10px 16px 12px;
	margin: 0 0 14px;
}

.nirmata-recruitment__preferences > legend {
	font-weight: 700;
	padding: 0 6px;
}

/* Message d'introduction : même gabarit que la mention sous le NIR (taille
   atténuée), mais avec une mise en avant douce (fond clair + liseré) pour
   signaler un point important sans alourdir le formulaire. */
.nirmata-recruitment__pref-intro {
	font-size: 0.82em;
	line-height: 1.45;
	color: #555;
	background: #f6f8fa;
	border-left: 3px solid #2a2a3d;
	padding: 8px 12px;
	margin: 4px 0 12px;
	border-radius: 2px;
}

.nirmata-recruitment__preferences .nirmata-recruitment__prefs {
	border: 1px solid #ececef;
	margin: 0 0 10px;
}

.nirmata-recruitment__check {
	display: block;
	margin: 4px 0;
}

/* Annotation grise sous un choix de préférence (ex. description du poste). */
.nirmata-recruitment__check-desc {
	display: block;
	margin: 1px 0 0 1.6em;
	font-size: 0.8em;
	font-weight: 400;
	line-height: 1.4;
	color: #777;
}

/* Mention atténuée accolée au titre « Préférences ». */
.nirmata-recruitment__legend-note {
	font-size: 0.8em;
	font-weight: 400;
	color: #777;
}

.nirmata-recruitment__hint {
	display: block;
	margin: 6px 0 0;
}

@media (prefers-color-scheme: dark) {
	.nirmata-recruitment__event-info {
		background: rgba(255, 255, 255, 0.06);
	}
	.nirmata-recruitment__prefs {
		border-color: #444;
	}
	.nirmata-recruitment__preferences {
		border-color: #444;
	}
	.nirmata-recruitment__pref-intro {
		color: #c0c4cc;
		background: rgba(255, 255, 255, 0.05);
	}
	.nirmata-recruitment__preferences .nirmata-recruitment__prefs {
		border-color: #3a3a3a;
	}
	.nirmata-recruitment__check-desc,
	.nirmata-recruitment__legend-note {
		color: #9a9a9a;
	}
}

/* Bannière de l'événement au-dessus du formulaire. */
.nirmata-recruitment__banner {
	margin: 0 0 16px;
}
.nirmata-recruitment__banner img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
}
