/*
 * Panel CrovaxRP — feuille de style unique.
 *
 * Identité : mise en page inspirée des portails communautaires modernes (barre d'icônes à gauche,
 * barre du haut aérée, cartes arrondies sur fond neutre très sombre). L'accent reste le violet
 * #645BE6 des menus en jeu ; titres en Barlow Condensed italique, 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, onglets staff, pied) ·
 * composants (boutons, puces, cartes, chiffres, tableaux, formulaires) · connexion · accueil ·
 * pages · harmonisation · adaptations.
 */

/* Polices ------------------------------------------------------------------------------------- */
@font-face { font-family: Manrope; font-weight: 200 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: 200 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 Condensed'; 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+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: 'Barlow Condensed'; 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+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 Condensed'; 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+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: 'Barlow Condensed'; 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+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; }

/* Variables ----------------------------------------------------------------------------------- */
:root {
  --bg: #101113;          /* fond de page */
  --panel: #141517;       /* barre d'icônes, barre du haut, pied */
  --frame: #16171a;
  --card: #18191c;        /* carte */
  --card-2: #1c1d21;      /* en-tête de carte, ligne mise en avant */
  --card-hover: #202126;
  --field: #111215;
  --line: #2a2b2e;        /* contour 1 px */
  --line-2: #36373c;
  --text: #f3f1ed;
  --muted: #97999f;
  --faint: #6c6e75;
  --white: #ffffff;
  --primary: #645be6;     /* violet des menus en jeu */
  --primary-2: #7a72f0;
  --primary-light: #b3aeff;
  --secondary: #2f2a74;
  --primary-soft: rgba(100, 91, 230, 0.12);
  --primary-line: rgba(122, 114, 240, 0.45);
  --hover: rgba(255, 255, 255, 0.04);
  --good: #5ac878;
  --bad: #dc5258;
  --bad-bg: #963a3e;
  --bad-text: #ffbebe;
  --warn: #ffbe3c;
  --info: #468cff;
  --discord: #5865f2;
  --steam: #66c0f4;
  --bar: 3px;             /* barre d'accent (rubriques, états) */
  --radius: 12px;         /* cartes */
  --radius-sm: 8px;       /* boutons, champs, puces */
  --rail: 84px;
  --top: 88px;
  --shadow: 0 2px 0 #090a0c;
  --font: Manrope, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

/* Base ---------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; font: 500 15px/1.6 var(--font); color: var(--text); background: var(--bg); -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; font-weight: 800; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
code { padding: 2px 7px; background: var(--field); border: 1px solid var(--line); border-radius: 6px; color: var(--primary-light); }
img { max-width: 100%; }
::selection { background: var(--primary); color: var(--white); }
:focus-visible { outline: 2px solid var(--primary-light); 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: 11.5px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary-light);
}
.eyebrow .icon { width: 14px; height: 14px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--primary); color: var(--white); font-weight: 800;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* Cadre --------------------------------------------------------------------------------------- */
/* barre d'icônes fixe à gauche ; libellé en bulle au survol */
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--rail); display: flex; flex-direction: column; align-items: center;
  background: var(--panel); border-right: 1px solid var(--line);
}
.rail-mark { display: grid; place-items: center; flex: none; width: 100%; height: var(--top); border-bottom: 1px solid var(--line); }
.rail-nav { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0; overflow-y: auto; scrollbar-width: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-group { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail-label { display: none; }
.rail-line { flex: none; width: 26px; height: 1px; background: var(--line); }
.rail-link {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid transparent; border-radius: 11px;
  color: #87898f; transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.rail-link .icon { width: 21px; height: 21px; stroke-width: 1.7; }
.rail-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.rail-link.active { color: var(--primary-light); background: rgba(100, 91, 230, 0.12); border-color: rgba(122, 114, 240, 0.35); }
.rail-tip {
  position: absolute; left: calc(100% + 14px); top: 50%; z-index: 5; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 7px;
  background: #1d1e22; color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); opacity: 0; transform: translate(-6px, -50%); transition: opacity 0.15s, transform 0.15s var(--ease);
}
.rail-link:hover .rail-tip, .rail-link:focus-visible .rail-tip { opacity: 1; transform: translate(0, -50%); }

/* dashboard admin (pages /staff) : barre latérale large, libellés et rubriques visibles */
.is-admin { --rail: 248px; }
.is-admin .rail { align-items: stretch; }
.is-admin .rail-mark { justify-content: start; grid-auto-flow: column; gap: 12px; padding: 0 20px; color: var(--white); }
.rail-mark-text { display: flex; flex-direction: column; font: italic 800 22px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.rail-mark-text small { margin-top: 4px; color: var(--faint); font: 700 11px/1 var(--font); letter-spacing: 0.16em; font-style: normal; }
.is-admin .rail-nav { align-items: stretch; gap: 18px; padding: 18px 14px 24px; }
.is-admin .rail-group { align-items: stretch; gap: 2px; }
.is-admin .rail-label { display: block; margin: 0 0 4px 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.is-admin .rail-link { display: flex; justify-content: flex-start; gap: 12px; width: auto; height: 40px; padding: 0 12px; border-radius: 9px; }
.is-admin .rail-link .icon { width: 18px; height: 18px; }
.is-admin .rail-tip { position: static; padding: 0; border: 0; background: none; box-shadow: none; opacity: 1; transform: none; font-size: 14px; font-weight: 700; color: inherit; }
.is-admin .rail-back { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.top-admin { --tone: var(--primary-light); background: linear-gradient(150deg, #262063, #1b1a2c 70%); border-color: var(--primary-line); }
.top-back { --tone: var(--muted); }
.admin-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 24px; }
.admin-shortcut-group { display: flex; flex-direction: column; gap: 6px; }
.admin-shortcut { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); font-weight: 700; transition: border-color 0.15s, background 0.15s; }
.admin-shortcut:hover { color: var(--white); border-color: var(--primary-line); background: var(--primary-soft); }
.admin-shortcut .icon { width: 18px; height: 18px; color: var(--primary-light); }

.logo-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary); box-shadow: 0 3px 0 var(--secondary); }
.logo-mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); }
.brand:hover { color: var(--white); }
.brand-name { font: italic 800 26px/1 var(--display); letter-spacing: 0.06em; }
.brand-name b { color: var(--primary-light); font-weight: 800; }
.topbar .brand .logo-mark { display: none; }

.shell { margin-left: var(--rail); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--top); padding: 0 clamp(20px, 4vw, 56px); background: rgba(16, 17, 19, 0.92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.menu-button {
  display: none; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card);
  color: var(--white); font: 800 14px var(--font); cursor: pointer;
}
.menu-button .icon { width: 18px; height: 18px; }

/* bouton « pilule » de la barre du haut : pastille d'icône + libellé sur deux lignes */
.top-action {
  --tone: var(--primary-light);
  display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 6px 12px 6px 7px; border: 1px solid var(--line-2); border-radius: 10px;
  background: linear-gradient(150deg, #1f1d2a, #18191c 65%); box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.03); color: var(--text);
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}
a.top-action:hover { color: var(--text); border-color: var(--primary-line); transform: translateY(-1px); }
a.top-action:active { transform: translateY(1px); box-shadow: none; }
.top-action-icon {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tone) 25%, transparent); background: color-mix(in srgb, var(--tone) 10%, #18191d); color: var(--tone);
}
.top-action-icon .icon { width: 18px; height: 18px; }
.top-action-label { display: flex; flex-direction: column; font-size: 13px; font-weight: 800; line-height: 1.25; white-space: nowrap; color: var(--text); }
.top-action-label strong { color: var(--white); }
.top-action-label small { color: var(--muted); font-size: 11px; font-weight: 600; }
.top-status.is-online { --tone: var(--good); }
.top-status.is-offline { --tone: var(--bad); }
.top-status .dot { width: 9px; height: 9px; }
.top-status.is-online .dot { animation: live 2.4s ease-in-out infinite; }
.top-login { --tone: var(--primary-light); background: linear-gradient(150deg, #262063, #1b1a2c 70%); border-color: var(--primary-line); }
.top-account { padding-right: 6px; }
.top-account .avatar { width: 36px; height: 36px; border-radius: 9px; }
.top-account .top-action-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.top-account form { margin: 0; }

.main { width: 100%; max-width: 1400px; margin: 0 auto; padding: 36px clamp(20px, 4vw, 56px) 72px; flex: 1; }
.main:focus { outline: 0; }
.main-wide { padding-top: 28px; }
.page-head { display: flex; flex-direction: column; gap: 6px; margin: 0 0 28px; }
.page-head h1 { font: italic 800 clamp(38px, 4vw, 54px)/0.95 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* onglets de l'espace staff */
.subnav { display: flex; gap: 6px; margin: 0 0 30px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); scrollbar-width: thin; }
.subnav-link {
  display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 40px; padding: 0 13px; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 13.5px; font-weight: 700; white-space: nowrap; transition: color 0.15s, background 0.15s;
}
.subnav-link .icon { width: 16px; height: 16px; }
.subnav-link:hover { color: var(--white); background: var(--hover); }
.subnav-link.active { color: var(--white); background: var(--primary-soft); border-color: var(--primary-line); }
.subnav-link.active .icon { color: var(--primary-light); }

.site-foot { margin-top: 24px; border-top: 1px solid var(--line); background: var(--panel); }
.foot-top {
  display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(140px, 1fr)); gap: 32px;
  width: 100%; max-width: 1400px; margin: 0 auto; padding: 48px clamp(20px, 4vw, 56px) 36px;
}
.foot-brand { display: flex; flex-direction: column; gap: 16px; }
.foot-brand .logo-mark { width: 34px; height: 34px; }
.foot-brand p { margin: 0; max-width: 340px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.foot-col { display: flex; flex-direction: column; }
.foot-col p { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--white); }
.foot-col a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; color: var(--muted); font-size: 14px; font-weight: 600; }
.foot-col a:hover { color: var(--white); }
.foot-ext .icon { width: 13px; height: 13px; opacity: 0.6; }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  width: 100%; max-width: 1400px; margin: 0 auto; padding: 16px clamp(20px, 4vw, 56px) 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px;
}

/* Boutons et puces ---------------------------------------------------------------------------- */
.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card-2); color: var(--white);
  font: 800 14px var(--font); letter-spacing: 0.01em; cursor: pointer; white-space: nowrap; text-transform: none;
  box-shadow: var(--shadow); transition: background 0.15s, border-color 0.15s, box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.button:hover { color: var(--white); border-color: var(--primary-line); background: var(--card-hover); transform: translateY(-1px); }
