﻿/* =========================================================================
   NÉBULA — thème Panda Galaxy (Build 31)
   Inspiration : panda noir aux cornes de bambou vert jade, ailes crème/vert,
   yeux or+citron — ciel nocturne d'une forêt de bambous sous les étoiles.
   Layout strict Discord : panneaux flush, sans gaps flottants.
   ========================================================================= */

:root {
  /* ── FONDS — dark premium ── */
  --void:    #090a0a;
  --abyss:   #0e0e0f;
  --cosmos:  #161618;

  /* ── ACCENTS — jade (touche) + or ── */
  --violet:  #3d8f68;
  --magenta: #245c42;
  --cyan:    #4db87c;
  --gold:    #c49a24;
  --lime:    #7aaa38;

  /* ── TEXTE — neutre froid ── */
  --starlight: #e2e4e3;
  --stardust:  #555a58;
  --faint:     #2e3130;

  /* ── LIGNES — blancs neutres ── */
  --line:    rgba(255, 255, 255, 0.07);
  --glass:   rgba(9, 10, 10, 0.96);
  --glass-2: rgba(255, 255, 255, 0.03);

  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 20px 60px rgba(0, 0, 0, 0.9);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
}

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

/* L'attribut HTML `hidden` doit TOUJOURS l'emporter, même sur un `display:`
   défini plus bas (sinon .app, .modal, etc. resteraient affichés à tort). */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--starlight);
  color-scheme: dark;
  background: var(--void);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Décor : étoiles + nébuleuses ---------- */
#starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.nebula {
  position: fixed;
  z-index: 0;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  pointer-events: none;
  will-change: transform;
}
.nebula--violet {
  background: radial-gradient(circle, #1e1e22, transparent 65%);
  top: -18vmax; left: -12vmax;
  animation: drift1 34s ease-in-out infinite alternate;
}
.nebula--magenta {
  background: radial-gradient(circle, #141415, transparent 65%);
  bottom: -22vmax; right: -16vmax;
  animation: drift2 42s ease-in-out infinite alternate;
}
@keyframes drift1 {
  to { transform: translate(14vmax, 10vmax) scale(1.15); }
}
@keyframes drift2 {
  to { transform: translate(-12vmax, -8vmax) scale(1.2); }
}

/* ---------- Verre dépoli (panneaux flottants) ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
}

/* =========================================================================
   ÉCRAN DE CONNEXION
   ========================================================================= */
.auth {
  position: relative; z-index: 2;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth__card {
  width: 100%;
  max-width: 400px;
  padding: 40px 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  font-size: 26px;
  color: var(--violet);
  text-shadow: 0 0 18px rgba(61,143,104,0.75);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(0.92); }
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, var(--starlight), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth__tagline { color: var(--stardust); margin: 14px 0 26px; font-size: 14px; }

.tabs { display: flex; gap: 4px; background: rgba(0,0,0,0.25);
  padding: 4px; border-radius: var(--radius-sm); margin-bottom: 22px; }
.tabs--sm { margin-bottom: 16px; }
.tab {
  flex: 1; padding: 9px; border: 0; cursor: pointer;
  background: transparent; color: var(--stardust);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  border-radius: 7px; transition: all 0.2s ease;
}
.tab:hover { color: var(--starlight); }
.tab--active {
  background: linear-gradient(120deg, var(--violet), var(--lime));
  color: #090a0a; font-weight: 700; box-shadow: 0 4px 16px rgba(61,143,104,0.38);
}

.auth__form { display: flex; flex-direction: column; gap: 16px; }

/* Bannière 2FA dans le formulaire de connexion */
.totp-banner {
  background: rgba(61,143,104,0.08);
  border: 1px solid rgba(61,143,104,0.3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
  animation: rise 0.3s cubic-bezier(0.16,1,0.3,1);
}
.totp-banner__head { display: flex; align-items: flex-start; gap: 12px; }
.totp-banner__icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.totp-banner__title { font-size: 13.5px; font-weight: 700; color: var(--starlight); }
.totp-banner__sub { font-size: 12px; color: var(--stardust); margin-top: 3px; line-height: 1.4; }
.totp-input {
  width: 100%; padding: 14px 16px;
  background: rgba(0,0,0,0.3); border: 1.5px solid var(--violet);
  border-radius: var(--radius-sm); color: var(--starlight);
  font-size: 26px; font-weight: 700; letter-spacing: 0.3em;
  text-align: center; font-family: var(--font-display); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.totp-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(77,184,124,0.15); }
.totp-input::placeholder { font-size: 18px; letter-spacing: 0.2em; color: var(--faint); font-weight: 400; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-size: 12.5px; color: var(--stardust); font-weight: 500; }
.field em { color: var(--faint); font-style: normal; }
.field input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--starlight);
  font-family: var(--font-body); font-size: 14.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: var(--faint); }
.field input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.07);
}
.field textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--starlight);
  font-family: var(--font-body); font-size: 14.5px;
  resize: vertical; min-height: 64px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea::placeholder { color: var(--faint); }
.field textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.07);
}

.error {
  color: #fda4af; font-size: 13px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 9px 12px; border-radius: var(--radius-sm);
}

/* ---------- Boutons ---------- */
.btn {
  border: 0; cursor: pointer; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 12px 18px; color: white; transition: transform 0.12s, box-shadow 0.2s, opacity 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(120deg, var(--violet), var(--lime));
  color: #090a0a;
  box-shadow: 0 6px 22px rgba(78, 158, 116, 0.35);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 8px 30px rgba(61,143,104,0.45); }
.btn--ghost {
  background: var(--glass-2); color: var(--starlight);
  border: 1px solid var(--line);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--round {
  width: 44px; height: 44px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; font-size: 17px; flex: none;
}

/* =========================================================================
   APPLICATION — layout Discord strict (panneaux flush, sans gaps)
   ========================================================================= */
.app {
  position: relative; z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

/* ---------- Barre des serveurs (orbes) ---------- */
.rail {
  flex: none; width: 72px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 0 12px; overflow-y: auto; overflow-x: hidden;
  background: #090a0a;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.rail::-webkit-scrollbar { width: 0; }
.rail__logo {
  font-size: 22px; color: var(--violet);
  text-shadow: 0 0 16px var(--violet);
  cursor: pointer; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  transition: background 0.15s, transform 0.1s, border-radius 0.2s;
}
.rail__logo:hover { background: var(--glass-2); border-radius: 18px; }
.rail__logo--active { background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 2px var(--violet) inset; border-radius: 18px; }
.rail__divider { width: 32px; height: 1px; background: rgba(255,255,255,0.08); margin: 2px 0; }
.rail__servers { display: flex; flex-direction: column; gap: 6px; width: 100%;
  align-items: center; }

.orb {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  color: white; position: relative; overflow: hidden;
  border: 2px solid transparent;
  transition: transform 0.18s cubic-bezier(0.16,1,0.3,1), box-shadow 0.2s, border-radius 0.2s;
}
.orb__img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; }
.orb::after {  /* petit reflet planétaire */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.35), transparent 55%);
}
.orb:hover { transform: scale(1.08); box-shadow: 0 0 0 3px rgba(255,255,255,0.08); }
.orb--active {
  border-radius: 16px;
  border-color: rgba(255,255,255,0.85);
  box-shadow: 0 0 22px -2px currentColor;
}
.rail__add, .rail__me {
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px dashed var(--line); background: var(--glass);
  color: var(--violet); font-size: 24px; cursor: pointer;
  transition: all 0.18s; flex: none;
}
.rail__add:hover { border-style: solid; background: var(--glass-2);
  transform: scale(1.06); }
.rail__spacer { flex: 1; }
.rail__me {
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  color: white; border-style: solid; border-color: transparent;
}

/* ---------- Colonne salons ---------- */
.channels { flex: none; width: 240px; border-radius: 0; display: flex; flex-direction: column;
  overflow: hidden; }
.channels__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; height: 48px; min-height: 48px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05);
  flex: none;
}
#server-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  background: transparent; border: 0; color: var(--stardust);
  font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.icon-btn:hover { color: var(--starlight); background: var(--glass-2); }

.server-menu { padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.2); }
.server-menu__label { font-size: 11px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--faint); margin-bottom: 8px; }
.invite { display: flex; gap: 8px; align-items: center; }
.invite code {
  flex: 1; background: rgba(0,0,0,0.4); padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: var(--violet); border: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.channels__section {
  padding: 14px 16px 6px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--faint);
}
.channels__list { list-style: none; padding: 0 8px; overflow-y: auto; flex: 1; }
.channel {
  display: flex; align-items: center; gap: 7px; position: relative;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  color: var(--stardust); font-size: 14.5px; transition: all 0.15s;
}
.channel:hover { background: rgba(255,255,255,0.05); color: var(--starlight); }
.channel__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel__gear {
  opacity: 0; background: transparent; border: 0; color: var(--stardust);
  font-size: 13px; cursor: pointer; padding: 2px 4px; border-radius: 6px;
  transition: opacity 0.15s, color 0.15s, background 0.15s; flex: none;
}
.channel:hover .channel__gear { opacity: 1; }
.channel__gear:hover { color: var(--starlight); background: rgba(0,0,0,0.3); }
.channel--active {
  background: rgba(255,255,255,0.07);
  color: var(--starlight);
}
.channel__hash { color: var(--faint); font-weight: 600; }
.channels__add {
  margin: 8px; padding: 10px; border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px dashed var(--line); color: var(--stardust);
  font-family: var(--font-body); font-size: 13.5px; transition: all 0.15s;
}
.channels__add:hover { border-style: solid; color: var(--starlight); background: var(--glass-2); }

/* ---------- Zone de chat ---------- */
.chat { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; background: #111214; }
.chat__head {
  flex: none; position: relative;
  padding: 0 16px; height: 52px; min-height: 52px;
  display: flex; align-items: center;
  background: rgba(10,10,13,0.98);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 0 rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
}

/* Gauche : icône + nom + topic */
.ch-left {
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 0; min-width: 0; overflow: hidden;
}
.chat__hash {
  font-size: 18px; opacity: 0.75; flex-shrink: 0;
  color: var(--violet);
}
.ch-name {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: var(--starlight); white-space: nowrap; flex-shrink: 0;
}
.ch-topic {
  font-family: var(--font-body); font-size: 13px; font-weight: 400;
  color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 10px; margin-left: 2px;
  border-left: 1px solid rgba(255,255,255,0.1);
}

/* Droite : boutons action */
.ch-actions {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: 12px;
}
.ch-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: var(--stardust);
  font-size: 13px; font-weight: 600; font-family: var(--font-body);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.ch-btn svg { flex-shrink: 0; stroke: currentColor; }
.ch-btn:hover { background: rgba(255,255,255,0.08); color: var(--starlight); }
.ch-btn:hover svg { stroke: var(--starlight); }
.ch-btn--active { background: rgba(139,92,246,0.15); color: var(--violet); }
.ch-btn--active svg { stroke: var(--violet); }
.ch-btn span { display: none; }
/* Afficher le label si assez de place */
@media (min-width: 900px) { .ch-btn span { display: inline; } }

/* Séparateur entre les boutons */
.ch-actions::before {
  content: ""; display: block; width: 1px; height: 20px;
  background: rgba(255,255,255,0.08); margin-right: 4px;
}

/* ---------- En-têtes de catégorie (repliables) ---------- */
.cat-header {
  display: flex; align-items: center; gap: 5px;
  padding: 12px 8px 4px; cursor: pointer;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--faint); font-weight: 600; user-select: none;
}
.cat-header:hover { color: var(--stardust); }
.cat-header__caret { transition: transform 0.15s; font-size: 10px; }
.cat-header--collapsed .cat-header__caret { transform: rotate(-90deg); }
.cat-header__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-header__add, .cat-header__gear {
  opacity: 0; background: transparent; border: 0; color: var(--stardust);
  cursor: pointer; padding: 0 4px; border-radius: 5px; flex: none;
  font-size: 14px; line-height: 1; transition: opacity 0.15s, color 0.15s;
}
.cat-header:hover .cat-header__add, .cat-header:hover .cat-header__gear { opacity: 1; }
.cat-header__add:hover, .cat-header__gear:hover { color: var(--starlight); }

/* ---------- Bannière de serveur ---------- */
.server-banner {
  height: 76px; background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line);
}
.server-banner-preview {
  height: 90px; border-radius: var(--radius-sm); background-size: cover;
  background-position: center; border: 1px solid var(--line); margin-bottom: 8px;
}
.server-banner-preview.empty {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.03),
    rgba(255,255,255,0.03) 10px, transparent 10px, transparent 20px);
}
.server-menu__btn { width: 100%; margin-top: 8px; justify-content: flex-start; }

/* ---------- Champs de formulaire supplémentaires ---------- */
.select {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.35); border: 1px solid var(--line);
  color: var(--starlight); font-family: var(--font-body); font-size: 14px;
}
.select:focus { outline: none; border-color: var(--violet); }
.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 8px;
  font-size: 13.5px; color: var(--stardust); cursor: pointer; line-height: 1.4;
}
.checkbox-row input { margin-top: 2px; accent-color: var(--violet); width: 16px; height: 16px; }

/* ---------- Boutons & actions de modale ---------- */
.btn--danger {
  background: rgba(251,113,133,0.12); border: 1px solid rgba(251,113,133,0.4);
  color: #fb7185;
}
.btn--danger:hover { background: rgba(251,113,133,0.22); border-color: #fb7185; }
.modal__actions--split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Indices visuels du glisser-déposer ---------- */
.dragging { opacity: 0.4; }
.drop-before { box-shadow: inset 0 2px 0 0 var(--violet); }
.drop-into {
  background: rgba(139,92,246,0.18) !important;
  box-shadow: inset 0 0 0 1px var(--violet); border-radius: 8px;
}

.messages {
  flex: 1; overflow-y: auto; padding: 8px 0 16px;
  display: flex; flex-direction: column; gap: 0;
  min-height: 0;
}
.messages::-webkit-scrollbar { width: 6px; }
.messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 8px; }
.messages::-webkit-scrollbar-track { background: transparent; }

.empty {
  margin: auto; text-align: center; max-width: 360px; color: var(--stardust);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty__orb { font-size: 46px; color: var(--violet); text-shadow: 0 0 30px var(--violet);
  animation: pulse 4s ease-in-out infinite; }
.empty h2 { font-family: var(--font-display); color: var(--starlight); font-size: 22px; }
.empty p { font-size: 14px; line-height: 1.55; }

.msg {
  display: flex; gap: 12px; padding: 2px 16px; border-radius: 0;
  transition: background 0.1s; position: relative;
  animation: msgIn 0.2s ease;
}
.msg:hover { background: rgba(255,255,255,0.03); }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.msg:not(.msg--grouped) { padding-top: 16px; }
.msg--grouped { padding-top: 2px; padding-bottom: 2px; }
.msg--grouped .avatar { visibility: hidden; height: 0; width: 38px; }
.msg--grouped .msg__head { display: none; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: white; font-weight: 600;
  font-family: var(--font-display); font-size: 15px;
  overflow: hidden;
}
.avatar__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg__body { min-width: 0; }
.msg__head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 2px; }
.msg__author { font-weight: 600; font-size: 14.5px; }
.msg__time { font-size: 11px; color: var(--faint); }
.msg__text { font-size: 14.5px; line-height: 1.5; color: #d7d7ec;
  word-wrap: break-word; overflow-wrap: anywhere; }

.typing { padding: 2px 22px; height: 20px; font-size: 12.5px; color: var(--stardust);
  font-style: italic; }

/* =========================================================================
   PICKER PANEL — style Telegram, flex item dans .chat au-dessus du composer
   ========================================================================= */
.picker-panel {
  position: fixed; z-index: 2000;
  width: 320px; height: 300px;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  animation: slideUpPicker 0.2s cubic-bezier(0.16,1,0.3,1);
}
@keyframes slideUpPicker {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.picker-tabs {
  flex: none; display: flex; padding: 0 8px;
  border-bottom: 1px solid var(--line);
}
.picker-tab {
  background: transparent; border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--stardust); font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  padding: 10px 16px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.picker-tab:hover { color: var(--starlight); }
.picker-tab--active { color: var(--violet); border-bottom-color: var(--violet); }
.picker-pane { flex: 1; overflow-y: auto; padding: 8px; }

.picker-emoji-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px;
}
.picker-emoji-btn {
  background: transparent; border: 0; font-size: 22px;
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  transition: background 0.1s, transform 0.1s; display: grid; place-items: center;
}
.picker-emoji-btn:hover { background: var(--glass-2); transform: scale(1.2); }

.picker-sticker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.picker-sticker-btn {
  background: transparent; border: 0; cursor: pointer;
  padding: 6px; border-radius: 10px; transition: background 0.1s;
}
.picker-sticker-btn:hover { background: var(--glass-2); }
.picker-sticker-btn img { width: 100%; aspect-ratio: 1; object-fit: contain; }

.picker-gif-search {
  width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; color: var(--starlight);
  font-family: var(--font-body); font-size: 13.5px; margin-bottom: 8px; display: block;
}
.picker-gif-search:focus { outline: none; border-color: var(--violet); }

/* =========================================================================
   COMPOSER — style Discord (plat, flush)
   ========================================================================= */
.composer {
  flex: none; border-radius: 0; padding: 8px 16px 12px;
  display: flex; flex-direction: column; gap: 8px; position: relative;
  background: #111214;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.composer__row { display: flex; align-items: flex-end; gap: 8px; }

.composer__input-wrap {
  flex: 1; position: relative; display: flex; align-items: flex-end;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 10px 44px 10px 16px; min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.composer__input-wrap:focus-within {
  border-color: var(--violet); box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

#msg-input, #dm-composer {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--starlight); font-family: var(--font-body); font-size: 14.5px;
  line-height: 1.5; resize: none; overflow-y: hidden;
  max-height: 160px; min-height: 24px; padding: 0; display: block; width: 100%;
}
#msg-input::placeholder, #dm-composer::placeholder { color: var(--faint); }
#msg-input:disabled { opacity: 0.4; cursor: not-allowed; }

.composer__emoji-btn {
  position: absolute; right: 6px; bottom: 5px;
  width: 34px; height: 34px; background: transparent; border: 0;
  font-size: 20px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s, transform 0.1s, color 0.15s; color: var(--stardust);
}
.composer__emoji-btn:hover:not(:disabled) {
  background: var(--glass-2); color: var(--starlight); transform: scale(1.1);
}
.composer__emoji-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.composer__emoji-btn.picker-open { color: var(--violet); background: rgba(139,92,246,0.18); }

.composer__icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: 0; font-size: 20px; cursor: pointer;
  display: grid; place-items: center; color: var(--stardust);
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.composer__icon:hover:not(:disabled) {
  background: var(--glass-2); color: var(--starlight); transform: scale(1.05);
}
.composer__icon:disabled { opacity: 0.4; cursor: not-allowed; }

.composer__send {
  flex: none; width: 44px; height: 44px; border-radius: 10px; border: 0;
  background: linear-gradient(135deg, var(--violet), var(--lime));
  color: #090a0a; font-size: 16px; cursor: pointer;
  display: grid; place-items: center;
  transition: opacity 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(61,143,104,0.38);
}
.composer__send:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 6px 20px rgba(61,143,104,0.50); }
.composer__send:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

/* ---------- Membres ---------- */
.members, #members-panel {
  flex: none; width: 240px; border-radius: 0; padding: 14px 8px; overflow-y: auto;
  background: #0e0e0f; border-left: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: none; -webkit-backdrop-filter: none; border-top: none; border-bottom: none; border-right: none;
}
.members__head {
  padding: 10px 10px 6px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--cyan); font-weight: 600;
}
.members__head--muted { color: var(--faint); }
.members__head--bot { color: var(--faint); }
.members__head--bot-online { color: #60a5fa; }
.members__list { list-style: none; }
.member {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: 9px; cursor: pointer; transition: background 0.12s;
}
.member:hover { background: var(--glass-2); }
.member .avatar { width: 30px; height: 30px; font-size: 12px; }
.member__text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.member__name { font-size: 14px; color: var(--stardust); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.member--online .member__name { color: var(--starlight); }
.member__status { font-size: 11.5px; color: var(--faint); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.member__avatar-wrap { position: relative; flex: none; }
.member__dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--cyan); border: 2.5px solid var(--abyss);
  box-shadow: 0 0 8px var(--cyan);
}
.member--offline .avatar { opacity: 0.45; }

/* =========================================================================
   FENÊTRE MODALE
   ========================================================================= */
/* Overlay générique pour tous les modals custom (z-index > settings = 1000) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 3, 10, 0.72); backdrop-filter: blur(6px);
  animation: fade 0.18s ease;
}

.modal {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center;
  background: rgba(3, 3, 10, 0.6); backdrop-filter: blur(4px);
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal__box {
  width: 100%; max-width: 380px; padding: 28px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  animation: rise 0.3s cubic-bezier(0.16,1,0.3,1);
}
.modal__box h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 18px; }
.modal__box .field { margin-bottom: 14px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* =========================================================================
   ÉCRAN D'ACCUEIL — boutons d'action
   ========================================================================= */
.empty__actions {
  display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap;
  justify-content: center;
}

/* =========================================================================
   FICHE PROFIL (popover façon Discord)
   ========================================================================= */
.user-card {
  position: fixed; z-index: 20; width: 272px;
  border-radius: 16px; overflow: hidden;
  background: rgba(12, 20, 14, 0.97);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  animation: ucIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ucIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }

.uc__banner { height: 78px; width: 100%; }
.uc__avatar-wrap { position: relative; width: 76px; margin: -40px 0 0 18px; }
.uc__avatar {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; color: white;
  font-family: var(--font-display); font-weight: 600; font-size: 28px;
  border: 5px solid rgba(15, 15, 30, 0.97);
  overflow: hidden; background: var(--cosmos);
}
.uc__avatar img, .uc__avatar .avatar__img { width: 100%; height: 100%; object-fit: cover; }
.uc__dot {
  position: absolute; right: 1px; bottom: 1px;
  width: 19px; height: 19px; border-radius: 50%;
  border: 4px solid rgba(15, 15, 30, 0.97);
}
.uc__dot--online { background: #2dd4bf; box-shadow: 0 0 10px rgba(45, 212, 191, 0.7); }
.uc__dot--offline { background: var(--faint); }

.uc__body { padding: 11px 18px 18px; }
.uc__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uc__name { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--starlight); }
.uc__status {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.uc__status--online { color: #2dd4bf; background: rgba(45, 212, 191, 0.14); }
.uc__status--offline { color: var(--faint); background: rgba(255, 255, 255, 0.05); }
.uc__handle { display: flex; align-items: center; gap: 0; margin-top: 3px; flex-wrap: wrap; }
.uc__username { font-size: 13px; color: var(--stardust); }
.uc__pronouns { font-size: 12px; color: var(--faint); }
.uc__pronouns::before { content: "·"; margin: 0 7px; color: var(--faint); }

.uc__customstatus {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 13px;
  background: var(--glass-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.uc__cs-emoji { font-size: 16px; line-height: 1.3; flex: none; }
.uc__cs-text { font-size: 13px; color: #d7d7ec; line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; }

.uc__section { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 13px; }
.uc__label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--cyan); font-weight: 700; }
.uc__bio { font-size: 13.5px; line-height: 1.55; color: #d7d7ec; margin-top: 6px;
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.uc__meta { display: flex; align-items: center; gap: 8px; }
.uc__since-ic { color: var(--violet); font-size: 13px; }
.uc__since { font-size: 12px; color: var(--stardust); }

.uc__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.uc__actions .btn { width: 100%; }
.uc__mod { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 13px; }
.uc__mod .uc__label { margin-bottom: 9px; }
.uc__mod-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.uc__mod-row .btn { width: 100%; white-space: nowrap; text-align: center; }
.uc__mod-ban { grid-column: 1 / -1; }   /* "Bannir" sur toute la largeur */

/* =========================================================================
   ÉDITEUR DE PROFIL
   ========================================================================= */
.modal__box.profile { max-width: 460px; max-height: 86vh; overflow-y: auto; }
.avatar--xl {
  width: 72px; height: 72px; font-size: 30px;
  border-radius: 50%; display: grid; place-items: center;
  color: white; font-family: var(--font-display); font-weight: 600; flex: none;
  overflow: hidden;
}
.muted { color: var(--faint); font-size: 12px; line-height: 1.4; }
.profile__top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile__pic-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.profile__pic-actions .muted { margin-top: 2px; }
.profile__status-row { display: flex; gap: 8px; }

/* Layout 2 colonnes style Discord */
.profile-editor-layout {
  display: flex; gap: 24px; align-items: flex-start;
}
.profile-editor-form { flex: 1; min-width: 0; }
.profile-editor-preview { flex: 0 0 210px; position: sticky; top: 0; }

/* Carte de profil preview (panneau droit) */
.pe-preview-card {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); margin-bottom: 4px;
}
.pe-preview-banner {
  width: 100%; height: 56px;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
}
.pe-preview-body {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 0 12px 8px;
}
.pe-preview-avatar {
  width: 52px !important; height: 52px !important; font-size: 20px !important;
  border: 3px solid var(--cosmos); border-radius: 50%;
  margin-top: -26px; flex: none;
}
.pe-preview-info { flex: 1; min-width: 0; padding-top: 4px; }
.pe-preview-name {
  font-weight: 700; font-size: 14px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pe-preview-pronouns { font-size: 11px; color: var(--stardust); margin-top: 1px; }
.pe-preview-bio {
  padding: 6px 12px 12px; font-size: 12px; color: var(--stardust); line-height: 1.4;
  min-height: 16px; word-break: break-word;
}
/* Aperçu dans le chat */
.pe-preview-msg {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
}
.pe-preview-msg .avatar--sm { flex: none; }
.profile__status-row .status-emoji { width: 56px; text-align: center; font-size: 18px; flex: none; }
.profile__status-row input {
  background: rgba(0,0,0,0.3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; color: var(--starlight);
  font-family: var(--font-body); font-size: 14.5px;
}
.profile__status-row input:last-child { flex: 1; }
.profile__status-row input:focus { outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.16); }
#pe-emoji-zone.disabled { opacity: 0.4; pointer-events: none; }

/* ========== STATUT — redesign ========== */
.stat-pane { display: flex; flex-direction: column; gap: 16px; }

.stat-preview {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
}
.stat-preview__dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6);
  transition: all 0.3s;
}
.stat-preview__dot--idle       { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.6); }
.stat-preview__dot--dnd        { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.6); }
.stat-preview__dot--invisible  { background: #6b7280; box-shadow: none; }
.stat-preview__emoji { font-size: 18px; }
.stat-preview__text  { font-size: 14px; color: var(--stardust); font-style: italic; }

.stat-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden;
}
.stat-card__head {
  padding: 11px 16px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--stardust);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}

.stat-presence-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  padding: 10px;
}
@media(max-width:480px) { .stat-presence-grid { grid-template-columns: 1fr 1fr; gap: 6px; } }
.stat-pres {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 6px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; cursor: pointer; transition: all 0.15s;
  font-size: 12px; font-weight: 600; color: var(--stardust);
}
.stat-pres:hover { background: rgba(255,255,255,0.05); color: var(--starlight); }
.stat-pres--active { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); color: var(--starlight); }
.stat-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
}
.stat-dot--online    { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.stat-dot--idle      { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.5); }
.stat-dot--dnd       { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.5); }
.stat-dot--invisible { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); }

.stat-input-row {
  display: flex; gap: 0; padding: 12px 14px 8px;
}
.stat-emoji-input {
  width: 52px; text-align: center; font-size: 20px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-right: none; border-radius: 8px 0 0 8px; outline: none;
  color: var(--starlight); flex-shrink: 0; padding: 8px 4px;
}
.stat-text-input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0 8px 8px 0; padding: 8px 12px;
  font-size: 13px; color: var(--stardust); outline: none;
}
.stat-text-input:focus, .stat-emoji-input:focus {
  border-color: rgba(139,92,246,0.4); background: rgba(255,255,255,0.07);
}
.stat-text-input::placeholder { color: rgba(255,255,255,0.2); }

.stat-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 14px 14px;
}
.stat-sugg {
  padding: 4px 12px; border-radius: 20px; font-size: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: var(--stardust); cursor: pointer; transition: all 0.15s;
}
.stat-sugg:hover { background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.3); color: var(--violet); }

/* Platform SVG icons */
.platform-svg { display: inline-block; vertical-align: middle; }
.profile__emoji-row { display: flex; flex-direction: column; gap: 8px; }
.profile__emoji-row input { width: 90px; text-align: center; font-size: 18px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px; color: var(--starlight); }
.profile__emoji-row input:focus { outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.16); }

.emoji-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick {
  width: 36px; height: 36px; border-radius: 9px; cursor: pointer;
  background: var(--glass-2); border: 1px solid var(--line);
  font-size: 18px; display: grid; place-items: center;
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
}
.emoji-pick:hover { transform: translateY(-2px); border-color: var(--violet);
  background: rgba(139,92,246,0.18); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.1s;
  box-shadow: 0 0 0 0 currentColor;
}
.swatch:hover { transform: scale(1.12); }
.swatch--active { border-color: white;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25); transform: scale(1.12); }

/* =========================================================================
   DASHBOARD HOME — Build 34 · Premium Panda Galaxy
   ========================================================================= */
.home { flex:1 1 0; min-width:0; border-radius:0; background:#090a0a; }
#home-view { display:flex; flex-direction:column; overflow:hidden; background:#090a0a; }

/* ── HEADER PREMIUM ── */
.db-header {
  display:flex; align-items:center; gap:20px;
  padding:0 32px; height:76px; flex:none;
  background:linear-gradient(110deg,rgba(10,10,12,0.97) 0%,rgba(12,12,14,0.97) 100%);
  border-bottom:1px solid rgba(255,255,255,0.06);
  position:relative; overflow:hidden;
  box-shadow:0 1px 0 rgba(255,255,255,0.05), 0 4px 24px rgba(0,0,0,0.4);
}
/* Glow lines */
.db-header::before {
  content:""; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(61,143,104,0.45),rgba(196,154,36,0.4),transparent);
}
.db-header::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(ellipse at 15% 50%,rgba(255,255,255,0.04),transparent 50%),
             radial-gradient(ellipse at 85% 50%,rgba(196,154,36,0.05),transparent 50%);
}

/* Identity */
.db-header__identity { display:flex; align-items:center; gap:14px; flex:none; z-index:1; }
.db-header__av-wrap { position:relative; flex:none; }
.db-header__av {
  width:48px !important; height:48px !important; font-size:18px !important;
  border:2px solid rgba(61,143,104,0.55);
  box-shadow:0 0 16px rgba(61,143,104,0.38), inset 0 0 8px rgba(255,255,255,0.05);
}
.db-header__av-ring {
  position:absolute; inset:-5px; border-radius:50%;
  border:1px solid rgba(61,143,104,0.28);
  animation:dbRing 3.5s ease-in-out infinite; pointer-events:none;
}
.db-header__av-ring::after {
  content:""; position:absolute; inset:-4px; border-radius:50%;
  border:1px solid rgba(196,154,36,0.12);
  animation:dbRing 3.5s ease-in-out infinite 0.7s;
}
@keyframes dbRing { 0%,100%{transform:scale(1);opacity:.8;} 50%{transform:scale(1.12);opacity:.15;} }
.db-header__text { flex:1; min-width:0; }
.db-header__name {
  font-family:var(--font-display); font-size:18px; font-weight:700;
  color:var(--starlight); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  background:linear-gradient(90deg,#e8ede5,#7aaa38);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
.db-header__badges { display:flex; flex-wrap:wrap; gap:4px; margin-top:3px; }

/* Stats */
.db-header__stats { display:flex; gap:6px; align-items:center; z-index:1; }
.db-stat {
  display:flex; flex-direction:column; align-items:center; gap:0;
  padding:6px 16px; border-radius:10px;
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.05);
  cursor:default; transition:background .14s,border-color .14s,transform .1s;
  position:relative; overflow:hidden;
}
.db-stat::before {
  content:""; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(61,143,104,0.28),transparent);
}
.db-stat:hover { background:rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.09); transform:translateY(-1px); }
.db-stat__n {
  font-family:var(--font-display); font-size:22px; font-weight:700;
  color:var(--violet); line-height:1.1;
}
.db-stat__l { font-size:9px; color:var(--faint); text-transform:uppercase; letter-spacing:.6px; font-weight:700; }

/* Actions */
.db-header__actions { display:flex; gap:6px; margin-left:auto; z-index:1; }
.db-action {
  display:inline-flex; align-items:center; gap:7px; padding:8px 16px;
  border-radius:10px; border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.04); color:var(--starlight);
  font-family:var(--font-body); font-size:13px; font-weight:600;
  cursor:pointer; white-space:nowrap; position:relative; overflow:hidden;
  transition:background .13s,border-color .13s,transform .1s,box-shadow .13s;
}
.db-action::before {
  content:""; position:absolute; top:0; left:-100%; right:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(61,143,104,0.45),transparent);
  transition:left .3s;
}
.db-action:hover::before { left:100%; }
.db-action:hover { background:rgba(255,255,255,0.07); border-color:rgba(61,143,104,0.42); transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,0.4),0 0 12px rgba(255,255,255,0.05); }
.db-action--primary {
  background:linear-gradient(120deg,var(--violet),#3a8c60);
  border-color:transparent; color:#090a0a; font-weight:700;
  box-shadow:0 4px 16px rgba(61,143,104,0.45);
}
.db-action--primary:hover { background:linear-gradient(120deg,#5cb08a,var(--violet)); box-shadow:0 6px 24px rgba(78,158,116,0.65); transform:translateY(-2px) scale(1.02); }

/* ── BODY ── */
.db-body { display:flex; flex:1; min-height:0; overflow:hidden; }

/* ── FEED ── */
.db-feed { flex:1; min-width:0; display:flex; flex-direction:column; overflow:hidden; }

/* Filter chips */
.db-filters {
  display:flex; gap:6px; padding:16px 28px 0;
  overflow-x:auto; flex:none; scrollbar-width:none;
  -webkit-mask:linear-gradient(90deg,transparent,black 20px,black calc(100% - 20px),transparent);
  mask:linear-gradient(90deg,transparent,black 20px,black calc(100% - 20px),transparent);
}
.db-filters::-webkit-scrollbar { display:none; }
.db-chip {
  display:inline-flex; align-items:center; gap:5px; padding:7px 15px;
  border-radius:99px; white-space:nowrap; flex:none;
  border:1px solid rgba(255,255,255,0.06); background:rgba(255,255,255,0.03);
  color:var(--stardust); font-family:var(--font-body); font-size:12.5px; font-weight:600;
  cursor:pointer; transition:all .14s; position:relative; overflow:hidden;
}
.db-chip:hover { background:rgba(255,255,255,0.05); color:var(--starlight); border-color:rgba(61,143,104,0.28); transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,0.3); }
.db-chip--active {
  background:linear-gradient(120deg,rgba(255,255,255,0.09),rgba(196,154,36,0.12));
  border-color:rgba(61,143,104,0.45); color:var(--starlight);
  box-shadow:0 0 12px rgba(255,255,255,0.06), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Search */
.db-search-wrap { position:relative; padding:12px 28px 0; flex:none; }
.db-search {
  width:100%; padding:10px 40px 10px 16px; border-radius:12px;
  border:1px solid rgba(255,255,255,0.06); background:rgba(10,10,12,0.8);
  color:var(--starlight); font-family:var(--font-body); font-size:14px;
  outline:none; transition:border-color .14s,box-shadow .14s,background .14s;
  box-shadow:inset 0 1px 3px rgba(0,0,0,0.3);
}
.db-search:focus { border-color:rgba(61,143,104,0.42); box-shadow:0 0 0 3px rgba(255,255,255,0.05),inset 0 1px 3px rgba(0,0,0,0.2); background:rgba(10,10,12,0.95); }
.db-search::placeholder { color:var(--faint); }
.db-search__ic { position:absolute; right:44px; top:50%; transform:translateY(-50%); font-size:16px; opacity:.4; pointer-events:none; }

/* Feed head */
.db-feed-head { display:flex; align-items:center; gap:10px; padding:14px 28px 6px; flex:none; }
.db-feed__title { font-family:var(--font-display); font-size:13px; font-weight:700; color:var(--violet); text-transform:uppercase; letter-spacing:1px; }
.db-feed__count { font-size:10.5px; color:var(--faint); background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.06); padding:1px 9px; border-radius:99px; }

/* ── GRID ── */
#home-servers {
  flex:1; overflow-y:auto; padding:4px 28px 32px;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:16px; align-content:start;
}
#home-servers::-webkit-scrollbar { width:4px; }
#home-servers::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.08); border-radius:4px; }

/* Section dividers */
.db-grid-label {
  grid-column:1/-1; font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:1.2px; color:rgba(61,143,104,0.55); padding:12px 0 6px;
  display:flex; align-items:center; gap:10px;
}
.db-grid-label::after { content:""; flex:1; height:1px; background:linear-gradient(90deg,rgba(255,255,255,0.08),transparent); }
.db-grid-label__badge { color:var(--faint); font-size:10px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.06); padding:1px 8px; border-radius:99px; margin-right:auto; }

