/* Skills dans le composer : bouton « Skills / », chip du skill actif, menu « / ».
   QUOI : port de composer.css (.nx-menu*) et panels.css (.nx-slash) de la maquette.
   COMMENT : le menu s'ancre sur la carte du composer (position: relative ajoutée ici, sans
   toucher composer.css) et s'ouvre au-dessus, aligné à gauche comme dans la maquette. */
.composer__box { position: relative; }
.skill-bar { display: flex; align-items: center; gap: var(--space-1); min-inline-size: 0; }

.skill-chip { min-inline-size: 0; padding-inline-end: 2px; }
.skill-chip__name { min-inline-size: 0; max-inline-size: 180px; overflow: hidden; text-overflow: ellipsis; }
.skill-chip__remove {
  inline-size: 24px; block-size: 24px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: var(--radius-full); background: none; color: inherit; cursor: pointer; font-size: var(--text-xs);
}
.skill-chip__remove:hover { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }

.nx-menu {
  position: absolute; z-index: var(--z-popover); min-inline-size: 240px;
  padding: var(--space-1); border-radius: var(--radius-lg);
  border: 1px solid var(--color-border); background: var(--color-surface-overlay); box-shadow: var(--shadow-lg);
  animation: nx-pop-in var(--duration-base) var(--ease-emphasized); transform-origin: bottom left;
}
@keyframes nx-pop-in { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
.nx-menu__label { padding: var(--space-2) var(--space-3) var(--space-1); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-text-muted); }
.nx-menu__item {
  display: flex; align-items: center; gap: var(--space-3);
  inline-size: 100%; min-block-size: var(--hit-target); padding: var(--space-2) var(--space-3);
  border: 0; border-radius: var(--radius-md); background: none; text-align: start; font-size: var(--text-sm); cursor: pointer;
}
.nx-menu__item:hover, .nx-menu__item[data-active] { background: var(--color-surface-2); }
.nx-menu__text { display: flex; flex-direction: column; min-inline-size: 0; }
.nx-menu__title { font-weight: var(--weight-medium); }
.nx-menu__desc { font-size: var(--text-xs); color: var(--color-text-muted); }
.nx-menu__enter { margin-inline-start: auto; }
.nx-menu__empty { padding: var(--space-2) var(--space-3) var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }

/* Menu « / » ancré au-dessus du composer (panels.css). */
.nx-slash {
  inset-block-end: calc(100% + var(--space-2)); inset-inline-start: 0;
  inline-size: min(380px, 100%); max-block-size: min(50vh, 360px); overflow-y: auto;
}
@media (prefers-reduced-motion: reduce) { .nx-menu { animation: none; } }

/* m3-fix-css — the « / » menu no longer sits on half-hidden starter cards.
   QUOI : while the skills menu is open, the empty-state starter cards fade
   out (and leave the tab order / hit-testing); they come back on close.
   POURQUOI : the menu opens upward from the composer and covered the lower
   half of the cards — two layers of half-visible choices. Picking a skill
   and picking a starter are the same decision, so only one set shows.
   COMMENT : :has() on the shell keys off the menu being in the DOM — zero
   Dart change. visibility (not display) keeps the layout still, so the
   greeting does not jump; the fade uses --duration-fast, cut by the
   global reduced-motion rule in base.css. */
.app:has(.nx-slash) .starters {
  opacity: 0; visibility: hidden;
  transition: opacity var(--duration-fast) var(--ease-standard), visibility 0s linear var(--duration-fast);
}
.starters { transition: opacity var(--duration-fast) var(--ease-standard); }
