/*
 * Panel CrovaxRP — feuille de style unique.
 *
 * Identité : fond bleu nuit, bordures fines, accent violet de la charte (#645be6),
 * titres en Barlow Condensed italique très gras, texte en Manrope.
 * Polices servies par le bot (fonts/, licence OFL) : la politique de sécurité interdit
 * toute police ou feuille de style venue d'ailleurs, et tout attribut style= dans le HTML.
 *
 * Plan : polices · variables · base · cadre (barre d'icônes, barre du haut, pied) ·
 * composants (boutons, puces, cartes, chiffres, tableaux, formulaires) · pages.
 */

/* Polices ------------------------------------------------------------------------------------- */
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-n400v-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-n400v-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-style: italic; font-weight: 800; font-display: swap; src: url(fonts/barlow-i800-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: Barlow; font-style: italic; font-weight: 800; font-display: swap; src: url(fonts/barlow-i800-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/barlow-i700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: Barlow; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/barlow-n700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2212; }

/* Variables ----------------------------------------------------------------------------------- */
:root {
  --bg: #080b13;
  --bg-2: #0b101c;
  --panel: #0e1422;
  --card: #111827;
  --card-2: #151d2f;
  --card-hover: #18223a;
  --field: #0b111d;
  --line: #1c2538;
  --line-2: #26324b;
  --text: #e6e9f2;
  --muted: #8a93ab;
  --faint: #5b647c;
  --white: #ffffff;
  --primary: #645be6;
  --primary-2: #7c74ff;
  --primary-light: #aaa5ff;
  --primary-soft: rgba(100, 91, 230, 0.14);
  --primary-line: rgba(124, 116, 255, 0.45);
  --good: #4fcf86;
  --bad: #f05d64;
  --warn: #f2b443;
  --info: #5b8cff;
  --discord: #5865f2;
  --steam: #66c0f4;
  --radius: 12px;
  --radius-sm: 8px;
  --rail: 92px;
  --display: Barlow, 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --body: Manrope, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

/* Base ---------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; font: 500 15px/1.55 var(--body); color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(100, 91, 230, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(91, 140, 255, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-light); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--white); }
h1, h2, h3, h4 { margin: 0; color: var(--white); line-height: 1.2; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
code { padding: 1px 6px; border-radius: 5px; background: var(--field); border: 1px solid var(--line); color: var(--primary-light); }
img { max-width: 100%; }
::selection { background: var(--primary); color: var(--white); }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.lead { margin: 0 0 18px; color: var(--muted); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.text-good { color: var(--good); }
.text-bad { color: var(--bad); }
.accent { color: var(--primary-2); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 11px; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary-light);
}
.eyebrow .icon { width: 14px; height: 14px; }

/* Cadre --------------------------------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }

.rail {
  position: sticky; top: 0; height: 100vh; width: var(--rail); flex: none; z-index: 20;
  display: flex; flex-direction: column; align-items: center; padding: 18px 0 14px;
  background: rgba(8, 11, 19, 0.92); border-right: 1px solid var(--line);
}
.rail-logo { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; }
.rail-nav { flex: 1; width: 100%; overflow-y: auto; scrollbar-width: none; padding: 0 10px; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-group { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; }
.rail-group + .rail-group { border-top: 1px solid var(--line); }
.rail-link {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 4px 9px; border-radius: 10px; border: 1px solid transparent;
  color: var(--muted); font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.1;
}
.rail-link .icon { width: 21px; height: 21px; }
.rail-link:hover { color: var(--white); background: var(--card); }
.rail-link.active { color: var(--white); background: var(--primary-soft); border-color: var(--primary-line); }
.rail-link.active .icon { color: var(--primary-light); }
.rail-link.active::before {
  content: ''; position: absolute; left: -11px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary-2);
}

.logo-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(145deg, var(--primary-2), #3b2fb5); box-shadow: 0 8px 24px rgba(100, 91, 230, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.logo-mark svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.rail-logo .logo-mark { width: 46px; height: 46px; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 76px; padding: 0 40px; background: rgba(8, 11, 19, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); }
.brand:hover { color: var(--white); }
.brand .logo-mark { width: 34px; height: 34px; border-radius: 9px; }
.brand .logo-mark svg { width: 20px; height: 20px; }
.brand-name { font: italic 800 26px/1 var(--display); letter-spacing: 0.02em; }
.brand-name b { color: var(--primary-2); }
.brand-sub { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.topbar .brand .logo-mark { display: none; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.status-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-size: 13px; font-weight: 700;
}
.status-chip:hover { color: var(--white); border-color: var(--primary-line); }
.status-chip .dot { width: 8px; height: 8px; }
.status-chip.is-online .dot { color: var(--good); box-shadow: 0 0 0 4px rgba(79, 207, 134, 0.15); }
.status-chip.is-offline .dot { color: var(--bad); box-shadow: 0 0 0 4px rgba(240, 93, 100, 0.15); }

.account {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 6px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--card);
}
.account .avatar { width: 32px; height: 32px; }
.account-text { display: flex; flex-direction: column; line-height: 1.2; max-width: 160px; }
.account-text strong { font-size: 13px; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text span { font-size: 11px; color: var(--muted); }
.account form { margin: 0; }

.main { width: 100%; max-width: 1360px; margin: 0 auto; padding: 34px 40px 60px; flex: 1; }
.main-wide { max-width: 1480px; }
.page-head { margin: 4px 0 26px; }
.page-head h1 { font: italic 800 clamp(36px, 4vw, 52px)/0.95 var(--display); letter-spacing: 0.005em; text-transform: uppercase; }
.page-head p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

.subnav {
  display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 26px; padding: 6px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line);
}
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 700; }
.subnav a .icon { width: 15px; height: 15px; }
.subnav a:hover { color: var(--white); background: var(--card); }
.subnav a.active { color: var(--white); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary-line); }

.footer { display: flex; gap: 22px; flex-wrap: wrap; padding: 22px 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.footer span { margin-right: auto; }
.footer a { color: var(--muted); }

/* Boutons et puces ---------------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--white);
  font: 700 14px var(--body); letter-spacing: 0.01em; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.button:hover { color: var(--white); border-color: var(--primary-line); background: var(--card-hover); }
.button:active { transform: translateY(1px); }
.button .icon { width: 17px; height: 17px; }
.button, .button-primary { text-transform: none; }
.button-primary, .actions .button:last-child, .cl-actions .button:last-child, .filters .button {
  background: linear-gradient(180deg, var(--primary-2), var(--primary)); border-color: transparent;
  box-shadow: 0 8px 22px rgba(100, 91, 230, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.button-primary:hover, .actions .button:last-child:hover, .cl-actions .button:last-child:hover, .filters .button:hover {
  background: linear-gradient(180deg, #8a83ff, var(--primary-2)); border-color: transparent;
}
.button-ghost { background: transparent; color: var(--text); box-shadow: none !important; }
.button-ghost:hover { background: var(--card); }
.cl-actions .button-ghost:last-child { background: transparent; }
.button-small { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.button-block { width: 100%; }
.button-danger { color: var(--bad); }
.button-danger:hover { color: var(--bad); border-color: rgba(240, 93, 100, 0.5); background: rgba(240, 93, 100, 0.08); }
.button-discord { background: var(--discord); border-color: transparent; }
.button-steam { background: #1b2838; }
.button:disabled, .button.is-busy { opacity: 0.6; cursor: progress; }
.icon-button {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-button:hover { background: var(--card-hover); color: var(--white); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.pill-good { color: var(--good); background: rgba(79, 207, 134, 0.1); border-color: rgba(79, 207, 134, 0.3); }
.pill-bad { color: var(--bad); background: rgba(240, 93, 100, 0.1); border-color: rgba(240, 93, 100, 0.3); }
.pill-info { color: var(--primary-light); background: var(--primary-soft); border-color: var(--primary-line); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-large { width: 76px; height: 76px; font-size: 30px !important; }
.avatar-letter {
  display: inline-grid; place-items: center; background: linear-gradient(145deg, #2a2470, #1b1847);
  color: var(--white); font: italic 800 17px var(--display); border: 1px solid var(--primary-line);
}

/* Cartes, chiffres, bandeaux ------------------------------------------------------------------ */
.card {
  margin-bottom: 20px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), rgba(17, 24, 39, 0.85));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 40px rgba(0, 0, 0, 0.25);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; letter-spacing: 0.01em; }
