/**
 * D2U Ségur - Layout Auth (Login)
 * Design médical professionnel, fond clair, haute lisibilité
 */

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
    background: var(--background);
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   LOGO
   ========================================================================== */

.auth-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.auth-logo img {
    height: 48px;
    width: auto;
}

.auth-logo .logo-text {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--primary);
    letter-spacing: -0.02em;
}

/* ==========================================================================
   CARD
   ========================================================================== */

.auth-card {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    text-align: center;
    margin-bottom: var(--space-2);
    color: var(--primary);
}

.auth-subtitle {
    font-size: var(--text-sm);
    color: var(--muted);
    text-align: center;
    margin-bottom: var(--space-6);
}

/* ==========================================================================
   FORMULAIRES
   ========================================================================== */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form .btn {
    width: 100%;
    margin-top: var(--space-2);
}

/* Options (remember me, forgot password) */
.auth-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: var(--space-2);
    flex-wrap: nowrap;
}

.auth-options .checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-options .checkbox-label:hover {
    color: var(--foreground);
}

.auth-options .auth-forgot-link {
    font-size: var(--text-sm);
    color: var(--primary);
    transition: color var(--transition-fast);
    flex-shrink: 0;
    white-space: nowrap;
}

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

/* Checkbox styling */
.auth-options .checkbox-label,
.checkbox-label {
    display: inline-flex !important;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-label span {
    font-size: var(--text-sm);
    color: var(--muted);
}

.checkbox-label span {
    font-size: var(--text-sm);
    color: var(--muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.auth-footer {
    margin-top: var(--space-8);
    text-align: center;
}

.auth-footer p {
    font-size: var(--text-xs);
    color: var(--muted);
}

/* ==========================================================================
   BACKGROUND MÉDICAL
   ========================================================================== */

.auth-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.auth-bg-gradient {
    position: absolute;
    inset: 0;
    background: 
        /* Dégradé subtil coin supérieur gauche (bleu primaire) */
        radial-gradient(ellipse at 0% 0%, rgba(5, 37, 56, 0.04) 0%, transparent 50%),
        /* Dégradé subtil coin inférieur droit (vert santé) */
        radial-gradient(ellipse at 100% 100%, rgba(5, 81, 69, 0.03) 0%, transparent 50%),
        /* Fond légèrement grisé */
        linear-gradient(180deg, #f8fafb 0%, #f0f4f6 100%);
}

.auth-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23052538' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 480px) {
    .auth-layout {
        padding: var(--space-4);
        align-items: flex-start;
        padding-top: var(--space-12);
    }

    .auth-card {
        padding: var(--space-6);
    }

    .auth-title {
        font-size: var(--text-xl);
    }

    .auth-options {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }
    
    .auth-logo .logo-text {
        font-size: var(--text-lg);
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: authFadeIn 0.4s ease-out;
}

.auth-logo {
    animation: authFadeIn 0.4s ease-out 0.1s both;
}

.auth-footer {
    animation: authFadeIn 0.4s ease-out 0.2s both;
}
