body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin:0;
    display: flex;
    flex-direction: column;
    user-select: none;
    --webkit-user-select: none;
}

.game {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: row;
    padding-top: 70px;
    padding-bottom: 60px;
    align-items: start;
    justify-content: space-around;
    background: lightblue;
}
.deck {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: center;
    background: lightblue;
    position: relative;
    margin-bottom: 0;
}

.col {
    display: flex;
    position: relative;
    max-height: 60vh;
    height: 100%;
    flex-direction: column;
}

.card {
    position: relative;
    margin-top: -150px;
    top: 0;
    border: 1px solid black;
    background: white;
    width: 124px;
    height: 176px;
    padding: 5px;
    border-radius: 15px;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: 0.4s;
    cursor: default;
}
.card:first-child {
    margin-top: 0; /* Pas de chevauchement pour la première carte */
}

.deck .card {
    margin : 10px;
}

.card .front{
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transform: rotateY(180deg);
    background: lightgrey;
    align-items: start;
    text-align: center;
    font-size: xx-large;
    justify-content: center;
    transition: 0.4s;
}

.card .back {
    position: relative;
    top: -100%;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: red;
    align-items: center;
    text-align: center;
    justify-content: center;
    transition: 0.4s;
}
.selectedOFF{
    box-shadow: 0px 0px 30px lightcoral inset, 0px 0px 10px lightcoral;
}
.selected{
    box-shadow: 0px 0px 30px lightgreen inset, 0px 0px 10px lightgreen;
    animation: moveCard 0.5s ease-in-out infinite;
}

.accessible{
    cursor: pointer;
}

.flipped {
    border: 1px solid black;
    background: white;
    transform: rotateY(180deg);
    cursor: pointer;
}
.flipped .front{
    opacity: 1;
}
.flipped .back{
    opacity: 0;
}

@keyframes moveCard {
    0% {
        transform: translateY(0px) rotateY(180deg);
    }
    50% {
        transform: translateY(-10px) rotateY(180deg);
    }
    100% {
        transform: translateY(0px) rotateY(180deg);
    }
}

.empty {
    position: relative;
    margin-top: -150px;
    top: 0;
    border: 1px solid black;
    background: #ffffff22;
    width: 124px;
    height: 176px;
    padding: 5px;
    border-radius: 15px;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: 0.4s;
    cursor: default;
}

.newGame{
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    top: 10px;
    left: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}

.newGame img {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
}

.finish{
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    background: aliceblue;
    top: 10px;
    right: 10px;
    width: calc(124px * 4);
    height: 50px;
    cursor: pointer;
}
.finish .pairCol{
    display: flex;
    margin: 0;
    flex: 1;
    align-items: center;
    justify-content: center;
}

.counter{
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    top: 10px;
    left: 80px;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    font-size: xx-large;
}

.imDone{
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    top: 10px;
    left: 70px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}
.imDone img {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
}