/* Back-office login page (adm): moved out of layout_login.html.twig so the page can run under a strict CSP (style-src 'self'). 2026-10-05 */

/* Fallback background: local gradient, shown while the photo loads or when there is no photo */
body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	background-size: cover;
	background-attachment: fixed;
	position: relative;
}

/* Unsplash photo (hotlinked <img>, no inline style needed): covers the viewport, under the overlay */
.login-bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	animation: login-bg-in 1s ease-in;
}

@keyframes login-bg-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* Dark overlay for better readability (fixed: covers the whole viewport on mobile too) */
body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 1;
}

/* Two columns: clock + form */
.login-container {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1400px;
	padding: 20px;
	display: flex;
	gap: 4rem;
	align-items: center;
}

/* Form column */
.login-left {
	flex: 1;
	max-width: 450px;
}

/* Date/time column */
.login-right {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #ffffff;
}

.current-date {
	font-size: 3rem;
	font-weight: 300;
	margin-bottom: 1rem;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	letter-spacing: 1px;
}

.current-time {
	font-size: 4.5rem;
	font-weight: 200;
	font-family: 'Courier New', monospace;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	letter-spacing: 3px;
}

/* Frosted card: login form (.form-signin) and lost-password form (.form-box) */
.form-signin,
.login-left .form-box {
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	padding: 3rem 2.5rem;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	width: 100%;
	max-width: none;
	margin: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
}