/* Loading / empty */
.db-loading { grid-column:1/-1; display:flex; justify-content:center; padding:48px 0; }
.db-empty { grid-column:1/-1; text-align:center; padding:60px 24px; color:var(--faint); font-size:14px; line-height:1.7; }
.db-empty__ic { font-size:48px; margin-bottom:12px; opacity:.5; }

/* ── SERVER CARD ── */
.db-card {
  background:rgba(13,21,16,0.9);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:16px; overflow:hidden; cursor:pointer;
  text-align:left; color:var(--starlight);
  display:flex; flex-direction:column;
  transition:transform .18s cubic-bezier(.2,.8,.2,1), border-color .15s, box-shadow .18s;
  animation:dbCardIn .35s cubic-bezier(.2,.8,.2,1) backwards;
  position:relative;
}
@keyframes dbCardIn { from{opacity:0;transform:translateY(14px) scale(.98);} }

.db-card::before {
  content:""; position:absolute; inset:0; border-radius:16px; pointer-events:none; z-index:0;
  background:linear-gradient(135deg,rgba(255,255,255,0.03) 0%,transparent 60%);
  opacity:0; transition:opacity .18s;
}
.db-card:hover::before { opacity:1; }
.db-card:hover {
  transform:translateY(-6px) scale(1.015);
  border-color:rgba(61,143,104,0.42);
  box-shadow:0 20px 50px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,0.07), 0 0 30px rgba(255,255,255,0.05);
}

/* Carte "Membre" : bordure jade */
.db-card--mine { border-color:rgba(61,143,104,0.28); }
.db-card--mine::after {
  content:""; position:absolute; top:0; left:0; right:0; height:2px;
  background:linear-gradient(90deg,rgba(61,143,104,0.65),rgba(196,154,36,0.5),rgba(255,255,255,0.08));
  z-index:2; pointer-events:none;
}
.db-card--mine:hover { border-color:rgba(61,143,104,0.55); box-shadow:0 20px 50px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,0.09),0 0 40px rgba(255,255,255,0.05); }

/* Featured card = 2 colonnes */
.db-card--featured { grid-column:span 2; }
.db-card--featured .db-card__banner { height:148px; }
@media(max-width:720px){ .db-card--featured{grid-column:span 1;} }

/* Banner */
.db-card__banner {
  width:100%; height:110px; background-size:cover; background-position:center;
  position:relative; overflow:hidden; flex:none;
}
.db-card__banner::after {
  content:""; position:absolute; inset:0;
  background:linear-gradient(to bottom,transparent 30%,rgba(13,21,16,0.85) 100%);
}
.db-card__banner-shimmer {
  position:absolute; inset:0; z-index:1; pointer-events:none;
  background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,0.04) 50%,transparent 60%);
  animation:dbShimmer 3s linear infinite;
}
@keyframes dbShimmer { 0%{transform:translateX(-100%);} 100%{transform:translateX(100%);} }

/* Badges sur la bannière */
.db-card__mine-badge {
  position:absolute; top:10px; left:10px; z-index:3;
  background:rgba(61,143,104,0.88); color:#0a110c;
  font-size:9.5px; font-weight:800; padding:4px 10px; border-radius:99px;
  letter-spacing:.3px; backdrop-filter:blur(4px);
  box-shadow:0 2px 8px rgba(0,0,0,0.4);
}

/* Body */
.db-card__body { padding:0 16px 16px; display:flex; gap:13px; position:relative; z-index:1; }
.db-card__icon {
  width:54px; height:54px; border-radius:14px; flex:none;
  display:grid; place-items:center;
  font-family:var(--font-display); font-weight:700; font-size:20px; color:white;
  margin-top:-28px; border:3px solid rgba(13,21,16,1); overflow:hidden;
  position:relative; z-index:2;
  box-shadow:0 4px 16px rgba(0,0,0,0.5);
  transition:transform .15s, box-shadow .15s;
}
.db-card:hover .db-card__icon { transform:scale(1.06); box-shadow:0 6px 20px rgba(0,0,0,0.6); }
.db-card__icon img { width:100%; height:100%; object-fit:cover; }

.db-card__info { flex:1; min-width:0; padding-top:8px; }
.db-card__name {
  font-size:15px; font-weight:700; color:var(--starlight);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-bottom:4px;
  letter-spacing:-.2px;
}
.db-card__desc {
  font-size:12px; color:var(--stardust); margin-bottom:8px; line-height:1.45;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
/* Meta : online + membres */
.db-card__meta { display:flex; align-items:center; gap:10px; font-size:11px; margin-bottom:8px; }
.db-card__meta-online {
  display:inline-flex; align-items:center; gap:4px; color:var(--cyan);
  font-weight:600;
}
.db-card__meta-online::before { content:""; display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--cyan); box-shadow:0 0 6px var(--cyan); animation:pulse 2s ease infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.5;} }
.db-card__meta-members { color:var(--faint); }
/* Tags */
.db-card__tags { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:8px; }
.dsc-tag { font-size:10px; font-weight:600; padding:2px 8px; border-radius:99px; background:rgba(255,255,255,0.05); color:var(--violet); border:1px solid rgba(255,255,255,0.07); }
/* Bouton rejoindre */
.db-card__join {
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 12px; border-radius:8px;
  background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.09);
  color:var(--violet); font-size:12px; font-weight:700; cursor:pointer;
  transition:background .12s,border-color .12s,transform .1s;
}
.db-card__join:hover { background:rgba(255,255,255,0.08); border-color:rgba(61,143,104,0.45); transform:translateX(2px); }

/* ── SIDEBAR droite ── */
.db-sidebar {
  flex:none; width:244px;
  background:linear-gradient(180deg,rgba(11,16,13,0.85),rgba(9,13,10,0.85));
  border-left:1px solid rgba(255,255,255,0.05);
  overflow-y:auto; padding:20px 14px;
  backdrop-filter:blur(4px);
}
.db-sidebar::-webkit-scrollbar { width:3px; }
.db-sidebar::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.06); border-radius:3px; }
.db-sidebar-section { margin-bottom:22px; animation:dbCardIn .3s ease backwards; }
.db-sidebar-section:nth-child(2){animation-delay:.06s;} .db-sidebar-section:nth-child(3){animation-delay:.12s;}
.db-sidebar-section__head {
  display:flex; align-items:center; justify-content:space-between; margin-bottom:10px;
  font-size:10px; text-transform:uppercase; letter-spacing:1.2px; font-weight:700;
  color:rgba(61,143,104,0.55);
  padding-bottom:6px; border-bottom:1px solid rgba(255,255,255,0.05);
}
.db-sidebar-tip {
  display:flex; align-items:flex-start; gap:8px; padding:10px 12px; border-radius:10px;
  background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.05);
  color:var(--faint); font-size:11.5px; line-height:1.5; margin-top:8px;
}

/* Common classes kept */
.home__chip { display:inline-flex; align-items:center; gap:4px; flex:none; padding:2px 8px; border-radius:99px; background:rgba(255,255,255,0.07); color:var(--violet); font-weight:600; font-size:11px; white-space:nowrap; }
.hv-friend-row { display:flex; align-items:center; gap:10px; padding:7px 8px; border-radius:9px; cursor:pointer; transition:background .12s; width:100%; text-align:left; background:transparent; border:none; color:var(--starlight); }
.hv-friend-row:hover { background:rgba(255,255,255,0.05); }
.hv-friend-row__av { width:32px; height:32px; border-radius:50%; flex:none; display:grid; place-items:center; font-weight:700; font-size:13px; color:white; position:relative; overflow:hidden; }
.hv-friend-row__av img { width:100%; height:100%; object-fit:cover; }
.hv-friend-row__dot { position:absolute; bottom:0; right:0; width:10px; height:10px; border-radius:50%; background:var(--cyan); border:2px solid #090a0a; }
.hv-friend-row__dot--off { background:rgba(255,255,255,0.08); }
.hv-friend-row__name { flex:1; font-size:13px; font-weight:600; color:var(--starlight); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hv-friend-row__action { flex:none; font-size:12px; color:var(--violet); opacity:0; transition:opacity .12s; }
.hv-friend-row:hover .hv-friend-row__action { opacity:1; }
.hv-badges-list { display:flex; flex-direction:column; gap:6px; }
.hv-badge-row { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:9px; background:rgba(10,10,12,0.6); border:1px solid rgba(255,255,255,0.05); }
.hv-badge-row__ic { font-size:18px; width:28px; text-align:center; }
.hv-badge-row__label { font-size:12.5px; font-weight:600; flex:1; }
.hv-dm-list { display:flex; flex-direction:column; gap:3px; }
.hv-section__badge { font-size:10.5px; color:var(--faint); background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.06); padding:1px 8px; border-radius:99px; }

/* Server cards pour la modal Explore (legacy) */
.server-card { display:flex; flex-direction:column; border-radius:var(--radius); overflow:hidden; background:var(--glass); border:1px solid var(--line); cursor:pointer; color:var(--starlight); text-align:left; transition:transform .14s,border-color .15s; }
.server-card:hover { transform:translateY(-3px); border-color:var(--violet); }
.server-card__banner { width:100%; height:64px; background-size:cover; background-position:center; }
.server-card__body { display:flex; align-items:center; gap:12px; padding:8px 12px 12px; }
.server-card__avatar { flex:none; width:44px; height:44px; border-radius:12px; display:grid; place-items:center; overflow:hidden; font-family:var(--font-display); font-weight:700; font-size:16px; color:white; margin-top:-18px; background:var(--cosmos); }
.server-card__avatar img { width:100%; height:100%; object-fit:cover; }
.server-card__info { flex:1; min-width:0; }
.server-card__name { display:block; font-size:13.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.server-card__desc { display:block; font-size:11.5px; color:var(--stardust); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.server-card--member .server-card__name::after { content:" ✓"; color:var(--violet); font-size:10px; }
.home__label { font-size:10.5px; text-transform:uppercase; letter-spacing:1px; color:var(--violet); font-weight:700; margin-bottom:12px; }
.explore-search,.explore-grid,.explore-empty { display:none; }

/* =========================================================================
   ACCESSIBILITÉ & RESPONSIVE
   ========================================================================= */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 920px) {
  .rail  { width: 66px; }
  .channels { width: 180px; }
  .members { display: none !important; }
  .home { padding: 26px 18px; }
}

/* ---------- Sécurité & modération ---------- */
/* Engrenage d'actions sur un message (apparaît au survol) */
/* Ancienne classe conservée pour compat mais remplacée par .msg-toolbar */
.msg__gear { display: none; }

/* Toolbar flottante au hover sur un message */
.msg-toolbar {
  position: absolute; top: 4px; right: 8px;
  display: flex; align-items: center; gap: 3px;
  background: var(--glass-2, rgba(18,15,42,.97));
  border: 1px solid var(--line); border-radius: 10px;
  padding: 3px 5px; opacity: 0; pointer-events: none;
  transition: opacity .15s;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  z-index: 20;
}
.msg:hover .msg-toolbar { opacity: 1; pointer-events: auto; }
.msg-toolbar__btn {
  background: none; border: none; cursor: pointer;
  font-size: 18px; width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center; line-height: 1;
  color: var(--text-muted); transition: background .12s, transform .1s;
}
.msg-toolbar__btn:hover { background: rgba(255,255,255,.1); transform: scale(1.15); color: var(--text); }

/* Menu contextuel d'un message */
.msg-menu {
  position: fixed; z-index: 1100; min-width: 190px; padding: 6px;
  border-radius: 12px; box-shadow: 0 18px 50px -10px rgba(0,0,0,0.7);
  animation: modalIn 0.14s cubic-bezier(0.16,1,0.3,1);
}
.msg-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; color: var(--starlight); cursor: pointer;
  font: inherit; font-size: 14px; padding: 9px 11px; border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}
.msg-menu__item:hover:not(:disabled) { background: var(--glass-2); }
.msg-menu__item--danger { color: #fb7185; }
.msg-menu__item--danger:hover { background: rgba(251,113,133,0.14); }
.msg-menu__item--soon { color: var(--faint); cursor: default; }
.msg-menu__ic { width: 18px; text-align: center; }
.msg-menu__lbl { flex: 1; }
.msg-menu__soon {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--glass-2); color: var(--faint); padding: 2px 6px; border-radius: 6px;
}

/* Marqueurs d'état d'un message */
.msg__edited { font-size: 11px; color: var(--faint); margin-left: 6px; }
.msg__pin { margin-left: 6px; font-size: 12px; }
.msg--pinned {
  background: linear-gradient(90deg, rgba(251,191,36,0.07), transparent 70%);
  border-left: 2px solid rgba(251,191,36,0.5);
}

/* Édition en ligne d'un message */
.msg__edit { margin-top: 4px; }
.msg__edit-input {
  width: 100%; resize: vertical; min-height: 38px; padding: 9px 12px;
  background: var(--cosmos); border: 1px solid var(--violet); border-radius: 10px;
  color: var(--starlight); font: inherit; font-size: 14.5px;
}
.msg__edit-hint { font-size: 11px; margin-top: 4px; }

/* Liste des signalements (panneau de modération) */
.mod-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.mod-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; background: rgba(0,0,0,0.2);
}
.mod-item__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 600; margin-bottom: 4px;
}
.mod-item__meta { font-size: 12.5px; color: var(--stardust); margin-bottom: 4px; }
.mod-item__detail {
  font-size: 13px; color: var(--starlight); background: rgba(0,0,0,0.25);
  border-left: 2px solid var(--violet); padding: 6px 10px; border-radius: 6px; margin: 6px 0;
}
.mod-item__preview {
  font-size: 13px; color: var(--stardust); font-style: italic; margin: 6px 0;
}
.mod-item__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Badge "niveau suggéré" coloré selon la gravité */
.level {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  white-space: nowrap; border: 1px solid var(--line); color: var(--stardust);
}
.level--faible      { color: var(--faint); }
.level--revue       { color: #fbbf24; border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.08); }
.level--limitation  { color: #fb923c; border-color: rgba(251,146,60,0.4); background: rgba(251,146,60,0.08); }
.level--suspension  { color: #fb7185; border-color: rgba(251,113,133,0.4); background: rgba(251,113,133,0.08); }
.level--ban         { color: #f43f5e; border-color: rgba(244,63,94,0.55);  background: rgba(244,63,94,0.12); }

/* Sessions actives */
/* ========== SÉCURITÉ — redesign ========== */
.sec-pane { display: flex; flex-direction: column; gap: 16px; }

/* ── Trust Rank Timeline ─────────────────────────────────────────────────── */
.trust-block { background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:14px; padding:20px 22px; margin-bottom:18px; }
.trust-block__header { display:flex; align-items:baseline; gap:10px; margin-bottom:18px; }
.trust-block__title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--stardust); }
.trust-block__note { font-size:11px; color:var(--faint); }

/* Track — overflow-x scroll mais on laisse overflow-y visible via un wrapper */
.trust-timeline { overflow-x:auto; overflow-y:visible; padding-bottom:4px; }
.tl-track { display:flex; align-items:center; gap:0; min-width:max-content; padding:12px 4px 16px; }
.tl-connector { flex:1; height:2px; background:var(--border); min-width:18px; }

/* Nodes */
.tl-node { display:flex; flex-direction:column; align-items:center; gap:6px; position:relative; cursor:default; }
.tl-node__dot { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; border:2px solid var(--border); background:var(--bg); transition:transform .15s; font-size:18px; }
.tl-node__label { font-size:11px; color:var(--faint); white-space:nowrap; }
.tl-node--done .tl-node__dot { background:rgba(34,197,94,.15); border-color:#22c55e; color:#22c55e; font-size:14px; font-weight:700; }
.tl-node--done .tl-node__label { color:#22c55e; }
.tl-node--active .tl-node__dot { border-color:var(--rank-color,#8b5cf6); background:rgba(139,92,246,.15); box-shadow:0 0 12px rgba(139,92,246,.4); animation:rank-pulse 2s ease-in-out infinite; }
.tl-node--active .tl-node__label { color:var(--starlight); font-weight:700; }
.tl-node--future .tl-node__dot { opacity:.4; }
.tl-node--future .tl-node__label { opacity:.4; }
.tl-node:hover .tl-node__dot { transform:scale(1.15); }

/* Tooltip inline — caché, utilisé uniquement pour stocker les données */
.tl-node__tooltip { display:none; }

/* Tooltip flottant global — attaché au body via JS */
#tl-floating-tip { position:fixed; z-index:9999; pointer-events:none; background:#1a1b2e; border:1px solid rgba(255,255,255,.12); border-radius:12px; padding:14px 18px; font-size:13px; color:#d1d5db; white-space:nowrap; min-width:200px; box-shadow:0 12px 40px rgba(0,0,0,.85); opacity:0; transition:opacity .12s; }
#tl-floating-tip.visible { opacity:1; }
#tl-floating-tip::after { content:""; position:absolute; top:100%; left:50%; transform:translateX(-50%); border:7px solid transparent; border-top-color:#1a1b2e; }
#tl-floating-tip strong { display:block; margin-bottom:8px; color:#f3f4f6; font-size:14px; }
#tl-floating-tip ul { margin:0; padding-left:16px; }
#tl-floating-tip li { margin-bottom:4px; line-height:1.5; }
@keyframes rank-pulse { 0%,100%{box-shadow:0 0 10px rgba(139,92,246,.35)} 50%{box-shadow:0 0 20px rgba(139,92,246,.7)} }

/* Progress bar */
.trust-progress-wrap { margin-top:18px; }
.trust-progress-labels { display:flex; justify-content:space-between; font-size:12px; color:var(--stardust); margin-bottom:6px; }
.trust-progress-track { height:8px; background:rgba(255,255,255,.06); border-radius:999px; overflow:hidden; }
.trust-progress-fill { height:100%; border-radius:999px; transition:width .5s ease; }
.trust-progress-detail { font-size:11px; color:var(--faint); margin-top:6px; text-align:center; }

/* Unlocks chips */
.trust-unlocks { margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
.trust-unlocks__title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--stardust); margin-bottom:10px; }
.trust-unlock-chip { display:inline-flex; align-items:center; gap:4px; background:rgba(34,197,94,.08); color:#4ade80; border:1px solid rgba(34,197,94,.2); border-radius:999px; padding:3px 10px; font-size:11px; margin:3px 4px 3px 0; }

.sec-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden;
}
.sec-card__head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--stardust);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}
.sec-card__head svg { stroke: var(--violet); }
.sec-card__foot {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.01);
}

.sess-list { display: flex; flex-direction: column; gap: 0; margin: 0; }
.sess-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sess-item:last-child { border-bottom: none; }
.sess-item__icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sess-item__info { flex: 1; min-width: 0; }
.sess-item__device {
  font-size: 13px; color: var(--starlight); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sess-item__meta { font-size: 11px; color: var(--faint); margin-top: 2px; }
.sess-tag {
  display: inline-block; font-size: 10px; font-weight: 700; color: var(--cyan);
  border: 1px solid rgba(34,211,238,0.35); background: rgba(34,211,238,0.08);
  border-radius: 20px; padding: 1px 8px; margin-left: 6px; vertical-align: middle;
}

.sec-danger-zone {
  border-radius: 14px; border: 1px solid rgba(239,68,68,0.18);
  background: rgba(239,68,68,0.03); overflow: hidden;
}
.sec-danger-zone__head {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 18px;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(239,68,68,0.6);
  border-bottom: 1px solid rgba(239,68,68,0.1);
  background: rgba(239,68,68,0.04);
}
.sec-danger-actions { display: flex; flex-direction: column; }
.sec-danger-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(239,68,68,0.08);
  transition: background 0.15s;
}
.sec-danger-row:hover { background: rgba(239,68,68,0.04); }
.sec-danger-row--last { border-bottom: none; }
.sec-danger-row__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sec-danger-row__title { font-size: 13px; font-weight: 600; color: var(--starlight); }
.sec-danger-row__desc { font-size: 11.5px; color: var(--stardust); }
.sec-danger-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 7px 14px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.sec-danger-btn--neutral {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--stardust);
}
.sec-danger-btn--neutral:hover { background: rgba(255,255,255,0.09); color: var(--starlight); }
.sec-danger-btn--export {
  background: rgba(61,143,104,0.1); border: 1px solid rgba(61,143,104,0.3); color: var(--cyan);
}
.sec-danger-btn--export:hover { background: rgba(61,143,104,0.18); }
.sec-danger-btn--export:disabled { opacity: 0.45; cursor: not-allowed; }
.sec-danger-btn--delete {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171;
}
.sec-danger-btn--delete:hover { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.5); }

/* Toast (petit message éphémère en bas de l'écran) */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--cosmos); border: 1px solid var(--line); color: var(--starlight);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 9999;
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: 90vw;
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================================
   MENUS PRO — en-têtes de fenêtre, menu serveur structuré, sections de form
   ========================================================================= */

/* En-tête commun à toutes les fenêtres : titre + bouton fermer (✕) */
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.modal__head h3 { margin-bottom: 0; }
.modal__x {
  background: transparent; border: 0; color: var(--stardust);
  font-size: 15px; cursor: pointer; width: 30px; height: 30px; flex: none;
  border-radius: 8px; display: grid; place-items: center; transition: all 0.15s;
}
.modal__x:hover { background: var(--glass-2); color: var(--starlight); }
.modal__intro { font-size: 13px; color: var(--stardust); line-height: 1.5; margin: -6px 0 16px; }

/* Sections étiquetées dans les formulaires longs (profil, serveur) */
.form-section__label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--cyan); font-weight: 600;
  margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--line);
}
/* La 1re section suit directement l'en-tête : pas de double séparateur. */
.form-section__label--first { border-top: 0; padding-top: 0; margin-top: 2px; }

/* ---------- Menu du serveur (dropdown structuré) ---------- */
.server-menu { padding: 0; }                 /* le padding est porté par les sections */
.server-menu__header {
  display: flex; align-items: center; gap: 11px; padding: 14px 14px 12px;
}
.server-menu__icon {
  width: 42px; height: 42px; border-radius: 13px; flex: none; overflow: hidden;
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
}
.server-menu__icon img { width: 100%; height: 100%; object-fit: cover; }
.server-menu__id { min-width: 0; }
.server-menu__name {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.server-menu__meta { font-size: 12px; color: var(--faint); margin-top: 2px; }
.server-menu__desc {
  font-size: 12.5px; color: var(--stardust); line-height: 1.45;
  padding: 0 14px 12px;
}

/* Sections génériques de menu (label + lignes) */
.menu-section { padding: 10px 10px 12px; border-top: 1px solid var(--line); }
.menu-section__label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--faint); font-weight: 600; margin: 2px 4px 8px;
}
.menu-section .invite { margin: 0 4px; }

/* Ligne de menu : icône + libellé (+ indice/badge) */
.menu-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--stardust);
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; transition: all 0.15s;
}
.menu-row:hover { background: var(--glass-2); color: var(--starlight); }
.menu-row__icon { width: 20px; text-align: center; flex: none; color: var(--violet); font-size: 15px; }
.menu-row__label { flex: 1; }
.menu-row__hint { font-size: 11px; color: var(--faint); }
.menu-row--danger { color: #fb7185; }
.menu-row--danger:hover { background: rgba(251,113,133,0.12); }
.menu-row--danger .menu-row__icon { color: #fb7185; }

/* ---------- Cadre de bannière (réglages serveur) ---------- */
.banner-drop {
  position: relative; width: 100%; height: 0; padding-bottom: 32%;
  border-radius: var(--radius-sm); overflow: hidden;
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
}
.banner-drop.empty {
  border-style: dashed;
  background-color: rgba(255,255,255,0.025);
  background-image:
    radial-gradient(circle at 30% 40%, rgba(139,92,246,0.10), transparent 60%),
    radial-gradient(circle at 75% 70%, rgba(34,211,238,0.08), transparent 55%);
}
.banner-drop__hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; padding: 0 18px; gap: 4px;
  font-size: 12px; color: var(--faint); line-height: 1.45;
}
.banner-drop:not(.empty) .banner-drop__hint { display: none; }
.banner-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* Zone avatar/icône + actions en haut des fenêtres profil/serveur */
.profile__top { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.profile__pic-actions { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.profile__pic-actions .muted { margin-top: 2px; }

/* =========================================================================
   MODALES — structure complète : en-tête / corps / pied bien séparés
   ========================================================================= */
/* L'en-tête se distingue par un filet de séparation. */
.modal__head { border-bottom: 1px solid var(--line); padding-bottom: 14px; }

/* Le pied d'actions (direct enfant de la boîte) est séparé du corps. */
.modal__box > .modal__actions,
.modal__box > .modal__actions--split {
  border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px;
}

/* Défilement soigné dans les fenêtres longues. */
.modal__box.profile { scrollbar-width: thin; scrollbar-color: var(--glass-2) transparent; }
.modal__box.profile::-webkit-scrollbar { width: 10px; }
.modal__box.profile::-webkit-scrollbar-track { background: transparent; }
.modal__box.profile::-webkit-scrollbar-thumb {
  background: var(--glass-2); border-radius: 999px; border: 3px solid transparent;
  background-clip: content-box;
}
.modal__box.profile::-webkit-scrollbar-thumb:hover { background: var(--line); background-clip: content-box; }

/* Petite respiration entre les champs et les blocs de boutons d'image. */
.modal__box .profile__pic-actions .muted { margin-top: 2px; }

/* Marqueur de version sur l'écran de connexion (pour vérifier le déploiement) */
.auth__build {
  margin-top: 14px; font-size: 11px; color: var(--faint);
  letter-spacing: 0.3px; text-align: center;
}

/* Petit marqueur de version sur l'écran de connexion. */
.auth__build {
  text-align: center; margin-top: 16px; font-size: 11px;
  color: var(--faint); letter-spacing: 1px; text-transform: uppercase;
}

/* =========================================================================
   DÉCONNEXION, MENU DE COMPTE, ANIMATIONS FLUIDES (UI/UX façon Discord)
   ========================================================================= */

/* Bandeau "reconnexion en cours" en haut de l'app */
.conn-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  color: #fff; text-align: center; font-size: 13px; font-weight: 600;
  padding: 8px 14px; box-shadow: 0 4px 16px -4px rgba(0,0,0,0.5);
  animation: connIn 0.25s ease;
}
@keyframes connIn { from { transform: translateY(-100%); } to { transform: none; } }

/* Message d'information sur l'écran de connexion (ex. "serveur perdu") */
.auth__notice {
  background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.4);
  color: #fbbf24; border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; margin-bottom: 16px; line-height: 1.4;
}

/* Menu de compte (popover ancré en bas à gauche, près de l'avatar) */
.account-menu {
  position: fixed; left: 74px; bottom: 14px; z-index: 950;
  width: 230px; padding: 8px; border-radius: 14px;
  box-shadow: 0 18px 50px -10px rgba(0,0,0,0.65);
  animation: modalIn 0.18s cubic-bezier(0.16,1,0.3,1);
}

/* --- Animations fluides des fenêtres (rejouées à chaque ouverture) --- */
.modal { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal--opening { animation: backdropIn 0.2s ease; }
.modal--opening .modal__box { animation: modalIn 0.28s cubic-bezier(0.16,1,0.3,1); }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* --- Confort mobile : les fenêtres prennent la largeur de l'écran --- */
@media (max-width: 640px) {
  .modal__box { width: 94vw; max-width: 94vw; padding: 20px; }
  .modal__box.profile { max-height: 90vh; }
  .account-menu { left: 12px; right: 12px; width: auto; }
}

/* =========================================================================
   PANNEAU DE RÉGLAGES PLEIN ÉCRAN (façon Discord, thème galaxie)
   ========================================================================= */
.settings {
  position: fixed; inset: 0; z-index: 1000; display: flex;
  background:
    radial-gradient(1200px 800px at 12% -10%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(1000px 700px at 100% 110%, rgba(45,122,79,0.1), transparent 55%),
    var(--void);
  animation: settingsIn 0.22s ease;
}
@keyframes settingsIn { from { opacity: 0; transform: scale(0.99); } to { opacity: 1; transform: none; } }

/* --- Barre latérale --- */
.settings__nav {
  width: 260px; flex-shrink: 0; height: 100%; overflow-y: auto;
  background: rgba(11,11,24,0.72); border-right: 1px solid var(--line);
  padding: 28px 14px 28px 22px; backdrop-filter: blur(8px);
}
.settings__brand { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; }
.settings__icon {
  width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; color: #fff;
  background: var(--violet); overflow: hidden;
}
.settings__icon img { width: 100%; height: 100%; object-fit: cover; }
.settings__sname { font-weight: 700; color: var(--starlight); font-size: 15px; line-height: 1.2; }
.settings__smeta { font-size: 12px; color: var(--faint); }
.settings__sdesc { font-size: 12px; color: var(--stardust); margin: 4px 0 8px; line-height: 1.4; }
.settings__tabs { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.settings__group {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); margin: 16px 0 6px 8px;
}
.settings__tab {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: 9px; border: 0; cursor: pointer;
  background: transparent; color: var(--stardust); font: inherit; font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.settings__tab:hover { background: var(--glass); color: var(--starlight); }
.settings__tab--active {
  background: linear-gradient(90deg, rgba(78,158,116,0.28), rgba(139,188,74,0.18));
  color: var(--starlight);
}
.settings__tabicon { width: 18px; text-align: center; opacity: 0.9; }

/* --- Zone de contenu --- */
.settings__content { flex: 1; height: 100%; overflow-y: auto; padding: 56px 56px 80px; position: relative; }
.settings__pane { max-width: 760px; }
.settings__h2 {
  font-family: var(--font-display); font-size: 22px; color: var(--starlight);
  margin: 0 0 22px; font-weight: 700;
}
.settings__save {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
}
.settings__save .error { margin: 0; margin-right: auto; }

/* Bouton fermer (✕ + ÉCHAP) en haut à droite, comme Discord */
.settings__close {
  position: absolute; top: 30px; right: 40px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: transparent; border: 0; cursor: pointer; color: var(--stardust);
  transition: color 0.15s;
}
.settings__close:hover { color: var(--starlight); }
.settings__closeic {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--faint);
  display: grid; place-items: center; font-size: 17px; transition: border-color 0.15s, background 0.15s;
}
.settings__close:hover .settings__closeic { border-color: var(--starlight); background: var(--glass); }
.settings__esc { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }

/* --- Liste des salons & catégories (onglet Salons) --- */
.pane-actions { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.chan-list { display: flex; flex-direction: column; gap: 18px; }
.chan-group { display: flex; flex-direction: column; gap: 5px; }
.chan-group__title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); padding: 0 4px 4px;
}
.chan-group__title--cat {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.chan-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 10px; background: var(--glass);
  border: 1px solid transparent; transition: border-color 0.15s, background 0.15s;
}
.chan-row:hover { background: var(--glass-2); border-color: var(--line); }
.chan-row__name { color: var(--starlight); font-size: 14px; }

/* --- Éditeurs inline (salon / catégorie) --- */
.chan-editor {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
  animation: fade .18s ease;
}
/* ── Nouveau design modal ── */
.ce-modal {
  width: 520px; max-width: 96vw; max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--surface2); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: rise .28s cubic-bezier(.16,1,.3,1);
}
.ce-modal__header {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 20px 0; flex-shrink: 0;
}
.ce-modal__icon { font-size: 28px; line-height: 1; }
.ce-modal__title {
  font-family: var(--font-display); font-weight: 700;
  color: var(--starlight); font-size: 17px; line-height: 1.2;
}
.ce-modal__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ce-modal__close {
  margin-left: auto; background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.ce-modal__close:hover { background: var(--glass-2); color: var(--starlight); }
.ce-modal__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-top: 1px solid var(--line); flex-shrink: 0;
  background: rgba(0,0,0,.15);
}
/* Tabs */
.ce-tabs {
  display: flex; gap: 2px; padding: 14px 20px 0; flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.ce-tab {
  padding: 8px 16px; border-radius: 8px 8px 0 0; border: none;
  background: none; color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: color .15s, background .15s;
  margin-bottom: -1px; border-bottom: 2px solid transparent;
}
.ce-tab:hover { color: var(--starlight); background: var(--glass-1); }
.ce-tab--active { color: var(--starlight); border-bottom-color: var(--accent); }
.ce-tab--security { color: rgba(34,197,94,.8); }
.ce-tab--security.ce-tab--active { border-bottom-color: #22c55e; }
/* Tab content */
.ce-tab-content { padding: 18px 20px; overflow-y: auto; flex: 1; }
/* Fields */
.ce-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ce-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ce-label-hint { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .7; }

.ce-field input, .ce-field select, .ce-field textarea,
.ce-modal .input, .ce-modal select {
  width: 100%; box-sizing: border-box;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--starlight);
  font-family: var(--font-body); font-size: 14px;
  transition: border-color .18s, box-shadow .18s;
}
.ce-field input::placeholder, .ce-modal .input::placeholder { color: var(--faint); }
.ce-field input:focus, .ce-field select:focus, .ce-field textarea:focus,
.ce-modal .input:focus, .ce-modal select:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.ce-field select, .ce-modal select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.ce-modal select option { background: var(--surface2); color: var(--starlight); }
/* Toggle switches */
.ce-toggles { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.ce-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 10px; background: var(--glass-1);
  border: 1px solid transparent; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ce-toggle-row:hover { background: var(--glass-2); border-color: var(--line); }
.ce-toggle-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ce-toggle-title { font-size: 13px; font-weight: 600; color: var(--starlight); }
.ce-toggle-desc { font-size: 11px; color: var(--muted); }
/* Switch toggle */
.ce-switch-wrap { flex-shrink: 0; }
.ce-switch-input { display: none; }
.ce-switch {
  display: block; width: 44px; height: 24px; border-radius: 12px;
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.15);
  cursor: pointer; transition: background .2s, border-color .2s;
  position: relative;
}
.ce-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,.55);
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), background .2s;
}
.ce-switch-input:checked + .ce-switch {
  background: var(--accent); border-color: var(--accent);
}
.ce-switch-input:checked + .ce-switch::after {
  transform: translateX(20px); background: white;
}
/* Color picker */
.ce-color-pick {
  width: 44px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line); cursor: pointer; background: none; padding: 2px;
}
.ce-preview-hint { font-size: 11px; color: var(--muted); margin-top: 8px; font-style: italic; }
/* Security tab */
.ce-security-block {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.ce-security-block__head {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px;
  background: rgba(34,197,94,.05); border-bottom: 1px solid var(--line);
}
.ce-security-icon { font-size: 24px; flex-shrink: 0; }
.ce-security-title { font-weight: 700; font-size: 14px; color: var(--starlight); }
.ce-security-desc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ce-e2e-status-badge {
  margin-left: auto; flex-shrink: 0; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--glass-2); color: var(--muted);
}
.ce-e2e-status-badge--active {
  background: rgba(34,197,94,.15); color: #22c55e;
  border: 1px solid rgba(34,197,94,.3);
}
.ce-security-block__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ce-e2e-features {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.ce-e2e-features span {
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: rgba(34,197,94,.08); color: rgba(34,197,94,.9);
  border: 1px solid rgba(34,197,94,.15);
}
.ce-security-note { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* Avertissement clé manquante dans le canal */
.e2e-no-key-warn {
  margin: 12px 16px; padding: 12px 16px;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
  border-radius: 10px; font-size: 13px; color: #fbbf24; line-height: 1.5;
}

/* Legacy */
.chan-editor.chan-editor--inline {
  position: static; inset: auto; background: none; backdrop-filter: none;
  display: block;
}
.chan-editor.chan-editor--inline > * { width: 100%; box-shadow: none; border-radius: var(--radius); }
.chan-editor__head {
  font-family: var(--font-display); font-weight: 700; color: var(--starlight);
  font-size: 16px; margin-bottom: 14px;
}

/* --- Confort mobile : la barre latérale passe au-dessus --- */
@media (max-width: 720px) {
  .settings { flex-direction: column; }
  .settings__nav {
    width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--line);
    padding: 18px; display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center;
  }
  .settings__brand { width: 100%; }
  .settings__tabs { flex-direction: row; flex-wrap: wrap; margin-top: 8px; }
  .settings__group { display: none; }
  .settings__content { padding: 28px 20px 60px; }
  .settings__close { top: 16px; right: 16px; }
}

/* ---------- Recadrage d'avatar ---------- */
.crop-stage {
  position: relative; width: 260px; height: 260px; margin: 6px auto 16px;
  border-radius: 14px; overflow: hidden; background: var(--void);
  cursor: grab; touch-action: none; user-select: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.crop-stage:active { cursor: grabbing; }
.crop-img { position: absolute; left: 0; top: 0; pointer-events: none; max-width: none; }
/* Anneau qui montre la zone circulaire de l'avatar */
.crop-ring {
  position: absolute; inset: 0; pointer-events: none; border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(6,6,15,0.55);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 49.5%, #000 50%);
          mask: radial-gradient(circle at 50% 50%, transparent 49.5%, #000 50%);
}
.crop-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}
#crop-zoom { width: 100%; accent-color: var(--violet); }

/* ---------- Profil : aperçu + fond transparent ---------- */
.me-preview { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
/* Damier "transparent" pour les pastilles et avatars sans fond */
.swatch--transparent, .avatar--checker {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #bcbcd0 25%, transparent 25%, transparent 75%, #bcbcd0 75%),
    linear-gradient(45deg, #bcbcd0 25%, transparent 25%, transparent 75%, #bcbcd0 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}
.avatar--checker { background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.emoji-pick--active { outline: 2px solid var(--violet); outline-offset: 1px; }

/* ---------- Messages épinglés & panels header ---------- */
.chat__pin { margin-left: auto; }

/* Panels dropdown (épingles, événements) */
.ch-panel {
  position: absolute; top: calc(100% + 8px); right: 12px; z-index: 40;
  width: 340px; max-height: 64vh;
  display: flex; flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.8);
  overflow: hidden;
  animation: chPanelIn 0.18s cubic-bezier(0.16,1,0.3,1);
}
@keyframes chPanelIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.ch-panel__head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--stardust);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025);
}
.ch-panel__head svg { stroke: var(--violet); flex-shrink: 0; }
.ch-panel__create-btn {
  margin-left: auto; padding: 3px 10px; border-radius: 6px;
  background: rgba(139,92,246,0.18); color: var(--violet);
  border: 1px solid rgba(139,92,246,0.28);
  font-size: 11px; font-weight: 700; cursor: pointer;
  transition: background 0.15s; font-family: var(--font-body);
  text-transform: none; letter-spacing: 0;
}
.ch-panel__create-btn:hover { background: rgba(139,92,246,0.32); }
.ch-panel__body { overflow-y: auto; flex: 1; }
.ch-panel__form { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.06); }

.pinned-list { overflow-y: auto; padding: 6px; }
.pinned-empty { padding: 22px 16px; text-align: center; color: var(--faint); font-size: 13px; }
.pinned-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-radius: 10px; padding: 10px 12px;
  transition: background 0.12s;
}
.pinned-item:hover { background: var(--glass-2); }
.pinned-item__author { font-weight: 700; font-size: 13px; }
.pinned-item__text {
  color: var(--stardust); font-size: 13px; margin: 2px 0;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pinned-item__time { color: var(--faint); font-size: 11px; }

/* Surbrillance quand on saute vers un message épinglé */
.msg--flash { animation: msgFlash 1.5s ease; }
@keyframes msgFlash {
  0%, 30% { background: rgba(139,92,246,0.22); }
  100% { background: transparent; }
}

/* Le recadreur doit passer AU-DESSUS des panneaux plein écran (z-index 1000) */
#cropper { z-index: 1300; }

/* Bouton engrenage des réglages serveur (plus gros et visible) */
.server-gear {
  font-size: 20px; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; background: var(--glass-2);
  border: 1px solid var(--line); color: var(--stardust);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.server-gear:hover { background: rgba(255,255,255,0.1); color: var(--starlight); transform: rotate(35deg); }

/* ---------- Markdown dans les messages ---------- */

/* ---------- Markdown dans les messages ---------- */
.msg__text a { color: var(--cyan); text-decoration: none; }
.msg__text a:hover { text-decoration: underline; }
.msg__text strong { font-weight: 700; color: var(--starlight); }
.msg__text em { font-style: italic; }
.msg__text del { opacity: 0.7; }
.md-code {
  background: rgba(0,0,0,0.35); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
}
.md-pre {
  background: rgba(0,0,0,0.4); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin: 6px 0; overflow-x: auto;
}
.md-pre code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em;
  color: #d8d4ff; white-space: pre-wrap; word-break: break-word;
}

/* =========================================================================
   RÉPONSES, PIÈCES JOINTES, STICKERS, MENTIONS
   ========================================================================= */
/* Barre "réponse à" au-dessus de la saisie */
.reply-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--glass); border-left: 2px solid var(--violet);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; color: var(--stardust);
}
.reply-bar b { color: var(--starlight); }
.reply-bar__x { background: transparent; border: 0; color: var(--faint); cursor: pointer; font-size: 14px; }
.reply-bar__x:hover { color: var(--starlight); }

