* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #000;
  --bg-card: #0a0a0a;
  --bg-nav: #0a0a0a;
  --border: #26262b;
  --text: #e6edf3;
  --text-muted: #7d8590;
  --primary: #e63946;
  --primary-hover: #f04a57;
  --danger: #e63946;
  --success: #3fb950;
  --warning: #d29922;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

.navbar {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.nav-logo span { color: var(--primary); }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.user-badge {
  background: var(--primary);
  color: var(--bg);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.hero {
  padding: 100px 20px;
  text-align: center;
}
.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), #a371f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; }

.features { padding: 60px 20px; max-width: 1200px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--primary); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger {
  background: var(--danger);
  color: #fff;
  padding: 6px 14px;
  font-size: 0.8rem;
}
.btn-danger:hover { opacity: 0.85; color: #fff; }
.btn-full { width: 100%; text-align: center; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
  padding: 40px 20px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-card h2 { margin-bottom: 4px; }
.auth-subtitle { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
.auth-links { margin-top: 14px; text-align: center; font-size: 0.85rem; }
.auth-links a { color: var(--text-muted); text-decoration: none; }
.auth-links a:hover { color: var(--accent); }
.auth-footer { margin-top: 20px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.form-group input, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--primary);
}

.error-message {
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(248,81,73,0.1);
  border-radius: 6px;
}

.form-hint {
  font-size: 0.8rem;
  color: #888;
  margin-top: 6px;
}

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

.dashboard-container {
  display: flex;
  min-height: calc(100vh - 60px);
}

.sidebar {
  width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
}
.sidebar ul { list-style: none; }
.sidebar a {
  display: block;
  padding: 12px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.sidebar a:hover, .sidebar a.tab-active {
  color: var(--text);
  background: rgba(230,57,70,0.08);
  border-right: 2px solid var(--primary);
}

.main-content {
  flex: 1;
  padding: 32px;
  max-width: 960px;
}
.main-content h2 { margin-bottom: 20px; font-size: 1.5rem; }
.profile-layout { display: flex; gap: 32px; align-items: flex-start; }
.profile-avatar-section { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; }
.profile-avatar-frame { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; border: 3px solid var(--border); background: var(--bg-card); }
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.file-label-center { cursor: pointer; font-size: 0.85rem; color: var(--primary); text-align: center; }
.file-label-center:hover { color: var(--primary-hover); }
@media (max-width: 600px) { .profile-layout { flex-direction: column; align-items: center; } }

.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.tab-header h2 { margin-bottom: 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.stat-label { color: var(--text-muted); font-size: 0.85rem; }

.item-list { display: flex; flex-direction: column; gap: 12px; }
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.item-card .item-info h4 { margin-bottom: 4px; }
.item-card .item-info p { color: var(--text-muted); font-size: 0.85rem; }
.item-card .item-actions { display: flex; gap: 8px; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-online { background: rgba(63,185,80,0.15); color: var(--success); }
.status-offline { background: rgba(139,148,158,0.15); color: var(--text-muted); }

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-close:hover { color: var(--text); }
.modal h3 { margin-bottom: 20px; }

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}
.profile-field {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.profile-field:last-child { border-bottom: none; }

.admin-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.admin-stats strong { color: var(--text); }

.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
tr:hover td { background: rgba(230,57,70,0.05); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.chat-body { overflow: hidden; }
#chat-app { display: flex; flex-direction: column; height: calc(100vh - 60px); }
#login { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 12px; padding: 20px; }
#login h1 { font-size: 1.8rem; color: var(--primary); }
#login input, #login .file-label { width: 320px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.95rem; outline: none; }
#login input:focus { border-color: var(--primary); }
#login .file-label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-muted); }
#login .file-label:hover { border-color: var(--primary); color: var(--text); }
#login .file-label input { display: none; }
.avatar-row { display: flex; align-items: center; gap: 12px; width: 320px; }
.avatar-preview { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
#chat-ui { display: none; flex-direction: column; flex: 1; }
#chat-header { display: flex; align-items: center; padding: 8px 16px; background: var(--bg-card); border-bottom: 1px solid var(--border); gap: 12px; }
.ch-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.ch-title { color: var(--primary); font-weight: 700; font-size: 0.95rem; }
.ch-server { color: var(--text-muted); font-size: 0.8rem; }
.ch-right { display: flex; align-items: center; gap: 8px; }
.ch-nick { color: var(--primary); font-weight: 600; font-size: 0.85rem; }
.ch-online { color: var(--text-muted); font-size: 0.8rem; }
#chat-main { display: flex; flex: 1; overflow: hidden; }
#ch-sidebar { width: 200px; background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
#ch-chan-header, #ch-users-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.btn-icon { background: none; border: 1px solid var(--border); color: var(--primary); padding: 2px 8px; border-radius: 4px; cursor: pointer; font-size: 14px; font-family: inherit; }
.btn-icon:hover { background: var(--primary); color: #fff; }
#ch-channel-list { flex: 1; overflow-y: auto; }
.chan {
  height: 32px; padding: 0 8px; margin: 1px 0;
  cursor: pointer; border-radius: 4px;
  display: flex; align-items: center; gap: 6px; justify-content: flex-start;
  font-size: 0.9375rem; font-weight: 500; transition: background .1s, color .1s;
  color: #949ba4; white-space: nowrap; overflow: hidden;
}
.chan .chan-hash { color: #80848e; font-size: 1.05rem; }
.chan:hover { background: #35373c; color: #dbdee1; }
.chan.active { background: #404249; color: #fff; }
.chan.active .chan-hash { color: #fff; }
.chan-del { color: var(--danger); font-size: 12px; cursor: pointer; opacity: 0; margin-left: auto; }
.chan:hover .chan-del { opacity: .6; }
.chan-del:hover { opacity: 1 !important; }
.chan-cat {
  display: flex; align-items: center; gap: 5px; margin-top: 14px; margin-bottom: 2px;
  padding: 4px 10px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.4px;
  color: #949ba4; cursor: pointer; text-transform: uppercase; user-select: none;
}
.chan-cat:hover { color: #dbdee1; }
.chan-cat-arrow { font-size: 0.55rem; width: 10px; text-align: center; }
.chan-cat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ch-user-list { padding: 4px 0; max-height: 120px; overflow-y: auto; }
.online-user { padding: 4px 14px; font-size: 0.8rem; display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.online-user.me { color: var(--primary); }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; }
.you-badge { font-size: 0.65rem; padding: 1px 5px; border-radius: 6px; background: rgba(88,166,255,0.15); color: var(--primary); }
#ch-content { flex: 1; display: flex; flex-direction: column; }
#ch-messages { flex: 1; overflow-y: auto; padding: 0 16px; display: flex; flex-direction: column; }
.msg { display: flex; gap: 10px; padding: 2px 16px; border-radius: 4px; transition: background .1s; position: relative; margin-top: 17px; }
.msg:hover { background: #2e3035; }
.msg.group { padding-top: 0; padding-bottom: 0; margin-top: 2px; }
.msg.group .msg-avatar-wrap { visibility: hidden; height: 0; }
.msg.group .msg-head { height: 0; overflow: visible; margin: 0; }
.msg.group .msg-name,
.msg.group .msg-time,
.msg.group .msg-ping-badge,
.msg.group .msg-edited,
.msg.group .msg-pin-badge { display: none; }
.msg.group:hover .msg-time { display: inline; position: absolute; left: -52px; top: 3px; margin: 0; opacity: .7; }
.msg-date-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 6px; color: #949ba4; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.msg-date-sep::before, .msg-date-sep::after {
  content: ''; flex: 1; height: 1px; background: #26272b;
}
.msg-date-sep.first::after { background: transparent; }
.dc-jump-new {
  display: none; position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%);
  background: #5865f2; color: #fff; border-radius: 20px;
  padding: 7px 14px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4); z-index: 60; margin: 8px 0;
}
.dc-jump-new.show { display: block; }
.dc-jump-new:hover { background: #4752c4; }
.dc-jump-arrow { font-size: 0.9rem; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: var(--border); }
.msg-content { flex: 1; min-width: 0; }
.msg-head { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.msg-name { color: #ffd700; font-weight: 600; cursor: pointer; font-size: 1rem; line-height: 1.375; }
.msg-name.me { color: var(--primary); }
.msg-time { color: var(--text-muted); margin-left: 6px; opacity: .6; font-size: 0.75rem; font-weight: 400; }
.msg-body { color: var(--text); line-height: 1.375; font-size: 1rem; word-break: break-word; }
.msg-body.emote { color: var(--text-muted); font-style: italic; }
#ch-input-bar { display: flex; padding: 10px 16px; gap: 8px; border-top: 1px solid var(--border); background: var(--bg-card); }
#ch-input-bar input { flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.95rem; outline: none; }
#ch-input-bar input:focus { border-color: var(--primary); }
#ch-input-bar button { background: var(--primary); color: #fff; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
#ch-input-bar button:hover { background: var(--primary-hover); }
.ch-file-preview { display: flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 0.8rem; color: var(--text-muted); background: rgba(127,127,127,0.08); }
.ch-file-preview .tag { background: var(--primary); color: #fff; padding: 1px 8px; border-radius: 8px; font-size: 0.7rem; font-weight: 700; }

/* Pièces jointes et embeds dans les messages */
.msg-attach { margin-top: 8px; }
.msg-attach img { max-width: 380px; max-height: 320px; border-radius: 8px; display: block; cursor: pointer; border: 1px solid var(--border); }
.msg-attach .file-card { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: rgba(127,127,127,0.07); text-decoration: none; color: var(--text); font-size: 0.85rem; max-width: 380px; }
.msg-attach .file-card .ic { font-size: 1.3rem; }
.msg-attach .file-card .sz { color: var(--text-muted); font-size: 0.72rem; }
.msg-link-embed { margin-top: 8px; display: block; }
.msg-link-embed a { color: #00a8ff; text-decoration: none; word-break: break-all; }

/* Markdown dans les messages */
.md-code {
  background: #1e1f22; border: 1px solid #26272b; border-radius: 4px;
  padding: 1px 5px; font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.82em; color: #dbdee1;
}
.md-code-block {
  display: block; background: #1e1f22; border: 1px solid #26272b; border-radius: 6px;
  padding: 8px 12px; margin: 4px 0; font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.82em; white-space: pre-wrap; color: #dbdee1;
}
.md-quote {
  border-left: 4px solid #4e5058; color: #b5bac1;
  padding: 2px 10px; margin: 3px 0;
}
.md-link { color: #00a8ff; text-decoration: none; word-break: break-all; }
.md-link:hover { text-decoration: underline; }
.md-mention {
  background: rgba(88,101,242,0.3); color: #dee0fc; border-radius: 4px;
  padding: 0 4px; font-weight: 600; cursor: pointer;
}
.md-mention:hover { background: rgba(88,101,242,0.5); color: #fff; }
.md-spoiler {
  background: #1e1f22; color: transparent; border-radius: 4px; padding: 0 4px;
  cursor: pointer; user-select: none; transition: color .15s;
}
.md-spoiler.revealed { color: inherit; background: rgba(127,127,127,0.15); }

/* Menu contextuel des messages */
#msgMenu {
  position: fixed; z-index: 200; min-width: 220px;
  background: #111214; border: 1px solid #26272b; border-radius: 8px;
  padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.55);
}
#msgMenu .mm-item {
  padding: 7px 10px; border-radius: 4px; font-size: 0.82rem;
  color: #dbdee1; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
#msgMenu .mm-item:hover { background: #5865f2; color: #fff; }
#msgMenu .mm-danger:hover { background: #da373c; }
#msgMenu .mm-sep { height: 1px; background: #26272b; margin: 5px 4px; }
#msgMenu .mm-item.mm-reacts { cursor: default; flex-wrap: wrap; gap: 4px; }
#msgMenu .mm-item.mm-reacts:hover { background: transparent; }
#msgMenu .mm-emoji { font-size: 1.1rem; cursor: pointer; padding: 2px; border-radius: 4px; }
#msgMenu .mm-emoji:hover { background: #2b2d31; }
.msg-link-embed img { max-width: 380px; max-height: 320px; border-radius: 8px; display: block; margin-top: 4px; border: 1px solid var(--border); cursor: pointer; }
.msg-img-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.88); display: flex; align-items: center; justify-content: center; z-index: 10001; cursor: zoom-out; }
.msg-img-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 6px; }

/* Modal de recadrage d'avatar */
.crop-stage { width: 260px; height: 260px; margin: 0 auto 14px; border-radius: 10px; overflow: hidden; background: #111; position: relative; cursor: grab; }
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { display: block; width: 100%; height: 100%; }
.crop-controls { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.crop-controls input[type="range"] { flex: 1; min-width: 120px; }
#ch-messages::-webkit-scrollbar { width: 6px; }
#ch-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Single page — noir & blanc sauf chrono rouge */
.single { background: #000; color: #aaa; min-height: 100vh; display: flex; align-items: center; justify-content: center; font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace; }
.single-container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 24px; width: 100%; }
.single-top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #000; z-index: 10; }
.single-logo { font-size: 1.1rem; font-weight: 700; color: #aaa; text-decoration: none; letter-spacing: -0.5px; }
.single-logo span { color: #666; }
.single-links { display: flex; gap: 16px; align-items: center; }
.single-links a { color: #888; text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.single-links a:hover { color: #fff; }
.single-center { text-align: center; }
.single-badge { font-size: 0.65rem; font-weight: 700; letter-spacing: 4px; color: #555; border: 1px solid #333; padding: 6px 14px; display: inline-block; margin-bottom: 32px; }
.single-chrono { font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace; color: #e63946; margin-bottom: 32px; line-height: 1; }
.chrono-row { display: flex; gap: 10px; justify-content: center; align-items: baseline; flex-wrap: wrap; }
.chrono-cell {
  font-size: 3rem; font-weight: 700; letter-spacing: 2px;
  background: rgba(230,57,70,0.06); border: 1px solid rgba(230,57,70,0.28);
  border-radius: 10px; padding: 12px 16px; min-width: 3ch; text-align: center;
  text-shadow: 0 0 40px rgba(230,57,70,0.25);
  font-variant-numeric: tabular-nums;
}
.chrono-cell.chrono-ms { font-size: 1.5rem; font-weight: 400; opacity: 0.7; min-width: 4.5ch; }
.single-text { font-size: 0.9rem; color: #555; letter-spacing: 1px; white-space: pre-wrap; }
.single-bottom { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 16px 24px; font-size: 0.7rem; color: #444; background: #000; }
@media (max-width: 768px) { .chrono-cell { font-size: 1.7rem; padding: 8px 10px; } .chrono-cell.chrono-ms { font-size: 1.1rem; } .chrono-row { gap: 6px; } }
.landing-hero h1 { font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -2px; }
.landing-hero h1 .accent { color: var(--primary); }
.landing-hero h1 .dim { color: var(--text-muted); font-weight: 400; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 32px; font-family: 'SF Mono', 'Fira Code', monospace; }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(48,54,61,0.3); }
.hero-stats .stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-stats .stat-num { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.hero-stats .stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.landing-section { padding: 100px 24px; }
.section-container { max-width: 1000px; margin: 0 auto; }
.landing-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; text-align: center; }
.landing-section h2 .accent { color: var(--primary); }
.section-desc { text-align: center; color: var(--text-muted); line-height: 1.7; max-width: 700px; margin: 0 auto 48px; font-size: 1.05rem; }
.landing-dark { background: #0a0d14; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.about-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; transition: border-color 0.2s, transform 0.2s; }
.about-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.about-icon { width: 36px; height: 36px; color: var(--primary); margin-bottom: 12px; }
.about-icon svg { width: 100%; height: 100%; }
.about-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.about-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.license-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 32px; }
.license-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.license-card h3 { font-size: 1rem; margin-bottom: 12px; color: var(--primary); }
.license-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.license-meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); padding-top: 12px; border-top: 1px solid var(--border); }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; gap: 24px; }
.footer-brand .nav-logo { font-size: 1.2rem; }
.footer-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); padding-top: 16px; border-top: 1px solid var(--border); }
@media (max-width: 768px) { .about-grid, .license-grid { grid-template-columns: 1fr; } .hero-stats { gap: 20px; flex-wrap: wrap; } .landing-hero h1 { font-size: 2.5rem; } .hero-badge, .hero-sub { font-size: 0.85rem; } }

@media (max-width: 768px) {
  .dashboard-container { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 0; }
  .sidebar a { padding: 10px 16px; }
  .sidebar a.tab-active { border-right: none; border-bottom: 2px solid var(--primary); }
  .main-content { padding: 20px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
}

/* Auth — thème single (noir & blanc, rouge) */
.single .auth-card {
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  text-align: left;
}
.single .auth-card h2 {
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  color: #e6edf3;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.single .auth-subtitle { color: #666; font-size: 0.85rem; margin-bottom: 28px; letter-spacing: 0.5px; }
.single .form-group label { color: #777; font-size: 0.8rem; letter-spacing: 1px; }
.single .form-group input, .single .form-group select {
  background: #000;
  border: 1px solid #333;
  border-radius: 8px;
  color: #ddd;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
}
.single .form-group input::placeholder { color: #444; }
.single .form-group input:focus, .single .form-group select:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.35);
}
.single .btn-primary {
  background: #e63946;
  border: 1px solid #e63946;
  color: #fff;
  letter-spacing: 1px;
}
.single .btn-primary:hover { background: #f04a57; border-color: #f04a57; color: #fff; }
.single .btn-outline {
  background: transparent;
  border-color: #333;
  color: #888;
}
.single .btn-outline:hover { border-color: #e63946; color: #e63946; }
.single .auth-footer { color: #666; margin-top: 24px; }
.single .auth-footer a { color: #888; }
.single .auth-footer a:hover { color: #fff; }
.single .checkbox-label { color: #777; font-size: 0.85rem; }
.single .checkbox-label input { accent-color: #e63946; }
.single .error-message {
  color: #e63946;
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 6px;
}
.single-links .btn-outline { border-color: #333; color: #888; padding: 5px 12px; font-size: 0.8rem; }
.single-links .btn-outline:hover { border-color: #e63946; color: #e63946; }

/* Auth — session */
.form-check { margin-bottom: 12px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }
.checkbox-label input { width: auto; }
.single-links .user-badge { background: #333; color: #e63946; font-size: 0.75rem; padding: 4px 10px; border-radius: 10px; }
.single-links .user-badge:hover { color: #e63946; }
.single-links [data-logout] { color: #888; }
.single-links [data-logout]:hover { color: #e63946; }

/* Profil — mot de passe */
.password-card { margin-top: 24px; max-width: 460px; }
.password-card h3 { margin-bottom: 16px; font-size: 1.05rem; }

/* Badges admin */
.role-badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.role-badge.role-admin { color: #ffd700; border-color: rgba(255,215,0,0.4); background: rgba(255,215,0,0.08); }
.role-badge.role-jc { color: var(--success); border-color: rgba(46,204,113,0.4); background: rgba(46,204,113,0.08); }
.role-badge.role-nojc { color: var(--text-muted); }
.user-name-cell { font-weight: 600; color: var(--text); }
.badge-admin-core { font-size: 0.65rem; color: var(--danger); border: 1px solid rgba(248,81,73,0.4); padding: 1px 5px; border-radius: 6px; }

/* Textarea */
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}
.form-group textarea:focus { border-color: var(--primary); }

/* Mail */
.mail-page { padding: 32px; max-width: 1200px; margin: 0 auto; }
.mail-layout { display: grid; grid-template-columns: 300px 1fr 1fr; gap: 24px; align-items: start; }
.mail-compose, .mail-inbox, .mail-read {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.mail-compose h2, .mail-inbox h2, .mail-read h2 { font-size: 1.1rem; margin-bottom: 16px; }
.mail-list { max-height: 520px; overflow-y: auto; }
.mail-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.mail-item:hover { border-color: var(--primary); background: rgba(230,57,70,0.05); }
.mail-item.unread { border-left: 3px solid var(--primary); background: rgba(230,57,70,0.04); }
.mail-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.mail-from { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.mail-date { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.mail-subject { font-size: 0.85rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item.unread .mail-subject { color: var(--text); font-weight: 600; }
.mail-view { min-height: 360px; }
.mail-view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.mail-view-head h3 { margin-bottom: 4px; }
.mail-view-meta { font-size: 0.8rem; color: var(--text-muted); }
.mail-view-body { font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.mail-list::-webkit-scrollbar { width: 6px; }
.mail-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
@media (max-width: 900px) { .mail-layout { grid-template-columns: 1fr; } }

/* ===== Chat — thème Discord ===== */
.chat-body {
  --bg: #313338;
  --bg-card: #383a40;
  --bg-nav: #2b2d31;
  --border: #26272b;
  --text: #dbdee1;
  --text-muted: #949ba4;
  --primary: #5865f2;
  --primary-hover: #4752c4;
  --interactive-normal: #b5bac1;
  --interactive-hover: #dbdee1;
  --interactive-active: #fff;
  --interactive-muted: #4e5058;
  --header-primary: #f2f3f5;
  --header-secondary: #b5bac1;
  --channeltextarea-background: #383a40;
  background: #313338;
}
.chat-body, .chat-body button, .chat-body input, .chat-body textarea {
  font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.chat-body ::-webkit-scrollbar { width: 8px; height: 8px; }
.chat-body ::-webkit-scrollbar-track { background: transparent; }
.chat-body ::-webkit-scrollbar-thumb {
  background: #1a1b1e; border-radius: 4px; border: 2px solid transparent; background-clip: padding-box;
}
.chat-body ::-webkit-scrollbar-thumb:hover { background: #26272b; background-clip: padding-box; }
.chat-body * { scrollbar-width: thin; scrollbar-color: #1a1b1e transparent; }
.chat-body .navbar { background: #1e1f22; border-bottom: 1px solid #26272b; }
.chat-body .nav-logo { color: #dbdee1; }
.chat-body .nav-logo span { color: #5865f2; }
.chat-body .nav-links a { color: #949ba4; }
.chat-body .nav-links a:hover, .chat-body .nav-links a.active { color: #dbdee1; }
.chat-body .btn-outline { border-color: #26272b; color: #949ba4; }
.chat-body .btn-outline:hover { border-color: #5865f2; color: #5865f2; }
.chat-body #login h1 { color: #5865f2; }
.chat-body .spinner { border-top-color: #5865f2 !important; }
.chat-body #login input, .chat-body #login .file-label {
  background: #383a40;
  border: 1px solid #26272b;
  color: #dbdee1;
}
.chat-body #login input:focus { border-color: #5865f2; }
.chat-body .error-message {
  color: #f23f43;
  background: rgba(242,63,67,0.1);
  border: 1px solid rgba(242,63,67,0.3);
}
.chat-body .avatar-preview { border-color: #26272b; }
.chat-body #chat-header { background: #383a40; border-bottom: 1px solid #26272b; }
.chat-body .ch-title { color: #5865f2; }
.chat-body #ch-sidebar { background: #2b2d31; border-right: 1px solid #26272b; }
.chat-body #ch-chan-header, .chat-body #ch-users-header { color: #949ba4; border-bottom: 1px solid #26272b; }
.chat-body .chan:hover { background: #35373c; }
.chat-body .chan.active {
  border-left-color: #5865f2;
  background: #404249;
  color: #fff;
}
.chat-body .online-user.me { color: #5865f2; }
.chat-body .you-badge { background: rgba(88,101,242,0.15); color: #5865f2; }
.chat-body .btn-icon { border: 1px solid #26272b; color: #5865f2; }
.chat-body .btn-icon:hover { background: #5865f2; color: #fff; }
.chat-body .msg:hover { background: #2e3035; }
.chat-body .msg-name.me { color: #5865f2; }
.chan-welcome {
  padding: 16px 16px 8px; margin-bottom: 8px;
}
.chan-welcome-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: #35373c; color: #f2f3f5;
  font-size: 2.2rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.chan-welcome-title { font-size: 1.65rem; font-weight: 800; color: #f2f3f5; margin: 0 0 6px; }
.chan-welcome-title b { font-weight: 800; }
.chan-welcome-sub { font-size: 0.9375rem; color: #b5bac1; margin: 0; }
.chat-body .msg-time { color: #72767d; }
.chat-body #ch-input-bar {
  padding: 0 16px 24px;
  background: transparent;
  border-top: none;
}
.chat-body #ch-input-wrap { position: relative; flex: 1; min-width: 0; }
.chat-body #ch-input-bar input {
  width: 100%;
  background: var(--channeltextarea-background);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9375rem;
  padding: 22px 16px 22px 56px;
  transition: border-color .15s;
  outline: none;
}
.chat-body #ch-input-bar input:hover { border-color: #1e1f22; }
.chat-body #ch-input-bar input:focus { border-color: #000; }
.chat-body #ch-input-bar input::placeholder { color: #6d6f78; }
.chat-body #ch-attach-btn {
  position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  background: #b5bac1; color: #313338;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; line-height: 1;
  transition: background .15s;
}
.chat-body #ch-attach-btn:hover { background: #dbdee1; color: #313338; }
.chat-body #ch-emoji-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border: none; background: transparent;
  color: #b5bac1; cursor: pointer; font-size: 1.15rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  transition: color .15s;
}
.chat-body #ch-emoji-btn:hover { color: #dbdee1; }
.emoji-pop {
  position: absolute; right: 0; bottom: calc(100% + 8px);
  background: #2b2d31; border: 1px solid #1f2023; border-radius: 8px;
  padding: 6px; z-index: 300;
  display: flex; flex-wrap: wrap; gap: 4px; max-width: 232px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.24);
}
.emoji-pop .ep {
  width: 34px; height: 34px; border-radius: 4px; cursor: pointer;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.emoji-pop .ep:hover { background: #35373c; }
#dm-emoji-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border: none; background: transparent;
  color: #b5bac1; cursor: pointer; font-size: 1.15rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: color .15s;
}
#dm-emoji-btn:hover { color: #dbdee1; }
.chat-body .modal-content { background: #2b2d31; border: 1px solid #26272b; }
.chat-body .modal h3 { color: #5865f2; }
.chat-body .form-group label { color: #949ba4; }
.chat-body .form-group input { background: #383a40; border: 1px solid #26272b; color: #dbdee1; }
.chat-body .form-group input:focus { border-color: #5865f2; }
.chat-body .btn-primary { background: #5865f2; border-color: #5865f2; color: #fff; }
.chat-body .btn-primary:hover { background: #4752c4; border-color: #4752c4; color: #fff; }
.chat-body .msg-avatar-wrap { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.chat-body .msg-avatar-initial {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #5865f2; color: #fff;
  border-radius: 50%;
  font-size: 16px; font-weight: 700;
}
.chat-body .msg-avatar {
  position: relative; width: 40px; height: 40px;
  border-radius: 50%; object-fit: cover;
  background: transparent; z-index: 1;
}
.chat-body #ch-messages::-webkit-scrollbar { width: 8px; }
.chat-body #ch-messages::-webkit-scrollbar-thumb { background: #1e1f22; border-radius: 4px; }
.msg-del { color: #b5bac1; cursor: pointer; margin-left: 8px; opacity: 0; font-size: 0.75rem; }
.msg:hover .msg-del { opacity: 1; }
.msg-del:hover { color: #f23f43; }
.chat-body .chan-del { color: #f23f43; }

/* ===== Chat — layout Discord (serveurs / salons / membres) ===== */
#chat-app { height: calc(100vh - 60px); }
#dc-layout { display: flex; height: 100%; width: 100%; }

/* Panneau Messages privés */
#dc-dm-panel { display: flex; height: 100%; width: 100%; }
#dm-sidebar {
  width: 240px; flex-shrink: 0; background: #2b2d31;
  display: flex; flex-direction: column;
}
#dm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.3px;
  color: #dbdee1; border-bottom: 1px solid #1e1f22;
}
#dm-new-btn, #dmNewBtn {
  background: transparent; border: none; color: #b5bac1; cursor: pointer;
  font-size: 0.95rem; padding: 2px 6px; border-radius: 4px;
}
#dmNewBtn:hover { background: #35373c; color: #fff; }
#dm-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.dm-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  cursor: pointer; color: #b5bac1; transition: background .12s; position: relative;
}
.dm-item:hover { background: #35373c; }
.dm-item.active { background: #404249; color: #fff; }
.dm-item-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: #1e1f22; object-fit: cover;
}
.dm-item-body { flex: 1; min-width: 0; }
.dm-item-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dm-item-name { font-size: 0.85rem; font-weight: 600; color: #dbdee1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-item-time { font-size: 0.68rem; color: #80848e; flex-shrink: 0; }
.dm-item-preview { font-size: 0.75rem; color: #949ba4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-item .dm-you { color: #b5bac1; }
.dm-unread {
  background: #f23f43; color: #fff; border-radius: 10px; min-width: 18px; height: 18px;
  font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; flex-shrink: 0;
}
.dm-empty { color: #72767d; font-size: 0.82rem; padding: 20px 16px; text-align: center; line-height: 1.5; }
#dm-back {
  padding: 12px 14px; font-size: 0.8rem; color: #949ba4; cursor: pointer;
  border-top: 1px solid #1e1f22; flex-shrink: 0;
}
#dm-back:hover { color: #fff; background: #35373c; }
#dm-content { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
#dm-title {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  font-size: 0.85rem; font-weight: 700; color: #fff;
  border-bottom: 1px solid #1e1f22; background: #313338;
}
#dm-title-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
#dm-messages {
  flex: 1; overflow-y: auto; padding: 0 16px;
  display: flex; flex-direction: column;
}
#dm-input-bar { padding: 0 16px 24px; gap: 8px; border-top: none; background: transparent; }
#dm-input-wrap { position: relative; display: flex; width: 100%; }
#dm-input-bar input {
  width: 100%; padding: 22px 56px 22px 16px; border-radius: 8px; border: 1px solid transparent;
  background: #383a40; color: #dbdee1; font-size: 0.9375rem; outline: none;
  transition: border-color .15s;
}
#dm-input-bar input:hover { border-color: #1e1f22; }
#dm-input-bar input:focus { border-color: #000; }
#dm-input-bar input::placeholder { color: #6d6f78; }
.dm-user {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px;
  cursor: pointer; color: #dbdee1; font-size: 0.9rem;
}
.dm-user:hover { background: #35373c; }
.dm-existing { margin-left: auto; font-size: 0.72rem; color: #72767d; }
#dc-server-rail {
  width: 72px; flex-shrink: 0;
  background: #1e1f22;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 8px; overflow-y: auto;
}
.dc-server {
  width: 48px; height: 48px; border-radius: 50%;
  background: #313338; color: #dbdee1;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; cursor: pointer;
  transition: border-radius .15s, background .15s, color .15s;
  position: relative; flex-shrink: 0;
  overflow: hidden;
}
.dc-server img.dc-server-pp { width: 100%; height: 100%; object-fit: cover; }

/* Mascotte Cayla (Cayble) */
.cayla-mark { width: 100%; height: 100%; display: block; }
.cayla-login-mark {
  width: 88px; height: 88px;
  filter: drop-shadow(0 6px 18px rgba(0,212,170,0.35));
  margin-bottom: 6px;
}

/* Tooltips Discord (data-tip) */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: #111214; color: #dbdee1;
  padding: 8px 12px; border-radius: 4px;
  font-size: 0.75rem; font-weight: 500; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s .15s;
  box-shadow: 0 8px 16px rgba(0,0,0,0.24); z-index: 999;
}
#dc-server-rail [data-tip]::after { left: calc(100% + 12px); top: 50%; transform: translateY(-50%); }
[data-tip]::before {
  content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  border: 5px solid transparent; border-right-color: #111214;
  opacity: 0; pointer-events: none; transition: opacity .12s .15s; z-index: 999;
}
[data-tip]:hover::after, [data-tip]:hover::before { opacity: 1; }
.dc-server:hover { border-radius: 14px; background: #5865f2; color: #fff; }
.dc-server.active { border-radius: 14px; background: #5865f2; color: #fff; }
.dc-server.active::before {
  content: ''; position: absolute; left: -20px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 26px; background: #fff; border-radius: 3px;
}
.dc-server-main { background: #5865f2; color: #fff; }
.dc-server-add { background: transparent; border: 2px dashed #4e5058; color: #23a55a; font-size: 1.4rem; }
.dc-server-add:hover { border-color: #23a55a; background: #23a55a; color: #fff; }
.dc-server-home { font-size: 1.15rem; background: #313338; color: #dbdee1; margin-bottom: 2px; }
.dc-server-home.active { border-radius: 14px; background: #5865f2; color: #fff; }
.dc-server-home.active::before {
  content: ''; position: absolute; left: -20px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 26px; background: #fff; border-radius: 3px;
}
.dc-home-badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px;
  background: #f23f43; color: #fff; border-radius: 9px; border: 2px solid #1e1f22;
  font-size: 0.6rem; font-weight: 700; align-items: center; justify-content: center;
  padding: 0 3px;
}

#dc-sidebar {
  width: 240px; flex-shrink: 0;
  background: #2b2d31;
  display: flex; flex-direction: column;
  position: relative;
}
#dc-server-head {
  padding: 14px 16px; border-bottom: 1px solid #26272b;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; color: #f2f3f5; font-size: 1rem;
}
.dc-server-actions { display: flex; gap: 6px; }
.dc-server-actions button {
  background: none; border: 1px solid #3f4147; color: #b5bac1;
  border-radius: 6px; cursor: pointer; padding: 2px 7px; font-size: 13px;
}
.dc-server-actions button:hover { border-color: #5865f2; color: #5865f2; }
#dc-chan-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 8px 4px; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.02em; color: #949ba4;
}
#dc-chan-header button { background: none; border: none; color: #b5bac1; font-size: 1.1rem; cursor: pointer; }
#dc-chan-header button:hover { color: #fff; }
#dc-channel-list { flex: 1; overflow-y: auto; padding: 4px 8px; }
#dc-users-header { padding: 16px 8px 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: #949ba4; border-top: 1px solid #26272b; }
#dc-user-list { max-height: 160px; overflow-y: auto; padding: 2px 0 10px; }

#dc-content { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
#dc-chan-title {
  height: 48px; padding: 0 16px; border-bottom: 1px solid #26272b;
  color: #f2f3f5; font-weight: 700; font-size: 0.95rem;
  background: #313338;
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
#dc-chan-title .hash { color: #80848e; font-weight: 400; }
.dc-typing {
  display: none; margin-left: 4px;
  color: #dbdee1; font-weight: 400; font-size: 0.82rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dc-typing.active { display: inline; }
.dc-typing::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 5px;
  background:
    radial-gradient(circle at 25% 30%, #5865f2 22%, transparent 24%),
    radial-gradient(circle at 50% 70%, #5865f2 22%, transparent 24%),
    radial-gradient(circle at 75% 30%, #5865f2 22%, transparent 24%);
  background-size: 16px 16px; background-repeat: no-repeat;
  animation: typingBounce 1.2s infinite ease-in-out;
}
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-3px); }
}

#dc-members {
  width: 240px; flex-shrink: 0;
  background: #2b2d31; border-left: 1px solid #26272b;
  display: flex; flex-direction: column;
}
#dc-members-header { padding: 16px 8px 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: #949ba4; }
#dc-member-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.dc-member-section { padding: 12px 8px 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: #949ba4; text-transform: uppercase; }
.dc-member {
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 8px; border-radius: 4px; cursor: default;
  font-size: 0.9375rem; color: #dbdee1;
}
.dc-member:hover { background: #35373c; }
.dc-member-name { cursor: pointer; }
.dc-member-name:hover { color: #fff; }
.online-dot.off { background: #3f4147; }
.dc-badge { font-size: 0.75rem; }

.profile-view { display: flex; flex-direction: column; align-items: center; padding: 8px 0; }
.profile-view-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid #26272b; margin-bottom: 12px; }
.profile-view-name { font-weight: 700; font-size: 1.15rem; color: #f2f3f5; display: flex; align-items: center; gap: 8px; }
.profile-view-role { color: #ffd700; font-size: 0.85rem; margin-top: 4px; }
.profile-view-bio { color: #949ba4; font-size: 0.9rem; margin-top: 14px; text-align: center; line-height: 1.5; white-space: pre-wrap; max-width: 340px; }
.profile-view textarea {
  width: 100%; min-height: 80px;
  background: #1e1f22; border: 1px solid #26272b; border-radius: 8px;
  color: #dbdee1; padding: 10px 12px; font-family: inherit; font-size: 0.9rem; resize: vertical;
}
.profile-view textarea:focus { border-color: #5865f2; outline: none; }

@media (max-width: 768px) {
  #dc-members { display: none; }
  #dc-server-rail { width: 56px; }
  #dc-sidebar { width: 190px; }
  .dc-server { width: 40px; height: 40px; font-size: 0.95rem; }
}

/* ===== Chat — recherche, épinglés, modération, rôles ===== */
#dc-search-bar {
  background: #313338; border-bottom: 1px solid #26272b; padding: 8px 16px;
}
#searchInput {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  background: #1e1f22; border: 1px solid #26272b; color: #dbdee1;
  font-family: inherit; font-size: 0.85rem;
}
#searchInput:focus { border-color: #5865f2; outline: none; }
#dc-pins { margin-top: 8px; display: none; }
.pin {
  display: flex; align-items: center; gap: 8px;
  background: #2b2d31; border: 1px solid #26272b; border-left: 3px solid #f0b232;
  border-radius: 6px; padding: 6px 10px; margin-bottom: 4px; font-size: 0.8rem;
}
.pin-ico { color: #f0b232; }
.pin-user { color: #5865f2; font-weight: 600; flex-shrink: 0; }
.pin-text { color: #dbdee1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.pin-x { color: #b5bac1; cursor: pointer; }
.pin-x:hover { color: #f23f43; }
.pin-limit { color: #949ba4; font-size: 0.7rem; text-align: right; }

.msg-pin-badge { margin-left: 8px; }
.msg-pin:hover { color: #f5b942; }

.dc-badge-muted { color: #e0a64e; }

.m-acts { display: flex; gap: 6px; margin-left: auto; opacity: 0; }
.dc-member:hover .m-acts { opacity: 1; }
.m-act { cursor: pointer; font-size: 0.8rem; color: #949ba4; }
.m-act:hover { color: #f23f43; }

.role-row {
  background: #1e1f22; border: 1px solid #26272b; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 8px;
}
.role-head { display: flex; align-items: center; gap: 10px; }
.role-name { font-weight: 700; color: #f2f3f5; }
.role-level { color: #949ba4; font-size: 0.75rem; }
.role-scopes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.scope-chip {
  background: #2b2d31; border: 1px solid #26272b; color: #5865f2;
  border-radius: 10px; padding: 2px 8px; font-size: 0.7rem;
}
.scope-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.scope-check { display: flex; align-items: center; gap: 8px; color: #b5bac1; font-size: 0.82rem; cursor: pointer; }
.role-form-row { display: flex; gap: 8px; margin-bottom: 8px; }
.role-form-row input, .role-form-row select {
  background: #1e1f22; border: 1px solid #26272b; border-radius: 6px; color: #dbdee1; padding: 8px 10px; font-family: inherit; font-size: 0.85rem;
}
.role-form-row select { flex: 1; }

.modal-confirm { max-width: 380px; text-align: center; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* ===== Chat — thème accent + panneau utilisateur + Découvrir ===== */
.chat-body {
  --accent: #5865f2;
  --accent-soft: rgba(88,101,242,0.12);
  --accent-softer: rgba(88,101,242,0.06);
  --accent-border: rgba(88,101,242,0.4);
  --sidebar-tint: rgba(88,101,242,0.08);
}
.dc-server:hover { background: var(--accent); color: #fff; }
.dc-server.active { background: var(--accent); color: #fff; }
.dc-server.active::before { background: #fff; }
.dc-server-add:hover { border-color: var(--accent); color: var(--accent); }
.chan.active { background: #404249; color: #fff; }
.chan:hover { background: #35373c; }
#dc-chan-header button:hover { color: #fff; }
.dc-member-name:hover { color: #fff; }
.online-user.me { color: var(--accent); }
.scope-chip { color: var(--accent); }
.role-item.active { border-left-color: var(--accent); }

#dc-me-panel {
  margin-top: auto; padding: 8px;
  background: #232428; border-top: 1px solid #26272b;
  display: flex; align-items: center; gap: 8px;
}
.dc-me-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #5865f2; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
  overflow: hidden; position: relative; cursor: pointer;
}
.dc-me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dc-me-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 3px solid #232428; background: #23a559;
  display: block !important; box-sizing: border-box;
}
#statusMenu {
  position: absolute; left: 8px; bottom: 56px; z-index: 300;
  background: #1e1f22; border: 1px solid #26272b; border-radius: 8px;
  padding: 6px; width: 190px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.status-menu-title { padding: 6px 10px 8px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #949ba4; border-bottom: 1px solid #26272b; margin-bottom: 4px; }
.status-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 4px;
  color: #dbdee1; font-size: 0.85rem; cursor: pointer;
}
.status-opt:hover { background: #35373c; color: #fff; }
.status-opt.active { background: rgba(88,101,242,0.3); color: #fff; }
.st-online { background: #23a559 !important; }
.st-idle { background: #f0b232 !important; }
.st-dnd { background: #f23f43 !important; }
.st-invisible { background: #80848e !important; }
.dc-me-name { flex: 1; font-size: 0.8rem; font-weight: 600; color: #f2f3f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-me-actions { display: flex; gap: 2px; }
.dc-me-btn {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #b5bac1; cursor: pointer; font-size: 0.85rem;
}
.dc-me-btn:hover { background: #35373c; color: #f2f3f5; }
.dc-me-btn.off { color: #f23f43; background: rgba(242,63,67,0.12); }
.dc-member-role { font-size: 0.75rem; }
.msg-ping-badge {
  margin-left: 6px; font-size: 0.7rem; font-weight: 700;
  color: #111214; background: #f0b232; border-radius: 6px; padding: 0 5px;
}
.msg.pinged { background: rgba(240,178,50,0.08); border-left: 2px solid #f0b232; }
.msg-edited { color: #80848e; font-size: 0.68rem; font-style: italic; }
.msg-act { font-size: 0.85rem; }
.msg-reply {
  display: flex; align-items: baseline; gap: 6px;
  padding: 3px 8px; margin: 2px 0 4px; border-radius: 6px;
  background: #2b2d31; border-left: 2px solid #5865f2; max-width: 480px;
  font-size: 0.75rem; cursor: pointer;
}
.msg-reply-arrow { color: #80848e; }
.msg-reply-name { color: #949ba4; font-weight: 600; flex-shrink: 0; }
.msg-reply-preview { color: #b5bac1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-textarea {
  width: 100%; background: #1e1f22; border: 1px solid #5865f2; border-radius: 6px;
  color: #dbdee1; padding: 8px 10px; font-family: inherit; font-size: 0.9rem; resize: vertical;
}
.edit-actions { display: flex; gap: 8px; margin-top: 6px; }
.ch-reply-preview {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px;
  font-size: 0.8rem; color: #b5bac1; background: #2b2d31;
  border-top: 1px solid #26272b;
}
.ch-reply-preview b { color: #5865f2; }

/* Réactions emoji */
.msg-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.react {
  display: inline-flex; align-items: center; gap: 4px;
  background: #2b2d31; border: 1px solid #26272b; border-radius: 10px;
  padding: 2px 8px; font-size: 0.9rem; cursor: pointer; user-select: none;
  transition: border-color .12s, background .12s;
}
.react:hover { border-color: #5865f2; }
.react.mine { background: rgba(88,101,242,0.18); border-color: #5865f2; }
.react-count { font-size: 0.75rem; color: #dbdee1; font-weight: 600; }
.msg-quick-reacts {
  display: none; position: absolute; bottom: 100%; right: 12px;
  background: #111214; border: 1px solid #26272b; border-radius: 8px;
  padding: 6px 8px; gap: 2px; flex-wrap: wrap; max-width: 260px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5); z-index: 50;
}
.msg:hover .msg-quick-reacts { display: flex; }
.qr { font-size: 1.15rem; padding: 2px 4px; border-radius: 6px; cursor: pointer; line-height: 1; }
.qr:hover { background: #35373c; }

/* Découvrir */
.modal-wide { max-width: 640px; max-height: 80vh; overflow-y: auto; }
.discover-card {
  display: flex; align-items: center; gap: 14px;
  background: #2b2d31; border: 1px solid #26272b; border-radius: 10px;
  padding: 14px 16px; transition: border-color .15s;
}
.discover-card:hover { border-color: var(--accent); }
.discover-pp {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: #404249; color: #dbdee1;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; cursor: pointer;
}
.discover-info { flex: 1; min-width: 0; cursor: pointer; }
.discover-info h4 { color: #f2f3f5; font-size: 0.95rem; margin-bottom: 2px; }
.discover-info p { color: #949ba4; font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discover-meta { display: flex; gap: 12px; margin-top: 4px; font-size: 0.72rem; color: #80848e; }

/* ===== Paramètres du serveur (style Discord) ===== */
.settings-window {
  width: 820px; max-width: 96vw; height: 72vh; max-height: 700px;
  background: #36393f; border-radius: 8px; overflow: hidden;
  display: flex; box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  position: relative;
}
.settings-sidebar {
  width: 230px; flex-shrink: 0;
  background: #2f3136;
  display: flex; flex-direction: column;
}
.settings-sb-head { padding: 20px 16px 8px; border-bottom: 1px solid #202225; }
.settings-sb-title { color: #fff; font-weight: 700; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-sb-sub { color: #b9bbbe; font-size: 0.75rem; margin-top: 2px; }
.settings-sb-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.set-nav {
  margin: 0 8px 2px; padding: 8px 12px; border-radius: 4px;
  color: #b9bbbe; font-size: 0.95rem; cursor: pointer;
  border-left: 2px solid transparent;
}
.set-nav:hover { background: #36393f; color: #dcddde; }
.set-nav.active { background: #393c41; color: #fff; border-left-color: var(--accent); }
.settings-sb-foot { padding: 8px; border-top: 1px solid #202225; }
.settings-sb-user {
  display: flex; align-items: center; gap: 8px;
  background: #292b2f; border-radius: 4px; padding: 6px 8px;
}
.settings-sb-uname { flex: 1; font-size: 0.85rem; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-sb-logout {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #b9bbbe; cursor: pointer;
}
.settings-sb-logout:hover { background: #f04747; color: #fff; }

.settings-main { flex: 1; position: relative; overflow-y: auto; padding: 40px 36px 28px; }
.settings-close {
  position: absolute; top: 12px; right: 16px;
  color: #b9bbbe; cursor: pointer; font-size: 1.2rem;
  z-index: 5;
}
.settings-close:hover { color: #fff; }
.settings-panel-title { color: #fff; font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.settings-desc { color: #b9bbbe; font-size: 0.82rem; margin-bottom: 20px; }
.settings-section { max-width: 560px; }
.set-field { margin-bottom: 16px; }
.set-field > label { display: block; color: #b9bbbe; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.settings-main input[type="text"], .settings-main input:not([type]), .settings-main input[type="number"], .settings-main textarea, .settings-main select {
  width: 100%; padding: 9px 12px;
  background: #202225; border: 1px solid #2f3136; border-radius: 4px;
  color: #dcddde; font-family: inherit; font-size: 0.9rem; outline: none;
}
.settings-main input:focus, .settings-main textarea:focus, .settings-main select:focus { border-color: var(--accent); }
.settings-main input:disabled, .settings-main textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.settings-main textarea { resize: vertical; min-height: 70px; }
.set-color-row { display: flex; align-items: center; gap: 12px; }
.set-color-row input[type="color"] { width: 44px; height: 30px; padding: 0; border: 1px solid #2f3136; border-radius: 4px; background: #202225; }
.set-pp-row { display: flex; align-items: center; gap: 12px; }
.set-pp { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #202225; border: 1px solid #2f3136; }
.set-pp-row input[type="file"] { color: #b9bbbe; font-size: 0.8rem; }
.set-toggle {
  display: flex; align-items: center; gap: 10px;
  color: #dcddde; font-size: 0.9rem; cursor: pointer;
}
.set-toggle input { display: none; }
.set-toggle-track {
  width: 36px; height: 20px; border-radius: 10px;
  background: #4f545c; position: relative; flex-shrink: 0; transition: background .15s;
}
.set-toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s;
}
.set-toggle input:checked + .set-toggle-track { background: var(--accent); }
.set-toggle input:checked + .set-toggle-track::after { transform: translateX(16px); }
.set-add-row { display: flex; gap: 8px; align-items: center; }
.set-add-row input, .set-add-row select { flex: 1; }
.settings-note {
  background: #202225; border: 1px solid #2f3136; border-radius: 4px;
  color: #b9bbbe; font-size: 0.8rem; padding: 10px 12px; margin-top: 12px;
}
.set-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-width: 560px; }
.set-item {
  display: flex; align-items: center; gap: 10px;
  background: #2f3136; border: 1px solid #26272b; border-radius: 6px;
  padding: 9px 12px; color: #dcddde; font-size: 0.9rem;
}
.set-item-ico { color: #b9bbbe; font-weight: 700; }
.set-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-item-sub { color: #72767d; font-size: 0.75rem; }
.set-item .cat-input {
  width: 150px; padding: 5px 8px; font-size: 0.8rem;
  background: #202225; border: 1px solid #2f3136; border-radius: 5px; color: #dcddde; outline: none;
}
.set-item .cat-input:focus { border-color: #5865f2; }

/* Gestion des membres (style Discord) */
.mem-search {
  width: 100%; padding: 9px 12px; margin-bottom: 14px;
  background: #202225; border: 1px solid #2f3136; border-radius: 6px;
  color: #dcddde; font-size: 0.9rem; outline: none; max-width: 560px;
}
.mem-search:focus { border-color: var(--accent); }
.mem-list { display: flex; flex-direction: column; gap: 4px; max-width: 720px; }
.mem-row {
  display: flex; align-items: center; gap: 12px;
  background: #2f3136; border-radius: 6px; padding: 8px 12px;
  border: 1px solid transparent; transition: border-color .12s;
}
.mem-row:hover { border-color: #3f4248; }
.mem-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.9rem;
}
.mem-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mem-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mem-chip {
  font-size: 0.68rem; font-weight: 600; padding: 1px 6px;
  border: 1px solid; border-radius: 8px; white-space: nowrap;
}
.mem-chip.gold { color: #f0b232; border-color: #f0b232; }
.mem-chip.green { color: #23a559; border-color: #23a559; }
.mem-chip.pink { color: #f47fff; border-color: #f47fff; }
.mem-chip.muted { color: #99aab5; border-color: #99aab5; }
.mem-role-select {
  background: #202225; border: 1px solid #2f3136; border-radius: 4px;
  color: #dcddde; font-size: 0.8rem; padding: 5px 8px; outline: none;
}
.mem-acts { display: flex; gap: 4px; }
.mem-act {
  width: 30px; height: 30px; border-radius: 6px; border: none;
  background: #3b3e44; color: #b9bbbe; cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.mem-act:hover { background: #4f545c; color: #fff; }
.mem-act.danger:hover { background: #f04747; }

/* Éditeur de rôles */
.roles-editor { display: flex; gap: 0; border: 1px solid #2f3136; border-radius: 6px; overflow: hidden; }
.roles-col { flex: 1; }
.roles-col-list {
  flex: 0 0 240px; background: #2f3136;
  display: flex; flex-direction: column; border-right: 1px solid #202225;
}
.roles-col-head { padding: 12px 14px; color: #b9bbbe; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; }
.roles-list { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.role-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 4px; cursor: pointer;
  color: #dcddde; font-size: 0.85rem;
  border-left: 2px solid transparent;
}
.role-item:hover { background: #36393f; }
.role-item.active { background: #393c41; border-left-color: var(--accent); }
.role-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.role-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-item-level { color: #72767d; font-size: 0.75rem; }
.role-item .chan-del { opacity: 0; }
.role-item:hover .chan-del { opacity: 0.6; }
.roles-add {
  margin: 6px 8px 10px; padding: 7px 10px; border-radius: 4px;
  background: transparent; border: 1px dashed #4f545c; color: #b9bbbe;
  cursor: pointer; font-size: 0.85rem;
}
.roles-add:hover { border-color: var(--accent); color: var(--accent); }
.roles-col-detail { background: #36393f; padding: 16px 18px; max-width: 520px; }
.roles-placeholder {
  color: #72767d; font-size: 0.85rem; text-align: center; padding: 40px 12px;
}
.perm-grid { display: flex; flex-direction: column; gap: 4px; }
.perm {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 4px; cursor: pointer;
  color: #dcddde; font-size: 0.85rem;
}
.perm:hover { background: #2f3136; }
.perm input { width: 16px; height: 16px; accent-color: var(--accent); }
.role-editor-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.role-editor-actions .btn-danger { margin-right: auto; }
.role-members { display: flex; flex-wrap: wrap; gap: 6px; }
.member-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #2f3136; border: 1px solid #26272b; border-radius: 10px;
  padding: 3px 10px; font-size: 0.8rem; color: #dcddde;
}
.member-chip-x { color: #949ba4; cursor: pointer; }
.member-chip-x:hover { color: #f23f43; }

/* Permissions de salon */
.chan-perms-head { color: #f2f3f5; font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.perm-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 16px; }
.perm-row {
  display: flex; align-items: center; gap: 16px;
  background: #1e1f22; border: 1px solid #26272b; border-radius: 6px;
  padding: 9px 12px;
}
.perm-role { flex: 1; color: #dbdee1; font-size: 0.9rem; font-weight: 600; }
.perm-toggle { display: inline-flex; align-items: center; gap: 6px; color: #949ba4; font-size: 0.8rem; cursor: pointer; }
.perm-toggle input { width: 16px; height: 16px; accent-color: #5865f2; }

/* Toasts */
#toasts {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 500;
  align-items: center; pointer-events: none;
}
.toast {
  background: #2f3136; border: 1px solid #202225; border-left: 4px solid #4f545c;
  color: #dcddde; border-radius: 6px; padding: 10px 18px;
  font-size: 0.88rem; box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok { border-left-color: #3ba55d; }
.toast-err { border-left-color: #f04747; }
.toast-warn { border-left-color: #f5b942; }

@media (max-width: 768px) {
  .settings-window { flex-direction: column; height: 88vh; }
  .settings-sidebar { width: 100%; flex-direction: row; align-items: center; }
  .settings-sb-head { display: none; }
  .settings-sb-nav { display: flex; flex: 1; padding: 6px; overflow-x: auto; }
  .set-nav { white-space: nowrap; margin: 0 2px; }
  .settings-sb-foot { padding: 6px; }
  .settings-main { padding: 28px 18px; }
  .roles-editor { flex-direction: column; }
  .roles-col-list { flex: none; max-height: 200px; border-right: none; border-bottom: 1px solid #202225; }
}

/* ---- admin panel ---- */

.admin-toolbar { display: flex; gap: 8px; }
.form-input, .sql-textarea, select.form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  background: var(--bg-card, #fff);
  color: var(--text, #222);
  font: inherit;
}
.sql-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 140px;
  margin: 8px 0;
  resize: vertical;
}
.db-cell {
  width: 100%;
  min-width: 90px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
}
.db-cell:hover { border-color: var(--border, #ddd); }
.db-cell:focus { border-color: var(--accent, #5865f2); background: var(--bg-card, #fff); outline: none; }

