:root {
  --orange: #EF7B00; --orange-fonce: #B35C00; --vert: #748B2B; --beige: #F9E6C5; --beige-bord: #EFDDB8;
  --noir: #1E1E21; --gris: #54595F; --fond: #FFFFFF; --rayon: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Poppins, Arial, sans-serif; color: var(--noir); background: var(--fond); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--orange-fonce); }
.cache { display: none !important; }

.entete { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 4px solid var(--beige); }
.entete-int { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.entete img { width: 62px; height: 42px; object-fit: contain; }
.entete h1 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.1; }
.entete h1 span { color: var(--orange); }
.entete p { margin: 0; font-size: 12px; color: var(--gris); }

.page { max-width: 760px; margin: 0 auto; padding: 12px 16px 120px; }
.message { border-radius: var(--rayon); background: var(--beige); padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.ferme { text-align: center; padding: 48px 16px; }
.ferme img { width: 140px; }
.ferme h2 { margin: 12px 0 6px; }

.rubriques { position: sticky; top: 70px; z-index: 15; background: #fff; display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.rubriques::-webkit-scrollbar { display: none; }
.rubriques a { flex: 0 0 auto; display: flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 2px solid var(--beige-bord); text-decoration: none; color: var(--noir); font-weight: 600; font-size: 14px; white-space: nowrap; }
.rubriques a.actif { background: var(--orange); border-color: var(--orange); color: #fff; }

.categorie h2 { font-size: 18px; margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .02em; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.carte { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; border-radius: var(--rayon); border: 2px solid var(--beige-bord); background: #fff; }
.carte:disabled { opacity: .5; cursor: default; }
.carte .photo { position: relative; height: 96px; background: var(--beige); display: flex; align-items: center; justify-content: center; }
.carte .photo img { width: 100%; height: 100%; object-fit: cover; }
.carte .photo .sans { width: 56px; opacity: .55; }
.badge { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--orange); color: #fff; }
.badge.epuise { background: var(--noir); }
.carte .corps { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex-grow: 1; }
.carte h3 { margin: 0; font-size: 14px; line-height: 1.25; }
.carte .desc { font-size: 12px; color: var(--gris); line-height: 1.3; }
.carte .prix { margin-top: auto; padding-top: 4px; font-weight: 700; }

.barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px 18px; background: linear-gradient(rgba(255,255,255,0), #fff 35%); }
.barre button { display: flex; width: 100%; max-width: 728px; margin: 0 auto; height: 58px; align-items: center; gap: 12px; border: 0; border-radius: var(--rayon); padding: 0 18px; background: var(--noir); color: #fff; font-weight: 700; font-size: 17px; }
.barre .nb { display: flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 15px; }
.barre .lib { flex-grow: 1; text-align: left; }

.voile { position: fixed; inset: 0; z-index: 40; background: rgba(30,30,33,.45); display: flex; align-items: flex-end; justify-content: center; }
.feuille { width: 100%; max-width: 760px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 16px 16px 0 0; padding: 18px 16px 24px; }
.feuille .haut { display: flex; align-items: flex-start; gap: 10px; }
.feuille .haut h2 { margin: 0; font-size: 20px; flex-grow: 1; }
.fermer { width: 44px; height: 44px; border: 0; border-radius: var(--rayon); background: var(--beige); font-size: 22px; line-height: 1; flex: 0 0 auto; }
.feuille .photo-grande { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--rayon); margin: 10px 0; }
.groupe { margin-top: 16px; }
.groupe h3 { margin: 0 0 6px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.groupe h3 small { font-weight: 500; color: var(--gris); font-size: 12px; }
.choix { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 12px; border: 2px solid var(--beige-bord); border-radius: var(--rayon); margin-bottom: 6px; }
.choix input { width: 20px; height: 20px; accent-color: var(--orange); flex: 0 0 auto; }
.choix span { flex-grow: 1; }
.choix em { font-style: normal; color: var(--gris); font-size: 13px; }
.choix.off { opacity: .45; }
.quantite { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.quantite button { width: 44px; height: 44px; border-radius: var(--rayon); border: 0; background: var(--beige); font-size: 22px; font-weight: 700; }
.quantite output { min-width: 28px; text-align: center; font-weight: 700; font-size: 18px; }
.principal { display: flex; width: 100%; height: 54px; margin-top: 18px; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: var(--rayon); background: var(--orange); color: #fff; font-weight: 700; font-size: 17px; }
.principal:disabled { background: #C9C2B4; }
.secondaire { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: var(--rayon); border: 2px solid var(--beige-bord); background: #fff; font-weight: 600; }

.panier-ligne { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--beige-bord); }
.panier-ligne .info { flex-grow: 1; }
.panier-ligne .info b { display: block; }
.panier-ligne .info small { color: var(--gris); }
.panier-ligne .actions { display: flex; align-items: center; gap: 6px; }
.panier-ligne .actions button { width: 36px; height: 36px; border-radius: 8px; border: 0; background: var(--beige); font-weight: 700; }
.champ { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font-weight: 600; font-size: 14px; }
.champ input, .champ select, .champ textarea { min-height: 46px; padding: 8px 12px; border-radius: var(--rayon); border: 2px solid var(--beige-bord); background: #fff; font-weight: 400; }
.total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-top: 16px; }
.mention { font-size: 12px; color: var(--gris); margin-top: 8px; }

.suivi { text-align: center; padding: 20px 0; }
.suivi .code { display: inline-block; font-size: 34px; font-weight: 700; letter-spacing: .12em; padding: 6px 18px; border-radius: var(--rayon); background: var(--beige); margin: 8px 0; }
.etat { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; background: var(--beige); }
.etat.ok { background: var(--vert); color: #fff; }
.etat.ko { background: var(--noir); color: #fff; }
.recu { text-align: left; border: 2px solid var(--beige-bord); border-radius: var(--rayon); padding: 12px 14px; margin-top: 16px; font-size: 14px; }
.recu table { width: 100%; border-collapse: collapse; }
.recu td { padding: 3px 0; vertical-align: top; }
.recu td:last-child { text-align: right; white-space: nowrap; }
.recu .tva td { color: var(--gris); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; max-width: 90vw; background: var(--noir); color: #fff; padding: 12px 16px; border-radius: var(--rayon); font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.feuille #ajouter { position: sticky; bottom: 0; box-shadow: 0 -12px 16px #fff; }
.carte .photo img.sans { width: 56px; height: auto; object-fit: contain; }
