@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --ink: #1c110b;
  --ink-2: #5c4a3e;
  --cream: #fff4e3;
  --paper: #fffaf2;
  --tomato: #ff4a1c;
  --tomato-d: #d8360f;
  --cheese: #ffc93c;
  --basil: #1f8a4c;
  --line: rgba(28, 17, 11, .12);
  --radius: 22px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.02em; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 24px; }
.muted { color: var(--ink-2); }

/* ---------- En-tête ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.03em; text-decoration: none; color: inherit; }
.logo-mark { width: 38px; height: 38px; display: grid; place-items: center; }
.logo em { font-style: normal; color: var(--tomato); }
.logo-mark svg { width: 100%; height: 100%; animation: spin 18s linear infinite; }
.live { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--cream); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: pulse 1.6s infinite; }
.live.off i { background: #9a8a7e; animation: none; }

@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 32px; padding: 28px 0 56px; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--tomato); margin-bottom: 18px; }
.hero h1 { font-size: clamp(52px, 9vw, 128px); line-height: .9; font-weight: 800; letter-spacing: -.04em; }
.hero h1 em { font-style: normal; color: var(--tomato); }
.hero-sub { font-size: 19px; margin: 24px 0 0; max-width: 480px; line-height: 1.5; color: var(--ink-2); }
.hero-stats { display: flex; gap: 36px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.hero-stats span { font-size: 14px; color: var(--ink-2); }
.hero-art { position: relative; aspect-ratio: 1; }
.hero-art .big-pizza { position: absolute; inset: 4%; animation: spin 40s linear infinite; filter: drop-shadow(0 30px 40px rgba(120, 50, 10, .3)); }
.hero-art .big-pizza svg { width: 100%; height: 100%; }
.sticker {
  position: absolute; right: 0; top: 4%; width: 128px; height: 128px; border-radius: 50%;
  background: var(--cheese); display: grid; place-items: center; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1.05; transform: rotate(12deg);
  box-shadow: 0 10px 0 var(--ink); border: 3px solid var(--ink);
}

/* ---------- Bandeau défilant ---------- */
.marquee { background: var(--tomato); color: var(--cream); overflow: hidden; border-block: 3px solid var(--ink); transform: rotate(-1.2deg); margin: 0 -20px; }
.marquee-track { display: flex; gap: 40px; padding: 14px 0; width: max-content; animation: slide 28s linear infinite; font-family: var(--display); font-weight: 800; font-size: 26px; text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
.marquee-track span::after { content: '✺'; margin-left: 40px; color: var(--cheese); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Menu ---------- */
.menu { padding: 88px 0 160px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(38px, 5vw, 60px); font-weight: 800; line-height: .95; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

.pizza-card {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 28px 24px 24px; display: flex; flex-direction: column; position: relative;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.3), box-shadow .25s;
  box-shadow: 0 6px 0 var(--ink); animation: rise .6s both;
}
.pizza-card:hover { transform: translateY(-4px); box-shadow: 0 10px 0 var(--ink); }
.pizza-card.selected { background: #fff0cc; }
.pizza-card .art { width: 170px; height: 170px; margin: -4px auto 18px; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.pizza-card:hover .art { transform: rotate(90deg) scale(1.05); }
.pizza-card .art svg { width: 100%; height: 100%; }
.pizza-card h3 { font-size: 28px; font-weight: 800; line-height: 1; }
.pizza-card p { margin: 10px 0 20px; color: var(--ink-2); line-height: 1.5; font-size: 15px; flex: 1; }
.stock { position: absolute; top: 18px; left: 18px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); }
.stock.low { background: var(--tomato); }
.stock.out { background: #9a8a7e; }
.pizza-card.soldout { opacity: .55; }
.pizza-card.soldout .art { filter: grayscale(1); }

.stepper { display: flex; align-items: center; justify-content: space-between; border-top: 2px dashed var(--line); padding-top: 18px; }
.stepper .qty { font-family: var(--display); font-weight: 800; font-size: 34px; min-width: 60px; text-align: center; }
.round-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ink); background: var(--cream);
  font-size: 26px; font-weight: 700; display: grid; place-items: center; line-height: 1;
  transition: transform .12s, background .15s;
}
.round-btn:hover:not(:disabled) { background: var(--cheese); }
.round-btn:active:not(:disabled) { transform: scale(.9); }
.round-btn.plus { background: var(--tomato); color: #fff; border-color: var(--ink); }
.round-btn.plus:hover:not(:disabled) { background: var(--tomato-d); }
.round-btn:disabled { opacity: .3; cursor: not-allowed; }
.bump { animation: bump .3s; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Barre panier ---------- */
.cartbar {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 150%); z-index: 40;
  width: min(720px, calc(100% - 32px)); background: var(--ink); color: var(--cream); border-radius: 999px;
  padding: 10px 10px 10px 28px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 20px 50px rgba(28, 17, 11, .35); transition: transform .45s cubic-bezier(.2, .9, .3, 1.2);
}
.cartbar.show { transform: translate(-50%, 0); }
.cartbar .count { font-family: var(--display); font-weight: 800; font-size: 22px; white-space: nowrap; }
.cartbar .detail { flex: 1; font-size: 14px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 2px solid var(--ink);
  background: var(--tomato); color: #fff; font-weight: 700; font-size: 17px; padding: 15px 28px; border-radius: 999px;
  transition: transform .12s, background .15s; text-decoration: none; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--tomato-d); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.dark { background: var(--ink); color: var(--cream); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover:not(:disabled) { background: rgba(28, 17, 11, .06); }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.block { width: 100%; }
.cartbar .btn { border-color: var(--tomato); }

/* ---------- Modale ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(28, 17, 11, .55); backdrop-filter: blur(6px); z-index: 50;
  display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 28px; width: min(560px, 100%);
  max-height: calc(100dvh - 32px); overflow: auto; padding: 32px; box-shadow: 0 12px 0 var(--ink);
  transform: translateY(30px) scale(.96); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3);
}
.overlay.show .modal { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 24px; }
.modal h2 { font-size: 36px; font-weight: 800; line-height: 1; }
.close { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; font-size: 20px; flex-shrink: 0; }
.close:hover { background: var(--cheese); }

.recap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.recap span { background: var(--cheese); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label, .label { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.input {
  width: 100%; border: 2px solid var(--ink); background: #fff; border-radius: 14px; padding: 14px 16px; font-size: 16px;
  outline: none; transition: box-shadow .15s;
}
.input:focus { box-shadow: 0 0 0 4px rgba(255, 74, 28, .25); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 28px; }
.slot {
  border: 2px solid var(--ink); background: #fff; border-radius: 14px; padding: 12px 10px; text-align: center;
  transition: background .15s, transform .12s;
}
.slot b { display: block; font-family: var(--display); font-size: 17px; font-weight: 800; }
.slot small { font-size: 12px; color: var(--ink-2); }
.slot:hover:not(:disabled) { background: #fff0cc; }
.slot.active { background: var(--ink); color: var(--cream); }
.slot.active small { color: var(--cheese); }
.slot:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

.error { color: var(--tomato-d); font-weight: 700; font-size: 14px; min-height: 20px; margin: -10px 0 12px; }

/* ---------- Succès ---------- */
.success { text-align: center; padding: 8px 0; }
.success .art { width: 150px; height: 150px; margin: 0 auto 20px; animation: spin 6s linear infinite; }
.success .art svg { width: 100%; height: 100%; }
.success h2 { font-size: 44px; }
.success p { font-size: 17px; color: var(--ink-2); line-height: 1.5; margin: 14px 0 26px; }
.success .ticket { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 26px; background: var(--cheese); border: 2px solid var(--ink); padding: 10px 22px; border-radius: 14px; transform: rotate(-2deg); }
.confetti { position: fixed; top: -20px; width: 12px; height: 18px; z-index: 60; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Pas de vente ---------- */
.oven-off { min-height: calc(100dvh - 90px); display: grid; place-items: center; text-align: center; padding: 20px 0 80px; }
.oven-off .art { width: min(300px, 70vw); margin: 0 auto 36px; filter: grayscale(.7) drop-shadow(0 20px 30px rgba(0, 0, 0, .15)); animation: sleepy 4s ease-in-out infinite; }
.oven-off .art svg { width: 100%; }
.oven-off .art.paused { filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .15)); animation: spin 12s linear infinite; }
.oven-off .eyebrow { margin-bottom: 10px; }
@keyframes sleepy { 50% { transform: translateY(-12px) rotate(-6deg); } }
.oven-off h1 { font-size: clamp(48px, 9vw, 110px); font-weight: 800; line-height: .9; letter-spacing: -.05em; }
.oven-off h1 em { font-style: normal; color: var(--tomato); }
.oven-off p { font-size: 19px; color: var(--ink-2); margin-top: 20px; }

.loader { min-height: 70vh; display: grid; place-items: center; }
.loader div { width: 70px; height: 70px; animation: spin 1s linear infinite; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: var(--cream); padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px; animation: rise .3s both; transition: opacity .4s, transform .4s; }
.toast.err { background: var(--tomato-d); }
.toast.out { opacity: 0; transform: translateY(-10px); }

footer.foot { text-align: center; padding: 30px 0 110px; font-size: 13px; color: var(--ink-2); }
footer.foot a { color: inherit; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero-art { max-width: 340px; margin: 0 auto; width: 100%; order: -1; }
  .sticker { width: 100px; height: 100px; font-size: 14px; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .modal { padding: 24px 20px; }
  .cartbar { padding-left: 20px; }
  .cartbar .detail { display: none; }
  .cartbar .count { flex: 1; }
  .hero-stats { gap: 24px; }
  .hero-stats b { font-size: 32px; }
  .marquee-track { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
