/* Index of the documents on direction D (ticket 0237, sub-lot B2-b, rule 22 of the ticket):
   the sheet of the page `/produits/`, loaded by that page only, after site.css. It writes
   the composition of the free design `documents.html` (head of the page, filters by
   situation, ruled list of rows, tier of the review on the Nuit) with the roles and the
   tokens of the site; no colour is written here. Texts at 14 pixels at least (docs/12), the
   targets at 44 pixels; the only movements are the nudge of an arrow at the hover, inside
   the block of the preference for motion at the foot of the sheet. */

/* Head of the page --------------------------------------------------------------- */
.catalogue-head {
  /* The free design adds its air above the title to a main without padding; the main of
     the site has 32 pixels of its own. */
  padding: max(0px, calc(clamp(40px, 6vw, 80px) - var(--space-6))) 0 clamp(28px, 4vw, 48px);
}

.catalogue-head .breadcrumb {
  margin-bottom: 22px;
  color: var(--color-ink-muted);
}

.catalogue-head .breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.catalogue-head .breadcrumb li + li::before {
  content: none;
  padding: 0;
}

.catalogue-head .breadcrumb a {
  color: var(--color-ink-soft);
  text-decoration: none;
}

.catalogue-head .breadcrumb a:hover {
  text-decoration: underline;
}

.catalogue-head .breadcrumb .icon {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.5;
}

.catalogue-head h1 {
  margin: 0;
  font-size: calc(1.04 * clamp(40px, 5.4vw, 64px));
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--tracking-display);
  line-height: 1.08;
}

.catalogue-head h1 em {
  color: var(--color-brand);
  font-style: italic;
}

.catalogue-head .lead {
  max-width: 40em;
  margin: 20px 0 0;
}

.catalogue-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 28px;
}

.catalogue-head__button {
  min-height: 56px;
  padding: 14px 28px;
  font-size: var(--font-size-base);
}

.catalogue-head__actions .note {
  max-width: 30em;
  margin: 0;
}

.catalogue-head .button .icon,
.catalogue-tier .button .icon {
  width: 1.125rem;
  height: 1.125rem;
}

/* Filters by situation: pills, written by static/js/catalogue-filters.js. The buttons
   start from the neutral `button--link` and take the pill of the free design: a frame at
   the strength of the controls (3:1), the pressed one in Encre. ------------------------- */
.catalogue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: 28px;
}

.catalogue-filters[hidden] {
  display: none;
}

.catalogue-filters button.catalogue-filters__button {
  min-height: var(--target-size);
  padding: 9px 16px;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink-soft);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  text-decoration: none;
}

.catalogue-filters button.catalogue-filters__button:hover {
  border-color: var(--color-ink);
  background: var(--color-surface);
  color: var(--color-ink);
}

.catalogue-filters button.catalogue-filters__button[aria-pressed="true"] {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-surface);
}

/* The list: a heavy rule above, a hairline under each row. ----------------------------- */
.catalogue-section {
  margin: 0;
}

.catalogue {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--border-width) solid var(--color-ink);
}

.catalogue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 32px;
  margin: 0;
  padding: 28px 0;
  border-bottom: var(--border-width) solid var(--color-line);
}

.catalogue-row[hidden] {
  display: none;
}

@media (min-width: 53.75rem) {
  .catalogue-row {
    grid-template-columns: 220px minmax(0, 1fr) 200px;
    align-items: start;
  }
}

.catalogue-row + .catalogue-row {
  margin-top: 0;
}

.catalogue-row__situation {
  margin: 0;
  padding-top: 6px;
  color: var(--color-ink-muted);
  font-size: var(--font-size-xs);
}

.catalogue-row__situation b {
  display: block;
  margin-bottom: 8px;
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.catalogue-row__title {
  margin: 0;
  font-size: 26px;
  line-height: 1.08;
}

.catalogue-row__title a {
  color: inherit;
  text-decoration: none;
}

.catalogue-row__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-brand);
}

.catalogue-row__line {
  max-width: 40em;
  margin: 10px 0 0;
  color: var(--color-ink-soft);
}

