/* docs/DESIGN.md #8.2 — champs de formulaire. */
@layer components {
  .field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }

  .field__label {
    font-size: .8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .18em;
  }

  .field__required {
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--ink-muted);
  }

  .field__hint {
    font-size: .9375rem;
    color: var(--ink-muted);
  }

  .field__input {
    height: 48px;
    padding-inline: var(--space-4);
    background: var(--cream);
    border: 2px solid var(--forest);
    border-radius: 0;
    font-size: 1.0625rem;
    font-family: var(--font-sans);
  }

  textarea.field__input {
    height: auto;
    min-height: 8rem;
    padding-block: var(--space-3);
  }

  .field--error .field__input {
    border: 4px solid var(--terracotta-deep);
  }

  .field__error {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: .9375rem;
    color: var(--terracotta-deep);
  }

  .field__choice {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 48px;
    cursor: pointer;
  }

  .field__choice-box {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--forest);
    display: grid;
    place-items: center;
  }

  .field__choice-box--radio {
    position: relative;
  }

  .field__choice input:checked + .field__choice-box--radio::after {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--forest);
  }

  .field__choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
  }

  .field__stepper {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
  }

  .field__stepper-button {
    width: 48px;
    height: 48px;
    border: 2px solid var(--forest);
    display: grid;
    place-items: center;
    background: var(--cream);
    cursor: pointer;
  }

  .field__stepper-value {
    min-width: 2.5rem;
    text-align: center;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  .field__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
}
