/*
 * Screens of the journey before the payment (ticket 0237, sub-lot B3, rules 10, 14 and 22):
 * entry screen (/demande/), screen that waits for the confirmation of the address, page of the
 * link, waiting screens, targeting questions, deletion, refusal, order screen, screen of the
 * final price, dossier that cannot be paid, too many requests; the overview has its own sheet
 * (overview.css, sub-lot B2-c). Loaded by those templates alone (block `extra_css`), after
 * site.css; no colour is written here, every colour is a variable of tokens.css (rule 22);
 * no movement, no gradient, no new shadow.
 *
 * Direction D has no page for these screens: they take the language of its pages (the head of
 * the page of `apercu.html` and `documents.html`, the card of the intake of `index.html`, the
 * card of the order of `apercu.html`), as the sub-lots B2-d and B5 did for the pages D does
 * not draw. Differences from the free design, each with its rule (journal of the ticket):
 * - no breadcrumb nor eyebrow over the title: D has no label for these screens and no text is
 *   added (rule 11 (i));
 * - texts below 14 pixels raised to 14 (rule 14 (i));
 * - the price box of the order screen keeps its place between the country and the names on a
 *   telephone (first review of ticket 0173, m3), so that the card of the order is joined only
 *   from 820 pixels.
 */

/* Page ------------------------------------------------------------------ */

.jr-page {
  padding: clamp(1.5rem, 4vw, 3.25rem) 0 clamp(3rem, 8vw, 6rem);
}

/* A screen of text and of one form: at the measure of the single column of the overview. */
.prose.jr-page {
  max-width: 46rem;
}

/* The title of the head of the page of D (`.page-head h1`). */
.jr-page > h1 {
  margin: 0;
  font-size: calc(1.04 * clamp(2.5rem, 5.4vw, 4rem));
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--tracking-display);
  line-height: 1.08;
}

/* The lead of D, under the title, at the measure of a text. */
.jr-page > .lead {
  max-width: 40em;
  margin: 1.25rem 0 0;
}

.jr-page > h1 + *:not(.lead) {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.jr-page > .lead + * {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

/* A message of the journey (D: `.notice`), on the Feuille, at the radius of the boxes. */
.jr-page > .notice {
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius);
}

/* The form laid on the card of the intake of D (`index.html`, `.intake`) -------- */

/* The inner margin of D from 750 pixels (36 pixels); 16 pixels on a telephone, not 22 as D,
   so that the line of the small link holds the button « Dicter » beside it down to 320 pixels
   (ticket 0232; tests/browser/test_description_field.py). */
.jr-page .journey-form {
  max-width: none;
  padding: clamp(1rem, 4.8vw, 2.25rem);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised);
}

.jr-page textarea,
.jr-page input[type="email"],
.jr-page input[type="text"],
.jr-page select {
  padding: 0.875rem 1rem;
  background-color: var(--color-page);
  border-color: var(--color-border);
  border-radius: 0.75rem;
}

.jr-page textarea {
  height: 10.5rem;
  min-height: 10.5rem;
  line-height: 1.55;
}

.jr-page input[type="email"],
.jr-page input[type="text"] {
  min-height: 3.125rem;
}

.jr-page textarea:focus,
.jr-page input[type="email"]:focus,
.jr-page input[type="text"]:focus,
.jr-page select:focus {
  background-color: var(--color-surface);
  border-color: var(--color-ink);
}

/* The order screen ------------------------------------------------------- */

.jr-page.journey--order > .lead {
  max-width: 40em;
}

/* The price box: the head of the card of the order, on the Nuit (D: `.order__head`). */
.jr-page .order__box {
  margin: 0 0 var(--space-4);
  padding: 1.125rem 1.625rem 1rem;
  background: var(--color-band);
  border-color: transparent;
  border-radius: var(--radius-card);
  color: var(--color-band-ink);
}

.jr-page .order__box .eyebrow,
.jr-page .order__box > p,
.jr-page .order__box > .note {
  color: var(--color-band-ink-muted);
}

