.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(rgba(15, 15, 23, 0.65), rgba(15, 15, 23, 0.65)), url("/images/login-background.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-color);
    border-radius: var(--rz-border-radius, 1rem);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    padding: 2.25rem 2rem;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rz-secondary), var(--rz-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 0.75rem;
}

.auth-brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--rz-text-color);
    margin: 0;
}

.auth-subtitle {
    text-align: center;
    color: var(--rz-text-secondary-color);
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

/* Alerts */
.auth-alert {
    border-radius: var(--rz-border-radius, 0.6rem);
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.auth-alert-danger {
    background-color: var(--rz-danger-lighter, rgba(229, 57, 53, 0.12));
    border: 1px solid var(--rz-danger-light, rgba(229, 57, 53, 0.4));
    color: var(--rz-danger, #c62828);
}

.auth-alert-success {
    background-color: var(--rz-success-lighter, rgba(67, 160, 71, 0.12));
    border: 1px solid var(--rz-success-light, rgba(67, 160, 71, 0.4));
    color: var(--rz-success, #2e7d32);
}

/* Champ avec label flottant (CSS-only, sans Bootstrap) */
.auth-field {
    position: relative;
}

.auth-field + .auth-field {
    margin-top: 0.85rem;
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    height: 3.5rem;
    padding: 1.625rem 0.85rem 0.625rem;
    background-color: var(--rz-body-background-color);
    border: 1px solid var(--rz-border-color);
    border-radius: var(--rz-border-radius, 0.5rem);
    color: var(--rz-text-color);
    font-size: 1rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-input:focus {
    border-color: var(--rz-primary);
    box-shadow: 0 0 0 0.2rem var(--rz-primary-lighter);
}

.auth-input::placeholder {
    color: transparent;
}

.auth-field label {
    position: absolute;
    top: 0;
    left: 0.85rem;
    height: 100%;
    padding: 1rem 0 0;
    pointer-events: none;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    color: var(--rz-text-secondary-color);
    font-size: 1rem;
    white-space: nowrap;
}

/* Le label remonte quand le champ est focusé ou rempli */
.auth-input:focus ~ label,
.auth-input:not(:placeholder-shown) ~ label {
    opacity: 0.75;
    transform: scale(0.78) translateY(-0.6rem);
}

/* Case à cocher */
.auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--rz-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-check-label {
    color: var(--rz-text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Boutons */
.auth-btn {
    display: inline-block;
    padding: 0.65rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--rz-border-radius, 0.6rem);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}

.auth-btn-full {
    width: 100%;
    display: block;
    margin-top: 1.25rem;
}

.auth-btn-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.auth-btn-row .auth-btn {
    flex: 1;
    margin-top: 0;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--rz-primary), var(--rz-primary-dark));
    color: var(--rz-on-primary);
    border: none;
}

.auth-btn-primary:hover {
    background: linear-gradient(135deg, var(--rz-primary-dark), var(--rz-primary-darker));
    color: var(--rz-on-primary);
}

.auth-btn-secondary {
    background: transparent;
    color: var(--rz-text-secondary-color);
    border-color: var(--rz-border-color);
}

.auth-btn-secondary:hover {
    background-color: var(--rz-primary-lighter);
    color: var(--rz-primary);
    border-color: var(--rz-primary-light);
}

.auth-btn-link {
    background: transparent;
    border: none;
    color: var(--rz-primary);
    padding: 0;
    font-weight: 400;
    font-size: 0.875rem;
}

.auth-btn-link:hover {
    color: var(--rz-primary-light);
    text-decoration: underline;
}

/* Liens en bas de formulaire */
.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.auth-links a {
    color: var(--rz-primary);
    text-decoration: none;
}

.auth-links a:hover {
    color: var(--rz-primary-light);
    text-decoration: underline;
}

/* Saisie OTP */
.otp-input-row {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.5rem 0 1.25rem;
}

.otp-box {
    width: 3rem;
    height: 3.25rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: var(--rz-border-radius, 0.6rem);
    border: 1px solid var(--rz-border-color);
    background-color: var(--rz-body-background-color);
    color: var(--rz-text-color);
    outline: none;
}

.otp-box:focus {
    border-color: var(--rz-primary);
    box-shadow: 0 0 0 0.2rem var(--rz-primary-lighter);
}

/* QR code TOTP */
.auth-qrcode {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0;
}

.auth-qrcode img {
    border-radius: var(--rz-border-radius, 0.75rem);
    border: 1px solid var(--rz-border-color);
    padding: 0.5rem;
    background: #fff;
}
