/* ── Portfolio Gallery — CSS ── */

.pg-wrap { font-family: inherit; }

/* Filtres */
.pg-filters { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.pg-btn {
    font-family: "Agbalumo", Sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--e-global-color-text);
    border: none !important;
    background: transparent;
    padding: 0px 5px;
    cursor: pointer;
    line-height: 1.4;
    transition: color .2s;
}
.pg-btn:hover {
    color: var(--e-global-color-2ee07f1) !important;
    background: transparent !important;
    border: none !important;
}
.pg-btn.active {
    color: var(--e-global-color-2ee07f1) !important;
    background: transparent !important;
    border: none !important;
}

/* Masonry */
.pg-masonry { columns: 3; column-gap: 16px; }
.pg-wrap[data-columns="1"] .pg-masonry { columns: 1; }
.pg-wrap[data-columns="2"] .pg-masonry { columns: 2; }
.pg-wrap[data-columns="4"] .pg-masonry { columns: 4; }

@media (max-width: 900px) { .pg-masonry { columns: 2 !important; } }
@media (max-width: 500px)  { .pg-masonry { columns: 1 !important; } }

/* Item */
.pg-item {
    break-inside: avoid;
	margin-bottom: 16px;
	overflow: hidden;
    cursor: pointer;
	position: relative; 
}
.pg-item img { width: 100%; height: auto; display: block; transition: transform .35s ease; }
.pg-item:hover img { transform: scale(1.04); }

/* Overlay */
.pg-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 32px 14px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    opacity: 0; transition: opacity .25s;
}
.pg-item:hover .pg-overlay { opacity: 1; }
.pg-overlay-title { color: #fff; font-size: 13px; font-weight: 600; }
.pg-overlay-url {
    color: rgba(255,255,255,.6); font-size: 11px; margin-top: 2px;
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Skeleton */
.pg-skeleton {
    width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(90deg,#e0e0e0 25%,#ebebeb 50%,#e0e0e0 75%);
    background-size: 200% 100%; animation: pg-shimmer 1.5s infinite;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 8px; color: #aaa; font-size: 11px;
}
@keyframes pg-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Erreur */
.pg-error {
    width: 100%; aspect-ratio: 16/9;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; background: #f5f5f5;
    color: #bbb; font-size: 11px; gap: 6px;
}
.pg-retry {
    margin-top: 6px; padding: 4px 12px; font-size: 10px;
    border: 1px solid #ddd; border-radius: 20px;
    background: #fff; color: #888; cursor: pointer;
}
.pg-retry:hover { color: #333; border-color: #aaa; }

/* Lightbox */
.pg-lightbox {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.88); z-index: 99999;
    align-items: center; justify-content: center; padding: 20px;
}
.pg-lightbox.open { display: flex; }
.pg-lb-inner {
    max-width: 90vw; max-height: 90vh;
    position: relative; border-radius: 12px;
    overflow: hidden; background: #111;
}
.pg-lb-inner img { max-width: 90vw; max-height: 80vh; display: block; }
.pg-lb-close {
    position: absolute; top: -38px; right: 0;
    color: #fff; font-size: 26px; cursor: pointer; opacity: .8; line-height: 1;
}
.pg-lb-close:hover { opacity: 1; }
.pg-lb-caption {
    padding: 10px 16px; background: #1a1a1a; color: #fff; font-size: 13px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pg-lb-link {
    color: rgba(255,255,255,.5); font-size: 11px;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.pg-lb-link:hover { color: #fff; }