/* Style sobre et épuré pour la page de connexion */

.login-page {
    background: #ffffff;
    min-height: 100vh;
}

.login-section {
    padding: 140px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-content {
    background: white;
    border-radius: 8px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-description {
    font-size: 1rem;
    color: #4a5568;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-input {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: #1a202c;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #1a202c;
    box-shadow: 0 0 0 3px rgba(26, 32, 44, 0.1);
}

.form-input.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-error {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 6px;
    display: none;
}

.form-error.show {
    display: block;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #1a202c;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2d3748;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #1a202c;
    border-color: #1a202c;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label input[type="checkbox"]:focus + .checkmark {
    box-shadow: 0 0 0 3px rgba(26, 32, 44, 0.1);
}

.forgot-link {
    color: #1a202c;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #2d3748;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-btn.loading {
    color: transparent;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    color: #4a5568;
    font-size: 0.95rem;
}

.link {
    color: #1a202c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link:hover {
    color: #2d3748;
    text-decoration: underline;
}

/* Messages */
.message {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.message i {
    margin-right: 8px;
    font-size: 1rem;
}

.success-message {
    background-color: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.success-message i {
    color: #48bb78;
}

.error-message {
    background-color: #fff5f5;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.error-message i {
    color: #e53e3e;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-content {
        padding: 32px 24px;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-content {
        padding: 24px 20px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-input {
        padding: 10px 14px;
    }
}
