/**
 * AVISION AUTH - Sleek Dark Theme (Charte Graphique Officielle)
 */

/* Masquer le header/footer du thème et le titre de la page quand l'auth est active */
.page-template-default .wp-block-post-title,
.page-template-default .entry-title,
header.wp-block-template-part,
footer.wp-block-template-part,
footer.avi-footer {
	display: none !important;
}

.avision-auth {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	z-index: 999999 !important;
	/* Garder ton background gradient ici */
	background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #0b1222 100%);
	overflow-y: auto;
	box-sizing: border-box;
	max-width: none;
	margin: 0;
	padding: clamp(2rem, 6vh, 4rem) clamp(1rem, 4vw, 2rem);
	min-height: 100vh;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
	color: #e2e8f0;
	-webkit-font-smoothing: antialiased;
}

.avision-auth *, .avision-auth *::before, .avision-auth *::after {
	box-sizing: border-box;
}

/* Boîte Glassmorphism */
.avision-auth__card {
	width: 100%;
	max-width: 400px;
	padding: 2.25rem;
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
	animation: avi-login-box-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	opacity: 0;
	transform: translateY(12px) scale(0.98);
}

@keyframes avi-login-box-in {
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.avision-auth__title {
	margin: 0 0 0.35rem;
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #f59e0b; /* Accent Or */
	text-align: center;
}

.avision-auth__intro {
	color: #94a3b8;
	font-size: 0.9375rem;
	text-align: center;
	margin: 0 0 1.75rem;
}

/* Labels */
.avision-auth__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.875rem;
	color: #94a3b8;
	font-weight: normal;
}

/* Inputs */
.avision-auth__field input[type="text"],
.avision-auth__field input[type="email"],
.avision-auth__field input[type="password"] {
	width: 100%;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border: 1px solid rgba(71, 85, 105, 0.6);
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.7);
	color: #e2e8f0;
	font-size: 1rem;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.avision-auth__field input:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.avision-auth__field input[type="password"]:focus {
	border-color: #f59e0b;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

/* Champ mot de passe + toggle œil */
.avision-auth__password-wrap {
	position: relative;
	padding: 0;
	margin: 0 0 1.25rem 0;
	display: block !important;
}

.avision-auth__password-wrap input.avision-auth__pw-input {
	width: 100%;
	box-sizing: border-box;
	padding-right: 45px !important;
	margin-bottom: 0 !important;
}

.avision-auth__password-toggle,
.avision-auth__pw-toggle {
	position: absolute !important;
	right: 8px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	height: 32px !important;
	width: 32px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	line-height: 1;
	margin: 0 !important;
	cursor: pointer;
	border: none !important;
	background: transparent !important;
	color: #94a3b8;
	box-sizing: border-box;
	z-index: 10 !important;
	outline: none !important;
	box-shadow: none !important;
}

.avision-auth__password-toggle svg,
.avision-auth__pw-toggle svg {
	display: block;
	flex-shrink: 0;
}

/* Checkbox Remember me */
.avision-auth__remember {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.875rem;
	color: #94a3b8;
	margin: 0 0 1.25rem;
}

/* Bouton Principal (Gold) */
.avision-auth__submit {
	width: 100%;
	padding: 0.875rem 1.25rem;
	margin-top: 0.5rem;
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
	color: #0f172a;
	border: none;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: box-shadow 0.3s ease, transform 0.2s ease;
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.avision-auth__submit:hover {
	box-shadow: 0 0 28px rgba(245, 158, 11, 0.5), 0 0 50px rgba(245, 158, 11, 0.2);
	transform: translateY(-1px);
}

/* Liens (Forgot Password / Back to login) */
.avision-auth__footer, .avision-auth__footer--linkonly {
	margin-top: 1.25rem;
	text-align: center;
	border: none;
	padding: 0;
}

.avision-auth__footer a, .avision-auth__back {
	font-size: 0.8125rem;
	color: #64748b;
	text-decoration: none;
	transition: color 0.2s ease;
	display: inline-block;
}

.avision-auth__footer a:hover, .avision-auth__back:hover {
	color: #94a3b8;
	text-decoration: none;
}

/* Notices & Erreurs */
.avision-auth__notice {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border-radius: 10px;
	font-size: 0.875rem;
	backdrop-filter: blur(8px);
}

.avision-auth__notice--error {
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.35);
	color: #fca5a5;
}

.avision-auth__notice--success {
	background: rgba(34, 197, 94, 0.12);
	border: 1px solid rgba(34, 197, 94, 0.35);
	color: #86efac;
}
