/*------------------------------Reset*/

* {
    box-sizing: border-box;
    font-family: 'Poppins' , sans-serif;
    color: var(--white);
}

html, body, section { /*necessaire, sinon les height enfant ne marche pas*/
    width: 100%;
    height: 100%;
}

html, body, footer {
    margin: 0;
}

footer {
    padding: 0;
}

h1, h2, a, p {
    font-weight: 300;
    padding: 0;
    margin: 0;
}
a {
    text-decoration: none;
}

img, figure, main, section {
    margin: 0;
    padding: 0;
}

button {
    border: none;
}


/*------------------------ Mes couleurs*/
:root{
    --background:#383D4E;
    --footer: #292C36;
    --primary: #DA4343;
    --secondary: #BBDCF3;
    --tertiary: #055488;
    --white: #fff;
    --shadow: 2px 3px 15px rgba(23, 22, 22, 0.39);
    --hover-shadow: 3px 3px 15px rgba(187, 220, 243, 0.21);

}

/*------------------------------Général*/

body{
    background: var(--background);
}
footer {
    position: absolute;
    bottom: 0;
}

/*Obligé de rajouter une div ou mon responsive ne marche pas*/
.footer-content {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    background: var(--footer);
    display: flex;
    align-content: baseline;
}

/*Le titre*/

h1 {
    text-align: center;
    font-size: 1.8rem;
}

h1 strong {
    font-weight: 700;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

/*Les mise en forme du game*/

.gameGround {
    background: var(--secondary);
    box-shadow: var(--shadow);
}

.ground {
    background: #142c3d;
}

/*les dimension du jeu*/
/**Toute modif ici entraine dérèglement du jeu...Carefull, donc*/

footer{
    width: 100%;
    height: 18%; /*car main 85%*/
}



main, .footer-inside {
    max-width: 80%;
    margin: 0 auto;
    padding: 0 10px;
}

main {
    width: 100%;
    height: 80%;
}

h1 {
    padding-top: 2.5rem;
    margin-bottom: 1rem;
}

.icone-close{
    display: none;
}

/*-------------------l'espace de jeu*/
.gameGround {
    width: 90%;
    height: 82%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.chocoCanva, .game {
    width: 100%;
    height: 96%;
}

/*Le sol qui se foule gaiment*/
.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 10%;
    z-index: 2;
}

/*Camille, ta future stagiaire*/
.camille {
    margin-top: 10px;
}

/*----------------------------Le game*/

/*Les chocolats*/
.chocolats {
    width: 50px;
    height: auto;
    position: absolute;
    z-index: 0;
}


/*Camille, ta future stagiaire*/
.camille {
    width: 120px;
    height: auto;
}

.chocolats>img, .camille >img{
    width: 100%;
}

/*Le score*/
.score-help {
    position: absolute;
    top: 0;
    z-index: 1;
    width: 100%;
    background: white;
    height: 10%;
    color: var(--background);
    text-align: center;
    font-size: 1rem;
    padding: 1rem 0;
}

.score-help span{
    font-weight: bold;
    text-align: center;
}

.score-help>span:first-child {
    color: var(--primary);
}

.score-help>span:nth-child(even){
    color: var(--tertiary);
}

.score-help>span:last-child{
    color: var(--background);
    font-style: italic;
    font-weight: 300;
}



/*-----------------Les id à modifier pour le de mouvements*/
/*Les chocolats*/
#choco1 {
    top: -10rem;
    left: calc(15% + 8%/2 - 2%/2);
}

#choco2 {
    top: -5rem;
    left: calc(45% + 8%/2 - 2%/2);
}

#choco3 {
    top: 0;
    left: calc(75% + 8%/2 - 2%/2);
}

#camille {
    position: absolute;
    bottom: 0;
    z-index: 5;
}

/*Les oups*/

.oups {
    display: none;
    position: absolute;
    z-index: 20;
    padding: 5px;
    bottom: 15%;
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 15px #fff;
}

#oups1 {
    left: calc(16% + 8%/2 - 2%/2);
}

#oups2 {
    left: calc(46% + 8%/2 - 2%/2);
}

#oups3 {
    left: calc(76% + 8%/2 - 2%/2);
}

/*Le restart*/

.restart {
    width: 100%;
    height: 110%;
    position: absolute;
    top: 0;
    background: #e87867;
    box-shadow: inset 0 0 100px rgb(229, 82, 82);
    z-index: 50;
}

#restart {
    display: none;
}

#restart>div {
    width: 100%;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

