/* MOLO — version 1 « trait & blanc »
   Reprend le logo : un seul trait fin indigo #24288E sur lequel posent des cercles et des arches.
   Page blanc cassé, Poppins (police de l'ancien menu), catégories toujours ouvertes. */

:root {
  --indigo: #24288e;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1d1f45;
  --muted: #6b6e8a;
  --line: rgba(36, 40, 142, .16);
  --on-accent: #ffffff;   /* texte sur fond indigo */
  --price: var(--indigo);
  --footer-bg: var(--indigo);
  --footer-ink: #ffffff;

  /* ornements du logo, posés sur le trait des titres (couleurs figées dans le SVG) */
  --orn-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='8.2' fill='%23fbfaf7' stroke='%2324288e' stroke-width='1.6'/%3E%3C/svg%3E");
  --orn-arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='20'%3E%3Cpath d='M2.5 20V12a10.5 10.5 0 0 1 21 0v8' fill='%23fbfaf7' stroke='%2324288e' stroke-width='1.6'/%3E%3C/svg%3E");

  --font: 'Poppins', system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

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

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

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

/* fond fixe en calque (iOS ignore background-attachment: fixed) + grand « o » du logo en filigrane */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
.page-bg::after {
  content: '';
  position: absolute;
  right: -140px;
  bottom: -140px;
  width: 420px;
  height: 420px;
  border: 1.6px solid var(--line);
  border-radius: 50%;
}

/* ---------- 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: 190px; animation: breathe 1.4s ease-in-out infinite; }
.loading-overlay.hidden { opacity: 0; visibility: hidden; }
@keyframes breathe { 50% { opacity: .4; } }

/* ---------- En-tête ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 16px 26px;
  text-align: center;
}
.hero-logo { width: min(64vw, 270px); animation: rise .9s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.socials { display: flex; gap: 12px; margin-top: 20px; animation: rise .9s .1s var(--ease) both; }
.social-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.6px solid var(--indigo);
  border-radius: 50%;
  color: var(--indigo);
  transition: background .25s, color .25s;
}
.social-btn svg { width: 17px; height: 17px; }
.social-btn:hover { background: var(--indigo); color: var(--on-accent); }

/* ---------- 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: 1.6px solid var(--indigo);
  border-radius: 999px;
  background: var(--surface);
  color: var(--indigo);
  font-size: 13.5px;
  font-weight: 500;
  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% + 8px);
  inset-inline-end: 0;
  min-width: 160px;
  padding: 6px;
  border: 1.6px solid var(--indigo);
  border-radius: 14px;
  background: var(--surface);
  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; color: var(--indigo); text-decoration: none; font-size: 14px; }
.lang-option:hover, .lang-option.active { background: var(--line); }
.lang-backdrop { position: fixed; inset: 0; z-index: 20; display: none; }
.lang-backdrop.visible { display: block; }

/* ---------- Barre collante : raccourcis des catégories, posée sur un trait comme le logo ---------- */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 11px 0;
  border-bottom: 1.6px solid var(--indigo);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tabs, .jump-nav {
  display: flex;
  gap: 8px;
  padding: 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar, .jump-nav::-webkit-scrollbar { display: none; }
.jump-nav { display: none; }
.jump-nav.active { display: flex; }
.tabs ~ .jump-nav.active { margin-top: 9px; }
/* centré quand tout tient, défilable sinon */
.tabs > :first-child, .jump-nav > :first-child { margin-inline-start: auto; }
.tabs > :last-child, .jump-nav > :last-child { margin-inline-end: auto; }

/* bords en fondu quand d'autres boutons sont cachés de ce côté (classes posées par app.js) */
.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.more-left.more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.tab, .jump-nav a {
  flex: none;
  padding: 7px 15px;
  border: 1.6px solid var(--indigo);
  border-radius: 999px;
  background: none;
  color: var(--indigo);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.tab.active, .jump-nav a.active { background: var(--indigo); color: var(--on-accent); }

/* niveau 1 (Nourriture, Boissons…) : grand interrupteur en pilule sous le logo, comme Birds */
.hero .tabs {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  margin-top: 26px;
  padding: 5px;
  border-radius: 999px;
  background: var(--indigo);
  box-shadow: 0 10px 24px rgba(36, 40, 142, .25);
  animation: rise .9s .15s var(--ease) both;
}
.hero .tab {
  min-width: 128px;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  transition: background .3s var(--ease), color .3s;
}
.hero .tab.active { background: var(--on-accent); color: var(--indigo); }

/* pastille blanche qui glisse d'un onglet à l'autre (position posée par app.js) */
.hero .tabs { position: relative; isolation: isolate; }
.hero .tabs::before {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  z-index: -1;
  width: var(--thumb-w, 0);
  border-radius: 999px;
  background: var(--on-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  transform: translateX(var(--thumb-x, 0));
  opacity: 0;
  transition: transform .5s cubic-bezier(.34, 1.3, .64, 1), width .5s cubic-bezier(.34, 1.3, .64, 1);
}
.hero .tabs.has-thumb::before { opacity: 1; }
.hero .tabs.no-anim::before { transition: none; }
.hero .tabs.has-thumb .tab.active { background: transparent; } /* c'est la pastille qui fait le fond */
.hero .tab { transition: color .35s ease; }
.hero .tab:active { transform: scale(.97); }

/* niveau 2 : bandeau indigo collant avec les raccourcis, l'actif en pastille blanche */
.sticky-nav {
  border-bottom: 0;
  background: var(--indigo);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 8px 20px rgba(36, 40, 142, .18);
}
.jump-nav a { border-color: transparent; color: rgba(255, 255, 255, .8); }

/* rappel compact de l'interrupteur : redescend en haut quand on remonte la page (classes posées par app.js) */
.mini-switch {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 16;
  display: flex;
  justify-content: center;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform .45s var(--ease), opacity .3s ease, visibility .45s;
}
.mini-switch.show { opacity: 1; visibility: visible; transform: none; }
.mini-switch .tabs {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: var(--indigo);
}
.mini-switch .tab {
  padding: 8px 18px;
  border: 0;
  color: var(--on-accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .1em;
}
.mini-switch .tab.active { background: var(--on-accent); color: var(--indigo); }
/* le bandeau des raccourcis glisse juste sous le rappel */
.sticky-nav { transition: top .45s var(--ease); }
body.mini-on .sticky-nav { top: var(--mini-h, 0px); }
.jump-nav a.active { background: var(--on-accent); color: var(--indigo); }

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

/* ---------- Menu ---------- */
.menu { padding: 30px 0 8px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: rise .5s var(--ease) both; }
.menu-card { max-width: 620px; margin: 0 auto; padding: 0 20px; }

.cat-block { margin-bottom: 40px; }

.cat-cover {
  width: 100%;
  height: 160px;
  margin-bottom: 16px;
  border-radius: 999px 999px 18px 18px; /* arche, comme le « m » du logo */
  object-fit: cover;
}

/* titre posé sur un trait, avec un cercle ou une arche du logo (en alternance) */
.cat-title {
  margin: 0 0 6px;
  padding-bottom: 26px;
  background:
    var(--orn-circle) left 26px bottom 0 / 20px 20px no-repeat,
    linear-gradient(var(--indigo), var(--indigo)) left 0 bottom 9.2px / 100% 1.6px no-repeat;
  color: var(--indigo);
  font-family: var(--font);
  font-size: 27px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: .01em;
}
.cat-block:nth-child(even) .cat-title {
  background:
    var(--orn-arch) left 26px bottom 10px / 26px 20px no-repeat,
    linear-gradient(var(--indigo), var(--indigo)) left 0 bottom 9.2px / 100% 1.6px no-repeat;
}
.rtl .cat-title { background-position: right 26px bottom 0, left 0 bottom 9.2px; }
.rtl .cat-block:nth-child(even) .cat-title { background-position: right 26px bottom 10px, left 0 bottom 9.2px; }

.item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item-row { display: flex; align-items: baseline; gap: 12px; }
.item-name { color: var(--ink); font-size: 15.5px; font-weight: 500; line-height: 1.35; }
.item-dots { flex: 1; }
.item-price { flex: none; color: var(--price); font-size: 15px; font-weight: 600; white-space: nowrap; }
.item-desc { margin-top: 4px; color: var(--muted); font-size: 13.5px; font-weight: 300; line-height: 1.55; }
.item-desc p { margin: 0; }
.item-image { display: block; margin-top: 12px; overflow: hidden; border-radius: 16px; }
.item-image img { width: 100%; max-height: 220px; object-fit: cover; }

/* ---------- Pied de page ---------- */
.site-footer {
  margin-top: 30px;
  padding: 40px 24px calc(30px + env(safe-area-inset-bottom));
  background: var(--footer-bg);
  color: var(--footer-ink);
  text-align: center;
}
.footer-logo { width: 150px; margin: 0 auto 26px; filter: brightness(0) invert(1); } /* logo indigo passé en blanc */
.footer-block { margin-bottom: 22px; }
.footer-block h4 { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.footer-text { margin: 0 0 4px; font-size: 14.5px; font-weight: 300; line-height: 1.6; }
.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: 1.6px solid rgba(255, 255, 255, .35);
  border-radius: 18px;
  font-size: 14.5px;
}
.wifi-row { display: flex; align-items: center; gap: 10px; }
.wifi-row svg { flex: none; width: 18px; height: 18px; }
.wifi-copy { margin-inline-start: 6px; padding: 5px 12px; border: 1.6px solid currentColor; border-radius: 999px; background: none; font-size: 12.5px; cursor: pointer; }

.btn-feedback {
  display: table;
  margin: 0 auto 26px;
  padding: 13px 28px;
  border-radius: 999px;
  background: var(--footer-ink);
  color: var(--footer-bg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.footer-copy { margin: 0; font-size: 12px; 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: 44px;
  height: 44px;
  padding: 0;
  border: 1.6px solid var(--on-accent);
  border-radius: 50%;
  background: var(--indigo);
  color: var(--on-accent);
  box-shadow: 0 8px 20px rgba(36, 40, 142, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .3s var(--ease);
  cursor: pointer;
}
.back-to-top svg { width: 18px; height: 18px; }
.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; }
}
