:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --ink: #241c14;
  --ink-soft: #5d5145;
  --line: #e6ddd1;
  --wood: #8a5a2b;
  --wood-dark: #6d461f;
  --accent: #2f6b4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(36,28,20,.06), 0 8px 24px rgba(36,28,20,.06);
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130f;
    --surface: #211b16;
    --ink: #f3ece3;
    --ink-soft: #b6a897;
    --line: #362c23;
    --wood: #c98c4e;
    --wood-dark: #e0a769;
    --accent: #6fbf93;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--wood-dark); }

/* ---------------------------------------------------------------- header */

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px;
  max-width: 1120px; margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--wood) 0%, var(--wood-dark) 100%);
}
.brand-text { display: flex; flex-direction: column; font-weight: 650; letter-spacing: .01em; line-height: 1.2; }
.brand-text small { font-weight: 400; font-size: 12.5px; color: var(--ink-soft); }
.header-shop {
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; white-space: nowrap; background: var(--surface);
}
.header-shop:hover { border-color: var(--wood); color: var(--wood-dark); }

/* ---------------------------------------------------------------- fil d'ariane */

.breadcrumb { max-width: 1120px; margin: 0 auto; padding: 14px 20px 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; font-size: 14px; color: var(--ink-soft); }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: var(--line); }
.breadcrumb a { color: var(--ink-soft); }

/* ---------------------------------------------------------------- fiche produit */

.product {
  max-width: 1120px; margin: 0 auto; padding: 22px 20px 60px;
  display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr);
}
/* Sans ça, une longue rangée de miniatures élargit la colonne au-delà de l'écran du téléphone. */
.product > * { min-width: 0; }
.product h1, .card-title { overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .product-media { position: sticky; top: 24px; }
}

.gallery-main {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.gallery-thumbs { list-style: none; display: flex; gap: 10px; padding: 12px 0 0; margin: 0; overflow-x: auto; }
.thumb {
  padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden;
  background: none; cursor: pointer; width: 78px; height: 78px; flex: 0 0 auto;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--wood); }

.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: 12.5px; font-weight: 700; color: var(--wood-dark); margin: 0 0 8px; }
.product h1 { font-family: var(--serif); font-size: clamp(29px, 4.5vw, 42px); line-height: 1.15; margin: 0 0 14px; }
.lede { font-size: 19px; color: var(--ink-soft); margin: 0 0 24px; }

.buy-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 0 0 32px; box-shadow: var(--shadow);
}
.price { font-size: 27px; font-weight: 700; margin: 0 0 14px; font-family: var(--serif); }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--wood); color: #fff; text-decoration: none; font-weight: 650; font-size: 17px;
  padding: 14px 26px; border-radius: 999px; width: 100%;
  transition: background .15s ease, transform .15s ease;
}
.cta:hover { background: var(--wood-dark); transform: translateY(-1px); }
.buy-note { font-size: 13.5px; color: var(--ink-soft); margin: 12px 0 0; text-align: center; }
.cta-repeat { margin-top: 36px; }

.product h2 { font-family: var(--serif); font-size: 23px; margin: 34px 0 14px; }
.specs { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: 40% 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-soft); font-size: 15px; }
.specs dd { margin: 0; font-weight: 550; }

.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }

.faq details {
  border-bottom: 1px solid var(--line); padding: 12px 0;
}
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq details[open] summary { color: var(--wood-dark); }
.faq details > div { padding-top: 6px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- hub + grilles */

.hub { max-width: 1120px; margin: 0 auto; padding: 30px 20px 64px; }
.hub-intro { max-width: 720px; margin-bottom: 38px; }
.hub-intro h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); line-height: 1.12; margin: 0 0 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.filters a {
  font-size: 14.5px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; background: var(--surface);
}
.filters a:hover { border-color: var(--wood); color: var(--wood-dark); }

.hub-group { margin-bottom: 46px; scroll-margin-top: 20px; }
.hub-group h2 { font-family: var(--serif); font-size: 25px; margin: 0 0 18px; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Carrousel de photos dans chaque vignette : glisser au doigt, flèches à la souris */
.card-media { position: relative; }
.card-slider {
  display: flex; overflow-x: auto; overflow-y: hidden; aspect-ratio: 1 / 1;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.card-slider::-webkit-scrollbar { display: none; }
.card-slide { flex: 0 0 100%; scroll-snap-align: start; display: block; }
.card-slide picture, .card-slide img { display: block; width: 100%; height: 100%; }
.card-slide img { object-fit: cover; }
.card-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 5px; pointer-events: none;
}
.card-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.55); box-shadow: 0 0 2px rgba(0,0,0,.45);
  transition: transform .2s ease, background .2s ease;
}
.card-dots i.on { background: #fff; transform: scale(1.35); }
.card-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0 0 3px;
  background: rgba(255,255,255,.92); color: #241c14; font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 5px rgba(0,0,0,.28); cursor: pointer; opacity: 0; transition: opacity .15s ease;
}
.card-nav[hidden] { display: none; }
.card-prev { left: 8px; }
.card-next { right: 8px; }
.card-nav:focus-visible { opacity: 1; outline: 2px solid var(--wood); }
@media (hover: hover) { .card:hover .card-nav { opacity: 1; } }
.card-body { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: var(--ink); }
.card-title { padding: 14px 15px 2px; font-weight: 600; line-height: 1.35; }
.card-price { padding: 0 15px 15px; color: var(--ink-soft); font-size: 15px; }

.related { max-width: 1120px; margin: 0 auto; padding: 0 20px 70px; }
.related h2 { font-family: var(--serif); font-size: 25px; margin: 0 0 18px; }
.empty { color: var(--ink-soft); }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 30px 20px 40px; }
.footer-brand { font-weight: 600; margin: 0 0 10px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.footer-nav a:hover { color: var(--wood-dark); }
.footer-note { font-size: 13.5px; color: var(--ink-soft); margin: 0; }

@media (max-width: 480px) {
  .site-header { padding: 14px 16px; }
  .brand-text small { display: none; }
  .header-shop { font-size: 13.5px; padding: 7px 13px; }
  .product, .hub, .related { padding-left: 16px; padding-right: 16px; }
  .breadcrumb { padding-left: 16px; padding-right: 16px; }
  .footer-inner { padding-left: 16px; padding-right: 16px; }
}

/* Page d'accueil nue : uniquement la grille de miniatures */
.hub-bare { padding-top: 26px; }
.hub-bare .grid { gap: 18px; }
body.bare { background: var(--bg); }
