/* Venatura : pierre claire, encre chaude, une touche de bronze. */
:root {
  --bone: #f2eee8;
  --stone: #e7e1d8;
  --line: #d6cec2;
  --ink: #1d1b18;
  --muted: #6b645b;
  --bronze: #85663f;
  --night: #24211d;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1.25rem, 4vw, 4rem);
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--ink); color: var(--bone); padding: .5rem 1rem; }
.skip:focus { top: 1rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
.eyebrow { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  min-height: 3.25rem; padding: 0 2rem;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bone);
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease), transform .4s var(--ease);
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--bone);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease);
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: scaleY(1); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--bone); }
.btn--light { border-color: var(--bone); background: var(--bone); color: var(--ink); }
.btn--light::before { background: transparent; }
.btn--light:hover { color: var(--bone); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link { border-bottom: 1px solid currentColor; padding-bottom: 2px; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }

/* En-tête : transparent sur le héros, opaque ensuite, se cache quand on descend */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: transform .6s var(--ease), background-color .4s, color .4s;
}
.header.is-solid { background: rgba(242, 238, 232, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header.is-hidden { transform: translateY(-100%); }
.header.on-dark:not(.is-solid) { color: var(--bone); }
.header__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 5rem; }
.header nav { display: flex; gap: 2rem; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; }
.header nav a { position: relative; padding: .25rem 0; }
.header nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.header nav a:hover::after, .header nav a[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }
.logo { font-family: var(--serif); font-size: 1.75rem; letter-spacing: .32em; text-transform: uppercase; padding-left: .32em; }
.header__actions { justify-self: end; }
.cart-btn { background: none; border: 0; display: inline-flex; gap: .5rem; align-items: center; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; min-height: 44px; }
.cart-btn__count { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border: 1px solid currentColor; border-radius: 50%; font-size: .7rem; letter-spacing: 0; }
.cart-btn__count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* Héros */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; color: var(--bone); background: var(--night); }
.hero__media { position: absolute; inset: -6% 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s var(--ease) both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 18, 15, .45) 0%, transparent 18%), linear-gradient(90deg, rgba(20, 18, 15, .62) 0%, rgba(20, 18, 15, .2) 55%, transparent 80%); }
.hero__content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(3rem, 10vh, 7rem); }
.hero h1 { font-size: clamp(3.2rem, 9vw, 8.5rem); max-width: 11ch; }
.hero h1 em { font-style: italic; color: #e9dcc6; }
.hero p { max-width: 34rem; margin: 1.5rem 0 2.5rem; color: rgba(242, 238, 232, .82); font-size: 1.05rem; }
.hero .eyebrow { color: rgba(242, 238, 232, .75); margin-bottom: 1.5rem; }
.hero__vein { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__vein path { fill: none; stroke: rgba(233, 220, 198, .55); stroke-width: 1; stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 4.5s .6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.scroll-cue { position: absolute; z-index: 2; right: var(--pad); bottom: 2.5rem; writing-mode: vertical-rl; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; display: flex; align-items: center; gap: 1rem; }
.scroll-cue::after { content: ''; width: 1px; height: 4rem; background: currentColor; transform-origin: top; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Texte qui monte ligne à ligne */
.split-line { display: block; overflow: hidden; }
.split-line > span { display: block; transform: translateY(105%); animation: rise 1.2s var(--ease) forwards; }
.split-line:nth-child(2) > span { animation-delay: .12s; }
.split-line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }

/* Défilement de noms de marbres */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 1.4rem 0; }
.marquee__track { display: flex; gap: 3rem; width: max-content; animation: marquee 40s linear infinite; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.4rem); font-style: italic; color: var(--muted); }
.marquee__track span::after { content: '·'; margin-left: 3rem; color: var(--bronze); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: clamp(5rem, 12vw, 10rem) 0; }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); flex-wrap: wrap; }
.section__head h2 { font-size: clamp(2.4rem, 5vw, 4.5rem); max-width: 14ch; }
.section__head .eyebrow { margin-bottom: 1rem; }

