/* =============================================================
   AKANEMI — Carte digitale (carte.html), cible du QR code
   -------------------------------------------------------------
   MOBILE D'ABORD : les règles de base visent un téléphone de 360 à
   430 px tenu d'une main ; les requêtes de média ÉLARGISSENT ensuite.

   01. Mise en page     04. Barre de catégories   07. Pied réduit
   02. En-tête réduit   05. Sections
   03. Intro & filtres  06. Plats (liste)
   ============================================================= */

/* ---------- 01. Mise en page ---------- */
:root {
  --cat-h: 60px;   /* remplacé par la hauteur MESURÉE (carte.js) */
  --wrap-c: 1100px;
}
/* Le saut vers une catégorie doit s'arrêter SOUS la barre collante, pas
   derrière. Sans en-tête fixe ici, seule la barre compte. */
html { scroll-padding-top: calc(var(--cat-h) + var(--bandeau-demo-h, 0px) + 8px); }

/* ---------- 02. En-tête réduit ---------- */
/* Une seule ligne, qui défile avec la page et disparaît : à table, le
   client est déjà chez nous, l'écran entier revient aux plats. */
.mhead {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: .75rem;
  height: 60px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
}
.mhead .brand { margin: 0; text-align: center; }
.mhead .brand__name { font-size: 1.05rem; letter-spacing: .34em; margin-left: .34em; }
.mhead__back {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2); border-radius: 50%;
  color: var(--txt-2);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.mhead__back:hover { background: var(--pill); color: var(--txt); }
.mhead__back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mhead__resa {
  padding: .45rem .9rem;
  border: 1px solid rgba(227, 24, 44, .6); border-radius: var(--r-pill);
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--rouge-pale);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.mhead__resa:hover { background: var(--rouge); color: #fff; }

/* ---------- 03. Intro & filtres ---------- */
.mintro {
  max-width: var(--wrap-c); margin: 0 auto;
  padding: 1.75rem var(--pad) 1.25rem;
}
.mintro__t {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rouge-vif);
  text-shadow: 0 0 32px rgba(255, 47, 61, .35);
}
.mintro__sub { margin-top: .35rem; font-size: .8125rem; color: var(--txt-3); }

.filtres {
  display: flex; gap: .5rem;
  margin: 1.25rem calc(var(--pad) * -1) 0; padding: 0 var(--pad);
  overflow-x: auto; scrollbar-width: none;
}
.filtres::-webkit-scrollbar { display: none; }
/* Sans JavaScript le filtre ne filtre rien : des boutons morts feraient
   douter du reste de la page. La carte, elle, reste entière. */
.no-js .filtres, .no-js .filtres__n { display: none; }

.filtre {
  flex: none;
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 40px;
  padding: .45rem 1rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--txt-2);
  font-size: .8125rem; font-weight: 500;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.filtre svg { width: 13px; height: 13px; fill: currentColor; }
