/* ==========================================================================
   Settings, start-up assistant, e-mail banner (lots 2-3). Tokens only.
   ========================================================================== */

/* ---------- Shared form helpers ---------- */
.yb-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--yb-space-4);
}

.yb-field-row--street {
  grid-template-columns: minmax(0, 3fr) minmax(88px, 1fr);
}

.yb-field-row--city {
  grid-template-columns: minmax(88px, 1fr) minmax(0, 3fr);
}

.yb-field-block {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
}

.yb-field-label {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-medium);
  line-height: var(--yb-leading-caption);
}

.yb-field-narrow {
  max-width: 240px;
}

.yb-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yb-space-3);
}

.yb-inline-actions__ok {
  display: inline-flex;
  align-items: center;
  gap: var(--yb-space-1);
  color: var(--yb-success);
  font-weight: var(--yb-weight-medium);
}

/* ---------- Settings layout ---------- */
.yb-settings__layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: var(--yb-space-8);
  align-items: start;
}

.yb-settings__nav {
  position: sticky;
  top: calc(var(--yb-topbar-height) + var(--yb-space-4));
}

.yb-settings__nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 var(--yb-space-5);
  padding: 0;
  list-style: none;
}

.yb-settings__group {
  margin: 0 0 var(--yb-space-2);
  padding: 0 var(--yb-space-3);
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-medium);
}

.yb-settings__link {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  min-height: 40px;
  padding: var(--yb-space-1) var(--yb-space-3);
  border: 1px solid transparent;
  border-radius: var(--yb-radius-sm);
  color: var(--yb-text-muted);
  font-weight: var(--yb-weight-medium);
  text-decoration: none;
  transition: background-color var(--yb-duration-fast) var(--yb-ease), color var(--yb-duration-fast) var(--yb-ease);
}

.yb-settings__link:hover {
  background: var(--yb-hover);
  color: var(--yb-text);
}

.yb-settings__link:focus-visible {
  outline: 2px solid var(--yb-focus);
  outline-offset: 2px;
}

.yb-settings__link--active,
.yb-settings__link--active:hover {
  border-color: var(--yb-border);
  background: var(--yb-surface);
  color: var(--yb-text);
}

.yb-settings__link-icon {
  display: inline-flex;
  color: inherit;
}

.yb-settings__link--active .yb-settings__link-icon {
  color: var(--yb-primary);
}

.yb-settings__link-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.yb-settings__link-description,
.yb-settings__link-chevron,
.yb-settings__back {
  display: none;
}

.yb-settings__content {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-5);
  min-width: 0;
  max-width: 960px;
}

.yb-settings__section-header p {
  margin-top: var(--yb-space-1);
  color: var(--yb-text-muted);
}

.yb-settings__conflict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yb-space-4);
  padding: var(--yb-space-4) var(--yb-space-5);
  border: 1px solid var(--yb-warning);
  border-radius: var(--yb-radius-md);
  background: var(--yb-warning-soft);
  color: var(--yb-text);
}

.yb-settings__conflict > .mud-icon-root {
  flex: none;
  color: var(--yb-warning);
}

.yb-settings__conflict > div {
  flex: 1 1 320px;
}

.yb-settings__conflict-title {
  font-weight: var(--yb-weight-strong);
}

/* ---------- Settings groups ---------- */
.yb-sgroup {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--yb-space-4) var(--yb-space-8);
  padding: var(--yb-space-6) 0;
  border-top: 1px solid var(--yb-border);
}

.yb-panel__body > .yb-sgroup:first-child {
  padding-top: var(--yb-space-1);
  border-top: 0;
}

.yb-panel__body > .yb-sgroup:last-child {
  padding-bottom: var(--yb-space-1);
}

.yb-sgroup--stacked {
  grid-template-columns: 1fr;
}

.yb-sgroup__title {
  font-size: var(--yb-text-title-3);
  font-weight: var(--yb-weight-title-3);
  line-height: var(--yb-leading-title-3);
}

.yb-sgroup__description {
  max-width: 44ch;
  margin-top: var(--yb-space-1);
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-sgroup__link {
  margin-top: var(--yb-space-1);
}

.yb-sgroup__body {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-4);
  min-width: 0;
}

.yb-setting-switch {
  display: flex;
  flex-direction: column;
}

.yb-setting-switch .mud-switch {
  margin-left: calc(-1 * var(--yb-space-2));
}

.yb-setting-switch__help {
  max-width: 60ch;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-setting-switch .yb-setting-switch__help {
  padding-left: 52px;
}

.yb-danger-zone {
  border-color: var(--yb-error-soft);
}

.yb-danger-zone .yb-sgroup__title {
  color: var(--yb-error);
}

/* ---------- Save bar ---------- */
.yb-savebar {
  position: sticky;
  bottom: var(--yb-space-4);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--yb-space-3);
  padding: var(--yb-space-2) var(--yb-space-2) var(--yb-space-2) var(--yb-space-5);
  border: 1px solid var(--yb-border-strong);
  border-radius: var(--yb-radius-md);
  background: var(--yb-surface-raised);
  box-shadow: var(--yb-shadow-md);
  transition: opacity var(--yb-duration) var(--yb-ease), transform var(--yb-duration) var(--yb-ease);
}

.yb-savebar--hidden {
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
}

.yb-savebar__state {
  display: flex;
  align-items: center;
  gap: var(--yb-space-2);
  font-weight: var(--yb-weight-medium);
}

.yb-savebar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yb-accent);
}

.yb-savebar__ok {
  color: var(--yb-success);
}

.yb-savebar__error {
  color: var(--yb-error);
}

