/* General */
*{
    box-sizing: border-box;
} 

body {
    margin : 0;
    width: 100%;
}  /* retire le margin du body */

.bold {
    font-weight: bold;
}  /* met en gras */

.italic {
    font-style: italic;
}  /* met en italic */

/* Nav */

nav {
    display: flex;

    box-shadow: 4px 8px 11px #aaa;
    min-width: 100%;
    max-width: 100%;
    min-height: 3em;
    max-height: 3em;

    overflow: hidden;
}  /* barre de navigation navigation, met la div buttons et logo a lhorizontale */

nav > .logo {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 20%;
    max-width: 20%;

    overflow: hidden;
}  /* div logo taille */

nav > .logo > img {
    min-height: 2.5em;
    max-height: 2.5em;
}  /* div logo taille */

nav > .buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: end;

    min-width: 80%;
    max-width: 80%;

    overflow: hidden;
}  /* div image logo taille */

nav > .buttons > ul {
    display: flex;

    flex-direction: row;
    align-items: center;
    justify-content: end;

    margin-right: 2em;
    gap: 3em;

    list-style-position: outside;
    list-style-type: none;
}  /* met la liste a l'horizontale et retire le style type */

nav > .buttons > ul > li, nav > .buttons > ul > .dropdown > ul > li {
    font-size: 1.2em;

    cursor: pointer;
}  /* changer le curseur au survol d'un lien navigation */

nav > .buttons > ul > .selected,  nav > .buttons > ul > .dropdown > ul > .selected {
    color: orangered !important;
}  /* changer la couleur poru l'element avec la class selected */

nav > .buttons > ul > .dropdown {
    list-style-type: "\0025B8";
}  /* met une icon de fleche pour les listes deroulantes */

nav > .buttons > ul > li:hover,  nav > .buttons > ul > .dropdown > ul > li:hover {
    color: orangered !important;
}  /* met une couleur orange quand un element est survole */

nav > .buttons > ul > .dropdown:hover {
    list-style-type: "\0025BE";
}  /* met une icon de fleche vers le bas pour les listes deroulantes quand survolees */

nav > .buttons > ul > li.dropdown:hover .dropdownlist {
    display: block;
}  /* affiche la sous liste quand son parent est survole */

nav > .buttons > ul > li > ul.dropdownlist {
    display: none;
    cursor: default;
    list-style-type: disc;
    font-size: 0.8em !important;
    background-color: white;
    color: black;
    position: absolute;
    min-width: 15%;
    box-shadow: 4px 8px 11px #aaa;
}  /* sous liste */

@media only screen and (max-width: 45em) {  
    /* quand la taille est trop petite 
    on cache le logo */
    nav > .logo {
        display: none;
    }

    nav > .buttons {
        min-width: 100%;
        max-width: 100%;
        justify-content: center;
    }
}

/* Index */

/* Header */

header {
    margin-top: 1em;
    margin-left: auto;
    margin-right: auto;

    width: 90%;
    min-height: 12em;

    background: linear-gradient(180deg, rgba(255,255,255,1) 85%, rgba(147,237,255,1) 100%);

    border-radius: 2em; 

    display: flex;
    flex-direction: row;
}  /* affiche les elements à l'horizontale */

header > .left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    min-width: 35%;
    max-width: 35%;

    overflow: hidden;
}  /* a gauche, le titre est en colonne */

header > .left > h1 {
    font-size: 3em;
    color: #000000;
    margin: 0;
    font-weight: bold;
    margin-left: 8%;
}  /* titre */

header > .left > h2 {
    font-size: 2em;
    color: #000000;
    margin: 0;
    font-weight: lighter;
    margin-left: 8%;
}  /* sous titre */

header > .right {
    display: flex;
    flex-direction: row-reverse;

    min-width: 65%;
    max-width: 65%;

    overflow: hidden;
}  /* a droite, l'image est en ligne, et part de la bordure droite */

