/* ==========================================================================
   Selam Éditions — components
   Black and white, set like the pages of a book.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 2.9rem;
  padding: 0.6em 1.3em;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-serif);
  font-size: var(--step-0);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.button:hover {
  background: var(--paper);
  color: var(--ink);
}

.button--outline {
  background: transparent;
  color: var(--ink);
}

.button--outline:hover {
  background: var(--ink);
  color: var(--on-ink);
}

/* Call to action (Broché, Kindle, Écrire à Selam): a box drawn by hand, in
   the manner of Sempé — a slightly uneven ink outline, a second pen stroke
   that does not quite follow the first, bold small caps and an arrow.
   On hover the line trembles like a drawing that is still alive; the first
   button also nudges its arrow from time to time to invite the reader. */
.button--cta {
  position: relative;
  isolation: isolate;
  gap: 0.5em;
  min-height: 2.75rem;
  padding: 0.45em 1.05em 0.45em 1.15em;
  border: 2px solid var(--ink);
  border-radius: 255px 14px 225px 14px / 14px 225px 14px 255px;
  font-weight: 700;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.button--cta::before {
  content: "";
  position: absolute;
  inset: -5px -3px -3px -5px;
  z-index: -1;
  border: 1px solid var(--ink);
  border-radius: 14px 225px 14px 255px / 255px 14px 225px 14px;
  opacity: 0.55;
  transform: rotate(-1.1deg);
  pointer-events: none;
}

.button--cta::after {
  content: "\2192";
  font-weight: 400;
  letter-spacing: 0;
}

.button--cta:hover,
.button--cta:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.button--cta.button--outline {
  background: var(--paper);
  color: var(--ink);
}

.button--cta.button--outline:hover,
.button--cta.button--outline:focus-visible {
  background: var(--ink);
  color: var(--on-ink);
}

@media (prefers-reduced-motion: no-preference) {
  .button--cta::after {
    transition: transform var(--duration) var(--ease);
  }

  .button--cta:hover::after,
  .button--cta:focus-visible::after {
    transform: translateX(4px);
  }

  .button--cta:hover,
  .button--cta:focus-visible {
    animation: cta-boil 0.48s steps(1) infinite;
  }

  .button--cta:hover::before,
  .button--cta:focus-visible::before {
    animation: cta-boil-line 0.48s steps(1) infinite;
  }

  .button--cta:not(.button--outline):not(:hover)::after {
    animation: cta-nudge 4.5s var(--ease) 1.5s infinite;
  }
}

@keyframes cta-boil {
  0% { border-radius: 255px 14px 225px 14px / 14px 225px 14px 255px; }
  33% { border-radius: 225px 16px 255px 12px / 12px 255px 16px 225px; }
  66% { border-radius: 240px 12px 235px 16px / 16px 235px 12px 240px; }
}

@keyframes cta-boil-line {
  0% { transform: rotate(-1.1deg); }
  33% { transform: rotate(0.6deg) translate(1px, 1px); }
  66% { transform: rotate(-0.4deg) translate(-1px, 0); }
}

@keyframes cta-nudge {
  0%, 82%, 100% { transform: none; }
  88% { transform: translateX(5px); }
  94% { transform: translateX(1px); }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 2.75rem;
  font-family: var(--font-serif);
  font-size: var(--step-0);
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  color: var(--ink);
}

.link-arrow::after {
  content: "\2192";
  font-style: normal;
  transition: transform var(--duration) var(--ease);
}

.link-arrow:hover {
  text-decoration-color: currentColor;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 2.75rem;
  font-family: var(--font-serif);
  font-style: italic;
  text-decoration: none;
}

.link-back::before {
  content: "\2190";
  font-style: normal;
  transition: transform var(--duration) var(--ease);
}

.link-back:hover::before {
  transform: translateX(-4px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs) var(--space-m);
}

/* --------------------------------------------------------------------------
   Title page (homepage opening)
   -------------------------------------------------------------------------- */
.title-page {
  position: relative;
  padding-block: var(--space-xl) var(--space-section);
  text-align: center;
}

.title-page__inner {
  display: grid;
  justify-items: center;
  gap: var(--space-m);
}

.title-page__imprint {
  font-size: var(--step-0);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.3em;
  text-transform: lowercase;
}

.title-page__rule {
  width: 3rem;
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--ink);
}