.form-signin h1 {
	font-weight: 300;
	margin-bottom: 2rem;
	color: #ffffff;
	text-align: center;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-signin label {
	font-weight: 500;
	color: #ffffff;
	margin-bottom: 0.5rem;
	margin-top: 1rem;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-signin input.form-control,
.login-left .form-box input.form-control {
	padding: 0.75rem 1rem;
	font-size: 1rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: rgba(255, 255, 255, 0.9);
	transition: all 0.2s;
}

.form-signin input.form-control:focus,
.login-left .form-box input.form-control:focus {
	border-color: rgba(13, 110, 253, 0.8);
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-signin input[type="email"],
.form-signin input[type="password"] {
	margin-bottom: 0;
	border-radius: 8px;
}

.form-signin .btn,
.login-left .form-box .btn {
	margin-top: 2rem;
	padding: 0.875rem 1.5rem;
	font-size: 1rem;
	font-weight: 500;
	border-radius: 8px;
	width: 100%;
	transition: all 0.2s;
}

.form-signin .btn:hover,
.login-left .form-box .btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

/* Lost-password page (store_default template): neutralise front-store spacing */
.login-left .page-content,
.login-left .page-content .container {
	margin: 0 !important;
	padding: 0 !important;
	max-width: none;
}

.login-left .form-box .nav-link,
.login-left .form-box a {
	color: #ffffff;
	background: transparent;
}

.alert {
	border-radius: 8px;
	margin-bottom: 1.5rem;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.alert-success {
	color: #0f5132;
	background: rgba(209, 231, 221, 0.95) !important;
}

/* The lost-password confirmation uses .text-white inside a light alert */
.alert-success .text-white {
	color: inherit !important;
}

.alert-danger {
	color: #842029;
	background: rgba(248, 215, 218, 0.95) !important;
}

/* Footer */
.login-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 1rem;
	text-align: center;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.8);
	background: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	z-index: 3;
	line-height: 1.6;
}

.login-footer p {
	margin: 0.25rem 0;
}

.login-footer .copyright {
	font-weight: 500;
}

.login-footer .warning {
	color: rgba(255, 200, 0, 0.9);
	font-size: 0.7rem;
}

.login-footer .tech-info {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.65rem;
	font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 992px) {
	.login-container {
		flex-direction: column;
		gap: 2rem;
	}

	.login-left {
		max-width: 100%;
		width: 100%;
		order: -1;
	}

	.current-date {
		font-size: 2rem;
	}

	.current-time {
		font-size: 3rem;
	}
}

@media (max-width: 576px) {
	.login-container {
		padding: 15px;
		padding-bottom: 180px;
	}

	.form-signin,
	.login-left .form-box {
		padding: 2rem 1.5rem;
	}

	.current-date {
		font-size: 1.5rem;
	}

	.current-time {
		font-size: 2.5rem;
		letter-spacing: 2px;
	}

	.login-footer {
		font-size: 0.65rem;
		padding: 0.75rem 0.5rem;
	}

	.login-footer .warning {
		font-size: 0.6rem;
	}

	.login-footer .tech-info {
		font-size: 0.55rem;
	}
}

/* Unsplash attribution (required by the Unsplash API guidelines) */
.login-footer .photo-credit {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.65rem;
}

.login-footer .photo-credit a {
	color: rgba(255, 255, 255, 0.9);
	text-decoration: underline;
}

/* Fixed footer must never cover the form (taller form with passkey + email-link blocks; 1366x768 / 1280x720 laptops):
   reserve its height below the content so the page can scroll past it. */
.login-container {
	padding-bottom: 150px;
}

@media (max-width: 576px) {
	.login-container {
		padding-bottom: 200px;
	}
}

/* ===== 2026-10-05 redesign of the sign-in card (contrast on any photo; passkey + email-link buttons) ===== */
.login-left {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.login-logo {
	display: block;
	width: 220px;
	height: auto;
	margin: 0 0 1.25rem 0;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.login-left .form-signin {
	width: 100%;
	max-width: 440px;
	background: rgba(10, 25, 41, 0.78) !important;
	backdrop-filter: blur(14px) saturate(1.2);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	padding: 2.25rem 2rem 2rem;
	color: #fff;
}

.login-left .form-signin h1 {
	color: #fff;
	font-size: 1.3rem;
	font-weight: 600;
	text-align: center;
	margin-bottom: 1.5rem !important;
	text-shadow: none;
}

.login-left .form-signin label {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.85rem;
	font-weight: 500;
	margin: 0.75rem 0 0.35rem;
}

.login-left .form-signin .form-control {
	background: #fff;
	color: #0a1929;
	border: 2px solid transparent;
	border-radius: 10px;
	padding: 0.7rem 0.95rem;
	font-size: 1rem;
}

.login-left .form-signin .form-control:focus {
	border-color: #4db3ff;
	box-shadow: 0 0 0 4px rgba(77, 179, 255, 0.25);
}

.login-left .form-signin form br {
	display: none;
}

.login-left .form-signin .btn {
	width: 100%;
	border-radius: 10px;
	padding: 0.8rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: transform 0.08s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.login-left .form-signin .btn:active {
	transform: translateY(1px);
}

.login-left .form-signin form .btn-primary {
	margin-top: 1.5rem;
	background: #0a7cc4;
	border: 0;
	box-shadow: 0 6px 16px rgba(10, 124, 196, 0.35);
}

.login-left .form-signin form .btn-primary:hover {
	background: #0b8ddf;
}

.auth-divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 1.5rem 0 1.1rem;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}

.auth-divider::before,
.auth-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(255, 255, 255, 0.25);
}

.login-left #passkey_login_btn {
	background: #fff;
	color: #0a1929;
	border: 0;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.login-left #passkey_login_btn:hover {
	background: #e8f4ff;
}

.login-left #ml_toggle,
.login-left #ml_send {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.45);
}

.login-left #ml_toggle:hover,
.login-left #ml_send:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.login-left #ml_go {
	background: #0a7cc4;
	border: 0;
}

.login-left .form-signin .btn i {
	opacity: 0.9;
}

.login-left .form-signin .text-muted,
.login-left #passkey_login_msg,
.login-left #ml_msg,
.login-left #ml_go_msg {
	color: rgba(255, 255, 255, 0.78) !important;
}

.login-left .form-signin .text-danger {
	color: #ffb4b4 !important;
}

.login-left .form-signin .alert {
	border-radius: 10px;
	font-size: 0.9rem;
}

.login-left #ml_form label {
	display: block;
}

@media (max-width: 992px) {
	.login-left .form-signin {
		max-width: 100%;
	}
}

