/* ==========================================================================
   1. VARIABLES & TYPOGRAPHIE
   ========================================================================== */
:root {
    --font-titre: 'Akrobat', sans-serif;
    --font-texte: 'OpenSans', sans-serif;
    
    --color-bg: #000000;
    --color-text-main: #FFFFFF;
    --color-text-mutted: #dbdbdb;
    --color-primary: #193463;
    --color-primary-hover: #1352D1;

    --trans-slow: top 0.2s, bottom 2s, left 2s, width 2s, height 2s, opacity 1s, border 2s, transform 2s;
    --trans-fast: all 0.5s ease-in-out;
}

@font-face { font-family: 'OpenSans'; src: url("../FONT/Open_Sans/OpenSans-Regular.ttf"); }
@font-face { font-family: 'Akrobat'; src: url('../FONT/akrobat/Akrobat-Regular.otf'); font-weight: 400; }
@font-face { font-family: 'Akrobat'; src: url('../FONT/akrobat/Akrobat-Bold.otf'); font-weight: 700; }
@font-face { font-family: 'Akrobat'; src: url('../FONT/akrobat/Akrobat-ExtraBold.otf'); font-weight: 800; }
@font-face { font-family: 'Akrobat'; src: url('../FONT/akrobat/Akrobat-Black.otf'); font-weight: 900; }
/* PENSE A AJOUTER RALEWAY ICI SI TU VEUX L'UTILISER */

/* ==========================================================================
   2. STYLES GLOBAUX
   ========================================================================== */
html, body {
    margin: 0; padding: 0;
    height: 100%; width: 100%;
    overflow: hidden;
    background-color: var(--color-bg); 
    color: var(--color-text-main);
    font-family: var(--font-titre);
    font-weight: 800;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;  
    text-rendering: optimizeLegibility;  

}

/* ==========================================================================
   3. STRUCTURE & CONTENEURS PRINCIPAUX
   ========================================================================== */
/* Regroupement des conteneurs partageant les mêmes transitions et positionnement */
#GLOABL_FRAME, #DIV_LAYER_2D, #DIV_LAYER_SETTING, #DIV_INFO, #DIV_MEDIA {
    position: absolute;
    transition: var(--trans-slow);
}

#GLOABL_FRAME, #DIV_THREEJS_3D { width: 100%; height: 100%; z-index: 50; top: 0; overflow: hidden; }
#DIV_THREEJS_3D { left: 4px; z-index: 5; }

#DIV_BKG {
    position: absolute; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle, #001933 0%, #000000 100%) center center / cover no-repeat;
    transition: opacity 2s, background-color 1s; 
} 

#DIV_LAYER_2D { top: 0; width: 100%; height: 0; }
#DIV_LAYER_SETTING { top: 0; width: 100%; height: 1px; z-index: 80; }

#DIV_INFO {
    top: 20%; left: -50%;
    width: 500px; height: 100%;
    z-index: 300; opacity: 0;
    font-weight: 700;
}


#DIV_INTRO_TITRE{
    position: absolute;
    display: block;
    top: -20%; 
    left: 0%;
    height: 150px;
    width: 100%;
    /*background-color: #1352D1;*/
    z-index: 0;
    text-align: center;
    font-size:80px;
    opacity: 0;

    transition: opacity 1s ease-out, top 3s ease-out;
    white-space: pre-line;



}




#DIV_INTRO_DETAILS {
    position: absolute;
    top: 35%;
    left: 5%;
    height: 25%;
    width: 25%;
    z-index: 0;


    opacity: 0;
    white-space: pre-line;
    font-family: 'Akrobat', sans-serif;
    font-size: 15px;
    font-weight: 200;

    transition: opacity 1s ease-out;

    /* Centrage horizontal et vertical */
    display: flex;
    flex-direction: column;  /* Éléments les uns au-dessus des autres */
    justify-content: center; /* Centrage vertical */
    align-items: center;     /* Centrage horizontal */
    text-align: center;      /* Texte centré */



       padding: 12px;
}





#DIV_MEDIA {
    top: 5%; left: 5%;
    width: 90%; height: 0%;
    z-index: 600; opacity: 1;
    background-color: var(--color-bg);
    border-radius: 10px; overflow: hidden; text-align: center;
}

#DIV_LOADING {
    position: absolute; 
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%); /* Centrage parfait au milieu */
    width: 200px; 
    z-index: 100; 
    text-align: center;
    transition: opacity 1s ease-out;
}

#LOADING_TEXT {
    font-family: 'Akrobat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#LOADING_BAR_CONTAINER {
    width: 200px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

#LOADING_BAR {
    width: 0%;
    height: 100%;
    background-color: #FFFFFF;
    transition: width 0.1s linear, background-color 0.3s ease;
}

/* Classe ajoutée dynamiquement en cas d'erreur */
.loading-error #LOADING_BAR {
    background-color: #FF0000;
}

.loading { font-family: var(--font-titre); opacity: 0; transition: opacity 2s; }
#DEBUG { text-align: left; bottom: 0; }

/* ==========================================================================
   4. COMPOSANTS UI & BOUTONS
   ========================================================================== */
