/* ==========================================================================
   Cédric Le Calvé — pages secondaires
   Fichier : styles/pages.css
   Pages des livres (livres/…), mentions légales, confidentialité, page 404.
   Même papier, même encre que l'accueil (styles/motion.css), sans animation.
   ========================================================================== */

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/public/fonts/eb-garamond-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/public/fonts/eb-garamond-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("/public/fonts/eb-garamond-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("/public/fonts/eb-garamond-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Playwrite FR Trad";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/public/fonts/playwrite-fr-trad-latin-300-normal.woff2") format("woff2");
}

:root {
  --paper: #f6efe5;
  --paper-hi: #fbf7f0;
  --paper-lo: #e9dece;
  --ink: #1f1a17;
  --ink-2: #3c2f28;
  --muted: #6d6157;
  --kraft: #b89e82;
  --blue: #2a3f94;
  --red: #c9393a;
  --gold: #b07a12;
  --night: #15110e;
  --on-night: #f3eadf;
  --on-night-muted: #a8998b;
  --line: rgba(54, 41, 33, 0.16);
  --line-night: rgba(243, 234, 223, 0.14);

  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --hand: "Playwrite FR Trad", "Segoe Script", "Apple Chancery", cursive;

  --gutter: clamp(18px, 4vw, 56px);
  --mx: clamp(64px, 8.5vw, 140px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .075 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

::selection {
  background: var(--blue);
  color: var(--paper-hi);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 3px;
}

.page-footer :focus-visible {
  outline-color: var(--on-night);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-hi);
  text-decoration: none;
  transition: top 0.3s var(--ease);
}

.skip-link:focus {
  top: 14px;
}

.hand {
  font-family: var(--hand);
  font-weight: 300;
  line-height: 1.9;
  color: var(--blue);
}

/* La marge rouge du cahier */
.margin-rule {
  position: fixed;
  top: 0;
  bottom: 0;
  left: calc(var(--mx) - 28px);
  z-index: 1;
  width: 1px;
  background: rgba(201, 57, 58, 0.55);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.page-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding: 18px var(--gutter) 18px var(--mx);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1.1;
}

/* le logo : trois livres aux initiales C · L · C */
.brand__logo {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(243, 234, 223, 0.08);
}

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__name {
  font-size: 1.4rem;
  font-weight: 500;
}

.brand__role {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--muted);
}

.page-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(18px, 2.6vw, 40px);
  padding: 0;
  list-style: none;
}

.page-nav a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 1.12rem;
  text-decoration: none;
}

.page-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.55s var(--ease);
}

.page-nav a:hover::after,
.page-nav a:focus-visible::after,
.page-nav a[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* --------------------------------------------------------------------------
   Contenu
   -------------------------------------------------------------------------- */
.page-main {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(1180px + var(--mx));
  padding: 10px var(--gutter) clamp(70px, 12vh, 130px) var(--mx);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
  list-style: none;
}

.crumbs li + li::before {
  content: "›";
  margin: 0 0.6em;
  font-style: normal;
}

.crumbs a {
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.crumbs a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

/* Boutons (comme sur l'accueil : l'encre monte dans le papier) */
.btn {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.6em;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 40% 40% 0 0 / 30% 30% 0 0;
  background: var(--ink);
  transform: translateY(102%);
  transition: transform 0.65s var(--ease), border-radius 0.65s var(--ease);
}

.btn:hover::before,
.btn:focus-visible::before {
  border-radius: 0;
  transform: translateY(0);
}

.btn--ink {
  background: var(--ink);
  color: var(--paper-hi);
}

.btn--ink::before {
  background: var(--blue);
}

.btn--ink:hover,
.btn--ink:focus-visible {
  border-color: var(--blue);
}

.btn--line:hover,
.btn--line:focus-visible {
  color: var(--paper-hi);
}

/* --------------------------------------------------------------------------
   Page d'un livre
   -------------------------------------------------------------------------- */
.book {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(36px, 6vw, 96px);
  margin-top: clamp(28px, 5vh, 56px);
}

.book__visual {
  position: sticky;
  top: 40px;
  padding: 12px 24px 40px 0;
  perspective: 1600px;
}

.book__cover {
  --spine: #3c2f28;
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  border-radius: 2px 5px 5px 2px;
  transform: rotateY(-14deg) rotateX(2deg);
  transform-origin: 30% 50%;
  box-shadow:
    5px 0 0 -1px #f4ede2,
    6px 1px 0 -1px #d9cfc0,
    9px 2px 0 -2px #efe7da,
    10px 3px 0 -2px #cfc3b2,
    30px 38px 60px -22px rgba(31, 26, 23, 0.6),
    0 2px 6px rgba(31, 26, 23, 0.16);
  transition: transform 0.9s var(--ease);
}

.book__cover:hover {
  transform: rotateY(-4deg) rotateX(0deg);
}

.book__cover img {
  width: 100%;
  border-radius: inherit;
}

/* le pli du dos et la lumière sur la couverture */
.book__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.26) 0, rgba(255, 255, 255, 0.22) 1.4%, rgba(0, 0, 0, 0.1) 3%, transparent 8%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 45%);
  pointer-events: none;
}