/* Grille produits */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 2rem); }
.grid--feature { grid-template-columns: repeat(12, 1fr); }
.grid--feature .card:nth-child(1) { grid-column: span 7; }
.grid--feature .card:nth-child(2) { grid-column: span 5; margin-top: 8rem; }
.grid--feature .card:nth-child(n+3) { grid-column: span 4; }
.card { display: block; }
.card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
/* Reflet de lumière qui balaie la pierre au survol */
.card__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); transform: translateX(-120%); transition: transform 1.2s var(--ease); pointer-events: none; }
.card:hover .card__media::after { transform: translateX(120%); }
.card__quick { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; z-index: 2; opacity: 0; transform: translateY(1rem); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.card:hover .card__quick, .card:focus-within .card__quick { opacity: 1; transform: none; }
.card__quick .btn { width: 100%; min-height: 2.9rem; }
.card__body { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.1rem; }
.card__name { font-family: var(--serif); font-size: 1.55rem; line-height: 1.15; }
.card__sub { font-size: .85rem; color: var(--muted); }
.card__price { font-size: .9rem; white-space: nowrap; }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-img { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease); transition-delay: var(--d, 0s); }
.reveal-img.is-in { clip-path: inset(0 0 0 0); }

/* Savoir-faire */
.craft { background: var(--night); color: var(--bone); }
.craft__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 7rem); align-items: center; }
.craft__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.craft__media video { width: 100%; height: 100%; object-fit: cover; }
.craft h2 { font-size: clamp(2.4rem, 5vw, 4.5rem); margin: 1rem 0 2rem; }
.craft p { color: rgba(242, 238, 232, .75); max-width: 34rem; }
.craft .eyebrow { color: rgba(242, 238, 232, .6); }
.steps { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; gap: 1.5rem; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; border-top: 1px solid rgba(242, 238, 232, .18); padding-top: 1.25rem; }
.steps li::before { content: '0' counter(s); font-family: var(--serif); font-size: 1.3rem; color: #c9a878; }
.steps strong { display: block; font-weight: 500; margin-bottom: .25rem; }
.steps span { color: rgba(242, 238, 232, .65); font-size: .92rem; }

/* Bandeau de garanties */
.promises { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.promises div { padding: 2.5rem 1.5rem 0 0; }
.promises strong { display: block; font-family: var(--serif); font-size: 1.4rem; font-weight: 400; margin-bottom: .4rem; }
.promises span { color: var(--muted); font-size: .9rem; }

/* Lettre d'information */
.newsletter { text-align: center; }
.newsletter h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); margin: 1rem auto 1.5rem; max-width: 18ch; }
.newsletter form { display: flex; max-width: 32rem; margin: 2rem auto 0; border-bottom: 1px solid var(--ink); }
.newsletter input { flex: 1; border: 0; background: transparent; padding: 1rem 0; font: inherit; min-width: 0; }
.newsletter input:focus { outline: none; }
.newsletter button { background: none; border: 0; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; min-height: 44px; }
.form-msg { min-height: 1.5rem; margin-top: 1rem; color: var(--muted); font-size: .9rem; }