.button:active { transform: translateY(1px); box-shadow: none; }
.button .icon { width: 17px; height: 17px; }
.button-primary, .actions .button:last-child, .cl-actions .button:last-child, .filters .button {
  background: var(--primary); border-color: var(--primary-2); box-shadow: 0 3px 0 var(--secondary);
}
.button-primary:hover, .actions .button:last-child:hover, .cl-actions .button:last-child:hover, .filters .button:hover {
  background: var(--primary-2); border-color: var(--primary-2); box-shadow: 0 4px 0 var(--secondary);
}
.button-primary:active, .actions .button:last-child:active, .cl-actions .button:last-child:active, .filters .button:active {
  transform: translateY(2px); box-shadow: 0 1px 0 var(--secondary);
}
.button-ghost, .cl-actions .button-ghost:last-child { background: transparent; border-color: var(--line-2); color: var(--text); box-shadow: none; }
.button-ghost:hover, .cl-actions .button-ghost:last-child:hover { background: var(--hover); border-color: var(--primary-line); box-shadow: none; }
.button-small { min-height: 38px; padding: 0 13px; font-size: 13px; }
.button-large { min-height: 52px; padding: 0 24px; font-size: 15px; border-radius: 10px; }
.button-block { width: 100%; }
.button-danger, .cl-actions .button-danger:last-child { background: var(--bad-bg); border-color: #b0474d; color: var(--bad-text); box-shadow: 0 3px 0 #5a2326; }
.button-danger:hover, .cl-actions .button-danger:last-child:hover { color: var(--white); background: #a8434a; border-color: #b9535a; box-shadow: 0 4px 0 #5a2326; }
.button-discord { background: var(--discord); border-color: var(--discord); }
.button-steam { background: #1b2838; }
.button:disabled, .button.is-busy { opacity: 0.6; cursor: progress; transform: none; }
.icon-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm);
  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: 999px;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
}
.pill-good { color: var(--good); background: rgba(90, 200, 120, 0.1); border-color: rgba(90, 200, 120, 0.35); }
.pill-bad { color: var(--bad-text); background: rgba(220, 82, 88, 0.14); border-color: rgba(220, 82, 88, 0.45); }
.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: 72px; height: 72px; font-size: 30px !important; border-radius: 16px; }
.avatar-letter {
  display: inline-grid; place-items: center; background: var(--secondary);
  color: var(--white); font: 800 16px var(--font); box-shadow: inset 0 0 0 1px var(--primary-line);
}

/* Cartes, chiffres, bandeaux ------------------------------------------------------------------ */
.card { margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  min-height: 58px; padding: 12px 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 { display: grid; place-items: center; box-sizing: content-box; width: 16px; height: 16px; padding: 7px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-light); }
.card-body { padding: 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; }

