@import url("../fonts/fonts.css");

:root {
  --ink: #1a1614;
  --ink-soft: #3d3530;
  --paper: #f7f3ee;
  --paper-2: #efe8df;
  --paper-3: #e7ddd0;
  --burgundy: #8b1525;
  --burgundy-deep: #5c0e18;
  --brass: #b08d57;
  --line: rgba(26, 22, 20, 0.12);
  --shadow: 0 24px 60px rgba(26, 22, 20, 0.18);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --wrap: min(1120px, calc(100% - 2.5rem));
  --header-h: 5rem;
  --header-h-compact: 3.4rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  /* auto : le défilement « smooth » empêche le navigateur de retrouver
     la position au retour arrière (la liste se rouvre en haut). */
  scroll-behavior: auto;
  height: 100%;
  /* Texture de fond — couvre toute la hauteur de page */
  background-image: url('../img/back-BISTER.jpg');
  background-repeat: repeat;
  background-size: auto;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  /* Voiles de couleur sur la texture */
  background:
    radial-gradient(1400px 700px at 8% -8%, rgba(176, 141, 87, 0.18), transparent 52%),
    radial-gradient(1000px 600px at 100% 0%, rgba(139, 21, 37, 0.10), transparent 48%),
    rgba(247, 243, 238, 0.55);
}

main {
  flex: 1 0 auto;
  width: 100%;
}

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

a {
  color: var(--burgundy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--burgundy-deep);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus,
.skip:focus-visible {
  left: 0.5rem;
  top: 0.5rem;
  outline: 3px solid #8a3a12;
  outline-offset: 2px;
}

:focus-visible {
  outline: 3px solid #8a3a12;
  outline-offset: 2px;
}

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

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.narrow {
  max-width: 40rem;
}

.muted {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.meta {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(250, 247, 242, 0.92);
  border-bottom: 1px solid transparent;
  transition:
    background 0.28s var(--ease),
    border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.site-header.is-compact {
  background: rgba(247, 243, 238, 0.97);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 28px rgba(26, 22, 20, 0.08);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: min-height 0.28s var(--ease);
}

.site-header.is-compact .header-inner {
  min-height: var(--header-h-compact);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  width: auto;
  height: 3.15rem;
  max-height: 3.15rem;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 2px 6px rgba(26, 22, 20, 0.22));
  transition: height 0.28s var(--ease), filter 0.28s var(--ease);
}

.logo:hover .logo-img {
  filter: drop-shadow(0 3px 8px rgba(26, 22, 20, 0.3));
}

.site-header.is-compact .logo-img {
  height: 2.25rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--burgundy);
}

.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-cta,
.nav-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    transform 0.25s var(--ease),
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}

.nav-contact {
  background: var(--burgundy);
  color: #fff !important;
  border: 1px solid var(--burgundy);
}

.nav-contact:hover,
.nav-contact[aria-current="page"] {
  background: var(--burgundy-deep);
  border-color: var(--burgundy-deep);
  color: #fff !important;
  transform: translateY(-1px);
}

.site-header.is-compact .nav-contact {
  padding: 0.5rem 0.95rem;
}

.nav-cta {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft) !important;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 0.35rem;
}

.nav-cta:hover,
.nav-cta[aria-current="page"] {
  color: var(--burgundy) !important;
  border-color: rgba(139, 21, 37, 0.35);
}

.cart-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--burgundy);
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

@keyframes cart-badge-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  65% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.cart-badge.is-bump {
  animation: cart-badge-pop 0.55s var(--ease);
}

.nav-open {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.8rem;
  border-radius: 0.4rem;
  font: inherit;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(26, 22, 20, 0.78) 10%, rgba(26, 22, 20, 0.42) 48%, rgba(92, 14, 24, 0.55) 100%);
  pointer-events: none;
}

