/* Les Délices de Jess — feuille de style publique (mobile first) */
:root {
  --rose: #F4C9D0;
  --rose-soft: #FBE6EA;
  --beige: #E8D8C3;
  --cream: #FFF9F2;
  --brown: #49352F;
  --brown-soft: #7a625a;
  --accent: #C85A74;
  --ok: #2f7d4f;
  --warn: #b8741a;
  --danger: #b3382c;
  --radius: 16px;
  --shadow: 0 6px 22px rgba(73, 53, 47, .10);
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-script: 'Dancing Script', 'Brush Script MT', cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--brown);
  font: 400 16px/1.55 var(--font-body);
  padding-bottom: 76px; /* place pour la barre d'onglets mobile */
}
img { max-width: 100%; display: block; }
/* Sans cette règle, tout style « display » (ex. .dish { display: flex }) rend l'attribut hidden inopérant. */
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-script); font-weight: 700; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); }
h3 { font-size: 1.1rem; font-weight: 800; }
p { margin: 0 0 1em; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--brown-soft); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .6em 1.3em; border-radius: 999px; border: 2px solid transparent;
  font: 800 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brown); color: var(--cream); }
.btn-primary:hover { background: #33241f; }
.btn-soft { background: var(--rose); color: var(--brown); }
.btn-soft:hover { background: #efb7c1; }
.btn-ghost { background: transparent; color: var(--brown); border-color: var(--brown); }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-wa:hover { background: #197f45; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 38px; padding: .35em 1em; font-size: .92rem; }

/* En-tête */
.announce { background: var(--brown); color: var(--cream); text-align: center; padding: .45em 1em; font-size: .92rem; font-weight: 700; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 249, 242, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--beige); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brown); }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand span { font: 700 1.5rem/1 var(--font-script); }
@media (max-width: 480px) {
  .brand span { font-size: 1.25rem; }
  .status-pill { font-size: .75rem; padding: .25em .6em; text-align: left; }
}
.nav { display: none; gap: 4px; align-items: center; }
.nav a { padding: .5em .9em; border-radius: 999px; text-decoration: none; color: var(--brown); font-weight: 700; }
.nav a:hover, .nav a.active { background: var(--rose); }
.cart-link { position: relative; }
.badge-count {
  position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: #fff; border-radius: 999px; font: 800 .75rem/20px var(--font-body); text-align: center;
}
.badge-count[hidden] { display: none; }
.status-pill { display: inline-flex; align-items: center; gap: .45em; padding: .3em .8em; border-radius: 999px; font-weight: 800; font-size: .88rem; background: var(--beige); }
.status-pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }
.status-pill.open::before { background: var(--ok); box-shadow: 0 0 0 4px rgba(47, 125, 79, .2); }

/* Barre d'onglets mobile */
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--cream); border-top: 1px solid var(--beige); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; text-decoration: none; color: var(--brown-soft); font-size: .72rem; font-weight: 800; }
.tabbar a .ico { font-size: 1.35rem; line-height: 1; }
.tabbar a.active { color: var(--brown); }
.tabbar a.active .ico { transform: translateY(-2px); }
.tabbar .badge-count { top: 2px; right: calc(50% - 24px); }

