/* Variables pour la cohérence des couleurs et dimensions */
:root {
    --primary-color: #2c3e50;
    --accent-color: #4CAF50;
    --accent-hover: #45a049;
    --text-color: #333;
    --text-light: #6c757d;
    --error-bg: #f8d7da;
    --error-border: #f5c6cb;
    --error-color: #721c24;
    --warning-bg: #fff3cd;
    --warning-border: #ffeeba;
    --warning-color: #856404;
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --success-color: #155724;
    --input-border: #ddd;
    --input-focus: #4CAF50;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: white;
    --page-bg: #f8f9fa;
}

/* Styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--page-bg);
    min-height: 100vh;
    line-height: 1.6;
}

/* Page de login avec formes géométriques en arrière-plan */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Formes d'arrière-plan animées */
.background-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.1), rgba(44, 62, 80, 0.1));
    animation: float 15s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    right: -50px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 15%;
    animation-delay: 10s;
}

.shape-4 {
    width: 80px;
    height: 80px;
    bottom: 30%;
    right: 10%;
    animation-delay: 7s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Container du formulaire */
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.6s ease-in-out;
}

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

/* En-tête du formulaire */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-light);
    font-size: 16px;
}

/* Alertes et messages */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.alert i {
    margin-right: 10px;
    font-size: 18px;
}

.alert-danger {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-color);
}

.alert-warning {
    background-color: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-color);
}

.alert-success {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-color);
}

/* Formulaire et champs */
.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-color);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: #aaa;
    transition: color 0.3s;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 40px 12px 40px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.input-with-icon input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.input-with-icon input:focus + i {
    color: var(--accent-color);
}

.toggle-password {
    position: absolute;
    right: 12px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Actions du formulaire */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 5px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Bouton de connexion */
.login-button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-button span {
    margin-right: 10px;
}

.login-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.login-button:active {
    transform: translateY(0);
}

/* Pied de page du formulaire */
.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    color: var(--text-light);
    font-size: 14px;
}

.back-link {
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.back-link i {
    margin-right: 6px;
}

.back-link:hover {
    color: var(--primary-color);
}

.version-info {
    font-size: 12px;
}

/* Responsive */
@media (max-width: 576px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forgot-password {
        margin-top: 10px;
    }
    
    .login-header h1 {
        font-size: 28px;
    }
}