.hero-fallback {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(120deg, rgba(26, 22, 20, 0.72) 12%, rgba(26, 22, 20, 0.35) 48%, rgba(92, 14, 24, 0.55) 100%),
    linear-gradient(160deg, #2a2220 0%, #4a1a22 42%, #1c1816 100%);
  background-size: cover;
  transform: scale(1.04);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero-compact {
  min-height: min(78vh, 700px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 5rem 0 4rem;
  max-width: 38rem;
  margin-left: max(1.25rem, calc((100% - min(1120px, calc(100% - 2.5rem))) / 2));
  margin-right: auto;
  animation: riseIn 1s var(--ease) both;
}

.brand-lockup {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.55rem, 6.2vw, 4.15rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: #e6c992;
}

.lead {
  margin: 0 0 1.75rem;
  font-size: 1.2rem;
  font-weight: 300;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.9);
}

.lead-inline {
  font-size: 1.08rem;
  font-weight: 300;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border-radius: 0.35rem;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #fff;
  color: var(--burgundy-deep);
}

.btn-primary:hover {
  background: var(--paper);
  color: var(--burgundy-deep);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-ghost:hover {
  border-color: #fff;
  color: #fff;
}

.btn-ghost-dark {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.btn-light {
  background: #fff;
  color: var(--burgundy-deep);
}

.btn-dark {
  background: var(--burgundy);
  color: #fff;
}

.btn-dark:hover {
  background: var(--burgundy-deep);
  color: #fff;
}

.section {
  padding: clamp(1.25rem, 3vw, 2.25rem) 0;
}

.page-ouvrages .section,
.page-panier .section,
.page-contact .section,
.page-commande .section,
.page-merci .section,
.page-ouvrage .section {
  padding-top: 1rem;
  padding-bottom: 1.25rem;
}

.section-contact {
  padding-top: 1rem;
}

.section-tint {
  background:
    linear-gradient(180deg, rgba(231, 221, 208, 0.95) 0%, rgba(239, 232, 223, 0.55) 55%, rgba(247, 243, 238, 0.15) 100%);
}

.section-band {
  position: relative;
}

.section-band--warm {
  background: var(--paper-2);
}

.section-band--ink {
  background: linear-gradient(135deg, var(--burgundy-deep) 0%, var(--burgundy) 55%, #7a2430 100%);
  color: #fff;
}

.band-contact {
  padding: 1.35rem 0;
  background: linear-gradient(120deg, var(--burgundy-deep), var(--burgundy) 48%, #9a2a38);
  color: #fff;
}

.band-contact .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.band-contact-copy {
  margin: 0;
  max-width: 36rem;
}

.band-contact-title {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
}

.band-contact-text {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.88);
}

.band-contact .btn-light {
  flex-shrink: 0;
}

body[data-page="home"] #selection.section {
  padding-top: 2rem;
  padding-bottom: 1.25rem;
}

body[data-page="home"] main {
  flex-grow: 0;
}

body[data-page="home"] .home-catalog-cta {
  margin: 1rem 0 0;
  padding: 0;
}

body[data-page="home"] .band-contact {
  margin-top: 0.35rem;
}

body[data-page="home"] .site-footer {
  margin-top: 0;
}

.section-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.15rem);
  font-weight: 600;
  line-height: 1.12;
}

.detail-main h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: var(--burgundy);
  overflow-wrap: anywhere;
}

.section-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 300;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 36rem;
}

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.pillars li {
  padding: 1.1rem 1.2rem;
  border-left: 3px solid var(--burgundy);
  background: rgba(255, 255, 255, 0.55);
}

.pillars strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.pillars span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.book-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem 1.25rem;
  align-items: stretch;
}

.book {
  display: grid;
  grid-template-rows: auto auto auto auto;
  grid-row: span 4;
  row-gap: 0.45rem;
  min-width: 0;
  align-content: start;
}

@supports (grid-template-rows: subgrid) {
  .book {
    grid-template-rows: subgrid;
  }
}

.book .vignette--feature {
  grid-row: 1;
  margin-bottom: 0;
  width: 100%;
  justify-self: stretch;
}

.book h3 {
  grid-row: 2;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  align-self: start;
}

.book h3,
.book h3 a {
  color: var(--burgundy);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.book h3 a:hover {
  color: var(--burgundy-deep);
}

.book .authors {
  grid-row: 3;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: left;
  align-self: start;
  justify-self: stretch;
}

.book .price {
  grid-row: 4;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-align: right;
  justify-self: end;
  align-self: end;
  white-space: nowrap;
}

.book p {
  margin: 0 0 0.45rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.vignette {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.55rem;
  background: linear-gradient(180deg, #fff 0%, var(--paper-2) 100%);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  box-sizing: border-box;
}

.vignette img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.vignette--catalog {
  width: 8.25rem;
  min-height: 6rem;
}

.vignette--catalog img {
  max-height: 12rem;
}

.vignette--feature {
  width: 100%;
  min-height: 12rem;
  margin-bottom: 1rem;
}

.vignette--feature img {
  max-height: 18rem;
  width: auto;
}

.vignette--detail {
  width: min(100%, 20rem);
  min-height: 12rem;
  padding: 0.75rem;
}

.vignette--detail img {
  max-height: 28rem;
}

.vignette--cart {
  width: 4rem;
  min-height: 3.5rem;
  padding: 0.3rem;
  box-shadow: none;
}

.vignette--cart img {
  max-height: 5rem;
}

.book-cover-link {
  display: block;
  margin-bottom: 1rem;
}

.book-cover-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 18rem;
  object-fit: contain;
  border-radius: 0.25rem;
  box-shadow: var(--shadow);
  background: transparent;
  margin-inline: auto;
}

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
}

.steps span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--burgundy);
  min-width: 2rem;
}

