/* ══════════════════════════════════════════════════════════
   131e Escadron Virtual — Feuille de style principale
   Thème : militaire / aviation sombre
   ══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg-base:      #0d0f14;
  --bg-surface:   #151820;
  --bg-card:      #1a1e28;
  --bg-hover:     #1f2435;
  --bg-input:     #12151e;

  --accent:       #e8a020;
  --accent-dim:   #a06a10;
  --accent-glow:  rgba(232,160,32,.15);
  --green:        #3ab87a;
  --green-dim:    rgba(58,184,122,.15);
  --red:          #c84040;
  --blue:         #3a7fc8;

  --text-primary:   #e0e4f0;
  --text-secondary: #8892a8;
  --text-muted:     #505868;

  --border:       rgba(232,160,32,.18);
  --border-dim:   rgba(255,255,255,.06);

  --font-head: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-body: 'Noto Sans', sans-serif;

  --radius:   4px;
  --radius-lg: 8px;
  --shadow:   0 2px 16px rgba(0,0,0,.5);

  /* ── Variables topbar / header (utilisées pour le thème jour) ── */
  --topbar-bg:    #090b10;
  --header-bg:    linear-gradient(180deg, #0a0d14 0%, #111520 100%);
  --dropdown-bg:  #0d1117;
}

/* ── Thème jour ──────────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:      #c8cdd8;
  --bg-surface:   #d4d9e4;
  --bg-card:      #dde1ea;
  --bg-hover:     #c0c5d0;
  --bg-input:     #d4d9e4;

  --accent:       #b86c08;
  --accent-dim:   #8a5006;
  --accent-glow:  rgba(184,108,8,.15);
  --green:        #1e8a56;
  --green-dim:    rgba(30,138,86,.15);
  --red:          #b03030;
  --blue:         #2058a8;

  --text-primary:   #0e1118;
  --text-secondary: #2a3248;
  --text-muted:     #5a6280;

  --border:       rgba(184,108,8,.30);
  --border-dim:   rgba(0,0,0,.15);

  --shadow:   0 2px 16px rgba(0,0,0,.18);

  --topbar-bg:    #b8bcc8;
  --header-bg:    linear-gradient(180deg, #d4d9e4 0%, #c8cdd8 100%);
  --dropdown-bg:  #d4d9e4;
}

/* Overrides structurels pour le mode jour (couleurs codées en dur dans le CSS) */
[data-theme="light"] .topbar {
  background: var(--topbar-bg);
  border-bottom-color: var(--border);
}
[data-theme="light"] .site-header {
  background: var(--header-bg);
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
}
[data-theme="light"] .site-nav__dropdown,
[data-theme="light"] .topbar__dropdown {
  background: var(--dropdown-bg);
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
[data-theme="light"] .site-nav__dropdown a,
[data-theme="light"] .topbar__dropdown a {
  color: var(--text-secondary);
}
[data-theme="light"] .site-nav__dropdown a:hover,
[data-theme="light"] .topbar__dropdown a:hover {
  background: rgba(184,108,8,.08);
  color: var(--accent);
}
[data-theme="light"] .site-nav__dropdown .dropdown-sep,
[data-theme="light"] .topbar__dropdown .dropdown-sep {
  background: rgba(0,0,0,.08);
}
[data-theme="light"] .topbar__divider {
  color: rgba(0,0,0,.2);
}

/* Bouton toggle thème */
#theme-toggle {
  background: none;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  padding: .1rem .35rem;
  line-height: 1;
  color: var(--text-secondary);
  transition: border-color .15s, background .15s;
  vertical-align: middle;
}
#theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: #f0c060; }

img { max-width: 100%; height: auto; }

h1,h2,h3,h4,h5 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-primary);
}

/* ── Layout ────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.main-content {
  flex: 1;
  padding: 1.5rem 0 3rem;
}

.layout-two-col {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
}
@media (max-width: 860px) {
  .layout-two-col { grid-template-columns: 1fr; }
}

/* ── Topbar ────────────────────────────────────────────── */
.topbar {
  background: #090b10;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  padding: .35rem 0;
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.topbar__clock { color: var(--green); font-weight: 600; }
.topbar__divider { color: var(--border); }
.topbar__admin { color: var(--accent) !important; }

/* ── Site Header ───────────────────────────────────────── */
.site-header {
  background: linear-gradient(180deg, #0a0d14 0%, #111520 100%);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 4px 32px rgba(0,0,0,.6);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
}
.logo-emblem {
  width: 52px;
  height: 52px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(232,160,32,.08);
  flex-shrink: 0;
}
.logo-emblem__number {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.logo-emblem__wing { font-size: 14px; color: var(--text-secondary); }
.logo-text__name {
  display: block;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-primary);
}
.logo-text__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: .25rem;
  margin-left: auto;
}
.site-nav__link {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-secondary);
  padding: .4rem .75rem;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  text-transform: uppercase;
}
.site-nav__link:hover,
.site-nav__link.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  margin-left: auto;
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: .5rem;
  }
  .site-nav--open { display: flex; }
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card__header {
  background: rgba(0,0,0,.25);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card__title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
}
.card__body { padding: 1.25rem; }

