/******mbola à modifier le sary à droite io fa otran pixelisée xD******/
.accueil{
    
    grid-row: 1/-1;
    grid-column: 1/-1;
    display: grid;
    margin-top: 4rem;
    padding-bottom: 2rem;
    /*grid-template-columns: repeat(3, 1fr);*/
    grid-template-columns: repeat(auto-fit, minmax(20rem , 1fr));
    grid-template-rows: auto;
    grid-column-gap: 2rem;
    grid-row-gap: 2rem;
    justify-items: center;
    align-items: center;
    overflow-x: hidden;
    
}


.title-evolutech{
    
    font-size: 3rem;
    margin-bottom: 2rem;
    align-self: flex-start;
    z-index: 10;
  
}
.title-evo{
    width: 22rem;
}


.sous-titre-0 , .sous-titre-1{
    font-size: 1.4rem;
}
.left{
    margin-left: 2rem;
    display: grid;
    grid-template-rows: min-content 1fr min-content 5rem;
    grid-row-gap: 1rem;
    align-self: center;
    justify-self: center;
    place-items: center;
}


/* === Photo professionnelle Eleo (card style) === */
.hero-card {
    display: block;
    width: 100%;
    height: auto;
    max-width: 360px;
    object-fit: cover;
    object-position: top center;
    pointer-events: none;
}

/* === Conteneur des deux photos hero === */
.hero-imgs{
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1rem;
    pointer-events: none;
}
.hero-imgs .left--hero-img,
.hero-imgs .hero-card-wrapper{
    width: 45%;
    max-width: 360px;
    pointer-events: none;
}
.hero-imgs .hero-card{
    width: 100%;
    display: block;
}

/* === Wrapper + effet flou progressif en bas de la photo Eleo === */
.hero-card-wrapper{
    position: relative;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    border-radius: 5px;
}

/* Zone floue en bas */
.hero-card-wrapper::before {
    content: "";
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: -5%;
    height: 45%;
    background-image: url("assets/eleo--pro.png");
    background-size: cover;
    background-position: bottom center;
    filter: blur(12px);
    transform: scale(1.05);
    z-index: 2;
    pointer-events: none;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.25) 25%,
        rgba(0, 0, 0, 0.75) 60%,
        black 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.25) 25%,
        rgba(0, 0, 0, 0.75) 60%,
        black 100%
    );
}

/* Fondu vers le fond */
.hero-card-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to bottom,
            transparent 45%,
            rgba(23, 23, 23, 0.05) 55%,
            rgba(23, 23, 23, 0.45) 75%,
            #171717 100%
        );
    z-index: 3;
    pointer-events: none;
}

/* === Photo hero principale === */
.left--hero-img{
    width: 85%;
    max-width: 360px;
    object-fit: contain;
    pointer-events: none;
}

/* === Zone de texte hero === */
.hero-intro {
    text-align: left;
    z-index: 2;
    max-width: 85%;
    padding: 0;
    background: transparent;
    border: none;
    box-sizing: border-box;
}

/* === Titre principal hero === */
.hero-title {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(2rem, 5.5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.05;
    color: rgba(245, 245, 220, 0.97);
    margin: 0 0 0.75rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* === Description / accroche professionnelle === */
.hero-desc {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    font-weight: 400;
    letter-spacing: 0.1px;
    line-height: 1.55;
    color: rgba(245, 245, 220, 0.65);
    margin: 0 0 1.5rem;
    overflow-wrap: anywhere;
}

/* === Conteneur des boutons hero === */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    align-items: center;
    margin-top: 0.5rem;
}

.hero-actions .btn-p,
.hero-actions .btn-sec {
    padding: 0.75rem 1.6rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    border-radius: 0.5rem;
}


.right{
    /* background-image: url(assets/evolutech-acceuil.PNG);
    background-size: 110%; */
    max-width: 50rem;
    display: grid;
    background-position: center;
    background-repeat: no-repeat;
    width: 30rem;
    height: 30rem;
    overflow: hidden;
}

/* Hero 3D container : prend toute la largeur disponible */
#threejs-container {
    width: 100%;
    max-width: 50rem;
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 0;
    grid-template-rows: 1fr;
}