/* Pied de page */
.footer { background: var(--night); color: rgba(242, 238, 232, .7); padding: 5rem 0 2rem; font-size: .9rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer .logo { color: var(--bone); display: inline-block; margin-bottom: 1rem; }
.footer h3 { font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bone); margin-bottom: 1rem; font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer a:hover { color: var(--bone); }
.footer__bottom { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid rgba(242, 238, 232, .15); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .8rem; }

/* Boutique */
.page-head { padding-top: 10rem; padding-bottom: 3rem; }
.page-head h1 { font-size: clamp(3rem, 7vw, 6.5rem); }
.page-head p { color: var(--muted); max-width: 36rem; margin-top: 1.25rem; }
.filters { position: sticky; top: 0; z-index: 10; background: var(--bone); border-block: 1px solid var(--line); margin-bottom: 3rem; }
.filters__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; flex-wrap: wrap; padding-block: .5rem; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; padding: .5rem 1.1rem; min-height: 40px; border-radius: 999px; font-size: .78rem; letter-spacing: .08em; transition: background-color .3s, color .3s, border-color .3s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.filters select { border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; font-size: .85rem; padding: .5rem 1.5rem .5rem 0; min-height: 40px; }
.filters label { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: .5rem; }
.result-count { font-size: .85rem; color: var(--muted); }
.state { padding: 5rem 0; text-align: center; color: var(--muted); }
.state h2 { color: var(--ink); font-size: 2.4rem; margin-bottom: 1rem; }
.state .btn { margin-top: 2rem; }
.skeleton .card__media { animation: pulse 1.6s ease-in-out infinite; }
.skeleton .card__body span { display: block; height: 1rem; width: 60%; background: var(--stone); margin-bottom: .5rem; }
@keyframes pulse { 50% { opacity: .55; } }

/* Fiche produit */
.product { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding-top: 7rem; padding-bottom: 6rem; align-items: start; }
.product__media { position: sticky; top: 6rem; aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); cursor: zoom-in; }
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); transform-origin: var(--zx, 50%) var(--zy, 50%); }
.product__media.is-zoom img { transform: scale(1.9); }
.product__info { padding-top: 2rem; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 2rem; }
.crumbs a:hover { color: var(--ink); }
.product h1 { font-size: clamp(2.6rem, 5vw, 4.5rem); }
.product__sub { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--muted); margin: .5rem 0 2rem; }
.product__price { font-size: 1.35rem; margin-bottom: 2rem; }
.product__price small { display: block; font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.product__desc { color: #403b35; margin-bottom: 2.5rem; max-width: 36rem; }
.buy { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); min-height: 3.25rem; }
.qty button { background: none; border: 0; width: 2.75rem; height: 100%; min-height: 44px; font-size: 1.1rem; }
.qty input { width: 2.5rem; text-align: center; border: 0; background: transparent; font: inherit; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy .btn { flex: 1; min-width: 14rem; }
.specs { border-top: 1px solid var(--line); margin-top: 3rem; }
.specs details { border-bottom: 1px solid var(--line); }
.specs summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; padding: 1.25rem 0; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.specs summary::-webkit-details-marker { display: none; }
.specs summary::after { content: '+'; font-size: 1.1rem; transition: transform .4s var(--ease); }
.specs details[open] summary::after { transform: rotate(45deg); }
.specs dl { display: grid; grid-template-columns: 8rem 1fr; gap: .5rem 1rem; margin: 0 0 1.5rem; font-size: .92rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.specs p { margin: 0 0 1.5rem; font-size: .92rem; color: #403b35; }

/* Tiroir du panier */
.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; transition: visibility 0s .6s; }
.drawer.is-open { visibility: visible; transition: none; }
.drawer__veil { position: absolute; inset: 0; background: rgba(20, 18, 15, .45); opacity: 0; transition: opacity .5s var(--ease); border: 0; width: 100%; cursor: default; }
.drawer.is-open .drawer__veil { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--bone); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .6s var(--ease); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 2rem; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 1.8rem; }
.icon-btn { background: none; border: 0; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.4rem; }
.drawer__lines { flex: 1; overflow-y: auto; padding: 0 2rem; }
.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); animation: fadein .5s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateX(20px); } }
.line img { width: 84px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--stone); }
.line__name { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; }
.line__sub { font-size: .8rem; color: var(--muted); }
.line .qty { min-height: 2.5rem; margin-top: .75rem; }
.line .qty button { width: 2.25rem; min-height: 40px; }
.line__right { display: flex; flex-direction: column; align-items: end; justify-content: space-between; font-size: .9rem; }
.line__remove { background: none; border: 0; font-size: .75rem; color: var(--muted); text-decoration: underline; min-height: 40px; }
.drawer__empty { padding: 4rem 0; text-align: center; color: var(--muted); }
.drawer__empty p { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); margin-bottom: .5rem; }
.drawer__foot { padding: 1.5rem 2rem 2rem; border-top: 1px solid var(--line); }
.drawer__total { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: .25rem; }
.drawer__note { font-size: .8rem; color: var(--muted); margin: 0 0 1.25rem; }
.drawer__foot .btn { width: 100%; }
.drawer__msg { font-size: .85rem; color: var(--muted); margin-top: .75rem; min-height: 1.2rem; }

