/*
Theme Name: Hello Elementor Child
Description: Thème enfant pour le site Les Chroniques d'Elias.
Author: Ton Nom
Template: hello-elementor
Version: 1.0.0
*/

/*
"Call to Adventure" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
http://creativecommons.org/licenses/by/4.0/

"Thunderbird" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
http://creativecommons.org/licenses/by/4.0/
*/
header, .elementor-location-header {
    position: relative;
    z-index: 999; /* Doit être supérieur au splash-screen */
}
:root {
    /* Couleurs */
    --color-bg: #000000;
    --color-text-main: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.981);
    --color-gold: #ffcc00;
    --color-accent: #8b0000; /* Rouge réservation */
    --color-bleuLogo: #20868e;
    
    /* Polices */
    --font-header: 'Cinzel', serif;
    --font-body: 'Poppins', sans-serif;
    
    /* Paramètres de l'expérience */
    --transition-speed: 0.1s;
    --card-bg: url('images/oldPaper.jpg');
}
/* style.css */

/* Bloque le défilement */


body, html {
    margin: 0;
    padding: 0;
    background-color: #000;
    overflow-x: hidden;
    height: 1000vh;
}

/* Bloque l'interaction et cache la barre de défilement */
html.no-scroll, body.no-scroll {
    overflow: hidden !important;
    height: 100% !important;
    position: fixed !important; /* Indispensable pour supprimer l'ascenseur */
    width: 100%;
}

#splash-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    background: #000;
    z-index: 10000;
    align-content: center;
    justify-content: center;
    flex-direction: column;
    flex-wrap: nowrap;
}

.splash-content {
    display: flex;
    flex-direction: column; /* Aligne logo, chiffre et bouton les uns sous les autres */
    align-items: center;    /* Centre chaque enfant horizontalement */
    text-align: center;
    gap: 20px;      
}

.splash-title {
    text-align: center;
    color: white;
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    margin-bottom: 20px;        
    margin-top: 20px;
    
}

.splash-logo {
    width: 350px;
    margin-bottom: 20px;
    /*animation: pulse 2s infinite;*/
}

#countdown {
    font-size: 1.5rem;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

#enter-site {    
    background-image: url(images/bouton-entrer.jpg);
    background-size: cover;   
    cursor: pointer;
    transition: all 0.3s;
    width: 300px;
    height:140px;
     border-radius: 10px;
    border-style: none;
}

#enter-site:hover {
   
    box-shadow: 0 0 40px var(--color-bleuLogo);
    border-radius: 10px;
    border-style: none;
}

/* style.css */
#enter-site.fade-in {
    animation: fadeInButton 0.8s ease-out forwards;
}

@keyframes fadeInButton {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* On s'assure que le bouton réagit au survol même si c'est une image */
#enter-site:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}


.sound-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ffcc00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999; /* Toujours au-dessus */
    transition: all 0.3s ease;
    user-select: none;
}

.sound-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px #ffcc00;
}

#sound-icon {
    font-size: 20px;
    color: #ffcc00;
}

