/* Styles pour les écrans larges (min-width: 768px) */
@media (min-width: 768px) {
    body {
        font-family: 'Poppins', Arial, sans-serif;
        background: linear-gradient(135deg, #0d0d0d, #1b1b1b);
        color: #fff;
        margin: 0;
        height: 100vh;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    
    /* Conteneur de l'animation */
    body::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(229, 9, 20, 0.2) 0%, transparent 80%);
        animation: background-move 6s infinite alternate;
        z-index: -2;
        pointer-events: none; /* Ne bloque pas les interactions */
    }
    
    /* Deuxième couche pour un effet plus subtil */
    body::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(229, 9, 20, 0.1) 0%, transparent 70%);
        animation: background-move-2 10s infinite alternate-reverse;
        z-index: -3;
        pointer-events: none;
    }
    
    /* Animation douce du premier layer */
    @keyframes background-move {
        0% {
            transform: translate(0, 0) scale(1);
        }
        100% {
            transform: translate(-10%, -10%) scale(1.2);
        }
    }
    
    /* Animation douce du second layer */
    @keyframes background-move-2 {
        0% {
            transform: translate(0, 0) scale(1);
        }
        100% {
            transform: translate(10%, 10%) scale(1.3);
        }
    }
    
    /* Conteneur principal */
    .login-page {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 1200px;
        text-align: center;
        position: relative;
        height: 100vh;
    }
    
    /* Titre futuriste */
    .animated-title {
        font-size: 4rem;
        font-weight: bold;
        text-transform: uppercase;
        color: #e50914;
        letter-spacing: 8px;
        text-shadow: 
            0 0 10px #e50914,
            0 0 20px #e50914,
            0 0 40px #ff1010,
            0 0 80px #ff4040;
        animation: title-move 2s ease-out forwards, glow 1.5s ease-in-out infinite alternate;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }
    
    /* Animation pour faire monter le titre */
    @keyframes title-move {
        0% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.8);
        }
        50% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
        100% {
            transform: translate(-50%, -375px); /* Le titre monte */
        }
    }
    
    /* Animation de lueur dynamique pour le titre */
    @keyframes glow {
        0% {
            text-shadow: 
                0 0 10px #e50914,
                0 0 20px #e50914,
                0 0 40px #ff1010,
                0 0 60px #ff4040;
        }
        100% {
            text-shadow: 
                0 0 15px #e50914,
                0 0 30px #ff2020,
                0 0 60px #ff6060,
                0 0 100px #ff9090;
        }
    }
    
    /* Formulaire futuriste */
    form {
        background: linear-gradient(135deg, #1c1c1c, #262626);
        border: 1px solid #e50914;
        border-radius: 15px;
        box-shadow: 0 0 20px rgba(229, 9, 20, 0.5), 0 0 40px rgba(229, 9, 20, 0.2);
        padding: 2rem;
        width: 100%;
        max-width: 400px;
        text-align: center;
        transform: translateY(50px);
        opacity: 0;
        animation: form-appear 1.5s ease-out forwards;
        animation-delay: 2s; /* Apparaît après que le titre a fini de monter */
        position: relative;
    }
    
    /* Animation pour faire apparaître le formulaire */
    @keyframes form-appear {
        0% {
            opacity: 0;
            transform: translateY(50px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Titre du formulaire */
    form h1 {
        font-size: 2rem;
        color: #fff;
        margin-bottom: 1.5rem;
        text-transform: uppercase;
        letter-spacing: 3px;
    }
    
    /* Champs de texte */
    form input[type="text"],
    form input[type="password"] {
        width: 100%;
        padding: 0.8rem;
        border: 1px solid #333;
        border-radius: 10px;
        background: #111;
        font-size: 1rem;
        color: #fff;
        margin-bottom: 1.5rem;
        transition: all 0.3s ease-in-out;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }
    
    form input[type="text"]:focus,
    form input[type="password"]:focus {
        border-color: #e50914;
        box-shadow: 0 0 5px #e50914, 0 0 2px #ff1010;
        outline: none;
    }
    
    /* Bouton futuriste */
    form button {
        background: linear-gradient(135deg, #e50914, #ff1010);
        color: #fff;
        font-size: 1rem;
        padding: 0.8rem;
        width: 100%;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        text-transform: uppercase;
        font-weight: bold;
        letter-spacing: 2px;
        box-shadow: 0 0 15px rgba(229, 9, 20, 0.5), 0 0 30px rgba(229, 9, 20, 0.3);
        transition: all 0.3s ease-in-out;
        position: relative;
        overflow: hidden;
    }
    
    form button:hover {
        background: linear-gradient(135deg, #ff4040, #ff1010);
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(229, 9, 20, 0.7), 0 0 40px rgba(229, 9, 20, 0.5);
    }
    
    /* Lien d'inscription */
    form a {
        color: #e50914;
        text-decoration: none;
        font-size: 0.9rem;
        margin-top: 1.5rem;
        display: inline-block;
        transition: color 0.3s ease-in-out;
    }
    
    form a:hover {
        color: #ff4040;
    }
    
    /* Responsive */
    @media (max-width: 480px) {
        .animated-title {
            font-size: 2.5rem;
        }
    
        form {
            padding: 1.5rem;
        }
    
        form h1 {
            font-size: 1.8rem;
        }
    }
    /* Bouton futuriste */
    form button {
        background: linear-gradient(135deg, #e50914, #ff1010);
        color: #fff;
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
        width: 100%;
        border: none;
        border-radius: 30px; /* Boutons arrondis pour un look moderne */
        cursor: pointer;
        text-transform: uppercase;
        font-weight: bold;
        letter-spacing: 2px;
        box-shadow: 
            0 0 10px rgba(229, 9, 20, 0.4),
            0 0 20px rgba(229, 9, 20, 0.3);
        position: relative;
        overflow: hidden;
        transition: all 0.4s ease;
    }
    
    /* Effet lumineux sur le bouton */
    form button::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
        opacity: 0;
        transform: scale(0);
        transition: transform 0.5s ease, opacity 0.5s ease;
    }
    
    /* Hover futuriste */
    form button:hover {
        background: linear-gradient(135deg, #ff4040, #ff1010);
        transform: scale(1.05);
        box-shadow: 
            0 0 20px rgba(229, 9, 20, 0.6),
            0 0 40px rgba(229, 9, 20, 0.5),
            0 0 60px rgba(229, 9, 20, 0.4);
    }
    
    /* Animation d'explosion lumineuse */
    form button:hover::before {
        opacity: 1;
        transform: scale(1);
    }
    
    /* Effet au clic */
    form button:active {
        transform: scale(0.95);
        box-shadow: 
            0 0 10px rgba(229, 9, 20, 0.5),
            0 0 20px rgba(229, 9, 20, 0.3);
    }
    
    /* Bouton d'inscription (lien futuriste) */
    form a {
        display: inline-block;
        color: #e50914;
        background: transparent;
        border: 2px solid #e50914;
        border-radius: 30px;
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 2px;
        transition: all 0.4s ease;
        margin-top: 1.5rem;
        text-decoration: none;
        box-shadow: 
            0 0 10px rgba(229, 9, 20, 0.4),
            0 0 20px rgba(229, 9, 20, 0.2);
    }
    
    /* Hover futuriste pour le bouton d'inscription */
    form a:hover {
        background: #e50914;
        color: #fff;
        box-shadow: 
            0 0 20px rgba(229, 9, 20, 0.6),
            0 0 40px rgba(229, 9, 20, 0.4);
        transform: scale(1.05);
    }
    
    /* Effet au clic pour le bouton d'inscription */
    form a:active {
        transform: scale(0.95);
        box-shadow: 
            0 0 10px rgba(229, 9, 20, 0.5),
            0 0 20px rgba(229, 9, 20, 0.3);
    }
    /* Style du Modal */
    .modal {
        display: none; /* Par défaut, le modal est masqué */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8); /* Fond semi-transparent */
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }
    
    /* Contenu du modal */
    .modal-content {
        background: #1e1e1e;
        color: #fff;
        padding: 2rem;
        border-radius: 15px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
        text-align: center;
        width: 90%;
        max-width: 400px;
    }
    
    /* Header du modal */
    .modal-header {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 1rem;
        color: #e50914;
    }
    
    /* Bouton Fermer */
    .modal-footer .btn {
        padding: 0.8rem 1.5rem;
        background: #e50914;
        border: none;
        border-radius: 10px;
        color: #fff;
        cursor: pointer;
        transition: background 0.3s ease;
    }
    
    .modal-footer .btn:hover {
        background: #ff4040;
    }
}



/* Styles pour les petits écrans (max-width: 767px) */
@media (max-width: 767px) {
    body {
        font-family: 'Poppins', Arial, sans-serif;
        background: linear-gradient(135deg, #0d0d0d, #1b1b1b);
        color: #fff;
        margin: 0;
        height: 100vh;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    /* Conteneur de l'animation */
    body::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(229, 9, 20, 0.2) 0%, transparent 80%);
        animation: background-move 6s infinite alternate;
        z-index: -2;
        pointer-events: none;
    }

    body::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(229, 9, 20, 0.1) 0%, transparent 70%);
        animation: background-move-2 10s infinite alternate-reverse;
        z-index: -3;
        pointer-events: none;
    }

    /* Conteneur principal */
    .login-page {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
        position: relative;
        height: 100vh;
    }

    /* Titre futuriste */
    .animated-title {
        font-size: 2.5rem;
        font-weight: bold;
        text-transform: uppercase;
        color: #e50914;
        letter-spacing: 5px;
        text-shadow: 
            0 0 10px #e50914,
            0 0 20px #e50914,
            0 0 40px #ff1010,
            0 0 80px #ff4040;
        animation: title-move 2s ease-out forwards, glow 1.5s ease-in-out infinite alternate;
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }

    /* Formulaire futuriste */
    form {
        background: linear-gradient(135deg, #1c1c1c, #262626);
        border: 1px solid #e50914;
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(229, 9, 20, 0.5), 0 0 30px rgba(229, 9, 20, 0.2);
        padding: 1.5rem;
        width: 90%;
        text-align: center;
        transform: translateY(40px);
        opacity: 0;
        animation: form-appear 1.5s ease-out forwards;
        animation-delay: 2s;
        position: relative;
    }

    form h1 {
        font-size: 1.8rem;
        color: #fff;
        margin-bottom: 1rem;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

    form input[type="text"],
    form input[type="password"] {
        width: 100%;
        padding: 0.8rem;
        border: 1px solid #333;
        border-radius: 8px;
        background: #111;
        font-size: 0.9rem;
        color: #fff;
        margin-bottom: 1rem;
        transition: all 0.3s ease-in-out;
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }

    form button {
        background: linear-gradient(135deg, #e50914, #ff1010);
        color: #fff;
        font-size: 1rem;
        padding: 0.7rem;
        width: 100%;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        text-transform: uppercase;
        font-weight: bold;
        letter-spacing: 1px;
        box-shadow: 0 0 10px rgba(229, 9, 20, 0.5), 0 0 20px rgba(229, 9, 20, 0.3);
        transition: all 0.3s ease-in-out;
    }

    form button:hover {
        background: linear-gradient(135deg, #ff4040, #ff1010);
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(229, 9, 20, 0.7), 0 0 30px rgba(229, 9, 20, 0.5);
    }

    form a {
        color: #e50914;
        text-decoration: none;
        font-size: 0.9rem;
        margin-top: 1rem;
        display: inline-block;
        transition: color 0.3s ease-in-out;
    }

    form a:hover {
        color: #ff4040;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        max-width: 300px;
        padding: 1.5rem;
        border-radius: 10px;
    }

    .modal-footer .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    @keyframes form-appear {
        0% {
            opacity: 0;
            transform: translateY(50px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
    @keyframes title-move {
        0% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.8);
        }
        50% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
        100% {
            transform: translate(-50%, -200px); /* Le titre monte */
        }
    }
}
