/* ═══════════════════════════════════════════════════════════════════════════
   forum.css — Sprint F4 — UX Forum Citoyen & Portail Citoyen
   Amélioration : responsive, espacement, lisibilité, cartes, boutons, icônes
   Règle : ADDITIF uniquement — aucun style existant supprimé
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens Forum ───────────────────────────────────────────────────────── */
:root {
  --f-blue:         #2563eb;
  --f-blue-light:   #eff6ff;
  --f-purple:       #7c3aed;
  --f-purple-light: #f5f3ff;
  --f-green:        #059669;
  --f-green-light:  #ecfdf5;
  --f-orange:       #b45309;
  --f-orange-light: #fffbeb;
  --f-red:          #dc2626;
  --f-red-light:    #fef2f2;
  --f-teal:         #0891b2;
  --f-teal-light:   #ecfeff;

  --f-radius:       8px;
  --f-radius-pill:  999px;
  --f-shadow:       0 1px 4px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --f-shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --f-shadow-sm:    0 1px 3px rgba(0,0,0,.06);
  --f-border:       #e5e7eb;
  --f-border-light: #f3f4f6;
  --f-bg:           #f9fafb;
  --f-text:         #111827;
  --f-text-sub:     #6b7280;
  --f-text-muted:   #9ca3af;
}

/* ── Layout principal forum ─────────────────────────────────────────────── */
.f-section {
  background: var(--f-bg);
  padding: 32px 0 64px;
}
.f-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.f-card {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  overflow: hidden;
}
.f-card + .f-card { margin-top: 12px; }
.f-card-hoverable {
  transition: box-shadow .15s, transform .1s;
  cursor: pointer;
}
.f-card-hoverable:hover {
  box-shadow: var(--f-shadow-md);
  transform: translateY(-1px);
}
.f-card-body { padding: 16px 20px; }
.f-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--f-bg);
  border-bottom: 1px solid var(--f-border-light);
}
.f-card-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--f-text-sub);
  margin: 0;
}

/* ── Topic list items ───────────────────────────────────────────────────── */
.f-topic-list {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  overflow: hidden;
}
.f-topic-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--f-border-light);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
  position: relative;
}
.f-topic-item:last-child { border-bottom: none; }
.f-topic-item:hover { background: #f8fafc; }
.f-topic-item.pinned {
  background: linear-gradient(90deg, #fffbeb 0%, transparent 100%);
  border-left: 3px solid var(--f-orange);
}
.f-topic-item.pinned:hover { background: linear-gradient(90deg, #fef3c7 0%, #fafafa 100%); }

.f-topic-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--f-text-muted);
  margin-top: 6px;
}
.f-topic-counters {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  min-width: 56px;
}
.f-topic-count {
  text-align: center;
}
.f-topic-count strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--f-text);
  line-height: 1.1;
}
.f-topic-count span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--f-text-muted);
}

/* ── Badges / Pills ─────────────────────────────────────────────────────── */
.f-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: var(--f-radius-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.4;
}
.f-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--f-radius-pill);
  font-size: 10px;
  font-weight: 800;
}

/* ── Filter strip (horizontal scroll on mobile) ─────────────────────────── */
.f-filter-bar {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.f-filter-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  overflow-x: visible;
  scrollbar-width: none;
}
.f-filter-strip::-webkit-scrollbar { display: none; }
.f-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--f-radius-pill);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all .12s;
  flex-shrink: 0;
  cursor: pointer;
  background: none;
  font-family: inherit;
}
.f-filter-pill.active {
  background: var(--f-blue);
  color: #fff;
  border-color: var(--f-blue);
}
.f-filter-pill:not(.active) {
  background: var(--f-bg);
  color: var(--f-text-sub);
  border-color: var(--f-border);
}
.f-filter-pill:not(.active):hover {
  background: #e5e7eb;
  color: var(--f-text);
}

