/*--Projet--*/

.gallery-de-projet {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 colonnes */
    gap: 15px;
    /* Espacement entre les images */
    justify-content: center;
    /* Centre la grille */
    max-width: 100em;
    /* Ajuste la largeur */
    margin: auto;
    /* Centre la galerie */
    padding: 20px;
}
/* ---- Conteneur de la carte ---- */
.flip-card {
    width: auto;
    height: 400px;
    perspective: 1000px; /* Profondeur 3D */
}

/* Partie intérieure avec animation */
.flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

/* Effet flip au survol */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Faces de la carte */
.flip-card-front,
.flip-card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden; /* Cache le débordement des images */
}

/* Image sur les deux faces */
.flip-card-front img,
.flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajuste l'image pour couvrir toute la carte */
}

/* Face arrière avec rotation */
.flip-card-back {
    transform: rotateY(180deg);
}

/* ---- Overlay sombre sur la face arrière ---- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Voile noir avec 60% d'opacité */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Bouton centré ---- */
.btn {
    background-color: var(--my-green);
    color: black;
    padding: 10px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.3s, transform 0.2s;
}

/* Effet au survol */
.btn:hover {
    background-color: white;
    transform: scale(1.1);
}


/* ---- Titre fixe sous la carte ---- */
.card-title {
    font-size: 1.5rem;
    color: white;
    text-align: center;
    font-weight: bold;
    margin-left: 0;
    margin-top: 1em;
}
@media (max-width: 768px){
    .gallery-de-projet{
        grid-template-columns: repeat(1, 1fr);

    }
    .flip-card{
        height: 300px;
    }
}