/* Professional Login Page Styles - Édition Noël */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap');

:root {
    --christmas-red: #B22222;
    --christmas-green: #228B22;
    --christmas-gold: #DAA520;
    --christmas-silver: #C0C0C0;
    --snow-white: #FFF9F9;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #0a3d2e 0%, #1a5c48 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    overflow: hidden;
    position: relative;
}

/* Effets de neige dynamique */
.snowfall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Décorations de Noël flottantes */
.christmas-ornament {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.ornament-red {
    background: radial-gradient(circle at 30% 30%, var(--christmas-red), #8B0000);
    box-shadow: 0 0 8px rgba(178, 34, 34, 0.6);
}

.ornament-green {
    background: radial-gradient(circle at 30% 30%, var(--christmas-green), #006400);
    box-shadow: 0 0 8px rgba(34, 139, 34, 0.6);
}

.ornament-gold {
    background: radial-gradient(circle at 30% 30%, var(--christmas-gold), #B8860B);
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.6);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Effet de lumières de Noël clignotantes */
.christmas-lights {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    z-index: 2;
    overflow: hidden;
}

.light {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: twinkle 1.5s infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Conteneur de connexion avec thème Noël */
.login-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 249, 249, 0.97) 100%);
    border-radius: 15px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(178, 34, 34, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-in-out;
    position: relative;
    z-index: 3;
    border: 1px solid rgba(218, 165, 32, 0.2);
}

.login-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--christmas-red), var(--christmas-green), var(--christmas-gold), var(--christmas-silver));
    border-radius: 18px;
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% {
        opacity: 0.2;
        filter: blur(8px);
    }

    100% {
        opacity: 0.4;
        filter: blur(4px);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* En-tête avec thème Noël */
.login-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--christmas-gold), transparent);
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(45deg, var(--christmas-red), var(--christmas-green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.login-title::before,
.login-title::after {
    content: '🎄';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.8;
    animation: swing 3s ease-in-out infinite;
}

.login-title::before {
    left: -30px;
}

.login-title::after {
    right: -30px;
}

@keyframes swing {

    0%,
    100% {
        transform: translateY(-50%) rotate(0deg);
    }

    25% {
        transform: translateY(-50%) rotate(15deg);
    }

    75% {
        transform: translateY(-50%) rotate(-15deg);
    }
}

.login-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 0;
    font-style: italic;
}

.alert {
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
    transition: color 0.3s ease;
}

.form-label:hover {
    color: var(--christmas-red);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: var(--christmas-green);
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
    background: #fff;
    outline: none;
}

.form-control.is-invalid {
    border-color: var(--christmas-red);
    background: #fff5f5;
}

.form-control.is-invalid:focus {
    border-color: var(--christmas-red);
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 1;
}

.password-toggle:hover {
    color: var(--christmas-gold);
    transform: translateY(-50%) scale(1.2);
}

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

.forgot-password a {
    color: var(--christmas-green);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 0;
}

.forgot-password a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--christmas-red);
    transition: width 0.3s ease;
}

.forgot-password a:hover {
    color: var(--christmas-red);
}

.forgot-password a:hover::after {
    width: 100%;
}

/* Bouton de connexion avec effet Noël */
.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--christmas-red) 0%, var(--christmas-green) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(178, 34, 34, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::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;
}

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

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

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

/* Animation de succès pour Noël */
@keyframes christmasSuccess {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px var(--christmas-gold);
    }

    100% {
        transform: scale(1);
    }
}

.success-animation {
    animation: christmasSuccess 0.5s ease-in-out;
}

/* Media queries pour la responsivité */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 30px 20px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-title::before,
    .login-title::after {
        font-size: 16px;
    }

    .login-title::before {
        left: -25px;
    }

    .login-title::after {
        right: -25px;
    }
}