/* ============================================================
   Galerie photo EPN de Seilles — Styles premium
   Fichier externe : pas de bug LiteSpeed sur @media
   ============================================================ */

/* ── Reset page ── */
.page-id-13637 .entry-title { display: none; }

/* ── Hero banner ── */
.epn-gallery-hero {
    background: linear-gradient(135deg, #0d1f3c 0%, #1a4a8f 55%, #0e7ac7 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(13,31,60,.35);
}
.epn-gallery-hero-inner {
    position: relative;
    z-index: 2;
    padding: 2.75rem 2rem 2.25rem;
    text-align: center;
}
.epn-gallery-hero-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 0.6rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}

/* Titre : spécificité maximale pour écraser GeneratePress */
.epn-gallery-hero .epn-gallery-hero-title,
body .epn-gallery-hero .epn-gallery-hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Sous-titre */
.epn-gallery-hero .epn-gallery-hero-subtitle,
body .epn-gallery-hero .epn-gallery-hero-subtitle {
    font-size: 1rem;
    color: rgba(220, 235, 255, 0.92);
    margin: 0;
    font-weight: 400;
}

/* ── Barre de stats ── */
.epn-gallery-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding: 0.9rem 1.5rem;
    background: #edf4fc;
    border: 1px solid #cce0f5;
    border-radius: 8px;
    margin-bottom: 1.75rem;
}
.epn-stat {
    font-size: 0.95rem;
    color: #1a3a6e;
    font-weight: 500;
}
.epn-stat strong {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0e5daa;
}
.epn-stat-sep {
    color: #a8c4e0;
    font-size: 1.2rem;
    font-weight: 300;
}

/* ── Navigation par période ── */
.epn-gallery-nav {
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 10px;
    padding: 1.1rem 1.4rem 1.3rem;
    margin-bottom: 2rem;
}
.epn-gallery-nav-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #7a94b0;
    margin: 0 0 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.epn-gallery-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.epn-gallery-nav-buttons li {
    margin: 0;
    padding: 0;
}
/* Compteur de photos dans le bouton */
.epn-gal-nav-count {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.75;
}

/* Boutons années sans photos (futures) */
span.epn-gal-nav-empty {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: #f4f7fa;
    color: #b0c0d0;
    border: 1px dashed #d0dce8;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.5;
    cursor: default;
    user-select: none;
}

/* Indication sous la liste des années */
.epn-gallery-nav-hint {
    font-size: 0.75rem;
    color: #9ab0c8;
    margin: 0.6rem 0 0;
    font-style: italic;
}

a.epn-gal-nav-btn {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: #e4f0fb;
    color: #0e4a8f;
    border: 1px solid #b8d6f0;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.5;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}
a.epn-gal-nav-btn:hover,
a.epn-gal-nav-btn:focus {
    background: #0e4a8f;
    color: #ffffff;
    border-color: #0e4a8f;
    text-decoration: none;
    outline: none;
}
a.epn-gal-nav-btn:focus-visible {
    outline: 3px solid #f5a623;
    outline-offset: 2px;
}

/* ── Section diaporama ── */
.epn-gallery-slideshow-section {
    margin-bottom: 2.5rem;
}

/* ── Sections par période ── */
.epn-gallery-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 80px;
}
h2.epn-gallery-year-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0d1f3c;
    border-left: 4px solid #0e7ac7;
    padding: 0.3rem 0 0.3rem 0.9rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #edf4fc 0%, transparent 80%);
    border-radius: 0 6px 6px 0;
}
.epn-gal-count {
    font-size: 0.85rem;
    font-weight: 400;
    color: #5c7ea0;
}

a.epn-gal-back-top {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0e4a8f;
    background: #e4f0fb;
    border: 1px solid #b8d6f0;
    border-radius: 15px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
}
a.epn-gal-back-top:hover {
    background: #0e4a8f;
    color: #fff;
    text-decoration: none;
}
a.epn-gal-back-top:focus-visible {
    outline: 3px solid #f5a623;
    outline-offset: 2px;
}

/* ── NGG thumbnails ── */
.epn-gallery-section .ngg-galleryoverview,
.epn-gallery-slideshow-section .ngg-galleryoverview {
    margin: 0;
}
.ngg-gallery-thumbnail-box {
    border-radius: 7px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ngg-gallery-thumbnail-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
.ngg-gallery-thumbnail img {
    border-radius: 6px;
    width: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.ngg-gallery-thumbnail a:hover img { opacity: 0.88; }
.ngg-gallery-thumbnail a:focus-visible {
    outline: 3px solid #0e7ac7;
    outline-offset: 2px;
    border-radius: 6px;
}

/* ── NGG pagination ── */
.ngg-navigation {
    margin-top: 1rem;
    text-align: left;
}
.ngg-navigation a,
.ngg-navigation .current {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin: 0.1rem;
}
.ngg-navigation a {
    background: #e4f0fb;
    color: #0e4a8f;
    border: 1px solid #b8d6f0;
}
.ngg-navigation a:hover {
    background: #0e4a8f;
    color: #fff;
}
.ngg-navigation .current {
    background: #0e4a8f;
    color: #fff;
    border: 1px solid #0e4a8f;
}

/* ── Slideshow NGG ── */
.ngg-slideshow-container { border-radius: 10px; overflow: hidden; }

/* ============================================================
   RESPONSIVE — Smartphones
   ============================================================ */
@media (max-width: 768px) {
    .epn-gallery-hero-inner { padding: 1.8rem 1.2rem 1.5rem; }

    .epn-gallery-hero .epn-gallery-hero-title,
    body .epn-gallery-hero .epn-gallery-hero-title {
        font-size: 1.4rem;
    }
    .epn-gallery-hero .epn-gallery-hero-subtitle,
    body .epn-gallery-hero .epn-gallery-hero-subtitle {
        font-size: 0.9rem;
    }
    .epn-gallery-hero-icon { font-size: 2rem; }

    .epn-gallery-stats {
        gap: 0.5rem 1rem;
        padding: 0.75rem 1rem;
    }
    .epn-stat { font-size: 0.88rem; }
    .epn-stat strong { font-size: 1.1rem; }

    .epn-gallery-nav { padding: 0.9rem 1rem 1rem; }
    .epn-gallery-nav-buttons { gap: 0.4rem; }
    a.epn-gal-nav-btn { font-size: 0.76rem; padding: 0.3rem 0.7rem; }

    h2.epn-gallery-year-title { font-size: 1.1rem; }

    /* 2 colonnes de vignettes sur mobile */
    .ngg-gallery-thumbnail-box {
        width: calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
    }
}

@media (max-width: 480px) {
    .epn-gallery-hero .epn-gallery-hero-title,
    body .epn-gallery-hero .epn-gallery-hero-title {
        font-size: 1.2rem;
    }
    .epn-stat-sep { display: none; }
    .epn-gallery-stats { flex-direction: column; gap: 0.3rem; text-align: center; }

    /* Toujours 2 colonnes, légèrement plus serrées */
    .ngg-gallery-thumbnail-box {
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
    }
}
