/* Contacts and articles (lots 4 and 5): lists, client record, forms. Tokens only (tokens.css). */

/* ---------- Segmented control (HT / TTC, Organisation / Particulier) ---------- */
.yb-segmented {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: 1px solid var(--yb-border-input);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-bg-sunken);
}

.yb-segmented__option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--yb-text-muted);
  font: inherit;
  font-weight: var(--yb-weight-medium);
  cursor: pointer;
  transition: background-color var(--yb-duration-fast) var(--yb-ease), color var(--yb-duration-fast) var(--yb-ease);
}

.yb-segmented__option:hover {
  color: var(--yb-text);
}

.yb-segmented__option--selected,
.yb-segmented__option--selected:hover {
  background: var(--yb-surface);
  color: var(--yb-primary);
  font-weight: var(--yb-weight-strong);
  box-shadow: var(--yb-shadow-xs), 0 0 0 1px color-mix(in srgb, var(--yb-primary) 45%, var(--yb-border));
}

.yb-segmented__option:focus-visible {
  outline: 2px solid var(--yb-focus);
  outline-offset: 1px;
}

.yb-segmented__option .mud-icon-root {
  font-size: 18px;
}

/* ---------- Forms in dialogs ---------- */
.yb-form {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-5);
}

.yb-form__alert.mud-alert {
  margin: 0;
}

.yb-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--yb-space-4);
}

.yb-form__grid .mud-input-control {
  margin: 0;
}

.yb-form__grid > *,
.yb-form__grid .mud-select,
.yb-form__grid .mud-autocomplete,
.yb-form__grid .mud-input-control {
  width: 100%;
  min-width: 0;
}

.yb-form__kind {
  align-self: flex-start;
}

.yb-form__span-2,
.yb-form__full,
.yb-form__grid > .mud-select:has(> .yb-form__full),
.yb-form__grid > .mud-select:has(> .yb-form__span-2) {
  grid-column: 1 / -1;
}

/* Swiss address order: street + number, addition, postcode + city, country. */
.yb-form__grid--address {
  grid-template-columns: 7rem minmax(0, 1fr) 6.5rem;
}

.yb-form__street {
  grid-column: 1 / 3;
}

.yb-form__number {
  grid-column: 3;
}

.yb-form__postcode {
  grid-column: 1;
}

.yb-form__city {
  grid-column: 2 / -1;
}

/* « Plus de détails » of a creation dialog (ux-guidelines §6: the essentials first, the rest folded). */
.yb-form__more {
  display: inline-flex;
  align-items: center;
  gap: var(--yb-space-1);
  align-self: flex-start;
  min-height: 36px;
}

.yb-form__more-body {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-5);
}

.yb-form__section {
  min-width: 0;
  margin: 0;
  padding: var(--yb-space-5) 0 0;
  border: 0;
  border-top: 1px solid var(--yb-border);
}

.yb-form__legend {
  float: left;
  width: 100%;
  margin-bottom: var(--yb-space-3);
  padding: 0;
  font-size: var(--yb-text-title-3);
  line-height: var(--yb-leading-title-3);
  font-weight: var(--yb-weight-title-3);
}

.yb-form__legend + * {
  clear: both;
}

/* As tall as its content up to the edge of the screen, then the content scrolls under fixed actions. */
.yb-form-dialog .mud-dialog-content.yb-form-dialog__content {
  min-height: 0;
  overflow-y: auto;
  padding-top: var(--yb-space-2);
}

.yb-form-dialog .mud-dialog-actions {
  border-top: 1px solid var(--yb-border);
  padding-top: var(--yb-space-3);
  padding-bottom: var(--yb-space-3);
}

