/* ==========================================================
   SMASH FACTORY — base commune (couleurs, typo, boutons)
   Couleur de marque : #FFC001 (jaune du logo) + noir
   ========================================================== */
:root {
  --ink: #111111;
  --ink2: #1B1A18;
  --ink3: #2A2826;
  --paper: #F6F1E7;
  --paper2: #ECE4D4;
  --y: #FFC001;
  --y-d: #E6AC00;
  --y-soft: #FFF3CC;
  --muted: #6B6459;
  --muted-d: #B3AA9C;
  --line: rgba(17, 17, 17, .14);
  --ok: #3ECF6E;
  --no: #FF5A4E;
  --r: 20px;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.5; overflow-x: hidden; }
html, body { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }

h1, h2, h3, h4 { font-weight: 800; line-height: .95; letter-spacing: -.03em; }
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* Logo */
.logo-img { height: 54px; width: auto; object-fit: contain; }
.logo-img.is-illus { height: 48px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 12px; font-weight: 800; font-size: 16px;
  border: 2px solid var(--ink); background: #fff; color: var(--ink);
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-y { background: var(--y); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-y:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-y:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.btn-dark { background: var(--ink); color: var(--y); box-shadow: 4px 4px 0 var(--y); }
.btn-dark:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--y); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-ghost-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); }
.btn-block { width: 100%; }

/* Pastille statut */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 9px; background: var(--no); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(62, 207, 110, .2); }

/* Images de produit */
.ph { position: relative; overflow: hidden; background: var(--ink2); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph img.is-illus { object-fit: cover; }

/* Canettes (boissons) */
.can { width: 100%; height: 100%; display: grid; place-items: center; background: var(--paper2); }
.can div { width: 44px; height: 78px; border-radius: 9px 9px 7px 7px; border: 2px solid var(--ink); position: relative; box-shadow: inset -8px 0 0 rgba(0, 0, 0, .14); }
.can div::before { content: ""; position: absolute; left: 4px; right: 4px; top: -6px; height: 6px; border: 2px solid var(--ink); border-bottom: 0; border-radius: 5px 5px 0 0; background: #cfcfcf; }
.can div span { position: absolute; inset: 26px 0 auto; text-align: center; font-family: var(--mono); font-size: 8px; font-weight: 700; color: #fff; }

/* Choix du restaurant (modale commune) */
.resto-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .resto-pick { grid-template-columns: 1fr; } }
.rp {
  text-align: left; border: 2px solid var(--ink); border-radius: 16px; background: #fff;
  overflow: hidden; cursor: pointer; padding: 0; transition: transform .15s, box-shadow .15s;
}
.rp:hover, .rp.on { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.rp.on { background: var(--y-soft); }
.rp .ph { height: 140px; border-bottom: 2px solid var(--ink); }
.rp-b { padding: 14px; }
.rp-b h3 { font-size: 24px; margin-bottom: 4px; }
.rp-b p { font-size: 13.5px; color: var(--muted); }
.rp-st { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; margin-top: 8px; }
.rp-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.rp-tags span { font-size: 11px; font-weight: 700; border: 1.5px solid var(--ink); border-radius: 99px; padding: 2px 8px; background: #fff; }

/* Apparition au scroll */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .7s; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } * { animation: none !important; } }

/* Photos officielles détourées (PNG) : affichées entières sur fond sombre */
.ph img.is-cutout { object-fit: contain; padding: 6%; background: radial-gradient(circle at 50% 60%, #3a2c00 0%, var(--ink2) 70%); }

/* ==========================================================
   Parcours de commande (modales « Où commandez-vous ? » puis mode)
   ========================================================== */
.flow { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.flow-bg { position: absolute; inset: 0; background: rgba(17, 17, 17, .65); opacity: 0; transition: opacity .25s; }
.flow.on { pointer-events: auto; }
.flow.on .flow-bg { opacity: 1; }
.flow-sheet { position: relative; width: min(680px, 100%); max-height: 92vh; overflow: auto; background: var(--paper); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--y); padding: 26px 22px 22px; transform: translateY(24px) scale(.97); opacity: 0; transition: transform .28s, opacity .28s; }
.flow.on .flow-sheet { transform: none; opacity: 1; }
.flow-sheet.slide { animation: flowIn .3s ease; }
@keyframes flowIn { from { transform: translateX(30px); opacity: .3; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .flow { padding: 0; place-items: end center; } .flow-sheet { border-radius: 22px 22px 0 0; box-shadow: none; max-height: 94vh; } }
.flow-sheet h2 { font-size: clamp(32px, 6vw, 44px); margin: 12px 0 6px; }
.flow-sub { color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 11px; border: 2px solid var(--ink); background: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.flow-back { position: absolute; top: 20px; right: 20px; font-size: 13px; color: var(--muted); text-decoration: underline; }
.flow-steps { display: flex; gap: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-right: 120px; }
.flow-steps span { border: 1.5px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--muted); }
.flow-steps .on { background: var(--ink); color: var(--y); border-color: var(--ink); }
.flow-steps .done { background: var(--y); color: var(--ink); border-color: var(--ink); }
.flow-logo { margin-top: 16px; background: var(--ink); display: inline-flex; padding: 8px 14px; border-radius: 12px; }
.flow-logo .logo-img { height: 46px; }
.mode-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.mp { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 18px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.mp:hover, .mp:focus-visible { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); background: var(--y-soft); }
.mp-i { width: 56px; height: 56px; border-radius: 14px; background: var(--y); border: 2px solid var(--ink); display: grid; place-items: center; margin-bottom: 8px; }
.mp-i svg { width: 32px; height: 32px; }
.mp b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.mp small { color: var(--muted); font-size: 13.5px; }
.flow-note { margin-top: 14px; font-size: 13.5px; color: var(--muted); background: #fff; border: 1.5px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
.flow-change { margin-top: 16px; border: 0; background: none; text-decoration: underline; color: var(--muted); cursor: pointer; font-size: 14px; }

/* Parcours de commande : ajustements mobile */
@media (max-width: 640px) {
  .flow-sheet { padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); }
  .flow-back { position: static; display: inline-block; margin-bottom: 12px; }
  .flow-steps { padding-right: 50px; flex-wrap: wrap; }
  .flow-steps span { white-space: nowrap; }
  .flow-sheet h2 { font-size: clamp(28px, 8.5vw, 40px); }
  .flow-logo .logo-img { height: 38px; }
  .rp .ph { height: 120px; }
  .mode-pick { grid-template-columns: 1fr; }
  .mp { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; padding: 14px; }
  .mp-i { width: 48px; height: 48px; margin-bottom: 0; }
  .mp-i svg { width: 28px; height: 28px; }
  .mp b { font-size: 20px; }
  .mp small { flex-basis: 100%; }
}