.band {
  background: linear-gradient(115deg, var(--burgundy-deep), var(--burgundy) 55%, #6e3140);
  color: #fff;
}

.band-inner {
  text-align: center;
  padding-block: 0.5rem;
}

.band h2 {
  color: #fff;
}

.band p {
  margin: 0 0 1.4rem;
  color: rgba(255, 255, 255, 0.88);
}

.page-hero {
  --page-title-band: 5.75rem;
  margin: 0;
  padding: 0;
  border-bottom: none;
  /* Fond opaque au sommet pour éviter la bande de texture entre le menu et le héro */
  background:
    linear-gradient(180deg,
      rgba(247, 243, 238, 0.98) 0%,
      rgba(240, 234, 226, 0.92) 25%,
      rgba(239, 232, 223, 0.78) 65%,
      rgba(247, 243, 238, 0.22) 100%);
}

.page-hero .wrap {
  position: relative;
  display: block;
  padding: 0;
}

.page-hero h1,
.page-hero-label {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: var(--page-title-band);
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.2vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--ink);
}

.page-hero-note,
.page-hero p {
  margin: 0.7rem auto 0;
  padding: 0 0 0.15rem;
  color: var(--ink-soft);
  max-width: 40rem;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 300;
  text-align: center;
}

.page-hero p.page-hero-note--cart {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 11rem);
  height: var(--page-title-band);
  margin: 0;
  padding: 0 0.15rem 0 0.6rem;
  color: var(--burgundy);
  font-size: clamp(0.78rem, 1.15vw, 0.92rem);
  font-weight: 400;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

.page-ouvrage .page-hero p.page-hero-note--cart {
  height: 4.6rem;
}

@media (max-width: 720px) {
  .page-hero p.page-hero-note--cart,
  .page-ouvrage .page-hero p.page-hero-note--cart {
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0.35rem 0 0.55rem;
    padding: 0 0.15rem 0.15rem;
    font-size: clamp(0.72rem, 3.4vw, 0.88rem);
    white-space: nowrap;
  }
}

.page-hero p.page-hero-label {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 4.6rem;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.05rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--ink);
}

.catalog {
  display: grid;
  gap: 0.85rem;
}

.catalog-item {
  display: grid;
  grid-template-columns: 8.25rem 1fr minmax(10rem, 12rem);
  gap: 1.1rem;
  align-items: start;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  scroll-margin-top: 5.75rem;
  transition: box-shadow 0.6s ease;
}

.catalog-item.is-return {
  box-shadow: inset 0 0 0 2px rgba(176, 141, 87, 0.9);
}

.catalog-thumb-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 8.25rem;
  min-height: 6rem;
  padding: 0.55rem;
  background: linear-gradient(180deg, #fff 0%, var(--paper-2) 100%);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  box-sizing: border-box;
}

.catalog-thumb-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 12rem;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  background: transparent;
}

.catalog-body h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
}