/* The title is cut by hand so that French and English always have the same
   number of lines, whatever the phone's font: 4 lines on phones (br-m),
   3 lines from 48rem (br-d). Its size is set so that each line fits. */
.title-page__title {
  max-width: none;
  font-size: min(1.75rem, 6vw);
  font-style: italic;
  line-height: 1.22;
  text-wrap: wrap;
}

.title-page__title .br-d {
  display: none;
}

@media (min-width: 48rem) {
  .title-page__title {
    font-size: min(2.15rem, 4.1vw);
  }

  .title-page__title .br-m {
    display: none;
  }

  .title-page__title .br-d {
    display: inline;
  }
}

.title-page__text {
  display: grid;
  gap: var(--space-s);
  max-width: 30em;
  color: var(--ink-soft);
}

.title-page__text p:first-child {
  font-size: var(--step-1);
}

/* "Turn the page" cue at the bottom of the title page */
.turn-page {
  display: inline-grid;
  justify-items: center;
  gap: 0.2rem;
  margin-top: var(--space-s);
  color: var(--muted);
  font-size: var(--step--1);
  font-style: italic;
  text-decoration: none;
}

.turn-page::after {
  content: "\2193";
  font-style: normal;
}

.turn-page:hover {
  color: var(--ink);
}

/* Last chapter: back to the title page */
.turn-page--back::after {
  content: "\2191";
  order: -1;
}

/* At the end of every chapter */
.turn-page-wrap {
  margin-top: var(--space-xl);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Tabs — chapter "Les livres": Les livres / Le catalogue / Séries
   Without JavaScript the tab bar stays hidden and the three panels follow
   each other with their own headings.
   -------------------------------------------------------------------------- */
.tabs__list {
  display: none;
}

.tabs.is-ready .tabs__list {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  margin-bottom: var(--space-m);
  border-bottom: var(--hairline);
}

.tabs__tab {
  position: relative;
  flex: 0 1 auto;
  min-height: 2.75rem;
  padding: 0 0.9em;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: var(--step-0);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: color var(--duration) var(--ease);
}

.tabs__tab:hover {
  color: var(--ink);
}

/* the active tab: ink, with an ink line on the rule below */
.tabs__tab[aria-selected="true"] {
  color: var(--ink);
}

.tabs__tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0.9em;
  right: 0.9em;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
}

.tabs__tab:focus-visible {
  outline-offset: -2px;
}

.tabs.is-ready .tabs__heading {
  display: none; /* the tab names the panel */
}

.tabs__heading {
  margin: var(--space-l) 0 var(--space-s);
  font-size: var(--step-2);
  font-style: italic;
  text-align: center;
}

.tabs__intro {
  max-width: 30em;
  margin: 0 auto var(--space-m);
  color: var(--muted);
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .tabs.is-ready .tabs__panel:not([hidden]) {
    animation: tab-in 320ms var(--ease) both;
  }
}

@keyframes tab-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .turn-page::after {
    animation: turn-hint 1.8s ease-in-out infinite;
  }

  .turn-page--back::after {
    animation-name: turn-hint-up;
  }
}

@keyframes turn-hint {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(4px); }
}

@keyframes turn-hint-up {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   Chapters (homepage sections)
   -------------------------------------------------------------------------- */
.chapter-number {
  color: var(--muted);
}

/* Folio: the page number at the foot of each chapter */
main {
  counter-reset: folio;
}

.title-page,
.section,
.page-body {
  counter-increment: folio;
}

.title-page::after,
.section::after,
.page-body::after {
  content: counter(folio);
  position: absolute;
  left: 50%;
  bottom: var(--space-m);
  transform: translateX(-50%);
  color: var(--faint);
  font-size: var(--step--1);
  font-variant-numeric: oldstyle-nums;
}

.page-body {
  position: relative;
}

/* Drop cap on the first paragraph of a chapter */
.dropcap::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-size: 3.4em;
  font-style: normal;
  line-height: 0.82;
  color: var(--ink);
}

/* Reveal: blocks fade in like a page being turned (illustrations.js adds
   .is-revealed; without JavaScript nothing is hidden). */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Status messages and fallbacks
   -------------------------------------------------------------------------- */
