body.congrats-page, body.welcome-page {
    background-color: beige;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    padding: 0 20px; /* Ajout de padding pour espacer le contenu des bords */
}

.header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 20px;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
}

.blue-logo {
    height: 60px;
    width: auto;
    margin: 20px;
    opacity: 0;
    animation: fadeIn 1s forwards;
    filter: brightness(0) saturate(100%) invert(14%) sepia(56%) saturate(1633%) hue-rotate(168deg) brightness(93%) contrast(87%);
}

.congrats-content, .welcome-content {
    text-align: center;
    color: #0D2F3C;
    opacity: 0;
    animation: fadeIn 2s forwards;
    animation-delay: 1s;
    margin: 0 20px; /* Ajout de margin pour espacer le contenu des bords */
}

.welcome-title, .congrats-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.welcome-text, .congrats-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.magic-word {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.magic-letter {
    width: 40px;
    height: auto;
    opacity: 0;
    animation: fadeInUp 1s forwards;
}

.congrats-content p, .welcome-content p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.victoire-image {
    display: block;
    margin: 0 auto 100px;
    opacity: 0;
    animation: fadeIn 2s forwards;
    animation-delay: 2s;
}

#share-button {
    display: none; /* Hide the button by default */
    padding: 10px 20px;
    font-size: 1rem;
    color: beige;
    background-color: #609E7C;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: color 0.3s, background-color 0.3s;
    text-transform: uppercase;
    font-weight: bold;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

#share-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, #609E7C, #2c3e50);
    transition: all 0.4s;
    z-index: 0;
}

#share-button:hover::before {
    left: 100%;
}

#share-button:hover {
    color: #ecf0f1;
}

#share-button span {
    position: relative;
    z-index: 1;
}

/* Show the button on mobile devices */
@media (max-width: 768px) {
    #share-button {
        display: inline-block; /* Display the button on mobile */
    }
}

.start-button {
    padding: 20px 40px;
    font-size: 1.5rem;
    color: beige;
    background-color: #609E7C;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: color 0.3s, background-color 0.3s;
    text-transform: uppercase;
    font-weight: bold;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.start-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, #609E7C, #2c3e50);
    transition: all 0.4s;
    z-index: 0;
}

.start-button:hover::before {
    left: 100%;
}

.start-button:hover {
    color: #ecf0f1;
}

.start-button span {
    position: relative;
    z-index: 1;
}

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

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

.footer {
    width: 100%;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    background-color: beige;
    color: #0D2F3C;
    position: relative; /* Change from absolute to relative */
    bottom: 0;
    left: 0;
    margin-top: 20px; /* Adds space between content and footer */
}

.footer a {
    color: #609E7C;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:visited {
    color: #609E7C;
}

.footer a:hover {
    color: #2c3e50; /* Changez cette couleur si vous voulez un effet de survol différent */
}

.footer a:active {
    color: #609E7C;
}

/* Animation de transition pour le chargement de la page suivante */
@keyframes pageTransition {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

.page-transition {
    animation: pageTransition 0.5s forwards; /* Durée de 0.5s pour l'animation */
}

.bienvenue-image, .victoire-image {
    width: 200%; /* Double la largeur */
    max-width: 400px; /* Fixe une largeur maximale pour les grands écrans */
    height: auto; /* Maintient le ratio d'aspect */
    margin-bottom: 20px; /* Espace en dessous de l'image */
    opacity: 0; /* Initialement transparent */
    animation: fadeIn 1s forwards; /* Animation de fondu */
}

/* Pour les appareils mobiles */
@media (max-width: 768px) {
    .bienvenue-image, .victoire-image {
        width: 100%;
        max-width: 200px; /* Réduisez la taille maximale pour les petits écrans */
    }

    .welcome-title, .congrats-title {
        font-size: 1.5rem;
    }

    .welcome-text, .congrats-text {
        font-size: 1rem;
    }

    .magic-letter {
        width: 30px;
    }

    .start-button {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .footer {
        font-size: 0.8rem;
        padding: 5px;
    }

    .congrats-content, .welcome-content {
        margin: 0 10px; /* Réduction du margin pour les petits écrans */
    }
}
