/* ─── Alpaga — thème repris de l'avatar (rouge → rose → violet → bleu) ─── */
:root {
  --red: #F2505D;
  --pink: #DE5FA6;
  --violet: #BE70EA;
  --blue: #6E9AEC;
  --cyan: #22BFEA;
  --gradient: linear-gradient(135deg, var(--red) 0%, var(--pink) 30%, var(--violet) 62%, var(--blue) 100%);
  --gradient-v: linear-gradient(180deg, var(--red), var(--pink) 30%, var(--violet) 60%, var(--blue));

  --bg: #100f1c;
  --bg-2: #16152a;
  --card: #1b1a30;
  --card-2: #24223d;
  --border: #2e2b4b;
  --border-2: #3b3860;
  --text: #ecebf7;
  --muted: #a3a0c2;
  --green: #3ba55d;
  --danger: #f2505d;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --topbar: 64px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(900px 500px at 0% -10%, rgba(242, 80, 93, .12), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(110, 154, 236, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--violet); text-decoration: none; }
h1 { font-size: 1.65rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 2.2rem 0 1rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.icon { width: 18px; height: 18px; }

/* ─── Boutons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: .65rem 1.15rem;
  font: inherit; font-weight: 600; cursor: pointer; color: var(--text); background: var(--card-2);
  transition: transform .1s, filter .15s, background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .45rem .85rem; font-size: .88rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 20px rgba(190, 112, 234, .25); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-discord { background: #5865f2; color: #fff; box-shadow: 0 8px 24px rgba(88, 101, 242, .35); }
.btn-discord:hover { background: #6974f4; }
.btn-ghost { background: transparent; border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--violet); background: rgba(190, 112, 234, .08); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(242, 80, 93, .4); }
.btn-danger:hover { background: rgba(242, 80, 93, .12); }

/* ─── Barre du haut ─── */
.topbar {
  height: var(--topbar); background: rgba(16, 15, 28, .8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
}
.topbar-inner { height: 100%; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 2.5rem; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-logo { width: 34px; height: 34px; }
.brand-name {
  font-weight: 900; font-size: 1.2rem; letter-spacing: .06em;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Menu du compte */
.account { position: relative; }
.avatar-btn {
  width: 40px; height: 40px; padding: 0; border-radius: 50%; cursor: pointer; background: var(--gradient);
  border: none; display: grid; place-items: center; transition: transform .15s;
}
.avatar-btn img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--bg); display: block; }
.avatar-btn:hover { transform: scale(1.05); }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 260px; background: var(--card);
  border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem;
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.account.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu-user { display: flex; align-items: center; gap: .75rem; padding: .6rem .6rem .9rem; border-bottom: 1px solid var(--border); margin-bottom: .4rem; }
.menu-user img { width: 42px; height: 42px; border-radius: 50%; }
.menu-name { font-weight: 700; }
.menu-handle { color: var(--muted); font-size: .85rem; }
.menu-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 8px; color: var(--text); font-weight: 500; }
.menu-item svg { width: 18px; height: 18px; color: var(--muted); }
.menu-item:hover { background: var(--card-2); }
.menu-item.danger, .menu-item.danger svg { color: var(--danger); }
.menu-item.danger { margin-top: .3rem; position: relative; }
.menu-item.danger::before { content: ""; position: absolute; left: .3rem; right: .3rem; top: -.2rem; border-top: 1px solid var(--border); }
.menu-item.danger:hover { background: rgba(242, 80, 93, .1); }
.menu-label { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .7rem .7rem .4rem; }
.menu-langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: .6rem .4rem; border-bottom: 1px solid var(--border); margin-bottom: .4rem; }
.menu-langs a {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .5rem; border-radius: 8px;
  border: 1px solid var(--border); color: var(--muted); font-size: .75rem; font-weight: 700;
}
.menu-langs a img { width: 28px; height: 19px; border-radius: 3px; object-fit: cover; }
.menu-langs a:hover { border-color: var(--border-2); color: var(--text); }
.menu-langs a.active { border-color: var(--violet); background: rgba(190, 112, 234, .12); color: var(--text); }

/* ─── Toast ─── */
.toast {
  position: fixed; top: calc(var(--topbar) + 14px); left: 50%; transform: translateX(-50%); z-index: 40;
  padding: .75rem 1.2rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-weight: 600;
  transition: opacity .4s, transform .4s; max-width: min(480px, 90vw); background: var(--card); border: 1px solid var(--border-2);
}
.toast-success { border-color: var(--green); }
.toast-success::before { content: "✓  "; color: var(--green); }
.toast-error { border-color: var(--danger); }
.toast-error::before { content: "!  "; color: var(--danger); }
.toast.hide { opacity: 0; transform: translate(-50%, -10px); pointer-events: none; }

/* ─── Accueil ─── */
.hero { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 4rem 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2rem; text-align: center; }
.hero-banner { width: 100%; border-radius: 22px; box-shadow: 0 30px 80px rgba(190, 112, 234, .25); border: 1px solid var(--border); }
.hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.2; }