header > .right > img {
    margin-right: 3em;

    min-height: 11em;
    max-height: 11em;
}  /* taille image */

@media only screen and (max-width: 60em) {
    /* si trop petit, cache l'image */
    header > .right {
        display: none;
    }

    header > .left {
        min-width: 100%;
        max-width: 100%;
    }
}

/* Section jeux */

section.games {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 3em;

    margin-top: 3em;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    border: 1px solid black;
    border-radius: 2em;
    min-height: 18em;
    overflow: hidden;
}  /* section games en colonne, quelques infos */

section.games > h3 {
    text-align: center;
    margin: 0;
    font-size: 1.5em;
}  /* titre section */

section.games > .infos {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1em;
}  /* div infos sous le titre section en colonne */

section.games > .infos > .game {
    width: 95%;
    border: 2px solid grey;
    border-radius: 2em 1em;
    cursor: pointer;

    max-height: 8em;
    overflow: hidden;
}  /* les 3 divs game dans infos */

section.games > .infos > .game > h4 {
    margin: 0.5em;
    margin-left: 3em;
    font-size: 1.3em;
}  /* titre div game */

section.games > .infos > .game > p {
    margin: 0.5em;
    margin-left: 2em;
    display: none;
}  /* paragraphe div game, par defaut non affiche */

section.games > .infos > .game:hover {
    border-radius: 1em 2em;
    font-size: 1.5em;
}  /* quand game survole, grossir la taille et changer la bordure */

section.games > .infos > #game1:hover #textgame1 {
    display: block;
}  /* quand game1 survole, afficher son paragraphe */

section.games > .infos > #game2:hover #textgame2 {
    display: block;
}  /* quand game2 survole, afficher son paragraphe */

section.games > .infos > #game3:hover #textgame3 {
    display: block;
}  /* quand game3 survole, afficher son paragraphe */

/* Section previsualisation */

section.preview {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    margin-top: 3em;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    border: 1px solid black;
    border-radius: 2em;
    min-height: 35em;
    max-height: 35em;
    overflow: hidden;

    background-color: #FFFFFF;
    background-image: none;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}  /* section games en ligne, quelques infos */

section.preview > .left, section.preview > .right, section.preview > .center  {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    min-width: 15%;
    max-width: 15%;
    color: white;
    text-shadow: 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000;
    font-size: 3em;   
    cursor: pointer;
}  /* div left right et center */

section.preview > .center {
    min-width: 70%;
    max-width: 70%;
    opacity: 0;
    cursor: cell;
}  /* met l'opacite de center a 0, change la taille et change le curseur */

/* Section webographie */

section.webographie {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    margin-top: 3em;
    margin-left: auto;
    margin-right: auto;

    width: 90%;
    border: 1px solid black;
    border-radius: 2em;
    overflow: hidden;
}  /* section webographie met les elements en ligne */

section.webographie > h3 {
    margin-left: 3em;
    cursor: pointer;
}  /* titre section */

section.webographie > p {
    margin-right: 3em;
    cursor: pointer;
}  /* lien du section */

section.webographie > p > a {
    color: green;
    text-decoration: none;
}  /* couleur du lien */

/* Tetris */

/* Section tetris */
section.tetris {
    margin-top: 3em;
    border: solid 1px black;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
} /* section tetris en ligne */

section.tetris > .left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 6em;

    width: 35%;
}  /* div de gauche, en colonne */

section.tetris > .center {
    display: flex;
    flex-direction: column;
}  /* div du centre, celle du jeu, en colonne */


section.tetris > .right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2em;

    width: 35%;
}  /* div de droite, en colonne */

/* Memory */

/* Section memory */

section.memory {
    margin-top: 3em;
}

.memory {
    margin: auto;
    border: solid 1px black;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100vh;
    min-height: 90vh;
}

.memory > .top {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4em;
}

.memory > .top > button {
    min-height: 10vh;
    min-width: 20vw;
    font-size: 2em;
}

