.forum-page {
  --paper: #f7f5f0;
  --surface: #fffefa;
  --ink: #25272a;
  --muted: #5b6066;
  --copper: #875334;
  --dark: #403126;
  --line: #c9bfb2;
  --focus: #286c60;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-wrap: anywhere;
}
.forum-page *, .forum-page *::before, .forum-page *::after { box-sizing: border-box; }
.forum-page .forum-shell { width: min(100% - 64px, 1200px); margin-inline: auto; }
.forum-page a { color: #704023; text-underline-offset: .2em; }
.forum-page a:focus-visible, .forum-page button:focus-visible,
.forum-page input:focus-visible, .forum-page select:focus-visible,
.forum-page textarea:focus-visible, .forum-page #forum-main:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.forum-page .forum-skip {
  position: fixed; z-index: 10; top: -90px; left: 12px;
  padding: 12px 16px; border-radius: 8px;
  background: var(--surface); color: var(--ink);
}
.forum-page .forum-skip:focus { top: 12px; }
.forum-page h1, .forum-page h2, .forum-page h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.18;
}

.forum-page .forum-header { background: var(--dark); color: #fff6e4; }
.forum-page .forum-header-inner {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 12px 22px; min-height: 88px; padding-block: 12px;
}
.forum-page .forum-brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  color: #fff6e4; text-decoration: none;
}
.forum-page .forum-brand img {
  width: 54px; height: 54px; object-fit: cover;
  border: 1px solid #a77856; border-radius: 8px;
}
.forum-page .forum-brand span { display: grid; gap: 1px; }
.forum-page .forum-brand strong { font: 700 20px/1.12 Georgia, serif; }
.forum-page .forum-brand small {
  font: 700 10px/1.4 system-ui, sans-serif; letter-spacing: .14em;
}
.forum-page .forum-main-nav {
  display: flex; align-items: center; flex: 1; flex-wrap: wrap; gap: 4px;
}
.forum-page .forum-main-nav a, .forum-page .forum-account-wrap a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 12px; border-radius: 8px;
  color: #fff6e4; font: 600 14px/1.35 system-ui, sans-serif;
}
.forum-page .forum-main-nav a[aria-current] { background: var(--copper); }
.forum-page .forum-main-nav a:hover, .forum-page .forum-account-wrap a:hover { background: #604735; }
.forum-page .forum-header a:focus-visible { outline-color: #fff6e4; }
.forum-page .forum-account-wrap {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font: 13px/1.4 system-ui, sans-serif;
}
.forum-page #forum-session { color: #f0d9c5; }
.forum-page .forum-account-wrap a { border: 1px solid #b79679; text-decoration: none; }

.forum-page .forum-hero { padding: 36px 0 30px; }
.forum-page .forum-eyebrow {
  margin: 0 0 8px; color: #704023;
  font: 700 11px/1.4 system-ui, sans-serif; letter-spacing: .14em;
}
.forum-page .forum-hero h1 {
  max-width: 820px; margin: 0 0 10px;
  font-size: clamp(2rem, 3.5vw, 2.75rem); letter-spacing: -.025em;
}
.forum-page .forum-intro { max-width: 72ch; margin: 0 0 16px; font-size: 17px; color: var(--muted); }
.forum-page .forum-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.forum-page .forum-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 9px 16px; border-radius: 10px;
  font: 700 14px/1.35 system-ui, sans-serif; text-align: center;
}
.forum-page .forum-button-primary { background: var(--copper); color: #fff; text-decoration: none; }
.forum-page .forum-button-primary:hover { background: #704023; }
.forum-page .forum-button-secondary { border: 1px solid var(--copper); color: var(--ink); }
.forum-page .forum-beta { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.forum-page .forum-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 284px;
  align-items: start; gap: 24px;
}
.forum-page .forum-primary { min-width: 0; }
.forum-page .forum-section { padding: 24px 0; border-top: 1px solid var(--line); }
.forum-page .forum-browse { padding-top: 0; border-top: 0; }
.forum-page .forum-section-heading { margin-bottom: 16px; }
.forum-page .forum-section-heading h2 { margin: 0; font-size: clamp(1.55rem, 2.4vw, 1.8rem); }
.forum-page .forum-categories {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.forum-page .forum-category {
  display: flex; flex-direction: column; min-width: 0; min-height: 138px;
  padding: 17px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none;
}
.forum-page .forum-category:hover { border-color: var(--copper); }
.forum-page .forum-category[aria-current="page"] { border: 2px solid var(--copper); padding: 16px; }
.forum-page .forum-category strong { color: var(--ink); font: 700 19px/1.3 Georgia, serif; }
.forum-page .forum-category span { margin-top: 8px; color: var(--muted); font: 14px/1.5 system-ui, sans-serif; }
.forum-page .forum-category::after {
  content: "Explorer la rubrique →"; margin-top: auto; padding-top: 12px;
  color: #704023; font: 700 13px/1.4 system-ui, sans-serif;
}
.forum-page .forum-category[aria-current="page"]::after { content: "Rubrique actuelle"; }

.forum-page #forum-status:empty { display: none; }
.forum-page #forum-status { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.forum-page .forum-card, .forum-page .forum-empty, .forum-page .forum-rules {
  margin: 0 0 14px; padding: 22px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface);
}
.forum-page .forum-card h3 { margin: 0 0 8px; font-size: 21px; }
.forum-page .forum-card h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.forum-page .forum-card p { margin: 8px 0 0; }
.forum-page .forum-byline, .forum-page .forum-category-label {
  color: var(--muted); font: 14px/1.5 system-ui, sans-serif;
}
.forum-page .forum-byline time { white-space: nowrap; }
.forum-page .forum-category-label { font-weight: 600; }
.forum-page .forum-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.forum-page .forum-rules { max-width: 72ch; }
.forum-page .forum-empty h3 { margin: 0 0 8px; font-size: 21px; }
.forum-page .forum-empty p { margin: 0 0 14px; color: var(--muted); }
.forum-page .forum-empty-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.forum-page .forum-empty a, .forum-page .forum-back {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0;
}
.forum-page .forum-back { margin-bottom: 10px; }
.forum-page .forum-pagination nav { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 0; }
.forum-page .forum-pagination a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 8px 16px; border: 1px solid var(--copper); border-radius: 8px;
}

.forum-page .forum-guide {
  padding: 22px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.forum-page .forum-guide h2 { margin: 0 0 14px; font-size: 24px; }
.forum-page .forum-guide p:not(.forum-eyebrow) { margin: 0 0 14px; color: var(--muted); }
.forum-page .forum-guide a { display: inline-flex; align-items: center; min-height: 44px; }

.forum-page .forum-participation { margin-top: 10px; }
.forum-page [hidden] { display: none !important; }
.forum-page .forum-form {
  display: grid; gap: 10px; max-width: 720px; padding: 24px; margin: 0 0 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.forum-page .forum-form h3, .forum-page .forum-form p { margin: 0; }
.forum-page .forum-form label { font: 600 14px/1.5 system-ui, sans-serif; }
.forum-page .forum-form input:not([type=checkbox]), .forum-page .forum-form select,
.forum-page .forum-form textarea {
  width: 100%; min-height: 44px; padding: 9px; border: 1px solid #827a70;
  border-radius: 8px; background: #fff; color: var(--ink);
  font: 16px/1.5 system-ui, sans-serif;
}
.forum-page .forum-form textarea { min-height: 130px; resize: vertical; }
.forum-page .forum-form button, .forum-page .forum-inline-button {
  min-height: 44px; padding: 9px 14px; border: 1px solid var(--copper);
  border-radius: 8px; background: var(--copper); color: #fff;
  font: 700 14px/1.4 system-ui, sans-serif; cursor: pointer;
}
.forum-page .forum-form button { justify-self: start; }
.forum-page .forum-form button:disabled { opacity: .55; cursor: wait; }
.forum-page .forum-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.forum-page .forum-check input { width: 20px; height: 20px; }
.forum-page #forum-member-status { font-size: 15px; }
.forum-page #forum-my-publications { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.forum-page .forum-inline-button { margin-top: 10px; background: transparent; color: #704023; }

.forum-page .forum-footer { margin-top: 28px; background: var(--dark); color: #fff6e4; }
.forum-page .forum-footer > div {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px;
  padding-block: 22px; font: 13px/1.5 system-ui, sans-serif;
}
.forum-page .forum-footer a { display: inline-flex; align-items: center; min-height: 44px; color: #fff6e4; }
.forum-page .forum-footer a:focus-visible { outline-color: #fff6e4; }

.forum-subpage .forum-hero { padding: 24px 0 20px; }
.forum-subpage .forum-hero h1 { margin-bottom: 0; font-size: clamp(1.8rem, 3vw, 2.35rem); }
.forum-subpage .forum-hero .forum-intro, .forum-subpage .forum-hero-actions,
.forum-subpage .forum-beta { display: none; }
.forum-view-rules .forum-browse, .forum-view-detail .forum-browse { display: none; }
.forum-view-rules .forum-discussions, .forum-view-detail .forum-discussions { padding-top: 0; border-top: 0; }

@media (max-width: 1099.98px) {
  .forum-page .forum-layout { grid-template-columns: minmax(0, 1fr); }
  .forum-page .forum-guide { max-width: 72ch; }
}
@media (max-width: 620px) {
  .forum-page .forum-shell { width: min(100% - 32px, 1200px); }
  .forum-page .forum-header-inner { gap: 8px 12px; }
  .forum-page .forum-brand img { width: 46px; height: 46px; }
  .forum-page .forum-brand strong { font-size: 18px; }
  .forum-page .forum-main-nav { flex: 0 0 100%; gap: 2px; }
  .forum-page .forum-main-nav a { padding-inline: 9px; }
  .forum-page .forum-account-wrap { margin-left: 0; }
  .forum-page .forum-hero { padding: 24px 0 22px; }
  .forum-page .forum-hero h1 { font-size: 2rem; }
  .forum-page .forum-intro { font-size: 16px; }
  .forum-page .forum-categories { grid-template-columns: minmax(0, 1fr); }
  .forum-page .forum-category { min-height: 0; }
  .forum-page .forum-card, .forum-page .forum-empty, .forum-page .forum-rules,
  .forum-page .forum-guide { padding: 18px; }
  .forum-page .forum-section { padding-block: 20px; }
}
