.pdf-box {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.pdf-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajuste l'image pour qu'elle remplisse le conteneur */
    transition: opacity 0.3s;
}

.pdf-box .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}

.pdf-box:hover .overlay {
    opacity: 1;
}

.pdf-box:hover img {
    opacity: 0.5;
}

h1 {
    margin-bottom: 20px;
}

.pdf-container {
    display: flex;
    justify-content: center; /* Centre les éléments horizontalement */
    gap: 30px; /* Espacement entre les PDF */
    flex-wrap: wrap; /* Permet d'éviter les soucis sur petits écrans */
    text-align: center; /* Centrage du texte */
}

.pdf-item {
    display: flex;
    flex-direction: column; /* Met le PDF au-dessus de la légende */
    align-items: center; /* Centre le PDF et la légende */
    width: 45%; /* Chaque élément prend 45% de la largeur */
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    width: 80%;
    height: 80%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content iframe {
    width: 100%;
    height: 100%;
}

.close {
    position: absolute;
    top: -15px;
    right: 0px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Empêcher les bugs d'affichage du PDF sur mobile */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        height: 90%;
    }

    /* Cache le lecteur PDF sur mobile */
    #pdfFrame {
        display: none;
    }

    /* Ajoute un bouton de téléchargement sur mobile */
    .download-btn {
        display: block;
        text-align: center;
        padding: 10px;
        background: #2c3e50;
        color: white;
        text-decoration: none;
        border-radius: 5px;
        margin-top: 10px;
    }
}

