/**
 * Auth Pages Stylesheet — CryoSystem
 * 
 * Style moderne inspiré de Stripe pour les pages d'authentification :
 * connexion, inscription, vérification email, reset password.
 * 
 * Caractéristiques :
 * - Fond blanc/gris très clair
 * - Cards blanches avec ombre subtile
 * - Inputs larges et épurés
 * - Typographie système moderne
 * - Espacement généreux
 */

/* ============================================
   Variables
   ============================================ */
:root {
    --auth-bg: #f6f9fc;
    --auth-card-bg: #ffffff;
    --auth-card-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.08);
    --auth-card-radius: 12px;
    --auth-input-border: #e0e0e0;
    --cryo-blue: #0055b8;
    --auth-input-focus: var(--cryo-blue);
    --auth-input-radius: 8px;
    --auth-text-primary: #1a1a1a;
    --auth-text-secondary: #6b7280;
    --auth-text-muted: #9ca3af;
    --auth-primary: var(--cryo-blue);
    --auth-primary-hover: #004a9e;
    --auth-error: #dc2626;
    --auth-error-bg: #fef2f2;
    --auth-success: #059669;
    --auth-success-bg: #ecfdf5;
    --auth-link: var(--cryo-blue);
}

/* ============================================
   Base Layout
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--auth-bg);
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-container {
    width: 100%;
    max-width: 460px;
}

/* ============================================
   Logo / Brand
   ============================================ */
.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand__logo-img {
    max-height: 80px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-brand__logo-text {
    font-size: 28px;
    font-weight: 600;
    color: var(--auth-text-primary);
    letter-spacing: -0.02em;
}

.auth-brand__logo {
    max-height: 60px;
    max-width: 200px;
    margin-bottom: 12px;
}

.auth-brand__name {
    font-size: 24px;
    font-weight: 600;
    color: var(--auth-text-primary);
    letter-spacing: -0.02em;
}

.auth-brand__name span {
    color: var(--auth-primary);
}

/* ============================================
   Card
   ============================================ */
.auth-card {
    background: var(--auth-card-bg);
    border-radius: var(--auth-card-radius);
    padding: 40px;
    box-shadow: var(--auth-card-shadow);
}

.auth-card__title {
    font-size: 24px;
    font-weight: 600;
    color: var(--auth-text-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.auth-card__subtitle {
    font-size: 15px;
    color: var(--auth-text-secondary);
    margin: 0 0 28px 0;
    line-height: 1.5;
}

/* ============================================
   Form Elements
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-text-primary);
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--auth-text-primary);
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: var(--auth-input-radius);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: var(--auth-text-muted);
}

.auth-input:focus {
    border-color: var(--auth-input-focus);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12);
}

.auth-input:hover:not(:focus) {
    border-color: #c0c4cc;
}

.auth-input--error {
    border-color: var(--auth-error);
}

.auth-input--error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Password field with toggle */
.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper .auth-input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--auth-text-muted);
    transition: color 0.15s ease;
}

.auth-password-toggle:hover {
    color: var(--auth-text-secondary);
}

/* ============================================
   Buttons
   ============================================ */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--auth-input-radius);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.auth-btn--primary {
    background: var(--auth-primary);
    color: #fff;
}

.auth-btn--primary:hover {
    background: var(--auth-primary-hover);
}

.auth-btn--primary:active {
    transform: scale(0.98);
}

.auth-btn--primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.auth-btn--secondary {
    background: transparent;
    color: var(--auth-primary);
    border: 1px solid var(--auth-input-border);
}

.auth-btn--secondary:hover {
    background: #f9fafb;
    border-color: #c0c4cc;
}

.auth-btn--full {
    width: 100%;
}

/* ============================================
   Alerts / Messages
   ============================================ */
.auth-alert {
    padding: 14px 16px;
    border-radius: var(--auth-input-radius);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.auth-alert--error {
    background: var(--auth-error-bg);
    color: var(--auth-error);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.auth-alert--success {
    background: var(--auth-success-bg);
    color: var(--auth-success);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.auth-alert--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid rgba(29, 78, 216, 0.2);
}

.auth-alert--warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.2);
}

/* Field error */
.auth-field-error {
    font-size: 13px;
    color: var(--auth-error);
    margin-top: 4px;
}

/* ============================================
   Help Text / Password Requirements
   ============================================ */
.auth-help {
    font-size: 13px;
    color: var(--auth-text-muted);
    line-height: 1.5;
}

.auth-requirements {
    background: #f9fafb;
    border-radius: var(--auth-input-radius);
    padding: 16px;
    margin-top: 8px;
}

.auth-requirements__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-text-secondary);
    margin: 0 0 10px 0;
}

.auth-requirements__list {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: var(--auth-text-secondary);
    line-height: 1.7;
}

/* ============================================
   Links / Footer
   ============================================ */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--auth-text-secondary);
}

.auth-link {
    color: var(--auth-link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--auth-text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-input-border);
}

.auth-divider::before {
    margin-right: 16px;
}

.auth-divider::after {
    margin-left: 16px;
}

/* ============================================
   Checkbox
   ============================================ */
.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    cursor: pointer;
    accent-color: var(--auth-primary);
}

.auth-checkbox label {
    font-size: 14px;
    color: var(--auth-text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 520px) {
    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .auth-card__title {
        font-size: 22px;
    }

    .auth-brand__name {
        font-size: 20px;
    }
}

/* ============================================
   ReCAPTCHA
   ============================================ */
.grecaptcha-badge {
    visibility: visible !important;
    z-index: 9999;
}

/* ============================================
   Utility — remplace les styles inline
   ============================================ */
.auth-btn--resend {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.auth-footer--extra {
    margin-top: 12px;
}
