/* ================================================================
   Math Universe — HABILLAGE « formulaires » (handle mu-habillage-formulaires)

   Écrans : connexion (/dashboard/ d'un visiteur), mot de passe oublié et
   nouveau mot de passe, inscription (/register/, carte Elementor),
   « Compléter mon profil », fenêtre de validation des formulaires élèves
   (.mu-alerte, formulaires.js), cases de consentement.
   Même balisage, mêmes textes : seule la présentation change.

   CE QUI CHANGE À L'ÉCRAN
   - fond : photo FIXE (plus de fondu ni de zoom permanent), voile violet
     de marque et quadrillage « cahier » ; la seconde photo n'est plus
     téléchargée ;
   - bureau (≥ 992 px) : marque à gauche, carte à droite, comme la page
     d'inscription : le formulaire est visible sans défiler ;
   - carte blanche pleine (plus de transparence), barre de couleur en
     haut, titre en <h1> (balise posée par habillage.php) ;
   - champs : police 16 px (plus de zoom automatique sur iPhone), bord
     contrasté 3,7:1, anneau de focus visible, états erreur et valide ;
   - bouton : violet plein (le dégradé finissait sur du rose, texte blanc
     à 3,6:1 : sous le seuil AA), état « envoi en cours » (habillage.js) ;
   - fenêtre de validation : même comportement, dessin revu ;
   - contrastes : tous les textes ≥ 4,5:1 (l'ancien gris #8A7FA8 était à
     3,7:1, le texte indicatif #B4A9CE à 2,2:1).

   RÈGLES DE CETTE FEUILLE
   - Toutes les règles partent de body.mu-habillage--formulaires (classe
     posée par habillage.php) : rien ne s'applique ailleurs.
   - Couleurs, tailles, rayons : jetons de mu-jetons.css seulement.
   - !important SEULEMENT là où la règle remplacée le porte déjà
     (auth-pages.css du thème enfant, formulaires.css du module
     profil-eleve, une règle de Histudy) : chaque bloc concerné le dit. Écart à la charte
     consigné dans docs/noyau/lotH-depot.md ; il disparaît au lot 6, quand
     ces feuilles s'en vont avec le thème enfant.
   - Tout en px : html vaut 10 px sur le site (Histudy) et 16 px sur le
     tableau de bord Tutor.

   Créée le 09/11/2026 (lot H, Sprint 3).
   ================================================================ */

@keyframes muHabRotation {
	to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------------
   1. FOND DES PAGES D'AUTHENTIFICATION
   ---------------------------------------------------------------- */

/* Photo fixe : plus de zoom de 30 s en boucle. */
body.mu-habillage--formulaires .mu-auth-page::before {
	inset: 0;
	animation: none;
	transform: none;
}

/* Seconde photo (fondu enchaîné) retirée : un téléchargement de moins. */
body.mu-habillage--formulaires .mu-auth-page::after {
	display: none;
}

/* Le calque des taches de couleur porte maintenant le quadrillage,
   estompé vers les bords. */
body.mu-habillage--formulaires .mu-auth-blobs {
	background-image:
		linear-gradient(var(--mu-quadrillage) 1px, transparent 1px),
		linear-gradient(90deg, var(--mu-quadrillage) 1px, transparent 1px);
	background-size: 32px 32px;
	-webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%);
	mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%);
}

/* Taches immobiles et plus discrètes. */
body.mu-habillage--formulaires .mu-auth-blobs span {
	animation: none;
	will-change: auto;
}

body.mu-habillage--formulaires .mu-auth-blobs span:nth-child(1) { opacity: .32; }
body.mu-habillage--formulaires .mu-auth-blobs span:nth-child(2) { opacity: .16; }
body.mu-habillage--formulaires .mu-auth-blobs span:nth-child(3) { opacity: .18; }

body.mu-habillage--formulaires .mu-auth-page {
	padding: var(--mu-e-8) var(--mu-e-5) var(--mu-e-9);
	align-items: center;
}

body.mu-habillage--formulaires .mu-auth-page.mu-auth-page-embedded {
	padding: var(--mu-e-8) var(--mu-e-5) var(--mu-e-8);
}

/* ----------------------------------------------------------------
   2. MARQUE (logo + phrase d'accroche en arabe) ET MISE EN PAGE
   ---------------------------------------------------------------- */
body.mu-habillage--formulaires .mu-auth-brand {
	margin-bottom: var(--mu-e-5);
	animation: none;
}

/* Logo posé dans une pastille de verre, sans flottement. */
body.mu-habillage--formulaires .mu-auth-brand .mu-auth-logo {
	box-sizing: content-box;
	width: 56px;
	padding: 14px;
	margin: 0 auto var(--mu-e-4);
	border-radius: var(--mu-r-pill);
	background: rgba(255, 255, 255, .1);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
	filter: none;
	animation: none;
}