/* ===== v3 (2026-10-05): logo inside the card, tighter rhythm, no empty gaps, short screens ===== */
.login-left .form-signin .login-logo {
	width: 190px;
	margin: 0 auto 1.1rem;
	filter: none;
}

.login-left .form-signin {
	max-width: 460px;
	padding: 1.9rem 2rem 1.75rem;
}

.login-left .form-signin h1 {
	font-size: 1.15rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.92);
	margin-bottom: 0.75rem !important;
}

.login-left .form-signin .btn {
	font-size: 0.98rem;
	padding: 0.72rem 1rem;
	white-space: nowrap;
}

.login-left .form-signin form .btn-primary {
	margin-top: 1.25rem;
}

.login-left .form-signin > div.mt-4 {
	margin-top: 0 !important;
}

.auth-divider {
	margin: 1.25rem 0 1rem;
}

.login-left #passkey_login_btn {
	margin-bottom: 0.65rem !important;
}

.login-left #ml_box {
	margin-top: 0 !important;
}

.login-left #passkey_login_msg:empty,
.login-left #ml_msg:empty,
.login-left #ml_go_msg:empty {
	display: none;
}

@media (max-height: 820px) {
	.login-left .form-signin .login-logo {
		width: 160px;
		margin-bottom: 0.6rem;
	}

	.login-left .form-signin label {
		margin-top: 0.5rem;
	}

	.login-footer {
		padding: 0.35rem 1rem;
		line-height: 1.3;
	}

	.login-footer p {
		margin: 0.1rem 0;
	}

	.login-container {
		padding-bottom: 90px;
	}
}

@media (max-width: 400px) {
	.login-left .form-signin .btn {
		white-space: normal;
	}
}

/* v4: login.css gives every .btn a 2rem top margin; only the main submit keeps a margin */
.login-left #passkey_login_btn,
.login-left #ml_toggle,
.login-left #ml_go {
	margin-top: 0 !important;
}

/* v5 (2026-10-05): three equal choices — phone, email link, password (form behind a <details> button) */
.login-left .form-signin .auth-choice {
	margin-top: 0.65rem;
}

.login-left .form-signin h1 + .auth-choice,
.login-left .form-signin h1 + script + .auth-choice {
	margin-top: 0;
}

.login-left .form-signin .auth-choice > .btn,
.login-left .form-signin .auth-choice > summary.btn,
.login-left .form-signin .auth-choice > div > .btn {
	margin-top: 0 !important;
}

.login-left #pw_toggle,
.login-left #ml_toggle,
.login-left #ml_send {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.45);
}

.login-left #pw_toggle:hover,
.login-left #ml_toggle:hover,
.login-left #ml_send:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

/* <summary> as a button: no disclosure arrow, pointer */
.login-left #pw_toggle {
	list-style: none;
	cursor: pointer;
	display: block;
	text-align: center;
}

.login-left #pw_toggle::-webkit-details-marker {
	display: none;
}

.login-left #pw_box[open] > #pw_toggle {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.7);
}

.login-left .form-signin .auth-panel {
	margin-top: 0.6rem;
	padding: 0.9rem 1rem 1rem;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-left .form-signin .auth-panel label:first-of-type {
	margin-top: 0;
}

.login-left .form-signin .auth-panel .btn-primary {
	margin-top: 1rem !important;
}

.login-left #passkey_login_msg,
.login-left #ml_msg,
.login-left #ml_go_msg {
	color: rgba(255, 255, 255, 0.85) !important;
}

/* v6: long labels may wrap on phones up to 480 px wide (412/414/430 px devices) */
@media (max-width: 480px) {
	.login-left .form-signin .btn {
		white-space: normal;
	}
}

/* ===== v7 (2026-10-05): greeting, views with fade (choices <-> form), back links ===== */
.login-left .form-signin .login-greeting {
	color: #fff;
	font-size: 1.6rem;
	font-weight: 600;
	text-align: center;
	letter-spacing: 0.01em;
	margin: 0 0 1.1rem;
}

.login-left .auth-view {
	transition: opacity 0.22s ease, transform 0.22s ease;
	opacity: 1;
	transform: none;
}

