/**
 * Espace client isolé — fond slate, carte blanche arrondie, accents violet (type Tailwind épuré).
 * Connexion / mot de passe + blocs .emotta-cp (portail, onboarding).
 */
.emotta-client-solo--light,
.emotta-client-solo--light.emotta-client-auth {
	--es-bg: #f8fafc;
	--es-surface: #ffffff;
	--es-text: #0f172a;
	--es-muted: #94a3b8;
	--es-border: #e2e8f0;
	--es-input-bg: #f8fafc;
	--es-purple-from: #a855f7;
	--es-purple-to: #7c3aed;
	--es-purple-ring: rgba(168, 85, 247, 0.35);
	--es-success-bg: #ecfdf5;
	--es-success: #047857;
	--es-error: #b91c1c;
	--es-error-bg: #fef2f2;
	--es-warn-bg: #fffbeb;
	--es-warn: #a16207;
	margin: 0;
	background: var(--es-bg);
	color: var(--es-text);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.emotta-client-auth__wrap {
	position: relative;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	padding: 1rem;
	box-sizing: border-box;
}
.emotta-client-auth__bg {
	position: fixed;
	inset: 0;
	background: var(--es-bg);
	pointer-events: none;
}
.emotta-client-auth__inner {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	width: 100%;
	max-width: 28rem;
	margin: 0 auto;
}
.emotta-client-auth__center {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	min-height: 0;
}
.emotta-client-solo--wide .emotta-client-auth__inner {
	max-width: 48rem;
}

/* Carte unifiée (connexion / contenu page) */
.emotta-client-auth__card--unified {
	background: var(--es-surface);
	border: none;
	border-radius: 1.5rem;
	padding: 0;
	overflow: hidden;
	box-shadow:
		0 25px 50px -12px rgba(15, 23, 42, 0.08),
		0 0 0 1px rgba(168, 85, 247, 0.06);
}
.emotta-client-auth__hero {
	padding: 2rem 1.5rem 1.25rem;
	text-align: center;
}
.emotta-client-auth__hero-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: inherit;
}
.emotta-client-auth__hero-link:hover .emotta-client-auth__mark,
.emotta-client-auth__hero-link:focus .emotta-client-auth__mark {
	transform: scale(1.02);
	opacity: 0.95;
}
.emotta-client-auth__mark {
	width: 4rem;
	height: 4rem;
	border-radius: 1rem;
	background: linear-gradient(135deg, var(--es-purple-from) 0%, var(--es-purple-to) 100%);
	box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.3), 0 4px 6px -4px rgba(124, 58, 237, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.emotta-client-auth__mark-svg {
	width: 2.5rem;
	height: 2.5rem;
	color: #fff;
}
.emotta-client-auth__logo-img--compact {
	display: block;
	margin: 1rem auto 0;
	max-height: 2.5rem;
	max-width: 10rem;
	width: auto;
	height: auto;
	object-fit: contain;
}
.emotta-client-auth__card-body {
	padding: 0 2rem 2.25rem;
}
.emotta-client-auth__card-body--flush {
	padding-top: 1.75rem;
}
@media (min-width: 768px) {
	.emotta-client-auth__hero {
		padding: 2.5rem 2.5rem 1.5rem;
	}
	.emotta-client-auth__card-body {
		padding: 0 2.5rem 2.5rem;
	}
	.emotta-client-auth__card-body--flush {
		padding-top: 2rem;
	}
}

/* Carte simple (portail large, blocs sans hero) */
.emotta-client-auth__card:not(.emotta-client-auth__card--unified) {
	background: var(--es-surface);
	border: 1px solid var(--es-border);
	border-radius: 0.875rem;
	padding: 1.75rem 1.5rem;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
}
.emotta-client-solo--wide .emotta-client-auth__card:not(.emotta-client-auth__card--unified) {
	padding: 1.75rem 1.5rem 2rem;
}

.emotta-client-auth__card .emotta-cp {
	max-width: none;
	margin: 0;
	padding: 0;
}

/* Pied (lien site) — hors zone centrée pour ne pas remonter la carte */
.emotta-client-solo__foot {
	flex-shrink: 0;
	margin-top: 1.5rem;
	padding-bottom: 0.25rem;
	text-align: center;
}
.emotta-client-solo__site-link {
	font-size: 0.8125rem;
	color: var(--es-muted);
	text-decoration: none;
}
.emotta-client-solo__site-link:hover,
.emotta-client-solo__site-link:focus {
	color: var(--es-text);
	text-decoration: underline;
}

/* --- Portail : composants .emotta-cp en mode clair --- */
.emotta-client-auth__card .emotta-cp-head {
	margin-bottom: 1.5rem;
}
.emotta-client-auth__card .emotta-cp-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--es-text);
	margin: 0 0 0.25rem 0;
}
.emotta-client-auth__card .emotta-cp-sub {
	color: var(--es-muted);
	margin: 0;
	font-size: 0.875rem;
}
/* Onboarding (carte claire) : le public.css du plugin cible le fond sombre — contrastes lisibles ici */
.emotta-client-auth__card .emotta-cp--onboarding .emotta-cp-onboarding__lead {
	color: #475569;
	line-height: 1.6;
	font-size: 0.9375rem;
	margin-top: 0.35rem;
}
.emotta-client-auth__card .emotta-cp--onboarding .emotta-cp-onboarding__steps {
	color: #334155;
	line-height: 1.6;
}
.emotta-client-auth__card .emotta-cp--onboarding .emotta-cp-onboarding__step {
	margin-bottom: 0.85rem;
}
.emotta-client-auth__card .emotta-cp--onboarding .emotta-cp-onboarding__step strong {
	color: #0f172a;
	font-weight: 600;
}
.emotta-client-auth__card .emotta-cp-section {
	margin-bottom: 1.75rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--es-border);
}
.emotta-client-auth__card .emotta-cp-section:last-of-type {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 0;
}
.emotta-client-auth__card .emotta-cp-section h3 {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.75rem 0;
	color: var(--es-text);
}
.emotta-client-auth__card .emotta-cp-ok {
	color: var(--es-success);
}
.emotta-client-auth__card .emotta-cp-error {
	color: var(--es-error);
}
.emotta-client-auth__card .emotta-cp-note {
	color: var(--es-muted);
}
.emotta-client-auth__card .emotta-cp-warn {
	color: var(--es-warn);
}
.emotta-client-auth__card .emotta-cp-quota {
	color: var(--es-muted);
	font-size: 0.9rem;
}
.emotta-client-auth__card .emotta-cp-button {
	background: #fff;
	color: var(--es-purple-to);
	border: 1px solid var(--es-border);
}
/* Ne pas appliquer ce survol au primaire : sinon le fond « blanc » écrase le dégradé violet */
.emotta-client-auth__card a.emotta-cp-button:not(.emotta-cp-button--primary):hover,
.emotta-client-auth__card .emotta-cp-button:not(.emotta-cp-button--primary):hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: var(--es-purple-from);
}
.emotta-client-auth__card a.emotta-cp-button--primary,
.emotta-client-auth__card .emotta-cp-button--primary {
	background: linear-gradient(135deg, var(--es-purple-from) 0%, var(--es-purple-to) 100%);
	color: #fff;
	border: none;
	box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.25);
}
.emotta-client-auth__card a.emotta-cp-button--primary:hover,
.emotta-client-auth__card .emotta-cp-button--primary:hover {
	color: #fff;
	opacity: 1;
	filter: brightness(0.94);
	box-shadow: 0 12px 22px -4px rgba(124, 58, 237, 0.35);
}
.emotta-client-auth__card .emotta-cp-textarea,
.emotta-client-auth__card .emotta-cp-input {
	border: 1px solid var(--es-border);
	background: #fff;
	color: var(--es-text);
}
.emotta-client-auth__card .emotta-cp-textarea:focus,
.emotta-client-auth__card .emotta-cp-input:focus {
	border-color: var(--es-purple-to);
	outline: none;
	box-shadow: 0 0 0 3px var(--es-purple-ring);
}
.emotta-client-auth__card .emotta-cp-label {
	color: var(--es-text);
}
.emotta-client-auth__card .emotta-cp-reqlist {
	color: var(--es-muted);
}
.emotta-client-auth__card .emotta-cp-badge {
	background: #fef3c7;
	color: var(--es-warn);
}
.emotta-client-auth__card .emotta-cp-h4 {
	color: var(--es-text);
}
.emotta-client-auth__card .emotta-cp-out a {
	color: var(--es-muted);
}
.emotta-client-auth__card .emotta-cp--guest {
	text-align: left;
}

