/*
 * formulaires.css — page Contact : photo pleine largeur + formulaire posé dessus (maquette
 * « STB - Contact.png »). Champs aux contours arrondis, fond semi-transparent laissant deviner
 * la photo, placeholders faisant office d'étiquette visuelle (labels réels en .screen-reader-text).
 * Complété en Phase 5 pour la modale « Ajouter un poste ».
 */

/* -------------------------------------------------------------------------
 * Zone hero photo + formulaire (templates/contact-hero.php).
 * ---------------------------------------------------------------------- */

.contact-hero {
	position: relative;
	overflow: hidden;
	color: var(--stb-navy-text);
}

.contact-hero__photo {
	position: absolute;
	inset: 0;
	z-index: 0;
	/* Dégradé de repli tant qu'aucune photo n'est fournie ; une fois une photo présente, elle
	   est posée en background-image inline (cf. contact-hero.php) et ces réglages l'affichent
	   correctement. Aucun voile de couleur par-dessus : la maquette pose le formulaire
	   directement sur la photo, sans overlay ajouté (cahier des charges §2). */
	background-color: var(--stb-navy);
	background-image: linear-gradient(135deg, var(--stb-navy) 0%, #33418f 45%, var(--stb-gray-light) 100%);
	background-size: cover;
	background-position: center;
}

.contact-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: flex-end;
	padding-block: clamp(3rem, 8vw, 6rem);
}

.contact-hero__col {
	width: 100%;
	max-width: 560px;
}

.contact-hero__titre {
	text-align: left;
	color: var(--stb-navy);
	text-shadow: var(--stb-shadow-title);
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	margin-bottom: 1.25rem;
}

/* Transition de fin de hero vers la section suivante (FAQ, fond blanc) : jamais de vague
   avant le formulaire, seulement après (cahier des charges + description de maquette).
   Pas de background ici (comme .hero-accueil__vague) : la photo doit rester visible derrière
   la vague blanche, pas une bande navy plaquée par-dessus. */
.contact-hero__vague {
	position: relative;
	z-index: 1;
	line-height: 0;
}

.contact-hero__vague .stb-vague {
	display: block;
	line-height: 0;
}

.contact-hero__vague .stb-vague svg {
	display: block;
	width: 100%;
	height: clamp(40px, 8vw, 90px);
}

/* -------------------------------------------------------------------------
 * Formulaire.
 * ---------------------------------------------------------------------- */

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.contact-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.contact-form__field {
	display: flex;
}

.contact-form__field--full {
	width: 100%;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
	width: 100%;
	font-family: var(--stb-font);
	font-size: 1rem;
	color: var(--stb-navy-text);
	background: rgba(255, 255, 255, 0.55);
	border: 2px solid var(--stb-navy);
	border-radius: var(--stb-radius-md);
	padding: 0.9em 1.1em;
}

.contact-form textarea {
	min-height: 9rem;
	resize: vertical;
	font-family: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
	color: var(--stb-navy-text);
	opacity: 0.75;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
	outline: 3px solid var(--stb-gold);
	outline-offset: 2px;
	background: rgba(255, 255, 255, 0.85);
}

/* Honeypot : masqué visuellement (pas en display:none, pour rester dans le flux vis-à-vis des
   robots les moins naïfs) mais jamais accessible ni visible pour un visiteur humain. */
.contact-form__honeypot {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
}

.contact-form__actions {
	margin-top: 0.25rem;
}

.contact-form__message {
	margin-bottom: 1.25rem;
	padding: 0.9em 1.2em;
	border-radius: var(--stb-radius-md);
	font-weight: 700;
}

.contact-form__message--succes {
	background: rgba(255, 255, 255, 0.85);
	color: #0b6b2e;
	border: 2px solid #0b6b2e;
}

.contact-form__message--erreur {
	background: rgba(255, 255, 255, 0.85);
	color: var(--stb-contact-red);
	border: 2px solid var(--stb-contact-red);
}

@media (max-width: 700px) {
	.contact-hero__inner {
		justify-content: center;
	}

	.contact-hero__col {
		max-width: none;
	}

	.contact-hero__titre {
		text-align: center;
	}

	.contact-form__row {
		grid-template-columns: 1fr;
	}
}
