:root {
  /* --- Zen Nexus : palette --- */
  --bg: #050816;
  --bg-secondary: #090e1d;
  --bg-surface: rgba(15, 23, 42, 0.72);
  --bg-card: rgba(18, 27, 48, 0.78);
  --bg-card-hover: rgba(24, 37, 65, 0.92);
  --border: rgba(148, 163, 184, 0.13);
  --border-active: rgba(0, 194, 255, 0.55);

  --blue: #008cff;
  --cyan: #00d9ff;
  --blue-premium: #2563ff;
  --violet: #7657ff;
  --success: #32d583;
  --warning: #ff9f43;
  --danger: #ff5c7c;

  --text: #f8fafc;
  --text-muted: #aab6cf;
  --text-dim: #69758d;

  --gradient-premium: linear-gradient(135deg, #00d9ff 0%, #2563ff 52%, #7657ff 100%);
  --gradient-cta: linear-gradient(135deg, #008cff 0%, #00d9ff 100%);

  /* Alias rétro-compatibles : tout le CSS existant qui référence ces noms
     hérite automatiquement de la nouvelle palette, sans avoir à toucher
     chaque règle une par une. */
  --accent: var(--blue);
  --accent-hover: var(--cyan);
  --bg-elevated: var(--bg-secondary);

  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-heading: "Space Grotesk", "Sora", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --sidebar-width: 264px;
  --sidebar-width-collapsed: 76px;
  --topbar-height: 62px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 140, 255, 0.12), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(118, 87, 255, 0.10), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(0, 217, 255, 0.06), transparent 40%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--blue); }

h1, h2, h3 { font-family: var(--font-heading); color: var(--text); }
h1 { font-size: 2rem; font-weight: 700; margin: 0 0 0.35rem; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0; }
p { color: var(--text-muted); margin: 0; }
code {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85em;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ==================================================
   Sidebar
   ================================================== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.9rem;
  z-index: 40;
  transition: width 0.22s var(--ease), transform 0.22s var(--ease);
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: var(--text);
  text-decoration: none; padding: 0.4rem 0.6rem 1.3rem;
}
.sidebar-brand:hover { color: var(--text); }
.sidebar-brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--gradient-cta);
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.7);
  flex-shrink: 0;
}
.sidebar-brand-text { white-space: nowrap; overflow: hidden; }

.sidebar-group { margin-bottom: 1.4rem; }
.sidebar-group-title {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); font-weight: 700; padding: 0 0.6rem; margin-bottom: 0.5rem;
  white-space: nowrap; overflow: hidden;
}
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.6rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.88rem; font-weight: 600;
  margin-bottom: 0.15rem; white-space: nowrap; overflow: hidden;
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.sidebar-link svg { flex-shrink: 0; color: var(--text-dim); transition: color 0.18s var(--ease); }
.sidebar-link:hover { background: var(--bg-card); color: var(--text); }
.sidebar-link:hover svg { color: var(--cyan); }
.sidebar-link.is-active {
  background: rgba(0, 140, 255, 0.12);
  border-color: var(--border-active);
  color: var(--text);
  box-shadow: 0 0 16px rgba(0, 140, 255, 0.15);
}
.sidebar-link.is-active svg { color: var(--cyan); }
.sidebar-link-text { overflow: hidden; text-overflow: ellipsis; }

.sidebar-collapse-btn {
  margin-top: auto; display: flex; align-items: center; gap: 0.6rem;
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: var(--radius-sm); padding: 0.55rem 0.6rem; cursor: pointer;
  font-size: 0.8rem; font-family: inherit; white-space: nowrap; overflow: hidden;
}
.sidebar-collapse-btn:hover { color: var(--text); border-color: var(--border-active); }
.sidebar-collapse-btn svg { flex-shrink: 0; transition: transform 0.22s var(--ease); }

body.sidebar-collapsed .sidebar { width: var(--sidebar-width-collapsed); }
body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .sidebar-group-title,
body.sidebar-collapsed .sidebar-link-text,
body.sidebar-collapsed .sidebar-collapse-btn span { display: none; }
body.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
body.sidebar-collapsed .page,
body.sidebar-collapsed .topbar-slim { margin-left: var(--sidebar-width-collapsed); }

.sidebar-overlay { display: none; }

@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  body.sidebar-mobile-open .sidebar { transform: translateX(0); }
  body.sidebar-collapsed .page,
  .page, .topbar-slim { margin-left: 0 !important; }
  body.sidebar-mobile-open .sidebar-overlay {
    display: block; position: fixed; inset: 0; background: rgba(2, 5, 15, 0.6);
    z-index: 35; backdrop-filter: blur(2px);
  }
  .sidebar-mobile-toggle { display: inline-flex !important; }
}

/* ==================================================
   Topbar (fine, au-dessus du contenu)
   ================================================== */