.filtre:hover { background: var(--pill); color: var(--txt); border-color: transparent; }
/* Deux signaux pour l'état actif, jamais la couleur seule : fond rouge ET graisse. */
.filtre[aria-pressed="true"] { background: var(--rouge); border-color: var(--rouge); color: #fff; font-weight: 700; }

.filtres__n { min-height: 1.3em; margin-top: .6rem; font-size: .8125rem; color: var(--txt-3); }

/* ---------- 04. Barre de catégories (collante) ---------- */
.catbar {
  position: sticky; top: var(--bandeau-demo-h, 0px); z-index: 90;
  background: rgba(8, 7, 10, .94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.catbar__in {
  max-width: var(--wrap-c); margin: 0 auto;
  display: flex; gap: .45rem;
  padding: .6rem var(--pad);
  overflow-x: auto; scrollbar-width: none;
  scroll-padding-inline: var(--pad);
}
.catbar__in::-webkit-scrollbar { display: none; }

.cat {
  flex: none;
  display: inline-flex; align-items: center;
  min-height: 40px;
  padding: .45rem 1.05rem;
  border-radius: var(--r-pill);
  background: var(--pill);
  font-size: .875rem; font-weight: 500; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.cat:hover { background: var(--pill-h); }
.cat.is-on {
  background: var(--rouge); color: #fff; font-weight: 700;
  box-shadow: 0 4px 18px rgba(227, 24, 44, .4);
}
.cat[hidden] { display: none; }

/* Le rappel du filtre actif : une fine bande sous les catégories, toute la
   largeur cliquable. Elle n'apparaît que lorsqu'un filtre est posé. */
.fchip {
  display: flex; align-items: center; gap: .5rem;
  width: 100%;
  padding: .5rem var(--pad);
  border: 0; border-top: 1px solid var(--line);
  background: rgba(227, 24, 44, .12);
  font-size: .8125rem; color: var(--txt-2);
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.fchip:hover { background: rgba(227, 24, 44, .2); }
.fchip[hidden] { display: none; }
.fchip b { color: var(--txt); }
.fchip__x {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-left: auto;
  font-weight: 700; color: var(--rouge-pale);
}
.fchip__x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- 05. Sections ---------- */
.zone-carte { padding-bottom: 2.5rem; }

.carte {
  max-width: var(--wrap-c); margin: 0 auto;
  padding: 2rem var(--pad) 0;
}
.carte[hidden] { display: none; }

.carte__t {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .5rem;
  font-size: 1.125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rouge-vif);
}
.carte__t::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(227, 24, 44, .5), transparent);
}
.carte__n {
  padding: .1rem .55rem;
  border-radius: var(--r-pill);
  background: var(--pill);
  font-size: .6875rem; font-weight: 700; letter-spacing: 0;
  color: var(--txt-3);
}
.carte__note { margin-bottom: .5rem; font-size: .8125rem; color: var(--txt-3); }

/* ---------- 06. Plats : la liste ---------- */
/* Une colonne : photo carrée | nom + description | prix + badges.
   L'œil descend la colonne des prix d'un coup, sans balayer une grille. */
.menu-list { display: grid; }

.item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.item[hidden] { display: none; }

.item__img {
  width: 76px; height: 76px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}

.item__body { min-width: 0; padding-top: .1rem; }
.item__t { font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.item__d {
  margin-top: .25rem;
  font-size: .8125rem; line-height: 1.45; color: var(--txt-3);
  /* Trois lignes au plus : une description bavarde ne doit pas pousser la
     suite de la carte hors de l'écran. */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.item__side {
  display: flex; flex-direction: column; align-items: flex-end; gap: .4rem;
  padding-top: .1rem;
  text-align: right;
}
.item__p {
  font-size: 1rem; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--txt);
}
.item__tags { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }

.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .5rem;
  border-radius: var(--r-pill);
  font-size: .625rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.badge svg { width: 10px; height: 10px; fill: currentColor; }
.badge--pop { background: rgba(227, 24, 44, .18); color: var(--rouge-pale); }
.badge--new { border: 1px solid rgba(245, 184, 61, .5); color: var(--or); padding: calc(.15rem - 1px) calc(.5rem - 1px); }
.badge--veg { background: rgba(46, 204, 113, .14); color: var(--vert-pale); }

/* Très petits écrans (iPhone SE, 320 px) : on rend 10 px de photo au texte. */
@media (max-width: 360px) {
  .item { grid-template-columns: 64px minmax(0, 1fr) auto; gap: .7rem; }
  .item__img { width: 64px; height: 64px; }
}

/* Tablette et plus : photos plus généreuses. */
@media (min-width: 700px) {
  .item { grid-template-columns: 104px minmax(0, 1fr) auto; gap: 1.25rem; padding: 1.25rem 0; }
  .item__img { width: 104px; height: 104px; border-radius: 14px; }
  .item__t { font-size: 1.0625rem; }
  .item__d { font-size: .875rem; }
  .item__p { font-size: 1.125rem; }
  .carte { padding-top: 2.75rem; }
  .carte__t { font-size: 1.375rem; }
}

/* Grand écran : deux colonnes, la liste ne s'étire pas sur 1100 px. */
@media (min-width: 1100px) {
  .menu-list { grid-template-columns: 1fr 1fr; column-gap: 3.5rem; }
}

/* ---------- 07. Pied réduit ---------- */
.mfoot {
  padding: 2rem var(--pad) calc(2rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #050408;
  text-align: center;
  font-size: .8125rem; color: var(--txt-3);
}
.mfoot__allerg {
  max-width: 44ch; margin: 0 auto 1rem;
  color: var(--txt-2);
}
.mfoot a { color: var(--txt-2); border-bottom: 1px solid var(--line-2); transition: color .2s var(--ease); }
.mfoot a:hover { color: var(--rouge-pale); }
.mfoot__demo { margin-top: .5rem; font-size: .75rem; }