#game{
    width: 50vh;
    height: 50vh;
    background-color: white;
    display: flex;
    margin: auto;
}/* conteneur du jeu*/

#memory_game{
    width: 50vh;
    height: 50vh;
    display: flex;
    flex-wrap: wrap;
    margin: auto;
    perspective: 1000px;
}/*conteneur egalement du jeux mais different pour pouvoir redimmensioner la fenetre*/

.memory_card{
    width: calc(25% - 1.56%);
    height: calc(33.333% - 1.56%);
    margin: 0.78%;
    position: relative;
    transform: scale(1);
    transform-style: preserve-3d;
    transition: transform .5s;
}/* style pour les carte */

.diff2{
    width: calc(20% - 1.56%) !important;
    height: calc(25% - 1.56%) !important;
}/* taille differente pour les cartes car plus nombreuses*/

.diff3{
    width: calc(16.666% - 1.56%) !important;
    height: calc(20% - 1.56%) !important;
}/* taille differente pour les cartes car plus nombreuses*/

.memory_card :active{
    transform: scale(.97);
    transition: transform .2s;
}/* propriete pour le flip de la carte */

.memory_card.flip{
    transform: rotateY(180deg);
}/* classe qui flip la carte (3d grace a persective) */

.front_face, .back_face{
    width: 100%;
    height: 100%;
    padding: 3.12%;
    border-radius: 5%;
    border: 0.25em solid black;
    position: absolute;
    backface-visibility: hidden !important;
}/* style commun des faces avant et arrieres */

.front_face{
    transform: rotateY(180deg);
    background-color: white;
}/* style face avant */

/* Dino */ 

/* Section dino_pacman */

section.pacman {
    margin-top: 3em;
}

.pacman {
    margin: auto;
    border: solid 1px black;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100vh;
    min-height: 90vh;
}/* style de la section du jeu */

#pacman_game{
    width: 100vh;
    height: 50vh;
    display: flex;
    margin: auto;
    border: 1px solid black;
    overflow: hidden;
    background-image: url(../Images/pacman_dino/bg.jpg);
    background-size: 9469px 200px;
    animation : bg 200s linear infinite;
    border-radius: 3%;
}/* conteneur du jeu pacman */

#pacman{
    width: 8.33%;
    height: 25%;
    background-image: url(../Images/pacman_dino/pacman1.png);
    background-size: 100% 100%;
    position: relative;
    top: 75%;
    left: 3.333%;
} /* style du pacman */

.eat{
    animation: pacman 0.5s linear infinite;
}/* classe pour le pacman rajoutant l animation de sa bouche */

.jump{
    animation: jump 0.5s linear;
}/* classe pour le pacman rajoutant l aimation le faisant sauter */

#ghost{
    width: 5%;
    height: 15%;
    background-size: 100% 100%;
    background-image:url(../Images/pacman_dino/ghost_blue.png);
    position: relative;
    top: 80%;
    left: 95%;
}/* style fantome */

#group_ghost{
    width: 15%;
    height: 15%;
    background-image:url(../Images/pacman_dino/group_ghost.png);
    background-size: 100% 100%;
    position: relative;
    top: 80%;
    left: 95%;
}/* style groupe de fantome */

#flying_ghost{
    width: 5%;
    height: 15%;
    background-image: url(../Images/pacman_dino/flying_ghost.png);
    background-size: 100% 100%;
    position: relative;
    top: 54%;
    left: 95%;
}/* style fantome vollant */

.vanish{
    display: none;
    animation: none;
}/* classe faisant disparaitre les fantome */

.slide{
    animation: slide 1.5s linear infinite;
}/* classe rajoutant l animation des fantomes */

#end{
    width : 83.333%;
    height: 50% ;
    overflow: hidden;
    display: none;
    
    padding: auto;
    margin: auto;
    font-family: 'retro';
    font-size: 1.25em;
    text-shadow: 2px 0 0 white, 0 2px 0 white, 0 -2px 0 white, -2px 0 0 white, 2px 2px 0 white, 2px -2px 0 white, -2px 2px 0 white, -2px -2px 0 white;
}/* texte de fin */