.card-head h2 .icon { color: var(--primary-light); width: 19px; height: 19px; }
.card-body { padding: 20px 22px; }
.card-body > :last-child { margin-bottom: 0; }
.card-flush { padding: 0; }

.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; align-items: start; margin-bottom: 20px; }
.grid .card, .grid-2 .card { margin: 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px 18px;
  border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--card-2), var(--card));
}
.kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 116, 255, 0.1), transparent 70%); }
.kpi-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; }
.kpi-icon .icon { width: 21px; height: 21px; }
.kpi-text { display: flex; flex-direction: column; min-width: 0; }
.kpi-value { font: italic 800 30px/1 var(--display); color: var(--white); letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-label { margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-hint { margin-top: 3px; font-size: 12px; color: var(--faint); }
.tone-primary { background: var(--primary-soft); color: var(--primary-light); }
.tone-good { background: rgba(79, 207, 134, 0.12); color: var(--good); }
.tone-bad { background: rgba(240, 93, 100, 0.12); color: var(--bad); }
.tone-warn { background: rgba(242, 180, 67, 0.12); color: var(--warn); }
.tone-info { background: rgba(91, 140, 255, 0.12); color: var(--info); }

.banner {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 16px; border-radius: 12px;
  background: rgba(242, 180, 67, 0.08); border: 1px solid rgba(242, 180, 67, 0.25); color: #f5cd7d; font-weight: 600;
}
.banner-good { background: rgba(79, 207, 134, 0.08); border-color: rgba(79, 207, 134, 0.28); color: var(--good); }
.banner-bad { background: rgba(240, 93, 100, 0.08); border-color: rgba(240, 93, 100, 0.3); color: #f6969b; }

/* Listes, infos, tableaux --------------------------------------------------------------------- */
.infos { margin: 0; display: grid; }
.infos div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.infos div:last-child { border-bottom: 0; }
.infos dt { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.infos dt .icon { width: 16px; height: 16px; }
.infos dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; color: var(--white); }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; padding-top: 0; }
.history li:last-child { padding-bottom: 0; }
.history li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.history li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.history li > span:last-child { flex: none; text-align: right; }
.history.compact li { padding: 9px 0; font-size: 14px; }
.history.compact li:first-child { padding-top: 0; }
.row-actions { display: flex; gap: 14px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  position: sticky; top: 0; padding: 12px 18px; text-align: left; white-space: nowrap; background: var(--panel);
  color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--line);
}
.table th[data-sort] { cursor: pointer; user-select: none; }
.table th[data-sort]:hover { color: var(--white); }
.table th.num { text-align: right; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(124, 116, 255, 0.04); }
.table-empty { padding: 20px; text-align: center; }
.cell-player { display: flex; align-items: center; gap: 12px; }
.cell-player strong { color: var(--white); }

.search {
  display: flex; align-items: center; gap: 9px; min-width: 260px; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--field); color: var(--muted);
}
.search:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.search .icon { width: 16px; height: 16px; }
.search input { flex: 1; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filters .search { flex: 1; }
.select-inline { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); font: inherit; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 11px; background: var(--field); border: 1px solid var(--line); }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.tabs a:hover { color: var(--white); }
.tabs a.active { background: var(--primary); color: var(--white); box-shadow: 0 4px 12px rgba(100, 91, 230, 0.35); }