/* ── Boutons ────────────────────────────────────────────────────────────── */
.f-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--f-radius);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: opacity .12s, box-shadow .12s, transform .1s;
  white-space: nowrap;
  line-height: 1;
}
.f-btn:hover { opacity: .9; transform: translateY(-1px); text-decoration: none; }
.f-btn:active { transform: translateY(0); }
.f-btn-primary { background: var(--f-blue); color: #fff; }
.f-btn-accent  { background: var(--primary, #0b6680); color: #fff; }
.f-btn-purple  { background: var(--f-purple); color: #fff; }
.f-btn-success { background: var(--f-green); color: #fff; }
.f-btn-ghost   { background: var(--f-bg); color: var(--f-text-sub); border: 1.5px solid var(--f-border); }
.f-btn-ghost:hover { background: #e5e7eb; color: var(--f-text); }
.f-btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 6px; }
.f-btn-lg { padding: 13px 26px; font-size: 15px; }
.f-btn-full { width: 100%; justify-content: center; }

/* ── Avatars ────────────────────────────────────────────────────────────── */
.f-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
  line-height: 1;
}
.f-avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.f-avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.f-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Stats inline ───────────────────────────────────────────────────────── */
.f-stats-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--f-text-sub);
  flex-shrink: 0;
  white-space: nowrap;
}
.f-stats-row i { font-size: 11px; color: var(--f-text-muted); }

/* ── Reply cards ────────────────────────────────────────────────────────── */
.f-reply-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.f-reply {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  overflow: hidden;
  box-shadow: var(--f-shadow-sm);
  transition: box-shadow .15s;
}
.f-reply:hover { box-shadow: var(--f-shadow); }
.f-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--f-border-light);
  background: var(--f-bg);
  flex-wrap: wrap;
}
.f-reply-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.f-reply-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--f-text);
}
.f-reply-role {
  font-size: 11px;
  color: var(--f-text-muted);
}
.f-reply-time {
  font-size: 11px;
  color: var(--f-text-muted);
  white-space: nowrap;
}
.f-reply-body {
  padding: 18px 20px;
  font-size: 15.5px;
  line-height: 1.75;
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
}
.f-reply-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--f-border-light);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--f-bg);
}

/* Reaction button */
.f-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1.5px solid var(--f-border);
  background: transparent;
  border-radius: var(--f-radius-pill);
  font-size: 13px;
  cursor: pointer;
  transition: all .12s;
  font-family: inherit;
  line-height: 1;
}
.f-react-btn:hover { background: var(--f-border-light); }
.f-react-btn.active { border-color: var(--f-orange); background: var(--f-orange-light); }
.f-react-count { font-size: 11px; font-weight: 700; color: var(--f-text-sub); min-width: 10px; }

/* ── Category cards ─────────────────────────────────────────────────────── */
.f-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.f-cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .1s;
}
.f-cat-card:hover {
  box-shadow: var(--f-shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.f-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--f-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.f-cat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--f-text);
  margin: 0 0 3px;
}
.f-cat-desc {
  font-size: 12px;
  color: var(--f-text-sub);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.f-cat-count {
  margin-left: auto;
  text-align: center;
  flex-shrink: 0;
}
.f-cat-count strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}
.f-cat-count span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--f-text-muted);
  font-weight: 700;
}

/* ── Sidebar widgets ────────────────────────────────────────────────────── */
.f-widget {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.f-widget-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--primary, #0b6680);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.f-widget-head i { color: var(--accent, #f36f21); font-size: 12px; }
.f-widget-body { padding: 10px 0; }
.f-widget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--f-text);
  font-size: 13px;
  border-bottom: 1px solid var(--f-border-light);
  transition: background .1s;
  gap: 8px;
}
.f-widget-row:last-child { border-bottom: none; }
.f-widget-row:hover { background: var(--f-bg); }
.f-widget-row i { color: var(--f-text-muted); font-size: 11px; width: 14px; text-align: center; flex-shrink: 0; }