/* Page texte (légal, merci) */
.prose { max-width: 46rem; padding-top: 10rem; padding-bottom: 6rem; }
.prose h1 { font-size: clamp(2.8rem, 6vw, 5rem); margin-bottom: 2rem; }
.prose h2 { font-size: 2rem; margin: 3rem 0 1rem; }
.prose p, .prose li { color: #403b35; }
.notice { border-left: 2px solid var(--bronze); padding: .75rem 1.25rem; background: var(--stone); font-size: .9rem; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 2rem; z-index: 90; transform: translate(-50%, calc(100% + 3rem)); visibility: hidden; background: var(--ink); color: var(--bone); padding: 1rem 1.5rem; font-size: .85rem; transition: transform .5s var(--ease), visibility 0s .5s; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .5s var(--ease); }

.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; place-items: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 22px; height: 1px; background: currentColor; position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; }
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }

@media (max-width: 960px) {
  .header__in { grid-template-columns: auto 1fr auto; }
  .header nav { display: none; }
  .header nav.is-open { display: flex; position: fixed; inset: 5rem 0 auto; flex-direction: column; gap: 0; background: var(--bone); color: var(--ink); border-bottom: 1px solid var(--line); padding: 1rem var(--pad) 2rem; }
  .header nav.is-open a { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: grid; }
  .logo { justify-self: center; font-size: 1.4rem; }
  .hero::after { background: linear-gradient(180deg, rgba(20, 18, 15, .45) 0%, transparent 15%, rgba(20, 18, 15, .45) 45%, rgba(20, 18, 15, .8) 75%); }
  .hero .eyebrow { letter-spacing: .16em; }
  .cart-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .grid--feature { grid-template-columns: 1fr 1fr; }
  .grid--feature .card:nth-child(n) { grid-column: span 1; margin-top: 0; }
  .grid--feature .card:nth-child(1) { grid-column: span 2; }
  .craft__grid, .product { grid-template-columns: 1fr; }
  .product__media { position: relative; top: 0; }
  .promises { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .card__quick { opacity: 1; transform: none; position: static; padding-top: .75rem; }
  .card__quick .btn { background: transparent; color: var(--ink); }
}
@media (max-width: 560px) {
  .grid--feature { grid-template-columns: 1fr; }
  .grid--feature .card:nth-child(1) { grid-column: span 1; }
  .promises, .footer__grid { grid-template-columns: 1fr; }
  .filters__in { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-img { opacity: 1; transform: none; clip-path: none; }
  .split-line > span { transform: none; }
  .hero__vein path { stroke-dashoffset: 0; }
}

/* ================= V2 : transitions, galerie, devis, animations ================= */

/* Transition entre pages : la photo du produit voyage de la grille vers sa fiche */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .5s; animation-timing-function: var(--ease); }
::view-transition-group(product-img) { animation-duration: .7s; animation-timing-function: var(--ease); }
.product__main { view-transition-name: product-img; }

/* Ouverture : le nom se lève, puis le rideau monte. Une fois par visite. */
.intro { position: fixed; inset: 0; z-index: 200; background: var(--night); color: var(--bone); display: grid; place-items: center; animation: intro-up .9s 1.5s var(--ease) forwards; }
.intro__word { font-family: var(--serif); font-size: clamp(2rem, 7vw, 5rem); letter-spacing: .32em; text-transform: uppercase; padding-left: .32em; overflow: hidden; display: flex; }
.intro__word span { display: inline-block; transform: translateY(110%); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i) * 60ms); }
.intro__line { position: absolute; left: 50%; top: calc(50% + clamp(2rem, 5vw, 3.5rem)); width: min(280px, 50vw); height: 1px; background: #c9a878; transform: translateX(-50%) scaleX(0); animation: intro-line 1.1s .3s var(--ease) forwards; }
@keyframes intro-line { to { transform: translateX(-50%) scaleX(1); } }
@keyframes intro-up { to { transform: translateY(-100%); visibility: hidden; } }
.has-intro .split-line > span { animation-delay: 1.7s; }
.has-intro .split-line:nth-child(2) > span { animation-delay: 1.82s; }
.has-intro .split-line:nth-child(3) > span { animation-delay: 1.94s; }
.has-intro .hero__vein path { animation-delay: 2.2s; }

/* Curseur : un anneau qui suit la souris et s'ouvre sur les pièces */
.cursor { position: fixed; left: 0; top: 0; z-index: 300; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--bone); mix-blend-mode: difference; pointer-events: none; opacity: 0; transition: width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease), opacity .3s; display: grid; place-items: center; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor.is-view { width: 88px; height: 88px; margin: -44px 0 0 -44px; mix-blend-mode: normal; }
.cursor span { opacity: 0; transition: opacity .3s; }
.cursor.is-view span { opacity: 1; }