/* ── Page Title ────────────────────────────────────────── */
.page-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .05em;
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
.page-title small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: .02em;
}

/* ── Tables (forum, roster…) ───────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table th {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border-dim);
  vertical-align: middle;
}
table tr:last-child td { border-bottom: none; }
table tbody tr:hover { background: var(--bg-hover); }

/* ── Forum specific ────────────────────────────────────── */
.forum-category {
  margin-bottom: 2rem;
}
.forum-category__title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .5rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border-dim);
  border-bottom: none;
}

.forum-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto 6rem 6rem;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-top: none;
  transition: background .12s;
}
.forum-row:hover { background: var(--bg-hover); }
.forum-row__icon { color: var(--accent); font-size: 20px; text-align: center; }
.forum-row__name { font-family: var(--font-head); font-size: 16px; font-weight: 600; }
.forum-row__desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.forum-row__stats { font-size: 12px; color: var(--text-muted); text-align: right; font-family: var(--font-mono); }
.forum-row__last { font-size: 12px; color: var(--text-muted); text-align: right; }

.topic-row {
  display: grid;
  grid-template-columns: 1fr 5rem 5rem 200px;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border-dim);
  transition: background .12s;
}
.topic-row:hover { background: var(--bg-hover); }
.topic-row__title { font-weight: 500; }
.topic-row__title small { display: block; font-size: 12px; color: var(--text-muted); }
.topic-row--pinned .topic-row__title::before {
  content: '📌 ';
}
.topic-row--closed .topic-row__title { color: var(--text-secondary); }

