/* ========================================
   ADMIN LOGIN - STYLES
======================================== */

/* Container principal */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Boîte de connexion */
.login-box {
    width: 100%;
    max-width: 450px;
    background: var(--card-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

[data-theme="dark"] .login-box {
    background: rgba(20, 20, 20, 0.7);
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 60px rgba(129, 140, 248, 0.1);
}

:root:not([data-theme="dark"]) .login-box {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 40px rgba(99, 102, 241, 0.05);
}

.login-box:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
}

/* Header de connexion */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 var(--accent-glow);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px var(--accent-glow);
    }
}

.login-icon svg {
    width: 40px;
    height: 40px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Formulaire */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group label {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Bouton de connexion */
.login-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::after {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Message d'erreur */
.error-message {
    padding: 1rem;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    display: none;
    animation: slideDown 0.3s ease;
}

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

.error-message.show {
    display: block;
}

/* Lien retour */
.back-home {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-home a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-home a:hover {
    color: var(--accent-primary);
    transform: translateX(-5px);
}

.back-home svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.back-home a:hover svg {
    transform: translateX(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }

    .login-box {
        padding: 2rem;
    }

    .login-header h1 {
        font-size: 1.75rem;
    }

    .login-icon {
        width: 60px;
        height: 60px;
    }

    .login-icon svg {
        width: 30px;
        height: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-icon {
        animation: none;
    }
    
    .login-btn::after {
        transition: none;
    }

    .login-box:hover {
        transform: none;
    }
}
