/* Style général pour la section des projets */
.projets-section {
    margin: 40px auto;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    box-shadow: 0px 0px 10px rgba(255,255,255,0.2);
    max-width: 1100px;
}

.projets-section h2 {
    color: #007bff;
    text-align: center;
}

.projets-section p {
    color: white;
    text-align: center;
    line-height: 1.6;
    font-size: 1rem;
}

/* Grille 2 colonnes pour les projets */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Carte projet */
.projet-card {
    background: rgba(0,0,0,0.7);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.projet-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0,123,255,0.18);
}

/* Style commun pour toutes les images zoomables */
.zoomable-image {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
    background: #222;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: zoom-in;
}

/* Correction pour le screenshot vertical du projet 4 */
.projet4-img {
    aspect-ratio: 9/16 !important;   /* Format téléphone vertical */
    object-fit: cover;
    max-width: 220px;
    max-height: 400px;
    background: #222;
    margin-bottom: 1rem;
    border-radius: 4px;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: zoom-in;
}

/* Titres et textes */
.projet-card h3 {
    margin: 0.5rem 0;
    color: #007bff;
    text-align: center;
}

.projet-card p {
    margin: 0.5rem 0 0 0;
    text-align: center;
    color: #f2f2f2;
}

/* Responsive : 1 colonne sur mobile */
@media (max-width: 900px) {
    .projets-grid {
        grid-template-columns: 1fr;
    }
    .zoomable-image,
    .projet4-img {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .zoomable-image,
    .projet4-img {
        max-width: 90vw;
        max-height: 60vh;
    }
}

/* Lightbox styles */
#lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox.lightbox-visible {
    visibility: visible;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img,
#lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 0 32px 8px #000;
    background: #222;
}

#lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #007bff;
    border: none;
    color: white;
    font-size: 2rem;
    line-height: 1;
    padding: 0 10px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px #007bffaa;
    transition: background 0.3s ease;
}

#lightbox-close:hover {
    background: #0056b3;
}