.notice {
  max-width: var(--measure);
  margin-inline: auto;
  padding: var(--space-s) var(--space-m);
  border-block: var(--hairline);
  font-size: var(--step--1);
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

.notice--error {
  border-block: 1px solid var(--ink);
}





.books-fallback {
  max-width: var(--measure);
  margin-inline: auto;
}

.books-fallback li + li {
  margin-top: var(--space-xs);
}

/* --------------------------------------------------------------------------
   Book covers — the one exception to black and white: a cover is the
   product, it is shown as printed. Each cover keeps its own proportions.
   -------------------------------------------------------------------------- */
.cover {
  position: relative;
  display: block;
  background: var(--paper-shade);
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.08), 0 18px 30px -18px rgb(0 0 0 / 0.5);
}

/* The spine: a soft fold on the left edge of every cover */
.cover::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7%;
  background: linear-gradient(to right, rgb(0 0 0 / 0.18), rgb(255 255 255 / 0.12) 40%, rgb(0 0 0 / 0.06) 70%, transparent);
  pointer-events: none;
}

.cover img {
  width: 100%;
  height: auto;
}

a.cover {
  transition: transform 400ms var(--ease), box-shadow 400ms var(--ease);
  transform-origin: left center;
}

a.cover:hover {
  transform: perspective(900px) rotateY(-9deg);
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.08), 14px 22px 32px -18px rgb(0 0 0 / 0.55);
}

/* --------------------------------------------------------------------------
   Featured book
   -------------------------------------------------------------------------- */
.feature {
  display: grid;
  justify-items: center;
  gap: var(--space-xl);
}

.feature + .feature {
  margin-top: var(--space-2xl);
  padding-top: var(--space-2xl);
  border-top: var(--hairline);
}

.feature__covers {
  position: relative;
  width: min(15rem, 62vw);
  padding: 0 0 var(--space-m);
}

.feature__covers--pair {
  padding-right: 30%;
}

.feature__covers--pair .cover + .cover {
  position: absolute;
  top: var(--space-xl);
  right: 0;
  width: 50%;
}

.feature__body {
  width: 100%;
  max-width: var(--measure);
  text-align: center;
}

.feature__meta {
  font-size: var(--step--1);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.feature__title {
  margin-top: var(--space-2xs);
  font-size: var(--step-3);
  font-style: italic;
  line-height: 1.15;
}

.feature__title a {
  text-decoration: none;
}

.feature__summary {
  margin-top: var(--space-m);
  color: var(--ink-soft);
  text-align: left;
}

.feature__more {
  margin-top: var(--space-m);
}

/* Editions list (featured block and book pages) */
.editions {
  margin-top: var(--space-l);
  border-top: 1px solid var(--ink);
  text-align: left;
}

.edition {
  display: grid;
  gap: var(--space-2xs);
  padding-block: var(--space-m);
  border-bottom: var(--hairline);
}

.edition__label {
  font-size: var(--step--1);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.edition__title {
  font-size: var(--step-1);
  font-style: italic;
}

.edition__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.edition__facts dt {
  display: inline;
}

.edition__facts dt::after {
  content: " : ";
}

:lang(en) .edition__facts dt::after,
.edition__facts:lang(en) dt::after {
  content: ": ";
}

.edition__facts dd {
  display: inline;
  color: var(--ink-soft);
}

.buy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.9rem; /* room for the second pen stroke of each box */
  margin-top: var(--space-2xs);
}

.edition__note {
  font-size: var(--step--1);
  font-style: italic;
  color: var(--muted);
}

.status {
  display: inline-block;
  font-size: var(--step--1);
  font-style: italic;
  font-variant-caps: normal;
  letter-spacing: 0;
  color: var(--muted);
}

.status--published {
  color: var(--ink);
}

.status--coming-soon {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Catalogue (a shelf of books)
   -------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs) var(--space-s);
  margin-bottom: var(--space-l);
  font-size: var(--step--1);
}

.filters__label {
  color: var(--muted);
  font-style: italic;
}

.filters button {
  min-height: 2.5rem;
  padding: 0 var(--space-xs);
  border: 1px solid var(--rule-strong);
  background: transparent;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
}

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

.shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl) var(--space-m);
  padding-bottom: var(--space-s);
  border-bottom: 2px solid var(--ink); /* the shelf board */
}

.shelf__item {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-s);
  align-content: start;
  text-align: center;
}

.shelf__item .cover {
  width: 100%;
  max-width: 11rem;
  margin-inline: auto;
}

.shelf__text {
  padding-top: var(--space-2xs);
}