/* Pièces jointes en attente */
.attach-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-chip {
  position: relative; display: flex; align-items: center; gap: 6px;
  background: var(--glass-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 5px 8px; max-width: 200px;
}
.attach-chip img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; transition: filter 0.2s; display: block; }
.attach-chip__img--spoiler { filter: blur(10px); }

/* Chip image : overlay spoiler centré */
.attach-chip--img {
  position: relative; padding: 4px;
  width: 64px; height: 64px; flex: none;
}
.attach-chip--img img { width: 56px; height: 56px; }
.attach-chip__spoiler {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
  font-size: 22px; border-radius: 8px;
  transition: background 0.15s;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  opacity: 0.55;
}
.attach-chip__spoiler:hover { background: rgba(0,0,0,0.35); opacity: 1; }
.attach-chip__spoiler.active {
  opacity: 1;
  background: rgba(139,92,246,0.45);
  box-shadow: inset 0 0 0 2px var(--violet);
  border-radius: 8px;
}
.attach-chip__name { font-size: 12px; color: var(--stardust); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip__x { background: rgba(0,0,0,0.4); border: 0; color: #fff; cursor: pointer; border-radius: 6px; padding: 2px 6px; }

/* Citation affichée au-dessus d'un message */
.msg__reply {
  display: flex; gap: 8px; align-items: baseline; max-width: 70%;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  padding: 0 0 2px; margin-bottom: 2px; opacity: 0.85;
}
.msg__reply::before {
  content: ""; width: 18px; height: 9px; flex: none;
  border-left: 2px solid var(--faint); border-top: 2px solid var(--faint);
  border-top-left-radius: 6px; margin-top: 6px;
}
.msg__reply-author { font-weight: 700; font-size: 12.5px; }
.msg__reply-text { font-size: 12.5px; color: var(--stardust); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__reply:hover .msg__reply-text { color: var(--starlight); }

/* Pièces jointes dans un message */
.msg__atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.msg__image { max-width: 320px; max-height: 280px; border-radius: 12px; display: block; }
.msg__sticker { width: 140px; height: 140px; object-fit: contain; }
.msg__file {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--glass-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; color: var(--starlight); font-size: 13px;
}
.msg__file:hover { background: rgba(255,255,255,0.08); }

/* Mentions */
.mention {
  background: rgba(139,92,246,0.22); color: #cdbcff; border-radius: 5px;
  padding: 0 4px; font-weight: 600;
}
.mention--me   { background: rgba(251,191,36,0.22); color: #fbbf24; }
.mention--role { border: 1px solid; border-radius: 5px; padding: 0 3px; font-weight: 700; cursor: default; }
.msg--mentions-me { background: linear-gradient(90deg, rgba(251,191,36,0.08), transparent 70%); border-left: 2px solid rgba(251,191,36,0.5); }


/* Autocomplétion des mentions */
.mention-popover {
  position: fixed; z-index: 9000; width: 260px;
  padding: 6px; border-radius: 12px; box-shadow: 0 20px 60px -10px rgba(0,0,0,0.85);
  animation: modalIn 0.12s ease;
}
.mention-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: transparent; border: 0; cursor: pointer; padding: 8px 10px; border-radius: 8px;
}
.mention-opt:hover { background: var(--glass-2); }
.mention-opt__name { color: var(--starlight); font-weight: 600; font-size: 13px; }
.mention-opt__user { color: var(--faint); font-size: 12px; }

/* Grille de gestion des stickers (Mon profil) */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; margin-top: 16px; }
.sticker-cell { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.sticker-cell img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.sticker-cell__x {
  position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.55); border: 0; color: #fff;
  cursor: pointer; border-radius: 6px; width: 22px; height: 22px; font-size: 12px;
}
.sticker-cell__x:hover { background: rgba(251,113,133,0.8); }

/* =========================================================================
   MARKDOWN ENRICHI — titres, listes, spoilers, code, vidéo
   ========================================================================= */
.msg__text h1.md-h1 { font-size: 1.4em; font-weight: 700; margin: 6px 0 2px; color: var(--starlight); font-family: var(--font-display); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.msg__text h2.md-h2 { font-size: 1.2em; font-weight: 700; margin: 5px 0 2px; color: var(--starlight); font-family: var(--font-display); }
.msg__text h3.md-h3 { font-size: 1.05em; font-weight: 600; margin: 4px 0 2px; color: var(--starlight); }
.msg__text ul.md-list, .msg__text ol.md-list { padding-left: 20px; margin: 4px 0; }
.msg__text ul.md-list { list-style: disc; }
.msg__text ol.md-list { list-style: decimal; }
.msg__text li { margin: 1px 0; line-height: 1.5; }
.msg__text .md-checklist { list-style: none; padding-left: 2px; }
.msg__text .md-check { display: flex; align-items: flex-start; gap: 6px; }
.msg__text .md-check input[type=checkbox] { margin-top: 3px; accent-color: var(--violet); flex: none; }
.msg__text .md-check--done { opacity: 0.65; text-decoration: line-through; }
.md-lang {
  display: block; font-size: 11px; color: var(--faint); font-family: ui-monospace, "SF Mono", monospace;
  padding: 4px 12px 0; text-transform: lowercase;
}

/* Spoiler texte */
.md-spoiler {
  background: var(--cosmos); border-radius: 4px; padding: 0 4px;
  filter: blur(5px); cursor: pointer; user-select: none;
  transition: filter 0.25s;
}
.md-spoiler.open { filter: none; cursor: default; }

/* Spoiler image */
.msg__spoiler-img {
  filter: blur(28px); cursor: pointer;
  transition: filter 0.3s; border-radius: 12px;
}
.msg__spoiler-img.open { filter: none; cursor: default; }

/* Barre de formatage texte */
.format-toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 2px 2px;
}
.fmt-sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }
.fmt-btn {
  background: transparent; border: 0; color: var(--stardust);
  width: 28px; height: 26px; border-radius: 6px;
  cursor: pointer; display: grid; place-items: center;
  font-size: 13px; font-family: var(--font-body);
  transition: background 0.1s, color 0.1s;
}
.fmt-btn b, .fmt-btn em, .fmt-btn s, .fmt-btn code { font-size: 12px; pointer-events: none; }
.fmt-btn:hover { background: var(--glass-2); color: var(--starlight); }

/* Chip d'attachement — toggle spoiler */
.attach-chip__spoiler {
  background: transparent; border: 0; font-size: 13px;
  cursor: pointer; opacity: 0.5; padding: 2px; border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
}
.attach-chip__spoiler:hover { opacity: 1; background: var(--glass-2); }
.attach-chip__spoiler.active { opacity: 1; color: var(--violet); }

/* Embed vidéo YouTube */
.yt-link {
  display: block; font-size: 13px; color: var(--cyan);
  margin-bottom: 6px; word-break: break-all;
}
.yt-link:hover { text-decoration: underline; }
.md-video-wrap {
  width: 100%; max-width: 480px;
  border-radius: 12px; overflow: hidden;
  margin: 0 0 4px;
  background: #000;
}
.md-video-wrap iframe {
  display: block; width: 100%; height: 270px;
  border: 0; aspect-ratio: 16/9;
}

/* =========================================================================
   GIF GRID (dans le picker panel)
   ========================================================================= */
.gif-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  align-content: start;
}
.gif-cell {
  cursor: pointer; border-radius: 8px; overflow: hidden;
  background: var(--glass-2); transition: opacity 0.15s;
}
.gif-cell:hover { opacity: 0.8; }
.gif-cell img { width: 100%; height: 80px; object-fit: cover; display: block; }
.gif-empty { grid-column: 1/-1; text-align: center; color: var(--faint); font-size: 13px; padding: 20px; }

/* =========================================================================
   MODALE LARGE (événements manqués)
   ========================================================================= */
/* =========================================================================
   EFFETS DE NOM — couleurs hardcodées dans les keyframes (max compat)
   Gradient appliqué via JS inline style (pas de CSS vars dans background)
   ========================================================================= */
@keyframes glitch {
  0%,100%{ text-shadow:none; transform:none; }
  10%{ text-shadow:4px 0 #ff00ff,-4px 0 #00ffff; transform:skewX(-5deg); }
  20%{ text-shadow:-3px 0 #ff00ff,3px 0 #00ffff; transform:skewX(4deg) scaleX(1.02); }
  30%{ text-shadow:2px 0 #ff00ff,-1px 0 #00ffff; transform:none; }
  50%{ text-shadow:none; transform:scaleX(1.01) skewX(-1deg); }
  70%{ text-shadow:3px 0 #ff00ff; transform:none; }
}
@keyframes rainbow {
  0%   { color: #f472b6; }
  14%  { color: #c084fc; }
  28%  { color: #818cf8; }
  42%  { color: #38bdf8; }
  57%  { color: #34d399; }
  71%  { color: #facc15; }
  85%  { color: #fb923c; }
  100% { color: #f472b6; }
}
/* --fx-speed : seule propriété CSS-var utilisée dans les animations (bien supportée) */
.name-fx { --fx-speed: 3s; }
.name-fx--neon {
  text-shadow: 0 0 5px currentColor, 0 0 12px currentColor, 0 0 28px currentColor, 0 0 60px currentColor;
}
.name-fx--glow { text-shadow: none; /* override via JS */ }
.name-fx--glitch {
  display: inline-block;
  animation: glitch var(--fx-speed) infinite;
}
.name-fx--rainbow {
  animation: rainbow var(--fx-speed) linear infinite;
}
.name-fx--gradient {
  display: inline-block;
  /* background gradient appliqué via JS inline style */
}

/* =========================================================================
   COLOR SWATCHES & EFFECT CARDS (éditeur de profil)
   ========================================================================= */
.nc-swatches {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center;
}
.nc-swatch {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  flex: none; display: grid; place-items: center;
}
.nc-swatch:hover { transform: scale(1.2); border-color: rgba(255,255,255,0.5); }
.nc-swatch.nc-active { border-color: white; box-shadow: 0 0 0 2px rgba(255,255,255,0.25); transform: scale(1.1); }
.nc-swatch--none { background: rgba(255,255,255,0.06); color: var(--stardust); font-size: 13px; }
.nc-swatch--custom {
  background: conic-gradient(#f472b6,#a78bfa,#60a5fa,#34d399,#fbbf24,#f472b6);
  position: relative; cursor: pointer;
}
.nc-swatch--custom input[type=color] {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0;
}
.nc-hex-row {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
}
.nc-hex {
  font-family: monospace; font-size: 12px; color: var(--stardust);
  background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 10px; cursor: default;
}

/* Grille d'effet cards */
.fx-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px;
}
.fx-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px 10px; border-radius: 12px;
  background: var(--glass); border: 1.5px solid var(--line);
  cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative; overflow: hidden;
}
.fx-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,92,246,0.18), transparent 70%);
  opacity: 0; transition: opacity 0.2s;
}
.fx-card:hover { border-color: rgba(139,92,246,0.5); }
.fx-card:hover::before { opacity: 1; }
.fx-card.active { border-color: var(--violet); background: rgba(139,92,246,0.12); box-shadow: 0 0 18px -4px rgba(139,92,246,0.45); }
.fx-card.active::before { opacity: 1; }
.fx-card__preview {
  font-size: 22px; font-weight: 800; font-family: var(--font-display);
  line-height: 1; min-height: 28px; display: flex; align-items: center;
  color: var(--starlight); position: relative;
}
.fx-card__label { font-size: 11px; color: var(--stardust); font-weight: 500; position: relative; letter-spacing: 0.5px; }

/* Contextual effect options panel */
.pe-fx-opts {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: rgba(0,0,0,0.2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
  animation: fadeIn 0.15s;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.pe-fx-opt-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--stardust); }
.pe-fx-opt-row > span:first-child { min-width: 72px; font-size: 12px; color: var(--faint); }
.pe-speed-btns { display: flex; gap: 6px; }
.pe-speed-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 12px; font-family: var(--font-body);
  background: var(--glass); border: 1px solid var(--line); color: var(--stardust);
  cursor: pointer; transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.pe-speed-btn:hover { border-color: var(--violet); color: var(--starlight); }
.pe-speed-btn.active { border-color: var(--violet); color: var(--violet); background: rgba(139,92,246,0.15); }
.pe-fx-color-dot {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line);
  cursor: pointer; flex: none; position: relative; overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.pe-fx-color-dot:hover { border-color: rgba(255,255,255,0.5); transform: scale(1.15); }
.pe-fx-color-dot input[type=color] {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0;
}

/* Bannière couleur indépendante */
.pe-banner-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
}
.pe-banner-pickers { display: flex; align-items: center; gap: 8px; }
.pe-banner-arrow { font-size: 14px; color: var(--faint); }

/* Grille de polices */
.pe-font-grid {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.pe-font-btn {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--glass); color: var(--stardust); font-size: 13px;
  cursor: pointer; transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.pe-font-btn:hover { border-color: var(--violet); color: var(--starlight); }
.pe-font-btn.active { border-color: var(--violet); color: var(--violet); background: rgba(139,92,246,0.15); }

/* Preview card redesign */
.pe-preview-card {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  background: var(--glass);
}
.pe-preview-banner {
  width: 100%; height: 70px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  transition: background 0.3s;
}
.pe-preview-body {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 0 14px 8px;
}
.pe-preview-avatar {
  width: 54px !important; height: 54px !important; font-size: 22px !important;
  border: 3px solid var(--cosmos); border-radius: 50%;
  margin-top: -28px; flex: none;
}
.pe-preview-info { flex: 1; min-width: 0; padding-top: 4px; }
.pe-preview-name {
  font-weight: 700; font-size: 15px; line-height: 1.2;
  white-space: nowrap; display: inline-block; max-width: 100%;
  /* pas d'overflow:hidden — couperait glitch/neon */
}
.pe-preview-pronouns { font-size: 11px; color: var(--stardust); margin-top: 2px; }
.pe-preview-bio {
  padding: 8px 14px 14px; font-size: 12px; color: var(--stardust); line-height: 1.5;
  min-height: 18px; word-break: break-word; border-top: 1px solid var(--line); margin-top: 4px;
}
.pe-preview-msg {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
}
.pe-preview-msg .avatar--sm { flex: none; }

/* =========================================================================
   SCROLLBAR — gradient violet/magenta, aucun fond
   ========================================================================= */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--violet, #8b5cf6), var(--magenta, #ec4899));
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #a78bfa, #f9a8d4);
}
/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--violet, #8b5cf6) transparent; }

/* =========================================================================
   EXPLORER LES SERVEURS (modal)
   ========================================================================= */
.explore-search {
  width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; color: var(--starlight);
  font-family: var(--font-body); font-size: 14px; margin-bottom: 14px; display: block;
}
.explore-search:focus { outline: none; border-color: var(--violet); }
.explore-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  max-height: 380px; overflow-y: auto;
}
.explore-grid .server-card { min-width: 0; }
.explore-empty { color: var(--faint); text-align: center; padding: 30px 0; font-size: 14px; }

.modal__box--wide { max-width: 560px; }
.missed-list {
  max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  margin: 12px 0;
}
.missed-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.missed-item__badge {
  flex: none; font-size: 16px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(139,92,246,0.15);
}
.missed-item__body { flex: 1; min-width: 0; }
.missed-item__meta { font-size: 11.5px; color: var(--faint); margin-bottom: 2px; }
.missed-item__author { font-weight: 600; }
.missed-item__text {
  font-size: 13.5px; color: var(--stardust);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-clamp: 2;
}
.modal__intro strong { color: var(--starlight); }

/* ═══════════════════════════════════════════════════════════════
   RÔLES & BADGES
   ═══════════════════════════════════════════════════════════════ */

/* Petite pastille colorée (chat, sidebar, user card) */
.role-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 99px;
  border: 1px solid;
  line-height: 18px;
  vertical-align: middle;
  white-space: nowrap;
  margin-left: 5px;
  letter-spacing: 0.02em;
}

/* Badge fondateur (toujours violet/doré) */
.role-badge--founder {
  background: rgba(139,92,246,0.18);
  color: #c4b5fd;
  border-color: rgba(139,92,246,0.4);
}

/* Badges sur la user card */
.uc__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 0 4px;
}
.uc__roles .role-badge {
  font-size: 11.5px;
  padding: 2px 10px;
  line-height: 20px;
  margin-left: 0;
}

/* Pane Rôles dans les settings */
.roles-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }

.role-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}
.role-item__dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex: none;
  border: 2px solid rgba(255,255,255,0.15);
}
.role-item__name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--starlight);
}
.role-item__badge { margin-left: 0; }
.role-item__actions { display: flex; gap: 6px; margin-left: auto; }

.roles-create { border-top: 1px solid var(--line); padding-top: 20px; }
.settings__h3 { font-size: 13px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }

.roles-form { display: flex; flex-direction: column; gap: 12px; }

.role-badge-preview {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 12px;
  border-radius: 99px;
  border: 1px solid;
  margin-left: 8px;
}

/* Rôles dans la liste membres (sidebar) */
.member__name .role-badge { font-size: 9.5px; padding: 0 5px; line-height: 15px; }

/* Attribution de rôle sur la user card */
.uc__role-assign {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.uc__role-assign-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.uc__role-assign-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.uc__role-toggle {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid;
  cursor: pointer;
  background: transparent;
  line-height: 18px;
  transition: opacity 0.15s;
}
.uc__role-toggle:hover { opacity: 0.75; }
.uc__role-toggle--active { filter: brightness(1.2); }
.uc__role-toggle--inactive { opacity: 0.45; }

/* ═══ ÉDITEUR DE RÔLES (style Discord) ═══ */

.settings__pane--roles { padding: 0 !important; overflow: hidden; }
.roles-layout { display: flex; height: 100%; gap: 0; }

/* Sidebar gauche liste des rôles */
.roles-sidebar {
  width: 210px;
  flex: none;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.roles-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
  flex: none;
}
.roles-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
}
.roles-hint {
  font-size: 10.5px;
  padding: 8px 12px;
  flex: none;
  line-height: 1.4;
}
.roles-sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--stardust);
  transition: background 0.12s;
  user-select: none;
}
.roles-sb-item:hover { background: var(--glass); }
.roles-sb-item--active { background: rgba(139,92,246,0.18); color: var(--starlight); }
.roles-sb-item__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex: none;
}
.roles-sb-item__pos {
  margin-left: auto;
  font-size: 10px;
  color: var(--faint);
  font-weight: 600;
}

/* Panneau droite éditeur */
.role-editor {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
  min-width: 0;
}
.role-editor__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.re-name-input {
  flex: 1;
  min-width: 120px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--starlight);
}
.re-name-input:focus { outline: none; border-color: var(--violet); }
.re-pos-input {
  width: 60px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--stardust);
  text-align: center;
}
.re-pos-input:focus { outline: none; border-color: var(--violet); }

/* Permissions */
.re-perms { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.re-perm-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--faint);
  padding: 14px 0 6px;
}
.re-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.re-perm-row:hover { background: var(--glass); border-color: var(--line); }
.re-perm-info { flex: 1; min-width: 0; }
.re-perm-name { display: block; font-size: 14px; font-weight: 600; color: var(--starlight); }
.re-perm-desc { display: block; font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.re-perm-toggle {
  flex: none;
  width: 36px; height: 20px;
  appearance: none;
  background: var(--line);
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.re-perm-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.re-perm-toggle:checked { background: var(--violet); }
.re-perm-toggle:checked::after { transform: translateX(16px); }

.re-actions { display: flex; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }

/* Empty state éditeur */
.role-editor-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--faint);
  font-size: 14px;
  text-align: center;
  padding: 32px;
}
.role-editor-empty__icon { font-size: 40px; opacity: 0.5; }

/* ═══ RAIL DM BUTTON ═══ */
.rail__dm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 16px;
  background: rgba(139,92,246,0.2);
  border: 1.5px solid rgba(139,92,246,0.5);
  font-size: 22px;
  cursor: pointer;
  position: relative;
  margin: 4px auto;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, border-radius 0.15s;
}
.rail__dm:hover { background: rgba(139,92,246,0.4); border-color: var(--violet); border-radius: 12px; }
.rail__dm--active { background: rgba(139,92,246,0.5); border-color: var(--violet); border-radius: 12px; }
.rail-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: #ef4444;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ═══ DM SIDEBAR ═══ */
.dm-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px 4px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.dm-tab {
  flex: 1;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.dm-tab:hover { background: var(--glass); color: var(--stardust); }
.dm-tab--active { background: rgba(139,92,246,0.2); color: var(--violet); }
.dm-panel { display: flex; flex-direction: column; flex: 1; overflow-y: auto; padding: 8px 0; }
.dm-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
  padding: 10px 14px 4px;
}
.dm-add-friend {
  display: flex;
  gap: 6px;
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.dm-add-friend .input--sm { flex: 1; padding: 5px 9px; font-size: 12.5px; }

/* Entrée ami / DM */
.dm-friend-row, .dm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  margin: 0 4px;
}
.dm-friend-row:hover, .dm-row:hover { background: var(--glass); }
.dm-row--active { background: rgba(139,92,246,0.15); }
.dm-friend-row__avatar, .dm-row__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  position: relative;
}
.dm-friend-row__avatar .online-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--bg, #0d0d1a);
}
.dm-friend-row__info, .dm-row__info { flex: 1; min-width: 0; }
.dm-friend-row__name, .dm-row__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--starlight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-friend-row__sub, .dm-row__sub {
  font-size: 11px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.dm-row__unread {
  min-width: 18px; height: 18px;
  background: var(--violet);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.dm-friend-row__actions { display: flex; gap: 5px; }
.dm-friend-row__actions .btn { padding: 3px 8px; font-size: 11px; }
.dm-pending-badge {
  background: #f59e0b22;
  color: #f59e0b;
  border: 1px solid #f59e0b44;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
}

/* ═══ RÉACTIONS ═══ */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
  min-height: 0;
}
.msg-reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}
.msg-reaction:hover { background: rgba(139,92,246,0.25); }
.msg-reaction--me {
  background: rgba(139,92,246,0.3);
  border-color: rgba(139,92,246,0.7);
}
.msg-reaction__count { font-size: 12px; font-weight: 600; color: var(--stardust); }
.msg-react-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--faint);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  opacity: 0;
}
.message:hover .msg-react-btn,
.msg:hover .msg-react-btn { opacity: 1; }
.msg-react-btn:hover { background: var(--glass); border-color: var(--line); color: var(--starlight); }

/* React picker flottant */
.react-picker {
  position: fixed;
  z-index: 9999;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.react-picker__emojis {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 260px;
}
.react-picker__emojis button {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.1s;
}
.react-picker__emojis button:hover { background: var(--glass); }

/* ═══ BADGES ═══ */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  cursor: default;
}
.uc__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0 4px;
}

/* =========================================================================
   PANDA GALAXY — OVERRIDES BUILD 31
   Corrige toutes les couleurs hardcodées violet/magenta héritées.
   Ces règles ont la priorité sur les sections plus haut.
   ========================================================================= */

/* Rail DM button */
.rail__dm {
  background: rgba(255,255,255,0.07);
  border-color: rgba(61,143,104,0.42);
}
.rail__dm:hover { background: rgba(61,143,104,0.32); border-color: var(--violet); }
.rail__dm--active { background: rgba(61,143,104,0.42); border-color: var(--violet); }

/* Scrollbar — vert jade */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3d8f68, #245c42);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5eb88a, #3d9060);
}
* { scrollbar-color: #3d8f68 transparent; }

/* DM sidebar tabs */
.dm-tab--active { background: rgba(255,255,255,0.08); color: var(--violet); }
.dm-row--active { background: rgba(255,255,255,0.06); }

/* Réactions */
.msg-reaction {
  background: rgba(255,255,255,0.05);
  border-color: rgba(78,158,116,0.28);
}
.msg-reaction:hover { background: rgba(255,255,255,0.08); }
.msg-reaction--me {
  background: rgba(78,158,116,0.28);
  border-color: rgba(78,158,116,0.65);
}

/* Rôles sidebar active */
.roles-sb-item--active { background: rgba(255,255,255,0.07); }

/* Settings tab active */
.settings__tab--active {
  background: linear-gradient(90deg, rgba(78,158,116,0.28), rgba(139,188,74,0.18));
  color: var(--starlight);
}

/* Reconnection banner */
.conn-banner {
  background: linear-gradient(90deg, var(--violet), var(--lime));
  color: #090a0a;
}

/* Home chip */
.home__chip {
  background: rgba(255,255,255,0.07);
  color: var(--violet);
}

/* Server card hover — panda */
.server-card:hover {
  border-color: var(--violet);
  box-shadow: 0 8px 30px -8px rgba(61,143,104,0.38);
}

/* Message flash (pinned jump) */
@keyframes msgFlash {
  0%, 30% { background: rgba(255,255,255,0.08); }
  100% { background: transparent; }
}

/* Profile preview banner */
.pe-preview-banner {
  background: linear-gradient(135deg, #245c42, #3d8f68);
}

/* FX card active */
.fx-card::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.07), transparent 70%);
}
.fx-card:hover { border-color: rgba(61,143,104,0.45); }
.fx-card.active {
  border-color: var(--violet);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 18px -4px rgba(61,143,104,0.38);
}

/* Buttons speed/font active */
.pe-speed-btn.active { border-color: var(--violet); color: var(--violet); background: rgba(255,255,255,0.05); }
.pe-font-btn.active { border-color: var(--violet); color: var(--violet); background: rgba(255,255,255,0.05); }

/* Mentions */
.mention { background: rgba(255,255,255,0.08); color: #a5d6b8; }

/* Missed item badge */
.missed-item__badge { background: rgba(255,255,255,0.06); }

/* Settings icon */
.settings__icon { background: var(--violet); }

/* Banner drop empty gradients */
.banner-drop.empty {
  background-image:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(circle at 75% 70%, rgba(139,188,74,0.08), transparent 55%);
}

/* Drag & drop */
.drop-before { box-shadow: inset 0 2px 0 0 var(--violet); }
.drop-into {
  background: rgba(255,255,255,0.07) !important;
  box-shadow: inset 0 0 0 1px var(--violet);
}

/* Message epingle */
.msg--pinned {
  background: linear-gradient(90deg, rgba(196,154,36,0.07), transparent 70%);
  border-left: 2px solid rgba(196,154,36,0.5);
}

/* Emoji pick hover */
.emoji-pick:hover { border-color: var(--violet); background: rgba(255,255,255,0.06); }

/* Channels sidebar — style Discord */
.channels { border-radius: 0 !important; }

/* Channels top banner */
.server-banner { border-bottom: 1px solid rgba(255,255,255,0.05); }

/* Empty state orb */
.empty__orb { color: var(--violet); text-shadow: 0 0 30px rgba(61,143,104,0.55); }

/* Account menu position ajusté (rail 72px) */
.account-menu { left: 74px; }

/* Supprimer les border-radius flottants des panneaux principaux */
#server-sidebar.channels,
#dm-sidebar.channels {
  border-radius: 0 !important;
  border: 0;
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* Channel item active — vert panda */
.channel-item--active, [data-active="true"].channel-item {
  background: rgba(255,255,255,0.06) !important;
  color: var(--starlight) !important;
}

/* Home screen — plein écran dans #view-wrap */
#home-view { border-radius: 0; background: #111214; overflow-y: auto; flex: 1 1 0; }
.home { border-radius: 0; background: #111214; }

/* Members panel — dans view-wrap */
#members-panel { background: #0e0e0f; border-left: 1px solid rgba(255,255,255,0.05); }

/* =========================================================================
   PHASE 3 — FURSONAS, GALERIE, COMMISSIONS, LIENS, ÉVÉNEMENTS, RÉACTIONS
   ========================================================================= */

/* ── Réactions sur messages ──────────────────────────────────────────── */
.msg__reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  user-select: none;
}
.reaction-pill:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.14); transform: scale(1.08); }
.reaction-pill--me { background: rgba(61,143,104,0.16); border-color: rgba(61,143,104,0.38); }
.reaction-pill--me:hover { background: rgba(61,143,104,0.22); }
.reaction-pill__count { font-size: 12px; color: var(--stardust); }
.reaction-pill--me .reaction-pill__count { color: var(--cyan); }