#restart>div> h2 {
    margin-bottom: 2rem;
    text-align: center;
}

#restart>div> h2>span {
    font-weight: bold;
    color: var(--primary);
}

.button-restart {
    display: inline-block;
    width: 160px;
    height: 60px;
    border-radius: 12px;
    text-align: center;
    padding-top: 2px;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--primary);
    box-shadow: 2px 3px 15px rgba(189, 119, 119, 0.39);
}


/*-------------------------Footer*/
.icone-footer {
    display: none;
}

.footer-inside{
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.footer-inside>.contact {
    display: flex;
    justify-content: center;
}

.footer-inside h2 {
    font-size: 1.8rem;
    padding-right: 20px;
}

.footer-inside h2>strong>a {
    color: var(--primary);
    font-weight: 600;
}

.footer-inside h2>strong>a:hover {
    color: var(--secondary);
}

.contact a{
    display: inline-block;
    width: 160px;
    height: 50px;
    margin: 8px;
    border-radius: 12px;
    text-align: center;
    padding-top: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--tertiary);
    box-shadow: var(--shadow);
}

.contact a:hover, .contact a:focus, .button-restart:hover, .button:focus{
    background: var(--primary);
    box-shadow: var(--hover-shadow);
}

/*------------------------- Media queries */

@media screen and (max-width: 1100px){ /*NextHub*/

    .gameGround {
        width: 90%;
        height: 72%;
    }

    h1, h2 {
        font-size: 1.5rem !important;
        text-align: center;
    }
}


@media screen and (max-width: 960px){

    .gameGround {
        width: 90%;
        height: 68%;
    }

    .footer-inside{
        display: flex;
        flex-direction: column;
        align-content: center;
        justify-content: space-around;
    }

    .footer-inside >h2{
        margin-top: 1rem;
        padding-right: 0;

    }

    .footer-inside> .contact {
        justify-content: space-around;
    }
}

@media screen and (max-width: 560px) {

    main, .footer-inside {
        max-width: 95%;
    }

    .contact a{
        width: 160px;
        padding-top: 14px;
        font-size: 0.7rem;
    }

    footer {
        height: fit-content;
        padding: 1rem 0;
    }

    .footer-inside{
        display: flex;
        justify-content: space-between;
        align-items: normal; /*sinon bouton bizarre*/
    }

    .footer-inside>.contact {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

}

@media screen and (max-width: 450px){

    /*mon icone du footer*/
    .icone-footer {
        display: block;
        position: absolute;
        left: 80%;
        bottom: 2%;
        z-index: 70;
        background: var(--primary);
        padding: 15px 15px 5px;
        border-radius: 50px 50px 50px 0;
    }


    .gameGround {
        width: 100%;
        height: 86%;
    }

    footer {
        display: none;
    }

    .footer-content {
        display: block;
        width: 100%;
        height: 100vh;/*cette propriété ne passe pas si on la mets sur le footer*/
    }

    .footer-active {
        display: block;
        position: absolute;
        top: 0;
        height: 0;
        padding-top: 0;
        z-index: 100 !important;
        -webkit-animation: scale-down-tl 0.4s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
        animation: scale-down-tl 0.4s cubic-bezier(0.250, 0.460, 0.450, 0.940)
    }

    .icone-close{
        display: block;
        position: absolute;
        top: 10px;
        left: 80%;
        background: var(--background);
        padding: 15px 15px 5px;
        border-radius: 50px 50px 50px 50px;
    }

    .footer-inside {
        height: 80%;
    }

    .footer-inside h2 {
        max-width: 295px;
        margin: 4rem 0 auto;
    }

    .contact {
        height: 100%;
        align-content: space-around;
        max-width: 330px;
    }

    .footer-active .contact a{
        font-size: 1rem;
    }

    /* animation footer*/

    @-webkit-keyframes scale-down-tl {
        0% {
            -webkit-transform: scale(0);
            transform: scale(0);
            -webkit-transform-origin: bottom right;
            transform-origin: bottom right;
        }
        100% {
            -webkit-transform: scale(1);
            transform: scale(1);
            -webkit-transform-origin: 0% 0%;
            transform-origin: 0% 0%;
        }
    }
    @keyframes scale-down-tl {
        0% {
            -webkit-transform: scale(0);
            transform: scale(0);
            -webkit-transform-origin: bottom right;
            transform-origin: bottom right;
        }
        100% {
            -webkit-transform: scale(1);
            transform: scale(1);
            -webkit-transform-origin: 0% 0%;
            transform-origin: 0% 0%;
        }
    }



}


