

@-webkit-keyframes shine {
    from {
        -webkit-mask-position: 150%;
    }

    to {
        -webkit-mask-position: -50%;
    }
}

@keyframes disappear {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9); /* Petit effet de remontée */
        pointer-events: none; /* Empêche de cliquer dessus quand il est invisible */
    }
}


@keyframes scorePop {
    0% {
        opacity: 0;
        /* On part de petit + centré */
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
    }
    20% {
        opacity: 1;
        /* Effet "Pop" : on dépasse un peu la taille finale */
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }
    35% {
        /* On se stabilise à la taille normale */
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        /* Disparition en montant */
        transform: translate(-50%, -150%) scale(0.8);
    }
}

a {
    font-style: normal;
    text-decoration: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-true-black: #000;
    --color-black: #121A1D;
    --color-black-60: #121A1D9c;
    --color-dark-blue: #084C61;
    --color-blue: #3C89AA;
    --color-light-blue: #56A3A6;
    --color-green: #63D166;
    --color-red: #DB504A;
    --color-yellow: #E3B505;
    --color-white: #FAF4EA;
    --color-true-white: #fff;

    --font-title: 'Grotesk';
    --font-text: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* GENERAL */

html {
    height: 100%;
}

body {
    height: auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
    display: flex;
    flex-direction: column;
}

h1 {
    font-family: var(--font-title);
    font-weight: 400;
    font-size: 1.8rem;
    color: var(--color-white);
}

/* HEADER */
header {
    /* position */
    width: 100%;
    height: auto;
    padding: 1rem;
    /* display */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* color */
    background-color: var(--color-dark-blue);
}

.guessCountry__backToHub {
    text-align: center;
    transition: all 0.2s ease;
}

.guessCountry__backToHub:hover {
    -webkit-mask-image: linear-gradient(
        -75deg,
        var(--color-black) 20%,
        var(--color-black-60) 50%,
        var(--color-black) 80%
    );
    -webkit-mask-size: 200%;
    animation: shine 1.5s infinite;
}

.guessCountry__backToHub > h2 {
    font-family: var(--font-title);
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--color-white);
}









/* MAIN */
main {
    /* position */
    height: auto;
    flex: 1;
    width: 100%;
    padding: 1rem;
    /* display */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #56a3a6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%23084c61' fill-opacity='0.28' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.guessCountry__backToQuizzHub {
    width: auto;
    align-self: flex-start;
    font-family: var(--font-text);
    color: var(--color-white);
    font-size: 1.5rem;
}
.guessCountry__backToQuizzHub:hover {
    text-decoration: underline;
}

.guessCountry__body {
    /* position */
    width: 100%;
    height: auto;
    position: relative;
    flex: 1;
    /* display */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}


.guessCountry__title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 500;
    font-family: var(--font-text);
    color: var(--color-black);
}

.guessCountry__box {
    height: auto;
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    padding: 3rem 3rem;
    gap: 1.5rem;
    /* other */
    border-radius: 0.75rem;
    box-shadow: 9px 10px 68px -13px rgba(0,0,0,0.25);
    /* color */
    background-color: var(--color-white);
}


/* BOX HEADER */

.guessCountry__boxHeader {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}

.guessCountry__hintButton {
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease-out;
}
.guessCountry__hintButton:hover {
    transform: scale(1.2);
}
.guessCountry__hintButton svg {
    height: 3rem;
    width: auto;
    color: var(--color-dark-blue);
}
.guessCountry__hintButton.hidden {
    display: none;
}

.guessCountry__questionInfo {
    font-size: 2rem;
    font-family: var(--font-title);
    color: var(--color-dark-blue);
    text-align: center;
    flex: 1 1 0%;
    width: 100%;
    height: auto;
    object-fit: contain;
    min-width: 0;
    min-height: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.guessCountry__roundContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
    padding: 0.4rem 0.5rem 0.5rem;
    border: 4px solid var(--color-red);
    border-radius: 100%;
    color: var(--color-red);
    font-size: 1.2rem;
    font-family: var(--font-text);
    font-weight: 600;
}

/* QUESTION */

.guessCountry__question {
    font-size: 1.5rem;
    font-family: var(--font-text);
    color: var(--color-black);
    text-align: center;
}

.guessCountry__propositionContainer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    counter-reset: alphabet;
}
.guessCountry__propositionContainer>button {
    padding: 0.5rem 1rem;
    cursor: pointer;
    position: relative;
    min-height: 2.65rem;

    color: var(--color-black);
    background-color: var(--color-yellow);
    border: transparent;
    border-radius: 1.5rem;
    transition: background-color 0.5s ease-out, filter 0.3s ease-out, padding-left 0.3s ease-out, padding-right 0.3s ease-out;
    padding-left: 2.6rem;
    counter-increment: alphabet;
}
.guessCountry__propositionContainer>button.largeFont {
    font-size: 1.4rem;
}
.guessCountry__propositionContainer>button.mediumFont {
    font-size: 1.1rem;
}
.guessCountry__propositionContainer>button.smallFont {
    font-size: 0.9rem;
}
.guessCountry__propositionContainer>button.smallestFont {
    font-size: 0.85rem;
}
/* If it's an image */
.guessCountry__propositionContainer>button>img {
    max-width: 200px;
}

