/* ==========================================================================
   Formulaires (Contact, Bon cadeau) : habillage de Fluent Forms aux styles du thème
   Les feuilles de Fluent Forms sont retirées ; seules leurs règles utiles sont reprises ici.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Règles fonctionnelles reprises de Fluent Forms
   -------------------------------------------------------------------------- */

/* Champ conditionnel : Fluent Forms pose « ff_cond_v » quand il doit être visible, « ff_excluded » sinon */
.fluentform .has-conditions,
.fluentform .ff_excluded {
	display: none !important;
}

.fluentform .has-conditions.ff_cond_v {
	display: grid !important;
	height: auto !important;
	overflow: visible !important;
}

.fluentform .ff-hidden {
	display: none !important;
}

.fluentform .ff-hpsf-container {
	display: none !important; /* pot de miel anti-spam */
}

.fluentform fieldset {
	min-width: 0;
}

/* --------------------------------------------------------------------------
   Carte du formulaire
   -------------------------------------------------------------------------- */

.formulaire {
	display: grid;
	gap: 1.5rem;
	padding: clamp(1.5rem, 0.964rem + 2.2vw, 3rem);
	border-radius: 1.5rem;
	background: var(--c-creme);
}

.formulaire__entete {
	display: grid;
	gap: 0.375rem;
}

.formulaire__note {
	font-size: var(--fs-libelle);
	line-height: var(--lh-corps);
}

.formulaire__absent {
	color: var(--c-terracotta);
}

/* --------------------------------------------------------------------------
   Champs
   -------------------------------------------------------------------------- */

.fluentform .frm-fluent-form {
	display: grid;
	gap: 1.5rem;
}

.fluentform .frm-fluent-form > fieldset {
	display: grid;
	gap: 1.5rem;
}

.fluentform .ff-el-group {
	display: grid;
	gap: 0.5rem;
	margin: 0;
}

/* Colonnes (Nom / Prénom…) : côte à côte à partir de 600 px */
.fluentform .ff-t-container {
	display: grid;
	gap: 1.5rem 1.25rem;
}

.fluentform .ff-t-cell {
	min-width: 0;
}