/* Bouton + réaction sur hover du message */
.msg:hover .msg__react-btn,
.msg__react-btn:focus { opacity: 1; }
.msg__react-btn {
  opacity: 0;
  position: absolute;
  top: 2px;
  right: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.msg__react-btn:hover { background: rgba(255,255,255,0.1); }
.msg { position: relative; }

/* Emoji picker compact pour réactions */
.react-picker {
  position: absolute;
  top: -44px;
  right: 0;
  background: #161618;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 6px 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 280px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.react-picker__emoji {
  font-size: 20px;
  cursor: pointer;
  padding: 3px;
  border-radius: 6px;
  transition: background 0.12s, transform 0.1s;
  line-height: 1;
}
.react-picker__emoji:hover { background: rgba(255,255,255,0.08); transform: scale(1.2); }

/* ── Fursonas — redesign ────────────────────────────────────────────── */
.fursona-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }

.fursona-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  grid-template-rows: auto auto;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fursona-card:hover { border-color: rgba(255,255,255,0.14); box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
.fursona-card--primary {
  border-color: rgba(61,143,104,0.4);
  background: linear-gradient(135deg, rgba(61,143,104,0.07), rgba(255,255,255,0.02));
}
.fursona-card--primary:hover { border-color: rgba(61,143,104,0.6); }

/* Ref image — colonne gauche, 2 rangées */
.fursona-card__ref {
  grid-row: 1 / 3;
  width: 90px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; overflow: hidden; align-self: stretch;
}
.fursona-card__ref img { width: 100%; height: 100%; object-fit: cover; }

/* Body — rangée 1 */
.fursona-card__body {
  padding: 14px 16px 6px;
  min-width: 0;
}
.fursona-card__name {
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  color: var(--starlight); display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.fursona-card__primary-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  background: rgba(61,143,104,0.2); color: #4ade80;
  border: 1px solid rgba(61,143,104,0.45);
  border-radius: 20px; padding: 2px 10px; vertical-align: middle;
}
.fursona-card__meta {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 5px;
}
.fursona-card__chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.06); color: var(--stardust);
  border: 1px solid rgba(255,255,255,0.08);
}
.fursona-card__bio {
  font-size: 13px; color: var(--stardust); margin-top: 8px;
  line-height: 1.5; opacity: 0.85;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Actions — rangée 2 */
.fursona-card__actions {
  display: flex; gap: 6px;
  padding: 8px 16px 12px;
  align-items: center;
}
.fursona-card__actions .btn--danger {
  margin-left: auto;
  padding: 5px 8px;
}

.fursona-form {
  margin-top: 20px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}
.fursona-form__title { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--starlight); }

/* ── Galerie ─────────────────────────────────────────────────────────── */
/* ========== GALERIE — redesign ========== */
.gal-pane { display: flex; flex-direction: column; gap: 16px; }
.gal-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
}
.gal-hero__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--starlight); margin: 0 0 3px; }
.gal-hero__sub   { font-size: 13px; color: var(--faint); margin: 0; }
.gal-counter {
  margin-left: auto; display: flex; align-items: baseline; gap: 2px;
  font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--starlight); flex-shrink: 0;
}
.gal-counter__max { font-size: 13px; color: var(--faint); }

.gal-upload-zone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 20px; border-radius: 14px;
  border: 2px dashed rgba(139,92,246,0.25); background: rgba(139,92,246,0.04);
  transition: all 0.2s; cursor: pointer;
}
.gal-upload-zone:hover, .gal-upload-zone--drag {
  border-color: rgba(139,92,246,0.55); background: rgba(139,92,246,0.1);
}
.gal-upload-zone svg { stroke: var(--violet); opacity: 0.6; }
.gal-upload-zone__text { font-size: 13px; color: var(--faint); margin: 0; }

.gallery-upload-row { margin-bottom: 16px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.gallery-item:hover { border-color: rgba(255,255,255,0.18); transform: scale(1.03); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item__del {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.75);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.gallery-item:hover .gallery-item__del { opacity: 1; }
.gallery-item__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  font-size: 11px;
  padding: 12px 6px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Galerie publique sur la fiche profil */
.profile-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
  margin-top: 12px;
}
.profile-gallery-item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.profile-gallery-item:hover { transform: scale(1.04); opacity: 0.9; }
.profile-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Commission badge ────────────────────────────────────────────────── */
.comm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 2px 9px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.comm-badge--open    { background: rgba(77,184,124,0.15); color: #4db87c; border-color: rgba(77,184,124,0.35); }
.comm-badge--closed  { background: rgba(230,80,80,0.13); color: #e05050; border-color: rgba(230,80,80,0.3); }
.comm-badge--request { background: rgba(196,154,36,0.15); color: var(--gold); border-color: rgba(196,154,36,0.35); }

/* Commission status selector */
/* ========== COMMISSIONS — redesign ========== */
.comm-pane { display: flex; flex-direction: column; gap: 16px; }

.comm-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(61,143,104,0.1), rgba(139,92,246,0.08));
  border: 1px solid rgba(61,143,104,0.18);
}
.comm-hero__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--starlight); margin: 0 0 3px; }
.comm-hero__sub   { font-size: 13px; color: var(--faint); margin: 0; }
.comm-badge-preview {
  margin-left: auto; padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12); color: var(--stardust);
  background: rgba(255,255,255,0.05);
}

.comm-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden;
}
.comm-card__head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--stardust);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}
.comm-card__hint { margin-left: auto; font-size: 11px; color: var(--faint); text-transform: none; letter-spacing: 0; font-weight: 400; }
.comm-card__foot {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.01);
}

/* Status grid */
.comm-status-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  padding: 12px;
}
@media(max-width:540px) { .comm-status-grid { grid-template-columns: 1fr 1fr; gap: 8px; } }

.cs-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cs-card:hover { background: rgba(255,255,255,0.05); }
.cs-card__dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
}
.cs-card__dot--none    { background: rgba(255,255,255,0.15); }
.cs-card__dot--open    { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.cs-card__dot--request { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.cs-card__dot--closed  { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.cs-card__label { font-size: 13px; font-weight: 700; color: var(--stardust); }
.cs-card__sub   { font-size: 11px; color: var(--faint); text-align: center; }
.cs-card--active { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.15); }
.cs-card--active .cs-card__label { color: var(--starlight); }

/* URL row */
.comm-url-row {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px 12px;
}
.comm-url-ico { font-size: 18px; flex-shrink: 0; }
.comm-url-input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 8px 12px; color: var(--stardust);
  font-size: 13px; outline: none;
}
.comm-url-input:focus { border-color: rgba(139,92,246,0.4); background: rgba(255,255,255,0.07); }
.comm-url-input::placeholder { color: rgba(255,255,255,0.2); }

/* Compat old selectors */
.comm-status-row { display: none; }
.comm-btn { display: none; }

/* ── Looking for tags ── */
.lf-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 16px;
}
.lf-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  font-size: 13px; color: var(--stardust);
  cursor: pointer; transition: all 0.15s; user-select: none;
}
.lf-tag:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: var(--starlight); }
.lf-tag input[type="checkbox"] { display: none; }
.lf-tag:has(input:checked) {
  background: rgba(61,143,104,0.15); border-color: rgba(61,143,104,0.45);
  color: #4ade80;
}

/* LF tags sur le profil public */
.lf-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(196,154,36,0.3);
  background: rgba(196,154,36,0.1);
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
}

/* ── Profile links ───────────────────────────────────────────────────── */
.links-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}
.link-item__icon { font-size: 18px; width: 24px; text-align: center; }
.link-item__body { flex: 1; min-width: 0; }
.link-item__label { font-size: 13px; font-weight: 600; color: var(--starlight); }
.link-item__url { font-size: 11px; color: var(--stardust); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-add-form {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  margin-top: 8px;
}
.link-select {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--starlight);
  font-size: 13px;
}
.link-select option { background: #161618; }

/* Links on public profile */
.profile-links-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.profile-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--starlight);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.profile-link-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }

/* ── Fursona public (sur fiche profil) ──────────────────────────────── */
.fursonas-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.fursona-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.fursona-chip:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.18); }
.fursona-chip--active { border-color: rgba(61,143,104,0.45); background: rgba(61,143,104,0.1); }
.fursona-chip__species { font-size: 11px; color: var(--stardust); }

/* Detail card quand on clique sur un fursona */
.fursona-detail {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
  display: flex;
  gap: 16px;
}
.fursona-detail__ref {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
  overflow: hidden;
}
.fursona-detail__ref img { width: 100%; height: 100%; object-fit: cover; }
.fursona-detail__name { font-size: 16px; font-weight: 700; color: var(--starlight); }
.fursona-detail__species { font-size: 12px; color: var(--stardust); margin-top: 2px; }
.fursona-detail__colors { font-size: 12px; color: var(--stardust); margin-top: 2px; }
.fursona-detail__bio { font-size: 13px; color: var(--starlight); margin-top: 8px; opacity: 0.85; }

/* ── Événements ──────────────────────────────────────────────────────── */
.events-list { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.event-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.event-card:hover { border-color: rgba(255,255,255,0.14); }
.event-card__title { font-size: 14px; font-weight: 600; color: var(--starlight); }
.event-card__meta {
  font-size: 12px;
  color: var(--stardust);
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.event-card__rsvp {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.event-rsvp-btn {
  padding: 3px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--stardust);
  cursor: pointer;
  transition: all 0.15s;
}
.event-rsvp-btn:hover { background: rgba(255,255,255,0.08); }
.event-rsvp-btn--active { border-color: rgba(61,143,104,0.4); background: rgba(61,143,104,0.12); color: var(--cyan); }
.event-rsvp-btn--maybe--active { border-color: rgba(196,154,36,0.4); background: rgba(196,154,36,0.1); color: var(--gold); }
.event-card__counts { font-size: 11px; color: var(--stardust); margin-top: 6px; }

.event-form {
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 8px;
}

/* checkbox helper */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--starlight);
}
.checkbox-row input { accent-color: var(--violet); }

/* =========================================================================
   VITRINE PUBLIQUE — Profile View overlay
   ========================================================================= */

.pv-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: pvFadeIn 0.2s ease;
}
@keyframes pvFadeIn { from { opacity:0 } to { opacity:1 } }

.pv-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--starlight);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  z-index: 3010;
  transition: background 0.15s;
}
.pv-close:hover { background: rgba(255,255,255,0.14); }

.pv-card {
  width: min(920px, 95vw);
  max-height: 90vh;
  background: #111214;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: pvSlideUp 0.22s ease;
}
@keyframes pvSlideUp { from { transform:translateY(24px);opacity:0 } to { transform:translateY(0);opacity:1 } }

/* Bannière */
.pv-banner {
  height: 160px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.pv-banner-img {
  position: absolute;
  inset: 0;
}
.pv-banner-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Corps */
.pv-body {
  display: flex;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

/* Colonne gauche */
.pv-left {
  width: 260px;
  flex-shrink: 0;
  padding: 0 20px 24px;
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  background: #0e0e0f;
}

.pv-avatar {
  width: 88px !important;
  height: 88px !important;
  border-radius: 50% !important;
  border: 4px solid #111214 !important;
  margin-top: -44px;
  font-size: 36px !important;
}

.pv-identity { margin-top: 10px; }
.pv-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--starlight);
  line-height: 1.2;
}
.pv-pronouns { font-size: 13px; color: var(--stardust); margin-top: 2px; }
.pv-username { font-size: 13px; color: var(--stardust); margin-top: 1px; }

.pv-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--stardust);
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 5px 10px;
}

.pv-comm-badge { margin-top: 10px; }

.pv-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }

.pv-lf { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

.pv-links { margin-top: 10px; }
.pv-links .profile-links-row { flex-direction: column; gap: 4px; }
.pv-links .profile-link-btn { justify-content: flex-start; }

.pv-since {
  font-size: 11px;
  color: var(--faint);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.pv-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

/* Colonne droite */
.pv-right {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 28px;
}

.pv-section { margin-bottom: 28px; }
.pv-section__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stardust);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pv-bio {
  font-size: 14px;
  color: var(--starlight);
  opacity: 0.9;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Lightbox */
.pv-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0,0,0,0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: pvFadeIn 0.15s ease;
}
.pv-lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
}
.pv-lb-caption {
  margin-top: 12px;
  color: var(--stardust);
  font-size: 14px;
}
.pv-lightbox .pv-close {
  position: fixed;
  top: 16px;
  right: 20px;
}

/* ── Ref sheet form ── */
.fn-ref-row { display: flex; gap: 8px; margin-top: 4px; }
.fn-ref-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.fn-gallery-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  max-height: 200px;
  overflow-y: auto;
}
.fn-gallery-pick-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.12s;
}
.fn-gallery-pick-item:hover { border-color: var(--violet); transform: scale(1.05); }
.fn-gallery-pick-item img { width:100%;height:100%;object-fit:cover;display:block; }
.fn-ref-preview {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.fn-ref-preview img {
  max-width: 200px;
  max-height: 160px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Bouton "Voir le profil" sur la user card */
#uc-view-profile {
  width: 100%;
  margin-top: 8px;
  background: rgba(61,143,104,0.1);
  border-color: rgba(61,143,104,0.3);
  color: var(--cyan);
}
#uc-view-profile:hover { background: rgba(61,143,104,0.18); }

/* ═══════════════════════════════════════════════════════════════════════
   PROFILE PAGE — full-page showcase
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Page container ── */
.pp-page {
  position: fixed; inset: 0; z-index: 3000;
  overflow-y: auto; overflow-x: hidden;
  background: var(--pp-bg, #090a0a);
  color: var(--pp-text, #e8eae9);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  scroll-behavior: smooth;
  --pp-accent: #3d8f68; --pp-accent2: #c49a24;
  --pp-bg: #090a0a; --pp-bg2: #0f0f13;
  --pp-card: rgba(255,255,255,0.04); --pp-card-border: rgba(255,255,255,0.08);
  --pp-text: #e8eae9; --pp-text2: #9da8a0;
  --pp-radius: 18px; --pp-glow: 0 0 40px var(--pp-accent);
}
/* ── Themes ── */
.pp-theme-galaxy  { --pp-bg:#07080b; --pp-bg2:#0f0f14; --pp-accent:#3d8f68; --pp-accent2:#c49a24; }
.pp-theme-midnight{ --pp-bg:#050711; --pp-bg2:#0c0e1f; --pp-accent:#7c3aed; --pp-accent2:#22d3ee; }
.pp-theme-forest  { --pp-bg:#050e08; --pp-bg2:#0b160d; --pp-accent:#22c55e; --pp-accent2:#86efac; }
.pp-theme-ocean   { --pp-bg:#020d16; --pp-bg2:#061827; --pp-accent:#0ea5e9; --pp-accent2:#38bdf8; }
.pp-theme-aurora  { --pp-bg:#04060f; --pp-bg2:#080c18; --pp-accent:#a78bfa; --pp-accent2:#34d399; }
.pp-theme-fire    { --pp-bg:#0c0502; --pp-bg2:#180a03; --pp-accent:#f97316; --pp-accent2:#fbbf24; }
.pp-theme-cotton  { --pp-bg:#0d060f; --pp-bg2:#180b1c; --pp-accent:#e879f9; --pp-accent2:#f0abfc; }
.pp-theme-custom  { --pp-bg: #0a0a0a; /* overridden inline by JS */ }

/* ── Canvas (animated bg) ── */
.pp-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.55;
}

/* ── Nav bar ── */
.pp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, transparent 100%);
  backdrop-filter: blur(4px);
}
.pp-nav-name { flex: 1; text-align: center; font-weight: 600; font-size: 15px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-nav-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: var(--pp-text); border-radius: 10px; padding: 8px 16px; font-size: 13px;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.pp-nav-btn:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }
.pp-nav-btn--accent { background: var(--pp-accent); border-color: transparent; color: #fff; }
.pp-nav-btn--accent:hover { filter: brightness(1.15); }

/* ── HERO ── */
.pp-hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 80px 24px 60px;
  overflow: hidden;
}
.pp-hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
}
.pp-hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center; max-width: 700px;
}

/* Avatar */
.pp-avatar-wrap {
  position: relative; width: 140px; height: 140px;
  margin-bottom: 8px;
}
.pp-avatar-ring {
  position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(var(--pp-accent) 0deg, var(--pp-accent2) 180deg, var(--pp-accent) 360deg);
  animation: pp-ring-spin 4s linear infinite;
  filter: blur(1px);
}
@keyframes pp-ring-spin { to { transform: rotate(360deg); } }
.pp-avatar {
  position: relative; z-index: 1;
  width: 140px; height: 140px; border-radius: 50%;
  border: 3px solid var(--pp-bg);
  box-shadow: 0 0 0 2px var(--pp-accent), 0 0 40px rgba(0,0,0,0.6);
  overflow: hidden; flex-shrink: 0;
}
.pp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pp-species-tag {
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  background: var(--pp-accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  padding: 2px 10px; border-radius: 20px;
  white-space: nowrap; z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Name */
.pp-name {
  font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; line-height: 1.1;
  text-shadow: 0 0 30px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.9);
  animation: pp-fade-up 0.6s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes pp-fade-up {
  from { opacity:0; transform: translateY(24px); }
  to   { opacity:1; transform: translateY(0); }
}
.pp-tagline {
  font-size: 16px; color: var(--pp-text2); font-style: italic;
  animation: pp-fade-up 0.6s 0.1s cubic-bezier(0.16,1,0.3,1) both;
}

/* Meta row */
.pp-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pp-pronoun-chip {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.pp-online-dot {
  width: 8px; height: 8px; background: #3ba55d; border-radius: 50%;
  box-shadow: 0 0 6px #3ba55d;
}
.pp-hero-status { font-size: 13px; color: var(--pp-text2); }

/* Commission badge hero */
.pp-comm-hero {
  padding: 8px 20px; border-radius: 30px; font-size: 13px; font-weight: 600;
  border: 1px solid; animation: pp-fade-up 0.6s 0.2s both;
}

/* Links */
.pp-links-hero {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  animation: pp-fade-up 0.6s 0.25s both;
}
.pp-link-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  color: var(--pp-text); padding: 8px 16px; border-radius: 40px;
  font-size: 13px; text-decoration: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.pp-link-btn:hover {
  background: var(--pp-accent); border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* LF chips */
.pp-lf-hero { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pp-lf-chip {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  padding: 4px 14px; border-radius: 20px; font-size: 12px;
  color: var(--pp-accent2);
}

/* Actions */
.pp-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; animation: pp-fade-up 0.6s 0.3s both; }
.pp-btn-primary {
  background: var(--pp-accent); color: #fff; border: none;
  padding: 12px 28px; border-radius: 40px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: filter 0.2s, transform 0.15s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 20px rgba(61,143,104,0.3);
}
.pp-btn-primary:hover { filter: brightness(1.15); transform: translateY(-2px); }
.pp-btn-ghost {
  background: rgba(255,255,255,0.07); color: var(--pp-text);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 12px 28px; border-radius: 40px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.pp-btn-ghost:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }

/* Scroll hint */
.pp-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 20px; opacity: 0.5;
  animation: pp-bob 2s ease-in-out infinite;
}
@keyframes pp-bob { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── CONTENT ── */
.pp-content { position: relative; z-index: 1; }

/* Section base */
.pp-section {
  padding: 60px 24px;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.pp-section.pp-visible { opacity: 1; transform: translateY(0); }

.pp-section-inner {
  max-width: 900px; margin: 0 auto;
}
.pp-section-inner--wide { max-width: 1200px; }

/* ── Section label redesign ── */
.pp-section-label {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 40px;
  position: relative;
}

/* Ligne décorative qui s'étend jusqu'au bord */
.pp-section-label::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
  /* fallback sans color-mix */
  background: linear-gradient(to right, rgba(255,255,255,0.12), transparent);
  background: linear-gradient(to right, color-mix(in srgb, var(--pp-accent, #a78bfa) 35%, transparent), transparent);
  min-width: 40px;
}

/* Icône carré arrondi avec glow */
.psl-icon {
  flex-shrink: 0;
  width: 54px; height: 54px; border-radius: 18px;
  /* fallback */
  background: rgba(167,139,250,.14);
  background: color-mix(in srgb, var(--pp-accent, #a78bfa) 14%, transparent);
  border: 1.5px solid rgba(167,139,250,.28);
  border-color: color-mix(in srgb, var(--pp-accent, #a78bfa) 28%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
  /* glow */
  box-shadow: 0 2px 12px rgba(0,0,0,.2),
              inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1),
              box-shadow .25s;
}
.pp-section:hover .psl-icon {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(0,0,0,.3),
              0 0 0 3px color-mix(in srgb, var(--pp-accent, #a78bfa) 20%, transparent);
}

.psl-content {
  display: flex; flex-direction: column; gap: 3px;
}

.psl-title {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.1;
  color: var(--text, #f0f0f0);
  text-transform: none;
}

.psl-sub {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pp-accent, #a78bfa);
  opacity: .65;
}

/* ── FURSONA SHOWCASE ── */
.pp-fursona-hero {
  background: linear-gradient(to bottom, transparent, var(--pp-bg2), transparent);
}
.pp-fursona-showcase {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center;
}
@media(max-width:700px){ .pp-fursona-showcase{grid-template-columns:1fr} }
.pp-fursona-ref-img {
  width: 100%; aspect-ratio: 3/4;
  border-radius: var(--pp-radius); overflow: hidden;
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
}
.pp-fursona-ref-img:hover { transform: scale(1.02); box-shadow: var(--pp-glow); }
.pp-fursona-ref-img img { width:100%; height:100%; object-fit:contain; }
.pp-fursona-ref-placeholder {
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  font-size: 80px; opacity: 0.3;
}
.pp-fursona-name { font-size: 2.5rem; font-weight: 700; margin-bottom: 8px; }
.pp-fursona-species {
  font-size: 16px; color: var(--pp-accent); font-weight: 600;
  text-transform: capitalize; margin-bottom: 12px;
}
.pp-fursona-colors {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--pp-text2); margin-bottom: 16px;
}
.pp-color-swatch {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: inline-block;
}
.pp-fursona-bio { font-size: 15px; line-height: 1.75; color: var(--pp-text2); }

/* ── ABOUT ── */
.pp-about { text-align: center; }
.pp-bio-text {
  font-size: 17px; line-height: 1.85; color: var(--pp-text2);
  max-width: 680px; margin: 0 auto;
  white-space: pre-wrap;
}

/* ── FURSONAS GRID ── */
.pp-fursonas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.pp-fursona-card {
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  border-radius: var(--pp-radius); overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.pp-fursona-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,0,0,0.3); }
.pp-fursona-card.pp-primary { border-color: var(--pp-accent); box-shadow: 0 0 0 1px var(--pp-accent), 0 0 20px rgba(0,0,0,0.3); }
.pp-fursona-card__thumb {
  width: 100%; aspect-ratio: 4/3; overflow: hidden;
  background: linear-gradient(135deg, var(--pp-bg2) 0%, rgba(255,255,255,0.02) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.pp-fursona-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp-fursona-card__body { padding: 14px 16px; }
.pp-fursona-card__name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.pp-fursona-card__species { font-size: 12px; color: var(--pp-accent); text-transform: capitalize; }
.pp-fursona-card__primary-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  background: var(--pp-accent); color: #fff;
  padding: 2px 8px; border-radius: 10px; margin-top: 6px;
  letter-spacing: 0.05em;
}

/* ── GALLERY MASONRY ── */
.pp-masonry {
  columns: 3 300px; gap: 16px;
}
.pp-masonry-item {
  break-inside: avoid; margin-bottom: 16px;
  border-radius: 14px; overflow: hidden;
  cursor: pointer; position: relative;
  background: var(--pp-card);
  transition: transform 0.25s, box-shadow 0.25s;
}
.pp-masonry-item:hover { transform: scale(1.02); box-shadow: 0 8px 30px rgba(0,0,0,0.6); }
.pp-masonry-item img { width: 100%; display: block; }
.pp-masonry-item__caption {
  position: absolute; inset: auto 0 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: #fff; font-size: 12px; padding: 24px 12px 10px;
  opacity: 0; transition: opacity 0.2s;
}
.pp-masonry-item:hover .pp-masonry-item__caption { opacity: 1; }

/* ── COMMISSIONS ── */
.pp-comm-card {
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  border-radius: var(--pp-radius); padding: 40px;
  display: flex; align-items: center; gap: 32px;
  max-width: 700px; margin: 0 auto;
  transition: box-shadow 0.3s;
}
.pp-comm-card.comm-open   { border-color: #3ba55d; box-shadow: 0 0 30px rgba(59,165,93,0.2); }
.pp-comm-card.comm-closed { border-color: #ed4245; box-shadow: 0 0 30px rgba(237,66,69,0.1); }
.pp-comm-card.comm-ask    { border-color: #faa61a; box-shadow: 0 0 30px rgba(250,166,26,0.15); }
.pp-comm-status-icon { font-size: 56px; flex-shrink: 0; }
.pp-comm-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--pp-text2); }
.pp-comm-title { font-size: 28px; font-weight: 700; margin: 4px 0 16px; }
.pp-comm-cta {
  display: inline-block; background: var(--pp-accent); color: #fff;
  padding: 12px 28px; border-radius: 40px; font-weight: 600; font-size: 14px;
  text-decoration: none; transition: filter 0.2s, transform 0.15s;
}
.pp-comm-cta:hover { filter: brightness(1.15); transform: translateY(-2px); }

/* ── BADGES ── */
.pp-badges-grid {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}

/* ── FOOTER ── */
.pp-footer {
  text-align: center; padding: 40px 24px 60px;
  display: flex; flex-direction: column; gap: 8px;
  color: var(--pp-text2); font-size: 13px; opacity: 0.6;
}
.pp-footer-brand { font-weight: 700; letter-spacing: 0.05em; color: var(--pp-accent); }

/* ── CARD STYLES ── */
.pp-card-glass .pp-fursona-card,
.pp-card-glass .pp-comm-card { backdrop-filter: blur(12px); }
.pp-card-neon .pp-fursona-card  { border-color: var(--pp-accent); box-shadow: 0 0 12px rgba(61,143,104,0.3); }
.pp-card-neon .pp-fursona-card:hover { box-shadow: 0 0 30px rgba(61,143,104,0.6); }
.pp-card-minimal .pp-fursona-card { background: transparent; }

/* ── MA PAGE SETTINGS ── */
.mp-themes, .mp-anims, .mp-cards {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.mp-theme-btn, .mp-anim-btn, .mp-card-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); padding: 8px 16px; border-radius: 10px;
  font-size: 13px; cursor: pointer; transition: background 0.2s;
}
.mp-theme-btn:hover, .mp-anim-btn:hover, .mp-card-btn:hover { background: rgba(255,255,255,0.12); }
.mp-theme-btn.active, .mp-anim-btn.active, .mp-card-btn.active {
  background: var(--jade); border-color: var(--jade); color: #fff;
}
.mp-custom-colors {
  display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px;
  padding: 16px; background: rgba(255,255,255,0.03);
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.07);
}
.mp-custom-colors .field { flex-direction: row; align-items: center; gap: 10px; }
.mp-custom-colors input[type=color] {
  width: 48px; height: 32px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1); cursor: pointer; padding: 2px;
}

/* Lightbox (already existed, enhance) */
.pv-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 40px;
}
.pv-lightbox img { max-height: 80vh; max-width: 90vw; border-radius: 12px; object-fit: contain; }
.pv-lb-caption { color: rgba(255,255,255,0.6); font-size: 14px; }
.pv-close { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 20px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display:flex;align-items:center;justify-content:center; transition: background 0.2s; }
.pv-close:hover { background: rgba(255,255,255,0.2); }

/* ── Canvas aurora animation ── */
@keyframes pp-aurora-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.pp-anim-aurora .pp-canvas { display: none; }
.pp-anim-aurora::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--pp-bg), var(--pp-accent)33, var(--pp-accent2)22, var(--pp-bg));
  background-size: 400% 400%;
  animation: pp-aurora-shift 8s ease infinite;
  opacity: 0.6;
}

/* ── Social links platform grid ── */
/* ========== LIENS — redesign ========== */
.links-pane { display: flex; flex-direction: column; gap: 16px; }

.links-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
}
.links-hero__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--starlight); margin: 0 0 3px; }
.links-hero__sub   { font-size: 13px; color: var(--faint); margin: 0; }
.links-counter {
  margin-left: auto; display: flex; align-items: baseline; gap: 2px;
  font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--starlight);
  flex-shrink: 0;
}
.links-counter__max { font-size: 13px; color: var(--faint); }
.links-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--stardust); padding: 4px 2px;
}

.link-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.lp-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--stardust); padding: 14px 10px;
  border-radius: 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  text-align: center;
}
.lp-ico { font-size: 22px; line-height: 1; }
.lp-btn:hover   { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.18); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); color: var(--starlight); }
.lp-btn--active { background: rgba(61,143,104,0.15); border-color: rgba(61,143,104,0.4); color: #4ade80; }

/* link add form */
.link-add-form {
  border-radius: 16px;
  padding: 20px;
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}
.link-add-form__header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.link-form-icon  { font-size: 22px; }
.link-form-title { font-weight: 700; font-size: 15px; flex: 1; }
.link-form-cancel {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); width: 28px; height: 28px; border-radius: 50%;
  font-size: 13px; cursor: pointer; display:flex;align-items:center;justify-content:center;
  transition: background 0.15s;
}
.link-form-cancel:hover { background: rgba(255,255,255,0.15); }

/* link item rows */
.link-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 10px 14px;
  margin-bottom: 6px; transition: background 0.15s;
}
.link-item:hover { background: rgba(255,255,255,0.07); }
.link-item__icon { font-size: 20px; flex-shrink: 0; width: 28px; text-align: center; }
.link-item__body { flex: 1; min-width: 0; }
.link-item__label { font-weight: 600; font-size: 13px; }
.link-item__url   { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-item__open {
  color: var(--muted); text-decoration: none; font-size: 16px;
  padding: 4px 8px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.link-item__open:hover { color: var(--jade); background: rgba(61,143,104,0.12); }
.link-item__del {
  background: rgba(237,66,69,0.1); border: 1px solid rgba(237,66,69,0.25);
  color: #ed4245; width: 28px; height: 28px; border-radius: 8px;
  font-size: 12px; cursor: pointer; display:flex;align-items:center;justify-content:center;
  transition: background 0.15s;
}
.link-item__del:hover { background: rgba(237,66,69,0.25); }

/* ── Home — Ma vitrine button ── */
.db-action--profile {
  background: linear-gradient(135deg, rgba(61,143,104,0.25), rgba(196,154,36,0.2));
  border-color: rgba(61,143,104,0.35);
  color: #a8d5bb;
}
.db-action--profile:hover {
  background: linear-gradient(135deg, rgba(61,143,104,0.4), rgba(196,154,36,0.3));
  border-color: var(--jade); color: #fff;
}

/* ── Gallery items improved ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.gallery-item {
  position: relative; border-radius: 10px; overflow: hidden;
  aspect-ratio: 1; cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-item:hover { transform: scale(1.04); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item__caption {
  position: absolute; inset: auto 0 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #fff; font-size: 10px; font-weight: 600;
  padding: 20px 6px 6px; text-align: center;
}
.gallery-item__del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(237,66,69,0.85); border: none; color: #fff;
  width: 22px; height: 22px; border-radius: 6px; font-size: 11px;
  cursor: pointer; display: none; align-items: center; justify-content: center;
}
.gallery-item:hover .gallery-item__del { display: flex; }

/* ═══════════════════════════════════════════════════════════════════════
   PROFILE PAGE — Extended Personalization (Build 41)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Background image layer ── */
.pp-bg-img {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center center;
  background-repeat: no-repeat;
  transition: filter 0.4s;
}

/* ── Pattern overlay layer ── */
.pp-pattern-layer {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.12;
}
.pp-pat-dots    .pp-pattern-layer { background-image: radial-gradient(var(--pp-accent) 1.5px, transparent 1.5px); background-size: 28px 28px; }
.pp-pat-grid    .pp-pattern-layer { background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 36px 36px; }
.pp-pat-diag    .pp-pattern-layer { background-image: repeating-linear-gradient(45deg, var(--pp-accent) 0, var(--pp-accent) 1px, transparent 0, transparent 50%); background-size: 20px 20px; }
.pp-pat-hex     .pp-pattern-layer { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 0 L56 16 L56 50 L28 66 L0 50 L0 16z' fill='none' stroke='rgba(255,255,255,0.15)' stroke-width='1'/%3E%3Cpath d='M28 50 L56 66 L56 100 L28 116 L0 100 L0 66z' fill='none' stroke='rgba(255,255,255,0.15)' stroke-width='1'/%3E%3C/svg%3E"); background-size: 56px 100px; opacity: 0.2; }
.pp-pat-circuit .pp-pattern-layer { background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.12)' stroke-width='1'%3E%3Cpath d='M10 10 h20 v10 h20'/%3E%3Cpath d='M50 30 v20 h-20 v-10 h-20'/%3E%3Ccircle cx='10' cy='10' r='2' fill='rgba(255,255,255,0.2)'/%3E%3Ccircle cx='50' cy='50' r='2' fill='rgba(255,255,255,0.2)'/%3E%3C/g%3E%3C/svg%3E"); background-size: 60px 60px; opacity: 0.25; }
.pp-pat-wave    .pp-pattern-layer { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20' viewBox='0 0 100 20'%3E%3Cpath d='M0 10 C25 0 75 20 100 10' fill='none' stroke='rgba(255,255,255,0.15)' stroke-width='1.5'/%3E%3C/svg%3E"); background-size: 100px 20px; opacity: 0.25; }
.pp-pat-cross   .pp-pattern-layer { background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 5 v30 M5 20 h30' stroke='rgba(255,255,255,0.12)' stroke-width='1'/%3E%3C/svg%3E"); background-size: 40px 40px; opacity: 0.2; }

/* ── Font classes (applied to .pp-name) ── */
.pp-font-cinzel    .pp-name { font-family: 'Cinzel', serif; letter-spacing: 0.05em; }
.pp-font-orbitron  .pp-name { font-family: 'Orbitron', sans-serif; letter-spacing: 0.08em; font-size: clamp(1.6rem, 4.5vw, 3rem); }
.pp-font-rajdhani  .pp-name { font-family: 'Rajdhani', sans-serif; letter-spacing: 0.06em; font-weight: 700; }
.pp-font-spacemono .pp-name { font-family: 'Space Mono', monospace; font-size: clamp(1.4rem, 3.5vw, 2.8rem); }
.pp-font-press2p   .pp-name { font-family: 'Press Start 2P', monospace; font-size: clamp(1rem, 2.5vw, 2rem); line-height: 1.4; }
.pp-font-exo2      .pp-name { font-family: 'Exo 2', sans-serif; font-weight: 800; letter-spacing: 0.03em; }
.pp-font-inter     .pp-name { font-family: 'Inter', sans-serif; font-weight: 800; }
.pp-font-grotesk   .pp-name { font-family: 'Space Grotesk', sans-serif; }

/* ── Hero layout: SIDE ── */
.pp-layout-side .pp-hero-content {
  flex-direction: row; text-align: left; gap: 48px; max-width: 1000px;
}
.pp-layout-side .pp-avatar-wrap { flex-shrink: 0; width: 180px; height: 180px; }
.pp-layout-side .pp-avatar      { width: 180px; height: 180px; }
.pp-layout-side .pp-hero-actions,
.pp-layout-side .pp-links-hero,
.pp-layout-side .pp-lf-hero    { justify-content: flex-start; }
.pp-layout-side .pp-tagline    { text-align: left; }
.pp-layout-side .pp-hero-meta  { justify-content: flex-start; }
@media(max-width:640px){.pp-layout-side .pp-hero-content{flex-direction:column;text-align:center}}

/* ── Hero layout: MINIMAL ── */
.pp-layout-minimal .pp-hero { min-height: 60vh; }
.pp-layout-minimal .pp-avatar-wrap { width: 80px; height: 80px; }
.pp-layout-minimal .pp-avatar      { width: 80px; height: 80px; }
.pp-layout-minimal .pp-avatar-ring { inset: -3px; }
.pp-layout-minimal .pp-name { font-size: clamp(1.6rem, 4vw, 2.8rem); }
.pp-layout-minimal .pp-scroll-hint { display: none; }
.pp-layout-minimal .pp-fursona-hero,
.pp-layout-minimal .pp-fursonas { display: none; }

/* ── Fireflies animation (additional anim mode) ── */
@keyframes pp-fly {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 0.8; }
  100% { transform: translateY(-120px) translateX(var(--fx)) scale(0.3); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   STUDIO SETTINGS — Ma page publique
   ═══════════════════════════════════════════════════════════════════════ */
.mp-studio-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.mp-studio-actions { display: flex; gap: 8px; flex-shrink: 0; }

.mp-section {
  margin-bottom: 28px;
  padding: 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
}
.mp-section__title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--jade); margin-bottom: 14px;
}

/* Background upload area */
.mp-bg-upload-area {
  border: 2px dashed rgba(255,255,255,0.12); border-radius: 12px;
  background: rgba(255,255,255,0.02); min-height: 120px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden; position: relative;
}
.mp-bg-upload-area.drag-over { border-color: var(--jade); background: rgba(61,143,104,0.08); }
.mp-bg-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px; padding: 20px;
}
.mp-bg-icon { font-size: 32px; opacity: 0.5; }
.mp-bg-hint { font-size: 11px; opacity: 0.5; }
.mp-bg-preview {
  position: relative; width: 100%; min-height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.mp-bg-preview img { max-height: 200px; max-width: 100%; border-radius: 8px; object-fit: cover; }
.mp-bg-clear {
  position: absolute; top: 8px; right: 8px;
  background: rgba(237,66,69,0.85); border: none; color: #fff;
  padding: 5px 10px; border-radius: 8px; font-size: 12px; cursor: pointer;
}

.mp-blur-row {
  margin-top: 12px; display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--muted);
}
.mp-slider { flex: 1; accent-color: var(--jade); }

/* Theme buttons — card style */
.mp-themes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px;
}
.mp-theme-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); padding: 12px 8px; border-radius: 12px;
  font-size: 18px; cursor: pointer; transition: all 0.15s;
}
.mp-theme-btn span { font-size: 11px; font-weight: 600; opacity: 0.8; }
.mp-theme-btn:hover   { background: rgba(255,255,255,0.10); transform: translateY(-2px); }
.mp-theme-btn.active  { border-color: var(--jade); background: rgba(61,143,104,0.15); box-shadow: 0 0 12px rgba(61,143,104,0.3); }

/* Anim buttons */
.mp-anims {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.mp-anim-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); padding: 10px 16px; border-radius: 12px;
  font-size: 18px; cursor: pointer; transition: all 0.15s; min-width: 70px;
}
.mp-anim-btn span { font-size: 11px; font-weight: 600; }
.mp-anim-btn:hover  { background: rgba(255,255,255,0.10); transform: translateY(-2px); }
.mp-anim-btn.active { border-color: var(--jade); background: rgba(61,143,104,0.15); }

