/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Container d'authentification */
.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.9;
    font-size: 0.875rem;
}

/* Messages */
.error-message,
.success-message {
    margin: 1rem 2rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.error-message {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.success-message {
    background-color: #f0fdf4;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.success-message a {
    color: #059669;
    text-decoration: underline;
}

/* Formulaire */
.auth-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background-color: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:hover {
    background-color: white;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-full {
    width: 100%;
}

/* Footer */
.auth-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.auth-footer p {
    font-size: 0.875rem;
    color: #6b7280;
}

.auth-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 0;
    }
    
    .auth-card {
        border-radius: 0;
        box-shadow: none;
    }
    
    .auth-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .auth-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeIn 0.5s ease-out;
}

/* États de focus améliorés */
.form-group input:focus {
    transform: translateY(-1px);
}

/* Loading state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Validation visuelle */
.form-group input:valid {
    border-color: #059669;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

/* Checkbox personnalisée */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.2s;
    background-color: white;
}

.checkbox-label:hover .checkmark {
    border-color: #2563eb;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #2563eb;
    border-color: #2563eb;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Password strength indicator */
.password-strength {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s;
    border-radius: 2px;
}

.password-strength-bar.weak {
    background-color: #dc2626;
    width: 25%;
}

.password-strength-bar.medium {
    background-color: #d97706;
    width: 50%;
}

.password-strength-bar.strong {
    background-color: #059669;
    width: 100%;
} 