.guessCountry__propositionContainer>button::before {
    font-size: 1.5rem;
    content: counter(alphabet, lower-alpha) "";
    top: 0;
    left: 0;
    height: 2.65rem;
    border-radius: 1.5rem;
    aspect-ratio: 1/1;
    background-color: var(--color-dark-blue);
    color: var(--color-white);
    position: absolute;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: left 0.4s ease-out, transform 0.3s ease-out;
}
.guessCountry__propositionContainer>button:hover {
    filter: brightness(0.9);
}
.guessCountry__propositionContainer>button:hover::before {
    transform: rotate(360deg);
}
/* Correction */
.guessCountry__propositionContainer.correctionMode>button:hover::before {
    transform: none;
}
.guessCountry__propositionContainer.correctionMode>button:hover {
    filter: none;
}
.guessCountry__propositionContainer.correctionMode>button.userCorrect,
.guessCountry__propositionContainer.correctionMode>button.answerCorrect {
    background-color: var(--color-green);
}
.guessCountry__propositionContainer.correctionMode>button.userCorrect,
.guessCountry__propositionContainer.correctionMode>button.answerCorrect {
    padding-right: 2.6rem;
}
.guessCountry__propositionContainer.correctionMode>button.userCorrect::before,
.guessCountry__propositionContainer.correctionMode>button.answerCorrect::before {
    left: calc(100% - 40px);
}
.guessCountry__propositionContainer.correctionMode>button.userIncorrect {
    background-color: var(--color-red);
}
.guessCountry__propositionContainer.correctionMode>button.userIncorrect {
    padding-right: 2.6rem;
}
.guessCountry__propositionContainer.correctionMode>button.userIncorrect::before {
    left: calc(100% - 40px);
}

.guessCountry__nextRound {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-self: flex-end;
    width: auto;
    padding: 0;
    border: none;
    opacity: 0;
    color: transparent;
    font-size: 1.3rem;
    background-color: var(--color-yellow);
    border-radius: 5rem;
    cursor: default;
    height: auto;
    max-height: 0;
    transition: all 0.2s ease-out, padding-right 0.2s ease-out;
}
.guessCountry__nextRound.appear {
    padding: 0.5rem 1.5rem;
    padding-right: 0;
    max-height: 100px;
    opacity: 1;
    cursor: pointer;
    color: var(--color-black);
}
.guessCountry__nextRound.appear:hover {
    padding-right: 1.4rem;
}
.guessCountry__nextRoundArrow {
    display: flex;
    align-items: center;
    height: 1em; /* Force le conteneur à la taille du texte */
    width: 1em;
    margin-top: 1px;
    opacity: 0;
    transition: all 0.2s ease-out;
}
.guessCountry__nextRoundArrow svg {
    height: 100%; /* Le SVG prend 100% du parent (donc 1em) */
    width: auto;
    display: block;
}
.guessCountry__nextRound.appear:hover .guessCountry__nextRoundArrow {
    opacity: 1;
}

.guessCountry__hintInfo {
    position: absolute;
    top: 40%;
    left: 50%;
    opacity: 0;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-white);
    border: 2px solid var(--color-black-60);
    transform: translate(-50%, -60%) scale(0.9);
    border-radius: 0.5rem;

    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}
.guessCountry__hintInfo.appear {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: inherit;
}
.guessCountry__hintInfo.hidden {
    animation: disappear 0.5s ease-in forwards;
}

.guessCountry__score {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 4rem;
    transform: translate(-50%, -50%);
    font-family: var(--font-title);
    text-shadow: 3px 0 var(--color-white), -3px 0 var(--color-white), 0 3px var(--color-white), 0 -3px var(--color-white), 1px 1px var(--color-white), -1px -1px var(--color-white), 1px -1px var(--color-white), -1px 1px var(--color-white);
    display: none;
}
.guessCountry__score.animate {
    display: block;
    animation: scorePop 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.guessCountry__score.bad {
    color: var(--color-red);
}
.guessCountry__score.good {
    color: var(--color-green);
}





@media (min-width: 600px) {
    h1 {
        font-size: 4rem;
    }
    .guessCountry__backToHub>h2 {
        font-size: 2.5rem;
    }

    .guessCountry__score {
        font-size: 5rem;
    }
    .guessCountry__propositionContainer {
        grid-template-columns: 1fr 1fr;
    }
    .guessCountry__propositionContainer>button {
        font-size: 1rem;
    }
    .guessCountry__roundContainer {
        font-size: 1.5rem;
    }
    .guessCountry__hintInfo {
        font-size: 1.25rem;
    }
}