/* 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 : une grille de 1160 px ─────────────────────────────────────
   Le haut de page à gauche (statut, nom, boutons), les horaires à droite, sur
   le fond du haut de page qui reste sur toute la largeur ; dessous, les autres
   blocs à la même largeur, espacés. Avant : une colonne de 430 px au milieu,
   des blocs de largeurs différentes collés les uns aux autres. */
body .accueil {
  display: grid; align-items: start; row-gap: 1.5rem; padding-bottom: 3rem;
  grid-template-columns:
    [plein-start] minmax(1.5rem, 1fr)
    [centre-start texte-start] minmax(0, 600px) [texte-end] 3.5rem
    [cote-start] minmax(0, 500px) [cote-end centre-end]
    minmax(1.5rem, 1fr) [plein-end];
}
body .accueil > * { grid-column: centre; max-width: none; margin: 0; }
body .accueil > .hero { display: contents; }
body .accueil .hero-bg { position: relative; grid-column: plein; grid-row: 1; align-self: stretch; }
body .accueil .hero-content {
  grid-row: 1; grid-column: centre; align-self: center;
  max-width: 620px; margin: 0 auto; padding: 3.5rem 0;
}
body .accueil-horaires .hero-content { grid-column: texte; margin: 0; }
body .hero-content .brand-emoji { font-size: 3.6rem; }
body .hero-content .brand-name { font-size: 4.4rem; }
body .hero-content .brand-tagline { font-size: 1.15rem; margin-top: .8rem; }
body .hero-content .badge-status { font-size: .85rem; margin-bottom: 1.6rem; }
body .hero-content .quick-info { margin-bottom: 2rem; }
body .hero-content .qi-chip { font-size: .88rem; padding: .4rem .8rem; }
body .hero-content .user-bar, body .hero-content .cta-block { max-width: 520px; }
body .hero-content .btn-cta:hover { background: var(--sf-primary-d); }
body .hero-content .btn-cta-secondary:hover { background: rgba(255,255,255,.06); }

/* Les horaires dans le haut de page, en carte posée sur le fond. */
body .accueil-horaires > .section-hours {
  grid-row: 1; grid-column: cote; align-self: center; position: relative; z-index: 1;
  margin: 3rem 0; padding: 1.6rem 1.6rem 1.75rem; border-radius: 20px;
  background: rgba(38,41,46,.82); border: 1px solid rgba(158,163,168,.18);
  box-shadow: 0 24px 60px rgba(0,0,0,.35); backdrop-filter: blur(8px);
}
body .section-hours .section-title { margin-bottom: 1rem; }
body .section-hours .hours-row { padding: .75rem 1rem; }

/* Les blocs suivants : même largeur, cartes arrondies. */
body .section-status { border: 0; padding: .25rem 0 0; }
body .section-referral { background: none; padding: 0; }
body .section-promos, body .section-reviews, body .section-why, body .accueil:not(.accueil-horaires) .section-hours {
  border-radius: 20px; padding: 2rem 2.25rem 2.25rem;
}
body .why-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem 2rem; }
body .reviews-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
body .promo-list { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* ── Pages de compte : le restaurant à gauche, le formulaire à droite ────── */
body .sf-auth { padding: 3rem 1.5rem 4rem; min-height: calc(100vh - 12rem); align-items: center; }
body .sf-auth-boite {
  max-width: 1000px; display: grid; grid-template-columns: minmax(0, 1fr) 480px;
  border: 1px solid rgba(158,163,168,.2); border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
body .sf-auth-boite .sf-auth-card {
  border: 0 !important; border-radius: 0; box-shadow: none !important; padding: 3rem 3.25rem !important;
}
body .sf-auth-cote {
  display: flex; flex-direction: column; justify-content: center; padding: 3rem 3.25rem;
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--sf-primary) 22%, transparent), transparent 60%),
    linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border-right: 1px solid rgba(158,163,168,.15);
}
body .sf-auth-cote-dedans { position: sticky; top: 7rem; }
body .sf-auth-marque { display: flex; align-items: center; gap: .8rem; }
body .sf-auth-emoji {
  font-size: 2rem; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
}
body .sf-auth-nom {
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 800; font-size: 2.3rem;
  line-height: 1.05; text-transform: uppercase; letter-spacing: .01em;
}
body .sf-auth-slogan { color: rgba(255,255,255,.72); font-size: 1rem; margin: 1rem 0 0; line-height: 1.5; }
body .sf-auth-points { list-style: none; padding: 0; margin: 2.25rem 0 0; display: grid; gap: 1.35rem; }
body .sf-auth-points li { display: flex; gap: .95rem; align-items: flex-start; }
body .sf-auth-points i {
  flex: 0 0 40px; height: 40px; border-radius: 12px; font-size: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sf-primary); background: color-mix(in srgb, var(--sf-primary) 14%, transparent);
}
body .sf-auth-points strong { display: block; font-size: 1rem; margin-bottom: .15rem; }
body .sf-auth-points span { display: block; color: rgba(255,255,255,.66); font-size: .9rem; line-height: 1.45; }

/* ── Contact : le formulaire à gauche, les informations pratiques à droite ─ */
body .contact-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
body .contact-colonnes > .col-12 { width: auto; }
body .contact-colonnes > .contact-infos { position: sticky; top: 5.5rem; }

/* ── Tarifs : les catégories sur deux colonnes ───────────────────────────── */
body .tarifs-wrap { max-width: 1120px; padding-left: 1.5rem; padding-right: 1.5rem; }
body .tarifs-cats { column-count: 2; column-gap: 3rem; }
body .tarifs-cat { break-inside: avoid; }
body .tarifs-cta { max-width: 440px; margin-left: auto; margin-right: auto; }
/* Long formulaire (inscription) : le texte en haut, pas au milieu d'une colonne plus haute que l'écran. */
body .sf-auth-cote-haut { justify-content: flex-start; padding-top: 4.5rem; }
