/* public/assets/css/auth.css */
/* Styles d'authentification monochrome Cover AR */

/* ================================================
   LAYOUT AUTHENTIFICATION
   ================================================ */

.auth-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: "Open Sans", sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    animation: authFadeIn 600ms ease-out;
}

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

/* ================================================
   CARTE PRINCIPALE
   ================================================ */

.auth-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.auth-header {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    background: #000000;
    color: #ffffff;
    position: relative;
}

.auth-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #ffffff;
}

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

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.025em;
    color: #fefefe;
}

/* ================================================
   CONTENU PRINCIPAL
   ================================================ */

.auth-content {
    padding: 2rem 1.5rem;
}

.auth-description {
    text-align: center;
    margin-bottom: 2rem;
    color: #666666;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.auth-form {
    width: 100%;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.875rem;
}

.auth-form .form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 150ms ease;
    background-color: #ffffff;
    color: #1a1a1a;
}

.auth-form .form-input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.auth-form .form-input::placeholder {
    color: #999999;
}

.auth-form .form-input.form-error {
    border-color: #666666;
    background-color: #fafafa;
}

.auth-form .form-help {
    font-size: 0.8125rem;
    color: #666666;
    margin-top: 0.5rem;
}

.auth-form .form-error-message {
    color: #666666;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form .form-error-message::before {
    content: '⚠';
    font-size: 1rem;
}

/* ================================================
   BOUTONS
   ================================================ */

.auth-form .form-actions {
    margin: 2rem 0 1.5rem;
}

.auth-form .btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 150ms ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-form .btn-primary {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.auth-form .btn-primary:hover:not(:disabled) {
    background-color: #333333;
    border-color: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ================================================
   LIENS
   ================================================ */

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link {
    color: #000000;
    font-size: 0.875rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 150ms ease;
    font-weight: 500;
}

.auth-link:hover {
    border-bottom-color: #000000;
}

/* Multiple links */
.auth-links .auth-link + .auth-link {
    margin-left: 1rem;
}

.auth-links .auth-link + .auth-link::before {
    content: '•';
    margin-right: 1rem;
    color: #cccccc;
}

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

.auth-footer {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    color: #666666;
    font-size: 0.8125rem;
    border-top: 1px solid #e5e5e5;
}

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

@media (max-width: 480px) {
    .auth-body {
        padding: 0.5rem;
    }
    
    .auth-content {
        padding: 1.5rem 1rem;
    }
    
    .auth-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .auth-logo {
        padding-bottom: 1rem;
    }
    
    .auth-form .form-input {
        padding: 0.875rem;
        font-size: 16px; /* Éviter le zoom sur iOS */
    }
    
    .auth-form .btn {
        padding: 0.875rem 1rem;
        min-height: 44px;
    }
}

/* ================================================
   ÉTATS DE CHARGEMENT
   ================================================ */

.auth-form .btn.loading {
    color: transparent;
    position: relative;
}

.auth-form .btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ================================================
   ALERTES DANS AUTHENTIFICATION
   ================================================ */

.auth-content .alert {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* ================================================
   FOCUS ET ACCESSIBILITÉ
   ================================================ */

.auth-form .form-input:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.auth-form .btn:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.auth-link:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ================================================
   ANIMATIONS RÉDUITES
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .auth-container {
        animation: none;
    }
    
    .auth-form .btn:hover {
        transform: none;
    }
    
    .auth-form .btn.loading::after {
        animation: none;
        border: 2px solid #ffffff;
        border-radius: 2px;
    }
}

/* ================================================
   IMPRESSION
   ================================================ */

@media print {
    .auth-body {
        background: #ffffff;
    }
    
    .auth-card {
        box-shadow: none;
        border: 1px solid #000000;
    }
    
    .auth-header {
        background: #ffffff;
        color: #000000;
    }
    
}