@font-face {
    font-family: "FlextReg";
    src: 
    url("../css/fonts/Regular.woff2") format("woff2");
  }

  @font-face {
    font-family: "FlextLig";
    src: 
    url("../css/fonts/Light.woff2") format("woff2");
  }

  @font-face {
    font-family: "FlextBld";
    src: 
    url("../css/fonts/Bold.woff2") format("woff2");
  }

  @font-face {
    font-family: "FlextMed";
    src: 
    url("../css/fonts/Medium.woff2") format("woff2");
  }

html{    
    
    width :100%;
    height: 100%;}

body {
    overflow: hidden;
    width :100%;
    height: 100%;
    background-color: #fafaf5;
    color : rgb(0, 20, 60);
    font-family: "FlextLig", sans-serif;
    font-size: 18px;
    font-optical-sizing: auto;
    font-style: normal;
}

.header{
    padding: 40px;
    width :100%;
    height: 200px;
    font-style: normal; 
}

h1{
    padding:10px;
}

.popup {
    width: 400px;
    height: auto;
    padding : 10px 20px 10px 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, .1);
    position: absolute;
    bottom: 5vh;
    z-index: 10;
    left: 2vw;
    border-radius: 15px;
    background-color: white;
}

/* NAV */

.game_container{
    width: 90%;
    height: 90%;
    z-index: 2;
    position: absolute;
    margin: auto;
    inset:0;
    display: flex;
    flex-direction: row;
}

.game_nav{
    height: 720px;
    z-index: 3;
    width: 75px;
    position: absolute;
    top: 0;
    left:-75px;
    background-color: #eee;
}

#game{
    border-radius: 2vw;
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: rgb(255, 255, 255);
    gap: 20vw;
    display: flex;
    align-items: end;
    justify-content: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* SETTINGS */


  .settings-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
  }
  
  .settings-popup {
    color: #9e9f9f;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #212121;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);

    position: absolute;
    z-index: 999;
    width: 30%;
    padding: 4vw;
    border-radius: 35px;
  }

  .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
  }

  .popup-background {
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 998; /* Ajustez la valeur en fonction de votre mise en page */
  }

  .settings-popup div:hover{
    transition: 0.25s;
    color:#D9D9D9;
  }

/* DIALOGUES */

#dialogsMenu{     
    z-index: 9;
    width: 40%;
    height: 100%;
    position: absolute;}


#dialogue-box{
width: 80%;
z-index: 9;
position: absolute;
right: 0;
left: 0;
margin: auto;
bottom: 3vw;
}

.dialogsSpeaker{
    margin : 1vh 0;
    padding: 1vw 2vw;
    background-color: white;
    border-radius: 2vw;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, .1);
}

.speaker{
    font-family: "FlextBld", sans-serif;
    display: flex;
    gap : 0.5vw;
}

.speaker-image{
    width: 50px;
    height: 100%;
}

.speaker-container {
    display: flex;
    align-items: center;
    gap: 10px;}

.response {   
    display: flex;
    margin: 0.5vh 0; 
    background-color: rgb(255, 255, 255);
    padding: 1.5vh 2vw;
    min-width: 10%;
    max-width: 45%;
    border-radius: 2vw;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, .2);
}

.response:hover{ 
    background-color: white;
    animation: responseHoverLengh 0.4s 0s ease-in-out forwards;
}

@keyframes responseHoverLengh {
    from { max-width: 45%;}
    to { min-width: 45%;
        max-width: 50%;}
}

@keyframes fadeUp {
    from { opacity: 0;}
    to { opacity: 1;}
}

@keyframes fadeDown {
    from { opacity: 0;}
    to { opacity: 1;}
}

.response:hover .hover-span{
    font-family: 'FlextMed', sans-serif;
    font-weight: bold;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}



