/* Bandeau de filtres + tags catégorie + badges source pour la galerie photos. */

.photos-filters {
    margin: 12px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.photos-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.photos-filters__row--children {
    padding-left: 4px;
    border-left: 2px solid #f0f0f0;
    margin-left: 4px;
}

.filter-pill,
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
    cursor: pointer;
    white-space: nowrap;
}
.filter-pill:hover,
.filter-chip:hover {
    background: #e5e7eb;
    color: #111827;
}
.filter-pill.is-active {
    background: #1f2937;
    color: #fff;
}
.filter-chip {
    background: #ffffff;
    border-color: #e5e7eb;
    padding: 4px 12px;
    font-size: 0.8125rem;
}
.filter-chip.is-active {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
}

/* Tag catégorie : épinglé en haut-gauche de la tuile, permanent.
   Coexiste avec :
   - .source-badge (top-right, permanent)
   - .program-tag (bottom-left, visible au :hover via style.css)
   - .grid-item-status (top-right, visible si génération en cours via all_photos.css) */
.grid-item .category-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(17, 24, 39, 0.82);
    color: #fff;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 3;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.grid-item .category-tag:hover {
    background: rgba(17, 24, 39, 0.95);
    color: #fff;
    text-decoration: none;
}

/* Badge source : top-right, permanent. */
.source-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
}
.source-badge--official {
    background: linear-gradient(135deg, #059669, #10b981);
}
.source-badge--community {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}
.source-badge--marketing {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

/* Tags sur la page détail photo (réutilise .photo_detail-tag existant) */
.photo_detail-tag--parent {
    opacity: 0.85;
    font-weight: 600;
}
.photo_detail-tag--source-official { background: #10b981; color: #fff; }
.photo_detail-tag--source-community { background: #3b82f6; color: #fff; }
.photo_detail-tag--source-marketing { background: #f59e0b; color: #fff; }

/* Responsive : sur mobile, simplification du bandeau */
@media (max-width: 600px) {
    .photos-filters__row {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .filter-pill,
    .filter-chip {
        flex-shrink: 0;
    }
    .source-badge {
        font-size: 0.625rem;
        padding: 2px 6px;
    }
}