.button, .buttonRead, .button2 {
    font-family: var(--font-titre);
    color: #ddd; cursor: pointer; transition: var(--trans-fast);
}
.button { background-color: var(--color-primary); padding: 6px 15px; text-align: center; }
.button:hover, .buttonRead:hover { background-color: var(--color-primary-hover); color: var(--color-text-main); }
.buttonRead { display: block; float: left; margin-top: 15px; padding: 6px 0; }
.buttonRead:hover { padding-left: 6px; }
.button2 { background-color: #555; height: 30px; padding: 3px 10px; }
.button2:hover { background-color: #1655FB; }

/* Focus 3D */

.buttonFocus {
    user-select: none;     font-weight: 900;     font-size: 25px;     color: #aaa;     cursor: pointer;    margin-top: -20px;     border-radius: 50%;
    background: url("../images/icone_plus_off.jpg") center/cover no-repeat;
    width: 12px;    height: 12px;    padding: 12px; /* Donne une taille totale de 36x36px */
    flex-shrink: 0; /* Empêche l'écrasement */
    transition: background-image 0.5s, color 0.5s, opacity 0.5s;
}
.buttonFocus:hover { background-image: url("../images/icone_plus_on_1.jpg"); color: var(--color-text-main); }

.buttonFocusTxt {
    width: 300px; height: 100%; margin-left: 40px; opacity: 0.9; font-size: 13px;
    transition: color 0.5s, opacity 0.5s;
}
.buttonFocusTxt:hover { opacity: 1; color: var(--color-text-main); }

/* Médias */
.closeCross { background: url("../images/close_on_noir.png") center/cover; transition: background-image 1s; } /* CORRIGÉ */
.closeCross:hover { background-image: url("../images/close_on_gris50.png"); }

.video {
    float: right; width: 80px; height: 80px; margin-left: 10px; border-radius: 50px;
    background-size: cover; filter: saturate(0%); cursor: pointer;
    transition: var(--trans-fast);
}
.video:hover { filter: saturate(100%); }
.myVideo { position: fixed; right: 0; bottom: 0; min-width: 100%; min-height: 100%; }

/* ==========================================================================
   5. CONTENU DU PANNEAU INFO (JS)
   ========================================================================== */
#infoDivClose {
    position: absolute; top: 25px; left: 90%;
    width: 50px; height: 50px; cursor: pointer; transition: var(--trans-fast);
}
#infoDiv { float: left; width: 80%; padding: 12px; padding-top: 0px; font-weight: 900; font-size: 50px; transition: var(--trans-fast); }
#infoDivSpacer { float: left; width: 80%; height: 1px; background-color: #fff; padding: 0 12px; opacity: 0.1; }

#infoDivDetial {
    float: left; width: 80%; max-height: 55vh;  padding-top: 0px; padding-left: 10px;
    color: var(--color-text-mutted); font-family: var(--font-texte); font-size: 15px; font-weight: 100;
    white-space: pre-line; overflow-y: auto; transition: var(--trans-fast);
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.05);
}
#infoDivDetial::-webkit-scrollbar { width: 6px; }
#infoDivDetial::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
#infoDivDetial::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 10px; }
#infoDivDetial::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.6); }

#infoDivMedia { float: right; width: 80%; margin-top: 15px; font-family: 'Raleway', sans-serif; font-size: 15px; transition: var(--trans-fast); }
.motCle { font-weight: 900; font-size: 50px; font-family:Akrobat ; text-align: left;}




/* Conteneur parent */
#infoDivDetialContainer {
    float: left; 
    width: 80%; 
    position: relative; 
    margin-bottom: 20px;
    height: 40%;
}

/* Zone du texte */
#infoDivDetial {
    padding: 12px;
    font-family: var(--font-texte); 
    font-size: 15px; 
    font-weight: 100;
    white-space: pre-line; 
    transition: max-height 0.4s ease-in-out; /* Animation fluide de la hauteur */
    box-sizing: border-box;
}

#infoDivDetial.collapsed {
    overflow: scroll;
    /* Le secret est ici : le texte est visible à 100% puis s'efface sur la fin */
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

#infoDivDetial.expanded {
    max-height: 55vh !important; 
    overflow-y: auto;
    -webkit-mask-image: none;
    mask-image: none;
}

/* Le dégradé / fondu */
.fade-overlay {
    position: absolute;
    bottom: 0; left: 0; 
    width: 100%; height: 60px;
    background: none !important; /* On supprime le noir */
    display: flex; 
    justify-content: center; 
    align-items: flex-end;
    pointer-events: none;
    transition: none;
}

/* Le bouton circulaire */
.btn-expand {
    width: 35px; height: 35px; 
    border-radius: 50%;
    background-color: var(--color-primary); 
    color: var(--color-text-main);
    border: none; font-size: 20px; font-weight: bold;
    cursor: pointer;
    pointer-events: auto;
    transition: var(--trans-fast);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    display: flex; justify-content: center; align-items: center;
}

.btn-expand:hover { 
    background-color: var(--color-primary-hover); 
    transform: scale(1.1); 
}


.txtTrans {
    opacity: 0.5;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.05);

    direction: rtl; /* Garde la scrollbar à gauche */
    text-align: left;
    unicode-bidi: plaintext; /* Rétablit le sens LTR pour l'alphabet latin et garde le point à la fin */

    display: block; /* Indispensable pour un <span> avec height et overflow */
    margin-top: 10px;
    padding-left: 10px;
    padding-top: 0px;
    height: 100%;

    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 75%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 75%,
        transparent 100%
    );
}

.txtTrans > * {
    direction: ltr; /* Contenu dans le sens normal */
}

.txtTrans::-webkit-scrollbar {
    width: 6px;
}

.txtTrans::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.txtTrans::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.txtTrans::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}



/* ==========================================================================
   6. RESPONSIVE
   ========================================================================== */



@media (max-width: 1000px) {
    #DIV_INFO {  transform: scale(0.8); }
   #DIV_INTRO_DETAILS {  transform: scale(0.8); }
}

@media (max-width: 600px) {
    #DIV_INFO {  transform: scale(0.6); }
   #DIV_INTRO_DETAILS {  transform: scale(0.6); }
   .buttonFocus{left:50%}
}