.login-left .auth-view.is-fading {
	opacity: 0;
	transform: translateY(6px);
}

@media (prefers-reduced-motion: reduce) {
	.login-left .auth-view {
		transition: none;
	}
}

.login-left .auth-choice-btn + .auth-choice-btn {
	margin-top: 0.65rem !important;
}

.login-left #pw_toggle {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.45);
	text-decoration: none;
}

.login-left #pw_toggle:hover,
.login-left #pw_toggle:focus {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.login-left .auth-back {
	display: inline-block;
	margin-bottom: 0.9rem;
	color: rgba(255, 255, 255, 0.8) !important;
	font-size: 0.88rem;
	text-decoration: none;
}

.login-left .auth-back:hover,
.login-left .auth-back:focus {
	color: #fff !important;
	text-decoration: underline;
}

.login-left .auth-view label:first-of-type {
	margin-top: 0;
}

.login-left #view_email .btn-primary,
.login-left #view_password .btn-primary {
	margin-top: 1rem !important;
}

.login-left .auth-view .alert {
	margin-bottom: 0.9rem;
}

/* v8: "Se connecter avec Google" (white, Google-like, same size as the other choices) */
.login-left #google_login_btn {
	background: #fff;
	color: #1f1f1f;
	border: 1px solid #dadce0;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.login-left #google_login_btn:hover,
.login-left #google_login_btn:focus {
	background: #f1f6fe;
	color: #1f1f1f;
}

.login-left #google_login_btn .fa-google {
	color: #4285f4;
}

/* ===== v9 (2026-10-05): thin greeting, more air, secondary "Autres méthodes", legal note in the card, one-line footer, logout page ===== */
.login-left .form-signin .login-logo {
	margin-bottom: 1.9rem;
}

.login-left .form-signin .login-greeting {
	font-family: "Segoe UI Light", "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
	font-weight: 300;
	font-size: 1.75rem;
	line-height: 1.25;
	letter-spacing: 0.01em;
	color: #fff;
	text-align: center;
	margin: 0 0 1.9rem;
}

.login-left .form-signin .login-greeting-sub {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.98rem;
	font-weight: 300;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.78);
}

/* "Autres méthodes" / "Recommencer": secondary button at the bottom of each view */
.login-left .form-signin .auth-secondary {
	display: block;
	margin-top: 0.9rem !important;
	padding: 0.6rem 1rem;
	font-size: 0.9rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 10px;
	text-decoration: none;
}

.login-left .form-signin .auth-secondary:hover,
.login-left .form-signin .auth-secondary:focus {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.45);
}

/* legal notice: permanent, bottom of the card, with an inner separator */
.login-left .form-signin .auth-legal {
	margin-top: 1.6rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 0.74rem;
	line-height: 1.45;
	color: rgba(255, 214, 102, 0.85);
	text-align: center;
}

/* footer: one discreet line */
.login-footer {
	padding: 0.45rem 1rem !important;
	background: rgba(0, 0, 0, 0.18) !important;
	line-height: 1.3 !important;
}

.login-footer .footer-line {
	margin: 0 !important;
	font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.55);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.login-footer .footer-line .sep {
	margin: 0 0.45rem;
	opacity: 0.6;
}

.login-container {
	padding-bottom: 70px;
}

/* logout page */
.login-left .logout-card {
	text-align: center;
}

.login-left .logout-card .logout-icon {
	font-size: 2.2rem;
	color: rgba(255, 255, 255, 0.85);
	margin: -0.6rem 0 1rem;
}

.login-left .logout-card .logout-countdown {
	font-weight: 400;
	opacity: 0.85;
	margin-left: 0.25rem;
	font-variant-numeric: tabular-nums;
}

@media (max-height: 820px) {
	.login-left .form-signin .login-logo { margin-bottom: 1.2rem; }
	.login-left .form-signin .login-greeting { margin-bottom: 1.3rem; font-size: 1.55rem; }
	.login-container { padding-bottom: 50px; }
}

@media (max-width: 576px) {
	.login-footer .footer-line { white-space: normal; }
}