/*********************************/
.scroll-indicator {
   position: fixed; /* Reste fixe à l'écran */
    bottom: 30px;    /* Toujours à 30px du bas */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    z-index: 9999;   /* Au-dessus de tout le reste */
    opacity: 1;      /* Visible au départ */
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.scroll-indicator p {
    color: #ffcc00;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid #ffcc00;
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: #ffcc00;
    border-radius: 2px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% { top: 5px; opacity: 1; }
    100% { top: 25px; opacity: 0; }
}



/* On cache le scroll pendant la splash screen */
body.locked {
    overflow: hidden;
}

.chroniques-intro {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.layer {
    position: fixed;
    top: 0;
    height: 100vh;
    background-repeat: no-repeat;
    will-change: transform; /* Optimisation performance */
}

/* Le tunnel au fond avec transition d'échelle */
.background-tunnel, .deep-tunnel {
    position: fixed;
    top: 0;
    left: 50%; /* Très important */
    width: 100vw;
    height: 100vh;
    background-position: center;
    background-size: cover;
    /* On initialise le transform pour éviter les sauts visuels */
    transform: translateX(-50%) scale(1); /* Départ normal */
    transform-origin: center center; /* Centre du zoom */
    will-change: transform; /* Aide la fluidité */
}

.deep-tunnel {  
    position: fixed;
    z-index: 1;
    opacity: 0;
    width: 100%;
    height: 100vh;
}

.background-tunnel {
    z-index: 2;
    transform-origin: center center; /* Le zoom se fait vers le centre du tunnel */
    will-change: transform; /* Prévient les saccades durant le zoom important */
    backface-visibility: hidden;
}

/* Augmentez la zone de scroll pour rendre l'animation plus fluide */
.content-spacer {
    height: 900vh; 
}
.wall-left {
    z-index: 3;
    width: 65%; 
    left: 0;
    top: 0%;
    background-size: contain;
    background-position: left center;
}

.wall-right {
    z-index: 3;
    width: 65%;
    right: 0%;
    top: 0%;
    background-size: contain;
    background-position: right bottom;
}

.logo-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 30vw;
    max-width: 450px;
}

.main-logo {
    width: 100%;
    height: auto;
    display: block;
}

.content-spacer {
    height: 250vh; /* Augmenté pour un zoom plus lent et détaillé */
}

.elias-card-fixed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.1); /* Très petit au début */
    z-index: 11; /* Juste au dessus du logo */
    opacity: 0;
    display: flex;
    align-items: center;
    width: 80vw;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.8);
    background-image: url(images/oldPaper.jpg);
    background-size: cover;
    padding: 30px;
    border-radius: 10px;
    pointer-events: none; /* Évite de gêner le scroll */
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}


.reveal-content { 
    flex: 1; 
    padding-right: 30px; 
    color:  var(--color-text-main);
}

.reveal-title { 
    font-family: var(--font-header);
    font-weight: 700; /* Gras pour le titre */
    text-transform: uppercase; /* Optionnel : renforce le look épique */
    letter-spacing: 2px;
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--color-text-main); }
.reveal-text { 
    font-family: var(--font-body);
    font-weight: 300; /* Plus léger pour un aspect élégant */
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text-main);
}
.reveal-image img { 
    width: 350px; 
    border: none; }

/* --- Video --- */
    
#container {
    overflow: hidden;
    position: absolute;
    transform: translate(-50%, -50%);
    left: 50%; 
    top: 50%;
    width: 350px;
    height: 622px; /* Ratio 16:9 vertical */
    box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
    filter: sepia(30%);
    border: solid 6px #222;
    background: black;
    z-index: 10;
}

#container {
    opacity: 0; /* Caché au début */
    position: fixed; /* Reste au centre pendant le scroll de la Phase 3 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Ne bloque pas le scroll tant qu'il n'est pas visible */
    transition: opacity 0.3s ease;
}

#pic, .pic {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Important pour que la vidéo remplisse bien le cadre */
    opacity: 0.7;
}

#container:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    box-shadow: inset 0px 0px 150px 40px black; /* Augmenté pour plus de profondeur */
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 10; /* S'assure que l'ombre est devant les vidéos */
}

.line{
  position:absolute;
  height:100%; width:1px;
  opacity:0.1;
  background-color:#000;
}

/* ajout effet bg noise*/

.main-content {
    overflow: hidden;
    position: fixed; /* Changez relative par fixed */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: column;
    /* Supprimez le gradient s'il crée un décalage visuel avec le tunnel */
    background: transparent; 
    z-index: 5; /* Doit être au-dessus des tunnels mais sous la carte Elias */
    pointer-events: none; /* Laisse passer le scroll au début */
}

.vignette{
  position:absolute;
  width:100%; height:100%;
  box-shadow:inset 0px 0px 150px 20px black;
  mix-blend-mode: multiply;
  -webkit-animation: vignette-anim 3s infinite; /* Safari 4+ */
  -moz-animation:    vignette-anim 3s infinite; /* Fx 5+ */
  -o-animation:      vignette-anim 3s infinite; /* Opera 12+ */
  animation:         vignette-anim 3s infinite; /* IE 10+, Fx 29+ */
}