/* ─── Conteneurs ─── */
.container { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.container.narrow { max-width: 480px; display: flex; align-items: center; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.card.empty { color: var(--muted); text-align: center; padding: 2rem; }
.card-title { display: flex; align-items: center; gap: .7rem; font-size: 1rem; margin: 0 0 .2rem; }
.card-help { margin-bottom: 1.2rem; }
.step { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .82rem; background: var(--gradient); color: #fff; }
.error-card { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 2.5rem; }
.error-logo { width: 72px; height: 72px; opacity: .9; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.8rem; }
.page-head p { margin-top: .35rem; }
.page-title { margin-bottom: 1.6rem; }
.page-title p { margin-top: .35rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 1.1rem; }

/* ─── Serveurs ─── */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.server-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1rem 1.3rem;
  display: flex; flex-direction: column; align-items: center; gap: .9rem; text-align: center; color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.server-card:hover { border-color: var(--violet); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(190, 112, 234, .15); }
.server-card.no-bot { opacity: .65; }
.server-card.no-bot:hover { opacity: 1; }
.server-icon { width: 76px; height: 76px; border-radius: 24px; object-fit: cover; }
.server-icon.placeholder, .guild-icon.placeholder { display: grid; place-items: center; background: var(--card-2); font-weight: 700; color: var(--muted); }
.server-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Tableau de bord ─── */
.layout { flex: 1; display: grid; grid-template-columns: 270px minmax(0, 1fr); max-width: 1240px; width: 100%; margin: 0 auto; }
.sidebar { border-right: 1px solid var(--border); padding: 1.6rem 1rem 0; position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); overflow: hidden; display: flex; flex-direction: column; }
.sidebar .side-nav { flex: 1; min-height: 0; overflow-y: auto; }
.side-footer { margin: auto -1rem 0; padding: 1.1rem 1rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: .8rem; }
.guild-head { display: flex; align-items: center; gap: .8rem; padding: 0 .5rem 1.3rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.guild-icon { width: 46px; height: 46px; border-radius: 15px; flex-shrink: 0; }
.guild-meta { min-width: 0; }
.guild-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-sub { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.flag-xs { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; }
.flag-md { width: 30px; height: 20px; border-radius: 3px; object-fit: cover; }
.flag-lg { width: 54px; height: 36px; border-radius: 5px; object-fit: cover; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem;
  border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; transition: background .15s, color .15s;
}
.side-nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.side-nav a:hover { background: var(--bg-2); color: var(--text); }
/* Élément actif : barre de couleur droite (sans arrondi) sur le bord gauche */
.side-nav a.active { background: var(--card-2); color: var(--text); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.side-nav a.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gradient-v); }
.side-nav a.active svg { color: var(--violet); }
.side-nav a.nested { padding-left: 1.6rem; }
.nav-group { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 1.3rem .9rem .45rem; }
.side-nav a.back { margin-top: 1.4rem; font-size: .88rem; font-weight: 500; }
.content { padding: 2.2rem 2.4rem 6rem; min-width: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; color: var(--text); }
.stat-link { transition: border-color .15s; }
.stat-link:hover { border-color: var(--violet); }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 800; margin-top: .35rem; }
.stat-lang { display: flex; align-items: center; gap: .6rem; font-size: 1.25rem; height: 2.4rem; }
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.module { display: flex; flex-direction: column; gap: 1.2rem; color: var(--text); transition: border-color .15s, transform .15s; }
.module:hover { border-color: var(--violet); transform: translateY(-2px); }
.module-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.module-name { font-weight: 700; font-size: 1.05rem; }
.module-link { color: var(--violet); font-size: .88rem; font-weight: 600; }
.badge { font-size: .74rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.badge-on { background: rgba(59, 165, 93, .16); color: #6fdc94; }
.badge-off { background: rgba(163, 160, 194, .14); color: var(--muted); }
.count { background: var(--card-2); border-radius: 999px; padding: .1rem .6rem; font-size: .82rem; color: var(--muted); margin-left: .4rem; }

/* ─── Formulaires ─── */
.field { display: flex; flex-direction: column; gap: .45rem; }
.label { font-weight: 600; font-size: .88rem; color: #d4d2ea; }
.help { color: var(--muted); font-size: .82rem; line-height: 1.45; display: block; }
input[type=text], input[type=number], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .7rem .85rem; font: inherit; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; min-height: 90px; }
input.center { text-align: center; font-size: 1.15rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(190, 112, 234, .2); }
select { appearance: none; cursor: pointer; padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a3a0c2' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.grid-emoji { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; }
.inline-fields { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* Interrupteurs */
.toggle { display: inline-flex; align-items: center; gap: .8rem; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-text { font-weight: 600; }
.toggle-block { display: flex; align-items: flex-start; padding: .9rem 1rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.toggle-block .switch { margin-top: 2px; }
.toggle-block .help { margin-top: .2rem; }
.toggle-list { display: flex; flex-direction: column; gap: .6rem; }
.switch { width: 44px; height: 25px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border-2); position: relative; transition: background .2s, border-color .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.toggle input:checked + .switch { background: var(--gradient); border-color: transparent; }
.toggle input:checked + .switch::after { transform: translateX(19px); background: #fff; }
.toggle input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(190, 112, 234, .35); }

/* Cartes de choix (radio) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-top: .9rem; }
.choice-grid.two { grid-template-columns: 1fr 1fr; margin-top: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-box {
  height: 100%; display: flex; flex-direction: column; gap: .35rem; padding: .95rem 1.05rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.choice-box:hover { border-color: var(--border-2); }
.choice input:checked + .choice-box { border-color: var(--violet); background: rgba(190, 112, 234, .1); box-shadow: inset 0 0 0 1px var(--violet); }
.choice input:focus-visible + .choice-box { box-shadow: 0 0 0 3px rgba(190, 112, 234, .35); }
.choice-title { font-weight: 600; }
.choice-desc { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.choice-lang .choice-box { align-items: center; gap: .7rem; padding: 1.3rem 1rem; text-align: center; }

/* Couleurs (embed) */
.color-picker { display: flex; align-items: center; gap: .8rem; transition: opacity .2s; }
.color-picker.disabled { opacity: .35; pointer-events: none; }
.swatches { display: flex; gap: .4rem; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; transition: transform .1s; }
.swatch:hover { transform: scale(1.12); }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.swatch-custom { position: relative; overflow: hidden; background: conic-gradient(var(--red), var(--violet), var(--blue), #3ba55d, #f0b232, var(--red)); }
.swatch-custom input { position: absolute; inset: -8px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }

/* Couleurs (bouton Discord) */
.btn-colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.btn-color input { position: absolute; opacity: 0; pointer-events: none; }
.btn-color span {
  display: block; text-align: center; padding: .55rem .3rem; border-radius: 8px; font-weight: 600; font-size: .88rem;
  background: var(--c); color: #fff; cursor: pointer; opacity: .55; border: 2px solid transparent; transition: opacity .15s;
}
.btn-color span:hover { opacity: .85; }
.btn-color input:checked + span { opacity: 1; border-color: #fff; }

/* Rôles (pastilles) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--bg-2); font-size: .88rem; font-weight: 600; color: var(--muted); transition: all .15s;
}
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--role); }
.chip span:hover { color: var(--text); }
.chip input:checked + span { color: var(--text); border-color: var(--role); background: color-mix(in srgb, var(--role) 16%, var(--bg-2)); }
.chip input:checked + span::after { content: "✓"; font-size: .8rem; }

/* Autocomplétion des variables */
.ac-wrap { position: relative; }
.ac {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 250px; overflow-y: auto;
  background: #2b2d31; border: 1px solid #1e1f22; border-radius: 8px; box-shadow: var(--shadow); padding: .35rem; display: none;
}
.ac.open { display: block; }
.ac-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem .7rem; border-radius: 5px; cursor: pointer; }
.ac-item code { font-family: inherit; color: #f2f3f5; font-weight: 500; }
.ac-item span { color: #b5bac1; font-size: .85rem; text-align: right; }
.ac-item.active, .ac-item:hover { background: #404249; }

/* Barre « modifications non enregistrées » */
.savebar {
  position: fixed; left: 50%; bottom: 1.4rem; z-index: 25; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 1.5rem; padding: .7rem .8rem .7rem 1.3rem; border-radius: 14px;
  background: #0b0a15; border: 1px solid var(--border-2); box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2);
}
.savebar.visible { transform: translate(-50%, 0); }
.savebar-text { display: flex; align-items: center; gap: .6rem; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); }

/* ─── Aperçu Discord ─── */
.two-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.preview { background: #313338; border-color: #3f4147; position: sticky; top: calc(var(--topbar) + 1.2rem); }
.preview.card-inset { position: static; border-radius: var(--radius-sm); padding: 1.1rem; border: 1px solid #3f4147; }
.preview-label { color: #b5bac1; margin-bottom: 1rem; text-transform: uppercase; font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.discord-msg { display: flex; gap: .9rem; font-family: "gg sans", "Noto Sans", system-ui, sans-serif; }
.bot-avatar { width: 40px; height: 40px; border-radius: 50%; background: #1e1f22; flex-shrink: 0; padding: 4px; }
.msg-body { min-width: 0; flex: 1; }
.msg-author { font-weight: 600; color: #f2f3f5; margin-bottom: .2rem; }
.bot-tag { background: #5865f2; color: #fff; font-size: .62rem; padding: 1px 5px; border-radius: 3px; vertical-align: middle; margin-left: 3px; }
.msg-text { color: #dbdee1; line-height: 1.45; word-wrap: break-word; }
.mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.embed { display: flex; gap: 1rem; background: #2b2d31; border-left: 4px solid var(--violet); border-radius: 4px; padding: .8rem 1rem; margin-top: .3rem; max-width: 440px; }
.embed-main { flex: 1; min-width: 0; }
.embed-title { font-weight: 700; color: #f2f3f5; margin-bottom: .4rem; }
.embed-desc { color: #dbdee1; font-size: .92rem; line-height: 1.45; word-wrap: break-word; }
.embed-desc code, .msg-text code { background: #1e1f22; padding: 0 4px; border-radius: 3px; font-size: .85em; }
.embed-footer { color: #b5bac1; font-size: .75rem; margin-top: .6rem; }
.embed-thumb { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; }
.d-button { display: inline-flex; align-items: center; gap: .4rem; margin-top: .5rem; padding: .45rem 1rem; border-radius: 4px; color: #fff; font-size: .88rem; font-weight: 500; background: #5865f2; transition: background .15s; }

/* ─── Tableau ─── */
.table-wrap { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td.right form { display: inline; }

.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 1.4rem; border-top: 1px solid var(--border); }

/* ─── Mobile ─── */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 1rem; }
  .side-nav { flex-direction: row; overflow-x: auto; }
  .side-nav a { flex-shrink: 0; }
  .side-nav a.active { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
  .side-nav a.active::before { top: auto; right: 0; width: auto; height: 3px; background: var(--gradient); }
  .side-nav a.back { margin-top: 0; }
  .content { padding: 1.5rem 1rem 6rem; }
  .two-cols, .grid-2, .choice-grid.two { grid-template-columns: 1fr; }
  .preview { position: static; }
  .btn-colors { grid-template-columns: repeat(2, 1fr); }
  .savebar { width: calc(100% - 2rem); justify-content: space-between; }
}

/* ─── Paramètres : ligne de réglage + sélecteur segmenté ─── */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.setting-title { font-weight: 600; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: inline-flex; align-items: center; gap: .55rem; padding: .5rem .95rem; border-radius: 9px; cursor: pointer;
  font-weight: 600; font-size: .9rem; color: var(--muted); transition: background .15s, color .15s;
}
.segmented span img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.segmented span:hover { color: var(--text); }
.segmented input:checked + span { background: var(--card-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 2px 8px rgba(0,0,0,.3), inset 0 0 0 1px var(--border-2); }
.segmented input:focus-visible + span { box-shadow: 0 0 0 2px var(--violet); }

/* ─── Listes déroulantes personnalisées ─── */
.select { position: relative; }
.select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .6rem; text-align: left;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .68rem .85rem; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.select-btn:hover { border-color: var(--border-2); }
.select.open .select-btn, .select-btn:focus-visible { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(190, 112, 234, .2); }
.select-value { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.select-value > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-value.muted { color: var(--muted); }
.chevron { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; transition: transform .2s; }
.select.open .chevron { transform: rotate(180deg); }
.select-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 25; max-height: 290px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); padding: .35rem;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .12s, transform .12s;
}
.select.open .select-menu { opacity: 1; transform: none; pointer-events: auto; }
.select-group { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: .75rem .65rem .35rem; }
.select-opt { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border-radius: 8px; cursor: pointer; color: #d4d2ea; }
.select-opt > span:not(.sel-icon) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-opt.is-empty { color: var(--muted); }
.select-opt.focus, .select-opt:hover { background: var(--card-2); color: var(--text); }
.select-opt .check { width: 16px; height: 16px; fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; flex-shrink: 0; }
.select-opt.selected { color: var(--text); background: rgba(190, 112, 234, .12); }
.select-opt.selected .check { visibility: visible; }
.sel-icon { width: 17px; height: 17px; flex-shrink: 0; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.sel-icon.hash { display: inline-grid; place-items: center; font-weight: 700; font-size: 1.05rem; line-height: 1; }

/* ─── Emojis ─── */
.ac-wrap.has-emoji textarea { padding-right: 2.8rem; }
.ac-wrap.has-emoji input[type=text] { padding-right: 2.8rem; }
.emoji-btn {
  position: absolute; top: .45rem; right: .45rem; width: 32px; height: 32px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: var(--muted); display: grid; place-items: center; transition: color .15s, background .15s, transform .15s;
}
.ac-wrap.has-emoji input[type=text] + .ac + .emoji-btn, .ac-wrap.has-emoji input[type=text] ~ .emoji-btn { top: 50%; transform: translateY(-50%); }
.emoji-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.emoji-btn:hover { color: #f0b232; background: var(--card-2); }
.emoji-field {
  height: 45px; width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-2);
  cursor: pointer; font-size: 1.35rem; display: grid; place-items: center; color: var(--text); transition: border-color .15s;
}
.emoji-field:hover { border-color: var(--violet); }
.emoji-field:empty::after, .emoji-field span:empty::after { content: "＋"; color: var(--muted); font-size: 1rem; }
.d-emoji { width: 1.375em; height: 1.375em; vertical-align: -.3em; object-fit: contain; overflow: hidden; color: transparent; }
.emoji-field .d-emoji { width: 26px; height: 26px; vertical-align: middle; }

.emoji-picker {
  position: absolute; z-index: 80; width: 372px; height: 420px; display: none; flex-direction: column;
  background: #2b2d31; border: 1px solid #1e1f22; border-radius: 10px; box-shadow: var(--shadow); overflow: hidden;
}
.emoji-picker.open { display: flex; }
.ep-head { padding: .65rem; border-bottom: 1px solid #1e1f22; }
.ep-search { width: 100%; background: #1e1f22 !important; border: none !important; border-radius: 6px !important; padding: .55rem .7rem !important; color: #dbdee1; font: inherit; }
.ep-search:focus { box-shadow: none !important; }
.ep-body { flex: 1; display: flex; min-height: 0; }
.ep-nav { width: 48px; background: #232428; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .4rem 0; overflow-y: auto; }
.ep-nav button { width: 34px; height: 34px; border: none; border-radius: 6px; background: transparent; cursor: pointer; font-size: 1.15rem; display: grid; place-items: center; color: #b5bac1; filter: grayscale(.6); }
.ep-nav button:hover { background: #35373c; filter: none; }
.ep-nav svg { width: 19px; height: 19px; fill: currentColor; }
.ep-list { flex: 1; overflow-y: auto; padding: 0 .4rem .6rem; position: relative; }
.ep-title { position: sticky; top: 0; background: #2b2d31; color: #b5bac1; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .65rem .3rem .35rem; z-index: 1; }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); }
.ep-item { aspect-ratio: 1; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-size: 1.45rem; display: grid; place-items: center; padding: 0; }
.ep-item:hover { background: #404249; }
.ep-item img { width: 30px; height: 30px; object-fit: contain; }
.ep-empty { color: #b5bac1; text-align: center; padding: 2rem 1rem; }

/* Options d'embed (pied de page / date) */
.embed-options { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); transition: opacity .2s; }
.embed-options.disabled { opacity: .35; pointer-events: none; }
.embed-options .toggle { height: 45px; }
@media (max-width: 960px) {
  .embed-options { grid-template-columns: 1fr; }
  .nav-group { display: none; }
  .side-nav a.nested { padding-left: .9rem; }
  .segmented { width: 100%; }
  .segmented label { flex: 1; }
  .segmented span { width: 100%; justify-content: center; }
}

/* ─── Barre du haut : largeur réduite sur mobile ─── */
@media (max-width: 960px) { .topbar-inner { padding: 0 1rem; } }

/* ─── Bannière de l'accueil : s'enfonce sous la souris ─── */
.banner-tilt { width: 100%; perspective: 1100px; }
.banner-tilt .hero-banner {
  display: block; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transition: transform .18s ease-out, box-shadow .3s; will-change: transform;
}
.banner-tilt { position: relative; }
.banner-tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: 22px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 0, 0, .28), transparent 65%);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1)); transition: opacity .3s, transform .18s ease-out;
}
.banner-tilt.active::after { opacity: 1; }
.banner-tilt.active .hero-banner { box-shadow: 0 20px 60px rgba(190, 112, 234, .3); }

/* ─── Tickets : étapes verrouillées ─── */
.step-card { transition: opacity .25s; }
.step-card.locked { opacity: .5; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.step-card.locked > :not(.card-title) { display: none !important; }
.step-card.locked .step { background: var(--card-2); color: var(--muted); }
.step-card.complete .step { background: var(--green); }
.step-lock { display: none; margin-left: auto; font-size: .8rem; font-weight: 500; color: var(--muted); }
.step-lock::before { content: "🔒 "; }
.step-card.locked .step-lock { display: inline; }
.step-card.locked .card-title { margin: 0; }

/* ─── Sélecteur d'emojis façon Discord ─── */
.ep-nav button img { width: 22px; height: 22px; }
.ep-nav button.active { background: #404249; filter: none; }
.ep-guild { width: 28px !important; height: 28px !important; border-radius: 50%; object-fit: cover; }
.ep-guild-letter { display: grid; place-items: center; background: #5865f2; color: #fff; font-size: .8rem; font-weight: 700; }
.ep-title { display: flex; align-items: center; gap: .4rem; }
.ep-title img { width: 16px; height: 16px; border-radius: 50%; }
.ep-item img { width: 32px; height: 32px; }
.ep-item:hover img { transform: scale(1.08); }
.ep-foot { display: flex; align-items: center; gap: .6rem; height: 48px; padding: 0 .9rem; background: #232428; border-top: 1px solid #1e1f22; color: #dbdee1; font-weight: 600; font-size: .92rem; }
.ep-foot img { width: 28px; height: 28px; object-fit: contain; }
.emoji-picker { height: 460px; }
.d-emoji { display: inline-block; }
.step-card:not(.stack-sm):not(.locked) > .card-title { margin-bottom: 1.2rem; }

/* ─── Titre de page + bouton Réinitialiser ─── */
.page-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.btn-reset { color: var(--muted); }
.btn-reset:hover { color: var(--danger); border-color: rgba(242, 80, 93, .5); background: rgba(242, 80, 93, .08); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { filter: brightness(1.08); }

/* Barre d'enregistrement : Annuler + Enregistrer */
.savebar-actions { display: flex; gap: .5rem; }

/* Sélecteur d'emojis : emojis standards uniquement */
.emoji-picker.unicode-only [data-section="server"], .emoji-picker.unicode-only [data-jump="server"] { display: none; }

/* ─── Fenêtre de confirmation ─── */
.modal-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(6, 5, 14, .6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s; }
.modal-overlay.open { opacity: 1; }
.modal { width: min(440px, 100%); background: var(--card); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: var(--shadow); padding: 1.6rem; transform: translateY(8px) scale(.98); transition: transform .18s; }
.modal-overlay.open .modal { transform: none; }
.modal-title { margin: 0 0 .6rem; font-size: 1.15rem; }
.modal-text { color: var(--muted); line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.5rem; }

/* ─── Correctifs graphiques ─── */
/* Les dégradés couvrent aussi la bordure (sinon ils se répètent sur les bords : liserés de couleur) */
.btn-primary, .switch, .swatch, .avatar-btn, .step, .btn-color span { background-origin: border-box; }
.btn-primary { border: none; padding: calc(.65rem + 1px) calc(1.15rem + 1px); }
.btn-primary.btn-sm { padding: calc(.45rem + 1px) calc(.85rem + 1px); }
/* Interrupteur : rond parfaitement centré */
.switch { width: 44px; height: 24px; border: none; box-shadow: inset 0 0 0 1px var(--border-2); }
.switch::after { top: 3px; left: 3px; width: 18px; height: 18px; }
.toggle input:checked + .switch { box-shadow: none; }
.toggle input:checked + .switch::after { transform: translateX(20px); }
/* Pastille « couleur personnalisée » */
.swatch { border: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.swatch.active { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c); }
.swatch-custom { background: conic-gradient(from 0deg, #f2505d, #f0b232, #3ba55d, #22bfea, #6e9aec, #be70ea, #de5fa6, #f2505d); display: grid; place-items: center; }
.swatch-custom::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--card); }
.swatch-custom.active { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #fff; }
/* Liste des variables : largeur suffisante, une ligne par variable */
.ac { min-width: 360px; overflow-x: hidden; }
.ac-item { white-space: nowrap; }
.ac-item code { flex-shrink: 0; }
.ac-item span { overflow: hidden; text-overflow: ellipsis; }

/* ═══ Composants communs ═══ */
.btn-link { background: none; border: none; padding: 0; font: inherit; font-size: .85rem; font-weight: 600; color: var(--violet); cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.icon-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover:not(:disabled) { background: var(--card-2); color: var(--text); }
.icon-btn.danger:hover:not(:disabled) { color: var(--danger); background: rgba(242, 80, 93, .1); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.segmented.small span { padding: .4rem .75rem; font-size: .84rem; }
.back-link { display: inline-block; color: var(--muted); font-size: .88rem; font-weight: 600; margin-bottom: .5rem; }
.back-link:hover { color: var(--text); }
.loading { position: relative; pointer-events: none; }
.loading::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(16, 15, 28, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23be70ea' stroke-width='5' stroke-dasharray='90 60'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center no-repeat; }

/* ═══ Image sous les messages d'arrivée / départ ═══ */
.image-picker { display: flex; gap: 1rem; align-items: center; transition: opacity .2s; }
.image-picker.disabled { opacity: .35; pointer-events: none; }
.image-thumb { width: 190px; aspect-ratio: 17 / 6; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); flex-shrink: 0; }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.embed-image { display: none; width: 100%; max-width: 400px; border-radius: 6px; margin-top: .7rem; }
.msg-attachment { display: none; max-width: 400px; width: 100%; border-radius: 8px; margin-top: .4rem; }

/* ═══ Sélecteur de rôles (barre + « + ») ═══ */
.tag-picker { position: relative; display: block; }
.tag-bar { display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: .45rem .5rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: text; transition: border-color .15s, box-shadow .15s; }
.tag-picker.open .tag-bar { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(190, 112, 234, .2); }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1; }
.tag { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .35rem .3rem .65rem; border-radius: 8px; font-size: .86rem; font-weight: 600; background: color-mix(in srgb, var(--role) 14%, var(--card-2)); border: 1px solid color-mix(in srgb, var(--role) 45%, transparent); }
.tag i, .tag-option i { width: 9px; height: 9px; border-radius: 50%; background: var(--role); flex-shrink: 0; }
.tag button { width: 20px; height: 20px; border: none; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; }
.tag button:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.tag-add { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border-2); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.tag-add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; transition: transform .2s; }
.tag-add:hover { color: var(--text); border-color: var(--violet); background: rgba(190, 112, 234, .1); }
.tag-picker.open .tag-add svg { transform: rotate(45deg); }
.tag-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 25; background: var(--card); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); padding: .45rem; display: none; }
.tag-picker.open .tag-menu { display: block; }
.tag-search { margin-bottom: .35rem; }
.tag-options { max-height: 230px; overflow-y: auto; }
.tag-option { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border-radius: 8px; cursor: pointer; font-weight: 500; }
.tag-option:hover { background: var(--card-2); }
.tag-empty { color: var(--muted); padding: .7rem; font-size: .88rem; text-align: center; }

/* ═══ Liste des messages ═══ */
.msg-list { display: flex; flex-direction: column; gap: .7rem; }
.msg-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; transition: border-color .15s; }
.msg-card:hover { border-color: var(--border-2); }
.msg-card-main { flex: 1; min-width: 0; color: var(--text); }
.msg-card-title { display: flex; align-items: center; gap: .7rem; font-weight: 700; font-size: 1.02rem; }
.msg-card-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-card-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; color: var(--muted); font-size: .84rem; margin-top: .35rem; }
.meta-chip { background: var(--card-2); padding: .1rem .5rem; border-radius: 6px; color: #d4d2ea; }
.msg-card-actions { display: flex; align-items: center; gap: .5rem; }
.msg-card-actions form { display: inline; }
.empty-state { text-align: center; padding: 3rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.empty-state h3 { margin: .4rem 0 0; }
.empty-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: rgba(190, 112, 234, .12); color: var(--violet); }
.empty-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ═══ Éditeur de messages ═══ */
.editor { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.editor-preview { max-height: calc(100vh - var(--topbar) - 2.4rem); overflow-y: auto; }
.blocks-head h2 { margin: .8rem 0 0; }
.blocks { display: flex; flex-direction: column; gap: .7rem; }
.blocks.nested { gap: .55rem; }
.block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s, box-shadow .3s; }
.block:hover { border-color: var(--border-2); }
.block.flash-new { box-shadow: 0 0 0 2px var(--violet); }
.blocks.nested .block { background: var(--bg-2); }
.block-head { display: flex; align-items: center; gap: .7rem; padding: .75rem .8rem .75rem 1rem; cursor: pointer; user-select: none; }
.block-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(190, 112, 234, .13); color: var(--violet); flex-shrink: 0; }
.block-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.block[data-type="embed"] .block-icon, .block[data-type="container"] .block-icon { background: rgba(222, 95, 166, .13); color: var(--pink); }
.block[data-type="buttons"] .block-icon, .block[data-type="select"] .block-icon { background: rgba(110, 154, 236, .14); color: var(--blue); }
.block[data-type="image"] .block-icon, .block[data-type="separator"] .block-icon { background: rgba(34, 191, 234, .12); color: var(--cyan); }
.block-type { font-weight: 700; white-space: nowrap; }
.block-summary { flex: 1; min-width: 0; color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-tools { display: flex; align-items: center; gap: .1rem; }
.chevron-btn { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); }
.chevron-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform .2s; }
.block.collapsed > .block-head .chevron-btn svg { transform: rotate(-90deg); }
.block-body { padding: .2rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.block.collapsed > .block-body { display: none; }
.align-end { align-items: end; }
.row-field { flex-direction: row; align-items: center; gap: .8rem; }
.swatch-none { background: var(--bg-2); position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border-2); }
.swatch-none::after { content: ""; position: absolute; left: 50%; top: 3px; bottom: 3px; width: 2px; background: var(--danger); transform: rotate(45deg); }
.swatch-none.active { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--muted); }
.emoji-col .emoji-field { height: 45px; }

/* Sous-éléments (boutons, options) */
.sub-list { display: flex; flex-direction: column; gap: .7rem; }
.sub-item { border: 1px solid var(--border); border-radius: 12px; padding: .9rem; display: flex; flex-direction: column; gap: .9rem; background: rgba(0, 0, 0, .12); }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sub-title { font-weight: 600; font-size: .9rem; }
.d-button.mini { margin: 0; padding: .3rem .8rem; font-size: .82rem; }

/* Images (envoi ou lien) */
.img-input { display: flex; gap: .8rem; align-items: center; border-radius: 12px; }
.img-thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--bg-2); border: 1px dashed var(--border-2); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; color: var(--muted); }
.img-thumb svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.img-input.has-image .img-thumb { border-style: solid; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-controls { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.img-buttons { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.img-controls input[type=text] { padding: .5rem .7rem; font-size: .86rem; }

/* Container (blocs imbriqués) */
.children { display: flex; flex-direction: column; gap: .6rem; padding: .9rem; border-radius: 12px; border: 1px dashed var(--border-2); }
.children-empty { color: var(--muted); font-size: .88rem; padding: .4rem 0; }

/* Palette « Ajouter un bloc » */
.palette { display: flex; flex-direction: column; gap: .7rem; }
.palette-title { font-weight: 700; display: flex; align-items: center; gap: .4rem; }
.palette.compact .palette-title { font-size: .85rem; color: var(--muted); }
.palette-title svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.palette.compact .palette-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .45rem; }
.palette-item { display: flex; align-items: center; gap: .7rem; text-align: left; padding: .75rem; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font: inherit; transition: border-color .15s, transform .15s, background .15s; }
.palette-item:hover:not(:disabled) { border-color: var(--violet); background: var(--card-2); transform: translateY(-2px); }
.palette-item:disabled { opacity: .35; cursor: not-allowed; }
.palette-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.palette-text b { font-size: .9rem; }
.palette-text small { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.palette.compact .palette-item { flex-direction: column; gap: .35rem; padding: .6rem .3rem; text-align: center; background: var(--bg-2); }
.palette.compact .palette-text b { font-size: .78rem; }
.send-bar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }

/* ═══ Aperçu des messages (composants Discord V2) ═══ */
.v2 { display: flex; flex-direction: column; gap: .5rem; margin-top: .25rem; max-width: 520px; }
.v2-empty { color: #949ba4; font-style: italic; }
.v2-text { color: #dbdee1; line-height: 1.4; word-wrap: break-word; font-size: .95rem; }
.v2-container { position: relative; display: flex; flex-direction: column; gap: .6rem; background: #393a41; border-radius: 8px; padding: .9rem 1rem; overflow: hidden; border: 1px solid #44454c; }
.v2-container::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.v2-container.spoiler { filter: blur(0); }
.v2-section { display: flex; gap: 1rem; justify-content: space-between; }
.v2-thumb { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.v2-gallery img { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; }
.v2-gallery.spoiler img { filter: blur(24px); }
.v2-sep.small { height: 4px; }
.v2-sep.large { height: 16px; }
.v2-sep.line { display: flex; align-items: center; }
.v2-sep.line::after { content: ""; flex: 1; height: 1px; background: #4e5058; }
.v2-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.v2-row .d-button { margin: 0; }
.d-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.d-button .d-emoji { width: 1.15em; height: 1.15em; }
.v2-select { display: flex; align-items: center; justify-content: space-between; background: #1e1f22; border: 1px solid #1e1f22; border-radius: 6px; padding: .6rem .75rem; color: #949ba4; font-size: .92rem; max-width: 420px; }
.v2-select svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Mise en forme Discord (titres, petit texte, listes, citations, liens) */
.md-h1 { font-size: 1.5rem; font-weight: 800; color: #f2f3f5; margin: .3rem 0 .15rem; line-height: 1.25; }
.md-h2 { font-size: 1.25rem; font-weight: 700; color: #f2f3f5; margin: .25rem 0 .1rem; line-height: 1.25; }
.md-h3 { font-size: 1.05rem; font-weight: 700; color: #f2f3f5; margin: .1rem 0; line-height: 1.3; }
.md-h3.is-link { color: #00a8fc; }
.md-sub { font-size: .78rem; color: #949ba4; }
.md-quote { border-left: 4px solid #4e5058; padding-left: .7rem; }
.md-li { padding-left: 1.1rem; position: relative; }
.md-li::before { content: "•"; position: absolute; left: .3rem; }
.md-link { color: #00a8fc; }
.embed-desc .md-line, .msg-text .md-line { min-height: 1.2em; }

@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; max-height: none; }
}
input[type=number] { color-scheme: dark; }

/* ═══ Bannière (pleine largeur, bouton crayon, avatar du membre) ═══ */
.banner-compose { position: relative; display: block; line-height: 0; }
.banner-compose > img:first-child { width: 100%; height: auto; display: block; }
.banner-avatar { position: absolute; border-radius: 50%; object-fit: cover; background: #1e1f22; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); pointer-events: none; }
.banner-avatar[hidden] { display: none; }
.banner-edit { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); transition: opacity .2s; }
.banner-edit.disabled, .toggle.disabled { opacity: .35; pointer-events: none; }
.banner-tools { position: absolute; top: .6rem; right: .6rem; display: flex; gap: .4rem; line-height: normal; }
.banner-tool { width: 34px; height: 34px; border-radius: 9px; border: none; display: grid; place-items: center; cursor: pointer; background: rgba(17, 18, 20, .82); color: #fff; backdrop-filter: blur(4px); transition: background .15s, transform .15s; }
.banner-tool:hover { background: rgba(17, 18, 20, .95); transform: scale(1.06); }
.banner-tool svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.banner-tool[hidden] { display: none; }
.embed-image.banner-compose { border-radius: 6px; overflow: hidden; margin-top: .7rem; max-width: 400px; }
.msg-attachment.banner-compose { border-radius: 8px; overflow: hidden; margin-top: .4rem; max-width: 400px; }

/* ═══ Éditeur de texte visuel ═══ */
.ac-wrap.has-rich { position: relative; }
.rich { position: relative; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; }
.rich.focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(190, 112, 234, .2); }
.rich-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: .35rem .4rem; border-bottom: 1px solid var(--border); }
.rich-btn { position: static !important; transform: none !important; min-width: 30px; height: 30px; padding: 0 .4rem; border: none; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem; font-weight: 700; display: inline-grid; place-items: center; transition: background .12s, color .12s; }
.rich-btn small { font-size: .72rem; font-weight: 600; }
.rich-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rich-btn:hover { background: var(--card-2); color: var(--text); }
.rich-btn.active { background: rgba(190, 112, 234, .18); color: #fff; }
.rich-emoji { margin-left: auto; width: 30px !important; height: 30px !important; }
.rich-emoji svg { width: 19px; height: 19px; }
.rich-sep { width: 1px; height: 18px; background: var(--border-2); margin: 0 .3rem; }
.rich-area { padding: .7rem .85rem; outline: none; line-height: 1.5; color: var(--text); word-wrap: break-word; cursor: text; }
.rich.is-empty .rich-area::before { content: attr(data-placeholder); color: #6d6a8a; position: absolute; pointer-events: none; }
.rich-area h1 { font-size: 1.45rem; margin: .2rem 0; font-weight: 800; }
.rich-area h2 { font-size: 1.2rem; margin: .2rem 0; font-weight: 700; }
.rich-area h3 { font-size: 1.05rem; margin: .15rem 0; font-weight: 700; }
.rich-area h6 { font-size: .8rem; margin: 0; font-weight: 500; color: var(--muted); }
.rich-area blockquote { margin: .1rem 0; padding-left: .75rem; border-left: 4px solid var(--border-2); }
.rich-area ul { margin: .15rem 0; padding-left: 1.3rem; }
.rich-area code { background: #1e1f22; padding: .05rem .3rem; border-radius: 4px; font-size: .88em; }
.rich-area a { color: #00a8fc; }
.rich-area .d-emoji { width: 1.3em; height: 1.3em; vertical-align: -.28em; }
.rich .ac { top: calc(100% + 6px); }
.rich-pop { position: absolute; top: 44px; left: .5rem; z-index: 30; display: flex; gap: .4rem; padding: .45rem; background: var(--card); border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow); width: min(360px, calc(100% - 1rem)); }
.rich-pop input { padding: .45rem .6rem; }

/* ═══ Éditeur de messages : plus large, plus simple ═══ */
.layout.wide { max-width: 1680px; }
.layout.wide .editor { grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr); }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem .5rem .8rem; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; color: #d4d2ea; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; color: var(--muted); transition: color .15s; }
.pill:hover { border-color: var(--violet); background: rgba(190, 112, 234, .1); color: #fff; }
.pill:hover svg { color: var(--violet); }
.pills.compact .pill { padding: .35rem .8rem .35rem .6rem; font-size: .82rem; }
.add-block { padding: 1rem 1.2rem; }
.block.no-body .block-head { cursor: default; }
.children { border-style: dashed; gap: .7rem; }
.sub-head .d-button.mini { display: inline-flex; align-items: center; gap: .35rem; }

/* Correctifs : couleurs des boutons et champs image ne débordent plus */
.btn-colors { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.btn-color span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-input { align-items: flex-start; }
.img-controls { min-width: 0; }
.img-controls input[type=text] { width: 100%; min-width: 0; }
.img-buttons .btn { white-space: nowrap; }
.inline-fields > .field { flex: 1; min-width: 200px; }
.v2-gallery img { width: 100%; object-fit: cover; }
.topbar-inner.wide { max-width: 1680px; }
.rich-bar { gap: 1px; padding: .3rem .35rem; }
.rich-btn { min-width: 27px; height: 28px; padding: 0 .3rem; font-size: .84rem; }
.rich-sep { margin: 0 .2rem; }
.rich-emoji { width: 28px !important; height: 28px !important; }

/* ═══ Pleine largeur ═══ */
.topbar-inner, .topbar-inner.wide { max-width: none; padding: 0 2rem; }
.layout, .layout.wide { max-width: none; }
.container { max-width: none; padding: 2.5rem 2rem; }
.container.narrow { max-width: 480px; }
.content { padding: 2.2rem 2.5rem 6rem; }
.two-cols { grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr); }
.layout .editor, .layout.wide .editor { grid-template-columns: minmax(0, 1.4fr) minmax(400px, 1fr); }
.editor-preview { max-height: none; overflow: visible; }

/* ═══ Barres de défilement ═══ */
* { scrollbar-width: thin; scrollbar-color: #3b3860 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3b3860; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #57538a; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ═══ Mentions (@rôle, #salon) ═══ */
.mention-chip { display: inline-block; padding: 0 .3rem; border-radius: 4px; font-weight: 600; background: color-mix(in srgb, var(--mc, #5865f2) 28%, transparent); color: color-mix(in srgb, var(--mc, #c9cdfb) 55%, #fff); user-select: all; }
.mention { background: color-mix(in srgb, var(--mc, #5865f2) 30%, transparent); color: color-mix(in srgb, var(--mc, #c9cdfb) 55%, #fff); }
.rich-at { font-size: 1rem; font-weight: 800; }

/* ═══ Glisser-déposer des blocs ═══ */
.drag-handle { width: 22px; height: 32px; display: grid; place-items: center; color: #5d5a82; cursor: grab; flex-shrink: 0; margin-left: -.4rem; border-radius: 6px; }
.drag-handle:hover { color: var(--text); background: var(--card-2); }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.block.dragging { opacity: .4; }
.block.drop-before { box-shadow: 0 -3px 0 0 var(--violet); }
.block.drop-after { box-shadow: 0 3px 0 0 var(--violet); }

/* ═══ Menu du compte : un peu plus bas, espacement régulier ═══ */
.menu { top: calc(100% + 16px); }
.menu-user { border-bottom: none; margin-bottom: 0; padding-bottom: .6rem; }
.menu-sep { height: 1px; background: var(--border); margin: .4rem .3rem; }
.menu-item.danger { margin-top: 0; }
.menu-item.danger::before { display: none; }

/* ═══ Barre « modifications non enregistrées » : alerte façon Discord ═══ */
.savebar { transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), background .2s, border-color .2s; }
.savebar.alert { background: #3a1418; border-color: var(--danger); }
.savebar.alert .savebar-text { color: #ffb3b9; }
.savebar.alert .dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.savebar.shake { animation: savebar-shake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes savebar-shake {
  10%, 90% { transform: translate(calc(-50% - 2px), 0); }
  20%, 80% { transform: translate(calc(-50% + 4px), 0); }
  30%, 50%, 70% { transform: translate(calc(-50% - 8px), 0); }
  40%, 60% { transform: translate(calc(-50% + 8px), 0); }
}

/* Panneau de tickets : grande image dans l'aperçu */
.embed-big { display: none; width: 100%; max-width: 400px; border-radius: 6px; margin-top: .7rem; }
.preview .embed { position: relative; }
.embed-thumb[src=""], .embed-thumb:not([src]) { display: none; }
.img-buttons svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ═══ Statistiques ═══ */
.stat-card { display: flex; flex-direction: column; gap: 1.1rem; }
.stat-head { display: flex; align-items: center; gap: .9rem; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(110, 154, 236, .14); color: var(--blue); flex-shrink: 0; }
.stat-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat-head-text { flex: 1; min-width: 0; }
.stat-live { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.small { font-size: .84rem; }
.warn-text { color: #f0b232; }
.add-block .pills form { display: contents; }
[data-for-type][hidden] { display: none !important; }

/* ═══ Statistiques — page vide avec illustration ═══ */
.stats-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; padding: 3rem 1rem 2rem; }
.stats-hero h2 { margin: 0; font-size: 1.5rem; }
.stats-illu { position: relative; width: 480px; max-width: 100%; height: 290px; margin: 1.8rem 0 2rem; }
.illu-card, .illu-pill { position: absolute; background: #1e1f22; border: 1px solid #2b2d31; border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); color: #b5bac1; text-align: left; }
.illu-card svg, .illu-pill svg, .ds-row svg, .ds-cat svg, .ds-head svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.illu-server { left: 70px; top: 0; width: 300px; padding: .9rem 1.1rem; }
.illu-head { display: flex; align-items: center; gap: .3rem; font-weight: 600; color: #dbdee1; margin-bottom: .6rem; white-space: nowrap; overflow: hidden; }
.illu-head svg { width: 15px; height: 15px; }
.illu-row { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; }
.illu-row b { color: #dbdee1; font-weight: 600; white-space: nowrap; }
.illu-hash { font-size: 1.3rem; color: #80848e; width: 18px; text-align: center; }
.illu-bar { display: inline-block; height: 12px; width: 120px; border-radius: 6px; background: #4e5058; }
.illu-bar.short { width: 90px; }
.illu-stats { left: 225px; top: 52px; width: 250px; padding: .9rem 1.1rem; border-color: rgba(190, 112, 234, .35); box-shadow: 0 18px 50px rgba(190, 112, 234, .18), 0 18px 40px rgba(0, 0, 0, .45); animation: illu-float 6s ease-in-out infinite; }
.illu-cat { display: flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #949ba4; margin-bottom: .3rem; }
.illu-cat svg { width: 13px; height: 13px; }
.illu-stats svg { color: var(--violet); }
.illu-pill { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; }
.illu-pill svg { color: var(--pink); }
.illu-pill b { color: #dbdee1; white-space: nowrap; }
.illu-pill-1 { left: 0; top: 150px; animation: illu-float 7s ease-in-out -2s infinite; }
.illu-pill-2 { left: 0; top: 214px; animation: illu-float 7s ease-in-out -4s infinite; }
@keyframes illu-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ═══ Statistiques — liste + aperçu Discord ═══ */
.stats-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.stat-list { display: flex; flex-direction: column; gap: .6rem; }
.stat-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.stat-row:hover, .stat-row:focus-visible { border-color: var(--violet); background: var(--card-2); outline: none; transform: translateY(-1px); }
.stat-kind { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: rgba(190, 112, 234, .14); color: var(--violet); }
.stat-kind svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat-kind.kind-text { background: rgba(110, 154, 236, .14); color: var(--blue); }
.stat-kind.kind-category { background: rgba(222, 95, 166, .14); color: var(--pink); }
.stat-kind.kind-none { background: rgba(240, 178, 50, .12); color: #f0b232; }
.stat-row-text { flex: 1; min-width: 0; }
.stat-row-name { font-weight: 700; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row-meta { display: flex; align-items: center; gap: .5rem; margin-top: .3rem; color: var(--muted); font-size: .84rem; }
.stat-row-value { font-size: 1.4rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-row-edit { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; opacity: 0; transition: opacity .15s; }
.stat-row:hover .stat-row-edit { opacity: 1; }
.stat-row-edit svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.discord-side { position: sticky; top: calc(var(--topbar) + 1.2rem); background: #2b2d31; border: 1px solid #1e1f22; border-radius: 12px; overflow: hidden; color: #949ba4; }
.ds-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; font-weight: 700; color: #f2f3f5; border-bottom: 1px solid #1f2023; box-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.ds-list { padding: .6rem .5rem .9rem; display: flex; flex-direction: column; gap: 2px; }
.ds-cat { display: flex; align-items: center; gap: .25rem; padding: .9rem .3rem .3rem; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.ds-cat svg { width: 12px; height: 12px; }
.ds-row { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border-radius: 6px; color: #b5bac1; font-weight: 500; }
.ds-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-row:hover { background: #35373c; color: #dbdee1; }
.ds-ghost { opacity: .6; }
.ds-ghost .illu-bar { height: 10px; }

/* ═══ Statistiques — fenêtre ═══ */
.modal-overlay[hidden] { display: none; }
.stat-modal .modal { width: min(540px, 100%); padding: 0; overflow: visible; }
.modal-body { padding: 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; }
.modal-body .modal-title { margin: 0 0 .2rem; text-transform: uppercase; font-size: 1.05rem; letter-spacing: .02em; }
.modal-footer { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.6rem; background: rgba(0, 0, 0, .18); border-top: 1px solid var(--border); border-radius: 0 0 16px 16px; }
.modal-footer .spacer { flex: 1; }
.stat-modal .label { text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; color: var(--muted); }
.kind-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.kind-option input { position: absolute; opacity: 0; pointer-events: none; }
.kind-option span { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .85rem .4rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; text-align: center; transition: all .15s; }
.kind-option span svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.kind-option b { font-size: .8rem; font-weight: 600; }
.kind-option span:hover { border-color: var(--border-2); }
.kind-option input:checked + span { border-color: var(--violet); background: rgba(190, 112, 234, .12); box-shadow: inset 0 0 0 1px var(--violet); }
.kind-option input:checked + span svg { color: var(--violet); }
.name-preview { display: flex; align-items: center; gap: .55rem; margin-top: .3rem; padding: .55rem .7rem; border-radius: 8px; background: #2b2d31; color: #dbdee1; font-weight: 600; min-height: 38px; }
.name-preview::before { content: ""; width: 18px; height: 18px; flex-shrink: 0; background: #949ba4; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.name-preview.kind-voice { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4zM15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E"); }
.name-preview.kind-text { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 9h16M4 15h16M10 3 8 21M16 3l-2 18'/%3E%3C/svg%3E"); }
.name-preview.kind-category { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); text-transform: uppercase; font-size: .82rem; letter-spacing: .03em; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.3); }
@media (max-width: 1100px) { .stats-layout { grid-template-columns: 1fr; } .discord-side { position: static; } }
@media (max-width: 560px) { .kind-picker { grid-template-columns: repeat(2, 1fr); } .stats-illu { transform: scale(.8); transform-origin: top center; } }
/* Un élément masqué reste masqué, quel que soit son style */
[hidden] { display: none !important; }
.modal-overlay { overflow-y: auto; }
.stat-modal .modal { margin: auto; }

/* ═══════ Statistiques — nouveau design ═══════ */
.sg-icon svg, .se svg, .sg svg, .drawer svg, .kind-seg svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Page vide : tuiles de chiffres → nom de salon */
.se { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding: 2.5rem 2rem; border-radius: 24px; border: 1px solid var(--border);
  background: radial-gradient(600px 300px at 15% 20%, rgba(190, 112, 234, .14), transparent 70%), radial-gradient(500px 300px at 90% 90%, rgba(110, 154, 236, .12), transparent 70%), var(--card); }
.se-visual { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.se-tiles { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: .8rem; width: 100%; max-width: 440px; }
.se-tile { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 18px; padding: 1rem 1.1rem; display: flex; flex-direction: column; justify-content: space-between; gap: .4rem; position: relative; overflow: hidden; }
.se-big { grid-row: span 2; padding: 1.3rem; }
.se-label { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .85rem; font-weight: 600; }
.se-label svg { width: 16px; height: 16px; }
.se-tile > b { font-size: 1.9rem; font-weight: 800; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.se-big > b { font-size: 3rem; }
.se-spark { width: 100%; height: 46px; }
.se-spark path { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 200; stroke-dashoffset: 200; animation: se-draw 1.8s ease-out .2s forwards; }
@keyframes se-draw { to { stroke-dashoffset: 0; } }
.se-flow { display: flex; flex-direction: column; gap: 6px; padding: .2rem 0; }
.se-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); opacity: .25; animation: se-pulse 1.4s ease-in-out infinite; }
.se-dot:nth-child(2) { animation-delay: .2s; }
.se-dot:nth-child(3) { animation-delay: .4s; }
@keyframes se-pulse { 50% { opacity: 1; transform: scale(1.3); } }
.se-chip { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border-radius: 999px; background: #1e1f22; border: 1px solid rgba(190, 112, 234, .45); box-shadow: 0 10px 30px rgba(190, 112, 234, .2); font-weight: 600; color: #dbdee1; }
.se-chip svg { width: 18px; height: 18px; color: var(--violet); }
.se-chip b { font-variant-numeric: tabular-nums; }
.se-text { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.se-text h2 { margin: 0; font-size: 2rem; line-height: 1.15; }
.se-text p { font-size: 1.02rem; line-height: 1.55; max-width: 440px; margin-bottom: .6rem; }

/* Grille des compteurs */
.sg { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.sg-card { position: relative; display: flex; flex-direction: column; gap: .9rem; padding: 1.2rem 1.3rem; border-radius: 18px; background: var(--card); border: 1px solid var(--border); cursor: pointer; text-align: left; color: var(--text); font: inherit; overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; }
.sg-card::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(190, 112, 234, .16), transparent 70%); pointer-events: none; }
.sg-card:hover, .sg-card:focus-visible { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 14px 34px rgba(190, 112, 234, .16); outline: none; }
.sg-top { display: flex; align-items: center; gap: .6rem; }
.sg-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: rgba(190, 112, 234, .15); color: var(--violet); }
.sg-icon svg { width: 18px; height: 18px; }
.sg-icon.t-humans, .sg-icon.t-roleMembers { background: rgba(222, 95, 166, .15); color: var(--pink); }
.sg-icon.t-bots, .sg-icon.t-api { background: rgba(110, 154, 236, .15); color: var(--blue); }
.sg-icon.t-roles, .sg-icon.t-categoryChannels { background: rgba(34, 191, 234, .13); color: var(--cyan); }
.sg-icon.t-channels { background: rgba(242, 80, 93, .13); color: var(--red); }
.sg-type { flex: 1; font-weight: 600; color: var(--muted); font-size: .9rem; }
.sg-edit { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); opacity: 0; transition: opacity .15s; }
.sg-edit svg { width: 15px; height: 15px; }
.sg-card:hover .sg-edit { opacity: 1; }
.sg-value { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sg-channel { display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; border-radius: 10px; background: var(--bg-2); color: #d4d2ea; font-size: .88rem; font-weight: 600; min-width: 0; }
.sg-channel svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
.sg-channel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-channel.missing { color: #f0b232; background: rgba(240, 178, 50, .08); }
.sg-channel.missing svg { color: #f0b232; }
.sg-add { align-items: center; justify-content: center; gap: .7rem; min-height: 180px; border-style: dashed; border-width: 2px; background: transparent; color: var(--muted); font-weight: 600; }
.sg-add::after { display: none; }
.sg-add-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); transition: background .18s, color .18s; }
.sg-add-icon svg { width: 22px; height: 22px; }
.sg-add:hover { color: var(--text); }
.sg-add:hover .sg-add-icon { background: var(--gradient); color: #fff; }
.sg-info { margin-top: 1rem; }

/* Panneau centré (même contenu que l'ancien panneau latéral) */
.drawer-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(6, 5, 14, .6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.drawer-overlay[hidden] { display: none !important; }
.drawer-overlay.open { opacity: 1; }
.drawer { position: relative; width: min(600px, 100%); max-height: min(860px, calc(100vh - 3rem)); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border-2); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(190, 112, 234, .08); transform: translateY(18px) scale(.96); opacity: 0; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.drawer-overlay.open .drawer { transform: none; opacity: 1; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font-size: 1.2rem; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1.3rem 1.5rem 2rem; display: flex; flex-direction: column; }
.drawer-foot { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--bg-2); }
.drawer-foot .spacer { flex: 1; }

/* Étapes du panneau (ligne verticale) */
.dstep { position: relative; padding-left: 2.6rem; padding-bottom: 1.6rem; transition: opacity .2s; }
.dstep::before { content: ""; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 2px; background: var(--border); border-radius: 2px; }
.dstep:last-child::before { display: none; }
.dstep.done::before { background: linear-gradient(var(--violet), var(--border)); }
.dstep-head { display: flex; align-items: center; gap: .7rem; min-height: 30px; margin-bottom: .9rem; font-weight: 700; }
.dstep-num { position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 800; background: var(--gradient); background-origin: border-box; color: #fff; }
.dstep.done .dstep-num { background: var(--green); }
.dstep.locked { opacity: .45; }
.dstep.locked .dstep-num { background: var(--card-2); color: var(--muted); }
.dstep.locked .dstep-body { display: none; }
.dstep-body { display: flex; flex-direction: column; gap: 1rem; }

.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; }
.type-tile input { position: absolute; opacity: 0; pointer-events: none; }
.type-tile > span { display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; transition: all .15s; }
.type-tile b { font-size: .88rem; font-weight: 600; }
.type-tile > span:hover { border-color: var(--border-2); }
.type-tile input:checked + span { border-color: var(--violet); background: rgba(190, 112, 234, .1); box-shadow: inset 0 0 0 1px var(--violet); }
.type-tile input:focus-visible + span { box-shadow: 0 0 0 3px rgba(190, 112, 234, .35); }

.kind-seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.kind-seg input { position: absolute; opacity: 0; pointer-events: none; }
.kind-seg span { display: flex; align-items: center; gap: .55rem; padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; font-weight: 600; font-size: .9rem; transition: all .15s; }
.kind-seg span svg { width: 18px; height: 18px; color: var(--muted); }
.kind-seg span:hover { border-color: var(--border-2); }
.kind-seg input:checked + span { border-color: var(--violet); background: rgba(190, 112, 234, .1); box-shadow: inset 0 0 0 1px var(--violet); }
.kind-seg input:checked + span svg { color: var(--violet); }

.name-result { display: flex; flex-direction: column; gap: .4rem; padding: .9rem; border-radius: 14px; background: linear-gradient(135deg, rgba(190, 112, 234, .12), rgba(110, 154, 236, .08)); border: 1px solid rgba(190, 112, 234, .25); }
.name-result-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.name-result .name-preview { margin: 0; background: #1e1f22; }

@media (max-width: 1000px) { .se { grid-template-columns: 1fr; text-align: center; } .se-text { align-items: center; } }
@media (max-width: 520px) { .type-grid, .kind-seg { grid-template-columns: 1fr; } }
.sg-value, .se-tile > b, .stat-row-value { width: fit-content; }

/* ═══════ Pages d'accueil animées (onglets pas encore configurés) ═══════ */
.se { margin-bottom: 1.5rem; }
.se-tile, .se-chip, .se-flow { opacity: 0; animation: se-in .6s cubic-bezier(.2, .8, .2, 1) forwards; }
.se-tile:nth-child(2) { animation-delay: .12s; }
.se-tile:nth-child(3) { animation-delay: .24s; }
.se-flow { animation-delay: .45s; }
.se-chip { animation: se-pop .55s cubic-bezier(.2, 1.3, .4, 1) .7s forwards; }
.se-text > * { opacity: 0; animation: se-in .6s cubic-bezier(.2, .8, .2, 1) forwards; }
.se-text > :nth-child(2) { animation-delay: .1s; }
.se-text > :nth-child(3) { animation-delay: .2s; }
@keyframes se-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes se-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.se-chip [data-type-text]::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--violet); animation: se-caret 1s steps(1) infinite; }
.se-chip [data-type-text].typed::after { display: none; }
@keyframes se-caret { 50% { opacity: 0; } }
.se-check { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(59, 165, 93, .15); color: var(--green); }
.se-check svg { width: 20px; height: 20px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: se-draw .6s ease-out 1s forwards; }

/* Arrivée / départ : mini bannière */
.se-mini-banner { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; flex: 1; min-height: 130px; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 45%), var(--gradient); }
.se-mini-banner::before { content: ""; position: absolute; inset: 0; background: rgba(10, 8, 22, .2); }
.se-mini-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%); transform: translateX(-100%); animation: se-shine 3.2s ease-in-out 1s infinite; }
.se-mini-banner > * { position: relative; z-index: 1; }
.se-mini-banner img { width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff; object-fit: cover; animation: se-pop .5s cubic-bezier(.2, 1.3, .4, 1) .35s both; }
.se-mini-banner strong { color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: .08em; }
.se-mini-banner small { color: rgba(255, 255, 255, .85); font-weight: 600; }
@keyframes se-shine { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }
.se-leave .se-mini-banner img { filter: grayscale(.6); }

/* Tickets : mini panneau + bouton cliqué */
.se-mini-panel { display: flex; flex-direction: column; gap: .6rem; padding: .9rem; border-radius: 12px; background: #2b2d31; border-left: 4px solid var(--violet); }
.se-mini-panel strong { color: #f2f3f5; font-size: .95rem; }
.se-lines { display: flex; flex-direction: column; gap: 5px; }
.se-lines i { height: 7px; border-radius: 4px; background: #4e5058; }
.se-lines i:last-child { width: 65%; }
.se-btn { position: relative; align-self: flex-start; padding: .45rem .9rem; border-radius: 6px; background: #5865f2; color: #fff; font-size: .85rem; font-weight: 600; animation: se-press 3s ease-in-out 1.2s infinite; }
.se-cursor { position: absolute; right: -14px; bottom: -16px; width: 18px; height: 18px; background: #fff; clip-path: polygon(0 0, 0 80%, 25% 60%, 45% 100%, 60% 92%, 42% 55%, 75% 55%); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); animation: se-cursor 3s ease-in-out 1.2s infinite; }
@keyframes se-press { 0%, 40%, 60%, 100% { transform: none; filter: none; } 48% { transform: scale(.94); filter: brightness(1.2); } }
@keyframes se-cursor { 0% { transform: translate(30px, 24px); opacity: 0; } 30% { transform: none; opacity: 1; } 48% { transform: scale(.85); } 60%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.se-avatars { display: flex; }
.se-avatars i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--bg-2); margin-left: -8px; background: var(--violet); animation: se-pop .4s cubic-bezier(.2, 1.3, .4, 1) both; }
.se-avatars i:first-child { margin-left: 0; animation-delay: .5s; }
.se-avatars i:nth-child(2) { background: var(--pink); animation-delay: .65s; }
.se-avatars i:nth-child(3) { background: var(--blue); animation-delay: .8s; }
.se-roles i { border-radius: 9px; }

/* Messages : blocs qui s'assemblent */
.se-blocks { display: flex; flex-direction: column; gap: .45rem; }
.se-blocks span { display: flex; align-items: center; gap: .55rem; padding: .55rem .75rem; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border-2); font-size: .85rem; font-weight: 600; opacity: 0; animation: se-slide 4.5s ease-in-out infinite; }
.se-blocks span svg { width: 16px; height: 16px; color: var(--violet); }
.se-blocks span:nth-child(2) { animation-delay: .35s; }
.se-blocks span:nth-child(3) { animation-delay: .7s; }
@keyframes se-slide { 0% { opacity: 0; transform: translateX(-16px); } 12%, 80% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateX(10px); } }
.se-pills { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.se-pills i { height: 10px; border-radius: 5px; background: var(--card-2); position: relative; overflow: hidden; }
.se-pills i::after { content: ""; position: absolute; inset: 0; width: 0; background: var(--gradient); animation: se-fill 2.4s ease-in-out 1s infinite alternate; }
.se-pills i:last-child { width: 70%; }
@keyframes se-fill { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .se *, .se *::before, .se *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }

/* ═══════ Tickets : vue d'ensemble + panneau de configuration ═══════ */
.page-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tk-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; }
.tk-static { cursor: default; }
.tk-static:hover { transform: none; border-color: var(--border); box-shadow: none; }
.sg-icon.t-ok { background: rgba(59, 165, 93, .15); color: var(--green); }
.sg-icon.t-off { background: var(--card-2); color: var(--muted); }
.tk-toggle .toggle { margin-top: .2rem; }
.tk-status { font-size: 1.5rem; font-weight: 800; color: var(--muted); }
.tk-status.on { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tk-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.tk-card { gap: .8rem; }
.tk-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .85rem; font-weight: 800; color: #fff; background: var(--gradient); }
.tk-card .sg-type { color: var(--text); font-size: 1rem; font-weight: 700; }
.tk-lines { display: flex; flex-direction: column; gap: .45rem; }
.tk-roles, .tk-flags, .tk-panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.tk-panel-row { justify-content: space-between; }
.tk-role { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .65rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); font-size: .82rem; font-weight: 600; }
.tk-role i { width: 9px; height: 9px; border-radius: 50%; background: var(--role); }
.tk-muted { color: var(--muted); font-size: .88rem; }
.tk-btn { padding: .4rem .85rem; border-radius: 6px; background: var(--c); color: #fff; font-size: .85rem; font-weight: 600; }
.tk-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--card-2); }
.tk-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tk-badge.on { color: var(--green); background: rgba(59, 165, 93, .13); }
.tk-quote { margin: 0; padding: .7rem .85rem; border-radius: 10px; background: var(--bg-2); border-left: 3px solid var(--violet); color: #d4d2ea; font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tk-card svg, .tk-static svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drawer-xl { width: min(1000px, 100%); }
.tk-panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.tk-panel-grid > :last-child { position: sticky; top: 0; }
.drawer .btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 1000px) { .tk-cards, .tk-panel-grid { grid-template-columns: 1fr; } .tk-numbers { grid-template-columns: 1fr; } }

/* Accueil Tickets : conversation animée */
.se-chat { display: flex; flex-direction: column; gap: .55rem; flex: 1; justify-content: center; }
.se-msg { display: flex; align-items: flex-end; gap: .5rem; opacity: 0; animation: se-chat 7s ease-in-out infinite; }
.se-msg span { padding: .5rem .75rem; border-radius: 14px 14px 14px 4px; background: #2b2d31; color: #dbdee1; font-size: .8rem; font-weight: 500; line-height: 1.35; max-width: 85%; }
.se-av { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; background: var(--pink); }
.se-staff { flex-direction: row-reverse; animation-delay: 1.1s; }
.se-staff span { border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, rgba(190, 112, 234, .35), rgba(110, 154, 236, .3)); color: #fff; }
.se-staff .se-av { background: var(--violet); }
.se-typing { animation-delay: 2.2s; }
.se-typing span { display: inline-flex; gap: 4px; padding: .6rem .75rem; }
.se-typing b { width: 6px; height: 6px; border-radius: 50%; background: #949ba4; animation: se-pulse 1.2s ease-in-out infinite; }
.se-typing b:nth-child(2) { animation-delay: .15s; }
.se-typing b:nth-child(3) { animation-delay: .3s; }
@keyframes se-chat { 0%, 4% { opacity: 0; transform: translateY(10px); } 10%, 82% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-6px); } }
.se-ring { display: flex; align-items: center; gap: .6rem; }
.se-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.se-ring circle { fill: none; stroke: var(--card-2); stroke-width: 4; }
.se-ring .se-ring-fill { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 94.2; stroke-dashoffset: 94.2; animation: se-ring 1.4s ease-out .8s forwards; }
.se-ring em { font-style: normal; font-weight: 800; font-size: 1.25rem; color: var(--text); }
@keyframes se-ring { to { stroke-dashoffset: 24; } }

/* Tickets : vue d'ensemble compacte */
.tk-summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.1rem 1.4rem; margin-bottom: 1rem; }
.tk-sum-status .toggle { gap: .8rem; }
.tk-status { font-size: 1.15rem; }
.tk-sum-nums { display: flex; gap: 2.2rem; }
.tk-sum-nums div { display: flex; align-items: baseline; gap: .5rem; }
.tk-sum-nums b { font-size: 1.6rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tk-sum-nums span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.tk-rows { padding: .4rem; margin-bottom: 2rem; display: flex; flex-direction: column; }
.tk-row { display: grid; grid-template-columns: auto 190px minmax(0, 1fr) auto; align-items: center; gap: 1rem; width: 100%; padding: .85rem 1rem; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.tk-row + .tk-row { border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.tk-row:hover { background: var(--card-2); border-radius: 12px; }
.tk-row:hover + .tk-row { border-top-color: transparent; }
.tk-row > svg { width: 18px; height: 18px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s, color .15s; }
.tk-row:hover > svg { color: var(--text); transform: translateX(3px); }
.tk-row .tk-num { width: 26px; height: 26px; font-size: .78rem; }
.tk-row-title { font-weight: 700; }
.tk-row-sum { display: flex; align-items: center; gap: .5rem; min-width: 0; flex-wrap: wrap; color: #c9c7df; font-size: .88rem; }
.tk-item { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; }
.tk-item svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tk-item + .tk-item::before { content: "·"; color: var(--muted); margin-right: .2rem; }
.tk-item.missing { color: var(--muted); font-style: italic; }
.tk-ellipsis { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tk-row .tk-role { padding: .2rem .55rem; font-size: .78rem; }
.tk-more { color: var(--muted); font-size: .8rem; font-weight: 700; }
.tk-row .tk-badge { padding: .2rem .55rem; font-size: .76rem; }
@media (max-width: 800px) { .tk-row { grid-template-columns: auto minmax(0, 1fr) auto; } .tk-row-sum { grid-column: 2 / 3; } .tk-row > svg { grid-row: 1; grid-column: 3; } }

/* Tickets : plus d'espace, statut en blanc comme « Activer » */
.tk-summary { padding: 1.4rem 1.7rem; margin-bottom: 1.4rem; }
.tk-status, .tk-status.on { font-size: 1rem; font-weight: 600; color: var(--text); background: none; -webkit-background-clip: border-box; background-clip: border-box; }
.tk-sum-nums { gap: 2.8rem; }
.tk-rows { padding: .7rem; gap: .2rem; margin-bottom: 2.6rem; }
.tk-row { padding: 1.15rem 1.2rem; gap: 1.3rem; }
.tk-row-sum { gap: .7rem; }
.tk-row .tk-role, .tk-row .tk-badge { padding: .28rem .65rem; }

/* ═══════ Rôles-réactions ═══════ */
.rr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.rr-card { gap: .85rem; }
.rr-title { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-pairs { display: flex; flex-wrap: wrap; gap: .4rem; }
.rr-pair { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem .25rem .4rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); font-size: .82rem; font-weight: 600; }
.rr-pair i { width: 8px; height: 8px; border-radius: 50%; background: var(--role); }
.rr-pair .d-emoji { width: 18px; height: 18px; vertical-align: middle; }
.rr-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; }
.rr-mode { font-size: .8rem; font-weight: 700; color: var(--violet); }
.sg-card svg, .sg-add svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rr-rows { display: flex; flex-direction: column; gap: .55rem; }
.rr-row { display: grid; grid-template-columns: 52px auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; }
.rr-row .emoji-field { width: 52px; height: 44px; }
.rr-arrow { color: var(--muted); font-weight: 700; }
.rr-del svg, .rr-add svg, .drawer-foot .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rr-add { align-self: flex-start; margin-top: .7rem; gap: .45rem; }
.rr-count { margin-left: auto; color: var(--muted); font-size: .8rem; font-weight: 600; }
.rr-modes { grid-template-columns: 1fr; margin-top: 0; }
.drawer-foot .btn-danger { gap: .45rem; }

/* Accueil Rôles-réactions */
.se-rr-msg { display: flex; flex-direction: column; gap: .35rem; padding: .85rem; border-radius: 12px; background: #2b2d31; border-left: 4px solid var(--violet); color: #dbdee1; font-size: .82rem; }
.se-rr-msg strong { color: #f2f3f5; font-size: .9rem; margin-bottom: .15rem; }
.se-mention { font-style: normal; color: #c9cdfb; background: rgba(88, 101, 242, .3); border-radius: 3px; padding: 0 2px; }
.se-reacts { display: flex; gap: .35rem; margin-top: .35rem; }
.se-react { position: relative; display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .45rem; border-radius: 8px; background: #383a40; border: 1px solid transparent; font-size: .8rem; }
.se-react b { position: relative; display: inline-block; min-width: 1.1em; height: 1.2em; overflow: hidden; color: #b5bac1; font-weight: 600; }
.se-react b em { display: block; font-style: normal; line-height: 1.2em; }
.se-react-hit { animation: se-react-hit 3s ease-in-out 1.2s infinite; }
.se-react-hit b em { animation: se-react-count 3s ease-in-out 1.2s infinite; }
.se-react-hit .se-cursor { right: -12px; bottom: -14px; }
@keyframes se-react-hit { 0%, 45% { background: #383a40; border-color: transparent; } 50%, 90% { background: rgba(88, 101, 242, .25); border-color: #5865f2; } 100% { background: #383a40; border-color: transparent; } }
@keyframes se-react-count { 0%, 45% { transform: none; } 50%, 90% { transform: translateY(-100%); } 100% { transform: none; } }
.se-role-pop { padding: .35rem .75rem; border-radius: 999px; background: rgba(190, 112, 234, .18); color: #e3c4f7; font-weight: 700; font-size: .9rem; animation: se-role 3s ease-in-out 1.2s infinite; opacity: 0; }
@keyframes se-role { 0%, 48% { opacity: 0; transform: scale(.7); } 55%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.9); } }
.se-tile .se-react b { font-size: .8rem; font-weight: 600; line-height: 1.2em; background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #b5bac1; width: auto; }
.se-tile .se-react-hit b { color: #c9cdfb; }

/* ═══════ Hub vocal ═══════ */
.hub-current { display: flex; align-items: center; gap: .55rem; padding: .75rem .9rem; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); font-weight: 600; }
.hub-current svg { width: 18px; height: 18px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hub-range { width: 100%; accent-color: var(--violet); margin-top: .7rem; }
.hub-note { display: block; margin-top: .9rem; }
.rr-card .tk-lines .sg-channel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Accueil Hub vocal : un membre rejoint le hub, un salon apparaît */
.se-vc { display: flex; flex-direction: column; gap: .3rem; padding: .6rem; border-radius: 12px; background: #2b2d31; }
.se-vc-row { position: relative; display: flex; align-items: center; gap: .45rem; padding: .4rem .5rem; border-radius: 6px; color: #949ba4; font-size: .85rem; font-weight: 600; }
.se-vc-row svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.se-vc-hub { animation: se-vc-hub 5s ease-in-out 1s infinite; }
.se-vc-av { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.se-vc-join { position: absolute; right: .5rem; opacity: 0; animation: se-vc-join 5s ease-in-out 1s infinite; }
.se-vc-new { color: #f2f3f5; opacity: 0; animation: se-vc-new 5s ease-in-out 1s infinite; }
.se-vc-member { display: flex; align-items: center; gap: .45rem; padding: .15rem .5rem .15rem 2rem; color: #dbdee1; font-size: .8rem; opacity: 0; animation: se-vc-new 5s ease-in-out 1.15s infinite; }
@keyframes se-vc-hub { 0%, 10% { background: transparent; } 18%, 35% { background: rgba(78, 80, 88, .5); color: #f2f3f5; } 45%, 100% { background: transparent; } }
@keyframes se-vc-join { 0% { opacity: 0; transform: translateX(-30px); } 15%, 32% { opacity: 1; transform: none; } 40%, 100% { opacity: 0; transform: translateY(14px); } }
@keyframes se-vc-new { 0%, 36% { opacity: 0; transform: translateY(-6px); } 44%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
.hub-new-fields, [data-hub-new] { margin-top: .9rem; }

/* ═══════ Nouveaux onglets (rôle auto, annonces, notifications, giveaways, sondages, suggestions, candidatures) ═══════ */
.btn > svg, .icon-btn > svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm > svg { width: 14px; height: 14px; }
.card-actions { display: inline-flex; align-items: center; gap: .35rem; }
.card-actions form { margin: 0; }
.card-actions .btn-sm { gap: .35rem; }
.icon-btn.danger:hover { color: var(--danger); }
.rr-card.is-off { opacity: .7; }
.rr-card.is-off:hover { opacity: 1; }
.gw-card, .rr-card:not([role="button"]) { cursor: default; }
.gw-card:hover, .rr-card:not([role="button"]):hover { transform: none; }
.live-badge { padding: .15rem .45rem; border-radius: 5px; background: #e91916; color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .05em; animation: se-glow 1.6s ease-in-out infinite; }
.sg-icon.nt-youtube { background: rgba(255, 0, 0, .15); color: #ff4e45; }
.sg-icon.nt-twitch { background: rgba(145, 70, 255, .18); color: #a970ff; }
.type-grid.two { grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.day-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.day-pill input { position: absolute; opacity: 0; pointer-events: none; }
.day-pill span { display: inline-block; min-width: 54px; padding: .5rem .7rem; border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg-2); text-align: center; font-weight: 600; font-size: .85rem; cursor: pointer; transition: all .15s; }
.day-pill input:checked + span { background: var(--gradient); border-color: transparent; color: #fff; }
.day-pill input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.duration-row { display: grid; grid-template-columns: 120px 1fr; gap: .6rem; }
.field-sm input { max-width: 140px; }
.rr-row.poll-row, .rr-row.q-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
.rr-row.q-row { grid-template-columns: minmax(0, 1fr) 190px auto; }
.msg-text { color: #dbdee1; font-size: .95rem; line-height: 1.45; word-break: break-word; }
.msg-text .mention { color: #c9cdfb; background: rgba(88, 101, 242, .3); border-radius: 3px; padding: 0 2px; }
.poll-bars { display: flex; flex-direction: column; gap: .35rem; }
.poll-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .65rem; border-radius: 8px; background: var(--bg-2); overflow: hidden; font-size: .85rem; }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: rgba(190, 112, 234, .18); transition: width .6s; }
.poll-bar.lead .poll-fill { background: rgba(190, 112, 234, .35); }
.poll-label, .poll-pct { position: relative; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.poll-pct { color: var(--muted); }
.poll-label .d-emoji { width: 16px; height: 16px; }
.btn-ok { background: transparent; color: var(--green); border-color: rgba(59, 165, 93, .45); }
.btn-ok:hover { background: rgba(59, 165, 93, .12); }
.sug-list { padding: .4rem; display: flex; flex-direction: column; }
.sug-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: .9rem 1rem; }
.sug-item + .sug-item { border-top: 1px solid var(--border); }
.sug-num { font-weight: 800; color: var(--violet); }
.sug-body p { margin: 0 0 .2rem; }
.sug-body .muted { font-size: .8rem; }
.sug-status { font-size: .8rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.sug-status.accepted { color: var(--green); background: rgba(59, 165, 93, .13); }
.sug-status.refused { color: var(--danger); background: rgba(242, 80, 93, .13); }
.side-nav a { padding-top: .42rem; padding-bottom: .42rem; font-size: .93rem; }
.side-nav a svg { width: 18px; height: 18px; }
.nav-group { padding: .85rem .9rem .3rem; }
.sidebar .side-nav { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.sidebar .side-nav:hover { scrollbar-color: var(--border-2) transparent; }
.sidebar .guild-head { padding-bottom: 1rem; margin-bottom: .6rem; }

/* Accueils animés des nouveaux onglets */
.se-text-b { font-size: 1.5rem !important; }
.se-role-pop.se-static { opacity: 1; animation: none; background: rgba(110, 154, 236, .18); color: #c6d6f7; }
.se-ar { display: flex; flex-direction: column; gap: .7rem; padding: .9rem; border-radius: 12px; background: #2b2d31; }
.se-ar-member { display: flex; align-items: center; gap: .6rem; color: #f2f3f5; font-size: .9rem; }
.se-ar-member img { width: 36px; height: 36px; border-radius: 50%; animation: se-pop .5s cubic-bezier(.2, 1.3, .4, 1) .4s both; }
.se-ar-roles { display: flex; gap: .4rem; flex-wrap: wrap; }
.se-ar-roles span { padding: .25rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; background: color-mix(in srgb, var(--c) 35%, transparent); border: 1px solid var(--c); opacity: 0; animation: se-role 4s ease-in-out infinite; }
.se-ar-roles span:first-child { animation-delay: 1s; }
.se-ar-roles span:last-child { animation-delay: 1.4s; }
.se-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.se-week span { padding: .35rem 0; border-radius: 6px; background: #2b2d31; color: #949ba4; text-align: center; font-size: .75rem; font-weight: 700; }
.se-week span.on { background: var(--gradient); color: #fff; animation: se-glow 2s ease-in-out infinite; }
.se-bubble { display: flex; flex-direction: column; gap: .2rem; margin-top: .6rem; padding: .6rem .75rem; border-radius: 10px; background: #2b2d31; color: #dbdee1; font-size: .8rem; opacity: 0; animation: se-chat 5s ease-in-out 1s infinite; }
.se-bubble b { color: #f2f3f5; }
.se-video { display: flex; flex-direction: column; gap: .6rem; padding: .75rem; border-radius: 12px; background: #2b2d31; border-left: 4px solid #ff4e45; }
.se-thumb { position: relative; height: 70px; border-radius: 8px; background: linear-gradient(120deg, #3a2a4a, #24304a); overflow: hidden; display: grid; place-items: center; }
.se-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .15) 50%, transparent 70%); transform: translateX(-100%); animation: se-shine 2.6s ease-in-out 1s infinite; }
.se-play { width: 38px; height: 26px; border-radius: 8px; background: #ff0000; position: relative; animation: se-glow 2s ease-in-out infinite; }
.se-play::after { content: ""; position: absolute; left: 15px; top: 7px; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.se-vtext { display: flex; flex-direction: column; gap: .35rem; color: #f2f3f5; font-size: .85rem; }
.se-yt, .se-tw { width: 12px; height: 12px; border-radius: 3px; background: #ff0000; display: inline-block; }
.se-tw { background: #9146ff; }
.se-new { padding: .3rem .6rem; border-radius: 999px; background: rgba(255, 78, 69, .15); color: #ff8a84; font-weight: 700; font-size: .8rem; animation: se-role 3.5s ease-in-out .8s infinite; opacity: 0; }
.se-live { font-size: .85rem; padding: .3rem .6rem; }
.se-gift { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .9rem; border-radius: 12px; background: #2b2d31; color: #f2f3f5; overflow: hidden; }
.se-box { font-size: 2rem; animation: se-shake 3s ease-in-out 1s infinite; }
@keyframes se-shake { 0%, 60%, 100% { transform: none; } 65% { transform: rotate(-10deg); } 72% { transform: rotate(10deg); } 79% { transform: rotate(-6deg); } 86% { transform: rotate(0); } }
.se-gw-btn { align-self: center; display: inline-flex; align-items: center; gap: .35rem; }
.se-gw-btn em { display: inline-block; height: 1.2em; overflow: hidden; font-style: normal; }
.se-gw-btn em i { display: block; font-style: normal; line-height: 1.2em; animation: se-react-count 3s ease-in-out 1.2s infinite; }
.se-confetti { position: absolute; inset: 0; pointer-events: none; }
.se-confetti i { position: absolute; top: -10px; width: 6px; height: 10px; border-radius: 2px; background: var(--pink); opacity: 0; animation: se-confetti 3s ease-in 1.5s infinite; }
.se-confetti i:nth-child(1) { left: 10%; }
.se-confetti i:nth-child(2) { left: 25%; background: var(--violet); animation-delay: 1.6s; }
.se-confetti i:nth-child(3) { left: 45%; background: var(--blue); animation-delay: 1.7s; }
.se-confetti i:nth-child(4) { left: 62%; background: #f0b232; animation-delay: 1.55s; }
.se-confetti i:nth-child(5) { left: 78%; background: var(--green); animation-delay: 1.65s; }
.se-confetti i:nth-child(6) { left: 90%; animation-delay: 1.75s; }
@keyframes se-confetti { 0%, 45% { opacity: 0; transform: translateY(0) rotate(0); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(170px) rotate(320deg); } }
.se-poll { display: flex; flex-direction: column; gap: .4rem; padding: .85rem; border-radius: 12px; background: #2b2d31; color: #f2f3f5; font-size: .82rem; }
.se-poll b { margin-bottom: .15rem; }
.se-pbar { position: relative; display: flex; justify-content: space-between; padding: .4rem .6rem; border-radius: 7px; background: #383a40; overflow: hidden; }
.se-pbar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(190, 112, 234, .4); animation: se-pbar 4s ease-in-out var(--d) infinite; }
.se-pbar span, .se-pbar em { position: relative; font-style: normal; font-weight: 600; }
@keyframes se-pbar { 0% { width: 0; } 30%, 85% { width: var(--w); } 100% { width: 0; } }
.se-sug { display: flex; flex-direction: column; gap: .5rem; padding: .85rem; border-radius: 12px; background: #2b2d31; border-left: 4px solid var(--violet); color: #dbdee1; font-size: .82rem; animation: se-sug-border 5s ease-in-out 1s infinite; }
.se-sug p { margin: 0; }
.se-sug-head { display: flex; align-items: center; gap: .45rem; color: #f2f3f5; }
.se-sug-head img { width: 22px; height: 22px; border-radius: 50%; }
.se-sug-foot { display: flex; align-items: center; gap: .35rem; }
.se-sug-status { position: relative; margin-left: auto; width: 92px; height: 1.6em; overflow: hidden; text-align: center; }
.se-sug-status i { display: block; height: 1.6em; line-height: 1.6em; padding: 0 .55rem; border-radius: 999px; font-style: normal; font-weight: 700; font-size: .75rem; background: rgba(190, 112, 234, .2); color: #e3c4f7; animation: se-react-count 5s ease-in-out 1s infinite; }
.se-sug-status i:last-child { background: rgba(59, 165, 93, .2); color: #8fe0a8; }
@keyframes se-sug-border { 0%, 45% { border-left-color: var(--violet); } 50%, 90% { border-left-color: var(--green); } 100% { border-left-color: var(--violet); } }
.se-form { display: flex; flex-direction: column; gap: .35rem; padding: .85rem; border-radius: 12px; background: #2b2d31; color: #b5bac1; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.se-input { position: relative; height: 26px; border-radius: 6px; background: #1e1f22; overflow: hidden; margin-bottom: .25rem; }
.se-input.tall { height: 38px; }
.se-input i { position: absolute; left: 8px; top: 9px; height: 7px; width: 0; border-radius: 4px; background: #4e5058; animation: se-type 4s steps(12) .8s infinite; }
.se-input.tall i { animation-delay: 1.4s; }
@keyframes se-type { 0% { width: 0; } 40%, 90% { width: var(--w); } 100% { width: 0; } }
.se-form-btn { align-self: flex-end; text-transform: none; letter-spacing: 0; animation: se-press 4s ease-in-out 2.2s infinite; }
@keyframes se-glow { 50% { opacity: .7; } }
input[type=time], input[type=datetime-local] { color-scheme: dark; }
input[type=time]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.7); cursor: pointer; }
[data-show-if] > .field + .field, [data-show-if] .field + .field { margin-top: .9rem; }
.dstep-body > .help { display: block; margin-top: .6rem; }

/* Suggestions : panneau personnalisable */
.sug-panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.sug-panel-grid > :last-child { position: sticky; top: 0; display: flex; flex-direction: column; gap: .5rem; }
.sg-embed { margin-top: .35rem; padding: .7rem .85rem; border-radius: 4px; background: #2b2d31; border-left: 4px solid #BE70EA; color: #dbdee1; font-size: .9rem; display: flex; flex-direction: column; gap: .35rem; max-width: 420px; }
.sg-embed b { color: #f2f3f5; }
.sg-pbtn { display: inline-flex; align-items: center; gap: .35rem; margin-top: .45rem; padding: .45rem .9rem; border-radius: 4px; background: #5865f2; color: #fff; font-size: .88rem; font-weight: 600; }
.sg-pbtn .d-emoji { width: 18px; height: 18px; }
.color-field input[type=color] { width: 64px; height: 40px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); cursor: pointer; }
.tk-btn .d-emoji { width: 15px; height: 15px; vertical-align: -3px; }
@media (max-width: 900px) { .sug-panel-grid { grid-template-columns: 1fr; } }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 .8rem; }
.section-head h2 { margin: 0; }
.sg-embed-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 4px; margin-top: .3rem; }
.sug-panel-grid .btn-colors { flex-wrap: wrap; }
.gw-foot { color: #949ba4; font-size: .75rem; }
.gw-win-preview { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .06); }
.sug-panel-grid > div:first-child { display: flex; flex-direction: column; gap: 1rem; }
.nt-author { color: #f2f3f5; font-weight: 600; font-size: .8rem; }
.nt-title { color: #00a8fc !important; }
.nt-image { height: 150px; border-radius: 4px; background: linear-gradient(120deg, #3a2a4a, #24304a); display: grid; place-items: center; }
.nt-image[hidden] { display: none; }

/* ═══════ Modération ═══════ */
.mod-opts { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.mod-icon { width: 26px; text-align: center; font-size: 1.1rem; }
.mod-block { padding: 1rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: .8rem; }
.mod-toggle { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; row-gap: .15rem; align-items: center; }
.mod-toggle .help { grid-column: 2; }
.mod-toggle .toggle-text { font-weight: 700; }
.mod-block [data-show-if] { display: flex; flex-direction: column; gap: .45rem; }
.mod-type { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--card-2); margin-right: .3rem; }
.mod-type.t-warn { color: #f0b232; background: rgba(240, 178, 50, .13); }
.mod-type.t-mute { color: #8fb3f5; background: rgba(110, 154, 236, .15); }
.mod-type.t-kick { color: #f47b67; background: rgba(244, 123, 103, .14); }
.mod-type.t-ban { color: var(--danger); background: rgba(242, 80, 93, .13); }
.mod-type.t-unban { color: var(--green); background: rgba(59, 165, 93, .13); }
.se-modlog { display: flex; flex-direction: column; gap: .4rem; }
.se-case { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .7rem; border-radius: 8px; background: #2b2d31; border-left: 3px solid #f0b232; font-size: .78rem; color: #b5bac1; opacity: 0; animation: se-slide 6s ease-in-out infinite; }
.se-case b { color: #f2f3f5; font-size: .8rem; }
.se-case.c2 { border-left-color: #6e9aec; animation-delay: .5s; }
.se-case.c3 { border-left-color: #f2505d; animation-delay: 1s; }
.se-lock { font-size: 1.8rem; animation: se-shake 3s ease-in-out 1s infinite; }
/* Barre latérale plus compacte (4 catégories) */
.side-nav a { padding-top: .32rem; padding-bottom: .32rem; font-size: .9rem; line-height: 1.35; }
.nav-group { padding: .7rem .9rem .25rem; font-size: .7rem; }
.sidebar .guild-head { padding-bottom: .8rem; margin-bottom: .4rem; }
.sidebar { padding-top: 1.2rem; }
.mod-type.t-unmute { color: var(--green); background: rgba(59, 165, 93, .13); }

/* Modération : blocs par commande */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.mod-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; border-radius: 16px; background: var(--card); border: 1px solid var(--border); transition: border-color .2s, transform .2s, box-shadow .2s; }
.mod-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .25); }
.mod-card.is-off .mod-card-text { opacity: .55; }
.mod-card-text { min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.mod-card h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.mod-card h3 code { font-size: .72rem; font-weight: 700; padding: .12rem .45rem; border-radius: 6px; background: var(--bg-2); color: var(--violet); border: 1px solid var(--border); }
.mod-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.mod-who { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .25rem; color: var(--muted); font-size: .76rem; font-style: italic; }
.mod-who .tk-role { font-style: normal; padding: .15rem .5rem; font-size: .74rem; }
.mod-card-actions { display: flex; align-items: center; gap: .55rem; flex-shrink: 0; }
.mod-card-actions form { margin: 0; }
.mod-gear svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s; }
.mod-gear:hover svg { transform: rotate(60deg); }
.log-events { font-style: normal; padding: .12rem .5rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); font-size: .72rem; font-weight: 600; }
.mod-who .tk-item svg { width: 13px; height: 13px; }
.se-case.lg-add { border-left-color: #3ba55d; }
.se-case.lg-edit { border-left-color: #f0b232; }
.se-case.lg-del { border-left-color: #f2505d; }

/* ─── Niveaux & économie ─────────────────────────────────────────────── */
.pg-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(190, 112, 234, .12); color: var(--violet); }
.pg-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mod-card:has(.pg-icon) { justify-content: flex-start; }
.mod-card:has(.pg-icon) .mod-card-text { flex: 1; }
.mod-card.is-off .pg-icon { filter: grayscale(1); opacity: .5; }
.pg-value { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px; background: var(--card-2); color: var(--text); font-size: .82rem; font-weight: 600; }
.pg-value a { color: var(--violet); }
.pg-inline-toggle .toggle-text { font-size: .88rem; color: var(--muted); font-weight: 600; }
.pg-three { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.input-suffix { display: flex; align-items: center; gap: .6rem; }
.input-suffix input { flex: 1; }
.input-suffix > span { color: var(--muted); font-weight: 600; white-space: nowrap; }

/* Récompenses de rôles */
.pg-rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.pg-reward { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem .7rem .7rem; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.pg-reward .tk-role { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-lvl { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 54px; height: 50px; border-radius: 12px; background: var(--gradient); color: #fff; line-height: 1; }
.pg-lvl small { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; opacity: .85; }
.pg-lvl b { font-size: 1.3rem; font-weight: 800; }
.pg-arrow { color: var(--muted); }

/* Classement dans le panel */
.pg-board { padding: .4rem; }
.pg-row { display: grid; grid-template-columns: 40px 40px minmax(0, 1fr) 84px 110px 36px; align-items: center; gap: .9rem; padding: .6rem .8rem; border-radius: 12px; }
.pg-row.eco { grid-template-columns: 40px 40px minmax(0, 1fr) 140px 70px 36px; }
.pg-row:hover { background: var(--bg-2); }
.pg-row + .pg-row { border-top: 1px solid var(--border); }
.pg-row:hover, .pg-row:hover + .pg-row { border-top-color: transparent; }
.pg-rank { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: var(--muted); background: var(--card-2); font-variant-numeric: tabular-nums; }
.pg-rank.r1 { background: linear-gradient(135deg, #f7d774, #e0a030); color: #3a2600; }
.pg-rank.r2 { background: linear-gradient(135deg, #e6e8ef, #a9aec0); color: #23252e; }
.pg-rank.r3 { background: linear-gradient(135deg, #f0b48a, #b8703f); color: #2e1606; }
.pg-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--card-2); }
.pg-who { min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.pg-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-left { font-size: .72rem; color: var(--muted); font-weight: 600; }
.pg-bar { display: block; height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; max-width: 260px; }
.pg-bar i { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: var(--gradient); }
.pg-stat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.pg-stat b { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-stat small { color: var(--muted); font-size: .74rem; font-weight: 600; }

/* Boutique */
.pg-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.pg-item { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1rem 1.1rem 1.1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--border); cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.pg-item:hover, .pg-item:focus-visible { border-color: var(--border-2); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .25); outline: none; }
.pg-item-top { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.pg-item-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--role); background: color-mix(in srgb, var(--role) 16%, transparent); }
.pg-item-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-item-name { font-size: 1.05rem; }
.pg-item p { margin: 0; font-size: .86rem; }
.pg-price { margin-top: auto; padding-top: .3rem; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .pg-row, .pg-row.eco { grid-template-columns: 32px 36px minmax(0, 1fr) auto 32px; gap: .6rem; }
  .pg-row .pg-stat:nth-of-type(4), .pg-row.eco .pg-stat:last-of-type { display: none; }
  .pg-three { grid-template-columns: 1fr; }
}

/* Page d'accueil animée : niveaux */
.se-lvl { display: flex; flex-direction: column; gap: .9rem; margin-top: .6rem; }
.se-lvl-card { display: flex; align-items: center; gap: .9rem; padding: .85rem; border-radius: 14px; background: #1e1d36; border: 1px solid var(--border-2); }
.se-lvl-card img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 3px #1e1d36, 0 0 0 5px var(--violet); }
.se-lvl-card > div { flex: 1; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.se-lvl-line { display: flex; justify-content: space-between; align-items: baseline; font-size: .8rem; color: var(--muted); }
.se-lvl-line em { font-style: normal; font-weight: 800; color: var(--text); }
.se-lvl-n { display: inline-flex; flex-direction: column; height: 1.2em; overflow: hidden; vertical-align: bottom; font-style: normal; line-height: 1.2; }
.se-lvl-n span { animation: se-lvl-n 4s ease-in-out infinite; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.se-lvl-bar { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.se-lvl-bar i { display: block; height: 100%; width: 30%; border-radius: inherit; background: var(--gradient); animation: se-lvl-bar 4s ease-in-out infinite; }
.se-lvl-msg { padding: .7rem .85rem; border-radius: 12px; background: rgba(190, 112, 234, .12); font-size: .88rem; font-weight: 600; opacity: 0; animation: se-lvl-msg 4s ease-in-out infinite; }
@keyframes se-lvl-bar { 0% { width: 30%; } 45% { width: 100%; } 50% { width: 0; } 100% { width: 22%; } }
@keyframes se-lvl-n { 0%, 46% { transform: none; } 50%, 100% { transform: translateY(-100%); } }
@keyframes se-lvl-msg { 0%, 48% { opacity: 0; transform: translateY(8px); } 55%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Page d'accueil animée : économie */
.se-eco { display: flex; flex-direction: column; gap: 1rem; margin-top: .4rem; }
.se-eco-bal { display: flex; align-items: center; gap: .6rem; }
.se-eco-bal b { font-size: 2.6rem; font-weight: 800; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.se-eco-coin { font-size: 2rem; animation: se-coin 2.4s ease-in-out infinite; display: inline-block; }
.se-eco-feed { display: flex; flex-direction: column; gap: .45rem; }
.se-eco-feed span { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px; background: #1e1d36; font-size: .85rem; color: var(--muted); opacity: 0; animation: se-slide 4.5s ease-in-out infinite; }
.se-eco-feed em { font-style: normal; font-weight: 800; color: var(--green); min-width: 46px; }
.se-eco-feed .out em { color: var(--danger); }
.se-eco-feed .f2 { animation-delay: .5s; }
.se-eco-feed .f3 { animation-delay: 1s; }
.se-tile > b.se-flames { background: none; color: inherit; font-size: 1.5rem; letter-spacing: .1em; }
@keyframes se-coin { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(180deg); } }

/* ─── Classement public ─────────────────────────────────────────────── */
.lb-page { max-width: 880px; padding-top: 2.4rem; padding-bottom: 3rem; }
.lb-head { display: flex; align-items: center; gap: 1.3rem; margin-bottom: 1.6rem; }
.lb-head h1 { font-size: 2rem; }
.lb-head p { margin: .2rem 0 0; }
.lb-kicker { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.lb-guild { width: 84px; height: 84px; border-radius: 24px; object-fit: cover; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.lb-guild-empty { display: grid; place-items: center; background: var(--gradient); font-size: 2rem; font-weight: 800; color: #fff; }
.lb-tabs { display: inline-flex; gap: .3rem; padding: .3rem; border-radius: 14px; background: var(--card); border: 1px solid var(--border); margin-bottom: 1.6rem; }
.lb-tabs a { padding: .55rem 1.1rem; border-radius: 10px; color: var(--muted); font-weight: 700; }
.lb-tabs a.active { background: var(--gradient); color: #fff; }
.lb-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 1rem; margin: 1rem 0 1.4rem; }
.lb-step { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; opacity: 0; animation: se-in .7s cubic-bezier(.2, .8, .2, 1) forwards; }
.lb-step.s1 { animation-delay: .25s; }
.lb-step.s3 { animation-delay: .12s; }
.lb-avatar { position: relative; margin-bottom: .4rem; }
.lb-avatar img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--card-2); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--border-2); }
.s1 .lb-avatar img { width: 108px; height: 108px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px #e8b94a, 0 14px 40px rgba(232, 185, 74, .25); }
.s2 .lb-avatar img { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px #b9bdcc; }
.s3 .lb-avatar img { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px #c98a5e; }
.lb-medal { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font-size: 1.6rem; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .4)); }
.lb-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
.lb-level { font-size: .82rem; color: var(--muted); font-weight: 700; }
.lb-value { font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-block { width: 100%; margin-top: .6rem; border-radius: 16px 16px 6px 6px; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--border); display: grid; place-items: center; }
.lb-block span { font-size: 2.2rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.s1 .lb-block { height: 120px; border-color: rgba(232, 185, 74, .45); }
.s2 .lb-block { height: 88px; }
.s3 .lb-block { height: 64px; }
.lb-list { padding: .4rem; }
.lb-row { display: grid; grid-template-columns: 44px 42px minmax(0, 1fr) auto 130px; align-items: center; gap: .9rem; padding: .65rem .8rem; border-radius: 12px; }
.lb-row + .lb-row { border-top: 1px solid var(--border); }
.lb-row:hover { background: var(--bg-2); }
.lb-row img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--card-2); }
.lb-rank { text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-who { min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.lb-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-lvl { display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: .3rem .7rem; border-radius: 10px; background: var(--card-2); }
.lb-lvl small { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.lb-lvl b { font-size: 1.05rem; }
.lb-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 640px) {
  .lb-head { flex-direction: column; align-items: flex-start; }
  .lb-row { grid-template-columns: 30px 36px minmax(0, 1fr) auto; }
  .lb-val { display: none; }
  .lb-avatar img { width: 64px; height: 64px; }
  .s1 .lb-avatar img { width: 80px; height: 80px; }
}

/* Barre latérale : plus d'onglets → liste qui défile dans la barre, avec un fondu en bas */
.side-nav a { padding-top: .28rem; padding-bottom: .28rem; }
.nav-group { padding-top: .6rem; }
.sidebar .side-nav { scrollbar-width: none; padding-bottom: 1.2rem; }
.sidebar .side-nav::-webkit-scrollbar { display: none; }
.sidebar .side-nav.can-scroll { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 48px), transparent); }
.sidebar .side-nav.can-scroll.at-end { -webkit-mask-image: none; mask-image: none; }
.mod-who .pg-value { font-style: normal; }
.mod-grid.pg-two { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.pg-value { white-space: nowrap; }
.section-head .card-actions { display: flex; align-items: center; gap: 1.6rem; }
.pg-item.is-off { opacity: .6; }
.pg-item-icon.emoji { font-size: 1.35rem; background: color-mix(in srgb, var(--role) 14%, transparent); }
.pg-item-icon.emoji img { width: 24px; height: 24px; }
.pg-item-top { gap: .6rem; }
.pg-item-top form { margin-left: auto; }
.pg-kind { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pg-item-foot { width: 100%; margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding-top: .3rem; }
.pg-item-foot .pg-price { margin-top: 0; padding-top: 0; }
.pg-meta { color: var(--muted); font-size: .78rem; font-weight: 600; }
.pg-inv { display: flex; flex-direction: column; gap: .5rem; }
.pg-inv-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem .7rem; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.pg-inv-row input { width: 110px; }

/* ─── Lien Documentation dans la barre du haut ──────────────────────── */
.topbar-link { margin-left: auto; margin-right: 1.2rem; display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s; }
.topbar-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar-link:hover, .topbar-link.active { background: var(--bg-2); color: var(--text); }
.topbar-link.active svg { color: var(--violet); }
@media (max-width: 640px) { .topbar-link span { display: none; } }

/* ─── Documentation ─────────────────────────────────────────────────── */
.docs { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.docs-side { position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); display: flex; flex-direction: column; gap: .8rem; padding: 1.6rem 1rem 1rem; border-right: 1px solid var(--border); }
.docs-search { display: flex; align-items: center; gap: .55rem; padding: .55rem .8rem; border-radius: 12px; background: var(--card); border: 1px solid var(--border); transition: border-color .15s; }
.docs-search:focus-within { border-color: var(--violet); }
.docs-search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.docs-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: .9rem; padding: 0; }
.docs-toc { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-bottom: 1rem; }
.docs-toc::-webkit-scrollbar { display: none; }
.docs-toc .nav-group { display: block; padding: .8rem .8rem .3rem; }
.docs-toc a { position: relative; display: flex; align-items: center; gap: .7rem; padding: .32rem .8rem; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: .9rem; transition: background .15s, color .15s; }
.docs-toc a svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.docs-toc a:hover { background: var(--bg-2); color: var(--text); }
.docs-toc a.active { background: var(--card-2); color: var(--text); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.docs-toc a.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gradient-v); }
.docs-toc a.active svg { color: var(--violet); }
.docs-main { min-width: 0; padding: 2.4rem 2.5rem 4rem; display: flex; flex-direction: column; gap: 1rem; }
.docs-hero { position: relative; padding: 2rem 2.2rem; border-radius: 22px; background: radial-gradient(500px 260px at 100% 0%, rgba(110, 154, 236, .16), transparent 70%), radial-gradient(500px 260px at 0% 100%, rgba(242, 80, 93, .12), transparent 70%), var(--card); border: 1px solid var(--border); overflow: hidden; }
.docs-hero h1 { font-size: 2.2rem; margin: .1rem 0 .4rem; }
.docs-hero p.muted { max-width: 560px; margin: 0 0 1.2rem; font-size: 1.02rem; line-height: 1.55; }
.docs-hero-icon { position: absolute; right: 2rem; top: 50%; transform: translateY(-50%); width: 110px; height: 110px; border-radius: 30px; display: grid; place-items: center; background: var(--gradient); box-shadow: 0 18px 50px rgba(190, 112, 234, .3); }
.docs-hero-icon svg { width: 54px; height: 54px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.docs-group { display: flex; flex-direction: column; gap: 1rem; }
.docs-group-title { margin: 1.4rem 0 .1rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.docs-section { scroll-margin-top: calc(var(--topbar) + 1.2rem); display: flex; flex-direction: column; gap: .9rem; padding: 1.5rem 1.6rem; line-height: 1.6; }
.docs-section > p { margin: 0; }
.docs-section-head { display: flex; align-items: flex-start; gap: 1rem; }
.docs-section-head h3 { margin: .1rem 0 .15rem; font-size: 1.2rem; }
.docs-section-head h3 a { color: var(--text); }
.docs-section-head h3 a:hover { color: var(--violet); }
.docs-section-head p { margin: 0; }
.docs-section code, .docs-faq code { padding: .08rem .4rem; border-radius: 6px; background: var(--card-2); font-size: .86em; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; color: #e3c4f7; }
.docs-list { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.docs-list li::marker { color: var(--violet); }
.docs-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.docs-steps li { display: flex; align-items: flex-start; gap: .85rem; }
.docs-steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gradient); color: #fff; font-weight: 800; font-size: .85rem; margin-top: .1rem; }
.docs-steps li p { margin: 0; }
.docs-callout { display: flex; gap: .8rem; padding: .9rem 1rem; border-radius: 12px; border: 1px solid; }
.docs-callout svg { width: 20px; height: 20px; flex: none; margin-top: .15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.docs-callout > div > b { display: block; font-size: .85rem; }
.docs-callout p { margin: .1rem 0 0; font-size: .92rem; color: var(--text); }
.docs-callout.tip { color: #8fb3f5; background: rgba(110, 154, 236, .08); border-color: rgba(110, 154, 236, .3); }
.docs-callout.warn { color: #f0b232; background: rgba(240, 178, 50, .07); border-color: rgba(240, 178, 50, .3); }
.docs-table { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.docs-table table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.docs-table th { text-align: left; padding: .6rem .9rem; background: var(--bg-2); color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.docs-table td { padding: .6rem .9rem; border-top: 1px solid var(--border); vertical-align: top; }
.docs-cmds { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.docs-cmd { display: grid; grid-template-columns: minmax(220px, 40%) 1fr; gap: 1rem; align-items: baseline; padding: .6rem .9rem; font-size: .92rem; }
.docs-cmd + .docs-cmd { border-top: 1px solid var(--border); }
.docs-cmd:nth-child(odd) { background: rgba(255, 255, 255, .015); }
.docs-section .docs-cmd-name { background: none; padding: 0; color: var(--text); font-weight: 700; }
.docs-cmd-name .req { color: #e3c4f7; font-weight: 500; }
.docs-cmd-name .opt { color: var(--muted); font-weight: 500; }
.docs-faq { display: flex; flex-direction: column; gap: .5rem; }
.docs-faq details { border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.docs-faq summary { cursor: pointer; list-style: none; padding: .8rem 1rem; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; }
.docs-faq summary::-webkit-details-marker { display: none; }
.docs-faq summary::after { content: "+"; color: var(--violet); font-weight: 800; }
.docs-faq details[open] summary::after { content: "−"; }
.docs-faq details p { margin: 0; padding: 0 1rem .9rem; color: var(--muted); }
.docs-top { align-self: flex-start; margin-top: 1rem; }
.docs-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; }
  .docs-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .docs-toc { display: none; }
  .docs-main { padding: 1.6rem 1.2rem 3rem; }
  .docs-hero-icon { display: none; }
  .docs-cmd { grid-template-columns: 1fr; gap: .2rem; }
}
.grid-emoji > .field { align-self: end; }
.docs-crumb { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: -.4rem; }
.docs-searching .docs-pager { display: none; }
.docs-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: .6rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.docs-pager a { display: flex; flex-direction: column; gap: .15rem; padding: .7rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); min-width: 180px; transition: border-color .15s, background .15s; }
.docs-pager a:hover { border-color: var(--violet); background: rgba(190, 112, 234, .08); }
.docs-pager a.next { margin-left: auto; align-items: flex-end; text-align: right; }
.docs-pager small { color: var(--muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.docs-pager span { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.docs-pager svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; color: var(--violet); }
.docs-section-head h3 { cursor: default; }
/* Barre du haut : un peu d'air sur les côtés, « Documentation » au centre */
.topbar-inner, .topbar-inner.wide { position: relative; padding: 0 3.2rem; }
.topbar-link { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
@media (max-width: 640px) { .topbar-inner, .topbar-inner.wide { padding: 0 1.2rem; } }
.docs-table td { white-space: normal; }
.docs-search input[type=search] { background: none; border: 0; box-shadow: none; outline: 0; padding: 0; height: auto; min-height: 0; border-radius: 0; }
.docs-search input[type=search]::-webkit-search-cancel-button { filter: invert(.7); cursor: pointer; }
/* Précédent / Suivant : liens discrets */
.docs-pager { margin-top: .2rem; padding-top: .8rem; }
.docs-pager a { min-width: 0; padding: .3rem .2rem; border: 0; background: none; gap: .05rem; color: var(--muted); }
.docs-pager a:hover { background: none; color: var(--text); }
.docs-pager small { font-size: .66rem; opacity: .8; }
.docs-pager span { font-weight: 600; font-size: .88rem; }
.docs-pager svg { width: 14px; height: 14px; color: currentColor; }
.pg-lvl.pg-mult { background: linear-gradient(135deg, #3ba55d, #2a8c8c); }
.pg-lvl.pg-mult.down { background: linear-gradient(135deg, #8a8aa3, #5b5b72); }
.pg-mults { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.pg-mults .choice-box { align-items: center; justify-content: center; padding: .8rem; }
.pg-mults .choice-title { font-size: 1.15rem; font-weight: 800; }

/* ─── Vérification ──────────────────────────────────────────────────── */
.ver-tip { display: flex; align-items: flex-start; gap: 1rem; margin-top: 1rem; padding: 1.1rem 1.2rem; }
.ver-tip p { margin: .2rem 0 0; }
.se-ver { display: flex; flex-direction: column; gap: .9rem; margin-top: .6rem; }
.se-ver-panel { display: flex; flex-direction: column; gap: .35rem; padding: .85rem .9rem; border-radius: 12px; background: #1e1d36; border-left: 4px solid #3ba55d; }
.se-ver-panel span { color: var(--muted); font-size: .85rem; }
.se-ver-panel em { align-self: flex-start; margin-top: .3rem; padding: .35rem .8rem; border-radius: 8px; background: #3ba55d; color: #fff; font-style: normal; font-weight: 700; font-size: .85rem; animation: se-ver-press 4s ease-in-out infinite; }
.se-ver-code { display: flex; gap: .5rem; justify-content: center; padding: .7rem; border-radius: 12px; background: #1e1d36; border: 1px dashed var(--border-2); }
.se-ver-code span { font-size: 1.6rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; animation: se-ver-char 4s ease-in-out infinite; }
.se-ver-code span:nth-child(1) { transform: rotate(-12deg); }
.se-ver-code span:nth-child(2) { animation-delay: .15s; transform: rotate(9deg); }
.se-ver-code span:nth-child(3) { animation-delay: .3s; transform: rotate(-6deg); }
.se-ver-code span:nth-child(4) { animation-delay: .45s; transform: rotate(14deg); }
.se-ver-code span:nth-child(5) { animation-delay: .6s; transform: rotate(-9deg); }
@keyframes se-ver-press { 0%, 30%, 100% { transform: none; filter: none; } 35% { transform: scale(.94); filter: brightness(1.2); } 40% { transform: none; } }
@keyframes se-ver-char { 0%, 38% { opacity: 0; } 46%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* ─── Pied de page ─────────────────────────────────────────────────── */
.footer { display: block; padding: 1.1rem 2rem; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem 2rem; flex-wrap: wrap; }
.footer-brand { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.footer-links a { color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--text); }
@media (max-width: 640px) { .footer-inner { justify-content: center; text-align: center; } .footer-links { justify-content: center; } }

/* Pied de la barre latérale : deux boutons, puis une ligne discrète */
.side-footer { display: flex; flex-direction: column; gap: .75rem; padding: .9rem .9rem 1rem; text-align: left; }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.side-btn { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem .5rem; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: .82rem; transition: background .15s, border-color .15s; }
.side-btn:hover { background: rgba(190, 112, 234, .14); border-color: rgba(190, 112, 234, .4); }
.side-btn svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--violet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .2rem; font-size: .74rem; color: var(--muted); }
.side-meta a { color: var(--muted); transition: color .15s; }
.side-meta a:hover { color: var(--text); }
.docs-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ─── Pages légales ─────────────────────────────────────────────────── */
.legal-page { max-width: 860px; padding-top: 2.2rem; padding-bottom: 3rem; }
.legal-tabs { margin-bottom: 1.2rem; }
.legal-card { padding: 2.2rem 2.4rem; line-height: 1.65; }
.legal-card h1 { font-size: 2rem; margin: .1rem 0 .2rem; }
.legal-updated { margin: 0 0 1rem; color: var(--muted); font-size: .85rem; }
.legal-intro { margin: 0 0 .6rem; font-size: 1.02rem; }
.legal-card section { padding-top: 1.3rem; margin-top: 1.3rem; border-top: 1px solid var(--border); }
.legal-card h2 { display: flex; align-items: center; gap: .7rem; margin: 0 0 .6rem; font-size: 1.1rem; }
.legal-card h2 span { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--gradient); color: #fff; font-size: .8rem; font-weight: 800; }
.legal-card p { margin: .45rem 0; }
.legal-card ul { margin: .4rem 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .3rem; }
.legal-card li::marker { color: var(--violet); }
.legal-card a { color: var(--violet); }
.legal-missing { padding: .05rem .45rem; border-radius: 6px; background: rgba(240, 178, 50, .14); color: #f0b232; font-style: normal; font-weight: 700; font-size: .9em; }
@media (max-width: 640px) { .legal-card { padding: 1.4rem 1.2rem; } }
.pg-lvl.pg-mult { min-width: 64px; } .pg-lvl.pg-mult b { font-size: 1.1rem; }

/* ===== Barre du haut : navigation + actions ===== */
.topbar-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: .3rem; }
.topbar-nav a { padding: .5rem .9rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .9rem; letter-spacing: .02em; transition: background .15s, color .15s; white-space: nowrap; }
.topbar-nav a:hover, .topbar-nav a.active { color: var(--text); background: var(--bg-2); }
.topbar-actions { display: flex; align-items: center; gap: .7rem; }
.btn-outline { position: relative; background: transparent; color: var(--text); border: 1px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box; }
.btn-outline:hover { background: linear-gradient(#1d1b33, #1d1b33) padding-box, var(--gradient) border-box; }
.topbar-actions .btn { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; }
@media (max-width: 960px) { .topbar-nav { display: none; } }
@media (max-width: 520px) { .topbar-actions .btn-outline { display: none; } }


/* Barre du haut : éléments aux extrémités, un peu plus grands */
:root { --topbar: 72px; }
.topbar-inner, .topbar-inner.wide { max-width: none; padding: 0 1.6rem; }
.brand { gap: .7rem; }
.brand-logo { width: 42px; height: 42px; }
.topbar .brand-name { font-size: 1.45rem; }
.topbar-nav a { font-size: .98rem; }
.topbar-actions { gap: .8rem; }
.topbar-actions .btn { padding: .6rem 1.2rem; font-size: .86rem; }
.topbar-actions .btn-primary { padding: calc(.6rem + 1px) calc(1.2rem + 1px); }
.avatar-btn { width: 46px; height: 46px; }
.avatar-btn img { width: 42px; height: 42px; }
@media (max-width: 520px) { .topbar-inner, .topbar-inner.wide { padding: 0 1rem; } }

/* ===== Page d'accueil ===== */
.home2 { overflow: hidden; }
.h2-hero { position: relative; padding: 5.5rem 1.6rem 6rem; border-bottom: 1px solid var(--border); }
.h2-grid-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 30%, transparent 80%); }
.h2-hero::before { content: ""; position: absolute; width: 620px; height: 620px; right: 8%; top: -120px; background: var(--gradient); filter: blur(140px); opacity: .18; border-radius: 50%; pointer-events: none; }
.h2-hero-inner { position: relative; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: center; }
.h2-badge { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .9rem; border-radius: 999px; background: var(--card); border: 1px solid var(--border-2); font-size: .85rem; font-weight: 600; color: var(--muted); }
.h2-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(59,165,93,.2); }
.h2-hero h1 { margin: 1.3rem 0 1.2rem; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.08; font-weight: 900; letter-spacing: -.025em; }
.h2-grad { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h2-lead { margin: 0 0 2rem; max-width: 540px; color: var(--muted); font-size: 1.12rem; line-height: 1.65; }
.h2-ctas { display: flex; gap: .8rem; flex-wrap: wrap; }
.h2-ctas .btn svg { width: 20px; height: 20px; }
.h2-stats { list-style: none; margin: 2.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.h2-stats li { padding: .45rem .85rem; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.h2-stats b { color: var(--text); font-weight: 800; }

.h2-chat { background: #313338; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06); transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); color: #dbdee1; font-size: .92rem; }
.h2-chat-head { padding: .85rem 1.1rem; background: #2b2d31; border-bottom: 1px solid #1f2023; font-weight: 700; color: #f2f3f5; display: flex; gap: .45rem; }
.h2-chat-head span { color: #80848e; }
.h2-chat-body { padding: 1rem 1.1rem 1.3rem; display: grid; gap: 1.1rem; }
.h2-msg { display: flex; gap: .8rem; opacity: 0; transform: translateY(10px); animation: h2-in .5s ease forwards; }
.h2-msg:nth-child(1) { animation-delay: .2s; }
.h2-msg:nth-child(2) { animation-delay: .8s; }
.h2-msg:nth-child(3) { animation-delay: 1.4s; }
@keyframes h2-in { to { opacity: 1; transform: none; } }
.h2-msg > img { width: 40px; height: 40px; border-radius: 50%; background: #1e1f22; flex-shrink: 0; }
.h2-msg > div { min-width: 0; flex: 1; }
.h2-msg-meta { display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.h2-msg-meta b { color: #f2f3f5; }
.h2-tag { background: #5865f2; color: #fff; font-size: .62rem; font-weight: 700; padding: .05rem .3rem; border-radius: 4px; }
.h2-msg-meta time { color: #949ba4; font-size: .74rem; }
.h2-embed { background: #2b2d31; border-left: 4px solid var(--violet); border-radius: 4px; padding: .7rem .9rem; line-height: 1.5; }
.h2-msg:nth-child(3) .h2-embed { border-left-color: var(--blue); }
.h2-embed-title { color: #f2f3f5; font-weight: 700; margin-bottom: .2rem; }
.h2-level { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: 10px; background: linear-gradient(90deg, rgba(242,80,93,.18), rgba(110,154,236,.14)); }
.h2-level svg { width: 28px; height: 28px; flex-shrink: 0; fill: none; stroke: #ffd166; stroke-width: 2; stroke-linejoin: round; }
.h2-level b { display: block; color: #f2f3f5; }
.h2-level span { font-size: .84rem; color: #b5bac1; }
.h2-dbtn { display: inline-flex; align-items: center; gap: .4rem; margin-top: .55rem; padding: .45rem .9rem; border-radius: 4px; background: #5865f2; color: #fff; font-weight: 600; font-size: .85rem; }
.h2-dbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.h2-section { max-width: 1200px; margin: 0 auto; padding: 5.5rem 1.6rem 0; }
.h2-head { max-width: 640px; margin-bottom: 2.6rem; }
.h2-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); }
.h2-head h2 { margin: .6rem 0 .7rem; font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.h2-head p { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.h2-bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.h2-card { position: relative; padding: 1.6rem; border-radius: 18px; background: var(--card); border: 1px solid var(--border); overflow: hidden;
  opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease, border-color .2s; }
.h2-card.wide { grid-column: span 2; }
.h2-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at 100% 0%, rgba(190,112,234,.12), transparent 60%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.h2-card:hover { border-color: var(--border-2); }
.h2-card:hover::after { opacity: 1; }
.h2-card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--gradient); margin-bottom: 1.1rem; box-shadow: 0 8px 22px rgba(190,112,234,.25); }
.h2-card-icon svg { width: 23px; height: 23px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.h2-card h3 { margin: 0 0 .45rem; font-size: 1.1rem; }
.h2-card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: .94rem; }
.h2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: none; }
.h2-steps li { position: relative; padding: 1.6rem; border-radius: 18px; border: 1px dashed var(--border-2); opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.h2-steps li:nth-child(2) { transition-delay: .1s; }
.h2-steps li:nth-child(3) { transition-delay: .2s; }
.h2-num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--violet); color: var(--violet); font-weight: 800; margin-bottom: 1rem; }
.h2-steps h3 { margin: 0 0 .4rem; font-size: 1.08rem; }
.h2-steps p { margin: 0; color: var(--muted); line-height: 1.6; font-size: .94rem; }
.h2-cta { max-width: 1200px; margin: 5.5rem auto; padding: 2rem 2.2rem; display: flex; align-items: center; gap: 1.6rem; border-radius: 20px;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--gradient) border-box; border: 1px solid transparent;
  opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.h2-cta img { width: 64px; height: 64px; flex-shrink: 0; }
.h2-cta > div { flex: 1; }
.h2-cta h2 { margin: 0 0 .3rem; font-size: 1.5rem; }
.h2-cta p { margin: 0; color: var(--muted); }
.h2-card.shown, .h2-steps li.shown, .h2-cta.shown { opacity: 1; transform: none; }
@media (max-width: 1000px) {
  .h2-hero-inner { grid-template-columns: 1fr; }
  .h2-chat { transform: none; max-width: 560px; }
  .h2-bento { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .h2-hero { padding-top: 3.5rem; }
  .h2-bento, .h2-steps { grid-template-columns: 1fr; }
  .h2-card.wide { grid-column: auto; }
  .h2-cta { flex-direction: column; text-align: center; margin: 4rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .h2-msg { animation: none; opacity: 1; transform: none; }
  .h2-card, .h2-steps li, .h2-cta { opacity: 1; transform: none; transition: none; }
}

/* ===== Pied de page ===== */
.footer { display: none; }
.site-footer { border-top: 1px solid var(--border); padding: 1.8rem 1.6rem 1.4rem; }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.site-footer .brand-logo { width: 32px; height: 32px; }
.site-footer .brand-name { font-size: 1.1rem; }
.site-footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.3rem; }
.site-footer-links a { color: var(--muted); font-size: .9rem; transition: color .15s; }
.site-footer-links a:hover { color: var(--text); }
.site-footer-sep { width: 1px; height: 16px; background: var(--border-2); }
.site-footer-langs { display: flex; gap: .35rem; padding: .25rem; border-radius: 10px; background: var(--card); border: 1px solid var(--border); }
.site-footer-langs a { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .55rem; border-radius: 7px; color: var(--muted); font-weight: 700; font-size: .75rem; transition: background .15s, color .15s; }
.site-footer-langs img { width: 16px; height: 11px; border-radius: 2px; object-fit: cover; }
.site-footer-langs a:hover { color: var(--text); }
.site-footer-langs a.active { background: var(--card-2); color: var(--text); }
.site-footer-copy { margin: 1.3rem 0 0; text-align: center; color: var(--muted); font-size: .8rem; opacity: .75; }
@media (max-width: 860px) { .site-footer-inner { flex-direction: column; } .site-footer-links { justify-content: center; } }

/* ===== Mobile ===== */
.topbar-burger { position: relative; display: none; }
.topbar-burger summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-2); cursor: pointer; color: var(--text); }
.topbar-burger summary::-webkit-details-marker { display: none; }
.topbar-burger summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.topbar-burger[open] summary { background: var(--card-2); }
.topbar-burger .burger-menu { width: 220px; }
.topbar-burger[open] .burger-menu { opacity: 1; transform: none; pointer-events: auto; }
.side-toggle { display: none; }

@media (max-width: 960px) {
  .topbar-burger { display: block; }
  /* Tableau de bord : le menu des modules devient une liste dépliable */
  .sidebar { padding: .9rem 1rem; }
  .sidebar .guild-head { margin-bottom: .7rem; }
  .side-toggle { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .75rem 1rem; border-radius: 12px; background: var(--card); border: 1px solid var(--border-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
  .side-toggle svg { width: 19px; height: 19px; fill: none; stroke: var(--violet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .side-toggle span { flex: 1; text-align: left; }
  .side-toggle .side-toggle-chev { stroke: var(--muted); transition: transform .2s; }
  .sidebar.open .side-toggle-chev { transform: rotate(180deg); }
  .sidebar .side-nav { display: none; flex-direction: column; overflow: visible; margin-top: .6rem; padding: .4rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
  .sidebar.open .side-nav { display: flex; }
  .sidebar .side-nav a.active { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .sidebar .side-nav a.active::before { top: 0; bottom: 0; right: auto; width: 3px; height: auto; background: var(--gradient-v); }
  .sidebar .side-nav a.nested { padding-left: 1.4rem; }
  .two-cols, .grid-2, .choice-grid.two { grid-template-columns: minmax(0, 1fr); }
  .two-cols > *, .grid-2 > * { min-width: 0; }
}
@media (max-width: 640px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head > .btn, .page-head > a.btn, .page-head > form, .page-head > div:last-child:not(:first-child) { align-self: flex-start; }
  .section-head { flex-wrap: wrap; }
  .section-head .card-actions { flex-wrap: wrap; gap: .8rem; }
  .tk-sum-nums { flex-wrap: wrap; gap: .8rem 1.6rem; }
  .setting-row { align-items: flex-start; }
  .segmented { flex-wrap: wrap; max-width: 100%; }
  .savebar { flex-wrap: wrap; gap: .6rem; padding: .7rem; left: 1rem; right: 1rem; width: auto; transform: translateY(140%); }
  .savebar.visible { transform: none; }
  .savebar-text { white-space: normal; }
  .savebar-actions { width: 100%; }
  .savebar-actions .btn { flex: 1; justify-content: center; }
  .lb-tabs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .lb-tabs a { flex-shrink: 0; padding: .5rem .8rem; }
  .content { padding: 1.3rem .9rem 7rem; }
  .card { padding: 1.1rem; }
  .mod-grid, .mod-grid.pg-two, .rr-grid { grid-template-columns: minmax(0, 1fr); }
  .docs-pager a { min-width: 0; flex: 1; }
  .modal { width: calc(100vw - 1.5rem); max-height: calc(100vh - 2rem); overflow-y: auto; }
  .topbar-actions { gap: .55rem; }
  .topbar-actions .btn { padding: .55rem .95rem; }
  .brand-logo { width: 36px; height: 36px; }
  .topbar .brand-name { font-size: 1.25rem; }
  .avatar-btn { width: 42px; height: 42px; } .avatar-btn img { width: 38px; height: 38px; }
}
@media (max-width: 960px) { .layout { align-content: start; } }
@media (max-width: 640px) {
  .page-title { flex-direction: column; align-items: stretch; }
  .page-title > :not(:first-child) { align-self: flex-start; }
  .setting-row .segmented { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .setting-row .segmented span { justify-content: center; padding-left: .4rem; padding-right: .4rem; }
}
@media (max-width: 900px) {
  .docs-side { padding: .9rem 1rem; gap: .6rem; }
  .docs-side .docs-toggle { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .75rem 1rem; border-radius: 12px; background: var(--card); border: 1px solid var(--border-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
  .docs-toggle svg { width: 19px; height: 19px; fill: none; stroke: var(--violet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .docs-toggle span { flex: 1; text-align: left; }
  .docs-toggle .side-toggle-chev { stroke: var(--muted); transition: transform .2s; }
  .docs-side.open .side-toggle-chev { transform: rotate(180deg); }
  .docs-side .docs-toc { display: none; max-height: 60vh; overflow-y: auto; padding: .4rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
  .docs-side.open .docs-toc { display: block; }
}
@media (max-width: 860px) { .site-footer-sep { display: none; } }
@media (min-width: 901px) { .docs-side .docs-toggle { display: none; } }

/* ===== Page Statut ===== */
.status-page { max-width: 920px; margin: 0 auto; padding: 2.6rem 1.4rem 4rem; display: grid; gap: 1.1rem; }
.st-hero { display: flex; align-items: center; gap: 1.2rem; padding: 1.6rem 1.8rem; border-radius: 18px; border: 1px solid; }
.st-hero.ok { background: linear-gradient(90deg, rgba(59,165,93,.16), rgba(59,165,93,.04)); border-color: rgba(59,165,93,.35); }
.st-hero.bad { background: linear-gradient(90deg, rgba(242,80,93,.18), rgba(242,80,93,.04)); border-color: rgba(242,80,93,.4); }
.st-hero h1 { margin: 0 0 .2rem; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.st-hero p { margin: 0; font-size: .9rem; }
.st-pulse { position: relative; width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; background: var(--green); }
.st-hero.bad .st-pulse { background: var(--danger); }
.st-pulse::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid currentColor; color: var(--green); opacity: 0; animation: st-ping 2s ease-out infinite; }
.st-hero.bad .st-pulse::after { color: var(--danger); }
@keyframes st-ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.st-components { padding: .4rem 1.2rem; }
.st-comp { display: flex; align-items: center; gap: 1rem; padding: .95rem 0; }
.st-comp + .st-comp { border-top: 1px solid var(--border); }
.st-comp > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.st-comp > div span { font-size: .84rem; }
.st-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); flex-shrink: 0; }
.st-ic svg { width: 20px; height: 20px; fill: none; stroke: var(--violet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-badge { padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.st-badge.ok { background: rgba(59,165,93,.15); color: #5fd38a; }
.st-badge.bad { background: rgba(242,80,93,.15); color: #ff8a94; }
.st-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.st-stats .card { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem; }
.st-stats span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.st-stats b { font-size: 1.35rem; font-weight: 800; }
.st-block { padding: 1.3rem 1.4rem; }
.st-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.st-block-head h2 { margin: 0; font-size: 1.05rem; }
.st-block-head > .muted { font-size: .82rem; }
.st-uptime { font-weight: 800; }
.st-uptime.ok { color: #5fd38a; } .st-uptime.warn { color: #f0b232; } .st-uptime.bad { color: #ff8a94; } .st-uptime.none { color: var(--muted); }
.st-bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 4px; height: 38px; }
.st-bar { position: relative; border-radius: 4px; background: var(--border); outline: none; }
.st-bar.ok { background: #3ba55d; } .st-bar.warn { background: #f0b232; } .st-bar.bad { background: var(--danger); }
.st-bar:hover, .st-bar:focus { filter: brightness(1.25); }
.st-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: .1rem; padding: .4rem .65rem; border-radius: 8px; background: #0b0a15; border: 1px solid var(--border-2); font-size: .76rem; white-space: nowrap; z-index: 2; color: var(--muted); }
.st-tip b { color: var(--text); }
.st-bar:hover .st-tip, .st-bar:focus .st-tip { display: flex; }
.st-bar:first-child .st-tip { left: 0; transform: none; } .st-bar:last-child .st-tip { left: auto; right: 0; transform: none; }
.st-bars-legend { display: flex; justify-content: space-between; margin-top: .5rem; font-size: .76rem; }
.st-chart { width: 100%; height: 120px; display: block; }
.st-none { display: flex; align-items: center; gap: .6rem; margin: 0; color: var(--muted); }
.st-none svg { width: 20px; height: 20px; fill: none; stroke: #5fd38a; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.st-incidents { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.st-incidents li { display: flex; gap: .8rem; align-items: flex-start; }
.st-incidents li > div { display: flex; flex-direction: column; gap: .1rem; }
.st-incidents .muted { font-size: .82rem; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .4rem; flex-shrink: 0; }
.st-dot.bad { background: var(--danger); }
.st-foot { text-align: center; font-size: .82rem; margin: .4rem 0 0; }
.st-foot a { color: var(--violet); }
@media (max-width: 720px) { .st-stats { grid-template-columns: 1fr 1fr; } .st-bars { gap: 2px; height: 32px; } .st-hero { padding: 1.2rem; } }
@media (prefers-reduced-motion: reduce) { .st-pulse::after { animation: none; } }

/* Accueil animé : modération automatique */
.se-am { display: flex; flex-direction: column; gap: .4rem; }
.se-am-msg { display: flex; flex-direction: column; gap: .1rem; padding: .45rem .7rem; border-radius: 8px; background: #2b2d31; font-size: .78rem; color: #b5bac1; animation: se-am-strike 6s ease-in-out infinite; }
.se-am-msg b { color: #f2f3f5; font-size: .8rem; }
.se-am-msg.m2 { animation-delay: .6s; }
.se-am-alert { padding: .45rem .7rem; border-radius: 8px; background: rgba(242, 80, 93, .14); border-left: 3px solid #f2505d; color: #ffb3b9; font-size: .78rem; font-weight: 600; opacity: 0; animation: se-am-alert 6s ease-in-out infinite; }
@keyframes se-am-strike { 0%, 30% { opacity: 1; text-decoration: none; transform: none; } 45% { opacity: .5; text-decoration: line-through; } 60%, 85% { opacity: 0; transform: translateX(14px); } 100% { opacity: 1; transform: none; } }
@keyframes se-am-alert { 0%, 45% { opacity: 0; transform: translateY(6px); } 60%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.pm-inline { color: var(--violet); font-weight: 600; }

/* ===== Premium ===== */
.pm-badge { display: inline-flex; align-items: center; padding: .12rem .5rem; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--gradient); vertical-align: middle; }
.pm-badge.sm { padding: .05rem .38rem; font-size: .7rem; }
.pm-unlock { white-space: nowrap; }
.pm-page { max-width: 1040px; margin: 0 auto; padding: 3.5rem 1.4rem 4rem; display: grid; gap: 2.4rem; }
.pm-hero { text-align: center; }
.pm-hero h1 { margin: 1.1rem 0 .9rem; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.pm-hero .h2-lead { margin: 0 auto; }
.pm-star { color: #ffd166; }
.pm-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; max-width: 820px; margin: 0 auto; width: 100%; }
.pm-plan { position: relative; padding: 2rem; border-radius: 22px; background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; gap: .4rem; }
.pm-plan h2 { margin: 0; font-size: 1.2rem; }
.pm-plan .muted { margin: 0 0 .6rem; }
.pm-price { margin: .2rem 0; display: flex; align-items: baseline; gap: .4rem; }
.pm-price b { font-size: 2.6rem; font-weight: 900; }
.pm-price span { color: var(--muted); }
.pm-plan ul { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .6rem; }
.pm-plan li { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.45; }
.pm-plan li svg, .pm-yes svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: #5fd38a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.pm-plan .btn-block { margin-top: auto; }
.pm-featured { background: linear-gradient(var(--card), var(--card)) padding-box, var(--gradient) border-box; border: 2px solid transparent; box-shadow: 0 20px 60px rgba(190, 112, 234, .18); }
.pm-featured .pm-price b { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pm-ribbon { position: absolute; top: -12px; right: 1.4rem; padding: .25rem .7rem; border-radius: 999px; background: var(--gradient); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.pm-table-card { padding: 1.6rem; }
.pm-table-card h2, .pm-servers h2, .pm-faq h2 { margin: 0 0 1rem; font-size: 1.3rem; }
.pm-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.pm-table th { text-align: left; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: .6rem .8rem; border-bottom: 1px solid var(--border); }
.pm-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--border); }
.pm-table tr:last-child td { border-bottom: 0; }
.pm-table td:not(:first-child), .pm-table th:not(:first-child) { text-align: center; width: 22%; }
.pm-yes { display: inline-flex; }
.pm-login { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.3rem 1.5rem; }
.pm-login p { margin: 0; }
.pm-list { display: grid; gap: .7rem; }
.pm-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; }
.pm-row.is-chosen { border-color: var(--violet); }
.pm-row img, .pm-ph { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.pm-ph { display: grid; place-items: center; background: var(--card-2); font-weight: 800; color: var(--muted); }
.pm-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.pm-row-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-row-text .muted { font-size: .84rem; }
.pm-checkout { padding: 1.8rem; border-color: var(--violet); scroll-margin-top: calc(var(--topbar) + 1rem); }
.pm-checkout h2 { margin: 0 0 1.4rem; }
.pm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.pm-steps li { display: flex; gap: 1rem; align-items: flex-start; }
.pm-steps li > div { flex: 1; min-width: 0; }
.pm-steps .h2-num { margin: 0; flex-shrink: 0; }
.pm-steps p { margin: .3rem 0 .8rem; }
.pm-code { display: flex; align-items: center; gap: .7rem; margin-top: .6rem; flex-wrap: wrap; }
.pm-code code { font-size: 1.3rem; font-weight: 800; letter-spacing: .08em; padding: .5rem 1rem; border-radius: 10px; background: var(--bg-2); border: 1px dashed var(--border-2); color: var(--text); }
.pm-warn { color: #f0b232; font-size: .9rem; }
.pm-faq { display: grid; gap: .6rem; }
.pm-faq details { padding: 0; }
.pm-faq summary { padding: 1rem 1.2rem; font-weight: 700; cursor: pointer; list-style: none; }
.pm-faq summary::-webkit-details-marker { display: none; }
.pm-faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
.pm-faq details[open] summary::after { content: "−"; }
.pm-faq details p { margin: 0; padding: 0 1.2rem 1.1rem; line-height: 1.6; }
.pm-overview { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1.1rem 1.3rem; color: var(--text); transition: border-color .15s; }
.pm-overview:hover { border-color: var(--violet); }
.pm-overview > div { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.pm-overview .muted { font-size: .88rem; }
.pm-ov-star { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--card-2); color: var(--muted); font-size: 1.2rem; flex-shrink: 0; }
.pm-overview.is-on .pm-ov-star { background: var(--gradient); color: #fff; }
@media (max-width: 760px) {
  .pm-plans { grid-template-columns: 1fr; }
  .pm-row { flex-wrap: wrap; }
  .pm-row .btn { width: 100%; justify-content: center; }
  .pm-overview { flex-wrap: wrap; }
  .pm-table td, .pm-table th { padding: .55rem .4rem; }
}

.pm-page, .adm, .status-page { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) {
  .pm-table-card { padding: 1.1rem .8rem; overflow-x: auto; }
  .pm-table { font-size: .84rem; }
  .pm-table th { font-size: .68rem; letter-spacing: .02em; }
  .pm-table td:not(:first-child), .pm-table th:not(:first-child) { width: auto; }
}
.pm-table .pm-group th { padding: 1.3rem .8rem .5rem; text-align: left !important; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); border-bottom: 1px solid var(--border-2); }
.pm-table tbody:first-of-type .pm-group th { padding-top: .6rem; }
.pm-table tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.pm-table tbody:last-child tr:last-child td { border-bottom: 0; }

/* ===== Administration ===== */
.adm { max-width: 1100px; margin: 0 auto; padding: 2.4rem 1.4rem 4rem; display: grid; gap: 1.1rem; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.adm-head h1 { margin: .2rem 0 .3rem; font-size: 2rem; }
.adm-head p { margin: 0; }
.adm-kofi { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.adm-kofi svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.adm-kofi.ok { background: rgba(59,165,93,.14); color: #5fd38a; }
.adm-kofi.bad { background: rgba(240,178,50,.14); color: #f0b232; }
.adm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.adm-stats .card { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; }
.adm-stats .card > div { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.adm-stats b { font-size: 1.45rem; font-weight: 800; }
.adm-stats span:not(.adm-ic) { color: var(--muted); font-size: .8rem; }
.adm-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--gradient); flex-shrink: 0; }
.adm-ic svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.adm-block, .adm-alert { padding: 1.3rem 1.4rem; }
.adm-alert { border-color: rgba(240,178,50,.45); background: linear-gradient(180deg, rgba(240,178,50,.07), transparent 60%), var(--card); }
.adm-section-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.adm-section-head h2 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.adm-section-head h2 svg { width: 19px; height: 19px; fill: none; stroke: #f0b232; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.adm-section-head p { margin: 0; font-size: .86rem; flex-basis: 100%; }
.adm-search { display: flex; align-items: center; gap: .5rem; padding: 0 .8rem; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); min-width: 280px; }
.adm-search:focus-within { border-color: var(--violet); }
.adm-search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; flex-shrink: 0; }
.adm-search input { border: 0; background: none; padding: .6rem 0; width: 100%; color: var(--text); font: inherit; outline: none; box-shadow: none; }
.adm-filters { display: inline-flex; gap: .3rem; padding: .25rem; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: .9rem; }
.adm-filters button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: .84rem; padding: .4rem .85rem; border-radius: 7px; cursor: pointer; }
.adm-filters button.active { background: var(--card-2); color: var(--text); }
.adm-list { display: grid; gap: .55rem; }
.adm-row { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.adm-row[hidden] { display: none; }
.adm-row.is-premium { border-color: rgba(190,112,234,.45); }
.adm-row img, .adm-ph { width: 42px; height: 42px; border-radius: 12px; }
.adm-ph { display: grid; place-items: center; background: var(--card-2); font-weight: 800; color: var(--muted); }
.adm-row-main, .adm-row-status { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.adm-row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-row-main .muted, .adm-row-status .muted { font-size: .8rem; }
.adm-row code { font-size: .76rem; padding: .05rem .35rem; border-radius: 5px; background: var(--card); border: 1px solid var(--border); }
.adm-row-status b { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.adm-row-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.adm-row-actions form { margin: 0; display: flex; gap: .3rem; }
.adm-empty, .adm-none { margin: .4rem 0 0; }
.adm-pay { display: grid; grid-template-columns: minmax(0, 1fr) 190px 190px 70px auto; gap: .6rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--border); }
.adm-pay-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; min-width: 0; }
.adm-pay-info .muted { flex-basis: 100%; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; }
.adm-amount { font-weight: 800; color: #5fd38a; }
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.adm-table th { text-align: left; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; padding: .55rem .7rem; border-bottom: 1px solid var(--border); }
.adm-table td { padding: .65rem .7rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-tag { padding: .12rem .5rem; border-radius: 999px; background: rgba(240,178,50,.15); color: #f0b232; font-size: .76rem; font-weight: 700; }
@media (max-width: 900px) {
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-row { grid-template-columns: auto minmax(0, 1fr); }
  .adm-row-status { grid-column: 2; }
  .adm-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .adm-pay { grid-template-columns: 1fr 1fr; } .adm-pay input[type=number], .adm-pay .btn { width: 100%; }
  .adm-pay-info { grid-column: 1 / -1; }
  .adm-search { min-width: 0; flex: 1 1 100%; }
}

/* Fonctions premium verrouillées */
.banner-lock { line-height: 1.3; position: absolute; right: .7rem; bottom: .7rem; display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .7rem; border-radius: 10px; background: rgba(11, 10, 21, .82); border: 1px solid var(--border-2); color: var(--text); font-size: .8rem; font-weight: 600; backdrop-filter: blur(6px); transition: border-color .15s; }
.banner-lock:hover { border-color: var(--violet); }
.type-tile.is-locked { opacity: .55; cursor: not-allowed; }
.type-tile.is-locked span { cursor: not-allowed; }
.type-tile .pm-badge { margin-top: .2rem; }

/* Pied de page toujours en bas de la fenêtre */
body > main { flex: 1 0 auto; }
.site-footer { margin-top: auto; }
.docs { flex: 1 0 auto; }
.banner-edit.disabled .banner-lock { pointer-events: none; }

/* ===== Premium : achat avec Stripe ===== */
.pm-buy { padding: 1.6rem; display: grid; gap: 1.1rem; }
.pm-step { display: flex; align-items: center; gap: .9rem; }
.pm-step .h2-num { margin: 0; flex-shrink: 0; }
.pm-step > div { display: flex; flex-direction: column; gap: .1rem; }
.pm-step .muted { font-size: .86rem; }
.pm-pick { cursor: pointer; background: var(--bg-2); border: 1px solid var(--border); transition: border-color .15s, background .15s; position: relative; }
.pm-pick:hover { border-color: var(--border-2); }
.pm-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pm-pick:has(input:checked) { border-color: var(--violet); background: rgba(190, 112, 234, .08); }
.pm-pick.is-off { opacity: .45; cursor: not-allowed; }
.pm-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border-2); flex-shrink: 0; }
.pm-check svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.pm-pick:has(input:checked) .pm-check { background: var(--gradient); border-color: transparent; }
.pm-pick:has(input:checked) .pm-check svg { opacity: 1; }
.pm-pick:has(input:focus-visible) { outline: 2px solid var(--violet); outline-offset: 2px; }
.pm-plans-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.pm-plan-opt { cursor: pointer; }
.pm-plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pm-plan-opt > span { height: 100%; display: flex; flex-direction: column; gap: .3rem; padding: 1rem; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); transition: border-color .15s, background .15s; }
.pm-plan-opt:hover > span { border-color: var(--border-2); }
.pm-plan-opt input:checked + span { border-color: var(--violet); background: rgba(190, 112, 234, .08); box-shadow: 0 0 0 1px var(--violet) inset; }
.pm-plan-opt input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.pm-plan-price { font-size: 1.5rem; font-weight: 900; }
.pm-plan-price small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.pm-plan-opt .muted { font-size: .8rem; line-height: 1.45; }
.pm-pay { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: .4rem; }
.pm-secure { font-size: .82rem; }
.pm-status { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; border-radius: 14px; margin-bottom: 1rem; background: var(--card); border: 1px solid var(--border-2); }
.pm-status.ok { border-color: rgba(59,165,93,.45); background: rgba(59,165,93,.08); }
.pm-status svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: #5fd38a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pm-status > div { display: flex; flex-direction: column; gap: .15rem; }
.pm-status span { color: var(--muted); font-size: .88rem; }
.pm-manage { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: .9rem; padding: .9rem 1.1rem; border-radius: 12px; border: 1px dashed var(--border-2); }
.pm-manage .muted { font-size: .88rem; }
@media (max-width: 760px) {
  .pm-plans-pick { grid-template-columns: 1fr 1fr; }
  .pm-buy { padding: 1.1rem; }
  .pm-pay .btn { width: 100%; justify-content: center; }
}

/* ===== Premium : parcours Ko-fi ===== */
.pm-how-lead { margin: -.4rem 0 1.1rem; }
.pm-message { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .9rem 1rem; border-radius: 14px; background: var(--bg-2); border: 1px dashed var(--border-2); }
.pm-message code { flex: 1; min-width: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: .06em; color: var(--text); word-break: break-all; }
.pm-message code.is-empty { font-size: .9rem; font-weight: 500; letter-spacing: 0; color: var(--muted); font-family: inherit; }
.pm-kofi-steps { margin: 0; padding: 0 0 0 2.9rem; display: grid; gap: .5rem; color: var(--muted); line-height: 1.55; }
.pm-kofi-steps b { color: var(--text); }
.pm-kofi { background: #29abe0; box-shadow: 0 8px 22px rgba(41, 171, 224, .3); }
.pm-kofi:hover { background: #1e9bd0; }
@media (max-width: 760px) { .pm-kofi-steps { padding-left: 1.3rem; } .pm-message .btn { width: 100%; justify-content: center; } }

/* ===== Premium : « Comment passer premium » en frise ===== */
.pm-flow { list-style: none; margin: 0; padding: 1.6rem 1.7rem; display: grid; gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: 20px; }
.pm-fstep { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 1.1rem; padding-bottom: 1.9rem; }
.pm-fstep:last-child { padding-bottom: 0; }
.pm-fstep::before { content: ""; position: absolute; left: 20px; top: 46px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--border-2); }
.pm-fstep:last-child::before { display: none; }
.pm-fstep.is-done::before { background: linear-gradient(var(--violet), var(--border-2)); }
.pm-fnum { position: relative; z-index: 1; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--violet); background: var(--bg-2); color: var(--violet); font-weight: 900; font-size: 1.05rem; transition: background .2s, border-color .2s; }
.pm-fnum svg { display: none; width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.pm-fstep.is-done .pm-fnum { background: var(--gradient); border-color: transparent; box-shadow: 0 6px 18px rgba(190, 112, 234, .35); }
.pm-fstep.is-done .pm-fnum span { display: none; }
.pm-fstep.is-done .pm-fnum svg { display: block; }
.pm-fbody { display: grid; gap: .9rem; min-width: 0; padding-top: .45rem; }
.pm-fhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.pm-fhead h3 { margin: 0; font-size: 1.08rem; line-height: 1.35; }
.pm-fhead p { margin: .25rem 0 0; font-size: .88rem; line-height: 1.5; }
.pm-count { flex-shrink: 0; padding: .25rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--bg-2); border: 1px solid var(--border); white-space: nowrap; }
.pm-count.is-on { color: var(--violet); border-color: rgba(190, 112, 234, .5); background: rgba(190, 112, 234, .1); }
.pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pm-flow .pm-pick { border-radius: 14px; padding: .8rem 1rem; }
.pm-flow .pm-row-text b { display: flex; align-items: center; gap: .45rem; }

.pm-flow .pm-message { gap: 1rem; padding: 1rem 1.1rem; border-radius: 14px; border: 1px dashed var(--border-2); background: var(--bg-2); flex-wrap: nowrap; }
.pm-flow .pm-message:has(code:not(.is-empty)) { border-style: solid; border-color: rgba(190, 112, 234, .55); background: rgba(190, 112, 234, .07); }
.pm-msg-text { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.pm-msg-text small { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pm-flow .pm-message code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.2rem; }
.pm-flow .pm-message .btn { flex-shrink: 0; min-width: 110px; justify-content: center; }

.pm-kofi-box { display: grid; gap: 1.1rem; padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); }
.pm-flow .pm-kofi-steps { list-style: none; counter-reset: k; padding: 0; gap: .65rem; }
.pm-flow .pm-kofi-steps li { counter-increment: k; display: flex; gap: .7rem; align-items: flex-start; }
.pm-flow .pm-kofi-steps li::before { content: counter(k); flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; margin-top: .1rem; border-radius: 7px; font-size: .75rem; font-weight: 800; color: #29abe0; background: rgba(41, 171, 224, .14); }
.pm-flow .pm-pay { padding-top: 0; gap: .9rem; }
.pm-flow .pm-kofi { color: #fff; background: #29abe0; border: 0; box-shadow: 0 8px 22px rgba(41, 171, 224, .3); }
.pm-flow .pm-kofi:hover { background: #1e9bd0; }
.pm-flow .pm-secure { font-size: .82rem; }

.pm-fdone .pm-fnum { border-color: #3ba55d; color: #5fd38a; }
.pm-done-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.pm-done-list li { display: flex; gap: .6rem; align-items: flex-start; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.pm-done-list svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: .15rem; fill: none; stroke: #5fd38a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .pm-flow { padding: 1.2rem 1rem; }
  .pm-fstep { grid-template-columns: 34px minmax(0, 1fr); gap: .8rem; }
  .pm-fnum { width: 34px; height: 34px; font-size: .92rem; }
  .pm-fstep::before { left: 16px; top: 38px; }
  .pm-fbody { padding-top: .25rem; }
  .pm-fhead { flex-direction: column; gap: .5rem; }
  .pm-grid { grid-template-columns: minmax(0, 1fr); }
  .pm-flow .pm-message { flex-wrap: wrap; }
  .pm-flow .pm-message .btn, .pm-flow .pm-kofi { width: 100%; }
  .pm-kofi-box { padding: 1rem; }
}

/* ===== Premium : cases à cocher des serveurs ===== */
.pm-flow .pm-pick { transition: border-color .2s, background .2s, box-shadow .2s, transform .15s; }
.pm-flow .pm-pick:hover:not(.is-off) { transform: translateY(-1px); border-color: rgba(190, 112, 234, .45); }
.pm-flow .pm-pick:has(input:checked) { border-color: var(--violet); background: linear-gradient(135deg, rgba(190, 112, 234, .13), rgba(110, 140, 255, .06)); box-shadow: 0 0 0 1px var(--violet) inset, 0 8px 24px rgba(190, 112, 234, .14); }
.pm-flow .pm-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--bg); position: relative; transition: border-color .2s, background .2s, transform .2s; }
.pm-flow .pm-pick:hover:not(.is-off) .pm-check { border-color: var(--violet); }
.pm-flow .pm-check svg { width: 14px; height: 14px; stroke-width: 3.6; opacity: 1; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .28s ease .05s; }
.pm-flow .pm-pick:has(input:checked) .pm-check { background: var(--gradient); border-color: transparent; transform: scale(1.08); box-shadow: 0 4px 12px rgba(190, 112, 234, .45); }
.pm-flow .pm-pick:has(input:checked) .pm-check svg { stroke-dashoffset: 0; }
.pm-flow .pm-pick.is-off { opacity: .4; filter: grayscale(.6); }
.pm-flow .pm-pick.is-off .pm-check { border-style: dashed; }

/* Option réservée au premium (interrupteur verrouillé) */
.toggle.is-locked { opacity: .55; cursor: not-allowed; }
.toggle.is-locked input { pointer-events: none; }
.lock-hint { display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem; color: var(--muted); text-decoration: none; }
.lock-hint:hover { color: var(--text); }

/* ===== Tableau de bord : recherche dans le menu ===== */
.side-search { margin: 0 0 .9rem; }
.side-kbd { flex: none; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .3rem; border-radius: 6px; font: 700 .72rem/1 inherit; color: var(--muted); background: var(--bg-2); border: 1px solid var(--border-2); }
.side-search:focus-within .side-kbd { display: none; }
.side-nav [data-side-item][hidden], .side-nav [data-side-group][hidden] { display: none; }
.sidebar.side-searching .side-nav a.nested { padding-left: .75rem; }
.side-nav a.hit { background: rgba(190, 112, 234, .12); color: var(--text); box-shadow: 0 0 0 1px rgba(190, 112, 234, .45) inset; }
.side-empty { margin: .4rem .2rem; font-size: .86rem; }
@media (max-width: 960px) { .side-kbd { display: none; } .side-search { margin: .8rem 0 .6rem; } }

/* ===== Pied de page : choix de la langue ===== */
.lang-pick { position: relative; }
.lang-pick summary { list-style: none; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .75rem; border-radius: 10px; cursor: pointer; background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: .82rem; transition: border-color .15s; }
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary:hover, .lang-pick[open] summary { border-color: var(--border-2); }
.lang-pick summary svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.lang-pick[open] summary svg { transform: rotate(180deg); }
.lang-pick img { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; flex: none; }
.lang-pick-menu { position: absolute; right: 0; bottom: calc(100% + .4rem); z-index: 40; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem; width: 290px; padding: .4rem; border-radius: 14px; background: var(--card); border: 1px solid var(--border-2); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.lang-pick-menu a { display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: 9px; color: var(--muted); font-size: .86rem; font-weight: 600; text-decoration: none; }
.lang-pick-menu a:hover { background: var(--bg-2); color: var(--text); }
.lang-pick-menu a.active { background: rgba(190, 112, 234, .12); color: var(--text); }
@media (max-width: 640px) { .lang-pick-menu { left: 50%; right: auto; transform: translateX(-50%); } }
.segmented.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .4rem; width: 100%; }
.segmented.lang-grid label span { width: 100%; justify-content: flex-start; }

/* ===== Paramètres : choix de la langue du bot ===== */
.lang-card { padding: 1.5rem 1.6rem; display: grid; gap: 1.2rem; }
.lang-card-head p { margin: .3rem 0 0; font-size: .88rem; }
.lang-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .65rem; }
.lang-option { position: relative; cursor: pointer; }
.lang-option input { position: absolute; opacity: 0; pointer-events: none; }
.lang-option-box { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); transition: border-color .18s, background .18s, transform .15s, box-shadow .18s; }
.lang-option:hover .lang-option-box { border-color: rgba(190, 112, 234, .45); transform: translateY(-1px); }
.lang-option-box img { width: 34px; height: 25px; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 3px 8px rgba(0, 0, 0, .3); }
.lang-option-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.lang-option-text b { font-size: .95rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-option-text small { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.lang-option-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; transition: background .18s, border-color .18s, transform .18s; }
.lang-option-check svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .25s ease .05s; }
.lang-option input:checked + .lang-option-box { border-color: var(--violet); background: linear-gradient(135deg, rgba(190, 112, 234, .14), rgba(110, 140, 255, .06)); box-shadow: 0 0 0 1px var(--violet) inset, 0 8px 22px rgba(190, 112, 234, .14); }
.lang-option input:checked + .lang-option-box .lang-option-check { background: var(--gradient); border-color: transparent; transform: scale(1.05); }
.lang-option input:checked + .lang-option-box .lang-option-check svg { stroke-dashoffset: 0; }
.lang-option input:focus-visible + .lang-option-box { outline: 2px solid var(--violet); outline-offset: 2px; }
@media (max-width: 640px) { .lang-card { padding: 1.1rem; } .lang-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lang-option-box { padding: .7rem; gap: .6rem; } .lang-option-box img { width: 28px; height: 21px; } }

/* Recherche du menu : un peu d'air au-dessus */
.sidebar .side-search { margin-top: .9rem; }
/* 12 langues : rangées régulières (6, 4, 3 puis 2 par ligne) */
.lang-options { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1500px) { .lang-options { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .lang-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .lang-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .lang-option-check { display: none; } }