.jr-page .order__box .order__amounts dt,
.jr-page .order__box .order__total dt,
.jr-page .order__box .order__total dd {
  color: var(--color-band-ink);
}

.jr-page .order__box .order__total {
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-3);
}

.jr-page .order__box .order__total dd {
  min-width: 0;
  white-space: normal;
  font-size: 2.25rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-title);
}

/* A notice of the number of VAT keeps its own surface and its ink on the Nuit. */
.jr-page .order__box .notice {
  color: var(--color-ink);
}

/* The body of the card: the boxes of the acts, « Payer », the line of the payment. */
.jr-page .order__acts {
  padding: 1rem 1.625rem 1.125rem;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised);
}

.jr-page .order__acts .check {
  margin: 0 0 0.5rem;
}

/* The button of the payment, the width of the card, at the height of the buttons of D
   (`.btn`, 48 pixels). */
.jr-page .order__acts .actions button,
.jr-checkout .checkout__order .actions button {
  width: 100%;
  min-height: 3rem;
}

.jr-page .actions button .icon {
  width: 1rem;
  height: 1rem;
}

.jr-page .order__acts .actions {
  margin: 0.75rem 0 0;
}

.jr-page .order__acts > .note {
  margin: 0.5rem 0 0;
  text-align: center;
}

/* The line of the lawyer follows the line of the payment, on a telephone as in the margin. */
.jr-page .order > .jr-lawyer {
  order: 5;
}

@media (min-width: 51.25rem) {
  /* The head and the body of the card joined, in the margin of the form. */
  .jr-page .order__box {
    margin-bottom: 0;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }

  .jr-page .order__acts {
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }

  .jr-page .order > .jr-lawyer {
    grid-column: 2;
  }
}

/* The order screen keeps its screen of 1366 by 900 pixels (ticket 0173): the head of the page
   closer to the header, the lines of the document between the lead and the form. */
.jr-page.journey--order {
  padding-top: var(--space-3);
}

.jr-page.journey--order > .lead {
  margin-top: var(--space-3);
}

.jr-page.journey--order > .jr-doc {
  margin: var(--space-3) 0 var(--space-4);
}

/* The status: the segmented choice of D (`.seg`), as on the card of the overview. The radio
   covers its label; the label carries the look. */
.jr-page .order__you .choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-1);
  max-width: none;
  margin-top: var(--space-2);
  padding: var(--space-1);
  background: var(--color-surface-muted);
  border-radius: var(--radius);
}

.jr-page .order__you .choice,
.jr-page .order__you .choice:has(input:checked) {
  position: relative;
  display: block;
  padding: 0;
  background: none;
  border: 0;
}

.jr-page .order__you .choice input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.jr-page .order__you .choice label {
  display: grid;
  place-items: center;
  min-height: var(--target-size);
  padding: 0.375rem 0.5rem;
  border-radius: 0.5625rem;
  color: var(--color-ink-soft);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.35;
  text-align: center;
}

.jr-page .order__you .choice:has(input:checked) label {
  background: var(--color-surface);
  color: var(--color-ink);
}

.jr-page .order__you .choice:has(input:focus-visible) label {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
}

/* The boxes of the acts (D: `.check--box`), on the order screen and the final price. */
.jr-page .order__acts .check,
.jr-checkout .checkout__order .check {
  font-size: var(--font-size-xs);
}

.jr-page .order__acts .check input[type="checkbox"],
.jr-checkout .checkout__order .check input[type="checkbox"] {
  top: 0.875rem;
  left: 0.875rem;
}

.jr-page .order__acts .check > label,
.jr-checkout .checkout__order .check > label {
  min-height: var(--target-size);
  padding: 0.75rem 0.875rem 0.75rem calc(0.875rem + 1.25rem + var(--space-3));
  line-height: 1.5;
}