/* Pattern buttons */
.mp-patterns {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px;
}
.mp-pat-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); padding: 10px 6px; border-radius: 12px;
  font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.mp-pat-btn:hover  { background: rgba(255,255,255,0.10); }
.mp-pat-btn.active { border-color: var(--jade); background: rgba(61,143,104,0.15); }
.mp-pat-preview {
  width: 48px; height: 36px; border-radius: 6px;
  background: #1a1b1e; border: 1px solid rgba(255,255,255,0.1);
}
.mp-pat-preview--none    { background: #1a1b1e; }
.mp-pat-preview--dots    { background: #1a1b1e; background-image: radial-gradient(#3d8f68 1.5px, transparent 1.5px); background-size: 10px 10px; }
.mp-pat-preview--grid    { background: #1a1b1e; background-image: linear-gradient(rgba(255,255,255,.15) 1px, transparent 1px),linear-gradient(90deg,rgba(255,255,255,.15) 1px, transparent 1px); background-size: 12px 12px; }
.mp-pat-preview--diag    { background: #1a1b1e; background-image: repeating-linear-gradient(45deg, rgba(61,143,104,0.4) 0,rgba(61,143,104,0.4) 1px, transparent 0, transparent 50%); background-size: 8px 8px; }
.mp-pat-preview--hex     { background: #1a1b1e; border: 1px solid rgba(61,143,104,0.4); }
.mp-pat-preview--circuit { background: #1a1b1e; border: 1px solid rgba(61,143,104,0.3); background-image: linear-gradient(rgba(61,143,104,0.3) 1px, transparent 1px); background-size: 12px 12px; }
.mp-pat-preview--wave    { background: #1a1b1e; }
.mp-pat-preview--cross   { background: #1a1b1e; background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 2v12M2 8h12' stroke='rgba(61,143,104,0.4)' stroke-width='1'/%3E%3C/svg%3E"); background-size: 16px; }

/* Font buttons */
.mp-fonts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px;
}
.mp-font-btn {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); padding: 12px 14px; border-radius: 12px;
  font-size: 15px; cursor: pointer; transition: all 0.15s; text-align: left;
}
.mp-font-btn:hover  { background: rgba(255,255,255,0.10); }
.mp-font-btn.active { border-color: var(--jade); background: rgba(61,143,104,0.15); color: var(--jade-light); }

/* Card buttons */
.mp-cards { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-card-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); padding: 10px 20px; border-radius: 12px;
  font-size: 18px; cursor: pointer; transition: all 0.15s;
}
.mp-card-btn span { font-size: 11px; font-weight: 600; }
.mp-card-btn:hover  { background: rgba(255,255,255,0.10); }
.mp-card-btn.active { border-color: var(--jade); background: rgba(61,143,104,0.15); }

/* Custom colors */
.mp-color-row {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px;
}
.mp-color-field {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted);
}
.mp-color-field input[type=color] {
  width: 52px; height: 40px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12); cursor: pointer; padding: 3px;
  background: rgba(255,255,255,0.05);
}

/* Layout buttons */
.mp-layouts { display: flex; gap: 12px; flex-wrap: wrap; }
.mp-layout-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); padding: 14px 20px; border-radius: 12px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.mp-layout-btn:hover  { background: rgba(255,255,255,0.10); }
.mp-layout-btn.active { border-color: var(--jade); background: rgba(61,143,104,0.15); }
.mp-layout-preview {
  width: 64px; height: 42px; border-radius: 6px;
  background: #1a1b1e; border: 1px solid rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
}
.mp-layout-preview--centered::before {
  content:""; position:absolute; left:50%;top:8px;transform:translateX(-50%);
  width:16px;height:16px;background:rgba(61,143,104,0.6);border-radius:50%;
}
.mp-layout-preview--centered::after {
  content:""; position:absolute; left:20%;right:20%;top:30px;height:4px;
  background:rgba(255,255,255,0.2);border-radius:2px;
}
.mp-layout-preview--side::before {
  content:""; position:absolute; left:6px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;background:rgba(61,143,104,0.6);border-radius:50%;
}
.mp-layout-preview--side::after {
  content:""; position:absolute; left:28px;right:6px;top:50%;transform:translateY(-50%);
  height:4px;background:rgba(255,255,255,0.2);border-radius:2px;
}
.mp-layout-preview--minimal::before {
  content:""; position:absolute; left:50%;top:6px;transform:translateX(-50%);
  width:10px;height:10px;background:rgba(61,143,104,0.6);border-radius:50%;
}
.mp-layout-preview--minimal::after {
  content:""; position:absolute; left:30%;right:30%;top:24px;height:3px;
  background:rgba(255,255,255,0.2);border-radius:2px;
}

/* ── Studio quick actions ── */
.mp-quick-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 28px;
}
@media(max-width:500px){.mp-quick-actions{grid-template-columns:1fr}}
.mp-quick-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1); text-align: left;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  color: var(--text);
}
.mp-quick-btn:hover { transform: translateY(-2px); }
.mp-quick-btn--magic {
  background: linear-gradient(135deg, rgba(61,143,104,0.2), rgba(196,154,36,0.15));
  border-color: rgba(61,143,104,0.4);
  box-shadow: 0 0 20px rgba(61,143,104,0.15);
}
.mp-quick-btn--magic:hover { box-shadow: 0 4px 30px rgba(61,143,104,0.35); border-color: var(--jade); }
.mp-quick-btn--preview {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}
.mp-quick-btn--preview:hover { background: rgba(255,255,255,0.1); }
.mp-quick-icon { font-size: 28px; flex-shrink: 0; }
.mp-quick-label { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.mp-quick-sub   { font-size: 11px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════════════
   Build 43 — Features B,E,G,H,I,J,K,L,M
   ═══════════════════════════════════════════════════════════════════════ */

/* ── K: Adaptive time tints ── */
.pp-time-dawn  .pp-hero-overlay { background: radial-gradient(ellipse at 50% 80%, rgba(255,180,60,0.12), transparent 70%); }
.pp-time-dusk  .pp-hero-overlay { background: radial-gradient(ellipse at 50% 80%, rgba(180,50,120,0.12), transparent 70%); }
.pp-time-night .pp-hero-overlay { background: radial-gradient(ellipse at 50% 80%, rgba(20,20,100,0.18), transparent 70%); }
.pp-time-dawn  { --pp-accent2: #e8b84b; }
.pp-time-dusk  { --pp-accent2: #c45a8b; }
.pp-time-night { filter: brightness(0.92); }

/* ── B: Custom cursor ── */
#pp-cursor {
  position: fixed; pointer-events: none; z-index: 9999;
  font-size: 22px; line-height: 1;
  transform: translate(-50%, -50%);
  transition: transform 0.05s linear;
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.6));
}

/* ── G: En ce moment ── */
.pp-now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.pp-now-card {
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  border-radius: var(--pp-radius); padding: 20px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.pp-now-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.pp-now-card__label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pp-accent); margin-bottom: 12px; }
.pp-now-wip-img { width: 100%; border-radius: 10px; margin-bottom: 10px; object-fit: cover; max-height: 160px; cursor: pointer; }
.pp-now-wip-title { font-weight: 700; font-size: 15px; }
.pp-now-mood-emoji { font-size: 52px; text-align: center; padding: 8px 0; }
.pp-now-listening-text { font-size: 13px; line-height: 1.5; color: var(--pp-text); font-style: italic; }

/* ── H: Lore ── */
.pp-lore-quote {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic; font-weight: 600;
  text-align: center;
  color: var(--pp-accent2);
  border-left: 3px solid var(--pp-accent);
  padding: 16px 28px;
  margin: 0 0 32px;
  background: var(--pp-card); border-radius: 0 12px 12px 0;
}
.pp-lore-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
@media(max-width:640px){ .pp-lore-cards{grid-template-columns:1fr} }
.pp-lore-card {
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  border-radius: var(--pp-radius); padding: 20px;
}
.pp-lore-card__title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pp-accent); margin-bottom: 10px; }
.pp-lore-card__text { font-size: 14px; line-height: 1.7; color: var(--pp-text); white-space: pre-wrap; margin: 0; }
.pp-lore-likesdislikes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:640px){ .pp-lore-likesdislikes{grid-template-columns:1fr} }
.pp-lore-half {
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  border-radius: var(--pp-radius); padding: 20px;
}
.pp-likes-title    { color: #3ba55d !important; }
.pp-dislikes-title { color: #ed4245 !important; }
.pp-lore-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pp-lore-list li { font-size: 13px; padding: 6px 10px; background: rgba(255,255,255,0.04); border-radius: 8px; }

/* ── J: Wishlist ── */
.pp-wishlist-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.pp-wish-item {
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  border-radius: var(--pp-radius); padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none; color: var(--pp-text);
}
.pp-wish-item:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.4); border-color: var(--pp-accent); }
.pp-wish-emoji  { font-size: 36px; }
.pp-wish-title  { font-weight: 700; font-size: 15px; }
.pp-wish-desc   { font-size: 12px; color: var(--pp-text2); flex: 1; }
.pp-wish-link   { font-size: 11px; color: var(--pp-accent); margin-top: auto; }

/* ── I: Kudos ── */
.pp-kudos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
  margin-bottom: 20px;
}
.pp-kudos-card {
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  border-radius: var(--pp-radius); padding: 16px 18px;
  position: relative;
}
.pp-kudos-card__from {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.pp-kudos-card__av { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; overflow: hidden; }
.pp-kudos-card__name { font-weight: 700; font-size: 13px; }
.pp-kudos-card__msg { font-size: 13px; line-height: 1.55; color: var(--pp-text); font-style: italic; }
.pp-kudos-card__del {
  position: absolute; top: 8px; right: 8px;
  background: rgba(237,66,69,0.15); border: none; color: #ed4245;
  width: 22px; height: 22px; border-radius: 6px; font-size: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.pp-kudos-card:hover .pp-kudos-card__del { opacity: 1; }
.pp-kudos-form-wrap {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--pp-card); border: 1px solid var(--pp-card-border);
  border-radius: var(--pp-radius); padding: 20px;
}
.pp-kudos-textarea {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 10px 14px; color: var(--pp-text);
  font-size: 14px; resize: none; outline: none; width: 100%; box-sizing: border-box;
  font-family: inherit;
}
.pp-kudos-textarea:focus { border-color: var(--pp-accent); }
.pp-kudos-already { text-align: center; color: var(--pp-text2); font-size: 13px; padding: 16px; }

/* ── L: Stats ── */
.avance-stats { display: flex; gap: 24px; margin-bottom: 16px; }
.avance-stat { text-align: center; }
.avance-stat__n { display: block; font-size: 2.5rem; font-weight: 800; color: var(--jade); font-family: 'Space Grotesk'; }
.avance-stat__l { font-size: 12px; color: var(--muted); }
.stat-chart { display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.stat-bar {
  flex: 1; background: var(--jade); border-radius: 3px 3px 0 0;
  min-height: 2px; transition: height 0.3s; position: relative;
}
.stat-bar:hover::after {
  content: attr(data-label); position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.8); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}

/* ── M: Section order ── */
.mp-sec-order { display: flex; flex-direction: column; gap: 6px; }
.mp-sec-drag-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px; padding: 10px 14px;
  cursor: grab; transition: background 0.15s, box-shadow 0.15s;
  user-select: none;
}
.mp-sec-drag-item:hover   { background: rgba(255,255,255,0.08); }
.mp-sec-drag-item.dragging { opacity: 0.4; }
.mp-sec-drag-item.drag-over { border-color: var(--jade); box-shadow: 0 0 0 2px rgba(61,143,104,0.3); }
.mp-sec-handle { cursor: grab; color: var(--muted); font-size: 16px; flex-shrink: 0; }
.mp-sec-label  { flex: 1; font-size: 13px; font-weight: 600; }
.mp-sec-toggle { width: 36px; height: 20px; cursor: pointer; appearance: none;
  background: rgba(255,255,255,0.1); border-radius: 20px; position: relative; transition: background 0.2s; }
.mp-sec-toggle:checked { background: var(--jade); }
.mp-sec-toggle::after { content:""; position: absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; transition: left 0.2s; }
.mp-sec-toggle:checked::after { left:18px; }

/* ── E: CSS editor ── */
.avance-css-editor {
  font-family: 'Space Mono', monospace; font-size: 12px;
  background: #0a0c0e; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 12px 16px; color: #a8d5bb;
  resize: vertical; outline: none; width: 100%; box-sizing: border-box;
  line-height: 1.6;
}
.avance-css-editor:focus { border-color: var(--jade); }

/* ── B: Cursor settings ── */
.mp-cursor-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-cursor-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); padding: 10px 14px; border-radius: 10px;
  font-size: 20px; cursor: pointer; transition: all 0.15s; min-width: 44px;
}
.mp-cursor-btn:hover  { background: rgba(255,255,255,0.12); transform: scale(1.1); }
.mp-cursor-btn.active { border-color: var(--jade); background: rgba(61,143,104,0.18); }
.mp-cursor-btn[data-cursor=""] { font-size: 12px; }

/* ── Toggle switch ── */
.toggle-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle-track { width: 44px; height: 24px; background: rgba(255,255,255,0.1); border-radius: 24px; position: relative; transition: background 0.2s; flex-shrink: 0; }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: left 0.2s; }
input[type=checkbox]:checked + .toggle-track { background: var(--jade); }
input[type=checkbox]:checked + .toggle-track .toggle-thumb { left: 22px; }
input[type=checkbox].toggle-hidden { position: absolute; opacity: 0; width: 0; height: 0; }

/* Settings misc */
.mp-mood-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-mood-btn {
  font-size: 22px; padding: 8px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  cursor: pointer; transition: all 0.15s;
}
.mp-mood-btn:hover  { transform: scale(1.15); background: rgba(255,255,255,0.12); }
.mp-mood-btn.active { border-color: var(--jade); background: rgba(61,143,104,0.18); }
.mp-mood-btn[data-mood=""] { font-size: 12px; padding: 8px 12px; }

.mp-lore-flex { display: flex; gap: 16px; }
@media(max-width:500px){.mp-lore-flex{flex-direction:column}}

/* ========== LORE & UNIVERS — redesign ========== */
.lore-pane { display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; }

/* Hero header */
.lore-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,92,246,0.12) 0%, rgba(59,130,246,0.08) 100%);
  border: 1px solid rgba(139,92,246,0.2);
}
.lore-hero__icon { font-size: 32px; flex-shrink: 0; }
.lore-hero__title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--starlight); margin: 0 0 4px; }
.lore-hero__sub { font-size: 13px; color: var(--faint); margin: 0; }

/* Completion ring */
.lore-completion {
  position: relative; margin-left: auto; flex-shrink: 0;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
}
.lore-ring { width: 52px; height: 52px; transform: rotate(-90deg); }
.lore-ring__bg  { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 3; }
.lore-ring__fill {
  fill: none; stroke: var(--violet); stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4,0,0.2,1);
}
.lore-ring__pct {
  position: absolute; font-size: 11px; font-weight: 700;
  color: var(--starlight); letter-spacing: -0.02em;
}

/* Cards */
.lore-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden;
  transition: border-color 0.2s;
}
.lore-card:focus-within { border-color: rgba(139,92,246,0.4); }

.lore-card__head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.lore-card__ico { font-size: 16px; }
.lore-card__label {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--starlight);
}
.lore-card__hint { font-size: 12px; color: var(--faint); margin: 8px 16px 2px; }
.lore-card__hint2 { font-size: 11px; color: var(--faint); margin-left: auto; }

/* Character counter */
.lore-cc {
  margin-left: auto; font-size: 11px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.lore-cc--warn { color: #f59e0b; }
.lore-cc--max  { color: #ef4444; }

/* Quote card */
.lore-card--quote { background: linear-gradient(135deg, rgba(139,92,246,0.07), rgba(59,130,246,0.04)); }
.lore-quote-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 16px;
}
.lore-quote-mark {
  font-family: Georgia, serif; font-size: 36px; line-height: 1;
  color: rgba(139,92,246,0.5); flex-shrink: 0; user-select: none;
}
.lore-quote-mark--open  { align-self: flex-start; margin-top: -4px; }
.lore-quote-mark--close { align-self: flex-end;   margin-bottom: -4px; }
.lore-quote-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: var(--font-body); font-size: 15px; font-style: italic;
  color: var(--starlight); text-align: center;
}
.lore-quote-input::placeholder { color: rgba(255,255,255,0.2); }

/* Textarea */
.lore-textarea {
  display: block; width: 100%; box-sizing: border-box;
  background: transparent; border: none; outline: none; resize: vertical;
  padding: 10px 16px 14px;
  font-family: var(--font-body); font-size: 14px; line-height: 1.65;
  color: var(--stardust); min-height: 90px;
}
.lore-textarea::placeholder { color: rgba(255,255,255,0.18); }

/* Goûts / tag system */
.lore-card--likes { background: transparent; }
.lore-likes-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.lore-likes-col {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.lore-likes-col--yes { border-right: 1px solid rgba(255,255,255,0.06); }
.lore-likes-col__head {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--stardust);
}
.lore-likes-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.lore-likes-dot--yes { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.lore-likes-dot--no  { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.5); }

.lore-tags {
  display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px;
}
.lore-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; cursor: default;
  animation: loreTagIn 0.15s ease;
}
@keyframes loreTagIn { from { opacity:0; transform:scale(0.8); } to { opacity:1; transform:scale(1); } }
.lore-tags--yes .lore-tag, #lore-likes-tags .lore-tag {
  background: rgba(34,197,94,0.15); color: #4ade80;
  border: 1px solid rgba(34,197,94,0.25);
}
.lore-tags--no .lore-tag, #lore-dislikes-tags .lore-tag {
  background: rgba(239,68,68,0.12); color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}
.lore-tag__del {
  background: transparent; border: none; cursor: pointer;
  font-size: 13px; padding: 0; line-height: 1;
  color: inherit; opacity: 0.6;
}
.lore-tag__del:hover { opacity: 1; }

.lore-tag-input {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 5px 10px;
  font-size: 13px; color: var(--stardust); outline: none; width: 100%;
  box-sizing: border-box;
}
.lore-tag-input:focus { border-color: rgba(139,92,246,0.4); background: rgba(255,255,255,0.07); }
.lore-tag-input::placeholder { color: rgba(255,255,255,0.2); }

/* Footer */
.lore-footer {
  display: flex; align-items: center; gap: 14px; padding-top: 4px;
}

@media(max-width: 540px) {
  .lore-likes-grid { grid-template-columns: 1fr; }
  .lore-likes-col--yes { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .lore-hero { flex-wrap: wrap; }
  .lore-completion { margin-left: 0; }
}

.mp-now-wip-preview { position: relative; display: inline-block; margin-bottom: 8px; }
.mp-now-wip-preview img { max-height: 150px; border-radius: 10px; }

/* ========== WISHLIST — redesign ========== */
.wish-pane { display: flex; flex-direction: column; gap: 16px; }

.wish-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(245,158,11,0.09), rgba(139,92,246,0.07));
  border: 1px solid rgba(245,158,11,0.15);
}
.wish-hero__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--starlight); margin: 0 0 3px; }
.wish-hero__sub   { font-size: 13px; color: var(--faint); margin: 0; }
.wish-counter {
  margin-left: auto; display: flex; align-items: baseline; gap: 2px;
  font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--starlight);
  flex-shrink: 0;
}
.wish-counter__max { font-size: 13px; color: var(--faint); }

/* Items list */
.wishlist-items { display: flex; flex-direction: column; gap: 8px; }
.wishlist-item-row {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 12px 16px;
  transition: background 0.15s;
}
.wishlist-item-row:hover { background: rgba(255,255,255,0.06); }
.wishlist-item-emoji {
  font-size: 26px; flex-shrink: 0;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border-radius: 10px;
}
.wishlist-item-body  { flex: 1; min-width: 0; }
.wishlist-item-title { font-weight: 700; font-size: 14px; color: var(--starlight); }
.wishlist-item-desc  { font-size: 12px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wishlist-item-link  {
  font-size: 11px; color: var(--violet); text-decoration: none; margin-top: 3px; display: inline-block;
}
.wishlist-item-link:hover { text-decoration: underline; }
.wishlist-item-del {
  background: transparent; border: 1px solid rgba(237,66,69,0.25);
  color: rgba(237,66,69,0.7); padding: 5px 10px; border-radius: 8px;
  font-size: 11px; cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.wishlist-item-del:hover { background: rgba(237,66,69,0.18); color: #f87171; border-color: rgba(237,66,69,0.5); }

/* Add card */
.wish-add-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; overflow: hidden;
}
.wish-add-card__head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--stardust);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}
.wish-add-card__head svg { stroke: var(--violet); }
.wish-add-card__foot {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.05);
}

/* Emoji selector */
.wish-emoji-section {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-wrap: wrap;
}
.wish-emoji-preview {
  font-size: 32px; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border-radius: 12px;
  border: 2px solid rgba(139,92,246,0.3); flex-shrink: 0;
}
.wish-emoji-grid {
  display: flex; flex-wrap: wrap; gap: 4px; flex: 1;
}
.we-btn {
  font-size: 20px; width: 36px; height: 36px; border-radius: 8px;
  background: transparent; border: 1px solid transparent;
  cursor: pointer; transition: all 0.12s; display: flex; align-items: center; justify-content: center;
}
.we-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); transform: scale(1.15); }
.we-btn--active { background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.5); }
.wish-emoji-custom {
  width: 60px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  text-align: center; font-size: 18px; padding: 6px 4px;
  color: var(--stardust); outline: none;
}
.wish-emoji-custom:focus { border-color: rgba(139,92,246,0.4); }

/* Fields */
.wish-fields {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
}
.wish-field { display: flex; flex-direction: column; gap: 4px; }
.wish-field__label { font-size: 12px; font-weight: 600; color: var(--stardust); }
.wish-field__label em { font-weight: 400; color: var(--faint); }
.wish-input {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 8px 12px;
  font-size: 13px; color: var(--stardust); outline: none;
}
.wish-input:focus { border-color: rgba(139,92,246,0.4); background: rgba(255,255,255,0.07); }
.wish-input::placeholder { color: rgba(255,255,255,0.2); }

/* compat old */
.wishlist-add-form { display: none; }
.wishlist-emoji-row { display: none; }
.wishlist-emoji-input { display: none; }

/* ── Custom fonts ── */
.fonts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.font-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 10px 14px;
}
.font-row__name   { flex: 1; font-weight: 600; font-size: 13px; }
.font-row__badge  { font-size: 10px; padding: 2px 7px; border-radius: 20px;
  background: rgba(61,143,104,0.2); color: var(--jade); border: 1px solid rgba(61,143,104,0.3); }
