


main {
    display: flex;
    flex-direction: column;
}

.main-container {
    display: flex;
    justify-content: center;
    gap: 5vw;
    align-items: flex-start;
    margin-top: clamp(30px, 2vw, 100vw);
}

.game-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


.infos-container {
    padding: clamp(15px, 1vw, 100vw);
    background: rgba(204, 142, 28, 0.342);
    border-radius: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 20vw;
    gap: 10px;
}

.group-details {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.user-scores {
    position: relative;
    display: flex;
    align-items: center;
    transition: transform 3s ease-in-out; /* Transition pour déplacer les éléments */
    padding: 10px 0px 10px 0px;
    gap: 5px;
    font-size: clamp(12px, 1.25vw, 30px);
}

.username {
    color: white;
    font-weight: bold;
    display: inline-block;
    vertical-align: middle;
}

.score,
.lives {
    color: white;
    font-weight: bold;
    margin-left: 24px;
}
.skull-icon {
    width: 24px;
    height: auto;
}

.block-answers-container {
    flex-direction: column;
    gap: 10px;
}

.block-answer {
    background: rgba(255, 145, 0, 0.432);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

.block-answer .first-answer {
    font-size: clamp(12px, 1.25vw, 30px);
    color: #0cfb8f;
    font-weight: bold;
    padding: 5px 0 15px 0;
    word-wrap: break-word; /* Permet de renvoyer à la ligne automatiquement */
    word-break: break-word; /* Casse les mots longs si nécessaire */
}



.action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
}

.report-button {
    width: clamp(50px, 4vw, 100vw);
    transition: filter 0.3s;
    order: 1;
}

.report-button:hover {
    filter: brightness(120%);
    /* Augmenter la luminosité */
}

.joker-btn {
    width: clamp(50px, 4vw, 100vw);
    order: 2;
}

#timer {
    order: 3;
}

.timer {
    display: flex;
    color: #00ff74;
    font-size: clamp(50px, 4.167vw, 100vw);
    justify-content: flex-end;
}

.logo {
    opacity: 0.6;
    width: clamp(250px, 16vw, 100vw);
    height: auto;
    pointer-events: none;
    align-self: center;
    margin: 16px;
}


#question-container {
    background: rgba(255, 145, 0, 0.432);
    padding: clamp(15px, 1vw, 100vw);
    border-radius: 0.5rem;
    width: clamp(250px, 60vw, 100vw);
    height: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-direction: row;
}

.question-image {
    display: flex;
    width: 100%;
    justify-content: center;
}

.question-image img {
    object-fit: contain;
    width: clamp(400px, 20vw, 100vw);
    border-radius: 10px;
}

.category-image {
    width: clamp(40px, 5vw, 100vw);
    margin: 0 35px 0 0;
}


#question {
    font-size: clamp(20px, 1.65vw, 32px);
    color: #e4e0e0;
    align-self: center;
}

#answers-container {
    display: flex;
    justify-content: center;
}

.answers-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-self: center;
    gap: 2rem;
}

.answer {
    display: flex;
    flex-direction: column;
}

.answer-btn {
    font-family: 'Libre Baskerville', serif;
    width: clamp(125px, 30vw, 100vw);
    height: 7vh;
    font-size: clamp(24px, 1.65vw, 36px);
    background: rgba(204, 142, 28, 0.342);
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    color: #e4e0e0;
}

.answer-btn:hover {
    background-color: #d88912a4;
}

