:root {
  --bg: #05070a;
  --bg-elevated: #0d1117;
  --bg-elevated-2: #111720;
  --bg-inset: #080b10;
  --border: #202834;
  --border-soft: #171e27;
  --text: #f5f7fa;
  --text-dim: #99a4b3;
  --text-faint: #5e6978;
  --accent: #ff1744;
  --accent-soft: rgba(255, 23, 68, 0.11);
  --accent-border: rgba(255, 23, 68, 0.28);
  --teal: #ff365f;
  --teal-dim: rgba(49, 216, 137, 0.12);
  --danger: #ff6477;
  --danger-dim: rgba(255, 100, 119, 0.12);
  --warning: #f4bd50;
  --warning-dim: rgba(244, 189, 80, 0.12);
  --sidebar-width: 270px;
  --radius-pill: 999px;
  --radius-box: 16px;
  --font-display: 'Space Grotesk', ui-sans-serif, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 10%, rgba(255, 23, 68, 0.075), transparent 28rem),
    radial-gradient(circle at 5% 90%, rgba(180, 15, 45, 0.055), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
textarea,
select { font: inherit; }

a { color: inherit; }

h1,
h2,
h3,
.mono {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
}

h1 { margin: 0 0 4px; font-size: clamp(1.45rem, 2vw, 1.8rem); }
h2 { margin: 0 0 14px; font-size: 1.05rem; }
h3 { margin: 0 0 8px; font-size: 0.95rem; }
p { color: var(--text-dim); }
code { color: #ffd3dc; }

#particle-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.95;
}

/* Le contenu reste au-dessus des paillettes. */

.app,
.login-screen { position: relative; z-index: 1; }

/* ─────────────────────────────────────────────
   LAYOUT DASHBOARD
───────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  background: rgba(7, 10, 14, 0.88);
  border-right: 1px solid var(--border-soft);
  backdrop-filter: blur(18px);
}

.sidebar__logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.logo .accent { color: var(--accent); }

.inline-form { margin: 0; }

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elevated);
  color: var(--text-dim);
  cursor: pointer;
  transition: 0.18s ease;
}
.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.profile-card {
  background: linear-gradient(180deg, rgba(17, 23, 32, 0.94), rgba(11, 15, 21, 0.94));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-box);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-card__head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.profile-card__head img,
.avatar-fallback {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.profile-card__head img { object-fit: cover; }
.avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
}
.profile-card__identity { min-width: 0; }
.profile-card__head .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
}
.profile-card__sub { margin-top: 2px; color: var(--text-faint); font-size: 0.74rem; }

.pill-list { display: flex; flex-direction: column; gap: 7px; }
.pill {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-inset);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
}
.pill:hover:not(.static) { border-color: var(--accent-border); background: var(--accent-soft); }
.pill.static { color: var(--text-dim); }
.pill--truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill .arrow { color: var(--text-faint); }

.nav { display: flex; flex-direction: column; gap: 5px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: 0.16s ease;
}
.nav a:hover { color: var(--text); background: var(--bg-elevated); border-color: var(--border-soft); }
.nav a.active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.nav a span:first-child { width: 20px; text-align: center; }

.sidebar__footer {
  margin-top: auto;
  padding: 12px 4px 0;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 0.69rem;
  letter-spacing: 0.08em;
}

.main {
  width: 100%;
  max-width: 1280px;
  min-width: 0;
  padding: 32px clamp(22px, 4vw, 48px) 64px;
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.topbar p { margin: 3px 0 0; }

/* ─────────────────────────────────────────────
   BUTTONS / STATUS
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f6f8fb;
  color: #06070a;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.16s ease;
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-dim); font-weight: 600; }
.btn--ghost:hover { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.btn--danger { background: transparent; border-color: rgba(255, 100, 119, 0.25); color: var(--danger); }
.btn--danger:hover { background: var(--danger-dim); color: var(--danger); }
.btn--success { background: var(--teal); color: #04110a; }
.btn--success:hover { background: #ff5c79; }

.logout-btn {
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}
.logout-btn:hover { color: var(--text); border-color: var(--text-faint); }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 0.84rem; }
.user-chip img { width: 28px; height: 28px; border-radius: 50%; }

.status-line { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 0.88rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 9px var(--danger); }
.status-dot.ok { background: var(--teal); box-shadow: 0 0 9px var(--teal); }

/* ─────────────────────────────────────────────
   CARDS / FORMS
───────────────────────────────────────────── */
.card {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-box);
  background: linear-gradient(180deg, rgba(15, 20, 28, 0.97), rgba(11, 15, 21, 0.97));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.section-heading h2 { margin: 0; }
.section-heading p { margin: 4px 0 0; font-size: 0.82rem; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; margin-bottom: 7px; color: var(--text-dim); font-size: 0.81rem; font-weight: 600; }
.field .hint,
.hint { margin-top: 6px; color: var(--text-faint); font-size: 0.75rem; }

input[type='text'],
input[type='email'],
input[type='color'],
textarea,
select {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  background: var(--bg-inset);
  color: var(--text);
  padding: 10px 13px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input::placeholder,
textarea::placeholder { color: #4e5867; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #090d12;
}

input:disabled,
select:disabled,
textarea:disabled { opacity: 0.55; cursor: not-allowed; }

textarea { min-height: 96px; resize: vertical; }
.textarea-large { min-height: 260px; line-height: 1.6; }
select[multiple] { min-height: 140px; }
select option { background: #0b0f14; color: var(--text); }

.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.actions--sticky {
  position: sticky;
  bottom: 14px;
  z-index: 5;
  width: fit-content;
  margin: 18px 0 20px auto;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(8, 11, 16, 0.9);
  backdrop-filter: blur(14px);
}

.color-field { display: flex; align-items: center; gap: 12px; }
.color-field input[type='color'] { width: 66px; flex: 0 0 66px; padding: 4px; cursor: pointer; }
.color-value { color: var(--text-dim); font-family: var(--font-display); font-size: 0.82rem; }
.panel-send-card { margin-top: 6px; }

/* ─────────────────────────────────────────────
   LISTS / TICKETS
───────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 30px; }
.stat-card {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-box);
  background: var(--bg-elevated);
}
.stat-card .value { color: var(--text); font-family: var(--font-display); font-size: 1.9rem; }
.stat-card .label { margin-top: 4px; color: var(--text-faint); font-size: 0.72rem; letter-spacing: 0.03em; }

.record {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border);
  border-radius: 13px;
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
  transition: 0.15s ease;
}
.record:hover { border-color: var(--accent-border); transform: translateY(-1px); }
.record__id { width: 90px; flex-shrink: 0; color: var(--text-faint); font-family: var(--font-display); font-size: 0.8rem; }
.record__main { flex: 1; min-width: 0; }
.record__title { overflow-wrap: anywhere; font-size: 0.9rem; }
.record__sub { margin-top: 2px; color: var(--text-faint); font-size: 0.76rem; }

.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 0.68rem; font-weight: 700; }
.tag--open { background: var(--accent-soft); color: var(--accent); }
.tag--closed { background: var(--teal-dim); color: var(--teal); }

.search-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  padding: 12px 15px;
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  background: var(--bg-elevated);
}
.search-bar svg { flex-shrink: 0; color: var(--text-faint); }
.search-bar input { min-height: 0; padding: 2px; border: 0; background: transparent; box-shadow: none; }
.search-bar input:focus { box-shadow: none; background: transparent; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters a { padding: 7px 13px; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--text-faint); font-size: 0.8rem; text-decoration: none; }
.filters a:hover,
.filters a.active { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }
.pager { display: flex; gap: 10px; margin-top: 18px; }

.empty {
  padding: 34px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-box);
  color: var(--text-faint);
  text-align: center;
}

.banner {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(49, 216, 137, 0.22);
  border-radius: 11px;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 0.82rem;
}
.banner--warn { width: 100%; border-color: rgba(244, 189, 80, 0.24); background: var(--warning-dim); color: var(--warning); }
.banner--info { width: 100%; border-color: var(--accent-border); background: var(--accent-soft); color: #bdf6ff; }

.list-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }

table.messages { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
table.messages td { padding: 10px 7px; border-bottom: 1px solid var(--border-soft); vertical-align: top; overflow-wrap: anywhere; }
table.messages td.author { width: 170px; color: var(--text-faint); font-family: var(--font-display); font-size: 0.74rem; }

/* ─────────────────────────────────────────────
   LOGIN / SERVERS / ERROR
───────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px 20px;
}

.login-card {
  width: min(100%, 380px);
  padding: 42px 34px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: rgba(13, 17, 23, 0.94);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}
.login-card .kicker { margin-bottom: 10px; color: var(--accent); font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.07em; }
.login-card p { margin: 0 auto 24px; font-size: 0.86rem; }
.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #5865f2;
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.discord-btn:hover { background: #6874f7; }

.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.server-tile {
  min-height: 100px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-box);
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
  transition: 0.16s ease;
}
.server-tile:hover { border-color: var(--accent-border); background: var(--bg-elevated-2); transform: translateY(-1px); }
.server-tile .name { margin-bottom: 6px; font-family: var(--font-display); font-size: 0.96rem; }
.server-tile .access { color: var(--accent); font-family: var(--font-display); font-size: 0.69rem; letter-spacing: 0.03em; }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 980px) {
  :root { --sidebar-width: 230px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .app { display: block; }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }
  .profile-card { padding: 13px; }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav a { justify-content: flex-start; }
  .sidebar__footer { display: none; }
  .main { padding: 22px 16px 44px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .row-2,
  .row-3,
  .stat-grid { grid-template-columns: 1fr; }
  .record { align-items: flex-start; flex-wrap: wrap; }
  .record__id { width: auto; }
  .record__main { flex-basis: calc(100% - 80px); }
  .actions--sticky { position: static; width: 100%; padding: 0; border: 0; background: transparent; }
  .actions--sticky .btn { width: 100%; }
  table.messages,
  table.messages tbody,
  table.messages tr,
  table.messages td { display: block; width: 100%; }
  table.messages tr { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
  table.messages td { border-bottom: 0; padding: 4px 0; }
  table.messages td.author { width: 100%; }
}

@media (max-width: 480px) {
  .nav { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .server-grid { grid-template-columns: 1fr; }
  .user-chip { flex-wrap: wrap; }
}

/* ─────────────────────────────────────────────
   ANNONCES / COMPONENTS V2
───────────────────────────────────────────── */
.banner--danger {
  width: 100%;
  border-color: rgba(255, 82, 82, 0.3);
  background: rgba(255, 82, 82, 0.09);
  color: #ff8c8c;
}

.announcement-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.announcement-form { min-width: 0; }
.announcement-preview-wrap { position: sticky; top: 22px; }
.announcement-preview-card { margin-bottom: 0; }

.v2-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 0.72rem;
}

.discord-preview {
  padding: 14px;
  border: 1px solid #20252d;
  border-radius: 13px;
  background: #111214;
}

.discord-container-preview {
  --preview-accent: #FF1744;
  overflow: hidden;
  padding: 14px 15px;
  border: 1px solid #2b2d31;
  border-left: 4px solid var(--preview-accent);
  border-radius: 8px;
  background: #1e1f22;
  color: #dbdee1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.discord-preview-title {
  color: #f2f3f5;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.discord-preview-mention {
  display: inline-block;
  margin-top: 7px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(88, 101, 242, 0.28);
  color: #c9cdfb;
  font-size: 0.84rem;
  font-weight: 600;
}

.discord-preview-separator {
  height: 1px;
  margin: 12px 0;
  background: #313338;
}

.discord-preview-message {
  color: #dbdee1;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.discord-preview-image {
  display: block;
  width: 100%;
  max-height: 260px;
  margin-top: 13px;
  border-radius: 7px;
  object-fit: cover;
}
.discord-preview-image[hidden] { display: none; }

.discord-preview-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #313338;
  color: #949ba4;
  font-size: 0.74rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mention-warning {
  margin-top: 13px;
  padding: 11px 12px;
  border: 1px solid rgba(244, 189, 80, 0.2);
  border-radius: 10px;
  background: rgba(244, 189, 80, 0.07);
  color: #c8ad73;
  font-size: 0.73rem;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .announcement-layout { grid-template-columns: 1fr; }
  .announcement-preview-wrap { position: static; }
}


/* ─────────────────────────────────────────────
   TOPBAR — LOGO DE PAGE
───────────────────────────────────────────── */
.topbar__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar__logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(0, 255, 102, 0.78);
  border-radius: 50%;
  background: rgba(0, 255, 102, 0.08);
  box-shadow:
    0 0 0 4px rgba(0, 255, 102, 0.055),
    0 0 22px rgba(0, 255, 102, 0.26);
}

.topbar__logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.topbar__logo--fallback::before {
  content: '📢';
  font-size: 22px;
  filter: drop-shadow(0 0 7px rgba(0, 255, 102, 0.55));
}

@media (max-width: 700px) {
  .topbar__identity { align-items: flex-start; }
  .topbar__logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
}

/* ─────────────────────────────────────────────
   ENTREPRISES / DISPONIBILITÉS
───────────────────────────────────────────── */
.enterprise-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.enterprise-form { min-width: 0; }
.enterprise-preview-wrap { position: sticky; top: 22px; }
.enterprise-preview-card { margin-bottom: 0; }

.enterprise-legend,
.enterprise-row {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) 150px 44px;
  gap: 10px;
  align-items: center;
}

