/* Communauté Mama4care — mêmes tokens que le site et le blog. */
:root {
  --rose: #F43F6A; --rose-deep: #D91E55; --rose-soft: #FFE3EC;
  --blush: #FFF7FA; --ink: #2B1B26; --muted: #7A6670;
  --mint: #14B8A6; --mint-soft: #E7FAF6; --indigo: #6366F1;
  --amber-soft: #FEF3E2; --border: #F4E3EA;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--blush); line-height: 1.55; }
a { color: var(--rose-deep); }
button { font-family: inherit; }

.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-nav .inner { max-width: 980px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.site-nav .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.site-nav .brand .m4c-4 { color: var(--rose); }
.site-nav .links { display: flex; gap: 18px; font-weight: 600; font-size: .9rem; margin-inline-start: auto; }
.site-nav .links a { color: var(--muted); text-decoration: none; }
.site-nav .links a.active, .site-nav .links a:hover { color: var(--rose); }
.lang-switch { display: flex; gap: 4px; background: var(--rose-soft); border-radius: 999px; padding: 4px; }
.lang-pill { border: none; background: transparent; color: var(--rose-deep); font: 700 12px Inter, sans-serif; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.lang-pill.active { background: var(--rose); color: #fff; }
.auth-btn { border: none; background: var(--rose); color: #fff; font-weight: 700; font-size: .85rem; border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.auth-btn.ghost { background: var(--rose-soft); color: var(--rose-deep); }
@media (max-width: 720px) { .site-nav .links { display: none; } }

.wrap { max-width: 780px; margin: 0 auto; padding: 22px 16px 70px; }

.commu-hero { text-align: center; padding: 18px 10px 6px; }
.commu-hero h1 { margin: 0 0 6px; font-size: clamp(1.4rem, 3.6vw, 1.9rem); }
.commu-hero p { margin: 0; color: var(--muted); font-size: .95rem; }

.safety-note {
  background: var(--amber-soft); border: 1px solid #FBE1B3; border-radius: 14px;
  padding: 11px 15px; font-size: .84rem; color: #7A5210; margin: 16px 0;
}

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.cat-pill {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: .82rem; cursor: pointer;
}
.cat-pill.active { background: var(--rose); border-color: var(--rose); color: #fff; }
.sort-select { margin-inline-start: auto; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; font: 600 .82rem Inter, sans-serif; color: var(--ink); background: #fff; }

.new-post-btn {
  width: 100%; border: 2px dashed var(--rose-soft); background: #fff; color: var(--rose-deep);
  border-radius: 16px; padding: 14px; font-weight: 700; font-size: .95rem; cursor: pointer; margin: 6px 0 16px;
}
.new-post-btn:hover { border-color: var(--rose); }

.post-item {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 15px 17px; margin-bottom: 11px; cursor: pointer; transition: box-shadow .15s;
}
.post-item:hover { box-shadow: 0 10px 26px rgba(217,30,85,.1); }
.post-item h3 { margin: 0 0 5px; font-size: 1.02rem; line-height: 1.3; }
.post-item .snippet { color: var(--muted); font-size: .87rem; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .76rem; color: var(--muted); }
.cat-tag { background: var(--rose-soft); color: var(--rose-deep); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.count-chip { background: var(--blush); border-radius: 999px; padding: 2px 9px; font-weight: 700; }

.bot-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #EEF0FF; color: #4338CA; border: 1px solid #DDE1FF;
  border-radius: 999px; padding: 2px 9px; font-weight: 800; font-size: .72rem;
}

.empty { text-align: center; color: var(--muted); padding: 46px 10px; }

/* ── Fil (post + commentaires) ─────────────────────────────────────────── */
.back-link { display: inline-block; margin-bottom: 12px; font-weight: 700; font-size: .88rem; text-decoration: none; }
.thread-post { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; }
.thread-post h1 { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.3; }
.thread-post .body { white-space: pre-wrap; font-size: .97rem; }
.thread-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.act-btn {
  border: 1px solid var(--border); background: var(--blush); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: .82rem; cursor: pointer;
}
.act-btn.voted { background: var(--rose); border-color: var(--rose); color: #fff; }
.act-btn.mama { background: #EEF0FF; border-color: #DDE1FF; color: #4338CA; }
.act-btn:disabled { opacity: .55; cursor: default; }

.comment {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 16px; margin-top: 10px;
}
.comment.assistant { background: #F7F8FF; border-color: #DDE1FF; }
.comment .who { font-size: .78rem; color: var(--muted); font-weight: 700; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.comment .body { white-space: pre-wrap; font-size: .92rem; }

.composer { margin-top: 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.composer textarea, .composer input {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 13px;
  font: 400 .93rem Inter, sans-serif; outline: none; resize: vertical;
}
.composer textarea:focus, .composer input:focus { border-color: var(--rose); }
.composer .row { display: flex; gap: 8px; margin-top: 9px; align-items: center; flex-wrap: wrap; }
.composer select { border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; font: 600 .85rem Inter, sans-serif; background: #fff; }
.composer .send { margin-inline-start: auto; }

/* ── Modales (auth / pseudo / nouveau post / signalement) ─────────────── */
.modal-veil { position: fixed; inset: 0; background: rgba(43,27,38,.45); z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-veil.open { display: flex; }
.modal { background: #fff; border-radius: 20px; padding: 22px; width: min(420px, 100%); max-height: 90vh; overflow-y: auto; }
.modal h2 { margin: 0 0 6px; font-size: 1.15rem; }
.modal p.hint { margin: 0 0 14px; color: var(--muted); font-size: .86rem; }
.modal input, .modal textarea, .modal select {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 13px;
  font: 400 .93rem Inter, sans-serif; outline: none; margin-bottom: 10px;
}
.modal input:focus, .modal textarea:focus { border-color: var(--rose); }
.modal .primary { width: 100%; border: none; background: var(--rose); color: #fff; font-weight: 800; border-radius: 999px; padding: 12px; cursor: pointer; font-size: .95rem; }
.modal .secondary { width: 100%; border: 1px solid var(--border); background: #fff; color: var(--ink); font-weight: 700; border-radius: 999px; padding: 11px; cursor: pointer; font-size: .9rem; margin-top: 8px; }
.modal .link-row { text-align: center; margin-top: 10px; font-size: .84rem; }
.modal .err { color: #B91C1C; font-size: .84rem; margin: 4px 0 8px; min-height: 1em; }
.modal .close-x { float: inline-end; border: none; background: var(--blush); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 14px; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 16px 34px; text-align: center; color: var(--muted); font-size: .84rem; background: #fff; }
.site-footer a { color: var(--rose-deep); text-decoration: none; margin: 0 8px; }

html[dir="rtl"] .post-item h3, html[dir="rtl"] .thread-post h1 { text-align: start; }