.text-answer {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.text-answer input[type="text"] {
    padding: clamp(15px, 1vw, 100vw);
    font-size: clamp(20px, 1.65vw, 32px);
    color: #e4e0e0;
    background: rgba(204, 142, 28, 0.342);
    border-radius: 16px;
    border: none;
    outline: none;
    transition: border-color 0.3s ease;
    width: clamp(350px, 30vw, 100vw);
    height: 5vh;
    font-family: 'Libre Baskerville', serif;
}
.text-answer input[type="text"]:disabled,
.text-answer button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-answer button {
    padding: clamp(15px, 1vw, 100vw);
    background: rgba(204, 142, 28, 0.342);
    border: none;
    border-radius: 30%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-icon {
    width: clamp(40px, 2.604vw, 100vw);
    height: auto; /* Garde le ratio d'aspect de l'image */
    vertical-align: middle; /* Aligne l'image au centre verticalement dans le bouton */
}

.text-answer button:hover {
    background-color: #d88912a4;
}


.message {
    font-size: clamp(24px, 1.667vw, 100vw);
    color: white;
    padding: 0.75rem;
    border-radius: 0.25rem;
    background-color: rgba(54, 160, 54, 0.589);
}

.message2 {
    font-size: clamp(24px, 1.667vw, 100vw);
    color: white;
    padding: 0.75rem;
    border-radius: 0.25rem;
    background-color: rgba(179, 60, 60, 0.589);
}

.error {
    font-size: clamp(24px, 1.667vw, 100vw);
    color: white;
    padding: 0.75rem;
    border-radius: 0.25rem;
    background-color: rgba(179, 60, 60, 0.589);
}

.timeout-message {
    font-size: clamp(24px, 1.667vw, 100vw);
    color: white;
    padding: 0.75rem;
    border-radius: 0.25rem;
    background-color: rgba(179, 60, 60, 0.589);
}

.message-container {
    display: flex;
    justify-content: center;
}

.correct {
    background-color: rgba(54, 160, 54, 0.589)!important;
}

.incorrect {
    background-color: rgba(179, 60, 60, 0.589)!important;
}

/* Styles de fin de partie migrés vers GameOverContainer.svelte */


.modal {
    display: none;
    position: fixed;
    z-index: 3;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    position: relative;
    background-image: url('/static/img/home/signalement.avif');
    background-size: contain;
    background-repeat: no-repeat;
    width: 403px;
    height: 614px;
    border-radius: 0.25rem;
    box-shadow: 0 0.25rem 0.5rem 0 rgba(0, 0, 0, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    z-index: 10;
}

textarea {
    width: 70%;
    padding: 10px;
    border-radius: 0.25rem;
    border: none;
    box-sizing: border-box;
    resize: none;
    outline: none;
    background-color: rgb(230, 232, 219);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    width: 10% !important;
    transition: transform 0.3s ease; /* Transition pour l'effet de grossissement */
}

.close:hover {
    transform: scale(1.2); /* Grossissement de 20% lors du survol */
}

.pushablesubmit {
    background: hsl(58.67deg 89.39% 21.22%);
    border-radius: 0.75rem;
    border: none;
    padding: 0;
    cursor: pointer;
    outline-offset: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 22%;
}

.frontsubmit {
    display: flex;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    background: hsl(58.67deg 30.89% 52.36%);
    color: white;
    transform: translateY(-6px);
    justify-content: center;
    pointer-events: none;
}

.user-image {
    width: 50px;  /* ou la taille que vous souhaitez */
    height: auto;
    border-radius: 50%;  /* pour un effet de cercle, si désiré */
    margin-right: 10px;
}

.arrow {
    width: 30px; /* Largeur de l'image de la flèche */
    height: auto; /* Hauteur de l'image de la flèche */
    position: absolute;
    left: 0;
    top: 50%; /* Positionne à mi-hauteur du conteneur */
    transform: translate(-100%, -50%); /* Déplace horizontalement et verticalement pour un centrage parfait */
    transition: transform 0.5s ease; /* Animation douce pour le mouvement */
    padding-right: 0.5rem;
}

/* Style pour les points gagnés */
.points {
    color: #1aaf4e;
    font-weight: bold;
}

.bonus-points {
    color: gold;
    font-weight: bold;
}

.malus-points {
    color: rgb(255, 102, 0);
    font-weight: bold;
}

.user-label {
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    margin-right: 0.25rem;
}

.user-labels-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    /* Permet de s'étendre sur toute la largeur du .answer */
}

.house-gryffindor {
    background-color: #7f080a;
    /* Couleur rouge Gryffondor */
}

.house-slytherin {
    background-color: #1aaf4e;
    /* Couleur verte Serpentard */
}

.house-ravenclaw {
    background-color: #183ebc;
    /* Couleur bleue Serdaigle */
}

.house-hufflepuff {
    background-color: #b49e0e;
    /* Couleur jaune Poufsouffle */
}

.buttons-finished-question {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    margin-right: 2rem;
}

.pushableready {
    background: hsl(138.46deg 89.39% 21.22%);
    border-radius: 0.75rem;
    border: none;
    padding: 0;
    cursor: pointer;
    outline-offset: 4px;
    align-self: center;
    margin: 1.25rem 0;
}

.frontready {
    display: flex;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: clamp(18px, 1.667vw, 100vw);
    background: hsl(113.54deg 87.1% 29.46%);
    color: white;
    transform: translateY(-6px);
    justify-content: center;
    pointer-events: none;
}

.pushableexplanation {
    background: hsl(197.13deg 100% 19.69%);
    border-radius: 0.75rem;
    border: none;
    padding: 0;
    cursor: pointer;
    outline-offset: 4px;
    align-self: center;
    margin: 1.25rem 0;
}

.frontexplanation {
    display: flex;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: clamp(18px, 1.667vw, 100vw);
    background: hsl(205.44deg 100% 47%);
    color: white;
    transform: translateY(-6px);
    justify-content: center;
    pointer-events: none;
}

.pushableend {
    background: hsl(340deg 100% 19.69%);
    border-radius: 0.75rem;
    border: none;
    padding: 0;
    cursor: pointer;
    outline-offset: 4px;
    align-self: center;
    margin: 1.25rem 0;
}

.frontend {
    display: flex;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: clamp(18px, 1.667vw, 100vw);
    background: hsl(345deg 100% 47%);
    color: white;
    transform: translateY(-6px);
    justify-content: center;
    pointer-events: none;
}

/* Styles pour .pushablelearnmorelink migrés vers LearnMoreButton.svelte */

.pushableready:active .frontready,
.pushableexplanation:active .frontexplanation,
.pushableend:active .frontend,
.pushablesubmit:active .frontsubmit {
    transform: translateY(-2px);
}

.ready {
    color: #4CAF50;
    margin: 0;
}

.tick {
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin-right: 10px; /* Espacement avant le score */
}

.correct-answer-message {
    color: #4CAF50;
}



#scores-container {
    display: flex;
    flex-direction: column;
}

.top-scores {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    margin-top: 2rem;
    gap: 2rem;
}

.score-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-wrapper img {
    width: 50%;
    margin-bottom: 1.25rem;
}

.podium-username {
    font-size: 0.75rem;
    color: white;
    word-break: break-all;
    font-weight: bold;
}

.score-wrapper.gold {
    order: 1; /* Or en premier (au centre) */
    margin-bottom: 2rem; /* Placer le premier joueur plus haut */
}

.score-wrapper.silver {
    order: 0; /* Argent en deuxième (à gauche) */
}

.score-wrapper.bronze {
    order: 2; /* Bronze en troisième (à droite) */
}

.all-scores {
    display: table;
    width: 60%;
    border-collapse: separate;
    border-spacing: 0 0.75rem; /* Espacement entre les lignes */
    position: relative;
    margin-top: 3rem; 
    left: 50%;
    transform: translate(-50%);
}

.header-scores {
    display: table-row;
    font-weight: bold;
    background-color: black;
    color: white;
}

.row {
    display: table-row;
    color: white;
    font-weight: bold;
}

.row.gryffindor {
    background-color: rgba(127, 8, 10, 0.75); /* Rouge Gryffondor avec transparence */
}

.row.hufflepuff{
    background-color: rgba(180, 158, 14, 0.75); /* Jaune Poufsouffle avec transparence */
}

.row.ravenclaw {
    background-color: rgba(24, 62, 188, 0.75); /* Bleu Serdaigle avec transparence */
}

.row.slytherin {
    background-color: rgba(26, 175, 78, 0.75); /* Vert Serpentard avec transparence */
}

.row .cell:first-child {
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}
.row .cell:last-child {
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.cell {
    display: table-cell;
    padding: 1rem;
    text-align: center;
    vertical-align: middle;
}

.profile-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.percentage {
    margin-left: 1rem;
}

.profile-image-container {
    display: inline-block;
    vertical-align: middle;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.broom-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.fastest-user-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.fastest-user-container .username {
    font-weight: bold;
    color: #e4e0e0;
    margin-top: 10px;
}
.fastest-user-container .count {
    font-weight: bold;
    color: #e4e0e0;
}

.fastest-user-container .nimbus2000message {
    margin-top: 1rem;
    font-weight: bold;
    color: #3add55;
    font-size: x-large;
}

.fastest-user-container img {
    width: 50%;
    height: auto;
}

.slowest-user-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.slowest-user-container .username {
    font-weight: bold;
    color: #e4e0e0;
    margin-top: 10px;
}
.slowest-user-container .count {
    font-weight: bold;
    color: #e4e0e0;
}

.slowest-user-container .shootingstarmessage {
    margin-top: 1rem;
    font-weight: bold;
    color: #3add55;
    font-size: x-large;
}

.slowest-user-container img {
    width: 50%;
    height: auto;
}



.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media only screen and (min-width: 600px) and (max-width: 800px) {
    /* Styles pour tablettes en mode portrait */
    .all-scores {
        width: 80%;
    }
}

@media only screen and (min-width: 801px) and (max-width: 1024px) {
    /* Styles pour tablettes en mode paysage */
    .all-scores {
        width: 90%;
    }
}

@media only screen and (max-width: 768px) {
    .top-scores {
        gap: 0;
    }

    .all-scores {
        font-size: 0.75rem;
    }

    .cell {
        padding: 0.5rem;
    }

    .username-scores {
        word-break: break-all;
    }

    .percentage {
        margin-left: 0;
    }

    .broom-container {
        gap: 1rem;
    }

    .main-container {
        flex-direction: column-reverse;
        gap: 0;
    }

    .group-details {
        order: 2;
    }

    .block-answers-container {
        order: 3;
    }

    #timer {
        order: 1;
    }

    .timer {
        font-size: clamp(40px, 4.167vw, 100vw);
        justify-content: center;
    }
    

    .game-container {
        width: 100vw;
        gap: 8px;
    }


    #question-container {
        width: clamp(50px, 85vw, 100vw);
    }

    #question {
        font-size: clamp(15px, 1.65vw, 32px);
    }

    .answers-container {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        align-self: center;
        gap: 8px;
        margin: 1rem;
    }

    .answer-btn {
        width: clamp(250px, 85vw, 100vw);
        font-size: clamp(16px, 1.65vw, 36px);
    }

    .text-answer input[type="text"] {
        width: clamp(50px, 50vw, 100vw);
        font-size: clamp(10px, 4vw, 24px);
        padding: clamp(10px, 1vw, 100vw);
    }

    .infos-container {
        bottom: 0;
        width: 60vw;
        font-size: clamp(15px, 1.65vw, 32px);
        align-self: center;
    }

    .user-scores {
        font-size: clamp(15px, 1.65vw, 32px);
    }

    .user-label {
        font-size: 0.6rem;
    }

    .question-image img {
        width: clamp(250px, 70vw, 100vw);
    }

    .message-container {
        display: flex;
        justify-content: center;
    }


    .buttons-finished-question {
        flex-wrap: wrap;
    }

    .btn-explanation {
        left: 2vw;
        bottom: 0;
        top: 5vh;
        position: relative;
        margin: 1rem 0;
    }

    /* Styles de fin de partie responsive migrés vers GameOverContainer.svelte */

    /* Style pour a.learn-more-link supprimé - remplacé par LearnMoreButton.svelte */
}

.broken-heart-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    pointer-events: none;
}

.broken-heart {
    display: inline-block;
    font-size: 24px;
    margin: 0 2px;
    animation: brokenHeartAnimation 2s ease-out forwards;
}

@keyframes brokenHeartAnimation {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    20% {
        transform: scale(1.2) rotate(-10deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.5) rotate(45deg);
        opacity: 0;
    }
}