/* Graphiques */
.chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-label { fill: var(--faint); font: 600 11px var(--body); }
.chart-area { fill: rgba(124, 116, 255, 0.16); }
.chart-line { fill: none; stroke: var(--primary-2); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--primary-2); }
.chart-empty { fill: var(--muted); font: 600 14px var(--body); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bar-text { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 5px; }
.bar-text strong { color: var(--white); }
.bar { width: 100%; height: 7px; display: block; }
.bar-track { fill: var(--field); }
.bar-fill { fill: var(--primary-2); }

/* Formulaires --------------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1; margin: 0; }
.field-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.field-label .icon { width: 15px; height: 15px; margin-right: 4px; }
.field-count { font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--faint); margin-left: auto; }
.field-count.is-near { color: var(--warn); }
.field input, .field select, .field textarea, .md-editor textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field);
  color: var(--text); font: 500 14px var(--body); outline: 0; transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder, .md-editor textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus, .md-editor:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.field select {
  appearance: none; cursor: pointer; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.field-row { display: flex; gap: 14px; }
.field-row .field:first-child { flex: 0 0 32%; }
.field-row-even .field:first-child { flex: 1; }

.md-editor { border-radius: 10px; border: 1px solid var(--line-2); background: var(--field); overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.md-editor textarea { display: block; border: 0; border-radius: 0; box-shadow: none !important; resize: vertical; min-height: 90px; line-height: 1.55; }
.md-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--panel); }
.md-toolbar button { min-width: 30px; height: 28px; padding: 0 7px; border-radius: 7px; border: 0; background: none; color: var(--muted); font: 700 13px var(--body); cursor: pointer; }
.md-toolbar button:hover { background: var(--primary-soft); color: var(--white); }
.md-sep { width: 1px; height: 16px; margin: 0 4px; background: var(--line-2); }

.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--field); cursor: pointer; font-size: 14px; }
.check:hover { border-color: var(--primary-line); }
.check:has(input:checked) { border-color: var(--primary-2); background: var(--primary-soft); color: var(--white); }
.check input { accent-color: var(--primary-2); margin: 0; }

.switch { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; flex: none; width: 40px; height: 23px; border-radius: 999px; background: var(--line-2); transition: background 0.15s; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(17px); background: var(--white); }

.actions, .cl-actions {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 0 4px;
  background: linear-gradient(transparent, var(--card) 35%);
}

/* Page Permissions */
.perm { padding: 18px 0; border-top: 1px solid var(--line); }
.perm:first-child { border-top: 0; padding-top: 0; }
.perm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.perm-head h3 { font-size: 16px; }
.perm-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; margin-top: 12px; }
.perm-label { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.perm-label .icon { width: 15px; height: 15px; }

/* Profil et personnages ----------------------------------------------------------------------- */
.profile {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px;
  padding: 26px 28px; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(600px 200px at 0% 0%, rgba(100, 91, 230, 0.22), transparent 70%), linear-gradient(160deg, var(--card-2), var(--card));
}
.profile-text { flex: 1; min-width: 220px; }
.profile-text h2 { font: italic 800 34px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 6px; }
.profile-text p { margin: 0; }
.profile-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.characters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.character { display: block; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); }
.character-live { border-color: rgba(79, 207, 134, 0.4); }
.character-link { transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.character-link:hover { color: var(--text); border-color: var(--primary-line); background: var(--card-hover); transform: translateY(-3px); }
.character-head { display: flex; align-items: center; gap: 12px; }
.character-head > div { flex: 1; min-width: 0; }
.character-head h3 { font-size: 16px; }
.character-head p { margin: 0; }
.character-money { margin: 14px 0 8px; font: italic 800 30px/1 var(--display); color: var(--good); }
.character-line { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.character-line .icon { width: 15px; height: 15px; color: var(--faint); }
.character-more { display: inline-flex; margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--primary-light); }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; align-items: start; }
.sheet-grid .card { margin: 0; }

