/* YourBot — identité YourHeberg (bleu du logo, marine, DM Sans), version application :
   barre latérale, cartes en relief, animations douces. Mode sombre via [data-theme="dark"]. */

@font-face { font-family: "DM Sans"; font-weight: 400 700; font-display: swap; src: url(fonts/DMSans-latin-1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "DM Sans"; font-weight: 400 700; font-display: swap; src: url(fonts/DMSans-latin-ext-0.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 500; font-display: swap; src: url(fonts/JetBrainsMono-latin-3.woff2) format("woff2"); }

:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --surface-3: #eaf0f7;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0e1a2b;
  --text-2: #475569;
  --text-3: #64748b;
  --accent: #1f6feb;
  --accent-hover: #1759c4;
  --accent-soft: #eaf2ff;
  --accent-line: #b8d2ff;
  --navy: #0b1d3a;
  --navy-2: #13294f;
  --success: #12a150;
  --success-soft: #e7f6ee;
  --danger: #d92d20;
  --danger-soft: #fdeeed;
  --warning: #b54708;
  --warning-soft: #fff6e6;
  --discord: #5865f2;
  --discord-bg: #ffffff;
  --discord-embed: #f2f3f5;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px -8px rgba(15, 23, 42, .12);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .05), 0 24px 48px -16px rgba(15, 23, 42, .22);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --side-w: 264px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1b1b1b;
  --surface-3: #242424;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --text: #ededed;
  --text-2: #b8b8b8;
  --text-3: #8c8c8c;
  --accent: #f2f2f2;
  --accent-hover: #ffffff;
  --accent-soft: #262626;
  --accent-line: #454545;
  --navy: #000000;
  --navy-2: #111111;
  --success: #3cc47c;
  --success-soft: #0e2a1e;
  --danger: #ff6b5e;
  --danger-soft: #331719;
  --warning: #f2a54a;
  --warning-soft: #2d2113;
  --discord-bg: #313338;
  --discord-embed: #2b2d31;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 48px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .85em; }
code { padding: 1px 6px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--border); }
::selection { background: #cfe0ff; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: .85rem; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 22px; height: 22px; }

/* Application : barre latérale + contenu ----------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.05rem; padding: 4px 8px 14px; }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 10px; background: #fff; padding: 3px; box-shadow: 0 0 0 1px var(--border); }
.brand small { font-weight: 500; color: var(--text-3); font-size: .74rem; display: block; line-height: 1.1; margin-top: 2px; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav a.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .92rem; position: relative; transition: background .2s var(--ease), color .2s; }
.snav a.nav:hover { background: var(--surface-2); color: var(--text); }
.snav a.nav.active { background: var(--accent-soft); color: var(--accent); }
.snav a.nav.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.snav-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 10px 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.snav-title button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: all .2s var(--ease); }
.snav-title button:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }
.snav-title button .icon { width: 14px; height: 14px; }
.side-bot { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: .9rem; transition: background .2s var(--ease); }
.side-bot:hover { background: var(--surface-2); color: var(--text); }
.side-bot.active { background: var(--accent-soft); color: var(--accent); }
.side-bot .avatar { width: 28px; height: 28px; font-size: .8rem; }
.side-bot span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.side-empty { padding: 6px 10px; color: var(--text-3); font-size: .85rem; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; border: 0; background: none; cursor: pointer; text-align: left; transition: background .2s; }
.me:hover { background: var(--surface-2); }
.me .avatar { width: 32px; height: 32px; font-size: .85rem; }
.me b { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { display: block; color: var(--text-3); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me > div { min-width: 0; }
.icon-btn { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; transition: all .2s var(--ease); }
.icon-btn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.mobilebar { display: none; }
.scrim { display: none; }
.main { min-width: 0; }
.page { max-width: 1160px; margin: 0 auto; padding: 32px 36px 72px; }

/* Apparition des vues */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.page.enter > * { animation: rise .5s var(--ease) both; }
.page.enter > *:nth-child(2) { animation-delay: .05s; }
.page.enter > *:nth-child(3) { animation-delay: .1s; }
.page.enter > *:nth-child(4) { animation-delay: .15s; }
.page.enter > *:nth-child(5) { animation-delay: .2s; }
.page.enter > *:nth-child(n+6) { animation-delay: .25s; }
.stagger > * { animation: rise .45s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(n+6) { animation-delay: .2s; }
.fade-in { animation: fade .3s var(--ease) both; }

/* En-têtes ---------------------------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--text-3); font-size: .85rem; margin-bottom: 16px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--border-strong); }
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .grow { flex: 1; min-width: 0; }
.page-head p { color: var(--text-2); margin-top: 4px; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

.hello { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.hello h1 { font-size: 2rem; }
.hello .grow { flex: 1; min-width: 0; }
.hello p { color: var(--text-2); margin-top: 4px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 10px 16px; min-width: 120px; box-shadow: var(--shadow-xs); }
.stat b { display: block; font-size: 1.35rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: .78rem; color: var(--text-3); font-weight: 600; }

.section-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; }
.section-title h2 { font-size: 1.05rem; }
.section-title .grow { flex: 1; }

/* Cartes ------------------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card + .card, .stack > * + * { margin-top: 18px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head .grow { flex: 1; min-width: 0; }
.card-head p { color: var(--text-2); font-size: .88rem; margin-top: 3px; }
.card-head .head-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.card-body { padding: 22px; }
.card-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.lift { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }

.grid { display: grid; gap: 18px; align-items: start; }
.grid > .card, .split > .card, .create > *, .grid > * { margin-top: 0; }
.grid-bots { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.sticky { position: sticky; top: 24px; }

/* Carte d'un bot */
.bot-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; color: var(--text); overflow: hidden; position: relative; }
.bot-card:hover { color: var(--text); }
.bot-card .top { display: flex; gap: 14px; align-items: center; }
.bot-card .name { font-size: 1.05rem; }
.bot-card .meta { color: var(--text-3); font-size: .82rem; }
.bot-card .foot { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--border); color: var(--text-2); font-size: .85rem; }
.bot-card .foot .go { margin-left: auto; color: var(--accent); display: flex; align-items: center; gap: 4px; font-weight: 600; transition: gap .2s var(--ease); }
.bot-card:hover .foot .go { gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.yh { background: var(--accent-soft); color: var(--accent); }

/* Choix de création */
.create { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.option { position: relative; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-lg); padding: 22px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-xs); }
.option .oi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); transition: transform .3s var(--ease); }
.option:hover .oi { transform: scale(1.08) rotate(-4deg); }
.option b { font-size: 1.05rem; }
.option p { color: var(--text-2); font-size: .9rem; }
.option .tag-reco { position: absolute; top: 16px; right: 16px; }
.option.primary { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.option:disabled { cursor: default; opacity: .6; }
.option:disabled:hover { transform: none; box-shadow: var(--shadow-xs); border-color: var(--border); }

/* Bannière d'un bot / serveur */
.hero { overflow: hidden; }
.hero-band { height: 92px; background: var(--navy); position: relative; }
.hero-band::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 16px 16px; }
.hero-band.blue { background: linear-gradient(120deg, var(--navy) 0%, #15407e 100%); }
.hero-body { display: flex; align-items: flex-start; gap: 18px; padding: 14px 24px 20px; flex-wrap: wrap; position: relative; }
.hero-body .avatar { width: 88px; height: 88px; font-size: 1.8rem; border: 4px solid var(--surface); box-shadow: var(--shadow); margin-top: -58px; }
.hero-body .grow { flex: 1; min-width: 200px; }
.hero-body h1 { font-size: 1.55rem; }
.hero-body .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; color: var(--text-3); font-size: .85rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Démarrage */
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--success); transition: width .8s var(--ease); }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--border); }
.todo .tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); color: transparent; flex: none; transition: all .3s var(--ease); }
.todo .tick .icon { width: 14px; height: 14px; stroke-width: 3; }
.todo li.done .tick { background: var(--success); border-color: var(--success); color: #fff; }
.todo li.done .t { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.todo .t { flex: 1; font-weight: 600; font-size: .92rem; }
.todo .t small { display: block; font-weight: 400; color: var(--text-3); text-decoration: none; }

/* Serveurs */
.guild-card { display: flex; align-items: center; gap: 14px; padding: 16px; color: var(--text); }
.guild-card:hover { color: var(--text); }
.guild-card .grow { flex: 1; min-width: 0; }
.guild-card .go { color: var(--text-3); transition: transform .2s var(--ease), color .2s; }
.guild-card:hover .go { transform: translateX(3px); color: var(--accent); }

/* Boutons ----------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 14px -6px rgba(31, 111, 235, .6); transition: background .2s, border-color .2s, color .2s, transform .15s var(--ease), box-shadow .2s; }
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-light:hover { background: var(--surface-2); color: var(--text); border-color: var(--text-3); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 6px 11px; font-size: .82rem; border-radius: 9px; }
.btn-lg { padding: 12px 20px; font-size: .98rem; border-radius: 12px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; font-size: inherit; }
.btn-link:hover { color: var(--accent-hover); }
.btn-discord { background: var(--discord); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 14px -6px rgba(88, 101, 242, .6); }
.btn-discord:hover { background: #4752c4; }
.btn-discord.off { opacity: .5; cursor: not-allowed; }
.btn-discord.off:hover { background: var(--discord); }
.btn .spin { width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* Formulaires ------------------------------------------------------------------------- */
.field { display: block; }
.field + .field, .field + .two, .two + .field, .two + .two, .check + .field, .field + .check, .check + .check { margin-top: 16px; }
.two > *, .row > * { margin-top: 0 !important; }
.row + .field, .row + .two, .row + .check, .field + .row, .two + .row, .check + .row { margin-top: 16px; }
.label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 7px; }
.hint { color: var(--text-3); font-size: .8rem; margin-top: 6px; }
.input, .select, .textarea { width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 13px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-lg { padding: 13px 15px; font-size: 1.05rem; border-radius: 12px; }
.textarea { min-height: 100px; resize: vertical; }
.input.mono { font-size: .85rem; }
.input-color { width: 48px; height: 42px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); cursor: pointer; }
.chan-row { display: flex; gap: 8px; }
.chan-row .select { flex: 1; min-width: 0; }
.chan-row .input { width: 190px; flex: none; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.check b { display: block; font-weight: 600; font-size: .9rem; }
.check span { color: var(--text-3); font-size: .82rem; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 40px; height: 23px; border-radius: 23px; background: var(--border-strong); position: relative; transition: background .25s var(--ease); flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease), width .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch:active i::after { width: 21px; }
.switch input:checked + i { background: var(--success); }
.switch input:checked + i::after { transform: translateX(17px); }
.switch:active input:checked + i::after { transform: translateX(13px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px var(--accent-soft); }

.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-3); border-radius: 12px; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 7px 14px; font-size: .86rem; font-weight: 600; color: var(--text-2); border-radius: 9px; transition: all .2s var(--ease); }
.seg input:checked + span { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-xs); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 11px; font-size: .82rem; cursor: pointer; user-select: none; background: var(--surface); transition: all .2s var(--ease); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); }
.chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* Avatar à choisir */
.picker { display: flex; align-items: center; gap: 16px; }
.picker .avatar { width: 72px; height: 72px; font-size: 1.6rem; }
.drop { flex: 1; border: 1.5px dashed var(--border-strong); border-radius: var(--r); padding: 14px; text-align: center; color: var(--text-2); font-size: .88rem; cursor: pointer; transition: all .2s var(--ease); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Éléments ------------------------------------------------------------------------------ */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.online { background: var(--success-soft); color: var(--success); }
.pill.online::before { box-shadow: 0 0 0 0 currentColor; animation: beat 2.4s var(--ease) infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(18, 161, 80, .45); } 70%, 100% { box-shadow: 0 0 0 6px rgba(18, 161, 80, 0); } }
.pill.error, .pill.invalid { background: var(--danger-soft); color: var(--danger); }
.pill.connecting, .pill.reconnecting { background: var(--warning-soft); color: var(--warning); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .76rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); font-family: var(--mono); }
.tag.slash { background: var(--accent-soft); color: var(--accent); }

