/* ============================================
   PAGE DE CONNEXION - AMÉLIORATIONS MODERNES
   ============================================ */

/* Animation de chargement pour le formulaire */
.login-form .form-group {
    animation: fadeInLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.login-form .form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.login-form .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-options {
    animation: fadeInLeft 0.6s ease-out 0.3s;
    animation-fill-mode: both;
}

.btn-primary {
    animation: fadeInUp 0.6s ease-out 0.4s;
    animation-fill-mode: both;
}

/* Effet de focus amélioré */
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    animation: pulse 0.5s ease;
}

/* Logo avec animation */
.logo-container {
    animation: scaleIn 0.8s ease-out;
}

/* Titre avec effet gradient */
.login-form-container h2 {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 0.6s ease-out;
}

/* Welcome text animé */
.welcome-text {
    animation: fadeInDown 0.6s ease-out 0.1s;
    animation-fill-mode: both;
}

/* Info cards avec effet hover */
.info-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.info-card i {
    font-size: 32px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 16px;
}

.info-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(198, 40, 40, 0.25);
}

/* Toggle password amélioré */
.toggle-password {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.toggle-password:hover {
    background: rgba(198, 40, 40, 0.12);
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* Checkbox personnalisé */
.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked {
    transform: scale(1.1);
}

.checkbox-container span {
    transition: color 0.3s ease;
}

.checkbox-container:hover span {
    color: var(--secondary-color);
}

/* Forgot password amélioré */
.forgot-password {
    position: relative;
    transition: all 0.3s ease;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transition: width 0.3s ease;
}

.forgot-password:hover::after {
    width: 100%;
}

/* Footer amélioré */
.login-footer {
    animation: fadeInUp 0.6s ease-out 0.5s;
    animation-fill-mode: both;
}

/* Button secondary amélioré */
.btn-secondary {
    background: transparent;
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transition: width 0.4s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.25);
}

/* Loading animation pour le bouton */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-primary .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Effet de particules pour le fond */
.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 30%);
    pointer-events: none;
    animation: float 30s ease-in-out infinite;
}

/* Input avec icône animée */
.login-form label i {
    transition: all 0.3s ease;
    display: inline-block;
}

.login-form input:focus + label i,
.login-form label:has(+ input:focus) i {
    transform: scale(1.2) rotate(10deg);
    color: var(--secondary-color);
}

/* Message d'erreur stylisé */
.error-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: block;
}

/* Animation shake pour erreur */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Success message */
.success-message {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    animation: fadeInDown 0.5s ease;
}

.success-message.show {
    display: block;
}

/* Footer bottom amélioré */
.login-footer-bottom {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: white;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-links a:hover {
    color: white;
    transform: translateY(-2px);
}

/* Responsive amélioré */
@media (max-width: 768px) {
    .info-card {
        padding: 24px;
    }
    
    .info-card i {
        font-size: 28px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .login-left::before {
        height: 2px;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .info-card h3 {
        font-size: 16px;
    }
    
    .info-card p {
        font-size: 13px;
    }
}

/* Animation pour le loader */
.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Hover effect sur les labels */
.login-form label {
    transition: all 0.3s ease;
    cursor: pointer;
}

.login-form .form-group:hover label {
    color: var(--secondary-color);
}

/* Border animation on focus */
@keyframes borderPulse {
    0%, 100% {
        border-color: rgba(198, 40, 40, 0.2);
    }
    50% {
        border-color: rgba(198, 40, 40, 0.5);
    }
}

.login-form input:focus {
    animation: borderPulse 2s ease infinite;
}
