/* ============================================================
   Que du bonheur — Feuille de style
   Ambiance : chic, crème & touches de rose. Mobile d'abord.
   ============================================================ */

:root {
  --cream: #FBF8F4;
  --white: #ffffff;
  --rose: #D4537E;
  --rose-dark: #993556;
  --rose-deep: #72243E;
  --rose-soft: #FBEAF0;
  --rose-soft-2: #F4C0D1;
  --ink: #2C2C2A;
  --muted: #6E6C67;
  --line: rgba(40, 30, 35, 0.10);
  --gold: #B8924A;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --shadow: 0 8px 30px rgba(114, 36, 62, 0.10);
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; margin: 0; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- Boutons ---------- */
.btn {
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  border: none; border-radius: 999px; padding: 12px 22px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: transform .12s ease, background .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-dark); }
.btn-ghost { background: transparent; color: var(--rose-dark); border: 1px solid var(--rose-soft-2); }
.btn-ghost:hover { background: var(--rose-soft); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Bandeau annonce ---------- */
.announce {
  background: var(--rose); color: #fff; text-align: center;
  font-size: 13px; letter-spacing: .3px; padding: 8px 12px;
}

/* ---------- En-tête ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 248, 244, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--font-serif); font-size: 26px; font-weight: 600; color: var(--rose-dark); letter-spacing: .2px; }
.icon-btn {
  position: relative; background: transparent; border: none; cursor: pointer;
  color: var(--rose-dark); font-size: 24px; padding: 6px; line-height: 1;
  display: inline-flex; align-items: center;
}
.cart-count {
  position: absolute; top: -2px; right: -4px; background: var(--rose); color: #fff;
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; min-width: 18px; height: 18px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ---------- Hero ---------- */
.hero { background: var(--rose-soft); text-align: center; padding: 56px 18px 60px; }
.hero h1 { font-size: clamp(34px, 9vw, 56px); color: var(--rose-deep); }
.hero p { color: var(--rose-dark); font-size: 16px; margin: 12px 0 24px; letter-spacing: 1.5px; text-transform: uppercase; font-size: 13px; }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.section-head h2 { font-size: 28px; color: var(--ink); }
.section-head .link { font-size: 14px; color: var(--rose-dark); cursor: pointer; white-space: nowrap; }
.eyebrow { color: var(--gold); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }

/* ---------- Catégories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 12px; text-align: center; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, border-color .2s;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--rose-soft-2); }
.cat-card i { font-size: 30px; color: var(--rose); }
.cat-card span { display: block; margin-top: 10px; font-size: 15px; font-weight: 500; }

/* ---------- Filtres ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--rose-soft-2); background: var(--white); color: var(--rose-dark);
  border-radius: 999px; padding: 8px 16px; font-size: 14px; cursor: pointer; transition: all .15s ease;
}
.chip.active { background: var(--rose); color: #fff; border-color: var(--rose); }

/* ---------- Produits ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-media { background: var(--rose-soft); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.card-media i { font-size: 46px; color: var(--rose); }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.9); color: var(--rose-deep);
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; letter-spacing: .3px;
}
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 16px; font-weight: 500; line-height: 1.3; }
.card-desc { font-size: 13px; color: var(--muted); margin: 4px 0 0; flex: 1; }
.card-tag { font-size: 12px; color: var(--rose-dark); margin-top: 8px; display: inline-flex; align-items: center; gap: 5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.price { font-size: 18px; font-weight: 600; }
.add-btn {
  background: var(--rose); color: #fff; border: none; width: 38px; height: 38px; border-radius: 999px;
  cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; transition: transform .12s, background .2s;
}
.add-btn:hover { background: var(--rose-dark); }
.add-btn:active { transform: scale(.9); }

/* ---------- Tiroirs (overlay) ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(40, 20, 28, 0.45); opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s; z-index: 50;
}
.overlay.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; bottom: 0; width: min(420px, 88vw); background: var(--cream); z-index: 60;
  display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.4,0,.2,1); box-shadow: var(--shadow);
}
.drawer-right { right: 0; transform: translateX(100%); }
.drawer-right.open { transform: translateX(0); }
.drawer-left { left: 0; transform: translateX(-100%); }
.drawer-left.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 22px; color: var(--rose-deep); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { padding: 16px 20px 22px; border-top: 1px solid var(--line); }

/* Menu latéral */
.menu-link { display: flex; align-items: center; gap: 12px; padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); cursor: pointer; }
.menu-link i { color: var(--rose); font-size: 22px; }

/* Panier */
.cart-line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--rose-soft); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden; }
.cart-thumb i { font-size: 26px; color: var(--rose); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; }
.cart-info .name { font-weight: 500; font-size: 15px; }
.cart-info .unit { font-size: 13px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; }
.qty button { width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--rose-soft-2); background: #fff; color: var(--rose-dark); cursor: pointer; font-size: 15px; line-height: 1; }
.qty span { min-width: 18px; text-align: center; font-weight: 500; }
.line-price { font-weight: 600; white-space: nowrap; }
.cart-empty { text-align: center; color: var(--muted); padding: 48px 0; }
.cart-empty i { font-size: 44px; color: var(--rose-soft-2); display: block; margin-bottom: 12px; }
.summary-row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 6px; }
.summary-row.total { font-size: 20px; font-weight: 600; margin: 10px 0 16px; }
.fulfil-note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.5; }

/* ---------- Modale (centrée) ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(40, 20, 28, 0.55);
}
.modal-wrap.open { display: flex; }
.modal {
  background: var(--cream); border-radius: 18px; max-width: 380px; width: 100%; padding: 30px 26px; text-align: center; box-shadow: var(--shadow);
}
.modal i.modal-ico { font-size: 40px; color: var(--rose); }
.modal h2 { font-size: 26px; color: var(--rose-deep); margin: 12px 0 8px; }
.modal p { color: var(--muted); font-size: 14.5px; margin: 0 0 20px; }
.modal .actions { display: flex; flex-direction: column; gap: 10px; }
.modal .legal { font-size: 11.5px; color: var(--muted); margin-top: 16px; line-height: 1.5; }
.field { text-align: left; margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 15px; background: #fff;
}
.field input:focus { outline: none; border-color: var(--rose); }

/* ---------- Pied de page ---------- */
.footer { background: var(--rose-deep); color: #f6e6ec; margin-top: 30px; }
.footer .wrap { padding: 40px 18px 28px; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 24px; }
.footer h3 { font-size: 22px; color: #fff; margin-bottom: 10px; }
.footer p, .footer li { font-size: 14px; color: #efd7df; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 3px 0; display: flex; align-items: center; gap: 8px; }
.footer .legal { border-top: 1px solid rgba(255,255,255,.18); margin-top: 26px; padding-top: 18px; font-size: 12px; color: #e7c6d1; text-align: center; line-height: 1.6; }

/* ---------- Responsive (iPad / desktop) ---------- */
@media (min-width: 700px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-cols { grid-template-columns: 1.4fr 1fr 1fr; }
  .hero { padding: 80px 18px 84px; }
}
@media (min-width: 1000px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