/* chiffres clés : tuiles séparées */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  --tone: var(--primary-light); position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 7%, var(--card)), var(--card) 55%);
}
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.kpi-label .icon { box-sizing: content-box; width: 15px; height: 15px; padding: 6px; border-radius: 7px; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent); }
.kpi-value { font: italic 800 38px/1 var(--display); color: var(--white); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.kpi-hint { font-size: 13px; color: var(--muted); }
.kpi-good { --tone: var(--good); }
.kpi-bad { --tone: var(--bad); }
.kpi-warn { --tone: var(--warn); }
.kpi-info { --tone: var(--info); }

.banner {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 16px; border-radius: var(--radius-sm);
  background: rgba(255, 190, 60, 0.07); border: 1px solid rgba(255, 190, 60, 0.3); color: #ffd98a; font-weight: 700;
}
.banner-good { background: rgba(90, 200, 120, 0.07); border-color: rgba(90, 200, 120, 0.3); color: var(--good); }
.banner-bad { background: rgba(220, 82, 88, 0.08); border-color: rgba(220, 82, 88, 0.35); color: var(--bad-text); }

/* 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: 800; 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 22px; text-align: left; white-space: nowrap; background: var(--card-2);
  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 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
.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: 44px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); 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: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field); color: var(--text); font: inherit; }

/* onglets : pastilles (comme les filtres des portails) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; font-weight: 700; transition: color 0.15s, background 0.15s; }
.tabs a:hover { color: var(--white); background: var(--hover); }
.tabs a.active { color: var(--white); background: var(--primary-soft); border-color: var(--primary-line); }

/* Graphiques */
.chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-label { fill: var(--muted); font: 700 11px var(--font); }
.chart-area { fill: rgba(100, 91, 230, 0.16); }
.chart-line { fill: none; stroke: var(--primary-2); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--primary-2); }
.chart-empty { fill: var(--muted); font: 700 14px var(--font); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bar-text { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 4px; }
.bar-text strong { color: var(--white); font-variant-numeric: tabular-nums; }
.bar { width: 100%; height: 6px; display: block; }
.bar-track { fill: var(--field); }
.bar-fill { fill: var(--primary); }

/* 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%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field);
  color: var(--text); font: 600 14px var(--font); 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: 1px solid var(--line-2); border-radius: var(--radius-sm); 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: 32px; height: 32px; padding: 0 7px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 800 13px var(--font); 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; min-height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); 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: 700; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; background: var(--line-2); transition: background 0.15s; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform 0.15s var(--ease), background 0.15s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: var(--white); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--primary-light); outline-offset: 2px; }

.actions, .cl-actions {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 0 6px;
  background: var(--card); border-top: 1px solid var(--line);
}

/* 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.12em; text-transform: uppercase; color: var(--muted); }
.perm-label .icon { width: 15px; height: 15px; }

/* Profil et personnages ----------------------------------------------------------------------- */
.profile {
  --accent: var(--primary);
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px;
  padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, var(--card)), var(--card) 60%);
}
.profile-text { flex: 1; min-width: 220px; }
.profile-text h2 { font: italic 800 38px/1 var(--display); text-transform: uppercase; 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: 12px; }
.character { display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-2); color: var(--text); }
.character-live { border-color: rgba(90, 200, 120, 0.4); }
.character-link { transition: border-color 0.15s, transform 0.2s var(--ease), background 0.15s; }
.character-link:hover { color: var(--text); border-color: var(--primary-line); background: var(--card-hover); transform: translateY(-2px); }
.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 32px/1 var(--display); color: var(--good); font-variant-numeric: tabular-nums; }
.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(420px, 44%) minmax(0, 1fr); min-height: 100vh; }
.split-main { display: flex; flex-direction: column; padding: 28px 56px; background: var(--panel); border-right: 1px solid var(--line); }
.split-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.split-top .brand .logo-mark { display: inline-grid; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-weight: 700; font-size: 14px; }
.split-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.connect { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 12px; }
.connect-title { margin: 6px 0 0; font: italic 800 clamp(48px, 5vw, 64px)/0.9 var(--display); text-transform: uppercase; }
.connect-lead { margin: 0 0 12px; }
.connect-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.connect-card {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 20px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); color: var(--text); box-shadow: var(--shadow);
  transition: border-color 0.15s, background 0.15s, transform 0.2s var(--ease);
}
.connect-card:hover { color: var(--text); border-color: var(--primary-line); background: var(--card-hover); transform: translateY(-2px); }
.connect-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.connect-icon img { width: 28px; height: 28px; object-fit: contain; }
.connect-discord .connect-icon { border-color: rgba(88, 101, 242, 0.5); background: rgba(88, 101, 242, 0.1); }
.connect-discord strong { color: #a5adff; }
.connect-steam .connect-icon { background: #171d25; border-color: rgba(102, 192, 244, 0.35); }
.connect-text { display: flex; flex-direction: column; gap: 3px; }
.connect-text strong { font-size: 18px; font-weight: 800; 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: 800; }
.connect-go .icon { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.connect-card:hover .connect-go .icon { transform: translate(2px, -2px); }
.connect-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; color: var(--muted); 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; margin: 16px; padding: 0 7% 9%; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.split-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(16, 17, 19, 0.92), rgba(16, 17, 19, 0.2) 60%); }
.visual-slogan {
  position: relative; z-index: 1; margin: 0; max-width: 11ch;
  font: italic 800 clamp(52px, 6vw, 96px)/0.9 var(--display); text-transform: uppercase; color: var(--white);
}

.body-center { display: grid; place-items: center; padding: 20px; }
.notice { max-width: 480px; padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.notice-bad { border-color: rgba(220, 82, 88, 0.4); }
.notice .brand { margin-bottom: 20px; }
.notice .brand .logo-mark { display: inline-grid; }
.notice h1 { font: italic 800 36px/1 var(--display); text-transform: uppercase; margin-bottom: 10px; }
.notice p { color: var(--muted); margin-bottom: 22px; }
.notice-bad h1 { color: var(--bad-text); }
.notice-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* Accueil ------------------------------------------------------------------------------------- */
.home { display: flex; flex-direction: column; gap: 56px; }

/* premier écran : carte encadrée avec photo voilée, nom du serveur, compteur en direct */
.hero {
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 340px); gap: 40px; align-items: end;
  min-height: 520px; padding: 48px 48px 44px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.hero-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(16, 17, 19, 0.97) 0%, rgba(16, 17, 19, 0.88) 38%, rgba(16, 17, 19, 0.5) 70%, rgba(16, 17, 19, 0.35) 100%), linear-gradient(0deg, rgba(16, 17, 19, 0.9), transparent 55%);
}
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 12% 110%, rgba(100, 91, 230, 0.28), transparent 45%); }
.hero-text { max-width: 680px; }
.hero .eyebrow { padding: 7px 12px; border: 1px solid var(--primary-line); border-radius: 999px; background: rgba(16, 17, 19, 0.6); }
.hero-title { margin: 18px 0 20px; font: italic 800 clamp(64px, 8vw, 128px)/0.86 var(--display); text-transform: uppercase; letter-spacing: 0.005em; color: var(--white); }
.hero-title span { display: block; margin-top: 10px; font-size: 0.3em; line-height: 1; letter-spacing: 0.12em; color: var(--primary-light); }
.hero-tagline { margin: 0 0 8px; font-size: 22px; font-weight: 800; color: var(--white); }
.hero-intro { max-width: 520px; margin: 0 0 28px; color: #c9cad0; font-size: 16px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .button-ghost { background: rgba(16, 17, 19, 0.6); border-color: rgba(255, 255, 255, 0.18); }
.hero-status { padding: 22px 22px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(22, 23, 26, 0.92); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px); }
.hero-live { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 5px 10px; border-radius: 999px; background: rgba(220, 82, 88, 0.12); font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bad-text); }
.hero-live .dot { color: var(--bad); }
.hero-live.is-online { color: var(--good); background: rgba(90, 200, 120, 0.12); }
.hero-live.is-online .dot { color: var(--good); animation: live 2.4s ease-in-out infinite; }
@keyframes live { 0%, 100% { box-shadow: 0 0 0 0 rgba(90, 200, 120, 0.5); } 50% { box-shadow: 0 0 0 6px rgba(90, 200, 120, 0); } }
.hero-count { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 6px; }
.hero-count strong { font: italic 800 84px/0.9 var(--display); color: var(--white); font-variant-numeric: tabular-nums; }
.hero-count span { font-weight: 700; color: var(--muted); }
.hero-facts { margin: 12px 0 8px; display: grid; }
.hero-facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.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; min-height: 44px; font-size: 14px; font-weight: 800; }
.hero-more .icon { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.hero-more:hover .icon { transform: translate(2px, -2px); }

/* entrée du premier écran, une seule fois au chargement */
.hero-text, .hero-status { animation: enter 0.7s var(--ease) both; }
.hero-status { animation-delay: 0.15s; }
.hero-photo { animation: photo-in 1.2s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes photo-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* première connexion : couverture à gauche, étapes reliées par un pointillé à droite */
.mission { display: grid; grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.7fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 12px 38px rgba(0, 0, 0, 0.2); }
.mission-card { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; min-height: 460px; padding: 32px; border-right: 1px solid var(--line); }
.mission-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.mission-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(16, 17, 19, 0.95), rgba(16, 17, 19, 0.25) 65%), linear-gradient(150deg, rgba(100, 91, 230, 0.3), transparent 50%); }
.mission-card h2 { font: italic 800 52px/0.92 var(--display); text-transform: uppercase; }
.mission-card h2 span { display: block; margin-top: 10px; font: 700 16px var(--font); letter-spacing: 0.02em; text-transform: none; color: var(--primary-light); }
.steps { position: relative; list-style: none; margin: 0; padding: 18px 36px; }
.steps::before { content: ''; position: absolute; left: 59px; top: 56px; bottom: 56px; border-left: 1px dashed var(--line-2); }
.step { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 24px 0; }
.step + .step { border-top: 1px solid var(--line); }
.step-number {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--secondary); border: 1px solid var(--primary-line); box-shadow: 0 3px 0 #1c1947;
  color: var(--white); font: italic 800 22px/1 var(--display); font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.step p { margin: 0; font-size: 14px; }
