/* =====================================================
   Fun & Calm – Galerie Filtrable  |  fcg-gallery.css
   ===================================================== */

/* --- Wrapper global --- */
.fcg-wrapper {
    font-family: inherit;
    --fcg-gap: 12px;
    --fcg-radius: 8px;
    --fcg-accent: #3d7080;
}

/* --- En-tête --- */
.fcg-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 28px;
}

.fcg-title {
    margin: 0;
    font-size: 2rem;
    color: #3d7080;
    font-weight: 400;
    white-space: nowrap;
}

/* --- Filtres --- */
.fcg-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    flex: 1;
}

.fcg-filter-btn {
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #000;
    position: relative;
    transition: color .2s;
    font-family: inherit;
}

.fcg-filter-btn::after {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    background: var(--fcg-accent);
    transition: width .25s;
    margin-top: 3px;
}

.fcg-filter-btn:hover,
.fcg-filter-btn.active {
    color: var(--fcg-accent);
}

.fcg-filter-btn.active::after,
.fcg-filter-btn:hover::after {
    width: 100%;
}

/* --- Flèches navigation --- */
.fcg-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

.fcg-prev,
.fcg-next {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #333;
    padding: 4px 8px;
    transition: color .2s;
    font-family: inherit;
}

.fcg-prev:hover,
.fcg-next:hover {
    color: var(--fcg-accent);
}

.fcg-prev:disabled,
.fcg-next:disabled {
    opacity: .3;
    cursor: default;
}

/* --- Carousel container --- */
.fcg-carousel {
    overflow: hidden;
    width: 100%;
}

/* --- Piste --- */
.fcg-track {
    display: flex;
    gap: var(--fcg-gap);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    align-items: flex-start;
}

/* --- Item photo --- */
.fcg-item {
    flex: 0 0 calc(50% - var(--fcg-gap) / 2);
    min-width: 0;
    position: relative;
    border-radius: var(--fcg-radius);
    overflow: hidden;
    background: #f0f0f0;
    transition: opacity .3s, transform .3s;
}

.fcg-item img {
    display: block;
    width: 100%;
    height: 340px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--fcg-radius);
}

.fcg-no-img {
    width: 100%;
    height: 340px;
    background: #e8e8e8;
    border-radius: var(--fcg-radius);
}

/* --- Caption au survol --- */
.fcg-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.45));
    color: #fff;
    padding: 28px 16px 12px;
    transform: translateY(100%);
    transition: transform .25s;
    border-radius: 0 0 var(--fcg-radius) var(--fcg-radius);
}

.fcg-item:hover .fcg-caption {
    transform: translateY(0);
}

.fcg-caption span {
    font-size: .85rem;
    font-weight: 500;
}

/* --- Items masqués (filtre) --- */
.fcg-item.fcg-hidden {
    display: none;
}

/* --- Responsive mobile --- */
@media (max-width: 767px) {
    .fcg-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .fcg-nav {
        margin-left: 0;
    }
    .fcg-item {
        flex: 0 0 90%;
    }
    .fcg-item img,
    .fcg-no-img {
        height: 240px;
    }
}