.enterprise-legend {
  padding: 0 3px 8px;
  color: var(--text-faint);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.enterprise-rows {
  display: grid;
  gap: 9px;
}

.enterprise-row {
  padding: 9px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.enterprise-row input[type="text"] {
  width: 100%;
  min-width: 0;
}

.checkbox-cell {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid rgba(0, 255, 102, 0.12);
  border-radius: 9px;
  background: rgba(0, 255, 102, 0.035);
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}

.checkbox-cell input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.checkbox-cell span {
  font-size: 0.75rem;
  font-weight: 700;
}

.checkbox-cell--status:has(input:checked) {
  border-color: rgba(0, 255, 102, 0.28);
  background: rgba(0, 255, 102, 0.07);
  color: #ff8da3;
}

.enterprise-remove {
  width: 42px;
  height: 42px;
  color: #ff8c8c;
}

.btn--small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.72rem;
}

.switch-card {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 15px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  background: rgba(0, 255, 102, 0.035);
  cursor: pointer;
}

.switch-card > div {
  display: grid;
  gap: 4px;
}

.switch-card strong { color: var(--text); }
.switch-card span:not(.switch-ui) { color: var(--text-faint); font-size: 0.76rem; }
.switch-card input { position: absolute; opacity: 0; pointer-events: none; }

.switch-ui {
  position: relative;
  width: 48px;
  height: 26px;
  flex: 0 0 48px;
  border-radius: 999px;
  background: #252a32;
  box-shadow: inset 0 0 0 1px #363d48;
  transition: .2s ease;
}

.switch-ui::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8c939f;
  transition: .2s ease;
}