.noise {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    
    width: 100%;
    height: 100%;
    
    pointer-events: none;
    opacity: .15;
}

.line{
  position:absolute;
  height:100%; width:1px;
  opacity:0.1;
  background-color:#000;
}

.titleCont{position:relative;}

.main-title {
    padding: .3em 1em .25em;    
    font-weight: 400;
    font-size: 40px;
    color: white;
    font-family: var(--font-header);
    position:relative;
    line-height:1.3;
    white-space: normal;
}

.overTitle{
    position:absolute;
    top:0;
    left:0;
}

.dot{
  width:3px;
  height:2px;
  background-color:white;
  position:absolute;
  opacity:0.3;
}

#play-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3); /* Léger voile sombre sur la vidéo */
    cursor: pointer;
    transition: opacity 0.5s ease;
}

#play-icon {
    width: 120px; /* Ajuste la taille selon ton image */
    filter: drop-shadow(0 0 15px rgba(0, 162, 255, 0.5)); /* Rappelle la lueur bleue des runes */
    animation: pulse-artifact 2s infinite ease-in-out;
    transition: transform 0.3s ease;
}

#play-icon:hover {
    transform: scale(1.1);
}


/* --------------- */


/* --- 5. L'iframe YouTube remplit toujours son container --- */
#pic-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* la carte info */
.info-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -150%); /* Cachée en haut par défaut */
    width: 85vw;
    max-width: 1000px;
    background: url('images/oldPaper.jpg') no-repeat center center / cover;
    padding: 30px;
    border-radius: 10px;
    opacity: 0;
    z-index: 100;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.info-layout { display: flex; gap: 30px; align-items: center; }

.info-image img { width: 400px; height: auto; border-radius: 5px; }


.info-title { 
     font-family: var(--font-header);
     font-size: 1.5rem; }
.info-text { 
    font-family: var(--font-body);
    font-size: 1.1rem; }

.btn-reservation {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 30px;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    font-family: var(--font-header);
    border-radius: 5px;
    transition: background 0.3s;
}
.btn-reservation:hover {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 30px;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    font-family: var(--font-header);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 42, 0, 0.4);
    transition: box-shadow 0.3s;
}

/* derniere étape CTA */
.final-cta {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 100%;
    text-align: center;
    opacity: 0;
    z-index: 110;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}

.cta-subtitle { 
    font-family: var(--font-body); 
    color: #ccc; 
    font-size: 1.2rem; 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    margin: 30px ; 
}
.cta-title { 
    font-family: var(--font-header); 
    color: white; 
    font-size: 2.5rem; 
    margin: 30px ; 
}
.btn-allons-y { 
    display: inline-block;
    padding: 20px 50px;
    background: var(--color-accent);
    color: rgb(255, 255, 255);
    font-weight: bold;
    text-decoration: none;
    font-family: var(--font-header);
    font-size: 1.5rem;
    border-radius: 5px;
}
.btn-allons-y:hover { 
    display: inline-block;
    padding: 20px 50px;
    background: var(--color-accent);
    color: rgb(255, 255, 255);    
    box-shadow: 0 0 20px rgba(255, 42, 0, 0.4);
    
}
.cta-footer { 
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--color-text-main); 
    margin: 30px; 
    font-weight: 200;
    }

.video-controls {
    z-index: 9999 !important;
    pointer-events: auto !important;
}
.pause-button, .unmute-button {
    padding: 10px; 
    cursor: pointer; 
    background: rgba(0,0,0,0.5); 
    color: rgba(255, 255, 255, 0.325); 
    border: 1px solid rgba(255,255,255,0.3); 
    border-radius: 5px;
}


