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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Animation de fond */
body::before {
    content: '';
    position: fixed;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin: auto;
}

/* Section gauche - Branding */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    background-size: cover;
    opacity: 0.3;
}

.logo-container {
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

/* LOGO STYLES */
.logo-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

.logo-img.no-filter {
    filter: none;
}

.logo-img.no-filter:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 15px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.tagline strong {
    font-weight: 600;
}

.features {
    margin-top: 50px;
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    text-align: left;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
}

.feature-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.feature-text p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

/* Section droite - Formulaire */
.login-right {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 35px;
}

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

.form-label {
    display: block;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-control-modern {
    width: 100%;
    padding: 14px 18px 14px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-control-modern:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.1);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #2a5298;
}

.forgot-password {
    text-align: right;
    margin-top: -15px;
    margin-bottom: 25px;
}

.forgot-password a {
    color: #2a5298;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-password a:hover {
    color: #1e3c72;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.4);
}

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

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 15px;
}

.btn-secondary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: white;
    color: #2a5298;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary-action:hover {
    background: #f8fafc;
    border-color: #2a5298;
}

.btn-secondary-action i {
    margin-right: 10px;
    font-size: 18px;
}

.alert-custom {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: none;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease;
}

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

.alert-custom i {
    margin-right: 12px;
    font-size: 20px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

/* Responsive */
@media (max-width: 968px) {
    body {
        min-height: auto;
        padding: 20px 10px;
        align-items: flex-start;
    }

    .login-container {
        flex-direction: column;
        margin: 20px auto;
    }

    .login-left {
        padding: 40px 30px;
        min-height: auto;
    }

    .logo-img {
        max-width: 220px;
    }

    .features {
        display: none;
    }

    .login-right {
        padding: 40px 30px;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        min-height: auto;
        align-items: flex-start;
    }

    .login-container {
        margin: 10px auto 20px;
    }

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

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

    .login-header h2 {
        font-size: 1.5rem;
    }

    .logo-img {
        max-width: 180px;
    }

    .btn-login {
        margin-bottom: 10px;
    }

    .btn-secondary-action {
        margin-bottom: 20px;
    }

    /* Assurer que le formulaire est scrollable */
    .form-group {
        margin-bottom: 20px;
    }

    .divider {
        margin: 20px 0;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .login-right {
        padding: 25px 15px;
    }

    .form-control-modern {
        font-size: 0.95rem;
    }

    .btn-login,
    .btn-secondary-action {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* Badge anniversaire 10 ans */
.anniversary-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 100px;
    height: 100px;
    animation: float 3s ease-in-out infinite;
}

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

.badge-content {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    position: relative;
    border: 3px solid #fff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.badge-content::before {
    content: '🎉';
    position: absolute;
    top: -15px;
    font-size: 24px;
    animation: rotate 4s linear infinite;
}

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

.number {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1;
}

.text {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

/* Confettis animés */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    animation: confetti-fall 3s ease-in-out infinite;
}

.confetti:nth-child(2) {
    left: 20px;
    animation-delay: 0.5s;
    background: #FF6B6B;
}

.confetti:nth-child(3) {
    right: 20px;
    animation-delay: 1s;
    background: #4ECDC4;
}

.confetti:nth-child(4) {
    left: 50px;
    animation-delay: 1.5s;
    background: #95E1D3;
}

.confetti:nth-child(5) {
    right: 50px;
    animation-delay: 2s;
    background: #F38181;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(300px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .anniversary-badge {
        top: 10px;
        right: 10px;
        width: 80px;
        height: 80px;
    }

    .badge-content {
        width: 80px;
        height: 80px;
    }

    .number {
        font-size: 2rem;
    }

    .text {
        font-size: 0.7rem;
    }
}


.anniversary-message {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 15px 25px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
}

.anniversary-icon {
    font-size: 2rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.anniversary-text {
    color: white;
    font-size: 1rem;
}

.anniversary-text strong {
    font-size: 1.3rem;
    display: block;
    font-weight: 700;
}