/* ==========================================================================
   E07 — Style du formulaire de réservation natif (.eav-resa-form)
   Fichier : assets/css/form-resa.css
   Déclaré conditionnellement (is_singular('restaurant')) dans functions.php.

   Conventions (cf. style.css + theme.json) :
   - Tokens --atq-* (lie #7A2E33, vigne #2E9A8D, terre #3E2A22, papier #F7F1E7…).
   - Focus anneau « vigne » sur tous les champs.
   - Bouton primaire « lie » → survol « terre ».
   - Layout 2 colonnes sur desktop (≥ 640px), pleine largeur sur mobile.
   - Pas de CSS inline dans le balisage (skill wordpress-integration).
   ========================================================================== */

/* --- Conteneur du formulaire --- */
.eav-resa-form {
	font-family: Inter, system-ui, -apple-system, sans-serif;
	color: var(--atq-encre, #2A231F);
	max-width: 640px;
}

/* --- Lignes & champs --- */
.eav-resa-form .eav-resa-row {
	margin: 0 0 1rem;
	width: 100%;
}
.eav-resa-form .eav-field {
	margin: 0 0 1rem;
	display: flex;
	flex-direction: column;
}

/* Labels : compacts, en terre */
.eav-resa-form label,
.eav-resa-form .eav-label,
.eav-resa-form legend {
	display: block;
	font-family: Inter, sans-serif;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--atq-terre, #3E2A22);
	margin: 0 0 0.4rem;
	padding: 0;
	letter-spacing: 0.01em;
}
.eav-resa-form .eav-req {
	color: var(--atq-lie, #7A2E33);
	margin-left: 2px;
}

/* Inputs / selects / textareas */
.eav-resa-form input[type="text"],
.eav-resa-form input[type="email"],
.eav-resa-form input[type="tel"],
.eav-resa-form input[type="date"],
.eav-resa-form select,
.eav-resa-form textarea,
.eav-resa-form .eav-formule-fallback {
	width: 100%;
	background-color: #ffffff;
	border: 1px solid #cabda8;
	border-radius: var(--atq-radius, 9px);
	color: var(--atq-encre, #2A231F);
	font-family: Inter, system-ui, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	padding: 0.75rem 0.875rem;
	min-height: 48px;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.eav-resa-form input::placeholder,
.eav-resa-form textarea::placeholder {
	color: var(--atq-aide, #6b5d4e);
	opacity: 1;
}

/* Focus : anneau vigne */
.eav-resa-form input:focus,
.eav-resa-form select:focus,
.eav-resa-form textarea:focus,
.eav-resa-form .eav-formule-fallback:focus {
	border-color: var(--atq-vigne-texte, #1F6E64);
	box-shadow: 0 0 0 3px rgba(76, 97, 65, .18);
	background-color: #ffffff;
}

/* Select : flèche personnalisée */
.eav-resa-form select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233E2A22' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	padding-right: 2.5rem;
}

/* Input date : icône calendrier cohérente (webkit) */
.eav-resa-form input[type="date"]::-webkit-calendar-picker-indicator {
	opacity: 0.5;
	cursor: pointer;
}

/* --- Aide sous champ + états ok/error --- */
.eav-resa-form .eav-field-help {
	font-size: 0.75rem;
	color: var(--atq-aide, #6b5d4e);
	margin: 0.35rem 0 0;
	min-height: 1em;
}
.eav-resa-form .eav-field-help.is-ok { color: var(--atq-vigne-texte, #1F6E64); }
.eav-resa-form .eav-field-help.is-error { color: var(--atq-lie, #7A2E33); font-weight: 500; }

/* --- Radios : cases nettes + libellés lisibles --- */
.eav-resa-form .eav-radios {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.eav-resa-form .eav-radios-vin {
	gap: 0.6rem;
}
.eav-resa-form .eav-radios label.eav-radio,
.eav-resa-form .eav-radios label {
	display: flex;
	align-items: center;
	font-size: 0.95rem;
	font-weight: 400;
	color: var(--atq-encre, #2A231F);
	cursor: pointer;
	margin: 0;
}
.eav-resa-form input[type="radio"],
.eav-resa-form input[type="checkbox"] {
	width: 20px;
	height: 20px;
	min-height: 20px;
	border: 1px solid #cabda8;
	border-radius: 5px;
	background: #ffffff;
	padding: 0;
	margin-right: 0.55rem;
	accent-color: var(--atq-vigne-texte, #1F6E64);
	vertical-align: middle;
	cursor: pointer;
	flex-shrink: 0;
}
.eav-resa-form input[type="radio"] { border-radius: 50%; }
.eav-resa-form input[type="radio"]:focus,
.eav-resa-form input[type="checkbox"]:focus {
	box-shadow: 0 0 0 3px rgba(76, 97, 65, .18);
}

/* Fieldset vin : encadré léger pour distinguer le bloc */
.eav-resa-form .eav-field-vin {
	border: 1px solid #e4dbcb;
	border-radius: var(--atq-radius, 9px);
	padding: 1rem 1.1rem 0.5rem;
	margin-bottom: 1.25rem;
	background: #fdfaf3;
}
.eav-resa-form .eav-field-vin legend {
	padding: 0 0.4rem;
}

/* --- Bouchon live (estimation) --- */
.eav-resa-form .eav-bouchon-live {
	background: var(--atq-vigne-clair, #eef2e8);
	border: 1px solid var(--atq-vigne, #2E9A8D);
	border-radius: var(--atq-radius-sm, 6px);
	padding: 0.7rem 0.9rem;
	margin: 0.8rem 0 0;
	font-size: 0.9rem;
	color: var(--atq-vigne-texte, #1F6E64);
}
.eav-resa-form .eav-bouchon-live strong {
	font-size: 1.15rem;
	font-weight: 600;
}
.eav-resa-form .eav-bouchon-live small {
	color: #6b7d5e;
	font-size: 0.72rem;
}

/* --- Checkboxes (anniversaire, charte) --- */
.eav-resa-form .eav-field-check {
	margin: 0 0 0.9rem;
}
.eav-resa-form .eav-check {
	display: flex;
	align-items: flex-start;
	font-size: 0.9rem;
	color: var(--atq-encre, #2A231F);
	cursor: pointer;
}
.eav-resa-form .eav-check small {
	color: var(--atq-aide, #6b5d4e);
	font-size: 0.78rem;
}
.eav-resa-form .eav-check a {
	color: var(--atq-vigne-texte, #1F6E64);
	text-decoration: underline;
}

/* --- Honeypot : masqué aux humains, visible aux bots (position absolue hors écran) --- */
.eav-resa-form .eav-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Indice « chargement » (avant hydratation) --- */
.eav-resa-form .eav-empty-hint {
	font-size: 0.85rem;
	color: var(--atq-aide, #6b5d4e);
	margin: 0 0 0.3rem;
}

/* --- Bouton de soumission : primaire lie → survol terre --- */
.eav-resa-form .eav-btn-submit {
	width: 100%;
	background: var(--atq-lie, #7A2E33);
	color: var(--atq-papier, #F7F1E7);
	border: none;
	border-radius: var(--atq-radius, 9px);
	font-family: Inter, sans-serif;
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.01em;
	padding: 0.95rem 1.75rem;
	min-height: 52px;
	cursor: pointer;
	transition: background-color .18s ease, transform .08s ease;
	-webkit-appearance: none;
	appearance: none;
	margin-top: 0.5rem;
}
.eav-resa-form .eav-btn-submit:hover {
	background: var(--atq-terre, #3E2A22);
}
.eav-resa-form .eav-btn-submit:focus-visible {
	box-shadow: 0 0 0 3px rgba(76, 97, 65, .35);
}
.eav-resa-form .eav-btn-submit:active {
	transform: translateY(1px);
}
.eav-resa-form .eav-btn-submit:disabled,
.eav-resa-form .eav-btn-submit.is-loading {
	opacity: 0.75;
	cursor: progress;
}
.eav-resa-form .eav-form-foot {
	font-size: 0.78rem;
	color: var(--atq-aide, #6b5d4e);
	text-align: center;
	margin: 0.9rem 0 0;
}

/* --- Message de statut (succès / erreur / chargement) --- */
.eav-resa-form .eav-resa-status {
	border-radius: var(--atq-radius, 9px);
	font-family: Inter, sans-serif;
	font-size: 0.95rem;
	font-weight: 500;
	padding: 1rem 1.25rem;
	margin: 0 0 1.25rem;
}
.eav-resa-form .eav-resa-status.is-success {
	background: var(--atq-vigne-clair, #eef2e8);
	border: 1px solid var(--atq-vigne, #2E9A8D);
	color: var(--atq-vigne-texte, #1F6E64);
}
.eav-resa-form .eav-resa-status.is-error {
	background: var(--atq-lie-clair, #fdf5f2);
	border: 1px solid var(--atq-lie, #7A2E33);
	color: var(--atq-lie, #7A2E33);
}
/* K3 : saisie rejouee apres le mur d'inscription. */
.eav-resa-form .eav-resa-status.is-info {
	background: var(--atq-carte, #fdfaf3);
	border: 1px solid var(--atq-sable, #E4DBCB);
	color: var(--atq-terre, #3E2A22);
}
.eav-resa-form .eav-form-mur {
	margin-top: .75rem;
	color: var(--atq-terre, #3E2A22);
}
.eav-resa-form .eav-resa-status.is-loading {
	background: #f4efe4;
	border: 1px solid #cabda8;
	color: var(--atq-terre, #3E2A22);
}

/* --- Responsive : 2 colonnes sur desktop (≥ 640px) --- */
@media (min-width: 640px) {
	.eav-resa-form .eav-row-2col {
		display: flex;
		gap: 1rem;
	}
	.eav-resa-form .eav-row-2col .eav-field {
		flex: 1 1 0;
	}
	.eav-resa-form .eav-btn-submit {
		width: auto;
		min-width: 240px;
	}
}

/* --- Responsive mobile : pleine largeur, font 16px (anti-zoom iOS) --- */
@media (max-width: 600px) {
	.eav-resa-form input[type="text"],
	.eav-resa-form input[type="email"],
	.eav-resa-form input[type="tel"],
	.eav-resa-form input[type="date"],
	.eav-resa-form select,
	.eav-resa-form textarea {
		font-size: 16px;
	}
}


/* --- I6 (E51/DEC-188) : texte d'engagement charte, au-dessus de la case --- */
.eav-resa-form .eav-charte-engagement {
	color: #4f5f44;
	font-size: 0.78rem;
	line-height: 1.5;
	margin: 0 0 0.5rem;
}

/* --- I8 (E51/DEC-188) : ecran de succes remplace le formulaire --- */
.eav-resa-form.is-done > *:not(.eav-resa-status) {
	display: none;
}
.eav-resa-form .eav-success-msg {
	font-weight: 600;
	margin: 0 0 0.5rem;
}
.eav-resa-form .eav-success-recap {
	margin: 0 0 0.75rem;
}
.eav-resa-form .eav-success-rappel {
	font-size: 0.85rem;
	opacity: 0.9;
	margin: 0 0 0.75rem;
}
.eav-resa-form .eav-success-link a {
	font-weight: 600;
	text-decoration: underline;
	color: inherit;
}

/* ==========================================================================
   NOTE : Les règles Forminator (.forminator-custom*) du dépôt original sont
   conservées ci-dessous pour réutilisation future si migration vers Forminator.
   E07 utilise un form HTML natif (.eav-resa-form ci-dessus).
   ========================================================================== */

/* --- Aperçu des formules (I4) : résumé lecture seule au-dessus du formulaire.
   Hors .eav-resa-form (le bloc est un frère du <form>, pas un descendant) --- */
.eav-formules-apercu {
	font-family: Inter, system-ui, -apple-system, sans-serif;
	max-width: 640px;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--atq-papier, #F7F1E7);
	border: 1px solid rgba(62, 42, 34, 0.12);
	border-radius: var(--atq-radius, 9px);
}
.eav-formules-apercu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.eav-formules-apercu-list li {
	font-size: 0.9rem;
	line-height: 1.4;
	color: var(--atq-encre, #2A231F);
}
.eav-formules-apercu-list li strong {
	color: var(--atq-terre, #3E2A22);
	font-weight: 600;
}