.step .button { min-width: 140px; }

.section-title { margin: 0 0 20px; font: italic 800 clamp(34px, 3.4vw, 46px)/0.95 var(--display); text-transform: uppercase; }
.small-title { font-size: 28px; margin-top: 32px; }
.small-title:first-child { margin-top: 0; }
.news { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.news-card {
  display: flex; flex-direction: column; gap: 10px; min-height: 170px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text);
  transition: border-color 0.15s, transform 0.2s var(--ease), background 0.15s;
}
.news-card:hover { color: var(--text); border-color: var(--primary-line); background: var(--card-hover); transform: translateY(-3px); }
.news-card .pill { align-self: flex-start; }
.news-card h3 { font-size: 20px; font-weight: 800; line-height: 1.25; }
.news-card p { margin: auto 0 0; }
.socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.social {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 150px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, #1d1c27, var(--card) 60%); color: var(--text);
  transition: border-color 0.15s, transform 0.2s var(--ease), background 0.15s;
}
.social:hover { color: var(--text); border-color: var(--primary-line); transform: translateY(-3px); }
.social strong { margin-top: 40px; font: italic 800 30px/1 var(--display); text-transform: uppercase; color: var(--white); }
.social-icon { position: absolute; top: 18px; left: 18px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary-light); }
.social-icon .icon { width: 21px; height: 21px; }
.social-arrow { position: absolute; top: 20px; right: 20px; color: var(--muted); transition: transform 0.2s var(--ease), color 0.15s; }
.social:hover .social-arrow { color: var(--white); transform: translate(2px, -2px); }
.social-arrow .icon { width: 17px; height: 17px; }
.credits { margin: -28px 0 0; color: var(--faint); font-size: 12px; }

/* FAQ : intro à gauche, questions dépliables (<details>) à droite */
.faq { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 2fr); gap: 40px; align-items: start; }
.faq-intro { position: sticky; top: calc(var(--top) + 24px); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.faq-intro .section-title { margin: 0; }
.faq-intro p.muted { margin: 0; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: border-color 0.15s, background 0.15s; }
.faq-item summary {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 16px;
  min-height: 64px; padding: 14px 22px; list-style: none; cursor: pointer; border-radius: var(--radius); transition: background 0.15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--hover); }
