/* =========================================================
   PALETTE « COMPTOIR » (mode sombre), règle 60-30-10 :
   60 % charbon · 30 % rouge ketchup · 10 % moutarde (boutons et prix)
   En sombre : pas d'ombres, une carte est plus CLAIRE que le fond.
   ========================================================= */
:root {
  --fond: #141210;
  --carte: #211e1b;
  --ligne: rgb(246 238 223 / .1);
  --texte: #f6eedf;
  --texte-2: #c3b7a4;

  --ketchup: #b02a18;
  --ketchup-fonce: #8f2213;

  --moutarde: #f2b632;
  --moutarde-clair: #f9cb62;
  --encre: #1d1a17;

  /* Les 6 tailles de texte du site */
  --t-sm: 14px;
  --t-base: 17px;
  --t-md: 20px;
  --t-lg: 28px;
  --t-xl: clamp(36px, 5vw, 48px);
  --t-2xl: clamp(44px, 7.2vw, 88px);

  --r-btn: 12px;
  --r-card: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-width: thin; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
}

h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
h1 { font-size: var(--t-2xl); line-height: 1; }
h2 { font-size: var(--t-xl); margin-bottom: 24px; }
h3 { font-size: var(--t-lg); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }

.container { width: min(1088px, 100% - 48px); margin-inline: auto; }

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--texte); outline-offset: 4px; }

/* ===== BANDEAU DÉMO ===== */
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  padding: 8px 16px;
  color: var(--texte-2);
  font-size: var(--t-sm);
}
.demo-bar a { display: inline-flex; align-items: center; gap: 4px; color: var(--texte); text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }
.demo-bar .icon { width: 16px; height: 16px; }

/* ===== EN-TÊTE : dans le rouge, il prolonge l'accueil ===== */
.header { position: sticky; top: 0; z-index: 15; background: var(--ketchup); }
.header__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; }
.logo { font-size: var(--t-lg); font-weight: 800; letter-spacing: -.03em; white-space: nowrap; color: var(--texte); text-decoration: none; }
.nav { display: flex; gap: 32px; }
.nav a { padding-block: 8px; font-weight: 600; color: var(--texte); text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  background: var(--moutarde);
  color: var(--encre);
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--moutarde-clair); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; border-color: rgb(246 238 223 / .5); color: var(--texte); }
.btn--ghost:hover { background: var(--ketchup-fonce); }