.switch-card input:checked + .switch-ui {
  background: rgba(0, 255, 102, 0.18);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 102, 0.45), 0 0 16px rgba(0, 255, 102, 0.12);
}

.switch-card input:checked + .switch-ui::after {
  left: 26px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.45);
}

.creation-fields { transition: opacity .2s ease; }
.creation-fields.is-disabled { opacity: .42; }

.enterprise-preview-list {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.enterprise-preview-item {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid #313338;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.enterprise-preview-item strong {
  color: #f2f3f5;
  font-size: .86rem;
}

.enterprise-preview-item span {
  color: #b5bac1;
  font-size: .76rem;
}

.enterprise-preview-item.is-available { border-color: rgba(0, 255, 102, 0.23); }
.enterprise-preview-item.is-unavailable { border-color: rgba(255, 82, 82, 0.20); opacity: .78; }
.enterprise-preview-empty { color: #949ba4; font-size: .8rem; }

.enterprise-preview-creation {
  display: grid;
  gap: 6px;
  color: #dbdee1;
  font-size: .8rem;
  line-height: 1.5;
}

.enterprise-preview-creation > strong {
  color: #f2f3f5;
  font-size: .95rem;
}

.enterprise-preview-creation p {
  margin: 5px 0 0;
  color: #b5bac1;
}

@media (max-width: 1180px) {
  .enterprise-layout { grid-template-columns: 1fr; }
  .enterprise-preview-wrap { position: static; }
}

@media (max-width: 900px) {
  .enterprise-legend { display: none; }
  .enterprise-row {
    grid-template-columns: 120px minmax(220px, 1fr) 150px 44px;
  }
  .enterprise-row .checkbox-cell { min-height: 38px; }
  .enterprise-row .enterprise-remove { justify-self: end; }
}

@media (max-width: 560px) {
  .enterprise-row { grid-template-columns: 120px minmax(220px, 1fr) 150px 44px; }
  .enterprise-row .enterprise-remove { justify-self: stretch; width: 100%; }
}

/* Menu déroulant Groupes & Gangs */
.nav-dropdown{width:100%}.nav-dropdown__toggle{width:100%;display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:10px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;padding:11px 12px;border-radius:10px}.nav-dropdown__toggle:hover,.nav-dropdown__toggle.active{background:rgba(255,23,68,.10);color:#ff1744}.nav-dropdown__chevron{transition:transform .2s ease}.nav-dropdown.is-open .nav-dropdown__chevron{transform:rotate(180deg)}.nav-dropdown__menu{display:none;padding:4px 0 6px 18px}.nav-dropdown.is-open .nav-dropdown__menu{display:grid;gap:4px}.nav-dropdown__menu .nav-dropdown__item{padding:9px 12px;font-size:.92rem;border-radius:9px;opacity:.9}.nav-dropdown__menu .nav-dropdown__item:hover{background:rgba(255,23,68,.08);color:#ff1744}

/* Groupes & Gangs : menu déroulant */
.group-gang-actions{position:relative;display:flex;gap:10px;align-items:center}.group-gang-menu{position:absolute;right:105px;top:46px;z-index:30;min-width:190px;padding:7px;background:#0d131c;border:1px solid rgba(255,23,68,.28);border-radius:12px;box-shadow:0 16px 35px rgba(0,0,0,.35)}.group-gang-menu button{display:block;width:100%;padding:11px 12px;border:0;border-radius:8px;background:transparent;color:#eef2f7;text-align:left;font-weight:700;cursor:pointer}.group-gang-menu button:hover{background:rgba(255,23,68,.12);color:#ff5c7a}.group-gang-panel h3{margin:6px 0 14px;color:#eef2f7;font-size:15px}.enterprise-preview-kind{margin-top:8px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#8e99a9;font-weight:800}


/* Groupes & Gangs — tag par ligne */
.enterprise-legend--tagged,
.enterprise-row--tagged {
  grid-template-columns: 120px minmax(220px, 1fr) 150px 150px 44px;
}
.business-kind {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255,23,68,.28);
  border-radius: 10px;
  background: rgba(255,23,68,.07);
  color: #f5f7fb;
  font-weight: 800;
  cursor: pointer;
}
.business-kind:focus {
  outline: none;
  border-color: #ff1744;
  box-shadow: 0 0 0 3px rgba(255,23,68,.12);
}
.business-kind option {
  background: #0d131c;
  color: #f5f7fb;
}
@media (max-width: 1050px) {
  .enterprise-legend--tagged { display:none; }
  .enterprise-row--tagged { grid-template-columns: 120px minmax(180px,1fr) 140px 150px 44px; }
}
@media (max-width: 760px) {
  .enterprise-row--tagged { grid-template-columns: 1fr; }
}

/* Présence */
.toggle-line { display:flex; align-items:center; gap:10px; font-weight:700; cursor:pointer; }
.toggle-line input { width:18px; height:18px; accent-color:#ff1744; }
.time-grid { display:grid; grid-template-columns:minmax(80px,120px) 16px minmax(80px,120px); align-items:center; gap:8px; max-width:280px; }
.time-grid span { text-align:center; font-weight:800; color:var(--muted, #9aa4b2); }
.presence-reactions { display:flex; flex-wrap:wrap; gap:8px; }
.presence-reactions span { padding:10px 12px; border:1px solid rgba(255,255,255,.08); border-radius:10px; background:rgba(255,255,255,.03); font-weight:700; }
.field--short { max-width:420px; }
.presence-discord-preview { white-space:pre-wrap; background:#101218; border:1px solid rgba(255,255,255,.08); border-left:4px solid #ff1744; border-radius:12px; padding:18px; line-height:1.6; color:#f4f6fb; }
.presence-actions { display:flex; flex-wrap:wrap; gap:10px; }
.btn--danger { background:rgba(255,23,68,.14); color:#ff5b78; border-color:rgba(255,23,68,.35); }
.btn--danger:hover { background:rgba(255,23,68,.22); }

/* Sélecteur d'heure amélioré */
.time-select { display:flex; align-items:center; gap:10px; max-width:300px; }
.time-select select { width:118px; min-height:46px; padding:0 38px 0 14px; border-radius:12px; border:1px solid rgba(255,255,255,.10); background:#0b0f15; color:#f5f7fb; font-size:16px; font-weight:700; cursor:pointer; outline:none; transition:border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.time-select select:hover { border-color:rgba(255,23,68,.45); background:#0f141c; }
.time-select select:focus { border-color:#ff1744; box-shadow:0 0 0 3px rgba(255,23,68,.12); }
.time-select span { color:#ff5b78; font-size:20px; font-weight:900; }
@media (max-width:520px) { .time-select select { width:105px; } }

/* ===== Slots disponibles — stepper ===== */
.slots-field {
  max-width: 420px;
}

.slots-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.slots-label-row label {
  margin: 0;
}

.slots-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(63, 210, 143, 0.22);
  border-radius: 999px;
  background: rgba(63, 210, 143, 0.08);
  color: #7ee8b7;
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
}

.slots-state.is-complete {
  border-color: rgba(255, 100, 119, 0.25);
  background: rgba(255, 100, 119, 0.08);
  color: var(--danger);
}

.slots-stepper {
  display: grid;
  grid-template-columns: 52px minmax(130px, 1fr) 52px;
  align-items: stretch;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg-inset);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.slots-stepper:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.slots-stepper-btn {
  border: 0;
  background: rgba(255,255,255,.025);
  color: var(--text-dim);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .12s ease;
}

.slots-stepper-btn:first-child {
  border-right: 1px solid var(--border-soft);
}

.slots-stepper-btn:last-child {
  border-left: 1px solid var(--border-soft);
}

.slots-stepper-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent);
}

.slots-stepper-btn:active:not(:disabled) {
  transform: scale(.95);
}

.slots-stepper-btn:disabled {
  opacity: .28;
  cursor: not-allowed;
}

.slots-stepper-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
}

.slots-stepper-value input[type='number'] {
  width: 62px;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  text-align: right;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 850;
  appearance: textfield;
  -moz-appearance: textfield;
}

.slots-stepper-value input[type='number']::-webkit-inner-spin-button,
.slots-stepper-value input[type='number']::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.slots-stepper-value span {
  color: var(--text-faint);
  font-size: .78rem;
  font-weight: 700;
}

.creation-fields.is-disabled .slots-stepper {
  pointer-events: none;
}

@media (max-width: 520px) {
  .slots-label-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .slots-stepper {
    grid-template-columns: 48px minmax(110px, 1fr) 48px;
  }
}

/* ===== Hiérarchie ===== */
.hierarchy-card{max-width:1050px}.hierarchy-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}.hierarchy-head h2{margin:0 0 6px}.hierarchy-list{display:grid;gap:10px}.hierarchy-row{display:flex;align-items:center;gap:16px;padding:14px 16px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.025)}.hierarchy-rank{width:62px;min-width:62px;height:48px;display:flex;align-items:center;justify-content:center;gap:3px;border-radius:10px;background:rgba(255,35,55,.10);border:1px solid rgba(255,35,55,.25)}.hierarchy-rank span{opacity:.55}.hierarchy-rank strong{font-size:20px}.hierarchy-role{flex:1}.hierarchy-role label{display:block;font-size:12px;font-weight:700;letter-spacing:.04em;opacity:.7;margin-bottom:6px}.hierarchy-role select{width:100%}.hierarchy-actions{display:flex;justify-content:flex-end;margin-top:20px}@media(max-width:700px){.hierarchy-head{flex-direction:column}.hierarchy-row{align-items:flex-start}.hierarchy-rank{width:48px;min-width:48px}.hierarchy-head>.btn{width:100%}}

/* ===== Publication Hiérarchie Components V2 ===== */
.hierarchy-publish-card{max-width:1050px;margin-top:18px}.hierarchy-publish-card .field{margin-top:8px}.hierarchy-publish-card select{width:100%}.hierarchy-publish-card .v2-badge{white-space:nowrap}
.hierarchy-message-field{margin-top:22px}.hierarchy-message-field textarea{width:100%;min-height:120px;resize:vertical}
.hierarchy-role-message{flex:1.2}.hierarchy-role-message label{display:block;font-size:12px;font-weight:700;letter-spacing:.04em;opacity:.7;margin-bottom:6px}.hierarchy-role-message input{width:100%}@media(max-width:850px){.hierarchy-row{flex-wrap:wrap}.hierarchy-role,.hierarchy-role-message{flex:1 1 300px}}



/* ===== RÔLES UTILISATEUR DANS LA SIDEBAR ===== */
.sidebar-roles {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.sidebar-roles__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.sidebar-roles__title {
  color: var(--text);
  font-size: .76rem;
  font-weight: 700;
}

.sidebar-roles__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,128,.32);
  background: rgba(0,255,128,.08);
  color: var(--accent);
  font-size: .67rem;
  font-weight: 800;
}

.sidebar-roles__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.sidebar-role {
  --role-color: #9ca3af;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--role-color) 58%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--role-color) 9%, rgba(8,12,16,.92));
  color: var(--role-color);
  font-size: .69rem;
  font-weight: 700;
  line-height: 1;
}

.sidebar-role__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--role-color);
  box-shadow: 0 0 7px color-mix(in srgb, var(--role-color) 65%, transparent);
}

.sidebar-role__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-roles__empty {
  color: var(--text-faint);
  font-size: .69rem;
}

/* ========================================
   SUPPRIMER TOUTES LES SCROLLBARS VISIBLES
   Le scroll à la molette reste fonctionnel
======================================== */

html,
body,
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-button {
    display: none !important;
}
