/* Livraison de repas — catalogue, carte, panier, suivi.
   Reprend les jetons de style.css (fond sombre, or) sans les redéfinir. */

.food-wrap { padding: 1.2rem 1rem 7rem; max-width: 1100px; margin: 0 auto; }
.food-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.food-head h2 { margin: 0; font-size: 1.6rem; }
.food-back { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }

.resto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.resto-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: inherit; font: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.resto-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.resto-card[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.resto-img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--surface-2); display: block; }
.resto-img.empty { display: grid; place-items: center; font-size: 2.2rem; }
.resto-body { padding: .8rem .9rem 1rem; }
.resto-body h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.resto-meta { color: var(--muted); font-size: .85rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  padding: .15rem .45rem; border-radius: 999px; background: var(--accent-tint); color: var(--accent-strong);
}
.badge.closed { background: rgba(229, 100, 78, .16); color: var(--err); }

.menu-hero { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; }
.menu-hero img { width: 96px; height: 96px; border-radius: var(--radius); object-fit: cover; }
.menu-cat { margin: 1.4rem 0 .6rem; font-size: 1.15rem; border-bottom: 1px solid var(--line); padding-bottom: .35rem; }
.dish {
  display: flex; gap: .9rem; align-items: center; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .8rem; margin-bottom: .6rem; color: inherit; font: inherit; cursor: pointer;
}
.dish:hover { border-color: var(--accent); }
.dish img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.dish-txt { flex: 1; min-width: 0; }
.dish-txt strong { display: block; }
.dish-txt p { margin: .15rem 0 0; color: var(--muted); font-size: .85rem; }
.dish-price { font-weight: 700; white-space: nowrap; }
.dish[disabled] { opacity: .5; cursor: not-allowed; }

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 64px; z-index: 40;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.1rem; border: 0; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-lg);
}

.cart-line { display: flex; gap: .7rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.cart-line .qty { display: flex; align-items: center; gap: .4rem; }
.cart-line button.step {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); color: inherit; font: inherit; cursor: pointer;
}
.cart-tot { display: flex; justify-content: space-between; padding: .35rem 0; }
.cart-tot.grand { font-size: 1.2rem; font-weight: 700; border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .6rem; }

.food-modal { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: end center; z-index: 60; }
.food-modal .sheet {
  background: var(--surface); width: min(560px, 100%); max-height: 86vh; overflow: auto;
  border-radius: var(--radius) var(--radius) 0 0; padding: 1.2rem;
}
.opt-group { margin: .9rem 0; }
.opt-group h4 { margin: 0 0 .35rem; font-size: .95rem; }
.opt-group label { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; }
.opt-group .price { margin-left: auto; color: var(--muted); }

.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; margin-bottom: .8rem; }
.steps { display: flex; gap: .35rem; margin-top: .6rem; }
.steps span { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-2); }
.steps span.done { background: var(--accent); }

/* ─────────── Espace restaurateur (rôle `restaurant`, resto.js) ─────────── */
/* Navigation interne de l'espace gérant : Commandes · Ma carte · Ma fiche. */
.resto-nav { display: flex; gap: 1rem; margin: 0 0 1rem; border-bottom: 1px solid var(--line); }
.resto-nav .food-back { padding: .5rem 0; border-bottom: 2px solid transparent; color: var(--muted); }
.resto-nav .food-back.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Bascule ouvert/fermé de la prise de commandes : l'état doit se lire d'un coup d'œil. */
.btn-open { background: var(--accent-tint); color: var(--accent-strong); border-color: var(--accent); }
.btn-closed { background: var(--surface-2); color: var(--muted); }

.order-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.btn-mini { font-size: .78rem; padding: .2rem .5rem; margin-left: .4rem; }
