/* =====================================================================
   Quizos — écrans publics d'authentification
   Présentation uniquement : les formulaires et leurs sélecteurs restent inchangés.
   ===================================================================== */

.qz-auth-shell {
    position: relative;
    width: 100%;
    max-width: none !important;
    min-height: calc(100vh - 4rem);
    padding: 7rem 0 4rem !important;
    background:
        radial-gradient(circle at 12% 12%, rgba(245, 128, 62, .14), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(42, 123, 228, .10), transparent 26rem),
        var(--bs-body-bg, #f9fafd);
}

.qz-auth-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,.16), transparent 42%);
}

.qz-auth-shell > .row,
.qz-auth-shell > .container > .row {
    position: relative;
    z-index: 1;
    margin-left: 0;
    margin-right: 0;
}

.qz-auth-switch {
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color, #d8e2ef);
    text-align: center;
    color: var(--bs-secondary-color, #748194);
    font-size: .88rem;
}

.qz-auth-switch a {
    color: #e76f35;
    font-weight: 700;
    text-decoration: none;
    transition: color .15s ease;
}

.qz-auth-switch a:hover { color: #2a7be4; }
.qz-auth-switch__separator { margin: 0 .45rem; color: var(--bs-border-color, #d8e2ef); }

/* ---------------------------------------------------------------------
   Thèmes clair et sombre : contraste explicite pour tous les écrans.
   --------------------------------------------------------------------- */
[data-bs-theme="light"] .qz-auth-shell {
    color: #273449;
    background:
        radial-gradient(circle at 12% 12%, rgba(245, 128, 62, .14), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(42, 123, 228, .10), transparent 26rem),
        #f8fafc;
}

[data-bs-theme="light"] .login-card,
[data-bs-theme="light"] .register-card,
[data-bs-theme="light"] .forgot-card,
[data-bs-theme="light"] .reset-card,
[data-bs-theme="light"] .check-card {
    color: #273449;
    background: #ffffff !important;
    border-color: #d8e2ef !important;
}

[data-bs-theme="light"] .qz-auth-helper,
[data-bs-theme="light"] .qz-auth-switch,
[data-bs-theme="light"] .login-card .text-muted,
[data-bs-theme="light"] .register-card .text-muted,
[data-bs-theme="light"] .forgot-card .text-muted,
[data-bs-theme="light"] .reset-card .text-muted,
[data-bs-theme="light"] .check-card .text-muted {
    color: #596579 !important;
}

[data-bs-theme="light"] .login-card .form-control,
[data-bs-theme="light"] .login-card .form-select,
[data-bs-theme="light"] .register-card .form-control,
[data-bs-theme="light"] .register-card .form-select,
[data-bs-theme="light"] .forgot-card .form-control,
[data-bs-theme="light"] .reset-card .form-control {
    color: #273449;
    background-color: #ffffff;
    border-color: #cbd6e4;
}

[data-bs-theme="light"] .login-card .form-control::placeholder,
[data-bs-theme="light"] .register-card .form-control::placeholder,
[data-bs-theme="light"] .forgot-card .form-control::placeholder,
[data-bs-theme="light"] .reset-card .form-control::placeholder {
    color: #7a8799;
}

[data-bs-theme="dark"] .qz-auth-shell {
    color: #e7edf6;
    background:
        radial-gradient(circle at 12% 12%, rgba(245, 128, 62, .16), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(42, 123, 228, .18), transparent 26rem),
        #101827;
}

[data-bs-theme="dark"] .login-card,
[data-bs-theme="dark"] .register-card,
[data-bs-theme="dark"] .forgot-card,
[data-bs-theme="dark"] .reset-card,
[data-bs-theme="dark"] .check-card {
    color: #e7edf6;
    background: #172235 !important;
    border-color: #34415a !important;
}

[data-bs-theme="dark"] .login-card .card-body,
[data-bs-theme="dark"] .register-card .card-body,
[data-bs-theme="dark"] .forgot-card .card-body,
[data-bs-theme="dark"] .reset-card .card-body,
[data-bs-theme="dark"] .check-card .card-body {
    color: #e7edf6;
}

[data-bs-theme="dark"] .qz-auth-helper,
[data-bs-theme="dark"] .qz-auth-switch,
[data-bs-theme="dark"] .login-card .text-muted,
[data-bs-theme="dark"] .register-card .text-muted,
[data-bs-theme="dark"] .forgot-card .text-muted,
[data-bs-theme="dark"] .reset-card .text-muted,
[data-bs-theme="dark"] .check-card .text-muted {
    color: #aeb9ca !important;
}

[data-bs-theme="dark"] .login-card .form-label,
[data-bs-theme="dark"] .register-card .form-label,
[data-bs-theme="dark"] .forgot-card .form-label,
[data-bs-theme="dark"] .reset-card .form-label,
[data-bs-theme="dark"] .check-card label,
[data-bs-theme="dark"] .register-card .step-title {
    color: #e7edf6 !important;
}

[data-bs-theme="dark"] .login-card .form-control,
[data-bs-theme="dark"] .login-card .form-select,
[data-bs-theme="dark"] .register-card .form-control,
[data-bs-theme="dark"] .register-card .form-select,
[data-bs-theme="dark"] .forgot-card .form-control,
[data-bs-theme="dark"] .reset-card .form-control {
    color: #f5f7fb;
    background-color: #202d43;
    border-color: #465670;
}

[data-bs-theme="dark"] .login-card .form-control::placeholder,
[data-bs-theme="dark"] .register-card .form-control::placeholder,
[data-bs-theme="dark"] .forgot-card .form-control::placeholder,
[data-bs-theme="dark"] .reset-card .form-control::placeholder {
    color: #aeb9ca;
}

[data-bs-theme="dark"] .login-card .form-control:focus,
[data-bs-theme="dark"] .login-card .form-select:focus,
[data-bs-theme="dark"] .register-card .form-control:focus,
[data-bs-theme="dark"] .register-card .form-select:focus,
[data-bs-theme="dark"] .forgot-card .form-control:focus,
[data-bs-theme="dark"] .reset-card .form-control:focus {
    color: #ffffff;
    background-color: #24334b;
    border-color: #f5803e;
}

[data-bs-theme="dark"] .login-card .btn-light,
[data-bs-theme="dark"] .register-card .btn-light {
    color: #e7edf6;
    background-color: #202d43;
    border-color: #465670;
}

[data-bs-theme="dark"] .login-card hr,
[data-bs-theme="dark"] .register-card hr,
[data-bs-theme="dark"] .forgot-card hr,
[data-bs-theme="dark"] .reset-card hr,
[data-bs-theme="dark"] .check-card hr,
[data-bs-theme="dark"] .qz-auth-switch {
    border-color: #34415a !important;
}

[data-bs-theme="dark"] .forgot-card .info-steps,
[data-bs-theme="dark"] .forgot-card .info-steps + *,
[data-bs-theme="dark"] .forgot-card [style*="background"] {
    color: #d7deea;
}

[data-bs-theme="dark"] .country-list {
    color: #e7edf6;
    background: #202d43;
    border-color: #465670;
}

[data-bs-theme="dark"] .country-list .country-option {
    border-bottom-color: #34415a;
}

[data-bs-theme="dark"] .country-list .country-option:hover,
[data-bs-theme="dark"] .country-list .country-option.selected {
    background: rgba(245,128,62,.18);
    color: #ffc08e;
}

.login-card,
.register-card,
.forgot-card,
.reset-card,
.check-card {
    border: 1px solid var(--bs-border-color, #d8e2ef) !important;
    border-radius: 1.25rem !important;
    background: var(--bs-body-bg, #fff) !important;
    box-shadow: 0 1rem 3rem rgba(28, 39, 60, .12) !important;
}

.login-card:hover,
.register-card:hover,
.forgot-card:hover,
.reset-card:hover,
.check-card:hover {
    box-shadow: 0 1.25rem 3.5rem rgba(28, 39, 60, .16) !important;
}

.login-header,
.register-header,
.forgot-header,
.reset-header,
.check-header {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 2rem !important;
    background: linear-gradient(135deg, #f5803e 0%, #e76f35 48%, #2a7be4 140%) !important;
}

.login-header::after,
.register-header::after,
.forgot-header::after,
.reset-header::after,
.check-header::after {
    content: '';
    position: absolute;
    width: 13rem;
    height: 13rem;
    right: -6rem;
    top: -7rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    box-shadow: 0 0 0 1.5rem rgba(255,255,255,.05), 0 0 0 3rem rgba(255,255,255,.035);
}

.login-header > *,
.register-header > *,
.forgot-header > *,
.reset-header > *,
.check-header > * {
    position: relative;
    z-index: 1;
}

.login-header .logo-icon,
.register-header .logo-icon,
.forgot-header .logo-icon,
.reset-header .logo-icon,
.check-header .logo-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.16);
    box-shadow: 0 .5rem 1.25rem rgba(80, 45, 30, .16);
}

.login-header h4,
.register-header h4,
.forgot-header h4,
.reset-header h4,
.check-header h4 {
    letter-spacing: -.02em;
}

.login-card .card-body,
.register-card .card-body,
.forgot-card .card-body,
.reset-card .card-body,
.check-card .card-body {
    padding: 2rem !important;
}

.login-card .form-label,
.register-card .form-label,
.forgot-card .form-label,
.reset-card .form-label {
    color: var(--bs-body-color);
}

.login-card .form-control,
.login-card .form-select,
.register-card .form-control,
.register-card .form-select,
.forgot-card .form-control,
.reset-card .form-control {
    min-height: 2.85rem;
    border-radius: .65rem;
    border-color: var(--bs-border-color, #d8e2ef);
    background-color: var(--bs-body-bg, #fff);
}

.login-card .form-control:focus,
.login-card .form-select:focus,
.register-card .form-control:focus,
.register-card .form-select:focus,
.forgot-card .form-control:focus,
.reset-card .form-control:focus {
    border-color: #f5803e;
    box-shadow: 0 0 0 .2rem rgba(245, 128, 62, .15);
}

.login-card .btn-warning,
.register-card .btn-warning,
.forgot-card .btn-warning,
.reset-card .btn-warning {
    border-radius: .65rem;
    box-shadow: 0 .35rem .8rem rgba(245, 128, 62, .18);
}

.login-card .btn-light,
.register-card .btn-light {
    border-radius: .65rem;
}

.login-card .alert,
.register-card .alert,
.forgot-card .alert,
.reset-card .alert,
.check-card .alert {
    border-radius: .7rem;
}

.qz-auth-helper {
    color: var(--bs-secondary-color, #748194);
    font-size: .9rem;
    line-height: 1.65;
}

@media (max-width: 575.98px) {
    .qz-auth-shell { padding: 5.75rem 0 2.5rem !important; }
    .login-header,
    .register-header,
    .forgot-header,
    .reset-header,
    .check-header { padding: 2rem 1.25rem !important; }
    .login-card .card-body,
    .register-card .card-body,
    .forgot-card .card-body,
    .reset-card .card-body,
    .check-card .card-body { padding: 1.25rem !important; }
}