.yb-savebar__actions {
  display: flex;
  gap: var(--yb-space-2);
}

.yb-savebar--saved .yb-savebar__actions {
  display: none;
}

/* ---------- Logo editor ---------- */
.yb-logo-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yb-space-4);
}

.yb-logo-editor .yb-dropzone-host {
  flex: 1 1 100%;
}

.yb-logo-editor__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 104px;
  padding: var(--yb-space-4);
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-sm);
  /* The logo is shown as printed: on white paper, in both themes. */
  background: var(--yb-illu-paper);
}

.yb-logo-editor__preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.yb-logo-editor__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--yb-space-2);
}

.yb-logo-editor__error {
  flex: 1 1 100%;
  color: var(--yb-error);
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-medium);
}

/* ---------- IBAN field ---------- */
.yb-iban {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
}

.yb-iban__input input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.yb-iban__status:empty {
  display: none;
}

.yb-iban__note {
  display: flex;
  gap: var(--yb-space-3);
  padding: var(--yb-space-3) var(--yb-space-4);
  border-radius: var(--yb-radius-sm);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-iban__note .mud-icon-root {
  flex: none;
  margin-top: 1px;
}

.yb-iban__note-title {
  font-size: var(--yb-text-body);
  font-weight: var(--yb-weight-strong);
}

.yb-iban__note--ok {
  background: var(--yb-success-soft);
  color: var(--yb-text);
}

.yb-iban__note--ok .mud-icon-root,
.yb-iban__note--ok .yb-iban__note-title {
  color: var(--yb-success);
}

/* ---------- Bank accounts ---------- */
.yb-bank-list {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.yb-bank-card {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  padding: var(--yb-space-3) var(--yb-space-2) var(--yb-space-3) var(--yb-space-4);
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-surface);
}

.yb-bank-card--single {
  padding-right: var(--yb-space-3);
}

.yb-bank-card__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--yb-radius-sm);
  background: var(--yb-primary-soft);
  color: var(--yb-on-primary-soft);
}

.yb-bank-card__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.yb-bank-card__label {
  font-weight: var(--yb-weight-strong);
}

.yb-bank-card__iban {
  color: var(--yb-text-muted);
  letter-spacing: 0.02em;
}

.yb-bank-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--yb-space-1);
  margin-top: var(--yb-space-1);
}

.yb-bank-card__actions {
  display: flex;
  flex: none;
}

.yb-bank-empty {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  padding: var(--yb-space-4);
  border: 1px dashed var(--yb-border-strong);
  border-radius: var(--yb-radius-sm);
  color: var(--yb-text-muted);
}

.yb-bank-dialog__fields,
.yb-dialog__fields {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-4);
}

.yb-dialog__lead {
  margin-bottom: var(--yb-space-5);
  color: var(--yb-text-muted);
}

.yb-menu-danger,
.yb-menu-danger .mud-icon-root {
  color: var(--yb-error);
}

/* ---------- Numbering ---------- */
.yb-numbering-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--yb-space-4);
  align-items: start;
}

.yb-numbering-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 62px;
  padding: var(--yb-space-2) var(--yb-space-3);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-bg-sunken);
}

.yb-numbering-preview__label {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-numbering-preview__values {
  font-weight: var(--yb-weight-strong);
}

.yb-numbering-preview__invalid {
  color: var(--yb-error);
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-medium);
}

.yb-token-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--yb-space-2) var(--yb-space-4);
  margin: 0;
}

.yb-token-list dt code {
  padding: 2px var(--yb-space-2);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-primary-soft);
  color: var(--yb-on-primary-soft);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: var(--yb-text-caption);
}

.yb-token-list dd {
  margin: 0;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

/* ---------- Reminders ---------- */
.yb-reminder-levels {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-3);
}

.yb-reminder-level {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: var(--yb-space-4);
  align-items: end;
  padding-bottom: var(--yb-space-3);
  border-bottom: 1px dashed var(--yb-border);
}

.yb-reminder-level:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.yb-reminder-level__title {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  height: var(--yb-field-height);
}

.yb-reminder-level__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yb-status-amber-bg);
  color: var(--yb-status-amber-fg);
  font-weight: var(--yb-weight-strong);
}

.yb-reminder-level__name {
  font-weight: var(--yb-weight-strong);
}

/* ---------- PDF template ---------- */
.yb-pdf-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--yb-space-5);
  align-items: start;
}

.yb-pdf-settings__preview {
  position: sticky;
  top: calc(var(--yb-topbar-height) + var(--yb-space-4));
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
}

.yb-pdf-settings__viewer .yb-pdf__desk {
  max-height: calc(100dvh - var(--yb-topbar-height) - 160px);
}

.yb-pdf-settings__note {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.yb-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--yb-surface);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px var(--yb-border-strong);
  /* The check mark sits on the swatch colour itself (always a dark accent). */
  color: #fff;
  cursor: pointer;
  transition: transform var(--yb-duration-fast) var(--yb-ease);
}

.yb-swatch:hover {
  transform: scale(1.06);
}

.yb-swatch:focus-visible {
  outline: 2px solid var(--yb-focus);
  outline-offset: 3px;
}

.yb-swatch--selected {
  box-shadow: 0 0 0 2px var(--yb-text);
}

.yb-swatch:disabled {
  cursor: default;
  opacity: 0.6;
}

.yb-color-field {
  display: flex;
  align-items: flex-start;
  gap: var(--yb-space-3);
  max-width: 280px;
}

.yb-color-field__picker {
  flex: none;
  width: 44px;
  height: 40px;
  margin-top: 21px;
  padding: 2px;
  border: 1px solid var(--yb-border-input);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-surface);
  cursor: pointer;
}