/* Parallaxe dans les cartes : l'image est un peu plus grande que son cadre et glisse */
.card__media img { transform: translateY(var(--py, 0px)) scale(1.1); }
.card:hover .card__media img { transform: translateY(var(--py, 0px)) scale(1.16); }
.card__price { transition: opacity .8s .35s var(--ease), transform .8s .35s var(--ease); }
.card.reveal:not(.is-in) .card__price { opacity: 0; transform: translateY(10px); }

/* Collections : défilement horizontal piloté par le défilement vertical */
.hscroll { position: relative; background: var(--stone); }
.hscroll__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hscroll__head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 2.5rem; }
.hscroll__head h2 { font-size: clamp(2.4rem, 5vw, 4.5rem); }
.hscroll__progress { width: 10rem; height: 1px; background: var(--line); position: relative; }
.hscroll__progress i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }
.hscroll__track { display: flex; gap: clamp(1rem, 2vw, 2rem); padding: 0 var(--pad); will-change: transform; }
.panel { position: relative; flex: 0 0 min(34vw, 460px); aspect-ratio: 4 / 5; max-height: 62svh; overflow: hidden; color: var(--bone); display: block; }
.panel img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.panel:hover img { transform: scale(1.06); }
.panel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20, 18, 15, .7)); }
.panel__body { position: absolute; z-index: 1; left: 1.5rem; right: 1.5rem; bottom: 1.5rem; display: flex; justify-content: space-between; align-items: end; }
.panel__body strong { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1; }
.panel__body span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
.panel__num { position: absolute; z-index: 1; left: 1.5rem; top: 1.25rem; font-family: var(--serif); font-style: italic; font-size: 1.1rem; }

/* Atelier : la vidéo reste, les étapes s'allument une à une */
.craft__grid { align-items: start; }
.craft__media { position: sticky; top: 12svh; max-height: 76svh; }
.craft .steps { gap: 0; margin-top: 4rem; }
.craft .steps li { min-height: 38svh; align-content: start; opacity: .28; transition: opacity .7s var(--ease); grid-template-columns: 4rem 1fr; }
.craft .steps li.is-active { opacity: 1; }
.craft .steps li::before { font-size: 2rem; transition: transform .7s var(--ease); transform-origin: left; }
.craft .steps li.is-active::before { transform: scale(1.25); }
.craft .steps strong { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.1; margin-bottom: .6rem; }
.craft .steps span { font-size: 1rem; max-width: 26rem; display: block; }

/* Chiffres */
.promises strong b { font-weight: 400; font-size: 2.6rem; line-height: 1; display: block; font-variant-numeric: tabular-nums; color: var(--bronze); }

