/* ============================================================
   DIAPORAMA — lecteur plein écran manuel
   Note : base.css définit un style global sur "button"
   (position: fixed, right: 0, width: 80px, font-size: 25px...).
   Il est neutralisé ci-dessous pour les boutons du diaporama.
============================================================ */

/* ---------- Bouton de lancement (dans la galerie) ---------- */
.diaporama-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.diaporama-launch {
    display: inline-block;
    padding: 8px 22px;
    background: #2e7d32;
    color: #fff;
    font-size: 0.9em;
    border-radius: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s;
}
.diaporama-launch:hover {
    background: #1b5e20;
    color: #fff; /* évite le gris de a:hover (base.css) */
}

/* ---------- Lecteur plein écran ---------- */
body.diaporama-open { overflow: hidden; }

.diaporama {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10002; /* au-dessus du menu hamburger (10001) */
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: verdana, Arial, Helvetica, sans-serif; /* overlay hors <body> : pas d'héritage */
}
.diaporama[hidden] { display: none; }

.diaporama-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.diaporama-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: opacity .35s ease;
}
.diaporama-stage img.fade { opacity: 0; }

/* Reset du style global "button" de base.css */
.diaporama button {
    position: static;
    width: auto;
    margin: 0;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: normal;
    color: #fff;
    background: rgba(255, 255, 255, .15);
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
}
.diaporama button:hover { background: rgba(255, 255, 255, .3); }

.diaporama-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
    z-index: 2;
}
.diaporama-topbar-right { display: flex; gap: 10px; align-items: center; }

.diaporama .diaporama-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    line-height: 1;
    padding: 8px 16px;
    z-index: 2;
}
.diaporama .diaporama-prev { left: 12px; right: auto; }
.diaporama .diaporama-next { right: 12px; left: auto; }

/* Nom du fichier (galerie des expositions) */
.diaporama-nom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 14px 16px;
    text-align: center;
    font-size: 0.95rem;
    background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
    z-index: 2;
    pointer-events: none;
}
.diaporama-nom:empty { display: none; }

@media (max-width: 600px) {
    .diaporama .diaporama-nav { font-size: 2rem; padding: 6px 12px; }
}