.yb-choice {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
}

.yb-toggle.mud-toggle-group {
  width: fit-content;
}

/* ---------- Users ---------- */
.yb-members {
  margin: 0;
  padding: 0;
  list-style: none;
}

.yb-members__item {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  min-height: 60px;
  padding: var(--yb-space-2) var(--yb-space-5);
}

.yb-members__item + .yb-members__item {
  border-top: 1px solid var(--yb-border);
}

.yb-members__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.yb-members__name {
  font-weight: var(--yb-weight-strong);
}

.yb-members__you {
  margin-left: var(--yb-space-2);
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-regular);
}

.yb-members__email,
.yb-members__since {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-role--owner {
  background: var(--yb-status-petrol-bg);
  color: var(--yb-status-petrol-fg);
}

.yb-roles-help {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: var(--yb-space-6);
}

.yb-roles-help__intro {
  display: flex;
  gap: var(--yb-space-3);
  color: var(--yb-text-muted);
}

.yb-roles-help__intro > .mud-icon-root {
  flex: none;
  color: var(--yb-primary);
}

.yb-roles-help__title {
  color: var(--yb-text);
  font-weight: var(--yb-weight-strong);
}

.yb-roles-help__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--yb-space-2) var(--yb-space-4);
  margin: 0;
}

.yb-roles-help__list dt {
  font-weight: var(--yb-weight-strong);
}

.yb-roles-help__list dd {
  margin: 0;
  color: var(--yb-text-muted);
}

/* ---------- Subscription ---------- */

/* ---------- Account ---------- */
.yb-account-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yb-space-3);
  padding: var(--yb-space-3) var(--yb-space-4);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-bg-sunken);
}

.yb-account-email__value {
  flex: 1;
  min-width: 0;
  font-weight: var(--yb-weight-strong);
}

.yb-link-list {
  margin: 0;
  padding: 0;
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-sm);
  list-style: none;
}

.yb-link-list li + li {
  border-top: 1px solid var(--yb-border);
}

.yb-link-list__item {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  min-height: 48px;
  padding: var(--yb-space-2) var(--yb-space-3);
  color: var(--yb-text);
  text-decoration: none;
}

.yb-link-list__item:hover {
  background: var(--yb-hover);
}

.yb-link-list__item:focus-visible {
  outline: 2px solid var(--yb-focus);
  outline-offset: -2px;
}

.yb-link-list__icon {
  display: inline-flex;
  color: var(--yb-primary);
}

.yb-link-list__label {
  flex: 1;
  font-weight: var(--yb-weight-medium);
}

.yb-link-list__chevron {
  color: var(--yb-text-muted);
}

/* ---------- E-mail confirmation banner ---------- */
.yb-banner {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  margin: var(--yb-space-4) var(--yb-space-8) 0;
  padding: var(--yb-space-2) var(--yb-space-2) var(--yb-space-2) var(--yb-space-4);
  border: 1px solid var(--yb-accent);
  border-radius: var(--yb-radius-md);
  background: var(--yb-accent-soft);
  color: var(--yb-on-accent-soft);
}

.yb-banner__icon {
  flex: none;
}

.yb-banner__text {
  flex: 1;
  min-width: 0;
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-banner__text strong {
  margin-right: var(--yb-space-1);
  font-size: var(--yb-text-body);
}

.yb-banner__actions {
  display: flex;
  flex: none;
  align-items: center;
}

/* ---------- Focus layout (start-up assistant) ---------- */
.yb-focus {
  min-height: 100dvh;
  background: var(--yb-frame);
}

.yb-focus__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--yb-topbar-height);
  padding: 0 var(--yb-space-6);
}

.yb-focus__exit {
  color: var(--yb-text-muted);
  font-weight: var(--yb-weight-medium);
  text-decoration: none;
}

.yb-focus__exit:hover {
  color: var(--yb-text);
}

.yb-focus__main {
  min-height: calc(100dvh - var(--yb-topbar-height) - var(--yb-sheet-inset));
  margin: 0 var(--yb-sheet-inset) var(--yb-sheet-inset);
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-lg);
  background: var(--yb-bg);
}

.yb-focus__main:focus {
  outline: none;
}

/* ---------- Start-up assistant ---------- */
.yb-onboarding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  min-height: inherit;
}

.yb-onboarding__main {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-10);
  padding: var(--yb-space-10) var(--yb-space-12) var(--yb-space-12);
}

.yb-onboarding__step {
  display: flex;
  flex-direction: column;
  max-width: 520px;
}

.yb-onboarding__step h1:focus {
  outline: none;
}

.yb-onboarding__lead {
  margin: var(--yb-space-2) 0 var(--yb-space-8);
  color: var(--yb-text-muted);
  font-size: var(--yb-text-title-3);
  line-height: var(--yb-leading-title-3);
}

.yb-onboarding__fields {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-4);
}

.yb-onboarding__hint {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-onboarding__error {
  display: flex;
  align-items: center;
  gap: var(--yb-space-2);
  margin-top: var(--yb-space-4);
  color: var(--yb-error);
  font-weight: var(--yb-weight-medium);
}

.yb-onboarding__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yb-space-2);
  margin-top: var(--yb-space-8);
}

/* Audit UX, page 30: « Retour » on the left, « Continuer » always at the same place on the right (« Passer cette
   étape » just before it). */
.yb-onboarding__back {
  order: -2;
}

.yb-onboarding__skip {
  order: -1;
  margin-left: auto;
}

.yb-onboarding__actions > .mud-button-filled {
  margin-left: auto;
}

