/* PLK & Associés — Puzzle RDC (site unique : éditions enfant et adulte)
   Palette : papier crème, encre, et les couleurs de la carte (bleu ciel RDC, jaune, rouge, vert forêt). */
:root {
  --paper: #F6F1E7;
  --paper-2: #EFE7D8;
  --card: #FFFDF8;
  --ink: #15130F;
  --ink-2: #4A453C;
  --ink-3: #6B6457;
  --lime: #E5EF5F;  /* jaune-vert de l'édition adulte */
  --line: rgba(21, 19, 15, .1);
  --sky: #0A84D6;
  --sun: #F4C430;
  --flame: #B42318;
  --leaf: #2F8F4E;
  --wa: #15803D;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --r-lg: 28px;
  --r-md: 18px;
  --shadow: 0 1px 2px rgba(21,19,15,.06), 0 12px 32px -12px rgba(21,19,15,.18);
  --wrap: min(1180px, 100% - 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* l'attribut hidden doit toujours gagner sur display:grid/flex */
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 10px; z-index: 100; }
.skip:focus { top: 1rem; }

/* ---------- Typo ---------- */
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .9rem; }
.display {
  font-family: var(--serif); font-weight: 400; margin: 0 0 1.4rem;
  font-size: clamp(2.9rem, 6.4vw, 5.6rem); line-height: .98; letter-spacing: -0.025em;
}
.display em { font-style: italic; color: var(--sky); }
.title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 34rem; margin: 0 0 2rem; }
.sub { color: var(--ink-2); max-width: 38rem; margin: 1rem 0 0; }
.muted { color: var(--ink-3); }

/* ---------- Boutons ---------- */
.btn {
  --bg: var(--card); display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: 0 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--bg); color: var(--ink); font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-ink { --bg: var(--ink); color: var(--paper); }
.btn-wa { --bg: var(--wa); color: #fff; }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-sm { min-height: 40px; padding: 0 1.1rem; font-size: .9375rem; }
.btn-lg { min-height: 56px; padding: 0 2rem; font-size: 1.0625rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: #2B2721; }
  .btn-wa:hover { background: #116B33; }
  .btn-ghost:hover { background: rgba(21,19,15,.05); }
}

/* ---------- Navigation translucide ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding-top: env(safe-area-inset-top); transition: background-color 300ms ease, box-shadow 300ms ease; }
.nav.scrolled {
  background: rgba(246, 241, 231, .72);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--line);
}
.nav-in { width: var(--wrap); margin: 0 auto; height: 72px; display: flex; align-items: center; gap: 2rem; }
.brand img { height: 42px; width: auto; }
.links { display: flex; gap: 1.8rem; margin-left: auto; font-size: .9375rem; font-weight: 500; }
.links a { text-decoration: none; color: var(--ink-2); transition: color 200ms ease; }
.links a:hover { color: var(--ink); }
@media (max-width: 820px) { .links { display: none; } .nav-in > .btn { margin-left: auto; } }

/* ---------- Sections ---------- */
.section { width: var(--wrap); margin: 0 auto; padding: clamp(4.5rem, 10vw, 8rem) 0 0; }
.head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

/* ---------- Hero ---------- */
.hero {
  width: var(--wrap); margin: 0 auto; min-height: 100svh; padding: 110px 0 3rem;
  display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 2rem;
}
.cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.chips { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { font-size: .875rem; color: var(--ink-2); padding: .4rem .9rem; border-radius: 999px; background: var(--paper-2); }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 100px; min-height: auto; text-align: left; }
  .stage { order: -1; }
}

/* ---------- Boîte 3D ---------- */
.stage {
  --w: min(440px, 78vw); --h: calc(var(--w) * .75); --d: calc(var(--w) * .13);
  position: relative; height: calc(var(--h) + 180px); display: grid; place-items: center;
  perspective: 1400px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
}
.stage.dragging { cursor: grabbing; }
.scene { position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; }
.box { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; transform: rotateX(14deg) rotateY(-24deg); }
.face { position: absolute; left: 50%; top: 50%; backface-visibility: hidden; overflow: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.front, .back { width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2); border-radius: 6px; }
.front { transform: translateZ(calc(var(--d) / 2)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.front::after { /* reflet de lumière */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.35), rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(255,255,255,.12));
}
.back { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.left, .right { width: var(--d); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--d) / -2); display: grid; place-items: center; }
.right { transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); background: var(--sun); }
.left { transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); background: var(--sky); color: #fff; }
.left span, .right span { writing-mode: vertical-rl; font: 700 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.right span { color: var(--ink); }
.top, .bottom { width: var(--w); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--w) / -2); }
.top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); background: var(--ink); display: grid; place-items: center; }
.top img { width: auto; height: 64%; object-fit: contain; }
.bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); background: #2a2621; }