.catalog-body h2,
.catalog-body h2 a {
  color: var(--burgundy);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.catalog-body h2 a:hover {
  color: var(--burgundy-deep);
}

.resume {
  margin: 0.65rem 0 0.35rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.more-link {
  font-size: 0.92rem;
  font-weight: 500;
}

.catalog-side {
  justify-self: stretch;
}

.buy-box {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.buy-box .dispo {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2f6b3a;
}

.buy-box .dispo.is-epuise {
  color: var(--burgundy);
}

.price,
.price-lg {
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

.price-lg {
  margin: 0;
  font-size: 1.15rem;
  justify-self: end;
}

.buy-box .price-lg {
  text-align: right;
  width: 100%;
}

.cart-table td.price,
.cart-table th.price {
  text-align: right;
}

.order-lines .price,
.order-total .price,
.cart-summary .price {
  text-align: right;
  display: inline-block;
  min-width: 7.5rem;
}

.buy-form {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.45rem;
}

.buy-form input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  font: inherit;
  background: #fff;
}

.buy-form .btn {
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
}

.form-msg {
  margin: 0;
  font-size: 0.88rem;
  color: var(--burgundy-deep);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.detail-cover {
  margin: 0;
}

.detail-cover.vignette,
.vignette.vignette--detail {
  width: min(100%, 20rem);
  min-height: 12rem;
  height: auto;
}

.detail-cover img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 28rem;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.crumb {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.crumb-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.6rem 0.25rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.crumb-back:hover {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  border-color: rgba(26, 22, 20, 0.22);
}

.author-list {
  margin: 0.75rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.author-list li {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.detail-main .buy-box {
  max-width: 18rem;
  margin-bottom: 2rem;
}

.detail-subtitle {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
}

.detail-matieres {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 0.55rem;
}

.detail-specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.15rem;
  margin: 0.35rem 0 1.35rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.detail-specs dt {
  font-weight: 600;
  color: var(--ink);
}

.detail-specs dd {
  margin: 0;
}

.detail-desc {
  margin-top: 0.35rem;
  padding: clamp(1.15rem, 2.5vw, 1.75rem) clamp(1rem, 2.2vw, 1.6rem);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  width: 100%;
  box-sizing: border-box;
}

.detail-desc h2 {
  margin: 0 0 1.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(176, 141, 87, 0.45);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.detail-desc-body p {
  margin: 0 0 1.05rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
}

.detail-desc-body p:last-child {
  margin-bottom: 0;
}

/* Buy-box enrichie */
.buy-box-notes {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: -0.4rem 0 0.6rem;
}

.buy-box-stock {
  font-size: 0.82rem;
  color: var(--emerald, #2d7a4f);
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.form-card {
  width: min(36rem, 100%);
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
}

.catalog-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  margin: 0 0 1.25rem;
}

.catalog-sort span {
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.2rem;
}

.catalog-sort a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-size: 0.88rem;
}

.catalog-sort a[aria-current="true"] {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: #fff;
}

.catalog-sort form {
  display: contents;
}

.catalog-sort select {
  max-width: 100%;
  padding: 0.35rem 1.6rem 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  text-align-last: left;
}

.form-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flash {
  width: min(36rem, 100%);
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: #fff;
  list-style: none;
}

.flash-ok {
  border-color: rgba(47, 107, 58, 0.35);
  color: #2f6b3a;
}

.confirm-card {
  width: min(36rem, 100%);
  margin: 0 auto;
  padding: 2.25rem 1.75rem 1.85rem;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}

.confirm-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.confirm-card h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--burgundy);
}

.confirm-card > p,
.confirm-lead {
  margin: 0 0 1.35rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.5;
}

.confirm-card .order-table {
  margin: 0 0 1.25rem;
  text-align: left;
}

.confirm-actions {
  margin: 0;
}

.flash-err {
  border-color: rgba(139, 21, 37, 0.35);
  color: var(--burgundy-deep);
}

.flash-err li + li {
  margin-top: 0.35rem;
}

.page-access {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(176, 141, 87, 0.20), transparent 55%),
    radial-gradient(700px 420px at 100% 100%, rgba(139, 21, 37, 0.14), transparent 50%),
    rgba(247, 243, 238, 0.45);
}

.access-main {
  width: 100%;
  padding: 2rem 0;
}

.access-card {
  max-width: 26rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.access-logo {
  margin: 0 auto 1rem;
  width: auto;
  height: 3.5rem;
  filter: drop-shadow(0 2px 6px rgba(26, 22, 20, 0.22));
}

.access-card h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 600;
}

.access-lead {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-weight: 300;
}

.access-form {
  display: grid;
  gap: 0.75rem;
}

.access-form input[type="password"] {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  font: inherit;
  background: #fff;
}

.access-form .btn {
  width: 100%;
}

.form-card label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-card label:has(+ :is(input, textarea):required)::after {
  content: "*";
  margin-left: 0.28em;
  color: var(--brass);
  font-weight: 600;
}

.form-card input,
.form-card textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  font: inherit;
  font-size: 1rem;
  background: var(--paper);
}

.form-card input.is-invalid,
.form-card textarea.is-invalid {
  background: #fdf2f2;
  border-color: #c98989;
}

.form-card input:focus,
.form-card textarea:focus {
  outline: 2px solid rgba(139, 21, 37, 0.35);
  border-color: var(--burgundy);
}

.form-card button {
  margin-top: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.75rem;
}

/* Pot de miel : caché visuellement et des lecteurs d'écran,
   mais accessible aux bots qui ignorent CSS */
.hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  tab-index: -1;
}

.contact-address {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
  width: min(36rem, 100%);
}

.cart-empty {
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr) auto;
  grid-template-areas: "media title bar";
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
}

.cart-item-media {
  grid-area: media;
}

.cart-item-title {
  grid-area: title;
  min-width: 0;
}

.cart-item-title strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cart-item-edition {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cart-item-bar {
  grid-area: bar;
  display: grid;
  grid-template-columns:
    6.75rem
    6.25rem
    4.75rem
    6.25rem
    2rem;
  align-items: center;
  column-gap: 0.55rem;
  min-width: 0;
}

.cart-item-pu,
.cart-item-weight,
.cart-item-total {
  white-space: nowrap;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  justify-self: stretch;
}

.cart-item-total {
  font-weight: 600;
}

.cart-weight-default {
  text-decoration: none;
  border: 0;
  color: var(--ink-soft);
  cursor: help;
  font-weight: 600;
}

.cart-qty {
  width: 3.25rem;
  min-width: 3.25rem;
  padding: 0.35rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  font: inherit;
  text-align: center;
}

.cart-table-wrap {
  overflow-x: auto;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  table-layout: auto;
}

.cart-table th,
.cart-table td {
  padding: 0.85rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.cart-table th:nth-child(4),
.cart-table th:nth-child(5),
.cart-table th:nth-child(6),
.cart-table td.cart-num {
  white-space: nowrap;
  text-align: right;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
  width: 1%;
}

.cart-table td.cart-weight .muted {
  white-space: nowrap;
}

.cart-thumb {
  width: auto;
  height: auto;
  max-width: 3.5rem;
  max-height: 4.75rem;
  object-fit: contain;
  object-position: center;
  border-radius: 0.15rem;
  background: #fff;
  padding: 0.2rem;
  border: 1px solid var(--line);
}

.btn-tiny {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
}

.qty-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  justify-self: start;
}

.cart-item-remove {
  margin: 0;
  justify-self: end;
}

.cart-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  background: #fff;
  color: var(--burgundy);
  cursor: pointer;
}

.cart-remove svg {
  width: 1rem;
  height: 1rem;
}

.cart-remove:hover {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
}

.linkish {
  display: block;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--burgundy);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
}

.cart-summary {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 0.65rem;
}

.cart-summary-row--total {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 1.1rem;
}

.order-layout {
  display: grid;
  grid-template-columns: 1fr minmax(18rem, 24rem);
  gap: 2rem;
  align-items: start;
}

.order-recap {
  margin-bottom: 1rem;
}

.order-recap-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.order-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95rem;
}