.response .hover-span img {
    display: none;
  }
  
  .response:hover .hover-span img {
    margin-left: 10px;
    width: 1vw;
    height: 1vw;
    animation: fadeUp 0.2s 0s ease-in-out forwards;
    display: inline; /* ou display: inline-block; selon vos besoins */
    /* Ajoutez ici des styles pour styliser l'image au survol */
  }

.responses-container{
    flex-direction: column;
    display: flex;
}

.last-response {   
    color: rgba(0, 0, 0, 0.5);;
    display: flex;
    margin: 0.5vh 0; 
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1.5vh 2vw;
    min-width: 10%;
    max-width: 100%;
    border-radius: 2vw;

    animation: responseIn 0.5s 0s ease-in-out forwards;
}

@keyframes responseIn {
    from { 
        opacity: 0;
        transform: translateY(2vh);
    }
    to { opacity: 1;
        transform: translateY(0);
    }
}

@keyframes responseOut {
    from { 
        opacity: 1;
        transform: translateY(0);
    }
    to { opacity: 0;
        transform: translateY(-2vh);
    }
}

@keyframes menuHover {
    from { 
        opacity: 1;
        transform: scale(1);
    }
    to { opacity: 0.9;
        transform: scale(1.05);
    }
}



.speaker-text{    
    width: 20px;
    text-transform: capitalize;
    font-weight: 800;
    color: #898989;
    font-size: 21px;}

#episode-screen{
    z-index: 11;
    position: absolute;
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
    width: 100%;
    height: 100%;
    border-radius: 2vw;
    background-color: #D9D9D9;
}

.locked-episode{
    background-color: black;
    animation-name : fadeInLocked!important;
}

.locked-episode:hover{
    height: 80%!important;
}

.locked-episode:hover .cta-episode{
    width: 90%!important;
    background-color: rgba(255, 223, 141, 0)!important;
    border: black 1px solid!important;
    bottom: -18vw!important;
}

.episode-block{
    color: white;
    margin-top: 2.5%;
    border-radius: 30px;
    height: 80%;
    width: 30%;
    display: flex;
    background-size: cover;
    background-position: center;
    flex-direction: column;
    height: 80%; /* État initial */
    transition: height 0.25s ease-in-out; /* Animation de transition */
}

#episode-1{
    background-image: url('../img/episodes/eptemp.jpg');
        opacity: 0;
    animation : fadeIn 0.5s 0s ease-in-out forwards;
}

#episode-1 .locked-episode{
    background-image: url('../img/episodes/eptemp.png');
    opacity: 0;
    animation-duration: 0.5s;
    animation-delay: 0;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}


#episode-2{
    background-image: url('../img/episodes/ep2.jpeg');
    opacity: 0;
    animation : fadeIn 0.5s 0.2s ease-in-out forwards;
}

#episode-2 .locked-episode{
    background-image: url('../img/episodes/eptemp.png');
    opacity: 0;
    animation-duration: 0.5s;
    animation-delay: 0;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

#episode-3{
    background-image: url('../img/episodes/ep3.jpeg');
    opacity: 0;
    animation : fadeIn 0.5s 0.4s ease-in-out forwards;
}