.alert { display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--r); background: var(--surface-2); font-size: .88rem; border: 1px solid var(--border); }
.alert + .alert { margin-top: 10px; }
.alert .icon { margin-top: 2px; }
.alert .grow { flex: 1; }
.alert.warn { background: var(--warning-soft); border-color: transparent; }
.alert.warn .icon { color: var(--warning); }
.alert.danger { background: var(--danger-soft); border-color: transparent; }
.alert.danger .icon { color: var(--danger); }
.alert.info { background: var(--accent-soft); border-color: transparent; }
.alert.info .icon { color: var(--accent); }
.alert.ok { background: var(--success-soft); border-color: transparent; }
.alert.ok .icon { color: var(--success); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; overflow: hidden; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 60px; height: 60px; font-size: 1.3rem; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar.sq { border-radius: 30%; }
.ava-wrap { position: relative; flex: none; display: inline-block; }
.ava-wrap .sdot { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--surface); background: var(--text-3); }
.ava-wrap .sdot.online { background: var(--success); }
.ava-wrap .sdot.error, .ava-wrap .sdot.invalid { background: var(--danger); }
.ava-wrap .sdot.connecting, .ava-wrap .sdot.reconnecting { background: var(--warning); }
.side-bot .ava-wrap .sdot { width: 10px; height: 10px; border-width: 2px; right: -1px; bottom: -1px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list li .grow { flex: 1; min-width: 0; }
.name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 36px 22px; text-align: center; color: var(--text-3); }
.empty .ei { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--surface-3); color: var(--text-3); }
.empty b { display: block; color: var(--text); font-size: 1rem; margin-bottom: 4px; }

