:root {
  --bg: #1b1d21;
  --panel: #26292e;
  --panel-2: #2d3036;
  --line: #363a41;
  --text: #e4e6ea;
  --muted: #9aa0a8;
  --sand: #d9b878;
  --sea: #4f9fbf;
  --green: #5fb87a;
  --radius: 6px;
  --max: 1260px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 "Source Sans 3", system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--sand); }
h1, h2, h3 { margin: 0; font-weight: 600; }
button { font: inherit; cursor: pointer; }

.ico, .ico-xs { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico { width: 22px; height: 22px; }
.ico-xs { width: 14px; height: 14px; vertical-align: -2px; }

/* Bannière */
.banner {
  height: 150px;
  background:
    linear-gradient(180deg, rgba(10, 20, 28, .1), rgba(10, 20, 28, .65)),
    url("../img/belle-ile-relief.jpg") center 42% / 120% auto;
}
.banner-inner {
  max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.logo-mark { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 4px 12px rgba(0,0,0,.45)); }
.logo-name { display: flex; flex-direction: column; font: 800 30px/1 "Montserrat", sans-serif; }
.logo-name small { font-size: 12px; font-weight: 600; letter-spacing: .6em; text-transform: uppercase; color: #dfe5ee; margin-top: 6px; }
.account { display: flex; background: rgba(20, 22, 26, .85); border-radius: var(--radius); padding: 4px; gap: 4px; }
.acc-btn { background: none; border: 0; color: var(--text); padding: 8px 14px; border-radius: 4px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.acc-user .avatar.sm { width: 24px; height: 24px; font-size: 12px; }
.acc-btn:hover { background: var(--panel-2); }
.acc-primary { background: var(--green); color: #0d1a11; }
.acc-primary:hover { background: #72c98c; }

/* Onglets */
.tabs { background: linear-gradient(#3a3d33, #2f3129); border-bottom: 1px solid #000; }
.tabs-inner { max-width: var(--max); margin: 0 auto; padding: 0 16px; display: flex; overflow-x: auto; }
.tabs a { padding: 12px 16px; color: #d6d8cf; font-weight: 600; white-space: nowrap; }
.tabs a:hover { background: rgba(255,255,255,.06); color: #fff; }
.tabs a.active { background: rgba(255,255,255,.12); color: #fff; }

/* Page */
.page { max-width: var(--max); margin: 0 auto; padding: 14px 16px 40px; }
.crumbs { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.crumbs .sep { color: var(--muted); margin: 0 8px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.title-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin-bottom: 14px; }
.title-bar h1 { font-size: 22px; }
.btn-soft { background: var(--panel-2); border: 1px solid var(--line); padding: 7px 12px; border-radius: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.btn-main { background: var(--sand); color: #1b1408; border: 0; padding: 8px 14px; border-radius: 4px; font-weight: 700; white-space: nowrap; }
.btn-main:hover { background: #e6c88d; }

/* Catégories */
.category { margin-bottom: 14px; }
.cat-head {
  padding: 11px 14px; font-size: 15px; font-weight: 700; color: #fff;
  border-radius: var(--radius) var(--radius) 0 0; margin-bottom: -1px;
  background:
    linear-gradient(90deg, rgba(20,30,36,.85), rgba(20,30,36,.35)),
    url("../img/belle-ile-relief.jpg") center 60% / cover;
  border: 1px solid var(--line);
}
.cat-head small { display: block; font-weight: 400; font-size: 13px; color: #c7cdd2; }
.category .panel { border-radius: 0 0 var(--radius) var(--radius); }

/* Lignes */
.row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 260px; gap: 12px; align-items: center;
  padding: 12px 14px; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--panel-2); }
.row-icon { color: var(--green); display: grid; place-items: center; }
.row.is-empty .row-icon { color: var(--muted); }
.row-title { font-weight: 700; font-size: 15px; }
.row-desc { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.subs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; }
.subs a { font-size: 13px; color: var(--green); display: inline-flex; align-items: center; gap: 5px; }
.row-stats { display: flex; justify-content: flex-end; gap: 20px; text-align: center; }
.row-stats b { display: block; font-size: 15px; }
.row-stats span { font-size: 11px; color: var(--muted); }
.row-last { display: flex; align-items: center; gap: 10px; min-width: 0; }
.last-text { display: flex; flex-direction: column; min-width: 0; }
.last-text.right { align-items: flex-end; margin-left: auto; }
.last-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { font-size: 12px; color: var(--muted); }
.none { padding-left: 4px; }
.pin { color: var(--sand); margin-right: 6px; }
.empty { padding: 28px; text-align: center; color: var(--muted); margin: 0; }
.empty a { color: var(--sand); }

.avatar {
  --c: var(--sand);
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; color: #1b1408;
  background: var(--c);
}
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }

/* Sujet */
.post { display: grid; grid-template-columns: 170px 1fr; margin-bottom: 10px; overflow: hidden; }
.post-user { background: var(--panel-2); padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border-right: 1px solid var(--line); }
.badge { --c: var(--sand); background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: .05em; }
.post-body { padding: 14px 20px; }
.post-body p { margin: 10px 0 0; }
.reply { display: flex; align-items: center; gap: 10px; padding: 14px 18px; color: var(--muted); }
.reply .btn-main { margin-left: auto; }

/* Écriture et modération */
.avatar { background-size: cover; background-position: center; }
.note-demo { padding: 10px 14px; margin-bottom: 14px; color: var(--sand); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.editor { padding: 16px 18px; display: grid; gap: 12px; margin-bottom: 10px; }
.editor label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.editor input, .editor textarea {
  font: 400 15px/1.5 "Source Sans 3", sans-serif; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; width: 100%; resize: vertical;
}
.editor input:focus, .editor textarea:focus { outline: 2px solid var(--sand); outline-offset: 1px; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
a.btn-main, a.btn-soft { display: inline-block; text-decoration: none; }
a.btn-main:hover { color: #1b1408; }
.btn-main:disabled { opacity: .6; cursor: default; }
.mod-tools, .post-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.post-tools { margin-top: 12px; justify-content: flex-end; }
.outil { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); padding: 5px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer; }
.outil:hover { color: var(--text); border-color: var(--muted); }
.outil.danger:hover { color: #ff6b6b; border-color: #ff6b6b; }
.lock { color: var(--muted); margin-right: 6px; }

/* Chat en direct */
.chat { display: grid; grid-template-columns: 190px 1fr; min-height: 520px; overflow: hidden; }
.chat-salons { background: var(--panel-2); border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.chat-salons a { padding: 8px 10px; border-radius: 4px; color: var(--muted); font-weight: 600; }
.chat-salons a:hover { background: var(--panel); color: var(--text); }
.chat-salons a.on { background: var(--panel); color: var(--text); box-shadow: inset 3px 0 0 var(--sand); }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; height: 420px; }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; position: relative; }
.chat-msg p { margin: 2px 0 0; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-nom { font-weight: 700; }
.chat-suppr { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; opacity: 0; }
.chat-msg:hover .chat-suppr { opacity: 1; }
.chat-suppr:hover { color: #ff6b6b; }
.chat-info { color: var(--muted); margin: auto; text-align: center; padding: 14px; }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; font: 400 15px "Source Sans 3", sans-serif; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; }
.chat-form input:focus { outline: 2px solid var(--sand); outline-offset: 1px; }
.widget-chat { display: grid; gap: 8px; text-decoration: none; }
.widget-chat .btn-main { text-align: center; }
@media (max-width: 640px) {
  .chat { grid-template-columns: 1fr; }
  .chat-salons { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-list { height: 360px; }
}

/* Colonne */
.sidebar { display: grid; gap: 14px; }
.widget { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.widget h3 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.discord { background: #5865f2; border: 0; color: #fff; text-align: center; }
.discord-logo { font: 700 30px "Space Grotesk", sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.discord p { margin: 6px 0 12px; font-size: 14px; }
.discord-btn { width: 100%; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; padding: 7px; font-weight: 700; text-transform: uppercase; font-size: 12px; opacity: .8; cursor: default; }
.recent { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.recent:first-of-type { border-top: 0; }
.recent > div { display: flex; flex-direction: column; min-width: 0; }
.recent a:first-child { font-weight: 600; font-size: 14px; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 0; font-size: 14px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-weight: 600; text-align: right; }

/* Pied de page */
.footer { background: #141518; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 14px 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.copyright { text-align: center; margin: 0; padding: 0 16px 18px; font-size: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--panel-2); border: 1px solid var(--sand); color: var(--text);
  padding: 10px 16px; border-radius: var(--radius); opacity: 0; pointer-events: none;
  transition: .25s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .row { grid-template-columns: 40px minmax(0, 1fr) 130px; }
  .row-last { grid-column: 2 / -1; }
}
@media (max-width: 640px) {
  .banner { height: 120px; }
  .banner-inner { flex-direction: column; justify-content: center; align-items: flex-start; }
  .logo { font-size: 22px; }
  .logo-mark { width: 44px; height: 44px; }
  .logo-name { font-size: 22px; }
  .row { grid-template-columns: 34px minmax(0, 1fr); gap: 4px 10px; }
  .row-stats { grid-column: 2; justify-content: flex-start; text-align: left; }
  .row-stats div { display: flex; gap: 5px; align-items: baseline; }
  .row-last { grid-column: 2; }
  .post { grid-template-columns: 1fr; }
  .post-user { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .avatar.lg { width: 40px; height: 40px; font-size: 18px; }
  .title-bar { flex-wrap: wrap; }
}
