/* =========================================================
   MLT DEVIS — texte à gauche, formulaire CF7 en étapes à droite.
   Dépend de mlt-tokens. Habille le balisage CF7 (.wpcf7-*) dans .mlt-devis uniquement.
   ========================================================= */

.mlt-devis {
	background: var(--mlt-color-fond);
}

.mlt-devis__inner {
	display: grid;
	gap: var(--mlt-space-48);
}

.mlt-devis__reassurance {
	margin: var(--mlt-space-24) 0 0;
	color: var(--mlt-color-olive);
	font-weight: 700;
}

/* Garanties : coche botanique dans une pastille, une par ligne */
.mlt-devis__garanties {
	display: grid;
	gap: var(--mlt-space-16);
	margin: var(--mlt-space-32) 0 0;
	padding: var(--mlt-space-24) 0;
	border-top: 1px solid var(--mlt-color-ligne);
	border-bottom: 1px solid var(--mlt-color-ligne);
	list-style: none;
}

.mlt-devis__garanties li {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--mlt-space-16);
	min-height: 32px;
	color: var(--mlt-color-texte);
	font-weight: 500;
	line-height: 1.4;
}

/* Pastille botanique (::before) + coche blanche dessinée par masque (::after) */
.mlt-devis__garanties li::before {
	content: "";
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--mlt-color-botanique);
}

.mlt-devis__garanties li::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 8px;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	background-color: var(--mlt-color-blanc);
	-webkit-mask: var(--mlt-icone-coche) center / contain no-repeat;
	mask: var(--mlt-icone-coche) center / contain no-repeat;
}

.mlt-devis__contact {
	display: grid;
	gap: var(--mlt-space-4);
	margin: var(--mlt-space-24) 0 0;
	padding: 0;
	list-style: none;
}

/* -------------------- Panneau formulaire -------------------- */
.mlt-devis__form {
	padding: var(--mlt-space-32) var(--mlt-space-24);
	border-radius: var(--mlt-radius-panel);
	background: var(--mlt-color-blanc);
}

.mlt-devis__progress {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--mlt-space-8);
	margin: 0 0 var(--mlt-space-32);
	padding: 0;
	list-style: none;
}

.mlt-devis__progress-item {
	display: grid;
	gap: var(--mlt-space-8);
	padding-top: var(--mlt-space-8);
	border-top: 3px solid var(--mlt-color-ligne);
	color: var(--mlt-color-texte-doux);
	font-size: var(--mlt-fs-xsmall);
	font-weight: 500;
}

.mlt-devis__progress-item.is-active,
.mlt-devis__progress-item.is-done {
	border-top-color: var(--mlt-color-olive);
	color: var(--mlt-color-olive);
}

.mlt-devis__progress-num {
	display: none;
}

/* Sans JS (ou formulaire sans étapes) : indicateur masqué, tout le formulaire visible */
.mlt-devis__form:not(.is-steps) .mlt-devis__progress,
.mlt-devis__form:not(.is-steps) .mlt-devis__nav {
	display: none;
}

/* -------------------- Champs CF7 -------------------- */
.mlt-devis .wpcf7-form p {
	margin: 0 0 var(--mlt-space-16);
	color: var(--mlt-color-texte);
	font-size: var(--mlt-fs-small);
	font-weight: 500;
}

/* Libellés : chaque champ est dans son <label> (accessibilité) ; même rendu que le texte du <p> */
.mlt-devis .wpcf7-form p > label {
	display: block;
}

/* Groupe « Type de demande » : <fieldset> + <legend> (remise à zéro du style navigateur) */
.mlt-devis .mlt-groupe {
	min-width: 0;
	margin: 0 0 var(--mlt-space-16);
	padding: 0;
	border: 0;
}

.mlt-devis .mlt-groupe legend {
	margin: 0 0 var(--mlt-space-8);
	padding: 0;
	color: var(--mlt-color-texte);
	font-size: var(--mlt-fs-small);
	font-weight: 500;
}

.mlt-devis .wpcf7-form-control-wrap {
	display: block;
	margin-top: var(--mlt-space-4);
}

.mlt-devis input[type="text"],
.mlt-devis input[type="email"],
.mlt-devis input[type="tel"],
.mlt-devis select,
.mlt-devis textarea {
	width: 100%;
	min-height: 48px;
	padding: var(--mlt-space-8) var(--mlt-space-16);
	border: 1px solid var(--mlt-color-ligne);
	border-radius: var(--mlt-radius-card);
	background: var(--mlt-color-blanc);
	color: var(--mlt-color-texte);
	font-family: inherit;
	font-size: var(--mlt-fs-body);
	font-weight: 400;
	transition: border-color var(--mlt-duration) var(--mlt-ease);
}

.mlt-devis textarea {
	min-height: 120px;
}

.mlt-devis input:hover,
.mlt-devis select:hover,
.mlt-devis textarea:hover {
	border-color: var(--mlt-color-botanique);
}

.mlt-devis input:focus-visible,
.mlt-devis select:focus-visible,
.mlt-devis textarea:focus-visible {
	outline: none;
	border-color: var(--mlt-color-botanique);
	box-shadow: var(--mlt-focus-ring);
}

/* Type de demande : boutons radio en options cliquables */
.mlt-devis .wpcf7-radio {
	display: grid;
	gap: var(--mlt-space-8);
}

.mlt-devis .wpcf7-list-item {
	margin: 0;
}

