/* Site de commande sur ordinateur (chargé seulement à partir de 1024 px :
   <link media="(min-width: 1024px)"> dans base.html). Le téléphone garde sa
   colonne et sa barre d'onglets ; ici, liens en haut et carte sur trois
   colonnes : catégories, produits, panier toujours visible. */

:root { --sf-ordi: 1240px; }

/* ── En-tête : liens à la place de la barre d'onglets du bas ─────────────── */
body { padding-bottom: 0; }
.sf-bottom-nav { display: none !important; }
.sf-navbar { max-width: var(--sf-ordi); padding: .7rem 1.5rem; }
.sf-navbar .brand { font-size: 1.35rem; }
.sf-nav-ordi { display: flex; align-items: center; gap: .3rem; }
.sf-nav-ordi a {
  color: rgba(255,255,255,.78); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: .5rem .85rem; border-radius: 10px; display: inline-flex; align-items: center; gap: .4rem;
  transition: background .15s, color .15s;
}
.sf-nav-ordi a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sf-nav-ordi a.active { color: var(--sf-primary); }
.sf-nav-ordi a.sf-nav-panier { background: var(--sf-primary); color: #111; margin-left: .4rem; }
.sf-nav-ordi a.sf-nav-panier:hover { background: var(--sf-primary-d, var(--sf-primary)); color: #111; }
.sf-nav-badge {
  min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px;
  background: #111; color: #fff; font-size: .78rem; display: inline-flex; align-items: center; justify-content: center;
}

/* Plus de colonne de téléphone : chaque page garde sa propre largeur (pages légales 760 px, blog 800…). */
:root { --sf-max-width: 1200px; }

/* ── La carte : catégories | produits | panier ───────────────────────────── */
body #menu-wrap {
  max-width: var(--sf-ordi); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 250px minmax(0, 1fr) 340px;
  grid-auto-rows: auto; column-gap: 1.5rem; padding: 1.25rem 1.5rem 2.5rem;
  align-items: start;
}
/* Bandeaux (fermé, offres, « Mes kebabs »…) sur toute la largeur. */
body #menu-wrap > *:not(#cat-grid):not(#item-picker):not(#cart-bar):not(#cat-skeleton) {
  grid-column: 1 / -1; margin-bottom: 1rem; border-radius: 12px;
}
body #cat-skeleton { display: none !important; }

/* Colonne des catégories : une liste, la catégorie ouverte en couleur. */
body #cat-grid {
  grid-column: 1; display: flex !important; flex-direction: column; gap: .35rem;
  padding: 0; position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow-y: auto;
}
body #cat-grid .cat-tile, body #cat-grid .cat-tile.has-img, body #cat-grid .cat-tile:only-child {
  min-height: 0; flex-direction: row; justify-content: flex-start; align-items: center; gap: .7rem;
  padding: .55rem .7rem; border-radius: 12px; background: transparent; border: 1px solid transparent;
  box-shadow: none; text-align: left; position: static; overflow: visible;
}
body #cat-grid .cat-tile:hover { transform: none; background: rgba(255,255,255,.06); }
body #cat-grid .cat-tile.active { background: rgba(255,255,255,.1); border-color: var(--sf-primary); }
body #cat-grid .ct-emoji { font-size: 1.5rem; width: 44px; text-align: center; }
body #cat-grid .ct-name, body #cat-grid .cat-tile.has-img .ct-name { color: #fff; font-size: .98rem; font-weight: 700; }
body #cat-grid .cat-tile.active .ct-name { color: var(--sf-primary); }
body #cat-grid .cat-tile.has-img img {
  width: 44px; height: 44px; aspect-ratio: 1; flex: 0 0 44px; border-radius: 10px; object-fit: cover;
}
body #cat-grid .cat-tile.has-img .ct-label {
  background: none; border: 0; padding: 0; margin: 0; border-radius: 0; width: auto;
}
body #cat-grid .ct-go { display: none; }