.yb-onboarding__actions > .mud-button-filled:has(~ .yb-onboarding__skip) {
  margin-left: 0;
}

.yb-onboarding__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--yb-space-10);
  border-left: 1px solid var(--yb-border);
  border-radius: 0 var(--yb-radius-lg) var(--yb-radius-lg) 0;
  background: var(--yb-bg-sunken);
}

/* Stepper */
.yb-stepper {
  display: flex;
  gap: var(--yb-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.yb-stepper__item {
  position: relative;
  flex: 1;
}

.yb-stepper__item::after {
  content: "";
  position: absolute;
  top: 15px;
  right: -2px;
  left: calc(50% + 20px);
  border-top: 2px dotted var(--yb-border-strong);
}

.yb-stepper__item--done::after {
  border-top-style: solid;
  border-color: var(--yb-primary);
}

.yb-stepper__item:last-child::after {
  display: none;
}

.yb-stepper__button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--yb-space-2);
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--yb-text-muted);
  font: inherit;
  cursor: pointer;
}

.yb-stepper__button:disabled {
  cursor: default;
}

.yb-stepper__button:focus-visible .yb-stepper__dot {
  outline: 2px solid var(--yb-focus);
  outline-offset: 2px;
}

.yb-stepper__dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--yb-border-strong);
  border-radius: 50%;
  background: var(--yb-bg);
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-strong);
  font-variant-numeric: tabular-nums;
}

.yb-stepper__item--current .yb-stepper__dot {
  border-color: var(--yb-primary);
  background: var(--yb-primary);
  color: var(--yb-on-primary);
}

.yb-stepper__item--skipped .yb-stepper__dot {
  border-style: dashed;
  color: var(--yb-text-muted);
}

.yb-stepper__item--skipped::after {
  border-top-style: solid;
  border-color: var(--yb-primary);
}

.yb-stepper__item--done .yb-stepper__dot {
  border-color: var(--yb-primary);
  background: var(--yb-primary-soft);
  color: var(--yb-on-primary-soft);
}

.yb-stepper__label {
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-medium);
}

.yb-stepper__item--current .yb-stepper__label {
  color: var(--yb-text);
}

.yb-stepper__mobile {
  display: none;
}

/* Choice cards (VAT) */

.yb-done-list {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.yb-done-list__item {
  display: flex;
  align-items: center;
  gap: var(--yb-space-3);
  color: var(--yb-text-muted);
}

.yb-done-list__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yb-bg-sunken);
}

.yb-done-list__item--done {
  color: var(--yb-text);
}

.yb-done-list__item--done .yb-done-list__mark {
  background: var(--yb-success-soft);
  color: var(--yb-success);
}

.yb-onboarding__done {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-4);
}

/* Live letterhead (the signature of the assistant): a light-theme island (data-theme="light"), like printed paper. */
.yb-letter {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-5);
  width: min(380px, 100%);
  padding: var(--yb-space-8) var(--yb-space-6) var(--yb-space-5);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-illu-paper);
  box-shadow: var(--yb-shadow-lg);
  color: var(--yb-text);
  font-size: 11px;
  line-height: 1.45;
  transform: rotate(-1.5deg);
  transition: transform var(--yb-duration-slow) var(--yb-ease);
}

.yb-letter--ready {
  transform: rotate(0deg);
}

.yb-letter--loading {
  opacity: 0.6;
}

.yb-letter__head {
  display: flex;
  justify-content: space-between;
  gap: var(--yb-space-4);
  padding: var(--yb-space-2);
  margin: calc(-1 * var(--yb-space-2));
  border-radius: var(--yb-radius-sm);
  transition: background-color var(--yb-duration) var(--yb-ease);
}

.yb-letter__logo {
  display: flex;
  align-items: flex-start;
  width: 120px;
  height: 44px;
  border-radius: 4px;
  transition: background-color var(--yb-duration) var(--yb-ease);
}

.yb-letter__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.yb-letter__logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px dashed var(--yb-border-strong);
  border-radius: 4px;
  /* Readable (axe color-contrast), still discreet next to the company's details. */
  color: var(--yb-text-muted);
}

.yb-letter__issuer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  color: var(--yb-text-muted);
  text-align: right;
}

.yb-letter__name {
  max-width: 100%;
  overflow: hidden;
  color: var(--yb-text);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yb-letter__vat {
  margin-top: 2px;
  padding: 0 4px;
  border-radius: 3px;
  transition: background-color var(--yb-duration) var(--yb-ease);
}

.yb-letter__recipient,
.yb-letter__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yb-letter__bar,
.yb-letter__lines span {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: var(--yb-border);
}

.yb-letter__recipient {
  width: 42%;
  margin-left: auto;
}

.yb-letter__bar--short {
  width: 64%;
}

.yb-letter__lines span:nth-child(2) {
  width: 86%;
}

.yb-letter__lines span:nth-child(3) {
  width: 58%;
}

.yb-letter__title {
  padding-left: var(--yb-space-2);
  border-left: 3px solid var(--yb-primary);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.yb-letter__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--yb-space-2);
  border-top: 1px solid var(--yb-border);
  font-weight: 600;
}

.yb-letter__total .yb-money {
  color: var(--yb-text);
}

.yb-letter__perforation {
  --yb-perforation-color: var(--yb-border-strong);
  margin: 0 calc(-1 * var(--yb-space-6));
}

.yb-letter__perforation .yb-perforation__scissors {
  background: var(--yb-illu-paper);
  color: var(--yb-border-input);
}

