/* Reset et styles de base */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* En-tête */
header {
    text-align: center;
    padding: 10px;
    background-color: #fff;
}

.banner-container {
    width: 100%;
    overflow: hidden;
}

.banner {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
}


.button-container {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.button:hover {
    background-color: #0056b3;
}

/* Conteneur principal avec colonne latérale et galerie */
.main-container {
    display: flex;
    padding: 20px;
    gap: 20px;
}

/* Colonne latérale */
.sidebar {
    width: 200px;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    margin-top: 0;
    text-align: center;
    color: #333;
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-button {
    display: block;
    padding: 10px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}


.sidebar-button:hover {
    background-color: #e0e0e0;
}

/* Galerie */
main {
    flex: 1;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.folder-item {
    width: 150px;
    text-align: center;
    cursor: pointer;
}

.folder-link {
    display: block;
}

.folder-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.folder-name {
    margin: 5px 0 0;
    font-weight: bold;
}

/* Slider */
.slider-title {
    text-align: center;
    color: #333;
}

.slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    display: none;
}

.slide img, .slide video {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
}

.slider-nav.prev {
    left: 10px;
}

.slider-nav.next {
    right: 10px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 5px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
}

.dot.active {
    background-color: #333;
}

.back-button {
    display: block;
    text-align: center;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.back-button:hover {
    background-color: #555;
}

/*---------------*/

/* Modale pour les PDFs (plein écran) */
#pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    color: white;
}

/* En-tête de la modale */
#pdf-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #222;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#pdf-title {
    margin: 0;
    font-size: 1.5em;
    color: white;
    flex: 1; /* Permet au titre de prendre l'espace disponible */
    text-align: center; /* Centre le titre */
}

#close-pdf {
    background: none;
    border: none;
    color: white;
    font-size: 1.8em; /* Légèrement réduit pour éviter le débordement */
    cursor: pointer;
    padding: 0 10px;
    margin-left: auto; /* Force le bouton à droite */
    order: 2; /* Assure que le bouton reste à droite */
}

/* Barre d'outils pour le PDF */
#pdf-toolbar {
    display: flex;
    justify-content: flex-end; /* Aligne les éléments à droite */
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#pdf-toolbar button, #pdf-toolbar a {
    background-color: #444;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

#close-pdf {
    background: none;
    border: 1px solid #555;
    color: white;
    font-size: 1.2em; /* Taille ajustée pour la barre d'outils */
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
}

#close-pdf:hover {
    background-color: #555;
}

#pdf-page-info {
    font-size: 16px;
    color: white;
    min-width: 80px;
    text-align: center;
}

/* Conteneur du PDF (plein écran) */
#pdf-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
    background-color: #222;
}

#pdf-canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background-color: white;
}
/*------------/*

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .gallery {
        gap: 10px;
    }

    .folder-item {
        width: 120px;
    }

    .slider-nav {
        padding: 8px 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .folder-item {
        width: 100px;
    }

    .folder-image {
        height: 100px;
    }
}