/* The pages of text drawn as a window of Lucium (data/article.mjs, "pane": "article"): their content set for reading in the web view, and
   what their sidebar adds (the titles of the page, the other pages of the site) and their toolbar (the button that copies the address).
   Loaded after assets/window.css by every page of text, before the page's own sheet. Like window.css it writes no colour of its own: every
   colour is a token of assets/spaces.css, so the page takes the colours of its space in both schemes (design.test.mjs).
   The content keeps the classes it had in the first look of the site (« Carnet », gone): page-intro, kicker, lead, chapter, figure, doc, prose,
   facts, notice, table-scroll… This sheet gives them their look here. Element rules sit in :where(), and only in the content (<main>), so that a page's own sheet wins easily and the footer keeps its look. */

/* ---------- the column of reading ---------- */
/* The text holds 36em of Familjen Grotesk at the size of the page: about 68 characters a line. What is wider than a line of text (a table,
   cards, two pictures side by side) takes the width of the page, up to 64em. */
.text-page { --measure: 36em; --wide: 64em; }
.text-page .wrap { max-width: var(--wide); }
:where(.text-page main) :is(p, ul, ol, dl, blockquote, pre, details, h1, h2, h3, h4) { max-width: var(--measure); }
/* A title brought to the top by its anchor clears the toolbar, and keeps a breath above it. */
:where(.text-page main) :is(h2, h3, [id]) { scroll-margin-top: 16px; }

/* ---------- the head of the page ---------- */
.text-page .page-intro { margin-bottom: clamp(32px, 5cqi, 56px); }
.text-page .kicker { margin: 0 0 12px; color: var(--accent-text); font: 650 var(--meta-size)/1.2 var(--font-page); letter-spacing: 0.06em; text-transform: uppercase; }
.text-page h1 { font-size: clamp(34px, 5.2cqi, 60px); line-height: 1.04; letter-spacing: var(--hero-tracking); font-stretch: var(--hero-stretch); font-weight: var(--hero-weight); }
.text-page .lead { margin-top: 18px; max-width: 32em; font-size: var(--lede-size); line-height: var(--lede-leading); color: var(--text); }

/* ---------- the flow of the text: titles, paragraphs, lists ---------- */
.text-page :is(.prose, .doc-body, .chapter-text, .article-body) > * + * { margin-top: 0.8em; }
.text-page :is(.prose, .doc-body, .chapter-text, .article-body) > h2 { margin-top: 1.9em; }
.text-page :is(.prose, .doc-body, .chapter-text, .article-body) > :first-child { margin-top: 0; }
.text-page :is(.prose, .doc-body, .chapter-text, .article-body) > h3 { margin-top: 1.5em; }
.text-page :is(.prose, .doc-body, .chapter-text, .article-body) > :is(h2, h3) + * { margin-top: 0.55em; }
.text-page main h2 { font-size: clamp(25px, 2.9cqi, 32px); line-height: 1.15; }
.text-page main h3 { font-size: var(--h3-size); line-height: 1.3; }
:where(.text-page main) :is(ul, ol) { margin: 0; padding-left: 1.3em; }
:where(.text-page main) li + li { margin-top: 0.5em; }
:where(.text-page main) li::marker { color: var(--text-3); }
:where(.text-page main) strong { font-weight: 650; }
:where(.text-page main) hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
:where(.text-page main) blockquote { margin: 0; padding: 2px 0 2px 1em; border-left: 3px solid var(--line-strong); color: var(--text-2); }
:where(.text-page main) code { padding: 0.06em 0.32em; border-radius: 5px; background: var(--tile); overflow-wrap: anywhere; }
/* A block of code scrolls in its own frame, never the page. */
:where(.text-page main) pre { overflow-x: auto; padding: 14px 16px; border-radius: 10px; background: var(--code-bg); color: var(--code-fg); line-height: 1.5; }
:where(.text-page main) pre code { padding: 0; background: none; overflow-wrap: normal; }
.text-page .muted { color: var(--text-2); }
.text-page .label { margin: 0; color: var(--text-2); font: 650 var(--meta-size)/1.3 var(--font-page); letter-spacing: 0.06em; text-transform: uppercase; }
.text-page .sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.text-page .link-arrow { font-weight: 650; }
.text-page .link-arrow::after { content: '\2192' / ''; display: inline-block; margin-left: 0.35em; }
/* The buttons of the pages of the other frame (btn, btn-ink, btn-line, btn-s, btn-l), as the buttons of the window. */
.text-page .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.text-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; font: var(--button-weight) var(--button-size)/1.1 var(--font-page); text-decoration: none; white-space: nowrap; }
.text-page .btn-ink { background: var(--button-bg); color: var(--button-fg); }
.text-page .btn-ink:hover { background: var(--button-hover); }
.text-page .btn-line { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.text-page .btn-line:hover { border-color: var(--accent); color: var(--accent-text); }
.text-page .btn-s { min-height: 36px; padding: 0 12px; font-size: var(--small-size); }
.text-page .btn-l { min-height: 50px; padding: 0 24px; }
.text-page .notice { padding: 14px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); max-width: var(--measure); }

