/* GEEK (Ennasr / Gammarth) — version 2 « BD / arcade »
   Fond jaune en trame de points, gros contours noirs, ombres décalées « cartoon »,
   cases de BD pour les catégories. Locobeans (police de l'ancien menu) pour les titres. */

@font-face {
  font-family: 'Locobeans-Fill';
  src: url('../fonts/locobeans-fill-font-regular.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'Locobeans-Outline';
  src: url('../fonts/locobeans-outline-font-regular.woff') format('woff');
  font-display: swap;
}

:root {
  --orange: #f18817;
  --pink: #e94499;
  --lime: #c0d049;
  --yellow: #f1e74b;
  --blue: #6ac7ed;
  --ink: #231f20;
  --paper: #fffdf6;
  /* couleur de fond de page (et de la barre collante) : crème Geek ; jaune / bleu / orange en accents */
  --bg: #fcf3ea;
  --muted: #4d4749;

  --comic: 'Locobeans-Fill', 'Montserrat', system-ui, sans-serif;
  --head: 'Montserrat', system-ui, sans-serif;
  --body: 'Varela Round', 'Montserrat', system-ui, sans-serif;

  --line: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* pas de hidden : casserait la barre collante */
}
body.rtl { --comic: 'Cairo', system-ui, sans-serif; --head: 'Cairo', system-ui, sans-serif; --body: 'Cairo', system-ui, sans-serif; }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* fond fixe en calque : couleur --bg + trame de points façon BD (iOS ignore background-attachment: fixed) */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(rgba(35, 31, 32, .13) 1.3px, transparent 1.8px) 0 0 / 14px 14px,
    var(--bg);
}

/* ---------- Chargement ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .5s ease, visibility .5s;
}
.loading-overlay img { width: 170px; animation: wobble .9s ease-in-out infinite alternate; }
.loading-overlay.hidden { opacity: 0; visibility: hidden; }
@keyframes wobble { from { transform: rotate(-4deg); } to { transform: rotate(4deg) scale(1.04); } }

/* ---------- En-tête ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 16px 30px;
  text-align: center;
}
.logo-panel {
  padding: 12px 22px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-2deg);
  animation: slam .6s var(--pop) both;
}
.hero-logo { width: min(48vw, 190px); }
@keyframes slam { from { opacity: 0; transform: rotate(-8deg) scale(.7); } }

/* bulle de BD « Accès 2H au parc 20DT » */
.park-bubble {
  position: relative;
  margin: 26px 0 0;
  padding: 10px 18px;
  border: var(--line);
  border-radius: 18px;
  background: var(--yellow);
  font-family: var(--head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
  animation: slam .6s .12s var(--pop) both;
}
.park-bubble::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 30px;
  width: 20px;
  height: 14px;
  border: var(--line);
  border-bottom: 0;
  background: var(--yellow);
  clip-path: polygon(0 100%, 30% 0, 100% 100%);
}
.park-bubble b { padding: 0 5px; border-radius: 6px; background: #fff; font-weight: 900; }

/* ---------- Bandeau défilant ---------- */
.ticker {
  overflow: hidden;
  padding: 10px 0;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--ink);
  color: var(--yellow);
}
.ticker-track { display: flex; align-items: center; gap: 18px; width: max-content; animation: ticker 22s linear infinite; }
.ticker span { font-family: var(--head); font-size: 17px; font-weight: 900; letter-spacing: .05em; white-space: nowrap; }
.ticker i { color: var(--pink); font-style: normal; font-size: 16px; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker { direction: ltr; } /* texte anglais : le bandeau défile toujours de droite à gauche, même en arabe */

/* ---------- Groupes (s'il y en a plusieurs) ---------- */
.group-switch { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 20px 16px 0; }
.group-btn {
  padding: 10px 20px;
  border: var(--line);
  border-radius: 14px;
  background: #fff;
  font-family: var(--head);
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.group-btn.active { background: var(--pink); color: #fff; }

/* ---------- Langue ---------- */
.lang-switcher { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 30; }
.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 14px;
  border: var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.lang-current svg { width: 14px; height: 14px; transition: transform .25s; }
.lang-switcher.open .lang-current svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 160px;
  padding: 6px;
  border: var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: .25s var(--ease);
}
.lang-switcher.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-option { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-size: 14px; }
.lang-option:hover, .lang-option.active { background: var(--yellow); }
.lang-backdrop { position: fixed; inset: 0; z-index: 20; display: none; }
.lang-backdrop.visible { display: block; }

/* ---------- Barre collante ---------- */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 10px 0;
  border-bottom: 3px solid var(--ink);
  background: var(--bg);
}
.sticky-nav:not(:has(.active)) { display: none; }

.tabs, .jump-nav {
  display: none;
  gap: 10px;
  padding: 2px 14px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar, .jump-nav::-webkit-scrollbar { display: none; }
.tabs.active, .jump-nav.active { display: flex; }
.tabs > :first-child, .jump-nav > :first-child { margin-inline-start: auto; }
.tabs > :last-child, .jump-nav > :last-child { margin-inline-end: auto; }

.tab {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: var(--line);
  border-radius: 14px;
  background: #fff;
  font-family: var(--head);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.tab img { width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 9px; object-fit: cover; background: #cfeaf6; }
.tab:not(:has(img)) { padding-inline-start: 14px; }
.tab:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.tab.active { background: var(--orange); color: #fff; }

/* fondu sur le bord quand d'autres catégories sont cachées de ce côté (classes posées par app.js) */
.tabs.more-right, .jump-nav.more-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 46px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 46px), transparent);
}
.tabs.more-left, .jump-nav.more-left {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 46px), transparent);
  mask-image: linear-gradient(to left, #000 calc(100% - 46px), transparent);
}
.tabs.more-left.more-right, .jump-nav.more-left.more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 46px, #000 calc(100% - 46px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 46px, #000 calc(100% - 46px), transparent);
}

