/* ═══════════════════════════════════════════════════════════════
   FiveRP BOT — Design system
   Base neutre anthracite ; la couleur est réservée aux états (succès, erreur, alerte, info).
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Couleurs */
  --bg: #111214;
  --bg-elev: #141518;
  --surface: #17181b;
  --card: #1c1e21;
  --card-2: #232529;
  --hover: rgba(255, 255, 255, .035);
  --border: rgba(255, 255, 255, .07);
  --border-2: rgba(255, 255, 255, .12);
  --input: #0f1012;
  --text: #f3f4f6;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;
  --violet: #e4e4e7;
  --violet-2: #f4f4f5;
  --violet-soft: rgba(255, 255, 255, .07);
  --violet-line: rgba(255, 255, 255, .2);
  --cyan: #a1a1aa;
  --cyan-soft: rgba(255, 255, 255, .05);
  --green: #3fb950;
  --green-soft: rgba(63, 185, 80, .13);
  --red: #f85149;
  --red-soft: rgba(248, 81, 73, .13);
  --orange: #d29922;
  --orange-soft: rgba(210, 153, 34, .13);
  --blue: #58a6ff;
  --blue-soft: rgba(88, 166, 255, .13);
  /* Formes */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --sidebar: 264px;
  --sidebar-min: 76px;
  --header: 64px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: .18s;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, .mono { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: .92em; }