/* Labels of the facts and mark of a document not yet offered: pills, no frame. ---------- */
.catalogue-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.catalogue-tags li,
.catalogue-tag {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.catalogue-tag--soon {
  border: var(--border-width) dashed var(--color-border);
  background: transparent;
  color: var(--color-ink-muted);
}

/* The levels of the guide, in the row of the guide: one column, each with its title and the
   short line of the free design (ticket 0254); the free design sets them in three columns,
   which the long titles in service do not allow. ------------------------------------- */
.catalogue-levels {
  display: grid;
  gap: var(--space-2);
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.catalogue-levels__line {
  display: block;
}

.catalogue-levels li {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 14px 16px;
  border: var(--border-width) dashed var(--color-border);
  border-radius: 12px;
  color: var(--color-ink-muted);
  font-size: var(--font-size-xs);
}

.catalogue-levels a {
  color: var(--color-ink);
  font-weight: var(--font-weight-strong);
}

.catalogue-levels__price {
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: var(--font-size-md);
  font-variant-numeric: lining-nums tabular-nums;
}

.catalogue-levels small,
.catalogue-price small {
  margin-left: 4px;
  color: var(--color-ink-muted);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.catalogue-row--soon .catalogue-row__title,
.catalogue-row--soon .catalogue-row__line {
  color: var(--color-ink-muted);
}

/* Price: the amount of the catalogue with the mention "HT", then the line including tax. */
.catalogue-row__price {
  text-align: left;
}

@media (min-width: 53.75rem) {
  .catalogue-row__price {
    text-align: right;
  }
}

.catalogue-price {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.catalogue-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--target-size);
  margin-top: 6px;
  border-bottom: var(--border-width) solid var(--color-line-strong);
  color: var(--color-ink);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-strong);
  text-decoration: none;
}

.catalogue-link:hover {
  border-color: var(--color-brand);
  text-decoration: none;
}

.catalogue-link .icon {
  width: 1rem;
  height: 1rem;
}

.catalogue-note {
  margin: 20px 0 0;
}

/* The tier of the review by a lawyer, on the Nuit (rule 17 (a): the action in a bordered
   button, the main action of the page being the plain one of the head). ------------------ */
.catalogue-tier-section {
  padding: clamp(56px, 7vw, 88px) 0 0;
}

.catalogue-tier {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 16px 32px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-box);
  background: var(--color-band);
  color: var(--color-band-ink);
}

@media (min-width: 47.5rem) {
  .catalogue-tier {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* The halo of the free design: a glow of the Visa clair on the Nuit, in a corner. */
.catalogue-tier::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -80px;
  width: 260px;
  height: 200px;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--color-brand-on-band) 38%, transparent),
    transparent
  );
  pointer-events: none;
}

.catalogue-tier > * {
  position: relative;
  z-index: 1;
}

.catalogue-tier .eyebrow {
  margin-bottom: 14px;
  color: var(--color-band-ink-muted);
}

.catalogue-tier h2 {
  margin: 0;
  color: var(--color-band-ink);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--tracking-display);
  line-height: 1.08;
}

.catalogue-tier h2 em {
  color: var(--color-brand-on-band);
  font-style: italic;
}

.catalogue-tier__lead {
  max-width: 36em;
  margin: 10px 0 0;
  color: var(--color-band-ink-muted);
  font-size: var(--font-size-base);
}

.catalogue-tier .button.catalogue-tier__action {
  border-color: var(--color-band-ink);
  background: transparent;
  box-shadow: none;
  color: var(--color-band-ink);
}

.catalogue-tier .button.catalogue-tier__action:hover {
  border-color: var(--color-band-ink);
  background: var(--color-band-raised);
  color: var(--color-band-ink);
}

.catalogue-tier :focus-visible {
  outline-color: var(--color-focus-on-band);
}

/* Movement: the nudge of an arrow at the hover of its button or of its link, once, as the
   free design does (3 and 4 pixels); nothing under a preference for reduced motion. ------ */
@media (prefers-reduced-motion: no-preference) {
  .catalogue-head .button .icon,
  .catalogue-tier .button .icon,
  .catalogue-link .icon {
    transition: transform var(--motion-hover) var(--ease-state);
  }

  .catalogue-head .button:hover .icon,
  .catalogue-tier .button:hover .icon {
    transform: translateX(3px);
  }

  .catalogue-link:hover .icon {
    transform: translateX(4px);
  }
}