/* Héro */
.hero-banner { background: var(--rose-soft); }
.hero-banner img { width: 100%; height: auto; aspect-ratio: 2056 / 765; object-fit: cover; }
.hero-cta { padding: 26px 0 8px; text-align: center; }
.hero-cta p { max-width: 560px; margin-inline: auto; color: var(--brown-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }

/* Sections */
.section { padding: 34px 0; }
.section.alt { background: var(--rose-soft); }
.section-head { text-align: center; margin-bottom: 20px; }
.section-head p { color: var(--brown-soft); margin: 0; }

/* Grille du menu : 2 ou 3 colonnes (--cols fixé depuis l'admin). Sur téléphone : 2 colonnes maximum. */
.menu-grid { display: grid; gap: 16px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
@media (max-width: 599px) {
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .menu-grid .dish-img { aspect-ratio: 1 / 1; font-size: 2.2rem; }
  .menu-grid .dish-body { padding: 10px; }
  .menu-grid .dish-body h3 { font-size: .95rem; }
  .menu-grid .dish-body p { font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .menu-grid .dish-foot { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 6px; }
  .menu-grid .dish-actions { display: flex; justify-content: center; }
  .menu-grid .dish-actions .btn { width: 100%; }
  .menu-grid .price { text-align: center; font-size: 1rem; }
}

/* Cartes de plats */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.dish { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.dish-img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--rose), var(--beige)); display: grid; place-items: center; font-size: 3rem; }
.dish-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dish-tag { position: absolute; top: 10px; left: 10px; background: var(--brown); color: var(--cream); font-size: .75rem; font-weight: 800; padding: .2em .7em; border-radius: 999px; }
.dish-body { display: flex; flex-direction: column; gap: 4px; padding: 14px; flex: 1; }
.dish-body p { margin: 0; color: var(--brown-soft); font-size: .92rem; flex: 1; }
.dish-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.price { font-weight: 900; font-size: 1.1rem; color: var(--brown); white-space: nowrap; }
.dish.is-out { opacity: .65; }
.dish.is-out .dish-img img { filter: grayscale(1); }

.stepper { display: inline-flex; align-items: center; background: var(--rose); border-radius: 999px; }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; font: 900 1.3rem var(--font-body); color: var(--brown); cursor: pointer; border-radius: 50%; }
.stepper output { min-width: 26px; text-align: center; font-weight: 900; }