.hidden { display: none !important; }
::selection { background: rgba(255, 255, 255, .18); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2b2e33; border-radius: 10px; border: 2px solid var(--bg); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-xs { width: 13px; height: 13px; }
.icon-lg { width: 22px; height: 22px; stroke-width: 1.6; }
#root { min-height: 100vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Typographie ── */
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
.t-page { font-size: 22px; }
.t-section { font-size: 15.5px; }
.t-label { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.t-muted { color: var(--muted); }
.t-small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ── Boutons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent; font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background var(--t), border-color var(--t), color var(--t), transform .1s, opacity var(--t); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--violet); border-color: var(--violet); color: #111214; }
.btn-primary:hover { background: #ffffff; border-color: #ffffff; }
.btn-secondary { background: var(--card-2); border-color: var(--border-2); color: var(--text); }
.btn-secondary:hover { background: #2a2d31; border-color: rgba(255, 255, 255, .18); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger { background: var(--red-soft); border-color: rgba(248, 81, 73, .3); color: var(--red); }
.btn-danger:hover { background: rgba(248, 81, 73, .22); }
.btn-success { background: var(--green-soft); border-color: rgba(63, 185, 80, .3); color: var(--green); }
.btn-success:hover { background: rgba(63, 185, 80, .22); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 31px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 11px; }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }
.btn .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; background: var(--card-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { color: var(--green); background: var(--green-soft); border-color: transparent; }
.badge.red { color: var(--red); background: var(--red-soft); border-color: transparent; }
.badge.orange { color: var(--orange); background: var(--orange-soft); border-color: transparent; }
.badge.blue { color: var(--blue); background: var(--blue-soft); border-color: transparent; }
.badge.violet { color: var(--violet-2); background: var(--violet-soft); border-color: transparent; }
.badge.cyan { color: var(--cyan); background: var(--cyan-soft); border-color: transparent; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.status-dot.green { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-dot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.status-dot.orange { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.status-dot.gray { background: var(--faint); }

/* ── Avatars ── */
.avatar { width: 28px; height: 28px; border-radius: 8px; background: var(--card-2); object-fit: cover; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--text-2); flex-shrink: 0; }
.avatar.lg { width: 40px; height: 40px; border-radius: 11px; font-size: 14px; }
.avatar.round { border-radius: 50%; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-cell b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.user-cell small { display: block; color: var(--muted); font-size: 12px; font-family: 'JetBrains Mono', monospace; }

/* ═══════════════ Connexion ═══════════════ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { position: relative; overflow: hidden; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border); background: var(--bg-elev); }
.auth-hero::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: #3a3d43; filter: blur(160px); opacity: .18; top: -200px; right: -120px; pointer-events: none; }
.auth-hero h1 { font-size: 42px; line-height: 1.08; letter-spacing: -.03em; margin: 18px 0 14px; max-width: 540px; }
.auth-hero h1 span { color: var(--violet-2); }
.auth-hero p.lead { color: var(--muted); font-size: 16px; max-width: 480px; margin: 0 0 34px; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 580px; position: relative; }
.feature { display: flex; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--border); }
.feature .ficon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-2); flex-shrink: 0; }
.feature:nth-child(2n) .ficon { background: var(--cyan-soft); color: var(--cyan); }
.feature b { display: block; font-size: 13.5px; font-weight: 600; }
.feature span { color: var(--muted); font-size: 12.5px; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; text-align: center; }
.auth-card .logo-mark { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 16px; }
.auth-card h2 { margin: 0 0 6px; font-size: 24px; }
.auth-card p { color: var(--muted); margin: 0 0 26px; }
.auth-card .btn { width: 100%; }
.auth-card .legal { margin-top: 18px; font-size: 12px; color: var(--faint); }
.auth-error { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 13px; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--card-2); color: var(--text); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6); }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-text { font-weight: 700; font-size: 15px; letter-spacing: -.02em; white-space: nowrap; }
.logo-text small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: 0; }

/* ═══════════════ Sélection du serveur ═══════════════ */
.topnav { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.page { max-width: 1180px; margin: 0 auto; padding: 40px 28px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 6px 0 4px; }
.page-head p { margin: 0; color: var(--muted); }
.search { position: relative; width: 280px; max-width: 100%; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input[type=text], .search input[type=search] { padding-left: 36px; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.server-card { border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); overflow: hidden; transition: border-color var(--t), transform .2s var(--ease); animation: rise .3s var(--ease) both; }
.server-card:hover { border-color: var(--violet-line); transform: translateY(-2px); }
.server-banner { height: 76px; background: linear-gradient(135deg, #25272b, #17181b); background-size: cover; background-position: center; position: relative; }
.server-banner::after { content: ''; position: absolute; inset: 0; backdrop-filter: blur(22px) saturate(1.3); background: linear-gradient(180deg, rgba(28, 30, 33, .25), rgba(28, 30, 33, .95)); }
.server-body { padding: 0 16px 16px; position: relative; margin-top: -28px; z-index: 1; }
.server-icon { width: 56px; height: 56px; border-radius: 15px; border: 4px solid var(--card); background: var(--card-2); display: grid; place-items: center; font-weight: 600; font-size: 17px; color: var(--text-2); object-fit: cover; flex-shrink: 0; }
.server-name { font-weight: 600; font-size: 15px; margin: 8px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.server-sub { color: var(--muted); font-size: 12.5px; }

/* ═══════════════ Coque de l'application ═══════════════ */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; transition: grid-template-columns .25s var(--ease); }
.shell.collapsed { grid-template-columns: var(--sidebar-min) 1fr; }

.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg-elev); border-right: 1px solid var(--border); overflow: hidden; }
.sb-head { height: var(--header); display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--border); }
.sb-head .logo { flex: 1; }
.sb-collapse { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.sb-collapse:hover { background: var(--hover); color: var(--text); }
.server-switch { margin: 12px 12px 4px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; background: var(--card); border: 1px solid var(--border); cursor: pointer; text-align: left; transition: border-color var(--t), background var(--t); overflow: hidden; }
.server-switch:hover { border-color: var(--border-2); background: var(--card-2); }
.server-switch .server-icon { width: 34px; height: 34px; border-radius: 9px; border: 0; font-size: 12px; }
.server-switch .nm { flex: 1; min-width: 0; }
.server-switch .nm b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-switch .nm span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.server-switch > .icon { color: var(--muted); }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 12px; }
.nav-group { margin-top: 16px; }
.nav-group .t-label { display: block; padding: 0 10px 8px; white-space: nowrap; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; height: 36px; padding: 0 10px; margin-bottom: 1px; border-radius: 9px; border: 0; background: none; color: var(--text-2); cursor: pointer; text-align: left; font-size: 13.5px; font-weight: 450; transition: background var(--t), color var(--t); white-space: nowrap; overflow: hidden; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--violet-soft); color: #fff; }
.nav-item.active .icon { color: var(--violet-2); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--violet); }
.nav-item .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: #3a3d43; flex-shrink: 0; }
.nav-dot.on { background: var(--green); }
.nav-dot.alert { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.nav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--card-2); color: var(--text-2); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.nav-count.alert { background: var(--red-soft); color: var(--red); }
.sb-foot { padding: 10px 12px 12px; border-top: 1px solid var(--border); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; cursor: pointer; border: 1px solid transparent; background: none; width: 100%; text-align: left; overflow: hidden; }
.sb-user:hover { background: var(--hover); }
.sb-user .nm { flex: 1; min-width: 0; }
.sb-user .nm b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .nm span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* Sidebar réduite */
.collapsed .sidebar .logo-text, .collapsed .sidebar .nm, .collapsed .sidebar .t-label, .collapsed .nav-item .grow, .collapsed .nav-count, .collapsed .server-switch > .icon, .collapsed .sb-user > .icon { display: none; }
.collapsed .sb-head { justify-content: center; padding: 0; }
.collapsed .sb-head .logo { flex: 0; }
.collapsed .sb-collapse { position: absolute; right: -1px; top: 72px; width: 22px; height: 22px; border-radius: 6px 0 0 6px; background: var(--card); border: 1px solid var(--border); border-right: 0; }
.collapsed .server-switch { justify-content: center; padding: 8px; }
.collapsed .nav { padding: 6px 10px; }
.collapsed .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.collapsed .nav-group:first-child { border-top: 0; margin-top: 8px; padding-top: 0; }
.collapsed .nav-item { justify-content: center; padding: 0; }
.collapsed .nav-dot { position: absolute; right: 8px; top: 8px; }
.collapsed .sb-user { justify-content: center; padding: 8px; }
.collapsed .sb-collapse .icon { transform: rotate(180deg); }

/* En-tête */
.main { min-width: 0; display: flex; flex-direction: column; }
.main-head { position: sticky; top: 0; z-index: 20; height: var(--header); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(17, 18, 20, .85); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.icon-btn.menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs .grp { color: var(--muted); font-size: 13px; }
.crumbs .sep { color: var(--faint); }
.crumbs h1 { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-head .spacer { flex: 1; }
.health { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); font-size: 12.5px; }
.health .status-dot { width: 7px; height: 7px; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); display: grid; place-items: center; color: var(--text-2); cursor: pointer; transition: background var(--t), border-color var(--t); position: relative; }
.icon-btn:hover { background: var(--card-2); border-color: var(--border-2); color: var(--text); }
.icon-btn .pip { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px 0 4px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); cursor: pointer; }
.account-btn:hover { border-color: var(--border-2); background: var(--card-2); }
.account-btn b { font-size: 13px; font-weight: 500; }
.account-btn > .icon { color: var(--muted); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; border-radius: 12px; background: var(--card); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); z-index: 30; animation: pop .15s var(--ease); }
.menu-pop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-pop .who b { display: block; font-size: 13.5px; }
.menu-pop .who span { font-size: 12px; color: var(--muted); }
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; color: var(--text-2); font-size: 13px; text-align: left; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--hover); color: var(--text); }
.menu-pop .danger { color: var(--red); }
.menu-pop hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 8px; }
.notif:hover { background: var(--hover); }
.notif .nt { flex: 1; min-width: 0; font-size: 13px; }
.notif .nt small { display: block; color: var(--muted); font-size: 11.5px; }

/* Contenu */
.content { padding: 26px 28px 140px; animation: fade .25s var(--ease); }
.content-inner { max-width: 1240px; margin: 0 auto; }
.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-intro h1 { font-size: 24px; letter-spacing: -.02em; }
.page-intro p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 640px; }
.page-intro .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.subtabs { display: flex; gap: 2px; padding: 3px; margin-bottom: 20px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); width: max-content; max-width: 100%; overflow-x: auto; }
.subtabs button { height: 32px; padding: 0 14px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background var(--t), color var(--t); }
.subtabs button:hover { color: var(--text); }
.subtabs button.active { background: var(--card-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset; }

/* ── Cartes ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 16px; overflow: hidden; animation: rise .25s var(--ease) both; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head .cicon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-2); flex-shrink: 0; }
.card-head .grow { flex: 1; min-width: 0; }
.card-head h2 { font-size: 15px; }
.card-head p { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }
.card-sub { padding: 14px 20px 4px; border-top: 1px solid var(--border); }
.card-sub h3 { font-size: 13.5px; font-weight: 600; }
.card-sub p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.card-body { padding: 0 20px 6px; }
.card-body.pad { padding: 18px 20px; }
.card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, .012); }
.card-foot .left { margin-right: auto; color: var(--muted); font-size: 12.5px; }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }
.setting.block { display: block; }
.setting-text { min-width: 0; flex: 1; }
.setting-label { font-weight: 500; font-size: 14px; }
.setting-desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.setting-control { flex-shrink: 0; width: 320px; max-width: 46%; }
.setting-control.auto { width: auto; }
.setting.block .setting-control { width: 100%; max-width: none; margin-top: 10px; }

/* ── Champs ── */
input[type=text], input[type=number], input[type=search], input[type=password], textarea, select { width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--input); color: var(--text); border: 1px solid var(--border-2); font: inherit; font-size: 13.5px; transition: border-color var(--t), box-shadow var(--t); }
textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: rgba(255, 255, 255, .2); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b90a7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select option { background: var(--card); color: var(--text); }
.number-wrap { position: relative; }
.number-wrap .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12.5px; pointer-events: none; }
.number-wrap input { padding-right: 54px; }
.counter { text-align: right; font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.field-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-2); margin: 12px 0 6px; }
.field-error { color: var(--red); font-size: 12.5px; margin-top: 5px; }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .track { position: absolute; inset: 0; border-radius: 22px; background: #2e3135; border: 1px solid var(--border-2); cursor: pointer; transition: background var(--t), border-color var(--t); }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #a1a1aa; transition: transform .2s var(--ease), background var(--t); }
.switch input:checked + .track { background: var(--violet); border-color: var(--violet); }
.switch input:checked + .track::after { transform: translateX(18px); background: #111214; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--violet-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 38px; padding: 4px; border-radius: 9px; background: var(--input); border: 1px solid var(--border-2); }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 4px 0 9px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--border); font-size: 12.5px; animation: pop .15s var(--ease); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #99aab5; }
.chip button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.chip button:hover { background: var(--red-soft); color: var(--red); }
.chip-add select { height: 28px; width: auto; min-width: 128px; padding: 0 26px 0 9px; font-size: 12.5px; border-style: dashed; background-color: transparent; background-position: right 7px center; }
.chips .empty-hint { color: var(--faint); font-size: 12.5px; padding: 0 6px; }

/* ── Grilles et statistiques ── */
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .card { margin-bottom: 0; }
.mb { margin-bottom: 16px; }
.stat { padding: 16px 18px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); min-width: 0; animation: rise .25s var(--ease) both; display: flex; flex-direction: column; gap: 10px; }
.stat .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .l { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .sicon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-2); }
.stat .sicon.cyan { background: var(--cyan-soft); color: var(--cyan); }
.stat .sicon.red { background: var(--red-soft); color: var(--red); }
.stat .sicon.green { background: var(--green-soft); color: var(--green); }
.stat .sicon.orange { background: var(--orange-soft); color: var(--orange); }
.stat .v { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.stat .s { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat.accent { border-color: var(--violet-line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 60%), var(--card); }

.chart { padding: 18px 20px 14px; }
.chart svg { width: 100%; height: 150px; display: block; overflow: visible; }
.chart .bar { fill: var(--violet); opacity: .85; transition: opacity var(--t); }
.chart .bar.cyan { fill: var(--cyan); }
.chart .bar.red { fill: var(--red); }
.chart .bar:hover { opacity: 1; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 10px; font-family: inherit; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--violet); margin-right: 6px; vertical-align: -1px; }
.chart-legend i.cyan { background: var(--cyan); }
.chart-legend i.red { background: var(--red); }
.chart-tip { position: fixed; z-index: 70; padding: 6px 9px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--border-2); font-size: 12px; pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 4px 20px 10px; }
.timeline li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.timeline li:last-child { border-bottom: 0; }
.timeline li:hover .tl-title { color: var(--violet-2); }
.tl-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); color: var(--text-2); flex-shrink: 0; }
.tl-icon.red { background: var(--red-soft); color: var(--red); }
.tl-icon.orange { background: var(--orange-soft); color: var(--orange); }
.tl-icon.blue { background: var(--blue-soft); color: var(--blue); }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 13.5px; font-weight: 500; transition: color var(--t); }
.tl-detail { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-when { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* Liste de vérifications */
.checks { list-style: none; margin: 0; padding: 4px 20px 10px; }
.checks li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.checks li:last-child { border-bottom: 0; }
.checks .ci { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; }
.checks .ci.ok { background: var(--green-soft); color: var(--green); }
.checks .ci.ko { background: var(--red-soft); color: var(--red); }
.status-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
.status-row .label { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; flex: 1; min-width: 180px; }
.status-row .meta { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.quick { list-style: none; margin: 0; padding: 0 20px 6px; }
.quick li { border-bottom: 1px solid var(--border); }
.quick li:last-child { border-bottom: 0; }
.quick button { display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 13.5px; color: var(--text); text-align: left; }
.quick button .grow { flex: 1; }
.quick button > .icon:first-child { color: var(--muted); }
.quick button > .icon:last-child { color: var(--faint); transition: transform var(--t), color var(--t); }
.quick button:hover > .icon:last-child { transform: translateX(3px); color: var(--violet-2); }

/* ── Tableaux ── */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.toolbar .search { width: 260px; }
.toolbar select { width: auto; min-width: 150px; }
.toolbar .spacer { flex: 1; }
.toolbar .count { color: var(--muted); font-size: 12.5px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 10px 16px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr { transition: background var(--t); }
.tbl tbody tr:hover { background: var(--hover); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .dim { color: var(--muted); }
.tbl .ell { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }
.pager .pg { display: flex; align-items: center; gap: 6px; }

/* ── Panneau latéral (drawer) ── */
.drawer-back { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); animation: fade .2s var(--ease); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(560px, 100vw); background: var(--surface); border-left: 1px solid var(--border-2); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slideLeft .25s var(--ease); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 16px; flex: 1; min-width: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.drawer-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.block-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 22px 0 10px; }
.answer { padding: 10px 12px; border-radius: 9px; background: var(--card); border: 1px solid var(--border); margin-bottom: 8px; }
.answer .q { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.answer .a { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.history { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); margin-left: 6px; }
.history li { position: relative; padding: 0 0 14px 16px; font-size: 13px; }
.history li::before { content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--card-2); border: 2px solid var(--violet); }
.history li .hw { color: var(--muted); font-size: 12px; }

/* ── Modal ── */
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .15s var(--ease); }
.modal { width: min(460px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--card); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); }
.modal-head { padding: 18px 20px 6px; display: flex; gap: 12px; align-items: flex-start; }
.modal-head .micon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); flex-shrink: 0; }
.modal-head .micon.red { background: var(--red-soft); color: var(--red); }
.modal-head .micon.violet { background: var(--violet-soft); color: var(--violet-2); }
.modal-head h2 { font-size: 16px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.modal-body { padding: 10px 20px 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }

/* ── Questions whitelist (éditeur) ── */
.q-list { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px; }
.q-item { border-radius: 11px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.q-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.q-head:hover { background: var(--hover); }
.q-num { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-2); font-weight: 600; font-size: 12px; flex-shrink: 0; }
.q-title { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-body { padding: 2px 14px 16px; border-top: 1px solid var(--border); }
.q-body .grid2 { display: grid; grid-template-columns: 1fr 200px; gap: 12px; }
.choice { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.radio { position: relative; width: 20px; height: 20px; flex-shrink: 0; }
.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.radio span { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--border-2); transition: border-color var(--t); }
.radio input:checked + span { border-color: var(--green); background: radial-gradient(circle, var(--green) 0 4px, transparent 5px); }
.chev { transition: transform .2s; color: var(--muted); }
.q-item.open .chev { transform: rotate(180deg); }

/* ── Permissions ── */
.perm-row { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.perm-row:last-child { border-bottom: 0; }
.perm-row code { font-size: 12.5px; color: var(--violet-2); background: var(--violet-soft); padding: 3px 7px; border-radius: 6px; }
.perm-row .lvl { margin-top: 7px; }

/* ── Barre d'enregistrement ── */
.savebar { position: fixed; bottom: 22px; left: calc(50% + var(--sidebar) / 2); transform: translate(-50%, 0); z-index: 40; width: min(680px, calc(100vw - var(--sidebar) - 48px)); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 13px; background: var(--card); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); animation: slideUp .25s var(--ease); }
.collapsed ~ .savebar, .shell.collapsed .savebar { left: calc(50% + var(--sidebar-min) / 2); }
.savebar .msg { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.savebar .msg .icon { color: var(--orange); }
.savebar.shake { animation: shake .4s; }

/* ── Notifications ── */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: flex-start; gap: 10px; width: 340px; max-width: calc(100vw - 40px); padding: 12px 14px; border-radius: 11px; background: var(--card); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); animation: slideIn .22s var(--ease); font-size: 13px; }
.toast .ti { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; background: var(--blue-soft); color: var(--blue); }
.toast.success .ti { background: var(--green-soft); color: var(--green); }
.toast.error .ti { background: var(--red-soft); color: var(--red); }
.toast.warn .ti { background: var(--orange-soft); color: var(--orange); }
.toast .tt { padding-top: 2px; color: var(--text-2); }
.toast.out { animation: slideOut .2s var(--ease) forwards; }

/* ── États ── */
.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r-lg); border: 1px solid var(--border); }
.sk-row { height: 14px; border-radius: 6px; margin: 10px 0; }
.sk-card { height: 112px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sk-grid .skeleton { height: 180px; }
.spinner { width: 28px; height: 28px; margin: 28vh auto; border-radius: 50%; border: 2px solid var(--card-2); border-top-color: var(--violet); animation: spin .7s linear infinite; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .eicon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 13px; display: grid; place-items: center; background: var(--card-2); color: var(--text-2); }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 15px; }
.empty p { margin: 0 auto 14px; max-width: 420px; font-size: 13.5px; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px; font-size: 13.5px; }
.callout .icon { color: var(--blue); margin-top: 1px; }
.callout.warn .icon { color: var(--orange); }
.callout.warn { border-color: rgba(210, 153, 34, .3); }
.callout b { display: block; margin-bottom: 2px; }
.callout span { color: var(--muted); }
.footer { margin-top: 32px; color: var(--faint); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.overlay { display: none; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row > select { flex: 1; min-width: 200px; }
.grow { flex: 1; min-width: 0; }
.sev-CRITICAL, .sev-HIGH { color: var(--red); }
.sev-WARN { color: var(--orange); }
.sev-INFO { color: var(--blue); }

@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slideOut { to { opacity: 0; transform: translateY(10px); } }
@keyframes slideLeft { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translate(-50%, 0); } 25% { transform: translate(calc(-50% - 6px), 0); } 75% { transform: translate(calc(-50% + 6px), 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ── Responsive ── */
@media (max-width: 1280px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { border-right: 0; border-bottom: 1px solid var(--border); padding: 36px 24px; }
  .auth-hero h1 { font-size: 32px; }
}
@media (max-width: 900px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: var(--sidebar); transform: translateX(-100%); transition: transform .28s var(--ease); }
  .sidebar.open { transform: none; }
  .collapsed .sidebar .logo-text, .collapsed .sidebar .nm, .collapsed .sidebar .t-label, .collapsed .nav-item .grow, .collapsed .nav-count { display: block; }
  .collapsed .nav-item { justify-content: flex-start; padding: 0 10px; }
  .collapsed .nav-dot { position: static; }
  .sb-collapse { display: none; }
  .overlay.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 45; }
  .icon-btn.menu-btn { display: grid; }
  .main-head { padding: 0 14px; gap: 8px; }
  .health span:not(.status-dot), .account-btn b, .account-btn > .icon { display: none; }
  .health { padding: 0 9px; }
  .content { padding: 18px 14px 140px; }
  .grid.c2 { grid-template-columns: 1fr; }
  .savebar, .shell.collapsed .savebar { left: 50%; width: calc(100vw - 24px); }
  .setting { flex-direction: column; align-items: stretch; gap: 8px; }
  .setting-control, .setting-control.auto { width: 100%; max-width: none; }
  .perm-row { grid-template-columns: 1fr; gap: 10px; }
  .q-body .grid2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
  .toolbar .search { width: 100%; }
  .tbl .hide-m { display: none; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .topnav { padding: 0 16px; }
  .page { padding: 24px 16px 60px; }
  .grid.c4, .grid.c3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 22px; }
  .crumbs .grp, .crumbs .sep { display: none; }
  .page-intro h1 { font-size: 20px; }
  .card-head, .card-body, .timeline, .checks, .quick, .q-list, .status-row { padding-left: 16px; padding-right: 16px; }
  .search { width: 100%; }
  .drawer-body { padding: 16px; }
}

/* ── Compléments ── */
.link { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); }
.link:hover { text-decoration: underline; }
.code-block { white-space: pre-wrap; font-size: 12px; margin: 0; }
.empty.compact { padding: 18px; }
.row.mb { margin-bottom: 14px; }
.status-row .label .meta { margin-top: 2px; }
.notif { width: 100%; border: 0; background: none; cursor: pointer; text-align: left; color: var(--text-2); align-items: center; }
.tbl tbody tr.clickable:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }

