/* Polices hébergées sur le site (licence SIL Open Font License) — aucune requête vers Google */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/montserrat.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("fonts/montserrat-italic.woff2") format("woff2"); }
@font-face { font-family: "Kaushan Script"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/kaushan-script.woff2") format("woff2"); }

:root {
  /* Couleurs relevées sur le flyer et le logo Mané Pizza */
  --bg: #0f291e;          /* vert très foncé du fond */
  --surface: #143326;
  --surface-2: #1b3f30;
  --line: #2a5340;
  --text: #ffffff;
  --muted: #bcd0c3;
  --gold: #3d8a4c;        /* vert des pavés de prix (boutons) */
  --gold-dark: #377a46;
  --accent: #4fa15d;      /* vert vif des titres « BASE TOMATE » */
  --on-accent: #ffffff;
  --light: #f0eded;       /* fond clair des encarts « Premium » */
  --danger: #ff8a7a;
  --ok: #7fd18e;
  --radius: 10px;
  color-scheme: dark;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }

/* ---------- barre du haut */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: rgba(10,33,24,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; }
.brand-mark { font-size: 26px; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { text-decoration: none; color: var(--muted); }
.cart-btn { background: var(--gold); color: var(--on-accent); border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer; }
.badge { display: inline-block; min-width: 22px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: #fff; color: var(--gold-dark); font-size: 13px; text-align: center; }
.test-banner { background: #f0eded; color: #1d4a2e; text-align: center; padding: 8px 12px; font-size: 14px; font-weight: 600; }

/* ---------- hero */
.hero { background: radial-gradient(900px 500px at 75% 10%, #2f5a3d 0%, transparent 65%), linear-gradient(180deg, #1b4130, var(--bg));
  padding: 56px 20px 64px; }
.hero-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr minmax(300px, 400px); grid-template-rows: auto auto 1fr; gap: 12px 32px; align-items: start; }
.hero-inner > .eyebrow, .hero-inner > h1, .hero-inner > .hero-brand { grid-column: 1; }
.hero-inner > .order-box { grid-column: 2; grid-row: 1 / span 3; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 900; }
.hero-sub { color: var(--muted); font-size: 20px; }
.order-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
.status-line { font-weight: 700; font-size: 15px; }
.status-line.closed { color: var(--danger); }
.status-line.open { color: var(--ok); }
.seg { display: flex; background: var(--surface-2); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 10px 6px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.seg button.on { background: var(--gold); color: var(--on-accent); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; font-size: 16px; }
.field textarea { min-height: 70px; resize: vertical; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.btn-gold { display: block; text-align: center; background: var(--gold); color: var(--on-accent); border: 0; border-radius: 10px; padding: 13px 18px;
  font-weight: 800; text-decoration: none; cursor: pointer; font-size: 16px; width: 100%; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-gold:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; }

.ribbon { background: var(--gold-dark); color: var(--on-accent); font-weight: 800; white-space: nowrap; overflow: hidden; padding: 10px 0; display: flex; }
.ribbon span { animation: defile 30s linear infinite; padding-right: 8px; }
@keyframes defile { to { transform: translateX(-100%); } }

/* ---------- carte */
.menu { max-width: 1100px; margin: 0 auto; padding: 48px 20px; }
.menu h2, .pay-info h2 { font-size: 32px; font-weight: 900; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 24px; }
.tabs button { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; cursor: pointer; font-weight: 600; }
.tabs button.on { background: var(--gold); color: var(--on-accent); border-color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { font-size: 19px; text-transform: uppercase; letter-spacing: .02em; margin: 0; }
.card p { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.card .sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.card .sizes span { border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 13px; color: var(--muted); }
.card .bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.price { color: var(--accent); font-weight: 800; font-size: 18px; }
.price small { color: var(--muted); font-weight: 500; font-size: 12px; display: block; }
.card .add { background: var(--gold); color: var(--on-accent); border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 800; cursor: pointer; }
.card .add:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.todo { color: #ffd27a; font-style: italic; }
.empty { color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

.pay-info { max-width: 1100px; margin: 0 auto; padding: 8px 20px 48px; }
.pay-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pay-cards div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; }
.pay-cards span { color: var(--muted); font-size: 14px; }
.footer { border-top: 1px solid var(--line); padding: 28px 20px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; color: var(--muted); font-size: 14px; }
.footer strong { color: var(--text); }

/* ---------- fiche produit */
dialog.sheet { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(480px, 94vw); max-height: 90vh; }
dialog.sheet::backdrop { background: rgba(0,0,0,.65); }
.sheet form { padding: 22px; display: grid; gap: 16px; }
.sheet h3 { font-size: 22px; margin: 0; }
.sheet .desc { color: var(--muted); margin: 0; font-size: 15px; }
.sheet fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.sheet legend { font-weight: 700; margin-bottom: 8px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; cursor: pointer; }
.opt input { accent-color: var(--gold); width: 18px; height: 18px; }
.opt label { display: flex; gap: 10px; align-items: center; cursor: pointer; flex: 1; }
.opt.disabled { opacity: .5; cursor: not-allowed; }
.qty { display: flex; align-items: center; gap: 12px; }
.qty button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 20px; cursor: pointer; }
.sheet .actions { display: flex; gap: 10px; }
.sheet .actions .btn-gold { flex: 1; }

/* ---------- panier */
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .25s ease; z-index: 40; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 22px; }
.close { background: none; border: 0; color: var(--text); font-size: 30px; cursor: pointer; line-height: 1; }
#cart-body { overflow-y: auto; padding: 18px 20px 28px; display: grid; gap: 14px; align-content: start; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 30; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.line .name { font-weight: 700; }
.line .meta { color: var(--muted); font-size: 13px; white-space: pre-line; grid-column: 1; }
.line .lp { font-weight: 700; text-align: right; }
.line .ctrl { display: flex; gap: 8px; align-items: center; grid-column: 1 / -1; }
.line .ctrl button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
.line .ctrl .rm { width: auto; padding: 0 10px; font-size: 13px; color: var(--muted); margin-left: auto; }
.totals { display: grid; gap: 6px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 20px; font-weight: 900; color: var(--accent); }
.recap { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--muted); }
.pay-choice { display: grid; gap: 8px; }
.error { background: #3a1814; color: #ffb4a8; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* ---------- pages simples */
.page { max-width: 560px; margin: 48px auto; padding: 0 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; }
.big-check { font-size: 48px; }

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-inner > .order-box { grid-column: 1; grid-row: auto; }
  .topbar nav a { display: none; }
}

/* ---------- habillage Mané Pizza */
h1, h2, .card h3, .sheet h3, .btn-gold, .cart-btn, .ribbon { font-style: italic; font-weight: 900; letter-spacing: -.01em; }
.menu h2, .pay-info h2 { text-transform: uppercase; }
.menu h2 { color: var(--accent); }
.brand-logo { height: 30px; width: auto; display: block; }
.hero-logo { width: min(560px, 100%); height: auto; display: block; margin: 4px 0 6px; }
.hero h1.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.script { font-family: "Kaushan Script", cursive; font-style: normal; font-weight: 400; }
.hero-sub.script { color: #fff; font-size: 30px; margin: 0 0 18px; }
.hero-claims { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.promo { display: inline-flex; align-items: center; gap: 10px; border: 2px solid #fff; background: var(--gold-dark); padding: 8px 14px; transform: rotate(-2deg);
  font-style: italic; font-weight: 900; text-transform: uppercase; }
.promo b { background: #fff; color: var(--gold-dark); padding: 2px 8px; font-size: 20px; }
.promo em { font-weight: 600; text-transform: none; }
.claim { font-style: italic; font-weight: 900; text-transform: uppercase; font-size: 20px; }
.claim .script { text-transform: none; font-size: 22px; display: block; color: var(--muted); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pill { background: var(--gold-dark); color: #fff; font-size: 11px; font-weight: 800; font-style: italic; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.card .sizes span { font-size: 12px; }
.promo-tag { color: #ffd27a !important; font-weight: 800 !important; font-style: italic; }
.extras { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.extras summary { cursor: pointer; font-weight: 700; }
.extras .grp { color: var(--accent); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 13px; margin: 12px 0 6px; }
.extras .opt { margin-bottom: 6px; }
.sheet select { width: 100%; }
.sheet s { color: var(--muted); }
.pay-cards div { border-left: 4px solid var(--accent); }
.footer-logo { height: 26px; width: auto; margin-bottom: 8px; }
.card .sizes { display: flex; flex-wrap: wrap; gap: 4px; }
.card .sizes > span { font-size: 12px; padding: 3px 6px; white-space: nowrap; color: var(--text); }
.card .sizes b { color: var(--accent); font-style: italic; }
#carte, #order-box { scroll-margin-top: 84px; }

/* ---------- photos */
.hero { position: relative; overflow: hidden; }

.hero-inner { position: relative; }
.card.has-photo { padding-top: 12px; }
.card .photo { height: 128px; display: flex; align-items: flex-end; justify-content: center; margin: -2px -6px 4px; }
.card .photo img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); transition: transform .2s; }
.card:hover .photo img { transform: scale(1.04); }
.sheet-photo { height: 170px; display: flex; align-items: flex-end; justify-content: center; margin: -6px 0 -4px; }
.sheet-photo img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0,0,0,.5)); }
.photo-note { color: var(--muted); font-size: 12px; text-align: center; margin: 4px 0 0; }

/* ---------- zone blanche (carte + paiement), comme les encarts clairs du flyer */
.light-zone {
  --surface: #ffffff; --surface-2: #f0f3f0; --line: #dfe6e0; --text: #10291e; --muted: #4e6157; --accent: #2f7d3e;
  background: #f5f6f3; color: var(--text); color-scheme: light;
}
.light-zone .menu h2 { color: var(--accent); }
.light-zone .card { box-shadow: 0 6px 18px rgba(16, 41, 30, .07); border-color: #e4e9e4; }
.light-zone .card:hover { box-shadow: 0 10px 26px rgba(16, 41, 30, .13); }
.light-zone .card .photo img { filter: drop-shadow(0 8px 8px rgba(0,0,0,.18)); }
.light-zone .card .sizes > span { background: #f3f6f3; border-color: #e1e8e2; }
.light-zone .todo, .light-zone .promo-tag { color: #a8620a !important; }
.light-zone .tabs button { background: #fff; color: var(--muted); }
.light-zone .tabs button.on { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.light-zone .pay-cards div { background: #fff; }
.light-zone .photo-note { color: var(--muted); }
.light-zone .empty { background: #fff; }

/* ================= THÈME CLAIR du site client ================= */
body.site {
  --bg: #f7f8f5; --surface: #ffffff; --surface-2: #f0f3f0; --line: #dde5de;
  --text: #10291e; --muted: #53665b; --accent: #2f7d3e; --gold: #3d8a4c; --gold-dark: #2f7a3f;
  --danger: #b8382a; --ok: #2f7d3e;
  color-scheme: light; background: var(--bg); color: var(--text);
}
body.site .topbar { background: rgba(255,255,255,.95); border-bottom-color: var(--line); }
body.site .topbar nav a { color: var(--muted); }
body.site .hero { background: radial-gradient(900px 420px at 85% 0%, #e2efe3 0%, transparent 70%), linear-gradient(180deg, #ffffff, var(--bg)); }
body.site .eyebrow { color: var(--accent); }
body.site .hero-sub.script { color: var(--accent); }
body.site .claim { color: var(--text); }
body.site .claim .script { color: var(--muted); }
body.site .order-box { box-shadow: 0 12px 34px rgba(16,41,30,.10); border-color: #e2e8e2; }
body.site .seg button.on, body.site .tabs button.on { color: #fff; }
body.site .hero-photo { display: block; width: 100%; max-width: 640px; height: 240px; object-fit: cover; object-position: center 55%;
  border-radius: 18px; margin-top: 22px; box-shadow: 0 16px 36px rgba(16,41,30,.22); }
body.site .test-banner { background: #e8f2e9; color: #1d4a2e; }
body.site .error { background: #fdecea; color: #8c2a1f; }
body.site .todo, body.site .promo-tag { color: #a8620a !important; }
body.site .card { box-shadow: 0 6px 18px rgba(16,41,30,.07); border-color: #e4e9e4; }
body.site .card .photo img, body.site .sheet-photo img { filter: drop-shadow(0 8px 8px rgba(0,0,0,.18)); }
body.site .light-zone { background: transparent; }
body.site dialog.sheet { box-shadow: 0 20px 60px rgba(0,0,0,.25); border-color: #e2e8e2; }
body.site dialog.sheet::backdrop { background: rgba(16,41,30,.45); }
body.site .drawer.open { box-shadow: -12px 0 40px rgba(16,41,30,.18); }
body.site .backdrop { background: rgba(16,41,30,.35); }
body.site .footer { color: var(--muted); }
body.site .footer strong { color: var(--text); }
body.site .ribbon { color: #fff; }
.page-logo { display: block; height: 34px; width: auto; margin: 0 auto 18px; }
@media (max-width: 820px) { body.site .hero-photo { height: 170px; } }

/* ---------- pages légales */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; line-height: 1.6; }
.legal h1 { font-size: 34px; color: var(--accent); text-transform: uppercase; }
.legal h2 { font-size: 20px; margin-top: 28px; }
.legal mark { background: #fff1c2; color: #6b4a00; padding: 0 3px; border-radius: 3px; }
.allergen-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; font-size: 15px; }
.allergen-table th, .allergen-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; width: 100%; padding-top: 14px; border-top: 1px solid var(--line); }
.legal-links a { color: var(--muted); }
.allergens { font-size: 13px; color: var(--muted); margin: 0; }
.cgv-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.cgv-ok input { width: 18px; height: 18px; accent-color: var(--gold); margin-top: 2px; }

/* Bandeau Mardi fou : jamais de coupure au milieu du prix, passe à la ligne proprement sur petit écran */
.promo { flex-wrap: wrap; row-gap: 6px; max-width: 100%; }
.promo > * { white-space: nowrap; }
@media (max-width: 480px) {
  .promo { display: inline-grid; grid-template-columns: auto auto; column-gap: 14px; row-gap: 2px; align-items: center;
    font-size: 15px; padding: 10px 14px; transform: rotate(-1.5deg); }
  .promo strong { grid-column: 1; grid-row: 1; }
  .promo span { grid-column: 1; grid-row: 2; }
  .promo b { grid-column: 2; grid-row: 1 / span 2; font-size: 22px; padding: 4px 10px; }
  .promo em { grid-column: 1 / -1; grid-row: 3; white-space: normal; }
  .claim { margin-top: 10px; }
}
@media (max-width: 360px) {
  .promo { font-size: 13px; column-gap: 10px; padding: 8px 10px; }
  .promo b { font-size: 18px; padding: 3px 8px; }
}
