:root {
  --bg: #0b0b0c; --card: #141416; --card2: #1a1a1d; --inner: #101012; --line: #27272b;
  --text: #f5f5f6; --muted: #8d8d96;
  --accent: #ff7a1a; --accent2: #ff9a4d; --accent-bg: rgba(255, 122, 26, .12); --accent-line: rgba(255, 122, 26, .5);
  --ok: #22c55e; --warn: #f59e0b; --err: #ef4444; --discord: #5865f2;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent2); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { margin: 0; font-size: 1.8rem; font-weight: 800; letter-spacing: -.01em; } h2 { margin: 0; }
code { font-family: ui-monospace, Consolas, monospace; background: rgba(255, 255, 255, .07); padding: 1px 6px; border-radius: 6px; font-size: .88em; word-break: break-all; }
.muted { color: var(--muted); } .tiny { font-size: .78rem; } .tc { text-align: center; } .okt { color: #4ade80; }
.wrap { width: min(1216px, 100% - 32px); margin: 0 auto; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .row.gap, .gap { gap: 10px; } .between { justify-content: space-between; }

/* ---------- Barre du haut ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 12, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1.15rem; } .logo:hover { text-decoration: none; }
.mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; color: #fff; background: linear-gradient(135deg, #ff9a4d, #ff5a00); }
.mark.big { width: 64px; height: 64px; font-size: 1.8rem; border-radius: 18px; margin: 0 auto 14px; }
.user { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.user img { width: 30px; height: 30px; border-radius: 50%; } .user span { padding-left: 8px; } .user img + span { padding-left: 0; }

/* ---------- En-tête de page et onglets ---------- */
.page { padding: 28px 0 70px; }
.appHead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.appIco { width: 56px; height: 56px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; font-size: 1.6rem; background: var(--accent-bg); border: 1px solid var(--accent-line); }
.appIco img { width: 100%; height: 100%; object-fit: cover; }
.sub { color: var(--muted); font-size: .88rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 1px solid; }
.pill.ok { color: #4ade80; background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .4); }
.pill.warn { color: #fbbf24; background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .4); }
.pill.err { color: #f87171; background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .4); }
.pill.mute { color: var(--muted); background: rgba(255, 255, 255, .04); border-color: var(--line); }
.tabs { display: flex; gap: 2px; margin: 20px 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: #fff; text-decoration: none; } .tabs a.active { color: #fff; border-bottom-color: var(--accent); }

/* ---------- Cartes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin: 0 0 18px; }
.card.wide { width: min(680px, 100%); } .card.narrow { width: min(440px, 100%); }
.card-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.05rem; font-weight: 700; }
.cico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-bg); font-size: .95rem; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
body.bare { background: radial-gradient(900px 500px at 50% -10%, rgba(255, 122, 26, .12), transparent 70%), var(--bg); }
.grid2 { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 18px; } .grid2 .card { margin: 0 0 18px; }
.ctrls { display: grid; gap: 10px; } .ctrls form { margin: 0; }
.ctrl { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid; background: transparent; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.ctrl span { width: 22px; text-align: center; } .ctrl:disabled { opacity: .35; cursor: not-allowed; } .ctrl:not(:disabled):hover { filter: brightness(1.25); }
.ctrl.go { color: #4ade80; border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .07); }
.ctrl.warn { color: #fbbf24; border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .07); }
.ctrl.stop { color: #f87171; border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .07); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.metric { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.metric .ml { color: var(--muted); font-size: .78rem; } .metric b { font-size: 1.45rem; }
progress.bar { width: 100%; height: 5px; border: 0; border-radius: 99px; overflow: hidden; background: #0b0b0c; appearance: none; }
progress.bar::-webkit-progress-bar { background: #0b0b0c; } progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; } progress.bar::-moz-progress-bar { background: var(--accent); }
.logs { margin: 10px 0 0; padding: 14px; max-height: 60vh; overflow: auto; background: #08080a; border: 1px solid var(--line); border-radius: 10px; font: 12.5px/1.55 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.logs .le { color: #f87171; } .logs .lw { color: #fbbf24; }

/* ---------- Configurer le bot (menu vertical + formulaire) ---------- */
.cfg { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.cfg-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .85rem; margin-bottom: 16px; flex-wrap: wrap; }
.cfg-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.cfg-menu { display: grid; gap: 4px; position: sticky; top: 88px; }
.cfg-menu a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; border: 1px solid transparent; color: #c9c9d0; font-weight: 500; }
.cfg-menu a:hover { background: var(--card2); text-decoration: none; color: #fff; }
.cfg-menu a.active { color: var(--accent); background: var(--accent-bg); border-color: var(--accent-line); }
.cfg-menu .mi { width: 20px; text-align: center; } .cfg-menu .chev { margin-left: auto; font-style: normal; opacity: 0; } .cfg-menu a.active .chev { opacity: 1; }
.mgroup { margin: 16px 14px 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cfg-panel { background: var(--inner); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-width: 0; }
.cfg-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.cfg-head .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-bg); font-size: 1.05rem; }
.cfg-head h2 { font-size: 1.2rem; font-weight: 700; }
.lead { margin: 0 0 20px; color: var(--muted); font-size: .9rem; }
.subh { margin: 26px 0 12px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); } .lead + form .subh:first-child, .cfg-panel > .subh:first-child { margin-top: 6px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; } .fld { min-width: 0; } .fld.full { grid-column: 1 / -1; }
.lbl { font-size: .86rem; font-weight: 600; margin-bottom: 2px; } .hlp { font-size: .76rem; color: var(--muted); margin-bottom: 8px; }
input:not([type=checkbox]), select, textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #0b0b0c; color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input::placeholder, textarea::placeholder { color: #55555c; } textarea { resize: vertical; }
.savebar { display: flex; justify-content: flex-end; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.tgl { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 16px 0 0; border-top: 1px solid var(--line); cursor: pointer; }
.tgl b { display: block; font-size: .92rem; } .tgl small { color: var(--muted); }
.switch { appearance: none; flex: none; width: 46px; height: 26px; border-radius: 99px; background: #2c2c31; position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch:checked { background: var(--accent); } .switch:checked::after { left: 23px; } .switch:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.rowlist { display: grid; gap: 8px; margin: 10px 0 14px; } .rowitem { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); } .rowitem form { margin: 0; } .rowitem .hlp { margin: 2px 0 0; }
.addrole select { flex: 1; min-width: 220px; }

/* ---------- Boutons, badges, messages ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(1.1); } .btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.primary { background: linear-gradient(180deg, #ff8a2a, #f26a00); box-shadow: 0 6px 20px rgba(255, 122, 26, .22); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); } .btn.ghost:hover { border-color: var(--accent-line); }
.btn.danger { background: transparent; border-color: rgba(239, 68, 68, .5); color: #f87171; } .btn.discord { background: var(--discord); }
.btn.sm { padding: 7px 14px; font-size: .85rem; } .btn.big { padding: 14px 28px; font-size: 1.02rem; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; border: 1px solid; margin-bottom: 6px; }
.badge.ok { color: #4ade80; background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .4); } .badge.warn { color: #fbbf24; background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .4); }
.flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 18px; border: 1px solid; }
.flash.ok { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .4); color: #86efac; }
.flash.warn { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .4); color: #fcd34d; }
.flash.error { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .45); color: #fca5a5; } .flash a { text-decoration: underline; }
.steps { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 20px; } .steps p { margin: 0 0 6px; } .steps ol { margin: 6px 0 0; padding-left: 20px; } .steps li { margin: 8px 0; }
.copy { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; } .copy code { flex: 1; min-width: 0; padding: 9px 11px; }
.spinner { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .cfg-grid { grid-template-columns: 1fr; } .cfg-menu { position: static; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .mgroup { display: none; } .cfg-menu .chev { display: none; }
  .grid2 { grid-template-columns: 1fr; } .fields { grid-template-columns: 1fr; } .user span { display: none; } .cfg-panel { padding: 18px; }
}

/* ---------- Icônes (SVG en traits fins) et finitions ---------- */
svg.ic { flex: none; display: block; }
.cico, .cfg-head .ico { color: var(--accent); }
.cico svg.ic, .cfg-head .ico svg.ic { width: 17px; height: 17px; }
.tabs a span, .cfg-menu .mi, .ctrl span { display: inline-flex; align-items: center; justify-content: center; }
.tabs a span svg.ic { width: 17px; height: 17px; }
.cfg-menu .mi svg.ic { width: 18px; height: 18px; }
.metric .ml { display: flex; align-items: center; gap: 7px; } .metric .ml svg.ic { width: 15px; height: 15px; color: var(--muted); }
.btn svg.ic { width: 16px; height: 16px; }
.ctrl svg.ic { width: 18px; height: 18px; }
.lead code, .hlp code, .muted code { white-space: nowrap; word-break: normal; }
select { appearance: none; padding-right: 40px; cursor: pointer; background: #0b0b0c url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238d8d96' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 14px center; }
select option { background: #141416; color: var(--text); }
/* Les champs d'une même ligne s'alignent par le bas, même si l'aide fait deux lignes */
.fld { display: flex; flex-direction: column; }
.fld > select, .fld > input, .fld > textarea { margin-top: auto; }

/* ---------- Éditeur d'embeds + aperçu ---------- */
input[type=color] { padding: 4px; height: 46px; cursor: pointer; }
.embed-ed { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ee-preview { position: sticky; top: 88px; }
.ep { background: #313338; border-radius: 10px; padding: 14px; color: #dbdee1; font: 14px/1.4 system-ui, "Segoe UI", sans-serif; }
.ep-content { margin-bottom: 8px; white-space: pre-wrap; word-break: break-word; } .ep-content:empty { display: none; }
.ep-card { display: grid; gap: 8px; background: #2b2d31; border-left: 4px solid #ff7a1a; border-radius: 6px; padding: 12px 14px; max-width: 100%; }
.ep-card:empty { display: none; }
.ep-head { display: flex; gap: 12px; align-items: flex-start; }
.ep-main { flex: 1; min-width: 0; display: grid; gap: 6px; align-content: start; }
.ep-title { color: #fff; font-weight: 700; font-size: 1.2rem; line-height: 1.25; word-break: break-word; text-decoration: none; } a.ep-title[href] { color: #00a8fc; }
.ep-desc { white-space: pre-wrap; word-break: break-word; font-size: .9rem; }
.ep-hr { height: 1px; background: #3f4147; margin: 2px 0; }
.ep-image { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; }
.ep-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; }
.ep-footer { font-size: .72rem; color: #b5bac1; }
.ep-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-buttons span { background: #4e5058; color: #fff; padding: 6px 14px; border-radius: 4px; font-size: .85rem; font-weight: 600; }
.ro { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #0d0d0f; color: #c9c9d0; min-height: 46px; }
.badge { margin-right: 6px; } .errt { color: #f87171; }
@media (max-width: 1100px) { .embed-ed { grid-template-columns: 1fr; } .ee-preview { position: static; order: -1; } }

/* ---------- Nouveau visuel : en-tête, accueil, chiffres, onglets en pilule, connexion ---------- */
.top .wrap { height: 72px; }
.umenu { position: relative; } .umenu summary { list-style: none; cursor: pointer; } .umenu summary::-webkit-details-marker { display: none; }
.umenu .chev { display: inline-flex; color: var(--muted); } .umenu .chev svg.ic { width: 15px; height: 15px; } .umenu[open] .chev { transform: rotate(180deg); }
.umenu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); display: grid; gap: 10px; z-index: 30; }
.umenu-pop .hlp { margin: 0; }
.btn.block { display: flex; width: 100%; }

.greet { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 22px; }
.greet h1 { font-size: 2rem; } .greet .sub { margin: 6px 0 0; } .warnt { color: #fbbf24; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 16px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.stat b { font-size: 1.6rem; line-height: 1.2; } .stat small { color: var(--muted); }
.sico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; }
.sico svg.ic { width: 22px; height: 22px; }
.sico.o { color: var(--accent); background: var(--accent-bg); } .sico.ok { color: #4ade80; background: rgba(34, 197, 94, .12); }
.sico.warn { color: #fbbf24; background: rgba(245, 158, 11, .12); } .sico.err { color: #f87171; background: rgba(239, 68, 68, .12); }
.sico.mute { color: var(--muted); background: rgba(255, 255, 255, .06); } .sico.b { color: #60a5fa; background: rgba(96, 165, 250, .12); }

.tabs.pills { gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin: 0 0 24px; }
.tabs.pills a { border-radius: 11px; border-bottom: 0; margin: 0; padding: 11px 18px; }
.tabs.pills a:hover:not(.active) { background: var(--card2); }
.tabs.pills a.active { background: linear-gradient(180deg, #ff8a2a, #f26a00); color: #fff; box-shadow: 0 6px 18px rgba(255, 122, 26, .25); }

.auth { width: min(448px, 100%); text-align: center; } .auth h1 { font-size: 1.9rem; margin-bottom: 6px; } .auth > .muted { margin: 0 0 26px; }
.authcard { padding: 26px; text-align: left; margin: 0 0 18px; } .authcard .hlp { margin: 16px 0 0; }
.btn.discord.block { padding: 14px 20px; font-size: 1.02rem; }

.botrow { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); margin: 6px 0 14px; } .grow { flex: 1; min-width: 0; }
.appIco svg.ic { width: 26px; height: 26px; color: var(--accent); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.qtile { display: grid; justify-items: center; gap: 10px; padding: 20px 12px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); color: var(--text); font-weight: 600; text-align: center; }
.qtile:hover { border-color: var(--accent-line); text-decoration: none; }
.qtile span { color: var(--accent); display: inline-flex; } .qtile svg.ic { width: 22px; height: 22px; }
.sect { font-size: 1.4rem; font-weight: 800; margin: 0; } .sectsub { margin: 4px 0 18px; }

.docs { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px 32px; }
.docs h2 { font-size: 1.5rem; margin: 30px 0 10px; } .docs h2:first-child { margin-top: 0; } .docs h3 { font-size: 1.15rem; margin: 22px 0 8px; } .docs h4 { font-size: 1rem; margin: 18px 0 6px; }
.docs p, .docs li { color: #d4d4da; } .docs ul, .docs ol { padding-left: 22px; } .docs li { margin: 4px 0; }
.docs pre { background: #08080a; border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow: auto; } .docs pre code { background: none; padding: 0; word-break: normal; white-space: pre; }
.docs table { border-collapse: collapse; width: 100%; margin: 12px 0; display: block; overflow-x: auto; } .docs th, .docs td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; } .docs th { background: var(--card2); }
.docs hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.docs blockquote { margin: 12px 0; padding: 8px 16px; border-left: 3px solid var(--accent); background: var(--card2); border-radius: 0 10px 10px 0; color: var(--muted); }

@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } .docs { padding: 20px; } }
@media (max-width: 520px) { .stats { gap: 10px; } .stat { padding: 16px 10px; } .stat b { font-size: 1.25rem; } .tabs.pills a { padding: 10px 12px; } .greet h1 { font-size: 1.6rem; } }

.rowitem form.inl { display: flex; gap: 6px; align-items: center; } .rowitem form.inl input { width: 190px; padding: 7px 10px; font-size: .85rem; }
@media (max-width: 700px) { .rowitem { flex-wrap: wrap; } .rowitem form.inl input { width: 150px; } }

.tag { display: inline-block; margin-left: 4px; padding: 2px 10px; border-radius: 99px; font-size: .72rem; font-weight: 700; color: var(--accent2); background: var(--accent-bg); border: 1px solid var(--accent-line); vertical-align: middle; }
/* Envoi d'images */
.upl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.upl label.btn { cursor: pointer; }
.upl-file { display: none; }
.upl-note { margin: 0; }
.upl-prev { height: 44px; max-width: 140px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--inner); }
.upl-prev[hidden] { display: none; }