/* Connexion / mot de passe — version épurée */
.emotta-cp-login__head {
	text-align: center;
	margin-bottom: 2.5rem;
}
.emotta-cp-login__title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 0.25rem 0;
	letter-spacing: -0.02em;
}
.emotta-cp-login__sub {
	margin: 0;
	font-size: 0.875rem;
	color: var(--es-muted);
}
.emotta-cp-setpass--epure .emotta-cp-login__head {
	margin-bottom: 2rem;
}

.emotta-cp-alert {
	margin: 0 0 1.25rem 0;
	padding: 0.875rem 1rem;
	border-radius: 0.75rem;
	font-size: 0.875rem;
	font-weight: 500;
}
.emotta-cp-alert--error {
	background: var(--es-error-bg);
	color: var(--es-error);
}
.emotta-cp-alert--ok {
	background: #f5f3ff;
	color: #6d28d9;
}

.emotta-cp-portal-login--epure {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	gap: 0;
}
.emotta-client-auth__card .emotta-cp-login {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.emotta-cp-field {
	margin-bottom: 1.5rem;
}
.emotta-cp-field:last-of-type {
	margin-bottom: 0;
}
.emotta-cp-field__label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: #334155;
	margin-bottom: 0.5rem;
}
.emotta-cp-input--epure {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 1rem;
	border-radius: 0.75rem;
	border: 1px solid var(--es-border);
	background: var(--es-input-bg);
	color: var(--es-text);
	font: inherit;
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.emotta-cp-input--epure::placeholder {
	color: #94a3b8;
}
.emotta-cp-input--epure:focus {
	outline: none;
	border-color: transparent;
	box-shadow: 0 0 0 2px var(--es-purple-to);
	background: #fff;
}

.emotta-cp-login__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.25rem 0 1.5rem;
	font-size: 0.875rem;
}
.emotta-cp-login__remember {
	display: flex;
	align-items: center;
	cursor: pointer;
	color: #475569;
	margin: 0;
	font-weight: 400;
}
.emotta-cp-login__remember input {
	width: 1rem;
	height: 1rem;
	margin-right: 0.5rem;
	accent-color: var(--es-purple-to);
	border-radius: 0.25rem;
}
.emotta-cp-login__forgot {
	color: var(--es-purple-to);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.emotta-cp-login__forgot:hover,
.emotta-cp-login__forgot:focus {
	color: var(--es-purple-from);
	text-decoration: underline;
}

.emotta-cp-btn-signin {
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.25rem;
	padding: 0.875rem 1.25rem;
	border: none;
	border-radius: 0.75rem;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	background: linear-gradient(135deg, var(--es-purple-from) 0%, var(--es-purple-to) 100%);
	box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.3);
	transition: opacity 0.2s ease, transform 0.15s ease;
}
.emotta-cp-btn-signin:hover {
	opacity: 0.92;
}
.emotta-cp-btn-signin:active {
	transform: scale(0.98);
}

