@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-800.otf") format("opentype");
    font-display: auto;
    font-style: normal;
    font-weight: 800;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-500.otf") format("opentype");
    font-display: auto;
    font-style: normal;
    font-weight: 500;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-700-it.otf") format("opentype");
    font-display: auto;
    font-style: italic;
    font-weight: 700;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-200-it.otf") format("opentype");
    font-display: auto;
    font-style: italic;
    font-weight: 200;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-300-it.otf") format("opentype");
    font-display: auto;
    font-style: italic;
    font-weight: 300;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-400-it.otf") format("opentype");
    font-display: auto;
    font-style: italic;
    font-weight: 400;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-700.otf") format("opentype");
    font-display: auto;
    font-style: normal;
    font-weight: 700;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-300.otf") format("opentype");
    font-display: auto;
    font-style: normal;
    font-weight: 300;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-200.otf") format("opentype");
    font-display: auto;
    font-style: normal;
    font-weight: 200;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-800-it.otf") format("opentype");
    font-display: auto;
    font-style: italic;
    font-weight: 800;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-500-it.otf") format("opentype");
    font-display: auto;
    font-style: italic;
    font-weight: 500;
    font-stretch: normal;
}

@font-face {
    font-family: "avenir-lt-pro";
    src: url("./fonts/avenir-lt-pro-400.otf") format("opentype");
    font-display: auto;
    font-style: normal;
    font-weight: 400;
    font-stretch: normal;
}

body {
    font-family: "avenir-lt-pro", sans-serif;
}

.button {
    position: absolute;
    margin-top: 85dvh;
    width: 60vw;
    background-color: #BF3E35;
    font-size: 4vw;
    color: #FFFFFF;
    border: none;
    letter-spacing: 0.7vw;
    text-transform: uppercase;
    font-weight: 500;
    padding: .55em 0 .45em;
    border-radius: 99em;
}

/*-------------------Home Page------------------*/
#homePage {
    position: absolute;
    background-image: url('img/home-page-background.webp');
    /* Remplace par le bon chemin */
    background-position: bottom;
    background-size: cover;
    background-attachment: fixed;
    text-align: center;
    width: 100vw;
    height: 100dvh;
}

#homePageLogo {
    background-image: url(./img/nocibe-logo-white.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 50vw;
    height: 22dvh;
    margin-top: 7dvh;
}

#homePageSeparator {
    margin-top: 2dvh;
    height: 0.2dvh;
    width: 57vw;
    background-color: white;
}

#homePageContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.homePageLowText {
    margin-top: 3dvh;
    margin-bottom: 5dvh;
    font-size: 6vw;
    font-weight: 400;
    text-transform: uppercase;
    color: #E9D2BC;
    line-height: 1;
}

.homePageHighText {
    margin-top: 30dvh;
    font-size: 7vw;
    text-transform: uppercase;
    font-weight: 800;
    color: #E9D2BC;
    letter-spacing: 2vw;
}

/*-------------------Tuto Page------------------*/
#tutoPage {
    position: absolute;
    background-color: #E9D2BC;
    text-align: center;
    width: 100vw;
    height: 100dvh;
}

#tutoPageLogo {
    background-image: url(./img/nocibe-logo-red.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 50vw;
    height: 22dvh;
    margin-top: 7dvh;
}

#tutoPageSeparator {
    margin-top: 5dvh;
    height: 0.2dvh;
    width: 57vw;
    background-color: #BF3E35;
}

#tutoPageContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tutoPageLowText {
    margin-top: 3dvh;
    margin-bottom: 5.7dvh;
    font-size: 4.7vw;
    font-weight: 300;
    color: black;
    line-height: 1;
}

.tutoPageHighText {
    margin-top: 6dvh;
    font-size: 6vw;
    font-weight: 500;
    text-transform: uppercase;
    color: #BF3E35;
    line-height: 1;
}

/*-------------------Quiz Page------------------*/

#quizPage {
    position: absolute;
    background-color: #E9D2BC;
    background-position: center;
    background-size: cover;
    text-align: center;
    width: 100vw;
    height: 100dvh;
}

#quizPageLogo {
    background-image: url(./img/little-logo-red.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 11dvh;
    margin-top: 5dvh;
    margin-bottom: 2dvh;
}

#questionContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#validationBtn {
    position: absolute;
    margin-top: 85dvh;
    border: none;
}

#validationBtn:disabled {
    cursor: not-allowed;
}

.questionNb {
    display: none;
    margin-top: 1.5dvh;
    position: fixed;
    font-size: 23dvh;
    text-transform: uppercase;
    color: white;
}