.font-row__toggle { font-size: 11px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: var(--muted); transition: all 0.15s; }
.font-row__toggle:hover { background: rgba(255,255,255,0.12); }
.font-row__del { background: rgba(237,66,69,0.1); border: 1px solid rgba(237,66,69,0.2);
  color: #ed4245; padding: 4px 8px; border-radius: 6px; font-size: 11px; cursor: pointer; transition: background 0.15s; }
.font-row__del:hover { background: rgba(237,66,69,0.25); }

.fonts-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.font-pick-btn {
  padding: 8px 16px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  color: var(--text); font-size: 13px; transition: all 0.15s;
}
.font-pick-btn:hover  { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.font-pick-btn.active { border-color: var(--jade); background: rgba(61,143,104,0.18); }
.font-pick-btn--none  { font-style: italic; color: var(--muted); }

/* Custom font application on vitrine */
.pp-font-custom,
.pp-font-custom .pp-name,
.pp-font-custom .pp-tagline,
.pp-font-custom .pp-section-label .psl-title,
.pp-font-custom .pp-fursona-name,
.pp-font-custom .pp-lore-quote,
.pp-font-custom h1, .pp-font-custom h2, .pp-font-custom h3 {
  font-family: var(--pp-font-custom, inherit);
}

/* ═══════════════════════════════════════════════════════════════════════
   Build 44 — Voice Channels
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Channel type selector in modal ── */
.modal-ch-type { margin-bottom: 16px; }
.modal-ch-type__label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.modal-ch-type__opts  { display: flex; flex-direction: column; gap: 6px; }
.modal-ch-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 10px; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03); transition: all 0.15s;
}
.modal-ch-opt:hover          { border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.07); }
.modal-ch-opt--active        { border-color: var(--jade); background: rgba(61,143,104,0.12); }
.modal-ch-opt__icon          { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.modal-ch-opt__name          { font-weight: 700; font-size: 13px; }
.modal-ch-opt__desc          { font-size: 11px; color: var(--muted); }

/* ── Voice channels in sidebar ── */
.channel--voice { color: var(--text); }
.channel--voice .channel__hash { font-style: normal; }
.channel--voice .channel__voice-users {
  padding-left: 32px;
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 2px;
}
.voice-user-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); padding: 3px 4px;
  border-radius: 6px; transition: background 0.1s;
}
.voice-user-item:hover { background: rgba(255,255,255,0.06); }
.voice-user-item__av   { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; overflow: hidden; font-size: 10px; }
.voice-user-item__name { flex: 1; }
.voice-user-item__icons { display: flex; gap: 3px; font-size: 11px; }
.voice-user-item--speaking .voice-user-item__av { outline: 2px solid #3ba55d; outline-offset: 1px; }
.voice-user-item--muted    { opacity: 0.55; }
.voice-user-item--you      { color: var(--jade); }

/* ── Voice panel (bottom of sidebar) ── */
.voice-panel {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 10px 8px 6px;
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.vp-channel { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.vp-channel__info { display: flex; align-items: center; gap: 8px; }
.vp-channel__icon { font-size: 16px; }
.vp-channel__name { font-size: 12px; font-weight: 700; color: #3ba55d; }
.vp-channel__status { font-size: 10px; color: var(--muted); }
.vp-participants   { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 0; }
.vp-avatar {
  position: relative; width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  font-size: 13px; cursor: pointer; transition: transform 0.15s;
}
.vp-avatar:hover { transform: scale(1.1); }
.vp-avatar--speaking { outline: 2px solid #3ba55d; outline-offset: 2px; }
.vp-avatar--muted::after    { content:"🔇"; position:absolute; bottom:-2px; right:-4px; font-size:11px; }
.vp-avatar--deafened::after { content:"🎧"; position:absolute; bottom:-2px; right:-4px; font-size:11px; }
.vp-controls { display: flex; gap: 6px; }
.vp-btn {
  flex: 1; padding: 8px; border-radius: 8px; font-size: 16px; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.15s; color: var(--text);
}
.vp-btn:hover               { background: rgba(255,255,255,0.14); transform: translateY(-1px); }
.vp-btn--active             { background: rgba(61,143,104,0.25); border-color: #3ba55d; }
.vp-btn--muted-on           { background: rgba(237,66,69,0.2);   border-color: #ed4245; }
.vp-btn--deafened-on        { background: rgba(237,66,69,0.2);   border-color: #ed4245; }
.vp-btn--disconnect         { background: rgba(237,66,69,0.12); border-color: rgba(237,66,69,0.3); color: #ed4245; }
.vp-btn--disconnect:hover   { background: rgba(237,66,69,0.25); }

/* ── Speaking ring on sidebar channel ── */
.channel--in-voice { background: rgba(61,143,104,0.1); border-left: 2px solid #3ba55d; }

/* ── Voice overlay on chat (when no text channel selected) ── */
.voice-chat-view {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 20px; color: var(--muted);
}
.voice-chat-view__icon { font-size: 64px; }
.voice-chat-view__title { font-size: 22px; font-weight: 700; color: var(--text); }
.voice-chat-view__sub   { font-size: 14px; }
.voice-chat-view__grid {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;
  max-width: 600px;
}
.voice-chat-av {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.voice-chat-av__ring {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid transparent; transition: border-color 0.15s;
  overflow: hidden; font-size: 28px;
}
.voice-chat-av--speaking .voice-chat-av__ring { border-color: #3ba55d; box-shadow: 0 0 16px rgba(59,165,93,0.5); }
.voice-chat-av__name { font-size: 12px; color: var(--text); font-weight: 600; max-width: 80px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-chat-av__badge { font-size: 14px; }

/* ── DM CALL OVERLAY ────────────────────────────────────────────────────── */
.call-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
}
.call-box {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 40px 48px; border-radius: 24px;
  min-width: 280px; text-align: center;
}
.call-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  border: 4px solid var(--accent);
  animation: call-pulse 1.2s ease-in-out infinite;
  overflow: hidden; font-size: 40px;
  display: flex; align-items: center; justify-content: center;
}
@keyframes call-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(88,101,242,0.5); }
  50%       { box-shadow: 0 0 0 16px rgba(88,101,242,0); }
}
.call-name   { font-size: 22px; font-weight: 700; color: var(--text); }
.call-status { font-size: 13px; color: var(--muted); }
.call-timer  { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--muted); }
.call-actions { display: flex; gap: 16px; margin-top: 8px; }
.call-btn {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s, box-shadow 0.2s;
}
.call-btn:hover { transform: scale(1.1); }
.call-btn--accept  { background: #3ba55d; box-shadow: 0 0 20px rgba(59,165,93,0.4); }
.call-btn--decline { background: #ed4245; box-shadow: 0 0 20px rgba(237,66,69,0.4); }
.call-btn--mute    { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); }
.call-btn--muted   { background: rgba(237,66,69,0.2); border-color: #ed4245; }

/* DM call button in chat header */
.dm-call-btn {
  background: rgba(59,165,93,0.15); border: 1px solid rgba(59,165,93,0.3);
  color: #3ba55d; border-radius: 8px; padding: 6px 14px; cursor: pointer;
  font-size: 16px; transition: background 0.15s;
}
.dm-call-btn:hover { background: rgba(59,165,93,0.28); }

/* ── SOUNDBOARD SETTINGS ────────────────────────────────────────────────── */
.sb-upload-zone {
  border: 2px dashed rgba(255,255,255,0.15); border-radius: 12px;
  padding: 24px; text-align: center; margin-bottom: 20px;
  transition: border-color 0.2s; cursor: pointer;
}
.sb-upload-zone.drag-over { border-color: var(--accent); background: rgba(88,101,242,0.05); }
.sb-upload-hint { font-size: 12px; color: var(--muted); display: block; margin-top: 8px; }
.sb-list { display: flex; flex-direction: column; gap: 8px; }
.sb-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04); border-radius: 10px;
  padding: 10px 14px; border: 1px solid rgba(255,255,255,0.08);
}
.sb-row__emoji { font-size: 22px; cursor: pointer; }
.sb-row__name  { flex: 1; font-size: 14px; font-weight: 600; }
.sb-row__play  { background: rgba(59,165,93,0.15); border: 1px solid rgba(59,165,93,0.3); color: #3ba55d; border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.sb-row__pub   { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); color: var(--muted); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.sb-row__del   { background: rgba(237,66,69,0.1); border: 1px solid rgba(237,66,69,0.25); color: #ed4245; border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 13px; }
.sb-row__pack  { background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.25); color: var(--violet); border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 13px; }
.sb-row__pack--in { background: rgba(139,92,246,0.25); color: #c4b5fd; }

/* ========== PACKS SYSTEM ========== */
.pack-pane { display: flex; flex-direction: column; gap: 0; }

/* Onglets */
.pack-tabs {
  display: flex; gap: 2px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 16px;
}
.pack-tab {
  padding: 7px 16px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: var(--stardust);
  font-size: 13px; font-weight: 600; transition: all 0.15s;
}
.pack-tab:hover { background: rgba(255,255,255,0.06); color: var(--starlight); }
.pack-tab--active { background: rgba(139,92,246,0.15); color: var(--violet); }
.pack-tab-pane { display: flex; flex-direction: column; gap: 14px; }

/* Toolbar */
.pack-toolbar {
  display: flex; align-items: center; gap: 12px;
}
.pack-toolbar__hint { font-size: 12px; color: var(--faint); }

/* Pack cards list */
.packs-list { display: flex; flex-direction: column; gap: 10px; }
.pack-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 14px 16px;
  transition: border-color 0.15s;
}
.pack-card:hover { border-color: rgba(255,255,255,0.15); }
.pack-card--public { border-color: rgba(139,92,246,0.25); }
.pack-card__icon { font-size: 28px; flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border-radius: 10px; }
.pack-card__body { flex: 1; min-width: 0; }
.pack-card__name { font-weight: 700; font-size: 14px; color: var(--starlight); }
.pack-card__meta { font-size: 12px; color: var(--faint); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.pack-card__desc { font-size: 12px; color: var(--stardust); margin-top: 4px; }
.pack-badge-pub { font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 20px; background: rgba(139,92,246,0.18); color: var(--violet); border: 1px solid rgba(139,92,246,0.3); }
.pack-badge-priv { font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 20px; background: rgba(255,255,255,0.07); color: var(--faint); border: 1px solid rgba(255,255,255,0.1); }
.pack-card__actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* Explorer cards */
.packs-list--explore .pack-card { cursor: default; }
.pack-adopt-btn {
  padding: 6px 14px; border-radius: 8px;
  background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.pack-adopt-btn:hover { background: rgba(34,197,94,0.25); }
.pack-adopt-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Pack form */
.pack-form {
  border-radius: 14px; padding: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  margin-top: 4px;
}
.pack-form__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; font-weight: 700; font-size: 14px; color: var(--starlight);
}
.pack-form__close {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  color: var(--stardust); width: 26px; height: 26px; border-radius: 50%;
  font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pack-form__emoji-row { display: flex; gap: 10px; margin-bottom: 12px; }
.pack-form__emoji-input {
  width: 52px; text-align: center; font-size: 22px; border-radius: 8px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  color: var(--starlight); outline: none; flex-shrink: 0;
}
.pack-form__name-input, .pack-form__field input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--stardust); outline: none;
}
.pack-form__field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.pack-form__field span { font-size: 12px; font-weight: 600; color: var(--stardust); }
.pack-form__toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--stardust); margin-bottom: 14px; cursor: pointer; }
.pack-form__toggle input { accent-color: var(--violet); }
.pack-form__actions { display: flex; gap: 8px; }

/* Pack detail */
.pack-detail { display: flex; flex-direction: column; gap: 12px; }
.pack-detail__back { background: transparent; border: none; color: var(--violet); cursor: pointer; font-size: 13px; font-weight: 600; padding: 0; text-align: left; }
.pack-detail__head { font-size: 16px; font-weight: 700; color: var(--starlight); display: flex; align-items: center; gap: 8px; }
.pack-detail__hint { font-size: 12px; color: var(--faint); margin: 0; }

/* Sticker grid in pack detail — cells with IN indicator */
.sticker-grid--pick .sticker-cell { cursor: pointer; }
.sticker-cell--in-pack { border-color: rgba(139,92,246,0.5); background: rgba(139,92,246,0.1); }
.sticker-cell--in-pack::after {
  content: "✓"; position: absolute; top: 3px; right: 5px;
  font-size: 11px; font-weight: 800; color: var(--violet);
}

/* ── SOUNDBOARD POPOVER (voice) ─────────────────────────────────────────── */
.sb-popover {
  position: fixed; z-index: 1300;
  background: var(--bg2); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 16px; min-width: 220px; max-width: 340px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
  animation: sb-pop-in 0.15s ease;
}
@keyframes sb-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.sb-popover__head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.sb-popover__grid { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-sound-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 10px 12px; cursor: pointer; min-width: 64px;
  transition: background 0.15s, transform 0.1s;
}
.sb-sound-btn:hover  { background: rgba(88,101,242,0.15); transform: scale(1.04); }
.sb-sound-btn:active { transform: scale(0.97); }
.sb-sound-btn__emoji { font-size: 24px; }
.sb-sound-btn__name  { font-size: 10px; color: var(--muted); text-align: center; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* soundboard button in voice panel */
.vp-btn--soundboard { opacity: 1; }
.vp-btn--soundboard-on { background: rgba(88,101,242,0.2); border-color: #5865f2; color: #fff; }

/* ── Voice event flash (centré en bas) ── */
.voice-flash {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 1500; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.voice-flash__item {
  background: rgba(30,30,36,0.92); border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px); border-radius: 24px;
  padding: 8px 20px; font-size: 13px; color: var(--text);
  white-space: nowrap; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: vflash-in 0.2s ease, vflash-out 0.3s ease 2.7s forwards;
}
.voice-flash__item--join  { border-color: rgba(59,165,93,0.4); }
.voice-flash__item--leave { border-color: rgba(237,66,69,0.3); }
@keyframes vflash-in  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes vflash-out { from { opacity:1; } to { opacity:0; transform:translateY(-8px); } }

/* ════════════════════════════════════════════════════════════════════════════
   BUILD 46 — SALON MÉDIA (visioconférence)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Sidebar ── */
.channel--media .channel__hash { color: #5865f2; }
.channel--media.channel--in-voice { border-left-color: #5865f2; background: rgba(88,101,242,0.08); }

/* ── Salons adultes (NSFW) ── */
.channel--nsfw .channel__hash { color: #f87171; }
.channel--nsfw .channel__name { color: var(--text-muted); }
.channel--nsfw:hover .channel__name,
.channel--nsfw.channel--active .channel__name { color: var(--text); }

.channel--announce .channel__hash { color: #f59e0b; }
.channel--announce .channel__name { color: var(--text-muted); }
.channel--announce:hover .channel__name,
.channel--announce.channel--active .channel__name { color: var(--text); }

/* ── Age gate modal ── */
.age-gate-modal {
  text-align: center; max-width: 420px; width: 100%;
}
.age-gate-modal__icon { font-size: 52px; margin-bottom: 10px; display: block; }
.age-gate-modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.age-gate-modal > p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.age-gate-modal__qr-hint {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px; margin-bottom: 20px;
}
.age-gate-modal__qr-icon { font-size: 28px; flex-shrink: 0; margin-top: 2px; }
.age-gate-modal__qr-hint strong { display: block; margin-bottom: 4px; font-size: 14px; }
.age-gate-modal__qr-hint p { color: var(--text-muted); font-size: 13px; margin: 0; line-height: 1.5; }
.age-gate-modal__actions { display: flex; gap: 10px; justify-content: center; }

/* ── Notification approbation d'âge (admin) ── */
.age-gate-notif {
  position: fixed; bottom: 80px; right: 20px; z-index: 2000;
  background: #1e1e2e; border: 1px solid #f59e0b;
  border-radius: 12px; padding: 16px 18px; width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideInRight 0.3s ease;
}
.age-gate-notif__header { font-size: 13px; font-weight: 600; color: #f59e0b; margin-bottom: 8px; }
.age-gate-notif__user { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.age-gate-notif__avatar { font-size: 22px; }
.age-gate-notif__reason { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.4; }
.age-gate-notif__btns { display: flex; gap: 8px; }
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Overlay principal ── */
.media-overlay {
  position: fixed; inset: 0; z-index: 1400;
  display: flex; flex-direction: column;
  background: #0d0d10;
}
.media-overlay__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.media-overlay__title { font-size: 15px; font-weight: 700; color: var(--text); }
.media-pip-btn {
  background: rgba(255,255,255,0.08); border: none; border-radius: 8px;
  color: var(--muted); font-size: 16px; padding: 4px 10px; cursor: pointer;
}
.media-pip-btn:hover { background: rgba(255,255,255,0.15); color: var(--text); }

/* ── Grille vidéo ── */
.media-grid {
  flex: 1; display: grid; gap: 8px; padding: 12px; overflow: hidden;
  align-content: center; justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.media-grid:has(.media-tile:only-child) { grid-template-columns: 1fr; max-width: 900px; margin: auto; }
.media-grid:has(.media-tile:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }

/* ── Tuile participant ── */
.media-tile {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #18181c; border: 2px solid transparent;
  aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}
.media-tile--speaking { border-color: #3ba55d; box-shadow: 0 0 0 2px rgba(59,165,93,0.3); }
.media-tile--self { border-color: rgba(88,101,242,0.5); }
.media-tile__video {
  width: 100%; height: 100%; object-fit: cover;
  display: block; background: #111;
}
.media-tile__video--hidden { display: none; }
.media-tile__avatar {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: absolute; inset: 0; justify-content: center;
}
.media-tile__av-ring {
  width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  border: 3px solid rgba(255,255,255,0.15); font-size: 28px;
  display: flex; align-items: center; justify-content: center;
}
.media-tile__name {
  position: absolute; bottom: 10px; left: 12px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600;
  color: #fff; display: flex; align-items: center; gap: 5px;
}
.media-tile__badges { display: flex; gap: 4px; font-size: 12px; }
.media-tile__screen-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(88,101,242,0.8); border-radius: 6px;
  padding: 2px 8px; font-size: 11px; color: #fff;
}

/* Tuile self en PIP quand plusieurs participants */
.media-grid:has(.media-tile:nth-child(2)) .media-tile--self {
  position: fixed; bottom: 90px; right: 16px; width: 180px; height: auto;
  aspect-ratio: 16/9; z-index: 1450; border-radius: 10px; border-color: rgba(88,101,242,0.7);
}

/* ── Barre de contrôles ── */
.media-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 14px 0 18px; flex-shrink: 0;
  background: rgba(0,0,0,0.5); border-top: 1px solid rgba(255,255,255,0.07);
}
.mc-btn {
  width: 52px; height: 52px; border-radius: 50%; border: none;
  cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); color: #fff;
  transition: background 0.15s, transform 0.1s, box-shadow 0.2s;
}
.mc-btn:hover { transform: scale(1.08); background: rgba(255,255,255,0.18); }
.mc-btn:active { transform: scale(0.95); }
.mc-btn--off { background: rgba(237,66,69,0.25); box-shadow: 0 0 0 1px rgba(237,66,69,0.5); }
.mc-btn--on  { background: rgba(88,101,242,0.3); box-shadow: 0 0 0 1px rgba(88,101,242,0.7); }
.mc-btn--leave {
  background: rgba(237,66,69,0.2); box-shadow: 0 0 0 1px rgba(237,66,69,0.4);
}
.mc-btn--leave:hover { background: rgba(237,66,69,0.4); }

/* ── Mode mini (PIP) ── */
.media-overlay--mini {
  inset: auto; bottom: 90px; right: 16px;
  width: 340px; height: auto; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  overflow: hidden;
}
.media-overlay--mini .media-grid {
  max-height: 200px; grid-template-columns: 1fr 1fr;
}
.media-overlay--mini .media-tile--self { position: relative; bottom: auto; right: auto; width: auto; }

/* ════════════════════════════════════════════════════════════════════════════
   BUILD 46c — MEDIA VIEW (inline dans #server-chat, remplace messages)
   ════════════════════════════════════════════════════════════════════════════ */
.media-view {
  display: flex; flex-direction: column;
  flex: 1 1 0; min-height: 0; background: #111214; overflow: hidden;
}

/* Grille vidéo adaptive */
.mv-grid {
  flex: 1 1 0; min-height: 0;
  display: grid; gap: 6px; padding: 10px;
  align-items: stretch; justify-items: stretch;
}
/* 1 participant */
.mv-grid.mv-1  { grid-template-columns: 1fr; }
/* 2 participants */
.mv-grid.mv-2  { grid-template-columns: 1fr 1fr; }
/* 3-4 participants */
.mv-grid.mv-3,
.mv-grid.mv-4  { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
/* 5-6 */
.mv-grid.mv-5,
.mv-grid.mv-6  { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
/* 7+ */
.mv-grid.mv-many { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Tuile vidéo */
.mv-tile {
  position: relative; border-radius: 10px; overflow: hidden;
  background: #1a1a1f; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  min-height: 0; aspect-ratio: unset;
  transition: border-color 0.15s;
}
.mv-tile--speaking { border-color: #3ba55d; box-shadow: 0 0 0 2px rgba(59,165,93,0.25); }

.mv-tile__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #111;
}
.mv-tile__video[hidden] { display: none; }

.mv-tile__avatar {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 1; pointer-events: none;
}
.mv-tile__av {
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  border: 3px solid rgba(255,255,255,0.1); font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  background: #2a2a32;
}
.mv-tile__av-name {
  font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 600;
}

/* Barre nom + badges en bas de tuile */
.mv-tile__bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 24px 10px 8px;
  display: flex; align-items: center; gap: 6px;
  z-index: 2;
}
.mv-tile__name { font-size: 12px; font-weight: 700; color: #fff; flex: 1; }
.mv-tile__icons { font-size: 12px; display: flex; gap: 4px; }

/* Badge partage écran */
.mv-tile__screenbadge {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  background: rgba(88,101,242,0.85); color: #fff;
  border-radius: 5px; padding: 2px 7px; font-size: 11px; font-weight: 600;
}

/* Contrôles en bas */
.mv-controls {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 0 12px; background: rgba(0,0,0,0.35);
  border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0;
}
.mvc-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); color: #fff;
  transition: background 0.15s, transform 0.1s;
}
.mvc-btn:hover  { background: rgba(255,255,255,0.2); transform: scale(1.08); }
.mvc-btn--off   { background: rgba(237,66,69,0.25); box-shadow: 0 0 0 1px #ed4245; }
.mvc-btn--on    { background: rgba(59,165,93,0.25);  box-shadow: 0 0 0 1px #3ba55d; }
.mvc-btn--leave { background: rgba(237,66,69,0.2);   box-shadow: 0 0 0 1px rgba(237,66,69,0.5); }
.mvc-btn--leave:hover { background: #ed4245; }

/* header media channel */
.chat__head--media .chat__hash { color: #5865f2; }

/* ========== PHASE 5 — CONFORT & QUALITÉ ========== */

/* ── Badges non-lus canaux serveur ────────────────────────────── */
.channel__unread {
  margin-left: auto; flex-shrink: 0;
  background: #ed4245; color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.channel--unread .channel__name { color: var(--starlight) !important; font-weight: 600; }
.channel--unread .channel__hash { color: var(--starlight) !important; }

/* ── Recherche dans le canal ───────────────────────────────────── */
.ch-search-wrap {
  flex: 1; display: flex; align-items: center;
}
.ch-search-input {
  width: 100%; max-width: 320px; height: 32px;
  background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 0 12px; font-size: 13px;
  color: var(--starlight); outline: none; transition: border-color 0.15s;
}
.ch-search-input:focus { border-color: var(--violet); }
.ch-search-input::placeholder { color: var(--faint); }

/* Panneau résultats de recherche */
.search-panel {
  position: fixed; top: 0; right: 0; width: 380px; max-width: 100vw;
  height: 100vh; z-index: 600;
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.07);
  background: rgba(14,14,15,0.97);
  backdrop-filter: blur(20px);
  animation: slideInRight 0.2s ease;
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.search-panel__head {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 16px 12px; border-bottom: 1px solid rgba(255,255,255,0.07);
  font-weight: 700; font-size: 14px; color: var(--starlight);
  flex-shrink: 0;
}
.search-panel__count { font-size: 11px; color: var(--faint); font-weight: 400; margin-left: 2px; }
.search-panel__close {
  margin-left: auto; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  color: var(--stardust); width: 26px; height: 26px; border-radius: 50%;
  font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.search-panel__list { flex: 1; overflow-y: auto; padding: 8px; }
.search-result {
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  margin-bottom: 4px; transition: background 0.1s;
  border: 1px solid transparent;
}
.search-result:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); }
.search-result__meta {
  font-size: 11px; color: var(--faint); margin-bottom: 4px;
  display: flex; gap: 8px; align-items: center;
}
.search-result__author { color: var(--violet); font-weight: 600; }
.search-result__text { font-size: 13px; color: var(--stardust); line-height: 1.5; }
.search-result__text mark {
  background: rgba(196,154,36,0.3); color: var(--starlight);
  border-radius: 3px; padding: 0 2px; font-style: normal;
}
.search-empty { text-align: center; color: var(--faint); padding: 40px 20px; font-size: 14px; }

/* ── Bannière offline ─────────────────────────────────────────── */
.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #1e1409; border-bottom: 1px solid rgba(245,158,11,0.4);
  color: #fbbf24; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px; animation: slideDown 0.3s ease;
}
.offline-banner--reconnected {
  background: #0d1f14; border-color: rgba(34,197,94,0.4); color: #4ade80;
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
.offline-banner__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fbbf24; animation: pulse 1.2s ease infinite;
}
.offline-banner--reconnected .offline-banner__dot { background: #4ade80; animation: none; }

/* ── Raccourcis clavier modal ──────────────────────────────────── */
.shortcuts-modal {
  width: 460px; max-width: 95vw; border-radius: 16px; padding: 0; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 25px 80px rgba(0,0,0,0.7);
  animation: modalIn 0.15s ease;
}
.shortcuts-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.07);
  font-weight: 700; font-size: 15px; color: var(--starlight);
}
.shortcuts-modal__close {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  color: var(--stardust); width: 28px; height: 28px; border-radius: 50%;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.shortcuts-modal__body { padding: 16px 20px; display: flex; flex-direction: column; gap: 20px; }
.shortcut-section__title { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--faint); text-transform: uppercase; margin-bottom: 8px; }
.shortcut-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 13px; color: var(--stardust); }
.shortcut-row span { margin-left: 4px; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 5px; padding: 2px 7px; font-size: 11px; font-weight: 700;
  color: var(--starlight); font-family: var(--font-mono); white-space: nowrap;
  box-shadow: 0 2px 0 rgba(255,255,255,0.1);
}

/* ── Navigation rapide (Ctrl+K) ───────────────────────────────── */
.quicknav {
  width: 500px; max-width: 95vw; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 90px rgba(0,0,0,0.8);
  animation: modalIn 0.12s ease;
}
.quicknav__search {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.quicknav__search svg { flex-shrink: 0; color: var(--faint); }
#quicknav-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 15px; color: var(--starlight);
}
#quicknav-input::placeholder { color: var(--faint); }
.quicknav__search kbd { flex-shrink: 0; }
.quicknav__list { max-height: 360px; overflow-y: auto; padding: 6px; }
.quicknav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer;
  transition: background 0.1s; border: 1px solid transparent;
}
.quicknav-item:hover, .quicknav-item--active { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.08); }
.quicknav-item__icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; background: rgba(255,255,255,0.07); flex-shrink: 0; }
.quicknav-item__name { font-size: 13px; font-weight: 600; color: var(--starlight); }
.quicknav-item__sub  { font-size: 11px; color: var(--faint); }
.quicknav-section { padding: 6px 12px 2px; font-size: 10px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Thème clair ──────────────────────────────────────────────── */
.mp-lightmode-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.mp-mode-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: var(--stardust);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.mp-mode-btn:hover { background: rgba(255,255,255,0.09); color: var(--starlight); }
.mp-mode-btn--active { border-color: var(--violet); background: rgba(139,92,246,0.15); color: var(--starlight); }
.mp-mode-btn__icon { font-size: 16px; }

/* Composer drop-zone active */
.composer--drag-over {
  background: rgba(139,92,246,0.08);
  outline: 2px dashed rgba(139,92,246,0.5);
  outline-offset: -4px;
}

/* ── Thème clair — variables ──────────────────────────────────── */
body.theme-light {
  --bg:       #f0f2f5;
  --bg-2:     #e4e7ec;
  --bg-3:     #d8dce4;
  --surface:  #ffffff;
  --glass:    rgba(255,255,255,0.85);
  --glass-2:  rgba(0,0,0,0.06);
  --line:     rgba(0,0,0,0.10);
  --starlight:#111318;
  --stardust: #3a3d47;
  --faint:    #757c8e;
  --muted:    #8b93a5;

  background: var(--bg);
  color: var(--starlight);
}
body.theme-light .channels        { background: var(--bg-2); }
body.theme-light .app-rail        { background: var(--bg-3); }
body.theme-light #members-panel   { background: var(--bg-2); border-left-color: rgba(0,0,0,0.08); }
body.theme-light .chat__head      { background: rgba(255,255,255,0.9); border-bottom-color: rgba(0,0,0,0.08); }
body.theme-light .composer        { background: rgba(255,255,255,0.85); border-top-color: rgba(0,0,0,0.08); }
body.theme-light .messages        { background: var(--bg); }
body.theme-light .msg-block       { background: transparent; }
body.theme-light .msg-block:hover { background: rgba(0,0,0,0.03); }
body.theme-light #server-sidebar.channels,
body.theme-light #dm-sidebar.channels { border-right-color: rgba(0,0,0,0.08); }
body.theme-light .glass           { background: rgba(255,255,255,0.92); border-color: rgba(0,0,0,0.1); }
body.theme-light .modal-bg        { background: rgba(0,0,0,0.4); }
body.theme-light .composer__input-wrap { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }
body.theme-light textarea, body.theme-light input[type="text"],
body.theme-light input[type="password"], body.theme-light input[type="email"] {
  background: #fff; color: var(--starlight); border-color: rgba(0,0,0,0.15);
}
body.theme-light .channel:hover { background: rgba(0,0,0,0.05); }
body.theme-light .channel--active { background: rgba(0,0,0,0.09) !important; }
body.theme-light .btn--ghost      { border-color: rgba(0,0,0,0.15); color: var(--starlight); }
body.theme-light .btn--ghost:hover { background: rgba(0,0,0,0.06); }
body.theme-light kbd { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.2); color: var(--starlight); }
body.theme-light .offline-banner { background: #fef3c7; color: #92400e; border-color: rgba(245,158,11,0.5); }
body.theme-light .search-panel   { background: rgba(240,242,245,0.98); border-left-color: rgba(0,0,0,0.08); }
body.theme-light .search-result:hover { background: rgba(0,0,0,0.05); }
body.theme-light .mp-mode-btn    { background: rgba(0,0,0,0.05); color: var(--starlight); border-color: rgba(0,0,0,0.12); }
body.theme-light .mp-mode-btn--active { background: rgba(139,92,246,0.12); border-color: var(--violet); }

/* ========== BOTS & WEBHOOKS ========== */

/* Bot pane hero */
.bot-hero {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(135deg, rgba(88,101,242,0.1), rgba(139,92,246,0.06));
  border: 1px solid rgba(88,101,242,0.25); border-radius: 14px;
  padding: 16px 20px; margin-bottom: 18px;
}
.bot-hero__icon { font-size: 32px; flex-shrink: 0; }
.bot-hero__title { font-weight: 700; font-size: 16px; color: var(--starlight); margin-bottom: 4px; }
.bot-hero__sub { font-size: 12px; color: var(--faint); line-height: 1.5; }

/* Bot form */
.bot-form {
  border-radius: 14px; padding: 18px; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.1);
}
.bot-form__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; font-weight: 700; font-size: 14px; color: var(--starlight);
}
.bot-form__avatar-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.bot-form__color { width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); cursor: pointer; flex-shrink: 0; }
.bot-form__name-fields { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bot-form__input {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--stardust); outline: none; width: 100%;
}
.bot-form__input:focus { border-color: var(--violet); }
.bot-form__field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.bot-form__field span { font-size: 12px; font-weight: 600; color: var(--stardust); }
.bot-form__field textarea {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--stardust); outline: none; resize: vertical;
}
.bot-form__select {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--stardust); outline: none;
  width: 100%; margin-bottom: 10px;
}

/* Bot list */
.bot-list { display: flex; flex-direction: column; gap: 10px; }
.bot-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 14px 16px; cursor: pointer;
  transition: border-color 0.15s;
}
.bot-card:hover { border-color: rgba(88,101,242,0.4); }
.bot-card__avatar {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.bot-card__body { flex: 1; min-width: 0; }
.bot-card__name { font-weight: 700; font-size: 14px; color: var(--starlight); display: flex; align-items: center; gap: 6px; }
.bot-card__user { font-size: 12px; color: var(--faint); }
.bot-badge {
  font-size: 9px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 7px;
  border-radius: 20px; background: rgba(88,101,242,0.2); color: #a5b4fc;
  border: 1px solid rgba(88,101,242,0.4); vertical-align: middle;
}

/* Bot detail */
.bot-detail { display: flex; flex-direction: column; gap: 0; }
.bot-detail__header {
  display: flex; gap: 16px; align-items: center; padding: 16px 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 20px;
}
.bot-detail__avatar {
  width: 60px; height: 60px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.bot-detail__name { font-weight: 700; font-size: 18px; color: var(--starlight); font-family: var(--font-display); }
.bot-detail__username { font-size: 13px; color: var(--faint); }
.bot-detail__badges { margin-top: 4px; }

/* Bot sections */
.bot-section { margin-bottom: 24px; }
.bot-section__title {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.bot-section__hint { font-size: 12px; color: var(--faint); margin-bottom: 10px; margin-top: -6px; }
.bot-section__hint-inline { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; }
.bot-section__warn {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #fbbf24; margin-bottom: 12px;
}

/* Bot servers list */
.bot-servers-list { display: flex; flex-direction: column; gap: 8px; }
.bot-server-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 10px 14px;
}
.bot-server-row__name { flex: 1; font-size: 13px; font-weight: 600; color: var(--starlight); }
.bot-server-row__status { font-size: 11px; font-weight: 600; }
.bot-server-row__status--in { color: #4ade80; }
.bot-server-row__status--out { color: var(--faint); }

/* Bot tokens */
.bot-token-form {
  padding: 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px;
}
.bot-tokens-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bot-token-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 10px 14px;
}
.bot-token-row__prefix {
  font-family: var(--font-mono); font-size: 12px; color: var(--violet); flex: 1;
}
.bot-token-row__label { font-size: 12px; color: var(--stardust); }
.bot-token-row__date  { font-size: 11px; color: var(--faint); }
.bot-token-reveal {
  padding: 14px; border-radius: 12px; border: 1px solid rgba(34,197,94,0.25);
  background: rgba(34,197,94,0.05); margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px;
}
.bot-token-reveal__label { font-size: 12px; color: #4ade80; display: flex; gap: 6px; align-items: center; }
.bot-token-reveal__token {
  font-family: var(--font-mono); font-size: 12px; color: var(--starlight);
  background: rgba(0,0,0,0.3); border-radius: 6px; padding: 8px 12px;
  word-break: break-all; user-select: all;
}

/* Bot commands */
.bot-cmds-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bot-cmd-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 10px 14px;
}
.bot-cmd-row__name { font-family: var(--font-mono); font-size: 13px; color: var(--violet); font-weight: 600; }
.bot-cmd-row__desc { flex: 1; font-size: 12px; color: var(--stardust); }
.bot-cmd-row__usage { font-size: 11px; color: var(--faint); }

/* Webhooks */
.webhook-channel-picker { display: flex; flex-direction: column; gap: 6px; }
.webhook-server-item__header {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); padding: 4px 0;
}
.webhook-channel-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; color: var(--stardust);
  transition: all 0.12s; text-align: left;
}
.webhook-channel-btn:hover { background: rgba(255,255,255,0.08); color: var(--starlight); }
.webhook-channel-btn--active { border-color: rgba(88,101,242,0.5); background: rgba(88,101,242,0.08); color: var(--starlight); }
.webhook-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 14px; margin-bottom: 8px;
}
.webhook-card__icon { font-size: 24px; flex-shrink: 0; }
.webhook-card__body { flex: 1; min-width: 0; }
.webhook-card__name { font-weight: 700; font-size: 13px; color: var(--starlight); }
.webhook-card__prefix { font-family: var(--font-mono); font-size: 11px; color: var(--violet); margin-top: 2px; }
.webhook-card__date { font-size: 11px; color: var(--faint); margin-top: 2px; }
.webhook-url-box {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 8px 12px; font-family: var(--font-mono);
  font-size: 11px; color: var(--violet); word-break: break-all;
  margin-top: 8px; user-select: all;
}

/* SDK */
.sdk-section { margin-bottom: 20px; }
.sdk-section__title {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); margin-bottom: 8px;
}

/* Slash autocomplete in composer */
.slash-popup {
  position: fixed; z-index: 9001; width: 320px;
  background: rgba(20,20,28,0.97); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 6px; box-shadow: 0 16px 50px rgba(0,0,0,0.7);
  animation: modalIn 0.1s ease;
}
.slash-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: transparent; border: 0; cursor: pointer; padding: 8px 10px; border-radius: 8px;
  transition: background 0.1s;
}
.slash-opt:hover, .slash-opt--active { background: rgba(88,101,242,0.15); }
.slash-opt__name { font-family: var(--font-mono); font-size: 13px; color: var(--violet); font-weight: 700; }
.slash-opt__desc { flex: 1; font-size: 12px; color: var(--stardust); }
.slash-opt__badge {
  font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 20px;
  background: rgba(88,101,242,0.15); color: #a5b4fc; border: 1px solid rgba(88,101,242,0.3);
}
.slash-opt__badge--builtin {
  background: rgba(34,197,94,0.12); color: #4ade80; border-color: rgba(34,197,94,0.3);
}

/* ========== CONFIRM MODAL ========== */
.confirm-box {
  width: 380px; border-radius: 20px; padding: 28px 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; animation: modalIn 0.18s ease;
}
.confirm-box__icon { font-size: 36px; margin-bottom: 2px; }
.confirm-box__title { font-weight: 800; font-size: 17px; color: var(--starlight); }
.confirm-box__msg { font-size: 13px; color: var(--stardust); line-height: 1.5; max-width: 300px; }
.confirm-box__actions { display: flex; gap: 10px; margin-top: 8px; width: 100%; justify-content: center; }

/* ========== TOKEN MODAL ========== */
.token-modal-box {
  width: 480px; max-width: 95vw; border-radius: 20px; padding: 28px;
  display: flex; flex-direction: column; gap: 14px; animation: modalIn 0.2s ease;
  border: 1px solid rgba(34,197,94,0.2);
}
.token-modal-box__head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.token-modal-box__check {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(34,197,94,0.15);
  border: 2px solid rgba(34,197,94,0.4); display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #4ade80;
}
.token-modal-box__title { font-weight: 800; font-size: 18px; color: var(--starlight); }
.token-modal-box__sub { font-size: 12px; color: var(--stardust); text-align: center; }
.token-modal-box__warn {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #fbbf24;
}
.token-modal-box__token {
  font-family: var(--font-mono); font-size: 12px; color: var(--starlight);
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 12px 14px; word-break: break-all;
  user-select: all; cursor: text; line-height: 1.6;
}
.token-modal-box__actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ========== FLOW EDITOR MODAL ========== */
.flow-editor {
  width: 640px; max-width: 96vw; max-height: 88vh; border-radius: 20px;
  display: flex; flex-direction: column; animation: modalIn 0.18s ease; overflow: hidden;
}
.flow-editor__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px; font-weight: 800; font-size: 16px; color: var(--starlight);
  border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
}
.flow-editor__body {
  flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px;
}
.flow-editor__row { display: flex; align-items: center; gap: 10px; }
.flow-editor__label { font-size: 12px; font-weight: 700; color: var(--faint); white-space: nowrap; }
.flow-editor__foot {
  display: flex; align-items: center; gap: 8px; padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
}
.flow-section { display: flex; flex-direction: column; gap: 8px; }
.flow-section__title {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); display: flex; align-items: center; gap: 6px;
}
.flow-section__hint { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; }
.flow-trigger-card { border-radius: 12px; padding: 14px; border: 1px solid rgba(255,255,255,0.08); }

.flow-action-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 14px; margin-bottom: 8px;
}
.flow-action-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.flow-action-card__type { font-size: 12px; font-weight: 700; color: var(--violet); flex: 1; }
.flow-action-card__remove {
  background: transparent; border: 0; cursor: pointer; color: var(--faint);
  font-size: 14px; padding: 2px 6px; border-radius: 6px; transition: color 0.1s;
}
.flow-action-card__remove:hover { color: #f87171; }
.flow-action-card__field { margin-bottom: 8px; }
.flow-action-card__field label { display: block; font-size: 11px; font-weight: 600; color: var(--faint); margin-bottom: 3px; }
.flow-action-card__field input,
.flow-action-card__field select,
.flow-action-card__field textarea {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 7px 10px; font-size: 12px; color: var(--stardust); outline: none;
}
.flow-action-card__field input:focus,
.flow-action-card__field select:focus,
.flow-action-card__field textarea:focus { border-color: var(--violet); }
.flow-action-card__hint { font-size: 10px; color: var(--faint); margin-top: 3px; }
.flow-preset-chip {
  display: inline-block; background: rgba(88,101,242,0.1); border: 1px solid rgba(88,101,242,0.25);
  border-radius: 20px; padding: 3px 10px; font-size: 11px; color: #a5b4fc;
  cursor: pointer; transition: all 0.1s; margin-right: 4px; margin-bottom: 4px;
}
.flow-preset-chip:hover { background: rgba(88,101,242,0.2); }

.bot-flows-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.flow-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 12px 14px; transition: border-color 0.15s;
}
.flow-row:hover { border-color: rgba(88,101,242,0.3); }
.flow-row__icon { font-size: 18px; flex-shrink: 0; }
.flow-row__body { flex: 1; min-width: 0; }
.flow-row__name { font-weight: 700; font-size: 13px; color: var(--starlight); }
.flow-row__meta { font-size: 11px; color: var(--faint); margin-top: 2px; }
.flow-row__stats { font-size: 11px; color: var(--faint); }
.flow-toggle {
  width: 36px; height: 20px; border-radius: 20px; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.1); transition: background 0.2s; flex-shrink: 0; position: relative;
}
.flow-toggle::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: white; top: 3px; left: 3px; transition: transform 0.2s;
}
.flow-toggle--on { background: var(--violet); }
.flow-toggle--on::after { transform: translateX(16px); }

.action-picker { width: 440px; max-width: 96vw; border-radius: 20px; padding: 22px; animation: modalIn 0.15s ease; }
.action-picker__title { font-weight: 800; font-size: 15px; color: var(--starlight); margin-bottom: 14px; }
.action-picker__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.action-type-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; text-align: left;
  transition: border-color 0.15s; width: 100%;
}
.action-type-btn:hover { border-color: rgba(88,101,242,0.4); background: rgba(88,101,242,0.06); }
.action-type-btn__icon { font-size: 20px; }
.action-type-btn__label { font-size: 13px; font-weight: 700; color: var(--starlight); }
.action-type-btn__desc { font-size: 11px; color: var(--faint); }
.action-picker__presets-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--faint); margin-bottom: 8px;
}
.action-picker__presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--stardust);
  cursor: pointer; transition: all 0.12s;
}
.preset-btn:hover { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.3); color: var(--starlight); }