.order-table th {
  padding: 0.45rem 0.5rem 0.55rem 0;
  border-bottom: 2px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--burgundy);
  text-align: left;
  vertical-align: bottom;
}

.order-table td {
  padding: 0.7rem 0.5rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.order-col-qty {
  width: 3rem;
  text-align: right !important;
  padding-right: 0.75rem !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.order-table th.order-col-qty {
  font-weight: 600;
}

.order-col-title {
  width: auto;
  min-width: 0;
}

.order-col-price {
  width: 6.5rem;
  text-align: right !important;
  padding-left: 0.75rem !important;
  padding-right: 0 !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.order-line-title {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-line-detail {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-row-meta td {
  color: var(--ink-soft);
}

.order-table tfoot td {
  border-bottom: 0;
  padding-top: 0.75rem;
  font-weight: 600;
}

.order-row-total td {
  padding-top: 0.85rem;
  font-size: 1.08rem;
  color: var(--burgundy-deep);
  border-top: 1px solid var(--line);
}

.order-lines {
  list-style: none;
  margin: 0.5rem 0 0.85rem;
  padding: 0;
}

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0.35rem 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.order-total--final {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  font-size: 1.15rem;
}

.order-total .price {
  white-space: nowrap;
}

.site-footer {
  margin-top: auto;
  flex-shrink: 0;
  padding: 1.75rem 0 1.5rem;
  border-top: 0;
  background:
    linear-gradient(180deg, #6e101c 0%, var(--burgundy-deep) 42%, #3a0a10 100%);
  color: rgba(255, 255, 255, 0.88);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) 1fr;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}

.footer-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-logo {
  width: min(100%, 18rem);
  height: auto;
  margin: 0;
  filter: drop-shadow(0 2px 6px rgba(26, 22, 20, 0.22));
}

.footer-info {
  display: grid;
  gap: 0.65rem;
  justify-items: start;
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  color: #fff;
  letter-spacing: 0.02em;
}

.footer-address,
.footer-mail {
  margin: 0;
  line-height: 1.5;
}

.footer-ide {
  font-size: 0.92em;
  letter-spacing: 0.02em;
  opacity: 0.88;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  margin-top: 0.25rem;
}

.site-footer a {
  color: #f3e6c8;
  margin-right: 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  color: #fff;
  border-bottom-color: rgba(243, 230, 200, 0.7);
}

.footer-legal {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-copy {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.72);
}

.footer-buoy {
  display: inline-flex;
  line-height: 0;
  border-bottom: 0 !important;
}

.footer-buoy img {
  width: 29px;
  height: 22px;
  display: block;
}

.site-footer a.footer-buoy:hover {
  border-bottom-color: transparent;
}

.email-obf {
  unicode-bidi: bidi-override;
  direction: rtl;
}

a.email {
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 230, 200, 0.45);
}

a.email--inline {
  color: inherit;
  border-bottom-color: rgba(139, 21, 37, 0.35);
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-info {
    justify-items: center;
  }

  .footer-nav {
    justify-content: center;
  }
}

.fineprint {
  margin: 2rem auto 0;
  font-size: 0.8rem;
  opacity: 0.55;
}

@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .hero-fallback,
  .hero-photo {
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .section-split,
  .book-rail,
  .footer-inner,
  .order-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .catalog-item {
    grid-template-columns: 8.25rem 1fr;
  }

  .catalog-side {
    grid-column: 1 / -1;
  }

  .detail-cover,
  .vignette--detail {
    max-width: 16rem;
    width: 100%;
    margin-inline: auto;
  }

  .detail-main .buy-box {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .page-ouvrage {
    --wrap: min(1120px, calc(100% - 1.25rem));
  }

  .page-ouvrage .page-hero p.page-hero-label {
    height: 3.4rem;
    font-size: 1.35rem;
  }

  .page-hero p.page-hero-note--cart,
  .page-ouvrage .page-hero p.page-hero-note--cart {
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0.35rem 0 0.55rem;
    padding: 0 0.15rem 0.15rem;
    font-size: clamp(0.68rem, 3.2vw, 0.82rem);
    white-space: nowrap;
  }

  .detail-grid {
    gap: 1.1rem;
  }

  .detail-main h1 {
    font-size: 1.35rem;
  }

  .detail-subtitle {
    font-size: 1rem;
  }

  .author-list li {
    font-size: 1.05rem;
  }

  .detail-cover img {
    max-height: 15rem;
  }

  .detail-desc {
    padding: 0.95rem 0.85rem;
  }

  .detail-desc h2 {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.85rem;
  }

  .detail-desc-body p {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .buy-form {
    grid-template-columns: 4rem 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
    background: rgba(247, 243, 238, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .site-header.is-compact .nav {
    top: var(--header-h-compact);
  }

  .nav-open:checked ~ .nav {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta,
  .nav-contact {
    border-radius: 0.2rem;
    margin-top: 0.35rem;
    justify-content: center;
    border-bottom: 0 !important;
  }

  .nav-contact {
    padding: 0.75rem 1rem !important;
  }

  .band-contact .wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    padding-bottom: 3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .catalog-sort {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
  }

  .catalog-sort form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.45rem;
    margin-top: 0.15rem;
  }

  .catalog-sort select {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    text-align: left;
    text-align-last: left;
  }

  .cart-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "title"
      "bar";
    align-items: start;
    gap: 0.65rem;
  }

  .cart-item-media {
    justify-self: start;
  }

  .cart-item-bar {
    width: 100%;
    grid-template-columns:
      minmax(6.5rem, auto)
      minmax(0, 1fr)
      minmax(0, 1fr)
      minmax(0, 1fr)
      2rem;
    row-gap: 0.45rem;
  }

  .cart-item-pu,
  .cart-item-weight,
  .cart-item-total {
    font-size: 0.86rem;
  }

  .cta-row .btn {
    justify-content: center;
  }
}