/* A question folded: its summary is the size of a finger, its marker turns. */
:where(.text-page main) details { border-top: 1px solid var(--line); }
:where(.text-page main) details:last-of-type { border-bottom: 1px solid var(--line); }
:where(.text-page main) summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; list-style: none; cursor: default; font-weight: 650; }
:where(.text-page main) summary::-webkit-details-marker { display: none; }
:where(.text-page main) summary::before {
  content: ''; flex: none; width: 7px; height: 7px; margin: 0 4px 0 2px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  transform: rotate(-45deg); transition: transform var(--dur);
}
:where(.text-page main) details[open] > summary::before { transform: rotate(45deg); }
:where(.text-page main) details > :not(summary) { margin-bottom: 14px; }

/* ---------- tables: in their own frame, never wider than the page ---------- */
.text-page .table-scroll { position: relative; overflow-x: auto; max-width: 100%; }
:where(.text-page main) table { border-collapse: collapse; font-size: var(--small-size); line-height: 1.45; }
:where(.text-page main) :is(th, td) { padding: 10px 16px 10px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
:where(.text-page main) thead th { border-top: 0; color: var(--text-2); font-weight: 650; }

/* ---------- the pages of text in two parts: a table of contents, then the text ---------- */
.text-page .doc { display: block; }
/* The contents at the top of the page: on a phone, and when the sidebar is hidden. Beside the sidebar, its titles are the contents. */
.text-page .doc-toc { margin: 0 0 clamp(32px, 5cqi, 48px); padding: 14px 18px 12px; max-width: var(--measure); border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.text-page .doc-toc ol { margin: 8px 0 0; padding: 0; list-style: none; max-width: none; }
.text-page .doc-toc li + li { margin-top: 0; border-top: 1px solid var(--line); }
.text-page .doc-toc a { display: flex; align-items: center; min-height: 40px; padding: 6px 0; color: var(--text); font-size: var(--small-size); line-height: 1.35; text-decoration: none; }
.text-page .doc-toc a:hover { color: var(--accent-text); text-decoration: underline; }
@media (min-width: 761px) {
  :root:not(.sidebar-hidden) .text-page .doc-toc { display: none; }
}

/* A list of facts, a term and its value on a line (the publisher of the legal notice). */
.text-page dl.facts { grid-template-columns: minmax(0, 13em) minmax(0, 1fr); margin-top: 1em; }
.text-page dl.facts > :is(dt, dd) { margin: 0; padding: 11px 18px; border-top: 1px solid var(--line); }
.text-page dl.facts > :is(dt, dd):nth-child(-n + 2) { border-top: 0; }
.text-page dl.facts > dt { padding-right: 6px; }
.text-page dl.facts > dd { padding-left: 0; overflow-wrap: anywhere; }
@container (max-width: 560px) {
  .text-page dl.facts { grid-template-columns: minmax(0, 1fr); }
  .text-page dl.facts > dd { padding: 0 18px 11px; border-top: 0; }
  .text-page dl.facts > dt { padding-bottom: 2px; }
  .text-page dl.facts > dd:nth-child(2) { border-top: 0; }
}

/* ---------- chapters and figures ---------- */
.text-page .chapter { margin-top: clamp(48px, 7cqi, 88px); }
/* The number of a chapter (« 01 »), read by no screen reader: a mark above its title. */
.text-page .chapter-n { margin: 0 0 10px; color: var(--accent-text); font: 700 var(--meta-size)/1 var(--font-page); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.text-page .h-small { font-size: clamp(22px, 2.4cqi, 26px); }
.text-page .chapter-fig { margin-top: 32px; max-width: 40em; }
@container (min-width: 900px) {
  .text-page .chapter:has(> .chapter-fig) { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 clamp(32px, 5cqi, 56px); align-items: start; }
  .text-page .chapter:has(> .chapter-fig) > .chapter-n { grid-column: 1 / -1; }
  .text-page .chapter:has(> .chapter-fig) > .chapter-fig { margin-top: 6px; }
}
.text-page .figure, .text-page .article-fig { margin: 0; }
.text-page .figure img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), var(--shadow-s); background: var(--surface-2); }
/* A capture that carries its own shadow is shown as it is. */
.text-page .figure-plain img { border-radius: 0; box-shadow: none; background: none; }
.text-page figcaption { margin-top: 10px; max-width: 40em; font-size: var(--meta-size); line-height: 1.4; color: var(--text-2); }
.text-page .fig-n { margin-right: 6px; color: var(--accent-text); font-weight: 700; font-size: 0.88em; letter-spacing: 0.05em; text-transform: uppercase; }
.text-page :is(.fig-pair, .fig-row) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17em), 1fr)); gap: 28px clamp(20px, 3cqi, 36px); align-items: start; margin-top: clamp(32px, 5cqi, 56px); }

