/* ================================
   CONFIGURATION FACILE À MODIFIER
   ================================ */

/* Taille des vignettes */
:root {
    --thumb-width: 150px;   /* largeur des vignettes */
    --thumb-height: 100px;  /* hauteur des vignettes */

    --viewer-width: 1080px; /* largeur du rectangle d'affichage */
    --viewer-height: 720px; /* hauteur du rectangle d'affichage */

    --viewer-bg: #000;      /* couleur de fond du diaporama */
}

/* ================================
   STYLE DE LA GALERIE
   ================================ */

body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
}

.thumb {
    width: var(--thumb-width);
    height: var(--thumb-height);
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #ccc;
    transition: 0.2s;
}

.thumb:hover {
    border-color: #000;
}

/* ================================
   LIGHTBOX / DIAPORAMA
   ================================ */

#lightbox {
    display: none; /* affiché via JS */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

#viewer {
    width: var(--viewer-width);
    height: var(--viewer-height);
    background: var(--viewer-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#viewer img {
    max-width: 100%;
    max-height: 100%;
}

#close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    user-select: none;
    z-index: 30; /* plus haut que prev/next */
}

#prev, #next {
    position: absolute;
    top: 0;
    width: 30%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    background: rgba(0,0,0,0);
}

#prev {
    left: 0;
}

#next {
    right: 0;
}



