/* @itZEN-CONFIG SECURITY=strict VERSIONING=2025-06-23-2015 LOG=enable */
/* @itZEN-FILE FILE=layout.css | PATH=/assets/css/layout.css | STATUS=RESPONSIVE-MOBILE-LOGO-BANNER-OPTIMIZED */
/* @itZEN-BUSINESS-LOGIC: Layout principal avec topbar, menu latéral et contenu, adapté tablette/mobile sans casser desktop. Objectif : bannière visible, logo compact, contenu principal lisible. */

/* ZENBLOCK 00: GLOBAL RESET */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ZENBLOCK 01: PAGE STRUCTURE */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background: #fafafa;
}

/* ZENBLOCK 02: TOPBAR */
#kiosk-topbar {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  z-index: 1000;
}

/* ZENBLOCK 03: LAYOUT ZONE */
#kiosk-layout {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  min-width: 0;
  position: relative;
}

#kiosk-menu {
  width: 80px;
  background: #f0f0f0;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 15px;
  box-sizing: border-box;
}

.kiosk-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

#kiosk-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
  background: #fff;
  min-width: 0;
}

/* ZENBLOCK 04: FOOTER */
#kiosk-footer {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.04);
  overflow-x: hidden;
  box-sizing: border-box;
  max-width: 100%;
}

/* ZENBLOCK 05: BURGER BUTTON */
#mobile-burger-button {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  font-size: 2rem;
  z-index: 2000;
  background: none;
  border: none;
  cursor: pointer;
}

/* ZENBLOCK 06: RESPONSIVE */
@media (max-width: 768px) {
  #kiosk-layout {
    flex-direction: column;
  }

  #kiosk-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100%;
    background: #f9f9f9;
    border-right: 1px solid #ddd;
    display: none;
    flex-direction: column;
    padding-top: 70px;
    z-index: 1500;
    box-shadow: 2px 0 6px rgba(0,0,0,0.1);
  }

  #kiosk-menu.open {
    display: flex;
  }

  .kiosk-content {
    flex: 1;
    min-height: 0;
    min-width: 0;
  }

  #kiosk-main {
    padding: 12px;
  }

  #mobile-burger-button {
    display: block !important;
  }

  #kiosk-footer {
    flex-direction: column;
    padding: 8px 12px;
    gap: 6px;
  }

  #kiosk-footer .cart-info {
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
    margin-bottom: 5px;
  }

  #kiosk-footer .cart-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  #kiosk-footer .cart-actions button {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 0;
    font-size: 0.85rem;
    border-radius: 8px;
    text-align: center;
  }

  #cart-count {
    margin: 0 6px 0 0;
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  /* ZENBLOCK 07: RESTAURANT BANNIÈRE – ADAPTATION MOBILE */
  #restaurant-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }

  .banner-left {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: flex-start;
  }

  .banner-left img {
    height: 60px;
    max-height: 60px;
    width: auto;
  }

  .banner-right {
    order: 2;
    width: 100%;
    padding-left: 0;
    gap: 10px;
  }

  .banner-topline,
  .line-horaire,
  .banner-resto-single {
    justify-content: flex-start !important;
  }
}