body.mu-habillage--formulaires .mu-auth-tagline {
	font-family: var(--mu-police-ar);
	font-weight: var(--mu-g-titre);
	font-size: 20px;
	line-height: 1.45;
	text-shadow: none;
}

/* Trait orange sous l'accroche : repère de marque. */
body.mu-habillage--formulaires .mu-auth-tagline::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin: var(--mu-e-4) auto 0;
	border-radius: var(--mu-r-pill);
	background: var(--mu-accent);
}

@media (min-width: 992px) {
	body.mu-habillage--formulaires .mu-auth-inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
		align-items: center;
		gap: var(--mu-e-8);
		max-width: 1080px;
	}

	body.mu-habillage--formulaires .mu-auth-brand {
		margin: 0;
		padding: var(--mu-e-6);
	}

	body.mu-habillage--formulaires .mu-auth-brand .mu-auth-logo {
		width: 80px;
		padding: 22px;
		margin-bottom: var(--mu-e-5);
	}

	body.mu-habillage--formulaires .mu-auth-tagline {
		max-width: 440px;
		margin: 0 auto;
		font-size: 34px;
		line-height: 1.4;
	}

	body.mu-habillage--formulaires .mu-auth-tagline::after {
		width: 72px;
		margin-top: var(--mu-e-5);
	}
}

/* ----------------------------------------------------------------
   3. CARTE
   ---------------------------------------------------------------- */

/* Blanc plein et barre de couleur en haut (dessinée par le fond : elle
   suit l'arrondi de la carte sans élément de plus).
   !important (padding) : contre auth-pages.css §3, qui le porte déjà. */
body.mu-habillage--formulaires .mu-auth-card {
	padding: var(--mu-e-7) 40px var(--mu-e-6) !important;
	border-radius: var(--mu-r-md);
	background:
		linear-gradient(90deg, var(--mu-violet-700), var(--mu-violet-500) 55%, var(--mu-orange-500)) top left / 100% 5px no-repeat,
		var(--mu-fond-page);
	box-shadow: 0 24px 64px rgba(20, 8, 44, .38), 0 2px 6px rgba(20, 8, 44, .12);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	animation: none;
}

/* L'ancien petit trait centré est remplacé par la barre du haut. */
body.mu-habillage--formulaires .mu-auth-divider {
	display: none;
}

/* ----------------------------------------------------------------
   4. TITRES ET TEXTES
   ---------------------------------------------------------------- */

/* Valable en <div> (ancien balisage) comme en <h1> (nouveau) : toutes
   les propriétés que le thème donne aux h1 sont fixées ici. */
body.mu-habillage--formulaires .mu-auth-title {
	margin: 0 0 var(--mu-e-2);
	padding: 0;
	font-family: var(--mu-police);
	font-size: 28px;
	font-weight: var(--mu-g-titre);
	line-height: var(--mu-il-titre);
	letter-spacing: -.01em;
	color: var(--mu-violet-900);
	text-align: center;
	text-transform: none;
}

/* Gris de l'ancien sous-titre : 3,7:1 ; texte-doux : 4,8:1. */
body.mu-habillage--formulaires .mu-auth-subtitle {
	margin: 0 auto var(--mu-e-5);
	max-width: 36em;
	font-size: 15px;
	line-height: 1.55;
	color: var(--mu-texte-doux);
}

body.mu-habillage--formulaires .mu-auth-text {
	font-size: 15px;
	line-height: var(--mu-il-texte);
	color: var(--mu-texte);
}

/* « Mot de passe oublié » : Histudy laisse 100 px de vide entre le titre et le texte.
   !important : contre Histudy (style.css, .tutor-forgot-password-form.tutor-ResetPassword.lost_reset_password),
   qui le porte. */
body.mu-habillage--formulaires .tutor-forgot-password-form.tutor-ResetPassword {
	padding-top: var(--mu-e-4) !important;
}

body.mu-habillage--formulaires .mu-req-note {
	margin: calc(-1 * var(--mu-e-3)) 0 var(--mu-e-5);
	font-size: var(--mu-t-xs);
	color: var(--mu-texte-doux);
}

body.mu-habillage--formulaires .mu-req {
	color: var(--mu-erreur);
}

body.mu-habillage--formulaires .mu-auth-hint {
	padding: var(--mu-e-3) var(--mu-e-4);
	border: 1px solid var(--mu-trait);
	border-radius: var(--mu-r-sm);
	background: var(--mu-teinte-primaire);
	font-size: var(--mu-t-sm);
	color: var(--mu-texte);
}

body.mu-habillage--formulaires .mu-auth-hint strong {
	color: var(--mu-violet-700);
}

/* Illustration et pastille « e-mail envoyé » : immobiles. */
body.mu-habillage--formulaires .mu-auth-illustration {
	animation: none;
}

body.mu-habillage--formulaires .mu-success-icon {
	width: 72px;
	height: 72px;
	background: var(--mu-succes);
	box-shadow: 0 0 0 8px var(--mu-succes-fond);
	animation: none;
}

/* ----------------------------------------------------------------
   5. CHAMPS
   ---------------------------------------------------------------- */
