/*=====================================================================================*/
/* Général */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #2a2a3b; /* Couleur sombre pour contraster avec la neige */
    color: #fff;
    overflow: hidden;
}
/*=====================================================================================*/
/* Entête , Titre et animation de lumière */

header {
    text-align: center;
    background: rgba(255, 0, 0, 0.7);
    padding: 20px;
}

h1 {
    font-size: 2.5rem;
    margin: 0;
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700, 0 0 15px #FFD700;
    }
    50% {
        text-shadow: 0 0 10px #FF4500, 0 0 20px #FF4500, 0 0 30px #FF4500;
    }
}
/*=====================================================================================*/
/* Lettres collectées */

#letters-container {
    display: flex;
    justify-content: center;
    margin: 10px auto;
    max-width: 800px;
}

.letter-box {
    width: 40px;
    height: 40px;
    background: #fff;
    color: #000;
    text-align: center;
    line-height: 40px;
    border: 1px solid #ccc;
    margin: 2px;
    font-weight: bold;
}
/*=====================================================================================*/
/* Grille en sapin + animation de rebond lors de la validation */

#question-tree {
    display: grid;
    grid-template-rows: repeat(6, auto);
    gap: 5px;
    justify-content: center;
    margin: 20px auto;
}

.grid-container {
    position: relative;
}

.grid-container::before {
    content: "";
    position: absolute;
    width: 90%;
    height: 0;
    border: 5px solid transparent;
    border-top: 5px solid white;
    border-radius: 50%;
    bottom: -10px;
    left: 5%;
}

.grid-item {
    width: 50px;
    height: 50px;
    background-color: #f0ad4e;
    color: black;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 5px;
    border: 2px solid #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.grid-item:hover {
    background-color: #d9534f;
    transform: scale(1.1);
}

.grid-item.completed {
    background-color: green;
    transition: background-color 0.5s, transform 0.3s;
    transform: scale(1.1);
    border: 2px solid #32CD32;
    box-shadow: 0 0 15px rgba(50, 205, 50, 1);
    animation: bounce 0.5s ease;

}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}
/*=====================================================================================*/
/* Carte de question + bouton */

.card {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #000;
    margin: auto;
    max-width: 400px;
}

button {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

button:hover {
    background-color: #218838;
}
/*=====================================================================================*/
/* Image de cadeaux */

#gift-container {
    position: fixed;
    bottom: 55px;
    left: -150px;
    z-index: 50;
}

#gift-container img {
    width: 500px;
    height: auto;
    animation: slideIn 1s ease forwards;
}


@keyframes slideIn {
    0% {
        transform: translateX(-150%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}


/*=====================================================================================*/
/* Image de sapin */

#tree-container {
    position: fixed;
    bottom: 10px;
    right: -30px;
    z-index: 50;
}

#tree-container img {
    width: 400px;
    height: auto;
    animation: slideIn 1s ease forwards;
}

@keyframes slideIn {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
/*=====================================================================================*/
/* Pied de page */

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1f2a38;
    color: white;
    padding: 10px 0;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
    animation: slideIn 1s ease forwards;
}
/*=====================================================================================*/
/* Flocon de neige + animation */

#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Les flocons ne bloquent pas les clics */
    overflow: hidden;
    z-index: 10;
}

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

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}
/*=====================================================================================*/
/* Pop-up de féliciations */

.hidden {
    display: none !important;
    visibility: hidden;
    opacity: 0;
}


#congratulations-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    color: black;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
/*=====================================================================================*/
/* Compte à rebours (non itinialisé dans le javascript) */
