body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: #3498db;
    text-align: center;
    margin: 0;
    padding: 0;
}

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

.visible {
    display: flex;
}

/* Style de base pour TOUS les boutons */
button {
    background-color: white;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 15px 20px;
    margin: 5px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #3498db;
    color: white;
}

/* Boutons du menu principal (1 colonne) */
#homepage button {
    width: 250px;
    max-width: 90%;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    border: 2px solid #3498db;
    background-color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#homepage button:hover {
    background-color: #3498db;
    color: white;
}

/* Contenu du bouton */
.quiz-btn-content {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Image à gauche */
.quiz-icon {
    width: 64px;
    height: 64px;
    margin-right: 10px;
}

/* Texte à droite */
.quiz-texts {
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Texte principal */
.quiz-text {
    font-size: 16px;
    font-weight: bold;
}

/* Texte anglais plus petit */
.quiz-text-en {
    font-size: 12px;
    color: #777;
}

.count {
    font-size: 0.8em;
    color: #3498db;
    margin-left: 5px;
}

.word-count {
    font-size: 0.6em;
    color: #3498db;
    margin-top: 5px;
    display: block;
}

/* Effet on hover */
.count:hover,
.word-count:hover {
    color: white;
}

/* Options du quiz (2 colonnes) */
#options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

#options button {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 10px);
}

#quiz-image {
    width: 256px;
    height: 256px;
    margin: 20px;
    object-fit: contain;
}

/* Écran de fin - Centrage parfait */
#end-screen.section {
    justify-content: center;
    align-items: center;
}

.end-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 500px;
    width: 100%;
    padding: 20px;
}

.end-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px;
}

#final-score {
    font-size: 24px;
    margin: 0;
    width: 100%;
}

#encouragement-message {
    font-size: 18px;
    margin: 0;
    line-height: 1.5;
    width: 100%;
}

/* AJOUT : Animation pour le score */
@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(2.2); }
}

.score-animation {
    animation: bounce 0.5s ease;
    display: inline-block; /* AJOUT : Pour que la transformation scale fonctionne */
}

/* Responsive */
@media (max-width: 480px) {
    #options button {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    #quiz-image {
        width: 200px;
        height: 200px;
    }

    .end-content {
        padding: 10px;
    }
}

/* Style pour la section en deux colonnes */
#two-column-section {
    display: flex;
    flex-wrap: wrap; /* Permettre le retour à la ligne sur les petits écrans */
    gap: 20px; /* Espacement entre les colonnes */
    justify-content: center; /* Centrer les colonnes */
    width: 100%;
    max-width: 1200px; /* Limiter la largeur maximale */
    margin: 20px auto; /* Centrer la section horizontalement */
}

/* Style pour chaque colonne */
.column {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrer les boutons horizontalement */
    gap: 10px; /* Espacement entre les boutons dans une colonne */
    flex: 1; /* Chaque colonne prend autant d'espace que possible */
    min-width: 300px; /* Largeur minimale pour éviter un affichage trop serré */
}

/* Responsive : Sur les petits écrans, passer en une seule colonne */
@media (max-width: 800px) {
    #two-column-section {
        flex-direction: column; /* Toutes les colonnes deviennent une seule colonne */
        gap: 10px; /* Réduire l'espacement */
    }

    .column {
        min-width: 100%; /* Les colonnes prennent toute la largeur */
    }
}


/* Style pour la section en trois colonnes */
#three-column-section {
    display: flex;
    flex-wrap: wrap; /* Permettre le retour à la ligne sur les petits écrans */
    gap: 20px; /* Espacement entre les colonnes */
    justify-content: center; /* Centrer les colonnes */
    width: 100%;
    max-width: 1200px; /* Limiter la largeur maximale */
    margin: 20px auto; /* Centrer la section horizontalement */
}

/* Style pour chaque colonne */
.column {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrer les boutons horizontalement */
    gap: 10px; /* Espacement entre les boutons dans une colonne */
    flex: 1; /* Chaque colonne prend autant d'espace que possible */
    min-width: 250px; /* Largeur minimale pour éviter un affichage trop serré */
}

/* Responsive : Sur les petits écrans, passer en une seule colonne */
@media (max-width: 800px) {
    #three-column-section {
        flex-direction: column; /* Toutes les colonnes deviennent une seule colonne */
        gap: 10px; /* Réduire l'espacement */
    }

    .column {
        min-width: 100%; /* Les colonnes prennent toute la largeur */
    }
}