/* ===== Forum des rencontres — ambiance chaleureuse ===== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --forum-ink: #1e3a5f;
  --forum-ink-soft: #3d5a80;
  --forum-sky: #e8f3ff;
  --forum-sky-deep: #cfe6ff;
  --forum-card: #ffffff;
  --forum-accent: #2563eb;
  --forum-accent-soft: #dbeafe;
  --forum-warm: #f59e0b;
  --forum-radius: 1.25rem;
  --forum-shadow: 0 10px 30px -12px rgba(30, 58, 95, 0.25);
  --forum-shadow-hover: 0 18px 40px -14px rgba(37, 99, 235, 0.35);
}

.forum-body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  color: var(--forum-ink);
  background:
    radial-gradient(ellipse 70% 45% at 5% -5%, #fdba7488 0%, transparent 50%),
    radial-gradient(ellipse 55% 40% at 100% 5%, #c4b5fd88 0%, transparent 48%),
    radial-gradient(ellipse 50% 35% at 50% 100%, #6ee7b755 0%, transparent 45%),
    linear-gradient(180deg, #eff6ff 0%, #fdf4ff 35%, #ecfeff 70%, #f0fdf4 100%);
  min-height: 100vh;
  background-attachment: fixed;
}

.forum-body h1,
.forum-body h2,
.forum-body h3,
.forum-display {
  font-family: 'Nunito', system-ui, sans-serif;
}

/* Motif décoratif léger */
.forum-body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(37,99,235,0.15) 0 1px, transparent 2px);
  background-size: 48px 48px, 36px 36px;
}

.forum-shell {
  position: relative;
  z-index: 1;
}

/* Hero */
.forum-hero {
  position: relative;
  overflow: visible; /* laisse le panneau notifications déborder */
  color: #fff;
  background: #0f172a;
  box-shadow: 0 12px 40px -16px rgba(15, 23, 42, 0.55);
  min-height: 11rem;
  z-index: 20;
}

.forum-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden; /* clippe le zoom des photos */
  border-radius: inherit;
}

.forum-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s ease-in-out, transform 8s ease-out;
  will-change: opacity, transform;
}

.forum-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.forum-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.72) 0%, rgba(30, 58, 138, 0.45) 45%, rgba(8, 47, 73, 0.55) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.55) 0%, transparent 55%);
  pointer-events: none;
}

/* Anciens halos désactivés au profit des photos */
.forum-hero::before,
.forum-hero::after {
  display: none;
}

.forum-hero-inner {
  position: relative;
  z-index: 2;
}

.forum-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.forum-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.forum-nav-btn:hover {
  transform: translateY(-1px);
}

.forum-nav-btn--ghost {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.forum-nav-btn--ghost:hover {
  background: rgba(255,255,255,0.26);
}

.forum-nav-btn--solid {
  background: #fff;
  color: #1d4ed8;
}

.forum-nav-btn--solid:hover {
  background: #eff6ff;
}

/* Intro / flash */
.forum-intro {
  background: linear-gradient(135deg, #ffffff 0%, #fdf4ff 45%, #ecfeff 100%);
  border: 1px solid rgba(196, 181, 253, 0.55);
  border-radius: var(--forum-radius);
  box-shadow: var(--forum-shadow);
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.forum-intro::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #a855f7, #2563eb, #14b8a6);
}

.forum-flash {
  border-radius: 1rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.925rem;
  font-weight: 500;
  animation: forumSlideIn 0.35s ease;
}

.forum-flash--ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.forum-flash--err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Fil d'Ariane — pastilles cliquables */
.forum-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.35rem;
}

.forum-crumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
  border: 1px solid transparent;
  box-shadow: 0 6px 16px -10px rgba(30, 58, 95, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.forum-crumb-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 11rem;
}

@media (min-width: 640px) {
  .forum-crumb-btn span {
    max-width: 16rem;
  }
}

a.forum-crumb-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 10px 22px -10px rgba(30, 58, 95, 0.45);
}

a.forum-crumb-btn:active {
  transform: translateY(0);
}

.forum-crumb-btn i {
  font-size: 0.78rem;
  opacity: 0.92;
}

.forum-crumb-btn--home {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 55%, #0891b2 100%);
}

.forum-crumb-btn--region {
  color: #0f4c5c;
  background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
  border-color: #7dd3fc;
}

