/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1E2D3D;
    font-family: 'Montserrat', sans-serif;
    color: #FFFFFF;
    overflow-x: hidden;
    padding-top: 60px;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(15, 18, 28, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: #FFFFFF;
}

.nav-bar {
    margin-left: auto;
}

.nav-bar ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-bar li {
    display: inline;
}

.nav-bar a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-bar a:hover {
    background-color: #FFD700;
    color: #1E2D3D;
}

.nav-bar-mobile {
    display: none; /* Caché par défaut */
}

/* Header Navigation Mobile */
.nav-bar-mobile {
    display: none; /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fond sombre */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none; /* Désactive les clics */
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}
.nav-bar-mobile.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-bar-mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 0;
    text-align: center;
}

.nav-bar-mobile a {
    font-size: 1.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-bar-mobile a:hover {
    color: #FFD700;
}

/* Menu Toggle Button */
.menu-toggle {
    display: none; /* Caché par défaut */
    flex-direction: column;
    justify-content: space-around;
    height: 25px;
    width: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-bar {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Close Button */
.close-menu {
    display: none; /* Masqué par défaut */
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: #ffffff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Toujours visible au-dessus de l'overlay */
}

.close-menu:hover {
    color: #FFD700;
}

/* Background Losanges */
.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Étend le fond sur toute la page */
    z-index: -1;
    overflow: hidden;
}

.losange {
    position: absolute;
    transform: rotate(45deg);
    opacity: 0.1;
    animation: float 20s infinite alternate ease-in-out; /* Animation douce */
}

.losange-1 { width: 60px; height: 60px; top: 5%; left: 15%; background-color: #FFD700; }
.losange-2 { width: 80px; height: 80px; top: 10%; left: 60%; background-color: #FF5733; }
.losange-3 { width: 50px; height: 50px; top: 25%; right: 20%; background-color: #33FF57; }
.losange-4 { width: 100px; height: 100px; top: 40%; left: 10%; background-color: #5A89FF; }
.losange-5 { width: 70px; height: 70px; bottom: 20%; right: 15%; background-color: #9B59B6; }
.losange-6 { width: 40px; height: 40px; top: 15%; left: 40%; background-color: #FFAA33; }
.losange-7 { width: 90px; height: 90px; bottom: 10%; left: 20%; background-color: #F28B82; }
.losange-8 { width: 120px; height: 120px; top: 30%; right: 5%; background-color: #00BCD4; }
.losange-9 { width: 75px; height: 75px; bottom: 30%; left: 70%; background-color: #4CAF50; }
.losange-10 { width: 110px; height: 110px; top: 50%; right: 40%; background-color: #FFEB3B; }


/* Animation des losanges */
@keyframes float {
    0% {
        transform: rotate(45deg) translateY(0);
    }
    100% {
        transform: rotate(45deg) translateY(-20px);
    }
}

/* Timeline Styles */
.timeline-horizontal {
    position: relative;
    margin: 80px auto;
    max-width: 1200px;
    display: grid;
    grid-template-rows: auto 10px auto;
    gap: 30px;
}

/* Ligne horizontale */
.timeline-line {
    background-color: rgba(255, 255, 255, 0.15); /* Couleur sobre et subtile */
    height: 2px;
    width: 100%;
    margin: 0 auto;
    border-radius: 1px; /* Légèrement arrondie */
}

/* Blocs */
.timeline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.timeline-block {
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    width: 18%;
    transform: rotate(-5deg); /* Légère rotation */
    margin-bottom: 20px;
    margin-top: 20px;
}

.timeline-block:hover {
    transform: rotate(-5deg) translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Couleurs des blocs */
.timeline-block.establishment {
    background-color: #6CA4D6; /* Couleur de fond bleu doux */
    color: #FFFFFF; /* Texte en blanc pour le contraste */
    font-size: 1.2rem; /* Texte plus grand */
    font-weight: 700; /* Texte en gras pour attirer l'attention */
    letter-spacing: 1px; /* Espacement entre les lettres pour lisibilité */
    padding: 20px 15px; /* Padding supplémentaire pour aérer le texte */
    line-height: 1.5; /* Espacement entre les lignes */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Effet d'ombre pour démarquer le bloc */
}


.timeline-block.stage {
    background-color: #FFD494; /* Jaune pastel */
    color: #1E2D3D;
}

/* Description déroulante */
.timeline-block p {
    display: none;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #1E2D3D;
    background-color: #FFFFFF;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.timeline-block:hover p {
    display: block;
}

/* Blocs invisibles */
.timeline-block.empty {
    visibility: hidden;
    pointer-events: none;
}

/* Couleurs personnalisées pour chaque établissement */
.timeline-block.establishment:nth-child(1) {
    background-color: #6CA4D6; /* Bleu doux */
}

.timeline-block.establishment:nth-child(2) {
    background-color: #88D498; /* Vert doux */
}

.timeline-block.establishment:nth-child(3) {
    background-color: #F2B5D4; /* Rose pastel */
}

.timeline-block.establishment:nth-child(4) {
    background-color: #F8A488; /* Orange doux */
}

/* Couleurs personnalisées pour les stages */
.timeline-block.stage:nth-child(1) {
    background-color: #FCE38A; /* Jaune clair */
}

.timeline-block.stage:nth-child(3) {
    background-color: #95D1CC; /* Vert d'eau */
}

.timeline-block.stage:nth-child(4) {
    background-color: #D4A5A5; /* Rose tendre */
}

.timeline-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}
/* Section d'introduction */
.intro-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0);
    gap: 40px;
    margin: 50px auto;
    max-width: 1200px;
    padding: 20px;
}

.carousel {
    position: relative;
    width: 300px;
    height: 450px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* Toutes les images sont invisibles par défaut */
    transition: opacity 0.5s ease-in-out; /* Transition pour rendre le changement fluide */
}

.carousel img.active {
    opacity: 1; /* L'image active est immédiatement visible */
    z-index: 1; /* S'assure qu'elle est au-dessus des autres images */
}


/* Activity Grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Deux colonnes */
    gap: 15px; /* Réduire l'espacement entre les blocs */
    margin: 20px auto;
    max-width: 600px; /* Réduire la largeur maximale */
    padding: 10px;
}

/* Bloc descriptif */
.activity-grid .description-block {
    grid-column: span 2; /* Prend toute la largeur */
    background-color: rgba(255, 255, 255, 0.1); /* Fond semi-transparent */
    padding: 15px;
    border-radius: 10px; /* Bord arrondi */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Effet d'ombre */
    text-align: center;
    font-size: 0.9rem; /* Texte plus petit */
    color: #FFFFFF;
    font-weight: 500;
    line-height: 1.4;
}

.activity-block {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centre verticalement */
    align-items: center; /* Centre horizontalement */
    background-color: #1E2D3D; /* Fond sombre pour cohérence */
    border-radius: 10px; /* Bord arrondi */
    padding: 10px;
    height: 120px; /* Hauteur fixe pour uniformité */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); /* Ombre pour faire ressortir */
    text-align: center; /* Centre le texte dans le bloc */
    font-size: 1rem; /* Texte plus petit */
    font-weight: 500;
    color: #FFFFFF;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-block h3 {
    font-size: 1.3rem; /* Taille du titre */
    margin-bottom: 5px;
    font-weight: bold;
    color: #FFD700; /* Couleur dorée pour le titre */
}

.activity-block p {
    font-size: 1rem; /* Texte descriptif plus petit */
    margin: 0;
    line-height: 1.2;
}


.activity-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6); /* Effet d'ombre plus prononcé au survol */
}

/* Bloc descriptif */
.activity-grid .description-block {
    grid-column: span 2; /* Prend toute la largeur */
    background-color: rgba(255, 255, 255, 0.1); /* Fond semi-transparent */
    padding: 15px;
    border-radius: 10px; /* Bord arrondi */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Effet d'ombre */
    text-align: center;
    font-size: 1rem; /* Texte plus petit */
    color: #FFFFFF;
    font-weight: 500;
    line-height: 1.4;
}

.cv-container {
    text-align: center;
    margin-top: 20px; /* Espace entre le carrousel et le bouton */
}

.cv-button {
    display: inline-block;
    background-color: #FFD700;
    color: #1E2D3D;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    text-align: center;
    font-size: 0.9rem;
}

.cv-button:hover {
    background-color: #FFC107;
    transform: translateY(-3px);
}

/* Responsive - Ajustement pour petits écrans */
@media (max-width: 576px) {
    .activity-grid {
        grid-template-columns: 1fr; /* Une colonne sur mobile */
    }

    .activity-grid .description-block {
        grid-column: span 1; /* S'adapte à une seule colonne */
    }

    .activity-block {
        height: auto; /* Hauteur flexible sur mobile */
        padding: 10px;
    }

    .nav-bar {
        display: none;
    }

    /* Affiche le menu mobile */
    .nav-bar-mobile {
        display: flex;
    }

    /* Affiche le bouton toggle */
    .menu-toggle {
        display: flex;
    }

    /* Affiche le bouton close */
    .close-menu {
        display: block;
    }
}



/* Responsive Design */
@media (max-width: 768px) {
    body.no-scroll {
        overflow: hidden; /* Empêche le défilement */
    }
    .nav-bar {
        display: none;
    }

    /* Affiche le menu mobile */
    .nav-bar-mobile {
        display: flex;
    }

    /* Affiche le bouton toggle */
    .menu-toggle {
        display: flex;
    }

    /* Affiche le bouton close */
    .close-menu {
        display: block;
    }

    .intro-section {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .carousel {
        width: 90%;
    }

    .activity-grid {
        grid-template-columns: 1fr; /* Une colonne sur mobile */
    }

    .activity-grid .description-block {
        grid-column: span 1; /* S'adapte à une seule colonne */
    }

    .activity-block {
        height: auto; /* Hauteur flexible sur mobile */
        padding: 10px;
    }
}


/* Masquer la version PC sur mobile */
.pc-version {
    display: block;
}
.mobile-version {
    display: none;
}

/* Version mobile améliorée avec des blocs plus larges */
@media (max-width: 768px) {
    .pc-version {
        display: none; /* Masquer la version PC */
    }

    .mobile-version {
        display: flex;
        flex-direction: column;
        gap: 30px; /* Espacement entre les items */
        margin-top: 70px; /* Décalage pour dégager l'entête */
        padding: 0 15px;
    }

    /* Conteneur des éléments (Établissement + Stage) */
    .timeline-item {
        display: flex;

        gap: 15px; /* Espacement entre établissement et stage */
        border-left: 4px solid rgba(255, 255, 255, 0.3);
        padding-left: 30px;
        padding-right: 30px;
        position: relative;
    }

    /* Point de connexion */
    .timeline-item::before {
        content: '';
        position: absolute;
        left: -10px;
        top: 10px;
        width: 16px;
        height: 16px;
        background-color: #FFD700;
        border: 3px solid #FFFFFF;
        border-radius: 50%;
        z-index: 1;
    }

    /* Blocs plus larges */
    .timeline-block {
        background-color: rgba(255, 255, 255, 0.1);
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        text-align: left; /* Assure que le texte est lisible */
        width: calc(100% - 30px); /* Largeur ajustée pour mobile */
        margin-left: 15px;
    }

    .timeline-block.establishment p {
        display: block; /* Assure que le texte est affiché */
        font-size: 0.8rem; /* Taille légèrement augmentée pour la lisibilité */
        margin: 5px 0 0; /* Ajout d'un espacement pour dégager les années */
        line-height: 1.4; /* Espacement vertical */
    }
    

    .timeline-block.stage p {
        display: block; /* S'assure que le paragraphe est affiché */
        color: #1E2D3D; /* Couleur sombre pour la lisibilité */
        font-size: 0.8rem;
        margin: 0;
        line-height: 1.5; /* Espacement vertical du texte */
    }
    
    

    /* Stage vide */
    .timeline-block.stage.empty {
        background-color: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.5);
        font-style: italic;
    }

    .timeline-block h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .timeline-block p {
        font-size: 0.8rem;
        margin: 0;
        line-height: 1.6;
    }

    /* Réduction sur très petits écrans */
    @media (max-width: 576px) {
        .timeline-item {
            gap: 10px;
        }

        .timeline-block {
            padding: 18px;
        }

        .timeline-block h3 {
            font-size: 1.3rem;
        }

        .timeline-block p {
            font-size: 1rem;
        }
    }
}

