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

body {
    font-family: "articulat-cf", sans-serif;
    font-weight: 600;
    font-style: normal;
    color: #251155;
    background-image: url(image/fond.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    /* Si l'image ne charge pas, alors couleur de fond */
    background-color: #CFC5EF;
    margin: 0;
}

/* Gradient CSS */
/*code curseur gradient => https://codepen.io/Iseyaaaaa/pen/qBMNEGN*/
.blob {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 650px;
    height: 650px;
    border-radius: 100%;
    background-image: linear-gradient(#1100ff 10%, #ff00f2);
    filter: blur(250px);
    transition: all 450ms ease-out;
    position: fixed;
    pointer-events: none;
    left: 0;
    top: 0;
    transform: translate(calc(-50% + 15px), -50%);
    z-index: -1;
}

/*  Étoiles filantes  */
/* J'ai utilisé cette vidéo pour réaliser les étoiles filantes sur l'animation du début : https://youtu.be/xDTiPkQeR2M?si=ixnbnNJLmo8rF4F8 */
#etoiles-filantes{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    animation: animateBg 50s linear infinite;
    z-index: 2;
}

@keyframes animateBg{
    0%,100%{
        transform: scale(1) ;
    }

    50%{
        transform: scale(1,2);
    }
}

span{
    position: absolute;
    top:50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.1), 0 0 0 8px rgba(255,255,255,0.1), 0 0 20px rgba(255, 255, 255, 1);
    animation: animate 3s linear infinite;
}

span::before{
    content: '';
    position: absolute;
    top:50%;
    transform: translateY(-50%);
    width:300px;
    height:1px;
    background: linear-gradient(90deg,#fff,transparent);
}

@keyframes animate{
    0%{
        transform: rotate(315deg) translateX(0);
        opacity:1; 
    }
    70%{
        opacity:1; 
    }
    100%{
        transform: rotate(315deg) translateX(-1000px);
        opacity:0; 
    }
}

span:nth-child(1){
    top:0;
    right:0px;
    left:initial;
    animation-delay:0s;
    animation-duration: 1s;
}

span:nth-child(2){
    top:0;
    right:80px;
    left:initial;
    animation-delay:0,2s;
    animation-duration: 3s;
}

span:nth-child(3){
    top:80px;
    right:0px;
    left:initial;
    animation-delay:0,4s;
    animation-duration: 2s;
}

span:nth-child(4){
    top:0px;
    right:180px;
    left:initial;
    animation-delay:0,6s;
    animation-duration: 1.5s;
}

span:nth-child(5){
    top:0px;
    right:400px;
    left:initial;
    animation-delay:0,8s;
    animation-duration: 2.5s;
}

span:nth-child(6){
    top:0px;
    right:600px;
    left:initial;
    animation-delay:1s;
    animation-duration: 3s;
}

span:nth-child(7){
    top:300px;
    right:0px;
    left:initial;
    animation-delay:1.2s;
    animation-duration: 1.75s;
}

span:nth-child(8){
    top:0px;
    right:700px;
    left:initial;
    animation-delay:1.4s;
    animation-duration: 1.25s;
}

span:nth-child(9){
    top:0px;
    right:1000px;
    left:initial;
    animation-delay:0.75s;
    animation-duration: 2.25s;
}

span:nth-child(10){
    top:0px;
    right:450px;
    left:initial;
    animation-delay:2.75s;
    animation-duration: 2.25s;
}

#intro {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    z-index: 10;
    overflow: hidden;
    transition: opacity 1s;
}

#intro.cache {
    opacity: 0;
    pointer-events: none; 
}

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

.chateau {
    width: 700px;
    z-index: 3; 
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 2s ease, transform 2s ease;
}

.chateau.apparait {
    opacity: 1;
    transform: translateY(0);
}

.intro-animation {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
    transition: opacity 1s ease;
    overflow: hidden;
}

/*Main et contenu  */

