/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 0 40px;
  width: 100%;
}

.admin-card-full {
  grid-column: 1 / -1;
}

.admin-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  align-items: start;
}

.admin-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.admin-card-head {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(139, 92, 246, 0.08);
}

.admin-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.admin-warn {
  font-size: 0.8rem;
  color: var(--expert);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
}

.admin-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-input {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-white);
  padding: 9px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.admin-input:focus {
  border-color: var(--primary);
}

.admin-input option {
  background: #1a1b2e;
}

.admin-textarea {
  resize: vertical;
  min-height: 160px;
  font-family: monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre;
}

/* ── Messages Discord ──────────────────────────────────────── */
.msg-placeholders-block {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 14px;
  padding: 14px 18px;
}

.msg-placeholders-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-alt);
  margin-bottom: 10px;
}

.msg-placeholders-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.msg-ph-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 5px 10px;
}

.msg-ph-code {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
}

.msg-ph-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Onglets messages */
.msg-tabs-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
}
.msg-tab-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 7px 18px;
  font-size: 0.83rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.msg-tab-btn:hover { background: rgba(99,102,241,0.07); color: var(--text-white); }
.msg-tab-btn.active {
  background: rgba(99,102,241,0.15);
  border-color: var(--primary);
  color: var(--primary-alt);
}

.msg-tab-pane { /* visible by default unless .hidden */ }

.msg-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.msg-editor-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.msg-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

/* ── Rôles & Permissions ───────────────────────────────────── */
.admin-role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: default;
  padding: 14px 18px;
}

.admin-role-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.admin-role-arrow {
  font-size: 11px;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
  transition: color var(--dur-1) var(--ease);
}

.admin-role-head-left:hover .admin-role-arrow {
  color: var(--primary-alt);
}

.admin-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-alt);
  border: 1px solid rgba(99, 102, 241, 0.25);
  flex-shrink: 0;
}

.admin-role-badge-custom {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.25);
}

.admin-role-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-xs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text-white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

.btn-xs:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
}

.btn-xs:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-xs-danger:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--danger);
}

/* Permission sections */
.admin-perm-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-perm-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.admin-perm-section-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-alt);
  display: flex;
  align-items: center;
}

.admin-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 12px;
}

.admin-perm-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-white);
  transition: background var(--dur-1) var(--ease);
  user-select: none;
}

.admin-perm-line:hover {
  background: rgba(255, 255, 255, 0.05);
}

.admin-perm-line input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.admin-perm-implicit {
  opacity: 0.55;
}

.admin-perm-implicit input[type="checkbox"] {
  cursor: not-allowed;
}

/* Hierarchy */
.admin-hierarchy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  transition: background var(--dur-1) var(--ease);
}

.admin-hierarchy-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.admin-hierarchy-rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  width: 28px;
  flex-shrink: 0;
  text-align: center;
}

.admin-hierarchy-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-hierarchy-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Create role row */
.admin-role-create-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-role-create-row .admin-input {
  flex: 1;
}

.admin-role-create-row .btn-primary-glow {
  width: auto;
  padding: 9px 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Empty state */
.admin-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 24px;
  font-style: italic;
}

/* Expand/collapse toolbar */
.admin-roles-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-perm-count {
  opacity: 0.6;
  font-weight: 600;
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.admin-role-perm-count {
  opacity: 0.55;
  font-size: 12px;
  font-weight: 500;
}

.admin-radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
}

.admin-radio input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── Logs ──────────────────────────────────────────────────── */
.admin-logs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-logs-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-logs-select       { width: 180px; }
.admin-logs-search-input { width: 200px; }

/* Logs — full-height layout */
.admin-section[data-section="logs"] .admin-card-full {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 280px);
}

.admin-section[data-section="logs"] .admin-log-list {
  flex: 1;
}