.tabs.active ~ .jump-nav.active { margin-top: 6px; }
.jump-nav a {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-block: 3px;
  padding-inline: 3px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-family: var(--head);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
/* photo ronde de la catégorie dans le raccourci */
.jump-nav a img {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
  background: #cfeaf6;
}
.jump-nav a:not(:has(img)) { padding: 7px 12px; }
.jump-nav a.active { background: var(--ink); color: var(--yellow); }
.jump-nav a.active img { border-color: var(--yellow); }

@media (hover: hover) and (pointer: fine) {
  .tabs, .jump-nav { scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
}

/* ---------- Cases de BD (catégories) ---------- */
.menu { max-width: 620px; margin: 0 auto; padding: 26px 16px 8px; }
.group:not(.active), .tab-panel:not(.active) { display: none; }

.panel {
  margin-bottom: 28px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
}
.tone-0 { --tone: var(--blue); }
.tone-1 { --tone: var(--orange); }
.tone-2 { --tone: var(--pink); }
.tone-3 { --tone: var(--lime); }

.panel-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 70px;
  padding: 14px;
  border-bottom: 3px solid var(--ink);
  background:
    radial-gradient(rgba(255, 255, 255, .35) 1.4px, transparent 1.9px) 0 0 / 12px 12px,
    var(--tone);
}
.panel-head.has-img { height: 170px; background: #cfeaf6; }
.panel-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* titre dans un cartouche de BD */
.panel-title {
  position: relative;
  margin: 0;
  padding: 6px 14px 5px;
  border: var(--line);
  border-radius: 10px;
  background: var(--yellow);
  font-family: var(--comic);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .02em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1.5deg);
}
.panel-head:not(.has-img) .panel-title { background: #fff; }

.panel-body { padding: 4px 16px; }
.panel-empty { padding: 20px 0; text-align: center; color: var(--muted); }

.dish { padding: 14px 0; border-bottom: 2px dashed rgba(35, 31, 32, .22); }
.dish:last-child { border-bottom: 0; }
.dish.has-img { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: start; }

.dish-img {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: var(--line);
  border-radius: 14px;
  background: #cfeaf6;
  box-shadow: 2px 2px 0 var(--ink);
}
.dish-img img { width: 100%; height: 100%; object-fit: cover; }

.dish-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dish-name { margin: 2px 0 0; font-family: var(--head); font-size: 15.5px; font-weight: 800; line-height: 1.25; text-transform: uppercase; }
.dish-price {
  flex: none;
  padding: 2px 9px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--pink);
  color: #fff;
  font-family: var(--head);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--ink);
}
.dish-desc { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.dish-desc p { margin: 0; }

/* ---------- Pied de page ---------- */
.site-footer {
  margin-top: 30px;
  padding: 36px 22px calc(28px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.socials { display: flex; justify-content: center; gap: 14px; margin-bottom: 28px; }
.social-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2.5px solid #fff;
  border-radius: 14px;
  color: #fff;
  box-shadow: 3px 3px 0 var(--yellow);
}
.social-btn svg { width: 20px; height: 20px; }
.s-orange { background: var(--orange); }
.s-pink { background: var(--pink); }
.s-blue { background: var(--blue); }

.footer-block { margin-bottom: 24px; }
.footer-block h4 { margin: 0 0 8px; color: var(--yellow); font-family: var(--head); font-size: 14px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.footer-text { margin: 0 0 4px; font-size: 15px; line-height: 1.55; opacity: .9; }
.footer-text p { margin: 0; }
.footer-text a { text-decoration: none; }

.wifi-card {
  display: inline-grid;
  gap: 10px;
  margin: 0 auto 24px;
  padding: 16px 20px;
  border: 2.5px solid #fff;
  border-radius: 16px;
  font-size: 15px;
  box-shadow: 4px 4px 0 var(--blue);
}
.wifi-row { display: flex; align-items: center; gap: 10px; }
.wifi-row svg { flex: none; width: 18px; height: 18px; color: var(--yellow); }
.wifi-copy { margin-inline-start: 6px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 9px; background: var(--yellow); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }

.btn-feedback {
  display: table;
  margin: 0 auto 26px;
  padding: 13px 26px;
  border: 2.5px solid #fff;
  border-radius: 14px;
  background: var(--pink);
  color: #fff;
  font-family: var(--head);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--yellow);
}
.footer-copy { margin: 0; font-size: 12.5px; opacity: .6; }

/* ---------- Retour en haut ---------- */
.back-to-top {
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom));
  inset-inline-end: 16px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: var(--line);
  border-radius: 14px;
  background: var(--orange);
  color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .3s var(--ease);
  cursor: pointer;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