.topbar-slim {
  margin-left: var(--sidebar-width); transition: margin-left 0.22s var(--ease);
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem; height: var(--topbar-height);
  background: rgba(5, 8, 22, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.sidebar-mobile-toggle {
  display: none; background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); width: 34px; height: 34px; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.topbar-crumbs { font-size: 0.85rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-crumbs a { color: var(--text-muted); }
.topbar-crumbs a:hover { color: var(--cyan); }

.status-pill {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.76rem; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 0.28rem 0.65rem 0.28rem 0.5rem;
  flex-shrink: 0;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.status-pill .dot.is-online { background: var(--success); box-shadow: 0 0 8px rgba(50, 213, 131, 0.7); }
.status-pill .dot.is-offline { background: var(--danger); box-shadow: 0 0 8px rgba(255, 92, 124, 0.7); }

.topbar-right { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; flex-shrink: 0; }

.lang-switch { display: flex; gap: 0.2rem; font-size: 0.76rem; font-weight: 700; }
.lang-switch a { color: var(--text-dim); padding: 0.28rem 0.55rem; border-radius: 6px; }
.lang-switch a:hover { color: var(--text); background: var(--bg-card-hover); }
.lang-switch a.is-active { color: var(--text); background: var(--bg-card); border: 1px solid var(--border); }

/* Menu profil */
.profile-menu { position: relative; }
.profile-trigger {
  display: flex; align-items: center; gap: 0.5rem; background: none; border: 1px solid transparent;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem; border-radius: 999px; cursor: pointer; color: var(--text);
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
}
.profile-trigger:hover { background: var(--bg-card); border-color: var(--border); }
.profile-trigger img { width: 30px; height: 30px; border-radius: 50%; }
.profile-trigger svg { color: var(--text-dim); }
.profile-dropdown {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 200px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  padding: 0.4rem; display: none; flex-direction: column; gap: 0.1rem; z-index: 50;
}
.profile-menu.is-open .profile-dropdown { display: flex; }
.profile-dropdown a, .profile-dropdown button {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 7px;
  color: var(--text-muted); font-size: 0.85rem; font-weight: 500; text-align: left;
  background: none; border: none; width: 100%; cursor: pointer; font-family: inherit;
}
.profile-dropdown a:hover, .profile-dropdown button:hover { background: var(--bg-card); color: var(--text); }
.profile-dropdown svg { color: var(--text-dim); flex-shrink: 0; }
.profile-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 0.3rem 0; }
.profile-dropdown .is-danger { color: var(--danger); }
.profile-dropdown .is-danger svg { color: var(--danger); }

/* ==================================================
   Layout général
   ================================================== */
.page {
  max-width: 1080px; margin-left: var(--sidebar-width); margin-right: auto;
  padding: 2.25rem 2rem 4rem; animation: page-in 0.32s var(--ease);
  transition: margin-left 0.22s var(--ease);
}
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-header { margin-bottom: 1.9rem; }
.section { margin-bottom: 2.25rem; }
.section-title { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; margin-bottom: 0.9rem; }

/* ==================================================
   Cartes
   ================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 12px 28px rgba(0,0,0,0.18);
}
.card + .card { margin-top: 1rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(0, 194, 255, 0.12), 0 16px 32px rgba(0, 20, 60, 0.35);
}
.feature-card.is-configured { border-color: rgba(0, 217, 255, 0.28); }
.feature-card .icon-square {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(0, 140, 255, 0.22), rgba(118, 87, 255, 0.22));
  border: 1px solid rgba(0, 194, 255, 0.2);
  color: var(--cyan);
}
.feature-card .icon { font-size: 1.5rem; line-height: 1; margin-top: 0.1rem; }
.feature-card .body { flex: 1; min-width: 0; }
.feature-card .body a.title { display: block; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; font-family: var(--font-heading); }
.feature-card .body a.title:hover { color: var(--cyan); }
.feature-card .body .desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.45; }
.feature-card .body .card-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.feature-card .toggle-form { margin-top: 0.15rem; flex-shrink: 0; }
.feature-card.is-off { opacity: 0.62; }
.feature-card.is-hidden-by-filter { display: none; }

.config-status { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; color: var(--text-dim); }
.config-status svg { width: 13px; height: 13px; }
.config-status.is-configured { color: var(--success); }

/* ==================================================
   Badges
   ================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px;
  background: rgba(148, 163, 184, 0.14); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.badge.badge-free { background: rgba(148, 163, 184, 0.14); color: var(--text-muted); }
.badge.badge-premium {
  background: var(--gradient-premium); color: white;
  box-shadow: 0 0 14px rgba(118, 87, 255, 0.35);
}
.badge.badge-active { background: rgba(50, 213, 131, 0.15); color: var(--success); }

/* ==================================================
   Barre de statistiques (Centre de fonctionnalités)
   ================================================== */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
.stat-tile {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.stat-tile .stat-value { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; color: var(--text); }
.stat-tile .stat-value.accent { background: var(--gradient-cta); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile .stat-label { font-size: 0.76rem; color: var(--text-dim); margin-top: 0.2rem; }

/* Filtres rapides */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.filter-chip {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 999px; padding: 0.4rem 0.95rem; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.18s var(--ease);
}
.filter-chip:hover { color: var(--text); border-color: var(--border-active); }
.filter-chip.is-active { background: var(--gradient-cta); color: white; border-color: transparent; }

/* ==================================================
   Interrupteur
   ================================================== */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(148, 163, 184, 0.25); border-radius: 999px; transition: background 0.2s var(--ease);
}
.switch .slider::before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: white; border-radius: 50%; transition: transform 0.2s var(--ease);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.switch input:checked + .slider { background: var(--gradient-cta); box-shadow: 0 0 10px rgba(0, 217, 255, 0.4); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ==================================================
   Boutons
   ================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--gradient-cta);
  color: white;
  padding: 0.62rem 1.3rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 600;
  transition: filter 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  box-shadow: 0 4px 16px rgba(0, 140, 255, 0.25);
}
.btn:hover { filter: brightness(1.1); color: white; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.danger { background: var(--danger); box-shadow: 0 4px 16px rgba(255, 92, 124, 0.25); }
.btn.danger:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn.secondary:hover { background: var(--bg-card-hover); color: var(--text); border-color: var(--border-active); }
.btn.small { padding: 0.42rem 0.85rem; font-size: 0.8rem; }

/* ==================================================
   Formulaires
   ================================================== */
.field { margin-bottom: 1.15rem; }
.field:last-child { margin-bottom: 0; }
label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 0.35rem; }
.field-hint { display: block; font-size: 0.76rem; color: var(--text-dim); margin-top: 0.3rem; }
input[type=text], input[type=number], textarea, select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input[type=text]:focus, input[type=number]:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
textarea { min-height: 76px; resize: vertical; }
.color-field { display: flex; align-items: center; gap: 0.6rem; }
.color-field input[type=color] { width: 42px; height: 38px; padding: 2px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-surface); cursor: pointer; }
.color-field input[type=text] { flex: 1; }
.checkbox-field { display: flex; align-items: center; gap: 0.55rem; }
.checkbox-field input { width: 17px; height: 17px; accent-color: var(--blue); }
.checkbox-field label { margin: 0; }

.form-actions { margin-top: 1.5rem; display: flex; gap: 0.6rem; align-items: center; }
.unsaved-indicator {
  font-size: 0.78rem; color: var(--warning); font-weight: 600; display: none; align-items: center; gap: 0.35rem;
}
.unsaved-indicator.is-visible { display: inline-flex; }

/* ==================================================
   Divers
   ================================================== */
.error { background: rgba(255, 92, 124, 0.1); border: 1px solid rgba(255, 92, 124, 0.3); color: #ffb0c1; padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: 0.88rem; }
.guild-icon { width: 40px; height: 40px; border-radius: 50%; }
.guild-list-item { display: flex; align-items: center; gap: 0.85rem; }
.guild-list-item .name { font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 0.65rem 0.75rem; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); border-bottom: 1px solid var(--border); }
td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; color: var(--text); }
tr:last-child td { border-bottom: none; }

.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 140, 255, 0.16), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(118, 87, 255, 0.14), transparent 40%),
    var(--bg);
}
.login-card {
  max-width: 400px; width: 100%; text-align: center;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 20, 60, 0.4);
}
.login-card .logo { font-size: 2.5rem; margin-bottom: 0.75rem; }