/* ── Formulaires de connexion / inscription ── */
.auth-form { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.auth-form .btn { margin-top: 14px; }
.auth-field .field-label { margin-top: 10px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 5px; min-height: 0; }
.auth-field.invalid input { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.auth-field.invalid .field-hint { color: var(--red); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--text); background: var(--hover); }
.strength-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; }
.strength span { height: 4px; border-radius: 4px; background: var(--card-2); transition: background var(--t); }
.strength[data-score="1"] span:nth-child(-n+1) { background: var(--red); }
.strength[data-score="2"] span:nth-child(-n+2) { background: var(--orange); }
.strength[data-score="3"] span:nth-child(-n+3) { background: var(--blue); }
.strength[data-score="4"] span { background: var(--green); }
.strength-label { font-size: 12px; color: var(--muted); min-width: 70px; text-align: right; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-card .auth-error { text-align: left; }
.signup-who { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); margin-bottom: 22px; text-align: left; }
.signup-who b { display: block; font-size: 15px; }
.signup-cancel { margin-top: 12px; }
.modal .auth-field .field-label:first-child { margin-top: 4px; }

/* Remplissage automatique du navigateur : garder le thème sombre. */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px var(--input) inset; caret-color: var(--text); }

/* ═══════════════ Embed Generator ═══════════════ */
.embed-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.embed-side { position: sticky; top: calc(var(--header) + 16px); }
.embed-col > .card { margin-bottom: 16px; }
.embed-editor { padding: 6px 0; }
.ef-section { border-bottom: 1px solid var(--border); }
.ef-section:last-child { border-bottom: 0; }
.ef-section > summary { display: flex; align-items: center; gap: 10px; padding: 13px 20px; cursor: pointer; font-weight: 600; font-size: 13.5px; list-style: none; user-select: none; }
.ef-section > summary::-webkit-details-marker { display: none; }
.ef-section > summary .chev { margin-left: auto; transition: transform var(--t); }
.ef-section:not([open]) > summary .chev { transform: rotate(-90deg); }
.ef-section > summary .icon:first-child { color: var(--violet-2); }
.ef-body { padding: 0 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.ef { display: flex; flex-direction: column; gap: 6px; }
.ef-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.ef-count { color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; }
input[type=url] { width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--input); color: var(--text); border: 1px solid var(--border-2); font: inherit; font-size: 13.5px; transition: border-color var(--t), box-shadow var(--t); }
.ef-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ef-check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ef-toggle-embed { padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ef-list { display: flex; flex-direction: column; gap: 10px; }
.ef-item { padding: 12px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.ef-item-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-row input[type=color] { width: 42px; height: 38px; padding: 3px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--input); cursor: pointer; }
.color-row input[type=text] { width: 110px; font-family: "JetBrains Mono", monospace; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border-2); cursor: pointer; transition: transform var(--t); }
.swatch:hover { transform: scale(1.15); }
.embed-status { display: flex; gap: 6px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.stack .row { width: 100%; }
.row > input { flex: 1; min-width: 180px; }
.tpl-list { display: flex; flex-direction: column; padding-bottom: 8px; }
.tpl { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); }
.tpl b { display: block; font-size: 13.5px; }

