body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    text-align: center;
    background-color: #333;
    color: #fff;
    padding: 20px 0;
}

.realisations {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Maximum de 3 colonnes */
    gap: 20px; /* Espacement entre les projets */
    padding: 20px;
    margin: 90px;
}

.realisation {
    text-align: center;
    border: 2px solid #ccc;
    background-color: rgb(22, 56, 54);
    border-radius: 8px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.8);
    padding: 30px;
}

.realisation img {
    width: 90%;
    border-radius: 8px;
}

.voir-plus {
    background-color: #00836d;
    color: white;
    border: none;
    padding: 20px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
}

.voir-plus:hover {
    background-color: #005e4e;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #005e4e;
}

.modal-content {
    position: fixed; /* Toujours visible à l'écran */
    top: 50%; /* Positionne le centre verticalement */
    left: 50%; /* Positionne le centre horizontalement */
    transform: translate(-50%, -50%); /* Recentre la modale */
    padding: 20px;
    width: 90%; /* Largeur maximale relative à l'écran */
    max-width: 600px; /* Largeur maximale fixe */
    max-height: 90%; /* Empêche la modale de dépasser l'écran en hauteur */
    overflow-y: auto; /* Ajoute une barre de défilement interne si nécessaire */
    background: #005e4e;
    border-radius: 8px;
    text-align: center;
}

.modal a {
    color: rgb(83, 215, 255);
}


.close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: rgb(255, 255, 255);
    font-size: 24px;
    cursor: pointer;
    background-color: rgb(26, 26, 26);
    width: 30px;
    height: 30px;
    text-align: center;
    border-radius: 50%;
}

.close:hover {
    position: absolute;
    top: 10px;
    right: 15px;
    color: rgb(255, 255, 255);
    font-size: 24px;
    cursor: pointer;
    background-color: rgb(0, 0, 0);
    width: 30px;
    height: 30px;
    text-align: center;
    border-radius: 50%;
}

.gallery img {
    width: 100%;
    display: none;
}

.gallery img.active {
    display: block;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: black;
    background: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* 16:9 */
.image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    border-radius: 8px;
}


.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}


.logos {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.logos img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 5px;
}

@media (max-width: 870px) {
    .realisations {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 650px) {
    .realisations {
        grid-template-columns: 1fr;
    }
}