.emotta-cp-form--setpass-epure .emotta-cp-field {
	margin-bottom: 1.5rem;
}
.emotta-cp-form--setpass-epure .emotta-cp-btn-signin {
	margin-top: 0.5rem;
}

.emotta-cp-login__foot {
	margin-top: 2rem;
	text-align: center;
	font-size: 0.875rem;
	color: var(--es-muted);
}
.emotta-cp-login__foot a {
	color: var(--es-purple-to);
	font-weight: 600;
	text-decoration: none;
}
.emotta-cp-login__foot a:hover {
	text-decoration: underline;
}

/* Connexion hors template auth (rétrocompat) */
.emotta-cp-auth-h1 {
	font-size: 1.35rem;
	font-weight: 600;
	margin: 0 0 0.35rem 0;
	color: var(--es-text);
}
.emotta-cp-auth-lead {
	margin: 0 0 1.5rem 0;
	font-size: 0.9rem;
	color: var(--es-muted);
	line-height: 1.5;
}
.emotta-client-auth__card .emotta-cp-portal-login:not(.emotta-cp-portal-login--epure) p {
	margin: 0 0 1rem 0;
}
.emotta-client-auth__card .emotta-cp-portal-login:not(.emotta-cp-portal-login--epure) .emotta-cp-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--es-text);
	margin-bottom: 0.4rem;
}
.emotta-client-auth__card .emotta-cp-portal-login:not(.emotta-cp-portal-login--epure) .emotta-cp-input {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border-radius: 0.5rem;
	border: 1px solid var(--es-border);
	background: #fff;
	color: var(--es-text);
	font-size: 1rem;
	box-sizing: border-box;
}
.emotta-client-auth__card .emotta-cp-portal-login:not(.emotta-cp-portal-login--epure) .emotta-cp-remember {
	margin: 0.5rem 0 1rem 0;
	font-size: 0.8125rem;
	color: var(--es-muted);
}
.emotta-client-auth__card .emotta-cp-portal-login:not(.emotta-cp-portal-login--epure) .emotta-cp-button--primary {
	width: 100%;
	text-align: center;
	box-sizing: border-box;
	padding: 0.7rem 1.25rem;
	font-weight: 600;
	font-size: 0.9375rem;
	border: none;
	border-radius: 0.5rem;
	background: linear-gradient(135deg, var(--es-purple-from) 0%, var(--es-purple-to) 100%);
	color: #fff;
	cursor: pointer;
}

.emotta-client-auth__card .emotta-cp-ok[role="status"]:not(.emotta-cp-alert) {
	margin: 0 0 1.25rem 0;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	background: var(--es-success-bg);
	color: var(--es-success);
	font-size: 0.9rem;
}
.emotta-client-auth__card .emotta-cp-title--auth {
	font-size: 1.2rem;
	margin: 0 0 0.5rem 0;
}
.emotta-client-auth__card .emotta-cp-note--auth {
	margin: 0 0 1.5rem 0;
}
.emotta-client-auth__card .emotta-cp--setpass .emotta-cp-input:not(.emotta-cp-input--epure) {
	max-width: 100%;
}
.emotta-client-auth__card .emotta-cp-form--setpass:not(.emotta-cp-form--setpass-epure) .emotta-cp-button--primary {
	width: 100%;
	box-sizing: border-box;
}

/* Ancien label de template (rétrocompat) */
.emotta-client-auth__back {
	margin: 1.5rem 0 0;
	text-align: center;
	font-size: 0.8125rem;
}
.emotta-client-auth__back a {
	color: var(--es-muted);
	text-decoration: none;
}
.emotta-client-auth__back a:hover,
.emotta-client-auth__back a:focus {
	color: var(--es-text);
}
