/* ==========================================================================
   Stellion — barre latérale ordinateur (maquette Sidebar)
   248 px avec libellés ; 76 px (icônes) quand Nexus ou Messages est ouvert
   (body.st-side-compact, js/sidebar.js) et entre 769 et 1023 px. Masquée sur mobile.
   Les vues posées par-dessus (profil, paramètres) commencent à --side-w.
   ========================================================================== */

:root {
  --side-w: var(--sidebar-w);
}

body.st-side-compact {
  --side-w: var(--sidebar-w-compact);
}

@media (max-width: 1023px) {
  :root,
  body.st-side-compact {
    --side-w: var(--sidebar-w-compact);
  }
}

.st-side {
  width: var(--side-w);
  flex-shrink: 0;
  height: 100%;
  padding: 18px var(--space-3) var(--space-4);
  border-right: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 50;
}

.st-side::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .st-side {
    display: none;
  }
}

/* Logo et entrées */
.st-side__brand,
.st-side__item,
.st-side__acc {
  width: 100%;
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--text-muted);
  font: inherit;
  letter-spacing: 0;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
}

.st-side__brand:hover,
.st-side__item:hover,
.st-side__acc:hover {
  filter: none;
  transform: none;
  box-shadow: none;
}

.st-side__brand {
  min-height: 48px;
  margin-bottom: 10px;
  padding: 0 var(--space-2);
  gap: var(--space-3);
  color: var(--text);
}

.st-side__brand .st-logo {
  --logo-size: 36px;
}

.st-side__brand-name {
  font-size: 22px; /* valeur de la maquette Sidebar */
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-title);
}

.st-side__item {
  position: relative;
  min-height: 50px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-lg);
  gap: 14px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.st-side__item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.st-side__item.selected {
  background: var(--selected);
  color: var(--text);
  font-weight: var(--weight-bold);
}

.st-side__item > svg {
  flex-shrink: 0;
}

.st-side__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-side__dot[hidden] {
  display: none;
}

.st-side__me .st-avatar {
  --avatar-size: 26px;
}

.st-side__publish {
  min-height: 50px;
  margin-top: 10px;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
}

.st-side__section {
  margin: 0;
  padding: 22px var(--space-3) 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Nexus de la liste */
.st-side__nexus-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-side__nx {
  min-height: 42px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  gap: var(--space-3);
}

.st-side__nx-mark {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  font-size: var(--text-2xs);
}

/* Nouveaux messages dans un nexus : un point */
.nexus-notif-bubble {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--accent);
}

.st-side__new {
  min-height: 42px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  gap: var(--space-3);
}

.st-side__new-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.st-side__spacer {
  flex: 1;
  min-height: var(--space-4);
}

.st-side__install {
  min-height: var(--tap-min);
  font-size: var(--text-sm);
}

.st-side__install[hidden] {
  display: none;
}

/* Compte en bas : avatar, nom, @pseudo, puis la roue des paramètres */
.st-side__account {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.st-side__acc {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  gap: 10px;
  color: var(--text);
}

.st-side__acc:hover {
  background: var(--surface-2);
}

.st-side__acc-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.st-side__acc-name,
.st-side__acc-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-side__acc-name {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.st-side__acc-handle {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-muted);
}

/* ---------- Compacte : icônes seules, centrées ---------- */

@media (min-width: 769px) and (max-width: 1023px) {
  .st-side { padding-left: var(--space-2); padding-right: var(--space-2); }
  .st-side .st-side__label,
  .st-side .st-side__brand-name,
  .st-side .st-side__section,
  .st-side .st-side__acc-text { display: none; }
  .st-side .st-side__brand,
  .st-side .st-side__item,
  .st-side .st-side__acc { justify-content: center; padding: 0; }
  .st-side .st-side__nx-mark { width: var(--tap-min); height: var(--tap-min); border-radius: var(--radius-lg); font-size: var(--text-md); }
  .st-side .nexus-notif-bubble { position: absolute; top: 6px; right: 6px; }
  .st-side .st-side__account { flex-direction: column; }
}

body.st-side-compact .st-side { padding-left: var(--space-2); padding-right: var(--space-2); }
body.st-side-compact .st-side .st-side__label,
body.st-side-compact .st-side .st-side__brand-name,
body.st-side-compact .st-side .st-side__section,
body.st-side-compact .st-side .st-side__acc-text { display: none; }
body.st-side-compact .st-side .st-side__brand,
body.st-side-compact .st-side .st-side__item,
body.st-side-compact .st-side .st-side__acc { justify-content: center; padding: 0; }
body.st-side-compact .st-side .st-side__nx-mark { width: var(--tap-min); height: var(--tap-min); border-radius: var(--radius-lg); font-size: var(--text-md); }
body.st-side-compact .st-side .nexus-notif-bubble { position: absolute; top: 6px; right: 6px; }
body.st-side-compact .st-side .st-side__account { flex-direction: column; }
body.st-side-compact .st-side .st-side__section { display: block; height: 1px; margin: var(--space-4) var(--space-2) var(--space-2); padding: 0; overflow: hidden; color: transparent; background: var(--border); }