@media (max-width: 767px) {
  /* Forms take the whole screen on phones (§4.5): no tiny floating window above the keyboard. */
  .mud-dialog-container .mud-dialog.yb-form-dialog {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .yb-form-dialog .mud-dialog-content.yb-form-dialog__content {
    flex: 1;
    max-height: none;
    padding: var(--yb-space-2) var(--yb-space-4) var(--yb-space-4);
  }

  .yb-form-dialog .mud-dialog-title {
    padding: var(--yb-space-4) var(--yb-space-4) var(--yb-space-2);
  }

  .yb-form-dialog .mud-dialog-actions {
    padding: var(--yb-space-3) var(--yb-space-4) calc(var(--yb-space-3) + env(safe-area-inset-bottom));
  }

  .yb-form-dialog .mud-dialog-actions .mud-button-root {
    flex: 1;
    min-height: var(--yb-touch-target);
  }

  .yb-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .yb-form__grid--address {
    grid-template-columns: minmax(0, 1fr) 6rem;
  }

  .yb-form__street {
    grid-column: 1;
  }

  .yb-form__number {
    grid-column: 2;
  }

  /* « Rue | N° » and « NPA | Localité » each on one line, as on every Swiss form (audit UX). */
  .yb-form__grid--address {
    grid-template-columns: 6rem minmax(0, 1fr) 5rem;
  }

  .yb-form__street {
    grid-column: 1 / 3;
  }

  .yb-form__number {
    grid-column: 3;
  }

  .yb-form__postcode {
    grid-column: 1;
  }

  .yb-form__city {
    grid-column: 2 / -1;
  }

  .yb-segmented {
    align-self: stretch;
  }

  .yb-segmented__option {
    flex: 1;
    justify-content: center;
    height: 38px;
  }

  .yb-price-input__row .yb-price-input__mode .yb-segmented__option {
    height: 38px;
  }

  /* The price on its own line, « hors TVA / TVA incluse » under it (audit UX, page 13: the field was squeezed). */
  .yb-price-input__row {
    flex-direction: column;
    align-items: stretch;
  }

  .yb-price-input .yb-price-input__row .yb-price-input__mode {
    align-self: stretch;
  }

  .yb-price-input .yb-price-input__row .yb-price-input__mode .yb-segmented__option {
    flex: 1;
    justify-content: center;
  }
}

/* ---------- Price input (HT / TTC) ---------- */
.yb-price-input {
  min-width: 0;
}

.yb-price-input__row {
  display: flex;
  align-items: flex-end;
  gap: var(--yb-space-3);
}

.yb-price-input__field {
  flex: 1;
  min-width: 0;
}

.yb-price-input__field input {
  font-size: var(--yb-text-title-3);
  font-weight: var(--yb-weight-strong);
}

.yb-price-input__mode {
  margin-bottom: 0;
}

.yb-price-input__row .yb-price-input__mode {
  align-self: flex-end;
}

.yb-price-input__row .yb-price-input__mode .yb-segmented__option {
  flex: none;
  height: 34px;
}

.yb-price-input__equivalent {
  min-height: 17px;
  margin: 6px 0 0;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
  font-variant-numeric: tabular-nums;
}

/* ---------- List toolbar, selection ---------- */
.yb-list-toolbar {
  justify-content: space-between;
  min-height: 57px;
}

.yb-list-toolbar__filters {
  display: flex;
  align-items: center;
  gap: var(--yb-space-2);
  min-width: 0;
}

.yb-list-toolbar__filters .yb-filter-bar {
  flex: 0 1 auto;
}

/* Always at the end of the toolbar, also when the filters push it onto its own line (invoices, quotes). D496: it starts
   from 200 px and grows to 320 px, so that it stays on the line of the filters whenever it fits there (a second line
   takes 50 px from the rows of a full-page list). */
.yb-list-toolbar__search.mud-input-control {
  flex: 1 1 200px;
  max-width: 320px;
  margin: 0 0 0 auto;
}

.yb-filter-chip--toggle .mud-icon-root {
  font-size: 16px;
}

.yb-selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yb-space-2);
  min-height: 32px;
}

/* Narrow widths: the actions wrap under the count instead of overflowing; each keeps its label on one line. */
.yb-selection-bar__count,
.yb-selection-bar .mud-button-root {
  white-space: nowrap;
}

.yb-selection-bar__count {
  margin-right: var(--yb-space-2);
  font-weight: var(--yb-weight-strong);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  /* nowrap: in a wrapping column the line is as wide as its widest item (the chips), and the search followed it off
     the card (audit UX, page 13 — every list using this toolbar). */
  .yb-list-toolbar {
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: stretch;
  }

  .yb-list-toolbar__search.mud-input-control {
    flex: none;
    max-width: none;
    margin-left: 0;
  }

  .yb-list-toolbar__filters {
    overflow-x: auto;
    scrollbar-width: none;
  }
}

