@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Text:ital@0;1&family=Outfit:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

*{
    margin: 0;
    padding: 0;
}

body{
    width: fit-content;
    position: relative;
    overflow-x: hidden;
    background-color: #fffcf8;
}

/* --- VP Verif --- */
.vp-verif{
    width: 100vw;
    height: 101vh;
    position: fixed;
    z-index: 200000;
    background-color: rgb(0,0,7);
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.error{
    color: white;
    font-family: "DM Serif Display";
    font-weight: 200;
    font-size: 5vw;
    text-align: center;
    width: 80%;
}

/* --- Intro --- */
.intro{
    width: 100vw;
    height: 101vh;
    background-color: rgba(0,0,0,0.90);
    position: absolute;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10%;
}

.intro .instructions{
    width: 55%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: space-between;
    color: white;
    font-size: 1.3rem;
    font-family: "DM Sans";
}

.instructions div{
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.instructions img{
    width: 50%;
}

.instructions .rotate{
    animation: rotateInfinite 20s linear infinite;
}

.intro button{
    border: solid 1px white;
    border-radius: 10px;
    width: 13%;
    height: 7%;
    font-family: "DM Serif Display";
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    color: white;
    transition: .3s;
}

.intro button:hover{
    background-color: white;
    color: black;
    transition: .4s;
}

.intro.hidden{
    opacity: 0;
    pointer-events: none;
    transition: .6s;
}

/* --- HOME --- */
.home{
    width: 100vw;
    height: 101vh;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: absolute;
    top:0;
    z-index: 50000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10%;
    clip-path: inset(0 0 0 0);
}

.home::before{
    content: '';
    position: absolute;
    z-index: 51;
    background: rgba(12,33,36, 0.58);
    width: 100%;
    height: 100%;
}

.home *{
    z-index: 100;
}

.home .hidden{
    opacity: 0;
}

.home h1{
    color: #71BDB9;
    font-size: 10rem;
    font-family: "DM Serif Display";
    font-weight: 100;
    text-align: center;
    position: absolute;
    top: 27%;
}

.entry-button{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 400px;
    border-radius: 100%;
    top: 42%;
    cursor: pointer;
    opacity: 1;
    pointer-events: none;
}

.entry-button.visible {
    pointer-events: auto; /* Activer les interactions lorsque l'élément est visible */
}

.entry-button div{
    position: absolute;
    width: 200px;
    height: 200px;
}

.entry-button img{
    animation: rotateInfinite 20s linear infinite;
    width: 100%;
    position: absolute;
}

.home.hidden{
    clip-path: inset(0 0 100% 0);
    /* transform: scale(5);
    opacity: 0; */
    transition: 0.6s;
    pointer-events: none;
}

.home video{
    position: absolute;
    width: 100vw;
    z-index: -5;
}

@keyframes fadeIn {
    0%{
        opacity: 0;
    }
    80%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

/* --- MENU ASIDE --- */

aside{
    width: 4.375rem;
    height: 100%;
    box-shadow: 0px 0px 4px 0px #000000;
    position: fixed;
    top: 0;
    background-color: #fffcf8;
    z-index: 70;
}

aside nav{
    height: 100%;
}

aside ul{
    height: 100%;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

aside a{
    color: black;
    text-decoration: none;
    font-family: "DM Serif Display";
    font-size: 1.5rem;
    cursor: pointer;
    transition: .2s;
}

aside a:hover{
    color:#71BDB9;
    transition: .2s;
}

/* --- MAIN CONTENT --- */

main{
    width: fit-content;
    position: relative;
}

.content{
    display: flex;
    height:  100vh;
    position: relative;
}

/* --- CHAPTER GENERAL --- */

.chapter-title{
    color: #71BDB9;
    font-size: 8rem;
    font-family: "DM Serif Display";
    font-weight: 100;
    position: absolute;
}

.chapter-img{
    position: absolute;
}

.chapter-video{
    position: absolute;
}

.chapter-text{
    position: absolute;
    font-size: 1.2rem;
    font-family: "DM Sans";
    width: 17%;
}

/* --- CHAPTER 1 --- */

#chapter1{
    position: relative;
}

#chapter1 .chapter-title{
    top: 8%;
    left: 20%;
    z-index: 3;
}

#chapter1 .chapter-video{
    position: absolute;
    width: 35%;
    top: 20%;
    left: 5%;
    z-index: 1;
}

.intro-text{
    position: absolute;
    top: 43%;
    z-index: 2;
    width: 20%;
    left: 42%;
    font-size: 1.2rem;
    font-family: "DM Sans";
}

.cnl-button{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 400px;
    border-radius: 100%;
    left: 51%;
    top: 13%;
    cursor: pointer;
    pointer-events: none; /* Désactiver les interactions par défaut */
    opacity: 0;
    transition: pointer-events 0s step-end, opacity 0.5s ease-in-out;
}

.cnl-button.visible {
    pointer-events: auto; /* Activer les interactions lorsque l'élément est visible */
}

.cnl-button .breath{
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #71BDB9;
    border-radius: 100%;
    transform: scale(0);
}

.cnl-button div{
    position: absolute;
    width: 200px;
    height: 200px;
}

.cnl-button img{
    animation: rotateInfinite 20s linear infinite;
    width: 100%;
    position: absolute;
}

@keyframes rotateInfinite{
    from{
        transform: rotate(0deg);
    }
    to{
        transform: rotate(360deg);
    }
}

.portraits{
    position: absolute;
    width: 100%;
    height: 75%;
    left: 68%;
    top: 10%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portrait{
    width: 25%;
    display: flex;
    align-items: center;
    gap: 3%;
}

.portrait h3{
    transform: translateY(-100%);
    z-index: 5;
    position: relative;
}

.portrait div{
    width: 70%;
}

.portrait p{
    width: 100%;
    font-family: "DM Sans";
    text-justify: auto;
    text-align:justify;
    opacity: 0;
    font-size: 1.2rem;
}

.portrait img{
    width: 100%;
    z-index: 10;
    position: relative;
}

.portrait h3{
    font-family: "DM Serif Display";
    font-weight: 100;
    font-size: 2rem;
    text-align: center;
    color: #71BDB9;
}

.portrait-matheo{
    transform: translateX(-10%);
}

.portrait-joseph{
    transform: translateX(20%);
}

/* --- CHAPTER CNL --- */
#chapter-cnl{
    width: 100vw;
    height: 100%;
    /* box-shadow: 0px 0px 4px 0px #000000; */
    border-bottom: #71BDB9 solid 5px;
    position: fixed;
    top: 0;
    background-color: #fffcf8;
    z-index: 5;
    /* clip-path: inset(0 0 100% 0); */
    transition: .8s;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
}

/* #chapter-cnl.opened{
    transform: translateY(0);
    transition: .8s;
} */

#chapter-cnl .chapter-title{
    position: absolute;
    color: #71BDB9;
    font-size: 6rem;
    font-family: "DM Serif Display";
    font-weight: 100;
    top: 4%;
    left: 30%;
    z-index: 3;
}