/* ── Form reply ─────────────────────────────────────────────────────────── */
.f-reply-form {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  border-top: 4px solid var(--accent, #f36f21);
  padding: 24px;
}
.f-reply-form h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary, #0b6680);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.f-form-textarea {
  width: 100%;
  border: 1.5px solid var(--f-border);
  border-radius: var(--f-radius);
  padding: 14px;
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.65;
  resize: vertical;
  min-height: 120px;
  transition: border-color .15s;
  color: var(--f-text);
  box-sizing: border-box;
}
.f-form-textarea:focus {
  outline: none;
  border-color: var(--f-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

/* ── Search box ─────────────────────────────────────────────────────────── */
.f-search-wrap {
  position: relative;
}
.f-search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--f-border);
  border-radius: var(--f-radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--f-text);
  transition: border-color .15s;
  box-sizing: border-box;
  background: #fff;
}
.f-search-input:focus {
  outline: none;
  border-color: var(--f-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.06);
}
.f-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--f-text-muted);
  font-size: 13px;
  pointer-events: none;
}

/* ── Stats bar (hero) ───────────────────────────────────────────────────── */
.f-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
}
.f-stats-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.f-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}
.f-stat-item .f-stat-n {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  display: block;
}
.f-stat-item .f-stat-l {
  font-size: 10px;
  opacity: .65;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.f-empty {
  text-align: center;
  padding: 52px 20px;
  background: #fff;
  border: 2px dashed var(--f-border);
  border-radius: var(--f-radius);
}
.f-empty-icon { font-size: 2.8rem; margin-bottom: 12px; display: block; }
.f-empty h3 { font-size: 16px; font-weight: 700; color: var(--f-text); margin: 0 0 8px; text-transform: none; }
.f-empty p { font-size: 14px; color: var(--f-text-sub); margin: 0 0 18px; max-width: 380px; margin-left: auto; margin-right: auto; }

/* ── Participation CTA inline ───────────────────────────────────────────── */
.f-join-cta {
  background: linear-gradient(135deg, var(--f-blue), var(--f-purple));
  border-radius: var(--f-radius);
  padding: 20px 24px;
  text-align: center;
  margin-top: 20px;
  color: #fff;
}
.f-join-cta h3 { font-size: 15px; font-weight: 800; margin: 0 0 6px; color: #fff; text-transform: none; border: none; padding: 0; }
.f-join-cta p  { font-size: 13px; opacity: .85; margin: 0 0 14px; max-width: 100%; color: #fff; }
.f-join-cta-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ── Citizen portal — mobile bottom navigation ──────────────────────────── */
.cp-mob-nav {
  display: none;
}
@media (max-width: 860px) {
  .cp-mob-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 2px solid var(--f-border);
    z-index: 900;
    box-shadow: 0 -2px 12px rgba(0,0,0,.09);
    min-height: 56px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .cp-mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 6px 2px 5px;
    text-decoration: none;
    color: var(--f-text-sub);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    gap: 3px;
    transition: color .12s, border-top-color .12s;
    position: relative;
    border-top: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
  }
  .cp-mob-nav-item i { font-size: 19px; line-height: 1; }
  .cp-mob-nav-item.cp-mob-active {
    color: var(--f-blue);
    border-top-color: var(--f-blue);
  }
  .cp-mob-nav-item .cp-mob-badge {
    position: absolute;
    top: 5px;
    right: calc(50% - 20px);
    min-width: 16px; height: 16px;
    border-radius: 999px;
    background: #ef4444; color: #fff;
    font-size: 9px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
  }
  .cp-main { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ── Citizen sidebar — messages link visible ────────────────────────────── */
/* (messagerie is a new F3 item — make sure it's always visible on sidebar) */

/* ── Responsive overwrites ──────────────────────────────────────────────── */
@media (max-width: 920px) {
  .f-grid { grid-template-columns: 1fr; }
  .f-sidebar { display: none; }
}
@media (max-width: 600px) {
  .f-cat-grid { grid-template-columns: 1fr; }
  .f-reply-body { padding: 14px 16px; font-size: 14.5px; }
  .f-reply-head { padding: 10px 14px; }
  .f-topic-item { padding: 12px 14px; gap: 10px; }
  .f-avatar { width: 34px; height: 34px; font-size: 13px; }
  .f-avatar-lg { width: 42px; height: 42px; }
  .f-btn { padding: 9px 16px; }
  .f-btn-lg { padding: 11px 20px; font-size: 14px; }
  .f-section { padding: 20px 0 48px; }
  .f-reply-form { padding: 16px; }
}

/* ── Sticky filter bar on mobile ────────────────────────────────────────── */
@media (max-width: 860px) {
  .f-filter-bar-sticky {
    position: sticky;
    top: 64px;
    z-index: 80;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0 -16px 16px;
    padding: 10px 16px;
  }
}

/* ── Highlight pinned + hot topics ─────────────────────────────────────── */
.f-hot-tag {
  background: #fef2f2;
  color: var(--f-red);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .3px;
  animation: f-pulse-hot 2s ease-in-out infinite;
}
@keyframes f-pulse-hot {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ── Quick publish bar ──────────────────────────────────────────────────── */
.f-quickpub {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--f-radius);
  margin-bottom: 16px;
}
.f-quickpub-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--f-orange);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.f-quickpub-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.f-quickpub-pills::-webkit-scrollbar { display: none; }
.f-qpill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: var(--f-radius-pill);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all .12s;
  white-space: nowrap;
  background: #fff;
}
.f-qpill:hover { transform: translateY(-1px); box-shadow: var(--f-shadow-sm); text-decoration: none; }

/* ── Sidebar forum categories ───────────────────────────────────────────── */
.f-sidebar-cats .f-widget-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.f-sidebar-cats .f-widget-row .f-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.f-sidebar-cats .f-widget-row-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary, #0b6680);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f-sidebar-cats .f-cat-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--f-radius-pill);
  flex-shrink: 0;
}

/* ── Project grid (forum_projects.php) ──────────────────────────────────── */
.f-proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
@media (max-width: 680px) {
  .f-proj-grid { grid-template-columns: 1fr; gap: 12px; }
}
.f-proj-card {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .1s;
}
.f-proj-card:hover { box-shadow: var(--f-shadow-md); transform: translateY(-2px); }
.f-proj-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.f-proj-img-placeholder {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.f-proj-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.f-proj-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--f-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.f-proj-summary {
  font-size: 13px;
  color: var(--f-text-sub);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.f-proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--f-border-light);
  gap: 8px;
}

/* ── Topic title typography ─────────────────────────────────────────────── */
.f-topic-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary, #0b6680);
  margin: 0 0 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.f-topic-excerpt {
  font-size: 13px;
  color: var(--f-text-sub);
  line-height: 1.5;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Transitions & polish ────────────────────────────────────────────────── */
.f-fade-in {
  animation: f-fadein .25s ease both;
}
@keyframes f-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Print safety ────────────────────────────────────────────────────────── */
@media print {
  .f-filter-bar, .f-sidebar, .cp-mob-nav, .f-join-cta, .f-quickpub { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REFONTE ERGONOMIQUE — Social Feed Cards
   Toutes les règles ci-dessous sont ADDITIVES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fix overflow horizontal global */
.f-section   { overflow-x: clip; }  /* clip évite les débordements sans créer de contexte de scroll */
.f-grid      { min-width: 0; }
.f-filter-bar { overflow: visible; }

/* Ligne filtres : grille CSS robuste (toujours visible sur tous écrans) */
.f-filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}
@media (max-width: 480px) {
  .f-filter-row { grid-template-columns: 1fr; }
}

/* Select tri */
.f-sort-select {
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid var(--f-border, #e5e7eb);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--primary);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  align-self: start;
}

/* Filter strip : toujours flex-wrap, jamais de scroll caché */
.f-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}
.f-filter-strip::-webkit-scrollbar { display: none; }

/* ── Social Feed ─────────────────────────────────────────────────────────── */
.f-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.f-feed-card {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.f-feed-card:hover {
  box-shadow: 0 4px 22px rgba(0,0,0,.09);
  border-color: #d1d5db;
}
.f-feed-card.pinned {
  border-left: 3px solid var(--f-orange, #b45309);
}

/* Header : avatar + auteur + date + catégorie */
.f-feed-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 0;
}
.f-feed-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
}
.f-feed-card-meta {
  flex: 1;
  min-width: 0;
}
.f-feed-card-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary, #1B3A5C);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.f-feed-card-date {
  font-size: 11px;
  color: var(--f-text-muted, #9ca3af);
}
.f-feed-card-cat {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity .12s;
}
.f-feed-card-cat:hover { opacity: .8; }

/* Body : tags + titre + excerpt */
.f-feed-card-body {
  padding: 10px 18px 12px;
}
.f-feed-card-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.f-feed-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary, #1B3A5C);
  line-height: 1.4;
  margin: 0 0 7px;
  text-decoration: none;
  display: block;
}
.f-feed-card-title:hover { color: var(--accent); }
.f-feed-card-excerpt {
  font-size: 13px;
  color: var(--f-text-sub, #6b7280);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer : actions */
.f-feed-card-foot {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--f-border-light, #f3f4f6);
  flex-wrap: wrap;
}
.f-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--f-text-sub, #6b7280);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}
.f-action:hover           { background: var(--f-bg); color: var(--primary); }
.f-action--like:hover     { color: #dc2626; background: #fef2f2; }
.f-action--share:hover    { color: #0284c7; background: #e0f2fe; }
.f-action--comment:hover  { color: var(--f-green, #059669); background: var(--f-green-light, #ecfdf5); }
.f-action--primary {
  background: var(--primary);
  color: #fff !important;
  margin-left: auto;
  border-radius: 7px;
}
.f-action--primary:hover  { background: #0f2a45; color: #fff !important; }

/* Pagination feed */
.f-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.f-page-link {
  padding: 7px 13px;
  border: 1px solid var(--f-border);
  background: #fff;
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  transition: background .1s, color .1s;
}
.f-page-link:hover    { background: var(--f-bg); }
.f-page-link.active   { background: var(--primary); color: #fff; border-color: var(--primary); }
.f-page-ellipsis      { padding: 7px 4px; font-size: 13px; color: var(--f-text-muted); }

/* Responsive feed cards */
@media (max-width: 700px) {
  .f-feed-card-head   { padding: 12px 14px 0; }
  .f-feed-card-body   { padding: 8px 14px 10px; }
  .f-feed-card-foot   { padding: 6px 10px 10px; gap: 1px; }
  .f-action           { padding: 5px 8px; font-size: 11px; }
  .f-feed-card-title  { font-size: 14px; }
  .f-feed-card-cat    { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 5 — Forum Communauté Citoyenne
   Additif : navigation onglets, sidebar enrichie, activity hub, mini-cards
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Navigation onglets forum ────────────────────────────────────────────── */
.f-nav-tabs-wrap {
  background: #fff;
  border-bottom: 2px solid var(--f-border);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.f-nav-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.f-nav-tabs::-webkit-scrollbar { display: none; }
.f-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--f-text-sub);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
  position: relative;
}
.f-nav-tab i { font-size: 12px; }
.f-nav-tab:hover  { color: var(--primary); border-bottom-color: var(--f-border); }
.f-nav-tab.active { color: var(--primary); font-weight: 800; border-bottom-color: var(--primary); }
.f-nav-tab-sep {
  width: 1px;
  background: var(--f-border);
  margin: 10px 4px;
  flex-shrink: 0;
  align-self: stretch;
}
.f-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

/* ── Sidebar Sprint 5 — blocs communautaires ─────────────────────────────── */
.f-widget-s5 {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.f-widget-s5-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--f-text-sub);
  background: var(--f-bg);
  border-bottom: 1px solid var(--f-border);
}
.f-widget-s5-head i { color: var(--primary); font-size: 12px; }
.f-widget-s5-body { padding: 12px 14px; }

/* Bloc CTA sidebar */
.f-sidebar-cta-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: 10px;
  margin-bottom: 14px;
}

/* Membres en ligne */
.f-online-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px #dcfce7;
  animation: f-pulse-green 2s infinite;
}
@keyframes f-pulse-green {
  0%, 100% { box-shadow: 0 0 0 2px #dcfce7; }
  50%       { box-shadow: 0 0 0 4px #bbf7d0; }
}
.f-online-count {
  font-size: 13px;
  font-weight: 700;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.f-online-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.f-mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: var(--f-shadow-sm);
}

/* Classement contributeurs */
.f-rank-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  border-bottom: 1px solid var(--f-border-light);
}
.f-rank-row:last-child { border-bottom: none; }
.f-rank-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--f-text-muted);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.f-rank-num.top { color: var(--accent); }
.f-rank-name {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f-rank-score {
  font-size: 11px;
  font-weight: 700;
  color: var(--f-text-sub);
  background: var(--f-bg);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Modérateur */
.f-mod-card {
  display: flex;
  align-items: center;
  gap: 10px;
}
.f-mod-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.f-mod-avatar-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}
.f-mod-name  { font-size: 13px; font-weight: 700; color: var(--primary); }
.f-mod-badge { font-size: 10px; font-weight: 700; color: var(--accent); letter-spacing: .3px; }

/* ── Activity Hub ─────────────────────────────────────────────────────────── */
.f-activity-hub {
  background: #fff;
  border: 1px solid var(--f-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.f-activity-tabs {
  display: flex;
  border-bottom: 2px solid var(--f-border);
  background: var(--f-bg);
  overflow-x: auto;
  scrollbar-width: none;
}
.f-activity-tabs::-webkit-scrollbar { display: none; }
.f-activity-tab {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--f-text-sub);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: color .15s;
}
.f-activity-tab:hover  { color: var(--primary); }
.f-activity-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: #fff; }
.f-activity-panel { display: none; }
.f-activity-panel.active { display: block; }

/* Mini-cartes activity hub */
.f-mini-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--f-border-light);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.f-mini-card:last-child { border-bottom: none; }
.f-mini-card:hover { background: var(--f-bg); }
.f-mini-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}
.f-mini-card-body { flex: 1; min-width: 0; }
.f-mini-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  margin-bottom: 3px;
}
.f-mini-card-meta {
  font-size: 11px;
  color: var(--f-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.f-mini-card-kind {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

/* ── Drawer sidebar mobile ────────────────────────────────────────────────── */
.f-drawer-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 16px;
  z-index: 400;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  align-items: center;
  justify-content: center;
}
.f-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
}
.f-drawer-backdrop.open { display: block; }
.f-sidebar-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: #fff;
  z-index: 510;
  overflow-y: auto;
  transition: right .25s ease;
  padding: 0;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
}
.f-sidebar-drawer.open { right: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   FINITION UX/UI — typographie neutre, icônes monochromes, épuration
   ══════════════════════════════════════════════════════════════════════════ */

/* Typographie uniforme */
.f-feed-card-author  { color: #222; font-weight: 600; }
.f-feed-card-date    { color: #94a3b8; }
.f-feed-card-excerpt { color: #4b5563; }
a.f-feed-card-title,
.f-feed-card-title   { color: #222 !important; }
a.f-feed-card-title:hover,
.f-feed-card-title:hover { color: var(--primary) !important; text-decoration: none; }
.f-mini-card-title   { color: #222; }
.f-mini-card-meta    { color: #64748b; }
.f-rank-name         { color: #222; }
.f-rank-score        { color: #64748b; }
.f-mod-name          { color: #222; }

/* Pills de type — neutres */
.f-pill {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
}
.f-pill i { color: var(--primary); }
.f-pill--muted {
  background: #f8fafc;
  color: #64748b;
}
.f-pill--muted i { color: #94a3b8; }
.f-pill--hot {
  background: #fff1f2;
  color: #be123c;
}
.f-pill--hot i { color: #be123c; }

/* Filter pills — seule la couleur officielle pour l'état actif */
.f-filter-pill:not(.active) { color: #334155; }
.f-filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Hot tag neutre */
.f-hot-tag {
  background: #fff1f2;
  color: #be123c;
}

/* Mini-card icons — monochrome */
.f-mini-card-icon {
  background: #f1f5f9;
  color: var(--primary);
}

/* Action stat (compteurs non-cliquables) */
.f-action--stat {
  cursor: default;
  pointer-events: none;
  color: #94a3b8;
  font-size: 12px;
}

/* Boutons footer — couleurs neutres */
.f-action--comment       { color: #334155; }
.f-action--comment:hover { color: var(--primary); background: #f1f5f9; }
.f-action--share         { color: #64748b; }
.f-action--share:hover   { color: #334155; background: var(--f-bg); }

/* Category badge dans la card header */
.f-feed-card-cat { font-weight: 600; font-size: 11px; border-radius: 999px; padding: 2px 10px; text-decoration: none; }

/* Nav tab "Idées" actif — identique aux autres onglets */
.f-nav-tab.active { border-bottom-color: var(--primary); color: var(--primary); font-weight: 700; }

/* Responsive : sidebar-drawer flex layout */
@media (max-width: 860px) {
  .f-sidebar-drawer { display: flex; }
}
.f-sidebar-drawer.open { right: 0; }

/* ── Responsive Sprint 5 ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .f-grid { grid-template-columns: 1fr; }
  .f-sidebar { display: none; }
  .f-drawer-toggle { display: flex; }
}
@media (max-width: 700px) {
  .f-nav-tab { padding: 11px 12px; font-size: 12px; gap: 5px; }
  .f-activity-hub { border-radius: 0; border-left: none; border-right: none; margin: 0 -16px 16px; }
  .f-mini-card { padding: 9px 12px; }
}

/* Bouton ghost/outline forum */
.f-btn-ghost-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--f-border);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s, background .15s;
  cursor: pointer;
  font-family: inherit;
}
.f-btn-ghost-full:hover { border-color: var(--primary); background: var(--f-bg); }
.f-btn-full-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}
.f-btn-full-primary:hover { opacity: .9; }

/* ══════════════════════════════════════════════════════════════════════════
   CARTES ÉPURÉES — style post social, flux léger
   ══════════════════════════════════════════════════════════════════════════ */

/* Feed : liste continue séparée par filets */
.f-feed { gap: 0; background: #f3f4f6; border-radius: 10px; overflow: hidden; }
.f-feed-card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #eef0f3;
  box-shadow: none;
}
.f-feed-card:first-child { border-radius: 10px 10px 0 0; }
.f-feed-card:last-child  { border-radius: 0 0 10px 10px; border-bottom: none; }
.f-feed-card:hover       { box-shadow: none; background: #fafbfc; }
.f-feed-card.pinned      { border-left: 3px solid #b45309; }

/* Footer actions : épuré — seulement J'aime + Commentaires */
.f-feed-card-foot {
  padding: 6px 18px 12px;
  border-top: 1px solid #f3f4f6;
  gap: 8px;
}
.f-action--like {
  background: none;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font-weight: 600;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  transition: border-color .15s, color .15s, background .15s;
}
.f-action--like:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f4fb;
}
.f-action--comment {
  font-weight: 600;
  font-size: 12px;
  color: #475569;
  padding: 5px 12px;
  border-radius: 999px;
  transition: color .15s, background .15s;
}
.f-action--comment:hover { color: var(--primary); background: #f1f5f9; }

/* ══════════════════════════════════════════════════════════════════════════
   CITOYENS ACTIFS — sidebar, sans classement
   ══════════════════════════════════════════════════════════════════════════ */

.f-citizen-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  transition: background .12s;
}
.f-citizen-row:last-child { border-bottom: none; }
.f-citizen-row:hover { background: #fafbfc; }

.f-citizen-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.f-citizen-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a202c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f-citizen-stats {
  font-size: 11px;
  color: #64748b;
}
.f-citizen-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 2px;
  letter-spacing: 0.3px;
  width: fit-content;
}