/* ---------- Grids: whole row clickable through its main link ---------- */
.yb-grid--links .mud-table-row {
  position: relative;
}

.yb-row-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--yb-text);
  font: inherit;
  font-weight: var(--yb-weight-medium);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

button.yb-row-link {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
}

button.yb-row-link > .yb-truncate {
  display: block;
  text-align: left;
}

/* Lists never widen the page on phones: long filter rows scroll inside the toolbar instead. */
.yb-page.yb-contacts,
.yb-page.yb-items {
  width: 100%;
  min-width: 0;
}

.yb-list-panel {
  min-width: 0;
  max-width: 100%;
  /* clip, not hidden: nothing widens the page, and the panel does not become a scrolling area of its own, so its
     toolbar can stick on a phone (D495). */
  overflow: clip;
}

/* D495: on a phone the whole page scrolls; the filter and the search of a list stay under the top bar. */
@media (max-width: 767px) {
  .yb-list-panel > .yb-panel__body > .yb-panel__toolbar {
    position: sticky;
    top: var(--yb-topbar-height);
    z-index: 6;
    background: var(--yb-surface);
  }
}

.yb-grid--links .yb-row-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.yb-row-link:hover {
  color: var(--yb-primary);
  text-decoration: underline;
}

.yb-row-link:focus-visible {
  outline: none;
}

.yb-row-link:focus-visible::after {
  outline: 2px solid var(--yb-focus);
  outline-offset: -2px;
  border-radius: 2px;
}

/* Controls above the stretched link stay clickable. */
.yb-grid--links .mud-table-cell .mud-checkbox,
.yb-grid--links .yb-cell-link,
.yb-grid--links .yb-action-menu {
  position: relative;
  z-index: 1;
}

.yb-cell-link {
  color: var(--yb-text-muted);
  text-decoration: none;
}

.yb-cell-link:hover {
  color: var(--yb-primary);
  text-decoration: underline;
}

.yb-row--archived .yb-row-link,
.yb-row--archived .yb-monogram {
  opacity: 0.72;
}

.mud-table-cell.yb-cell-contact,
.mud-table-cell.yb-cell-article {
  max-width: 0;
  width: 46%;
}

.mud-table-cell.yb-cell-city {
  max-width: 180px;
  color: var(--yb-text-muted);
}

.mud-table-cell.yb-cell-email {
  max-width: 240px;
}

.mud-table-cell.yb-cell-phone,
.mud-table-cell.yb-cell-language,
.mud-table-cell.yb-cell-unit,
.mud-table-cell.yb-cell-vat {
  width: 1%;
  white-space: nowrap;
}

.mud-table-cell.yb-cell-unit {
  color: var(--yb-text-muted);
}

.mud-table-cell.yb-cell-vat {
  color: var(--yb-text-muted);
}

/* Net tax rate activity of an article (lot 25a): activity 2 in the safran tint, like its number in the settings. */
.mud-table-cell.yb-cell-activity {
  width: 1%;
  white-space: nowrap;
}

.yb-activity-pill {
  display: inline-block;
  max-width: 14rem;
  line-height: 24px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yb-pill.yb-activity-pill--2 {
  background: var(--yb-accent-soft);
  color: var(--yb-on-accent-soft);
}

/* Sortable amount columns: the sort arrow goes before the label so the label lines up with the amounts. */
th.yb-cell-amount .column-header {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.mud-table-cell.yb-cell-category {
  max-width: 200px;
}

/* ---------- Monogram (organisations square-ish, persons round) ---------- */
.yb-monogram {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--yb-primary-soft);
  color: var(--yb-on-primary-soft);
  font-size: 12px;
  font-weight: var(--yb-weight-strong);
  letter-spacing: 0.02em;
}

.yb-monogram--person {
  border-radius: 50%;
  background: var(--yb-accent-soft);
  color: var(--yb-on-accent-soft);
}

.yb-contact-cell {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  min-width: 0;
}

.yb-contact-cell__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.yb-contact-cell__name,
.yb-contact-cell__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yb-contact-cell__meta {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-lang {
  display: inline-block;
  min-width: 28px;
  padding: 1px 6px;
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-sm);
  color: var(--yb-text-muted);
  font-size: 11.5px;
  font-weight: var(--yb-weight-strong);
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.yb-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px dashed var(--yb-border-strong);
  border-radius: var(--yb-radius-pill);
  color: var(--yb-text-muted);
  font-size: 11.5px;
  font-weight: var(--yb-weight-medium);
  /* A tag has the height of one line: a long one (« Sans rapport avec une facture ») never wraps out of its border. */
  white-space: nowrap;
}

.yb-tag--large {
  height: 24px;
  padding: 0 10px;
  font-size: var(--yb-text-caption);
}

/* ---------- Mobile cards (contacts, articles) ---------- */
.yb-contact-cards,
.yb-article-cards {
  margin: 0;
  padding: 0;
  list-style: none;
}

.yb-contact-card,
.yb-article-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  min-height: 64px;
  padding: var(--yb-space-3) var(--yb-space-4);
  border-bottom: 1px solid var(--yb-border);
}