.pc { position: absolute; width: clamp(52px, 8vw, 78px); will-change: transform; }
.pc path { stroke: rgba(255,255,255,.55); stroke-width: 1.5; }
.pc1 { left: -12%; top: 6%;  } .pc1 path { fill: var(--flame); }
.pc2 { right: -10%; top: -8%; } .pc2 path { fill: var(--leaf); }
.pc3 { right: -4%; bottom: -12%; } .pc3 path { fill: var(--sun); }
.pc4 { left: 2%; bottom: -16%; } .pc4 path { fill: var(--sky); }

.shadow {
  position: absolute; left: 50%; bottom: 46px; width: calc(var(--w) * .9); height: 40px; margin-left: calc(var(--w) * -.45);
  background: radial-gradient(closest-side, rgba(21,19,15,.28), transparent); filter: blur(6px); will-change: transform;
}
.hint { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: .8125rem; color: var(--ink-3); margin: 0; transition: opacity 400ms ease; }
.stage.touched .hint { opacity: 0; }

/* ---------- Slider ---------- */
.slider { position: relative; width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; padding: 12px 0 8px; }
.slider-ui { padding: 0 1rem; }
.track { display: flex; gap: 1.25rem; touch-action: pan-y; cursor: grab; will-change: transform; user-select: none; -webkit-user-select: none; }
.track.dragging { cursor: grabbing; }
.slide {
  position: relative; flex: 0 0 min(860px, 86%); margin: 0; aspect-ratio: 4 / 3;
  border-radius: var(--r-lg); overflow: hidden; background: var(--card); box-shadow: var(--shadow);
  transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out);
}
.slide:not(.active) { opacity: .45; transform: scale(.96); }
.slide > img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.slide figcaption {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem; max-width: 30rem;
  padding: .85rem 1.1rem; border-radius: 16px; font-size: .9375rem; color: var(--ink-2);
  background: rgba(255, 253, 248, .78); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
}
.slide figcaption b { display: block; color: var(--ink); font-size: 1rem; }
.slide-video { display: grid; place-items: center; background: #0e0c0a; }
.vid-bg { position: absolute; inset: -40px; }
.vid-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(40px) saturate(1.4) brightness(.75); }
.phone {
  position: relative; height: 88%; aspect-ratio: 480 / 848; border-radius: 26px; overflow: hidden;
  box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 30px 60px -20px rgba(0,0,0,.6);
}
.phone video { width: 100%; height: 100%; object-fit: cover; }
.slide-video figcaption { right: auto; }
.vid-btn {
  position: absolute; right: 12px; top: 12px; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 160ms var(--ease-out);
}
.vid-btn:active { transform: scale(.92); }
.vid-btn svg { width: 22px; fill: #fff; }
.vid-btn .i-on, .vid-btn[aria-pressed="true"] .i-off { display: none; }
.vid-btn[aria-pressed="true"] .i-on { display: inline; }
.slider-ui { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.arrow {
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; transition: transform 160ms var(--ease-out), opacity 200ms ease;
}
.arrow:active { transform: scale(.94); }
.arrow:disabled { opacity: .35; cursor: default; }
.arrow svg { width: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dots { display: flex; gap: .5rem; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(21,19,15,.2); cursor: pointer; transition: width 300ms var(--ease-out), background-color 200ms ease; }
.dots button[aria-selected="true"] { width: 26px; background: var(--ink); }
@media (max-width: 640px) { .slide { flex-basis: 92%; aspect-ratio: 3 / 4; } .slide > img { object-fit: contain; background: var(--card); } }

/* ---------- Chiffres ---------- */
.numbers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; }
.numbers li { background: var(--paper); padding: 2rem 1.25rem; }
.numbers b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.numbers span { color: var(--ink-3); font-size: .9375rem; }
@media (max-width: 720px) { .numbers ul { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Le savais-tu ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.fact {
  background: var(--card); border-radius: var(--r-md); padding: 1.5rem 1.4rem 1.6rem; box-shadow: var(--shadow);
  transition: transform 500ms var(--ease-out), box-shadow 300ms ease;
}
.fact img { width: 92px; height: 92px; border-radius: 50%; margin-bottom: 1.1rem; }
.fact h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5rem; }
.fact p { margin: 0; font-size: .9375rem; color: var(--ink-2); line-height: 1.55; }
.fact.tilting { transition: transform 120ms linear; }
@media (max-width: 1000px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .fact { display: grid; grid-template-columns: 72px 1fr; column-gap: 1rem; } .fact img { width: 72px; height: 72px; grid-row: span 2; margin: 0; } }

/* ---------- Brochure ---------- */
.brochure { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.bro-visual { position: relative; aspect-ratio: 4 / 3.4; perspective: 1600px; }
.sheet { position: absolute; width: 78%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 6px rgba(21,19,15,.08), 0 30px 50px -24px rgba(21,19,15,.35); background: #fff; transition: transform 700ms var(--ease-out); }
.sheet img { width: 100%; height: 100%; object-fit: cover; }
.s1 { left: 0; top: 18%; transform: rotateY(18deg) rotateX(6deg) rotateZ(-4deg); }
.s2 { left: 12%; top: 9%; transform: rotateY(18deg) rotateX(6deg) rotateZ(1deg) translateZ(-60px); }
.s3 { left: 24%; top: 0; transform: rotateY(18deg) rotateX(6deg) rotateZ(6deg) translateZ(-120px); }
@media (hover: hover) and (pointer: fine) {
  .bro-visual:hover .s1 { transform: rotateY(6deg) rotateX(2deg) rotateZ(-6deg) translateX(-6%); }
  .bro-visual:hover .s3 { transform: rotateY(6deg) rotateX(2deg) rotateZ(9deg) translateX(8%) translateZ(-120px); }
}
@media (max-width: 860px) { .brochure { grid-template-columns: 1fr; } }

/* ---------- Commande ---------- */
.order-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1.5rem; align-items: start; }
.summary { background: var(--card); border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--shadow); position: sticky; top: 96px; }
.summary > img { border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
.summary h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.15; margin: 1.1rem 0 .3rem; }
.summary .muted { margin: 0 0 1rem; font-size: .9375rem; }
.summary dl { margin: 0; border-top: 1px solid var(--line); }
.summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.summary dt { color: var(--ink-3); }
.summary dd { margin: 0; text-align: right; font-weight: 500; }
.summary .total dd { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.secure { display: flex; gap: .6rem; align-items: flex-start; font-size: .8125rem; color: var(--ink-3); margin: 1rem 0 0; }
.secure svg { flex: none; width: 18px; fill: var(--leaf); }

.form-wrap { background: var(--card); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow); }
.form { display: grid; gap: 1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.f { display: grid; gap: .35rem; }
.f > span, .pref legend { font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.f i { font-weight: 400; color: var(--ink-3); font-style: normal; }
.f input, .f select, .f textarea, .stepper {
  width: 100%; min-height: 50px; padding: .7rem .95rem; border-radius: 14px; border: 1.5px solid transparent;
  background: var(--paper); transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease; font-size: 1rem;
}
.f textarea { resize: vertical; min-height: 96px; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(10,132,214,.12); }
.f.invalid input, .f.invalid select { border-color: var(--flame); background: #fff6f3; }
em[data-err] { font-style: normal; font-size: .8125rem; color: var(--flame); min-height: 0; }
em[data-err]:empty { display: none; }
.stepper { display: flex; align-items: center; padding: 4px; gap: 4px; }
.stepper input { min-height: 40px; border: 0; background: transparent; text-align: center; padding: 0; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.stepper input:focus { box-shadow: none; background: transparent; }
.stepper button { flex: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--card); font-size: 1.25rem; cursor: pointer; transition: transform 120ms var(--ease-out); }
.stepper button:active { transform: scale(.9); }
.pref { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; }
.pref legend { float: left; margin-right: .5rem; }
.pref label, .consent { display: flex; gap: .5rem; align-items: center; font-size: .9375rem; cursor: pointer; }
.consent { align-items: flex-start; color: var(--ink-2); }
.pref input, .consent input { accent-color: var(--ink); width: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; font-size: .9375rem; color: var(--flame); }
.form-msg:empty { display: none; }
[data-submit] { width: 100%; position: relative; }
[data-submit].loading span { opacity: 0; }
[data-submit].loading::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(246,241,231,.3); border-top-color: var(--paper); animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.alt { margin: 0; text-align: center; font-size: .9375rem; color: var(--ink-3); }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.success { text-align: center; padding: 2rem 0; display: grid; justify-items: center; gap: .3rem; }
.success[hidden] { display: none; }
.success h3 { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; margin: .5rem 0 0; }
.success p { margin: .2rem 0; }
.success .btn { margin-top: 1rem; }
.check { width: 72px; }
.check circle { fill: none; stroke: var(--leaf); stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; }
.check path { fill: none; stroke: var(--leaf); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; }
.success.show .check circle { transition: stroke-dashoffset 600ms var(--ease-out); stroke-dashoffset: 0; }
.success.show .check path { transition: stroke-dashoffset 400ms var(--ease-out) 350ms; stroke-dashoffset: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.c-card { display: grid; gap: .35rem; align-content: start; padding: 1.6rem; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); text-decoration: none; transition: transform 300ms var(--ease-out); }
a.c-card:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { a.c-card:hover { transform: translateY(-4px); } }
.c-card b { font-size: 1.1rem; }
.c-card > span:last-child { color: var(--ink-2); font-size: .9375rem; overflow-wrap: anywhere; }
.c-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--paper-2); margin-bottom: .6rem; }
.c-ic svg { width: 24px; fill: var(--ink); }
.c-card.wa .c-ic { background: var(--wa); } .c-card.wa .c-ic svg { fill: #fff; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.foot { width: var(--wrap); margin: clamp(5rem, 10vw, 8rem) auto 0; padding: 3rem 0 calc(3rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 1rem; font-size: .9375rem; color: var(--ink-2); }
.foot img { height: 60px; width: auto; }
.foot p { margin: 0; }

.wa-float {
  position: fixed; right: max(1.1rem, env(safe-area-inset-right)); bottom: max(1.1rem, env(safe-area-inset-bottom)); z-index: 40;
  width: 60px; height: 60px; border-radius: 50%; background: var(--wa); display: grid; place-items: center;
  box-shadow: 0 10px 30px -6px rgba(21,128,61,.5); transition: transform 200ms var(--ease-out);
}
.wa-float svg { width: 30px; fill: #fff; }
.wa-float:active { transform: scale(.92); }

/* ---------- Apparitions au scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { transform: none; transition: opacity 300ms ease; }
  .slide, .slide:not(.active) { transform: none; }
  .sheet, .fact { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav.scrolled, .slide figcaption { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 640px) {
  .pc1 { left: -4%; } .pc2 { right: -2%; } .pc3 { right: 2%; } .pc4 { left: 4%; }
}

/* ---------- Stock ---------- */
.avail { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.avail-ok, .avail-untracked { color: #15803D; }
.avail-low { color: #9A5B00; }
.avail-soldout { color: #B42318; }
.soldout-panel { text-align: center; padding: 2.5rem 1rem; display: grid; justify-items: center; gap: .5rem; }
.soldout-panel h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; margin: 0; }
.soldout-panel p { margin: 0; max-width: 26rem; }
.soldout-panel .btn { margin-top: 1rem; }

/* ================= Blocs repris de l’édition adulte ================= */
.slide-contain { background: var(--paper-2); }
.slide-contain > img { object-fit: contain; padding: 2.5% 0 5%; }

/* Fiche culture */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.theme {
  position: relative; background: var(--card); border-radius: var(--r-md); padding: 1.6rem 1.5rem 1.7rem; box-shadow: var(--shadow);
  transition: transform 500ms var(--ease-out), box-shadow 300ms ease; overflow: hidden;
}
.theme::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--lime); }
.theme.tilting { transition: transform 120ms linear; }
.theme-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--lime); display: grid; place-items: center; margin-bottom: 1.1rem; }
.theme-ic svg { width: 26px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-n { position: absolute; top: 1.4rem; right: 1.5rem; font-family: var(--serif); font-size: 1.1rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.theme h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5rem; }
.theme p { margin: 0; font-size: .9375rem; color: var(--ink-2); line-height: 1.55; }
@media (max-width: 1000px) { .themes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .themes { grid-template-columns: 1fr; } }

/* Comment jouer */
.play { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.play-visual { position: relative; perspective: 1400px; }
.play-visual img {
  width: 100%; height: auto; border-radius: 12px; background: #fff;
  box-shadow: 0 2px 6px rgba(21,19,15,.08), 0 30px 50px -24px rgba(21,19,15,.35);
  transform: rotateY(14deg) rotateZ(-2deg); transition: transform 700ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .play-visual:hover img { transform: rotateY(4deg) rotateZ(-1deg); } }
.play .head { margin-bottom: 2rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 1.1rem; align-items: start; }
.step-n { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps h3 { margin: .2rem 0 .25rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: .9375rem; }
.tip { margin: 2rem 0 0; padding: 1rem 1.2rem; border-radius: 14px; background: var(--lime); font-size: .9375rem; }
@media (max-width: 860px) { .play { grid-template-columns: 1fr; } .play-visual { max-width: 380px; } }

.sister { margin: 1rem 0 0; font-size: .875rem; color: var(--ink-2); }

/* Mobile : pas de flou sur les légendes qui bougent avec le carrousel (fluidité sur téléphones d'entrée de gamme) */
@media (max-width: 640px) {
  .slide figcaption { background: rgba(255, 253, 248, .94); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) { .theme, .play-visual img { transition: none; } }


/* ================= Site unique : les deux éditions ================= */
.eds { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.ed { background: var(--card); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr;
  transition: transform 500ms var(--ease-out); }
.ed.tilting { transition: transform 120ms linear; }
.ed-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.ed-img img { width: 100%; height: 100%; object-fit: cover; }
.ed-body { padding: 1.5rem 1.6rem 1.6rem; display: flex; flex-direction: column; }
.ed-tag { margin: 0 0 .5rem; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ed-enfant .ed-tag { color: var(--sky); }
.ed-adulte .ed-tag { color: #2E6B2F; }
.ed h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
.ed-title { color: var(--ink-2); margin: .4rem 0 1rem; }
.ed ul { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .5rem; }
.ed li { position: relative; padding-left: 1.4rem; color: var(--ink-2); font-size: .9375rem; }
.ed li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--sky); }
.ed-adulte li::before { background: #2E6B2F; }
.ed-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.ed-foot > div { display: grid; gap: .2rem; }
.ed-price { font-weight: 600; font-size: .9375rem; }
@media (max-width: 860px) { .eds { grid-template-columns: 1fr; } }

/* Onglets segmentés (style iOS) */
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--paper-2); margin-bottom: 2rem; }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: .7rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .9375rem; color: var(--ink-2); cursor: pointer; transition: color 200ms ease; min-width: 9.5rem; }
.seg button[aria-selected="true"] { color: var(--ink); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--card);
  box-shadow: 0 1px 2px rgba(21,19,15,.08), 0 4px 12px -4px rgba(21,19,15,.18); transition: transform 380ms var(--ease-out); }
.seg[data-active="1"] .seg-thumb { transform: translateX(100%); }
.panel-t { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 0 0 1.1rem; }
.panel.entering { animation: panel-in 420ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }

/* Récapitulatif et lignes de commande */
.sum-line { display: grid; grid-template-columns: 76px 1fr auto; gap: .9rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.sum-line:first-child { padding-top: 0; }
.sum-line img { width: 76px; height: 57px; object-fit: cover; border-radius: 10px; }
.sum-line div { display: grid; gap: .1rem; font-size: .9375rem; }
.sum-line .muted { font-size: .8125rem; }
.sum-line .avail { font-size: .8125rem; }
.sum-price { font-size: .875rem; font-weight: 600; text-align: right; max-width: 7.5rem; }
.summary dl { margin-top: .4rem; border-top: none; }
.lines { border: 0; margin: 0 0 .4rem; padding: 0; display: grid; gap: .6rem; }
.lines legend { font-size: .875rem; font-weight: 600; color: var(--ink-2); margin-bottom: .6rem; padding: 0; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; padding: .7rem; border-radius: 16px; background: var(--paper); }
.line img { width: 64px; height: 48px; object-fit: cover; border-radius: 9px; }
.line-t { display: grid; gap: .1rem; }
.line-t .avail { font-size: .8125rem; }
.line .stepper { width: 9.5rem; background: var(--card); }
.line > em { grid-column: 1 / -1; }
.line.is-out { opacity: .75; }
.line.is-out img { filter: grayscale(1); }
.notify { font-weight: 600; font-size: .9375rem; color: var(--wa); }
@media (max-width: 480px) { .line { grid-template-columns: 52px 1fr; } .line img { width: 52px; height: 39px; } .line .stepper, .line .notify { grid-column: 1 / -1; width: 100%; } }
@media (prefers-reduced-motion: reduce) { .seg-thumb, .ed { transition: none; } .panel.entering { animation: none; } }

/* Mobile : boutons des éditions pleine largeur (le bouton WhatsApp flottant ne les masque plus), récapitulatif aéré */
@media (max-width: 560px) {
  .ed-foot { flex-direction: column; align-items: stretch; }
  .ed-foot .btn { width: calc(100% - 64px); }
  .sum-line { grid-template-columns: 60px 1fr; }
  .sum-line img { width: 60px; height: 45px; }
  .sum-price { grid-column: 2; text-align: left; max-width: none; color: var(--ink-2); font-weight: 500; }
}

/* ================= Page de paiement ================= */
.pay-page { min-height: 100svh; }
.pay-top { width: var(--wrap); margin: 0 auto; padding: 1.4rem 0; }
.pay-top img { height: 44px; width: auto; }
.pay-wrap { width: min(560px, 100% - 2.5rem); margin: 3vh auto 4rem; }
.pay-card { background: var(--card); border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.4rem); box-shadow: var(--shadow); display: grid; gap: 1rem; }
.pay-card .eyebrow { margin: 0; }
.pay-h { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
.pay-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pay-items li { padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .3rem 0 .6rem; }
.pay-total span { color: var(--ink-2); }
.pay-total b { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pay-qr { margin: .2rem 0 0; display: grid; gap: .6rem; justify-items: center; text-align: center; }
.pay-qr img { width: min(300px, 100%); height: auto; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.pay-qr figcaption { font-size: .8125rem; color: var(--ink-3); max-width: 34ch; }
.pay-qr figcaption a { color: var(--ink); font-weight: 600; }
.pay-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .55rem; font-size: .9375rem; color: var(--ink-2); }
.pay-steps b { color: var(--ink); }
.pay-card > .btn-wa { justify-self: stretch; text-align: center; justify-content: center; }
.pay-msg { margin: 0; color: var(--flame); font-size: .9375rem; }
.pay-msg:empty { display: none; }
.pay-ok { margin: 0; padding: .9rem 1rem; border-radius: 14px; background: #E2F5E8; color: #1D5C34; font-weight: 500; }
.pay-help { font-size: .875rem; color: var(--ink-2); justify-self: center; }
