@font-face {
    font-family: Chewy-Regular;
    src: url(../fonts/Chewy-Regular.ttf);
}
nav {
margin-top: 1em;
text-align: center;

}


h1 {
    text-align: center;
    font-size: 10vh;
    font-family: Chewy-Regular;
    color: rgb(0, 0, 0);
    margin: 20px auto;
    margin-bottom: 50px;
    width: fit-content;

    animation: h1 0.8s ease;
}

@keyframes  h1{
  0% {
    opacity: 0;
    transform: scale(0.7)
  }
}

#message {
    text-align: center;
    font-family: Chewy-Regular;
    font-size: 22px;

}

#replay {
    display: none;
}

#replay.afficher {
    display: inline-block;
    font-family: 'Chewy-Regular';
     font-size: 20px;
     padding: 15px 20px;
    background-color: rgb(202, 95, 95);
    color: rgb(255, 255, 255);
    border: 3px solid;
    border-color:  #ffffff;
    border-radius: 15px;
    cursor: pointer;
     margin-bottom: 15px;
    animation: fade 1s ease;
    
   
}

@keyframes fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#replay.afficher:hover {
    background-color: pink;
    transform: scale(1.05);
}

#replay.afficher:active {
    transform: scale(1);
}
body {
    background-image: url(../image/background-1.svg) ;
    min-height: 100vh;
    margin: 0%;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position:center

}

#grille-wrapper {
    position: relative;
    width: fit-content;
    margin: 5% auto
    
}

#pain-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140% ;
    z-index: 1;
    
    
}

#grille {
     
    width: calc(42vmin + 12px);
    height: calc(42vmin + 12px);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border: solid #e7eb80 3px;
    margin: 0;
    position: relative;
 position: relative;
    z-index: 1;
   
    
}

#grille .case {
    border: solid #cfd270 3px;
    display: grid;
    place-items: center;
    height: 14vmin;
    width: 14vmin;
    margin: 1px;
    
    background-size: 15vh;
    background-repeat: no-repeat;
    background-position: center;
   background-color: transparent
 

}
#grille .case:hover {
    background: rgb(212, 69, 93);
    cursor: pointer;
}    

#grille .case.zoom-out {
    animation: zoom-out 0.4s ease-out
}

@keyframes zoom-out {
    from {
        background-size: 60vh;
        opacity: 0.3;
    }
    to {
        background-size: 15vh;
        opacity: 1;
    }
}
#characters {
    
    margin: 0;
    padding: 0;
}

#characters img {
    width: 25vh;
    height: auto;
    display: inline-block;
    margin: 0;
    cursor: pointer;
    transition: transform 0.5s ease

}

#characters img:hover {
    transform: rotate(8deg);
}

@media screen and (max-width: 750px) {
    h1 {
        font-size: 60px;
        padding: 8px 16px;
    }

    #replay.afficher {
        margin-bottom: 50px;
    }

    #message {
        font-size: 20px;
        padding: 8px 16px;
    }

    #grille-wrapper {
        margin: 0 auto;
    }

    #grille {
        width: calc(70vw + 10px);
        height: calc(70vw + 10px);
    }

    #grille .case{
        width: 23vw;
        height: 23vw;
    }

    #characters img{
        width: 45vw;
        margin: 0;
    }

}