#chapter-cnl .chapter-video{
    position: absolute;
    width: 55%;
    top: 16%;
    left: 10%;
    z-index: 1;
}

#chapter-cnl>img{
    position: absolute;
    width: 15%;
    top: 56%;
    left: 62%;
    z-index: 5;
}

.exit-button{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 400px;
    border-radius: 100%;
    left: 70%;
    top: 16%;
    z-index: 20;
    cursor: pointer;
    opacity: 1;
}

.exit-button.visible {
    pointer-events: auto; /* Activer les interactions lorsque l'élément est visible */
}

.exit-button div{
    position: absolute;
    width: 200px;
    height: 200px;
}

.exit-button img{
    animation: rotateInfinite 20s linear infinite;
    width: 100%;
    position: absolute;
}

/* --- CHAPTER 2 --- */

#chapter2{
    position: relative;
}

#chapter2 .transition{
    width: 30%;
}

.transition{
    display: flex;
    align-items: center;
    height: 100%;
    margin-left: -2%;
}

.transition h2{
    position: relative;
    display: flex;
    font-size: 20rem;
    font-family: "DM Serif Display";
    color: #71BDB9;
}

.transition .e{
    font-size: 10rem;
    position: absolute;
    top: 8%;
    right: -17%;
}

#chapter2 .chapter-video{
    position: absolute;
    opacity: 1;
    width: 32%;
    top: 4%;
    left: 59%;
    z-index: 1;
}

#chapter2 .play-button{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 400px;
    border-radius: 100%;
    left: 68.5%;
    top: 24.5%;
    z-index: 20;
    cursor: pointer;
}

#chapter2 .play-button.visible {
    pointer-events: auto; /* Activer les interactions lorsque l'élément est visible */
}

#chapter2 .play-button div{
    position: absolute;
    width: 200px;
    height: 200px;
}

#chapter2 .play-button img{
    width: 100%;
    position: absolute;
}

#chapter2 .pause-button{
    position: absolute;
    display: none;
    justify-content: center;
    align-items: center;
    height: 150px;
    width: 150px;
    border-radius: 100%;
    left: 58.5%;
    top: 72%;
    z-index: 20;
    cursor: pointer;
}

#chapter2 .pause-button.visible {
    pointer-events: auto; /* Activer les interactions lorsque l'élément est visible */
}

#chapter2 .pause-button div{
    position: absolute;
    width: 100px;
    height: 100px;
}