.questionTxt {
    margin-top: 5dvh;
    position: fixed;
    font-size: 3.3dvh;
    font-weight: 500;
    color: #BF3E35;
    text-transform: uppercase;
    line-height: 1;
}

.questionTxtContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30dvh;
    width: 90vw;
    background-image: url(./img/question-glow.png);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.totalQuestions {
    padding-top: 100px;
    font-size: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#whiteLine {
    margin-top: 30px;
    background-color: white;
    width: 65%;
    height: 10px;
}

.questionBtn {
    font-size: 1.7dvh;
    border: 2px solid rgb(255, 255, 255);
    border-radius: 173px;
    background: transparent;
    color: black;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    width: 70vw;
    height: 8dvh;
    margin-bottom: 3dvh;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4dvh;
}

.selected {
    background-color: white;
    /* Plus opaque lorsqu'il est sélectionné */
    border-color: transparent;
    box-shadow: 0 0 5dvh #BF3E35;
}

#questionBtnContainer {
    position: relative;
    margin-top: 2dvh;
}

/* Texte en rouge et éventuellement gras */
.error {
    color: #BF3E35 !important;
    /* rouge type slider */
}

.error::placeholder {
    color: #c06f69 !important;
    /* rouge type slider */
}

input[name="accept"].error+label::after {
    content: " *";
    color: #BF3E35;
    font-weight: bold;
    margin-left: 0.2vw;
}

input[name="acceptNews"].error+label::after {
    content: " *";
    color: #BF3E35;
    font-weight: bold;
    margin-left: 0.2vw;
}

/* Conteneur du slider */
#sliderContainer {
    position: absolute;
    margin-top: 50dvh;
    font-size: clamp(10px, 2.3dvh, 16px);
    height: 6em;
    width: 80vw;
    display: flex;
    flex-direction: column;
}

#headContainer {
    position: absolute;
    height: 10dvh;
    width: 80vw;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    top: 100%;

}

#headTxtContainer {
    position: absolute;
    margin-top: 23dvh;
    height: 10dvh;
    width: 90vw;
    display: flex;
    flex-direction: row;
    justify-content: space-between;

}

#txtTiredHead {
    margin-top: 12dvh;
    font-size: 2.5dvh;
    font-weight: 500;
    text-transform: uppercase;
    color: #BF3E35;
    line-height: 1;
}

#txtNiceHead {

    overflow: visible;
    white-space: nowrap;
    margin-top: 12dvh;
    font-size: 2.5dvh;
    font-weight: 500;
    text-transform: uppercase;
    color: #BF3E35;
    line-height: 1;
}

#tiredHead {
    height: 11dvh;
    width: 10dvh;
    background-image: url(./img/tired-head.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin: 1dvh 1vw;
    display: flex;
    justify-content: center;
}

#niceHead {
    height: 11dvh;
    width: 10dvh;
    background-image: url(./img/nice-head.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin: 1dvh 1vw;
    display: flex;
    justify-content: center;
}

/* La partie "remplie" */
.slider-fill {
    position: absolute;
    height: 5em;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 999em;
    box-shadow: 0 0 5dvh #BF3E35;
}

.slider-fill input {
    position: absolute;
    height: 70%;
    width: 94%;
    background: rgb(255, 255, 255);
    border-radius: 999em;
    transition: width 0.3s;
    -webkit-appearance: none;
    appearance: none;
    overflow: hidden;
}

.slider-fill input[type="range"]::-webkit-slider-thumb {
    display: block;
    appearance: none;
    -webkit-appearance: none;
    height: 6.25dvh;
    aspect-ratio: 1;
    background: white;
    border: 4px solid #BF3E35;
    border-radius: 100%;
    background: #BF3E35;
    box-shadow: -50vw 0 0 45vw #DD9995;
    cursor: pointer;
}

/*-------------------General------------------*/
/* Applique un effet de fondu pour les pages */
.page {
    transition: opacity 0.5s ease-in-out;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.active {
    opacity: 1;
    pointer-events: all;
}

.fade {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    /* Empêche les clics pendant la transition */
}

.active-text {
    opacity: 1;
    pointer-events: all;
}

/* Applique un effet de fondu pour les questions */
.question-container {
    transition: opacity 0.5s ease-in-out;
}

html,
body {
    margin: 0;
/*    overflow: hidden;*/
    min-height: 100%;
}


::-webkit-scrollbar {
    display: none;
}

/*--------------------formPage----------------------*/

#formPage {
    position: absolute;
    background-image: url(./img/form-background.webp);
    background-position: center;
    background-size: cover;
    text-align: center;
    width: 100vw;
    height: 100dvh;
}

#formPageContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#formSeparator {
    margin-top: 4dvh;
    height: 0.2dvh;
    width: 50vw;
    background-color: #BF3E35;
    ;
}


.formHighText {
    margin-top: 4dvh;
    font-size: 6vw;
    font-weight: 500;
    text-transform: uppercase;
    color: #BF3E35;
    line-height: 1;
}

.formLowText {
    margin-top: 2dvh;
    font-size: 4vw;
    font-weight: 500;
    color: #BF3E35;
    line-height: 1;
}

.formContainer {
    margin-top: 1dvh;
    height: 31dvh;
    width: 75vw;
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    flex-direction: column;
}

.formGroup {
    height: 4dvh;
    width: 100%;
}

.formGroup input {
    height: 100%;
    width: 100%;
    font-size: 3dvh;
    background-color: transparent;
    border: none;
    /* enlève toutes les bordures */
    border-bottom: 0.2dvh solid white;
    /* ajoute une ligne blanche en bas */
    color: black;
    outline: none;
    /* enlève le contour bleu au focus */
}

.formGroup input::placeholder {
    font-family: "avenir-lt-pro", sans-serif;
}

#skip {
    position: absolute;
    margin-top: 93dvh;
    font-size: 3vw;
    font-weight: 400;
    color: white;
    line-height: 1;
    text-decoration: underline;
}

#littleTxt {
    font-size: 2vw;
    font-weight: 400;
    color: black;
    line-height: 1;
    text-align: left;
    width: 75vw;
}

.checkboxGroup {
    height: 4dvh;
    margin-top: 1dvh;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.checkboxGroup label {
    font-size: 3vw;
    margin-left: 2vw;
    font-weight: 500;
    text-align: left;
    overflow: visible;
    white-space: nowrap;
}

.checkboxGroup input {
    -webkit-appearance: none;
    appearance: none;
    width: 2dvh;
    height: 2dvh;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

.checkboxGroup input[type="checkbox"]:checked {
    background: #BF3E35;
}

/*--------------------popuRules----------------------*/

/* Boîte de la popup */
#popupBox {
    display: none;
    /* caché par défaut */
    position: fixed;
    /* reste visible même si on scroll */
    top: 64%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #000;
    width: 80vw;
    height: 75dvh;
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    flex-direction: column;
}

/* Titre */
#popupBox h2 {
    margin-top: 6dvh;
    margin-left: 5vw;
    text-align: left;
    font-size: 4rem;
    text-transform: uppercase;
    color: #BF3E35;
    font-weight: bold;
}

/* Texte */
#popupBox h3 {
    text-align: left;
    text-transform: uppercase;
    color: #BF3E35;
    margin-left: 5vw;
    font-size: 3rem;
    font-weight: 500;
}

#popupBox p {
    text-align: left;
    color: black;
    margin-left: 5vw;
    font-size: 2.3rem;
    font-weight: 500;
}

/* Bouton de fermeture */
#popupClose {
    position: absolute;
    top: 25px;
    right: 50px;
    background: none;
    border: none;
    font-size: 9rem;
    color: #333;
    cursor: pointer;
}

/* Animation apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/*--------------------resultPage---------------------*/

#resultContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vw;
    height: 100dvh;
}

#resultPage {
    position: absolute;
    background-color: #E9D2BC;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top;
    width: 100vw;
    height: 100dvh;
}