.faq-num { color: var(--faint); font: italic 800 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.faq-q { color: var(--white); font-size: 16.5px; font-weight: 800; line-height: 1.35; }
.faq-toggle { position: relative; width: 16px; height: 16px; justify-self: end; }
.faq-toggle::before, .faq-toggle::after { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px; border-radius: 2px; background: var(--muted); transition: transform 0.2s var(--ease), background 0.15s; }
.faq-toggle::after { transform: rotate(90deg); }
.faq-item[open] { border-color: var(--primary-line); background: linear-gradient(160deg, #1d1b2b, var(--card) 55%); }
.faq-item[open] .faq-num { color: var(--primary-light); }
.faq-item[open] .faq-toggle::before, .faq-item[open] .faq-toggle::after { background: var(--primary-light); }
.faq-item[open] .faq-toggle::after { transform: rotate(0deg); }
.faq-answer { padding: 0 22px 20px 78px; color: var(--muted); line-height: 1.7; white-space: pre-line; }
.faq-answer strong { color: var(--text); }

/* Classements --------------------------------------------------------------------------------- */
.ranking { list-style: none; margin: 0; padding: 0; }
.rank-row { --medal: var(--muted); display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 48px; padding: 6px 10px; border-top: 1px solid var(--line); }
.rank-row:first-child { border-top: 0; }
.rank-place { display: grid; place-items: center; width: 32px; height: 32px; background: var(--field); border: 1px solid var(--line-2); color: var(--medal); font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.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-size: 16px; font-weight: 900; color: var(--white); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-top { box-shadow: inset var(--bar) 0 0 var(--medal); background: var(--hover); border-top: 0; margin-bottom: 2px; }
.rank-1 { --medal: #f6cf5c; }
.rank-2 { --medal: #dfe3ee; }
.rank-3 { --medal: #e5a072; }
.rank-top .rank-place { border-color: var(--medal); }
.rank-1 .rank-name { color: var(--white); }

/* Organisations ------------------------------------------------------------------------------- */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.org-card {
  --accent: var(--primary);
  position: relative; display: flex; flex-direction: column; gap: 9px; padding: 22px; color: var(--text);
  border: 1px solid var(--line); background: var(--card); box-shadow: inset 0 var(--bar) 0 var(--accent);
  transition: transform 0.2s var(--ease), border-color 0.15s, background 0.15s;
}
.org-card:hover { color: var(--text); transform: translateY(-2px); background: var(--card-hover); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.org-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.org-tag { --accent: var(--primary); padding: 4px 10px; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); color: var(--white); font-size: 15px; font-weight: 900; letter-spacing: 0.08em; }
.org-tag-large { font-size: 26px; padding: 14px 18px; }
.org-card h3 { font-size: 22px; font-weight: 900; line-height: 1.1; }
.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); }

/* Marché */
.rarity-dot { --accent: var(--muted); display: inline-block; width: 9px; height: 9px; margin-right: 10px; background: var(--accent); }
.table .pill[data-color] { --accent: var(--muted); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, 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; justify-content: center; gap: 6px; padding: 10px 0; background: var(--field); border: 1px solid var(--line); font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.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; box-shadow: inset var(--bar) 0 0 var(--primary); 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; min-height: 44px; font-weight: 800; }
.suggestion-side .icon { width: 14px; height: 14px; }
.vote-bar { max-width: 340px; height: 4px; margin-top: 12px; overflow: hidden; background: rgba(220, 82, 88, 0.45); }
.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: 20px; align-items: start; }
.doc-side { position: sticky; top: calc(var(--top) + 20px); display: flex; flex-direction: column; gap: 14px; }
.toc { display: flex; flex-direction: column; padding: 12px 0; border: 1px solid var(--line); background: var(--card); }
.toc .perm-label { padding: 0 16px; }
.toc a { position: relative; display: flex; align-items: center; min-height: 38px; padding: 0 16px; color: var(--muted); font-size: 14px; font-weight: 700; }
.toc a:hover { color: var(--white); background: var(--hover); }
.toc a.active { color: var(--white); background: var(--primary-soft); box-shadow: inset var(--bar) 0 0 var(--primary); }
.toc .toc-2 { padding-left: 30px; font-size: 13px; }
.doc { margin: 0; }
.doc .card-body { padding: 34px 40px; font-size: 16px; line-height: 1.75; }
.doc h2 { position: relative; margin: 36px 0 12px; padding: 0 0 10px 16px; border-bottom: 1px solid var(--line); font-size: 26px; font-weight: 900; line-height: 1.15; text-transform: uppercase; scroll-margin-top: calc(var(--top) + 20px); }
.doc h2::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 13px; width: var(--bar); background: var(--primary); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 24px 0 8px; font-size: 19px; scroll-margin-top: calc(var(--top) + 20px); }
.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: 12px; }
.wiki-card {
  display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  transition: border-color 0.15s, transform 0.2s var(--ease), background 0.15s, box-shadow 0.15s;
}
.wiki-card:hover { color: var(--text); border-color: var(--primary-line); background: var(--card-hover); transform: translateY(-2px); box-shadow: inset 0 var(--bar) 0 var(--primary); }
.wiki-card .icon { color: var(--primary-light); width: 22px; height: 22px; }
.wiki-card strong { font-size: 19px; font-weight: 900; line-height: 1.2; color: var(--white); }

/* Markdown Discord (aperçus, suggestions, documents) */
.md-spoiler { background: #1e1f22; color: transparent; cursor: pointer; transition: color 0.15s; }
.md-spoiler:hover { color: inherit; }
.md-h { display: inline-block; font-weight: 900; 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; }
/* séparateurs « --- » / « === » et petit texte « -# » (Markdown de Discord, messages V2) */
.md-hr, .dc-sep { display: block; height: 1px; margin: 8px 0; background: var(--line-2); }
.md-hr-lg, .dc-sep.is-large { margin: 16px 0; }
.dc-embed .md-hr, .dc-embed .dc-sep { background: #3f4147; }
.dc-sep.is-blank { background: none !important; }
.md-sub { display: inline-block; color: #949ba4; font-size: 12px; }
.md-time { padding: 0 2px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); }
.doc-sep { height: 1px; margin: 22px 0; border: 0; background: var(--line-2); }
.doc-sep-lg { margin: 36px 0; }

/* Changelog ----------------------------------------------------------------------------------- */
.cl-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 20px; align-items: start; }
.cl-main .card, .cl-side .card { margin: 0; }
.cl-side { position: sticky; top: calc(var(--top) + 20px); 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 solid var(--line); }
.cl-step { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; color: var(--white); }
.cl-step span { display: grid; place-items: center; width: 28px; height: 28px; background: var(--secondary); box-shadow: inset 0 -2px 0 var(--primary); color: var(--white); font-size: 14px; }
.cl-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cl-section { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); box-shadow: inset 0 var(--bar) 0 var(--primary); background: var(--panel); }
.cl-added { box-shadow: inset 0 var(--bar) 0 var(--good); }
.cl-changed { box-shadow: inset 0 var(--bar) 0 var(--info); }
.cl-fixed { box-shadow: inset 0 var(--bar) 0 var(--warn); }
.cl-removed { box-shadow: inset 0 var(--bar) 0 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: 800; 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 (garde le style de Discord) */
.dc-message { display: flex; gap: 14px; margin: -6px; padding: 14px; border-radius: 8px; background: #313338; font-family: 'gg sans', 'Segoe UI', system-ui, sans-serif; }
.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; }

/* Work (Kanban de l'équipe) ------------------------------------------------------------------- */
.wk-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.wk-nav .tabs a { gap: 7px; }
.wk-nav .tabs .icon { width: 15px; height: 15px; }
.wk-nav > .button { margin-bottom: 10px; }
.wk-kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.wk-filters { margin-bottom: 18px; }
.wk-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; 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-text); background: rgba(220, 82, 88, 0.14); border-color: rgba(220, 82, 88, 0.45); }
.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: 6px; }
.wk-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px;
  background: var(--card-2); border: 1px solid var(--line); box-shadow: inset var(--bar) 0 0 var(--primary);
}
.wk-row-high { box-shadow: inset var(--bar) 0 0 var(--bad); }
.wk-row-low { box-shadow: inset var(--bar) 0 0 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: 800; 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(220, 82, 88, 0.06); }

.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; background: var(--primary); }

.wk-board { display: grid; gap: 12px; 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 { 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; min-height: 48px; padding: 0 14px; background: var(--card-2); border-bottom: 1px solid var(--line); box-shadow: inset 0 calc(var(--bar) * -1) 0 var(--primary); }
.wk-col-head h3 { font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.wk-count { min-width: 24px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; background: var(--field); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 900; }
.wk-drop { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 110px; }
.wk-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line-2); cursor: grab; transition: border-color 0.15s, opacity 0.15s, transform 0.2s var(--ease);
}
.wk-card:hover { border-color: var(--primary-line); transform: translateY(-2px); }
.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: 800; 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: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.wk-suggestion { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; padding: 12px 14px; background: var(--field); border: 1px solid var(--line); box-shadow: inset var(--bar) 0 0 var(--primary); font-weight: 800; }
.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; 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; }
.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; }

