/* ───────────────────────── Polices ───────────────────────── */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('../fonts/eb-garamond.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('../fonts/eb-garamond-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ───────────────────────── Base ───────────────────────── */
:root {
  --navy: #0d1b5e;
  --navy-deep: #060c2c;
  --blue: #1a3bb0;
  --gold: #b07f45;
  --gold-ink: #8a5f2a; /* or lisible en texte sur fond crème (contraste 4,9) */
  --gold-light: #e1b879;
  --paper: #f5efe3;
  --page: #f7f2e7;
  --ink: #1d1b1f;
  --muted: #6d6556;
  --line: rgba(29, 27, 31, 0.12);
  --line-strong: rgba(29, 27, 31, 0.22);
  --serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --header-h: 79px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: none;
}

/* ───────────────────────── Boutons ───────────────────────── */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font: 600 0.95rem/1.2 var(--sans);
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s, box-shadow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.2s;
}
.btn:active {
  transform: scale(0.985);
}
.btn--primary {
  background: var(--navy);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 24px -12px rgba(13, 27, 94, 0.85);
}
.btn--primary:hover {
  background: #15287d;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 30px -14px rgba(13, 27, 94, 0.9);
}
.btn--outline {
  background: transparent;
  color: var(--navy);
  box-shadow: inset 0 0 0 1.5px var(--navy);
}
.btn--outline:hover {
  background: rgba(13, 27, 94, 0.06);
  transform: translateY(-2px);
}
.btn--gold {
  background: linear-gradient(135deg, #e4bd7f, #b8864b);
  color: #1b1206;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
}
.btn--gold:hover {
  background: linear-gradient(135deg, #ecc88d, #c18f53);
}
.btn--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.85rem;
}
.btn--block {
  width: 100%;
  flex-direction: column;
  gap: 3px;
  padding: 15px 22px;
  font-size: 1rem;
}
.btn__total {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.78;
}

.link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.icon-button {
  appearance: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.icon-button:hover {
  background: rgba(0, 0, 0, 0.06);
}
.icon-button svg {
  width: 22px;
  height: 22px;
}

/* ───────────────────────── En-tête ─────────────────────────
   L'en-tête Piranda Institute est dans site-header.css ; --header-h suit sa
   hauteur réelle (site-header.js). Valeurs ci-dessous : avant le script. */
@media (max-width: 1180px) {
  :root {
    --header-h: 124px;
  }
}
@media (max-width: 760px) {
  :root {
    --header-h: 65px;
  }
}

/* Panier de l'en-tête : animation à l'arrivée de l'avion (base dans site-header.css) */
.cart-button {
  position: relative;
  appearance: none;
  border: 0;
  padding: 8px clamp(10px, 1.3vw, 16px);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.cart-button:hover {
  background: rgba(0, 0, 0, 0.06);
}
.cart-icon {
  position: relative;
  display: grid;
  place-items: center;
}
.cart-icon svg {
  width: 22px;
  height: 22px;
}
.cart-button__count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #0d0d0f;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
}
.cart-button.is-bumped {
  animation: bump 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.cart-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid var(--gold);
  opacity: 0;
  pointer-events: none;
}
.cart-button.is-bumped::after {
  animation: cart-ring 0.7s ease-out;
}
.cart-button.is-bumped .cart-button__count {
  animation: count-pop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes bump {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.18) rotate(-4deg);
  }
  55% {
    transform: scale(0.96) rotate(2deg);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes cart-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}
@keyframes count-pop {
  0% {
    transform: scale(0.3);
  }
  60% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}


/* ───────────────────────── Ouverture : le livre sur une page de cahier ───────────────────────── */
.hero {
  --u: min(1vw, 1.6vh); /* unité de taille des décors : suit la plus petite dimension */
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background-color: #fff;
  background-image: linear-gradient(to bottom, transparent calc(100% - 1px), rgba(86, 126, 205, 0.24) 0);
  background-size: 100% 36px;
  background-position: 0 14px;
}
/* les lignes s'effacent autour du livre pour le mettre en valeur */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 54% at 50% 50%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.hero__skip {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 3.4vh, 32px);
  z-index: 3;
  transform: translateX(-50%);
  padding: 10px 18px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0d0d0f;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s;
}
.hero__skip:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.5);
}

/* Éléments posés sur la page (à droite) */
.decor {
  position: absolute;
  margin: 0;
  opacity: 0;
}
/* ils apparaissent une fois l'image décodée (voir hero.js) */
.decor.is-ready {
  opacity: 1;
  animation: decor-in 0.9s var(--ease-out) calc(var(--i, 0) * 0.14s) backwards;
}
.decor img {
  display: block;
  width: 100%;
  height: auto;
}
.decor--photo {
  --i: 0;
  --r: 3deg;
  width: calc(var(--u) * 17);
  right: 3.2vw;
  top: 11vh;
}
.decor--photo img {
  border-radius: 5% / 4%;
  box-shadow: 0 26px 44px -20px rgba(18, 28, 66, 0.45), 0 3px 8px rgba(18, 28, 66, 0.12);
}
.decor--carnet {
  --i: 1;
  --r: -3.5deg;
  width: calc(var(--u) * 14.5);
  right: 11vw;
  top: 47vh;
}
.decor--carnet img {
  border-radius: 2.2% / 1.8%;
  box-shadow: 0 24px 40px -18px rgba(18, 28, 66, 0.4), 0 3px 8px rgba(18, 28, 66, 0.12);
}
.decor--maquette {
  --i: 2;
  --r: 0deg;
  width: calc(var(--u) * 17);
  right: 1.6vw;
  bottom: 2vh;
}
@keyframes decor-in {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(var(--r, 0deg));
  }
  to {
    opacity: 1;
    transform: rotate(var(--r, 0deg));
  }
}
.decor {
  transform: rotate(var(--r, 0deg));
}

/* ── Couche animée, au-dessus de la page : livre 3D et étiquettes ── */
.book-layer {
  --bh: min(60vh, 105vw);
  --bw: calc(var(--bh) / 1.5167);
  --bt: calc(var(--bw) * 0.067);
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  perspective: 1600px;
}
.book-layer.is-live {
  opacity: 1;
}

