:root {
  --sand: #D8C6AE; --cream: #F7F3EC; --white: #FAF9F6; --brown: #705644; --taupe: #A99580; --ink: #29251F;
  --serif: "Cormorant Garamond", Georgia, serif; --sans: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1); --pad: clamp(20px, 5vw, 72px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.65 var(--sans); font-variant-numeric: lining-nums; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 em, h2 em { font-weight: 500; color: var(--brown); }
p, figure, dl, dd, ul { margin: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--white); padding: 10px 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 36px; border: 0; border-radius: 999px;
  background: var(--brown); color: var(--white); font: 700 14px var(--sans); letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .3s var(--ease), transform .25s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { background: var(--ink); transform: translateY(-2px); box-shadow: 0 14px 28px -16px rgba(41, 37, 31, .6); }
.btn:disabled { opacity: .65; cursor: progress; transform: none; }
.btn--small { min-height: 44px; padding: 0 22px; font-size: 12px; }
.btn--block { width: 100%; }
.badge { display: inline-block; padding: 7px 16px; border: 1px solid var(--taupe); border-radius: 999px; font: 500 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brown); }
.reassure { font-size: 14px; color: var(--brown); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 10px var(--pad); }
.top img { width: 150px; }

/* Premier écran : sur téléphone la photo, puis titre, prix et bouton */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; padding: 12px var(--pad) 72px; max-width: 1360px; margin: 0 auto; }
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero h1 { font-size: clamp(38px, 5vw, 72px); }
.lead { max-width: 46ch; color: var(--brown); font-size: 19px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.price strong { font: 600 52px/1 var(--serif); white-space: nowrap; }
.price span { font-size: 15px; color: var(--brown); }
.hero__media img { width: 100%; height: min(78svh, 760px); object-fit: cover; border-radius: 999px 999px 24px 24px; }
figcaption { margin-top: 10px; font-size: 13px; color: var(--brown); text-align: center; }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 56px var(--pad); background: var(--white); }
.perk { padding: 28px 22px; border: 1px solid var(--sand); border-radius: 20px; text-align: center; }
.perk svg { width: 34px; height: 34px; margin: 0 auto 12px; display: block; fill: none; stroke: var(--brown); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.perk h2 { font-size: 24px; margin-bottom: 6px; }
.perk p { font-size: 15px; color: var(--brown); }

.gallery { padding: 88px var(--pad); max-width: 1180px; margin: 0 auto; text-align: center; }
.gallery > h2, .why h2, .order h2 { font-size: clamp(34px, 4.4vw, 54px); }
.gallery__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; margin-top: 40px; align-items: start; }
.gallery figure { overflow: hidden; }
.gallery img { width: 100%; border-radius: 20px; object-fit: cover; transition: transform .9s var(--ease); }
.gallery figure:hover img { transform: scale(1.025); }
.g-a { grid-row: span 2; }
.g-a img { aspect-ratio: 3 / 4.4; border-radius: 999px 999px 20px 20px; }
.g-b img { aspect-ratio: 1; }
.g-c img { aspect-ratio: 1; }

.why { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding: 88px var(--pad); background: var(--white); }
.why img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 24px; }
.why ul { list-style: none; margin: 28px 0 32px; }
.why li { display: flex; flex-direction: column; padding: 16px 0; border-top: 1px solid var(--sand); }
.why li strong { font: 600 25px var(--serif); }
.why li span { color: var(--brown); font-size: 16px; }