.end{
    display: flex !important;
    flex-direction: column;
    justify-self: center;
    justify-content: center;
    align-items: center;
    align-content: center;
}/* classe permettant de faire apparaitre le texte de fin */

.over{
    font-size: 2em;
}/* grossissement du game over du message de fin */

.cherry{
    display: inline-block;
    width: 1em;
} /* classe des cerises du message de fin */

@keyframes jump {
    0% {
        top: 75%;
    }
        
    50% {
        top: 25%;
    }

    100% {
        top: 75%;
    }
}/* animation du saut */

@keyframes slide {
    0% {
        left: 100%;
    }

    100% {
        left: -25%;
    }
}/* animation des fantomes */

@keyframes pacman{
    0%{
        background-image: url(../Images/pacman_dino/pacman1.png);
    }
    50%{
        background-image: url(../Images/pacman_dino/pacman2.png);
    }
    100%{
        background-image: url(../Images/pacman_dino/pacman1.png);
    }
}/* animation bouche de pacman */

@keyframes bg{
    0%{
        background-position: 0%;
    }
    100%{
        background-position: 100%;
    }
}/* animation du fond */

/* Informations */

/* Section informations */

section.informations {
    margin-top: 3em;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2em;
} /* section inforamations, affiche en colonne, les infos completes de tous les jeux */

section.informations > div {
    min-width: 90%;
    max-width: 90%;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0.2em solid black;
    border-radius: 4% 8% 2% 1%;
} /* les 3 jeux */

section.informations > div:target {
    background-color: beige;
}  /* la div choisie avec un # dans l'url est en beige */

section.informations > div:hover {
    font-size: 1.2em;
}  /* la div survolee est grossie */

section.informations > div > p {
    min-width: 88%;
    max-width: 88%;
    font-size: 1.4em;
}  /* taille du texte */

section.informations > div > p > span {
    color: blue;
    font-weight: bold;
    cursor: pointer;
}  /* le lien pour acceder au jeu est en bleu, gras et le cursor en pointer */

/* Webographie */

/* Section webographie-page */

section.webographie-page {
    margin-top: 3em;

    min-height: 90vh;

    font-size: 1.4em;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2em;
} /* section webographie, elements en colonne */

section.webographie-page > div {
    width: 90%;    
    
    display: flex;
    justify-content: center;
    align-items: center;
} /* conteneur, titre et liens */

section.webographie-page > div > a {
    color: darkslateblue;
    text-decoration: none;
} /* les liens sont en violet */


/* Footer */

footer {
    display: flex;
    flex-direction: row;

    margin-top: 6em;

    min-width: 100%;
    max-width: 100%;

    min-height: 3em;
    max-height: 3em;

    box-shadow: 4px -8px 11px #aaa;

    overflow: hidden;
} /* pied de bas de page prend toute la largeur et fait 3em de hauteur */

footer > .flags {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    gap: 1em;

    max-width: 35%;
    min-width: 35%;

    border-right: dotted 2px black;
} /* conteneur des drapeaux */

footer > .flags > img {
    max-height: 2.25em;
}  /* taille des drapeaux */

footer > .date {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    max-width: 30%;
    min-width: 30%;
}  /* div date */

footer > .authors {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;

    max-width: 35%;
    min-width: 35%;

    border-left: dotted 2px black;
}  /* div auteurs */

footer > .authors > p {
    line-height: 1em;
    margin: 0;
    margin-right: 1.5em;
}  /* textes auteurs */

@media only screen and (max-width: 60em) {
    /* si page trop petite, on cache la div contenant les drapeaux */
    footer > .flags {
        display: none;
    }

    footer > .authors, footer > .date {
        min-width: 50%;
        max-width: 50%;
    }
}
