*,
*::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 {
    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,
figcaption,
li,
span,
option {
    font-family: 'Rounded Elegance', sans-serif;
    color: var(--texte);
}

p,
li {
    margin-bottom: 1rem;
}

input {
    font-size: 1.25rem;
}

ul {
    font-size: 1.25rem;
    margin-left: 15px;
}

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;
}

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;
}

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;
}

main {
    display: grid;
    container: grid;
    grid-template-columns: subgrid;
    grid-column: content;
    min-height: 100%;
    grid-template-rows: auto 85%;
}

.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;
}

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

/* Mise en page des exercices */

h1,
h2 {
    color: var(--bleu);
    font-family: 'Stanley';
}

h1 {
    font-size: 2rem;
}

p,
figcaption {
    font-size: 1.25rem;
}

/*********Zone centrale********/

.zoneCentrale {
    display: grid;
    container: grid;
    grid-template-columns: subgrid;
    grid-column: content;
    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;
}

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

.zonePrincipale {
    box-shadow: 0 0 10px var(--texte);
    border-radius: 30px;
    padding: 15px;
    width: 100%;
}

/****************** Bouton quitter *****************/

.quitter {
    display: grid;
    container: grid;
    grid-area: 1/2/2/3;
    position: relative;
    padding: 15px;
    background-color: var(--bleu);
    text-decoration: none;
    border-radius: 40px;
    color: var(--fond);
    border: none;
    z-index: 1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    justify-self: end;


}

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

/**** Bouton etoile *******/

.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;
    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;
}

/****************** Bouton Submit ******************/
.zoneEnvoyer {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.envoyer {
    position: relative;
    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;
    justify-self: center;
}

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

/***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:hover {
    background-color: var(--violet);
    color: var(--fond);
}

.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%);
}

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



/***************** Video fond ******************/

.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;
}


/********************** Section Exercice *********************/

.questionExo,
.questionExoBouton {
    margin-top: 1rem;
}

.questionExo {
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}

.questionExoBouton {
    display: flex;
    flex-direction: column;
}

.questionExo>* {
    position: relative;
    align-items: center;
}

/*Input type CHECKBOX*/

/* The container */
.container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide the browser's default radio button */
.container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Create a custom radio button */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: var(--texte);
    border-radius: 50%;
}

/* On mouse-over, add a grey background color */
.container:hover input~.checkmark {
    background-color: var(--bleu);
}

/* When the radio button is checked, add a blue background */
.container input:checked~.checkmark {
    background-color: var(--violet);
}

/* Input type SLIDER */

input[type=range] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 15px;
    background: var(--texte);
    outline: none;
    border-radius: 30px;
    z-index:1;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 35px;
    height: 35px;
    background-color: var(--violet);
    cursor: pointer;
    border-radius: 100%;
}

input[type=range]::-moz-range-thumb {
    width: 35px;
    height: 35px;
    background: var(--violet);
    cursor: pointer;
    border-radius: 100%;
}

datalist {
    margin-top:0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    writing-mode: vertical-lr;
    width: 100%;
}

/* Input type TEXT */

input[type=text] {
    background-color: var(--fond);
    border: solid 3px var(--bleu);
    border-radius: 50px;
    width:100%;
    padding: 10px;
}

/****Audio***/

audio {
    position: relative;
    color: var(--bleu);
    margin-left: 5px;
    margin-right: 5px;
    width: 100%;
    border:3px solid var(--bleu);
    border-radius: 35px;
}

.mauvaise-reponse {
    border:3px solid var(--rouge);
}

.bonne-reponse {
    border:3px solid var(--vert);
}

figure {
    width: 100%;
    margin:1rem auto 1rem auto;
}
/********coches vertes et rouges********/

.cocheReponse {
    position:relative;
    height:50px;
    width:auto;
}

/*******lien zone suivante**********/

.lienZoneSuivante {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
}

.liensEnvoyerSeul {
    justify-content: center;
}

.liensEnvoyerMultiple {
    justify-content: space-between;
}

.suivant {
    background-color: var(--bleu);
    text-decoration: none;
    font-size: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border:none;
    border-radius: 40px;
    padding:15px;
    color: var(--fond);
    transition: all 0.3s ease-in-out;
}

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

/***Section reponsive****/

@media (min-width:768px) {

    .lienZoneSuivante {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }

    .questionExo,
    .questionExoBouton {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }

    figure {
        width: 80%;
    }

    .texte_etoile {
        display: inline;
    }

}

@media (min-width:1024px) {

    .lienZoneSuivante {
        width: 75%;
    }

    .questionExo,
    .questionExoBouton {
        width: 75%;
    }

    figure {
        width: 75%;
    }
}