/* ========================================================
   PAGE GALERIE — Template standalone
   ======================================================== */
.pg-gal {
    font-family: 'Poppins', sans-serif;
    color: #2D2D2D;
    overflow-x: hidden;
}

/* ===== HERO ===== */
.pg-gal__hero {
    background: linear-gradient(135deg, #EF1286 0%, #2D53CB 60%, #694DDA 100%);
    padding: 90px 40px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.pg-gal__hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.pg-gal__hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -40px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}
.pg-gal__hero-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
}
.pg-gal__hero-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
}
.pg-gal__hero-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.75;
    position: relative;
    z-index: 1;
}

/* ===== FILTRES CATÉGORIES ===== */
.pg-gal__filters {
    background: #fff;
    padding: 36px 40px 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.pg-gal__filter-btn {
    padding: 10px 24px;
    border-radius: 30px;
    border: 2px solid #e5e5e5;
    background: transparent;
    color: #555;
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}
.pg-gal__filter-btn:hover,
.pg-gal__filter-btn.active {
    background: #EF1286;
    border-color: #EF1286;
    color: #fff;
}

/* ===== GRILLE PHOTOS ===== */
.pg-gal__grid-section {
    background: #fff;
    padding: 48px 40px 80px;
}
.pg-gal__grid {
    max-width: 1200px;
    margin: 0 auto;
    columns: 3;
    column-gap: 16px;
}
.pg-gal__item {
    break-inside: avoid;
    margin-bottom: 16px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    display: block;
}
.pg-gal__item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}
.pg-gal__item:hover img {
    transform: scale(1.05);
}
.pg-gal__item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}
.pg-gal__item:hover .pg-gal__item-overlay {
    opacity: 1;
}
.pg-gal__item-label {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Items de couleur (placeholder) */
.pg-gal__item--color {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pg-gal__item--tall { min-height: 340px; }
.pg-gal__item--short { min-height: 160px; }

/* Hiding items during filtering */
.pg-gal__item.hidden {
    display: none !important;
    opacity: 0;
}

.pg-gal__placeholder {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pg-gal__placeholder-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    padding: 20px;
    gap: 10px;
}
.pg-gal__placeholder-icon {
    font-size: 2.5rem;
    display: block;
    opacity: 0.85;
}

/* ===== SECTION VIDÉOS YOUTUBE ===== */
.pg-gal__videos {
    background: #0F1729;
    padding: 90px 40px;
}
.pg-gal__videos-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.pg-gal__section-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #EF1286;
    text-align: center;
    margin-bottom: 12px;
}
.pg-gal__section-title {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin: 0 0 12px;
}
.pg-gal__divider {
    width: 48px; height: 4px;
    background: #EF1286;
    border-radius: 2px;
    margin: 0 auto 48px;
}
.pg-gal__videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.pg-gal__video-card {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pg-gal__video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.pg-gal__video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.pg-gal__video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}
.pg-gal__video-info {
    padding: 16px 18px;
}
.pg-gal__video-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.4;
}
.pg-gal__video-desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
    line-height: 1.5;
}
.pg-gal__yt-cta {
    text-align: center;
    margin-top: 40px;
}
.pg-gal__yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #FF0000;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(255,0,0,0.35);
}
.pg-gal__yt-btn:hover {
    background: #cc0000;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255,0,0,0.45);
    text-decoration: none;
    color: #fff;
}

/* ===== STATS / CHIFFRES ===== */
.pg-gal__stats {
    background: linear-gradient(135deg, #EF1286 0%, #2D53CB 100%);
    padding: 70px 40px;
}
.pg-gal__stats-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.pg-gal__stat-num {
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 900;
    color: #fff;
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}
.pg-gal__stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== LIGHTBOX — navigation type Instagram/Facebook ===== */
.pg-gal-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pg-gal-lightbox.open { display: flex; }

.pg-gal-lightbox__stage {
    flex: 1 1 auto;
    max-width: 82vw;
    height: 84vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.pg-gal-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    /* Traite les images de tailles/orientations différentes de façon
       uniforme (portrait, paysage, carré) sans jamais les déformer ni
       les recadrer — comme Facebook/Instagram. */
    animation: pgGalLbFade 0.22s ease;
}
@keyframes pgGalLbFade {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

.pg-gal-lightbox__close {
    position: fixed;
    top: 20px; right: 28px;
    color: #fff;
    font-size: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 2;
}
.pg-gal-lightbox__close:hover { opacity: 1; }

.pg-gal-lightbox__nav {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.85;
    transition: background 0.2s, opacity 0.2s, transform 0.15s;
    margin: 0 12px;
}
.pg-gal-lightbox__nav:hover { background: rgba(255,255,255,0.18); opacity: 1; transform: scale(1.05); }
.pg-gal-lightbox__nav:active { transform: scale(0.95); }
.pg-gal-lightbox__nav[hidden] { display: none; }

.pg-gal-lightbox__footer {
    position: fixed;
    bottom: 24px;
    left: 50%; transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}
.pg-gal-lightbox__caption {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    background: rgba(0,0,0,0.5);
    padding: 8px 20px;
    border-radius: 20px;
    white-space: nowrap;
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pg-gal-lightbox__caption:empty { display: none; }
.pg-gal-lightbox__counter {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    background: rgba(0,0,0,0.5);
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .pg-gal-lightbox { padding: 8px; }
    .pg-gal-lightbox__stage { max-width: 100vw; height: 74vh; }
    .pg-gal-lightbox__nav { width: 40px; height: 40px; margin: 0 4px; }
    .pg-gal-lightbox__caption { max-width: 50vw; font-size: 0.8rem; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .pg-gal__grid { columns: 2; }
    .pg-gal__videos-grid { grid-template-columns: 1fr 1fr; }
    .pg-gal__stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 600px) {
    .pg-gal__grid { columns: 1; }
    .pg-gal__videos-grid { grid-template-columns: 1fr; }
    .pg-gal__stats-grid { grid-template-columns: 1fr 1fr; }
    .pg-gal__hero, .pg-gal__grid-section,
    .pg-gal__videos, .pg-gal__stats { padding-left: 20px; padding-right: 20px; }
    .pg-gal__filters { padding: 24px 20px 0; }
}