#chapter2 .pause-button img{
    width: 100%;
    position: absolute;
}

#chapter2 .chapter-text{
    position: absolute;
    top: 23%;
    z-index: 2;
    width: 17%;
    left: 36%;
    font-size: 1.2rem;
    font-family: "DM Sans";
}

#chapter2 .chapter-title{
    top: 3%;
    left: 16%;
    z-index: 3;
    color: #717171;
}

#chapter2 .chapter-img{
    width: 16%;
    top: 35%;
    left: 18%;
}

.elit-button{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 400px;
    border-radius: 100%;
    left: 40%;
    top: 58%;
    z-index: 20;
    cursor: pointer;
    opacity: 0;
}

.elit-button.visible {
    pointer-events: auto; /* Activer les interactions lorsque l'élément est visible */
}

.elit-button div{
    position: absolute;
    width: 200px;
    height: 200px;
}

.elit-button img{
    animation: rotateInfinite 20s linear infinite;
    width: 100%;
    position: absolute;
    filter: grayscale(100%);
}

/* --- CHAPTER 3 --- */

#chapter3{
    position: relative;
}

#chapter3 .chapter-title{
    top: 70%;
    left: 8%;
    z-index: 3;
    transform: translateX(-5vw);
    color: #717171;
    pointer-events: none;
}

#chapter3 .chapter-video{
    position: absolute;
    width: 65%;
    top: 3%;
    left: 32%;
    z-index: 1;
}

/* CHAPTER 3 KEYWORDS */

#chapter3 .keywords{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0%;
    left: -2%;
    color: rgb(238, 238, 238);
    font-family: "DM Serif Display";
}

.keywords *{
    font-weight: 200;
    font-size: 12rem;
    position: absolute;
}

.keywords :nth-child(1){
    left: 0%;
    top: 6%;
}

.keywords :nth-child(2){
    left: 9%;
    top: 41%;
}

.keywords :nth-child(3){
    left: 60%;
    top: -6%;
}

.keywords :nth-child(4){
    left: 35%;
    top: 36%;
}

.keywords :nth-child(5){
    left: 5%;
    top: 67%;
}

/* --- CHAPTER 4 --- */

#chapter4{
    position: relative;
}

#chapter4 .chapter-title{
    top: 2%;
    left: 10%;
    z-index: 20;
}

#chapter4 #capsule4{
    top: 12%;
    left: 4%;
    width: 23%;
}

#chapter4 #capsule5{
    top: 3%;
    left: 29%;
    width: 28%;
}

#chapter4 #capsule6{
    top: 12%;
    left: 59%;
    width: 23%;
}

#chapter4 .end-title{
    color: #71BDB9;
    font-size: 8rem;
    font-family: "DM Serif Display";
    font-weight: 100;
    position: absolute;
    left: 89%;
    top: 35%
}

/* --- CHAPTER 4 CHAINS --- */
.chain{
    position: absolute;
    height: 200px;
    width: 200px;
    top: 40%;
}

.chain *{
    position: absolute;
}

.chain :nth-child(1){
    top: -30%;
    left: 3%;
    z-index: -1;
    width: 90%;
}

.chain :nth-child(2){
    z-index: 20;
}

.chain-1{
    left: 26%;
}

.chain-2{
    left: 56%;
}

/* --- CHAPTER CREDITS --- */
#chapter-credits{
    width: 50vw;
    position: relative;
    background-color: #71BDB9;
    color: #fffcf8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#chapter-credits .credits{
    width: 100%;
    height: 80%;
    top: 0%;
    color: #fffcf8;
    font-family: "DM Serif Display";
    font-size: 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-evenly;
}

#chapter-credits .chapter-title{
    position: relative;
    color: #fffcf8;
    font-size: 6rem;
}

#chapter-credits h3{
    font-weight: 100;
}

#chapter-credits p{
    font-family: "DM Sans";
}

/* --- CHAPTER ELIT --- */
#chapter-elit{
    width: 100vw;
    height: 100%;
    /* box-shadow: 0px 0px 4px 0px #000000; */
    border-bottom: #71BDB9 solid 5px;
    position: fixed;
    top: 0;
    background-color: #fffcf8;
    z-index: 5;
    /* clip-path: inset(0 0 100% 0); */
    transition: .8s;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
}

/* #chapter-cnl.opened{
    transform: translateY(0);
    transition: .8s;
} */

#chapter-elit .chapter-title{
    position: absolute;
    color: #71BDB9;
    font-size: 6rem;
    font-family: "DM Serif Display";
    font-weight: 100;
    top: 4%;
    left: 30%;
    z-index: 3;
}

#chapter-elit .chapter-video{
    position: absolute;
    width: 55%;
    top: 16%;
    left: 10%;
    z-index: 1;
}