body.mu-habillage--formulaires .mu-form .mu-field {
	margin-bottom: 20px;
	animation: none;
}

body.mu-habillage--formulaires .mu-form .mu-field label {
	margin-bottom: var(--mu-e-2);
	font-size: var(--mu-t-sm);
	font-weight: var(--mu-g-ui);
	letter-spacing: 0;
	color: var(--mu-encre);
}

body.mu-habillage--formulaires .mu-form .mu-field-hint {
	margin-top: var(--mu-e-2);
	padding-left: 0;
	font-size: var(--mu-t-xs);
	color: var(--mu-texte-doux);
}

body.mu-habillage--formulaires .mu-form-row {
	gap: var(--mu-e-4);
}

/* Champ et liste : 48 px, police 16 px (sous 16 px, Safari iOS zoome la
   page au focus), bord 1,5 px à 3,7:1, coins de 8 px.
   !important : contre auth-pages.css §4 (input.mu-input, select.mu-input
   et leurs variantes « mode sombre »), qui le portent déjà. */
body.mu-habillage--formulaires .mu-form input.mu-input,
body.mu-habillage--formulaires .mu-form select.mu-input,
body.mu-habillage--formulaires .mu-auth-card .mu-form input.mu-input,
body.mu-habillage--formulaires .mu-auth-card .mu-form select.mu-input,
body.mu-habillage--formulaires .student-registration-shortcode-math-universe .mu-form select.mu-input {
	height: var(--mu-champ-h) !important;
	border: 1.5px solid var(--mu-trait-champ) !important;
	border-radius: var(--mu-r-sm) !important;
	background-color: var(--mu-fond-page) !important;
	color: var(--mu-encre) !important;
	font-family: var(--mu-police);
	font-size: var(--mu-t-base) !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
	transition: border-color var(--mu-transition), box-shadow var(--mu-transition);
}

/* Liste : le raccourci « background » de auth-pages.css (contre la flèche
   PNG du thème parent) doit rester sans image. */
body.mu-habillage--formulaires .mu-form select.mu-input {
	background-image: none !important;
}

body.mu-habillage--formulaires .mu-form input.mu-input::placeholder {
	color: var(--mu-texte-doux);
	opacity: 1;
}

body.mu-habillage--formulaires .mu-form select.mu-input:invalid {
	color: var(--mu-texte-doux) !important; /* !important : contre formulaires §4 (:invalid), qui le porte. */
}

body.mu-habillage--formulaires .mu-form input.mu-input:hover,
body.mu-habillage--formulaires .mu-form select.mu-input:hover {
	border-color: var(--mu-violet-500) !important; /* !important : contre auth-pages.css §4 (:hover). */
}

/* Focus : bord violet foncé et anneau visible (WCAG 2.4.7). */
body.mu-habillage--formulaires .mu-form input.mu-input:focus,
body.mu-habillage--formulaires .mu-form select.mu-input:focus {
	outline: 2px solid transparent !important;
	border-color: var(--mu-violet-700) !important;
	box-shadow: var(--mu-focus) !important; /* !important : contre auth-pages.css §4 (:focus). */
}

/* Remplissage automatique de Chrome : fond blanc gardé, et l'anneau de
   focus en plus (l'ancienne règle l'effaçait).
   !important : contre auth-pages.css §4 (:-webkit-autofill). */
body.mu-habillage--formulaires .mu-form input.mu-input:-webkit-autofill,
body.mu-habillage--formulaires .mu-form input.mu-input:-webkit-autofill:hover {
	-webkit-box-shadow: 0 0 0 1000px var(--mu-fond-page) inset !important;
	box-shadow: 0 0 0 1000px var(--mu-fond-page) inset !important;
	-webkit-text-fill-color: var(--mu-encre) !important;
}

body.mu-habillage--formulaires .mu-form input.mu-input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px var(--mu-fond-page) inset, var(--mu-focus) !important;
	box-shadow: 0 0 0 1000px var(--mu-fond-page) inset, var(--mu-focus) !important;
	-webkit-text-fill-color: var(--mu-encre) !important;
}

/* Champ fautif (aria-invalid, posé par le serveur ou formulaires.js) :
   bord, fond teinté et pictogramme « ! » à droite.
   !important : contre formulaires.css 15b, qui le porte déjà. */
body.mu-habillage--formulaires .mu-form input.mu-input[aria-invalid="true"],
body.mu-habillage--formulaires .mu-form select.mu-input[aria-invalid="true"] {
	border-color: var(--mu-erreur) !important;
	background-color: var(--mu-erreur-fond) !important;
	box-shadow: 0 0 0 3px rgba(198, 40, 40, .14) !important;
}