.yb-letter__slip {
  display: flex;
  justify-content: space-between;
  gap: var(--yb-space-4);
  margin: calc(-1 * var(--yb-space-2));
  padding: var(--yb-space-2);
  border-radius: var(--yb-radius-sm);
  transition: background-color var(--yb-duration) var(--yb-ease);
}

.yb-letter__slip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--yb-text);
}

.yb-letter__slip-label {
  color: var(--yb-text-muted);
  font-size: 9px;
  font-weight: 600;
}

.yb-letter__slip-label--spaced {
  margin-top: var(--yb-space-2);
}

.yb-letter__iban {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* The simple QR code of the sign-in pages (25 modules, Swiss cross). */
.yb-letter__qr {
  display: block;
  flex: none;
  width: 72px;
  height: 72px;
}

/* The part edited by the current step glows in saffron. */
.yb-letter[data-highlight="0"] .yb-letter__issuer,
.yb-letter[data-highlight="1"] .yb-letter__logo,
.yb-letter[data-highlight="2"] .yb-letter__slip,
.yb-letter[data-highlight="3"] .yb-letter__vat {
  background-color: var(--yb-accent-soft);
  box-shadow: 0 0 0 4px var(--yb-accent-soft);
}

.yb-letter[data-highlight="0"] .yb-letter__issuer {
  border-radius: 4px;
}

.yb-letter__stamp {
  position: absolute;
  top: 38%;
  right: -18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 3px solid var(--yb-illu-paper);
  border-radius: 50%;
  background: var(--yb-accent);
  box-shadow: 0 0 0 3px var(--yb-accent);
  color: var(--yb-on-accent);
  transform: rotate(-12deg);
  animation: yb-stamp var(--yb-duration-slow) var(--yb-ease) both;
}

.yb-letter__stamp .mud-icon-root {
  font-size: 36px;
}

@keyframes yb-stamp {
  from {
    opacity: 0;
    transform: rotate(-12deg) scale(1.6);
  }

  to {
    opacity: 1;
    transform: rotate(-12deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .yb-letter,
  .yb-letter__stamp {
    animation: none;
    transition: none;
  }
}

/* ---------- VAT question and flat rate (lot 25a, D191-D192) ---------- */
.yb-vat-choice {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
}

.yb-vat-choice__option {
  display: flex;
  align-items: flex-start;
  gap: var(--yb-space-3);
  width: 100%;
  padding: var(--yb-space-3) var(--yb-space-4);
  border: 1px solid var(--yb-border-input);
  border-radius: var(--yb-radius-md);
  background: var(--yb-surface);
  color: var(--yb-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--yb-duration-fast) var(--yb-ease), box-shadow var(--yb-duration-fast) var(--yb-ease);
}

.yb-vat-choice__option:hover:not(:disabled) {
  border-color: var(--yb-primary);
}

.yb-vat-choice__option:focus-visible {
  outline: 2px solid var(--yb-focus);
  outline-offset: 2px;
}

.yb-vat-choice__option--selected {
  border-color: var(--yb-primary);
  box-shadow: inset 0 0 0 1px var(--yb-primary);
  background: var(--yb-selected);
}

.yb-vat-choice__option:disabled {
  cursor: default;
}

.yb-vat-choice__dot {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid var(--yb-border-strong);
  border-radius: 50%;
  background: var(--yb-surface);
}

.yb-vat-choice__option--selected .yb-vat-choice__dot {
  border-color: var(--yb-primary);
  box-shadow: inset 0 0 0 3px var(--yb-surface);
  background: var(--yb-primary);
}

.yb-vat-choice__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.yb-vat-choice__title {
  font-weight: var(--yb-weight-strong);
}

.yb-vat-choice__help {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-vat-explain {
  display: flex;
  align-items: flex-start;
  gap: var(--yb-space-3);
  padding: var(--yb-space-3) var(--yb-space-4);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-bg-sunken);
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-vat-explain > .mud-icon-root {
  flex: none;
  margin-top: 1px;
  color: var(--yb-primary);
}

.yb-vat-explain p {
  max-width: 64ch;
}

.yb-vat-explain__title {
  color: var(--yb-text);
  font-weight: var(--yb-weight-strong);
}

.yb-nettax {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-3);
}

.yb-nettax__activity {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-3);
}

.yb-nettax__activity--boxed {
  padding: var(--yb-space-4);
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-surface);
}

.yb-nettax__head {
  display: flex;
  align-items: center;
  gap: var(--yb-space-2);
  min-height: 32px;
}

.yb-nettax__number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yb-primary-soft);
  color: var(--yb-on-primary-soft);
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-strong);
  font-variant-numeric: tabular-nums;
}

.yb-nettax__number--2 {
  background: var(--yb-accent-soft);
  color: var(--yb-on-accent-soft);
}

.yb-nettax__title {
  flex: 1;
  font-weight: var(--yb-weight-strong);
}

.yb-nettax__remove.mud-button-root {
  margin-right: calc(-1 * var(--yb-space-2));
}

/* One rate: a short field, not the whole width of the settings. */
.yb-nettax__fields:not(.yb-field-row) .yb-rate-field {
  max-width: 220px;
}

.yb-nettax__new {
  display: grid;
  grid-template-columns: minmax(96px, 140px) minmax(150px, 190px) auto;
  align-items: start;
  gap: var(--yb-space-3);
}

.yb-nettax__new-remove.mud-icon-button {
  margin-top: 26px;
}

.yb-nettax__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--yb-space-5);
}

/* Discreet, but a finger-sized target (WCAG 2.5.8, at least 24 px high). */
.yb-nettax__links .yb-textlink {
  min-height: 32px;
}

