@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Nunito:wght@400;600;700;800;900&display=swap');

/* ── Variables ───────────────────────────────────────── */
:root {
  --rouge:      #E63329;
  --orange:     #F4831F;
  --vert:       #6AB04C;
  --creme:      #FDF6EC;
  --blanc:      #FFFFFF;
  --text:       #2D2D2D;
  --muted:      #9A8F87;
  --border:     #EDE0D6;
  --shadow:     0 2px 14px rgba(0,0,0,.07);
  --shadow-md:  0 6px 28px rgba(0,0,0,.11);
  --radius:     16px;
  --radius-sm:  10px;
  --serif:      'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:       'Nunito', 'Segoe UI', system-ui, sans-serif;
}

/* ── Reset & base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--creme);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}

/* ── Sticky header (pages intérieures) ───────────────── */
.sticky-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--blanc);
  border-bottom: 1px solid var(--border);
  padding: 13px 16px;
  display: flex; align-items: center; gap: 12px;
}
.sticky-header h1 {
  flex: 1; font-size: 18px; font-weight: 800; color: var(--rouge);
}
.header-sub {
  font-size: 12px; color: var(--muted); font-weight: 600; text-align: right;
}

.back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: var(--creme); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; text-decoration: none; font-size: 20px;
  color: var(--text); line-height: 1; transition: background .15s;
}
.back-btn:hover { background: var(--border); }

/* ── Page content ────────────────────────────────────── */
.page-content {
  max-width: 520px; margin: 0 auto;
  padding: 8px 16px 110px;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: block; width: 100%; padding: 16px 24px;
  border: none; border-radius: 50px;
  font-family: var(--sans); font-size: 16px; font-weight: 800;
  cursor: pointer; text-align: center; text-decoration: none;
  transition: opacity .15s, transform .1s; letter-spacing: .2px;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--rouge), var(--orange));
  color: #fff; box-shadow: 0 4px 16px rgba(230,51,41,.28);
}
.btn-primary:hover { opacity: .92; }
.btn-secondary {
  background: linear-gradient(135deg, var(--vert), #5A9A3C);
  color: #fff; box-shadow: 0 4px 16px rgba(106,176,76,.28);
}
.btn-secondary:hover { opacity: .92; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ── Section title ───────────────────────────────────── */
.section-title {
  font-size: 15px; font-weight: 800; color: var(--text);
  margin: 22px 0 11px; display: flex; align-items: center; gap: 8px;
}
.section-title::after { content:''; flex:1; height:1px; background:var(--border); }

/* ── Category header ─────────────────────────────────── */
.cat-section { margin-top: 24px; }
.cat-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.cat-icon { font-size: 22px; flex-shrink: 0; }
.cat-header h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--text);
}
.cat-line { flex:1; height:1px; background: var(--border); }

/* ── Dish card (menu + commande) ─────────────────────── */
.plat-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--blanc); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; gap: 12px;
}
.plat-card.indispo { opacity: .48; }
.plat-info { flex:1; min-width:0; }
.plat-nom  { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.plat-desc { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.plat-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0;
}
.plat-prix { font-size: 17px; font-weight: 900; color: var(--orange); }
.badge-dispo   { font-size: 11px; font-weight: 700; color: var(--vert);  display:flex; align-items:center; gap:4px; }
.badge-indispo { font-size: 11px; font-weight: 700; color: var(--muted); display:flex; align-items:center; gap:4px; }
.badge-dispo::before   { content:''; width:6px; height:6px; border-radius:50%; background:var(--vert);  flex-shrink:0; }
.badge-indispo::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--muted); flex-shrink:0; }

/* ── Quantity controls ───────────────────────────────── */
.qty-control { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.qty-btn {
  width:34px; height:34px; border-radius:50%;
  border: 2px solid var(--border); background: var(--blanc);
  font-size:20px; font-weight:700; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color: var(--text); transition:all .15s; line-height:1; user-select:none;
}
.qty-btn:hover { border-color: var(--orange); color: var(--orange); }
.qty-btn.active { border-color:var(--rouge); background:var(--rouge); color:#fff; }
.qty-value { width:26px; text-align:center; font-size:16px; font-weight:900; }

/* ── Form elements ───────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display:block; font-weight:800; font-size:14px; margin-bottom:7px; }
.form-group input,
.form-group select {
  width:100%; padding:13px 16px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size:15px;
  background: var(--blanc); color: var(--text); outline:none;
  transition: border-color .15s;
  -webkit-appearance:none; appearance:none;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--orange); }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7l5 5 5-5' stroke='%239A8F87' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size:20px;
  padding-right:40px; cursor:pointer;
}

/* ── Sticky bottom (commande / réservation) ──────────── */
.sticky-bottom {
  position:fixed; bottom:0; left:0; right:0;
  background: var(--blanc); border-top:1px solid var(--border);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom,0px));
  box-shadow: 0 -4px 20px rgba(0,0,0,.06); z-index:40;
}
.sticky-bottom .inner { max-width:520px; margin:0 auto; }
.total-line {
  display:flex; justify-content:space-between; align-items:baseline; margin-bottom:12px;
}
.total-label { font-size:15px; font-weight:700; }
.total-amount { font-family: var(--serif); font-size:28px; font-weight:700; color: var(--rouge); }

/* ── Sticky CTA footer (menu) ────────────────────────── */
.sticky-cta {
  position:fixed; bottom:0; left:0; right:0;
  background: var(--creme); border-top:1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom,0px));
}
.sticky-cta .inner { max-width:520px; margin:0 auto; }

/* ── Success overlay ─────────────────────────────────── */
.overlay {
  display:none; position:fixed; inset:0; z-index:200;
  background:rgba(0,0,0,.5); backdrop-filter:blur(4px);
  align-items:center; justify-content:center; padding:24px;
}
.overlay.show { display:flex; }
.success-card {
  background: var(--blanc); border-radius:24px;
  padding:40px 28px; text-align:center;
  max-width:380px; width:100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  animation: popIn .25s ease;
}
@keyframes popIn { from { transform:scale(.88) translateY(20px); opacity:0; } to { transform:none; opacity:1; } }
.success-icon  { font-size:62px; margin-bottom:10px; }
.success-title {
  font-family: var(--serif); font-size:24px; font-weight:700;
  color: var(--vert); margin-bottom:10px;
}
.success-msg { font-size:15px; color:var(--muted); line-height:1.6; margin-bottom:28px; }

/* ── Loading ─────────────────────────────────────────── */
.loading { text-align:center; padding:48px 16px; color:var(--muted); font-size:15px; }
.spinner {
  width:36px; height:36px; border-radius:50%;
  border:3px solid var(--border); border-top-color:var(--rouge);
  animation:spin .7s linear infinite; margin:0 auto 14px;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────── */
.toast {
  position:fixed; bottom:90px; left:50%; transform:translateX(-50%);
  padding:14px 24px; border-radius:50px; font-weight:800; font-size:14px;
  z-index:300; white-space:nowrap;
  box-shadow:0 4px 24px rgba(0,0,0,.2);
  animation:slideUp .2s ease;
}
@keyframes slideUp {
  from { opacity:0; transform:translateX(-50%) translateY(10px); }
  to   { opacity:1; transform:translateX(-50%) translateY(0); }
}
.toast.error   { background:var(--rouge); color:#fff; }
.toast.success { background:var(--vert);  color:#fff; }