#episode-3 .locked-episode{
    background-image: url('../img/episodes/eptemp.png');
    opacity: 0;
    animation : fadeInLocked 0.5s 0.4s ease-in-out forwards;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(-2vh);
    }
    to { opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLocked {
    from { 
        opacity: 0;
        transform: translateY(-2vh);
    }
    to { opacity: 0.2;
        transform: translateY(0);
    }
}


.episode-mission-to-unlock{
    width: 30%;
}

.show-episode-button{
    position: relative;
    transform-origin: center;
    padding: 1.5vw;
    z-index: 10;
    height: 3.5%;
    margin: 2vw;
    border-radius: 1vw;
    background-color: white;
}

.show-episode-button:hover{
    animation: menuhiver 0.5s 0s ease-in-out forwards;
    transform-origin: center;
    position: relative;
    padding: 1.6vw;
    height: 3.5%;
    margin: 2vw;
    border-radius: 1vw;
    background-color: white;
}

.clear-memory-button{
    position: absolute;
    z-index: 12;
    bottom: 2vh;
    right: 2vw;
}

.episode-unlocked-popup{
    position: absolute;
    z-index: 20;
}

.mission-1,.mission-2,.mission-3{
    text-align: left;
    padding: 1vw;
    margin: 0.5vw;
    background-color: white;
    border-radius: 0.5vw;
}

.episode-block .episodeTitle{
    margin-top: 3vh;
    padding: 0.5vh 3vh;
}

.episode-block .episodeText{
    font-size: 32px;
    padding: 0 3vh;
    font-family: 'FlextBld';
}

.episode-mission-to-unlock{
    position: relative;
    bottom: -52vh;
    left: 2vw;
    display: flex;
    flex-direction: row;
}

.scene-options{
    position: absolute;
    right: 1vw;
}

.episode-unlocked-popup{
    position: absolute;
    top: 7vh;
    right: 7vw;
    background-color: white;
    padding: 1.5vh 4vw;
    border-radius: 4vh;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, .1);
    animation-name: responseIn,responseOut;
    animation-duration: 0.7s;
    animation-delay: 0s ,2.3s;
    animation-timing-function:  ease-in-out;
    animation-fill-mode: forwards;
}

.cta-episode{
    background-color: rgba(255, 223, 141, 0);
    color: black;
    font-size: 24px;
    position: relative;
    border: black 1px solid;
    width: 90%;
  
    transition: width 0.25s ease-in-out, background-color 0.1s ease-in-out; /* Animation de transition */
 
    left: 0;
    margin: auto;
    right: 0;
    padding: 1vw 2vh;
    bottom: -18vw;
    display: flex;
    justify-content: space-between;
    border-radius: 2vw;
}

.episode-block:hover{
    transform-origin: center;
    height: 90%;
    animation-name: episodeHeight;
    animation-duration: 0.25s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

.episode-block:hover .cta-episode{
    border: black 0px solid;
    background-color: rgba(255, 223, 141, 1);
    width: 75%;
    animation-name: ctaEpWidth, ctaEpColor;
    animation-duration: 0.25s, 0.1s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}


@keyframes episodeHeight {
    from { 
        height: 80%;
    }
    to {
        height: 90%;
    }
}

@keyframes ctaEpColor {
    from { 
        background-color: rgba(255, 223, 141, 0);
        border: black 1px solid;
    }
    to {
        background-color: rgba(255, 223, 141, 1);
        border: black 0px solid;
    }
}


@keyframes ctaEpWidth {
    from { 
        width: 90%;
        bottom: -18vw;
    }
    to {
        width: 75%; 
        bottom: -15vw;
    }
}

.loadingScreen{
    width: 100%;
    height: 100%;
    z-index: 12;
    position: absolute;
    background-color: white;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 2vw;
    background-color: #D9D9D9;
}

.loadingContainer{
    color: #D9D9D9;
    background-color: #16161E;
    width: 75%;
    padding: 8vh 0;
    border-radius: 1.5vw;
    display: flex;
    justify-content: space-evenly;
    opacity: 0;
    animation : fadeIn 0.5s 0s ease-in-out forwards;
}

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

.loadingInfo .episodeTitle{
    font-size: 30px;
    padding: 0.5vh 0;
}

.loadingInfo .episodeText{
    font-size: 50px;
    padding: 0;
    font-family: 'FlextBld';
}

.episodeLoading{
    margin-top: 50px;
}

.loadingMissions{
    display: flex;
    gap: 40px;
    margin-top: 25px;
}

.episodeMissionLoading{
    background-image: url(img/missions/mission-1.png);
    height: 70px;
    width: 70px;
    border: 1px solid white;
    border-radius: 15px;
}