.yb-nettax__history {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: var(--yb-space-2) var(--yb-space-3);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-bg-sunken);
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  list-style: none;
}

.yb-nettax__history li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--yb-space-2);
}

.yb-nettax__error {
  display: flex;
  align-items: center;
  gap: var(--yb-space-2);
  color: var(--yb-error);
  font-size: var(--yb-text-caption);
}

@media (max-width: 767px) {
  .yb-vat-choice__option {
    padding: var(--yb-space-3);
  }

  .yb-nettax__activity--boxed {
    padding: var(--yb-space-3);
  }

  .yb-nettax__new {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .yb-pdf-settings {
    grid-template-columns: 1fr;
  }

  .yb-pdf-settings__preview {
    position: static;
  }

  .yb-onboarding {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  }

  .yb-onboarding__main {
    padding: var(--yb-space-8);
  }
}

@media (max-width: 1023px) {
  .yb-settings__layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: var(--yb-space-5);
  }

  .yb-sgroup,
  .yb-roles-help {
    grid-template-columns: 1fr;
  }

  .yb-onboarding {
    grid-template-columns: 1fr;
  }

  .yb-onboarding__preview {
    display: none;
  }

  /* Audit UX, page 30: on a phone, the invoice is shown once, at the end (« voilà ce que ça donne »). */
  .yb-onboarding--done .yb-onboarding__preview {
    display: flex;
    padding: var(--yb-space-5) var(--yb-space-4) var(--yb-space-8);
  }

  /* The stamp stays on the sheet (it overflowed the 390 px screen). */
  .yb-onboarding--done .yb-letter__stamp {
    right: var(--yb-space-3);
  }
}

@media (max-width: 767px) {
  /* Every shell banner (e-mail confirmation, billing, demo): the text takes the full width, its actions go below,
     aligned with the text; a long e-mail address breaks instead of pushing the actions into the sentence. */
  .yb-banner {
    flex-wrap: wrap;
    margin: var(--yb-space-3) var(--yb-space-4) 0;
  }

  .yb-banner .yb-banner__text {
    flex: 1 1 calc(100% - 40px);
    overflow-wrap: anywhere;
  }

  .yb-banner .yb-banner__actions {
    margin-left: 28px;
  }

  .yb-settings__layout {
    grid-template-columns: 1fr;
  }

  .yb-settings[data-section="none"] .yb-settings__content,
  .yb-settings[data-section="open"] .yb-settings__nav {
    display: none;
  }

  /* Visually hidden, not removed: the page keeps its level-one heading for screen readers. */
  .yb-settings[data-section="open"] .yb-settings__header {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .yb-settings__nav {
    position: static;
  }

  .yb-settings__nav ul {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--yb-border);
    border-radius: var(--yb-radius-md);
    background: var(--yb-surface);
  }

  .yb-settings__nav li + li {
    border-top: 1px solid var(--yb-border);
  }

  .yb-settings__link {
    min-height: 64px;
    padding: var(--yb-space-3) var(--yb-space-4);
    border: 0;
    border-radius: 0;
    color: var(--yb-text);
  }

  .yb-settings__link--active,
  .yb-settings__link--active:hover {
    border: 0;
  }

  .yb-settings__link-icon {
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--yb-radius-sm);
    background: var(--yb-primary-soft);
    color: var(--yb-on-primary-soft);
  }

  .yb-settings__link-description {
    display: block;
    color: var(--yb-text-muted);
    font-size: var(--yb-text-caption);
    font-weight: var(--yb-weight-regular);
    line-height: var(--yb-leading-caption);
  }

  .yb-settings__link-chevron {
    display: inline-flex;
    color: var(--yb-text-muted);
  }

  .yb-settings__back {
    display: inline-flex;
    align-items: center;
    gap: var(--yb-space-1);
    align-self: flex-start;
    min-height: var(--yb-touch-target);
    margin: calc(-1 * var(--yb-space-2)) 0 calc(-1 * var(--yb-space-3));
    color: var(--yb-text-muted);
    font-weight: var(--yb-weight-medium);
    text-decoration: none;
  }

  .yb-field-row,
  .yb-numbering-row {
    grid-template-columns: 1fr;
  }

  .yb-field-row--street {
    grid-template-columns: minmax(0, 2fr) minmax(72px, 1fr);
  }

  .yb-field-row--city {
    grid-template-columns: minmax(80px, 1fr) minmax(0, 2fr);
  }

  .yb-reminder-level {
    grid-template-columns: 1fr 1fr;
  }

  .yb-reminder-level__title {
    grid-column: 1 / -1;
    height: auto;
  }

  .yb-savebar {
    bottom: calc(var(--yb-bottomnav-height) + var(--yb-space-3));
    padding-left: var(--yb-space-4);
  }

  .yb-savebar__actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  .yb-members__item {
    padding: var(--yb-space-2) var(--yb-space-4);
  }

  .yb-focus__bar {
    padding: 0 var(--yb-space-4);
  }

  .yb-focus__main {
    margin: 0;
    border-width: 1px 0 0;
    border-radius: var(--yb-radius-lg) var(--yb-radius-lg) 0 0;
  }

  .yb-onboarding__main {
    gap: var(--yb-space-6);
    padding: var(--yb-space-5) var(--yb-space-4) var(--yb-space-10);
  }

  /* Hidden on the phone but still the name of the step button (axe button-name). */
  .yb-stepper__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .yb-stepper__item::after {
    left: calc(50% + 18px);
  }

  .yb-stepper__mobile {
    display: block;
    margin-top: var(--yb-space-3);
    color: var(--yb-text-muted);
    font-size: var(--yb-text-caption);
    text-align: center;
  }

  .yb-onboarding__actions > .mud-button-filled {
    flex: 1 1 100%;
    order: -3;
    margin-left: 0;
  }

  /* « Retour » left, « Passer cette étape » right, under the full-width « Continuer ». */
  .yb-onboarding__back {
    order: -2;
    margin-right: auto;
  }
}

