body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

#projets {
    padding: 60px 20px;
    text-align: center;
}

.titre-section {
    font-size: 2.5rem;
    margin-bottom: 60px;
    font-weight: 700;
}

.grille-projets {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.carte-projet {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.image-projet {
    position: relative; /* Important pour overlay */
    width: 80%;
    margin-left: 9%;
    aspect-ratio: 1.4 / 1;
    border-radius: 25px;
    overflow: hidden;
    background-color: #ddd;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease; /* Pour effet scale au hover */
}

.image-projet:hover {
    transform: scale(1.05); /* Légère mise à l’échelle au survol */
}

.image-projet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 25px;
    display: block;
}

/* Overlay "Voir plus" */
.image-projet .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.image-projet:hover .overlay {
    background-color: rgba(0,0,0,0.25);
    opacity: 1;
    pointer-events: auto;
}

.image-projet .overlay a {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    background-color: rgba(0,0,0,0.6);
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.image-projet .overlay a:hover {
    background-color: rgba(0,0,0,0.8);
}

.texte-projet {
    margin-top: 30px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    color: #333;
    text-align: left;
    line-height: 1.6;
}

/* Modale */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    display: none; /* cachée par défaut */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal img.modal-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* Croix fermeture */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    user-select: none;
    z-index: 1101;
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.close-btn:hover {
    background: rgba(0,0,0,0.8);
    color: #fff;
}

.back-link {
    position: relative;
    top: 30px;
    left: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    padding: 6px 12px;
    z-index: 1200;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100vh;
    background: #E5E1DC;
    top: 0;
    left: 0;
    z-index: -1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-bottom {
    animation: fadeInUp 1s ease-out forwards;
}

#plu {
    margin-top: 50px;
    margin-left: 102px;
}