/* Animations (planning) ------------------------------------------------------------------------ */
.an-switch a { white-space: nowrap; }
.an-week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.an-day { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); min-height: 220px; }
.an-day.is-today { border-color: var(--primary-line); box-shadow: inset 0 var(--bar) 0 var(--primary); }
.an-day-head { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; background: var(--card-2); border-bottom: 1px solid var(--line); text-transform: capitalize; }
.an-day-head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.an-day-head strong { font-size: 20px; font-weight: 900; color: var(--white); }
.an-day.is-today .an-day-head strong { color: var(--primary-light); }
.an-day-body { display: flex; flex-direction: column; gap: 6px; padding: 8px; flex: 1; }
.an-event {
  display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; color: var(--text);
  background: var(--card); border: 1px solid var(--line-2); box-shadow: inset var(--bar) 0 0 var(--primary); font-size: 13px;
  transition: border-color 0.15s, transform 0.2s var(--ease);
}
.an-event:hover { color: var(--text); border-color: var(--primary-line); transform: translateY(-2px); }
.an-event strong { color: var(--white); line-height: 1.3; overflow-wrap: anywhere; }
.an-event.is-mine { background: var(--primary-soft); }
.an-state-live { box-shadow: inset var(--bar) 0 0 var(--good); }
.an-state-over { opacity: 0.6; box-shadow: inset var(--bar) 0 0 var(--line-2); }
.an-state-cancelled { opacity: 0.5; box-shadow: inset var(--bar) 0 0 var(--bad); }
.an-state-cancelled strong { text-decoration: line-through; }
.an-event-time { color: var(--primary-light); font-weight: 900; 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: 900; }
.an-add { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; min-height: 36px; padding: 0 8px; color: var(--faint); font-size: 12px; font-weight: 800; }
.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: 800; 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: 1px dashed var(--line-2); color: var(--white); font-weight: 900; }
.an-text { margin: 14px 0 10px; }

/* Harmonisation ------------------------------------------------------------------------------- */
/* blocs des pages (classements, orgas, wiki, changelog, Work, planning) : angles arrondis,
   accents en contour plutôt qu'en barre pleine, titres en Barlow */
.rank-place, .wk-count, .an-length, .cl-step span, .suggestion-votes, .org-tag, .rarity-dot { border-radius: var(--radius-sm); }
.rank-top { border-radius: var(--radius-sm); }
.org-card, .wiki-card, .toc, .cl-section, .wk-col, .wk-card, .wk-row, .wk-suggestion, .wk-comment > div, .an-day, .an-event, .suggestion-reply { border-radius: var(--radius); }
.wk-card, .an-event, .wk-row { border-radius: 10px; }
.org-card { box-shadow: inset 0 var(--bar) 0 var(--accent), 0 10px 28px rgba(0, 0, 0, 0.15); }
.org-card h3, .wiki-card strong { font: italic 800 26px/1 var(--display); text-transform: uppercase; }
.doc .card-body { padding: 36px 42px; }
.doc h2 { font: italic 800 32px/1 var(--display); padding-left: 0; }
.doc h2::before { display: none; }
.toc a { border-radius: var(--radius-sm); margin: 0 8px; padding: 0 10px; }
.toc a.active { box-shadow: none; border: 1px solid var(--primary-line); }
.wk-col-head { border-radius: var(--radius) var(--radius) 0 0; box-shadow: none; }
.an-day-head { border-radius: var(--radius) var(--radius) 0 0; }
.an-day-head strong { font: italic 800 26px/1 var(--display); }
.vote-bar { border-radius: 999px; }
.dc-message { margin: 0; }

/* Bonus : boutique, vote, roue, calendrier, images ------------------------------------------- */
.logo-image { overflow: hidden; background: transparent; box-shadow: none; }
.logo-image img { width: 100%; height: 100%; object-fit: contain; }

.bonus-hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 200px; margin-bottom: 24px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, #262063, var(--card) 65%); }
.bonus-hero.has-image { min-height: 260px; }
.bonus-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.bonus-hero-text { position: relative; max-width: 640px; }
.bonus-title { margin: 6px 0 8px; font: italic 800 clamp(40px, 6vw, 64px)/0.95 var(--display); color: var(--white); text-transform: uppercase; }

.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 20px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-align: center; transition: border-color 0.15s, transform 0.15s; }
.pack:hover { border-color: var(--primary-line); transform: translateY(-2px); }
.pack-featured { border-color: var(--primary-2); background: linear-gradient(180deg, rgba(100, 91, 230, 0.16), var(--card) 60%); }
.pack-ribbon { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 999px; background: var(--primary); color: var(--white); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.pack-visual { display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: 6px; }
.pack-visual img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pack-coin { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-light); }
.pack-coin .icon { width: 38px; height: 38px; }
.pack-credits { margin: 0; font: italic 800 44px/1 var(--display); color: var(--white); }
.pack-credits span { display: block; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pack-bonus { margin: 0; color: var(--good); font-weight: 800; font-size: 14px; }
.pack-name { margin: 0; font-size: 13px; }
.pack-price { margin: 6px 0 12px; font: italic 800 26px/1 var(--display); color: var(--primary-light); }
.pack form { width: 100%; margin-top: auto; }
.shop-legal { display: flex; gap: 8px; align-items: flex-start; max-width: 860px; }

.vote-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.vote-steps li { display: flex; gap: 18px; align-items: flex-start; }
.vote-steps h3 { margin: 4px 0 6px; }
.vote-steps p { margin: 0 0 12px; }

.wheel-page { display: grid; grid-template-columns: minmax(280px, 520px) minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 20px; }
.wheel { position: relative; padding-top: 14px; }
.wheel-svg { display: block; width: 100%; height: auto; }
.wheel-svg.is-spinning { transition: transform 5.5s cubic-bezier(0.12, 0.7, 0.12, 1); }
.wheel-pointer { position: absolute; top: 0; left: 50%; z-index: 1; width: 0; height: 0; margin-left: -14px; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 30px solid var(--white); filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.5)); }
.wheel-rim { fill: var(--panel); stroke: var(--primary-2); stroke-width: 3; }
.wheel-hub { fill: var(--panel); stroke: var(--line-2); stroke-width: 3; }
.wheel-label { font: italic 800 17px var(--display); letter-spacing: 0.02em; }
.wheel-side .card { margin-bottom: 16px; }
.wheel-result { display: none; margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(90, 200, 120, 0.35); border-radius: var(--radius-sm); background: rgba(90, 200, 120, 0.08); color: var(--good); font-weight: 700; }
.wheel-result.is-shown { display: block; }
.wheel-result.is-bad { border-color: rgba(220, 82, 88, 0.45); background: rgba(220, 82, 88, 0.08); color: var(--bad-text); }
.odds { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.odds li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.odds li strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.odds-dot { width: 12px; height: 12px; flex: none; border-radius: 3px; background: var(--accent, var(--primary)); }
.progress { height: 10px; margin: 12px 0 8px; overflow: hidden; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary-2); }

