/* Formulaires CINDYNIQ : erreurs, pot de miel, cartes de besoin du devis. */
.cq-turnstile:not(:empty) { margin-top: 16px; }
.cq-pot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cq-masque { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

form[data-cq-formulaire], .cq-erreurs { scroll-margin-top: 150px; }
.cq-erreurs { border: 2px solid #C4232F; border-radius: 12px; background: #FCEBEC; padding: 16px 20px; color: #0E1B3D; font-size: 16px; line-height: 1.5; }
.cq-erreurs:focus { outline: 3px solid #0E1B3D; outline-offset: 2px; }
.cq-erreurs p { margin: 0 0 6px; font-weight: 700; }
.cq-erreurs ul { margin: 0; padding-left: 20px; }
.cq-erreurs a { color: #0E1B3D; }
.cq-erreur { margin: 6px 0 0; color: #A51C27; font-size: 15px; font-weight: 600; line-height: 1.4; }
[aria-invalid="true"] { border-color: #C4232F !important; }

.pg-need:has(input:checked) { border: 2px solid #0E1B3D !important; background: #EAF0FB !important; }
.pg-need:has(input:checked) .pg-need-dot { border: 7px solid #C4232F !important; }
.pg-need:has(input:focus-visible) { outline: 3px solid #0E1B3D; outline-offset: 2px; }
.pg-need:hover { border-color: #0E1B3D !important; }

/* ---------- Animations (charte calme ; coupées si « réduire les animations ») ---------- */
@keyframes cq-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cq-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
	/* Erreurs renvoyées par le serveur : le résumé puis les messages sous les champs. */
	.cq-erreurs { animation: cq-entree .3s ease-out both; }
	.cq-erreur { animation: cq-entree .3s ease-out .1s both; }
	/* Devis : l'étape qui arrive après « Continuer » ou « Retour », et sa pastille. */
	.cq-etape-arrivee { animation: cq-entree .35s cubic-bezier(.2, .7, .2, 1) both; }
	/* Inscription : le récapitulatif se met à jour en fondu. */
	.cq-recap-maj { animation: cq-entree .3s ease-out; }
}
/* Bouton pendant l'envoi : roue discrète, double clic bloqué par formulaires.js. */
button[aria-busy="true"] { cursor: progress !important; opacity: .85; }
button[aria-busy="true"]::after { content: ""; display: inline-block; width: 16px; height: 16px; margin-left: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -3px; animation: cq-tourne .7s linear infinite; }
@media (prefers-reduced-motion: reduce) {
	button[aria-busy="true"]::after { animation: none; border-right-color: currentColor; opacity: .5; }
}