@media (min-width: 37.5em) {
	.fluentform .ff-t-container {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Intertitres du bon cadeau (« Vos coordonnées »…) */
.formulaire__groupe {
	margin-top: 0.75rem;
	color: var(--c-encre);
	font-size: var(--fs-sous-titre);
	line-height: var(--lh-sous-titre);
}

.fluentform .ff-custom_html:first-child .formulaire__groupe {
	margin-top: 0;
}

.fluentform .ff-el-input--label label {
	display: block;
	color: var(--c-teal-profond);
	font-size: var(--fs-libelle);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Le libellé du choix « Mode de remise » reste lisible par les lecteurs d'écran seulement */
.fluentform .ginkgo-sans-libelle > .ff-el-input--label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.fluentform .ff-el-form-control {
	width: 100%;
	min-height: 3.25rem; /* 52 px, zone tactile confortable */
	padding: 0.9375rem 1.125rem;
	border: 1px solid var(--c-vert-doux);
	border-radius: 0.625rem;
	background: var(--c-creme);
	color: var(--c-encre);
	font-family: var(--f-texte);
	font-size: 1rem; /* 16 px : pas de zoom automatique sur iPhone */
	font-weight: 300;
	line-height: 1.3;
	transition: border-color var(--duree) var(--ease), box-shadow var(--duree) var(--ease);
}

.fluentform .ff-el-form-control::placeholder {
	color: rgb(58 46 42 / 0.6);
	opacity: 1;
}

.fluentform .ff-el-form-control:hover {
	border-color: var(--c-teal-clair);
}

.fluentform .ff-el-form-control:focus {
	border-color: var(--c-teal-profond);
	outline: none;
	box-shadow: 0 0 0 3px rgb(13 135 112 / 0.15);
}

.fluentform textarea.ff-el-form-control {
	min-height: 9.375rem; /* 150 px */
	resize: vertical;
}

.fluentform select.ff-el-form-control {
	padding-right: 3rem;
	background: var(--c-creme) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%233A2E2A' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 1.125rem center / 1.25rem;
	appearance: none;
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   Boutons radio et case de consentement
   -------------------------------------------------------------------------- */

.fluentform .ff-el-form-check {
	margin: 0;
}

.fluentform .ff-el-form-check + .ff-el-form-check {
	margin-top: 0.75rem;
}

.fluentform .ff-el-form-check-label {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.75rem;
	min-height: 1.75rem;
	line-height: 1.5;
	cursor: pointer;
}

.fluentform .ff-el-form-check-input {
	flex-shrink: 0;
	width: 1.375rem; /* 22 px */
	height: 1.375rem;
	margin: 0;
	border: 1.5px solid var(--c-teal-profond);
	background: var(--c-creme);
	appearance: none;
	cursor: pointer;
	transition: background-color var(--duree) var(--ease), box-shadow var(--duree) var(--ease);
}

.fluentform input[type="radio"].ff-el-form-check-input {
	border-radius: 50%;
}

.fluentform input[type="radio"].ff-el-form-check-input:checked {
	box-shadow: inset 0 0 0 4px var(--c-creme);
	background: var(--c-teal-profond);
}

.fluentform input[type="checkbox"].ff-el-form-check-input {
	border-radius: 0.3125rem;
}

.fluentform input[type="checkbox"].ff-el-form-check-input:checked {
	background: var(--c-teal-profond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 7.5 2.5 2.5L11 4.5'/%3E%3C/svg%3E") center / 0.875rem no-repeat;
}

.fluentform .ff-el-form-check-input:focus-visible {
	outline: 2px solid var(--c-vert-jungle);
	outline-offset: 2px;
}

.fluentform .ff-el-tc .ff-el-form-check-label {
	font-size: var(--fs-libelle);
}

.fluentform .ff-el-tc a {
	color: var(--c-teal-profond);
}

/* --------------------------------------------------------------------------
   Erreurs et bouton d'envoi
   -------------------------------------------------------------------------- */

.fluentform .text-danger,
.fluentform .error {
	margin-top: 0.25rem;
	color: var(--c-terracotta);
	font-size: var(--fs-libelle);
	font-weight: 400;
}

.fluentform .ff-el-is-error .ff-el-form-control,
.fluentform .ff-el-is-error .ff-el-form-check-input {
	border-color: var(--c-terracotta);
}

.fluentform .ff_submit_btn_wrapper {
	margin-top: 0.5rem;
}

.fluentform .ff-btn-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--zone-tactile);
	padding: 0.9375rem 1.875rem;
	border: 0;
	border-radius: 999px;
	background: var(--c-teal-titre);
	color: var(--c-blanc);
	font-family: var(--f-texte);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.445;
	letter-spacing: var(--ls-info);
	cursor: pointer;
	transition: background-color var(--duree) var(--ease), box-shadow var(--duree) var(--ease);
}

.fluentform .ff-btn-submit:hover,
.fluentform .ff-btn-submit:focus-visible {
	background: var(--c-vert-survol);
	box-shadow: var(--ombre-bouton);
}

.fluentform .ff-btn-submit[disabled],
.fluentform .ff-working .ff-btn-submit {
	opacity: 0.7;
	cursor: progress;
}

@media (max-width: 47.99em) {
	.fluentform .ff-btn-submit {
		width: 100%;
	}
}

/* Message affiché sous le formulaire si la fenêtre ne peut pas s'ouvrir */
.ff-message-success {
	margin-top: 1rem;
	padding: 1.25rem;
	border: 1px solid var(--c-vert-doux);
	border-radius: 0.75rem;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Fenêtre « Merci ! »
   -------------------------------------------------------------------------- */

.confirmation {
	width: min(35rem, 100% - 2rem); /* 560 px */
	padding: clamp(2rem, 1.464rem + 2.2vw, 3.5rem);
	border: 0;
	border-radius: 1.5rem;
	background: var(--c-creme);
	color: var(--c-encre);
	box-shadow: 0 24px 60px rgb(59 46 41 / 0.18);
	text-align: center;
}

.confirmation[open] {
	display: grid;
	justify-items: center;
	gap: 0.875rem;
}

.confirmation::backdrop {
	background: rgb(58 46 42 / 0.45);
}

.confirmation__feuille {
	width: 3.625rem;
	height: auto;
}

.confirmation__contenu {
	display: grid;
	gap: 0.875rem;
	font-size: 1.0625rem;
}

.confirmation__merci {
	color: var(--c-terracotta);
	font-family: var(--f-manuscrit);
	font-size: clamp(3rem, 2.629rem + 1.524vw, 4rem); /* 48 → 64 */
	line-height: 1.05;
}

.confirmation__titre {
	font-family: var(--f-titre);
	font-size: var(--fs-titre-bloc);
	font-weight: var(--fw-titre);
	line-height: 1.15;
}

.confirmation form {
	margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Page Bon cadeau · Commander
   -------------------------------------------------------------------------- */

.commander {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--c-fond-clair);
}

.commander::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: url("../img/aquarelle-clair.webp") center / cover;
	opacity: 0.3;
}

.commander__filigrane {
	bottom: -2rem;
	left: -9.75rem;
	width: 25.625rem;
	transform: rotate(-8.15deg);
}

.commander__grille,
.contact-page__grille {
	display: grid;
	gap: 2.5rem;
	align-items: start;
}

.commander__cote {
	display: grid;
	gap: 1.75rem;
}

.commander__visuel img {
	width: 100%;
	max-width: 28.3rem;
	height: auto;
	margin-inline: auto;
	transform: rotate(3deg);
}

.carte-info--beige {
	background: var(--c-beige);
}

/* --------------------------------------------------------------------------
   Page Contact
   -------------------------------------------------------------------------- */

.contact-page {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--c-beige);
}

.contact-page__filigrane {
	right: -3rem;
	bottom: -6rem;
	width: 34rem;
	transform: rotate(-8.15deg);
}

.contact-page__infos {
	display: grid;
	gap: 1.625rem;
}

.contact-page__plan {
	overflow: hidden;
	aspect-ratio: 440 / 300;
	border-radius: 1.25rem;
	background: var(--c-vert-doux);
}

.contact-page__plan a {
	display: block;
	height: 100%;
}

.contact-page__plan img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.contact-page__reseaux {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	padding: 0;
	list-style: none;
}

/* Côte à côte seulement quand la carte du formulaire garde une largeur confortable */
@media (min-width: 80em) {
	.commander__grille,
	.contact-page__grille {
		grid-template-columns: minmax(0, 1fr) minmax(0, 27.5rem); /* formulaire / 440 px */
		gap: clamp(2.5rem, -5rem + 9.375vw, 4rem); /* 40 px à 1280 → 64 px à 1440 */
	}

	.commander__cote {
		position: sticky;
		top: calc(var(--entete-h) + 2rem);
	}
}

/* Champ avec unité (« € » du montant libre) */
.fluentform .ff_input-group {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}

.fluentform .ff_input-group .ff-el-form-control {
	flex: 1;
	min-width: 0;
}

.fluentform .ff_input-group-text {
	color: var(--c-teal-profond);
	font-weight: 500;
}
