/* Le Petit Écrin — inspiré de l'Espace Femmes (blush, prune, touche dorée). Titres Fraunces, texte Inter. */
:root {
  --bg: #fbeff0;
  --card: #fffafa;
  --ink: #3b1d2c;
  --soft: #5e3a4a;
  --muted: #94707f;
  --line: #f1d9df;
  --line-2: #f7e6ea;
  --accent: #b8436f;
  --accent-dark: #9a3159;
  --accent-soft: #fbe3ea;
  --gold: #c99a5b;
  --ok: #3d7a5c;
  --warn: #b45309;
  --err: #a3332f;
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 22px;
  --shadow: 0 1px 2px rgba(120,40,70,.05), 0 8px 24px rgba(184,67,111,.08);
}
* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(60% 40% at 100% 0%, rgba(232,150,175,.28), transparent 70%),
    radial-gradient(50% 35% at 0% 30%, rgba(201,154,91,.14), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Bandeau annonce */
.announce { background: linear-gradient(90deg, #7c2a52, var(--accent)); color: #fff; font-size: 12.5px; text-align: center; padding: 7px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 30; background: rgba(251,239,240,.85); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 12px; max-width: 1080px; margin: 0 auto; padding: 10px 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand__mark { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, var(--accent), #7c2a52); color: #fff; font: 500 22px/1 var(--serif); font-style: italic; box-shadow: 0 6px 16px rgba(184,67,111,.3); }
.brand__name { font: 500 22px/1.1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: none; gap: 2px; margin: 0 auto; }
.nav a { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; color: var(--soft); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav a:hover { background: var(--accent-soft); color: var(--ink); }
.nav a.on { background: var(--accent); color: #fff; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--soft); text-decoration: none; cursor: pointer; }
.iconbtn:hover { background: var(--accent-soft); color: var(--accent); }
.dot { position: absolute; top: 3px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 15px; text-align: center; border: 2px solid var(--bg); }

/* Contenu */
.main { max-width: 1080px; margin: 0 auto; padding: 22px 16px calc(110px + env(safe-area-inset-bottom)); }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.hello { padding: 8px 2px 2px; }
.kicker { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.hello h1 { font-size: clamp(30px, 7.5vw, 46px); margin-top: 6px; }
.hello h1 em { font-style: italic; color: var(--accent); }

/* Carte vedette (comme la carte événement) */
.hero { position: relative; display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 18px; align-items: center; padding: 22px; border-radius: 28px; color: #fff; text-decoration: none;
  background: linear-gradient(120deg, #8e2a55 0%, #b8436f 55%, #d27583 100%); box-shadow: 0 18px 40px rgba(142,42,85,.28); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); pointer-events: none; }
.hero__img { width: 112px; height: 112px; border-radius: 22px; background: #fff; object-fit: cover; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.hero__over { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero h2 { font-size: clamp(22px, 5.2vw, 30px); margin: 6px 0 6px; color: #fff; }
.hero__sub { font-size: 15px; opacity: .9; }
.hero__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.22); }
.hero__price { font: 500 24px var(--serif); white-space: nowrap; }
.hero__price s { font-size: 15px; opacity: .7; margin-left: 6px; font-family: var(--sans); }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: 999px; background: #fff; color: var(--accent-dark); font-weight: 600; text-decoration: none; white-space: nowrap; border: 0; cursor: pointer; }

/* Atouts (comme les chiffres clés) */
.perks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.perk { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.perk b { display: block; font: 500 24px var(--serif); color: var(--accent); white-space: nowrap; }
.perk span { color: var(--muted); font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card__head h2 { font-size: 24px; }
.link { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; background: none; border: 0; cursor: pointer; padding: 0; }

/* Filtres */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--soft); font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Grille produits */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.prod { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; text-decoration: none; transition: transform .15s, box-shadow .15s; min-width: 0; }
.prod:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(184,67,111,.14); }
.prod__img { aspect-ratio: 1; width: 100%; object-fit: cover; background: var(--line-2); }
.prod__img--empty { display: grid; place-items: center; font-size: 40px; }
.prod__body { padding: 12px 14px 14px; display: grid; gap: 4px; min-width: 0; }
.prod__name { font: 500 17px/1.25 var(--serif); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price b { font-size: 17px; color: var(--accent-dark); white-space: nowrap; }
.price s { color: var(--muted); font-size: 14px; white-space: nowrap; }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 10px rgba(184,67,111,.3); }
.badge--promo { background: var(--gold); }
.badge--out { background: #6b5b62; }
.empty { color: var(--muted); text-align: center; padding: 28px 8px; }

/* Fiche produit */
.pdp { display: grid; gap: 18px; grid-template-columns: minmax(0,1fr); }
.gallery { display: grid; gap: 10px; }
.gallery__main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; }
.thumbs button { flex: none; width: 66px; height: 66px; padding: 0; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: #fff; cursor: pointer; }
.thumbs button.on { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp h1 { font-size: clamp(28px, 6vw, 38px); }
.pdp__sub { color: var(--soft); margin-top: 6px; }
.pdp .price b { font: 500 30px var(--serif); }
.pdp .price s { font-size: 17px; }
.promo-note { color: var(--warn); font-size: 14px; }
.opt { display: grid; gap: 8px; }
.opt__label { font-size: 14px; font-weight: 600; color: var(--soft); }
.opt__vals { display: flex; flex-wrap: wrap; gap: 8px; }
.opt__vals button { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.opt__vals button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; height: 46px; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--soft); }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.desc { white-space: pre-line; color: var(--soft); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: 0 8px 20px rgba(184,67,111,.25); }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: #fff; color: var(--accent-dark); border: 1px solid var(--line); box-shadow: none; }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--block { width: 100%; }

/* Panier */
.line { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.line:last-child { border-bottom: 0; }
.line img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--line-2); }
.line__name { font: 500 16px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line__opts { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line__right { display: grid; justify-items: end; gap: 6px; }
.line__right b { white-space: nowrap; }
.x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; width: 32px; height: 32px; border-radius: 999px; }
.x:hover { background: var(--accent-soft); color: var(--err); }
.totals { display: grid; gap: 6px; margin-top: 8px; }
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.totals .grand { font: 500 22px var(--serif); padding-top: 8px; border-top: 1px solid var(--line); }

/* Formulaires */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--soft); }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.field textarea { min-height: 96px; resize: vertical; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { min-height: 48px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; }
.seg button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.err { color: var(--err); font-size: 14px; }
.ok-box { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 26px 18px; }
.ok-box .big { font-size: 46px; }
.ref { font: 600 20px var(--sans); letter-spacing: .08em; color: var(--accent-dark); background: var(--accent-soft); padding: 6px 14px; border-radius: 12px; }

/* Barre du bas (mobile) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,250,250,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border-radius: 18px; color: var(--soft); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.tabbar a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tabbar .dot { top: 2px; right: calc(50% - 22px); }

.foot { max-width: 1080px; margin: 0 auto; padding: 0 16px 120px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); white-space: nowrap; animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (min-width: 760px) {
  .nav { display: flex; }
  .tabbar { display: none; }
  .main { padding-bottom: 60px; }
  .foot { padding-bottom: 40px; }
  .toast { bottom: 30px; }
  .grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
  .pdp { grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 32px; align-items: start; }
  .hero { grid-template-columns: 150px minmax(0,1fr); padding: 28px; }
  .hero__img { width: 150px; height: 150px; }
  .checkout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 18px; align-items: start; }
}
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 380px) {
  .perks { gap: 8px; }
  .perk { padding: 12px; }
  .perk b { font-size: 20px; }
  .hero { grid-template-columns: 88px minmax(0,1fr); padding: 18px; gap: 14px; }
  .hero__img { width: 88px; height: 88px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
