/* Gabarit « Page avec bandeau » (page-bandeau.php), maquette Location de Ludo du 02/10/2026.
   Écrit à part du bundle Tailwind pour ne pas devoir le recompiler. */

.page-bandeau {
	--bandeau-fond: #f8f4ef; /* bg-lightGray de l'en-tête */
	--bandeau-texte: #212121;
	--bandeau-trait: #c7c7c7;
	--bandeau-violet: #1a0a28;
}

/* Bandeau : image à gauche, titre sur fond crème à droite */
.bandeau {
	display: grid;
	grid-template-columns: 1fr;
	background: var(--bandeau-fond);
}

.bandeau__image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.bandeau__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 30% 62%;
}

.bandeau__texte {
	padding: 2.5rem 1.5rem 3rem;
}

.page-bandeau .bandeau__titre {
	margin: 0;
	font-family: Nocturne, system-ui;
	font-weight: 200;
	font-size: clamp(3.25rem, 7vw, 6.5rem);
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--bandeau-texte);
}

.page-bandeau .bandeau__titre::after {
	content: "";
	display: block;
	width: 3rem;
	height: 1px;
	margin-top: 2rem;
	background: currentColor;
}

.bandeau__accroche {
	max-width: 22rem;
	margin: 2rem 0 0;
	font-family: Nocturne, system-ui;
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--bandeau-texte);
}

@media (min-width: 768px) {
	.bandeau {
		grid-template-columns: minmax(0, 33%) minmax(0, 1fr);
		min-height: clamp(22rem, 31.6vw, 30rem);
	}

	.bandeau--sans-image {
		grid-template-columns: 1fr;
	}

	.bandeau__image {
		position: relative;
		aspect-ratio: auto;
	}

	/* l'image remplit la hauteur du bandeau sans l'imposer */
	.bandeau__image img {
		position: absolute;
		inset: 0;
	}

	.bandeau__texte {
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 4rem 3rem 4rem clamp(2.5rem, 4.2vw, 4rem);
	}
}

/* Corps : texte à gauche, filet vertical, formulaire à droite */
.bandeau-corps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	max-width: 60rem;
	margin: 0 auto;
	padding: 3rem 1.5rem 5rem;
}

.bandeau-corps__texte p {
	margin: 0 0 1rem;
	line-height: 1.6;
}

.bandeau-corps__formulaire {
	padding-top: 2.5rem;
	border-top: 1px solid var(--bandeau-trait);
}

@media (min-width: 900px) {
	.bandeau-corps {
		grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
		gap: 0;
		max-width: 66rem;
		padding: 2.5rem 2rem 6rem;
	}

	.bandeau-corps--seul {
		grid-template-columns: minmax(0, 40rem);
		justify-content: center;
	}

	.bandeau-corps__texte {
		padding: 1.25rem 4rem 1.25rem 0;
	}

	.bandeau-corps__formulaire {
		padding: 0 0 0 4.25rem;
		border-top: 0;
		border-left: 1px solid var(--bandeau-trait);
	}
}

/* le thème bride .wpcf7 et ses champs à 350 px, centrés */
.page-bandeau .bandeau-corps__formulaire .wpcf7 {
	max-width: none;
	margin: 0;
}

.bandeau-corps__texte a {
	text-decoration: underline;
}

/* Formulaire en grille : deux colonnes dès que la place le permet */
.page-bandeau .champs-bandeau {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem 0.75rem;
}

@media (min-width: 560px) {
	.page-bandeau .champs-bandeau {
		grid-template-columns: 1fr 1fr;
	}

	.page-bandeau .champ--large {
		grid-column: 1 / -1;
	}
}

/* sur grand écran, le texte d'aide tient dans les demi-champs (la maquette les veut petits) */
@media (min-width: 900px) {
	.page-bandeau .champs-bandeau .wpcf7-form-control-wrap > input,
	.page-bandeau .champs-bandeau .wpcf7-form-control-wrap > textarea {
		font-size: 0.875rem;
		padding: 0.5rem 0.625rem;
	}
}

.page-bandeau .champs-bandeau .wpcf7-form-control-wrap > input,
.page-bandeau .champs-bandeau .wpcf7-form-control-wrap > textarea {
	max-width: none;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	font-size: 1rem; /* 16 px : pas de zoom automatique sur iPhone */
	border-color: var(--bandeau-trait);
}

.page-bandeau .champs-bandeau textarea {
	min-height: 6.5rem;
	resize: vertical;
}

.page-bandeau .champs-bandeau .wpcf7-form-control-wrap > input:focus-visible,
.page-bandeau .champs-bandeau .wpcf7-form-control-wrap > textarea:focus-visible {
	outline: 2px solid var(--bandeau-violet);
	outline-offset: 1px;
}

.page-bandeau .champ--accord {
	margin-top: 0.5rem;
	font-size: 0.9375rem;
}

.page-bandeau .champ--envoi .wpcf7-submit {
	width: 100%;
	max-width: 21rem;
	margin-top: 0.75rem;
	padding-right: 3rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12' fill='none' stroke='%231a0a28' stroke-width='1.5'%3E%3Cpath d='M0 6h18M13 1l5 5-5 5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1.25rem center;
}

.page-bandeau .champ--envoi .wpcf7-submit:focus-visible {
	outline: 2px solid var(--bandeau-violet);
	outline-offset: 2px;
}

/* au survol, le thème remplit le bouton en violet : la flèche passe en blanc */
.page-bandeau .champ--envoi .wpcf7-submit:hover {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12' fill='none' stroke='%23ffffff' stroke-width='1.5'%3E%3Cpath d='M0 6h18M13 1l5 5-5 5'/%3E%3C/svg%3E");
}

.page-bandeau .wpcf7 form .wpcf7-response-output {
	margin: 1.5rem 0 0;
}