main {
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 0;
    min-height: auto;
    height: auto;
    overflow: visible;
    display: block;
  
}

.navigation{
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    justify-content: center;
    margin-bottom: 85px;
  }

.navigation ul{
    list-style: none;
    background-color: #D7CFF3;
    margin-top: 12px;
    margin-bottom: 0;
    border-radius:26px;
    width:904px;
    height: 60px;
    box-shadow: 0px 14px 15px rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    font-size: 1.1rem;
}

.navigation a {
    color: #702A84;
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding: 15px;
}

/*Animation au hover faite en CSS à partir du tuto "4. Text underline" : https://prismic.io/blog/css-hover-effects */
.hover-underline::after,
  .hover-underline::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #702A84, #917ebd);
    left: 0; 
    transform: scaleX(0);
    transition: transform 0.4s ease-out;
}
  
.hover-underline::after {
  bottom: 5px;
  transform-origin: right;
}

.hover-underline::before {
  top: 5px;
  transform-origin: left;
}

.hover-underline:hover::after,
.hover-underline:hover::before {
  transform: scaleX(1);
}

.navigation li{
    float: left;
}

.accueil-container{
    position: relative; 
    background: linear-gradient(180deg, #541067 0%, #BC98C6 100%);;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1; 
    border-radius: 42px;
    width: 1079px;
    height: 624px;
    margin: 0 auto 160px auto;
    border: solid #bb92c7 5px;
    box-shadow: 0px 25px 20px rgba(0, 0, 0, 0.25);
    top: -50px;
}

.chateau-lanterne{
    width: 485.20px;
    height: 685.57px;
    transform: translateX(10px) translateY(10px);; 
}

.txt-accueil{
    margin-left: 40px;
    margin-right: 45px;
    font-size: 1rem;
}

h1{
    font-family: "cofo-raffine", sans-serif;
    font-weight: 900;
    font-size: 3.2rem;
    margin: 0;
}

h2{
    font-family: "cofo-raffine", sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 10px;
}

.presentation{
    font-size: 1.1rem;
    margin: 0;
}

.peter-pan {
    position: absolute;
    bottom: 17%; 
    left: 45%;
    width: 280px;
    transform: translateX(-50%);
    z-index: 2; 
}

@media screen and (max-width: 1024px) {
    .accueil-container {
        width: 90%;            
        border-radius: 25px;
        top: 0;                  
        padding: 20px;
    }

    .chateau-lanterne {
        width: 485.20px;
        height: 800.57px;
        transform: translateX(0);
    }

    .txt-accueil {
        margin: 20px;
        font-size: 0.9rem;
        text-align : left;
    }

    .peter-pan {
        display: none;
    }
}

/* --------CSS Images Roi Lion--------*/
.img-container {
  position: relative;
  width: 100%;
  height: 500px; 
  overflow: hidden;
}

.img5 {
  width: 100%;
  height: 100%;
  
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0; 
}

.img {
  position: absolute;
  width: 150px;
  transition: transform 0.3s ease;
}

.img1 { top: 90px; left: 27%; z-index: 2; }
.img2 { top: 180px; left: 45%; z-index: 3; }
.img3 { top: 115px;  left: 63%; z-index: 2; }
.img4 { top: 20px;  left: 45%; z-index: 4; } 


/* GRAPHIQUE 1 MICKEY */

@media screen and (max-width: 1415px) {
  .container-mickey {
    display: flex;
    /* centre les graphiques */
    justify-content: center; 
    /* passage à la ligne si besoin */
    flex-wrap: wrap;   
    /* les centre horizontalement */
    align-items: center;  
    align-content: center;  
    width: 100%;             
  }

  .container-mickey svg {
    display: block;           /* enlève tout comportement inline étrange */
    margin: 0 auto;
    /* s’adapte à la largeur de l’écran */
    width: 700px; 
    /* garde les proportions */  
    height: 700px; 
  }
}
.titre-svg{
    font-family: "cofo-raffine", sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    fill: #251155;
}

/* svg {
    border: 1px solid red;
  } */

.mickey{
    width: 92%;        
    height: 92%;    
    /* opacity: 0.8;    */
    /* background-size: cover */
}

.container-mickey {
    display: flex;
    justify-content: space-between; /* espace max entre les deux SVG */
    width: 100%;
    position: relative;
    z-index: 2;
    overflow: visible;
    
    flex-wrap: wrap;
    /* espace avant la frise */
    /* margin-bottom: 100px;  */
}

.container-mickey svg {
  overflow: visible; /* évite de couper le dessin du graphique */
}

.droite {
    margin-right: 0;
    
}

.popup-mickey1 {
    position: absolute;
    background: rgb(209, 204, 204);
    border: 4px solid #710cff;
    border-radius: 6px;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    width: 228px;
    /* font-size: 14px; */
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 9999;
    display: none;

}

.popup-mickey1.popup-mickey-visible {
  display: block;
  opacity: 1;
}

.popup-mickey-visible {
    opacity: 1;
}

.arc-hover {
  stroke-width: 11 !important;       
  stroke: rgb(255, 255, 255);
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.8)); 
  transition: stroke-width 0.2s ease, filter 0.2s ease; 
}