/* --- 2. CONFIGURATION DESKTOP (PC) --- */
@media (min-width: 951px) {
    .wall-left, .wall-right {
        width: 50%; /* Largeur exacte pour éviter le chevauchement */
        height: 100vh;
        background-size: cover;
    }

    .wall-left { left: -20%; background-position: right center; }
    .wall-right { right: -20%; background-position: left center; }

    .elias-card-fixed {
        width: auto;
        height: 40vh; /* La hauteur que vous avez demandée */
        max-width: 800px;
        flex-direction: row;
        padding: 30px;
    }

    .reveal-image img {
        height: 40vh;
        width: auto;
    }

    .reveal-title { font-size: 1.1rem; }
    .reveal-text { font-size: 1rem; }

    #container {
        width: 300px;  /* Taille réduite pour le bureau */
        height: 533px;
    }
}

/* --- 3. CONFIGURATION MOBILE PORTRAIT --- */
@media (max-width: 768px) and (orientation: portrait) {
    /* 0. Splash Screen */
    .splash-title {       
        font-size: 1.5rem;
        margin-bottom: 20px;        
        margin-top: 20px;        
    }

    .splash-logo {
        width: 300px;
        margin-bottom: 10px;
        /*animation: pulse 2s infinite;*/
    }

    #countdown {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    #enter-site {           
        width: 300px;
        height:140px;
        border-radius: 10px;
        border-style: none;
    }

    

    /* 1. Arrières-plans : On utilise 'height: 100vh' et 'width: auto' pour ne pas écraser l'image */
    .background-tunnel, .deep-tunnel {
        width: 100vw;
        height: 100vh;
        background-size: cover; /* Important pour remplir tout l'écran vertical */
        background-position: center;
        transform: translateX(-50%) scale(1); /* Départ normal */
        transform-origin: center center; /* Centre du zoom */
        will-change: transform; /* Aide la fluidité */
    }

    /* 2. Murs : Plus larges pour bien couvrir les bords en portrait */
    .wall-left { 
        left: -70%; 
        width: 80%;
    }
    .wall-right { 
        right: -70%; 
        width: 80%;
    }

    /* 3. Carte Elias : Passage en mode VERTICAL (Texte en haut, Image en bas) */
    .elias-card-fixed {
        flex-direction: column; /* On empile ! */
        align-items: center;
        justify-content: center;
        height: auto; 
        max-height: 90vh;
        width: 90vw;
        padding: 20px;
        text-align: center;
    }

    .reveal-content {
        flex: none;
        padding-right: 0;
        margin-bottom: 20px;
    }

    .reveal-title { 
        font-size: 1.8rem; 
        margin-bottom: 10px; 
    }

    .reveal-text { 
        font-size: 1.1rem; 
    }

    .reveal-image img {
        height: auto;
        width: 100%; /* Prend toute la largeur disponible */
        max-height: 40vh; /* Limite la hauteur pour laisser de la place au texte */
        object-fit: contain;
    }

    /* 4. Conteneur Vidéo : On base la largeur sur 90vw (largeur écran) */
    #container {
        width: 95vw; 
        height: 90vh; /* Maintient le ratio 16:9 */
        max-height: 90vh;
        top: 50%;
        left: 50%;
    }

    /* 5. Carte Info (Fin de parcours) : Passage en VERTICAL aussi */
    .info-card {
        width: 90vw;
        height: auto;
        max-height: 85vh;
        padding: 20px;
    }

    .info-layout {
        flex-direction: column; /* On empile ! */
        gap: 20px;
    }

    .info-image img {
        width: 100%;
        height: auto;
        max-height: 35vh;
    }

    .info-title { font-size: 2rem; }
    .info-text { font-size: 1.5rem; }

    /* 6. Logo au démarrage */
    .logo-container {
        width: 80vw; /* Basé sur la largeur en portrait */
        z-index: 15;
    }

    /* Ajustement des contrôles vidéo pour mobile */
    .video-controls {
        bottom: -60px; /* Place les boutons sous la vidéo car plus de place en hauteur */
        width: 100%;
        justify-content: center;
        gap: 20px;
    }
}

/* --- 4. CONFIGURATION MOBILE PAYSAGE (LANDSCAPE) --- */

