/* ===========================
   Fond pleine page (logo)
   =========================== */
html, body { min-height: 100%; }
html::before{
  content:''; position: fixed; inset:0; z-index:-1;
  background: #faf6ef url('../img/bg-logo.jpg') no-repeat center / 520px;
}
html {
  scroll-behavior: smooth;
}

/* ===========================
   Palette marque (logo)
   =========================== */
:root{
  --brand-1: #0e2d4f; /* bleu logo */
  --brand-2: #d9412e; /* rouge logo */
}

/* ===========================
   Lien "Panier" (index)
   =========================== */
.panier-link {
  position: fixed; top: 14px; right: 16px; z-index: 35;
  font-weight: 700; color: #0a0a0a; text-decoration: underline; cursor: pointer;
  background: rgba(255,255,255,0.6); padding: .35rem .6rem; border-radius: 6px;
  backdrop-filter: blur(4px);
}
.panier-link .count {
  font-weight: 800; margin-left: .25rem; background: #ff3860; color: #fff;
  padding: 0 .4rem; border-radius: 999px; font-size: .8rem;
}
.page-menu .panier-link{ display: none !important; }

/* ===========================
   Cartes & style "verre"
   =========================== */
.glass {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

/* Grille de choix (index) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.choice {
  display:flex; align-items:center; justify-content:center; gap:.5rem;
  height: 110px; border-radius: 12px; font-weight: 700; font-size: 1.1rem;
  border: none; cursor: pointer; transition: transform .1s ease, box-shadow .2s ease;
  color: #0a0a0a;
}
.choice:active { transform: scale(.98); }
.choice .emoji { font-size: 1.4rem; }
.choice.emporter { background: #1a73e8; color: #fff; }
.choice.surplace { background: #188038; color: #fff; }
.choice.livraison { background: #f9ab00; color: #111; }

/* ===========================
   Drawer panier (slide droite)
   =========================== */
.drawer {
  position: fixed;
  top:0; right:-420px;
  width:400px; height:100vh;
  background:#fff;
  transition:right .3s ease;
  z-index:1000;
  display:flex; flex-direction:column;
}
.drawer.is-open { right:0; }

.drawer-overlay {
  position:fixed; inset:0;
  background:rgba(0,0,0,0.35);
  opacity:0; pointer-events:none;
  transition:opacity .3s ease;
  z-index:999;
}
.drawer-overlay.is-open {
  opacity:1; pointer-events:auto;
}

.drawer-header {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  display:flex; align-items:center; justify-content: space-between;
}
.drawer-body {
  flex:1;
  overflow-y:auto;
  padding: 1rem;
}
/* Scrollbar custom pour le panier */
.drawer-body::-webkit-scrollbar {
  width: 8px;
}
.drawer-body::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}
.drawer-body::-webkit-scrollbar-thumb {
  background: var(--brand-1);
  border-radius: 4px;
}
.drawer-body::-webkit-scrollbar-thumb:hover {
  background: var(--brand-2);
}