.admin-log-list {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-log-row {
  display: grid;
  grid-template-columns: 18px 160px 120px 160px 1fr;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  font-size: 0.8rem;
  align-items: center;
}

.admin-log-row-expandable {
  cursor: pointer;
}
.admin-log-row-expandable:hover {
  background: rgba(0,0,0,0.35);
}

.admin-log-arrow {
  color: var(--text-muted);
  font-size: 0.65rem;
  user-select: none;
  width: 18px;
  text-align: center;
}

.admin-log-meta-panel {
  background: rgba(0,0,0,0.25);
  border-left: 2px solid var(--primary);
  border-radius: 0 6px 6px 0;
  margin: -2px 0 4px 30px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-log-meta-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  font-size: 0.78rem;
  align-items: start;
}

.admin-log-meta-key {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.admin-log-meta-val {
  color: var(--text-white);
  word-break: break-all;
}

.admin-log-meta-sub {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.76rem;
  padding: 2px 0;
}

.admin-log-meta-subkey {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 60px;
  flex-shrink: 0;
}

.admin-log-date  { color: var(--text-muted); }
.admin-log-who   { color: var(--primary); font-weight: 600; }
.admin-log-action{ color: var(--text-white); font-weight: 500; }
.admin-log-detail{ color: var(--text-muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-log-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-log-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

@media (max-width: 820px) {
  .admin-log-row { grid-template-columns: 18px 130px 1fr; }
  .admin-log-who  { font-size: 0.78rem; }
}
@media (max-width: 768px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-log-row { grid-template-columns: 18px 1fr 1fr; }
  .admin-log-detail { display: none; }
}
@media (max-width: 540px) {
  .my-activity-modal { padding: 12px; align-items: flex-end; }
  .my-activity-inner { max-height: 88vh; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .my-activity-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .my-activity-date { margin-left: 0; }
}


/* ============================================================
   NOTE INTERNE HELPEUR
   ============================================================ */
.helper-note-textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color var(--dur-1) var(--ease);
}
.helper-note-textarea::placeholder { color: var(--text-muted); }
.helper-note-textarea:focus { border-color: rgba(99,102,241,0.5); }

.btn-save-note {
  margin-top: 10px;
  padding: 8px 18px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: var(--radius-xs);
  color: var(--primary-alt);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}
.btn-save-note:hover { background: rgba(99,102,241,0.28); }


/* ============================================================
   TOGGLE VUE ABSENCES
   ============================================================ */
.abs-view-toggle {
  display: flex;
  gap: 6px;
}
.abs-view-btn {
  padding: 7px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}
.abs-view-btn.active,
.abs-view-btn:hover {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.4);
  color: var(--text-white);
}


/* ============================================================
   CALENDRIER ABSENCES
   ============================================================ */
.abs-calendar {
  padding: 4px 0 24px;
}
.abs-cal-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.abs-cal-month-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--text-white);
  min-width: 160px;
  text-align: center;
}
.abs-cal-nav-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text-white);
  font-size: 1.2rem;
  width: 34px;
  height: 34px;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.abs-cal-nav-btn:hover { background: rgba(255,255,255,0.12); }