.advent { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.door { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 140px; padding: 34px 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-align: center; }
.door-number { position: absolute; top: 8px; left: 12px; font: italic 800 30px/1 var(--display); color: var(--faint); }
.door-hint { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 13px; font-weight: 700; }
.door-reward { font-weight: 800; font-size: 14px; }
.door .thumb { width: 56px; height: 56px; object-fit: contain; }
.door-today { border-color: var(--primary-2); background: linear-gradient(160deg, rgba(100, 91, 230, 0.28), var(--card) 70%); box-shadow: 0 0 0 3px var(--primary-soft); }
.door-today .door-number { color: var(--primary-light); }
.door-today .door-hint { color: var(--primary-light); }
.door-open { border-color: rgba(90, 200, 120, 0.35); }
.door-open .door-number { color: var(--good); }
.door-missed { opacity: 0.45; }
.door form { width: 100%; }
.door-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px; border: 0; border-radius: var(--radius-sm); background: var(--primary); color: var(--white); font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 var(--secondary); }
.door-button:hover { background: var(--primary-2); }

.reward-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.input-small { width: 120px; }
.table-form td { vertical-align: middle; }
.table-form input:not([type="checkbox"]):not([type="color"]) { min-width: 0; }
.table-form input[type="color"] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field); }
.field-narrow { max-width: 360px; }
.kpis-tight { margin: 0; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.slot { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-2); }
.slot-preview { display: grid; place-items: center; flex: none; width: 110px; height: 84px; overflow: hidden; border-radius: var(--radius-sm); background: var(--field); text-align: center; }
.slot-preview img { width: 100%; height: 100%; object-fit: cover; }
.slot-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.slot-body h3 { margin: 0; font-size: 15px; }
.slot-body p { margin: 0; }
.slot-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.slot-form .select-inline { flex: 1; min-width: 0; height: 38px; }
.upload-preview { max-width: 240px; max-height: 160px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.library { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.library li { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-2); }
.library img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 6px; background: var(--field); }
.library div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.library strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.info-embed { position: relative; max-width: 560px; border-left-color: var(--accent, var(--primary)); }
.info-thumb { float: right; width: 72px; height: 72px; margin: 2px 0 8px 14px; border-radius: 6px; object-fit: contain; }
.info-fields { display: flex; flex-wrap: wrap; gap: 4px 16px; clear: none; }
.info-fields .dc-field { flex: 1 1 100%; }
.info-fields .dc-field.is-inline { flex: 1 1 140px; }
.info-image { display: block; clear: both; max-width: 100%; margin-top: 12px; border-radius: 4px; }
.dc-buttons { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; margin-top: 8px; }
.dc-link-button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border-radius: 4px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 600; }
.dc-link-button .icon { width: 14px; height: 14px; }
.dc-link-button.is-missing { opacity: 0.4; text-decoration: line-through; }
.cl-form .table-wrap { flex-shrink: 0; }
.info-row input:not([type='checkbox']), .info-row textarea, .table-form input:not([type='checkbox']):not([type='color']), .reward-fields input {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field);
  color: var(--text); font: 600 14px var(--font); outline: 0;
}
.reward-fields input.input-small, .table-form input.input-small, .info-row input.input-small, .table-form .reward-fields input.input-small { width: 120px; }
.info-row textarea { resize: vertical; line-height: 1.45; }
.info-row input:focus, .info-row textarea:focus, .table-form input:focus, .reward-fields input:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.info-row ::placeholder, .table-form ::placeholder, .reward-fields ::placeholder { color: var(--faint); }
.info-row-button input.input-small { width: 100%; }
.info-row .check { white-space: nowrap; }
.info-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.info-row-button { grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.3fr) 96px minmax(0, 1.2fr); }
.info-row-button .select-inline { width: 100%; }
.info-color { font-weight: 800; }
.info-color[data-button-color="blue"] { color: #949cf7; }
.info-color[data-button-color="green"] { color: #4ade80; }
.info-color[data-button-color="red"] { color: #f87171; }
.info-buttons-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.info-per-row { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.info-per-row .select-inline { width: auto; }
/* boutons d'action Discord (aperçu) */
.dc-actions { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; margin-top: 8px; }
.dc-action { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border-radius: 8px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }
.dc-action-blue { background: #5865f2; }
.dc-action-green { background: #248046; }
.dc-action-red { background: #da373c; }
.dc-action.is-missing { opacity: 0.4; text-decoration: line-through; }
.dc-section .dc-action { flex: none; align-self: center; }
.dc-embed .dc-actions { margin-top: 10px; }
.info-row-block { grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1.6fr); }
.info-row-block .select-inline { width: 100%; }
.st-row { grid-template-columns: 220px 90px minmax(0, 1fr); }
.st-row.is-empty .info-sep-line { display: none; }
.info-sep-line { display: none; align-self: center; grid-column: 2 / -1; height: 1px; background: var(--line-2); }
.info-row.is-sep > input, .info-row.is-sep > textarea { display: none; }
.info-row.is-sep .info-sep-line { display: block; }
.dc-section { display: flex; align-items: flex-start; gap: 14px; }
.dc-section .dc-text { flex: 1; min-width: 0; }
.dc-section .info-thumb { float: none; margin: 0; }
.dc-gallery { display: block; max-width: 100%; margin: 8px 0 0; border-radius: 6px; }
.dc-embed > .dc-text + .dc-text, .dc-embed > .dc-section + .dc-text, .dc-embed > .dc-text + .dc-section { margin-top: 8px; }
.field-color { flex: 0 0 auto; }

@media (max-width: 860px) {
  .info-row, .info-row-button { grid-template-columns: minmax(0, 1fr); }
  .info-sep-line { grid-column: auto; }
  .wheel-page { grid-template-columns: minmax(0, 1fr); }
  .bonus-hero { padding: 22px; }
  .advent { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .wheel-svg.is-spinning { transition-duration: 0.01s; }
}

/* Adaptations --------------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .cl-layout { grid-template-columns: minmax(0, 1fr); }
  .cl-side { position: static; }
}
@media (max-width: 1100px) {
  .grid-main, .doc-layout, .editor-split { grid-template-columns: minmax(0, 1fr); }
  .doc-side { position: static; }
  .hero { grid-template-columns: minmax(0, 1fr); align-items: end; align-content: end; }
  .hero-status { max-width: 440px; }
  .mission { grid-template-columns: minmax(0, 1fr); }
  .mission-card { min-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-visual { display: none; }
  .faq { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .faq-intro { position: static; }
  .foot-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

/* téléphone et tablette : la barre d'icônes devient un menu plein écran avec libellés */
@media (max-width: 860px) {
  :root { --top: 68px; }
  .shell { margin-left: 0; }
  html:not(.has-menu) .rail { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .has-menu .rail {
    display: flex; inset: var(--top) 0 0 0; width: auto; z-index: 40; align-items: stretch; border-right: 0; background: var(--bg);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0s 0.2s;
  }
  .menu-open .rail { visibility: visible; opacity: 1; transform: none; transition: opacity 0.2s, transform 0.2s var(--ease); }
  .menu-open body { overflow: hidden; }
  .rail-mark { display: none; }
  .is-admin .rail-nav { padding: 18px 16px 32px; }
  .is-admin .rail-link { height: 50px; padding: 0 14px; }
  .top-admin .top-action-label small, .top-back .top-action-label small { display: none; }
  .rail-nav { align-items: stretch; gap: 18px; padding: 18px 16px 32px; }
  .rail-line { display: none; }
  .rail-group { align-items: stretch; gap: 4px; }
  .rail-label { display: block; margin: 0 0 4px 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
  .rail-link { display: flex; justify-content: flex-start; gap: 14px; width: auto; height: 50px; padding: 0 14px; }
  .rail-tip { position: static; padding: 0; border: 0; background: none; box-shadow: none; opacity: 1; transform: none; font-size: 15px; color: inherit; }
  .has-menu .menu-button { display: inline-flex; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar .brand { margin-right: auto; }
  .topbar .brand-name { font-size: 22px; }
  .top-status { display: none; }
  .top-action { min-height: 44px; padding: 4px; }
  .top-action-label { display: none; }
  .top-account { padding-right: 4px; }
  .top-account .avatar { width: 34px; height: 34px; }
  .main { padding: 24px 16px 48px; }
  .home { gap: 40px; }
  .hero { min-height: 0; padding: 32px 20px 24px; border-radius: 14px; }
  .foot-top { padding: 32px 16px 24px; gap: 24px; }
  .foot-bottom { padding: 14px 16px 20px; }
  .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: 20px 16px; }
  .an-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .an-state { justify-content: flex-start; }
  .wk-home { grid-template-columns: minmax(0, 1fr); }
  .search { min-width: 0; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 30px; white-space: normal; overflow-wrap: anywhere; }
  .kpi-label { font-size: 11px; }
  .hero-title { font-size: 64px; }
  .hero-tagline { font-size: 19px; }
  .hero-actions .button { width: 100%; }
  .hero-count strong { font-size: 66px; }
  .steps { padding: 6px 18px; }
  .steps::before { left: 39px; }
  .step { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .step-number { width: 44px; height: 44px; }
  .step .button { grid-column: 2; justify-self: start; }
  .mission-card h2 { font-size: 40px; }
  .suggestion { grid-template-columns: 48px minmax(0, 1fr); }
  .suggestion-side { grid-column: 2; align-items: flex-start; }
  .foot-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .faq-item summary { grid-template-columns: 28px minmax(0, 1fr) 16px; gap: 12px; padding: 14px 16px; }
  .faq-q { font-size: 15px; }
  .faq-answer { padding: 0 16px 18px 56px; }
  .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
  .doc .card-body { padding: 22px 18px; }
  .visual-slogan { font-size: 52px; }
  .page-head h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Support : messages d'un ticket (pages-tickets.js) */
.tk-log { display: flex; flex-direction: column; padding: 6px; border-radius: 8px; background: #313338; }
.tk-log .dc-message { margin: 0; padding: 10px; border-radius: 0; }
.tk-log .dc-message + .dc-message { border-top: 1px solid #3f4147; }
.tk-log .dc-embed { margin-top: 6px; }
.tk-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #dbdee1; }
.tk-files { margin: 6px 0 0; font-size: 13px; }
.tk-files a { color: #00a8fc; }
.tk-time { color: #949ba4; font-size: 12px; }
.tk-order { display: inline-block; }
.tk-question { display: grid; grid-template-columns: minmax(0, 2fr) 120px auto minmax(0, 2fr) 90px; gap: 8px; align-items: center; margin-bottom: 8px; }
.tk-question .check { white-space: nowrap; }
@media (max-width: 900px) { .tk-question { grid-template-columns: 1fr 1fr; } }

/* Apparence des embeds : images de l'aperçu (pages-embeds.js) */
.dc-thumb { float: right; width: 80px; height: 80px; margin: 0 0 8px 12px; border-radius: 4px; object-fit: cover; }
.dc-img { display: block; max-width: 100%; margin-top: 12px; border-radius: 6px; }
.dc-icon { width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; vertical-align: middle; object-fit: cover; }
.em-preview { margin-bottom: 14px; }
.em-preview::after { content: ''; display: block; clear: both; }

/* Champs image : Ctrl+V d'une image (image-field.js, app.js) */
.field-row[data-paste-image] { flex-wrap: wrap; align-items: flex-end; }
.field-row[data-paste-image] .field:first-child { flex: 1 1 260px; }
.paste-status { display: flex; align-items: center; gap: 8px; flex-basis: 100%; margin: -4px 0 4px; }
.paste-status.is-bad { color: var(--bad-text); }
.paste-thumb { height: 40px; max-width: 120px; border-radius: 4px; object-fit: cover; }

/* Formulaires longs : dans un .cl-form (colonne flex), rien ne doit être écrasé à hauteur nulle */
.cl-form > * { flex-shrink: 0; }
/* lignes de saisie (questions du support, champs du créateur) : même style que les champs */
.tk-question input:not([type='checkbox']), .tk-question textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field);
  color: var(--text); font: 600 14px var(--font); outline: 0; transition: border-color 0.15s, box-shadow 0.15s;
}
.tk-question textarea { resize: vertical; line-height: 1.5; }
.tk-question input::placeholder, .tk-question textarea::placeholder { color: var(--faint); }
.tk-question input:focus, .tk-question textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Créateur d'embeds (pages-createur.js, app.js « creator ») */
.em-content { margin: 0 0 8px; color: #dbdee1; }
.cr-blocks { display: flex; flex-direction: column; gap: 10px; }
.cr-block { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.015); }
.cr-block-head { display: flex; align-items: center; gap: 10px; }
.cr-block-head .select-inline { flex: 0 0 210px; }
.cr-block-num { min-width: 1.6em; color: var(--faint); font-weight: 800; text-align: center; }
.cr-tools { display: none; gap: 4px; margin-left: auto; }
.js-cr .cr-tools { display: flex; }
.cr-sep-line { display: none; flex: 1; }
.cr-block.is-sep .cr-sep-line { display: block; }
.cr-block.is-sep .cr-block-text, .cr-block.is-sep .cr-block-image,
.cr-block.is-empty .cr-block-text, .cr-block.is-empty .cr-block-image,
.cr-block.is-image .cr-block-text { display: none; }
.js-cr .cr-block.is-empty { display: none; }
.cr-block textarea {
  width: 100%; min-height: 96px; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field);
  color: var(--text); font: 600 14px var(--font); line-height: 1.5; resize: vertical; outline: 0;
}
.cr-block textarea::placeholder { color: var(--faint); }
.cr-block textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.cr-add { display: none; flex-wrap: wrap; align-items: center; gap: 6px; }
.js-cr .cr-add { display: flex; }
.cr-side { position: sticky; top: 16px; align-self: start; }