/* === Canvas Three.js : remplit son container === */
#threejs-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.demi-ligne{
    background-color: var(--c-principal);
    opacity: 0.2;
    height: 4px;
    width: 10rem;
    align-self: center;
    justify-self: start;
}

/* === Zone appel à l'action (CTA) === */
.projet-clip{
    width: fit-content;
}

/* === Boutons hero : effet de remplissage cyan au survol === */
.btn-voir-projet::before,
.btn-contact-projet::before {
    position: absolute;
    color: rgb(19, 19, 19);
    display: grid;
    justify-content: center;
    align-content: center;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg,#276095,#5fd3f7) ;
    border-radius: 5px;
    clip-path: circle(0%);
    transition: .4s;
}

.btn-voir-projet::before { content: "View my work"; }
.btn-contact-projet::before { content: "Work with me"; }

/* Positionnement du bouton CTA */
.btn-voir-projet,
.btn-contact-projet{
    position: relative;
    align-self: start;
    justify-self: start;
    z-index: 3;
    transition: 0.2s ease-out;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    min-width: 10rem;
    text-align: center;
    border: 1px solid var(--c-border);
    border-radius: 5px;
    overflow: hidden;
}

/* View my work en bleu par défaut */
.btn-voir-projet{
    color: #111;
    background: #25B1FF;
    border-color: #25B1FF;
}

/* Animation de remplissage au hover */
.btn-voir-projet:hover::before,
.btn-contact-projet:hover::before {
    clip-path: circle(100%);
    opacity: 1;
    filter: brightness(1.05);
}

.btn-voir-projet:hover,
.btn-contact-projet:hover {
    border: 1px solid rgba(255, 255, 255, 0);
}




/* === Responsive : tablettes et petits écrans (≤850px) === */
@media screen and (max-width:850px){
    .title-evolutech{
        margin-top: 0.4rem;
        font-size: 2.5rem;
    }
    .title-evo{
        width: 20rem;
    }
    .demi-ligne{
        width: 16rem;
    }
    .sous-titre-0 , .sous-titre-1{
        font-size: 1rem;
    }

    /* Passe le contenu au-dessus du visuel 3D */
    .left{
        grid-row: 1/2;
        margin-left: 0;
        justify-items: center;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    .right{
        grid-row: 2/3;
        margin-top: 2rem;
    }
    .hero-intro {
        max-width: 95%;
    }
    .btn-voir-projet{
        justify-self: center;
    }
    .demi-ligne{
        
        justify-self: center;
    }
}

/* === Ajustement taille zone droite en tablette === */
@media screen and (max-width:850px){
    .right{
        width: 21rem;
    }
    .boxes svg {
        transform: scale(2.8) ;
    }
}

/* === Responsive : tablettes/petits écrans (≤680px) === */
@media screen and (max-width:680px){
    .hero-intro {
        max-width: 95%;
    }
    .hero-title {
        font-size: clamp(1.15rem, 5vw, 1.6rem);
        letter-spacing: 0.5px;
        line-height: 1.2;
    }
    .hero-desc {
        font-size: clamp(0.85rem, 4vw, 1rem);
        letter-spacing: 0.3px;
        line-height: 1.55;
    }
    .hero-actions {
        justify-content: center;
    }
}

/* === Responsive : très petits écrans (≤420px) === */
@media screen and (max-width:420px){
    .right{
        margin-top: 0rem;
        overflow: visible;
    }
    .title-evolutech{
        font-size: 30px;
    }
    .title-evo{
        width: 17rem;
    }
}

/* === Responsive mobile : canvas 3D moins haut === */
@media screen and (max-width: 768px){
    #threejs-container {
        aspect-ratio: 16 / 9;
    }
}


