/* Reset complet pour éliminer les bordures blanches */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: hidden;
}

.login-container {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.bg-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    animation: float 8s ease-in-out infinite;
}

.bg-element-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: -2s;
}

.bg-element-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: -4s;
}

.bg-element-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: -6s;
}

.login-box {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.3);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
    margin: 1rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 400;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: #64748b;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(15, 23, 42, 0.9);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.form-input:focus + .input-border {
    width: 100%;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.forgot-password {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #60a5fa;
}

.login-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.login-btn span {
    position: relative;
    z-index: 1;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.login-btn:hover .btn-shine {
    left: 100%;
}

.login-btn:hover {
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

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

.login-footer {
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
}

.login-footer p {
    margin-bottom: 0.5rem;
}

.register-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #60a5fa;
}

.back-to-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 1;
}

.back-to-home a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-home a:hover {
    color: #cbd5e1;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) translateX(0px); 
    }
    25% { 
        transform: translateY(-20px) translateX(10px); 
    }
    50% { 
        transform: translateY(-10px) translateX(-10px); 
    }
    75% { 
        transform: translateY(-30px) translateX(5px); 
    }
}

/* Responsive pour login */
@media (max-width: 768px) {
    .login-box {
        margin: 1rem;
        padding: 2rem;
        max-width: none;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .back-to-home {
        position: static;
        text-align: center;
        margin-top: 2rem;
    }
    
    .bg-element {
        opacity: 0.5;
    }
    
    .bg-element-1 {
        width: 200px;
        height: 200px;
    }
    
    .bg-element-2 {
        width: 150px;
        height: 150px;
    }
    
    .bg-element-3 {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Scrollbar personnalisée pour cohérence */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}