.login-left .logout-card .btn-primary {
	background: #0a7cc4;
	border: 0;
	box-shadow: 0 6px 16px rgba(10, 124, 196, 0.35);
}
.login-left .logout-card .btn-primary:hover { background: #0b8ddf; }

/* step 2 (new browser): thanks + clear instructions + resend */
.login-left .form-signin .step2-ok {
	margin-bottom: 0.8rem;
	font-size: 0.95rem;
	font-weight: 500;
	color: #7ee2a8;
	text-align: center;
}

.login-left .form-signin .step2 {
	text-align: left;
	font-size: 0.88rem;
	line-height: 1.45;
}

.login-left .form-signin .step2 p {
	margin: 0.5rem 0 0;
}

.login-left .form-signin .step2 .step2-note {
	font-size: 0.78rem;
	opacity: 0.8;
}

.login-left .form-signin .step2-limit {
	font-size: 0.82rem;
	text-align: left;
}

.login-left .form-signin .step2-help {
	margin: 0.6rem 0 0;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.75);
	text-align: center;
}

.login-left .form-signin .auth-secondary.disabled {
	opacity: 0.55;
}

/* logout splash (v10): one centered message on the photo, no card, no clock column */
.login-container.logout-splash {
	justify-content: center;
	min-height: 100vh;
	padding-bottom: 60px;
}

.logout-splash .login-left {
	flex: 0 1 auto;
	max-width: 640px;
	width: 100%;
}

.logout-splash-content {
	text-align: center;
	color: #fff;
}

.logout-splash-content .login-logo {
	margin: 0 auto 2.5rem;
}

.logout-splash-content .logout-title {
	font-size: clamp(3rem, 8vw, 5.5rem);
	font-weight: 200;
	letter-spacing: 0.02em;
	line-height: 1.05;
	margin: 0 0 1.2rem;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.logout-splash-content .logout-sub {
	font-size: clamp(1rem, 2.4vw, 1.25rem);
	font-weight: 300;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
	margin: 0 0 2.5rem;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.logout-splash-content .logout-back {
	display: inline-block;
	padding: 0.75rem 1.8rem;
	font-size: 1rem;
	font-weight: 500;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	text-decoration: none;
}

.logout-splash-content .logout-back:hover,
.logout-splash-content .logout-back:focus {
	color: #fff;
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.7);
}

.logout-splash-content .logout-countdown {
	font-weight: 300;
	opacity: 0.8;
	margin-left: 0.25rem;
	font-variant-numeric: tabular-nums;
}

/* page entrance: clock then sign-in block fade in smoothly (logout splash too) */
@keyframes esfLoginFadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

.login-right {
	animation: esfLoginFadeIn 0.8s ease-out both;
}

.login-left {
	animation: esfLoginFadeIn 0.8s ease-out 0.2s both;
}

.login-bg {
	animation: esfLoginFadeIn 1.2s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
	.login-right, .login-left, .login-bg { animation: none; }
}

/* v11: on submit, the inputs fade out at once and "Vérification…" shows while the request runs */
.login-left #pw_form,
.login-left #ml_form {
	position: relative;
}

.login-left #pw_form > :not(.auth-wait),
.login-left #ml_form > :not(.auth-wait) {
	transition: opacity 0.2s ease-out;
}

.login-left #pw_form.is-submitting > :not(.auth-wait),
.login-left #ml_form.is-submitting > :not(.auth-wait) {
	opacity: 0;
	pointer-events: none;
}

.login-left .auth-wait {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05rem;
	font-weight: 300;
	color: #fff;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease-out 0.1s;
}

.login-left #pw_form.is-submitting .auth-wait,
.login-left #ml_form.is-submitting .auth-wait {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.login-left #pw_form > *, .login-left #ml_form > *, .login-left .auth-wait { transition: none; }
}

/* email link opened: centered "Merci / Connexion en cours…" splash, no clock, no form, no footer */
.ml-splash-screen {
	display: none;
}

html.ml-splash .login-container,
html.ml-splash .login-footer {
	display: none !important;
}

