:root {
  --coton: #f2f4ee;
  --mousse: #2f5d34;
  --moutarde: #f2b21b;
  --coquelicot: #d93a26;
  --chocolat: #34211a;
  --texte: #2b2420;
  --serif: 'Young Serif', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--texte);
  background: var(--coton);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 3px; }
.wrap { width: min(1200px, 100% - 2rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; border: 2px solid currentColor;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; background: transparent; color: inherit;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); }
.btn-solid { background: var(--chocolat); border-color: var(--chocolat); color: #fff; }
.btn-messenger { background: #0a84ff; border-color: #0a84ff; color: #fff; }
.btn-wa { background: #1c9d52; border-color: #1c9d52; color: #fff; }
.btn-moutarde { background: var(--moutarde); border-color: var(--moutarde); color: var(--chocolat); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.95rem; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(242, 244, 238, 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(43, 36, 32, 0.08); }
.header-in { display: flex; align-items: center; gap: 1.5rem; padding: 0.65rem 0; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-family: var(--serif); font-size: 1.5rem; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--mousse); }
.nav { display: flex; gap: 1.6rem; }
.nav a { text-decoration: none; font-weight: 500; padding: 0.3rem 0; background: linear-gradient(var(--coquelicot), var(--coquelicot)) left bottom / 0 3px no-repeat; transition: background-size 0.3s var(--ease); }
.nav a:hover { background-size: 100% 3px; }
.header-cta { display: flex; gap: 0.5rem; }

/* Photos : cadre, contour brodé, inclinaison */
.photo {
  --r: 28px;
  position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease-out;
}
.photo::before {
  content: ''; position: absolute; inset: -14px; border: 3px dashed var(--ink, var(--texte));
  border-radius: var(--r); opacity: 0; pointer-events: none;
  transition: inset 0.5s var(--ease), opacity 0.6s 0.4s;
}
.photo.in::before { opacity: 0.65; }
.photo:hover::before { inset: -22px; }
.frame { position: relative; width: 100%; height: 100%; border-radius: var(--r); overflow: hidden; background: rgba(0, 0, 0, 0.12); }
.frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 20;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 55%);
}
.photo:hover .frame::after { opacity: 1; }
.layers { position: absolute; inset: 0; }
.frame { cursor: zoom-in; }
.frame img { transition: scale 0.8s var(--ease); }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.layer:first-child { z-index: 1; }
.layer.crop-top { object-position: 50% 0; }
.piece .photo.wide { aspect-ratio: 581 / 247; }
@keyframes wipe {
  from { clip-path: circle(0% at var(--wx, 50%) var(--wy, 50%)); }
  to { clip-path: circle(150% at var(--wx, 50%) var(--wy, 50%)); }
}
.layer.wipe { animation: wipe 0.85s cubic-bezier(0.6, 0, 0.2, 1); }

.js .reveal .frame { clip-path: circle(0% at 50% 50%); transition: clip-path 1.3s var(--ease); }
.js .reveal.in .frame { clip-path: circle(78% at 50% 50%); }

.arch, .round, .soft, .blob { --r: 30px; }

/* Hero */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 6rem); overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.4rem); max-width: 15ch; }
.lede { margin-top: 1.5rem; max-width: 34rem; font-size: 1.15rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.6rem 0 0; }
.facts li { padding: 0.35rem 0.9rem; border-radius: 999px; background: #fff; border: 1.5px solid rgba(43, 36, 32, 0.15); font-size: 0.95rem; font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.cluster { position: relative; width: 100%; max-width: 680px; aspect-ratio: 1 / 0.98; margin-inline: auto; }
.thread { position: absolute; left: -14%; top: -6%; width: 128%; height: 110%; z-index: 0; pointer-events: none; overflow: visible; }
.thread path { fill: none; stroke: var(--coquelicot); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 3.4s 0.2s var(--ease) forwards; }
.thread .ball { fill: var(--coquelicot); opacity: 0; animation: fadein 0.6s 0.1s forwards; }
.thread .ball-line { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 3; stroke-linecap: round; opacity: 0; animation: fadein 0.6s 0.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

.slot {
  position: absolute; z-index: 1;
  translate: calc(var(--px, 0) * var(--depth, 0) * 1px) calc(var(--py, 0) * var(--depth, 0) * 1px);
  animation: pop 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) var(--d) both, float var(--fd, 7s) ease-in-out calc(var(--d) + 1s) infinite;
}
@keyframes pop { from { opacity: 0; scale: 0.55; rotate: -10deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.slot-a { left: 20%; top: 0; width: 66%; aspect-ratio: 1; --d: 0.7s; --depth: 14; --fd: 8s; }
.slot-b { left: 0; bottom: 0; width: 40%; aspect-ratio: 1; --d: 1.1s; --depth: -22; --fd: 6.5s; }
.slot-c { right: 0; bottom: 4%; width: 36%; aspect-ratio: 1; --d: 1.5s; --depth: 28; --fd: 7.5s; }
.slot .photo { width: 100%; height: 100%; }
.slot-a .photo::before, .slot-b .photo::before, .slot-c .photo::before { opacity: 0.65; transition-delay: 0s; }

/* Bandeau photos */
.marquee { background: var(--moutarde); color: var(--chocolat); overflow: hidden; padding: 1.1rem 0; }
.track { display: flex; align-items: center; gap: 2.2rem; width: max-content; animation: scroll 50s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--chocolat); flex: none; transition: transform 0.4s var(--ease); }
.track img:nth-of-type(odd) { rotate: -6deg; }
.track img:nth-of-type(even) { rotate: 6deg; }
.track img:hover { transform: scale(1.2) rotate(8deg); }
.track span { font-family: var(--serif); font-size: 2rem; white-space: nowrap; }
.track .x { font-size: 1.6rem; opacity: 0.6; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Créations */
.creations { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-head { max-width: 42rem; }
.section-head p { margin-top: 1rem; font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.8rem 0 2.5rem; }
.chip { padding: 0.5rem 1.15rem; border-radius: 999px; border: 2px solid var(--chocolat); background: transparent; color: var(--chocolat); font: inherit; font-weight: 500; cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.2s; }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed='true'] { background: var(--chocolat); color: #fff; }

.pieces { display: grid; gap: 2rem; }
.piece {
  display: grid; grid-template-columns: 1.3fr 0.9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--bg); color: var(--ink); border-radius: 36px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.piece[hidden] { display: none; }
.piece.flip { grid-template-columns: 0.9fr 1.3fr; }
.piece.flip .photo-col { order: 2; }
.photo-col { display: flex; align-items: center; justify-content: center; padding: 0.9rem; }
.photo-col > div { width: 100%; }
.piece .photo { width: 100%; max-width: 620px; aspect-ratio: 1; }
.piece h3 { font-size: clamp(2rem, 4vw, 3.4rem); }
.piece .desc { margin-top: 1rem; max-width: 32rem; font-size: 1.1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.3rem 0 0; }
.tags li { border: 1.5px solid currentColor; border-radius: 999px; padding: 0.25rem 0.85rem; font-size: 0.92rem; }
.buy-row { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.8rem; }
.price { font-family: var(--serif); font-size: 2.6rem; line-height: 1; }
.p-frog { --bg: #2f5d34; --ink: #f7f3e6; }
.p-pug { --bg: #c8321f; --ink: #fff4e8; }
.p-snail { --bg: #f2b21b; --ink: #2a1a12; }
.p-totoro { --bg: #2e5e8c; --ink: #f3f6fa; }
.p-neko { --bg: #34211a; --ink: #f6e7d0; }
.p-cushion { --bg: #cfe3b8; --ink: #1f3a22; }

.angle-btn { margin-top: 1.4rem; }
.variants { display: flex; gap: 0.9rem; margin-top: 1.4rem; flex-wrap: wrap; }
.variant { display: grid; justify-items: center; gap: 0.35rem; width: 92px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 0.82rem; line-height: 1.2; cursor: pointer; text-align: center; }
.variant img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid transparent; outline: 2px dashed transparent; outline-offset: 3px; opacity: 0.7; transition: transform 0.3s var(--ease), opacity 0.3s, outline-color 0.3s; }
.variant:hover img { transform: scale(1.08) rotate(-4deg); opacity: 1; }
.variant[aria-pressed='true'] img { opacity: 1; outline-color: var(--ink); }
.variant[aria-pressed='true'] { font-weight: 600; }

/* Atelier */
.atelier { padding: clamp(4rem, 9vw, 7rem) 0; }
.atelier-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.atelier h2 { max-width: 16ch; }
.commit { margin-top: 2.2rem; display: grid; gap: 1.6rem; max-width: 36rem; }
.commit h3 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.commit div { padding-left: 1.2rem; border-left: 4px solid var(--moutarde); }
.swing-wrap { display: grid; place-items: center; padding: 1.5rem; }
.swing { width: min(100%, 460px); aspect-ratio: 1; transform-origin: 50% -30px; animation: swing 6s ease-in-out infinite; }
@keyframes swing { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }

/* Sur mesure */
.mesure { background: var(--mousse); color: #f7f3e6; padding: clamp(4rem, 9vw, 7rem) 0; }
.mesure-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.mesure h2 { max-width: 12ch; }
.mesure .lede { color: #e6eedb; }
.mesure .photo { --ink: #f7f3e6; width: min(100%, 440px); aspect-ratio: 1; margin: 2.5rem 0 0 1.2rem; }
.form-card { background: var(--coton); color: var(--texte); border-radius: 30px; padding: clamp(1.4rem, 3.5vw, 2.4rem); display: grid; gap: 1.1rem; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field select, .field input, .field textarea { width: 100%; padding: 0.75rem 0.9rem; border: 2px solid #ccd5c3; border-radius: 14px; background: #fff; font: inherit; color: inherit; }
.field select:focus, .field input:focus, .field textarea:focus { outline: 3px solid var(--moutarde); border-color: var(--mousse); }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 0.3rem; }

/* Boutique */
.namur { background: var(--coquelicot); color: #fff; padding: clamp(4rem, 9vw, 6.5rem) 0; overflow: hidden; }
.namur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.namur p { margin: 1.2rem 0 1.8rem; max-width: 30rem; font-size: 1.12rem; }
.fan { position: relative; height: 340px; }
.fan img {
  position: absolute; left: 50%; top: 50%; width: min(210px, 42vw); aspect-ratio: 1; object-fit: cover; border-radius: 24px;
  border: 6px solid #fff; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3); translate: -50% -50%;
  transition: transform 1s cubic-bezier(0.2, 0.9, 0.2, 1.15), z-index 0s;
}
.fan img:nth-child(1) { transform: rotate(-3deg); }
.fan img:nth-child(2) { transform: rotate(2deg); }
.fan img:nth-child(3) { transform: rotate(4deg); }
.fan.in img:nth-child(1) { transform: translateX(-64%) rotate(-9deg); }
.fan.in img:nth-child(2) { transform: translateY(-7%) rotate(2deg); }
.fan.in img:nth-child(3) { transform: translateX(64%) rotate(10deg); }
.fan.in img:hover { z-index: 5; transform: translateY(-14px) scale(1.08) rotate(0deg); }

.site-footer { background: var(--chocolat); color: #f6e7d0; padding: 2.2rem 0 6rem; }
.footer-in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.footer-in nav { display: flex; gap: 1.4rem; }
.footer-in .brand { margin: 0; }

.quickbar { display: none; }

@media (max-width: 900px) {
  .hero-grid, .atelier-grid, .mesure-grid, .namur-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .cluster { max-width: 440px; }
  .piece, .piece.flip { grid-template-columns: 1fr; border-radius: 28px; }
  .piece.flip .photo-col { order: 0; }
  .nav { display: none; }
  .mesure .photo { margin-left: 0; }
}
@media (max-width: 760px) {
  .header-cta .btn-fb { display: none; }
  .quickbar { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; position: fixed; inset: auto 0.75rem 0.75rem; z-index: 60; }
  .quickbar .btn { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }
  .form-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .thread path { stroke-dashoffset: 0; }
  .thread .ball, .thread .ball-line { opacity: 1; }
  .js .reveal .frame { clip-path: none; }
  .fan img:nth-child(1) { transform: translateX(-64%) rotate(-9deg); }
  .fan img:nth-child(2) { transform: translateY(-7%) rotate(2deg); }
  .fan img:nth-child(3) { transform: translateX(64%) rotate(10deg); }
  .marquee { overflow-x: auto; }
}

/* Progression : le fil rouge */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 70; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--coquelicot); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); border-radius: 0 4px 4px 0; }

/* Bouton d'agrandissement */
.zoom-btn { position: absolute; right: 12px; bottom: 12px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: var(--chocolat); cursor: zoom-in; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); transition: transform 0.25s var(--ease); }
.zoom-btn:hover { transform: scale(1.12); }
.zoom-btn svg { width: 22px; height: 22px; }

/* Galerie */
.galerie { padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem); background: #e6ebdf; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-top: 2rem; grid-auto-flow: dense; }
.g { position: relative; display: block; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: #cbd3c1; }
.g-big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.g-wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.g img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 0.7s var(--ease); }
.g img.top { object-position: 50% 0; }
.g:hover img, .g:focus-visible img { scale: 1.08; }
.g span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem 1rem 0.8rem; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(20, 14, 10, 0.72)); translate: 0 100%; transition: translate 0.4s var(--ease); }
.g:hover span, .g:focus-visible span { translate: 0 0; }
.js .gallery .g { opacity: 0; scale: 0.92; transition: opacity 0.7s var(--ease) calc(var(--gi, 0) * 70ms), scale 0.7s var(--ease) calc(var(--gi, 0) * 70ms); }
.js .gallery.in .g { opacity: 1; scale: 1; }

/* FAQ */
.faq { padding: clamp(4rem, 8vw, 6rem) 0; }
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq h2 { max-width: 12ch; }
.faq-list { display: grid; gap: 0.7rem; }
.faq details { background: #fff; border: 2px solid rgba(43, 36, 32, 0.12); border-radius: 20px; padding: 0 1.3rem; transition: border-color 0.3s; }
.faq details[open] { border-color: var(--mousse); }
.faq summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font-weight: 600; font-size: 1.1rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; translate: 0 -50%; font-size: 1.6rem; font-weight: 400; transition: rotate 0.3s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 0 1.2rem; max-width: 40rem; }

/* Agrandissement */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(20, 14, 10, 0.92); backdrop-filter: blur(8px); }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 0.8rem; }
.lb-img { border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); object-fit: contain; background: #111; }
.lb-img.swap { animation: lbswap 0.45s var(--ease); }
@keyframes lbswap { from { opacity: 0; scale: 0.94; } to { opacity: 1; scale: 1; } }
.lightbox figcaption { color: #f6e7d0; display: flex; gap: 1rem; align-items: baseline; font-size: 1.05rem; }
.lb-count { opacity: 0.6; font-size: 0.9rem; }
.lightbox button { border: 0; background: rgba(255, 255, 255, 0.94); color: var(--chocolat); cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; position: absolute; transition: transform 0.2s; }
.lightbox button:hover { transform: scale(1.1); }
.lb-close { top: 18px; right: 18px; }
.lb-nav { top: 50%; margin-top: -24px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lightbox.single .lb-nav { display: none; }

@media (max-width: 900px) {
  .faq-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) { .nav { gap: 1rem; } .nav a { font-size: 0.95rem; } }
@media (prefers-reduced-motion: reduce) {
  .js .gallery .g { opacity: 1; scale: 1; }
}