/* ===== ACCROCHE : plein rouge, titre géant ===== */
.hero { padding-block: 64px 96px; background: var(--ketchup); }
.hero__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: center; }
.hero__small { margin-bottom: 16px; font-weight: 600; }
.hero__text { max-width: 32rem; margin: 24px 0 32px; font-size: var(--t-md); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== LE TICKET DE COMMANDE ===== */
.ticket {
  padding: 32px 28px 40px;
  background: var(--texte);
  color: var(--encre);
  transform: rotate(2deg);               /* posé de travers sur le comptoir */
  font-variant-numeric: tabular-nums;
  /* Bas dentelé : on découpe des petits triangles dans le ticket */
  --dent: conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) 50% / 16px 100%;
  -webkit-mask: var(--dent);
  mask: var(--dent);
}
.ticket__titre { margin-bottom: 8px; font-size: var(--t-sm); color: #655a4e; }
.ticket__heures { font-size: var(--t-lg); font-weight: 800; letter-spacing: -.02em; }
.ticket hr { margin: 20px 0; border: 0; border-top: 1px dashed rgb(29 26 23 / .4); }
.ticket__liste { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ticket__liste li { display: flex; justify-content: space-between; gap: 16px; }
.ticket__liste li span:last-child { white-space: nowrap; font-weight: 600; }
.ticket__pied { font-size: var(--t-sm); color: #655a4e; }

/* Badge Ouvert / Fermé (texte et classes ajoutés par script.js) */
.statut { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 600; }
.statut:empty { display: none; }
.statut::before { content: ""; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #2f9e5b; }
.statut--ferme::before { background: #85807a; }

/* ===== LA CARTE ===== */
.section { padding-block: 96px; }

.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filtre {
  padding: 8px 16px;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  background: var(--carte);
  color: var(--texte-2);
  font: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.filtre:hover { background: #2e2a26; color: var(--texte); }
.filtre:active { transform: translateY(1px); }
.filtre.actif { background: var(--texte); color: var(--encre); font-weight: 600; }

.menus { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.menu { padding: 32px; border: 1px solid var(--ligne); border-radius: var(--r-card); background: var(--carte); }
.menu[hidden] { display: none; }
.menu h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.menu--full { grid-column: 1 / -1; }
.menu ul { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.menu--full ul { grid-template-columns: repeat(2, 1fr); gap: 20px 84px; }

.menu__img { width: 48px; height: 48px; fill: none; stroke: var(--moutarde); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.plat__nom { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: var(--t-md); font-weight: 600; }
.prix { white-space: nowrap; color: var(--moutarde); font-variant-numeric: tabular-nums; }
.plat__detail { color: var(--texte-2); }

/* ===== FORMULE MIDI sur rayures de store ===== */
.formule { padding-block: 64px; background: repeating-linear-gradient(90deg, var(--ketchup) 0 40px, var(--texte) 40px 80px); }
.formule__carte {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 720px;
  margin-inline: auto;
  padding: 32px 40px;
  border-radius: var(--r-card);
  background: var(--fond);
}
.formule__titre { font-size: var(--t-lg); font-weight: 800; letter-spacing: -.02em; }
.formule__detail { color: var(--texte-2); }
.formule__dispo { margin-top: 12px; font-size: var(--t-sm); color: var(--texte-2); }
.formule__dispo--live { color: #7fcf9f; font-weight: 600; }
.formule__prix { font-size: var(--t-xl); font-weight: 800; letter-spacing: -.03em; white-space: nowrap; color: var(--moutarde); }

/* ===== HORAIRES & LIVRAISON ===== */
.two-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: start; }
.hours { width: 100%; margin-top: 16px; border-collapse: collapse; }
.hours td { padding: 12px 0; border-bottom: 1px solid var(--ligne); }
.hours td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hours tr.aujourdhui td { color: var(--moutarde); font-weight: 600; }
.hours tr.aujourdhui td:first-child::after { content: " · aujourd'hui"; font-size: var(--t-sm); font-weight: 400; }

.acces { padding: 32px; border: 1px solid var(--ligne); border-radius: var(--r-card); background: var(--carte); }
.acces h2 { font-size: var(--t-lg); margin-bottom: 16px; }
.acces__adresse { margin-bottom: 12px; }
.acces__note { display: flex; gap: 8px; margin-top: 12px; color: var(--texte-2); }

.footer { padding: 32px 24px; text-align: center; font-size: var(--t-sm); color: var(--texte-2); border-top: 1px solid var(--ligne); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.call-fab { display: none; }

/* ===== TABLETTE ===== */
@media (max-width: 900px) {
  .hero__grid, .two-cols { grid-template-columns: 1fr; gap: 48px; }
  .ticket { transform: none; }
  .menus { grid-template-columns: 1fr; }
}

/* ===== TÉLÉPHONE ===== */
@media (max-width: 640px) {
  .container { width: min(1088px, 100% - 32px); }
  .hero { padding-block: 32px 56px; }
  .section { padding-block: 64px; }
  .btn { width: 100%; }
  .header__inner { gap: 12px; }
  .logo { font-size: var(--t-md); }
  .nav { gap: 12px; }
  .nav a { font-size: var(--t-sm); white-space: nowrap; }
  .menu, .acces { padding: 24px; }
  .menu--full ul { grid-template-columns: 1fr; }
  .formule__carte { flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; }

  .call-fab {
    position: fixed;
    inset: auto 16px 16px;
    z-index: 20;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--r-btn);
    background: var(--moutarde);
    color: var(--encre);
    font-weight: 600;
    text-decoration: none;
  }
  .call-fab:active { background: var(--moutarde-clair); }
  body { padding-bottom: 80px; }
}

/* ===== ANIMATIONS AU DÉFILEMENT (moteur : animations.js) ===== */
/* Le ticket sort de l'imprimante, par à-coups */
@keyframes imprimer { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.js .ticket.visible { animation: imprimer 1.4s steps(14) .3s backwards; }
/* … puis penche un peu plus quand on descend */
@media (min-width: 901px) { .ticket { rotate: calc(var(--p, 0) * 6deg); } }

/* La carte : l'icône se dessine, les plats arrivent un par un */
.js .menu.visible .menu__img { animation: dessiner 1.6s ease-out calc(var(--delai, 0s) + .1s) backwards; }
.js .menu.visible li { animation: ligne .6s var(--ease) calc(var(--delai, 0s) + .2s + var(--i) * .12s) backwards; }

/* Le store glisse avec le défilement, et le prix se tamponne */
.formule { background-position-x: calc(var(--p, 0) * 240px); }
@keyframes tampon { from { opacity: 0; transform: scale(1.8) rotate(-12deg); } }
.js .formule__carte.visible .formule__prix { animation: tampon .45s cubic-bezier(.3, 0, .2, 1) .5s backwards; }

/* Horaires ligne par ligne, et le scooter arrive en livraison */
.js .reveal.visible .hours tr { animation: ligne .6s var(--ease) calc(.2s + var(--i) * .1s) backwards; }
@keyframes rouler { from { opacity: 0; transform: translateX(-96px); } }
.js .reveal.visible .scooter { animation: rouler 1.2s var(--ease) .4s backwards; }