html.ml-splash .ml-splash-screen,
html.ml-splash .ml-splash-screen[hidden] {
	position: fixed;
	inset: 0;
	z-index: 5;
	display: flex !important; /* Bootstrap: [hidden] { display: none !important } */
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px;
	text-align: center;
	color: #fff;
	animation: esfLoginFadeIn 0.6s ease-out both;
}

.ml-splash-screen .login-logo {
	margin: 0 auto 2.5rem;
}

.ml-splash-title {
	font-size: clamp(3rem, 8vw, 5.5rem);
	font-weight: 200;
	letter-spacing: 0.02em;
	line-height: 1.05;
	margin: 0 0 1rem;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.ml-splash-sub {
	font-size: clamp(1rem, 2.4vw, 1.3rem);
	font-weight: 300;
	color: rgba(255, 255, 255, 0.9);
	margin: 0 0 2rem;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.ml-splash-loader {
	display: flex;
	gap: 0.6rem;
}

.ml-splash-loader span {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	animation: esfSplashDot 1.2s ease-in-out infinite;
}

.ml-splash-loader span:nth-child(2) { animation-delay: 0.15s; }
.ml-splash-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes esfSplashDot {
	0%, 80%, 100% { transform: scale(0.5); opacity: 0.35; }
	40% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.ml-splash-loader span { animation: none; opacity: 0.8; }
}

/* v13: successful sign-in (phone, link approved elsewhere): form + clock fade out, then the centered "Merci" screen */
@keyframes esfLoginFadeOut {
	from { opacity: 1; transform: none; }
	to { opacity: 0; transform: scale(0.98); }
}

html.ml-splash-leave .login-container,
html.ml-splash-leave .login-footer {
	animation: esfLoginFadeOut 0.35s ease-in forwards;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	html.ml-splash-leave .login-container, html.ml-splash-leave .login-footer { animation: none; opacity: 0; }
}

/* v14: "Vérifiez vos emails" — everything fades out, one centered message (step 2 sent, link sent) */
html.sent-splash .login-right,
html.sent-splash .login-greeting,
html.sent-splash .login-logo,
html.sent-splash .auth-legal {
	display: none !important;
}

html.sent-splash .login-container {
	justify-content: center;
}

html.sent-splash .login-left {
	max-width: 620px;
	width: 100%;
	animation: esfLoginFadeIn 0.6s ease-out both;
}

html.sent-splash .login-left .form-signin {
	max-width: 620px;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	padding: 0 !important;
}

html.sent-splash .sent-hero {
	text-align: center;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.sent-hero .sent-icon {
	width: 84px;
	height: 84px;
	margin: 0 auto 1.4rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.2rem;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	animation: esfSentFloat 3s ease-in-out infinite;
}

.sent-hero .step2-ok {
	margin: 0 0 0.6rem;
}

.sent-hero .sent-title {
	font-size: clamp(2.2rem, 6vw, 3.8rem);
	font-weight: 200;
	line-height: 1.1;
	margin: 0 0 1rem;
	color: #fff;
}

.sent-hero .sent-sub {
	font-size: clamp(1rem, 2.2vw, 1.2rem);
	font-weight: 300;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
	margin: 0 0 1rem;
}

.sent-hero .sent-close {
	font-size: 1rem;
	font-weight: 500;
	margin: 0 0 0.4rem;
}

.sent-hero .sent-note {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.7);
	margin: 0 0 1.4rem;
}

/* secondary actions stay small and discreet under the message */
html.sent-splash .step2-help {
	margin-top: 0.5rem;
}

html.sent-splash #view_sent .auth-secondary,
html.sent-splash #view_email .auth-secondary {
	display: inline-block;
	width: auto !important;
	margin: 0.4rem 0.3rem 0 !important;
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

html.sent-splash #view_sent,
html.sent-splash #view_email {
	text-align: center;
}

html.sent-splash .step2-limit {
	max-width: 460px;
	margin: 0.8rem auto 0;
}

@keyframes esfSentFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
	.sent-hero .sent-icon, html.sent-splash .login-left { animation: none; }
}
