/**********************************************************************************************************************************************************

Present

*********************************************************************************************************************************************************************************************************/



/* ========================= */
/* HERO FLOATING OBJECTS */
/* ========================= */

#hero-floating-objects {
    position: relative;
    height: 100vh;
    width: 100%;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}


.hero-content h1 {
font-size: 130px !important;
}

.hero-content * {
    pointer-events: auto;
}


/* ========================= */
/* PHYSICS SECTION */
/* ========================= */

#hero-physics-container {
    position: relative;
    width: 100%;
    height: 80vh;
    background: transparent; /* Fond transparent */
    overflow: hidden;
}

/* Fade progressif uniquement sur les objets */
#physics-world {
    position: absolute;
    inset: 0;
    z-index: 1;

    --fade: 120px;

    /* Safari / Chrome */
    -webkit-mask-image:
        linear-gradient(to right,
            transparent 0,
            black var(--fade),
            black calc(100% - var(--fade)),
            transparent 100%
        ),
        linear-gradient(to bottom,
            transparent 0,
            black var(--fade),
            black calc(100% - var(--fade)),
            transparent 100%
        );

    -webkit-mask-composite: source-in;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;

    /* Standard */
    mask-image:
        linear-gradient(to right,
            transparent 0,
            black var(--fade),
            black calc(100% - var(--fade)),
            transparent 100%
        ),
        linear-gradient(to bottom,
            transparent 0,
            black var(--fade),
            black calc(100% - var(--fade)),
            transparent 100%
        );

    mask-composite: intersect;
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}

.phys-obj {
    position: absolute;
    width: 200px;
    height: 200px;
    pointer-events: none;
    cursor: none;
    will-change: transform;
}



body.present p a img {
    width: 12px;
    height: 12px;
    margin-top: 20px;
}

/************************** trailer **********************************/


body.present #trailer {
    width: 100%;
    height: 600px;
    display: flex;
    justify-content: center;
    padding-top: 200px;
    gap: 50px;
    align-items: center;
    flex-direction: column;
    background-image: url('http://nextus.mmi-iutsf.org/wp-content/uploads/2026/02/Affiche-Impasse-copie-scaled.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.present #trailer h1 {
    margin-bottom: 150px;
}

body.present .scroll-indicator {
    width: 26px;
    height: 42px;
    border: 2px solid currentColor;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    display: inline-block;
}


body.present .scroll-indicator .wheel {
    width: 4px;
    height: 8px;
    background: currentColor;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite ease;
}

/* Les keyframes restent globaux, on ne met pas de sélecteur devant */
@keyframes scroll-wheel {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
}


/************************** entretiens **********************************/


body.present #interview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

body.present #interview .interview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 30px;
}

body.present #interview .container img {
    margin-bottom: 15px;
    height:200px;
}


body.present #interview .container h3,
body.present #interview .container p {
    width: 100%;
    height: auto;
}

body.present #interview .container .bouton2 {
    margin-top: 20px;
}


/************************** Artcles epingles **********************************/

body.present #articles {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    width: 100%;
    align-items: flex-start;
    padding-right: 10px;
}

body.present #articles .infos {
    width: 28%;
}

body.present #articles .infos .navigation {
    margin-top: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 50px;
}

body.present #articles .infos .navigation button {
    height: 60px;
    width: 60px;
    border-radius: 15px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}


body.present #articles .infos .navigation button img {
    height: 30px;
    width: auto;
}

body.present #articles .infos .navigation #left img {
    transform: rotate(180deg);
}


body.present #articles .epingles {
    padding: 20px;
    width: 72%;
    height: auto;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
}

body.present .epingles:active {
    cursor: grabbing;
}


body.present #articles .epingles .translate-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-out;

}

body.present #articles .epingles .translate-wrapper::before {
    content: "";
    width: 300px;
    height: 450px;
    display: block;
    flex-shrink: 0;
}

body.present #articles .epingles .container {
    width: 300px;
    height: 500px;
    transition: .3s ease-out;
    transition-delay: 0.3s;
}

body.present #articles .epingles .container p {
    height: 100% !important;
}

body.present .container.article:hover {
    transform: scale(1);
    box-shadow: none;
    transition: none;
}

body.present .container.article.active {
    transform: scale(1.03);
    box-shadow: -2px -2px 8px #77B6D6, 2px 2px 8px #71C5B2;
    transition: .3s ease-out;
    transition-delay: 0.6s;
}

body.present .container.article {
    opacity: 0;
    filter: blur(5px);
}

body.present .container.article.visible {
    opacity: 1;
    filter: blur(0);
}


body.present #articles .epingles .container .post-thumb {
    margin-bottom: 15px;
}

body.present #articles .epingles .container .line {
    background-color: rgba(255, 255, 255, 0.623);
    height: 0.2px;
    width: 100%;
}