/* ---------- Users: members, invitations, roles (lot 19) ---------- */
.yb-role--member {
  background: var(--yb-status-neutral-bg);
  color: var(--yb-text);
}

.yb-role--readonly {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--yb-border-strong);
  color: var(--yb-text-muted);
}

.yb-role-button {
  gap: 2px;
  padding-right: var(--yb-space-1);
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow var(--yb-duration-fast) var(--yb-ease);
}

.yb-role-button .mud-icon-root {
  font-size: 18px;
}

.yb-role-button:hover {
  box-shadow: inset 0 0 0 1px var(--yb-border-input);
}

.yb-role-button:focus-visible {
  outline: 2px solid var(--yb-focus);
  outline-offset: 2px;
}

.yb-members__name {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.yb-members__name .yb-truncate {
  min-width: 0;
}

.yb-members__you {
  flex: none;
}

.yb-members__email {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--yb-space-2);
}

.yb-members__since {
  flex: none;
  min-width: 128px;
  text-align: right;
}

.yb-members__role {
  flex: none;
}

/* The actions column keeps its width so that the roles line up, with or without a menu. */
.yb-members__actions {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: var(--yb-space-1);
  min-width: 32px;
}

.yb-members__note {
  display: flex;
  align-items: center;
  gap: var(--yb-space-2);
  padding: var(--yb-space-3) var(--yb-space-5);
  border-top: 1px solid var(--yb-border);
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-avatar--pending {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--yb-border-strong);
  color: var(--yb-text-muted);
}

.yb-avatar--pending .mud-icon-root {
  font-size: 18px;
}

.yb-invitations__item.is-expired .yb-members__name {
  color: var(--yb-text-muted);
}

.yb-invitations__meta {
  column-gap: 0;
}

.yb-invitations__expired {
  color: var(--yb-error);
  font-weight: var(--yb-weight-medium);
}

.yb-invitations__resend.mud-button-root {
  min-width: 0;
}

.yb-menu-item--danger,
.yb-menu-item--danger .mud-icon-root {
  color: var(--yb-error);
}

/* Role menu: each choice says what it allows. */
.yb-role-menu .mud-menu-item {
  align-items: flex-start;
  max-width: 340px;
  white-space: normal;
}

.yb-role-menu__option {
  display: flex;
  gap: var(--yb-space-3);
  width: 100%;
}

.yb-role-menu__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.yb-role-menu__name {
  font-weight: var(--yb-weight-strong);
}

.yb-role-menu__help {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

.yb-role-menu__check.mud-icon-root {
  flex: none;
  color: var(--yb-primary);
}

/* Invitation dialog: e-mail, then the role as three cards. */
.yb-invite-dialog__fields {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-5);
}

.yb-role-choice {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.yb-role-choice__legend {
  margin-bottom: var(--yb-space-2);
  padding: 0;
  color: var(--yb-text);
  font-size: var(--yb-text-caption);
  font-weight: var(--yb-weight-medium);
}

.yb-role-choice__option {
  display: flex;
  align-items: flex-start;
  gap: var(--yb-space-3);
  padding: var(--yb-space-3) var(--yb-space-4);
  border: 1px solid var(--yb-border-strong);
  border-radius: var(--yb-radius-sm);
  background: var(--yb-surface);
  cursor: pointer;
  transition: border-color var(--yb-duration-fast) var(--yb-ease), background-color var(--yb-duration-fast) var(--yb-ease);
}

.yb-role-choice__option:hover {
  background: var(--yb-hover);
}

.yb-role-choice__option.is-selected {
  border-color: var(--yb-primary);
  background: var(--yb-selected);
  box-shadow: inset 0 0 0 1px var(--yb-primary);
}

.yb-role-choice__option input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--yb-primary);
}

.yb-role-choice__option input:focus-visible {
  outline: 2px solid var(--yb-focus);
  outline-offset: 2px;
}

.yb-role-choice__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.yb-role-choice__name {
  font-weight: var(--yb-weight-strong);
}

.yb-role-choice__help {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
  line-height: var(--yb-leading-caption);
}

/* The lists adapt to the width of their panel (the settings navigation takes part of a tablet screen). */
.yb-members-panel,
.yb-invitations-panel {
  container-type: inline-size;
}

@container (max-width: 640px) {
  .yb-members__since {
    display: none;
  }
}

@container (max-width: 560px) {
  .yb-members__item {
    padding-right: var(--yb-space-3);
    padding-left: var(--yb-space-4);
  }

  .yb-invitations__item {
    flex-wrap: wrap;
  }

  .yb-invitations__item .yb-members__text {
    flex-basis: calc(100% - 44px);
  }

  .yb-invitations__item .yb-members__role {
    margin-left: 44px;
  }

  .yb-invitations__item .yb-members__actions {
    margin-left: auto;
  }
}

/* ---- D335: « Ventes par carte ou en ligne » (net tax rate with two activities) ----------------------------------- */
.yb-card-sales__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yb-card-sales__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--yb-space-2) var(--yb-space-4);
  padding: var(--yb-space-3) 0;
  border-bottom: 1px solid var(--yb-border);
}

.yb-card-sales__row:last-child {
  border-bottom: none;
}

.yb-card-sales__payer {
  display: flex;
  flex: 1 1 14rem;
  flex-direction: column;
  min-width: 0;
}