/* Connexion (page plein écran) ---------------------------------------------------------------- */
.split-page { background: var(--bg); }
.split { display: grid; grid-template-columns: minmax(380px, 44%) minmax(0, 1fr); min-height: 100vh; }
.split-main { display: flex; flex-direction: column; padding: 36px 56px; border-right: 1px solid var(--line); background: linear-gradient(170deg, #0d1322, var(--bg)); }
.split-top { display: flex; align-items: center; justify-content: space-between; }
.split-top .logo-mark { display: inline-grid; }
.back-link { color: var(--muted); font-weight: 700; font-size: 14px; }
.split-body { flex: 1; display: flex; align-items: center; justify-content: center; }
.connect { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.connect-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.connect-card {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 22px 20px;
  border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.connect-card:hover { color: var(--text); border-color: var(--primary-2); background: var(--card-hover); transform: translateY(-2px); }
.connect-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); }
.connect-icon .icon { width: 24px; height: 24px; }
.connect-discord .connect-icon { color: #8b95ff; border-color: rgba(88, 101, 242, 0.5); }
.connect-discord strong { color: #8b95ff; }
.connect-steam .connect-icon { color: var(--steam); }
.connect-text { display: flex; flex-direction: column; gap: 3px; }
.connect-text strong { font-size: 18px; color: var(--white); }
.connect-text span { color: var(--muted); font-size: 13px; }
.connect-go { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-light); font-size: 13px; font-weight: 700; }
.connect-go .icon { width: 15px; height: 15px; }
.connect-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; color: var(--faint); font-size: 13px; }
.connect-note .icon { width: 16px; height: 16px; margin-top: 2px; }
.split-visual {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 0 9% 12%;
  background:
    radial-gradient(700px 500px at 70% 30%, rgba(124, 116, 255, 0.35), transparent 65%),
    radial-gradient(600px 400px at 20% 90%, rgba(91, 140, 255, 0.18), transparent 70%),
    linear-gradient(160deg, #141036, #070812);
}
.split-visual::before {
  content: ''; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 60% 40%, #000, transparent 75%);
}
.visual-art { position: absolute; inset: 0; }
.visual-ring { position: absolute; top: 12%; right: 10%; width: 46vh; height: 46vh; border-radius: 50%; border: 2px solid rgba(170, 165, 255, 0.35); box-shadow: 0 0 80px rgba(124, 116, 255, 0.35), inset 0 0 60px rgba(124, 116, 255, 0.25); }
.visual-ring.ring-2 { top: 22%; right: 20%; width: 28vh; height: 28vh; border-color: rgba(170, 165, 255, 0.2); box-shadow: none; }
.visual-word {
  position: absolute; top: 28%; left: -2%; transform: rotate(-8deg); white-space: nowrap;
  font: italic 800 26vh/1 var(--display); color: transparent; -webkit-text-stroke: 2px rgba(170, 165, 255, 0.18); letter-spacing: 0.02em;
}
.visual-slogan { position: relative; z-index: 1; margin: 0; font: italic 800 clamp(48px, 6vw, 88px)/0.92 var(--display); text-transform: uppercase; color: var(--white); text-shadow: 0 6px 0 rgba(42, 36, 112, 0.9); max-width: 9ch; }

.body-center { display: grid; place-items: center; padding: 20px; }
.notice { max-width: 460px; padding: 34px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); text-align: center; }
.notice .brand { margin-bottom: 18px; }
.notice .brand .logo-mark { display: inline-grid; }
.notice h1 { font: italic 800 34px var(--display); text-transform: uppercase; margin-bottom: 8px; }
.notice p { color: var(--muted); margin-bottom: 20px; }
.notice-bad h1 { color: var(--bad); }

/* Accueil ------------------------------------------------------------------------------------- */
.home { display: flex; flex-direction: column; gap: 26px; }
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr); gap: 40px; align-items: center;
  min-height: 460px; padding: 56px 56px 50px; border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(800px 420px at 8% 0%, rgba(124, 116, 255, 0.30), transparent 62%),
    radial-gradient(700px 360px at 100% 100%, rgba(59, 47, 181, 0.35), transparent 62%),
    linear-gradient(140deg, #121733, #090c16 70%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: linear-gradient(100deg, #000 10%, transparent 65%);
}
.hero::after {
  content: ''; position: absolute; right: -6%; bottom: -30%; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(170, 165, 255, 0.12); box-shadow: 0 0 120px rgba(124, 116, 255, 0.18);
}
.hero > * { position: relative; z-index: 1; }
.hero-title {
  margin: 18px 0 0; font: italic 800 clamp(68px, 9vw, 138px)/0.82 var(--display); text-transform: uppercase; letter-spacing: -0.01em;
  color: var(--white); text-shadow: 4px 6px 0 #2a2470, 8px 12px 0 rgba(10, 8, 30, 0.6);
}
.hero-ribbon { margin: 12px 0 26px 6px; }
.hero-ribbon span {
  display: inline-block; transform: skewX(-14deg) rotate(-3deg); padding: 6px 26px 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-2)); color: #120f33;
  font: italic 800 clamp(24px, 2.6vw, 36px)/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase;
  box-shadow: 6px 6px 0 rgba(10, 8, 30, 0.7);
}
.hero-tagline { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; font-size: 19px; font-weight: 600; color: var(--text); }
.hero-line { width: 36px; height: 2px; background: var(--primary-light); }
.hero-intro { max-width: 540px; margin: 0 0 28px; color: var(--muted); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .button:first-child:not(.button-ghost) { background: linear-gradient(180deg, var(--primary-2), var(--primary)); border-color: transparent; box-shadow: 0 10px 26px rgba(100, 91, 230, 0.4); }
.hero-status {
  padding: 24px 24px 20px; border-radius: 18px; border: 1px solid var(--primary-line);
  background: linear-gradient(160deg, rgba(20, 26, 48, 0.9), rgba(10, 13, 24, 0.9)); backdrop-filter: blur(8px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.hero-count { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 2px; }
.hero-count strong { font: italic 800 84px/0.9 var(--display); color: var(--white); }
.hero-count span { font: italic 800 30px var(--display); color: var(--muted); }
.hero-facts { margin: 16px 0 14px; display: grid; }
.hero-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.hero-facts dt { color: var(--muted); }
.hero-facts dd { margin: 0; font-weight: 800; color: var(--white); }
.hero-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.hero-more .icon { width: 15px; height: 15px; }

.mission { display: grid; grid-template-columns: minmax(280px, 0.85fr) minmax(0, 2fr); border-radius: 22px; border: 1px solid var(--line); overflow: hidden; background: var(--card); }
.mission-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 360px; padding: 30px 32px;
  margin: 10px; border-radius: 16px; border: 1px solid var(--line-2);
  background: radial-gradient(420px 300px at 100% 100%, rgba(124, 116, 255, 0.28), transparent 70%), linear-gradient(160deg, #1c2246, #10142a);
}
.mission-card::after { content: '✦'; position: absolute; right: 18px; top: 40%; font-size: 180px; line-height: 1; color: rgba(170, 165, 255, 0.07); }
.stamp {
  align-self: flex-start; transform: rotate(-7deg); padding: 7px 14px 6px; border: 2px solid var(--primary-light); border-radius: 7px;
  color: var(--primary-light); font: italic 800 11px/1.15 var(--display); letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
}
.stamp b { display: block; font-size: 22px; letter-spacing: 0.08em; }
.mission-card h2 { font: italic 800 58px/0.9 var(--display); letter-spacing: -0.005em; }
.mission-card h2 span { color: var(--primary-light); }
.mission-foot { margin: 0; font: italic 700 22px var(--display); color: var(--text); }
.steps { list-style: none; margin: 0; padding: 18px 34px; }
.step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 66px; bottom: -22px; border-left: 1px dashed var(--line-2); }
.step-number {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--primary-line);
  background: var(--primary-soft); color: var(--white); font: italic 800 19px var(--display);
}
.step h3 { font-size: 17px; margin-bottom: 4px; }
.step p { margin: 0; font-size: 14px; }
.step .button { min-width: 130px; }

.section-title { margin: 14px 0 16px; font: italic 800 46px/1 var(--display); letter-spacing: -0.005em; }
.section-title span { color: var(--primary-2); }
.small-title { font-size: 30px; margin-top: 30px; }
.news { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.news-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--card-2), var(--card)); color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.news-card:hover { color: var(--text); border-color: var(--primary-line); transform: translateY(-3px); }
.news-card .pill { align-self: flex-start; }
.news-card h3 { font: italic 800 24px/1.05 var(--display); }
.news-card p { margin: 0; }
.socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.social {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 150px; padding: 22px;
  border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--card-2), var(--card)); color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.social:hover { color: var(--text); border-color: var(--primary-line); transform: translateY(-3px); }