.hero-shadow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--bw);
  height: calc(var(--bw) * 0.2);
  margin: calc(var(--bh) * 0.5 + 4vh) 0 0 calc(var(--bw) / -2);
  background: radial-gradient(closest-side, rgba(18, 28, 66, 0.36), rgba(18, 28, 66, 0));
  opacity: 0;
  will-change: transform, opacity;
}

.book3d {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: rotateX(9deg) rotateY(-24deg) rotateZ(-4deg);
  opacity: 0;
  will-change: transform;
}
.bk {
  position: absolute;
  left: calc(var(--bw) / -2);
  top: calc(var(--bh) / -2);
  width: var(--bw);
  height: var(--bh);
  transform-style: preserve-3d;
}
.bk__face {
  position: absolute;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.bk__face img {
  display: block;
  width: 100%;
  height: 100%;
}
.bk__front,
.bk__back {
  left: 0;
  top: 0;
  width: var(--bw);
  height: var(--bh);
}
.bk__front {
  transform: translateZ(calc(var(--bt) / 2));
}
.bk__back {
  transform: rotateY(180deg) translateZ(calc(var(--bt) / 2));
  background: #efeee9;
}
.bk__spine,
.bk__edge {
  left: calc((var(--bw) - var(--bt)) / 2);
  top: 0;
  width: var(--bt);
  height: var(--bh);
}
.bk__spine {
  transform: rotateY(-90deg) translateZ(calc(var(--bw) / 2));
  background: #f1efe9;
}
.bk__edge {
  transform: rotateY(90deg) translateZ(calc(var(--bw) / 2));
  background:
    linear-gradient(90deg, #0a1550 0 7%, transparent 7% 93%, #0a1550 93% 100%),
    repeating-linear-gradient(90deg, #f7f4ed 0 1.2px, #e0d9cb 1.2px 2.4px);
}
.bk__top,
.bk__bottom {
  left: 0;
  top: calc((var(--bh) - var(--bt)) / 2);
  width: var(--bw);
  height: var(--bt);
  background:
    linear-gradient(0deg, #0a1550 0 7%, transparent 7% 93%, #0a1550 93% 100%),
    repeating-linear-gradient(0deg, #f7f4ed 0 1.2px, #e0d9cb 1.2px 2.4px);
}
.bk__top {
  transform: rotateX(90deg) translateZ(calc(var(--bh) / 2));
}
.bk__bottom {
  transform: rotateX(-90deg) translateZ(calc(var(--bh) / 2));
}
.bk__spine-title {
  position: absolute;
  inset: 5% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #0d1b5e;
  font: 700 calc(var(--bt) * 0.4) / 1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bk__spine-title span:last-child {
  font-weight: 500;
  opacity: 0.8;
}
/* creux de la reliure sur les couvertures */
.bk__front::after,
.bk__back::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bk__front::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.24), rgba(255, 255, 255, 0.07) 1.4%, rgba(0, 0, 0, 0.05) 3%, transparent 6%);
}
.bk__back::after {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.16), rgba(255, 255, 255, 0.05) 1.4%, rgba(0, 0, 0, 0.04) 3%, transparent 6%);
}
.bk__shade,
.bk__sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}
.bk__shade {
  background: #0a1030;
}
.bk__sheen {
  background: linear-gradient(112deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0) 68%) 50% 0 / 260% 100%;
}

/* ── Étiquettes « curseur » qui se promènent toutes seules ── */
.tags {
  position: absolute;
  inset: 0;
}
.tags--behind {
  z-index: 1;
}
.hero-shadow {
  z-index: 2;
}
.book3d {
  z-index: 3;
}
.tags--front {
  z-index: 4;
}
.tag {
  --c: #d62fc9;
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  animation: tag-wander var(--dur, 26s) ease-in-out var(--delay, 0s) infinite alternate both;
}
.tag__in {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
}
.is-live .tag__in {
  animation: tag-in 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.15) calc(0.6s + var(--i, 0) * 0.16s) both;
}
.tag__cursor {
  width: 22px;
  height: 22px;
  color: var(--c);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}