.yb-card-sales__name {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.yb-card-sales__meta {
  color: var(--yb-text-muted);
  font-size: 0.8125rem;
}

.yb-card-sales__select {
  flex: 0 1 16rem;
  min-width: 12rem;
}

@media (max-width: 480px) {
  .yb-card-sales__select {
    flex-basis: 100%;
  }
}

/* ---- D338: « La TVA se calcule sur : » (registered companies) ---------------------------------------------------- */
.yb-vat-basis {
  display: flex;
  flex-direction: column;
  gap: var(--yb-space-2);
  margin-top: var(--yb-space-2);
}

.yb-vat-basis__question {
  margin: 0;
  color: var(--yb-text);
  font-weight: 600;
}

@media (min-width: 720px) {
  .yb-vat-choice--two {
    flex-direction: row;
  }

  .yb-vat-choice--two .yb-vat-choice__option {
    flex: 1 1 0;
  }
}

/* Audit UX, pages 22–23: the numbers of the documents first; the calendar of the reminders in one sentence. */
.yb-numbering-summary {
  display: grid;
  gap: var(--yb-space-2);
  margin: 0;
}

.yb-numbering-summary__row {
  display: flex;
  gap: var(--yb-space-4);
  align-items: baseline;
}

.yb-numbering-summary__row dt {
  min-width: 7rem;
  color: var(--yb-text-muted);
}

.yb-numbering-summary__row dd {
  margin: 0;
  font-weight: var(--yb-weight-strong);
}

.yb-numbering-summary__custom {
  align-self: flex-start;
  margin-top: var(--yb-space-2);
}

.yb-reminder-plan {
  margin: var(--yb-space-3) 0 0;
  padding: var(--yb-space-3) var(--yb-space-4);
  border-radius: var(--yb-radius-md);
  background: var(--yb-bg-sunken);
  color: var(--yb-text);
  font-size: var(--yb-text-caption);
}

/* D392: the history and the rules of the price, folded under a line each. One card per fold: the header line opens
   the card in place, the content follows under a divider (no second card, no repeated title). */
.yb-billing-fold {
  overflow: hidden;
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-md);
  background: var(--yb-surface);
}

.yb-billing-fold:hover {
  border-color: var(--yb-border-strong);
}

.yb-billing-fold__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.yb-billing-fold__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--yb-space-3);
  width: 100%;
  min-height: 52px;
  padding: var(--yb-space-4) var(--yb-space-5);
  border: 0;
  background: transparent;
  color: var(--yb-text);
  font: inherit;
  font-weight: var(--yb-weight-strong);
  text-align: left;
  cursor: pointer;
}

.yb-billing-fold__toggle:hover {
  background: var(--yb-bg-sunken);
}

.yb-billing-fold__toggle:focus-visible {
  outline: 2px solid var(--yb-focus, var(--yb-primary));
  outline-offset: -2px;
}

.yb-billing-fold__chevron {
  flex: none;
  color: var(--yb-text-muted);
  transition: transform var(--yb-duration-fast, 150ms) ease;
}

.yb-billing-fold--open .yb-billing-fold__chevron {
  transform: rotate(180deg);
}

.yb-billing-fold__body {
  border-top: 1px solid var(--yb-border);
}

.yb-billing-fold__body--padded {
  padding: var(--yb-space-4) var(--yb-space-5) var(--yb-space-5);
}

@media (prefers-reduced-motion: reduce) {
  .yb-billing-fold__chevron {
    transition: none;
  }
}

/* D391: the texts and e-mails, one row per document. */
.yb-texts-table {
  margin: 0;
  padding: 0;
  border: 1px solid var(--yb-border);
  border-radius: var(--yb-radius-md);
  background: var(--yb-surface);
  list-style: none;
}

.yb-texts-table__row + .yb-texts-table__row {
  border-top: 1px solid var(--yb-border);
}

.yb-texts-table__head {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.4fr) auto auto;
  align-items: center;
  gap: var(--yb-space-3);
  padding: var(--yb-space-3) var(--yb-space-5);
}

.yb-texts-table__name {
  font-weight: var(--yb-weight-strong);
}

.yb-texts-table__parts,
.yb-texts-table__state {
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-texts-table__state.is-custom {
  color: var(--yb-primary);
  font-weight: var(--yb-weight-medium);
}

.yb-texts-table__body {
  display: grid;
  gap: var(--yb-space-5);
  padding: 0 var(--yb-space-5) var(--yb-space-5);
}

.yb-texts-table__row.is-open {
  background: color-mix(in srgb, var(--yb-bg-sunken) 45%, var(--yb-surface));
}

@media (max-width: 767.98px) {
  .yb-texts-table__head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .yb-texts-table__parts {
    grid-column: 1;
    grid-row: 2;
  }

  .yb-texts-table__state {
    grid-column: 2;
    grid-row: 1;
  }

  .yb-texts-table__edit {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Audit UX, page 30: a question title is not cut after « paient- » on a phone. */
.yb-onboarding__step .yb-title-1 {
  text-wrap: balance;
}

/* D394: the VAT question of the assistant, two answers, then the method in one line. */
.yb-onboarding__vat-answer {
  align-self: flex-start;
}

.yb-onboarding__vat-method {
  margin: 0;
  color: var(--yb-text-muted);
  font-size: var(--yb-text-caption);
}

.yb-onboarding__vat-method .yb-textlink {
  margin-left: var(--yb-space-1);
}

/* D488: the anchor of « Ventes sans facture », focused when the bank links here (nothing to see). */
.yb-card-sales__anchor {
  outline: none;
}