.book__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.04rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.book__meta i {
  display: block;
  width: 34px;
  height: 1px;
  background: currentColor;
}

.book__title {
  margin: 0.12em 0 0.18em;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.book__by {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink-2);
}

.book__by a {
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.book__lead {
  max-width: 30em;
  margin: 1.1em 0 1.2em;
  font-size: clamp(1.25rem, 1.7vw, 1.42rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-2);
}

.book__lead p + p {
  margin-top: 0.5em;
}

.book__lead b {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

/* Notes des lecteurs (version claire) */
.rating {
  margin-bottom: 1.6em;
  font-size: 1.06rem;
  color: var(--muted);
}

.rating__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.stars {
  position: relative;
  display: inline-block;
  font-family: "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: rgba(31, 26, 23, 0.18);
}

.stars__fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--gold);
}

.rating__value {
  font-variant-numeric: lining-nums;
  color: var(--ink);
}

.rating__sources {
  margin-top: 4px;
  font-size: 0.98rem;
  font-variant-numeric: lining-nums;
}

.rating__sources a {
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.rating__sources a:hover,
.rating__sources a:focus-visible {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.rating__sep {
  margin: 0 0.55em;
}

.book__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.book__audio {
  margin-top: 16px;
  font-style: italic;
  color: var(--ink-2);
}

.book__audio a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.book__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  max-width: 34em;
  margin-top: clamp(32px, 5vh, 48px);
  border-top: 1px solid var(--line);
}

.book__facts div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.book__facts dt {
  font-size: 0.98rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.book__facts dd {
  font-size: 1.12rem;
  font-variant-numeric: lining-nums;
}

.book__facts a {
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

/* Résumé */
.summary {
  max-width: 44rem;
  margin-top: clamp(64px, 10vh, 110px);
  margin-left: calc((100% - 44rem) * 0.42);
}

.summary h2,
.press--page h2,
.others h2 {
  margin-bottom: 0.7em;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
}

.summary__text p {
  margin-bottom: 1em;
  font-size: clamp(1.2rem, 1.5vw, 1.32rem);
  line-height: 1.65;
}


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

/* Articles et interviews */
.press--page {
  max-width: 44rem;
  margin-top: clamp(56px, 9vh, 96px);
  margin-left: calc((100% - 44rem) * 0.42);
}

.press__list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.press__item {
  border-bottom: 1px solid var(--line);
}

.press__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 22px;
  padding: 15px 0 16px;
  text-decoration: none;
}

.press__meta {
  font-size: 1.02rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.press__title {
  grid-column: 1;
  font-size: 1.24rem;
  font-style: italic;
  line-height: 1.32;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.45s var(--ease);
}

.press__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
  transition: transform 0.6s var(--ease), color 0.45s var(--ease);
}

.press__link:hover .press__title,
.press__link:focus-visible .press__title {
  text-decoration-color: currentColor;
}

.press__link:hover .press__arrow,
.press__link:focus-visible .press__arrow {
  color: var(--red);
  transform: translate(3px, -3px);
}

/* Les autres livres */
.others {
  margin-top: clamp(80px, 13vh, 140px);
  padding-top: clamp(40px, 6vh, 64px);
  border-top: 1px solid var(--line);
}

.others__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 34px clamp(18px, 2.4vw, 32px);
  padding: 0;
  list-style: none;
}

.others__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
}

.others__cover {
  display: block;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 2px 4px 4px 2px;
  aspect-ratio: 0.64;
  background: var(--paper-lo);
  box-shadow: 0 18px 30px -18px rgba(31, 26, 23, 0.55), 0 1px 3px rgba(31, 26, 23, 0.16);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.others__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.others__title {
  font-size: 1.14rem;
  font-weight: 500;
  line-height: 1.2;
}

.others__meta {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--muted);
}

.others__link:hover .others__cover,
.others__link:focus-visible .others__cover {
  transform: translateY(-6px) rotate(-1.2deg);
  box-shadow: 0 26px 36px -18px rgba(31, 26, 23, 0.6), 0 1px 3px rgba(31, 26, 23, 0.16);
}

.others__all {
  margin-top: 40px;
  font-size: 1.15rem;
  font-style: italic;
}

.others__all a {
  color: var(--blue);
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Mentions légales, confidentialité
   -------------------------------------------------------------------------- */
.legal {
  max-width: 44rem;
  margin-top: clamp(28px, 5vh, 56px);
}

.legal h1 {
  margin-bottom: 0.25em;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 500;
  line-height: 1.05;
}

.legal__updated {
  margin-bottom: 2.2em;
  font-style: italic;
  color: var(--muted);
}

.legal__lead {
  margin-bottom: 2em;
  padding-left: 18px;
  border-left: 2px solid var(--red);
  font-size: 1.28rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-2);
}

.legal h2 {
  margin: 1.9em 0 0.5em;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.2;
}

.legal p,
.legal li {
  line-height: 1.65;
}

.legal p + p {
  margin-top: 0.8em;
}

