/* Fil de la communauté */
.post-who { min-width: 0; flex: 1; }
.post-author { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.post-level { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(73, 55, 129, .12); color: var(--secondary, #493781); letter-spacing: .02em; }
.post-avatar.xs { width: 22px; height: 22px; font-size: 9px; border: 2px solid var(--background, #fff); margin-left: -7px; }
.post-avatar.xs:first-child { margin-left: 0; }
.post-body-wrap { position: relative; }
.post-body.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.post-body { white-space: pre-wrap; word-break: break-word; margin: 0 0 6px; }
.post-more { border: 0; background: transparent; color: var(--primary); font: 600 13.5px var(--font-body, Inter, sans-serif); padding: 2px 0 8px; cursor: pointer; }
.post-more:hover { text-decoration: underline; }
.post-images { display: grid; gap: 4px; margin: 6px 0 10px; border-radius: 14px; overflow: hidden; }
.post-images.n1 { grid-template-columns: 1fr; }
.post-images.n2 { grid-template-columns: 1fr 1fr; }
.post-images.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-images.n3 .post-img:first-child { grid-row: span 2; }
.post-images.n4 { grid-template-columns: 1fr 1fr; }
.post-img { border: 0; padding: 0; min-height: 0; height: 100%; background-size: cover; background-position: center; cursor: zoom-in; transition: filter .15s; }
.post-images.n1 { grid-auto-rows: minmax(0, 420px); }
.post-images.n1 .post-img { aspect-ratio: 16 / 10; height: auto; max-height: 420px; }
.post-images.n2 { grid-auto-rows: 230px; }
.post-images.n3 { grid-template-rows: 150px 150px; }
.post-images.n4 { grid-auto-rows: 150px; }
.post-img:hover { filter: brightness(.93); }
.post-commenters { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.post-commenters .avatar-stack { display: inline-flex; }
.post-last { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .post-last { display: none; } .post-images.n2 { grid-auto-rows: 160px; } .post-images.n3 { grid-template-rows: 110px 110px; } .post-images.n4 { grid-auto-rows: 110px; } }

.feed-sort { margin-left: auto; border: 1.5px solid var(--border); border-radius: 999px; background: var(--background, #fff); color: var(--text-title, inherit); padding: 7px 30px 7px 14px; font: 600 13px var(--font-body, Inter, sans-serif); cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.feed-sort:hover { border-color: var(--primary); }
.filter-row { align-items: center; }

.feed-more { text-align: center; padding: 18px 0 8px; }
.feed-more-btn { border: 1.5px solid var(--border); background: var(--background, #fff); color: var(--primary); border-radius: 999px; padding: 11px 26px; font: 600 14px var(--font-body, Inter, sans-serif); cursor: pointer; transition: border-color .15s, transform .15s; }
.feed-more-btn:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-1px); }
.feed-end { color: var(--text-muted); font-size: 13.5px; }

/* Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(8, 8, 16, .9); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.lb-close { top: 18px; right: 18px; }
.lb-nav.prev { left: 18px; } .lb-nav.next { right: 18px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .26); }

/* Rangée de filtres sur petit écran : pastilles défilantes, tri + signalements sur une ligne dessous */
@media (max-width: 700px) {
  #page-community .filter-row { flex-direction: column; align-items: stretch; gap: 10px; }
  #page-community .filter-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  #page-community .filter-pills::-webkit-scrollbar { display: none; }
  #page-community .filter-pills > * { flex: none; }
  #page-community .filter-tools { display: flex; gap: 8px; align-items: center; }
  #page-community .filter-tools .feed-sort { margin-left: 0; flex: 1; min-width: 0; }
  #page-community .reports-btn { flex: none; }
}

.filter-tools { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