.empty-state { text-align: center; padding: 2rem 1rem; color: var(--text-dim); font-size: 0.9rem; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.feature-search { font-size: 0.95rem; padding: 0.75rem 1.1rem 0.75rem 2.6rem; }

/* --- Sélecteurs Discord (salons/rôles) --- */
select option { background: var(--bg-secondary); color: var(--text); }

.checklist-field { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); overflow: hidden; }
.checklist-search {
  width: 100%; padding: 0.6rem 0.75rem; border: none; border-bottom: 1px solid var(--border);
  background: var(--bg-secondary); color: var(--text); font-family: inherit; font-size: 0.85rem;
}
.checklist-search:focus { outline: none; }
.checklist-options { max-height: 220px; overflow-y: auto; padding: 0.4rem; }
.checklist-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: 5px; font-size: 0.87rem; cursor: pointer; }
.checklist-option:hover { background: var(--bg-card-hover); }
.checklist-option input { width: 15px; height: 15px; accent-color: var(--blue); flex-shrink: 0; }
.checklist-option.is-hidden { display: none; }
.checklist-empty { padding: 0.6rem; color: var(--text-dim); font-size: 0.85rem; }

/* --- Aperçu d'embed Discord --- */
.discord-embed-preview {
  background: #2b2d31;
  border-left: 4px solid #2b2d31;
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  max-width: 480px;
  font-size: 0.875rem;
  color: #dbdee1;
}
.discord-embed-preview .embed-thumb { float: right; width: 64px; height: 64px; border-radius: 4px; object-fit: cover; margin-left: 0.75rem; }
.discord-embed-preview .embed-title { font-weight: 700; color: #fff; margin-bottom: 0.3rem; white-space: pre-wrap; }
.discord-embed-preview .embed-description { color: #dbdee1; white-space: pre-wrap; margin-bottom: 0.4rem; }
.discord-embed-preview .embed-image { display: block; max-width: 100%; border-radius: 4px; margin-top: 0.5rem; }
.discord-embed-preview .embed-footer { color: #949ba4; font-size: 0.75rem; margin-top: 0.5rem; clear: both; }
.discord-embed-preview .embed-empty { color: #6d7178; font-size: 0.8rem; font-style: italic; }

/* --- Glisser-déposer --- */
.drag-list { display: flex; flex-direction: column; gap: 0.35rem; }
.drag-item {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.8rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: grab;
}
.drag-item.is-dragging { opacity: 0.4; }
.drag-handle { color: var(--text-dim); font-size: 1.1rem; user-select: none; }
.drag-item-body { flex: 1; min-width: 0; }
.drag-item-title { font-weight: 600; font-size: 0.9rem; }
.drag-item-desc { font-size: 0.78rem; color: var(--text-muted); }

/* --- Liste salon + message à conserver (nettoyage périodique) --- */
.channel-message-list { display: flex; flex-direction: column; gap: 0.5rem; }
.channel-message-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.channel-message-row {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.7rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.channel-message-row .cm-channel { flex: 1; min-width: 0; }
.channel-message-row .cm-message { flex: 1; min-width: 0; }
.channel-message-list .cm-add { align-self: flex-start; }
.channel-message-list template { display: none; }

/* --- Pages légales (CGU / confidentialité) : texte long, espacements classiques --- */
.legal-content h2 { margin-top: 1.6rem; color: var(--text); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 0.9rem; line-height: 1.55; }
.legal-content ul { margin: 0 0 0.9rem; padding-left: 1.3rem; color: var(--text-muted); }
.legal-content li { margin-bottom: 0.35rem; line-height: 1.5; }

/* --- Page Statuts --- */
.status-row { display: flex; align-items: center; gap: 0.9rem; }
.status-row + .status-row { margin-top: 0.7rem; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; }
.status-dot.is-online { background: var(--success); box-shadow: 0 0 8px rgba(50, 213, 131, 0.6); }
.status-dot.is-offline { background: var(--danger); box-shadow: 0 0 8px rgba(255, 92, 124, 0.6); }
.status-title { font-weight: 600; }
.status-detail { font-size: 0.83rem; color: var(--text-muted); }
.status-label { margin-left: auto; font-weight: 700; font-size: 0.85rem; }

/* --- Hero Premium --- */
.premium-hero {
  border-radius: 20px; padding: 2.5rem 2rem; margin-bottom: 2rem; text-align: center;
  background:
    radial-gradient(circle at 30% 0%, rgba(0, 217, 255, 0.18), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(118, 87, 255, 0.16), transparent 55%),
    var(--bg-secondary);
  border: 1px solid var(--border);
}
.premium-hero h1 { font-size: 2.1rem; margin-bottom: 0.6rem; }
.premium-hero p { max-width: 520px; margin: 0 auto; font-size: 0.98rem; }

.plan-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.plan-card.is-recommended {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    var(--gradient-premium) border-box;
  box-shadow: 0 0 30px rgba(118, 87, 255, 0.18);
}
.plan-card .plan-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--gradient-premium); color: white; font-size: 0.68rem; font-weight: 700;
  padding: 0.25rem 0.7rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em;
}

/* ==================================================
   Toasts
   ================================================== */
.toast-stack {
  position: fixed; top: 1.2rem; right: 1.2rem; z-index: 100;
  display: flex; flex-direction: column; gap: 0.6rem; max-width: 340px;
}
.toast {
  display: flex; align-items: flex-start; gap: 0.6rem;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem; box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  font-size: 0.85rem; color: var(--text);
  animation: toast-in 0.25s var(--ease);
}
.toast.is-leaving { animation: toast-out 0.2s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }
.toast svg { flex-shrink: 0; margin-top: 0.1rem; }
.toast.toast-success svg { color: var(--success); }
.toast.toast-error svg { color: var(--danger); }
.toast.toast-warning svg { color: var(--warning); }
.toast.toast-info svg { color: var(--cyan); }