/* Menu */
.menu-tools { position: sticky; top: 64px; z-index: 20; background: var(--cream); padding: 10px 0; border-bottom: 1px solid var(--beige); }
.search { width: 100%; min-height: 44px; padding: .5em 1em; border-radius: 999px; border: 2px solid var(--beige); background: #fff; font: 600 1rem var(--font-body); color: var(--brown); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: .4em 1em; border-radius: 999px; background: #fff; border: 2px solid var(--beige); color: var(--brown); font-weight: 800; text-decoration: none; font-size: .92rem; }
.chip:hover { background: var(--rose); }
.cat-block { padding-top: 22px; scroll-margin-top: 150px; }
.cat-block h2 { border-bottom: 2px dashed var(--rose); padding-bottom: 4px; }
.cartbar { position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 999px; background: var(--brown); color: var(--cream); box-shadow: 0 8px 26px rgba(0, 0, 0, .28); text-decoration: none; font-weight: 800; }
.cartbar[hidden] { display: none; }
.cartbar span:last-child { background: var(--rose); color: var(--brown); padding: .3em .9em; border-radius: 999px; }
.empty { text-align: center; padding: 40px 10px; color: var(--brown-soft); }

/* Promotions, étapes, bandeaux */
.promo-card { background: #fff; border: 2px dashed var(--accent); border-radius: var(--radius); padding: 16px; text-align: center; }
.promo-card strong { display: block; font-size: 1.1rem; }
.promo-code { display: inline-block; margin-top: 6px; padding: .2em .8em; background: var(--rose); border-radius: 8px; font-weight: 900; letter-spacing: .06em; }
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: s; }
.step { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); text-align: center; }
.step .num { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--rose); font-weight: 900; margin-bottom: 8px; }
.track-box { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.track-box input { flex: 1 1 200px; max-width: 280px; }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-weight: 800; font-size: .95rem; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: .55em .9em; border-radius: 12px; border: 2px solid var(--beige);
  background: #fff; color: var(--brown); font: 600 1rem var(--font-body);
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; align-items: center; justify-content: center; gap: .4em; min-height: 52px; padding: .5em; border: 2px solid var(--beige); border-radius: 12px; background: #fff; font-weight: 800; text-align: center; cursor: pointer; }
.choice input:checked + span { border-color: var(--brown); background: var(--rose); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { font-size: .85rem; color: var(--brown-soft); }
.error-text { color: var(--danger); font-weight: 700; font-size: .92rem; min-height: 1.2em; }

/* Panier */
.cart-layout { display: grid; gap: 22px; padding: 26px 0; }
.panel { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--beige); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .name { font-weight: 800; }
.cart-line .line-total { font-weight: 900; text-align: right; }
.cart-line .remove { background: none; border: 0; color: var(--danger); font-weight: 800; cursor: pointer; padding: 0; text-align: left; }
.cart-line.is-bad .name { color: var(--danger); }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.sum-row.total { border-top: 2px solid var(--brown); margin-top: 8px; padding-top: 10px; font-size: 1.25rem; font-weight: 900; }
.sum-row.discount { color: var(--ok); font-weight: 800; }
.free-bar { height: 8px; background: var(--beige); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.free-bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.form-error { background: #fdecea; border: 1px solid #f3b8b1; color: var(--danger); border-radius: 12px; padding: 10px 14px; font-weight: 700; margin-bottom: 12px; }
.form-error[hidden] { display: none; }

/* Alertes */
.alert { padding: 10px 14px; border-radius: 12px; margin: 12px 0; font-weight: 700; }
.alert-ok { background: #e6f4ec; color: var(--ok); }
.alert-error { background: #fdecea; color: var(--danger); }
.alert-info { background: var(--rose-soft); color: var(--brown); }

/* Suivi */
.timeline { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 18px 38px; color: var(--brown-soft); font-weight: 700; }
.timeline li::before { content: ''; position: absolute; left: 8px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--beige); border: 3px solid var(--cream); box-shadow: 0 0 0 2px var(--beige); }
.timeline li::after { content: ''; position: absolute; left: 16px; top: 22px; bottom: 0; width: 2px; background: var(--beige); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--brown); }
.timeline li.done::before { background: var(--ok); box-shadow: 0 0 0 2px var(--ok); }
.timeline li.current { color: var(--accent); font-size: 1.05rem; }
.timeline li.current::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(200, 90, 116, .3); }
.timeline.cancelled li { opacity: .5; }
.order-code { font: 900 1.6rem var(--font-body); letter-spacing: .08em; background: var(--rose); display: inline-block; padding: .1em .6em; border-radius: 12px; }

/* Contact / tableaux */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--beige); }
.table tr.today { background: var(--rose-soft); font-weight: 800; }
.two-col { display: grid; gap: 18px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.conditions { padding-left: 1.2em; margin: 0; }
.conditions li { margin-bottom: .4em; }

/* Pied de page */
.site-footer { background: var(--brown); color: var(--cream); padding: 28px 0 14px; margin-top: 30px; }
.site-footer a { color: var(--rose); }
.footer-grid { display: grid; gap: 18px; }
.footer-grid h3 { color: var(--rose); }
.copy { text-align: center; opacity: .7; font-size: .85rem; margin-top: 18px; }
.wa-float { position: fixed; right: 14px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 36; width: 54px; height: 54px; border-radius: 50%; background: #1f9d55; color: #fff; display: grid; place-items: center; font-size: 1.7rem; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.toast { position: fixed; left: 50%; bottom: calc(130px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; background: var(--brown); color: var(--cream); padding: .6em 1.2em; border-radius: 999px; font-weight: 800; z-index: 60; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .nav { display: flex; }
  .tabbar { display: none; }
  .cartbar { left: auto; right: 24px; bottom: 24px; min-width: 300px; }
  .wa-float { bottom: 100px; }
  .toast { bottom: 40px; }
  .cart-layout { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .cart-summary { position: sticky; top: 84px; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .menu-tools .container { display: flex; align-items: center; gap: 14px; }
  .search { max-width: 280px; }
  .chips { padding: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .tabbar, .site-footer, .wa-float, .cartbar, .announce { display: none !important; } body { padding: 0; } }