.yb-contact-card:last-child,
.yb-article-card:last-child {
  border-bottom: 0;
}

.yb-contact-card .yb-row-link::after,
.yb-article-card .yb-row-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.yb-contact-card:active,
.yb-article-card:active {
  background: var(--yb-hover);
}

.yb-contact-card__text,
.yb-article-card__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.yb-contact-card__name,
/* On two lines rather than cut (audit UX, page 13: the rules of the main name of a card). */
.yb-article-card__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}

.yb-article-card__name .yb-truncate {
  white-space: normal;
}

.yb-contact-card__meta {
  overflow: hidden;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yb-contact-card__action.mud-icon-button {
  position: relative;
  z-index: 1;
  width: var(--yb-touch-target);
  height: var(--yb-touch-target);
  color: var(--yb-primary);
}

.yb-article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  min-width: 0;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-article-card__price {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
}

.yb-article-card__price .yb-money__amount {
  font-weight: var(--yb-weight-strong);
}

.yb-article-card__unit {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

/* D495: « Afficher plus » under the cards of a list on a phone, how many are shown under it. */
.yb-phone-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--yb-space-2);
  padding: var(--yb-space-1) var(--yb-space-3) var(--yb-space-4);
}

.yb-phone-more .mud-button-root {
  min-height: var(--yb-touch-target);
}

.yb-phone-more__count {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

/* ---------- Article cell, category tag ---------- */
.yb-article-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.yb-article-cell__line {
  display: flex;
  align-items: baseline;
  gap: var(--yb-space-2);
  min-width: 0;
}

.yb-article-cell__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yb-article-cell__code {
  flex: none;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-article-cell__description {
  overflow: hidden;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yb-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
}

.yb-cat__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yb-dot);
}

/* ---------- Client record ---------- */
.yb-contact__header-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
}

/* What one comes for (history, payments) first, the address — which rarely changes — beside it; the same order on a
   phone (audit UX). */
.yb-contact__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  align-items: start;
  gap: var(--yb-space-6);
}

.yb-contact__side {
  order: -1;
}

@media (max-width: 1023px) {
  .yb-contact__layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.yb-contact__archived.mud-alert {
  margin: 0;
}

.yb-contact__header .yb-page-header__title {
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  /* One row of actions on phones: more, quote, invoice (the primary action keeps its weight by its fill). */
  .yb-contact__header .yb-page-header__actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }

  .yb-contact__header .yb-page-header__actions .mud-button-root {
    min-height: var(--yb-touch-target);
    padding-inline: var(--yb-space-2);
  }
}

.yb-facts {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-3);
  margin: 0;
}

.yb-facts__row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: var(--yb-space-3);
}

.yb-facts__row dt {
  padding-top: 1px;
  color: var(--yb-text-muted);
}