/* ── Post ──────────────────────────────────────────────── */
.post {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid var(--border-dim);
}
@media (max-width: 640px) {
  .post { grid-template-columns: 1fr; }
}
.post__author {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-dim);
  padding: 1rem;
  text-align: center;
}
.post__author-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  display: block;
  margin-bottom: .25rem;
}
.post__author-grade {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
}
.post__author-posts { font-size: 11px; color: var(--text-muted); }
.post__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin: 0 auto .5rem;
  object-fit: cover;
  background: var(--bg-base);
}
.post__body {
  padding: 1rem 1.25rem;
}
.post__meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: .75rem;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: .5rem;
}
.post__content { line-height: 1.75; }
.post__content blockquote.bbcode-quote {
  border-left: 3px solid var(--accent);
  margin: .75rem 0;
  padding: .5rem 1rem;
  background: var(--bg-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.post__content blockquote.bbcode-quote cite {
  display: block;
  font-family: var(--font-head);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: .25rem;
}
.post__content pre.bbcode-code {
  background: var(--bg-base);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  margin: .5rem 0;
}
.post__signature {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--border-dim);
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  text-transform: uppercase;
}
.btn-primary {
  background: var(--accent);
  color: #0d0f14;
  border-color: var(--accent);
}
.btn-primary:hover { background: #f0c060; color: #0d0f14; border-color: #f0c060; }
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-dim);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { padding: .3rem .65rem; font-size: 12px; }

/* ── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: .35rem;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: .55rem .85rem;
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea.form-control { resize: vertical; min-height: 160px; }
select.form-control option { background: var(--bg-input); }

/* ── Badges & Pills ────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}
.badge-gold    { background: rgba(232,160,32,.2); color: var(--accent); border: 1px solid var(--accent-dim); }
.badge-green   { background: var(--green-dim); color: var(--green); }
.badge-blue    { background: rgba(58,127,200,.15); color: var(--blue); }
.badge-muted   { background: rgba(255,255,255,.05); color: var(--text-muted); }
.badge-red     { background: rgba(200,64,64,.15); color: var(--red); }
.badge-online  { background: var(--green-dim); color: var(--green); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .6; }
}

/* ── Grade colors ──────────────────────────────────────── */
.grade-general        { color: #f5c518; }
.grade-colonel        { color: #f5c518; }
.grade-lt-colonel     { color: #c8a020; }
.grade-commandant     { color: #c8a020; }
.grade-capitaine      { color: #a0c870; }
.grade-lieutenant     { color: #80b060; }
.grade-sous-lieutenant{ color: #60a050; }
.grade-aspirant       { color: #4a8040; }
.grade-eleve          { color: var(--text-secondary); }
.grade-admin          { color: var(--red); }
.grade-modo           { color: var(--blue); }

/* ── Stats bar ─────────────────────────────────────────── */
.stats-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: .75rem 1.25rem;
  min-width: 100px;
}
.stat-item__value {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-item__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Shoutbox ──────────────────────────────────────────── */
.shoutbox { font-size: 13px; }
.shout-item {
  padding: .4rem 0;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  gap: .5rem;
}
.shout-item__author { color: var(--accent); font-weight: 600; flex-shrink: 0; }
.shout-item__time   { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }
.shoutbox-form { display: flex; gap: .5rem; margin-top: .75rem; }
.shoutbox-form input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-size: 13px;
}

/* ── Awards ────────────────────────────────────────────── */
.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.award-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  transition: border-color .15s, transform .15s;
}
.award-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.award-card img { width: 64px; height: 64px; object-fit: contain; margin-bottom: .5rem; }
.award-card__name { font-family: var(--font-head); font-size: 14px; font-weight: 700; }
.award-card__count { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

/* ── Cursus ────────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--border-dim);
  border-radius: 3px;
  overflow: hidden;
  margin-top: .25rem;
}
.progress-bar__fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width .4s ease;
}

.module-status-ok      { color: var(--green); }
.module-status-pending { color: var(--accent); }
.module-status-none    { color: var(--text-muted); }

/* ── Pagination ────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: .4rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color .12s, color .12s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { border-color: var(--accent); background: var(--accent-glow); color: var(--accent); }

/* ── Flash messages ────────────────────────────────────── */
.flash {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: .75rem;
  font-size: 14px;
  border: 1px solid;
}
.flash--success { background: var(--green-dim); color: var(--green); border-color: rgba(58,184,122,.3); }
.flash--error   { background: rgba(200,64,64,.1); color: var(--red); border-color: rgba(200,64,64,.3); }
.flash--info    { background: rgba(58,127,200,.1); color: var(--blue); border-color: rgba(58,127,200,.3); }

/* ── Online indicator ──────────────────────────────────── */
.online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
  margin-right: .3rem;
}

/* ── Onglets briefing : hauteur minimale demi-page ─────── */
.briefing-tab-panel .card__body { min-height: 50vh; }

/* ── Chips accordion (IA / waypoints / fréquences) ─────── */
.bf-chips-row { display:flex; flex-wrap:wrap; gap:.35rem; margin-bottom:.65rem; }
.bf-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .65rem; border-radius: 12px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}
.bf-chip:hover  { border-color:rgba(232,160,32,.3); color:var(--text-primary); }
.bf-chip.bf-active { background:rgba(232,160,32,.12); color:var(--accent); border-color:rgba(232,160,32,.4); }
.bf-chip small  { font-weight:400; color:var(--text-muted); }
.bf-chip-panel  {
  display: none;
  padding: .7rem .9rem;
  background: var(--bg-card);
  border: 1px solid rgba(232,160,32,.18);
  border-radius: var(--radius);
  margin-bottom: .6rem;
  font-size: 13px;
}

/* ── Briefing rich content (onglets + hub IA) ──────────── */
.briefing-rich-content { font-size: 14px; line-height: 1.85; color: var(--text-secondary); }
.briefing-rich-content p {
  margin: 0 0 .9rem;
  line-height: 1.85;
}
.briefing-rich-content p:last-child { margin-bottom: 0; }
.briefing-rich-content ul,
.briefing-rich-content ol {
  margin: .15rem 0 .9rem 0;
  padding-left: 1.4rem;
}
.briefing-rich-content li {
  margin-bottom: .45rem;
  line-height: 1.75;
}
.briefing-rich-content li::marker { color: var(--accent); }
.briefing-rich-content strong {
  color: var(--text-primary);
  font-weight: 700;
}
.briefing-rich-content em { color: var(--text-muted); font-style: italic; }
.briefing-rich-content h3,
.briefing-rich-content h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.1rem 0 .55rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid rgba(232,160,32,.2);
}
.briefing-rich-content h3 { font-size: 12px; }
.briefing-rich-content h4 { font-size: 11px; }
.briefing-rich-content br { line-height: 2.2; }

/* ── Sections IA (hub enricher) ────────────────────────── */
.hub-section {
  margin-bottom: 1.1rem;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  overflow: hidden;
}
.hub-section + .hub-section { margin-top: .75rem; }
.hub-section__header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .9rem;
  background: rgba(232,160,32,.06);
  border-bottom: 1px solid var(--border-dim);
}
.hub-section__icon { font-size: 15px; flex-shrink: 0; }
.hub-section__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.hub-section__body {
  padding: .9rem 1rem;
  background: var(--bg-card);
}
.hub-section__body.briefing-rich-content { font-size: 13px; }

/* Bannière IA (validation DO) */
.hub-ia-banner {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  background: rgba(232,160,32,.06);
  border-top: 1px solid rgba(232,160,32,.15);
  font-size: 10px;
  font-family: var(--font-mono);
  color: #e8a020;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Briefing card ─────────────────────────────────────── */
.briefing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  transition: border-color .15s;
}
.briefing-card:hover { border-color: var(--accent); }
.briefing-card__title { font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.briefing-card__meta { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); margin-top: .25rem; }
.briefing-card__date {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
  text-align: right;
}
.briefing-card__date small { display: block; font-size: 11px; color: var(--text-muted); }

/* ── Profile ───────────────────────────────────────────── */
.profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card);
}
.profile-name {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: .25rem;
}
.profile-grade {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: .75rem;
}

/* ── Site footer ───────────────────────────────────────── */
.site-footer {
  background: #090b10;
  border-top: 1px solid var(--border);
  padding: 2rem 0 1rem;
  margin-top: auto;
  font-size: 13px;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 760px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  color: var(--text-muted);
}
.site-footer__col strong { color: var(--text-secondary); font-family: var(--font-head); letter-spacing: .04em; }
.site-footer__col a { color: var(--text-muted); }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__col--right { text-align: right; }
.footer-badge {
  display: inline-block;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: .3rem .75rem;
  border-radius: var(--radius);
  margin-bottom: .5rem;
}

/* ── Admin ─────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.admin-stat__value {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
}
.admin-stat__label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-family: var(--font-mono);
}

/* ── Responsive tweaks ─────────────────────────────────── */
@media (max-width: 640px) {
  .forum-row { grid-template-columns: 2.5rem 1fr; }
  .forum-row__stats, .forum-row__last { display: none; }
  .topic-row { grid-template-columns: 1fr 5rem; }
  .award-grid { grid-template-columns: repeat(2, 1fr); }

/* Permalink discret */
.permalink {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: .15rem .35rem;
  border-radius: 3px;
  transition: background .15s, color .15s;
}
.permalink:hover { background: var(--bg-hover); color: var(--accent); }

/* Pagination : flèches navig */
.pagination a, .pagination span.current {
  min-width: 2rem;
  padding: .35rem .55rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Posts en mobile : passer en colonne */
@media (max-width: 760px) {
  .forum-post__grid {
    grid-template-columns: 1fr !important;
  }
  .forum-post__grid > div:first-child {
    border-right: none !important;
    border-bottom: 1px solid var(--border-dim);
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: .75rem;
    align-items: center;
    text-align: left !important;
  }
  .forum-post__grid > div:first-child img {
    width: 50px !important;
    height: 50px !important;
    margin-bottom: 0 !important;
  }
}

/* Notification badge */
.notif-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: center;
  line-height: 18px;
  vertical-align: middle;
}

/* Aperçu BBCode */
#preview-area {
  animation: fadeIn .15s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Citation BBCode (existait peut-être déjà — version sûre) */
.bbcode-quote {
  border-left: 3px solid var(--accent);
  padding: .5rem .75rem;
  margin: .5rem 0;
  background: var(--bg-surface);
  font-size: 14px;
  color: var(--text-secondary);
}
.bbcode-quote cite {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  font-style: normal;
  color: var(--accent);
  margin-bottom: .25rem;
}

.bbcode-code {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  padding: .5rem .75rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13px;
}

}

/* ── Print / PDF ────────────────────────────────────────── */
@media print {
  nav, header, footer, .no-print, .btn, aside, .site-nav,
  .site-header, #hub-ia-panel, .shoutbox { display: none !important; }
  .kneeboard { page-break-after: always; break-after: page; }
  body { background: white !important; color: black !important; }
  .kneeboard * { color: black !important; background: white !important; border-color: #ccc !important; }
  a { color: black !important; text-decoration: none !important; }
}