.abs-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.abs-cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.abs-cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.abs-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.abs-cal-header-cell {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.abs-cal-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  min-height: 72px;
  padding: 6px 6px 4px;
  transition: background var(--dur-1) var(--ease);
}
.abs-cal-cell:hover { background: rgba(255,255,255,0.055); }
.abs-cal-empty {
  background: transparent;
  border-color: transparent;
}
.abs-cal-today {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.07);
}
.abs-cal-day-num {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.abs-cal-today .abs-cal-day-num { color: var(--primary-alt); }
.abs-cal-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.abs-cal-bar {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  cursor: default;
}

@media (max-width: 768px) {
  .abs-cal-cell { min-height: 50px; padding: 4px 3px; }
  .abs-cal-bar { display: none; }
  .abs-cal-has-event::after {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
    margin: 2px auto 0;
  }
}

/* ============================================================
   STATS — Top listes & tableau référents
   ============================================================ */
.stats-ref-header {
  display: grid;
  grid-template-columns: 1fr repeat(3, 90px);
  gap: 6px;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 4px;
}
.stats-ref-col-lbl {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
}
.stats-ref-row {
  display: grid;
  grid-template-columns: 1fr repeat(3, 90px);
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.84rem;
  transition: background 0.14s;
}
.stats-ref-row:hover { background: rgba(255,255,255,0.03); }
.stats-ref-pseudo {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-ref-chip {
  font-size: 0.77rem;
  font-weight: 700;
  text-align: center;
  padding: 3px 6px;
  border-radius: 6px;
}
.stats-chip-itv   { background: rgba(99,102,241,0.12);  color: var(--primary-alt); }
.stats-chip-add   { background: rgba(52,211,153,0.10);  color: var(--success); }
.stats-chip-up    { background: rgba(251,191,36,0.10);  color: var(--expert); }
.stats-chip-sanct { background: rgba(244,63,94,0.10);   color: var(--danger); }
.stats-chip-abs   { background: rgba(251,146,60,0.10);  color: #fb923c; }

@media (max-width: 820px) {
  .stats-ref-header { grid-template-columns: 1fr repeat(3, 72px); }
  .stats-ref-row    { grid-template-columns: 1fr repeat(3, 72px); }
}
@media (max-width: 540px) {
  .stats-ref-header { grid-template-columns: 1fr repeat(2, 64px); }
  .stats-ref-row    { grid-template-columns: 1fr repeat(2, 64px); }
  .stats-ref-col-lbl:nth-child(4),
  .stats-ref-chip:nth-child(4) { display: none; }
}

/* ============================================================
   PROFIL — Historique helpeur (dépliable)
   ============================================================ */
.profile-history-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-white);
  user-select: none;
  transition: background 0.15s;
}
.profile-history-toggle:hover { background: rgba(255,255,255,0.055); }
.profile-history-toggle-arrow { font-size: 0.7rem; color: var(--text-muted); }
.profile-history-toggle-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(99,102,241,0.15);
  color: var(--primary-alt);
  border-radius: 999px;
  padding: 2px 8px;
}
.profile-history-body {
  margin-top: 8px;
  padding: 10px 4px 4px;
}
.profile-history-loading {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 8px 10px;
}
.profile-history-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary-alt);
  margin-bottom: 6px;
}
.profile-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 0.83rem;
}
.profile-history-date  { color: var(--text-muted); white-space: nowrap; font-size: 0.78rem; min-width: 80px; }
.profile-history-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.profile-history-detail { flex: 1; color: var(--text-white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-history-empty  { color: var(--text-muted); font-size: 0.83rem; padding: 4px 0 8px; }

/* ============================================================
   MON ACTIVITÉ — Panneau latéral
   ============================================================ */
.activity-list { display: flex; flex-direction: column; gap: 6px; }
.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  font-size: 0.82rem;
  flex-wrap: wrap;
}
.activity-date   { color: var(--text-muted); white-space: nowrap; font-size: 0.75rem; min-width: 110px; }
.activity-detail { flex: 1; min-width: 0; color: var(--text-white); word-break: break-word; }

/* ============================================================
   MON ACTIVITÉ — Modal centré
   ============================================================ */
.my-activity-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.my-activity-modal.visible { opacity: 1; }

.my-activity-inner {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)), rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(99,102,241,0.1);
  width: 100%;
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.my-activity-modal.visible .my-activity-inner { transform: translateY(0); }

.my-activity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.my-activity-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
  background: linear-gradient(135deg, #f8fafc 30%, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.my-activity-sub { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.my-activity-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  width: 32px; height: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.my-activity-close:hover { background: rgba(244,63,94,0.15); color: var(--danger); }

.my-activity-body {
  overflow-y: auto;
  padding: 16px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.my-activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  font-size: 0.83rem;
  flex-wrap: wrap;
  transition: background 0.15s;
}
.my-activity-row:hover { background: rgba(255,255,255,0.05); }
.my-activity-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.my-activity-detail { flex: 1; min-width: 0; color: var(--text-white); word-break: break-word; }
.my-activity-date { color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; margin-left: auto; flex-shrink: 0; }
.my-activity-loading { color: var(--text-muted); text-align: center; padding: 32px; font-size: 0.85rem; }
.my-activity-empty { color: var(--text-muted); text-align: center; padding: 40px; font-size: 0.9rem; }

/* "Mon activité" sidebar button */
.sidebar-activity-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.sidebar-activity-btn:hover {
  background: rgba(99,102,241,0.1);
  color: var(--primary-alt);
}

/* ============================================================
   MESSAGES DISCORD — aperçu Markdown
   ============================================================ */
.msg-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 860px) { .msg-split { grid-template-columns: 1fr; } }

.msg-preview {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-white);
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  word-break: break-word;
}
.dcmd-h1  { font-size: 1.2rem; font-weight: 800; margin: 6px 0 2px; }
.dcmd-h2  { font-size: 1rem;   font-weight: 700; margin: 4px 0 2px; }
.dcmd-quote {
  border-left: 3px solid var(--glass-border);
  padding-left: 10px;
  color: var(--text-muted);
  margin: 4px 0;
}
.dcmd-code {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 0 5px;
  font-family: monospace;
  font-size: 0.85em;
}
.dcmd-placeholder {
  background: rgba(99,102,241,0.15);
  color: var(--primary-alt);
  border-radius: 4px;
  padding: 0 4px;
  font-family: monospace;
  font-size: 0.85em;
}
.dcmd-mention {
  background: rgba(88,101,242,0.2);
  color: #8fa5f8;
  border-radius: 4px;
  padding: 0 4px;
}

