/* Maison Ayla — palette : sable, expresso, or */
:root {
  --sand: #efe7dc;
  --espresso: #2b211b;
  --gold: #8a6a32;
  --paper: #f8f4ee;
  --soft: rgba(43, 33, 27, .7);
  --line: rgba(43, 33, 27, .14);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(18px, 5vw, 64px);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--espresso); font: 400 16.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.04; margin: 0; letter-spacing: -.005em; }
h1 em, h2 em { color: var(--gold); }
h2 { font-size: clamp(34px, 7.6vw, 58px); }
p { margin: 0; }
section[id] { scroll-margin-top: 64px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--pad); }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.muted { color: var(--soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .25s ease, transform .25s ease;
}
.btn svg { width: 21px; height: 21px; flex: none; }
.btn:active { transform: scale(.97); }
.btn-main { background: var(--espresso); color: var(--paper); }
.btn-main:hover { background: #46362c; }
.btn-light { background: var(--paper); color: var(--espresso); }
.btn-big { min-height: 56px; width: 100%; font-size: 17px; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); text-decoration: none; transition: background-color .25s, color .25s; }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--espresso); color: var(--paper); }

.demo-bar { background: var(--espresso); color: var(--sand); font-size: 12.5px; text-align: center; padding: 7px 16px; }

.header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--pad);
  background: rgba(248, 244, 238, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font: 400 24px/1 var(--serif); text-decoration: none; }
.logo em { color: var(--gold); }
.nav { display: none; gap: 30px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; opacity: .78; }
.nav a:hover { opacity: 1; }

/* Accueil */
.hero { display: grid; }
.hero-media { overflow: hidden; }
.hero-media img { width: 100%; height: 38svh; min-height: 250px; object-fit: cover; object-position: 50% 30%; }
.hero-content { padding: 30px var(--pad) 44px; }
.hero h1 { font-size: clamp(40px, 10.6vw, 78px); margin-bottom: 14px; }
.hero-sub { color: var(--soft); font-size: 17px; margin-bottom: 24px; max-width: 30em; }
.trust { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust svg { width: 22px; height: 22px; color: var(--gold); flex: none; }

/* Avant / maintenant */
.switch { padding-bottom: 8px; }
.switch-card { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.switch-card p { padding: 20px 22px; background: var(--sand); font-size: 16px; }
.switch-card p.switch-after { background: var(--espresso); color: var(--paper); }
.switch-card span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; opacity: .7; }
.switch-before { text-decoration: line-through; text-decoration-color: rgba(43, 33, 27, .35); }
.switch-before span { text-decoration: none; }

/* Catalogue */
.collection { padding-block: clamp(64px, 10vw, 120px); }
.section-head { display: grid; gap: 20px; margin-bottom: 30px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--pad) * -1); padding: 2px var(--pad); }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; font-weight: 500; font-size: 15px; cursor: pointer; transition: background-color .25s, color .25s;
}
.filters button[aria-pressed="true"] { background: var(--espresso); color: var(--paper); border-color: var(--espresso); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 12px; }
.grid li[hidden] { display: none; }
.card { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.card-img { position: relative; overflow: hidden; border-radius: 12px; background: var(--sand); margin-bottom: 18px; }
.card-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-img img { transform: scale(1.04); }
.card-badge { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; background: var(--paper); font-size: 12px; font-weight: 600; }
.card-name { display: block; font: 400 20px/1.15 var(--serif); margin-bottom: 4px; }
.card-price { display: block; font-weight: 600; font-size: 15.5px; }
.card-cta { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold); }

/* Livraison */
.delivery { background: var(--sand); padding-block: clamp(64px, 10vw, 120px); }
.delivery-grid { display: grid; gap: 14px; }
.delivery article { padding: 26px 24px; background: var(--paper); border-radius: var(--radius); }
.delivery svg { width: 30px; height: 30px; color: var(--gold); margin-bottom: 14px; }
.delivery h3 { font-size: 26px; margin-bottom: 8px; }
.delivery p { color: var(--soft); }

/* Questions */
.faq { padding-block: clamp(64px, 10vw, 120px); max-width: 900px; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 22px 44px 22px 0; font: 400 23px/1.2 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 300 28px/1 var(--sans); color: var(--gold); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--soft); }