.jr-page .order__acts .check .hint,
.jr-page .order__acts .check .error,
.jr-checkout .checkout__order .check .hint,
.jr-checkout .checkout__order .check .error {
  padding: 0 0.875rem 0.75rem calc(0.875rem + 1.25rem + var(--space-3));
}

@media (max-width: 39.99rem) {
  .jr-page .order__box,
  .jr-page .order__acts {
    padding-inline: var(--space-4);
  }
}

/* The lines of the document (D: `.order__rows`), as in the card of the overview. */
.jr-rows {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--border-width) solid var(--color-line);
}

.jr-rows li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3) 0;
  border-bottom: var(--border-width) solid var(--color-line);
  color: var(--color-ink-soft);
  font-size: 0.90625rem;
}

.jr-rows li + li {
  margin-top: 0;
}

.jr-rows__icon .icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  color: var(--color-ink);
}

.jr-lawyer {
  margin-top: var(--space-4);
  border-top: 0;
}

.jr-back {
  margin: var(--space-5) 0 0;
}

/* The screen of the final price ------------------------------------------- */

/* The card: the table of the price at its head, on the Nuit, the lines of the document in
   its body. */
.jr-checkout .checkout {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.jr-checkout .checkout__price {
  overflow: hidden;
  padding: 0 0 1.375rem;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised);
}

.jr-checkout .checkout__price .price-table {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--color-band);
  border: 0;
  color: var(--color-band-ink);
}

.jr-checkout .price-table caption {
  padding: 1.5rem 1.625rem 0.5rem;
  background: var(--color-band);
  color: var(--color-band-ink);
  font-size: 1.625rem;
  text-align: left;
}

.jr-checkout .price-table th,
.jr-checkout .price-table td {
  padding-inline: 1.625rem;
  border-color: var(--color-band-rule);
  color: var(--color-band-ink);
}

.jr-checkout .price-table thead th {
  color: var(--color-band-ink-muted);
}

.jr-checkout .price-table .price-table__total th,
.jr-checkout .price-table .price-table__total td {
  border-top-color: var(--color-band-ink-muted);
}

.jr-checkout .price-table .price-table__total td strong {
  font-size: 2.75rem;
  font-weight: var(--font-weight-medium);
}

.jr-checkout .price-table td[data-label]::before {
  color: var(--color-band-ink-muted);
}

.jr-checkout .checkout__price .jr-rows {
  margin: 0;
  padding: 0 1.625rem;
  border-top: 0;
}

.jr-checkout .checkout__price .jr-rows li:last-child {
  border-bottom: 0;
}

.jr-checkout .checkout__order form > .note {
  margin: 0.75rem 0 0;
}

/* The scope of the document ---------------------------------------------- */

/* One folded panel at the foot of the page, as on the overview and the product pages
   (ticket 0275, lot B): never put forward, no icon, no box, no colour of alert, the size of
   degree 2, the summary a target of 44 pixels; a native `details`, no script. */
.jr-scope {
  max-width: 42rem;
  margin: var(--space-7) 0 0;
  border-top: var(--border-width) solid var(--color-line);
  border-bottom: var(--border-width) solid var(--color-line);
}

.jr-scope summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--target-size);
  color: var(--color-ink-soft);
  font-size: var(--font-size-sm);
  cursor: pointer;
  list-style: none;
}

.jr-scope summary::-webkit-details-marker {
  display: none;
}

.jr-scope summary::after {
  flex-shrink: 0;
  width: 1em;
  text-align: center;
  content: "+" / "";
}

.jr-scope[open] > summary::after {
  content: "\2212" / "";
}

.jr-scope summary:hover {
  color: var(--color-ink);
}

.jr-scope__body {
  padding: 0 0 var(--space-4);
  color: var(--color-ink-soft);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.jr-scope__body > * {
  margin: 0 0 var(--space-2);
}

.jr-scope__body > :last-child {
  margin-bottom: 0;
}

.jr-scope__body a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-size);
  font-weight: var(--font-weight-medium);
}