.mlt-devis .wpcf7-list-item label {
	display: flex;
	align-items: center;
	gap: var(--mlt-space-16);
	min-height: 56px;
	padding: 0 var(--mlt-space-16);
	border: 1px solid var(--mlt-color-ligne);
	border-radius: var(--mlt-radius-card);
	cursor: pointer;
	transition: border-color var(--mlt-duration) var(--mlt-ease), background-color var(--mlt-duration) var(--mlt-ease);
}

.mlt-devis .wpcf7-list-item label:hover {
	border-color: var(--mlt-color-botanique);
}

.mlt-devis .wpcf7-list-item label:has(input:checked) {
	border-color: var(--mlt-color-olive);
	background: var(--mlt-color-fond);
	color: var(--mlt-color-olive);
	font-weight: 700;
}

.mlt-devis .wpcf7-list-item input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--mlt-color-olive);
}

.mlt-devis .wpcf7-list-item input[type="radio"]:focus-visible {
	outline: 2px solid var(--mlt-color-botanique);
	outline-offset: 2px;
}

.mlt-devis .wpcf7-not-valid-tip {
	margin-top: var(--mlt-space-4);
	color: var(--mlt-color-texte);
	font-size: var(--mlt-fs-small);
	font-weight: 700;
}

.mlt-devis .wpcf7-not-valid {
	border-color: var(--mlt-color-ocre);
}

.mlt-devis .wpcf7-response-output {
	margin: var(--mlt-space-16) 0 0;
	padding: var(--mlt-space-16);
	border-radius: var(--mlt-radius-card);
	font-size: var(--mlt-fs-small);
}

.mlt-devis .wpcf7-submit {
	min-height: 48px;
	padding: 0 var(--mlt-space-24);
	border: 0;
	border-radius: var(--mlt-radius-pill);
	background: var(--mlt-color-olive);
	color: var(--mlt-color-blanc);
	font-family: inherit;
	font-size: var(--mlt-fs-body);
	font-weight: 700;
	cursor: pointer;
	transition: background-color var(--mlt-duration) var(--mlt-ease);
}

.mlt-devis .wpcf7-submit:hover {
	background: var(--mlt-color-botanique);
}

.mlt-devis .wpcf7-submit:focus-visible {
	outline: none;
	box-shadow: var(--mlt-focus-ring);
}

.mlt-devis .wpcf7-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.mlt-devis .wpcf7-spinner {
	margin: 0 0 0 var(--mlt-space-8);
}

/* -------------------- Navigation des étapes -------------------- */
.mlt-devis__nav {
	display: flex;
	justify-content: space-between;
	gap: var(--mlt-space-16);
	margin-top: var(--mlt-space-8);
}

.mlt-devis__nav [hidden] {
	display: none;
}

.mlt-devis__next {
	margin-left: auto;
}

.mlt-devis__prev {
	border-color: var(--mlt-color-ligne);
	background: transparent;
	color: var(--mlt-color-olive);
}

.mlt-devis__prev:hover {
	border-color: var(--mlt-color-olive);
}

/* Mobile : barres seules, libellé de l'étape en cours affiché sous l'indicateur
   (les 4 libellés ne tiennent pas sur 343 px). Les autres libellés restent lisibles
   par les lecteurs d'écran. */
.mlt-devis__progress {
	position: relative;
	padding-bottom: var(--mlt-space-24);
}

.mlt-devis__progress-item:not(.is-active) .mlt-devis__progress-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.mlt-devis__progress-item.is-active .mlt-devis__progress-label {
	position: absolute;
	left: 0;
	bottom: 0;
	font-size: var(--mlt-fs-small);
	font-weight: 700;
	white-space: nowrap;
}

/* ≥ 768 px : les 4 libellés tiennent sous leurs barres */
@media (min-width: 768px) {
	.mlt-devis__progress {
		padding-bottom: 0;
	}

	.mlt-devis__progress-item {
		font-size: var(--mlt-fs-small);
	}

	.mlt-devis__progress-item:not(.is-active) .mlt-devis__progress-label,
	.mlt-devis__progress-item.is-active .mlt-devis__progress-label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
		font-size: inherit;
		font-weight: inherit;
		white-space: normal;
	}
}

@media (min-width: 1024px) {
	.mlt-devis__inner {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: var(--mlt-space-96);
		align-items: start;
	}

	.mlt-devis__form {
		padding: var(--mlt-space-48);
	}
}

/* Champ piège anti-spam (thème : includes/mlt-formulaire.php) : hors écran, jamais vu ni atteint au clavier */
.mlt-devis .mlt-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Mention de confidentialité au-dessus du bouton d'envoi */
.mlt-devis .mlt-devis__rgpd {
	margin: var(--mlt-space-16) 0;
	color: var(--mlt-color-texte-doux);
	font-size: var(--mlt-fs-small);
	line-height: 1.5;
}

.mlt-devis .mlt-devis__rgpd a {
	color: var(--mlt-color-olive);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mlt-devis .mlt-devis__rgpd a:hover {
	color: var(--mlt-color-botanique);
}

.mlt-devis .mlt-devis__rgpd a:focus-visible {
	outline: none;
	border-radius: var(--mlt-space-4);
	box-shadow: var(--mlt-focus-ring);
}

/* Vérification Cloudflare Turnstile (balise [turnstile] du formulaire) : invisible en temps normal ; si Cloudflare
   demande une interaction, la case s'affiche sous les étapes, sur toute la largeur de la carte. */
.mlt-devis .wpcf7-turnstile:not(:empty) {
	margin-top: var(--mlt-space-16);
}