body.mu-habillage--formulaires .mu-form input.mu-input[aria-invalid="true"]:not([type="password"]) {
	padding-right: 44px !important; /* !important : contre auth-pages.css §4 (padding). */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23C62828' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

body.mu-habillage--formulaires .mu-form input[type="checkbox"][aria-invalid="true"] {
	outline: 2px solid var(--mu-erreur);
	outline-offset: 2px;
}

/* Champ juste, une fois touché par l'élève (:user-valid : rien avant la
   première saisie) : bord vert et coche. Règle à part : un navigateur
   qui ne connaît pas :user-valid l'ignore sans perdre le reste. */
body.mu-habillage--formulaires .mu-form input.mu-input:user-valid:not([type="password"]):not([aria-invalid="true"]) {
	border-color: var(--mu-succes) !important; /* !important : contre auth-pages.css §4 (border). */
	padding-right: 44px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2315803D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

/* Pictogrammes des champs : gris lisible, violet au focus, sans zoom. */
body.mu-habillage--formulaires .mu-field-icon,
body.mu-habillage--formulaires .mu-select-arrow {
	color: var(--mu-texte-doux);
}

body.mu-habillage--formulaires .mu-input-wrap:focus-within .mu-field-icon {
	color: var(--mu-violet-700);
	transform: translateY(-50%);
}

body.mu-habillage--formulaires .mu-select-wrap:focus-within .mu-select-arrow {
	color: var(--mu-violet-700);
}

/* Bouton « afficher le mot de passe » : pastille de 36 px, focus visible.
   !important : contre auth-pages.css §4 (.mu-toggle-pass), qui le porte. */
body.mu-habillage--formulaires .mu-toggle-pass {
	right: 6px;
	width: 36px;
	height: 36px;
	background: var(--mu-teinte-primaire-forte) !important;
	color: var(--mu-violet-700) !important;
	border-radius: var(--mu-r-sm) !important;
}

body.mu-habillage--formulaires .mu-toggle-pass:hover {
	background: var(--mu-violet-700) !important;
	color: #fff !important;
}

body.mu-habillage--formulaires .mu-toggle-pass:focus-visible {
	outline: 2px solid transparent;
	box-shadow: var(--mu-focus-anneau);
}

/* ----------------------------------------------------------------
   6. CASES À COCHER, LIGNE « SE SOUVENIR », LIENS
   ---------------------------------------------------------------- */

/* Cases du thème (.mu-checkbox, conditions) : bord violet foncé, coins de
   5 px, anneau de focus.
   !important : contre auth-pages.css §5, qui le porte déjà. */
body.mu-habillage--formulaires .mu-auth-page input.mu-checkbox,
body.mu-habillage--formulaires .mu-form input.mu-checkbox,
body.mu-habillage--formulaires .mu-form .mu-terms-row input.tutor-checkbox {
	border: 2px solid var(--mu-violet-700) !important;
	border-radius: 5px !important;
}

body.mu-habillage--formulaires .mu-auth-page input.mu-checkbox:checked,
body.mu-habillage--formulaires .mu-form input.mu-checkbox:checked,
body.mu-habillage--formulaires .mu-form .mu-terms-row input.tutor-checkbox:checked {
	background-color: var(--mu-violet-700) !important;
}

body.mu-habillage--formulaires .mu-auth-page input.mu-checkbox:focus-visible,
body.mu-habillage--formulaires .mu-form input.mu-checkbox:focus-visible,
body.mu-habillage--formulaires .mu-form .mu-terms-row input.tutor-checkbox:focus-visible {
	outline: 2px solid transparent;
	box-shadow: var(--mu-focus-anneau) !important;
}

/* Cases de consentement (gabarit de Tutor) : on règle les variables de
   Tutor dans le formulaire plutôt que ses propriétés. */
body.mu-habillage--formulaires .mu-form {
	--tutor-color-primary: var(--mu-violet-700);
	--tutor-color-primary-rgb: 80, 26, 162;
	--tutor-border-color: var(--mu-violet-700);
}

body.mu-habillage--formulaires .mu-form .mu-consents .tutor-form-check-input.tutor-form-check-input {
	width: 20px;
	height: 20px;
	border-radius: 5px;
}

body.mu-habillage--formulaires .mu-form .mu-consents .tutor-form-check-input.tutor-form-check-input:focus-visible {
	box-shadow: var(--mu-focus-anneau);
}

body.mu-habillage--formulaires .mu-form .mu-consents .tutor-label {
	font-size: var(--mu-t-sm);
	line-height: 1.55;
	color: var(--mu-texte);
}

body.mu-habillage--formulaires .mu-form .mu-consents .tutor-form-row + .tutor-form-row .tutor-label {
	font-size: var(--mu-t-xs);
	color: var(--mu-texte-doux);
}

body.mu-habillage--formulaires .mu-form-meta {
	margin: 0 0 var(--mu-e-5);
}

body.mu-habillage--formulaires .mu-auth-page .mu-check label,
body.mu-habillage--formulaires .mu-form .mu-check label {
	font-size: var(--mu-t-sm);
	font-weight: 600;
	color: var(--mu-texte);
}

/* Liens : violet foncé (10,4:1), soulignement plein au survol et au
   focus, contour de focus visible. */
body.mu-habillage--formulaires .mu-auth-page .mu-link,
body.mu-habillage--formulaires .mu-form .mu-link,
body.mu-habillage--formulaires .student-registration-shortcode-math-universe .mu-link,
body.mu-habillage--formulaires .mu-terms-row label a,
body.mu-habillage--formulaires .mu-consents .tutor-consent-link {
	font-weight: var(--mu-g-ui);
	color: var(--mu-lien);
	border-radius: 4px;
}

body.mu-habillage--formulaires .mu-auth-page .mu-link::after,
body.mu-habillage--formulaires .mu-form .mu-link::after,
body.mu-habillage--formulaires .student-registration-shortcode-math-universe .mu-link::after {
	height: 1.5px;
	background: currentColor;
}

body.mu-habillage--formulaires .mu-auth-page .mu-link:hover,
body.mu-habillage--formulaires .mu-form .mu-link:hover,
body.mu-habillage--formulaires .student-registration-shortcode-math-universe .mu-link:hover {
	color: var(--mu-lien-survol);
}

body.mu-habillage--formulaires .mu-auth-page .mu-link:focus-visible,
body.mu-habillage--formulaires .student-registration-shortcode-math-universe .mu-link:focus-visible,
body.mu-habillage--formulaires .mu-consents .tutor-consent-link:focus-visible,
body.mu-habillage--formulaires .mu-terms-row label a:focus-visible {
	outline: 2px solid var(--mu-violet-700);
	outline-offset: 3px;
}

body.mu-habillage--formulaires .mu-auth-page .mu-link:focus-visible::after,
body.mu-habillage--formulaires .student-registration-shortcode-math-universe .mu-link:focus-visible::after {
	transform: scaleX(1);
}

body.mu-habillage--formulaires .mu-register-row {
	margin-top: var(--mu-e-5);
	padding-top: var(--mu-e-5);
	border-top: 1px solid var(--mu-trait);
	font-size: 15px;
	color: var(--mu-texte);
}

/* ----------------------------------------------------------------
   7. BOUTON PRINCIPAL
   ---------------------------------------------------------------- */

/* Violet plein, 56 px, coins arrondis.
   !important : contre auth-pages.css §6 (.mu-btn), qui le porte déjà. */
body.mu-habillage--formulaires .mu-btn {
	height: var(--mu-btn-h-lg);
	padding: 0 var(--mu-e-6) !important;
	border-radius: var(--mu-r-pill) !important;
	background-color: var(--mu-primaire) !important;
	background-image: none !important;
	color: #fff !important;
	font-family: var(--mu-police);
	font-size: var(--mu-t-base) !important;
	font-weight: var(--mu-g-titre);
	letter-spacing: .01em;
	text-decoration: none;
	box-shadow: 0 10px 24px rgba(80, 26, 162, .28);
	transition: background-color var(--mu-transition), transform var(--mu-transition), box-shadow var(--mu-transition);
}

body.mu-habillage--formulaires .mu-btn:hover {
	background-color: var(--mu-primaire-survol) !important;
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(65, 36, 109, .34);
	text-decoration: none;
}

body.mu-habillage--formulaires .mu-btn:active {
	transform: translateY(0);
	box-shadow: 0 6px 14px rgba(65, 36, 109, .28);
}

body.mu-habillage--formulaires .mu-btn:focus-visible {
	outline: 2px solid transparent;
	box-shadow: var(--mu-focus-anneau), 0 10px 24px rgba(80, 26, 162, .28);
}

/* Flèche : un simple glissement de 4 px (l'ancienne double flèche
   faisait sortir le texte de 27 px). */
body.mu-habillage--formulaires .mu-btn .btn-icon + .btn-icon {
	display: none;
}

body.mu-habillage--formulaires .mu-btn:hover .btn-text {
	transform: none;
}

body.mu-habillage--formulaires .mu-btn:hover .btn-text + .btn-icon {
	transform: translateX(4px);
	opacity: 1;
}

/* Envoi en cours (aria-busy posé par habillage.js) : la flèche devient un
   indicateur qui tourne, le bouton ne réagit plus au survol. */
body.mu-habillage--formulaires .mu-btn[aria-busy="true"] {
	cursor: progress;
	transform: none;
	opacity: .92;
}

body.mu-habillage--formulaires .mu-btn[aria-busy="true"] .btn-icon {
	display: none;
}

body.mu-habillage--formulaires .mu-btn[aria-busy="true"] .mu-btn-inner::after {
	content: "";
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: muHabRotation .8s linear infinite;
}

/* ----------------------------------------------------------------
   8. MESSAGES (erreur de connexion, alertes de Tutor)
   ---------------------------------------------------------------- */
body.mu-habillage--formulaires .mu-auth-alert,
body.mu-habillage--formulaires .mu-auth-card .tutor-alert,
body.mu-habillage--formulaires .mu-form-shell .tutor-alert {
	position: relative;
	padding: var(--mu-e-3) var(--mu-e-4) var(--mu-e-3) 44px;
	border: 1px solid var(--mu-erreur-trait);
	border-left: 4px solid var(--mu-erreur);
	border-radius: var(--mu-r-sm);
	background: var(--mu-erreur-fond);
	color: var(--mu-encre);
	font-size: var(--mu-t-sm);
	line-height: 1.55;
}

/* Pictogramme dessiné par un masque : il prend la couleur du message. */
body.mu-habillage--formulaires .mu-auth-alert::before,
body.mu-habillage--formulaires .mu-auth-card .tutor-alert::before,
body.mu-habillage--formulaires .mu-form-shell .tutor-alert::before {
	content: "";
	position: absolute;
	left: 14px;
	top: 14px;
	width: 18px;
	height: 18px;
	background: var(--mu-erreur);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Succès (« un e-mail de vérification a été envoyé ») : vert et coche. */
body.mu-habillage--formulaires .mu-auth-card .tutor-alert.tutor-success,
body.mu-habillage--formulaires .mu-form-shell .tutor-alert.tutor-success {
	border-color: var(--mu-succes-fond);
	border-left-color: var(--mu-succes);
	background: var(--mu-succes-fond);
}

body.mu-habillage--formulaires .mu-auth-card .tutor-alert.tutor-success::before,
body.mu-habillage--formulaires .mu-form-shell .tutor-alert.tutor-success::before {
	background: var(--mu-succes);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------
   9. CONNEXION AVEC GOOGLE / FACEBOOK
   ---------------------------------------------------------------- */

/* Séparateur « ou » : deux filets fins de part et d'autre du mot (la
   suite de caractères « ───── » est remplacée par deux traits dessinés). */
body.mu-habillage--formulaires .mu-auth-card .tutor-social-authentication::before,
body.mu-habillage--formulaires .student-registration-shortcode-math-universe .tutor-social-authentication::before {
	content: "ou";
	width: 100%;
	max-width: 320px;
	margin-bottom: var(--mu-e-2);
	font-size: var(--mu-t-xs);
	font-weight: var(--mu-g-ui);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mu-texte-doux);
	background:
		linear-gradient(var(--mu-trait), var(--mu-trait)) left center / calc(50% - 28px) 1px no-repeat,
		linear-gradient(var(--mu-trait), var(--mu-trait)) right center / calc(50% - 28px) 1px no-repeat;
}

/* Texte de consentement sous les boutons sociaux (module activité). */
body.mu-habillage--formulaires .mu-consent-social {
	margin-top: var(--mu-e-5);
	padding: var(--mu-e-3) var(--mu-e-4);
	border-radius: var(--mu-r-sm);
	background: var(--mu-teinte-primaire);
	font-size: 12.5px;
	color: var(--mu-texte);
}

/* ----------------------------------------------------------------
   10. INSCRIPTION (/register/) — section et carte Elementor
   Repérées par le formulaire qu'elles contiennent (:has), pas par les
   identifiants Elementor : la règle suit la page si elle est refaite.
   ---------------------------------------------------------------- */

/* Voile violet de marque et quadrillage sur le diaporama (gardé). */
body.mu-habillage--formulaires .elementor-top-section:has(.student-registration-shortcode-math-universe) > .elementor-background-overlay {
	opacity: 1;
	background-color: transparent;
	background-image:
		linear-gradient(var(--mu-quadrillage) 1px, transparent 1px),
		linear-gradient(90deg, var(--mu-quadrillage) 1px, transparent 1px),
		linear-gradient(155deg, rgba(65, 36, 109, .93) 0%, rgba(80, 26, 162, .84) 58%, rgba(65, 36, 109, .95) 100%);
	background-size: 32px 32px, 32px 32px, auto;
}

/* Accroche en arabe de la colonne de gauche : même dessin que sur la
   page de connexion. */
body.mu-habillage--formulaires .elementor-top-section:has(.student-registration-shortcode-math-universe) .elementor-widget-heading .elementor-heading-title {
	font-family: var(--mu-police-ar);
	font-weight: var(--mu-g-titre);
	line-height: 1.4;
	text-shadow: none;
}

body.mu-habillage--formulaires .elementor-top-section:has(.student-registration-shortcode-math-universe) .elementor-widget-heading .elementor-heading-title::after {
	content: "";
	display: block;
	width: 72px;
	height: 4px;
	margin: var(--mu-e-5) auto 0;
	border-radius: var(--mu-r-pill);
	background: var(--mu-accent);
}

/* Carte : blanc plein, barre de couleur, ombre ; plus de halo blanc au
   survol. !important (border-radius) : contre auth-pages.css §9, qui le
   porte déjà. */
body.mu-habillage--formulaires .elementor-inner-column:has(.student-registration-shortcode-math-universe) > .elementor-widget-wrap.elementor-element-populated {
	padding: 40px;
	border-radius: var(--mu-r-md) !important;
	background:
		linear-gradient(90deg, var(--mu-violet-700), var(--mu-violet-500) 55%, var(--mu-orange-500)) top left / 100% 5px no-repeat,
		var(--mu-fond-page);
	box-shadow: 0 24px 64px rgba(20, 8, 44, .38), 0 2px 6px rgba(20, 8, 44, .12);
}

/* ----------------------------------------------------------------
   11. « COMPLÉTER MON PROFIL »
   ---------------------------------------------------------------- */
body.mu-habillage--formulaires .mu-pe-completion {
	padding: var(--mu-e-7) 0 var(--mu-e-8);
}

body.mu-habillage--formulaires .mu-pe-completion .mu-form-shell {
	padding: var(--mu-e-7) 40px var(--mu-e-6);
	border: 1px solid var(--mu-trait);
	border-radius: var(--mu-r-md);
	background:
		linear-gradient(90deg, var(--mu-violet-700), var(--mu-violet-500) 55%, var(--mu-orange-500)) top left / 100% 5px no-repeat,
		var(--mu-fond-page);
	box-shadow: var(--mu-ombre-haute);
}

/* Titres de groupe (« Vous », « Votre classe », « Adresse de
   facturation ») : intertitres nets avec repère de couleur. */
body.mu-habillage--formulaires .mu-pe-completion .mu-pe-groupe-titre {
	display: flex;
	align-items: center;
	gap: var(--mu-e-3);
	margin: var(--mu-e-6) 0 var(--mu-e-4);
	padding: 0 0 var(--mu-e-3);
	border-bottom: 1px solid var(--mu-trait);
	font-size: var(--mu-h5);
	font-weight: var(--mu-g-titre);
	color: var(--mu-violet-900);
}

body.mu-habillage--formulaires .mu-pe-completion .mu-pe-groupe-titre::before {
	content: "";
	flex: 0 0 auto;
	width: 4px;
	height: 20px;
	border-radius: var(--mu-r-pill);
	background: var(--mu-accent);
}

body.mu-habillage--formulaires .mu-pe-completion .mu-pe-groupe:first-of-type .mu-pe-groupe-titre {
	margin-top: var(--mu-e-2);
}

/* Écran court (« Connectez-vous pour compléter votre profil. ») : carte
   étroite, bouton sans soulignement. */
body.mu-habillage--formulaires .mu-pe-completion .mu-form-shell:not(:has(form)) {
	max-width: 480px;
	text-align: center;
}

body.mu-habillage--formulaires .mu-pe-completion .mu-auth-text-center {
	margin-bottom: var(--mu-e-5);
	font-size: var(--mu-t-md);
	font-weight: 600;
	color: var(--mu-encre);
}

/* ----------------------------------------------------------------
   12. FENÊTRE DE VALIDATION (« Merci de corriger : »)
   Comportement inchangé (formulaires.js : role=alertdialog, focus
   piégé, Échap) ; seul le dessin change.
   !important : contre formulaires.css 15c, qui le porte déjà sur les
   titres, la liste et le bouton (contre les styles globaux du thème).
   ---------------------------------------------------------------- */
body.mu-habillage--formulaires .mu-alerte-fond {
	background: var(--mu-voile);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

body.mu-habillage--formulaires .mu-alerte {
	max-width: 460px;
	padding: 36px var(--mu-e-6) var(--mu-e-5);
	border-radius: var(--mu-r-md);
	background:
		linear-gradient(var(--mu-erreur), var(--mu-erreur)) top left / 100% 5px no-repeat,
		var(--mu-fond-page);
	color: var(--mu-texte);
	box-shadow: var(--mu-ombre-modale);
	font-family: var(--mu-police);
}

body.mu-habillage--formulaires .mu-alerte--info {
	background:
		linear-gradient(90deg, var(--mu-violet-700), var(--mu-violet-500) 55%, var(--mu-orange-500)) top left / 100% 5px no-repeat,
		var(--mu-fond-page);
}

body.mu-habillage--formulaires .mu-alerte-icone {
	width: 56px;
	height: 56px;
	margin-bottom: var(--mu-e-4);
	background: var(--mu-erreur-fond);
	color: var(--mu-erreur);
	box-shadow: 0 0 0 8px rgba(198, 40, 40, .05);
}

body.mu-habillage--formulaires .mu-alerte--info .mu-alerte-icone {
	background: var(--mu-teinte-primaire-forte);
	color: var(--mu-violet-700);
	box-shadow: 0 0 0 8px var(--mu-teinte-primaire);
}

body.mu-habillage--formulaires .mu-alerte .mu-alerte-titre {
	margin: 0 0 var(--mu-e-4) !important;
	font-size: var(--mu-h4) !important;
	line-height: 1.3 !important;
	color: var(--mu-encre) !important;
}

/* Chaque champ à corriger : une ligne blanche bordée, pictogramme rouge. */
body.mu-habillage--formulaires .mu-alerte .mu-alerte-liste li {
	margin: 0 0 var(--mu-e-2) !important;
	padding: 10px 12px 10px 40px !important;
	border: 1px solid var(--mu-erreur-trait);
	border-radius: var(--mu-r-sm);
	background: var(--mu-fond-page);
	color: var(--mu-encre);
	font-size: var(--mu-t-sm) !important;
	font-weight: 600;
}

body.mu-habillage--formulaires .mu-alerte .mu-alerte-liste li::before {
	left: 12px;
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	border-radius: 0;
	background: var(--mu-erreur);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.mu-habillage--formulaires .mu-alerte .mu-alerte-texte {
	font-size: var(--mu-t-base) !important;
	color: var(--mu-encre);
}

/* Gris de l'ancien détail : 3,7:1 ; texte-doux : 4,8:1. */
body.mu-habillage--formulaires .mu-alerte .mu-alerte-texte.mu-alerte-detail {
	font-size: var(--mu-t-sm) !important;
	color: var(--mu-texte-doux);
}

body.mu-habillage--formulaires .mu-alerte .mu-alerte-bouton {
	height: var(--mu-btn-h) !important;
	border-radius: var(--mu-r-pill) !important;
	background-color: var(--mu-primaire) !important;
	background-image: none !important;
	font-size: var(--mu-t-base) !important;
	font-weight: var(--mu-g-titre) !important;
	box-shadow: 0 10px 24px rgba(80, 26, 162, .28) !important;
	transition: background-color var(--mu-transition), transform var(--mu-transition);
}

body.mu-habillage--formulaires .mu-alerte .mu-alerte-bouton:hover {
	background-color: var(--mu-primaire-survol) !important;
}

/* Anneau blanc + violet à la place du contour orange (1,9:1 sur blanc). */
body.mu-habillage--formulaires .mu-alerte .mu-alerte-bouton:focus-visible {
	outline: 2px solid transparent !important;
	box-shadow: var(--mu-focus-anneau) !important;
}

/* ----------------------------------------------------------------
   13. TÉLÉPHONE ET TABLETTE
   ---------------------------------------------------------------- */
@media (max-width: 767px) {
	body.mu-habillage--formulaires .mu-auth-page,
	body.mu-habillage--formulaires .mu-auth-page.mu-auth-page-embedded {
		padding: var(--mu-e-6) var(--mu-gouttiere) var(--mu-e-7);
	}

	body.mu-habillage--formulaires .mu-auth-brand {
		margin-bottom: var(--mu-e-4);
	}

	body.mu-habillage--formulaires .mu-auth-brand .mu-auth-logo {
		width: 44px;
		padding: 12px;
		margin-bottom: var(--mu-e-3);
	}

	body.mu-habillage--formulaires .mu-auth-tagline {
		font-size: 18px;
	}

	body.mu-habillage--formulaires .mu-auth-tagline::after {
		margin-top: var(--mu-e-3);
	}

	/* !important : contre auth-pages.css §10, qui le porte déjà. */
	body.mu-habillage--formulaires .mu-auth-card {
		padding: 36px 20px var(--mu-e-5) !important;
	}

	body.mu-habillage--formulaires .mu-auth-title {
		font-size: 24px;
	}

	body.mu-habillage--formulaires .mu-form-row {
		gap: 0;
	}

	body.mu-habillage--formulaires .elementor-inner-column:has(.student-registration-shortcode-math-universe) > .elementor-widget-wrap.elementor-element-populated {
		padding: 32px 20px 24px;
	}

	body.mu-habillage--formulaires .mu-pe-completion {
		padding: var(--mu-e-5) 0 var(--mu-e-7);
	}

	body.mu-habillage--formulaires .mu-pe-completion .mu-form-shell {
		padding: 36px 20px var(--mu-e-5);
		border-radius: var(--mu-r-md);
	}
}

/* Téléphone : la fenêtre de validation reste un panneau en bas d'écran. */
@media (max-width: 480px) {
	body.mu-habillage--formulaires .mu-alerte {
		max-width: none;
		padding: 32px 20px calc(20px + env(safe-area-inset-bottom, 0px));
		border-radius: var(--mu-r-md) var(--mu-r-md) 0 0;
	}
}

/* ----------------------------------------------------------------
   14. MOUVEMENT RÉDUIT
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	body.mu-habillage--formulaires .mu-btn,
	body.mu-habillage--formulaires .mu-btn .btn-icon,
	body.mu-habillage--formulaires .mu-alerte .mu-alerte-bouton,
	body.mu-habillage--formulaires .mu-form input.mu-input,
	body.mu-habillage--formulaires .mu-form select.mu-input {
		transition: none;
	}

	body.mu-habillage--formulaires .mu-btn:hover {
		transform: none;
	}

	/* L'indicateur d'envoi tourne plus lentement plutôt que de disparaître
	   (seul signe que l'envoi est parti). */
	body.mu-habillage--formulaires .mu-btn[aria-busy="true"] .mu-btn-inner::after {
		animation-duration: 2.4s;
	}
}