.yb-facts__row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.yb-facts__label {
  display: block;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-facts__link {
  color: var(--yb-primary);
  text-decoration: none;
}

.yb-facts__link:hover {
  text-decoration: underline;
}

.yb-facts__muted {
  color: var(--yb-text-muted);
}

.yb-facts__warning {
  color: var(--yb-warning);
}

.yb-contact__subtitle {
  margin: var(--yb-space-6) 0 var(--yb-space-3);
  padding-top: var(--yb-space-5);
  border-top: 1px solid var(--yb-border);
  font-size: var(--yb-text-title-3);
  line-height: var(--yb-leading-title-3);
  font-weight: var(--yb-weight-title-3);
}

.yb-pairs {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
  margin: 0;
}

.yb-pairs > div {
  display: flex;
  justify-content: space-between;
  gap: var(--yb-space-4);
}

.yb-pairs dt {
  color: var(--yb-text-muted);
}

.yb-pairs dd {
  margin: 0;
  font-weight: var(--yb-weight-medium);
  text-align: right;
}

.yb-contact__notes {
  margin: 0;
  color: var(--yb-text);
  white-space: pre-line;
}

/* ---------- CSV import ---------- */
.yb-import__intro {
  margin: 0 0 var(--yb-space-4);
}

.yb-import__columns {
  margin: var(--yb-space-3) 0 0;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-import__summary {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
  margin: 0 0 var(--yb-space-4);
  padding: 0;
  list-style: none;
}

.yb-import__stat {
  display: flex;
  align-items: center;
  gap: var(--yb-space-2);
  color: var(--yb-text-muted);
}

.yb-import__stat--ok {
  color: var(--yb-success);
  font-weight: var(--yb-weight-strong);
}

.yb-import__stat--error {
  color: var(--yb-error);
  font-weight: var(--yb-weight-medium);
}

.yb-import__issues {
  max-height: 280px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-md);
  list-style: none;
}

.yb-import__issue {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--yb-space-3);
  padding: var(--yb-space-2) var(--yb-space-3);
  border-bottom: 1px solid var(--yb-border);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-import__issue:last-child {
  border-bottom: 0;
}

.yb-import__line {
  color: var(--yb-text-muted);
}

.yb-import__issue-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Categories ---------- */
.yb-categories__intro {
  margin: 0 0 var(--yb-space-4);
  color: var(--yb-text-muted);
}

.yb-categories__empty {
  margin: 0 0 var(--yb-space-3);
  color: var(--yb-text-muted);
}

.yb-categories__list {
  margin: 0 0 var(--yb-space-4);
  padding: 0;
  list-style: none;
}

.yb-categories__row,
.yb-categories__add {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
}

.yb-categories__row {
  padding: var(--yb-space-2) 0;
  border-bottom: 1px solid var(--yb-border);
}

.yb-categories__name.mud-input-control {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.yb-categories__count {
  flex: none;
  min-width: 5.5rem;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  text-align: right;
}

.yb-swatch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--yb-border-input);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-surface);
  cursor: pointer;
}

/* The dot of a category colour (not .yb-swatch: that name belongs to the PDF accent swatches of settings.css). */
.yb-color-dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--yb-dot);
}

.yb-color-grid {
  display: grid;
  grid-template-columns: repeat(4, 36px);
  gap: var(--yb-space-2);
  padding: var(--yb-space-2);
}

.yb-swatch-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: var(--yb-radius-sm);
  background: none;
  cursor: pointer;
}

.yb-swatch-option:hover {
  background: var(--yb-hover);
}

.yb-swatch-option.is-selected {
  border-color: var(--yb-text);
}

.yb-swatch-option:focus-visible {
  outline: 2px solid var(--yb-focus);
  outline-offset: 1px;
}

@media (max-width: 767px) {
  .yb-categories__count {
    display: none;
  }

  .yb-categories__add {
    flex-wrap: wrap;
  }

  .yb-categories__add > .mud-button-root {
    flex: 1 0 100%;
    min-height: var(--yb-touch-target);
  }
}

/* Audit UX, page 13: the VAT of a new article said while its field is folded; an article without category. */
.yb-item-vat {
  margin: 0;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-cat--none {
  color: var(--yb-text-subtle, var(--yb-text-muted));
}

/* The notes of the article window and « Plus de détails », kept together (audit UX, page 13). */
.yb-item-more {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--yb-space-1);
}

/* D384: « Ce prix comprend-il la TVA ? Non · Oui » under the price. */
.yb-price-input__vat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yb-space-2) var(--yb-space-3);
  margin-top: var(--yb-space-2);
}

.yb-price-input__question {
  color: var(--yb-text);
  font-size: var(--yb-text-body-sm, 14px);
}
