/* ============================================================
   GLOUTONS — Styles (mobile-first)
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-ExtraBold.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
/* Grands titres — Tusker Grotesk 8800 Super (police licenciée, self-hébergée) */
@font-face {
  font-family: "Tusker Grotesk";
  src: url("../fonts/TuskerGrotesk-8800Super.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
/* Éléments d'UI (PANIER 1, total…) — Tusker Grotesk 8700 Bold, même largeur, moins épaisse */
@font-face {
  font-family: "Tusker Grotesk Text";
  src: url("../fonts/TuskerGrotesk-8700Bold.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --red: #b5381c;
  --red-deep: #99300f;
  --red-bright: #c5331a;
  --cream: #f5f1de;
  --cream-card: #fbf8ec;
  --cream-soft: #efe9d2;
  --green: #7b8428;
  --green-deep: #61691f;
  --ink: #2a2014;
  --ink-soft: #5a4f3e;
  --line: #e2d9bd;
  --shadow: 0 10px 30px rgba(42, 32, 20, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 720px;
  --font-title: "Tusker Grotesk", "Anton", "Haettenschweiler", "Arial Narrow", sans-serif;
  --font-title-2: "Tusker Grotesk Text", "Anton", "Haettenschweiler", "Arial Narrow", sans-serif;
  --font-body: "JetBrains Mono", ui-monospace, "Courier New", monospace;
  --bar-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* Tablecloth gingham background (subtle), used on red sections */
.gingham {
  background-color: var(--red);
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 50%, transparent 50%),
    linear-gradient(90deg, rgba(255,255,255,0.06) 50%, transparent 50%);
  background-size: 38px 38px, 38px 38px;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
section { padding: 40px 0; }
.section-head { margin-bottom: 22px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green); margin: 0 0 8px;
}
.eyebrow.on-red { color: var(--cream); opacity: 0.85; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 400; line-height: 1.0;
  letter-spacing: 0.01em; text-transform: uppercase; margin: 0; }
.h-xl { font-size: clamp(46px, 16vw, 92px); }
.h-lg { font-size: clamp(34px, 11vw, 56px); }
.h-md { font-size: clamp(26px, 8vw, 40px); }
.lead { font-size: 15px; color: var(--ink-soft); }

/* ---------- Header / Hero ---------- */
.hero { position: relative; color: var(--cream); overflow: hidden; }
.hero .wrap { padding-top: 26px; padding-bottom: 38px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.hero-logo { height: 30px; width: auto; }
.hero-ig { font-size: 12px; color: var(--cream); text-decoration: none; opacity: 0.9;
  border: 1px solid rgba(245,241,222,0.4); padding: 7px 12px; border-radius: 999px; }
.hero h1 { color: var(--cream); }
.hero-sub { margin: 16px 0 0; max-width: 30ch; color: var(--cream); opacity: 0.92; font-size: 15px; }
.hero-photo { margin-top: 26px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 3px solid rgba(245,241,222,0.5); }
.hero-photo img { width: 100%; height: 320px; object-fit: cover; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.badge { background: rgba(245,241,222,0.14); border: 1px solid rgba(245,241,222,0.3);
  color: var(--cream); font-size: 11.5px; padding: 6px 11px; border-radius: 999px; letter-spacing: 0.02em; }

/* ---------- Steps indicator ---------- */
.steplabel { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.stepnum { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: var(--cream);
  font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.step-on-red .stepnum { background: var(--cream); color: var(--red); }

/* ---------- Cards ---------- */
.card { background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; color: var(--ink); }
.card + .card { margin-top: 16px; }

/* Panier builder */
.panier { background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; }
.panier + .panier { margin-top: 18px; }
.panier-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--red); color: var(--cream); }
.panier-head h3 { font-family: var(--font-title-2); color: var(--cream); font-size: 26px; }
.panier-head .price-tag { font-family: var(--font-body); font-weight: 700; font-size: 14px; }
.panier-body { padding: 16px 16px 20px; }
.btn-remove { background: transparent; border: 1px solid rgba(245,241,222,0.5); color: var(--cream);
  border-radius: 999px; font-size: 11px; padding: 5px 10px; }

.inc-list { margin: 0 0 18px; padding: 0; list-style: none; font-size: 13px; color: var(--ink-soft); }
.inc-list li { position: relative; padding-left: 18px; margin-bottom: 3px; }
.inc-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px;
  background: var(--green); border-radius: 50%; }

.choose-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink); margin: 14px 0 10px; }
.counter { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--cream-soft); color: var(--ink-soft); white-space: nowrap; }
.counter.done { background: var(--green); color: #fff; }

/* Option rows (selectable items with stepper) */
.opt { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s; }
.opt + .opt { margin-top: 8px; }
.opt.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(123,132,40,0.18); }
.opt-main { display: flex; align-items: flex-start; gap: 11px; min-width: 0; flex: 1; }
.opt-thumb { width: 54px; height: 54px; flex: none; border-radius: 9px; object-fit: cover; background: var(--red); }
.opt-thumb.placeholder { display: grid; place-items: center; color: var(--cream); font-size: 9px;
  text-align: center; font-weight: 700; padding: 4px; }
.opt-info { min-width: 0; }
.opt-name { font-weight: 700; font-size: 13px; line-height: 1.28; color: var(--ink); }
.opt-tag { display: inline-block; font-size: 10px; color: var(--green-deep); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.opt-desc { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.35; }
.opt-price { font-weight: 700; font-size: 13px; white-space: nowrap; color: var(--ink); }
.opt-action { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Stepper */
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; background: #fff; }
.stepper button { width: 32px; height: 32px; border: none; background: var(--cream-card);
  font-size: 19px; line-height: 1; color: var(--red); display: grid; place-items: center; }
.stepper button:disabled { color: #cdc4ac; }
.stepper button:active { background: var(--cream-soft); }
.stepper .qty { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }

/* ---------- Extras groups ---------- */
.extra-group + .extra-group { margin-top: 22px; }
.group-title { font-family: var(--font-body); font-weight: 700; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--green); margin: 0 0 10px; }

/* ---------- Choice chips (delivery, day) ---------- */
.choice-grid { display: grid; gap: 10px; }
.choice-grid.two { grid-template-columns: 1fr 1fr; }
.choice { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px; transition: border-color 0.15s, box-shadow 0.15s; color: var(--ink); }
.choice.active { border-color: var(--red); box-shadow: 0 0 0 2px rgba(181,56,28,0.18); }
.choice-name { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.choice-desc { font-size: 11.5px; color: var(--ink-soft); margin-top: 5px; line-height: 1.35; }
.choice-plus { color: var(--red); font-weight: 700; }

/* ---------- Form fields ---------- */
.field { margin-top: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink); margin-bottom: 6px; }
.field .opt-note { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 2px rgba(123,132,40,0.18);
}
.field textarea { resize: vertical; min-height: 84px; }
.field .err { color: var(--red); font-size: 11.5px; margin-top: 5px; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select { border-color: var(--red); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.promo-row { display: flex; gap: 8px; align-items: flex-end; }
.promo-row .field { flex: 1; margin-top: 0; }
.btn-apply { background: var(--ink); color: var(--cream); border: none; border-radius: var(--radius-sm);
  padding: 12px 16px; font-weight: 700; font-size: 13px; height: 44px; white-space: nowrap; }
.promo-msg { font-size: 12px; margin-top: 8px; font-weight: 600; }
.promo-msg.ok { color: var(--green-deep); }
.promo-msg.ko { color: var(--red); }

/* ---------- Recap ---------- */
.recap-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed var(--line); font-size: 13px; }
.recap-line:last-child { border-bottom: none; }
.recap-line .lbl { color: var(--ink); }
.recap-line .lbl small { display: block; color: var(--ink-soft); font-size: 11px; }
.recap-line .val { font-weight: 700; white-space: nowrap; }
.recap-sub { font-size: 12px; color: var(--ink-soft); padding-left: 12px; }
.recap-total { display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--ink); }
.recap-total .t-lbl { font-family: var(--font-title-2); font-size: 26px; }
.recap-total .t-val { font-family: var(--font-title-2); font-size: 30px; color: var(--red); }
.recap-empty { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 20px 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; font-weight: 700; font-size: 15px; padding: 15px 26px;
  text-decoration: none; transition: transform 0.08s, opacity 0.15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border: 1.5px solid var(--cream); }
.btn-block { width: 100%; }
.btn-green { background: var(--green); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.panier-actions { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.add-panier-link { background: transparent; border: 1.5px dashed var(--red); color: var(--red);
  border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 13px; }
.add-panier-link:active { background: rgba(181,56,28,0.06); }

/* ---------- Sticky cart bar ---------- */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--ink); color: var(--cream); box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.cartbar-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: 14px; }
.cartbar .ct-total small { display: block; font-size: 10.5px; opacity: 0.7; letter-spacing: 0.05em;
  text-transform: uppercase; }
.cartbar .ct-total b { font-family: var(--font-title-2); font-size: 26px; font-weight: 400; }
.cartbar .btn { padding: 13px 22px; font-size: 14px; flex: none; }

/* ---------- Notice / info ---------- */
.notice { background: var(--cream-soft); border-left: 4px solid var(--green); border-radius: 10px;
  padding: 12px 14px; font-size: 12.5px; color: var(--ink-soft); }
.notice strong { color: var(--ink); }

/* ---------- After-payment / footer ---------- */
.footer { background: var(--red); color: var(--cream); }
.footer .wrap { padding: 36px 18px 44px; text-align: center; }
.footer-logo { height: 34px; margin: 0 auto 16px; }
.footer a { color: var(--cream); }
.footer-info { font-size: 12.5px; opacity: 0.9; line-height: 1.7; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 18px); transform: translateX(-50%) translateY(20px);
  background: var(--green); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Modal (confirmation après "paiement") */
.modal-back { position: fixed; inset: 0; background: rgba(42,32,20,0.55); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 22px; }
.modal-back.show { display: flex; }
.modal { background: var(--cream-card); border-radius: var(--radius); max-width: 440px; width: 100%;
  padding: 28px 24px; text-align: center; box-shadow: var(--shadow); }
.modal h3 { font-size: 30px; color: var(--red); margin-bottom: 10px; }
.modal p { font-size: 13.5px; color: var(--ink-soft); }
.modal .btn { margin-top: 18px; }

/* Modale légale */
.modal-legal { max-width: 580px; text-align: left; }
.modal-legal h3 { color: var(--red); margin-bottom: 12px; }
.legal-text { white-space: pre-line; font-size: 13px; line-height: 1.65; color: var(--ink-soft);
  text-align: left; max-height: 58vh; overflow-y: auto; padding-right: 4px; }

/* Bandeau cookies */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
  z-index: 55; background: #3c2f1e; color: var(--cream); padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(245,241,222,0.16);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.18); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 12px; line-height: 1.45; flex: 1 1 220px; opacity: 0.92; }
.cookie-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.btn-link { background: none; border: none; color: var(--cream); text-decoration: underline;
  font-size: 12px; cursor: pointer; font-family: inherit; padding: 4px; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.footer a#openLegal { display: inline-block; margin-top: 6px; opacity: 0.85; }

/* ---------- Desktop niceties ---------- */
@media (min-width: 760px) {
  body { font-size: 16px; }
  .hero-photo img { height: 420px; }
  .opt-thumb { width: 64px; height: 64px; }
  .opt { grid-template-columns: 64px 1fr auto; }
}
@media (min-width: 900px) {
  .hero .wrap { padding-top: 34px; padding-bottom: 48px; }
}