.offer { margin: 72px var(--pad); padding: 64px 24px; border-radius: 32px; background: var(--sand); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.offer .badge { border-color: var(--ink); color: var(--ink); }
.offer h2 { font-size: 48px; }
.offer__price { font: 600 clamp(68px, 12vw, 112px)/1 var(--serif); white-space: nowrap; }

.order { padding: 56px var(--pad) 96px; max-width: 760px; margin: 0 auto; text-align: center; scroll-margin-top: 8px; }
.order__sub { margin: 10px 0 28px; color: var(--brown); }
.card { text-align: left; background: var(--white); border: 1px solid var(--sand); border-radius: 28px; padding: clamp(20px, 4vw, 40px); box-shadow: 0 30px 60px -44px rgba(41, 37, 31, .5); display: flex; flex-direction: column; gap: 18px; }
.card[hidden], .error[hidden] { display: none; }
label { display: flex; flex-direction: column; gap: 7px; font-weight: 500; font-size: 15px; }
input, select { width: 100%; height: 56px; padding: 0 16px; border: 1px solid var(--sand); border-radius: 14px; background: var(--cream); color: var(--ink); font: 400 16px var(--sans); }
select { appearance: none; background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23705644' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 38px; }
select:disabled { opacity: .55; }
input:focus, select:focus { outline: none; border-color: var(--brown); box-shadow: 0 0 0 4px rgba(112, 86, 68, .14); }
[aria-invalid="true"] { border-color: #9E3B25; }
small, .error { color: #8A2E1B; font-size: 14px; font-weight: 400; }
.error { padding: 12px 14px; background: #F6E6E0; border-radius: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.qty { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 500; font-size: 15px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--sand); border-radius: 999px; background: var(--cream); }
.stepper button { width: 54px; height: 54px; border: 0; background: none; font-size: 24px; color: var(--ink); cursor: pointer; border-radius: 999px; }
.stepper input { width: 56px; height: 52px; padding: 0; border: 0; background: none; text-align: center; font-weight: 700; font-size: 19px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.hp { position: absolute; left: -9999px; }
.sum { border-top: 1px solid var(--sand); }
.sum div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--sand); font-size: 15px; }
.sum dt { color: var(--brown); }
.sum dd { font-weight: 500; text-align: right; }
.sum .sum__total { border: 0; align-items: baseline; padding-top: 14px; }
.sum__total dd { font: 600 34px/1 var(--serif); white-space: nowrap; }
.card .reassure { text-align: center; }
.done { text-align: center; }
.done h3 { font-size: 32px; }

footer { padding: 36px var(--pad) 40px; border-top: 1px solid var(--sand); text-align: center; font-size: 14px; color: var(--brown); }
footer p:first-child { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }

.sticky { display: none; }

.anim [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.anim [data-reveal].in { opacity: 1; transform: none; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .why img { animation: drift linear both; animation-timeline: view(); }
    @keyframes drift { from { object-position: 50% 30%; } to { object-position: 50% 70%; } }
  }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 18px; padding: 0 20px 52px; }
  .hero__media img { height: 34svh; min-height: 230px; object-position: 50% 42%; border-radius: 28px; }
  .hero__media figcaption { margin-top: 6px; font-size: 12px; }
  .hero__text { align-items: center; text-align: center; gap: 12px; }
  .hero h1 { font-size: clamp(32px, 9vw, 46px); }
  .lead { font-size: 16px; }
  .price { justify-content: center; }
  .price strong { font-size: 46px; }
  .hero .btn { width: 100%; }
  .perks { grid-template-columns: 1fr 1fr; gap: 12px; padding: 40px 16px; }
  .perk { padding: 20px 12px; }
  .perk h2 { font-size: 21px; }
  .gallery { padding: 56px 20px; }
  .gallery__grid { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
  .g-a { grid-column: 1 / -1; grid-row: auto; }
  .g-a img { aspect-ratio: 4 / 5; }
  .why { grid-template-columns: 1fr; padding: 56px 20px; }
  .why .btn { width: 100%; }
  .offer { margin: 40px 16px; }
  .offer .btn { width: 100%; padding: 0 16px; }
  .order { padding: 32px 14px 56px; }
  footer { padding-bottom: 110px; }
  .sticky {
    position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--sand);
    transform: translateY(110%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s;
  }
  .sticky.on { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .sticky p { display: flex; flex-direction: column; line-height: 1.1; }
  .sticky strong { font: 600 28px var(--serif); white-space: nowrap; }
  .sticky span { font-size: 12px; color: var(--brown); }
  .sticky .btn { flex: 1; max-width: 220px; min-height: 52px; }
}
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
.price strong, .offer__price, .sum__total dd, .sticky strong { font-variant-numeric: lining-nums; font-weight: 600; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.modes legend { float: left; width: 100%; margin-bottom: 9px; padding: 0; font-weight: 500; font-size: 15px; }
.modes legend + label { clear: left; }
.modes label { flex-direction: row; align-items: center; gap: 10px; min-height: 58px; padding: 10px 14px; border: 1px solid var(--sand); border-radius: 14px; background: var(--cream); cursor: pointer; line-height: 1.3; }
.modes input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brown); }
.modes label:has(:checked) { border-color: var(--brown); background: #fff; box-shadow: 0 0 0 4px rgba(112, 86, 68, .14); }
.modes label:has(:disabled) { opacity: .5; cursor: not-allowed; }
@media (max-width: 480px) { .modes { grid-template-columns: 1fr; } }

/* Le formulaire suit la première photo : sous le premier écran sur ordinateur, juste après la photo sur téléphone */
.hero__text { grid-column: 1; grid-row: 1; }
.hero__media { grid-column: 2; grid-row: 1; }
.hero .order { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 0 0; }
.order__price { margin-top: 8px; font-size: 18px; }
.order__price strong { font: 600 32px var(--serif); font-variant-numeric: lining-nums; white-space: nowrap; }
.order__sub { margin: 4px 0 22px; }
@media (max-width: 860px) {
  .hero__text, .hero__media, .hero .order { grid-column: auto; grid-row: auto; }
  .hero .order { padding: 0; margin: 0 -8px 20px; width: calc(100% + 16px); }
}
.modes legend { grid-column: 1 / -1; margin-bottom: 0; }
.modes legend + label { clear: none; }