table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; padding: 11px 22px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table td { padding: 13px 22px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* Serveur : onglets à indicateur glissant ---------------------------------------------- */
.tabbar { position: relative; display: flex; gap: 4px; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-xs); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar .ind { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 10px; background: var(--accent-soft); transition: transform .4s var(--ease), width .4s var(--ease); z-index: 0; }
.tabbar a { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .92rem; white-space: nowrap; transition: color .25s; }
.tabbar a:hover { color: var(--text); }
.tabbar a.active { color: var(--accent); }
.tabbar .dotstate { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: background .3s; }
.tabbar .dotstate.on { background: var(--success); }
#tab.swap { animation: rise .35s var(--ease) both; }

/* Aperçu façon Discord ---------------------------------------------------------------- */
.preview { background: var(--discord-bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; font-size: .92rem; box-shadow: var(--shadow); }
.preview-title { display: flex; align-items: center; gap: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; margin-bottom: 12px; }
.preview-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.dmsg { display: flex; gap: 12px; }
.dmsg .avatar { width: 40px; height: 40px; }
.dmsg .who { font-weight: 600; }
.dmsg .who .botbadge { display: inline-block; background: var(--discord); color: #fff; font-size: .62rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-left: 4px; vertical-align: 2px; }
.dmsg .who time { color: var(--text-3); font-weight: 400; font-size: .75rem; margin-left: 6px; }
.dmsg .content { white-space: pre-wrap; word-wrap: break-word; margin-top: 2px; }
.mention { background: rgba(88, 101, 242, .15); color: var(--discord); border-radius: 3px; padding: 0 2px; font-weight: 500; }
/* Sombre : noir et blanc, sans bleu (bouton principal blanc, texte noir) */
[data-theme="dark"] .btn:not(.btn-light):not(.btn-danger):not(.btn-discord):not(.btn-link) { color: #0a0a0a; box-shadow: none; }
[data-theme="dark"] .btn:not(.btn-light):not(.btn-danger):not(.btn-discord):not(.btn-link) .spin { border-color: rgba(0, 0, 0, .25); border-top-color: #0a0a0a; }
[data-theme="dark"] .hero-band.blue, [data-theme="dark"] .dprofile .band { background: linear-gradient(120deg, #000 0%, #2a2a2a 100%); }
[data-theme="dark"] .embed { border-left-color: #8c8c8c; }
[data-theme="dark"] .float .cmd .ci { background: var(--surface-3); color: var(--text); }
[data-theme="dark"] .toast { background: var(--surface-3); border: 1px solid var(--border-strong); }
[data-theme="dark"] .auth-aside { border-right: 1px solid var(--border); }
[data-theme="dark"] .mention { color: #c9cdfb; background: rgba(88, 101, 242, .3); }
.embed { margin-top: 6px; background: var(--discord-embed); border-left: 4px solid #1f6feb; border-radius: 4px; padding: 10px 14px 12px; max-width: 460px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.embed .et { font-weight: 700; }
.embed .ed { white-space: pre-wrap; word-wrap: break-word; font-size: .88rem; }
.embed .ef { font-size: .74rem; color: var(--text-3); margin-top: 6px; grid-column: 1 / -1; }
.embed .eimg { grid-column: 1 / -1; max-width: 100%; border-radius: 4px; margin-top: 6px; }
.embed .ethumb { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; }
.dbuttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dbtn { padding: 5px 14px; border-radius: 4px; color: #fff; font-size: .85rem; font-weight: 500; background: var(--discord); }
.dbtn.secondary { background: #4e5058; }
.dbtn.success { background: #248046; }
.dbtn.danger { background: #da373c; }

/* Profil Discord (création d'un bot) */
.dprofile { width: 100%; max-width: 340px; margin: 0 auto; background: var(--discord-bg); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.dprofile .band { height: 72px; background: linear-gradient(120deg, var(--navy), #1f6feb); }
.dprofile .body { padding: 0 16px 16px; margin-top: -34px; }
.dprofile .avatar { width: 76px; height: 76px; font-size: 1.7rem; border: 5px solid var(--discord-bg); transition: transform .3s var(--ease); }
.dprofile .avatar.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); } }
.dprofile .pname { font-size: 1.2rem; font-weight: 700; margin-top: 8px; display: flex; align-items: center; gap: 6px; word-break: break-word; }
.dprofile .pname .botbadge { background: var(--discord); color: #fff; font-size: .62rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.dprofile .ptag { color: var(--text-3); font-size: .85rem; }
.dprofile .pbox { margin-top: 12px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: .84rem; color: var(--text-2); }
.dprofile .pbox b { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin-bottom: 3px; }

.vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vars button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 6px; padding: 2px 8px; font-family: var(--mono); font-size: .76rem; cursor: pointer; color: var(--text-2); transition: all .15s; }
.vars button:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }

.type-card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; background: var(--surface-2); animation: rise .35s var(--ease) both; }
.type-card + .type-card { margin-top: 12px; }
.type-card .type-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.type-card .type-head .grow { flex: 1; font-weight: 700; }

.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 38px; margin-bottom: 14px; color: var(--text-2); font-size: .9rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.steps b { color: var(--text); }

/* Succès */
.success-box { text-align: center; padding: 34px 24px 10px; }
.success-box .ok { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--success-soft); color: var(--success); animation: pop .5s var(--ease) both; }
.success-box .ok .icon { width: 30px; height: 30px; stroke-width: 2.5; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-box h2 { font-size: 1.35rem; }
.success-box p { color: var(--text-2); margin-top: 6px; }

/* Fenêtres et messages --------------------------------------------------------------- */
.modal-back { position: fixed; inset: 0; background: rgba(11, 29, 58, .42); backdrop-filter: blur(3px); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .2s ease both; }
.modal { width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45); animation: pop .3s var(--ease) both; }
.modal.wide { max-width: 1000px; }
.modal .card-head { position: sticky; top: 0; background: var(--surface); z-index: 2; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.modal .card-foot { position: sticky; bottom: 0; z-index: 2; border-radius: 0 0 var(--r-xl) var(--r-xl); }
.x { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--text-3); padding: 6px; border-radius: 9px; transition: all .2s; }
.x:hover { background: var(--surface-2); color: var(--text); transform: rotate(90deg); }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .45); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; animation: tin .35s var(--ease) both; }
.toast.out { animation: tout .3s var(--ease) forwards; }
.toast.err { background: var(--danger); }
.toast.ok .icon { color: #6ee7a8; }
@keyframes tin { from { transform: translateX(24px); opacity: 0; } }
@keyframes tout { to { transform: translateX(24px); opacity: 0; } }

/* Chargement : squelettes */
.skel { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-line { height: 14px; margin-top: 10px; }
.skel-title { height: 30px; width: 260px; }
.skel-card { height: 150px; border-radius: var(--r-lg); }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px; }
.loading { padding: 30px 0; text-align: center; color: var(--text-3); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Connexion --------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-aside { background: var(--navy); color: #d6e0f0; padding: 44px 52px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.auth-aside > * { position: relative; }
.auth-aside .brand { color: #fff; padding-left: 0; }
.auth-aside .brand small { color: #9fb2d3; }
.auth-aside h1 { color: #fff; font-size: 2.4rem; line-height: 1.12; margin: 40px 0 14px; max-width: 520px; letter-spacing: -0.03em; }
.auth-aside h1 em { font-style: normal; color: #7fb0ff; }
.auth-aside p.lead { max-width: 480px; color: #b9c7de; font-size: 1.02rem; }
.showcase { position: relative; margin-top: 34px; height: 300px; max-width: 520px; }
.float { position: absolute; background: #fff; color: #0e1a2b; border-radius: 16px; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .55); padding: 14px; font-size: .86rem; animation: floaty 7s ease-in-out infinite alternate; }
.float .dmsg .avatar { width: 34px; height: 34px; }
.float .embed { background: #f2f3f5; }
.float.f1 { left: 0; top: 0; width: 330px; }
.float.f2 { right: 0; top: 112px; width: 300px; animation-delay: -2.5s; }
.float.f3 { left: 30px; top: 210px; width: 250px; animation-delay: -5s; }
.float .cmd { display: flex; align-items: center; gap: 10px; }
.float .cmd .ci { width: 32px; height: 32px; border-radius: 9px; background: #eaf2ff; color: #1f6feb; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; }
.float .cmd b { display: block; font-family: var(--mono); font-size: .88rem; }
.float .cmd span { color: #64748b; font-size: .78rem; }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-10px); } }
.auth-aside .foot { margin-top: auto; padding-top: 28px; font-size: .82rem; color: #8ea1c2; }
.auth-aside .foot a { color: #b8d2ff; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-box { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 34px; box-shadow: var(--shadow-lg); animation: pop .5s var(--ease) both; }
.auth-box h2 { font-size: 1.55rem; margin-bottom: 6px; }
.auth-box .btn-discord { width: 100%; margin-top: 22px; padding: 12px 15px; border-radius: 12px; }
.auth-box .btn-discord .icon { width: 20px; height: 20px; }
.tabs { display: flex; gap: 4px; background: var(--surface-3); border-radius: 12px; padding: 4px; margin: 18px 0 20px; }
.tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--text-2); transition: all .2s var(--ease); }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: .82rem; margin-top: 20px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.form-error { color: var(--danger); font-size: .88rem; margin-top: 12px; min-height: 1.2em; }
#oauth-error:empty { display: none; }
.form-ok { color: var(--success); font-size: .88rem; margin-top: 12px; }

/* Confirmation par e-mail (attente + page /verifier) ------------------------------------- */
.wait-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.wait-ico .icon { width: 24px; height: 24px; }
.wait-ico.ok { background: var(--success-soft); color: var(--success); }
.wait-ico.warn { background: var(--warning-soft); color: var(--warning); }
.wait-state { display: flex; align-items: center; gap: 10px; margin: 20px 0 8px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); font-size: .86rem; color: var(--text-2); }
.wait-state .spinner { width: 16px; height: 16px; border-width: 2px; margin: 0; flex: none; }
.wait-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.auth-single { grid-template-columns: 1fr; }
.auth-single .auth-box .brand { padding: 0; margin-bottom: 26px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 18px 0; font-size: .9rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Packs, slots, verrous ----------------------------------------------------------------- */
.lock-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r); border: 1px dashed var(--accent-line); background: var(--accent-soft); font-size: .88rem; margin-bottom: 16px; }
.lock-note > .icon { color: var(--accent); flex: none; }
.lock-note .grow { flex: 1; min-width: 200px; }
.lock-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .7rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.lock-tag .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.lock-line { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); margin-top: 3px; font-weight: 600; }
.lock-line .icon { width: 13px; height: 13px; }
.row-locked td:first-child .tag { opacity: .55; }
.check.locked, .type-card.locked { opacity: .72; }
.check.locked { cursor: default; }
.switch:has(input:disabled) { cursor: default; opacity: .7; }
.select:disabled { opacity: .7; cursor: default; }
.type-card.locked { border-style: dashed; }
.stat-link { color: inherit; text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
.stat-link:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.slot-meter { display: flex; gap: 6px; flex-wrap: wrap; }
.slot-meter span { flex: 1; min-width: 26px; max-width: 64px; height: 12px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); }
.slot-meter span.on { background: var(--accent); border-color: var(--accent); }
.slot-meter span.over { background: var(--warning-soft); border: 1px dashed var(--warning); }
.price-inline b { font-size: 1.1rem; }
.price-inline { color: var(--text-2); font-size: .9rem; }
.perks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 9px; font-size: .9rem; }
.perks li { display: flex; gap: 9px; align-items: flex-start; }
.perks .icon { width: 16px; height: 16px; color: var(--success); flex: none; margin-top: 2px; stroke-width: 2.4; }
.base-card h3 { font-size: 1.02rem; }
.grid-packs { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); align-items: stretch; }
.pack .perks { align-content: start; }
.switch input:disabled:checked + i { background: var(--border-strong); }
.section-title { flex-wrap: wrap; }
.pack { display: flex; flex-direction: column; padding: 20px; transition: border-color .2s, transform .25s var(--ease), box-shadow .25s var(--ease); }
.pack:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pack-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.pack-top b { font-size: 1.02rem; }
.pack .price { margin-top: 10px; display: flex; align-items: baseline; gap: 5px; }
.pack .price b { font-size: 1.7rem; letter-spacing: -0.03em; }
.pack .price span { color: var(--text-3); font-size: .85rem; }
.pack .perks { flex: 1; margin-bottom: 18px; }
.pack-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pack-foot .btn:only-child { width: 100%; }
.pack-best { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), var(--shadow); }
.pack-on { background: linear-gradient(180deg, var(--success-soft), var(--surface) 45%); }
.seg em.off { font-style: normal; color: var(--success); font-size: .76rem; font-weight: 700; margin-left: 2px; }
.summary { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; background: var(--surface-2); display: grid; gap: 10px; }
.sum-name { font-size: 1.1rem; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; color: var(--text-2); }
.sum-line.off { color: var(--success); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--border); font-weight: 600; }
.sum-total b { font-size: 1.5rem; letter-spacing: -0.02em; }
.hint .icon { width: 13px; height: 13px; vertical-align: -2px; }

/* Administration ------------------------------------------------------------------------ */
.subnav { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 14px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.subnav a:hover { color: var(--text); }
.subnav a.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-xs); }
.subnav .icon { width: 16px; height: 16px; }
.search { position: relative; min-width: 0; }
.search > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 17px; height: 17px; }
.search .input { padding-left: 38px; width: 100%; }
.table-click tbody tr { cursor: pointer; }
.table .go .icon { color: var(--text-3); }
.warn-text { color: var(--warning); }
.break { overflow-wrap: anywhere; }
.select-sm { width: auto; padding: 5px 28px 5px 10px; font-size: .82rem; }
.input-unit { display: flex; align-items: center; gap: 8px; }
.input-unit .input { max-width: 120px; }
.input-unit span { color: var(--text-3); font-size: .86rem; white-space: nowrap; }

/* Mobile ------------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(11, 29, 58, .4); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .mobilebar .brand { padding: 0; font-size: 1rem; }
  .mobilebar .brand img { width: 30px; height: 30px; }
  .split, .split-even, .split-wide { grid-template-columns: minmax(0, 1fr); }
  .split > * { min-width: 0; }
  .sticky { position: static; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { padding: 26px 20px 30px; }
  .auth-aside h1 { margin-top: 22px; font-size: 1.7rem; }
  .showcase, .auth-aside .foot { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 20px 16px 56px; }
  .hello { gap: 14px; }
  .hello h1 { font-size: 1.5rem; }
  .hello .avatar.xl { width: 54px; height: 54px; font-size: 1.2rem; }
  .hello .grow { flex: 1 1 calc(100% - 70px); }
  .hello .stats { width: 100%; }
  .hero-body .avatar { margin-top: -50px; }
  .two { grid-template-columns: 1fr; }
  .card-head, .card-body, .card-pad { padding-left: 16px; padding-right: 16px; }
  .card-foot { padding: 12px 16px; }
  .list li, .table td, .table th, .todo li { padding-left: 16px; padding-right: 16px; }
  .table .hide-sm { display: none; }
  .card-head { flex-wrap: wrap; }
  .card-head > .grow, .card-body.row > .grow, .card-pad.row > .grow { flex-basis: 100%; }
  .table .actions { white-space: normal; }
  .table .actions .btn { margin: 2px 0; }
  .chan-row { flex-wrap: wrap; }
  .chan-row .input, .chan-row .btn { width: 100%; }
  .hero-body { padding: 0 16px 18px; }
  .hero-body .avatar { width: 72px; height: 72px; }
  .auth-box { padding: 24px 20px; }
  .stat { flex: 1; min-width: 0; }
  .page-head > .grow { flex-basis: 100%; }
  .page-head .stats { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Actions des commandes */
.action-card { padding: 14px 16px; }
.action-card .type-head { margin-bottom: 8px; flex-wrap: wrap; }
.action-card .type-head .select { flex: 1; min-width: 160px; width: auto; }
.action-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .8rem; }
button.chip { font-family: inherit; color: var(--text); }
button.chip:hover { border-color: var(--accent-line); color: var(--accent); }

/* --- Créateur de serveur ------------------------------------------------------------ */
.sg-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.sg-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sg-theme { cursor: pointer; position: relative; }
.sg-theme input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sg-theme span { display: flex; flex-direction: column; gap: 2px; height: 100%; border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; background: var(--surface); transition: all .2s var(--ease); }
.sg-theme b { font-size: .88rem; }
.sg-theme small { color: var(--text-3); font-size: .74rem; line-height: 1.3; }
.sg-theme:hover span { border-color: var(--border-strong); }
.sg-theme input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.sg-theme input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.sg-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.sg-req { font-family: var(--mono); font-size: .82rem; line-height: 1.6; min-height: 150px; }
.sg-help { margin-top: 8px; font-size: .8rem; }
.sg-help summary { cursor: pointer; color: var(--text-3); font-weight: 600; width: max-content; }
.sg-help summary:hover { color: var(--text); }
.sg-help table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.sg-help td { padding: 5px 8px 5px 0; border-top: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.sg-help td:last-child { color: var(--text-3); padding-right: 0; }
.sg-help code { white-space: normal; word-break: break-word; }
.sg-notes { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.sg-notes-h { padding: 8px 12px; font-size: .78rem; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.sg-ko-n { color: var(--danger); }
.sg-note { display: flex; gap: 9px; padding: 7px 12px; font-size: .8rem; }
.sg-note + .sg-note { border-top: 1px solid var(--border); }
.sg-note .icon { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--success); }
.sg-note.ko .icon { color: var(--danger); }
.sg-note.ko { background: var(--danger-soft); }
.sg-note div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-note code { align-self: flex-start; max-width: 100%; overflow-wrap: anywhere; }
.sg-note span { color: var(--text-3); overflow-wrap: anywhere; }
.sg-preview { background: var(--discord-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sg-guild { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sg-in { width: 100%; min-width: 0; border: 1px solid transparent; background: transparent; color: inherit; font: inherit; border-radius: 6px; padding: 3px 6px; }
.sg-in:hover { border-color: var(--border); }
.sg-in:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.sg-gname { font-weight: 700; font-size: 1.02rem; }
.sg-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 290px); }
.sg-chans { padding: 8px 8px 14px; max-height: 640px; overflow: auto; }
.sg-roles { padding: 8px 8px 14px; border-left: 1px solid var(--border); max-height: 640px; overflow: auto; }
.sg-cat { margin-top: 10px; }
.sg-cat-h { display: flex; align-items: center; gap: 2px; }
.sg-cat-h .sg-in { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.sg-ch, .sg-role { display: flex; align-items: center; gap: 4px; padding: 1px 0 1px 6px; border-radius: 6px; }
.sg-ch:hover, .sg-role:hover { background: var(--surface-3); }
.sg-ch .sg-in { color: var(--text-2); font-size: .9rem; }
.sg-t { width: 20px; flex: none; text-align: center; color: var(--text-3); font-weight: 700; font-size: .95rem; }
.sg-ro, .sg-lock { display: grid; place-items: center; color: var(--text-3); flex: none; }
.sg-ro .icon, .sg-lock .icon { width: 13px; height: 13px; }
.sg-x { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; color: var(--text-3); border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.sg-x .icon { width: 14px; height: 14px; }
.sg-x:hover { color: var(--danger); background: var(--danger-soft); }
.sg-cat-h:hover .sg-x, .sg-ch:hover .sg-x, .sg-role:hover .sg-x, .sg-x:focus-visible { opacity: 1; }
.sg-add { display: flex; gap: 10px; padding: 2px 0 0 32px; }
.sg-add button, .sg-addcat { border: 0; background: none; color: var(--text-3); font: inherit; font-size: .78rem; cursor: pointer; padding: 2px 0; }
.sg-add button:hover, .sg-addcat:hover { color: var(--accent); }
.sg-addcat { margin: 12px 0 0 6px; font-weight: 600; }
.sg-roles-h { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 6px 6px 8px; }
.sg-role input[type=color] { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; flex: none; }
.sg-role input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.sg-role input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.sg-role .sg-in { font-weight: 600; font-size: .88rem; }
.sg-lvl { flex: none; width: 98px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: .72rem; border-radius: 6px; padding: 2px 4px; }
.sg-foot { flex-wrap: wrap; }
@media (hover: none) { .sg-x { opacity: 1; } }
@media (max-width: 960px) {
  .sg-split { grid-template-columns: minmax(0, 1fr); }
  .sg-split .sticky { position: static; }
}
@media (max-width: 640px) {
  .sg-cols { grid-template-columns: minmax(0, 1fr); }
  .sg-chans, .sg-roles { max-height: none; }
  .sg-roles { border-left: 0; border-top: 1px solid var(--border); }
  .sg-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-foot .btn { flex: 1 1 auto; }
}

/* Finitions sobres (2026-11-02) ---------------------------------------------------------
   Moins d'effets « modèle tout fait » : angles plus droits, pas d'ombres colorées, pas de
   motifs à points, pas de surtitres, pas d'animations décoratives. */
:root { --r-sm: 6px; --r: 8px; --r-lg: 10px; --r-xl: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04); --shadow-lg: 0 4px 12px -4px rgba(15, 23, 42, .12); }
[data-theme="dark"] { --shadow: none; --shadow-lg: 0 4px 12px -4px rgba(0, 0, 0, .6); }
h1 { font-size: 1.5rem; letter-spacing: -0.01em; }
h2, h3 { letter-spacing: -0.005em; }
.eyebrow { display: none; }
.page-head { margin-bottom: 20px; }
.page-head p, .hello p { font-size: .92rem; }
.hello { margin-bottom: 22px; }
.hello h1 { font-size: 1.5rem; }
.hello > .avatar { display: none; }
.stat { border-radius: var(--r); box-shadow: none; padding: 8px 14px; min-width: 110px; }
.stat b { font-size: 1.15rem; }
.stat span { font-weight: 500; }
.stat-link:hover { transform: none; }
.section-title { margin: 26px 0 12px; }
.section-title h2 { font-size: .98rem; }

.card-head { padding: 14px 18px; }
.card-head h2 { font-size: 1rem; }
.card-head p { font-size: .85rem; margin-top: 2px; }
.card-head .head-icon { display: none; }
.card-body, .card-pad { padding: 18px; }
.card-foot { padding: 12px 18px; }
.lift:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border-strong); }

/* Bannière : plus de bande décorative, en-tête simple */
.hero-band { display: none; }
.hero-body { align-items: center; padding: 18px; }
.hero-body .avatar { width: 56px; height: 56px; font-size: 1.25rem; border: 0; box-shadow: none; margin-top: 0; }
.hero-body h1 { font-size: 1.3rem; }

.option { border-radius: var(--r); padding: 18px; box-shadow: none; }
.option .oi { width: 36px; height: 36px; border-radius: var(--r-sm); }
.option:hover .oi { transform: none; }
.option.primary { background: var(--surface); border-color: var(--accent-line); }
.pack-on { background: var(--surface); }

.todo li { padding: 11px 18px; }
.todo .tick { width: 22px; height: 22px; }
.todo li.done .t { text-decoration: none; color: var(--text-2); }

.btn { border-radius: var(--r-sm); box-shadow: none; padding: 8px 14px; }
.btn:active { transform: none; }
.btn-light, .btn-danger { box-shadow: none; }
.btn-sm { border-radius: var(--r-sm); }
.btn-lg { border-radius: var(--r-sm); padding: 11px 18px; }
.icon-btn { border-radius: var(--r-sm); }
.snav a.nav, .side-bot, .me { border-radius: var(--r-sm); }
.snav a.nav.active::before { display: none; }
.snav-title button { border-radius: var(--r-sm); }
.snav-title button:hover { transform: none; }
.brand img { border-radius: var(--r-sm); }
.badge, .pill { border-radius: 4px; font-weight: 600; }
.pill.online::before { animation: none; }
.bot-card { padding: 16px; gap: 14px; }
.bot-card .foot { border-top-style: solid; }
.bot-card:hover .foot .go { gap: 4px; }
.guild-card:hover .go { transform: none; }
.tabs { border-radius: var(--r); }
.tabs button { border-radius: var(--r-sm); }
.alert, .lock-note { border-radius: var(--r); }

/* Animations : simple fondu, sans décalage en cascade */
.page.enter > *, .stagger > * { animation: fade .2s ease-out both !important; animation-delay: 0s !important; }

/* Connexion : panneau gauche sobre, sans motif ni cartes flottantes */
.auth-aside::before { display: none; }
.auth-aside h1 { font-size: 1.9rem; letter-spacing: -0.02em; margin: 56px 0 12px; }
.auth-aside h1 em { color: inherit; }
.auth-aside p.lead { font-size: .98rem; }
.showcase { display: none; }
.features { list-style: none; margin: 32px 0 0; padding: 0; max-width: 460px; border-top: 1px solid rgba(255, 255, 255, .12); }
.features li { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: .92rem; }
.features b { color: #fff; font-weight: 600; min-width: 120px; }
.features span { color: #9fb2d3; }
.auth-box { border-radius: var(--r-lg) !important; box-shadow: none !important; }
@media (max-width: 900px) { .features { display: none; } }

/* Packs : 4 packs sur une ligne, Pack Complet en bandeau dessous */
.grid-packs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pack { padding: 18px; }
.pack:hover { transform: none; box-shadow: var(--shadow); }
.pack .price b { font-size: 1.45rem; letter-spacing: -0.02em; }
.pack .perks { font-size: .87rem; gap: 7px; }
.pack-foot .pill { white-space: normal; line-height: 1.3; }
.pack-best { grid-column: 1 / -1; display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 4px 24px; box-shadow: none; border-color: var(--border-strong); }
.pack-best .pack-top { justify-content: flex-start; }
.pack-best .price { grid-column: 1; margin-top: 4px; }
.pack-best .perks { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.pack-best .pack-foot { grid-column: 3; grid-row: 1 / span 2; }
.pack-best .pack-foot .btn:only-child { width: auto; min-width: 140px; }
@media (max-width: 1100px) { .grid-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid-packs { grid-template-columns: minmax(0, 1fr); }
  .pack-best { display: flex; flex-direction: column; align-items: stretch; text-align: left; }
  .pack-best .pack-top { justify-content: flex-start; }
  .pack-best .pack-foot .btn:only-child { width: 100%; }
}
