/* =====================================================================
   Galerie thematique medias (restaurants / activites / cabines)
   Mur "masonry" melant formats 16:9 (videos) et 9:16 (shorts),
   facon Instagram / YouTube. Independant de "Hub Photos".
   ===================================================================== */

.hub-gallery { padding: 28px 0 36px; }
.hub-gallery .hg-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.hub-gallery .hg-title {
    font-size: 1.5rem; font-weight: 700; margin: 0; color: #1a1d21;
}
.hub-gallery .hg-title i { color: #ff6300; margin-right: 6px; }

.hub-gallery .hg-subscribe-top {
    display: inline-flex; align-items: center; gap: 8px;
    background: #ff0000; color: #fff; font-weight: 600; font-size: .9rem;
    padding: 8px 16px; border-radius: 50px; text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.hub-gallery .hg-subscribe-top:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255,0,0,.35); color:#fff; }

/* --- Mur masonry en colonnes (pas de trous, melange des ratios) --- */
.hub-gallery .hg-grid { column-count: 4; column-gap: 14px; }
@media (max-width: 1200px) { .hub-gallery .hg-grid { column-count: 3; } }
@media (max-width: 768px)  { .hub-gallery .hg-grid { column-count: 2; } }
@media (max-width: 420px)  { .hub-gallery .hg-grid { column-count: 1; } }

.hub-gallery .hg-item {
    break-inside: avoid; -webkit-column-break-inside: avoid;
    width: 100%; margin: 0 0 14px; display: inline-block;
}
.hub-gallery .hg-hidden { display: none; }

.hub-gallery .hg-media {
    position: relative; display: block; width: 100%; padding: 0; border: 0;
    overflow: hidden; border-radius: 14px; background: #0e1014; cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
}
.hub-gallery .hg-landscape .hg-media { aspect-ratio: 16 / 9; }
.hub-gallery .hg-portrait  .hg-media { aspect-ratio: 9 / 16; }
.hub-gallery .hg-media img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .35s ease;
}
.hub-gallery .hg-media:hover img { transform: scale(1.04); }

/* Overlay play + badge YouTube pour les videos */
.hub-gallery .hg-play {
    position: absolute; inset: 0; margin: auto; width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.55); border-radius: 50%; color: #fff; font-size: 1.4rem;
    transition: background .2s ease, transform .2s ease;
}
.hub-gallery .hg-video:hover .hg-play { background: #ff0000; transform: scale(1.08); }
.hub-gallery .hg-badge-yt {
    position: absolute; top: 10px; right: 10px; color: #fff; font-size: 1.25rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}
.hub-gallery .hg-badge-yt i { color: #ff0000; }

/* Meta sous chaque media */
.hub-gallery .hg-meta { padding: 8px 4px 2px; }
.hub-gallery .hg-cap {
    display: block; font-size: .92rem; font-weight: 600; color: #23262b;
    line-height: 1.3; margin-bottom: 6px;
}
.hub-gallery .hg-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.hub-gallery .hg-like {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 0; padding: 0; cursor: pointer;
    color: #65676b; font-size: .9rem; font-weight: 600; transition: color .15s ease;
}
.hub-gallery .hg-like:hover { color: #ff0000; }
.hub-gallery .hg-like.liked { color: #ff0000; }
.hub-gallery .hg-like i { font-size: 1rem; }

.hub-gallery .hg-views {
    display: inline-flex; align-items: center; gap: 6px;
    color: #8a8d91; font-size: .9rem;
}
.hub-gallery .hg-sub {
    display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
    color: #ff0000; font-size: .82rem; font-weight: 600; text-decoration: none;
}
.hub-gallery .hg-sub:hover { text-decoration: underline; color:#ff0000; }

/* Bouton "Voir plus" */
.hub-gallery .hg-more-wrap { text-align: center; margin-top: 18px; }
.hub-gallery .hg-more {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #d7dadd; border-radius: 50px;
    padding: 11px 26px; font-weight: 600; color: #1a1d21; cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.hub-gallery .hg-more:hover { background: #f2f3f5; border-color: #b9bec3; }

/* --- Lightbox --- */
.hub-gallery .hg-lightbox {
    position: fixed; inset: 0; z-index: 1090; display: none;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,.92); padding: 4vh 4vw;
}
.hub-gallery .hg-lightbox.open { display: flex; }
.hub-gallery .hg-lb-figure { margin: 0; max-width: 92vw; max-height: 90vh; text-align: center; }
.hub-gallery .hg-lb-img {
    max-width: 92vw; max-height: 80vh; width: auto; height: auto;
    border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.hub-gallery .hg-lb-cap { color: #eee; margin-top: 12px; font-size: 1rem; }
.hub-gallery .hg-lb-close,
.hub-gallery .hg-lb-prev,
.hub-gallery .hg-lb-next {
    position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0;
    width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 1.3rem;
    display: flex; align-items: center; justify-content: center; transition: background .2s ease;
}
.hub-gallery .hg-lb-close { top: 20px; right: 24px; }
.hub-gallery .hg-lb-prev  { left: 18px; top: 50%; transform: translateY(-50%); }
.hub-gallery .hg-lb-next  { right: 18px; top: 50%; transform: translateY(-50%); }
.hub-gallery .hg-lb-close:hover,
.hub-gallery .hg-lb-prev:hover,
.hub-gallery .hg-lb-next:hover { background: rgba(255,255,255,.28); }
@media (max-width: 600px) {
    .hub-gallery .hg-lb-prev { left: 6px; }
    .hub-gallery .hg-lb-next { right: 6px; }
}