.resultTxtTitle {
    font-size: 8.5dvh;
    font-weight: 500;
    height: 20dvh;
    width: 80vw;
    text-transform: uppercase;
    color: #BF3E35;
    background-image: url(./img/result-glow.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    display: flex;
    justify-content: center;
    align-items: center;
}

.resultTxtSubtitle {
    margin-top: -1dvh;
    font-size: 2.5dvh;
    width: 90vw;
    font-weight: 300;
    text-align: center;
    color: black;
    line-height: 1;
}

.resultSection {
    margin-top: 5dvh;
    width: 80vw;
}

.resultParaTitle {
    position: relative;
    font-size: 2dvh;
    font-weight: 300;
    text-transform: uppercase;
    color: #BF3E35;
    margin-bottom: 1dvh;
    margin-top: 1.6dvh;
    border-bottom: 0.2dvh solid white;
    /* ajoute une ligne blanche en bas */
}

.resultParaTitle::after {
    /*content: url(./img/down-arrow.png);*/
    position: absolute;
    right: 0;
    top: 0;
    content: '';
    display: inline-block;
    aspect-ratio: 1;
    height: 100%;
    transition: transform 0.2s ease;
    background-image: url(./img/down-arrow.png);
    background-size: contain;
}

.resultParaTitle.closed::after {
    transform: rotate(-90deg);
}

.resultParaTxt {
    font-size: 1.8dvh;
    font-weight: 300;
    color: black;
    line-height: 1;
    margin-bottom: 1dvh;
}

.ResultBtnContainer {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    top: 83dvh;
    width: 80vw;
    height: 13dvh;
    /*background-color: #BF3E35;*/
}

.ResultBtnText {
    background-color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    font-size: 4vw;
    color: #FFFFFF;
    border: none;
    letter-spacing: 0.7vw;
    text-transform: uppercase;
    text-align: center;
    font-weight: 500;
}

.ResultBtnImg {
    background-image: url(./img/resultBtnImg.png);
    width: 5vw;
    height: 5vw;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 2vw;
}

.ResultBtn {
    font-size: 3.5vw;
    border: 5px solid #BF3E35;
    border-radius: 173px;
    background: #BF3E35;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    width: 60vw;
    height: 5dvh;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    font-weight: 500;
    letter-spacing: 0.7vw;
    text-transform: uppercase;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#resultPageLogo {
    background-image: url(./img/little-logo-red.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 11dvh;
    margin-top: 5dvh;
}

/*---------------------QRCODEPage--------------*/
#qrCodePage {
    position: absolute;
    background-image: url(./img/qrcode-background.webp);
    background-position: bottom;
    background-size: cover;
    text-align: center;
    width: 100vw;
    height: 100dvh;
}

#qrCodePageContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#qrCodePageHighText {
    margin-top: 2dvh;
    font-size: 3.25dvh;
    font-weight: 500;
    color: #BF3E35;
    line-height: 1;
}

#qrCodePageLowText {
    margin-top: 6dvh;
    font-size: 3.5dvh;
    text-transform: uppercase;
    font-weight: 500;
    color: #BF3E35;
    line-height: 1;
}

#qrCodePage button {
    margin-top: 50dvh;
}

/* ------------test-slider------------- */
/* Conteneur (adaptable) */
.custom-slider {
    height: 70%;
    width: calc(100% - 5em);
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

/* Piste + style inspiré de ton CSS */
.custom-slider .track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    background: white;
    border-radius: 999em;
    overflow: visible;
    /* important */
}

/* Remplissage (progress) */
.custom-slider .fill {
    position: absolute;
    transform: translateX(-5vw);
    left: 0;
    top: 0;
    height: 100%;
    width: 50%;
    /* mis à jour en JS */
    border-radius: 999em 0 0 999em;
    background: #DD9995;
    pointer-events: none;
}

/* Thumb */
.custom-slider .thumb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #BF3E35;
    box-shadow: none;
    cursor: grab;
    z-index: 20;
    touch-action: none;
    /* garantit réception des pointermove sur tactile */
}

.custom-slider .thumb:active {
    cursor: grabbing;
}

/*-----------------Desktop Page-----------------*/
#desktopPage {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #E9D2BC;
    flex-direction: row;
}

#desktopPageLeftImg {
    background-image: url(./img/desktop-background.webp);
    width: 50vw;
    height: 100dvh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#desktopPageRightTxt {
    width: 50vw;
    height: 100dvh;
}

#desktopPageRightTxt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#desktopPageTitleImg {
    width: 35%;
    height: auto;
}

#desktopPageSeparator {
    margin-top: 7dvh;
    height: 0.5dvh;
    width: 45%;
    background-color: #BF3E35;
}

#desktopPageHighText {
    margin-top: 7dvh;
    font-size: 2.15vw;
    font-weight: 900;
    color: #BF3E35;
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
}

#desktopPageLowText {
    margin-top: 4dvh;
    font-size: 1.65vw;
    font-weight: 00;
    color: black;
    text-align: center;
    line-height: 1;
}

#desktopPageQrCode {
    margin-top: 4dvh;
    width: 22%;
    height: auto;
}

#OnMobile,
#OnDesktop {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (min-width: 700px) and (min-height: 600px) and (orientation: landscape) {

    #desktopPage,
    #OnDesktop {
        display: flex;
    }
}

@media (max-height: 700px) and (orientation: landscape) {

    #desktopPage,
    #OnMobile {
        display: flex;
    }
}