/* ---------- the privacy page: its principles, the table of the connections ---------- */
.text-page .principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5em), 1fr)); gap: 12px; }
.text-page .principles > div { padding: 16px 18px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.text-page .principles h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.2; }
.text-page .principles p { color: var(--text-2); font-size: var(--small-size); line-height: 1.45; }
.text-page .conn { width: 100%; margin-top: 28px; font-size: 15.5px; }
.text-page .conn :is(th, td) { padding: 16px 20px 16px 0; overflow-wrap: anywhere; }
.text-page .conn thead th { padding-top: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); font: 650 13px/1.3 var(--font-page); letter-spacing: 0.06em; text-transform: uppercase; }
.text-page .conn tbody th { width: 42%; font-weight: 400; }
.text-page .conn tbody th strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 17px; line-height: 1.3; }
.text-page .conn tbody th span { display: block; color: var(--text-2); }
.text-page .conn td { color: var(--text-2); }
.text-page .conn .pill { margin-inline: 2px; }
/* « Quand : », « Interrupteur : »: said by the columns' heads on a wide page, written in each card on a narrow one. */
.text-page .conn .lbl { display: none; color: var(--text); font-weight: 650; }
.text-page .conn-note { margin-top: 16px; }
.text-page .privacy-site { margin-top: clamp(40px, 6cqi, 64px); padding-top: 18px; border-top: 1px solid var(--line); color: var(--text-2); }
@container (max-width: 760px) {
  .text-page .conn, .text-page .conn tbody, .text-page .conn tr, .text-page .conn tbody th, .text-page .conn td { display: block; width: 100%; }
  .text-page .conn thead { display: none; }
  .text-page .conn tr { padding: 16px 0; border-top: 1px solid var(--line); }
  .text-page .conn tbody th, .text-page .conn td { padding: 4px 0; border: 0; }
  .text-page .conn .lbl { display: inline; }
}

/* A state in words (« activé », « désactivé », « sans interrupteur »): a pill; on is marked with the accent, off with a dashed edge. */
.text-page .pill { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); font: 600 12.5px/1.6 var(--font-ui); white-space: nowrap; }
.text-page .pill-on::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.text-page .pill-off { border-style: dashed; }

/* ---------- the journal: a list of articles, an article and its way back ---------- */
.text-page .journal-list { padding: 0; list-style: none; max-width: var(--measure); }
.text-page .journal-list > li + li { margin-top: 0; border-top: 1px solid var(--line); }
.text-page .journal-list > li { padding: 18px 0; }
.text-page .journal-meta { color: var(--text-2); font-size: var(--meta-size); }
.text-page :is(.article-back, .article-next) { margin-top: clamp(32px, 5cqi, 48px); }

/* ---------- the sidebar of a page of text: its titles as tabs, the other pages of the site ---------- */
.text-toc { margin-left: 16px; }
.toc-item { display: block; }
.text-toc .tab { height: auto; min-height: 36px; }
.text-toc .tab-main { padding-block: 8px; }
/* A title is read whole: it wraps, where the title of a page in a tab is cut. */
.text-toc .tab-title { white-space: normal; line-height: 1.3; }
.toc-glyph { color: var(--text-on-space-2); }
.text-toc .tab.active .toc-glyph { color: var(--text-on-space); }
.toc-sub { margin-left: 18px; }
.site-tabs-nav { margin-top: 8px; }
.site-tabs-nav .today-head { margin-top: 4px; }
.site-tabs .tab { margin-left: 16px; }

/* ---------- the toolbar: the link glyph copies the address, as in the app ---------- */
.wv-address-group { flex: 1; min-width: 0; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 2px; }
.wv-address-group .wv-address { margin: 0; max-width: none; }
/* Written hidden, shown by assets/article.js where the browser can copy: its room is kept, so that the address does not move. */
.wv-address-group .wv-copy[hidden] { display: grid !important; visibility: hidden; }
@media (max-width: 760px) {
  .wv-address-group .wv-copy { width: 32px; }
}
