:root {
    --theme-1: #0d1409;
    --theme-2: #1a2410;
    --theme-3: var(--lssd-green);
    --theme-4: var(--lssd-gold);
    --theme-5: rgba(45,80,22,0.03);
    --theme-6: var(--lssd-green) 0%, var(--lssd-green-dark);
    --theme-7: var(--lssd-gold);
    --theme-8: #f0f7ed;
    --theme-9: #e8f0e0;
    --theme-10: #2d5016;
    --theme-11: rgba(45,80,22,0.15);
    --theme-12: rgba(45,80,22,0.4);
    --theme-13: transparent;
    --theme-14: transparent;
}

html.theme-octobre-rose {
    --theme-1: #1a0d14;
    --theme-2: #2d1424;
    --theme-3: var(--octobre-rose);
    --theme-4: var(--octobre-rose);
    --theme-5: rgba(255,105,180,0.03);
    --theme-6: var(--octobre-rose) 0%, var(--octobre-rose-dark);
    --theme-7: rgba(255,255,255,0.5);
    --theme-8: #ffe6f0;
    --theme-9: #ffd6e8;
    --theme-10: #8b0042;
    --theme-11: rgba(255,105,180,0.15);
    --theme-12: rgba(255,105,180,0.4);
    --theme-13: var(--octobre-rose);
    --theme-14: var(--octobre-rose-dark);
}

:root {
    --lssd-green: #2d5016;
    --lssd-green-dark: #1a3009;
    --lssd-gold: #d4af37;
    --lssd-gold-dark: #b8941f;
    --octobre-rose: #ff69b4;
    --octobre-rose-dark: #e055a1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--theme-1) 0%, var(--theme-2) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.background {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.background::before,
.background::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    animation: float 20s infinite ease-in-out;
}

.background::before {
    width: 600px;
    height: 600px;
    background: var(--theme-3);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.background::after {
    width: 400px;
    height: 400px;
    background: var(--theme-4);
    bottom: -150px;
    right: -150px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-50px) scale(1.1); }
}

.background-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, var(--theme-5) 12%, transparent 12.5%, transparent 87%, var(--theme-5) 87.5%, var(--theme-5)),
        linear-gradient(150deg, var(--theme-5) 12%, transparent 12.5%, transparent 87%, var(--theme-5) 87.5%, var(--theme-5));
    background-size: 80px 140px;
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 90%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    overflow: hidden;
    animation: slideUp 0.6s ease;
}

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

.login-header {
    background: linear-gradient(135deg, var(--theme-6) 100%);
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
}

.logo-wrapper {
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.logo {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.title {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: fadeInDown 0.8s ease 0.1s both;
}

.subtitle {
    color: rgba(255,255,255,0.95);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: fadeInDown 0.8s ease 0.2s both;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--theme-7), transparent);
    margin: 20px 0 0 0;
}

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

.login-body {
    padding: 40px 30px;
    animation: fadeIn 0.8s ease 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alert {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid #dc3545;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.alert i {
    color: #dc3545;
    font-size: 1.2rem;
    margin-top: 2px;
}

.info-alert {
    background: linear-gradient(135deg, var(--theme-8) 0%, var(--theme-9) 100%);
    color: var(--theme-10);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid var(--theme-4);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-alert i {
    color: var(--theme-4);
    font-size: 1.2rem;
    margin-top: 2px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
    color: #1a1a1a;
}

.form-control:focus {
    outline: none;
    border-color: var(--theme-3);
    box-shadow: 0 0 0 4px var(--theme-11);
}

.btn-login {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--theme-6) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--theme-12);
}

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

.security-notice {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 24px;
    border-left: 4px solid #6c757d;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.security-notice i {
    color: #6c757d;
    font-size: 1.1rem;
    margin-top: 2px;
}

.octobre-rose-banner {
    background: linear-gradient(135deg, var(--theme-13) 0%, var(--theme-14) 100%);
    color: white;
    padding: 16px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 576px) {
    .login-container {
        width: 95%;
        margin: 20px;
    }

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

    .logo {
        width: 80px;
        height: 80px;
    }

    .title {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

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