/* Fil de posts : cartes, filtres par catégorie, likes, commentaires */
.f-pill-wrap { position: relative; display: inline-flex; }
.f-pill .f-count { margin-left: 6px; font-size: 11px; opacity: 0.7; }
.f-pill-del {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--dark); color: #fff; font-size: 12px; line-height: 18px; text-align: center;
  display: none; cursor: pointer; border: 0; padding: 0;
}
.f-pill-wrap:hover .f-pill-del { display: block; }
.f-pill-add { border: 1px dashed var(--border); color: var(--text-muted); }
.f-pill-add:hover { border-color: var(--primary); }

.posts-feed { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.post-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 14px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.post-card:hover { border-color: var(--light-accent); box-shadow: var(--shadow-card); }
.post-card.pinned { border-color: var(--light-accent); background: linear-gradient(180deg, #FBF9FD 0%, var(--background) 60%); }

.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; position: relative; }
.post-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
}
.post-avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.post-author { font-weight: 600; color: var(--text-title); font-size: 14px; }
.post-meta { color: var(--text-muted); font-size: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-cat {
  padding: 2px 10px; border-radius: var(--radius-full); background: var(--background-soft);
  color: var(--secondary); font-weight: 600; font-size: 11px;
}
.post-pin-badge {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--accent);
}
.post-pin-badge svg { width: 13px; height: 13px; }

.post-menu-btn {
  margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent;
  color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; transition: background 0.2s;
}
.post-pin-badge + .post-menu-btn { margin-left: 0; }
.post-menu-btn:hover { background: var(--background-soft); color: var(--primary); }
.post-menu {
  position: absolute; right: 0; top: 40px; z-index: 20; min-width: 170px; padding: 6px;
  background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover); display: none;
}
.post-menu.open { display: block; }
.post-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent;
  font-size: 13px; color: var(--text-body); border-radius: 8px; cursor: pointer;
}
.post-menu button:hover { background: var(--background-soft); color: var(--primary); }
.post-menu button.danger { color: #B91C1C; }
.post-menu button.danger:hover { background: #FEF2F2; }

.post-title { font-family: var(--font-title); font-size: 18px; font-weight: 600; color: var(--text-title); margin: 0 0 6px; }
.post-body { line-height: 1.65; white-space: pre-wrap; word-break: break-word; color: var(--text-body); font-size: 15px; margin: 0; }
.post-body a { color: var(--primary); text-decoration: underline; }

.post-actions { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.post-action {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: var(--radius-full);
  border: 0; background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.2s;
}
.post-action svg { width: 18px; height: 18px; }
.post-action:hover { background: var(--background-soft); color: var(--primary); }
.post-action.liked { color: var(--accent); }
.post-action.liked svg { fill: var(--accent); }

.post-comments { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border-soft); display: none; }
.post-comments.open { display: block; }
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment.reply { margin-left: 40px; }
.comment-bubble { background: var(--background-soft); border-radius: 14px; padding: 9px 14px; min-width: 0; }
.comment-name { font-weight: 600; font-size: 13px; color: var(--text-title); }
.comment-time { font-size: 11px; color: var(--text-faint); margin-left: 6px; font-weight: 400; }
.comment-text { font-size: 14px; color: var(--text-body); white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.comment-tools { display: flex; gap: 14px; padding: 4px 6px 0; font-size: 12px; color: var(--text-muted); }
.comment-tools button { border: 0; background: transparent; padding: 0; font-size: 12px; color: inherit; cursor: pointer; font-weight: 600; }
.comment-tools button:hover { color: var(--primary); }
.comment-tools button.liked { color: var(--accent); }

.comment-form { display: flex; gap: 10px; align-items: center; }
.comment-form input {
  flex: 1; padding: 10px 16px; border-radius: var(--radius-full); border: 1px solid var(--border);
  font-size: 14px; font-family: var(--font-body); outline: none; transition: border-color 0.2s;
}
.comment-form input:focus { border-color: var(--primary); }
.comment-send {
  padding: 9px 18px; border-radius: var(--radius-full); border: 0; background: var(--primary); color: #fff;
  font-weight: 600; font-size: 13px; cursor: pointer; transition: background 0.2s;
}
.comment-send:hover { background: var(--secondary); }
.reply-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 4px 12px;
  border-radius: var(--radius-full); background: var(--background-soft); font-size: 12px; color: var(--text-muted);
}
.reply-chip button { border: 0; background: transparent; cursor: pointer; font-size: 14px; color: inherit; }
.comments-empty { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }

#post-title, #post-category { width: 100%; }