#chapter-elit .chapter-text{
    left: 67%;
    top: 58%;
    width: 30%;
    z-index: 20;
}


#chapter-elit>img{
    position: absolute;
    width: 15%;
    top: 56%;
    left: 62%;
    z-index: 5;
}

.exit-button{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 400px;
    border-radius: 100%;
    left: 70%;
    top: 16%;
    z-index: 20;
    cursor: pointer;
    opacity: 1;
}

.exit-button.visible {
    pointer-events: auto; /* Activer les interactions lorsque l'élément est visible */
}

.exit-button div{
    position: absolute;
    width: 200px;
    height: 200px;
}

.exit-button img{
    animation: rotateInfinite 20s linear infinite;
    width: 100%;
    position: absolute;
}

.exit-button-2{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 400px;
    border-radius: 100%;
    left: 70%;
    top: 16%;
    z-index: 20;
    cursor: pointer;
    opacity: 1;
}

.exit-button-2.visible {
    pointer-events: auto; /* Activer les interactions lorsque l'élément est visible */
}

.exit-button-2 div{
    position: absolute;
    width: 200px;
    height: 200px;
}

.exit-button-2 img{
    animation: rotateInfinite 20s linear infinite;
    width: 100%;
    position: absolute;
}

/* --- EXAMPLE DIV --- */

.example-div{
    width: 100vw;
    height: 100%;
}

.example-div:nth-child(1){
    width: 150vw;
}

.example-div:nth-child(2){
    width: 170vw;
}

.example-div:nth-child(3){
}

.example-div:nth-child(4){
    width: 250vw;
}

.example-div:nth-child(5){
    background-color: orange;
}

/* --- PROGRESS BAR --- */

.progress-bar{
    transform: translateX(4.375rem);
    width: calc( 100vw - 4.375rem );
    background-color: #71BDB9;
    height: .8rem;
    z-index: 10;
    position: fixed;
    bottom: 0;
}

.progress-bar .buoys{
    transform: translateY(-85%);
    padding: 0 .5%;
    z-index: 0;
    position: relative;
}

.progress-bar .buoys :nth-child(1){
    margin-left: 0%;
}

.progress-bar .buoys :nth-child(2){
    margin-left: 21%;
}

.progress-bar .buoys :nth-child(3){
    margin-left: 21%;
}

.progress-bar .buoys :nth-child(4){
    margin-left: 15%;
}

.progress-bar .buoys :nth-child(5){
    margin-left: 36.5%;
}

.progress-bar .boat{
    margin-top: -0.25%;
    z-index: 30;
    width: 200px;
}

.boat{
    transform: translate( 0vw, -109%);
}

.boat img{
    width: 100%;
    height: 34.2px;
}

.boat p{
    clip-path: inset(500% 0px -400% 0px);
    transition: 0.3s;
    text-align: center;
    margin-bottom: 20%;
    font-family: "DM Serif Display";
    font-size: 1.1rem;
}

.boat p:after{
    content: "";
    position: absolute;
    top: 25%;
    left: 50%;
    width: 2px;
    height: 30%;
    background-color: black;
    border-radius: 1000px;
    z-index: 100;
}

.boat:hover p{
    transition: 0.3s;
    clip-path: inset(500% 0 100% 0);
}

p.displayed{
    transition: 0.3s;
    clip-path: inset(500% 0 100% 0);
}

@media screen and (min-width: 1024px) and (max-width: 1880px) {
    /* Vos styles CSS spécifiques pour les PC portables ici */
    .home h1{
        top: 23%;
    }
    
    .entry-button{
        top: 38%;
    }

    .chapter-title{
        color: #71BDB9;
        font-size: 6rem;
        font-family: "DM Serif Display";
        font-weight: 100;
        position: absolute;
    }
    
    .chapter-img{
        position: absolute;
    }
    
    .chapter-video{
        position: absolute;
    }
    
    #chapter1 .intro-text, .portrait p, #chapter2 .chapter-text, #chapter3 .chapter-text, #chapter-elit .chapter-text, #chapter-cnl .chapter-text{
        font-size: 1rem;
    }

    #chapter-credits .chapter-title{
        font-size: 4rem;
    }
    
    #chapter-credits h3{
        font-weight: 100;
        font-size: 1.4rem;
    }
    
    #chapter-credits p{
        font-size: 1rem;
        font-family: "DM Sans";
    }

    .elit-button{
        top: 53%;
    }

    .cnl-button{
        top: 6%;
    }

    #chapter-cnl .chapter-title, #chapter-elit .chapter-title{
        font-size: 4rem;
    }

    .exit-button, .exit-button-2{
        top: 10%;
    }

    .progress-bar .boat {
        margin-top: 1.75%;
    }

    .progress-bar .buoys{
        display: none;
    }
  }