.tag__label {
  margin: -3px 0 0 13px;
  padding: 5px 12px 6px;
  border-radius: 8px;
  background: var(--c);
  color: #fff;
  font: 600 clamp(12px, 1.05vw, 16px) / 1.15 var(--sans);
  letter-spacing: 0.005em;
  white-space: nowrap;
  box-shadow: 0 8px 16px -8px var(--c);
}
/* tags:start (trajets des étiquettes : x, y en vw / vh) */
.tag--1 { --c: #7c4dff; --x0:8; --y0:22; --x1:24; --y1:14; --x2:14; --y2:38; --x3:28; --y3:30; --dur: 27s; --delay: -4s; --i: 0; }
.tag--2 { --c: #e11d48; --x0:12; --y0:70; --x1:26; --y1:62; --x2:6; --y2:52; --x3:22; --y3:78; --dur: 31s; --delay: -11s; --i: 1; }
.tag--3 { --c: #2f6bff; --x0:64; --y0:11; --x1:70; --y1:17; --x2:58; --y2:8; --x3:66; --y3:24; --dur: 29s; --delay: -17s; --i: 2; }
.tag--4 { --c: #ea580c; --x0:28; --y0:45; --x1:50; --y1:55; --x2:70; --y2:40; --x3:44; --y3:30; --dur: 34s; --delay: -7s; --i: 3; }
.tag--5 { --c: #0d9488; --x0:64; --y0:74; --x1:44; --y1:84; --x2:22; --y2:66; --x3:52; --y3:72; --dur: 36s; --delay: -22s; --i: 4; }
.tag--6 { --c: #d62fc9; --x0:30; --y0:86; --x1:40; --y1:90; --x2:20; --y2:80; --x3:34; --y3:72; --dur: 25s; --delay: -13s; --i: 5; }
.tag--7 { --c: #16a34a; --x0:80; --y0:60; --x1:68; --y1:48; --x2:90; --y2:72; --x3:74; --y3:84; --dur: 33s; --delay: -2s; --i: 6; }
.tag--8 { --c: #0b1a5c; --x0:20; --y0:14; --x1:32; --y1:20; --x2:10; --y2:28; --x3:26; --y3:10; --dur: 28s; --delay: -19s; --i: 7; }
.tag--9 { --c: #b07f45; --x0:46; --y0:12; --x1:62; --y1:20; --x2:40; --y2:8; --x3:56; --y3:24; --dur: 30s; --delay: -9s; --i: 8; }
/* tags:end */
@keyframes tag-wander {
  0%,
  10% {
    transform: translate3d(calc(var(--x0) * 1vw), calc(var(--y0) * 1vh), 0);
  }
  28%,
  40% {
    transform: translate3d(calc(var(--x1) * 1vw), calc(var(--y1) * 1vh), 0);
  }
  58%,
  68% {
    transform: translate3d(calc(var(--x2) * 1vw), calc(var(--y2) * 1vh), 0);
  }
  86%,
  100% {
    transform: translate3d(calc(var(--x3) * 1vw), calc(var(--y3) * 1vh), 0);
  }
}
@keyframes tag-in {
  from {
    opacity: 0;
    transform: scale(0.55) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Une fois l'ouverture jouée, la couverture de la galerie remplace le livre 3D */
html.has-hero:not(.intro-done) [data-book-target] {
  visibility: hidden;
}
html.has-hero:not(.intro-done) .product {
  border-radius: 28px 28px 0 0;
}
html.is-descending .product {
  box-shadow: 0 -24px 60px rgba(18, 28, 66, 0.14);
}

/* Écrans en hauteur : seule la photo reste, en bas à droite */
@media (max-aspect-ratio: 9/10) {
  .decor--photo {
    width: 27vw;
    right: 4vw;
    top: calc(var(--header-h) + 18px);
  }
  .decor--carnet,
  .decor--maquette {
    display: none;
  }
  .tag--m-hide {
    display: none;
  }
}

/* ───────────────────────── Fiche du livre ───────────────────────── */
.product {
  position: relative;
  z-index: 20;
  padding: calc(var(--header-h) + 28px) clamp(16px, 4vw, 56px) clamp(64px, 10vh, 120px);
  background: var(--paper);
}

.product__top {
  --gallery-h: clamp(380px, calc(100vh - var(--header-h) - 150px), 620px);
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 4.5vw, 72px);
  align-items: center;
}
.product__buy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Description, à l'horizontale sous l'achat */
.product__about,
.product__more {
  max-width: 1240px;
  margin: clamp(56px, 8vh, 96px) auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.6;
  color: #2c2924;
}
.product__more {
  margin-top: clamp(40px, 6vh, 64px);
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}
.about-card {
  min-width: 0;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.about-card p {
  margin: 0 0 1em;
}
.about-card > .h-section:first-child {
  margin-top: 0;
}

/* Effet verre (façon « liquid glass », très léger) */
.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.25),
    0 14px 34px -16px rgba(40, 30, 15, 0.3),
    0 2px 6px rgba(40, 30, 15, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
}

/* Galerie : les livres flottent sur la page, sans cadre ni fond */
.gallery__viewport {
  position: relative;
  height: var(--gallery-h);
}
.gallery__track {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar {
  display: none;
}
.gallery__slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.gallery__zoom {
  appearance: none;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: none;
  cursor: zoom-in;
}
.gallery__zoom img {
  width: 100%;
  height: 100%;
  padding: 4% 7% 13%; /* place sous le livre pour son ombre */
  object-fit: contain;
  filter: drop-shadow(0 16px 16px rgba(40, 26, 10, 0.22)) drop-shadow(0 3px 5px rgba(40, 26, 10, 0.1));
}
/* le livre en perspective a déjà son ombre */
.gallery__zoom img.has-shadow {
  filter: none;
}
.gallery__next {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--navy);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}
.gallery__next:hover {
  transform: scale(1.07);
}
.gallery__next:active {
  transform: scale(0.96);
}
.gallery__next svg {
  width: 22px;
  height: 22px;
}

/* Bouton des agrandissements (photo plein écran) */
.gallery__arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 248, 0.92);
  color: var(--navy);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.gallery__arrow:hover {
  transform: scale(1.06);
}
.gallery__arrow svg {
  width: 22px;
  height: 22px;
}
.gallery__arrow--prev {
  left: 14px;
}
.gallery__arrow--next {
  right: 14px;
}

/* Miniatures : au milieu, dans une pastille de verre qui flotte */
.gallery__thumbs {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin: 14px auto 0;
  padding: 6px;
  border-radius: 20px;
}
.gallery__thumb {
  flex: none;
  width: 56px;
  height: 56px;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(40, 26, 10, 0.22));
}
.gallery__thumb img.has-shadow {
  filter: none;
}
.gallery__thumb:hover {
  opacity: 0.85;
}
.gallery__thumb[aria-current='true'] {
  opacity: 1;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), 0 4px 12px -6px rgba(40, 30, 15, 0.35);
}

/* Bloc d'achat */
.buybox {
  scroll-margin-top: calc(var(--header-h) + 20px);
  padding: 22px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdf8;
  box-shadow: 0 24px 48px -32px rgba(40, 24, 8, 0.45);
}
.buybox__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.buybox__price {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.buybox__price-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.buybox__facts {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}
.buybox__facts li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.buybox__facts svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--gold);
}
.buybox__rates {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f4eee2;
  font-size: 0.82rem;
}
.buybox__rates table {
  width: 100%;
  border-collapse: collapse;
}
.buybox__rates th,
.buybox__rates td {
  padding: 6px 4px;
  text-align: left;
}
.buybox__rates th {
  font-weight: 500;
  color: var(--muted);
}
.buybox__rates td + td,
.buybox__rates th + th {
  text-align: right;
  white-space: nowrap;
}
.buybox__rates tbody tr + tr td {
  border-top: 1px solid var(--line);
}
.rate__note {
  margin: 8px 0 2px;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--muted);
}
.rate__detail {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}
.buybox__actions {
  display: flex;
  gap: 10px;
  margin: 18px 0 10px;
}
.buybox__actions .btn {
  flex: 1;
}
.buybox__alt {
  margin: 12px 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: var(--muted);
}

.qty {
  display: inline-flex;
  align-items: center;
  flex: none;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.qty__btn {
  appearance: none;
  border: 0;
  width: 40px;
  height: 46px;
  background: none;
  color: var(--navy);
  font-size: 1.2rem;
  cursor: pointer;
}
.qty__btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.qty__input {
  width: 2.2em;
  border: 0;
  background: none;
  font: 600 1rem var(--sans);
  text-align: center;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty--small .qty__btn {
  width: 32px;
  height: 34px;
  font-size: 1rem;
}

/* Titre et description */
.product__intro p {
  margin: 0;
}
.kicker {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.product .kicker {
  margin-bottom: 18px;
}
.product__title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.2rem, 3.6vw, 3.3rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.product .product__subtitle {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.4;
  color: var(--gold-ink);
}
.product .product__author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 28px;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.product__author::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.product .product__lead {
  font-size: 1.55rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--navy);
}
.questions {
  margin: 28px 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--gold);
  list-style: none;
  font-style: italic;
  color: var(--navy);
}
.questions li + li {
  margin-top: 8px;
}
.h-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 46px 0 18px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.h-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.maxims {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.maxims li {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  font-size: 1.12rem;
  font-style: italic;
  color: var(--navy);
}
.product .pull {
  margin: 30px 0 0;
  padding: 22px 8px;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  font-size: 1.38rem;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
  color: var(--navy);
}
.author {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
}
.product .author__badge {
  width: 96px;
  height: 96px;
  overflow: hidden;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, #2143bf, #0b1a5c 60%, #060c2c);
  font-family: var(--sans);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(225, 184, 121, 0.4);
}
.author__badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
}
.product .author__badge.has-photo {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold), 0 12px 24px -12px rgba(30, 20, 10, 0.5);
}
.product .author__name {
  margin: 4px 0 6px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.92rem;
}
.specs div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.specs dt {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs dd {
  margin: 3px 0 0;
}

@media (max-width: 1080px) {
  .product__about {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-card--lead {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .product__top,
  .product__more,
  .product__about {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .gallery__viewport {
    height: auto;
    aspect-ratio: 1 / 1.08;
  }
  .product__about,
  .product__more {
    margin-top: 48px;
  }
}
@media (max-width: 480px) {
  .buybox {
    padding: 18px 16px;
  }
  .buybox__actions {
    flex-wrap: wrap;
  }
  .specs {
    grid-template-columns: minmax(0, 1fr);
  }
  .author {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
  }
  .product .author__badge {
    width: 72px;
    height: 72px;
    font-size: 1rem;
  }
}

/* ───────────────────────── Pied de page ───────────────────────── */
.footer {
  position: relative;
  overflow: hidden;
  padding: 64px clamp(16px, 4vw, 56px) 40px;
  background: radial-gradient(120% 140% at 20% 0%, #1a35a6 0%, #0b1a5c 45%, #050a26 100%);
  color: #e9e4f0;
}
.footer__lines {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 180px;
  opacity: 0.6;
}
.footer__lines path {
  fill: none;
  stroke: #c3914f;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.footer__inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 40px;
  align-items: end;
}
.footer__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer__subtitle {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--gold-light);
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 0.9rem;
}
.footer__nav a {
  text-decoration: none;
  opacity: 0.85;
}
.footer__nav a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
}
.footer__legal span {
  opacity: 0.65;
  margin-right: auto;
}
.footer__legal a {
  opacity: 0.8;
  text-decoration: none;
}
.footer__legal a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 680px) {
  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ───────────────────────── Pages éditoriales (le livre, l'auteur) ───────────────────────── */
.more-link {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.more-link::after {
  content: ' →';
  color: var(--gold);
}
.more-link:hover {
  border-bottom-color: var(--navy);
}

.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 28px) clamp(16px, 4vw, 48px) clamp(64px, 10vh, 112px);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(24px, 4vh, 44px);
  font-size: 0.82rem;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb [aria-current] {
  color: var(--ink);
}
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.page-hero__cover {
  margin: 0;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 24px;
  background:
    radial-gradient(90% 70% at 50% 35%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #ece4d4, #ddd1bb);
}
.page-hero__cover img {
  width: min(100%, 340px);
  height: auto;
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: -6px 14px 30px -10px rgba(30, 18, 6, 0.55), -1px 2px 4px rgba(30, 18, 6, 0.3);
}
.page-hero__text h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.page-hero__sub {
  margin: 14px 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.4;
  color: var(--gold-ink);
}
.page-hero__lead {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--navy);
}
.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 30px;
}
.page-hero__meta {
  font-size: 0.88rem;
  color: var(--muted);
}
.page-hero--author {
  grid-template-columns: auto minmax(0, 1fr);
}
.page-hero__portrait {
  margin: 0;
}
.author-mono {
  width: clamp(140px, 18vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, #2143bf, #0b1a5c 60%, #060c2c);
  color: var(--gold-light);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: 0.06em;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--gold), 0 30px 50px -24px rgba(30, 20, 10, 0.6);
}

.page-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(48px, 8vh, 88px);
}
.prose {
  max-width: 720px;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.68;
  color: #2c2924;
}
.prose section + section {
  margin-top: 44px;
}
.prose h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
}
.prose h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.prose p {
  margin: 0 0 1em;
}
.prose a:not(.more-link) {
  color: var(--navy);
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.prose__lead {
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.38;
  color: var(--navy);
}
.maxim-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.maxim-list li {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  font-style: italic;
  color: var(--navy);
}
.back-cover {
  margin: 0;
  padding: clamp(22px, 3vw, 34px);
  border-left: 3px solid var(--gold);
  border-radius: 0 16px 16px 0;
  background: #fffdf8;
  box-shadow: 0 24px 48px -36px rgba(40, 24, 8, 0.45);
}
.back-cover p:last-child {
  margin-bottom: 0;
}
.back-cover__head {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--ink);
}
.back-cover__head em {
  font-style: normal;
  color: var(--gold-ink);
}
.prose .specs {
  font-size: 0.92rem;
}

.page-cta {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdf8;
  box-shadow: 0 24px 48px -32px rgba(40, 24, 8, 0.45);
}
.page-cta img {
  width: 110px;
  height: auto;
  border-radius: 2px;
  box-shadow: -4px 10px 20px -8px rgba(30, 18, 6, 0.5);
}
.page-cta__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--navy);
}
.page-cta__text {
  margin: 6px 0 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}
.page-cta__actions {
  display: grid;
  gap: 10px;
}

.not-found {
  max-width: 620px;
  margin: 8vh auto 0;
  text-align: center;
}
.not-found h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--navy);
}
.not-found p {
  color: var(--muted);
}
.not-found .page-hero__actions {
  justify-content: center;
}

@media (max-width: 900px) {
  .page-hero,
  .page-hero--author,
  .page-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-hero__cover img {
    width: min(70%, 280px);
  }
  .page-cta {
    position: static;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }
  .page-cta img {
    width: 84px;
  }
}

/* Questions fréquentes (accueil) */
.faq {
  max-width: 1240px;
  margin: clamp(48px, 8vh, 88px) auto 0;
}
.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__item summary {
  position: relative;
  padding: 20px 44px 20px 0;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--navy);
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__item summary::after {
  content: '+';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gold);
  transition: transform 0.25s var(--ease-out);
}
.faq__item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.faq__item p {
  max-width: 820px;
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.62;
  color: #2c2924;
}

/* Photo de l'auteur (page /bruno-piranda) */
.author-photo {
  display: block;
  width: clamp(150px, 19vw, 240px);
  height: auto;
  border-radius: 5% / 4%;
  box-shadow: 0 26px 44px -20px rgba(18, 28, 66, 0.45), 0 3px 8px rgba(18, 28, 66, 0.12);
}

/* Page Contact */
.contact {
  max-width: 980px;
  margin: 0 auto;
}
.contact__head h1 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.contact__lead {
  max-width: 640px;
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.5;
  color: #2c2924;
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(32px, 6vh, 56px);
}
.contact-card,
.contact-form {
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdf8;
  box-shadow: 0 24px 48px -36px rgba(40, 24, 8, 0.45);
}
.contact-card h2,
.contact-form h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
}
.contact-card h2:not(:first-child) {
  margin-top: 26px;
}
.contact-card__mail {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  overflow-wrap: anywhere;
}
.contact-card__mail a {
  color: var(--navy);
}
.contact-card__note {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}
.contact-card__note a {
  color: var(--navy);
}
.contact-form .btn {
  margin-top: 4px;
}
.contact-form__error {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fbe9e7;
  color: #8c1d18;
  font-size: 0.88rem;
}
.contact-form__note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
@media (max-width: 820px) {
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ───────────────────────── Pages légales ───────────────────────── */
.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 52px) clamp(16px, 4vw, 40px) 88px;
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.65;
  color: #2c2924;
}
.legal h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--navy);
}
.legal h2 {
  margin: 44px 0 14px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
}
.legal p,
.legal li {
  margin: 0 0 0.8em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal a {
  color: var(--navy);
}
.legal__updated {
  margin-top: 10px !important;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}
.legal__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 8px;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.legal__nav a {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
}
.legal__nav a:hover {
  border-color: var(--navy);
}
.legal__nav a[aria-current='page'] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.identity {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 22px;
  margin: 0 0 1em;
  padding: 18px 20px;
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.identity dt {
  color: var(--muted);
}
.identity dd {
  margin: 0;
}
.legal__box {
  margin: 0 0 1em;
  padding: 20px 22px 8px;
  border: 1px solid rgba(176, 127, 69, 0.55);
  border-radius: 14px;
  background: #fffdf8;
}
.legal__form p {
  margin-bottom: 0.9em;
}
.legal__table {
  overflow-x: auto;
  margin: 0 0 1em;
}
.legal__table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.legal__table th,
.legal__table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.legal__table th {
  font-weight: 500;
  color: var(--muted);
}
.todo {
  padding: 1px 6px;
  border-radius: 5px;
  background: #fbecc0;
  font-family: var(--sans);
  font-size: 0.86em;
  color: #6b4e00;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .identity {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .identity dd {
    margin-bottom: 8px;
  }
}

/* ───────────────────────── Panier, commande, agrandissement ───────────────────────── */
dialog {
  padding: 0;
  border: 0;
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(12, 8, 4, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
body:has(dialog[open]) {
  overflow: hidden;
}

.drawer {
  width: min(440px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  background: var(--paper);
}
.drawer[open] {
  animation: drawer-in 0.38s var(--ease-out);
}
@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
}
.drawer__panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.drawer__header,
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px 24px;
  border-bottom: 1px solid var(--line);
}
.drawer__header h2,
.modal__header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.drawer__footer {
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
  background: #fffdf8;
}
.drawer__footer:empty {
  display: none;
}

.cart-empty {
  padding: 48px 8px;
  text-align: center;
  color: var(--muted);
}
.cart-empty p {
  margin: 0 0 20px;
}
.cart-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.cart-line img {
  width: 72px;
  border-radius: 3px;
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.5);
}
.cart-line__title {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
}
.cart-line__meta {
  margin: 2px 0 10px;
  font-size: 0.85rem;
  color: var(--muted);
}
.cart-line__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cart-line__price {
  font-weight: 600;
}
.cart-line__remove {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.shipping-choice {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
}
.shipping-choice legend {
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.shipping-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9rem;
  cursor: pointer;
}
.shipping-option:has(input:checked) {
  box-shadow: inset 0 0 0 1.5px var(--navy);
}
.shipping-option input {
  accent-color: var(--navy);
}
.shipping-option.is-disabled,
.delivery-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.shipping-option small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.totals {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 0.92rem;
}
.totals div {
  display: flex;
  justify-content: space-between;
}
.totals dt {
  color: var(--muted);
}
.totals dd {
  margin: 0;
}
.totals .totals__grand {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 1.08rem;
  font-weight: 600;
}
.totals .totals__grand dt {
  color: var(--ink);
}
.totals__note {
  margin: 10px 0 0;
  font-size: 0.75rem;
  text-align: center;
  color: var(--muted);
}

.modal {
  width: min(880px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border-radius: 22px;
  background: var(--paper);
  overflow: auto;
}
.modal[open] {
  animation: modal-in 0.32s var(--ease-out);
}
@keyframes modal-in {
  from {
    transform: translateY(16px) scale(0.98);
    opacity: 0;
  }
}
.checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px;
  padding: 22px 24px 8px;
}
.checkout__fields {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.checkout__fields legend {
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}
.field em {
  font-style: normal;
  opacity: 0.8;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 1rem var(--sans);
  color: var(--ink);
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--navy);
}
.field select {
  appearance: none;
  padding-right: 38px;
  background: #fffdf8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236d6556' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 11px 8px;
  cursor: pointer;
}
.field input[aria-invalid='true'],
.field select[aria-invalid='true'] {
  box-shadow: inset 0 0 0 1.5px #b3261e;
}
.field__error {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #8c1d18;
}
.field__error:empty {
  display: none;
}
.field__hint {
  margin: -4px 0 4px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
}
.field--short {
  flex: 0 0 34%;
}
.field-row {
  display: flex;
  gap: 12px;
}

/* Sections du formulaire de commande */
.checkout__section {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  min-width: 0;
}

/* Modes de livraison Mondial Relay */
.delivery-options {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.delivery-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: box-shadow 0.2s, background-color 0.2s;
}
.delivery-option:hover {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.delivery-option:has(input:checked) {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--navy);
}
.delivery-option:has(input:focus-visible) {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.delivery-option input {
  margin: 0;
  accent-color: var(--navy);
}
.delivery-option__icon {
  display: grid;
  color: var(--muted);
  transition: color 0.2s;
}
.delivery-option__icon svg {
  width: 22px;
  height: 22px;
}
.delivery-option:has(input:checked) .delivery-option__icon {
  color: var(--navy);
}
.delivery-option__text {
  min-width: 0;
}
.delivery-option__name {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
.delivery-option__text small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}
.delivery-option__price {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.delivery-panel {
  animation: panel-in 0.24s var(--ease-out);
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* Point Relais */
.relay__label {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.relay__label {
  margin-bottom: 6px;
}
.relay__selected {
  margin-bottom: 4px;
}
.relay__selected:focus {
  outline: none;
}
.relay__card {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--navy);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink);
}
.relay__card p {
  margin: 0;
}
.relay__name {
  font-weight: 600;
}
.relay__meta {
  margin-top: 6px !important;
  font-size: 0.78rem;
  color: var(--muted);
}
.relay__change,
.relay__keep {
  margin: 10px 0 2px;
  font-size: 0.84rem;
}
.pr-search {
  position: relative;
  display: flex;
  gap: 8px;
}
.pr-search__field {
  position: relative;
  flex: 1;
  min-width: 0;
}
.pr-search__field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.pr-search input {
  width: 100%;
  padding: 11px 13px 11px 38px;
  border: 0;
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 1rem var(--sans);
  color: var(--ink);
}
.pr-search input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.pr-search input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--navy);
}
.pr-search input[aria-invalid='true'] {
  box-shadow: inset 0 0 0 1.5px #b3261e;
}
.pr-button {
  appearance: none;
  flex: none;
  border: 0;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font: 500 0.9rem/1.2 var(--sans);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}
.pr-button:hover {
  background: #15287d;
}
.pr-button:active {
  transform: translateY(1px);
}
.pr-button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.pr-button--small {
  padding: 8px 14px;
  font-size: 0.82rem;
}
.pr-suggestions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: 0 0 0 1px var(--line), 0 16px 32px -16px rgba(0, 0, 0, 0.35);
  list-style: none;
}
.pr-suggestion {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}
.pr-suggestion small {
  color: var(--muted);
}
.pr-suggestion:hover,
.pr-suggestion[aria-selected='true'] {
  background: rgba(13, 27, 94, 0.07);
}
.pr-message {
  margin: 8px 2px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}
.pr-message.is-error {
  color: #8c1d18;
}
.pr[aria-busy='true'] .pr-results {
  opacity: 0.55;
  transition: opacity 0.2s;
}

/* Couleurs des réseaux de Points Relais */
.pr,
.relay,
.pr-dialog {
  --mr: #96154a;
  --mr-soft: #f8e9ef;
  --chrono: #0b4f9c;
  --chrono-soft: #e7eff9;
}
.pr [hidden],
.pr-dialog [hidden] {
  display: none !important;
}

/* Carte (en couleur) et ses boutons */
.pr-stage {
  display: grid;
  gap: 10px;
}
.pr-map-wrap {
  position: relative;
}
.pr-map {
  height: 340px;
  border-radius: 14px;
  overflow: hidden;
  background: #e9eef0;
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 24px -18px rgba(0, 0, 0, 0.4);
  isolation: isolate;
}
.pr-zone,
.pr-expand {
  appearance: none;
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  font: 600 0.82rem/1.2 var(--sans);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 8px 20px -8px rgba(0, 0, 0, 0.45);
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.pr-zone svg,
.pr-expand svg {
  flex: none;
  width: 17px;
  height: 17px;
}
/* « Rechercher dans cette zone » : en haut au centre, quand on s'éloigne de la zone affichée */
.pr-zone {
  top: 12px;
  left: 50%;
  translate: -50% 0;
  padding: 9px 16px 9px 13px;
  background: var(--navy);
  color: #fff;
  white-space: nowrap;
  animation: pr-pop 0.25s var(--ease-out, ease-out);
}
.pr-zone:hover {
  background: #15287d;
}
.pr-zone:active {
  transform: translateY(1px);
}
.pr-zone:disabled {
  opacity: 0.75;
  cursor: progress;
}
@keyframes pr-pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
}
/* « Agrandir » : en haut à droite */
.pr-expand {
  top: 12px;
  right: 12px;
  padding: 8px 12px 8px 10px;
  background: #fffdf8;
  color: var(--ink);
}
.pr-expand:hover {
  background: #fff;
  box-shadow: 0 0 0 1px var(--navy), 0 8px 20px -8px rgba(0, 0, 0, 0.45);
}
.pr-zone:focus-visible,
.pr-expand:focus-visible,
.pr-icon-button:focus-visible,
.pr-filter:focus-visible,
.pr-dialog__close:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.pr-map.leaflet-container {
  font-family: var(--sans);
}
.pr-map .leaflet-control-zoom {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-strong), 0 6px 14px -8px rgba(0, 0, 0, 0.35);
}
.pr-map .leaflet-control-zoom a {
  width: 30px;
  height: 30px;
  line-height: 30px;
  color: var(--ink);
  background: #fffdf8;
}
.pr-map .leaflet-control-attribution {
  padding: 1px 6px;
  border-top-left-radius: 6px;
  background: rgba(255, 253, 248, 0.85);
  font-size: 10px;
  color: var(--muted);
}
.pr-map .leaflet-control-attribution a {
  color: var(--muted);
}