.drawer-footer { padding: 1rem; border-top: 1px solid #eee; }

.cart-item {
  display:flex; gap:.75rem; align-items:flex-start;
  padding:.5rem 0; border-bottom:1px dashed #eee;
}
.cart-item:last-child{border-bottom:none;}
.cart-item img { width:64px; height:64px; object-fit:cover; border-radius:6px; }

/* ===========================
   Chips catégories (menu)
   =========================== */
.chips {
  position: sticky; top: 0; z-index: 12;
  background: rgba(255,255,255,0.9);
  padding: .5rem 0;
  border-bottom: 1px solid #efefef;
}
.chips .chip {
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.4rem .6rem;
  border:1px solid #e6e6e6;
  border-radius: 999px;
  margin:.35rem .35rem;
  text-decoration:none; color:#363636; font-weight:600; font-size: .9rem;
}
.chip svg { width:20px; height:20px; }

/* ===========================
   Cards menu : hauteur/largeur uniformes
   =========================== */
.menu-row {
  display: grid !important;
  grid-template-columns: 1fr !important; /* mobile par défaut */
  gap: 1.5rem;
  margin-left: 0 !important;
  margin-right: 0 !important;
  align-items: stretch;
}
.menu-row > .column {
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: initial !important;
}
.menu-row .image.is-4by3 {
  height:240px !important;
  padding-top:0 !important;
}
.menu-row .image.is-4by3 img {
  width:100%;
  height:100% !important;
  object-fit:cover;
}
.menu-row .card {
  height: 100%;
  display:flex;
  flex-direction:column;
}

/* Tablette ≥769px et <1024px : exactement 3 colonnes */
@media (min-width: 769px) and (max-width: 1023px) {
  .menu-row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Desktop ≥1024px : exactement 4 colonnes */
@media (min-width: 1024px) {
  .menu-row {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ===========================
   Bouton flottant du panier
   =========================== */
.cart-tab{
  position: fixed !important;
  right: 0 !important; left: auto !important;
  top: 50vh !important; transform: translateY(-50%);
  width: 72px; height: 128px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid #e8e8e8; border-right: none;
  border-radius: 18px 0 0 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; z-index: 29; /* sous l'overlay (30) */
  transition: transform .18s ease, box-shadow .18s ease, opacity .2s ease;
}
.cart-tab::after{
  content:""; position:absolute; inset:0 0 0 auto; width:5px;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
  border-radius: 18px 0 0 18px; opacity:.85;
}
.cart-tab:hover{ box-shadow: 0 12px 28px rgba(0,0,0,.18); transform: translateY(-50%) translateX(-1px); }
.cart-tab:active{ transform: translateY(-50%) scale(.98); }
.cart-icon, .chevron{ transition: transform .2s ease, opacity .2s ease; }
.cart-tab:hover .cart-icon{ transform: translateX(-1px) scale(1.02); }
.cart-tab .chevron{ opacity: .88; }
.drawer.is-open ~ .cart-tab { opacity: 0; pointer-events: none; }

/* Pastille quantité */
.cart-tab .count{
  position: absolute; top: 6px; left: -12px;
  background: #ff3860; color: #fff;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ===========================
   Toast
   =========================== */
.toast {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 20px;
  background: #363636;
  color: #fff;
  padding: .75rem 1rem;
  border-radius: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, bottom .2s;
  z-index: 40;
}
.toast.is-visible { opacity: 1; bottom: 28px; }

/* Divers */
.footer-note { font-size: .9rem; color: #7a7a7a; }
img.rounded { border-radius: 8px; }
.section-title { scroll-margin-top: 70px; }


.pm-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4em 0.8em;
  margin: 0.2em;
  border-radius: 9999px;
  background: #eee;
  color: #333;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
  transition: all 0.2s;
}
.pm-chip:hover {
  background: #ddd;
}
.pm-chip.is-active {
  background: #444;   /* gris foncé */
  color: #fff;
  font-weight: 600;
}
.pm-chip input {
  display: none;
}

.pm-chip.is-unavailable {
  background: #e53935 !important; /* rouge */
  color: #fff !important;
  cursor: not-allowed;
}

/* Titres de catégories (menu) */
.category-title {
  margin: 2.5rem 0 1.5rem;      /* espace haut et bas */
  padding: .6rem 1rem;
  border-left: 6px solid var(--cat-color, #333);
  border-radius: 8px;
  background: rgba(255,255,255,0.85);
  font-size: 1.4rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--cat-color, #333);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.category-title i {
  font-size: 1.2rem;
}

.choice.is-disabled {
  position: relative;
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  filter: grayscale(1);
}

.choice.is-disabled:hover {
  transform: none !important;
}

.choice.is-disabled span {
  opacity: 0.9;
}
/* ===========================
   Layout menu : chips à gauche
   =========================== */

/* ===========================
   Layout menu : chips à gauche (tous écrans)
   =========================== */

/* Grille 2 colonnes : menu gauche / produits droite */
.page-menu .menu-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1rem;
  align-items: flex-start;
}

/* Colonne gauche : chips verticales, sticky */
.page-menu .menu-layout > .chips {
  position: sticky;
  top: 80px; /* ajuste selon ta notif + header */
  z-index: 12;
  background: transparent;
  padding: 0;
  border-bottom: none;
}

/* Chips = menu coloré (desktop + mobile) */
.page-menu .menu-layout > .chips .chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  margin: .25rem 0;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  width: 100%;

  background-color: var(--cat-color, #666);
  color: #fff;
}

/* Colonne droite : contenu du menu */
.page-menu .menu-main {
  min-width: 0;
}

/* Ajustements sur très petit écran, mais on garde bien 2 colonnes */
@media (max-width: 600px) {
  .page-menu .menu-layout {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 0.75rem;
  }

  .page-menu .menu-layout > .chips .chip {
    font-size: .8rem;
    padding: .35rem .6rem;
  }
}


  .page-menu .menu-main {
    margin-top: .5rem;
  }
}
