/* Napoletana V9 — site de commande. Mobile d'abord. */
:root{
  --ink:#10261f;          /* vert basilic très sombre */
  --ink-2:#2c4a40;
  --muted:#667a72;
  --paper:#fbfcfa;        /* blanc farine, légèrement froid */
  --card:#ffffff;
  --line:#e3e9e5;
  --brand:#00a082;        /* vert de la marque (existant) */
  --brand-d:#007d66;
  --tomato:#d93a25;       /* prix, alertes, promos */
  --cheese:#f3c13a;       /* points de fidélité */
  --cheese-d:#8a6a05;
  --ok:#1a8f4f;
  --radius:16px;
  --shadow:0 1px 2px rgba(16,38,31,.06),0 10px 28px rgba(16,38,31,.10);
  --font:'Figtree',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --display:'Bricolage Grotesque','Figtree',system-ui,sans-serif;
  --gutter:16px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scroll-padding-top:128px}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font);font-size:16px;line-height:1.45;-webkit-font-smoothing:antialiased}
body.lock{overflow:hidden}
img{max-width:100%}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--brand-d)}
:focus-visible{outline:3px solid #7ad9c6;outline-offset:2px;border-radius:8px}
.hide{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- barre du haut ---------- */
.top{position:sticky;top:0;z-index:30;background:#fbfcfa;border-bottom:1px solid var(--line)}
.top .row{display:flex;align-items:center;gap:10px;padding:10px var(--gutter);max-width:1040px;margin:auto}
.brand{display:flex;align-items:center;gap:10px;background:none;border:0;padding:0;text-align:left;min-width:0}
.brand img{width:40px;height:40px;border-radius:11px;object-fit:cover;background:var(--ink)}
.brand b{font-family:var(--display);font-size:20px;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp{flex:1}
.pill{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--card);border-radius:999px;padding:7px 12px;font-weight:700;font-size:14px}
.pill.pts{border-color:#ecd68a;background:#fff9e3;color:var(--cheese-d)}
.pill.track{background:var(--ink);color:#fff;border-color:var(--ink)}
.pill .dot{width:8px;height:8px;border-radius:50%;background:#6ee7b7;animation:pulse 1.6s infinite}
@keyframes pulse{50%{opacity:.3}}
.avatar{width:30px;height:30px;border-radius:50%;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}

/* ---------- accueil ---------- */
.hero{background:var(--ink) center/cover no-repeat;color:#fff;position:relative}
.hero::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(16,38,31,.72),rgba(16,38,31,.94))}
.hero .in{position:relative;max-width:1040px;margin:auto;padding:30px var(--gutter) 26px}
.hero h1{font-family:var(--display);font-weight:800;font-size:clamp(34px,8vw,60px);line-height:1;margin:0 0 10px;letter-spacing:-.5px}
.hero p{margin:0 0 16px;color:#d4e6df;max-width:36ch;font-size:17px}
.state{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:14px;background:rgba(255,255,255,.12);border-radius:999px;padding:6px 12px}
.state i{width:9px;height:9px;border-radius:50%;background:#6ee7b7}
.state.off i{background:#fca5a5}
.hero .meta{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:14px;font-size:14px;color:#c4dcd3}
.hero .meta a{color:#fff;text-decoration:none;font-weight:700}
.notice{background:#fff3cd;color:#664d03;padding:10px var(--gutter);font-weight:600;text-align:center;font-size:14px}
.closed{background:#fde8e5;color:#8a1f10;padding:12px var(--gutter);font-weight:700;text-align:center}

/* ---------- offres : coupons perforés ---------- */
.offers{display:flex;gap:12px;overflow-x:auto;padding:16px var(--gutter);max-width:1040px;margin:auto;scroll-snap-type:x proximity}
.offers::-webkit-scrollbar{display:none}
.coupon{flex:0 0 min(78vw,300px);scroll-snap-align:start;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 16px 12px 22px;position:relative;text-align:left;cursor:pointer;
  -webkit-mask:radial-gradient(circle 9px at 0 50%,#0000 98%,#000) ;mask:radial-gradient(circle 9px at 0 50%,#0000 98%,#000)}
.coupon::after{content:"";position:absolute;left:10px;top:12px;bottom:12px;border-left:2px dashed var(--line)}
.coupon .big{font-family:var(--display);font-weight:800;font-size:26px;color:var(--tomato);line-height:1}
.coupon h3{margin:6px 0 2px;font-size:16px}
.coupon p{margin:0;color:var(--muted);font-size:13.5px}
.coupon .code{display:inline-block;margin-top:8px;border:1.5px dashed var(--tomato);color:var(--tomato);border-radius:8px;padding:2px 9px;font-weight:800;letter-spacing:1px;font-size:13px}
.coupon .lock{margin-top:8px;font-size:12.5px;color:var(--muted);font-weight:700}

/* ---------- catégories ---------- */
.cats{position:sticky;top:61px;z-index:20;background:#fbfcfa;border-bottom:1px solid var(--line)}
.cats .row{display:flex;gap:8px;overflow-x:auto;padding:10px var(--gutter);max-width:1040px;margin:auto}
.cats .row::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;border:1px solid var(--line);background:var(--card);border-radius:999px;padding:8px 15px;font-weight:700;font-size:14.5px;white-space:nowrap}
.chip.on{background:var(--ink);color:#fff;border-color:var(--ink)}

/* ---------- liste produits : cartes photo ---------- */
.menu{max-width:1040px;margin:auto;padding:6px var(--gutter) 130px}
.fam{font-family:var(--display);font-weight:800;font-size:26px;margin:28px 0 12px;letter-spacing:-.2px}
.items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(min-width:720px){.items{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}}
@media(min-width:1000px){.items{grid-template-columns:repeat(4,minmax(0,1fr))}}
.it{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:18px;overflow:hidden;text-align:left;cursor:pointer;transition:transform .12s}
.it:active{transform:scale(.98)}
.it .ph{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;background:#e8efeb}
.it .ph.none{display:grid;place-items:center;background:linear-gradient(135deg,hsl(var(--h) 65% 93%),hsl(var(--h) 55% 84%))}
.it .ph.none span{font-size:44px;filter:drop-shadow(0 3px 4px rgba(0,0,0,.12))}
.it .bd{display:flex;flex-direction:column;gap:4px;padding:10px 12px 12px;flex:1}
.it h3{margin:0;font-size:15px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.it p{margin:0;color:var(--muted);font-size:12.5px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.it .r2{margin-top:auto;padding-top:6px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.it .pr{font-weight:800;color:var(--tomato);font-size:16px}
.it.out{opacity:.5}
.add{position:relative;width:38px;height:38px;border-radius:50%;border:0;background:var(--brand);color:#fff;font-size:24px;font-weight:600;line-height:1;display:grid;place-items:center;box-shadow:0 4px 10px rgba(0,160,130,.3)}
.add:active{transform:scale(.92)}
.add .n{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;border-radius:10px;background:var(--ink);font-size:12px;display:grid;place-items:center;padding:0 5px;font-weight:800}
.soldout{font-size:12.5px;font-weight:800;color:var(--tomato)}
.sk{height:210px;border-radius:18px;background:linear-gradient(100deg,#e9efec 30%,#f5f8f6 50%,#e9efec 70%);background-size:200% 100%;animation:sk 1.2s linear infinite}
@keyframes sk{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.sk{animation:none}}

/* ---------- barre panier ---------- */
.cartbar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(14px + env(safe-area-inset-bottom));z-index:40;width:min(94vw,520px);display:flex;align-items:center;justify-content:space-between;
  background:var(--ink);color:#fff;border:0;border-radius:999px;padding:14px 20px;font-weight:800;box-shadow:0 14px 34px rgba(16,38,31,.4)}
.cartbar .cnt{background:var(--brand);border-radius:999px;min-width:26px;height:26px;display:inline-grid;place-items:center;margin-right:10px;font-size:14px}
.cartbar.bump{animation:bump .3s}
@keyframes bump{40%{transform:translateX(-50%) scale(1.04)}}

/* ---------- panneaux (sheet) ---------- */
.veil{position:fixed;inset:0;z-index:50;background:rgba(10,24,19,.55);opacity:0;pointer-events:none;transition:opacity .2s}
.veil.on{opacity:1;pointer-events:auto}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:60;background:var(--paper);border-radius:22px 22px 0 0;max-height:92dvh;display:flex;flex-direction:column;transform:translateY(105%);transition:transform .26s cubic-bezier(.2,.8,.2,1);box-shadow:0 -10px 40px rgba(0,0,0,.25)}
.sheet.on{transform:none}
.sheet .grab{width:42px;height:5px;border-radius:3px;background:#cdd8d3;margin:9px auto 0}
.sheet header{display:flex;align-items:center;gap:10px;padding:10px var(--gutter) 6px}
.sheet header h2{margin:0;font-family:var(--display);font-size:22px;flex:1}
.x{width:38px;height:38px;border-radius:50%;border:0;background:#e9f0ec;font-size:20px;line-height:1}
.sheet .body{overflow-y:auto;padding:4px var(--gutter) 20px;overscroll-behavior:contain}
.sheet footer{padding:12px var(--gutter) calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper)}
@media(min-width:760px){.sheet{left:50%;right:auto;width:560px;bottom:auto;top:50%;border-radius:22px;transform:translate(-50%,-40%);opacity:0;pointer-events:none;max-height:88vh}
  .sheet.on{transform:translate(-50%,-50%);opacity:1;pointer-events:auto}}

.btn{border:0;border-radius:999px;background:var(--brand);color:#fff;font-weight:800;padding:14px 20px;width:100%;font-size:16px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.btn:disabled{background:#b9c7c1}
.btn.alt{background:var(--card);color:var(--ink);border:1.5px solid var(--line);justify-content:center}
.btn.ghost{background:none;color:var(--brand-d);justify-content:center;padding:10px}
.btn.sm{width:auto;padding:9px 16px;font-size:14px}
.btn.danger{background:#fff;color:var(--tomato);border:1.5px solid #f2c1ba;justify-content:center}

/* ---------- fiche produit ---------- */
.pimg{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:14px;background:#e8efeb;margin-bottom:10px}
.opts{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 12px}
.tog{border:1.5px solid var(--line);background:var(--card);border-radius:999px;padding:7px 13px;font-weight:700;font-size:14px}
.tog.rm{border-color:#f0c3bc;background:#fdeceb;color:var(--tomato);text-decoration:line-through}
.tog.ex.on{border-color:var(--brand);background:#e5f6f2;color:var(--brand-d)}
h4.s{margin:16px 0 4px;font-size:15px}
.hint{color:var(--muted);font-size:13px}
.qty{display:inline-flex;align-items:center;gap:6px;background:#e9f0ec;border-radius:999px;padding:4px}
.qty button{width:38px;height:38px;border-radius:50%;border:0;background:var(--card);font-size:20px;font-weight:800}
.qty b{min-width:28px;text-align:center}

/* ---------- formulaires ---------- */
.f{display:block;margin:10px 0}
.f span{display:block;font-size:13.5px;font-weight:700;margin-bottom:4px;color:var(--ink-2)}
.f input,.f textarea,.f select{width:100%;border:1.5px solid var(--line);background:var(--card);border-radius:12px;padding:12px 13px;font-size:16px}
.f input:focus,.f textarea:focus,.f select:focus{border-color:var(--brand);outline:none}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:#e9f0ec;border-radius:14px;padding:4px;gap:4px}
.seg button{border:0;background:none;border-radius:11px;padding:10px 4px;font-weight:700;font-size:14px}
.seg button.on{background:var(--card);box-shadow:0 1px 4px rgba(0,0,0,.14)}
.seg button:disabled{opacity:.4}
.err{background:#fde8e5;color:#8a1f10;border-radius:12px;padding:10px 12px;font-weight:600;margin:10px 0;font-size:14.5px}
.okmsg{background:#e3f6ea;color:#14633a;border-radius:12px;padding:10px 12px;font-weight:600;margin:10px 0;font-size:14.5px}
.chk{display:flex;gap:10px;align-items:flex-start;margin:10px 0;font-size:14.5px}
.chk input{width:20px;height:20px;margin-top:1px;accent-color:var(--brand)}

/* ---------- panier ---------- */
.ln{display:grid;grid-template-columns:1fr auto;gap:4px 10px;padding:12px 0;border-bottom:1px solid var(--line)}
.ln b{font-size:15.5px}
.ln .sub{grid-column:1;color:var(--muted);font-size:13px}
.ln .t{font-weight:800;text-align:right}
.ln .qty{grid-column:2;justify-self:end}
.ln .qty button{width:32px;height:32px;font-size:18px}
.sum{margin:12px 0;font-size:15px}
.sum div{display:flex;justify-content:space-between;padding:3px 0}
.sum .disc{color:var(--ok);font-weight:700}
.sum .tot{font-size:20px;font-weight:800;border-top:1.5px solid var(--ink);margin-top:6px;padding-top:9px}
.reward{display:flex;gap:10px;align-items:center;border:1.5px solid var(--line);border-radius:14px;padding:10px 12px;margin:8px 0;background:var(--card);width:100%;text-align:left}
.reward.on{border-color:var(--cheese-d);background:#fff9e3}
.reward:disabled{opacity:.55}
.reward .mini{flex:0 0 auto}
.promo{display:flex;gap:8px}
.promo input{flex:1;min-width:0;text-transform:uppercase}
.promo .btn{flex:0 0 auto}
.nudge{background:#fff9e3;border:1px solid #ecd68a;border-radius:14px;padding:11px 13px;margin:12px 0;font-size:14.5px;color:#5c4604}
.nudge button{background:none;border:0;padding:0;font-weight:800;text-decoration:underline;color:inherit}

/* ---------- pizza fidélité (8 parts) ---------- */
.ring{width:132px;height:132px;flex:0 0 auto}
.ring path.s{fill:#ece7d3;transition:fill .5s}
.ring path.s.on{fill:var(--cheese)}
.ring .crust{fill:none;stroke:#d9a24c;stroke-width:4}
.ring text{font-family:var(--display);font-weight:800;fill:var(--ink)}
.loy{display:flex;gap:16px;align-items:center;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin:10px 0}
.loy h3{margin:0;font-family:var(--display);font-size:28px;line-height:1}
.loy p{margin:4px 0 0;color:var(--muted);font-size:14px}
.lvl{display:inline-block;margin-top:8px;border-radius:999px;padding:3px 11px;font-weight:800;font-size:13px;background:#eee;color:#444}
.lvl.silver{background:#e8edf2;color:#34495e}.lvl.gold{background:#fbeeb8;color:#7a5a00}.lvl.bronze{background:#f3e1cf;color:#7a4a1c}
.bar{height:8px;border-radius:4px;background:#e9efec;overflow:hidden;margin-top:8px}
.bar i{display:block;height:100%;background:var(--cheese);border-radius:4px}
.tabs{display:flex;gap:6px;overflow-x:auto;margin:4px 0 10px}
.tabs button{flex:0 0 auto;border:0;background:#e9f0ec;border-radius:999px;padding:8px 14px;font-weight:700}
.tabs button.on{background:var(--ink);color:#fff}
.hist{display:flex;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid var(--line);font-size:14.5px}
.hist small{display:block;color:var(--muted)}
.plus{color:var(--ok);font-weight:800}.minus{color:var(--tomato);font-weight:800}
.badge{display:inline-block;border-radius:999px;padding:3px 10px;font-size:12.5px;font-weight:800;background:#e9f0ec}
.badge.pending{background:#fff3cd;color:#664d03}.badge.confirmed,.badge.preparing{background:#dbeafe;color:#1e40af}
.badge.ready,.badge.delivered{background:#d9f5e3;color:#14633a}.badge.rejected,.badge.cancelled{background:#fde8e5;color:#8a1f10}.badge.delivering{background:#e8defa;color:#5b21b6}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px;margin:14px 0}
.or::before,.or::after{content:"";flex:1;border-top:1px solid var(--line)}

/* ---------- suivi ---------- */
.steps{list-style:none;margin:14px 0;padding:0}
.steps li{position:relative;padding:0 0 18px 34px;color:var(--muted);font-weight:600}
.steps li::before{content:"";position:absolute;left:8px;top:22px;bottom:-4px;border-left:2px solid var(--line)}
.steps li:last-child::before{display:none}
.steps li i{position:absolute;left:0;top:1px;width:18px;height:18px;border-radius:50%;border:2px solid var(--line);background:var(--paper)}
.steps li.done{color:var(--ink)}.steps li.done i{background:var(--brand);border-color:var(--brand)}
.steps li.cur{color:var(--ink);font-weight:800}.steps li.cur i{border-color:var(--brand);box-shadow:0 0 0 5px rgba(0,160,130,.18)}
.big-ref{font-family:var(--display);font-weight:800;font-size:34px;line-height:1}
.ticket{background:var(--card);border:1px dashed #b9c7c1;border-radius:14px;padding:14px;margin:12px 0}

.foot{max-width:1040px;margin:30px auto 0;padding:20px var(--gutter) 120px;color:var(--muted);font-size:14px;border-top:1px solid var(--line)}
.foot a{color:var(--ink-2);font-weight:700}
.toast{position:fixed;left:50%;top:74px;transform:translate(-50%,-14px);z-index:80;background:var(--ink);color:#fff;padding:11px 18px;border-radius:999px;font-weight:700;opacity:0;transition:.25s;pointer-events:none;max-width:90vw;text-align:center}
.toast.on{opacity:1;transform:translate(-50%,0)}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.ref{border:1.5px dashed #ecd68a;background:#fffbea;border-radius:14px;padding:12px 14px;margin:12px 0}
.ref p{margin:4px 0 8px;font-size:14px}.ref .refrow{display:flex;gap:10px;align-items:center;margin-bottom:6px}
.ref code{font-weight:800;letter-spacing:2px;font-size:18px;background:#fff;border:1px solid #ecd68a;border-radius:8px;padding:6px 10px}

/* ---- V12 : jeu de chance ---- */
.gm-card{display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#fff6d6,#ffe3b0);border:1px solid #f0c56a;border-radius:16px;padding:12px 14px;margin:12px 0;color:#4a3300}
.gm-card p{margin:2px 0 0;font-size:13.5px}.gm-card .btn{width:auto;padding:10px 18px;flex:none}
.gm-ico{font-size:34px}.gm-wait{opacity:.85}.gm-done{display:block;text-align:center}
.gm-res{text-align:center}.gm-big{font-size:44px;line-height:1.1}.gm-prize{font-size:22px;font-weight:800;color:#b3261e;margin:6px 0}
.gm-code{display:inline-block;font-family:ui-monospace,Menlo,monospace;font-size:26px;font-weight:800;letter-spacing:2px;background:#fff;border:2px dashed #d93a25;border-radius:12px;padding:8px 16px;margin:8px 0;color:#10261f;user-select:all}
.gm-sm{font-size:12.5px;color:#6b5a2a}
.gm-ov{position:fixed;inset:0;background:rgba(10,24,19,.82);z-index:1000;display:flex;align-items:center;justify-content:center;padding:14px}
.gm-box{position:relative;background:#fff;border-radius:22px;padding:18px 16px 20px;width:100%;max-width:380px;max-height:96vh;overflow:auto;text-align:center}
.gm-box h3{margin:0 28px 10px;font-size:20px}.gm-x{position:absolute;right:10px;top:10px;border:0;background:#eef2ef;border-radius:50%;width:32px;height:32px;font-size:16px;cursor:pointer}
.gm-wheel{position:relative;width:min(300px,78vw);margin:6px auto 14px}.gm-wheel canvas{width:100%;height:auto;display:block;border-radius:50%;box-shadow:0 8px 26px rgba(0,0,0,.28)}
.gm-ptr{position:absolute;left:50%;top:-14px;transform:translateX(-50%);font-size:30px;color:#d93a25;z-index:2;text-shadow:0 2px 4px rgba(0,0,0,.3)}
@media (prefers-reduced-motion:reduce){.gm-wheel canvas{transition:none!important}}