/* Colonne des produits : toujours ouverte, sans bouton retour. */
body #item-picker, body #item-picker.active { grid-column: 2; display: flex; }
body #item-picker .picker-back { display: none; }
body #item-picker .picker-hdr { padding: 0 0 .9rem; border-bottom: 0; }
body #item-picker .picker-title { font-size: 1.9rem; font-weight: 800; }
body #picker-grid { padding: 0; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
body .item-card { padding: 1.2rem .9rem; transition: transform .12s, border-color .12s, background .12s; }
body .item-card:hover { transform: translateY(-2px); border-color: var(--sf-primary); background: rgba(255,255,255,.11); }
body .item-name { font-size: 1rem; }
body .item-price { font-size: 1.1rem; }
body .item-compose { padding: 2rem 1.2rem; }
body .item-compose .item-name { font-size: 1.2rem; }

/* Colonne du panier : toujours visible, à droite. */
body #cart-bar {
  grid-column: 3; position: sticky; top: 5.5rem; bottom: auto;
  border: 1px solid rgba(158,163,168,.2); border-radius: 16px; box-shadow: none; padding: 1.1rem;
  max-height: calc(100vh - 7rem); overflow-y: auto;
}
body #cart-bar .cart-head small { font-size: .8rem; }
body #cart-bar .cart-mini { max-height: none; }
body #cart-bar .btn-add { display: none; }
body #cart-bar .cart-actions { flex-direction: column; }
body #cart-bar .cart-vide-ordi { display: block; color: rgba(255,255,255,.6); font-size: .9rem; margin-top: .3rem; }

/* ── Fenêtres de choix au centre de l'écran, pas en plein écran ──────────── */
body #wizard-modal .wbox {
  inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(720px, 92vw); height: min(860px, 90vh); border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
body #wizard-modal .w-header { padding-top: 1rem; }
/* Le voile des fenêtres couvre tout l'écran : la règle de base.css qui borne
   chaque bloc de la page à la colonne s'appliquait aussi à elles. */
body #fsauce-modal, body #wizard-modal, body > .dop-overlay { max-width: none; margin: 0; }
body #fsauce-modal { align-items: center; justify-content: center; }
body .fsauce-box { width: min(620px, 92vw); border-radius: 20px; animation: none; }
/* Barres collées en bas (panier, paiement) : plus de barre d'onglets en dessous. */
body .cart-footer { bottom: 0; }

/* ── Panier et paiement : deux colonnes ──────────────────────────────────── */
body .sf-page-large { max-width: 1100px !important; }
body .panier-colonnes, body .paiement-colonnes {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start;
}
body .panier-droite, body .paiement-recap { position: sticky; top: 5.5rem; }
body .paiement-recap { grid-column: 2; grid-row: 1; }
body .paiement-form { grid-column: 1; grid-row: 1; }
body .cart-footer { display: none; }
body .panier-suivant-ordi { display: block !important; }

/* ── Mon compte, suivi d'une commande : deux colonnes de cartes ──────────── */
body .sf-page-colonnes { max-width: 1040px !important; column-count: 2; column-gap: 1.25rem; }
body .sf-page-colonnes > * { break-inside: avoid; }
body .sf-page-colonnes > :first-child,
body .sf-page-colonnes > .alert,
body .sf-page-colonnes > .live-indicator { column-span: all; }

/* ── Mes commandes : une grille, ligne par ligne ─────────────────────────── */
body .sf-page-grille {
  max-width: 1040px !important; display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.25rem; align-items: start;
}
body .sf-page-grille > :not(.sf-card) { grid-column: 1 / -1; }

/* ── Accueil : sections à largeur de lecture, plus à celle de l'écran ────── */
body .section-why, body .section-reviews, body .section-referral, body .section-blog,
body .seo-fold, body .section-status, body .status-line { max-width: 960px; }
body .section-hours { max-width: 760px; border-radius: 16px; }
