/* Mon Espace - Login & Profile Styles */

/* ========================================
   MODERN LOGIN SECTION
   ======================================== */

.modern-login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.login-card-modern {
    background: white;
    border-radius: 24px;
    box-shadow: 
        0 10px 40px rgba(113, 114, 197, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    border: 3px solid #7172C5;
    position: relative;
    overflow: hidden;
}

.login-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        #7172C5 0%, 
        #9394D5 25%, 
        #7172C5 50%, 
        #9394D5 75%, 
        #7172C5 100%);
}

.login-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    background: white;
    border-radius: 50%;
    border: 4px solid #7172C5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 20px rgba(113, 114, 197, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.login-icon img {
    width: 75%;
    height: 75%;
    object-fit: contain;
}

.login-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 2.2rem;
    font-style: italic;
    color: #7172C5;
    margin: 0 0 10px 0;
    font-weight: normal;
}

.login-subtitle {
    font-family: 'Times New Roman', serif;
    font-size: 1rem;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 35px 0;
}

/* ========================================
   LOGIN FORM MODERN
   ======================================== */

.login-form-modern {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.code-input-modern {
    width: 100%;
    padding: 18px 25px;
    font-family: 'Times New Roman', serif;
    font-size: 1.3rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 4px;
    border: 2px solid rgba(113, 114, 197, 0.3);
    border-radius: 12px;
    background: rgba(113, 114, 197, 0.05);
    color: #333;
    transition: all 0.3s ease;
    font-weight: bold;
}

.code-input-modern::placeholder {
    color: #999;
    letter-spacing: 3px;
    font-weight: normal;
}

.code-input-modern:focus {
    outline: none;
    border-color: #7172C5;
    background: white;
    box-shadow: 
        0 0 0 4px rgba(113, 114, 197, 0.1),
        0 4px 12px rgba(113, 114, 197, 0.2);
    transform: scale(1.02);
}

.alert-message {
    padding: 12px 20px;
    background: linear-gradient(135deg, 
        rgba(244, 67, 54, 0.1) 0%, 
        rgba(239, 83, 80, 0.1) 100%);
    border: 2px solid rgba(244, 67, 54, 0.3);
    border-radius: 10px;
    color: #d32f2f;
    font-family: 'Times New Roman', serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-message::before {
    content: '⚠️';
    font-size: 1.2rem;
}

.validate-btn-modern {
    width: 100%;
    padding: 16px 30px;
    font-family: 'Libre Baskerville', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: white;
    background: linear-gradient(135deg, #7172C5 0%, #9394D5 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(113, 114, 197, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.validate-btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
}

.validate-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(113, 114, 197, 0.4),
        0 3px 8px rgba(0, 0, 0, 0.15);
}

.validate-btn-modern:hover::before {
    left: 100%;
}

.validate-btn-modern:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(113, 114, 197, 0.3),
        0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   RESPONSIVE LOGIN
   ======================================== */

@media (max-width: 768px) {
    .modern-login-section {
        padding: 30px 15px;
        min-height: 50vh;
    }
    
    .login-card-modern {
        padding: 40px 30px;
        border-radius: 20px;
    }
    
    .login-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }
    
    .code-input-modern {
        padding: 16px 20px;
        font-size: 1.1rem;
        letter-spacing: 3px;
    }
    
    .validate-btn-modern {
        padding: 14px 25px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .modern-login-section {
        padding: 20px 10px;
    }
    
    .login-card-modern {
        padding: 35px 25px;
        border-radius: 16px;
    }
    
    .login-icon {
        width: 90px;
        height: 90px;
        margin-bottom: 18px;
    }
    
    .login-title {
        font-size: 1.6rem;
    }
    
    .login-subtitle {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
        margin-bottom: 25px;
    }
    
    .code-input-modern {
        padding: 14px 18px;
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .validate-btn-modern {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .alert-message {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .login-card-modern {
        padding: 30px 20px;
    }
    
    .login-icon {
        width: 80px;
        height: 80px;
    }
    
    .login-title {
        font-size: 1.4rem;
    }
    
    .code-input-modern {
        font-size: 0.95rem;
        padding: 12px 15px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.login-card-modern {
    animation: fadeIn 0.5s ease;
}

.login-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 8px 20px rgba(113, 114, 197, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 10px 25px rgba(113, 114, 197, 0.4),
            inset 0 2px 4px rgba(255, 255, 255, 0.5);
    }
}