body.present #articles .epingles .container h3,
body.present #articles .epingles .container p {
    width: 100%;
    height: auto;
}

body.present #articles .epingles .container .bouton2 {
    margin-top: 20px;
}











/**********************************************************************************************************************************************************

Passe

*********************************************************************************************************************************************************************************************************/


body.passe p a img {
    width: 12px;
    height: 12px;
    margin-top: 20px;
}



/************************** entretiens **********************************/


body.passe #interview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    margin-top: 50px;
}

body.passe #interview .interview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 30px;
}

body.passe #interview .container img {
    margin-bottom: 15px;
}


body.passe #interview .container h3,
body.passe #interview .container p {
    width: 100%;
    height: auto;
}

body.passe #interview .container .bouton2 {
    margin-top: 20px;
}


/************************** Artcles epingles **********************************/

body.passe #articles {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    width: 100%;
    align-items: flex-start;
    padding-right: 10px;
}

body.passe #articles .infos {
    width: 28%;
}

body.passe #articles .infos .navigation {
    margin-top: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 50px;
}

body.passe #articles .infos .navigation button {
    height: 60px;
    width: 60px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #e4ab66;
    border-top: solid #e9c79e 3px;
    border-left: solid #e9c79e 3px;
    border-right: solid #936d40 3px;
    border-bottom: solid #936d40 3px;

}


body.passe #articles .infos .navigation button img {
    height: 30px;
    width: auto;
    display: block;
}

body.passe #articles .infos .navigation #left img {
    transform: rotate(180deg);
}


body.passe #articles .epingles {
    padding: 20px;
    width: 72%;
    height: auto;
    overflow: hidden;
}

body.passe .epingles:active {
    cursor: grabbing;
}


body.passe #articles .epingles .translate-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    width: 100%;
    height: 100%;

}

body.passe #articles .epingles .translate-wrapper::before {
    content: "";
    width: 300px;
    height: 450px;
    display: block;
    flex-shrink: 0;
}

body.passe #articles .epingles .container {
    width: 300px;
    height: 500px;
}

body.passe #articles .epingles .container p {
    height: 100% !important;
}

body.passe .container.article:hover {
    transform: scale(1);
    box-shadow: none;
    transition: none;
}


body.passe .container.article {
    opacity: 0;
    filter: blur(5px);
}

body.passe .container.article.visible {
    opacity: 1;
    filter: blur(0);
}


body.passe #articles .epingles .container .post-thumb {
    margin-bottom: 15px;
}

body.passe #articles .epingles .container .line {
    background-color: rgba(255, 255, 255, 0.623);
    height: 0.2px;
    width: 100%;
}


body.passe #articles .epingles .container h3,
body.passe #articles .epingles .container p {
    width: 100%;
    height: auto;
}

body.passe #articles .epingles .container .bouton2 {
    margin-top: 20px;
}








/**********************************************************************************************************************************************************

Futur

*********************************************************************************************************************************************************************************************************/



body.futur p a img {
    width: 12px;
    height: 12px;
    margin-top: 20px;
}


/************************** entretiens **********************************/


body.futur #interview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

body.futur #interview .interview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 30px;
}

body.futur #interview .container img {
    margin-bottom: 15px;
    height:200px;
}


body.futur #interview .container h3,
body.futur #interview .container p {
    width: 100%;
    height: auto;
}

body.futur #interview .container .bouton2 {
    margin-top: 20px;
}


/************************** Artcles epingles **********************************/

body.futur #articles {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    width: 100%;
    align-items: flex-start;
    padding-right: 10px;
}

body.futur #articles .infos {
    width: 28%;
}

body.futur #articles .infos .navigation {
    margin-top: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 50px;
}

body.futur #articles .infos .navigation button {
    height: 60px;
    width: 60px;
    border-radius: 15px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}


body.futur #articles .infos .navigation button img {
    height: 30px;
    width: auto;
}

body.futur #articles .infos .navigation #left img {
    transform: rotate(180deg);
}


body.futur #articles .epingles {
    padding: 20px;
    width: 72%;
    height: auto;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
}

body.futur .epingles:active {
    cursor: grabbing;
}


body.futur #articles .epingles .translate-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-out;

}

body.futur #articles .epingles .translate-wrapper::before {
    content: "";
    width: 300px;
    height: 450px;
    display: block;
    flex-shrink: 0;
}

body.futur #articles .epingles .container {
    width: 300px;
    height: 500px;
    transition: .3s ease-out;
    transition-delay: 0.3s;
}

body.futur #articles .epingles .container p {
    height: 100% !important;
}

body.futur .container.article:hover {
    transform: scale(1);
    box-shadow: none;
    transition: none;
}

body.futur .container.article.active {
    transform: scale(1.03);
    box-shadow: -2px -2px 8px #77B6D6, 2px 2px 8px #71C5B2;
    transition: .3s ease-out;
    transition-delay: 0.6s;
}