.flow-log-row { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 11px; }
.flow-log-row__status--ok { color: #4ade80; }
.flow-log-row__status--error { color: #f87171; }
.flow-log-row__status--skipped { color: #fbbf24; }
.flow-log-row__time { color: var(--faint); }
.flow-log-row__msg { color: var(--stardust); flex: 1; }

/* Flow no-token banner */
.flow-notoken-banner {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(34,197,94,0.06); border: 1px solid rgba(34,197,94,0.18);
  border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--stardust);
  margin-bottom: 10px; line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════════
   BOT UI — redesign v2 (override)
   ════════════════════════════════════════════════════════════════════ */

/* ── Bot list cards ─── */
.bot-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px; padding: 16px 18px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  position: relative; overflow: hidden;
}
.bot-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 16px;
  background: linear-gradient(135deg, rgba(88,101,242,0.04), transparent 60%);
  pointer-events: none;
}
.bot-card:hover {
  border-color: rgba(88,101,242,0.45);
  background: rgba(88,101,242,0.04);
  transform: translateY(-1px);
}
.bot-card__avatar {
  width: 48px; height: 48px; border-radius: 14px;
  font-size: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.bot-card__name { font-size: 15px; }
.bot-card__chevron { font-size: 16px; color: var(--faint); transition: transform 0.15s; }
.bot-card:hover .bot-card__chevron { transform: translateX(3px); color: var(--violet); }

/* ── Bot detail header ── */
.bot-detail { gap: 0; }
.bot-detail__header {
  background: linear-gradient(135deg, rgba(88,101,242,0.12) 0%, rgba(139,92,246,0.07) 60%, transparent 100%);
  border: 1px solid rgba(88,101,242,0.2); border-radius: 18px;
  padding: 22px; margin-bottom: 22px; position: relative; overflow: hidden;
}
.bot-detail__header::after {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.15), transparent 70%);
  pointer-events: none;
}
.bot-detail__avatar {
  width: 68px; height: 68px; border-radius: 18px; font-size: 34px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.1);
}
.bot-detail__name { font-size: 20px; letter-spacing: -0.02em; }
.bot-detail__username { font-size: 12px; }
.bot-detail__badges { display: flex; gap: 6px; margin-top: 6px; }
.bot-badge {
  font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 20px;
  background: rgba(88,101,242,0.25); color: #c4b5fd;
  border: 1px solid rgba(88,101,242,0.5); letter-spacing: 0.06em;
}
.bot-badge--online {
  background: rgba(34,197,94,0.15); color: #4ade80;
  border-color: rgba(34,197,94,0.35);
}

/* ── Bot sections as visual cards ── */
.bot-section {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px; padding: 16px 18px; margin-bottom: 14px;
}
.bot-section__title {
  font-size: 11px; letter-spacing: 0.1em; margin-bottom: 12px;
  color: var(--stardust); display: flex; align-items: center; gap: 8px;
}
.bot-section__title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: var(--violet); flex-shrink: 0;
}
.bot-section__hint {
  font-size: 12px; color: var(--faint); margin-bottom: 12px; margin-top: -4px;
  line-height: 1.5;
}
.bot-section__hint-inline {
  font-size: 10px; background: rgba(88,101,242,0.12);
  color: #a5b4fc; padding: 2px 8px; border-radius: 20px;
  border: 1px solid rgba(88,101,242,0.25); white-space: nowrap;
}
.bot-section__warn {
  border-radius: 12px; padding: 10px 14px; font-size: 12px; margin-bottom: 14px;
}

/* Section accent colors */
.bot-section--servers .bot-section__title::before { background: #34d399; }
.bot-section--tokens  .bot-section__title::before { background: #fbbf24; }
.bot-section--cmds    .bot-section__title::before { background: #60a5fa; }
.bot-section--flows   .bot-section__title::before { background: #a78bfa; }

/* ── Server rows ── */
.bot-server-row {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 11px 14px; transition: border-color 0.12s;
}
.bot-server-row:hover { border-color: rgba(255,255,255,0.12); }
.bot-server-row__icon {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; background: rgba(88,101,242,0.12);
}
.bot-server-row__name { font-size: 13px; font-weight: 600; color: var(--starlight); }
.bot-server-row__status { font-size: 11px; font-weight: 600; }
.bot-server-row .btn { font-size: 11px; padding: 5px 12px; }

/* ── Token rows ── */
.bot-token-row {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 12px 14px; transition: border-color 0.12s;
}
.bot-token-row:hover { border-color: rgba(245,158,11,0.25); }
.bot-token-row__icon {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: rgba(245,158,11,0.1); display: flex; align-items: center;
  justify-content: center; font-size: 15px;
}
.bot-token-row__prefix { font-family: var(--font-mono); font-size: 12px; color: #fbbf24; }
.bot-token-row__label { font-size: 12px; color: var(--starlight); font-weight: 600; }
.bot-token-row__scope { font-size: 10px; color: var(--faint); }
.bot-token-row__date  { font-size: 10px; color: var(--faint); }
.bot-token-row .btn--danger { font-size: 11px; padding: 4px 10px; opacity: 0.6; transition: opacity 0.1s; }
.bot-token-row:hover .btn--danger { opacity: 1; }

/* ── Command rows ── */
.bot-cmd-row {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 11px 14px; transition: border-color 0.12s;
}
.bot-cmd-row:hover { border-color: rgba(96,165,250,0.25); }
.bot-cmd-row__name {
  font-family: var(--font-mono); font-size: 13px; color: #60a5fa;
  font-weight: 700; background: rgba(96,165,250,0.1);
  padding: 2px 8px; border-radius: 6px;
}
.bot-cmd-row__desc { font-size: 12px; color: var(--stardust); }

/* ── Flow rows ── */
.flow-row {
  background: rgba(255,255,255,0.03); border-radius: 12px; padding: 13px 15px;
  border: 1px solid rgba(255,255,255,0.07);
}
.flow-row:hover { border-color: rgba(167,139,250,0.3); }
.flow-row__icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: rgba(167,139,250,0.12); display: flex; align-items: center;
  justify-content: center; font-size: 16px;
}
.flow-row__name { font-weight: 700; font-size: 13px; color: var(--starlight); }
.flow-row__meta { font-size: 11px; color: var(--faint); margin-top: 1px; }

/* ── Buttons in bot sections ── */
.bot-section .btn--ghost {
  border: 1px dashed rgba(255,255,255,0.15);
  background: transparent; color: var(--faint); font-size: 12px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.bot-section .btn--ghost:hover {
  border-color: var(--violet); color: #c4b5fd;
  background: rgba(88,101,242,0.07);
}

/* ── Danger zone ── */
.bot-section--danger {
  background: rgba(239,68,68,0.04);
  border: 1px solid rgba(239,68,68,0.15);
}
.bot-section--danger .bot-section__title { color: #f87171; }
.bot-section--danger .bot-section__title::before { background: #ef4444; }

/* ════════════════════════════════════════════════════════════════════
   GLOBAL SELECT / OPTION — dark theme forced
   ════════════════════════════════════════════════════════════════════ */
select {
  color-scheme: dark;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--starlight);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: auto;
}
select:focus { border-color: var(--violet); }
select option {
  background: #1a1a2e;
  color: var(--starlight);
  padding: 6px 10px;
}
select option:checked,
select option:hover {
  background: rgba(88,101,242,0.35);
}

/* ── Flow test result panel ── */
.flow-test-result {
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 14px 16px; margin-top: 4px;
  font-size: 12px; line-height: 1.6; font-family: var(--font-mono);
  max-height: 180px; overflow-y: auto; color: var(--stardust);
  animation: modalIn 0.15s ease;
}
.flow-test-result__line { display: flex; gap: 8px; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.flow-test-result__line:last-child { border-bottom: 0; }
.flow-test-result__icon { flex-shrink: 0; width: 16px; text-align: center; }
.flow-test-result__ok   { color: #4ade80; }
.flow-test-result__err  { color: #f87171; }
.flow-test-result__info { color: #60a5fa; }
.flow-test-result__warn { color: #fbbf24; }

/* ════════════════════════════════════════════════════════════════════
   BOT PROFILE CARD (pp-bot-card)
   ════════════════════════════════════════════════════════════════════ */
.pp-bot-card {
  padding: 0;
}
.pp-bot-card__inner {
  background: linear-gradient(135deg, rgba(88,101,242,0.08) 0%, rgba(139,92,246,0.05) 50%, rgba(0,0,0,0.2) 100%);
  border: 1px solid rgba(88,101,242,0.2); border-radius: 20px;
  padding: 22px 24px; display: flex; flex-direction: column; gap: 16px;
  backdrop-filter: blur(8px);
}
.pp-bot-card__header { display: flex; gap: 14px; align-items: flex-start; }
.pp-bot-card__icon {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(88,101,242,0.3), rgba(139,92,246,0.2));
  border: 1px solid rgba(88,101,242,0.35);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.pp-bot-card__title { font-weight: 800; font-size: 15px; color: var(--starlight); margin-bottom: 2px; }
.pp-bot-card__sub { font-size: 12px; color: var(--faint); }
.pp-bot-cmds { display: flex; flex-direction: column; gap: 6px; }
.pp-bot-cmd {
  display: flex; gap: 10px; align-items: center;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 9px 14px;
}
.pp-bot-cmd__name {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: #60a5fa; background: rgba(96,165,250,0.1);
  padding: 2px 8px; border-radius: 6px; flex-shrink: 0;
}
.pp-bot-cmd__desc { font-size: 12px; color: var(--stardust); }
.pp-bot-cmd__empty { font-size: 12px; color: var(--faint); font-style: italic; padding: 4px 0; }
.pp-bot-card__flows-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint);
}
.pp-bot-flows-count { font-size: 13px; color: var(--stardust); }
.pp-bot-card__footer {
  display: flex; align-items: center; gap: 8px;
  padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 12px; color: var(--faint);
}
.pp-bot-card__stat { color: var(--stardust); }
.pp-bot-card__stat span { color: var(--violet); font-weight: 700; }
.pp-bot-card__stat-sep { color: rgba(255,255,255,0.15); }

/* ── Bot profile card redesign ── */
.pp-bot-online-pill {
  background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80; border-radius: 20px; padding: 4px 12px;
  font-size: 11px; font-weight: 700; white-space: nowrap; align-self: flex-start;
}
.pp-bot-section-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); margin-top: 4px;
}
.pp-bot-flows-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.pp-bot-flow-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 8px 12px;
}
.pp-bot-flow-chip__trigger {
  font-size: 11px; color: var(--faint); flex-shrink: 0;
}
.pp-bot-flow-chip__name { font-size: 12px; color: var(--stardust); font-weight: 600; flex: 1; }
.pp-bot-flow-chip__count {
  font-size: 11px; color: var(--violet); font-weight: 700;
  background: rgba(88,101,242,0.1); border-radius: 20px; padding: 1px 7px;
}
.pp-bot-card__footer {
  display: flex; align-items: stretch; gap: 0;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 4px;
}
.pp-bot-card__stat-item {
  flex: 1; text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.pp-bot-card__stat-val { font-size: 18px; font-weight: 800; color: var(--starlight); }
.pp-bot-card__stat-lbl { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.pp-bot-card__stat-div {
  width: 1px; background: rgba(255,255,255,0.08); margin: 0 8px; flex-shrink: 0;
}

/* ── Message history indicator (tiny tooltip on ↑) ── */
#msg-input:focus { outline: none; }

/* ── Présence étendue — points animés ── */
.typing-dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--violet); margin-right: 2px; vertical-align: middle;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.typing strong { color: var(--starlight); font-weight: 700; }

/* ══════════════════════════════════════════════════
   Bot Profile Page — pp-page--bot redesign
   ══════════════════════════════════════════════════ */
.pp-page--bot #pp-bot-card {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  margin: 16px 20px 24px;
}

/* Hero header */
.ppb-hero {
  display: flex; align-items: flex-start; gap: 16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.18) 0%, rgba(99,102,241,0.12) 100%);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 16px; padding: 22px 24px; position: relative;
  margin-bottom: 12px;
}
.ppb-hero__avatar { position: relative; flex-shrink: 0; }
.ppb-hero__img {
  width: 72px; height: 72px; border-radius: 18px;
  border: 2px solid rgba(124,58,237,0.6);
  box-shadow: 0 0 20px rgba(124,58,237,0.35);
  background: #1a1035;
}
.ppb-online-dot {
  position: absolute; bottom: 3px; right: 3px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #4ade80; border: 2px solid #0d0d1f;
}
.ppb-hero__info { flex: 1; }
.ppb-hero__name { font-size: 22px; font-weight: 700; color: #fff; line-height: 1.2; }
.ppb-hero__handle { font-size: 13px; color: rgba(255,255,255,0.45); margin: 2px 0 6px; }
.ppb-hero__bio { font-size: 13.5px; color: rgba(255,255,255,0.7); line-height: 1.5; }
.ppb-badge {
  position: absolute; top: 14px; right: 16px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; letter-spacing: 0.5px;
}

/* Stats row */
.ppb-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 12px;
}
.ppb-stat {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 12px; text-align: center;
  transition: background .2s;
}
.ppb-stat:hover { background: rgba(124,58,237,0.12); }
.ppb-stat__val { display: block; font-size: 18px; font-weight: 700; color: #c4b5fd; }
.ppb-stat__lbl { display: block; font-size: 10.5px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* Sections */
.ppb-section {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 10px;
}
.ppb-section__title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: #a78bfa; margin-bottom: 12px;
}

/* Commands */
.ppb-cmds-list { display: flex; flex-direction: column; gap: 6px; }
.ppb-cmd {
  display: flex; align-items: baseline; gap: 8px;
  background: rgba(99,102,241,0.08); border-radius: 8px; padding: 8px 12px;
  transition: background .15s;
}
.ppb-cmd:hover { background: rgba(99,102,241,0.16); }
.ppb-cmd__name { color: #818cf8; font-family: monospace; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ppb-cmd__sep { color: rgba(255,255,255,0.25); font-size: 12px; }
.ppb-cmd__desc { color: rgba(255,255,255,0.65); font-size: 13px; }

/* Flows */
.ppb-flows-list { display: flex; flex-direction: column; gap: 6px; }
.ppb-flow {
  display: flex; align-items: center; gap: 8px;
  background: rgba(124,58,237,0.07); border-radius: 8px; padding: 8px 12px;
  transition: background .15s;
}
.ppb-flow:hover { background: rgba(124,58,237,0.15); }
.ppb-flow__trigger {
  background: rgba(124,58,237,0.25); color: #c4b5fd;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.ppb-flow__name { color: rgba(255,255,255,0.8); font-size: 13px; flex: 1; }
.ppb-flow__count { color: #a78bfa; font-size: 11px; font-weight: 600; background: rgba(124,58,237,0.2); padding: 2px 7px; border-radius: 20px; }

.ppb-empty { color: rgba(255,255,255,0.3); font-size: 13px; text-align: center; padding: 8px 0; font-style: italic; }

/* ── Présence — tab switch aussi envoie une présence ── */
.picker-tab[data-tab="sticker"].picker-tab--active ~ .typing { display: none; }

/* ── Mentions structurées ── */
.mention {
  display: inline-block; background: rgba(124,58,237,0.15); color: #a78bfa;
  border-radius: 4px; padding: 0 4px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.mention:hover { background: rgba(124,58,237,0.3); }
.mention--me {
  background: rgba(250,204,21,0.18); color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251,191,36,0.3);
}

/* ════════════════════════════════════════════
   Sécurité — shared body padding
   ════════════════════════════════════════════ */
.sec-card__head-icon { font-size: 15px; margin-right: 2px; }
.sec-card__body { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }

/* ── 2FA card ── */
.sec-card--2fa { border-color: rgba(124,58,237,0.25); }

.sec-2fa-banner {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px;
  background: rgba(124,58,237,0.07); border-radius: 10px;
  border: 1px solid rgba(124,58,237,0.18);
}
.sec-2fa-banner__desc { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; margin: 0; }

.sec-2fa-pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; width: fit-content;
}
.sec-2fa-pill--off { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.sec-2fa-pill--on  { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }

/* Wizard steps */
.sec-2fa-wizard { display: flex; flex-direction: column; gap: 16px; }
.sec-2fa-wstep { display: flex; gap: 14px; align-items: flex-start; }
.sec-2fa-wstep__num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(124,58,237,0.25); border: 1px solid rgba(124,58,237,0.5);
  color: #c4b5fd; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.sec-2fa-wstep__body {
  flex: 1; display: flex; flex-direction: column; gap: 10px;
  font-size: 13.5px; color: rgba(255,255,255,0.7); line-height: 1.4;
}
.sec-2fa-wstep__body strong { color: #fff; }

.sec-2fa-qr-wrap { position: relative; width: 180px; }
.sec-2fa-qr {
  display: block; border-radius: 10px;
  border: 2px solid rgba(124,58,237,0.5);
  box-shadow: 0 0 20px rgba(124,58,237,0.2);
}
.sec-2fa-qr-placeholder {
  width: 180px; height: 180px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 2px dashed rgba(124,58,237,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: rgba(255,255,255,0.35);
}

.sec-2fa-manual-label { font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: -4px; }
.sec-2fa-secret-code {
  display: block; font-family: monospace; font-size: 14px; letter-spacing: 2px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 10px 14px; color: #c4b5fd;
  user-select: all; cursor: text; word-break: break-all;
}

.sec-2fa-confirm-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sec-2fa-code-input {
  background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 10px 14px; color: #fff; font-size: 18px;
  letter-spacing: 4px; outline: none; width: 140px; text-align: center;
  transition: border-color .15s;
}
.sec-2fa-code-input--wide { letter-spacing: 0; font-size: 14px; width: 180px; text-align: left; }
.sec-2fa-code-input:focus { border-color: #7c3aed; }

.sec-2fa-backup-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px;
}
.sec-2fa-bcode {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px; padding: 7px; text-align: center;
  font-family: monospace; font-size: 12px; letter-spacing: 1.5px; color: #c4b5fd;
  user-select: all; cursor: text; transition: background .15s;
}
.sec-2fa-bcode:hover { background: rgba(124,58,237,0.2); }

.sec-2fa-disable-form { display: flex; flex-direction: column; gap: 10px; }
.sec-2fa-dis-label { font-size: 13px; color: rgba(255,255,255,0.55); margin: 0; }
.sec-2fa-dis-fields { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Privacy card ── */
.sec-card--privacy { border-color: rgba(34,211,238,0.15); }

.sec-privacy-desc { font-size: 13.5px; color: rgba(255,255,255,0.6); margin: 0; line-height: 1.4; }

.sec-privacy-options { display: flex; flex-direction: column; gap: 8px; }
.sec-privacy-opt { cursor: pointer; }
.sec-privacy-opt input[type="radio"] { display: none; }
.sec-privacy-opt__inner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  transition: all .15s; cursor: pointer;
}
.sec-privacy-opt__inner:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }
.sec-privacy-opt input:checked + .sec-privacy-opt__inner {
  border-color: rgba(34,211,238,0.45); background: rgba(34,211,238,0.08);
}
.sec-privacy-opt__icon { font-size: 20px; flex-shrink: 0; }
.sec-privacy-opt__inner strong { display: block; font-size: 14px; color: #fff; font-weight: 600; }
.sec-privacy-opt__inner em { display: block; font-size: 12px; color: rgba(255,255,255,0.45); font-style: normal; margin-top: 1px; }

.sec-privacy-saved { font-size: 13px; color: #4ade80; font-weight: 600; margin-left: 4px; }

/* ── 2FA QR SVG inline ── */
.sec-2fa-qr-svg {
  width: 180px; height: 180px; border-radius: 10px; overflow: hidden;
  border: 2px solid rgba(124,58,237,0.5);
  box-shadow: 0 0 20px rgba(124,58,237,0.2);
  background: #12102a;
  flex-shrink: 0;
}
.sec-2fa-qr-svg svg {
  width: 100%; height: 100%; display: block;
}

/* ════════════════════════════════════════
   DM SIDEBAR — nouveau design (thème Panda Galaxy)
   ════════════════════════════════════════ */
.dm-sidebar {
  width: 240px; min-width: 240px; flex: none;
  display: flex; flex-direction: column;
  background: var(--abyss);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.dm-sidebar__search { padding: 10px 10px 6px; flex: none; }
.dm-search-input {
  width: 100%; padding: 6px 11px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--cosmos);
  color: var(--starlight); font-size: 13px; outline: none;
  transition: border-color 0.2s; box-sizing: border-box;
}
.dm-search-input::placeholder { color: var(--faint); }
.dm-search-input:focus { border-color: var(--violet); }
.dm-sidebar__section-title {
  padding: 4px 14px 5px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); flex: none;
}
.dm-sidebar__list { flex: 1; overflow-y: auto; padding: 0 4px 12px; }
.dm-sidebar__empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 32px 16px;
  color: var(--faint); font-size: 12px; text-align: center;
}
.dm-sidebar__empty-icon { font-size: 26px; }

/* DM rows */
.dm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 6px; cursor: pointer;
  transition: background 0.15s;
}
.dm-row:hover { background: var(--glass-2); }
.dm-row--active { background: rgba(61,143,104,0.15) !important; }
.dm-row__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; position: relative;
  flex-shrink: 0; color: #fff; overflow: hidden;
}
.dm-row__dot {
  position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--faint); border: 2px solid var(--abyss);
}
.dm-row__dot--on { background: var(--cyan); }
.dm-row__info { flex: 1; min-width: 0; }
.dm-row__name {
  font-size: 13.5px; font-weight: 600; color: var(--starlight);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-row__sub {
  font-size: 11.5px; color: var(--stardust);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}
.dm-row__unread {
  background: var(--violet); color: #fff; font-size: 10px;
  font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; display: flex; align-items: center;
  justify-content: center; padding: 0 5px; flex-shrink: 0;
}
.dm-row__close {
  display: none; background: none; border: none;
  color: var(--stardust); font-size: 14px; cursor: pointer;
  padding: 3px 6px; border-radius: 5px; flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.dm-row:hover .dm-row__close { display: flex; align-items: center; justify-content: center; }
.dm-row__close:hover { color: #f87171; background: rgba(239,68,68,0.12); }
.dm-back-btn {
  background: none; border: none; color: var(--stardust);
  font-size: 17px; cursor: pointer; padding: 2px 8px 2px 0;
  line-height: 1; border-radius: 5px; transition: color 0.15s;
}
.dm-back-btn:hover { color: var(--starlight); background: var(--glass-2); }
.dm-close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: transparent; border: 1px solid rgba(239,68,68,0.2);
  color: rgba(239,68,68,0.6); cursor: pointer; transition: all 0.15s;
}
.dm-close-btn:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.5); color: #f87171; }

/* ════════════════════════════════════════
   DM MESSAGES — refonte
   ════════════════════════════════════════ */
#dm-messages {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 16px 8px; overflow-y: auto; flex: 1;
}
.dm-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 12px; color: var(--stardust);
}
.dm-empty__icon { font-size: 40px; }
.dm-empty__text { font-size: 14px; }

.dm-msg {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 3px 8px; border-radius: 10px;
  transition: background 0.1s; position: relative;
}
.dm-msg:hover { background: var(--glass-1); }
.dm-msg:hover .dm-msg__actions { opacity: 1; }
.dm-msg--grouped { padding-top: 1px; }
.dm-msg__avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  overflow: hidden; cursor: pointer; margin-top: 2px;
  transition: opacity 0.15s;
}
.dm-msg__avatar:hover { opacity: 0.85; }
.dm-msg__avatar .avatar__img { width: 100%; height: 100%; object-fit: cover; }
.dm-msg__body { flex: 1; min-width: 0; }
.dm-msg__body--grouped { padding-left: 46px; }
.dm-msg__meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.dm-msg__name { font-size: 13.5px; font-weight: 700; color: var(--starlight); }
.dm-msg__time { font-size: 11px; color: var(--stardust); }
.dm-msg__bubble {
  font-size: 14px; color: var(--starlight); line-height: 1.5;
  word-break: break-word;
}
.dm-msg__bubble p { margin: 0; }
.dm-msg__actions {
  position: absolute; right: 10px; top: 4px;
  opacity: 0; transition: opacity 0.15s; display: flex; gap: 4px;
}
.dm-msg__del {
  background: rgba(239,68,68,0.1); border: none; border-radius: 6px;
  color: #f87171; font-size: 13px; padding: 3px 7px; cursor: pointer;
  transition: background 0.15s;
}
.dm-msg__del:hover { background: rgba(239,68,68,0.22); }

/* ── Toast notification DM ── */
.dm-notif-toast {
  position: fixed; bottom: 80px; right: 20px; z-index: 9998;
  display: flex; align-items: center; gap: 12px;
  background: var(--cosmos); border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  border-radius: 12px; padding: 12px 14px; max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  cursor: pointer; transform: translateX(120%); transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.dm-notif-toast--in { transform: translateX(0); }
.dm-notif-toast__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
}
.dm-notif-toast__body { flex: 1; min-width: 0; }
.dm-notif-toast__name { font-size: 13px; font-weight: 700; color: var(--starlight); display: flex; align-items: center; gap: 6px; }
.dm-notif-toast__label { font-size: 10px; font-weight: 500; color: var(--stardust); background: var(--glass-2); border-radius: 4px; padding: 1px 5px; }
.dm-notif-toast__preview { font-size: 12.5px; color: var(--stardust); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dm-notif-toast__close { background: none; border: none; color: var(--stardust); cursor: pointer; font-size: 13px; padding: 2px 6px; flex-shrink: 0; }
.dm-notif-toast__close:hover { color: var(--starlight); }

/* ── Flash modération ── */
.mod-flash {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-120px);
  z-index: 9999; display: flex; align-items: center; gap: 14px;
  background: var(--cosmos); border: 1px solid var(--flash-color);
  border-radius: 14px; padding: 14px 18px; min-width: 320px; max-width: 460px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3), 0 12px 40px rgba(0,0,0,0.6);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.mod-flash--in { transform: translateX(-50%) translateY(0); }
.mod-flash__icon { font-size: 28px; flex-shrink: 0; }
.mod-flash__body { flex: 1; }
.mod-flash__title { font-size: 15px; font-weight: 800; color: var(--flash-color); margin-bottom: 3px; }
.mod-flash__desc { font-size: 13px; color: var(--stardust); line-height: 1.5; }
.mod-flash__desc strong { color: var(--starlight); }
.mod-flash__close { background: none; border: none; color: var(--stardust); cursor: pointer; font-size: 16px; padding: 4px 8px; flex-shrink: 0; }
.mod-flash__close:hover { color: var(--starlight); }

/* ── Modale avertissement (accusé réception) ── */
.warn-modal-overlay { display:flex; align-items:center; justify-content:center; position:fixed; inset:0; z-index:10000; background:rgba(3,3,10,.8); backdrop-filter:blur(6px); }
.warn-modal { text-align:center; padding:32px 28px 24px; max-width:420px; width:90%; background:var(--surface); border:1px solid rgba(245,158,11,.25); border-radius:16px; box-shadow:0 24px 64px rgba(0,0,0,.6); }
.warn-modal__icon { font-size:48px; margin-bottom:12px; }
.warn-modal__title { font-size:20px; font-weight:700; color:var(--starlight); margin-bottom:6px; }
.warn-modal__server { font-size:14px; color:var(--stardust); margin-bottom:12px; }
.warn-modal__reason { background:rgba(245,158,11,.12); border:1px solid rgba(245,158,11,.3); border-radius:8px; padding:10px 14px; font-size:14px; color:#fbbf24; margin-bottom:12px; font-style:italic; }
.warn-modal__escalade { background:rgba(249,115,22,.12); border:1px solid rgba(249,115,22,.3); border-radius:8px; padding:8px 12px; font-size:13px; color:#fb923c; margin-bottom:12px; }
.warn-modal__escalade--danger { background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.3); color:#f87171; }
.warn-modal__note { font-size:12px; color:var(--faint); margin-bottom:20px; line-height:1.5; }
.warn-modal__ack { width:100%; }

/* ── Compteur warn dans mod panel ── */
.mod-warn-count { display:inline-flex; align-items:center; gap:3px; background:rgba(245,158,11,.15); color:#fbbf24; border-radius:999px; padding:1px 8px; font-size:11px; font-weight:700; margin-left:6px; }

/* ── Mes avertissements (settings) ── */
.warn-empty { display:flex; flex-direction:column; align-items:center; gap:10px; padding:40px; color:var(--stardust); }
.my-warn-card { display:flex; gap:0; border-radius:10px; background:var(--surface); overflow:hidden; border:1px solid var(--border); }
.my-warn-card__left { display:flex; flex-direction:column; gap:4px; padding:14px 16px; min-width:160px; border-left:3px solid #888; background:rgba(255,255,255,.02); }
.my-warn-card__kind { font-size:13px; font-weight:700; color:var(--starlight); }
.my-warn-card__server { font-size:12px; color:var(--stardust); }
.my-warn-card__date { font-size:11px; color:var(--faint); margin-top:4px; }
.my-warn-card__right { flex:1; padding:14px 16px; display:flex; flex-direction:column; gap:6px; justify-content:center; }
.my-warn-card__reason { font-size:13px; color:var(--stardust); font-style:italic; }
.my-warn-card__mod { font-size:11px; color:var(--faint); }

/* ════════════════════════════════════════
   FRIENDS VIEW — vue principale (Panda Galaxy)
   ════════════════════════════════════════ */
.friends-view {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  background: var(--cosmos); overflow: hidden;
}
.fv-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px; height: 48px;
  border-bottom: 1px solid var(--line);
  flex: none; background: var(--abyss);
}
.fv-header__icon { font-size: 17px; }
.fv-header__title {
  font-size: 15px; font-weight: 700; color: var(--starlight);
  margin-right: 6px; font-family: var(--font-display);
}
.fv-tabs { display: flex; gap: 1px; flex: 1; }
.fv-tab {
  padding: 5px 13px; border-radius: 5px; border: none;
  background: transparent; color: var(--stardust);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fv-tab:hover { background: var(--glass-2); color: var(--starlight); }
.fv-tab--active { background: rgba(61,143,104,0.12); color: var(--violet); }
.fv-tab--pending .fv-pending-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--void); font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px;
  padding: 0 4px; margin-left: 5px; vertical-align: middle;
}
.fv-add-btn {
  padding: 6px 14px; border-radius: 6px; border: 1px solid var(--violet);
  background: rgba(61,143,104,0.1); color: var(--cyan);
  font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background 0.15s, color 0.15s; flex-shrink: 0;
}
.fv-add-btn:hover { background: rgba(61,143,104,0.2); color: var(--starlight); }

/* Panel ajouter ami */
.fv-add-panel { padding: 0 20px; flex: none; background: var(--abyss); }
.fv-add-panel__inner { border-bottom: 1px solid var(--line); padding: 14px 0 16px; }
.fv-add-panel__label {
  font-size: 14px; font-weight: 700; color: var(--starlight);
  margin: 0 0 10px; font-family: var(--font-display);
}
.fv-add-panel__row { display: flex; gap: 10px; }
.fv-add-input {
  flex: 1; padding: 8px 13px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--cosmos);
  color: var(--starlight); font-size: 13.5px; outline: none;
}
.fv-add-input:focus { border-color: var(--violet); }
.fv-add-error { font-size: 12px; color: var(--gold); margin: 7px 0 0; }

/* Contenu tabs */
.fv-content { flex: 1; overflow-y: auto; padding: 14px 20px; }
.fv-tab-pane { display: flex; flex-direction: column; }
.fv-section-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em;
  color: var(--faint); padding: 0 0 10px; text-transform: uppercase;
}
.fv-sub-label {
  font-size: 10.5px; font-weight: 600; color: var(--faint);
  padding: 10px 0 5px; text-transform: uppercase; letter-spacing: 0.06em;
}

/* Cartes amis */
.fv-list { display: flex; flex-direction: column; }
.fv-friend-card {
  display: flex; align-items: center; gap: 13px;
  padding: 9px 12px; border-radius: 6px;
  cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid var(--line);
}
.fv-friend-card:hover { background: var(--glass-2); }
.fv-friend-card:last-child { border-bottom: none; }
.fvc-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  position: relative; flex-shrink: 0; overflow: hidden;
}
.fvc-status-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--faint); border: 2px solid var(--cosmos);
}
.fvc-status-dot--on { background: var(--cyan); }
.fvc-info { flex: 1; min-width: 0; }
.fvc-name {
  font-size: 14px; font-weight: 600; color: var(--starlight);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fvc-sub { font-size: 12px; color: var(--stardust); margin-top: 1px; }
.fvc-actions { display: flex; gap: 5px; flex-shrink: 0; }
.fvc-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--glass-2); color: var(--stardust);
  font-size: 13px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background 0.15s, color 0.15s;
}
.fvc-btn:hover { background: rgba(61,143,104,0.12); color: var(--violet); }
.fvc-btn--msg:hover { background: rgba(61,143,104,0.15); color: var(--cyan); }
.fvc-btn--accept { color: var(--cyan); }
.fvc-btn--accept:hover { background: rgba(61,143,104,0.2); }
.fvc-btn--decline, .fvc-btn--cancel { color: var(--gold); }
.fvc-btn--decline:hover, .fvc-btn--cancel:hover { background: rgba(196,154,36,0.15); }

/* État vide */
.fv-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; gap: 10px; text-align: center;
}
.fv-empty__art { font-size: 52px; line-height: 1; }
.fv-empty__title { font-size: 16px; font-weight: 700; color: var(--stardust); font-family: var(--font-display); }
.fv-empty__sub { font-size: 13px; color: var(--faint); max-width: 320px; }

/* ════════════════════════════════════════
   PANNEAU "ACTIF MAINTENANT" (Panda Galaxy)
   ════════════════════════════════════════ */