.legal ul {
  margin-top: 0.6em;
  padding-left: 1.2em;
}

.legal li + li {
  margin-top: 0.4em;
}

.legal li::marker {
  color: var(--red);
}

.legal a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.legal dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 22px;
  margin-top: 0.4em;
}

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

/* --------------------------------------------------------------------------
   Page introuvable (404)
   -------------------------------------------------------------------------- */
.notfound {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 18px;
  max-width: 40rem;
  margin-top: clamp(40px, 10vh, 120px);
}

.notfound__code {
  font-size: clamp(6rem, 20vw, 13rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.notfound__hand {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  transform: rotate(-2deg);
}

.notfound h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 500;
  line-height: 1.15;
}

.notfound p {
  max-width: 32em;
  font-size: 1.2rem;
  color: var(--ink-2);
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.notfound__books {
  margin-top: 26px;
}

.notfound__books p {
  margin-bottom: 6px;
  font-size: 1.02rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.notfound__books ul {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

.notfound__books li + li::before {
  content: "·";
  margin: 0 0.6em;
  color: var(--muted);
}

.notfound__books a {
  font-style: italic;
  text-underline-offset: 3px;
}

.notfound__books span {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.page-footer {
  position: relative;
  z-index: 2;
  padding: clamp(56px, 9vh, 90px) var(--gutter) 34px var(--mx);
  background: var(--night);
  color: var(--on-night);
}

.page-footer a {
  text-decoration: none;
}

.page-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 36px;
  max-width: 1180px;
}

.page-footer__name {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
}

.page-footer__role {
  font-style: italic;
  color: var(--on-night-muted);
}

.page-footer__label {
  margin-bottom: 6px;
  font-size: 1.02rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--on-night-muted);
}

.page-footer__books {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 20px;
  padding: 0;
  list-style: none;
}

.page-footer__books a,
.page-footer__bottom a {
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.35s ease;
}

.page-footer__books a:hover,
.page-footer__books a:focus-visible,
.page-footer__bottom a:hover,
.page-footer__bottom a:focus-visible {
  text-decoration-color: currentColor;
}

.page-footer__social {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.page-footer .link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.12rem;
}

.page-footer .link__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-night);
  border-radius: 50%;
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease);
}

.page-footer .link__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-footer .link__icon--facebook svg {
  fill: currentColor;
  stroke: none;
}

.page-footer .link:hover .link__icon,
.page-footer .link:focus-visible .link__icon {
  border-color: var(--on-night);
  background-color: var(--on-night);
  color: var(--night);
}

.page-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  max-width: 1180px;
  margin-top: clamp(44px, 7vh, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line-night);
  font-size: 1.04rem;
  color: var(--on-night-muted);
}

.page-footer__bottom a {
  color: var(--on-night);
}

.page-footer__credit {
  font-family: var(--hand);
  font-weight: 300;
  font-size: 0.98rem;
  color: var(--on-night);
}

.smile {
  display: inline-block;
}

/* --------------------------------------------------------------------------
   Petits écrans
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .page-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .page-footer__grid > div:first-child {
    grid-column: 1 / -1;
  }

  .summary,
  .press--page {
    margin-left: 0;
  }
}

@media (max-width: 860px) {
  .brand {
    gap: 10px;
  }

  .brand__logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  :root {
    --mx: var(--gutter);
  }

  .margin-rule {
    display: none;
  }

  .book {
    grid-template-columns: minmax(0, 1fr);
  }

  .book__visual {
    position: relative;
    top: 0;
    padding: 6px 0 18px;
  }

  .book__cover {
    width: min(62vw, 260px);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1.125rem;
  }

  .page-header {
    padding-top: 14px;
    padding-bottom: 8px;
  }

  .page-nav ul {
    gap: 2px 18px;
  }

  .page-nav a {
    font-size: 1.05rem;
  }

  .book__actions .btn {
    flex: 1 1 auto;
  }

  .book__facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 0 0;
  }

  .legal dd {
    margin-bottom: 10px;
  }

  .page-footer__grid,
  .page-footer__books {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .book__cover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Passage d'une page à l'autre (mêmes règles que sur l'accueil) et
   arrivée du texte, ligne après ligne
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  .page-main > .crumbs,
  .book__body > *,
  .page-main > section,
  .page-main > .legal > * {
    animation: page-rise 0.85s var(--ease) both;
  }

  .book__body > :nth-child(2) {
    animation-delay: 0.06s;
  }

  .book__body > :nth-child(3) {
    animation-delay: 0.12s;
  }

  .book__body > :nth-child(4) {
    animation-delay: 0.18s;
  }

  .book__body > :nth-child(5) {
    animation-delay: 0.24s;
  }

  .book__body > :nth-child(n + 6),
  .page-main > section {
    animation-delay: 0.3s;
  }
}

@keyframes page-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

::view-transition-old(root) {
  animation: vt-out 0.3s cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: vt-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

::view-transition-group(livre-cover) {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

::view-transition-group(marque) {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

.brand {
  view-transition-name: marque;
}

.book__cover {
  view-transition-name: livre-cover;
}
