.page-title {
    margin-top: 20px;
    font-family: 'Amatic SC', cursive;
    font-size: 100px;
    font-weight: normal;
    text-align: center;
    color: #FFF;    
}

.page-subtitle {
    margin-top: -40px;
    font-family: 'Amatic SC', cursive;
    font-size: 50px;
    font-weight: normal;
    text-align: center;
    color: #FFF;    
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100vh;  /* Pour que le gradient de couleur de fond occupe toute la fenêtre */
    cursor: url("cursors/hand-pointer2.png"), auto;
}

body {
    background: url("../images/backgrounds/background-level1.jpg") fixed;
    background-size:cover;
    margin:0;
}

.overlay-text {
    display: none;
    position: fixed;
    top: 0;     /* Zéro partout : pour que le fond noir s'applique à tout l'écran */
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: center;
    align-items: center;
    z-index: 100;   /* Pour que le texte s'affiche par-dessus les cartes */
    font-family: 'Amatic SC', cursive;
    color: #FFF;
/*    background-color: #000;*/
}

.overlay-text-small {
    font-size: .3em;
}

.overlay-text.visible {
    display: flex;
    flex-direction: column;     /* Pour que le texte plus petit s'affiche en-dessous */
    animation: overlay-grow 500ms forwards;
}

@keyframes overlay-grow {
    from {
        background-color: rgba(0,0,0,0);
        font-size: 0;
    }
    to {
        background-color: rgba(0,0,0,.8);
        font-size: 8em;
    }
}

.game-info {
    font-family: 'Pompiere', cursive;
    font-size: 28px;
    font-weight: normal;
    text-align: center;
    color: #FFF;  
}

.game-container {   /* Disposer les cartes sous forme d'une grille */
    display: grid;
    grid-template-columns: repeat(4, auto);
    grid-gap: 10px;
    margin: 50px;
    justify-content: center;    /* Centrer la grille dans la fenêtre */
    perspective: 500px;
}

.game-info-container {  /* Disposer la grille sous la div d'infos */
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
}

.card {
    position: relative;     /* Pour que la card-face s'affiche bien dans la card */
    height : 175px;
    width: 125px;
}

.card.visible .card-back {
    transform: rotateY(-180deg);
}

.card.visible .card-front {
    transform: rotateY(0);
}

.card.matched .card-value {
    animation: dance 1s linear infinite 250ms;
}

@keyframes dance {
    0%, 100% {
        transform: rotate(0);
    }
    25% {
        transform: rotate(-10deg); 
    }
    75% {
        transform: rotate(10deg);
    }
}


.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    border-width: 1px;
    border-style: solid;
    transition: transform 500ms ease-in-out;
}

.card-back {
    background-color: #80afa4;
    border-color: #669b8f;
}

.card-front {
    background-color: #e2ede6;
    border-color: #a3c8b4;
    transform: rotateY(180deg);
}

.card-value {
/*  transition: transform
    transform: scale(.9);*/
}

/*
.card-front:hover .card-value {
    transform: scale(1);
}
*/

.corner {
    position: absolute;
    width: 34px;
    height: 34px;
    opacity: 0.4;
    transition: opacity 100ms ease-in-out;
}

.card.visible .corner {
    width: 34px;
    height: 34px;
    opacity: 0.3;
}

.card-back:hover .corner {
    opacity: 0.6;
}

.corner-top-left {
    transform: rotate(90deg);
    top: 0px;
    left: 0px;
}

.corner-top-right {
    transform: rotate(180deg);
    top: 0px;
    left: 91px;
}

.corner-bottom-left {
    top: 141px;
    left: 0px;
}

.corner-bottom-right {
    transform: rotate(270deg);
    top: 141px;
    left: 91px;
}

.owl {
    margin-top: -16px;
    margin-left: 4px;
}

@media (max-width: 600px) {
    .game-container {
        grid-template-columns: repeat(2, auto);
    }
    .game-info-container {
        flex-direction: column;
        align-items: center;
    }
}