.forum-crumb-btn--dept {
  color: #7c2d12;
  background: linear-gradient(135deg, #ffedd5, #fde68a);
  border-color: #fdba74;
}

.forum-crumb-btn--current {
  color: #1e3a5f;
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px -10px rgba(30, 58, 95, 0.3);
  cursor: default;
}

.forum-crumb-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  color: #94a3b8;
  font-size: 0.65rem;
  flex-shrink: 0;
}

/* Region cards grid */
.forum-region-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .forum-region-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.forum-region-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--forum-card);
  border-radius: var(--forum-radius);
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.7);
  box-shadow: var(--forum-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: forumRise 0.45s ease both;
}

.forum-region-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--forum-shadow-hover);
  border-color: #93c5fd;
}

.forum-region-card:nth-child(1) { animation-delay: 0.02s; }
.forum-region-card:nth-child(2) { animation-delay: 0.05s; }
.forum-region-card:nth-child(3) { animation-delay: 0.08s; }
.forum-region-card:nth-child(4) { animation-delay: 0.11s; }
.forum-region-card:nth-child(5) { animation-delay: 0.14s; }
.forum-region-card:nth-child(6) { animation-delay: 0.17s; }
.forum-region-card:nth-child(7) { animation-delay: 0.2s; }
.forum-region-card:nth-child(8) { animation-delay: 0.23s; }

.forum-region-icon {
  flex: 0 0 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.45rem;
}

.forum-region-body {
  flex: 1;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.forum-region-title {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--forum-ink);
  line-height: 1.25;
}

.forum-region-meta {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: #64748b;
}

.forum-region-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  border-left: 1px solid #dbeafe;
  min-width: 4.5rem;
}

.forum-region-stat strong {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.25rem;
  color: #1d4ed8;
  line-height: 1;
}

