*,
*::before,
*::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

:root {

    /*THEME CLAIR*/
    --fond: #f2f2f2;
    --texte: #232323;
    --bleu: #434AFA;
    --violet: #B93AF9;
    --vert: #15890D;
    --rouge: #D04242;

    /* THEME SOMBRE */
    @media (prefers-color-scheme: dark) {
        --fond: #232323;
        --texte: #f2f2f2;
        --bleu: #7F87FA;
        --violet: #D952F5;
        --vert: #50FE44;
        --rouge: #F54545;
    }
}

html {
    word-break: normal;
    letter-spacing: 1px;
}

/* fonts */

@font-face {
    font-family: 'Rounded Elegance';
    src: url('../typographie/rounded_elegance/Rounded_Elegance_Regular.otf') format("opentype"),
        url('../typographie/rounded_elegance/RoundedElegance-Regular.woff2') format('woff2'),
        url('../typographie/rounded_elegance/RoundedElegance-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Stanley';
    src: url('../typographie/stanley/Stanley.otf') format("opentype"),
        url('../typographie/stanley/StanleyRegular.woff2') format('woff2'),
        url('../typographie/stanley/StanleyRegular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

p,
a,
button,
input,
label,
li,
span {
    font-family: 'Rounded Elegance', sans-serif;
}

input {
    font-size:1.25rem;
}

p {
    color:var(--texte);
}

li {
    color: var(--texte);
    margin-left: 1rem;
    /* list-style-type: none; */
}

a {
    color: var(--texte);
    transition: 0.2s color;
}

a:hover {
    color: var(--bleu);

    transition: 0.2s color;
}

.sr-only {
    /*class qui permet de cacher visuellement un contenu à destination des lecteurs d'écrans (screen reader) */
    position: absolute;
    display:none;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    margin: 0;
    background-color: var(--fond);

    display: grid;
    justify-items: center;
    grid-template-rows: auto 1fr auto;

    grid-template-columns:
        [full-start] minmax(1rem, 1fr) [content-start] minmax(0, 96rem) [content-end] minmax(1rem, 1fr) [full-end];
    min-height: 100vh;
}


/* ---- entête de page -----------*/
header {
    padding: 10px 10px;
    color: var(--texte);
    background-color: var(--fond);

    display: grid;
    grid-template-columns: subgrid;
    grid-column: full;

    /* position: sticky;
    top: 0; */

    z-index: 5;
}

/*Zone logo*/

.logo-link {
    display: grid;
    container: grid;
    grid-area: 1/2/2/3;

    text-decoration: none;
    width: auto;
    min-width: 10%;
    min-height: 50%;
    position: relative;
    grid-auto-flow: column;
    z-index: 2;

    justify-self: start;
    justify-items: center;
    align-items: center;
}

.logo-link h1 {
    visibility: hidden;
}

.logo-link:hover h1 {
    color: var(--violet);

    transition: 0.2s color;
}

.logo {
    min-width: 4rem;
    width: auto;
    height: auto;
    max-height: 2.5rem;
}

/*menu navigation*/

nav {
    display: grid;
    container: grid;
    grid-area: 1/2/2/3;
    column-gap: 20px;

    width: 100%;

    justify-content: end;
    align-items: center;
}

nav>* {
    word-break: normal;
}

.btn-connexion {
    display: flex;
    justify-items: center;
    align-items: center;

    text-decoration: none;

    background-color: var(--bleu);
    border: none;
    border-radius: 100%;

    min-width: 30px;
    min-height: 30px;

    color: var(--fond);

    transition: 0.2s background-color;

    grid-area: 1/3/2/4;
}

.btn-connexion:hover {
    background-color: var(--violet);
    color: var(--fond);

    transition: 0.2s background-color;
}

.connecte {
    background-color: var(--violet);
}

.btn-connexion>svg {
    min-width: 1rem;
    max-height: 1rem;
}

.btn-menu {
    appearance: none;
    border: none;
    background: transparent;
    font-size: 1.375rem;
    width: auto;
    color: var(--bleu);

    grid-area: 1/2/2/3;
}

.btn-menu:hover {
    cursor: pointer;
}

.main-menu {
    position:relative;
}

.menu-list {
    list-style-type: none;
    font-size: 1rem;
    background-color: var(--fond);

    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;

    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    /*c est pourr cacher le menu nav*/
    visibility: hidden;
    transition: linear clip-path 0.2s;
}

.open {
    /*etat ouvert du menu*/
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    visibility: visible;
    transition: linear clip-path 0.5s;
}

.menu-item {
    padding: 0.75rem 5%;

    border-top: 1px solid var(--texte);
}

.menu-link {
    text-decoration: none;
    color: var(--texte);
    font-weight: 600;
}

.menu-link:hover:focus {
    color: var(--bleu);
}

/*etat page courante*/

.current {
    color: var(--violet);
}

/*-------------- Contenu principal ---------------*/
main {
    display: grid;
    container: grid;
    grid-template-columns: subgrid;
    grid-column: content;
    min-height: 650px;
    grid-template-rows:auto 1fr;
}

.zoneCentrale {
    display: grid;
    container: grid;
    grid-template-columns: subgrid;
    grid-column: content;
    justify-items: center;
    align-content: center;
    width: 100%;
    padding:20px;
    border-radius: 40px;
    justify-content: stretch;
}

.extension {
    grid-template-columns: 10% auto 1fr;
    grid-template-rows: 1fr;
}

.contraction {
    grid-template-columns: 1fr 0 0;
    grid-template-rows: 1fr;
}

form {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    display: grid;
    justify-items: center;
    row-gap: 10px;
}

form>div {
    position: relative;
    width: 100%;
    display: grid;
    justify-items: center;
}

label {
    color: var(--bleu);
    justify-self: left;
}

input {
    position: relative;
    padding: 10px;
    border: solid 3px var(--bleu);
    border-radius: 50px;
    width: 100%;
    background-color: var(--fond);
    color: var(--bleu);
}

input[type=submit] {
    border: none;
    width: auto;
    background-color: var(--bleu);
    color: var(--fond);

    transition: 0.2s background-color;
}

input[type=submit]:hover {
    background-color: var(--violet);

    transition: 0.2s background-color;
}

/*------------ Commun à toutes les pages ------------*/

.bloc-text {
    width:100%;
    display:flex;
    justify-content: end;
}

.bloc-text > div {
    width:100%;
    height:auto;
    padding:15px;
    border-radius: 30px;
    box-shadow: 0 0 10px var(--texte);
    display:none;
    position:relative;
    visibility: hidden;
}

.sectionvideo {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50px;
}


.video_fond {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}



.fleche {
    position: absolute;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 15px;
    background-color: var(--bleu);
    border-radius: 40px;
    color: var(--fond);
    border: none;
    z-index: 1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

a.fleche{
    text-decoration: none;
}

.fleche::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../images/fleche.svg');

    background-size: 100%;
    background-repeat: no-repeat;
}

.fleche .texte_fleche{
    display: none;
}

.fleche.gauche::after {
    transform: rotate(-90deg);
    order: -1;
    margin: 5px;
}

.fleche.droite::after {
    transform: rotate(90deg);
    margin: 5px;
}

.fleche.haut::after {
    transform: rotate(0deg);
    order: -1;
    margin: 5px;
}

.fleche.bas::after {
    transform: rotate(180deg);
    margin: 5px;
}

.gauche {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.droite {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.haut {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.bas {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/******** Bouton Retour ********/
.fleche_retour {
    display: none;
    position: relative;
    flex-wrap: wrap;
    align-items: center;
    padding: 5px;
    background-color: var(--bleu);
    border-radius: 40px;
    color: var(--fond);
    border: none;
    z-index: 1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out; /* clé de la magie */
}

.fleche_retour::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("../images/fleche.svg");

    background-size: 100%;
    background-repeat: no-repeat;
}

.retour{
    margin-left: 5px;
    margin-right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.fleche_retour.retour::after {
    transform: rotate(-90deg);
    order: -1;
    margin: 5px;
}


.fleche_retour:hover {
    background-color: var(--violet);
    color: var(--fond);
}

/*Les étoiles*/

.etoile1 {
    left: 35%;
    top: 20%;
    transform: translateY(-50%);
}

.etoile2 {
    left: 20%;
    top: 40%;
    transform: translateY(-50%);
}

.etoile3 {
    left: 55%;
    top: 60%;
    transform: translateY(-50%);
}

.etoile4 {
    left: 20%;
    top: 75%;
    transform: translateY(-50%);
}




.bouton_etoile {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    color: black;
    border: solid 3px white;
    position: absolute;
    z-index: 1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bouton_etoile:hover{
    transform:perspective(20);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.bouton_etoile::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    background-image: url('../images/etoile.svg');

    background-size: cover;
    background-repeat: no-repeat;
}

.texte_etoile {
    display: none;
}

.bouton_etoile:hover .texte_etoile{
    display: inline;
    margin-right: 10px;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
}

.voir {
    display: block !important;
    visibility: visible !important;
}

.accesSite{
    position: relative;
    margin-top: 5rem;
    margin-left: auto;
    margin-right: auto;
}

.commencer_exercice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height:10rem;
    margin-bottom:2rem;
}

.commencer_exercice > a {
    background-color: var(--bleu);
    color: var(--fond);
    padding: 15px;
    border-radius: 50px;
    text-decoration: none;
    position: absolute;
    z-index: 1;
    font-size: 1.2rem;
    transition:0.2s background-color linear;
}

.commencer_exercice > a:hover {
    background-color: var(--violet);
    color: var(--fond);
    transition:0s background-color linear;
}


/*-------------Partie politique de confidentialité--------------*/

.main_politique{
    display: block;
    grid-column: content;
    min-height: 650px;
}

.politique{
    margin-top: 25px;
    max-height: 740px;
}

.politique > *:not(:first-child) {
    margin-left: 1rem;
}


/*-------------Partie des trophee--------------*/

.zoneScore {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height:100%;
    margin-bottom:2rem;
}

.trophee {
    max-height:200px;
    height:auto;
    width:auto;
}

.blocEtoile > img {
    height:75px;
}

/*------------ En tête du contenu principal ---------------*/

h1 {
    font-family: 'Stanley', sans-serif;
    font-variant: small-caps;
    font-size: 2rem;
    color: var(--bleu);
    margin-block: 2rem;
}

h2 {
    color:var(--bleu);
    font-family: 'Stanley', sans-serif;
    font-size:1.75rem;
    margin-bottom: 1rem;
}

h3 {
    color:var(--bleu);
    font-family: 'Stanley', sans-serif;
    font-size:1.5rem;
    margin-top: 0.5rem;
}

/*-------------- pied de page -------------------*/
footer {
    color: var(--texte);
    padding: 1rem;

    display: grid;
    container: grid;
    grid-template-columns: subgrid;
    grid-column: full;
}

footer>* {
    container: grid;
    grid-area: 1/2/2/3;

    justify-self: left;
    align-items: center;
}

/* ----------- media queries  ---------------------------*/
@media (min-width:768px) {

    .btn-connexion {
        padding: 10px;
        border-radius: 50px;
        position: relative;
    }

    .logo-link h1 {
        visibility: visible;
        font-family: 'Stanley';
        font-size: 2rem;
        color: var(--bleu);

        transition: 0.2s color;
    }

    form {
        width: 70%;
    }

    .filter-list {
        grid-auto-flow: column;
        grid-auto-columns: 8rem;
        justify-content: center;
        column-gap: 0.5rem;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (min-width:1024px) {

    .zoneScore {
        flex-wrap: wrap;
        flex-direction: row;
        justify-content:space-evenly;
    }

    .zoneScore > *:not(:last-of-type) {
        margin-top: 1rem;
    }

    .texte_etoile {
        display: inline;
    }

    form {
        width: 50%;
    }

    .btn-menu {
        visibility: hidden;
    }

    .menu-list {
        position: static;
        clip-path: none;

        display: grid;
        container: grid;
        grid-area: 1/2/2/3;
        grid-auto-flow: column;
        grid-auto-columns: min-content;

        justify-content: end;
        align-self: center;

    }

    .menu-item {
        margin-left: 1.25rem;
        padding: 0;
        border-top: none;
    }

    h1 {
        font-size: 2.5rem;
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .menu-list {
        visibility: visible;
        /*finir ?*/
    }

    .fleche .texte_fleche{
        display: inline;
    }

}

@media(hover: hover) {
    .fleche:hover .texte_fleche{
        display: inline;
    }
    
    
    .fleche:hover {
        background-color: var(--violet);
        color: var(--fond);
    } 
}