
/* ─────────────────────────────
   BAR CLUB — FULLSCREEN CASH UI V9
   Sans header, catégories en haut
───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --surface-3: #e9edf5;
  --card: #ffffff;
  --card-hover: #fff8f2;
  --line: #e3e7ef;
  --line-strong: #d2d8e4;
  --text: #151821;
  --muted: #6c7484;
  --muted-2: #9aa3b2;
  --accent: #f97316;
  --accent-2: #ff8a2a;
  --accent-dark: #c94f05;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 7px;
  --footer-h: 78px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow-card: 0 8px 22px rgba(21, 24, 33, .10);
  --shadow-soft: 0 4px 14px rgba(21, 24, 33, .08);
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

button, .drink-card, .cat-tab { touch-action: manipulation; }
button { font: inherit; }

#phone {
  width: 100%;
  height: 100%;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  touch-action: manipulation;
}
#phone::before { display: none; }

/* Header retiré : gain de place utile */
header, .logo { display: none !important; }

/* ── HEADER ── */
header {
  flex-shrink: 0;
  height: 72px;
  padding: 0 clamp(14px, 3vw, 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 18px rgba(201,79,5,.25);
  position: relative;
  z-index: 10;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1;
  color: #fff;
  letter-spacing: 1.4px;
}
.logo::after {
  content: 'Commande buvette';
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.94);
  margin-left: 4px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 5px;
  background: rgba(255,255,255,.14);
}

/* ── MAIN ── */
#main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ── CATEGORY TABS ── */
.cat-tabs {
  flex-shrink: 0;
  /*display: flex;*/
  gap: clamp(10px, 2.5vw, 26px);
  padding: 0 clamp(12px, 3vw, 28px);
  height: 62px;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 3px 10px rgba(21,24,33,.035);
    
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex: 0 0 auto;
  min-width: 92px;
  /*padding: 0 2px;*/
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  color: #596273;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: .01em;
  text-align: center;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /*gap: 8px;*/
  box-shadow: none;
  transition: color .12s ease, border-color .12s ease;
    font-variant: small-caps;
}
.cat-tab:active { color: var(--accent-dark); }
.cat-tab.active {
  color: var(--accent-dark);
  background: transparent;
  border-bottom-color: var(--accent);
  box-shadow: none;
}
.cat-tab .ti {
  display: inline;
  width: auto;
  height: auto;
  margin-right: 0;
  border-radius: 0;
  background: transparent;
  font-size: 19px;
  line-height: 1;
  vertical-align: baseline;
}
.cat-tab.active .ti { background: transparent; }

/* ── SWIPE AREA ── */
.swipe-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  cursor: grab;
  background: var(--bg);
}
.swipe-wrap.dragging { cursor: grabbing; }
.swipe-track {
  display: flex;
  height: 100%;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.cat-panel {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  /*padding: 18px clamp(12px, 3vw, 28px) calc(var(--footer-h) + 22px);*/
    padding: 18px clamp(12px, 3vw, 28px) 15px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 15px;
  align-content: start;
  scrollbar-width: none;
}
.cat-panel::-webkit-scrollbar { display: none; }

/* ── PRODUCT CARD ── */
.drink-card {
  min-height: 214px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  user-select: none;
  box-shadow: var(--shadow-card);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.drink-card:active,
.drink-card.pressing { transform: translateY(1px) scale(.985); }
.drink-card.in-cart {
  border-color: rgba(249,115,22,.55);
  box-shadow: 0 9px 24px rgba(249,115,22,.16), var(--shadow-card);
}
.drink-card.lp-active .minus-hint { opacity: 1; }

.d-emoji {
    width: 100%;
    height: 158px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fffaf5, #eef2f7);
    position: relative;
}

.d-emoji IMG {
    width: 100%;          
    height: 100%;         
    object-fit: cover;  
    display: block;
}

.d-emoji::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(220,38,38,0);
  transition: background .05s;
}
.drink-card.pressing .d-emoji::after { background: rgba(220,38,38,.10); }

.d-info { padding: 8px 10px 10px; }
.d-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.18;
  min-height: 18px;
  margin-bottom: 3px;
}
.d-price {
  font-size: 15px;
  color: var(--accent-dark);
  font-weight: 950;
  letter-spacing: -.02em;
}

.qty-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 27px;
  height: 27px;
  padding: 0 7px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(249,115,22,.32);
  transition: opacity .12s;
}
.drink-card.in-cart .qty-pill { opacity: 1; }
.minus-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  opacity: 0;
  pointer-events: none;
  transition: opacity .1s;
  line-height: 1;
}