.forum-region-stat span {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Dept chips */
.forum-dept-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .forum-dept-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.forum-dept-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 18px -10px rgba(30, 58, 95, 0.2);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.forum-dept-card:hover {
  transform: translateY(-2px);
  border-color: #c4b5fd;
  box-shadow: var(--forum-shadow);
}

.forum-dept-card .pin {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,0.28);
  background: linear-gradient(135deg, #38bdf8, #0284c7);
}

.forum-pin--teal    { background: linear-gradient(135deg, #14b8a6, #0f766e) !important; }
.forum-pin--rose    { background: linear-gradient(135deg, #fb7185, #e11d48) !important; }
.forum-pin--amber   { background: linear-gradient(135deg, #fbbf24, #d97706) !important; }
.forum-pin--violet  { background: linear-gradient(135deg, #a78bfa, #7c3aed) !important; }
.forum-pin--emerald { background: linear-gradient(135deg, #34d399, #059669) !important; }
.forum-pin--sky     { background: linear-gradient(135deg, #38bdf8, #0284c7) !important; }
.forum-pin--orange  { background: linear-gradient(135deg, #fb923c, #ea580c) !important; }
.forum-pin--fuchsia { background: linear-gradient(135deg, #e879f9, #c026d3) !important; }
.forum-pin--lime    { background: linear-gradient(135deg, #a3e635, #65a30d) !important; }
.forum-pin--cyan    { background: linear-gradient(135deg, #22d3ee, #0891b2) !important; }
.forum-pin--indigo  { background: linear-gradient(135deg, #818cf8, #4f46e5) !important; }
.forum-pin--pink    { background: linear-gradient(135deg, #f472b6, #db2777) !important; }

.forum-dept-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #5b21b6;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  white-space: nowrap;
  border: 1px solid #ddd6fe;
}

/* Topics */
.forum-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.forum-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--forum-ink);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.forum-section-title .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #f59e0b, #14b8a6);
  box-shadow: 0 0 0 4px #ede9fe;
}

.forum-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #db2777, #ea580c);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 18px -10px rgba(124, 58, 237, 0.7);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.forum-cta-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.forum-topic {
  display: block;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 1.1rem;
  padding: 1.05rem 1.2rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 22px -14px rgba(30, 58, 95, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.forum-topic::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #2563eb, #38bdf8);
  opacity: 0;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.forum-topic:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: var(--forum-shadow);
}

.forum-topic:hover::before {
  opacity: 1;
}

.forum-topic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.forum-topic-title {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--forum-ink);
  flex: 1;
  min-width: 0;
}

.forum-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: #64748b;
  align-items: center;
}

/* Sujet récent — accent chaud (ambre / corail), pas un aplati rose */
.forum-topic.is-new {
  background:
    linear-gradient(125deg, rgba(255, 247, 237, 0.95) 0%, rgba(255, 255, 255, 0.92) 42%, rgba(255, 241, 242, 0.55) 100%),
    #fff;
  border-color: #fdba74;
  box-shadow:
    0 10px 28px -14px rgba(245, 158, 11, 0.4),
    0 0 0 1px rgba(251, 146, 60, 0.12);
}

.forum-topic.is-new::before {
  opacity: 1;
  width: 5px;
  background: linear-gradient(180deg, #fbbf24 0%, #f97316 55%, #fb7185 100%);
}

.forum-topic.is-new::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 60%
  );
  background-size: 220% 100%;
  animation: forumNewShimmer 4.5s ease-in-out infinite;
  opacity: 0.55;
}

.forum-topic.is-new:hover {
  border-color: #fb923c;
  box-shadow:
    0 16px 36px -14px rgba(249, 115, 22, 0.42),
    0 0 0 1px rgba(251, 146, 60, 0.2);
}

.forum-topic.is-new .forum-topic-title {
  color: #9a3412;
}

.forum-topic-badge-new {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 55%, #e11d48 100%);
  box-shadow: 0 6px 16px -6px rgba(234, 88, 12, 0.75);
  animation: forumNewPulse 2.4s ease-in-out infinite;
}

.forum-topic-badge-new i {
  font-size: 0.7rem;
}

@keyframes forumNewPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 16px -6px rgba(234, 88, 12, 0.75);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 8px 20px -4px rgba(225, 29, 72, 0.55);
  }
}

@keyframes forumNewShimmer {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .forum-topic.is-new::after,
  .forum-topic-badge-new {
    animation: none;
  }
}

.forum-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(180deg, #ffffff, #f0f7ff);
  border: 2px dashed #bfdbfe;
  border-radius: var(--forum-radius);
}

.forum-empty-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  font-size: 1.6rem;
}

/* Posts / thread */
.forum-post {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 1.25rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 10px 28px -16px rgba(30, 58, 95, 0.3);
  animation: forumRise 0.4s ease both;
}

.forum-post--first {
  background: linear-gradient(160deg, #ffffff 0%, #f0f7ff 100%);
  border-color: #93c5fd;
}

.forum-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.forum-post-body {
  color: #1e293b;
  line-height: 1.7;
  font-size: 1.02rem;
  white-space: pre-wrap;
}

.forum-post-edited {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
}

.forum-post-action {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.forum-post-action:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

.forum-post-action--danger:hover {
  color: #dc2626;
  background: #fef2f2;
}

.forum-post-image {
  display: block;
  margin-top: 0.9rem;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  max-width: min(100%, 28rem);
  box-shadow: 0 8px 20px -12px rgba(30, 58, 95, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.forum-post-image:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -12px rgba(37, 99, 235, 0.35);
}

.forum-post-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: cover;
}

.forum-post-edit {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #cbd5e1;
}

.forum-edit-remove-image {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
}

.forum-image-field {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.forum-image-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px dashed #93c5fd;
  border-radius: 0.85rem;
  background: #f8fbff;
  color: #1e40af;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: fit-content;
  max-width: 100%;
}

.forum-image-label:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.forum-image-label em {
  font-style: normal;
  font-weight: 500;
  color: #64748b;
  font-size: 0.78rem;
}

.forum-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.forum-image-preview {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.forum-image-preview img {
  display: block;
  max-width: min(100%, 16rem);
  max-height: 10rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  object-fit: cover;
}

.forum-image-preview-clear {
  position: absolute;
  top: -0.4rem;
  right: -0.4rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  border: none;
  background: #0f172a;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35);
}

.forum-avatar {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
}

.forum-avatar--member {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.forum-avatar--guest {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

/* Compose panels */
.forum-compose {
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 1.35rem;
  padding: 1.35rem 1.4rem;
  box-shadow: var(--forum-shadow);
  position: relative;
  overflow: hidden;
}

.forum-compose::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #2563eb, #14b8a6, #f59e0b);
}

.forum-compose-guest {
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
  border: 1px solid #fcd34d;
  border-radius: 1.35rem;
  padding: 1.35rem 1.4rem;
  box-shadow: 0 12px 28px -16px rgba(245, 158, 11, 0.45);
}

.forum-input {
  width: 100%;
  border: 1.5px solid #dbeafe;
  border-radius: 0.9rem;
  padding: 0.75rem 0.95rem;
  font-size: 0.95rem;
  background: #f8fbff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.forum-input:focus {
  outline: none;
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.forum-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: 'Nunito', system-ui, sans-serif;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.forum-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.forum-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #2563eb, #0891b2);
  box-shadow: 0 10px 22px -10px rgba(124, 58, 237, 0.75);
}

.forum-btn--warm {
  color: #78350f;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 10px 22px -10px rgba(245, 158, 11, 0.7);
}

.forum-btn--ghost {
  color: #334155;
  background: #f1f5f9;
  box-shadow: none;
}

.forum-btn--ghost:hover {
  background: #e2e8f0;
}

/* Badge refinements */
.forum-body .badge-membre,
.forum-badge-membre {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.forum-badge-invite {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

@keyframes forumFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(18px); }
}

@keyframes forumRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes forumSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Notifications */
.forum-notif-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.forum-notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: min(22rem, 86vw);
  background: #fff;
  color: var(--forum-ink);
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px -16px rgba(30, 58, 95, 0.45);
  z-index: 100;
  overflow: hidden;
}

.forum-notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.forum-notif-empty {
  padding: 1.1rem;
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.forum-notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 20rem;
  overflow: auto;
}

.forum-notif-list li a {
  display: block;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.forum-notif-list li a:hover {
  background: #f8fafc;
}

.forum-notif-list li.is-unread a {
  background: #eff6ff;
}

.forum-notif-msg {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.forum-notif-time {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.forum-report-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 0.4rem;
}

.forum-report-btn:hover {
  color: #dc2626;
  background: #fef2f2;
}

/* —— Message privé (bouton sous post) —— */
.forum-post-pm {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #e2e8f0;
}

.forum-pm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--forum-accent);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 0.65rem;
  background: var(--forum-accent-soft);
  transition: background 0.15s ease, transform 0.15s ease;
}

.forum-pm-btn:hover {
  background: #bfdbfe;
  transform: translateY(-1px);
}

.forum-pm-btn-hint {
  font-weight: 500;
  font-size: 0.7rem;
  color: #64748b;
}

/* —— Messagerie privée —— */
.pm-page .pm-hero {
  min-height: 0;
}

.pm-hero-copy {
  max-width: 36rem;
}

.pm-hero-lead {
  margin: 0.65rem 0 0;
  color: rgba(239, 246, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.5;
}

.pm-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.pm-hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.pm-hero-stats--hot {
  background: rgba(245, 158, 11, 0.35) !important;
}

.pm-shell {
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
  min-height: min(70vh, 38rem);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1.5rem;
  box-shadow:
    0 24px 50px -28px rgba(30, 58, 95, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  overflow: hidden;
  backdrop-filter: blur(10px);
  animation: pmShellIn 0.45s ease both;
}

@keyframes pmShellIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.pm-inbox,
.pm-thread {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: transparent;
}

.pm-inbox {
  border-right: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 40%);
}

.pm-inbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.15rem 0.95rem;
  border-bottom: 1px solid #e8eef6;
}

.pm-inbox-head strong {
  display: block;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.05rem;
  color: var(--forum-ink);
}

.pm-inbox-sub {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.pm-inbox-count {
  flex-shrink: 0;
  min-width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #1e40af;
  background: #dbeafe;
  padding: 0 0.45rem;
  border-radius: 0.55rem;
}

.pm-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.4rem;
  gap: 0.55rem;
}

.pm-empty-state h3 {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.1rem;
  color: var(--forum-ink);
}

.pm-empty-state p {
  margin: 0 0 0.5rem;
  max-width: 18rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

.pm-empty-state--thread {
  margin: auto;
}

.pm-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #1d4ed8;
  background:
    linear-gradient(145deg, #dbeafe, #bfdbfe);
  box-shadow: 0 10px 22px -12px rgba(37, 99, 235, 0.55);
  margin-bottom: 0.35rem;
}

.pm-empty-icon--soft {
  background: linear-gradient(145deg, #fef3c7, #fde68a);
  color: #b45309;
  box-shadow: 0 10px 22px -12px rgba(245, 158, 11, 0.5);
}

.pm-conv-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  overflow: auto;
  flex: 1;
}

.pm-conv-list li a {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.7rem;
  text-decoration: none;
  color: inherit;
  border-radius: 1rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.pm-conv-list li a:hover {
  background: #f1f5f9;
}

.pm-conv-list li.is-active a {
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  box-shadow: inset 3px 0 0 #2563eb;
}

.pm-conv-list li.is-unread a {
  background: #f0f9ff;
}

.pm-conv-list li.is-unread.is-active a {
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.pm-conv-avatar,
.pm-thread-avatar {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(145deg, #2563eb, #0ea5e9);
  box-shadow: 0 8px 16px -10px rgba(37, 99, 235, 0.7);
}

.pm-conv-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pm-conv-top,
.pm-conv-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pm-conv-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--forum-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-unread-pill {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: #2563eb;
  padding: 0.12rem 0.42rem;
  border-radius: 0.45rem;
  line-height: 1.2;
}

.pm-conv-preview {
  min-width: 0;
  flex: 1;
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-conv-list li.is-unread .pm-conv-preview {
  color: var(--forum-ink-soft);
  font-weight: 600;
}

.pm-conv-time {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
}

.pm-thread {
  background:
    radial-gradient(ellipse 55% 35% at 90% 0%, rgba(14, 165, 233, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 45% 30% at 0% 100%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #fbfdff 0%, #ffffff 55%);
}

.pm-thread-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  gap: 0.65rem;
}

.pm-thread-placeholder h2 {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.35rem;
  color: var(--forum-ink);
}

.pm-thread-placeholder p {
  margin: 0 0 0.4rem;
  max-width: 22rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
}

.pm-placeholder-art {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.4rem;
}

.pm-placeholder-orb {
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #dbeafe, #bae6fd);
  transform: rotate(8deg);
  animation: pmOrbFloat 4s ease-in-out infinite;
}

.pm-placeholder-art i {
  position: relative;
  z-index: 1;
  font-size: 1.75rem;
  color: #1d4ed8;
}

@keyframes pmOrbFloat {
  0%, 100% { transform: rotate(8deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-6px); }
}

.pm-thread-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid #e8eef6;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.pm-thread-who {
  min-width: 0;
}

.pm-thread-who strong {
  display: block;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.05rem;
  color: var(--forum-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-thread-sub {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.pm-thread-sub i {
  color: #0ea5e9;
}

.pm-back-list {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
  color: var(--forum-ink);
  text-decoration: none;
  background: #e2e8f0;
  transition: background 0.15s ease;
}

.pm-back-list:hover {
  background: #cbd5e1;
}

.pm-thread-messages {
  flex: 1;
  overflow: auto;
  padding: 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 12rem;
}

.pm-bubble {
  max-width: min(82%, 26rem);
  padding: 0.7rem 0.95rem;
  border-radius: 1.1rem;
  animation: pmBubbleIn 0.28s ease both;
}

@keyframes pmBubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pm-bubble--mine {
  align-self: flex-end;
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #fff;
  border-bottom-right-radius: 0.35rem;
  box-shadow: 0 10px 22px -14px rgba(37, 99, 235, 0.75);
}

.pm-bubble--theirs {
  align-self: flex-start;
  background: #fff;
  color: var(--forum-ink);
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 0.35rem;
  box-shadow: 0 8px 18px -14px rgba(30, 58, 95, 0.35);
}

.pm-bubble-body {
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}

.pm-bubble-time {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.68rem;
  opacity: 0.72;
}

.pm-compose {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid #e8eef6;
  background: rgba(255, 255, 255, 0.92);
}

.pm-compose-field {
  flex: 1;
  min-width: 0;
}

.pm-compose-input {
  width: 100%;
  min-height: 2.85rem;
  max-height: 8rem;
  resize: none;
  border: 1.5px solid #dbe3ef;
  border-radius: 1rem;
  padding: 0.7rem 0.95rem;
  font: inherit;
  color: var(--forum-ink);
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pm-compose-input:focus {
  outline: none;
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pm-send-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: none;
  cursor: pointer;
  padding: 0.75rem 1.15rem;
  border-radius: 1rem;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.7);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.pm-send-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.pm-send-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

@media (max-width: 860px) {
  .pm-shell {
    grid-template-columns: 1fr;
    min-height: min(72vh, 34rem);
  }

  .pm-shell--open .pm-inbox {
    display: none;
  }

  .pm-shell:not(.pm-shell--open) .pm-thread {
    display: none;
  }

  .pm-back-list {
    display: inline-flex;
  }

  .pm-inbox {
    border-right: none;
  }

  .pm-thread-messages {
    min-height: 45vh;
  }

  .pm-send-btn span {
    display: none;
  }

  .pm-send-btn {
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    justify-content: center;
    border-radius: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .forum-hero::before,
  .forum-hero::after,
  .forum-region-card,
  .forum-post,
  .forum-flash,
  .pm-bubble,
  .pm-shell,
  .pm-placeholder-orb {
    animation: none !important;
  }

  .forum-hero-slide {
    transition: none !important;
    transform: none !important;
  }
}