/* Repères numérotés */
.pr-marker {
  background: none;
  border: 0;
}
.pr-marker span {
  --pin: var(--navy);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #fff;
  box-shadow: inset 0 0 0 2.5px var(--pin), 0 4px 10px -4px rgba(0, 0, 0, 0.5);
  color: var(--pin);
  font: 700 12px/1 var(--sans);
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.pr-marker--mondial_relay span {
  --pin: #96154a;
}
.pr-marker--chronopost span {
  --pin: #0b4f9c;
}
.pr-marker b {
  font-weight: 700;
  transform: rotate(45deg);
}
.pr-marker:hover span {
  transform: rotate(-45deg) scale(1.12);
}
.pr-marker.is-active span,
.pr-marker:focus-visible span {
  background: var(--pin);
  color: #fff;
  transform: rotate(-45deg) scale(1.15);
}
.pr-marker:focus-visible {
  outline: none;
}

/* Bulle d'un repère */
.pr-map .leaflet-popup-content-wrapper {
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: 0 0 0 1px var(--line), 0 12px 24px -12px rgba(0, 0, 0, 0.4);
}
.pr-map .leaflet-popup-content {
  margin: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.4;
}
.pr-map .leaflet-popup-tip {
  background: #fffdf8;
}
.pr-popup p {
  margin: 0 0 8px;
  color: var(--ink);
}
.pr-popup .pr-popup__name {
  margin-bottom: 2px;
  font-weight: 600;
}
.pr-popup .pr-popup__network {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.pr-popup__distance {
  color: var(--muted);
  font-size: 0.78rem;
}
.pr-popup .pr-popup__address {
  color: var(--muted);
}

/* Liste */
.pr-list {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 340px;
  margin: 0;
  padding: 0 4px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.pr-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 12px 10px 10px;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s, background-color 0.2s;
}
.pr-item.is-active {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--navy);
}
.pr-item__main {
  appearance: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 2px;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.pr-item__main:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 8px;
}
.pr-pin {
  --pin: var(--navy);
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--pin);
  color: var(--pin);
  font-size: 0.75rem;
  font-weight: 700;
}
.pr-item--mondial_relay .pr-pin {
  --pin: var(--mr);
}
.pr-item--chronopost .pr-pin {
  --pin: var(--chrono);
}
.pr-item.is-active .pr-pin {
  background: var(--pin);
  color: #fff;
}
.pr-item:not(.is-active):hover {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.pr-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 4px;
}
.pr-item__meta .pr-item__distance {
  margin: 0;
}
/* Nom du réseau (Mondial Relay, Chronopost) */
.pr-network,
.relay__network {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.pr-network--mondial_relay,
.relay__network--mondial_relay {
  background: var(--mr-soft);
  color: var(--mr);
}
.pr-network--chronopost,
.relay__network--chronopost {
  background: var(--chrono-soft);
  color: var(--chrono);
}
.pr-empty {
  padding: 16px;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Filtre par réseau */
.pr-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.pr-filter {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 600 0.8rem/1.2 var(--sans);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.pr-filter:hover {
  box-shadow: inset 0 0 0 1px var(--navy);
}
.pr-filter[aria-pressed='true'] {
  background: var(--navy);
  box-shadow: none;
  color: #fff;
}
.pr-filter__count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(13, 27, 94, 0.08);
  font-size: 0.72rem;
  text-align: center;
}
.pr-filter[aria-pressed='true'] .pr-filter__count {
  background: rgba(255, 255, 255, 0.2);
}
.pr-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.pr-dot--mondial_relay {
  background: var(--mr);
}
.pr-dot--chronopost {
  background: var(--chrono);
}
.pr-filter[aria-pressed='true'] .pr-dot {
  box-shadow: 0 0 0 2px #fff;
}

/* « Autour de moi » */
.pr-icon-button {
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  border: 0;
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--navy);
  cursor: pointer;
  transition: box-shadow 0.2s, background-color 0.2s;
}
.pr-icon-button:hover {
  box-shadow: inset 0 0 0 1.5px var(--navy);
}
.pr-icon-button:disabled {
  cursor: progress;
  opacity: 0.6;
}
.pr-icon-button svg {
  width: 20px;
  height: 20px;
}
.pr-item__text {
  min-width: 0;
}
.pr-item__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.pr-item__address,
.pr-item__distance {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}
.pr-item__distance {
  color: var(--navy);
}
.pr-hours {
  grid-column: 1 / -1;
  margin-left: 36px;
  font-size: 0.78rem;
  color: var(--muted);
}
.pr-hours summary {
  width: max-content;
  cursor: pointer;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  list-style: none;
}
.pr-hours summary::-webkit-details-marker {
  display: none;
}
.pr-hours dl {
  display: grid;
  gap: 2px;
  margin: 6px 0 2px;
}
.pr-hours dl div {
  display: flex;
  gap: 10px;
}
.pr-hours dt {
  flex: 0 0 76px;
  color: var(--ink);
}
.pr-hours dd {
  margin: 0;
}
@media (max-width: 420px) {
  .pr-map {
    height: 270px;
  }
  .pr-expand span {
    display: none;
  }
  /* en bas de la carte : ne chevauche pas « Agrandir » */
  .pr-zone {
    top: auto;
    bottom: 26px;
    font-size: 0.78rem;
  }
  /* filtres plus compacts ; ils passent à la ligne plutôt que d'être coupés au bord */
  .pr-filter {
    padding: 5px 10px;
  }
  .pr-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .pr-item .pr-button {
    justify-self: start;
    margin-left: 36px;
  }
}
.relay > .field__error {
  margin-top: 8px;
}

/* ── Grande carte des Points Relais, au centre de l'écran ── */
.pr-dialog {
  width: min(1240px, calc(100vw - 32px));
  max-width: none;
  height: min(860px, calc(100dvh - 32px));
  max-height: none;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.pr-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 0.32s var(--ease-out);
}
.pr-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 12px 22px;
  border-bottom: 1px solid var(--line);
}
.pr-dialog__title {
  margin: 0;
  font: 600 1.15rem/1.3 var(--sans);
  color: var(--ink);
}
.pr-dialog__close {
  appearance: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s;
}
.pr-dialog__close:hover {
  background: rgba(13, 27, 94, 0.08);
}
.pr-dialog__close svg {
  width: 22px;
  height: 22px;
}
.pr-dialog__body {
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 16px 22px 22px;
}
.pr.is-expanded {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pr.is-expanded .pr-results:not([hidden]) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pr.is-expanded .pr-stage {
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
}
.pr.is-expanded .pr-map-wrap,
.pr.is-expanded .pr-map {
  height: 100%;
  min-height: 0;
}
.pr.is-expanded .pr-list {
  max-height: none;
  min-height: 0;
}
.pr.is-expanded .pr-expand {
  display: none;
}
@media (max-width: 760px) {
  .pr-dialog {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .pr-dialog__head {
    padding: 8px 8px 8px 16px;
  }
  .pr-dialog__body {
    padding: 12px 12px 14px;
  }
  .pr.is-expanded .pr-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 10px;
  }
  .pr.is-expanded .pr-message {
    margin-bottom: 8px;
  }
}
.checkout__summary {
  align-self: start;
  padding: 18px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px var(--line);
}
.checkout__summary h3 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.checkout__summary .cart-line {
  grid-template-columns: 56px minmax(0, 1fr);
  margin-bottom: 16px;
}
.checkout__summary .cart-line img {
  width: 56px;
}
.summary-delivery {
  margin: 0 0 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink);
}
.summary-delivery p {
  margin: 0;
}
.summary-delivery__label {
  margin-bottom: 4px !important;
  font-size: 0.82rem;
  color: var(--muted);
}
.summary-delivery__mode {
  margin-bottom: 4px !important;
  font-weight: 500;
}
.summary-delivery__name {
  font-weight: 600;
}
.summary-delivery__todo {
  color: var(--muted);
}
.checkout__summary label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
.checkout__summary select {
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 0.92rem var(--sans);
  color: var(--ink);
}
.checkout__terms {
  padding: 4px 24px 0;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}
.consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--navy);
}
.consent input[aria-invalid='true'] {
  outline: 2px solid #b3261e;
  outline-offset: 2px;
}
.consent a,
.checkout__privacy a {
  color: var(--navy);
}
.checkout__privacy {
  margin: 8px 0 12px 28px;
  font-size: 0.78rem;
  color: var(--muted);
}
.checkout__error {
  margin: 0 24px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fbe9e7;
  color: #8c1d18;
  font-size: 0.88rem;
}
.modal__footer {
  padding: 14px 24px 24px;
}
.checkout__note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  text-align: center;
  color: var(--muted);
}
.checkout__done {
  padding: 48px 32px 40px;
  text-align: center;
}
.checkout__done svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  color: var(--gold);
}
.checkout__done h2 {
  margin: 0 0 10px;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--navy);
}
.checkout__done p {
  max-width: 460px;
  margin: 0 auto 24px;
  color: var(--muted);
  line-height: 1.55;
}
/* Retour du paiement : vérification en cours, puis confirmé ou non abouti */
.checkout__spinner {
  display: none;
  width: 44px;
  height: 44px;
  margin: 6px auto 18px;
  border: 2px solid rgba(176, 127, 69, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: checkout-spin 0.9s linear infinite;
}
@keyframes checkout-spin {
  to {
    transform: rotate(360deg);
  }
}
.checkout__done.is-waiting .checkout__spinner {
  display: block;
}
.checkout__done.is-waiting .checkout__done-icon,
.checkout__done.is-failed .checkout__done-icon {
  display: none;
}
.checkout__done p.checkout__tracking {
  margin-top: -12px;
  color: var(--navy);
}
.checkout__tracking a {
  color: inherit;
  text-underline-offset: 3px;
}
.checkout__done-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.checkout__done [hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .checkout__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .checkout__summary {
    order: -1;
  }
  .field-row {
    flex-direction: column;
    gap: 0;
  }
}

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  background: rgba(10, 10, 14, 0.95);
}
.lightbox img {
  width: 100%;
  height: 100%;
  padding: clamp(16px, 5vw, 64px);
  object-fit: contain;
}
.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #fff;
}
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.has-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 20px;
  white-space: nowrap;
}
.toast.has-action.is-visible {
  pointer-events: auto;
}
.toast__action {
  appearance: none;
  border: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--gold-light);
  color: #1b1206;
  font: 500 0.85rem var(--sans);
  cursor: pointer;
}

/* Avion de papier (ajout au panier) */
.avion-canvas {
  position: fixed;
  inset: 0;
  z-index: 45;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* ───────────────────────── Mouvement réduit ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .gallery__track {
    scroll-behavior: auto;
  }
  .drawer[open],
  .modal[open],
  .pr-dialog[open],
  .pr-zone,
  .delivery-panel,
  .pr-marker span,
  .cart-button.is-bumped,
  .cart-button.is-bumped::after,
  .cart-button.is-bumped .cart-button__count {
    animation: none;
  }
  .checkout__spinner {
    animation-duration: 2.4s;
  }
}

/* ───────────────────────── Pages de contenu : pied de page en bas de l'écran ───────────────────────── */
body.content-page,
body.legal-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.content-page > main,
body.legal-page > main {
  flex: 1 0 auto;
  width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