body.futur .container.article {
    opacity: 0;
    filter: blur(5px);
}

body.futur .container.article.visible {
    opacity: 1;
    filter: blur(0);
}


body.futur #articles .epingles .container .post-thumb {
    margin-bottom: 15px;
}

body.futur #articles .epingles .container .line {
    background-color: rgba(255, 255, 255, 0.623);
    height: 0.2px;
    width: 100%;
}


body.futur #articles .epingles .container h3,
body.futur #articles .epingles .container p {
    width: 100%;
    height: auto;
}

body.futur #articles .epingles .container .bouton2 {
    margin-top: 20px;
}
/* ========================================================================= */
/* ADAPTATION MOBILE (Écrans de moins de 768px de large)                     */
/* ========================================================================= */

/* ========================================================================= */
/* ADAPTATION MOBILE (Écrans de moins de 768px de large)                     */
/* ========================================================================= */

@media (max-width: 768px) {

    /* 1. HERO SECTION */
    .hero-content h1 {
        font-size: 60px !important; /* On réduit drastiquement la taille du titre */
        line-height: 1.1;
    }
    
    #hero-physics-container {
        height: 60vh; /* Moins de hauteur pour laisser place au contenu en dessous */
    }

    /* 2. TRAILER (Présent) */
    body.present #trailer {
        height: auto;
        padding-top: 100px;
        padding-bottom: 50px;
    }

    body.present #trailer h1 {
        margin-bottom: 50px; /* On réduit la marge de 150px qui est trop grande sur mobile */
        text-align: center;
    }

    /* 3. ENTRETIENS (Présent, Passé, Futur) */
    body.present #interview .interview-wrapper,
    body.passe #interview .interview-wrapper,
    body.futur #interview .interview-wrapper {
        flex-direction: column; /* On empile les entretiens à la verticale */
        gap: 40px;
        padding: 0 20px;
    }

    body.present #interview .container img,
    body.passe #interview .container img,
    body.futur #interview .container img {
        height: auto;
        max-width: 100%;
    }

    /* 4. ARTICLES ÉPINGLÉS (Présent, Passé, Futur) */
    body.present #articles,
    body.passe #articles,
    body.futur #articles {
        flex-direction: column; /* On passe le texte au-dessus du carrousel */
        padding-right: 0;
    }

    /* FIX : On transforme le conteneur en colonne centrée */
    body.present #articles .infos,
    body.passe #articles .infos,
    body.futur #articles .infos {
        width: 100%; 
        padding: 0 20px;
        text-align: center;
        
        /* LES LIGNES MAGIQUES POUR FORCER LE CENTRAGE */
        display: flex;
        flex-direction: column;
        align-items: center; 
        justify-content: center;

        position: relative;
        z-index: 999; 
        pointer-events: auto;
    }

    /* FIX : On s'assure que le bouton accepte de se centrer */
    .bouton2 {
        position: relative;
        z-index: 1000;
        pointer-events: auto !important; 
        
        /* On force les marges gauche/droite à s'équilibrer (auto) */
        margin: 20px auto 0 auto !important; 
        width: fit-content !important; /* Le bouton prend juste la taille de son texte */
    }

    /* FIX : Rapprochement des flèches sous le bouton */
    body.present #articles .infos .navigation,
    body.passe #articles .infos .navigation,
    body.futur #articles .infos .navigation {
        margin-top: 18px; /* Espace réduit au-dessus des flèches */
        position: relative;
        z-index: 50;
    }

    /* FIX : Agrandissement de la zone de clic des flèches */
    body.present #articles .infos .navigation button,
    body.passe #articles .infos .navigation button,
    body.futur #articles .infos .navigation button {
        min-height: 60px;
        min-width: 60px;
        cursor: pointer;
    }

    /* Le bloc carrousel est repoussé en dessous en Z-INDEX 1 */
    body.present #articles .epingles,
    body.passe #articles .epingles,
    body.futur #articles .epingles {
        width: 100%; 
        padding: 20px 0; 
        position: relative;
        z-index: 1; /* S'assure que le carrousel ne bloque pas les boutons au-dessus */
    }

    /* Carrousel d'articles : adaptation du scroll */
    body.present #articles .epingles .translate-wrapper::before,
    body.passe #articles .epingles .translate-wrapper::before,
    body.futur #articles .epingles .translate-wrapper::before {
        width: 20px; /* On enlève la grosse marge vide de 300px au début du carrousel */
    }

    body.present #articles .epingles .container,
    body.passe #articles .epingles .container,
    body.futur #articles .epingles .container {
        width: 80vw; /* Les cartes font 80% de la largeur de l'écran */
        min-width: 280px; 
        height: auto; 
        min-height: 400px;
    }
}