/* === Glow bleu/cyan derrière le titre hero === */
.title-evolutech::before{
    content: "";
    position: absolute;
    width: 256px;
    height: 216px;
    border-radius: 100%;
    background-color: var(--c-left);
    align-self: center;
    justify-self: center;
    transform: translateY(-300px) translateX(-122px);
    filter: blur(250px);
    opacity: 1;
}



/* === Glow orange/corail à droite du hero === */
.right::before{
    content: "";
    position: absolute;
    pointer-events: none;
    width: 370px;
    height: 398px;
    border-radius: 100%;
    background-color: var(--c-right);
    align-self: center;
    justify-self: center;
    transform: translateY(0px) translateX(400px);
    filter: blur(180px);
    opacity: 0.8;
}


.link{
    letter-spacing:2px;
}



.right{
    display: grid;
    padding-left: 10px;
    grid-template-rows: 1fr 98px 1fr;
    padding-right: 10px;
    
}

/* === Main droite décorative flottante === */
.h-right{
    transform-origin: right;
    transform-box: fill-box;
    width: 65%;
    grid-row: 3/4;
    justify-self: end;
    transform: translateY(-35px) ;
    z-index: -1;
    opacity: 0;
    animation: appear-h-r 0.4s ease-out 0.8s forwards, h-r-flotte 1s ease-in-out 1.3s infinite alternate;
}

/* === Animations de flottement des mains === */
@keyframes h-r-flotte {
    100%{
        transform: translateY(-40px) ;
    }
}
@keyframes h-l-flotte {
    100%{
        transform: translateY(25px) ;
    }
}

/* === Zone des boîtes 3D flottantes === */
.boxes{
    grid-row: 2/3;
    transform: scale(1) translateY(-200px);
    justify-content: center;
    z-index: 10;
    opacity: 0;
    animation: appear-b 0.4s ease-out 0.8s forwards ;
}

/* Mise à l'échelle des SVG boîtes */
.boxes svg {
    transform: scale(1.8) translateY(-50px);
}

/* === Animations spécifiques de chaque boîte === */
#box0{
    animation: moove-b 4s ease-out infinite alternate , box_ilum 2s ease-out infinite .5s alternate;
}
#box2{
    animation: flotte-b 1s linear infinite alternate-reverse , box_ilum 2s ease-out infinite .6s alternate;
}
#box1{
    animation: moove-b2 4s ease-out infinite 0.2s alternate-reverse, box_ilum 2s ease-out infinite .7s  alternate;
}
#box3{
    animation: moove-b 3s ease-out infinite reverse, box_ilum 2s ease-out infinite .8s alternate;
}

#box{
    animation: flotte-b 0.1s ease-out infinite 0.2s alternate-reverse;
}

/* === Keyframes d'apparition et de flottement des boîtes === */
@keyframes flotte-b {
    100%{
        transform: translateY(-10px);
    }
}

/* Apparition en fondu + scale des boîtes */
@keyframes appear-b {
    0%{
        opacity: 0;
        transform: scale(0.16) translateY(-180px) translateX(20px);
    }
    100%{
        opacity: 1;
        transform: scale(0.16) translateY(-200px) translateX(0px);
    }
}

/* Trajectoire aléatoire type "8" pour boîte 0 et 3 */
@keyframes moove-b {
    0%   { transform: translateY(0px)  translateX(0px);  }
    25%  { transform: translateY(-5px) translateX(10px); }
    50%  { transform: translateY(-10px) translateX(0px); }
    75%  { transform: translateY(-5px) translateX(-10px);}
    100% { transform: translateY(0px)  translateX(0px);  }
}