@media (min-width: 760px) {
  .cat-tab { min-width: 118px; }
  .d-emoji { height: 178px; font-size: 104px; }
  .drink-card { min-height: 238px; }
}

@media (max-width: 420px) {
  .cat-tabs { gap: 0; height: 54px; }
  .cat-tab { min-width: 84px; font-size: 18px; }
  .d-emoji { height: 132px; font-size: 76px; }
}
/* ── DOTS ── */
.swipe-dots {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px 10px;
  /*background: var(--bg);*/
    background-color: transparent;
}
.swipe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c6cdd9;
  transition: background .16s, width .16s;
}
.swipe-dot.active {
  width: 22px;
  border-radius: 5px;
  background: var(--accent);
}

/* ── FOOTER BAR ── */
#footer-bar {
  flex-shrink: 0;
  min-height: var(--footer-h);
  padding: 10px clamp(12px, 3vw, 28px) calc(10px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(21,24,33,.10);
  position: relative;
  z-index: 20;
}
.footer-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-items {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.footer-total {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(25px, 4.5vw, 35px);
  color: var(--text);
  font-weight: 950;
  line-height: 1;
}
.footer-reset {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  border: 1px solid rgba(220,38,38,.20);
  background: #fff5f5;
  color: var(--danger);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
}
.footer-reset:active { background: #ffe8e8; }
.footer-reset.hidden { opacity: .25; pointer-events: none; }
.footer-reset.hidden2 { display: none }

.footer-comm {
  flex-shrink: 0;
  height: 46px;
  padding: 0;
  width: 0;
  overflow: hidden;
  border-radius: 6px;
  border: none;
  background: rgba(249,115,22,.08);
  color: var(--accent);
  font-size: 18px;
  font-weight: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .04em;
  transition: width .2s, padding .2s;
}
.footer-comm::before { content: '#'; font-size: 12px; margin-right: 2px; opacity: .6; }
.footer-comm:not(.hidden) {
  width: 58px;
  padding: 0 10px;
  border: 1px solid rgba(249,115,22,.25);
}
.footer-order-btn {
  flex-shrink: 0;
  height: 48px;
  min-width: 132px;
  padding: 0 18px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(249,115,22,.26);
}
.footer-order-btn:active { background: var(--accent-dark); }
.footer-order-btn:disabled {
  background: #d9dee8;
  color: #8b94a3;
  box-shadow: none;
  cursor: not-allowed;
}

/* ── BOTTOM SHEET ── */
#sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 80;
  pointer-events: none;
  transition: background .22s;
}
#sheet-overlay.open { background: rgba(15,23,42,.46); pointer-events: all; }

#bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: min(84%, 720px);
  display: flex;
  flex-direction: column;
  z-index: 81;
  background: #fff;
  border-radius: 9px 9px 0 0;
  border-top: 1px solid var(--line);
  box-shadow: 0 -22px 55px rgba(15,23,42,.22);
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
#bottom-sheet.open { transform: translateY(0); }

.sheet-handle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 8px;
}
.sheet-drag {
  width: 46px;
  height: 5px;
  border-radius: 5px;
  background: #d3d8e3;
  margin: -5px auto 0 auto;
}
.sheet-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 950;
  color: var(--text);
  letter-spacing: -.02em;
}
.sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f6f7fb;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet-close:active { background: #eef1f6; }

.sheet-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 12px;
  border-bottom: 1px solid var(--line);
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 2px 18px;
  scrollbar-width: none;
}
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-empty {
  padding: 38px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.s-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.s-item:last-child { border-bottom: none; }
.s-emoji {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #f3f5f9;
  font-size: 24px;
  flex-shrink: 0;
   
    overflow: hidden;
}
.s-emoji IMG {
    object-fit:cover;
    width: 42px;
  height: 42px;
}
.s-info { flex: 1; min-width: 0; }
.s-name {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.s-unit { font-size: 12px; color: var(--muted); font-weight: 700; }
.s-ctrl { display: flex; align-items: center; flex-shrink: 0; gap: 4px; }
.s-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.s-btn.m { background: #fff1f1; color: var(--danger); }
.s-btn.m:active { background: #ffe0e0; }
.s-btn.p { background: #fff4e8; color: var(--accent-dark); }
.s-btn.p:active { background: #ffe4c7; }
.s-qty {
  font-size: 20px;
  font-weight: 950;
  min-width: 28px;
  text-align: center;
  color: var(--text);
}
.s-price {
  font-size: 15px;
  font-weight: 950;
  color: var(--accent-dark);
  min-width: 52px;
  text-align: right;
  flex-shrink: 0;
}

.sheet-footer {
  flex-shrink: 0;
  padding: 12px 18px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}
.sheet-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.st-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
}
.st-amt {
  font-size: 30px;
  color: var(--text);
  font-weight: 950;
  letter-spacing: -.03em;
}
.btn-send {
  width: 100%;
  padding: 15px 14px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(249,115,22,.26);
}
.btn-send:active { background: var(--accent-dark); }
.btn-send:disabled {
  background: #d9dee8;
  color: #8b94a3;
  box-shadow: none;
  cursor: not-allowed;
}

/* ── CONFIRM OVERLAY ── */
#confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.64);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
  padding: 18px;
}
#confirm-overlay.show { opacity: 1; pointer-events: all; }
.confirm-box {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 8px;
  padding: 30px 24px 24px;
  text-align: center;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(15,23,42,.24);
  transform: scale(.96);
  transition: transform .22s;
}
#confirm-overlay.show .confirm-box { transform: scale(1); }
.cb-icon { font-size: 46px; margin-bottom: 8px; }
.cb-h { font-size: 20px; font-weight: 950; color: var(--text); margin-bottom: 6px; }
.cb-num { font-size: 58px; font-weight: 950; color: var(--success); line-height: 1; }
.cb-sub { font-size: 12px; color: var(--muted); margin-top: 4px; margin-bottom: 16px; }
.cb-p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.btn-ok {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 6px;
  background: var(--success);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

/* ── TOAST / HINT ── */
#toast {
  position: absolute;
  bottom: calc(var(--footer-h) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 150;
  max-width: calc(100% - 28px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px 16px;
  border-radius: 6px;
  background: #151821;
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  transition: opacity .18s, transform .18s;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15,23,42,.22);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#lp-hint {
  position: absolute;
  bottom: calc(var(--footer-h) + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: #fff;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  z-index: 151;
  white-space: nowrap;
  transition: opacity .15s;
}
#lp-hint.show { opacity: 1; }

/* reset overlay inline HTML kept, but restyled from CSS */
#reset-overlay.show { opacity:1 !important; pointer-events:all !important; }
#reset-overlay.show #reset-box { transform:translateY(0) !important; }
#reset-overlay { background: rgba(15,23,42,.46) !important; }
#reset-overlay #reset-box {
  background: #fff !important;
  border-top: 1px solid var(--line) !important;
  box-shadow: 0 -22px 55px rgba(15,23,42,.22) !important;
  color: var(--text) !important;
}
#reset-overlay #reset-box button:first-child {
  background: #eef1f6 !important;
  color: var(--muted) !important;
  border-radius: 6px !important;
}
#reset-overlay #reset-box button:last-child {
  background: var(--danger) !important;
  border-radius: 6px !important;
}

@media (min-width: 760px) {
  .cat-panel { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); }
  .drink-card { min-height: 238px; }
  .d-emoji { height: 178px; font-size: 104px; }
  #bottom-sheet { left: 50%; right: auto; width: min(560px, calc(100% - 32px)); transform: translate(-50%, 100%); border-radius: 9px 9px 0 0; }
  #bottom-sheet.open { transform: translate(-50%, 0); }
}

@media (max-width: 420px) {
  header { height: 64px; }
  .logo::after { display: none; }
  .cat-tab { min-width: 108px; padding: 10px 10px; }
  .cat-tab .ti { width: 26px; height: 26px; margin-right: 6px; }
  .cat-panel { grid-template-columns: repeat(2, 1fr); gap: 10px; padding-top: 12px; }
  .drink-card { min-height: 176px; }
  .d-emoji { height: 126px; font-size: 74px; }
  .d-info { padding: 7px 8px 9px; }
  .d-name { font-size: 14px; min-height: 15px; }
  .d-price { font-size: 14px; }
  .footer-order-btn { min-width: 118px; padding: 0 12px; }
}

/* Ajustement V8 : visuel dominant, infos compactes */
.drink-card { 
    display: flex; flex-direction: column;
}
.d-emoji { flex: 1 1 auto; min-height: 150px; }
.d-info { flex: 0 0 auto; }
@media (min-width: 760px) {
  .d-emoji { min-height: 178px; }
}
@media (max-width: 420px) {
  .d-emoji { min-height: 126px; }
}


.fly-toast {
  position: fixed; z-index: 9999; pointer-events: none;
  background: var(--accent); color: #fff;
  padding: 4px 12px; border-radius: 20px;
  font-size: 14px; font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(249,115,22,.4);
}
#toast { display: none; }