/* Aperçu fidèle à Discord */
.dc-preview { padding: 18px 16px; background: #313338; border-radius: 0 0 var(--r-lg) var(--r-lg); color: #dbdee1; font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.375; overflow-wrap: anywhere; }
.dc-message { display: flex; gap: 14px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: #4e5058; color: #fff; display: grid; place-items: center; object-fit: cover; }
.dc-body { min-width: 0; flex: 1; }
.dc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.dc-name { color: #f2f3f5; font-weight: 500; }
.dc-bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; text-transform: uppercase; }
.dc-time { color: #949ba4; font-size: 12px; margin-left: 2px; }
.dc-content { margin-bottom: 4px; }
.dc-empty { color: #949ba4; font-style: italic; font-size: 14px; }
.dc-embed { display: block; max-width: 520px; margin-top: 4px; padding: 8px 16px 16px 12px; background: #2b2d31; border-radius: 4px; border-left: 4px solid #7c5cff; }
.dc-embed-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.dc-embed-main { min-width: 0; }
.dc-author { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 600; color: #f2f3f5; }
.dc-author a { color: inherit; }
.dc-author-icon { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dc-title { margin-top: 8px; font-weight: 600; font-size: 16px; color: #f2f3f5; }
.dc-title a { color: #00a8fc; }
.dc-title a:hover, .dc-link:hover { text-decoration: underline; }
.dc-desc { margin-top: 8px; font-size: 14px; }
.dc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.dc-fields.single { grid-template-columns: 1fr; }
.dc-field-name { font-weight: 600; font-size: 14px; color: #f2f3f5; margin-bottom: 2px; }
.dc-field-value { font-size: 14px; }
.dc-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; margin-top: 8px; }
.dc-image { display: block; max-width: 100%; max-height: 300px; border-radius: 4px; margin-top: 16px; object-fit: contain; }
.dc-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: #b5bac1; }
.dc-footer-icon { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
img.broken { display: none; }
.dc-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dc-button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 3px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 500; }
.dc-button:hover { background: #6d6f78; }
.dc-md strong { font-weight: 700; }
.dc-code { background: #1e1f22; padding: 0 3px; border-radius: 3px; font-family: Consolas, monospace; font-size: 85%; }
.dc-pre { background: #1e1f22; border: 1px solid #1e1f22; padding: 8px; border-radius: 4px; font-family: Consolas, monospace; font-size: 13px; white-space: pre-wrap; margin: 6px 0; }
.dc-link { color: #00a8fc; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; padding: 0 2px; border-radius: 3px; font-weight: 500; }
.dc-quote { border-left: 4px solid #4e5058; padding-left: 10px; margin: 2px 0; }
.dc-h { margin: 8px 0 4px; color: #f2f3f5; line-height: 1.25; }
h3.dc-h { font-size: 20px; }
h4.dc-h { font-size: 17px; }
h5.dc-h { font-size: 15px; }
.dc-li { padding-left: 4px; }

/* Éditeur des catégories de tickets */
.q-item.disabled .q-title { color: var(--muted); }
.cat-emoji { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-2); font-size: 15px; flex-shrink: 0; }
.cat-grid { grid-template-columns: 1fr 160px; }
.tq-row { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); flex-wrap: wrap; }
.tq-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.tq-opt { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.q-body .setting:first-of-type { border-top: 1px solid var(--border); margin-top: 12px; }

@media (max-width: 1100px) {
  .embed-layout { grid-template-columns: 1fr; }
  .embed-side { position: static; }
}
@media (max-width: 560px) {
  .ef-2, .cat-grid { grid-template-columns: 1fr; }
  .dc-fields { grid-template-columns: 1fr; }
  .ef-section > summary, .ef-body, .ef-toggle-embed { padding-left: 16px; padding-right: 16px; }
}

/* Choix du mode des tickets */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0 6px; }
.mode-choice { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; text-align: left; transition: border-color var(--t), background var(--t); }
.mode-choice:hover { border-color: rgba(255, 255, 255, .2); }
.mode-choice.active { border-color: var(--violet); background: var(--violet-soft); }
.mode-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); color: var(--text-2); flex-shrink: 0; }
.mode-choice.active .mode-icon { background: var(--violet); color: #111214; }
.mode-text { flex: 1; min-width: 0; }
.mode-text b { display: block; font-size: 14px; margin-bottom: 2px; }
.mode-text span { color: var(--muted); font-size: 12.5px; }
.mode-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); flex-shrink: 0; margin-top: 2px; }
.mode-choice.active .mode-radio { border-color: var(--violet); background: radial-gradient(circle, var(--violet) 0 4px, transparent 5px); }
.mode-grid + .setting { border-top: 1px solid var(--border); }
@media (max-width: 700px) { .mode-grid { grid-template-columns: 1fr; } }

/* ═══════════════ Mode administrateur ═══════════════ */
.admin-btn { gap: 6px; }
.admin-btn.on { background: #b91c1c; border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px rgba(185, 28, 28, .8); }
.admin-btn.on:hover { filter: brightness(1.08); }
.admin-banner { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 6px 0 14px; border-radius: 999px; background: rgba(127, 29, 29, .92); border: 1px solid rgba(248, 81, 73, .45); color: #fee2e2; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); animation: pop .2s var(--ease); }
.admin-banner button { height: 24px; padding: 0 10px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.admin-banner button:hover { background: rgba(255, 255, 255, .25); }
.admin-label { color: var(--red); }
.owner-badge { margin-left: 8px; vertical-align: 1px; }
@media (max-width: 900px) {
  .admin-banner { top: auto; bottom: 16px; }
  .admin-btn-label { display: none; }
}

/* ═══════════════ Profil du bot ═══════════════ */
.bp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.bp-side { position: sticky; top: 84px; display: grid; gap: 10px; }
.bp-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 14px 0 16px; flex-wrap: wrap; }
.bp-status { margin-right: auto; font-size: 13px; }
.bp-picker { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; justify-content: flex-end; }
.bp-picker .btn { white-space: nowrap; }
@media (max-width: 560px) { .bp-picker { flex-wrap: wrap; justify-content: flex-start; } }
.bp-thumb { background: var(--card-2) center / cover no-repeat; border: 1px solid var(--border); flex-shrink: 0; }
.bp-thumb.round { width: 44px; height: 44px; border-radius: 50%; }
.bp-thumb.wide { width: 96px; height: 38px; border-radius: 8px; }
.bp-thumb.no-img { background-image: linear-gradient(135deg, #3a3d43, #25272b); opacity: .6; }
.bp-card { background: #232428; border-radius: 12px; overflow: hidden; color: #dbdee1; font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; box-shadow: var(--shadow-lg); }
.bp-banner { height: 120px; background: #3a3d43 center / cover no-repeat; }
.bp-banner.no-img { background-image: linear-gradient(135deg, #3a3d43, #25272b); }
.bp-avatar-wrap { margin: -46px 0 0 16px; width: 92px; height: 92px; border-radius: 50%; background: #232428; display: grid; place-items: center; position: relative; }
.bp-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; background: #313338; }
.bp-info { margin: 10px 12px 14px; padding: 12px; background: #111214; border-radius: 8px; }
.bp-name-row { display: flex; align-items: center; gap: 6px; }
.bp-name { font-size: 20px; font-weight: 700; color: #f2f3f5; overflow-wrap: anywhere; }
.bp-user { font-size: 13.5px; color: #b5bac1; margin-top: 2px; }
.bp-sep { height: 1px; background: #2e2f34; margin: 12px 0; }
.bp-label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #f2f3f5; margin-bottom: 6px; }
.bp-bio { font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.bp-bio.dim { color: #949ba4; font-style: italic; }
@media (max-width: 1100px) {
  .bp-grid { grid-template-columns: minmax(0, 1fr); }
  .bp-side { position: static; order: -1; max-width: 400px; }
}

/* ═══════════════ Abonnements ═══════════════ */
.plan-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; border: 1px solid var(--border-2); color: var(--text-2); background: var(--card-2); }
.plan-standard { color: var(--cyan); background: var(--cyan-soft); border-color: transparent; }
.plan-premium { color: var(--violet-2); background: var(--violet-soft); border-color: transparent; }
.plan-extra { color: var(--bg); background: var(--text); border-color: transparent; }
.lock-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin: 8px 0; border-radius: var(--r-sm); border: 1px dashed var(--border-2); color: var(--muted); font-size: 13px; }
.lock-note .icon { color: var(--faint); flex-shrink: 0; }
.lock-note .link { margin-left: auto; font-weight: 600; }
.plan-note:empty { display: none; }
.plan-note .lock-note, .plan-note .callout { margin: 0; }
.mode-choice.locked { opacity: .65; cursor: not-allowed; }
.mode-choice.locked .plan-badge { margin-left: auto; flex-shrink: 0; }
/* Offres — style FiveRP BOT : cartes sombres, police Chakra Petch, dégradé du logo (violet → cyan) pour l'offre recommandée. */
.fp-pricing { --fp-a: #8b5cf6; --fp-b: #06b6d4; --fp-card: #17181b; --fp-card-2: #1e2024; --fp-line: rgba(255, 255, 255, .08); --fp-text: #f3f4f6; --fp-text-2: #d4d4d8; --fp-muted: #a1a1aa; --fp-faint: #5f6068;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; padding-top: 12px; }
.fp-plan { position: relative; display: flex; flex-direction: column; gap: 20px; padding: 26px 22px 22px; border-radius: 20px; background: var(--fp-card); border: 1px solid var(--fp-line); color: var(--fp-text); }
.fp-plan.featured { border-color: transparent; background: linear-gradient(var(--fp-card), var(--fp-card)) padding-box, linear-gradient(140deg, var(--fp-a), var(--fp-b)) border-box; box-shadow: 0 26px 60px -34px rgba(139, 92, 246, .55); }
.fp-ribbon { position: absolute; top: -12px; right: 20px; padding: 4px 11px; border-radius: 999px; background: linear-gradient(90deg, var(--fp-a), var(--fp-b)); color: #fff; font: 600 11px/1.4 'Chakra Petch', system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.fp-tier { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.fp-tier i { width: 5px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.fp-tier i:nth-child(1) { height: 6px; }
.fp-tier i:nth-child(2) { height: 10px; }
.fp-tier i:nth-child(3) { height: 14px; }
.fp-tier i:nth-child(4) { height: 18px; }
.fp-tier i.on { background: var(--fp-text-2); }
.fp-plan.featured .fp-tier i.on { background: linear-gradient(180deg, var(--fp-b), var(--fp-a)); }
.fp-name { margin: 14px 0 0; font-family: 'Chakra Petch', system-ui, sans-serif; font-size: 22px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.fp-desc { margin: 6px 0 0; color: var(--fp-muted); font-size: 14px; line-height: 1.55; }
.fp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 4px; margin: 0; font-family: 'Chakra Petch', system-ui, sans-serif; }
.fp-amount { font-size: 42px; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.fp-cur { font-size: 24px; font-weight: 600; }
.fp-per { margin-left: 6px; color: var(--fp-muted); font-family: Inter, system-ui, sans-serif; font-size: 13.5px; }
.fp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--fp-line); border-radius: 14px; background: var(--fp-card-2); }
.fp-stats div { min-width: 0; padding: 10px 2px; text-align: center; }
.fp-stats div + div { border-left: 1px solid var(--fp-line); }
.fp-stats dt { color: var(--fp-muted); font-size: 9.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.fp-stats dd { margin: 3px 0 0; font-family: 'Chakra Petch', system-ui, sans-serif; font-size: 19px; font-weight: 600; }
.fp-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; align-content: start; }
.fp-feats li { display: flex; align-items: flex-start; gap: 10px; color: var(--fp-text-2); font-size: 14px; line-height: 20px; }
.fp-ic { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--fp-b); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fp-ic circle { stroke: rgba(6, 182, 212, .35); }
.fp-feats li.off { color: var(--fp-faint); }
.fp-feats li.off .fp-ic { stroke: var(--fp-faint); }
.fp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fp-cta { display: flex; align-items: center; justify-content: center; width: 100%; height: 44px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; background: transparent; color: var(--fp-text); font: 600 14px/1 'Chakra Petch', system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .15s, border-color .15s, filter .15s; }
.fp-cta:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .24); }
.fp-plan.featured .fp-cta { border: 0; background: linear-gradient(90deg, var(--fp-a), var(--fp-b)); color: #fff; }
.fp-plan.featured .fp-cta:hover { filter: brightness(1.08); }
.fp-pricing p, .fp-pricing h3 { margin-left: 0; margin-right: 0; }
.fp-current { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(6, 182, 212, .14); color: #67e8f9; font: 600 10.5px/1.6 Inter, system-ui, sans-serif; letter-spacing: .04em; text-transform: none; vertical-align: 3px; }
.fp-cta:disabled { cursor: default; color: var(--fp-muted); border-color: var(--fp-line); background: transparent; filter: none; }
.fp-plan.featured .fp-cta:disabled { background: var(--fp-card-2); color: var(--fp-muted); }
@media (max-width: 1180px) { .fp-pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .fp-pricing { grid-template-columns: minmax(0, 1fr); } }
.link-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.link-row:last-of-type { border-bottom: 0; }
.link-row .grow { min-width: 0; }
.link-row b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row small { color: var(--muted); font-size: 12px; }
.link-add { display: flex; gap: 8px; margin-top: 12px; }
.link-add select { flex: 1; min-width: 0; }
.sub-edit { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 6px; min-width: 300px; }
.sub-edit input[type="text"] { grid-column: 1 / -1; }
.ap-preview { background: #2b2d31; color: #dbdee1; margin-top: 12px; max-width: none; font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.ap-preview .dc-title { margin-top: 0; }
input[type="color"] { width: 44px; height: 34px; padding: 2px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--input); cursor: pointer; }
.row > input[type="color"] { flex: 0 0 44px; min-width: 44px; }
@media (max-width: 700px) {
  .sub-edit { grid-template-columns: 1fr; min-width: 200px; }
  .link-row { flex-wrap: wrap; }
}

/* ═══════════════ Création de serveur ═══════════════ */
.sb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.sb-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.sb-thumb { position: relative; width: 140px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-2); background: var(--card-2); }
.sb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sb-thumb .btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .55); }
.sb-add-img { width: 140px; height: 96px; border-radius: 10px; border: 1px dashed var(--border-2); background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 12.5px; cursor: pointer; }
.sb-add-img:hover { border-color: var(--violet); color: var(--text); }
.sb-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sb-row + .sb-row { margin-top: 8px; }
.sb-row input[type="text"] { width: auto; flex: 1 1 180px; min-width: 140px; }
.sb-row select { width: auto; flex: 0 0 auto; }
.sb-row input[type="color"] { flex: 0 0 44px; min-width: 44px; }
.sb-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.sb-check input { accent-color: var(--violet); width: 15px; height: 15px; }
.sb-cat-name { font-weight: 600; }
.sb-channels { display: grid; gap: 8px; margin: 12px 0 8px; padding-left: 14px; border-left: 2px solid var(--border-2); }
.sb-channel { padding: 8px; border-radius: 10px; background: var(--card-2); }
.sb-access { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sb-inherit { margin-top: 6px; }
.sb-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-pill { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.sb-pill.on { background: var(--violet-soft); border-color: transparent; color: var(--violet-2); font-weight: 600; }
.sb-progress { margin-top: 16px; display: grid; gap: 10px; }
.sb-bar { height: 10px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.sb-bar-fill { display: block; height: 100%; width: 0; background: var(--violet); transition: width .4s var(--ease); }
@media (max-width: 700px) {
  .sb-row input[type="text"] { flex-basis: 100%; }
  .sb-channels { padding-left: 8px; }
}
.legal-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.legal-link:hover { color: var(--text); }
/* Logs FiveM */
.key-box { padding: 12px 14px; border-radius: var(--r); background: var(--input); border: 1px solid var(--border-2); font-size: 14px; word-break: break-all; user-select: all; margin-top: 12px; }
.steps-list { margin: 8px 0 4px; padding-left: 20px; color: var(--text-2); font-size: 13.5px; display: grid; gap: 6px; }
.steps-list code { font-size: 12.5px; padding: 1px 6px; border-radius: 5px; background: var(--card-2); }
.log-json { margin: 0; padding: 12px; border-radius: var(--r-sm); background: var(--input); border: 1px solid var(--border); font: 12.5px/1.5 'JetBrains Mono', ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.fl-actions { padding: 12px 0 16px; }
.fl-gap { margin: 12px 0; }