@media (max-height: 500px) and (orientation: landscape) {

    .splash-title {       
        font-size: 1.5rem;
        margin-bottom: 20px;        
        margin-top: 20px;        
    }

    .splash-logo {
        width: 150px;
        margin-bottom: 10px;
        /*animation: pulse 2s infinite;*/
    }

    #countdown {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    #enter-site {           
        width: 150px;
        height:70px;
        border-radius: 10px;
        border-style: none;
    }


    /* 1. Arrières-plans : On s'assure qu'ils sont fixés et visibles */
    .background-tunnel, .deep-tunnel {
        position: fixed;
        top: 0;
        left: 50%;
        width: 100vw;
        height: 100vh;
        transform: translateX(-50%);
        background-size: cover;
        background-position: center;
        z-index: 1; /* Tout au fond */
        display: block !important;
        transform: translateX(-50%) scale(1); /* Départ normal */
        transform-origin: center center; /* Centre du zoom */
        will-change: transform; /* Aide la fluidité */
    }

    /* 2. Murs : Devant les fonds */
    .wall-left, .wall-right {
        z-index: 5;
        height: 100vh;
        background-size: contain;
    }
    .wall-left { left: -40%; background-position: right center; }
    .wall-right { right: -45%; background-position: left center; }

    /* 3. Carte Elias : Ajustée pour le manque de hauteur */
    .elias-card-fixed {
        display: flex;
        flex-direction: row; /* Texte à gauche, image à droite */
        align-items: center;
        justify-content: space-between;
        height: 80vh; /* Prend presque toute la hauteur */
        width: 85vw;
        padding: 10px 25px;
        z-index: 20;
        background-color: rgba(0, 0, 0, 0.9); /* Plus sombre pour la lisibilité */
    }

    .reveal-content {
        flex: 1.5;
        padding-right: 20px;
    }

    .reveal-title { 
        font-size: 1.7rem; 
        margin-bottom: 5px; 
        line-height: 1.1;
    }

    .reveal-text { 
        font-size: 1.2rem; 
        line-height: 1.4;
    }

    .reveal-image img {
        height: 75vh; /* L'image s'adapte à la petite hauteur */
        width: auto;
    }

    /* 4. Conteneur Vidéo : 90% de la hauteur (90vh) */
    #container {
        position: fixed;
        height: 90vh; 
        width: 160vh; /* Ratio 16:9 basé sur la hauteur */
        max-width: 90vw; /* Empêche de déborder sur les côtés */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 30;
        border-width: 2px;
        box-shadow: 0px 0px 30px rgba(0,0,0,0.8);
    }

    /* Réduction de l'ombre interne pour ne pas étouffer la vidéo */
    #container:after {
        box-shadow: inset 0px 0px 40px 10px black;
        opacity: 0.5;
    }

    /* 5. Carte Info (Fin de parcours) */
    .info-card {
        width: 90vw;
        height: 85vh;
        padding: 15px;
        z-index: 100;
        display: flex;
        align-items: center;
    }

    .info-layout {
        flex-direction: row;
        gap: 15px;
    }

    .info-image img {
        height: 70vh;
        width: auto;
    }

    .info-title { font-size: 1.5rem; }
    .info-text { font-size: 1.1rem; }

    /* 6. Logo au démarrage */
    .logo-container {
        width: 70vh; /* Basé sur la hauteur en paysage */
        z-index: 15;
    }
}



/* Responsive Mobile */
@media (max-width: 768px) {
    .info-layout { flex-direction: column; text-align: center; }
    .info-image img { width: 100%; }
    .info-card { padding: 15px; }
}



@-webkit-keyframes vignette-anim {
  0%   , 100%{ opacity: 1; }
  50% { opacity: 0.7; }
}
@-moz-keyframes vignette-anim {
  0%   , 100%{ opacity: 1; }
  50% { opacity: 0.7; }
}
@-o-keyframes vignette-anim {
  0%   , 100%{ opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes vignette-anim {
  0%   , 100%{ opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}
