/* Styles pour le template 3D */

body.page-template-template-3D {
    overflow: hidden; /* Empêche le défilement de la page principale */
    margin: 0; /* Supprime les marges par défaut du body */
    background-color: #000; /* Fond noir pour la page */
}

#scene-container {
    /* position, top, left, width, height, background-color sont définis en inline dans template-3D.php */
    z-index: 99999 !important; 
}

canvas#background {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1; /* Juste au-dessus du fond de scene-container, sous loading-screen */
    /* background-color: transparent !important; /* Retrait du fond bleu de débogage */
    /* border: none !important; /* Retrait de la bordure rouge de débogage */
}

/* --- Loading Screen Styles --- */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111; /* Fond sombre original */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    z-index: 10 !important; /* Should be BELOW UI overlay, but above scene canvas */
    color: white;
    /* transition: opacity 0.5s ease, visibility 0.5s ease; */ /* Transitions gérées par JS ou .hidden */
}

/* #loading-screen.hidden is temporarily overridden by #loading-screen debug styles above */
#loading-screen.hidden {
    /* opacity: 0 !important; */
    /* visibility: hidden !important; */
    display: none !important; 
}

.indication {
    color: white;
    font-size: 18px; /* Légèrement plus grand */
    font-family: 'Arial', sans-serif; /* Police plus standard */
    margin-bottom: 25px;
}

#loading-bar-container {
    width: 60%;
    max-width: 350px; /* Légèrement plus grand */
    height: 10px; /* Légèrement plus épais */
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #555; /* Petite bordure */
}

#loading-bar {
    width: 0%;
    height: 100%;
    background-color: var(--color-4, #00AEEA);
    border-radius: 5px; /* Cohérent avec le conteneur */
    transition: width 0.3s ease;
}

/* Nouvelle Interface Utilisateur Interactive 3D */
#interactive-ui-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Prend toute la hauteur pour permettre un positionnement flexible des enfants */
    display: flex;
    align-items: center; /* Centre les colonnes verticalement si elles ne prennent pas toute la hauteur */
    justify-content: space-between; /* Espace les colonnes (gauche, milieu, droite) */
    opacity: 1;
    visibility: visible;
    z-index: 2 !important; /* Should be ON TOP of loading screen and canvas */
    padding: 20px; /* Espace autour du contenu de l'UI */
    box-sizing: border-box;
    pointer-events: none; /* L'overlay lui-même n'est pas interactif, mais ses enfants le seront */
}

#left-ui-column,
#right-ui-column,
#middle-ui-column {
    height: 100%; /* Les colonnes prennent toute la hauteur de l'overlay */
    display: flex;
    align-items: center; /* Centre verticalement les éléments internes */
    pointer-events: auto; /* Réactive les événements pour les colonnes */
}

#left-ui-column,
#right-ui-column {
    flex: 1; /* Prend 1 part de l'espace */
    justify-content: center; /* Centre la flèche horizontalement */
    opacity: 1 !important;
    visibility: visible !important;
    border-radius: 25%;
}

#left-ui-column:hover {
    background: linear-gradient(90deg, var(--color-4), transparent, transparent);
}

#right-ui-column:hover {
    background: linear-gradient(-90deg, var(--color-4), transparent, transparent);
}

#middle-ui-column {
    flex: 4; /* Prend 4 parts de l'espace */
    flex-direction: column;
    justify-content: flex-end; /* Aligne les éléments en bas */
    align-items: center; /* Centre le contenu horizontalement */
    padding-bottom: 5vh; /* Marge en bas */
    gap: 20px; /* Espace entre les indicateurs et le bouton Home */
    opacity: 1 !important;
    visibility: visible !important;
}

#left-ui-column:hover,
#right-ui-column:hover {
    cursor: pointer;
}

/* Styles pour les flèches */
#left-arrow,
#right-arrow {
    width: 50px; /* Légèrement plus grand */
    height: 50px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
    opacity: 1 !important; /* Forcer l'opacité */
    visibility: visible !important; /* Forcer la visibilité */
    filter: var(--filter-blanc);
}

#left-arrow:hover,
#right-arrow:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Styles pour les indicateurs de section */
#section-indicators-container {
    display: flex;
    justify-content: center;
    gap: 18px; /* Un peu plus d'espace */
}

.section-indicator-dot {
    width: 14px; /* Légèrement plus grand */
    height: 14px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer; /* Permet le clic sur les points pour la navigation */
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-indicator-dot.active {
    background-color: var(--color-4, #00AEEA);
    transform: scale(1.25);
    border-color: var(--color-4, #00AEEA);
}

.section-indicator-dot:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* Style pour le bouton "Home-ValidButton" */
#Home-ValidButton {
    color: white;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-4, #00AEEA);
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

#Home-ValidButton:hover {
    background-color: var(--color-4, #00AEEA);
    color: #000;
}

/* Ajustements pour que le contenu de la page WordPress ne soit pas visible sous la scène 3D */
.container-wrap {
    visibility: hidden; /* Cache le contenu normal de la page */
}

/* Assurez-vous que le header et le footer de Salient n'interfèrent pas visuellement */
body.page-template-template-3D header#top {
    display: block !important; 
    position: relative; /* Assure qu'il peut avoir un z-index effectif */
    z-index: 1000 !important; /* Doit être supérieur à #scene-container */
}

body.page-template-template-3D div.nectar-global-section.before-footer,
body.page-template-template-3D div#fws_684bd10193dd7 /* Specific ID for the lower footer section */ {
    display: none !important; /* Cache les sections du footer du thème Salient */
}

/* Attempt to neutralize the main theme containers that might be obscuring the scene (DISABLED - caused issues) */
/*
body.page-template-template-3D div.container-wrap,
body.page-template-template-3D div.container-wrap > div.main-content,
body.page-template-template-3D div.container-wrap > div.main-content > div.row {
    background: transparent !important;
    z-index: auto !important; 
    position: static !important; 
}
*/

/* Ensure #scene-container is definitely on top */
#scene-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #000; /* Ce fond est normalement caché par le canvas/scène */
    z-index: 100 !important; /* Élevé, mais permet au header (z-index 1000) de passer dessus */
    /* L'UI interne (#loading-screen, #interactive-ui-overlay) aura des z-index relatifs à celui-ci */
}


@media (max-width: 800px) {
    #left-arrow,
    #right-arrow {
        width: 30px; /* Légèrement plus grand */
        height: 30px;
    }
    #left-ui-column:hover, #right-ui-column:hover  {
        background: transparent;
    }
    #Home-ValidButton:hover {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    }
}