/* Trajectoire secondaire pour boîte 1 */
@keyframes moove-b2 {
    0%   { transform: translateY(0px) translateX(0px); }
    30%  { transform: translateY(-5px) translateX(5px); }
    60%  { transform: translateY(-5px) translateX(-5px);}
    100% { transform: translateY(0px) translateX(0px); }
}

/* Effet de surbrillance sur les mains SVG */
.bright_hand{
    filter: brightness(1.1) contrast(0.9) saturate(1.2) ;
}

/* Animation d'illumination pulsante des boîtes */
@keyframes box_ilum {
    0%{
        filter: brightness(1.1) contrast(0.9) saturate(1);
    }
    100%{
        filter: brightness(1.2) contrast(0.9) saturate(2);
    }
}

/* === Main gauche décorative flottante === */
.h-left{
    transform-box: fill-box;
    grid-row: 1/2;
    width: 65%;
    transform: translateY(30px) ;
    justify-content: center;
    z-index: -10;
    animation: appear-h-l 0.4s ease-out 0.7s forwards ,h-l-flotte 1s ease-in-out 1s infinite alternate ;
    opacity: 0;
}



@keyframes appear-h-l {
    0%{
        opacity: 0;
        transform: translateY(10px) translateX(-20px);

    }
    100%{
        opacity: 1;
        transform: translateY(30px) translateX(0px);
    }
}

@keyframes appear-h-r {
    0%{
        opacity: 0;
        transform: translateY(-15px) translateX(20px);

    }
    100%{
        opacity: 1;
        transform: translateY(-35px) translateX(0px);
    }
}


/* =====================================================
   ANIMATIONS D'ENTRÉE (REVEAL)
   Classes reveal-* appliquées par reveal.js au scroll
   ===================================================== */

/* --- reveal depuis le bas --- */
/* scope : exclut les classes portées de RECKLESS (reveal-mask, reveal-in,
   story__reveal-in) — elles sont pilotées par GSAP, pas par reveal.js,
   et ce wildcard leur imposait opacity:0 + translateY(20px) à vie */
[class*=reveal-]:not([class*=reveal-mask]):not([class*=reveal-in]){
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s ease-out;
}

/* --- reveal depuis la gauche --- */
[class*=revealL-]{
    opacity: 0;
    transform: translateX(-20px);
    transition: 0.3s ease-out;
}

/* --- reveal avec scale --- */
[class*=revealS-]{
    opacity: 0;
    transform: scale(0.5);
    transition: 0.3s ease-out;
}

/* --- reveal depuis la droite --- */
[class*=revealR-]{
    opacity: 0;
    transform: translateX(40px);
    transition: 0.3s ease-out;
}

/* État visible après déclenchement */
.reveal-active{
    opacity: 1;
    transform: translate(0) scale(1);
}

/* --- Délais d'animation progressifs --- */
.reveal-0, .revealL-0,.revealR-0, .revealS-0{ transition-delay: 0.2s; }
.reveal-1, .revealL-1,.revealR-1, .revealS-1{ transition-delay: 0.3s; }
.reveal-2, .revealL-2,.revealR-2, .revealS-2{ transition-delay:0.4s; }
.reveal-3, .revealL-3,.revealR-3, .revealS-3{ transition-delay: 0.5s; }
.reveal-4, .revealL-4,.revealR-4, .revealS-4{ transition-delay: 0.6s; }

/* === Canvas du jeu de la vie (décoratif) === */
canvas#life {
    border-radius: 10px;
}

#life {
    position: fixed;
    top: 0;
    left: 0;
    height: 150px;
    pointer-events: none;
    z-index: 0;
    background: transparent;
    filter:
      drop-shadow(0 0 5px rgba(255,165,0,0.4))
      drop-shadow(0 0 10px rgba(0,170,255,0.6));
}

@media screen and (max-width: 720px) {
    .hero-imgs {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .hero-imgs .left--hero-img,
    .hero-imgs .hero-card-wrapper {
        width: 80%;
        max-width: 360px;
    }
}