/* Galerie produit */
.gallery { position: sticky; top: 6rem; display: grid; grid-template-columns: 76px 1fr; gap: 1rem; }
.gallery .product__media { position: relative; top: 0; }
.thumbs { display: grid; gap: .75rem; align-content: start; }
.thumb { padding: 0; border: 1px solid transparent; background: var(--stone); aspect-ratio: 4 / 5; overflow: hidden; opacity: .6; transition: opacity .4s, border-color .4s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover, .thumb[aria-pressed='true'] { opacity: 1; }
.thumb[aria-pressed='true'] { border-color: var(--ink); }
.product__main { transition: opacity .35s var(--ease), transform .6s var(--ease); }
.product__main.is-swapping { opacity: 0; }
.gallery__label { position: absolute; left: 1rem; bottom: 1rem; z-index: 1; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; background: rgba(242, 238, 232, .88); padding: .35rem .7rem; }

/* Devis sur mesure */
.bespoke { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border: 1px solid var(--line); padding: 1.1rem 1.25rem; margin-top: 1.25rem; }
.bespoke p { margin: 0; font-size: .9rem; color: var(--muted); }
.bespoke strong { display: block; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 1.25rem; }
.quote { border: 0; padding: 0; width: min(560px, calc(100% - 2rem)); max-height: calc(100svh - 2rem); background: var(--bone); color: var(--ink); }
.quote::backdrop { background: rgba(20, 18, 15, .55); }
.quote[open] { animation: quote-in .5s var(--ease); }
@keyframes quote-in { from { opacity: 0; transform: translateY(24px); } }
.quote__in { padding: 2rem; display: grid; gap: 1.1rem; }
.quote__head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.quote h2 { font-size: 2rem; }
.quote label { display: grid; gap: .35rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.quote input, .quote select, .quote textarea { font: inherit; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: .6rem 0; border-radius: 0; width: 100%; }
.quote textarea { resize: vertical; min-height: 5rem; }
.quote input:focus, .quote select:focus, .quote textarea:focus { outline: none; border-color: var(--ink); }
.quote__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.quote__err { color: #8a2b1d; font-size: .85rem; min-height: 1.2rem; margin: 0; }
.quote__done { white-space: pre-wrap; background: var(--stone); padding: 1rem; font-size: .9rem; user-select: all; margin: 0; }

@media (max-width: 960px) {
  .gallery { position: static; grid-template-columns: 1fr; }
  .thumbs { grid-template-columns: repeat(3, 72px); order: 2; }
  /* Sur mobile : défilement horizontal natif au doigt */
  .hscroll { height: auto !important; padding: 4rem 0; }
  .hscroll__sticky { position: static; height: auto; }
  .hscroll__track { overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; padding-bottom: 1rem; scrollbar-width: none; }
  .panel { flex-basis: 74vw; scroll-snap-align: center; max-height: none; }
  .hscroll__progress { display: none; }
  .craft__media { position: relative; top: 0; }
  .craft .steps li { min-height: 0; opacity: 1; padding-bottom: 2rem; }
  .quote__row { grid-template-columns: 1fr; }
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .intro, .cursor { display: none; }
  .card__media img { transform: none; }
  .craft .steps li { opacity: 1; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Retouches après premier rendu */
.hscroll__head { width: 100%; }
.panel::before { content: ''; position: absolute; inset: 0 0 auto; height: 30%; z-index: 1; background: linear-gradient(180deg, rgba(20, 18, 15, .45), transparent); }

/* ================= Boucle design, tour 2 ================= */

/* Grain de pierre sur tout le site */
body::after { content: ''; position: fixed; inset: 0; z-index: 400; pointer-events: none; opacity: .07; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* La veine fil conducteur : elle se trace à mesure qu'on descend la page */
.thread { position: fixed; left: 10px; top: 0; width: 28px; height: 100svh; z-index: 40; pointer-events: none; }
.thread path { fill: none; stroke: var(--bronze); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--scroll, 0)); vector-effect: non-scaling-stroke; }
.thread path + path { stroke-opacity: .35; stroke-dashoffset: calc(1 - var(--scroll, 0) * 1.25); }

/* Images : fondu à l'arrivée au lieu d'un rectangle plat */
.card__media img, .panel img, .thumb img { opacity: 0; transition: opacity .9s var(--ease), transform 1.4s var(--ease); }
.card__media img.is-loaded, .panel img.is-loaded, .thumb img.is-loaded { opacity: 1; }

/* Héros : texte mieux détaché de la photo */
.hero::after { background: linear-gradient(180deg, rgba(20, 18, 15, .45) 0%, transparent 18%), linear-gradient(90deg, rgba(24, 21, 17, .78) 0%, rgba(24, 21, 17, .5) 38%, transparent 68%); }
.hero p { text-shadow: 0 1px 18px rgba(20, 18, 15, .5); }

/* Collections : la barre de progression a maintenant son compteur */
.hscroll__meta { display: flex; align-items: center; gap: 1rem; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); }

/* Atelier : vidéo réchauffée, taillée en arche, étapes resserrées */
.craft { padding-bottom: clamp(3rem, 6vw, 5rem); }
.craft__media { aspect-ratio: 3 / 4; max-width: 440px; justify-self: center; border-radius: 999px 999px 0 0; }
.craft__media video { filter: sepia(.45) saturate(.75) contrast(1.08) brightness(.92); transform: scale(1.04); }
.craft__media::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(36, 33, 29, .55)); }
.craft .steps { margin-top: 3rem; }
.craft .steps li { min-height: 24svh; }
.craft .steps li:last-child { min-height: 0; padding-bottom: 1rem; }

/* Chiffres : de vrais grands chiffres */
.promises { border-top: 0; gap: 0; }
.promises div { padding: 2rem 1.5rem 0 0; border-top: 1px solid var(--line); }
.promises strong { font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.promises strong b { font-family: var(--serif); font-size: clamp(4.5rem, 8vw, 7.5rem); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; text-transform: none; color: var(--ink); margin-bottom: 1rem; }
.promises span { display: block; margin-top: .5rem; }
.section--tight { padding-top: clamp(2rem, 5vw, 4rem); }

/* Final : les noms de pierres en très grand, en contour */
.finale { background: var(--night); color: var(--bone); text-align: center; overflow: hidden; padding: clamp(5rem, 10vw, 9rem) 0; position: relative; }
.finale__names { display: flex; gap: 4vw; width: max-content; font-family: var(--serif); font-size: clamp(5rem, 15vw, 15rem); line-height: .9; font-style: italic; color: transparent; -webkit-text-stroke: 1px rgba(201, 168, 120, .45); animation: marquee 60s linear infinite; white-space: nowrap; }
.finale__body { position: relative; margin-top: clamp(-9rem, -8vw, -3rem); }
.finale h2 { font-size: clamp(2.4rem, 5vw, 4.5rem); margin: 1rem auto 1.5rem; max-width: 16ch; }
.finale p { color: rgba(242, 238, 232, .75); max-width: 34rem; margin: 0 auto 2rem; }
.finale .eyebrow { color: rgba(242, 238, 232, .6); }
.finale + .footer { border-top: 1px solid rgba(242, 238, 232, .12); }

/* Fiche : signature de veine propre à chaque pièce */
.signature { display: flex; align-items: center; gap: 1rem; margin: 0 0 2rem; color: var(--muted); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; }
.signature svg { flex: 1; max-width: 16rem; height: 34px; overflow: visible; }
.signature path { fill: none; stroke: var(--bronze); stroke-width: 1.1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: sign 2.2s .5s var(--ease) forwards; }
.signature path + path { stroke-opacity: .4; animation-delay: .9s; }
@keyframes sign { to { stroke-dashoffset: 0; } }

@media (max-width: 960px) {
  .thread { display: none; }
  .hero::after { background: linear-gradient(180deg, rgba(20, 18, 15, .45) 0%, transparent 14%, transparent 42%, rgba(20, 18, 15, .82) 72%); }
  .hero__vein { display: none; }
  .hero .eyebrow { white-space: nowrap; font-size: .64rem; letter-spacing: .14em; }
  .craft__media { max-width: 300px; }
  .promises div { padding-bottom: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .thread { display: none; }
  .card__media img, .panel img, .thumb img { opacity: 1; }
  .signature path { stroke-dashoffset: 0; }
}

/* ================= Boucle design, tour 3 ================= */

/* Grain : sans mode de fusion (moins coûteux au défilement), un peu plus présent */
body::after { mix-blend-mode: normal; opacity: .09; }

/* Veine fil conducteur plus lisible */
.thread { width: 60px; left: 0; }
.thread path { stroke-width: 1.6; }

/* Final : plein écran, deux rangées de noms qui se croisent, le texte au milieu */
.finale { min-height: 100svh; display: grid; align-content: center; gap: clamp(2rem, 5vw, 4rem); padding: 4rem 0; }
.finale__names { -webkit-text-stroke: 1px rgba(201, 168, 120, .7); font-size: clamp(4rem, 11vw, 11rem); }
.finale__names--back { animation-direction: reverse; -webkit-text-stroke-color: rgba(201, 168, 120, .35); }
.finale__body { margin-top: 0; }

/* Atelier : la pierre se « polit » d'étape en étape */
.craft .steps li::before { font-variant-numeric: lining-nums; }
.craft__media video { transition: filter 1.2s var(--ease); }
.craft[data-step='1'] .craft__media video { filter: grayscale(.7) sepia(.35) contrast(.92) brightness(.8); }
.craft[data-step='2'] .craft__media video { filter: sepia(.45) saturate(.75) contrast(1.08) brightness(.92); }
.craft[data-step='3'] .craft__media video { filter: sepia(.2) saturate(1.05) contrast(1.2) brightness(1.08); }

/* Polir la pierre : autour du curseur, la photo gagne en éclat */
.card__media::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); backdrop-filter: saturate(1.6) contrast(1.18) brightness(1.07); -webkit-mask-image: radial-gradient(circle 110px at var(--mx, 50%) var(--my, 50%), #000 55%, transparent 100%); mask-image: radial-gradient(circle 110px at var(--mx, 50%) var(--my, 50%), #000 55%, transparent 100%); }
@media (hover: hover) and (pointer: fine) {
  .card__media img { filter: saturate(.86) contrast(.97); }
  .card:hover .card__media::before { opacity: 1; }
}

/* Filet-veine entre deux sections claires */
.vein-rule { display: block; width: 100%; height: 40px; overflow: visible; }
.vein-rule path { fill: none; stroke: var(--bronze); stroke-opacity: .55; stroke-width: 1; vector-effect: non-scaling-stroke; }

@media (max-width: 960px) {
  .finale { min-height: 80svh; }
}

/* Corrections de rendu, tour 3 */
.finale { grid-template-columns: minmax(0, 1fr); }
.craft__media video { transform: none; }
.craft__media.reveal-img.is-in { clip-path: inset(0 round 220px 220px 0 0); }
.craft__media { background: var(--night); }
/* Le filtre porte sur le cadre, pas sur la vidéo : sinon certains navigateurs dessinent un fond noir hors de l'arche */
.craft .craft__media video, .craft[data-step] .craft__media video { filter: none; }
.craft__media { filter: sepia(.45) saturate(.75) contrast(1.08) brightness(.92); transition: filter 1.2s var(--ease), clip-path 1.4s var(--ease); }
.craft[data-step='1'] .craft__media { filter: grayscale(.7) sepia(.35) contrast(.92) brightness(.8); }
.craft[data-step='3'] .craft__media { filter: sepia(.2) saturate(1.05) contrast(1.2) brightness(1.08); }
@media (max-width: 960px) {
  .hscroll__meta { display: none; }
  .hero .eyebrow { color: rgba(242, 238, 232, .92); text-shadow: 0 1px 12px rgba(20, 18, 15, .7); }
}
.panel__num, .hscroll__meta { font-variant-numeric: lining-nums; }
@media (max-width: 960px) {
  .hero::after { background: linear-gradient(180deg, rgba(20, 18, 15, .45) 0%, transparent 14%, rgba(20, 18, 15, .35) 30%, rgba(20, 18, 15, .82) 70%); }
}