.shelf__lang {
  font-size: var(--step--2);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.shelf__title {
  margin-top: 0.25rem;
  font-size: var(--step-0);
  font-style: italic;
  line-height: 1.3;
}

.shelf__title a {
  text-decoration: none;
}

.shelf__title a:hover {
  text-decoration: underline;
}

.shelf__item .status {
  margin-top: 0.3rem;
}

/* --------------------------------------------------------------------------
   Series
   -------------------------------------------------------------------------- */
/* Series announced but not yet published */
.series-soon {
  max-width: var(--measure);
  margin-inline: auto;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
}

.series + .series {
  margin-top: var(--space-2xl);
}

.series__title {
  font-size: var(--step-2);
  font-style: italic;
  text-align: center;
}

.series__description {
  margin: var(--space-xs) auto 0;
  max-width: var(--measure);
  color: var(--ink-soft);
  text-align: center;
}

.series__volumes {
  counter-reset: volume;
  margin-top: var(--space-l);
  border-top: 1px solid var(--ink);
}

.volume {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-xs) var(--space-s);
  align-items: baseline;
  padding-block: var(--space-s);
  border-bottom: var(--hairline);
}

.volume__number {
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: oldstyle-nums tabular-nums;
}

/* Volume title . . . . . . . status, as in the list of a collection */
.volume > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-2xs);
}

.volume > div::after {
  content: "";
  order: 1;
  flex: 1;
  min-width: 1.5rem;
  border-bottom: 1px dotted var(--rule-strong);
}

.volume .status {
  order: 2;
}

.volume__title {
  font-size: var(--step-1);
  font-style: italic;
}

.volume__title a {
  text-decoration: none;
}

.volume__title a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  justify-items: center;
  gap: var(--space-xl);
}

.about__portrait {
  width: min(13rem, 55vw);
  padding: 0.6rem 0.6rem 2.2rem;
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 14px 26px -18px rgb(0 0 0 / 0.5);
  transform: rotate(-2deg);
}

.about__portrait img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--paper-shade);
  filter: grayscale(1);
}

.about__text {
  max-width: var(--measure);
}

.about__text > * + * {
  margin-top: var(--space-s);
}

.about__text .kicker,
.about__text h2 {
  text-align: center;
}

.about__text .lead {
  font-style: normal;
}

.placeholder-text {
  color: var(--muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Journal / articles
   -------------------------------------------------------------------------- */
.article-list {
  display: grid;
  gap: var(--space-xl);
}

.article-card {
  display: grid;
  gap: var(--space-xs);
  align-content: start;
  padding-bottom: var(--space-l);
  border-bottom: var(--hairline);
}

.article-card__image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper-shade);
}

.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform 600ms var(--ease);
}