.friends-active-panel {
  width: 210px; min-width: 210px; flex: none;
  background: var(--abyss); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 0;
}
.fap-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--faint); text-transform: uppercase; padding: 0 14px 12px;
}
.fap-list { display: flex; flex-direction: column; gap: 2px; padding: 0 6px; }
.fap-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 6px;
  cursor: pointer; transition: background 0.15s;
}
.fap-item:hover { background: var(--glass-2); }
.fap-item__av {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  position: relative; flex-shrink: 0; overflow: hidden;
}
.fap-item__dot {
  position: absolute; bottom: 0; right: 0;
  width: 9px; height: 9px; border-radius: 50%; background: var(--cyan);
  border: 2px solid var(--abyss);
}
.fap-item__name {
  font-size: 12.5px; font-weight: 600; color: var(--stardust);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fap-empty {
  font-size: 12px; color: var(--faint);
  text-align: center; padding: 18px 14px; line-height: 1.5;
}

/* ── Inscription : champs supplémentaires ── */
#register-fields { display: flex; flex-direction: column; gap: 16px; }
#register-fields[hidden] { display: none !important; }

.reg-avatar-row { display: flex; align-items: flex-start; gap: 12px; }
.reg-avatar-preview {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(61,143,104,0.12); border: 2px solid var(--violet);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.reg-emoji-grid {
  display: flex; flex-wrap: wrap; gap: 5px; flex: 1;
}
.reg-emoji {
  width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid transparent;
  background: var(--cosmos); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.reg-emoji:hover { background: rgba(61,143,104,0.1); border-color: var(--violet); }
.reg-emoji--active { border-color: var(--violet); background: rgba(61,143,104,0.15); }

.reg-bio {
  width: 100%; padding: 9px 13px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--cosmos);
  color: var(--starlight); font-size: 13.5px; outline: none;
  resize: none; font-family: var(--font-body); line-height: 1.5;
}
.reg-bio:focus { border-color: var(--violet); }
.reg-bio::placeholder { color: var(--faint); }

/* Toggle 2FA à l'inscription */
.reg-2fa-toggle {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cosmos); transition: border-color 0.15s;
}
.reg-2fa-toggle:hover { border-color: var(--violet); }
.reg-2fa-toggle input[type=checkbox] { display: none; }
.reg-2fa-toggle__box {
  width: 38px; height: 22px; border-radius: 11px;
  background: var(--faint); position: relative;
  flex-shrink: 0; transition: background 0.2s;
}
.reg-2fa-toggle__box::after {
  content: ""; position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
.reg-2fa-toggle input:checked + .reg-2fa-toggle__box { background: var(--violet); }
.reg-2fa-toggle input:checked + .reg-2fa-toggle__box::after { transform: translateX(16px); }
.reg-2fa-toggle__label { font-size: 13px; color: var(--stardust); }

/* Étape 2FA post-inscription */
.reg-2fa-card {
  display: flex; flex-direction: column; gap: 14px;
}
.reg-2fa-card__head { display: flex; align-items: flex-start; gap: 12px; }
.reg-2fa-card__icon { font-size: 24px; flex-shrink: 0; }
.reg-2fa-card__title { font-size: 15px; font-weight: 700; color: var(--starlight); }
.reg-2fa-card__sub { font-size: 12px; color: var(--stardust); margin-top: 3px; }
.reg-2fa-qr {
  width: 160px; height: 160px; margin: 0 auto;
  border-radius: 10px; overflow: hidden;
  border: 2px solid rgba(61,143,104,0.4);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.reg-2fa-qr svg { width: 100%; height: 100%; display: block; }
.reg-2fa-secret-wrap {
  font-size: 12px; color: var(--stardust);
}
.reg-2fa-secret-wrap summary { cursor: pointer; }
.reg-2fa-secret {
  display: block; margin-top: 6px;
  background: var(--cosmos); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px;
  font-size: 12px; letter-spacing: 0.1em; color: var(--violet);
  word-break: break-all; font-family: monospace;
}

/* ── Modal suppression compte ── */
.del-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.del-modal__card {
  width: 100%; max-width: 420px; padding: 32px 28px;
  border-radius: var(--radius); display: flex; flex-direction: column; gap: 16px;
  animation: rise 0.3s cubic-bezier(0.16,1,0.3,1);
}
.del-modal__icon { font-size: 36px; text-align: center; }
.del-modal__title { font-size: 20px; font-weight: 800; color: #f87171; text-align: center; font-family: var(--font-display); }
.del-modal__warn { font-size: 13.5px; color: var(--stardust); line-height: 1.6; text-align: center; }
.del-modal__warn strong { color: var(--starlight); }
.del-modal__field { display: flex; flex-direction: column; gap: 6px; }
.del-modal__field label { font-size: 12.5px; color: var(--stardust); }
.del-modal__field label strong { color: var(--starlight); }
.del-modal__input {
  padding: 10px 13px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--cosmos);
  color: var(--starlight); font-size: 14px; outline: none;
}
.del-modal__input:focus { border-color: #f87171; }
.del-modal__actions { display: flex; gap: 10px; }
.del-modal__actions .btn { flex: 1; }
.btn--danger {
  background: #dc2626; color: #fff; border: none;
}
.btn--danger:hover:not(:disabled) { background: #b91c1c; }
.btn--danger:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
   EVENT EMBED
   ============================================================ */
.event-embed {
  display: flex; max-width: 480px; border-radius: 12px;
  background: var(--cosmos); border: 1px solid var(--line);
  overflow: hidden; margin: 6px 0;
}
.event-embed__accent {
  width: 4px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--violet), var(--cyan));
}
.event-embed__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event-embed__label { font-size: 10px; font-weight: 700; color: var(--cyan); letter-spacing: 1px; text-transform: uppercase; }
.event-embed__title { font-size: 16px; font-weight: 800; color: var(--starlight); font-family: var(--font-display); }
.event-embed__desc { font-size: 13px; color: var(--stardust); line-height: 1.5; }
.event-embed__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--stardust); margin-top: 2px; }
.event-embed__meta span { display: flex; align-items: center; gap: 4px; }
.event-embed__rsvp { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.event-embed__btn {
  padding: 5px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--abyss); color: var(--starlight);
  cursor: pointer; transition: all 0.15s;
}
.event-embed__btn:hover { border-color: var(--violet); background: rgba(61,143,104,0.15); }
.event-embed__btn--active { background: var(--violet); border-color: var(--violet); color: #fff; }
.event-embed__counts { display: flex; gap: 10px; font-size: 12px; color: var(--stardust); margin-top: 4px; }
.event-embed__counts span { display: flex; align-items: center; gap: 3px; }

/* ============================================================
   CHANNEL BG / FOND CUSTOM
   ============================================================ */
#messages {
  transition: background 0.3s;
}

/* ============================================================
   FIELD SELECT & COLOR PICKER
   ============================================================ */
.field__select {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--cosmos);
  color: var(--starlight); font-size: 13.5px; outline: none;
  cursor: pointer;
}
.field__select:focus { border-color: var(--violet); }

/* ============================================================
   MOBILE — RESPONSIVE REDESIGN
   ============================================================ */
@media (max-width: 768px) {
  /* Layout principal */
  .layout { position: relative; overflow: hidden; }

  /* Sidebar rail (icônes serveurs) */
  .rail {
    position: fixed; left: -72px; top: 0; bottom: 0; z-index: 200;
    width: 66px; transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
    background: var(--void); border-right: 1px solid var(--line);
  }
  .layout.sidebar-open .rail { left: 0; }

  /* Panel canaux */
  .channels {
    position: fixed; left: -240px; top: 0; bottom: 0; z-index: 199;
    width: 220px; transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
    background: var(--abyss); border-right: 1px solid var(--line);
  }
  .layout.sidebar-open .channels { left: 66px; }

  /* Chat occupe tout */
  .server-chat, .dm-chat { width: 100% !important; }

  /* Overlay quand sidebar ouverte */
  .layout.sidebar-open::after {
    content: ""; position: fixed; inset: 0; z-index: 198;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
  }

  /* Bouton hamburger mobile */
  .mobile-menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px; border: none;
    background: transparent; color: var(--stardust); cursor: pointer;
    font-size: 18px; flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
  }
  .mobile-menu-btn:hover { color: var(--starlight); background: var(--faint); }

  /* Header du chat — intégrer le bouton burger */
  .chat-header { gap: 6px; padding: 0 12px 0 8px; }

  /* Composer */
  .composer { padding: 6px 10px 10px; }
  .composer__send { width: 36px; height: 36px; font-size: 14px; }
  .composer__input-wrap textarea { font-size: 14px; }

  /* Messages */
  #messages { padding: 8px 10px 10px; }
  .msg { padding: 3px 6px; }

  /* Members panel — caché sur mobile */
  .members { display: none !important; }

  /* DM sidebar */
  .dm-chat { width: 100% !important; }

  /* Modal / overlays full-screen */
  .settings-modal__content { max-width: 100% !important; margin: 0; border-radius: 0; min-height: 100dvh; }
  .pp-layout { flex-direction: column; }
}

@media (max-width: 480px) {
  /* Encore plus petit */
  .chat-header__name { font-size: 14px; }
  .msg__bubble { font-size: 13.5px; }
  .composer__input-wrap textarea { font-size: 14px; }

  /* Event embed */
  .event-embed { max-width: 100%; }
  .event-embed__rsvp { gap: 5px; }
  .event-embed__btn { padding: 4px 10px; font-size: 12px; }
}

/* Desktop : bouton burger caché */
@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
}

/* ============================================================
   SWIPE HINT (feedback visuel)
   ============================================================ */
.swipe-edge-hint {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 60px; border-radius: 0 4px 4px 0;
  background: var(--violet); opacity: 0.4;
  transition: opacity 0.3s;
  pointer-events: none;
}
@media (min-width: 769px) { .swipe-edge-hint { display: none; } }

/* ============================================================
   AUDIT LOG
   ============================================================ */
.audit-list { display: flex; flex-direction: column; gap: 4px; }
.audit-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--cosmos); border: 1px solid var(--line);
  transition: background 0.15s;
}
.audit-row:hover { background: var(--faint); }
.audit-row__icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.audit-row__body { flex: 1; font-size: 13.5px; line-height: 1.5; }
.audit-row__action { font-weight: 700; color: var(--starlight); }
.audit-row__target { color: var(--cyan); }
.audit-row__mod { color: var(--stardust); }
.audit-row__detail { font-size: 12px; color: var(--stardust); margin-top: 2px; font-style: italic; }
.audit-row__until { font-size: 12px; color: var(--gold); margin-top: 2px; }
.audit-row__time { font-size: 11px; color: var(--stardust); white-space: nowrap; flex-shrink: 0; }

/* ============================================================
   LINK EMBED
   ============================================================ */
.link-embed {
  display: flex; max-width: 440px; border-radius: 8px;
  background: var(--cosmos); border: 1px solid var(--line);
  overflow: hidden; margin: 4px 0;
}
.link-embed__accent {
  width: 4px; flex-shrink: 0; background: var(--violet);
}
.link-embed__body { display: flex; gap: 10px; padding: 10px 12px; align-items: flex-start; }
.link-embed__img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.link-embed__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.link-embed__site { font-size: 11px; color: var(--stardust); text-transform: uppercase; letter-spacing: 0.5px; }
.link-embed__title {
  font-size: 13.5px; font-weight: 700; color: var(--cyan);
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.link-embed__title:hover { text-decoration: underline; }
.link-embed__desc { font-size: 12px; color: var(--stardust); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   USER CARD — serveurs communs + note ami
   ============================================================ */
.uc-common-label { font-size: 11px; font-weight: 700; color: var(--stardust); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; margin-top: 10px; }
.uc-common-servers { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-common-server { display: flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; background: var(--faint); border: 1px solid var(--line); cursor: default; }
.uc-common-server__icon { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; overflow: hidden; }
.uc-common-server__icon img { width: 100%; height: 100%; object-fit: cover; }
.uc-common-server__name { font-size: 12px; color: var(--starlight); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.uc-note-label { font-size: 11px; font-weight: 700; color: var(--stardust); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; margin-top: 10px; }
.uc-note-input {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--cosmos);
  color: var(--starlight); font-size: 13px; resize: vertical;
  font-family: inherit; outline: none; box-sizing: border-box;
}
.uc-note-input:focus { border-color: var(--violet); }

/* ============================================================
   GROUPE DM
   ============================================================ */
.gdm-member-list { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow-y: auto; }
.gdm-member-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--starlight);
  transition: background 0.1s;
}
.gdm-member-row:hover { background: var(--faint); }
.gdm-member-row input { accent-color: var(--violet); width: 15px; height: 15px; cursor: pointer; }
.gdm-member-check { flex-shrink: 0; }

/* ============================================================
   KYC — VÉRIFICATION D'ÂGE
   ============================================================ */
.kyc-steps {
  display: flex; align-items: center; gap: 0; margin-bottom: 20px;
}
.kyc-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.kyc-step__num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--faint); border: 2px solid var(--line);
  color: var(--stardust); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
  transition: all 0.2s;
}
.kyc-step--active .kyc-step__num { background: var(--violet); border-color: var(--violet); color: #fff; }
.kyc-step--done .kyc-step__num { background: #10b981; border-color: #10b981; color: #fff; }
.kyc-step__label { font-size: 11px; color: var(--stardust); white-space: nowrap; }
.kyc-step__connector { flex: 1; height: 2px; background: var(--line); margin: 0 4px; margin-bottom: 16px; }

.kyc-uploads {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px;
}
.kyc-drop {
  display: block; cursor: pointer; border-radius: 12px;
  border: 2px dashed var(--line); background: var(--cosmos);
  aspect-ratio: 4/3; overflow: hidden; transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.kyc-drop:hover, .kyc-drop--over { border-color: var(--violet); background: rgba(61,143,104,0.08); }
.kyc-drop__inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 12px;
  pointer-events: none;
}
.kyc-drop__icon { font-size: 28px; }
.kyc-drop__label { font-size: 13px; font-weight: 600; color: var(--starlight); text-align: center; }
.kyc-drop__hint { font-size: 11px; color: var(--stardust); text-align: center; }

.kyc-notice {
  display: flex; gap: 8px; align-items: flex-start; font-size: 12px;
  color: var(--stardust); background: var(--faint); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 14px; line-height: 1.5;
}
.kyc-notice strong { color: var(--starlight); }

/* Processing */
.kyc-processing {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 32px 0; text-align: center;
}
.kyc-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--violet);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.kyc-processing__title { font-size: 16px; font-weight: 700; color: var(--starlight); }
.kyc-processing__steps { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.kyc-prog-step {
  font-size: 13px; color: var(--stardust); padding: 4px 10px;
  border-radius: 6px; border-left: 3px solid var(--line); transition: all 0.3s;
}
.kyc-prog-step--active { color: var(--starlight); border-left-color: var(--violet); background: rgba(61,143,104,0.08); }
.kyc-prog-step--done { color: #10b981; border-left-color: #10b981; }

/* Résultat */
.kyc-result {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 24px; border-radius: 12px; text-align: center;
}
.kyc-result--success { background: rgba(16,185,129,0.1); border: 1px solid #10b98155; }
.kyc-result--pending { background: rgba(251,191,36,0.1); border: 1px solid #fbbf2455; }
.kyc-result--error   { background: rgba(239,68,68,0.1);  border: 1px solid #ef444455; }
.kyc-result__icon { font-size: 40px; }
.kyc-result__title { font-size: 18px; font-weight: 800; color: var(--starlight); font-family: var(--font-display); }
.kyc-result__desc { font-size: 13.5px; color: var(--stardust); line-height: 1.6; }
.kyc-result__meta { font-size: 12px; color: var(--stardust); line-height: 1.8; }
.kyc-result__meta code { background: var(--faint); padding: 1px 6px; border-radius: 4px; }

/* Bannière vérifié */
.kyc-verified-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 12px;
  background: rgba(16,185,129,0.1); border: 1px solid #10b98155;
}
.kyc-verified-banner__icon { font-size: 36px; flex-shrink: 0; }
.kyc-verified-banner__title { font-size: 15px; font-weight: 800; color: #10b981; font-family: var(--font-display); }
.kyc-verified-banner__sub { font-size: 13px; color: var(--stardust); }

/* ============================================================
   KYC — QR CODE FLOW (ajout)
   ============================================================ */
.kyc-qr-wrap {
  display: flex; gap: 16px; align-items: center;
  background: var(--cosmos); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px; margin-bottom: 16px;
}
.kyc-qr-img {
  width: 180px; height: 180px; flex-shrink: 0;
  background: var(--abyss); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.kyc-qr-img img { border-radius: 8px; }
.kyc-qr-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.kyc-qr-info__title { font-size: 14px; font-weight: 700; color: var(--starlight); }
.kyc-qr-info__url {
  font-size: 11px; color: var(--stardust); word-break: break-all;
  background: var(--faint); border-radius: 6px; padding: 4px 8px; font-family: monospace;
}
.kyc-qr-info__hint { font-size: 12px; color: var(--stardust); }
.kyc-qr-info__hint span { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }

.kyc-waiting {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--stardust); margin-bottom: 12px;
}
.kyc-waiting__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--violet); flex-shrink: 0;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

@media (max-width: 480px) {
  .kyc-qr-wrap { flex-direction: column; align-items: center; text-align: center; }
  .kyc-qr-img { width: 200px; height: 200px; }
}

/* ── Features v2 — Règles, Admission, Filtres, Analytique ── */
.adm-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--glass-1); border-radius: 8px; margin-bottom: 6px;
  border: 1px solid var(--line);
}
.adm-row code { font-size: 13px; background: rgba(255,255,255,0.06); padding: 2px 7px; border-radius: 4px; }
.adm-row__meta { font-size: 12px; color: var(--text-muted); }
.adm-row__del { margin-left: auto; flex-shrink: 0; }
.adm-empty { color: var(--text-muted); font-size: 13px; padding: 12px 0; }
.adm-list { margin-top: 8px; }

.adm-request-card {
  background: var(--glass-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; margin-bottom: 10px;
}
.adm-request-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.adm-answer { font-size: 13px; color: var(--text-muted); margin: 4px 0; padding: 6px 10px; background: rgba(255,255,255,0.03); border-radius: 6px; }
.adm-answer em { color: var(--accent); font-style: normal; font-size: 11px; margin-right: 6px; }
.adm-request-card__actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.adm-note { font-size: 13px; padding: 6px 10px; }

.badge--pending { background: rgba(245,158,11,0.2); color: #f59e0b; border-radius: 4px; padding: 2px 7px; font-size: 11px; }
.badge--approved { background: rgba(16,185,129,0.2); color: #10b981; border-radius: 4px; padding: 2px 7px; font-size: 11px; }
.badge--rejected { background: rgba(239,68,68,0.2); color: #ef4444; border-radius: 4px; padding: 2px 7px; font-size: 11px; }
.badge--open   { background: rgba(99,102,241,0.2); color: #818cf8; border-radius: 4px; padding: 2px 7px; font-size: 11px; }
.badge--closed { background: rgba(107,114,128,0.2); color: #9ca3af; border-radius: 4px; padding: 2px 7px; font-size: 11px; }

.select--sm { padding: 4px 8px; font-size: 13px; height: 30px; }

/* ── Analytique ── */
.analytics-stats { display: flex; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.analytics-stat { background: var(--glass-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 20px; text-align: center; min-width: 90px; }
.analytics-stat span { display: block; font-size: 26px; font-weight: 700; color: var(--accent); }
.analytics-stat label { font-size: 12px; color: var(--text-muted); }
.analytics-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding: 8px 0; }
.analytics-bar { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; }
.analytics-bar__fill { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .3s; }
.analytics-bar__label { font-size: 10px; color: var(--text-muted); }
.analytics-bar__val { font-size: 11px; color: var(--text-muted); }

.inv-list { margin-top: 8px; }
.settings__h3 { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }

/* ══════════════════════════════════════════════════════════════
   SP — Settings Panel Design System v2
   ══════════════════════════════════════════════════════════════ */
.sp { display: flex; flex-direction: column; gap: 0; }
.sp-pane-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.sp-pane-title  { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.sp-pane-desc   { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }

.sp-grid { display: grid; gap: 16px; }
.sp-grid--60-40 { grid-template-columns: 1.5fr 1fr; }
.sp-grid--50-50 { grid-template-columns: 1fr 1fr; }
.sp-grid--40-60 { grid-template-columns: 1fr 1.5fr; }
@media (max-width: 820px) {
  .sp-grid--60-40, .sp-grid--50-50, .sp-grid--40-60 { grid-template-columns: 1fr; }
}

/* ── Card ── */
.sp-card { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sp-card--dim { background: rgba(255,255,255,.02); }
.sp-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px 12px; border-bottom: 1px solid var(--line);
}
.sp-card__title { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.sp-card__body  { padding: 16px 18px; }
.sp-card__footer { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.sp-saved-badge { font-size: 12px; color: var(--green); font-weight: 600; opacity: 0; transition: opacity .3s; }
.sp-saved-badge.visible { opacity: 1; }

/* ── Rules textarea + preview ── */
.sp-textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-size: 13px; line-height: 1.7; padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
}
.sp-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.sp-rules-preview { font-size: 13px; color: var(--text-muted); line-height: 1.75; white-space: pre-wrap; min-height: 60px; }

/* ── Toggle switch ── */
.sp-toggle-wrap { display: flex; align-items: center; gap: 8px; }
.sp-toggle { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.sp-toggle input { opacity: 0; width: 0; height: 0; }
.sp-toggle__track { position: absolute; inset: 0; background: rgba(255,255,255,.12); border-radius: 11px; cursor: pointer; transition: background .2s; }
.sp-toggle__track::before {
  content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.sp-toggle input:checked + .sp-toggle__track { background: var(--accent); }
.sp-toggle input:checked + .sp-toggle__track::before { transform: translateX(16px); }
.sp-toggle__label { font-size: 13px; color: var(--text-muted); }

/* ── List ── */
.sp-list { display: flex; flex-direction: column; gap: 8px; }

/* ── Tabbar ── */
.sp-tabbar { display: inline-flex; gap: 4px; background: rgba(0,0,0,.25); border-radius: 8px; padding: 4px; }
.sp-tabbar__btn { font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 6px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; transition: background .15s, color .15s; }
.sp-tabbar__btn:hover { background: rgba(255,255,255,.08); color: var(--text); }
.sp-tabbar__btn--active { background: var(--accent) !important; color: #fff !important; }

/* ── Inline add ── */
.sp-inline-add { display: flex; gap: 8px; align-items: center; }
.sp-inline-add .input { flex: 1; }

/* ── Create form ── */
.sp-create-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sp-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; margin-bottom: 0; }
.sp-code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 4px; font-family: monospace; font-size: 13px; }
.sp-select-action { min-width: 130px; }

/* ── Mini stat (word filter) ── */
.sp-mini-stat { text-align: center; flex: 1; }
.sp-mini-stat span { display: block; font-size: 32px; font-weight: 800; color: var(--accent); }
.sp-mini-stat label { font-size: 12px; color: var(--text-muted); }

/* ── Tag cloud ── */
.sp-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.sp-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.sp-tag--delete { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.sp-tag--warn   { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.25); }
.sp-tag__del { background: rgba(0,0,0,.2); border: none; border-radius: 50%; color: inherit; cursor: pointer; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; transition: background .15s; }
.sp-tag__del:hover { background: rgba(0,0,0,.5); }

/* ── Webhook cards ── */
.sp-webhook-list { display: flex; flex-direction: column; gap: 12px; }
.sp-webhook-card { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; align-items: flex-start; gap: 14px; }
.sp-webhook-card__icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(99,102,241,.15); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.sp-webhook-card__body { flex: 1; min-width: 0; }
.sp-webhook-card__name { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.sp-webhook-card__meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; display: flex; gap: 10px; }
.sp-webhook-url { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.3); border-radius: 8px; padding: 7px 10px; }
.sp-webhook-url code { font-size: 11px; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: monospace; }
.sp-webhook-card__del { margin-left: auto; flex-shrink: 0; }

/* ── Command table ── */
.sp-cmd-table { display: flex; flex-direction: column; }
.sp-cmd-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); transition: background .15s; }
.sp-cmd-row:last-child { border-bottom: none; }
.sp-cmd-row:hover { background: rgba(255,255,255,.03); }
.sp-cmd-trigger { padding: 13px 16px; font-family: monospace; font-size: 13px; font-weight: 700; color: var(--accent); min-width: 140px; flex-shrink: 0; border-right: 1px solid var(--line); }
.sp-cmd-response { padding: 13px 16px; font-size: 13px; color: var(--text-muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-cmd-actions { padding: 0 12px; flex-shrink: 0; }
.sp-cmd-empty { padding: 32px 18px; color: var(--text-muted); font-size: 13px; text-align: center; }

/* ── Ticket items ── */
.sp-ticket { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: rgba(255,255,255,.03); border-radius: 10px; border: 1px solid var(--line); }
.sp-ticket__avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.sp-ticket__body { flex: 1; min-width: 0; }
.sp-ticket__subject { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-ticket__meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sp-ticket__actions { display: flex; gap: 6px; }

/* ── Badge grid + pill ── */
.sp-badge-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-badge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 20px; border: 1.5px solid; font-size: 13px; font-weight: 600; }
.sp-badge-pill__actions { display: flex; gap: 4px; margin-left: 6px; opacity: 0; transition: opacity .15s; }
.sp-badge-pill:hover .sp-badge-pill__actions { opacity: 1; }
.sp-badge-pill__btn { background: rgba(0,0,0,.3); border: none; border-radius: 4px; padding: 2px 6px; font-size: 11px; cursor: pointer; color: #fff; }
.sp-badge-preview { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 20px; border: 1.5px solid; font-size: 15px; font-weight: 700; width: fit-content; transition: all .2s; border-color: #6366f1; color: #6366f1; background: rgba(99,102,241,.1); }

/* ── KPI grid ── */
.sp-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sp-kpi { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 18px; position: relative; overflow: hidden; }
.sp-kpi__icon  { font-size: 22px; margin-bottom: 10px; }
.sp-kpi__value { font-size: 32px; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.sp-kpi__label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.sp-kpi__trend { font-size: 11px; margin-top: 6px; }
.sp-kpi__trend--up   { color: #22c55e; }
.sp-kpi__trend--down { color: #ef4444; }
.sp-kpi::after { content: ''; position: absolute; bottom: -20px; right: -20px; width: 80px; height: 80px; border-radius: 50%; background: var(--sp-kpi-glow, rgba(99,102,241,.12)); }

/* ── Bar chart ── */
.sp-bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding: 8px 0 0; }
.sp-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.sp-bar__fill { width: 100%; background: var(--accent); border-radius: 5px 5px 0 0; min-height: 3px; transition: height .4s cubic-bezier(.4,0,.2,1); opacity: .8; }
.sp-bar__fill:hover { opacity: 1; }
.sp-bar__label { font-size: 10px; color: var(--text-muted); }
.sp-bar__val   { font-size: 10px; color: var(--text-muted); }

/* ── Top list ── */
.sp-top-list { display: flex; flex-direction: column; gap: 10px; }
.sp-top-item { display: flex; align-items: center; gap: 10px; }
.sp-top-item__rank { font-size: 14px; font-weight: 800; color: var(--accent); width: 20px; text-align: right; flex-shrink: 0; }
.sp-top-item__name { font-size: 13px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-top-item__bar { flex: 2; height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.sp-top-item__bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.sp-top-item__val { font-size: 12px; color: var(--text-muted); min-width: 36px; text-align: right; }

/* ── Hour chart ── */
.sp-hour-chart { display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.sp-hour-bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; background: var(--accent); opacity: .55; transition: opacity .2s; cursor: default; }
.sp-hour-bar:hover { opacity: 1; }

/* ── Generic item ── */
.sp-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; }
.sp-item__avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.sp-item__body { flex: 1; min-width: 0; }
.sp-item__name { font-size: 13px; font-weight: 600; }
.sp-item__meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sp-item__actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Request card (admission) ── */
.sp-request { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.03); }
.sp-request__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sp-request__avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.sp-request__name { font-size: 13px; font-weight: 600; flex: 1; }
.sp-request__date { font-size: 11px; color: var(--text-muted); }
.sp-request__answers { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.sp-answer-item em { display: block; color: var(--text-muted); font-style: normal; font-size: 11px; margin-bottom: 3px; }
.sp-answer-item p  { color: var(--text); margin: 0; font-size: 13px; }
.sp-request__actions { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: rgba(0,0,0,.1); }
.sp-count-badge { background: var(--accent); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 700; }

/* ── Slowmode row ── */
.sp-slowmode-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; }
.sp-slowmode-row__hash { color: var(--text-muted); font-weight: 700; }
.sp-slowmode-row__name { flex: 1; font-size: 13px; }
.sp-slowmode-row__select { min-width: 150px; }

/* ── Empty state ── */
.sp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 16px; gap: 10px; color: var(--text-muted); text-align: center; }
.sp-empty__icon { font-size: 36px; opacity: .35; }
.sp-empty__text { font-size: 13px; max-width: 220px; line-height: 1.5; }

/* ── Command form ── */
.sp-cmd-trigger-wrap { display: flex; align-items: center; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sp-cmd-prefix { padding: 0 10px; color: var(--accent); font-family: monospace; font-weight: 700; font-size: 16px; border-right: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; }
.sp-cmd-input { border: none !important; background: transparent !important; border-radius: 0 !important; width: 120px; box-shadow: none !important; }
.sp-cmd-form { flex-wrap: nowrap; align-items: center; }

/* ══════════════════════════════════════════════════════════════
   THREAD PANEL — Fil de discussion (#6)
   ══════════════════════════════════════════════════════════════ */
.thread-panel {
  width: 340px; min-width: 280px; max-width: 400px;
  display: flex; flex-direction: column;
  background: var(--glass-2, rgba(18,15,42,.95));
  border-left: 1px solid var(--line);
  position: relative; z-index: 10;
  animation: threadSlideIn .22s cubic-bezier(.4,0,.2,1);
}
@keyframes threadSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.thread-panel__head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.thread-panel__title-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.thread-panel__icon { font-size: 18px; flex-shrink: 0; }
.thread-panel__name {
  flex: 1; font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thread-panel__close {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 16px; padding: 4px 6px; border-radius: 6px; transition: background .15s;
}
.thread-panel__close:hover { background: rgba(255,255,255,.1); color: var(--text); }

/* Message parent (citation) */
.thread-panel__parent {
  background: rgba(255,255,255,.04); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 8px 12px; font-size: 12px;
  color: var(--text-muted); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical;
}
.thread-panel__parent strong { color: var(--text); }

/* Messages list */
.thread-panel__messages {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
}

/* Thread message bubble */
.thread-msg {
  display: flex; gap: 10px; align-items: flex-start;
}
.thread-msg__avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.thread-msg__body { flex: 1; min-width: 0; }
.thread-msg__header {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px;
}
.thread-msg__name { font-size: 13px; font-weight: 700; }
.thread-msg__time { font-size: 10px; color: var(--text-muted); }
.thread-msg__content { font-size: 13px; line-height: 1.5; word-break: break-word; }

/* Composer */
.thread-panel__composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--line); flex-shrink: 0;
}
.thread-panel__input {
  flex: 1; background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 13px; line-height: 1.5;
  padding: 8px 12px; resize: none; max-height: 120px; overflow-y: auto;
  transition: border-color .15s;
}
.thread-panel__input:focus { outline: none; border-color: var(--accent); }
.thread-panel__send {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent);
  border: none; color: #fff; font-size: 14px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.thread-panel__send:hover { opacity: .85; }

/* Badge "N réponses" sous un message dans le chat */
.msg-thread-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  padding: 4px 10px; background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.22);
  border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--accent);
  transition: background .15s;
}
.msg-thread-badge:hover { background: rgba(99,102,241,.22); }
.msg-thread-badge__count { font-weight: 800; }

/* Bouton "Créer un fil" dans la toolbar message */
.msg-thread-btn { font-size: 14px; }

@media (max-width: 900px) {
  .thread-panel { position: absolute; right: 0; top: 0; bottom: 0; box-shadow: -4px 0 24px rgba(0,0,0,.4); }
}

/* ══════════════════════════════════════════════════════════════════════════
   E2E ENCRYPTION — UI Components
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Modal setup ── */
.e2e-setup-box {
  max-width: 480px; width: 95%; padding: 40px; text-align: center;
  border: 1px solid rgba(99,102,241,.3);
  box-shadow: 0 0 60px rgba(99,102,241,.15), 0 24px 64px rgba(0,0,0,.5);
}
.e2e-setup__shield { font-size: 56px; display: block; margin-bottom: 16px; filter: drop-shadow(0 0 20px rgba(99,102,241,.5)); }
.e2e-setup__title  { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.e2e-setup__sub    { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; line-height: 1.6; }
.e2e-setup__features {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  text-align: left;
}
.e2e-feat {
  display: flex; align-items: center; gap: 12px; font-size: 13px;
  color: var(--text-muted);
}
.e2e-feat span:first-child { font-size: 18px; width: 24px; text-align: center; }
.e2e-setup__warning {
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
  border-radius: 10px; padding: 12px 16px; font-size: 12px; color: #f59e0b;
  margin-bottom: 24px; text-align: left; line-height: 1.5;
}
.e2e-setup__actions { display: flex; flex-direction: column; gap: 10px; }
.e2e-setup__confirm { font-size: 15px; padding: 14px; font-weight: 700; }

/* ── Lock badge dans le header du canal ── */
@keyframes e2ePop {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}
.e2e-lock-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.35);
  font-size: 13px; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .2s;
  margin-left: 8px; vertical-align: middle; flex-shrink: 0;
  animation: e2ePop .35s cubic-bezier(.34,1.56,.64,1);
}
.e2e-lock-badge:hover { background: rgba(34,197,94,.28); transform: scale(1.12); box-shadow: 0 0 10px rgba(34,197,94,.3); }
.e2e-lock-badge--verified { border-color: rgba(34,197,94,.6); box-shadow: 0 0 8px rgba(34,197,94,.3); }

/* ── Badge 🔒 sur chaque message chiffré ── */
.e2e-msg-badge {
  font-size: 11px; opacity: .55; margin-left: 6px; cursor: default;
  display: inline-block;
}

/* ── Modal de vérification ── */
.e2e-verify-box {
  max-width: 420px; width: 95%; padding: 36px 32px; position: relative;
}
.e2e-verify__close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 18px; padding: 4px 8px; border-radius: 6px;
}
.e2e-verify__close:hover { background: rgba(255,255,255,.1); }
.e2e-verify__head { text-align: center; margin-bottom: 20px; }
.e2e-verify__icon { font-size: 40px; display: block; margin-bottom: 10px; }
.e2e-verify__title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.e2e-verify__peer  { color: var(--accent); font-weight: 600; font-size: 15px; }
.e2e-verify__instructions { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }

/* ── Numéro de sécurité (style Signal) ── */
.e2e-safety-number {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; margin-bottom: 16px; font-family: monospace;
}
.e2e-sn-group {
  font-size: 20px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--accent); padding: 4px 8px;
  background: rgba(99,102,241,.08); border-radius: 6px;
}

/* ── Statut vérification ── */
.e2e-verify__status { min-height: 24px; margin-bottom: 20px; text-align: center; }
.e2e-verified { color: #22c55e; font-size: 13px; font-weight: 600; }
.e2e-verify__actions { display: flex; gap: 10px; }
.e2e-verify__actions .btn { flex: 1; justify-content: center; }

/* =========================================================================
   ANTI-GROOMING — signalement guidé, blocage+signalement, alertes
   ========================================================================= */

/* Questions contextuelles dans le modal signalement */
.grooming-questions {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.grooming-questions__intro {
  font-size: 12px; color: var(--text-muted); margin-bottom: 10px; font-style: italic;
}
.grooming-q {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--starlight);
  padding: 5px 0; cursor: pointer; user-select: none;
}
.grooming-q input[type=checkbox] { width: 16px; height: 16px; accent-color: #ef4444; flex-shrink: 0; }

/* Warning dans le modal Bloquer+Signaler */
.br-warning {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.br-warning__icon { font-size: 18px; flex-shrink: 0; }

/* Notification grooming (alerte admin) */
.grooming-notif {
  position: fixed; bottom: 80px; right: 20px;
  background: rgba(30,10,10,.96);
  border: 1px solid rgba(239,68,68,.4);
  border-left: 3px solid #ef4444;
  border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 360px; z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: groomNotifIn .25s ease;
}
@keyframes groomNotifIn {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.grooming-notif__icon { font-size: 20px; flex-shrink: 0; }
.grooming-notif strong { color: #ef4444; font-size: 13px; }
.grooming-notif__preview {
  display: block; margin-top: 4px;
  font-size: 12px; color: var(--text-muted);
  font-style: italic; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 280px;
}

/* ── Blocage fort (I) ── */
.msg--blocked { opacity: 0.45; pointer-events: none; }
.msg__blocked-placeholder {
  padding: 6px 12px;
  font-size: 12px; font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid rgba(239,68,68,.3);
  margin: 2px 0 2px 48px;
}

/* ── Panel de modération — badge grooming ── */
.mod-item__grooming-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,.10);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px; font-weight: 600; color: #f87171;
  margin: 6px 0;
}