.social strong { font: italic 800 30px/1 var(--display); color: var(--white); }
.social-icon { position: absolute; top: 20px; left: 22px; color: var(--text); }
.social-icon .icon { width: 28px; height: 28px; }
.social-arrow { position: absolute; top: 20px; right: 20px; color: var(--muted); }
.social-arrow .icon { width: 17px; height: 17px; }

/* Classements --------------------------------------------------------------------------------- */
.ranking { list-style: none; margin: 0; padding: 0; }
.rank-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 6px; border-top: 1px solid var(--line); border-radius: 10px; }
.rank-row:first-child { border-top: 0; }
.rank-place { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--field); border: 1px solid var(--line-2); color: var(--muted); font: italic 800 17px var(--display); }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.rank-name a { color: var(--text); }
.rank-name a:hover { color: var(--primary-light); }
.rank-value { font: italic 800 20px var(--display); color: var(--white); white-space: nowrap; }
.rank-top { padding-block: 13px; border-top: 0; margin-bottom: 4px; }
.rank-1 { background: linear-gradient(90deg, rgba(242, 196, 70, 0.14), transparent 70%); }
.rank-2 { background: linear-gradient(90deg, rgba(205, 212, 230, 0.10), transparent 70%); }
.rank-3 { background: linear-gradient(90deg, rgba(214, 135, 80, 0.12), transparent 70%); }
.rank-1 .rank-place { color: #f6cf5c; border-color: rgba(246, 207, 92, 0.5); background: rgba(246, 207, 92, 0.12); }
.rank-2 .rank-place { color: #dfe3ee; border-color: rgba(223, 227, 238, 0.4); }
.rank-3 .rank-place { color: #e5a072; border-color: rgba(229, 160, 114, 0.45); }
.rank-1 .rank-name { font-size: 17px; color: var(--white); }

/* Organisations ------------------------------------------------------------------------------- */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.org-card {
  --accent: var(--primary-2);
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 9px; padding: 22px; border-radius: 16px; color: var(--text);
  border: 1px solid var(--line); background: linear-gradient(170deg, color-mix(in srgb, var(--accent) 16%, var(--card)), var(--card) 60%);
  transition: transform 0.15s, border-color 0.15s;
}
.org-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.org-card:hover { color: var(--text); transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.org-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.org-tag { --accent: var(--primary-2); padding: 4px 10px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); color: var(--white); font: italic 800 17px var(--display); letter-spacing: 0.06em; }
.org-tag-large { font-size: 30px; padding: 14px 18px; border-radius: 14px; }
.org-card h3 { font: italic 800 28px/1 var(--display); }
.org-desc { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.org-meta { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.org-meta .icon { width: 15px; height: 15px; color: var(--faint); }
.org-profile { --accent: var(--primary-2); }
.org-profile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }

/* Marché */
.rarity-dot { --accent: var(--muted); display: inline-block; width: 9px; height: 9px; margin-right: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.table .pill[data-color] { --accent: var(--muted); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Suggestions --------------------------------------------------------------------------------- */
.suggestions { display: flex; flex-direction: column; }
.suggestion { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.suggestion:first-child { border-top: 0; padding-top: 0; }
.suggestion-votes { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; border-radius: 12px; background: var(--field); border: 1px solid var(--line); font: italic 800 18px var(--display); }
.suggestion-body h3 { font-size: 18px; margin: 3px 0 7px; }
.suggestion-body p { margin: 0; }
.suggestion-text { color: var(--text); white-space: pre-wrap; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.suggestion-reply { margin-top: 10px !important; padding: 10px 14px; border-radius: 10px; border-left: 3px solid var(--primary-2); background: var(--primary-soft); white-space: pre-wrap; }
.suggestion-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.suggestion-side a { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.suggestion-side .icon { width: 14px; height: 14px; }
.vote-bar { max-width: 340px; height: 6px; margin-top: 12px; border-radius: 6px; overflow: hidden; background: rgba(240, 93, 100, 0.35); }
.vote-bar span { display: block; width: 0; height: 100%; background: var(--good); }

/* Règlement et wiki --------------------------------------------------------------------------- */
.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.doc-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 14px; }
.toc { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.toc a { padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.toc a:hover, .toc a.active { color: var(--white); background: var(--primary-soft); }
.toc .toc-2 { padding-left: 24px; font-size: 13px; }
.doc { margin: 0; }
.doc .card-body { padding: 34px 40px; font-size: 15.5px; line-height: 1.75; }
.doc h2 { margin: 34px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font: italic 800 36px/1 var(--display); text-transform: uppercase; scroll-margin-top: 100px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 24px 0 8px; font-size: 19px; scroll-margin-top: 100px; }
.doc h4 { margin: 18px 0 6px; font-size: 16px; }
.doc p { margin: 0 0 14px; white-space: pre-wrap; }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 5px 0; }
.doc li::marker { color: var(--primary-2); }
.doc-updated { margin-top: 28px !important; padding-top: 14px; border-top: 1px solid var(--line); }
.wiki-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.wiki-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--card-2), var(--card)); color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.wiki-card:hover { color: var(--text); border-color: var(--primary-line); transform: translateY(-3px); }
.wiki-card .icon { color: var(--primary-light); width: 22px; height: 22px; }
.wiki-card strong { font: italic 800 24px/1.05 var(--display); color: var(--white); }

/* Markdown Discord (aperçus, suggestions, documents) */
.md-spoiler { border-radius: 4px; background: #1e1f22; color: transparent; cursor: pointer; transition: color 0.15s; }
.md-spoiler:hover { color: inherit; }
.md-h { display: inline-block; font-weight: 800; color: var(--white); }
.md-h1 { font-size: 20px; }
.md-h2 { font-size: 17px; }
.md-h3 { font-size: 15px; }
.md-quote { display: inline-block; padding-left: 10px; border-left: 4px solid #4e5058; }

/* Changelog ----------------------------------------------------------------------------------- */
.cl-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 22px; align-items: start; }
.cl-main .card, .cl-side .card { margin: 0; }
.cl-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
.cl-form { display: flex; flex-direction: column; gap: 22px; }
.cl-block { display: flex; flex-direction: column; gap: 14px; }
.cl-block + .cl-block { padding-top: 22px; border-top: 1px dashed var(--line-2); }
.cl-step { display: flex; align-items: center; gap: 10px; margin: 0; font: italic 800 20px var(--display); text-transform: uppercase; letter-spacing: 0.02em; color: var(--white); }
.cl-step span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--primary-line); background: var(--primary-soft); color: var(--primary-light); font-size: 16px; }
.cl-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cl-section { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); border-top: 3px solid var(--primary-2); background: var(--panel); }
.cl-added { border-top-color: var(--good); }
.cl-changed { border-top-color: var(--info); }
.cl-fixed { border-top-color: var(--warn); }
.cl-removed { border-top-color: var(--bad); }
.cl-section-head { display: flex; align-items: flex-start; gap: 10px; }
.cl-section-head > div { flex: 1; min-width: 0; }
.cl-section-head h3 { font-size: 15px; }
.cl-section-head p { margin: 2px 0 0; }
.cl-emoji { font-size: 20px; line-height: 1; }
.cl-total { margin-right: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.cl-total.is-over { color: var(--bad); }
.editor-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.doc-preview { max-width: none !important; max-height: 600px; overflow: auto; white-space: pre-wrap; font-size: 14px; line-height: 1.55; }

/* Aperçu d'un message Discord */
.dc-message { display: flex; gap: 14px; margin: -6px; padding: 14px; border-radius: 10px; background: #313338; }
.dc-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--white); font-weight: 800; }
.dc-body { flex: 1; min-width: 0; }
.dc-meta { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.dc-meta strong { color: var(--white); }
.dc-app { padding: 1px 5px; border-radius: 4px; background: var(--discord); color: #fff; font-size: 10px; font-weight: 800; }
.dc-time { color: #949ba4; font-size: 12px; }
.dc-ping { display: inline-block; margin: 0 0 6px; padding: 0 3px; border-radius: 3px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 600; }
.dc-embed { max-width: 520px; padding: 12px 16px 14px; border-radius: 4px; border-left: 4px solid var(--primary); background: #2b2d31; color: #dbdee1; }
.dc-embed p { margin: 0; }
.dc-author { margin-bottom: 6px !important; color: var(--white); font-size: 13px; font-weight: 700; }
.dc-title { margin-bottom: 8px !important; color: var(--white); font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.dc-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.dc-field { margin-top: 10px; }
.dc-field-name { margin-bottom: 2px !important; color: var(--white); font-size: 14px; font-weight: 800; }
.dc-image { margin-top: 12px; padding: 18px; border-radius: 6px; background: #1e1f22; color: #949ba4; font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.dc-footer { margin-top: 10px !important; color: #949ba4; font-size: 12px; }
.dc-placeholder { color: #6d6f78 !important; font-style: italic; }
.dc-embed a { color: #00a8fc; }
.dc-embed code { background: #1e1f22; border: 0; color: #dbdee1; }

/* Adaptations --------------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .cl-layout { grid-template-columns: minmax(0, 1fr); }
  .cl-side { position: static; }
}
@media (max-width: 1100px) {
  .hero, .mission, .grid-main, .doc-layout, .editor-split { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 40px 32px; min-height: 0; }
  .doc-side { position: static; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-visual { display: none; }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .rail { position: sticky; top: 0; flex-direction: row; width: 100%; height: auto; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-logo { display: none; }
  .rail-nav { display: flex; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 0; }
  .content { width: 100%; }
  .hero-text, .hero-status { min-width: 0; }
  .topbar .button { height: 38px; padding: 0 12px; }
  .rail-group { flex-direction: row; padding: 0 6px; }
  .rail-group + .rail-group { border-top: 0; border-left: 1px solid var(--line); }
  .rail-link { min-width: 64px; padding: 8px 6px; }
  .rail-link.active::before { display: none; }
  .topbar { position: static; height: auto; padding: 14px 18px; flex-wrap: wrap; }
  .account-text { display: none; }
  .main { padding: 24px 18px 48px; }
  .footer { padding: 20px 18px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .perm-columns, .cl-sections { grid-template-columns: minmax(0, 1fr); }
  .field-row { flex-direction: column; }
  .field-row .field:first-child { flex: 1; }
  .split-main { padding: 24px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .kpi { padding: 14px; gap: 10px; }
  .kpi-icon { width: 36px; height: 36px; }
  .kpi-value { font-size: 24px; }
  .hero { padding: 30px 22px; }
  .step { grid-template-columns: 40px minmax(0, 1fr); }
  .step .button { grid-column: 2; justify-self: start; }
  .step:not(:last-child)::after { display: none; }
  .suggestion { grid-template-columns: 48px minmax(0, 1fr); }
  .suggestion-side { grid-column: 2; align-items: flex-start; }
  .status-chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.notice-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* Work (Kanban de l'équipe) ------------------------------------------------------------------- */
.wk-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.wk-nav .tabs a { display: inline-flex; align-items: center; gap: 7px; }
.wk-nav .tabs .icon { width: 15px; height: 15px; }
.wk-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.wk-filters { margin-bottom: 18px; }
.wk-check { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; }
.wk-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.wk-check .avatar { width: 24px; height: 24px; font-size: 12px; }

.wk-prio-high { color: var(--bad); background: rgba(240, 93, 100, 0.1); border-color: rgba(240, 93, 100, 0.35); }
.wk-prio-medium { color: var(--primary-light); background: var(--primary-soft); border-color: var(--primary-line); }
.wk-prio-low { color: var(--muted); }

.wk-people { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.wk-person + .wk-person { margin-right: -8px; }
.wk-person .avatar { width: 26px; height: 26px; font-size: 12px; border: 2px solid var(--card); }

.wk-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wk-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px;
  border-radius: 10px; background: var(--field); border: 1px solid var(--line); border-left: 3px solid var(--primary-2);
}
.wk-row-high { border-left-color: var(--bad); }
.wk-row-low { border-left-color: var(--line-2); }
.wk-row.is-closed { opacity: 0.55; }
.wk-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wk-row-text a { color: var(--white); font-weight: 700; overflow-wrap: anywhere; }
.wk-row-text a:hover { color: var(--primary-light); }
.wk-row-side { display: flex; align-items: center; gap: 10px; flex: none; }
.wk-tr-high td { background: rgba(240, 93, 100, 0.05); }

.wk-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wk-activity li { display: flex; gap: 10px; }
.wk-activity li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.wk-activity strong { color: var(--white); }
.wk-dot { flex: none; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--primary-2); }

.wk-board { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(240px, 1fr)); overflow-x: auto; padding-bottom: 8px; align-items: start; }
.wk-board-5 { grid-template-columns: repeat(5, minmax(230px, 1fr)); }
.wk-col { border-radius: 14px; background: var(--panel); border: 1px solid var(--line); min-height: 160px; transition: border-color 0.15s, background 0.15s; }
.wk-col.is-over { border-color: var(--primary-2); background: var(--primary-soft); }
.wk-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.wk-col-head h3 { font-size: 14px; font-weight: 800; }
.wk-count { min-width: 24px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 7px; background: var(--field); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 800; }
.wk-drop { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 110px; }
.wk-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 13px 14px; border-radius: 11px;
  background: var(--card); border: 1px solid var(--line-2); cursor: grab; transition: border-color 0.15s, opacity 0.15s;
}
.wk-card:hover { border-color: var(--primary-line); }
.wk-card.is-dragging { opacity: 0.4; }
.wk-card.is-saving { opacity: 0.7; cursor: progress; }
.wk-card.is-closed { opacity: 0.6; }
.wk-card-title { color: var(--white); font-weight: 700; line-height: 1.35; padding-right: 18px; overflow-wrap: anywhere; }
.wk-card-title:hover { color: var(--primary-light); }
.wk-num { color: var(--primary-light); }
.wk-lock { position: absolute; top: 12px; right: 12px; color: var(--warn); }
.wk-lock .icon { width: 14px; height: 14px; }
.wk-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }

.wk-head-pills { display: inline-flex; gap: 6px; }
.wk-head-pills .icon { width: 12px; height: 12px; }
.wk-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.wk-sub { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.wk-suggestion { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--field); border: 1px solid var(--line); font-weight: 700; }
.wk-suggestion a { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.wk-comments { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.wk-comment { display: flex; gap: 12px; }
.wk-comment > div { min-width: 0; flex: 1; padding: 10px 14px; border-radius: 10px; background: var(--field); border: 1px solid var(--line); }
.wk-comment p { margin-bottom: 4px; }
.wk-reply .cl-actions, .wk-form .cl-actions { margin-top: 12px; }
.wk-form { display: flex; flex-direction: column; gap: 16px; }
.wk-side-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.wk-side-form:last-child { margin-bottom: 0; }
.wk-side-form .button { align-self: flex-start; }
.wk-side-form .button-block { align-self: stretch; }
.wk-assign { border: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.wk-assign legend { margin-bottom: 8px; }
.wk-actions { display: flex; flex-direction: column; gap: 8px; }

/* Animations (planning) ------------------------------------------------------------------------ */
.an-switch a { white-space: nowrap; }
.an-week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.an-day { display: flex; flex-direction: column; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); min-height: 220px; }
.an-day.is-today { border-color: var(--primary-line); box-shadow: inset 0 0 0 1px var(--primary-line); }
.an-day-head { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.an-day-head span { color: var(--muted); font-size: 12px; font-weight: 700; }
.an-day-head strong { font: italic 800 20px var(--display); color: var(--white); }
.an-day.is-today .an-day-head strong { color: var(--primary-light); }
.an-day-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; flex: 1; }
.an-event {
  display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; border-radius: 9px; color: var(--text);
  background: var(--card); border: 1px solid var(--line-2); border-left: 3px solid var(--primary-2); font-size: 13px;
}
.an-event:hover { color: var(--text); border-color: var(--primary-line); }
.an-event strong { color: var(--white); line-height: 1.3; overflow-wrap: anywhere; }
.an-event.is-mine { background: var(--primary-soft); }
.an-state-live { border-left-color: var(--good); }
.an-state-over { opacity: 0.6; border-left-color: var(--line-2); }
.an-state-cancelled { opacity: 0.5; border-left-color: var(--bad); }
.an-state-cancelled strong { text-decoration: line-through; }
.an-event-time { color: var(--primary-light); font-weight: 800; font-size: 12px; }
.an-event-who { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.an-event-who .avatar { width: 20px; height: 20px; font-size: 10px; }
.an-warn { color: var(--warn); font-size: 11px; font-weight: 800; }
.an-add { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; padding: 6px 8px; border-radius: 8px; color: var(--faint); font-size: 12px; font-weight: 700; }
.an-add:hover { color: var(--white); background: var(--card); }
.an-add .icon { width: 13px; height: 13px; }

.an-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.an-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 220px) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.an-row:first-child { border-top: 0; padding-top: 0; }
.an-row.is-cancelled { opacity: 0.55; }
.an-when, .an-what, .an-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.an-when strong { color: var(--white); text-transform: capitalize; }
.an-what a { color: var(--white); font-weight: 700; overflow-wrap: anywhere; }
.an-state { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.an-person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.an-person .avatar { width: 26px; height: 26px; font-size: 12px; }
.an-helpers { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.an-form { display: flex; flex-direction: column; gap: 16px; }
.an-length { display: flex; align-items: center; height: 44px; padding: 0 13px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--white); font-weight: 800; }
.an-text { margin: 14px 0 10px; }

@media (max-width: 860px) {
  .an-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .an-state { justify-content: flex-start; }
}

/* Work / Animations : colonnes de cartes empilées, accueil en 2 x 2 */
.wk-split > div { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.wk-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-home .card { margin: 0; }
@media (max-width: 860px) { .wk-home { grid-template-columns: minmax(0, 1fr); } }