.final { background: var(--espresso); color: var(--paper); text-align: center; padding: clamp(84px, 13vw, 140px) var(--pad); }
.final h2 em { color: #d9b77a; }
.final-content { max-width: 560px; margin: 0 auto; }
.final h2 { margin-bottom: 12px; }
.final p { opacity: .85; margin-bottom: 28px; }

.footer { padding: 34px var(--pad) 190px; font-size: 14px; text-align: center; display: grid; gap: 6px; }
.credit a { font-family: "Instrument Serif", var(--serif); font-style: italic; font-size: 17px; }

/* Fiche produit */
.sheet {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--espresso);
}
.sheet::backdrop { background: rgba(20, 15, 12, .55); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-in .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.sheet-inner { position: relative; display: grid; min-height: 100%; }
.sheet-close {
  position: absolute; right: 14px; top: max(14px, env(safe-area-inset-top)); z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: rgba(248, 244, 238, .92); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}
.sheet-close svg { width: 22px; height: 22px; }
.sheet-media { position: relative; aspect-ratio: 4 / 4.2; background: var(--sand); }
.sheet-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet-close:focus-visible, .card:focus-visible, .filters button:focus-visible { outline: 2px solid var(--espresso); outline-offset: 3px; }
.sheet-body { padding: 24px var(--pad) max(32px, env(safe-area-inset-bottom)); }
.sheet-body h2 { font-size: clamp(34px, 8vw, 48px); margin-bottom: 6px; }
.sheet-price { font-size: 22px; font-weight: 600; margin-bottom: 14px; }
.sheet-desc { color: var(--soft); margin-bottom: 16px; }
.sheet-specs { margin: 0 0 18px; }
.sheet-specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sheet-specs dt { color: var(--soft); }
.sheet-specs dd { margin: 0; font-weight: 500; text-align: right; }
.sheet-qty { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-weight: 500; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 46px; height: 46px; border: 0; background: none; font-size: 22px; cursor: pointer; }
.qty output { min-width: 30px; text-align: center; font-weight: 600; }
.sheet-trust { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--soft); }
.sheet-trust li::before { content: "✓ "; color: var(--gold); font-weight: 600; }

/* Barre de commande fixée en bas de la fiche (téléphone) */
.sheet-bar {
  position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px var(--pad) max(12px, env(safe-area-inset-bottom));
  background: rgba(248, 244, 238, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(43, 33, 27, .08);
}
.sheet-bar-price { display: grid; line-height: 1.15; }
.sheet-bar-price span { font-size: 12.5px; color: var(--soft); }
.sheet-bar-price b { font-size: 20px; font-weight: 600; white-space: nowrap; }
.sheet-bar .btn { flex: 1; max-width: 270px; min-height: 52px; padding: 0 16px; font-size: 15.5px; }
.sheet-order { display: none; }

/* Bouton WhatsApp flottant */
.wa-float { position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 66px); /* au-dessus du badge Netlify */ text-decoration: none; }
.wa-circle { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.wa-circle svg { width: 30px; height: 30px; }
.wa-circle::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; z-index: -1; animation: wa-pulse 2.4s ease-out infinite; }
.wa-float:hover .wa-circle { transform: scale(1.08); }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(1.7); opacity: 0; } }

.anim .reveal, .anim .hero-in { opacity: 0; }
.anim .wa-float { opacity: 0; transform: translateY(20px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wa-circle::before { animation: none; }
  .sheet[open] { animation: none; }
}

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 34px 20px; }
  .delivery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .switch-card { grid-template-columns: 1fr 1fr; }
  .section-head { grid-template-columns: 1fr auto; align-items: end; }
  .filters { margin: 0; padding: 0; }
  .sheet { width: min(980px, 92vw); height: min(640px, 88vh); max-height: 88vh; margin: auto; border-radius: 24px; overflow: hidden; }
  .sheet-inner { grid-template-columns: 1fr 1fr; grid-template-rows: 100%; height: 100%; min-height: 0; }
  .sheet-bar { display: none; }
  .sheet-order { display: inline-flex; }
  .sheet-media { aspect-ratio: auto; height: 100%; }
  .sheet-body { padding: 44px 40px; overflow-y: auto; height: 100%; }
}
@media (min-width: 900px) {
  .nav { display: flex; }
  .hero { grid-template-columns: 1fr 1.05fr; min-height: calc(100vh - 100px); }
  .hero-media { order: 2; }
  .hero-media img { height: 100%; min-height: 0; }
  .hero-content { align-self: center; padding: 60px var(--pad); max-width: 640px; justify-self: end; }
  .btn-big { width: auto; padding: 0 34px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .footer { padding-bottom: 48px; }
}

/* Bouton flottant effacé quand il passerait sur un bouton, un lien ou un texte */
.wa-float > * { transition: opacity .25s ease, transform .25s ease; }
.wa-float.is-hidden { pointer-events: none; }
.wa-float.is-hidden > * { opacity: 0; }

/* ---------- Produits en 2,5D : inclinaison, reflet qui passe, ombre qui suit (subtil) ---------- */
.card { perspective: 900px; }
.card-img { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .6s ease; box-shadow: calc(var(--ry, 0deg) / 1deg * -1.4px) calc(14px + var(--rx, 0deg) / 1deg * 1.4px) 30px -18px rgba(43, 33, 27, .45); will-change: transform; }
.card-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .32) 48%, transparent 64%) var(--sx, -60%) 0 / 260% 100% no-repeat; mix-blend-mode: soft-light; opacity: var(--so, 0); transition: opacity .5s ease; }
.card.en-mouvement .card-img { transition: transform .12s linear, box-shadow .12s linear; }
.sheet-media { perspective: 1200px; }
.sheet-img { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.02); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .card-img, .sheet-img { transform: none !important; } .card-img::after { display: none; } }

.wa-float.is-hidden > *, .wa-float.is-hidden .wa-label { opacity: 0 !important; }
