/*
 * Étiquettes (catégories, sujets, statuts) : <span class="tag" data-tone="mint">Design</span>
 *   .tag            pastille compacte, colorée par data-tone (gris par défaut)
 *   a.tag           cliquable (filtre, lien vers une catégorie)
 *   .tag--success / .tag--danger   statuts
 */

@layer components {
  .tag {
    display: inline-flex;
    gap: var(--space-1);
    align-items: center;
    min-block-size: 1.5rem;
    padding: 0.125rem var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    line-height: 1.2;
    color: var(--color-text);
    white-space: nowrap;
    text-decoration: none;
    background-color: var(--tone, var(--color-surface-muted));
    border-radius: var(--radius-full);

    & .icon {
      inline-size: 1em;
      block-size: 1em;
    }
  }

  a.tag {
    transition: box-shadow var(--duration-fast) var(--ease-out);

    &:hover {
      box-shadow: inset 0 0 0 1px var(--color-border-strong);
    }
  }

  .tag--success {
    color: var(--color-success);
    background-color: var(--color-success-soft);
  }

  .tag--danger {
    color: var(--color-danger);
    background-color: var(--color-danger-soft);
  }
}
