/* Définition des variables de couleur de votre charte */
:root {
    --baltic-blue: #376795;
    --lime-moss: #95C11F;
    --lemon-lime: #C8D400;
    --dark-text: #020300;
    --white: #FEFFFE;
}

p {
    text-align: justify;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    scroll-padding-top: 70px;
    /* Pour compenser le header fixe */
}

body>main>section {
    padding: 5px;
}


/* Animations sur le scroll - État initial */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.team-member {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.team-member.from-left {
    transform: translateX(-50px);
}

.team-member.from-right {
    transform: translateX(50px);
}

.team-member:not(.visible) {
    transform: translate(0, 0);
}

@media (max-width: 800px) {
    .team-member.from-left:not(.visible) {
        transform: translateX(50px);
    }

    .team-member.from-right:not(.visible) {
        transform: translateX(-50px);
    }

    .team-member.visible {
        transform: translate(0, 0);
    }
}

/* Classe ajoutée par JS pour déclencher l'animation */
.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Styles du Header */
.navbar {
    transition: background-color 0.3s ease-in-out;
}

.nav-link {
    font-weight: 600;
    color: var(--dark-text) !important;
    margin: 0 0.5rem;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--baltic-blue) !important;
}

/* Style des Sections */
section {
    padding: 6rem 0;
    overflow-x: hidden;
    position: relative;
    scroll-margin-top: 6rem;
    /* Contexte de positionnement pour les formes */
}

/* =================== ACCUEIL =================== */
#accueil {
    min-height: 100vh;
    background-color: var(--white);
}

/* Formes décoratives pour l'accueil inspirées de la plaquette */
#accueil::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -100px;
    width: 300px;
    height: 300px;
    background-color: var(--baltic-blue);
    opacity: 0.8;
    clip-path: polygon(50% 0%, 85% 15%, 100% 50%, 85% 85%, 50% 100%, 15% 85%, 0% 50%, 15% 15%);
    /* Decagon */
    z-index: 0;
}

#accueil::after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: -80px;
    width: 250px;
    height: 250px;
    background-color: var(--lime-moss);
    opacity: 0.8;
    clip-path: polygon(50% 0%, 85% 15%, 100% 50%, 85% 85%, 50% 100%, 15% 85%, 0% 50%, 15% 15%);
    /* Decagon */
    z-index: 0;
}

/* Medium size screen : reduce title size */
@media (min-width: 800px) and (max-width: 1200px) {
    #accueil>div>div>h1 {
        max-width: 75%;
    }
}

/* Small size screen : push away polygons */
@media (max-width: 800px) {
    #accueil::before {
        right: -30px;
        top: 15%;
        width: 100px;
        height: 100px;
    }

    #accueil::after {
        left: -50px;
        width: 175px;
        height: 175px;
    }
}

#accueil .container {
    position: relative;
    /* S'assurer que le contenu est au-dessus des formes */
    z-index: 1;
}

.accueil-logo {
    height: 100px;
    /* Logos plus grands */
}

@media (min-width: 768px) {
    .accueil-logo {
        height: 120px;
    }
}

/* =================== PROJET =================== */
/* #projet {
    background-color: var(--white);
} */

.project-description {
    position: relative;
    padding-left: 2rem;
    /* Espace pour la barre */
}

/* Barre latérale bleue comme sur la maquette */
.project-description::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background-color: var(--baltic-blue);
}

.project-description h3::before {
    content: '';
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    /* height: 40px; */
    height: calc(2/sqrt(3)*40px);
    background-color: var(--lime-moss);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    /* Forme hexagonale */
    z-index: 2;
}

#projet h3 {
    color: var(--dark-text);
    position: relative;
    padding-left: 0;
}

/* =================== DEROULEMENT =================== */
#deroulement h2 {
    position: relative;
}

#deroulement h2::after {
    content: '';
    position: absolute;
    top: 150%;
    right: 0;
    transform: translateY(calc(-50% - 40px)) translateX(100px); /* on compense l'animation de base */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    opacity: 0;
    /* width: 10vw;
    height: 10vw; */
    height: 200px;
    width: 100px;
    max-height: 200px;
    background-image: url('assets/fleches_bas.svg');
    /* background-size: contain; */
    background-repeat: no-repeat;
    background-position: center right;
    z-index: 1;
    
}

#deroulement.visible h2::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 1000px) and (min-width: 451px) {
    #deroulement h2::after {
        right: -80px;
    }
}

@media (max-width: 450px) {
    #deroulement h2::after {
        right: -60px;
        width: 100px;
        height: 100px;
        top: 100%;
    }
}

/* =================== FORMATION =================== */
#formation h2 {
    position: relative;
}

#formation h2::before {
    content: '';
    position: absolute;
    top: 150%;
    left: 0;
    transform: translateY(calc(-50% - 40px)) translateX(-100px); /* on compense l'animation de base */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    opacity: 0;
    /* width: 10vw;
    height: 10vw; */
    height: 100px;
    width: 100px;
    max-height: 200px;
    background-image: url('assets/angle_haut_droit.svg');
    /* background-size: contain; */
    background-repeat: no-repeat;
    background-position: left;
    z-index: 1;
    
}

#formation.visible h2::before {
    opacity: 1;
    transform: translateY(-75%) translateX(0);
}

@media (max-width: 1000px) and (min-width: 451px) {
    #formation h2::before {
        width: 50px;
        height: 50px;
        right: -80px;
        top: 100%;
    }
}

@media (max-width: 450px) {
    #formation  h2::before {
        right: -60px;
        width: 50px;
        height: 50px;
        top: 100%;
    }
}



/* =================== ÉQUIPE =================== */
.team-avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--lime-moss);
}

.team-member h4 {
    color: var(--baltic-blue);
    font-weight: 700;
}

/* Délai d'animation pour chaque membre de l'équipe */
.team-member.visible {
    transition-delay: 200ms;
}

/* .team-member.visible:nth-of-type(1) { transition-delay: 0s; }
.team-member.visible:nth-of-type(2) { transition-delay: 0.15s; }
.team-member.visible:nth-of-type(3) { transition-delay: 0.3s; }
.team-member.visible:nth-of-type(4) { transition-delay: 0.45s; }
.team-member.visible:nth-of-type(5) { transition-delay: 0.6s; }
.team-member.visible:nth-of-type(6) { transition-delay: 0.75s; } */

/* =================== CONTACT =================== */
#contact {
    background-color: var(--baltic-blue);
    color: var(--white);
}

#contact h2,
#contact a {
    color: var(--white);
}

/* Style des Boutons */
.btn-primary {
    background-color: var(--baltic-blue);
    border-color: var(--baltic-blue);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: background-color 0.3s, border-color 0.3s;
}

.btn-primary:hover {
    background-color: #2c5176;
    border-color: #2c5176;
}