.article-card__image:hover img {
  transform: scale(1.03);
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.article-card__category {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.article-card__title {
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.2;
}

.article-card__title a {
  text-decoration: none;
}

.article-card__title a:hover {
  text-decoration: underline;
}

.article-card__excerpt {
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* A single article (or the last one alone on its row) takes the full width:
   its title and summary are not squeezed into a narrow column */
.article-list > .article-card:only-child {
  grid-column: 1 / -1;
  justify-items: center;
  text-align: center;
}

.article-list > .article-card:only-child .article-card__meta {
  justify-content: center;
}

.article-list > .article-card:only-child .article-card__title,
.article-list > .article-card:only-child .article-card__excerpt {
  max-width: none;
}

.article-card__source {
  font-size: var(--step--1);
}

.journal-footer {
  margin-top: var(--space-xl);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-block {
  display: grid;
  justify-items: center;
  gap: var(--space-m);
  text-align: center;
}

.contact-block__email {
  margin-top: var(--space-s);
  font-size: var(--step-2);
  font-style: italic;
  word-break: break-word;
}

.contact-block__email a {
  text-decoration-color: var(--ink);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2xs) var(--space-m);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
}

/* --------------------------------------------------------------------------
   Secondary pages
   -------------------------------------------------------------------------- */
.breadcrumb {
  padding-block: var(--space-m) 0;
  font-size: var(--step--1);
  font-style: italic;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.breadcrumb li + li::before {
  content: "\203A";
  margin-right: 0.35rem;
  color: var(--faint);
  font-style: normal;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb [aria-current] {
  color: var(--ink-soft);
}

.page-head {
  padding-block: var(--space-xl) var(--space-l);
  text-align: center;
}

.page-head .container {
  display: grid;
  justify-items: center;
}

.page-head__title {
  margin-top: var(--space-xs);
  font-size: var(--step-4);
  font-style: italic;
  max-width: 16em;
}

.page-head__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  margin: var(--space-m) auto 0;
  background: var(--ink);
}

.page-head .lead {
  margin: var(--space-m) auto 0;
}

.page-body {
  padding-block: var(--space-l) var(--space-section);
}

.page-back {
  margin-top: var(--space-2xl);
  padding-top: var(--space-m);
  border-top: var(--hairline);
  text-align: center;
}

/* Long-form text: articles, legal pages, about page */
.prose {
  max-width: var(--measure);
  margin-inline: auto;
}

.prose > * + * {
  margin-top: 1em;
}

/* Book-style paragraphs: indented, no gap between them */
.prose > p + p:not([class]) {
  margin-top: 0;
  text-indent: 1.5em;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: var(--step-2);
  font-style: italic;
  text-align: center;
}

.prose h2::after {
  content: "";
  display: block;
  width: 1.5rem;
  height: 1px;
  margin: 0.6em auto 0;
  background: var(--rule-strong);
}

.prose h3 {
  margin-top: 1.8em;
  font-size: var(--step-1);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.8em;
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
}

.prose ul {
  list-style: "\2013\00a0\00a0";
}

.prose li + li {
  margin-top: 0.35em;
}

.prose blockquote {
  margin-block: 1.6em;
  padding-inline: var(--space-m);
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

.prose blockquote::before {
  content: "\00AB";
  display: block;
  color: var(--faint);
  font-size: 2em;
  line-height: 1;
}

:lang(en) .prose blockquote::before {
  content: "\201C";
}

.prose figure img {
  width: 100%;
  filter: grayscale(1);
}

.prose figcaption {
  margin-top: var(--space-2xs);
  font-size: var(--step--1);
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

.prose dl {
  display: grid;
  gap: 0.2rem;
}

.prose dt {
  margin-top: 0.6em;
  font-size: var(--step--1);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.prose code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.85em;
}

.prose .todo {
  padding: 0 0.2em;
  background: var(--paper-shade);
  font-style: normal;
}

.updated {
  font-size: var(--step--1);
  font-style: italic;
  color: var(--muted);
}

/* Article page */
.article-head {
  padding-block: var(--space-xl) var(--space-l);
  text-align: center;
}

.article-head .article-card__meta {
  justify-content: center;
  margin-top: var(--space-m);
}

.article-figure {
  margin-block: var(--space-l);
}

.article-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--paper-shade);
  filter: grayscale(1);
}

.article-figure figcaption {
  margin-top: var(--space-2xs);
  text-align: center;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Book landing page (QR destination)
   -------------------------------------------------------------------------- */
.book-page {
  display: grid;
  gap: var(--space-l);
  padding-block: var(--space-l) var(--space-section);
}

.book-page__intro {
  display: grid;
  justify-items: center;
  gap: var(--space-l);
  text-align: center;
}

.book-page__intro .cover {
  width: min(12rem, 55vw);
}

.book-page__cover-col {
  display: none;
}

.book-page__title {
  margin-top: var(--space-2xs);
  font-size: var(--step-4);
  font-style: italic;
  line-height: 1.12;
}

.book-page__byline {
  margin-top: var(--space-xs);
  font-size: var(--step--1);
  font-style: italic;
  color: var(--muted);
}

.book-page__summary {
  max-width: var(--measure);
  margin-inline: auto;
}

.book-page__summary > * + * {
  margin-top: var(--space-s);
}

.book-page__summary .lead {
  font-size: var(--step-2);
}

/* Technical sheet: readership, paperback, e-book */
.book-facts {
  display: grid;
  gap: var(--space-2xs);
  margin-top: var(--space-m);
  padding-block: var(--space-s);
  border-block: var(--hairline);
  font-size: var(--step--1);
}

.book-facts > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: var(--space-s);
}

.book-facts dt {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.book-page__other {
  margin-top: var(--space-s);
  font-size: var(--step--1);
  font-style: italic;
  text-align: center;
}

.book-page__back {
  text-align: center;
}

/* Three tabs: the book / inside the book / editions and purchase. The tab
   names are long: they wrap onto two lines on phones, each with its rule. */
.book-page__tabs.is-ready .tabs__list {
  flex-wrap: wrap;
  border-bottom: 0;
}

.book-page__tabs .tabs__tab {
  border-bottom: var(--hairline);
}

/* The ten chapters, numbered like a table of contents */
.book-chapters {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: chapter;
}

.book-chapters li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  align-items: baseline;
  font-style: italic;
  counter-increment: chapter;
}

.book-chapters li::before {
  content: counter(chapter, decimal-leading-zero);
  color: var(--muted);
  font-size: var(--step--1);
  font-style: normal;
  font-variant-numeric: oldstyle-nums;
}

/* Editions on the book page: label, title and the two buttons (the
   formats and pages are in "Dans ce livre") */
.book-page .editions {
  margin-top: 0;
}

.book-page .edition {
  padding-block: var(--space-s);
}

.book-page .edition__facts {
  display: none;
}

/* --------------------------------------------------------------------------
   Cookie consent (only rendered when optional services are configured)
   -------------------------------------------------------------------------- */
/* A small card that rises from the bottom of the page, like a loose leaf */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: var(--space-s);
  z-index: 60;
  width: min(36rem, calc(100% - 2 * var(--space-s)));
  max-height: calc(100vh - 2 * var(--space-s));
  overflow-y: auto;
  padding: var(--space-m) var(--space-m) var(--space-s);
  border: 1px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: -6px;
  background: var(--paper);
  box-shadow: 0 24px 50px -20px rgb(0 0 0 / 0.55);
  font-size: var(--step--1);
  text-align: center;
  transform: translateX(-50%);
  animation: consent-in 500ms var(--ease) both;
}

@keyframes consent-in {
  from { transform: translate(-50%, 120%); }
  to { transform: translate(-50%, 0); }
}

.consent-banner__title {
  font-size: var(--step-2);
  font-style: italic;
}

.consent-banner__title::after {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  margin: var(--space-xs) auto 0;
  background: var(--ink);
}

.consent-banner .actions {
  justify-content: center;
}

/* Accept and refuse carry exactly the same weight */
.consent-banner .button {
  flex: 1 1 8rem;
  min-height: 2.75rem;
  padding-inline: 0.8em;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
}

/* Smartphone first: a compact card that leaves most of the page visible
   and keeps clear of the home / gesture bar. */
@media (max-width: 47.9375rem) {
  .consent-banner {
    bottom: calc(var(--space-2xs) + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 2 * var(--space-2xs));
    max-height: 70dvh;
    padding: var(--space-s) var(--space-s) var(--space-2xs);
  }

  .consent-banner__title {
    font-size: var(--step-1);
  }

  .consent-banner__title::after {
    margin-top: var(--space-2xs);
  }

  .consent-banner p {
    font-size: var(--step--2);
    line-height: 1.5;
  }

  /* The three choices side by side, on one line */
  .consent-banner .actions {
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin-top: var(--space-xs);
  }

  .consent-banner .button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.75rem;
    padding-inline: 0.25em;
    font-size: var(--step--2);
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
}

.consent-banner p {
  margin-top: var(--space-2xs);
  color: var(--ink-soft);
}

.consent-banner .actions,
.consent-dialog .actions {
  margin-top: var(--space-s);
  gap: var(--space-2xs);
}

.consent-dialog .actions {
  justify-content: flex-start;
}

.consent-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--step--1);
}

.consent-dialog::backdrop {
  background: rgb(0 0 0 / 0.5);
}

.consent-dialog__inner {
  padding: var(--space-l);
}

.consent-dialog__title {
  font-size: var(--step-2);
  font-style: italic;
}

.consent-dialog__intro {
  margin-top: var(--space-xs);
  color: var(--ink-soft);
}

.consent-categories {
  margin: var(--space-m) 0 0;
  padding: 0;
  border: 0;
  border-top: var(--hairline);
}

.consent-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3xs) var(--space-s);
  padding-block: var(--space-s);
  border-bottom: var(--hairline);
}

.consent-category__name {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
}

.consent-category__desc {
  grid-column: 1 / -1;
  color: var(--muted);
}

.consent-category input {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--ink);
}

.consent-panel {
  max-width: var(--measure);
  margin-inline: auto;
  padding: var(--space-m);
  border: 1px solid var(--ink);
  font-size: var(--step--1);
}

.consent-panel .consent-categories {
  margin-top: var(--space-s);
}

.actions--spaced {
  margin-block: var(--space-m) var(--space-xl);
}
