* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1E2D3D;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    margin-top: 60px; /* Compense la hauteur du header */
}


.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 */
}


.projects-section {
    padding: 120px 20px;
    margin-top: 40px;
    text-align: center;
    color: #FFFFFF;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-items: center;
}

.project-card {
    background-color: #2A3B4D;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    padding-bottom: 25px; /* Augmente l'espace en bas de la carte */
    text-align: center;
    color: #FFFFFF;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    width: 100%; /* Garde la largeur automatique */
    margin-bottom: 60px;
}


.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.project-image {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.project-description {
    font-size: 0.95rem;
    margin-bottom: 20px; /* Augmente la marge pour éloigner le texte du bouton */
    color: #D3D3D3;
    text-align: center;
}


.project-button {
    background-color: #FFD700;
    color: #1E2D3D;
    padding: 8px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
    margin-top: 15px; /* Espacement entre le texte et le bouton */
    margin-bottom: 20px; /* Augmente l'espace en bas de la carte */
}


.project-button:hover {
    background-color: #FFFFFF;
    color: #1E2D3D;
}

/* Ajout des formes de fond */
.square-shape {
    position: absolute;
    z-index: -1; /* Toujours derrière */
    opacity: 0.1;
    border-radius: 5px;
    will-change: transform;
    animation: float 15s infinite alternate;
}

.square-1 {
    width: 150px;
    height: 150px;
    background-color: #FFD700;
    top: 5%;
    left: 10%;
}

.square-2 {
    width: 130px;
    height: 130px;
    background-color: #5A89FF;
    top: 50%;
    right: 5%;
}

.square-3 {
    width: 110px;
    height: 110px;
    background-color: #FF5733;
    bottom: 15%;
    left: 15%;
}

.square-4 {
    width: 100px;
    height: 100px;
    background-color: #33FF57;
    top: 15%;
    right: 20%;
}

.square-5 {
    width: 140px;
    height: 140px;
    background-color: #FFFFFF;
    bottom: 10%;
    right: 10%;
}

.square-6 {
    width: 90px;
    height: 90px;
    background-color: #FF33A6;
    top: 30%;
    left: 5%;
}

.square-7 {
    width: 120px;
    height: 120px;
    background-color: #33C1FF;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
}



@keyframes float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-15px);
    }
}

/* Logo LinkedIn */
.linkedin-link {
    margin-top: 15px; /* Espacement par rapport au bouton CV */
    text-align: center; /* Centrer le logo */
}

.linkedin-logo {
    width: 40px; /* Taille du logo */
    height: 40px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.linkedin-logo:hover {
    transform: scale(1.1); /* Légère animation de zoom */
    opacity: 0.8;
}

.project-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
    padding: 5px 15px;
    font-size: 0.8rem;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.project-year {
    font-style: italic;
}

.project-type {
    font-weight: bold;
}

/* 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;
}

.project-card.invisible {
    visibility: hidden; /* La carte reste dans le flux, mais son contenu n'est pas visible */
    pointer-events: none; /* (Optionnel) Désactive les interactions */
}

/* Style pour les titres <h2> */
h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
    margin: 40px auto;
    position: relative;
  }
  
  /* Ajout d'un soulignement décoratif */
  h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    margin: 10px auto 0;
  }

  
/* Responsive Design */
@media (max-width: 768px) {

    .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;
    }
    .projects-section {
        padding: 100px 20px;
    }
}

@media (max-width: 480px) {
    .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;
    }

    body.no-scroll {
        overflow: hidden; /* Empêche le défilement */
    }
    
    .menu-toggle {
        display: flex; /* Assure que le bouton est affiché */
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        height: 25px;
        width: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
        position: relative; /* S'assure qu'il reste dans le header */
    }
    
    .menu-bar {
        width: 30px;
        height: 3px;
        background-color: #ffffff; /* Couleur blanche pour contraster */
        border-radius: 5px;
        transition: all 0.3s ease;
    }
    
    /* Nav-bar prend tout l'écran */
    .nav-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.9); /* Fond sombre */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0; /* Caché par défaut */
        pointer-events: none; /* Désactive les clics */
        transition: opacity 0.3s ease-in-out;
    }
    

    
    .nav-bar.menu-active {
        opacity: 1; /* Affiche le menu */
        pointer-events: auto; /* Active les clics */
    }
    
    .nav-bar a {
        font-size: 1.2rem; /* Taille des liens */
        margin: 20px 0;
        color: #ffffff;
        text-decoration: none;
        transition: color 0.3s;
    }
    
    .nav-bar a:hover {
        color: #FFD700; /* Couleur au survol */
    }
    
    .projects-section {
        padding: 100px 20px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-title {
        font-size: 1.2rem;
    }

    .project-description {
        font-size: 0.85rem;
    }
}

