:root { --orange: #e8590c; --orange-dark: #c2410c; --orange-soft: #fff0e6; --bg: #fff8f0; --ink: #2b2118; --line: #eadccc; --ok: #2f9e44; --bad: #e03131; --card: #fff; --shadow: 0 2px 10px rgba(80,40,0,.08); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font: 16px/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--ink); }
header { background: var(--orange); color: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 5; }
header h1 { font-size: 18px; margin: 0; flex: 1; }
header a { color: #fff; text-decoration: none; font-weight: 700; }
#conn { width: 10px; height: 10px; border-radius: 50%; background: #69db7c; }
#conn.off { background: #ffa8a8; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
main { padding: 12px; max-width: 1100px; margin: 0 auto; }
h2 { font-size: 15px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: #7a5c3e; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.row > .fit { flex: none; }
label { font-size: 13px; font-weight: 600; color: #7a5c3e; display: block; margin: 8px 0 3px; }
input, select, textarea { width: 100%; font: inherit; padding: 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }
button { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 12px 16px; background: var(--orange); color: #fff; cursor: pointer; }
button.sec { background: #f1e6d8; color: var(--ink); }
button.ok { background: var(--ok); } button.bad { background: var(--bad); }
button.big { width: 100%; padding: 16px; font-size: 18px; }
button:disabled { opacity: .45; }
button.mic { background: #f1e6d8; padding: 12px; font-size: 20px; line-height: 1; }
button.mic.on { background: var(--bad); color: #fff; animation: blink 1s infinite; }
.tabs { display: flex; gap: 6px; margin: 8px 0; }
.tabs button { flex: 1; background: #fff; color: var(--ink); border: 2px solid var(--line); padding: 12px 6px; }
.tabs button.active { color: #fff; border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.prod { background: #fff; color: var(--ink); border: 2px solid var(--line); text-align: left; padding: 12px; min-height: 76px; position: relative; }
.prod small { display: block; font-weight: 500; color: #7a5c3e; margin-top: 4px; }
.prod .q { position: absolute; top: -8px; right: -8px; background: var(--bad); color: #fff; border-radius: 999px; min-width: 26px; height: 26px; line-height: 26px; text-align: center; font-size: 14px; }
.cart-line { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.cart-line .n { flex: 1; } .cart-line button { padding: 6px 12px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: #868e96; }
.pill.cuisine, .pill.nouveau { background: #f08c00; } .pill.preparation { background: #1c7ed6; } .pill.pret { background: var(--ok); }
.pill.livraison { background: #7048e8; } .pill.livre { background: #495057; } .pill.annule { background: var(--bad); }
.pay { display: flex; gap: 6px; } .pay label { flex: 1; margin: 0; }
.pay input { display: none; }
.pay span { display: block; text-align: center; padding: 12px 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; color: var(--ink); font-size: 14px; }
.pay input:checked + span { border-color: var(--orange); background: #fff0e6; color: var(--orange); }
.total { font-size: 22px; font-weight: 800; text-align: right; margin: 8px 0; }
.ticket { border-left: 8px solid #f08c00; } .ticket.preparation { border-left-color: #1c7ed6; } .ticket.pret { border-left-color: var(--ok); opacity: .6; }
.ticket .num { font-size: 26px; font-weight: 800; flex: none; }
.ticket .row { flex-wrap: wrap; }
.ticket li { font-size: 20px; margin: 4px 0; } .ticket ul { margin: 8px 0; padding-left: 20px; }
.home { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.home a { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 22px 16px; text-decoration: none; color: var(--ink); font-size: 20px; font-weight: 800; }
.home a small { display: block; font-weight: 500; font-size: 14px; color: #7a5c3e; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; background: #fff; } th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; } td.r, th.r { text-align: right; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translate(-50%, 80px); background: #212529; color: #fff; padding: 12px 18px; border-radius: 10px; transition: transform .2s; z-index: 20; max-width: 90vw; }
#toast.show { transform: translate(-50%, 0); } #toast.bad { background: var(--bad); }
.muted { color: #7a5c3e; font-size: 13px; }
.two { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two { grid-template-columns: 1.4fr 1fr; align-items: start; } .two .sticky { position: sticky; top: 64px; } }

/* Téléphone : formulaires qui passent à la ligne, tableaux défilables dans leur carte */
@media (max-width: 600px) {
  .row.form { flex-wrap: wrap; }
  .row.form > * { flex: 1 1 45%; }
  .row.form > .fit { flex: 1 1 100%; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { padding: 8px 6px; }
  main { padding: 10px; }
}
.two { grid-template-columns: minmax(0, 1fr); } .two > * { min-width: 0; }
select { min-width: 0; text-overflow: ellipsis; }
@media (min-width: 900px) { .two { grid-template-columns: 1.4fr 1fr; } }
@media (max-width: 600px) { .prodrow { flex-wrap: wrap; } .prodrow > .n { flex: 1 1 100%; } .prodrow > input.fit { flex: 1 1 80px; width: auto !important; } }

/* ===== Habillage (les couleurs de la marque se changent dans :root, tout en haut) ===== */
body { background: radial-gradient(1200px 400px at 50% -120px, #ffe8d2 0%, var(--bg) 70%) no-repeat, var(--bg); }
header { background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%); box-shadow: 0 2px 12px rgba(120,40,0,.25); padding: 12px 16px; }
header h1 { font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.card { box-shadow: var(--shadow); border-radius: 16px; padding: 14px; }
button { box-shadow: 0 2px 0 rgba(0,0,0,.12); transition: transform .08s, filter .15s; }
button:active { transform: translateY(1px) scale(.99); filter: brightness(.95); }
button.sec { box-shadow: none; border: 1px solid var(--line); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(232,89,12,.15); }
.home a { box-shadow: var(--shadow); border-radius: 18px; transition: transform .1s, border-color .15s; }
.home a:active { transform: scale(.98); border-color: var(--orange); }
.pill { letter-spacing: .02em; }
.prod { border-radius: 14px; box-shadow: var(--shadow); }
.prod:active { border-color: var(--orange); background: var(--orange-soft); }
.ticket { border-radius: 14px; }
h2 { color: var(--orange-dark); font-size: 14px; letter-spacing: .06em; }
table { border-radius: 12px; overflow: hidden; }
th { background: var(--orange-soft); color: var(--orange-dark); }
.total { color: var(--orange-dark); }

/* ===== Cartes produit : photo, nom, prix en bas, compteur et box ===== */
#tabs { gap: 8px; }
.ktab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px !important; font-size: 13px; line-height: 1.15; border-radius: 14px; }
.ktab .ki { font-size: 28px; line-height: 1; }
#grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
.pcard { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.pcard.sel { background: #fffaf5; }
.pcard .fav { position: absolute; top: 6px; left: 8px; z-index: 1; font-size: 16px; }
.pimg { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; background-size: cover; background-position: center; background-color: #f4e9dc; }
.pimg.noimg { display: flex; align-items: center; justify-content: center; font-size: 54px; }
.pname { font-weight: 800; font-size: 15px; line-height: 1.15; min-height: 34px; }
.pprice { font-weight: 800; color: var(--orange-dark); font-size: 17px; }
.pprice small { font-weight: 500; color: #7a5c3e; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { background: var(--orange-soft); color: var(--orange-dark); border: 1px dashed var(--orange); box-shadow: none; padding: 4px 8px; font-size: 12px; border-radius: 999px; line-height: 1.15; }
.chip small { display: block; font-weight: 600; font-size: 11px; }
.step { display: flex; align-items: center; gap: 4px; margin-top: auto; }
.step button { padding: 0; width: 44px; height: 44px; font-size: 24px; line-height: 1; flex: none; }
.step input { text-align: center; font-weight: 800; font-size: 18px; padding: 8px 2px; min-width: 0; height: 44px; }
.thumb { width: 52px; height: 52px; flex: none !important; border-radius: 10px; background: var(--orange-soft) center/cover; display: flex; align-items: center; justify-content: center; font-size: 28px; }
@media (max-width: 600px) { .prodrow > .n { flex: 1 1 calc(100% - 64px); } }

/* ===== Style sobre (remplace l'habillage précédent) ===== */
:root { --orange: #c2410c; --orange-dark: #9a3412; --orange-soft: #f7ece4; --bg: #f5f3ef; --ink: #1f1b16; --line: #e6e1d8; --shadow: 0 1px 3px rgba(31,27,22,.08); }
body { background: var(--bg); }
header { background: #1f1b16; box-shadow: none; border-bottom: 3px solid var(--orange); }
header h1 { font-weight: 700; letter-spacing: .02em; }
.card { border-radius: 12px; box-shadow: var(--shadow); }
button { box-shadow: none; border-radius: 10px; }
h2 { color: #6b6256; letter-spacing: .08em; font-size: 12px; font-weight: 700; }
.total, .pprice, th { color: var(--orange-dark); }
th { background: #f3eee6; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(194,65,12,.15); }

/* Onglets de cuisine : vraies photos */
#tabs { gap: 8px; }
.ktab { position: relative; height: 92px; padding: 0 !important; border: 0 !important; border-radius: 12px; overflow: hidden; background-size: cover; background-position: center; display: flex !important; align-items: flex-end; justify-content: flex-start; text-align: left; color: #fff !important; }
.ktab::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 25%, rgba(0,0,0,.72) 100%); }
.ktab .kname { position: relative; padding: 8px 10px; font-weight: 800; font-size: 14px; line-height: 1.1; }
.ktab:not(.active) { filter: grayscale(.55) brightness(.9); }
.ktab.active { filter: none; }

/* Cartes produit */
.pcard { border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.pcard.sel { background: #fff; box-shadow: 0 0 0 2px var(--orange); border-color: transparent !important; }
.pimg { border-radius: 8px; }
.pimg.noimg { background: #ece7de !important; color: #9a8f7e; font-size: 44px; font-weight: 800; }
.pcard .fav { top: 14px; left: 14px; background: rgba(31,27,22,.78); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; }
.pname { font-size: 15px; font-weight: 700; }
.pprice { font-size: 16px; font-weight: 800; }
.chip { border-radius: 8px; background: #fff; border: 1px solid var(--orange); color: var(--orange-dark); }
.step button { border-radius: 10px; }

/* Profils (connexion) */
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--orange-soft); color: var(--orange-dark); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.thumb { border-radius: 8px; background-color: #ece7de; color: #9a8f7e; font-weight: 800; font-size: 22px; }
.ktab[data-k="sucre"] { background-position: center 80%; }
.ktab[data-k="plats"] { background-position: center 45%; }
.ktab[data-k="fastfood"] { background-position: center 55%; }
.ktab::before { background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.68) 100%); }
.ktab:not(.active) { filter: grayscale(.35) brightness(.95); }

/* Très petits téléphones (320 px) : en-tête compact, lignes d'administration qui passent à la ligne */
@media (max-width: 360px) {
  header { gap: 6px; padding: 10px 10px; }
  header h1 { font-size: 16px; }
  #whoami { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #staff .row, #drivers .row, #zones .row.card, #zones .card.row { flex-wrap: wrap; }
  #staff .row > .n, #drivers .row > .n { flex: 1 1 100%; }
  #staff .row > button, #drivers .row > button { flex: 1 1 40%; }
  #staff .row > .fit.muted { flex: 1 1 100%; }
}


/* ===== Couleurs du logo Ô Bon Food : marron chocolat et beige (changer ici pour tout modifier) ===== */
:root { --orange: #5a2e1c; --orange-dark: #3f2013; --orange-soft: #f4eadf; --bg: #faf5ee; --line: #e8dccb; --ink: #2b1a11; --brand: #5a2e1c; --tan: #d9bd9f; }
header { background: var(--brand); border-bottom: 3px solid var(--tan); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(90,46,28,.18); }
body { color: var(--ink); }
/* Boutons « Dicter » : le texte blanc sur fond beige était illisible */
button.mic { color: var(--ink); border: 1px solid var(--line); }
button.mic.on { color: #fff; }
.brandlogo { display: block; margin: 0 auto; width: 240px; max-width: 72%; background: #fff; border-radius: 16px; padding: 6px; }
