/* ==============================================
   STYLES MODERNES POUR LA PAGE DE LOGIN
   ============================================== */

/* Container principal */
.login-container {
    /* min-height: 100vh; */
    display: flex;
    align-items:normal;
    justify-content: center;
    /* position: relative; */
    /* overflow: hidden; */
    padding: 20px;
}

/* Carte de login */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
    animation: slideUp 0.8s ease-out;
}

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

/* Header de la carte */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: rgb(47, 65, 224);
    margin: 0 0 8px 0;
    /* background: rgb(96, 51, 201); */
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
    background-clip: text;
}

.app-subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

/* Formulaire */
.login-form {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 24px;
    position: relative;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    font-size: 18px;
    z-index: 2;
    transition: color 0.3s ease;
}

.modern-input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    z-index: 1;
}

.modern-input:focus {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.modern-input:focus + .input-highlight {
    width: 100%;
}

.input-container.focused .input-icon {
    color: #667eea;
    transform: scale(1.1);
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    /* background: linear-gradient(135deg, #667eea, #764ba2); */
    transition: width 0.3s ease;
    border-radius: 1px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #667eea;
}

/* Messages d'erreur */
.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e53e3e;
    font-size: 14px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(229, 62, 62, 0.1);
    border-radius: 8px;
    border-left: 4px solid #e53e3e;
}

.modern-input.error {
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.05);
}

/* Checkbox personnalisée */
.remember-me {
    margin: 24px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    background: #ffffff;
}

.checkbox-container:hover .checkmark {
    border-color: #667eea;
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-text {
    color: #4a5568;
    font-size: 14px;
}

/* Bouton de connexion */
.login-btn {
    width: 100%;
    background: rgb(47, 65, 224);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

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

.btn-icon {
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Footer */
.login-footer {
    text-align: center;
}

.divider {
    position: relative;
    margin: 30px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider-text {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 20px;
    color: #a0aec0;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.footer-link:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

/* Particules d'arrière-plan */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    width: 140px;
    height: 140px;
    bottom: 10%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.6;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-card {
        padding: 30px 20px;
    }

    .app-title {
        font-size: 2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .footer-link {
        justify-content: center;
    }
}

/* Animation de chargement pour le bouton */
.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading .btn-text {
    opacity: 0;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