/* rgb(167, 9, 240) */

/* Popup */
.popup-content {
  display: flex;
  align-items: center;
  gap: 7px;
}
.popup-content img {
  width: 110px;
  height: 130px;
  object-fit: cover;
  border-radius: 3px;
}
.popup-text {
  display: flex;
  flex-direction: column;
}
.popup-text p {
  margin: 2px 0;
}


/* Apparition arcs animation */
.container-mickey path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  opacity: 0;
  transition: stroke-dashoffset 1.5s ease-out, opacity 0.5s ease-out;
}
.container-mickey .arc-visible {
  stroke-dashoffset: 0;
  opacity: 1;
}


/* Amination sur le texte */
.text-film {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.text-film.text-visible {
  opacity: 1;
  transform: translateX(0);
}

/* --------Texte explicatif-------- */
.container-texte-explicatif{
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
}

.container-texte-explicatif hr{
    flex-grow: 1;
    border: solid 1px #702A84;
}

.texte-explicatif{
    background-color: #CFC5EF;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    max-width: 900px;
    margin: 100px auto;
    border-radius: 20px;
    box-shadow: 0 15px 15px 0 rgba(62, 3, 69, 0.25);
}

.texte-explicatif{
    height: 150px;
    height: auto;
}

.texte-explicatif p{
    max-width: 780px;
    padding: 0 20px;
    line-height: 1.8;
}


/* --------GRAPHIQUE 2 - FRISE CHRONOLOGIQUE--------*/
.frise-chrono{
    width: 456px;
    height: 3300px;
    margin: auto;
}

.explication-frise{
    position: relative;
    background-color: rgb(207, 204, 209);
    padding: 5px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 15px 15px 0 rgba(62, 3, 69, 0.25);
    margin-bottom: 130px;
}

.fee{
    position: absolute;
    transform: translateY(-50%);
    right: -50px;
    top: -10px;
}

.carrosse {
    width: 200px;
    height: auto;
    /* le carrosse ne détecte rien, les boutons sont détectatbles même au hover ainsi*/
    pointer-events: none;
}

.bouton-frise {
    border: none;
    background-color: transparent;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes tape-oeil{
    0%{
        transform: scale(1);
    }
    50%{
        transform: scale(1.40);
    }
    100%{
        transform: scale(1);
    }
}

.fleur-bouton{
    animation-name: tape-oeil;
    animation-duration: 2.5s;
    animation-iteration-count: infinite;
}

@media (prefers-reduced-motion: reduce) {
  .fleur-bouton {
    animation: none;
  }
}

.popup-fc {
    position: absolute;
    background-color: rgb(209, 204, 204);
    border: 4px solid #710cff;
    box-shadow: 0 15px 15px 0 rgba(62, 3, 69, 0.25);
    padding: 15px;
    border-radius: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    height: 240px;
    gap: 10px;
}

.bouton-gauche .popup-fc{
    right: 30px;
}

.bouton-droite .popup-fc{
    left: 30px;
}

.popup-visible {
    display: flex;
}

.popup-invisible {
    display: none;
}

.images-fc{
    border-radius: 8px;
}

.contenu-popup-fc{
    margin: auto 0;
    text-align: left;
    gap: 5px;
    font-size: 1rem;
    color: #0d0210;
}

.titre-film-fc{
    margin: 0;
    font-weight: 700;
    font-size: 1.2rem;
}

.contenu-popup-fc a{
    color: #3b18bb;
}

@media screen and (max-width: 1190px){
    .popup-fc{
        width: 270px;
        height: 185px;
    }
    .bouton-gauche .popup-fc{
    right: 20px;
    /* J'ai mis auto car ca bloquait autrement */
    left: auto;
    }

    .bouton-droite .popup-fc{
    left: 20px;
    right: auto;
    }
}

/* CSS DU COMPTEUR */
.compteur {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url("image/fond-compteur.jpg");
    background-position: bottom center;
    background-size: cover;
    background-repeat: no-repeat;
}

.walt {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 380px;
}

.flocon {
    position: absolute;
    top: 15%;
    left: 47%;
}

.compteur p{
    position: absolute;
    top: 63%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white; 
    font-size: 1.5rem; 
    text-align: center;
}

.annee{
    font-family: "articulat-cf", sans-serif;
    font-weight: 200;
    font-style: normal;
    font-size: 2.6rem;
}

.counter {
    position: absolute;
    left: 51%;      
    top: 37%;           
    transform: translateX(-50%);
    font-size: 7rem;
    font-weight: bold;
    color: #fff; 
    text-align: center;
    margin-top: 20px;
}

.courbe-masque {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;      
    height: 100%;  
    overflow: hidden; 
    animation: reveler-courbe 5s ease-out forwards 5s; 
}

.courbe {
    display: block;
    width: 100vw; 
    height: 100%; 
    position: absolute; 
    bottom: 0;
    left: 0;
    opacity: 0.50;
}

.button-courbe{
    font-family: "articulat-cf", sans-serif;
    font-weight: 600;
    margin-bottom: 0;
    font-size: 1.1rem;
    border-radius: 20px;
    border: none;
    padding: 15px;
}

.button-courbe:hover{
    background-color: #79797a;
}

.popup-courbe {
    transform: translateY(-95%);
    justify-content: center; 
    align-items: center;
    background-color: #CFC5EF;
    border-radius: 20px;    
    width: 1100px; 
    height: 600px;
    padding: 20px;
    box-shadow: 0px 20px 60px rgba(0, 0, 0, 0.45);
}

.popup-fermer {
    position: absolute; 
    top: 15px;
    left: 15px;
    border-radius: 10px;
    border: none;
    width: 25px;
    height: 25px;
    background-color: #702A84;
    color: #D7CFF3;
}

.content-popup{
    display: flex;
}


.container-text{
    font-size: 1rem;
    font-family: "articulat-cf", sans-serif;
    font-weight: 600;
    font-style: normal;
    text-align : left;
    columns: 2;
    gap: 30px;
    color: #120334;
    margin-bottom: -50px;
    transform: translateY(-65%);
}

.image-graphique {
   margin-bottom: 50px;
}

@media screen and (max-width: 1190px) {
    .popup-courbe {
        width: 900px; 
        max-width: 95%; 
        height: 600px; 
    }
    

    .image-graphique img {
        max-width: 400px; 
        width: auto;
    }
}


/* FOOTER*/
footer {
    width: 100%;
    height: 154px;
    background-color: #120334;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px; 
}

footer a {
    color: white;
    text-decoration: none;
}