/* ============================================================
   FORMAT APP 9:16 (façon TikTok) — cadre unique, sans scroll de page
   ============================================================ */
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  overflow-x: hidden;
  background: #0b0b0c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

/* Cadre principal — ratio 9:16 garanti, plafonné à la hauteur de l'écran */
.app-frame {
  position: relative;
  width: min(100vw - 24px, calc((100vh - 24px) * 9 / 16), 480px);
  aspect-ratio: 9 / 16;
  background: #F8F9FB;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, .55),
    0 0 0 8px #111114,
    0 0 0 10px #2c2c30;
}

/* Barre du haut, persistante */
.app-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  background: #ffffff;
  border-bottom: 1px solid #eef0f3;
  z-index: 20;
}

/* Zone de contenu : un seul panneau visible à la fois, scroll interne seulement si nécessaire */
.app-content {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
  background: #F8F9FB;
}

.app-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 20px;
  box-sizing: border-box;
}

.app-panel.active {
  display: block;
}

#tab-menu3d.app-panel.active {
  display: flex;
  flex-direction: column;
  padding: 12px 10px 14px;
}

/* Navigation basse — 4 fonctionnalités */
.app-bottomnav {
  flex: 0 0 auto;
  display: flex;
  background: #ffffff;
  border-top: 1px solid #eef0f3;
  z-index: 20;
}

.app-navbtn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 4px 11px;
  background: none;
  border: none;
  cursor: pointer;
  color: #5A5A72;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: color .15s ease;
}

.app-navbtn .app-navicon {
  font-size: 18px;
  line-height: 1;
}

.app-navbtn.is-active {
  color: #3B5BDB;
}

.app-navbtn:active {
  transform: scale(0.94);
}

/* Petites cartes menu compactes pour le format vertical */
.mini-category-pill {
  scroll-margin-top: 8px;
}

/* ---- Carte Google Maps fictive ---- */
.fake-map {
  background:
    /* Grille de rues simulée en CSS */
    repeating-linear-gradient(0deg,
      transparent,
      transparent 39px,
      #d1d5db 39px,
      #d1d5db 40px),
    repeating-linear-gradient(90deg,
      transparent,
      transparent 59px,
      #d1d5db 59px,
      #d1d5db 60px),
    /* Fond carte couleur pastel */
    linear-gradient(135deg, #e8f4f0 0%, #dde8f0 100%);
  position: relative;
}

/* Marqueur de position sur la carte fictive */
.map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -110%);
  width: 36px;
  height: 36px;
  background: #3B5BDB;
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  box-shadow: 0 4px 20px rgba(59, 91, 219, .4);
}

.map-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
}

/* Reflet doux sur les cartes menu */
.menu-card:hover {
  box-shadow: 0 8px 32px rgba(59, 91, 219, .10);
  transform: translateY(-2px);
}

.menu-card {
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Indicateur "Ouvert/Fermé" clignotant */
@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

.dot-open {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Hero background gradient */
.hero-bg {
  background: linear-gradient(135deg,
      #0f1923 0%,
      #1a1a2e 40%,
      #2a1f3d 70%,
      #1e2a4a 100%);
}

/* Decorative glowing elements */
.hero-bg::before {
  content: '';
  position: absolute;
  top: 1/4;
  right: 1/4;
  width: 96px;
  height: 96px;
  background: #3B5BDB;
  opacity: 0.1;
  border-radius: 50%;
  filter: blur(32px);
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 1/4;
  left: 1/4;
  width: 80px;
  height: 80px;
  background: #fbbf24;
  opacity: 0.08;
  border-radius: 50%;
  filter: blur(32px);
}
/* ============================================================
   CARTE MENU IMMERSIVE — styles à ajouter dans style.css
   ============================================================ */

/* ── Le livre : une page à la fois, vrai tourné 3D sur la tranche gauche ── */
#menuBook {
    width: 10000%;
    height: 80%;
    position: relative;
    perspective: 1600px;
}

.menu-page {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 3px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-origin: left center;
    transform: rotateY(0deg);
    transition: transform 0.68s cubic-bezier(0.45, 0, 0.2, 1), box-shadow 0.68s ease;
    /* Ombre de reliure douce côté gauche, pour donner du volume */
    box-shadow: inset 16px 0 26px -22px rgba(0, 0, 0, .4), 3px 0 10px rgba(0, 0, 0, .25);
}

/* Page déjà tournée : rabattue derrière, invisible (pas de contenu au dos) */
.menu-page--flipped {
    transform: rotateY(-178deg);
    box-shadow: none;
    pointer-events: none;
}

/* Légère ombre portée par la page en cours de rotation sur celle du dessous */
.menu-page--turning {
    box-shadow: inset 16px 0 26px -22px rgba(0, 0, 0, .4), 12px 0 24px rgba(0, 0, 0, .35);
}

/* ── Page crème (pages intérieures) ── */
.menu-page-cream {
    width: 100%;
    height: 100%;
    background: #fdfbf7;
    padding: 1.4rem 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: hidden;
}

/* ── Titre de catégorie ── */
.menu-category-title {
    font-family: sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-align: center;
    color: #7c4e1a;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(180, 130, 50, 0.18);
    padding-bottom: 8px;
    margin-bottom: 14px;
}

/* ── Liste de plats ── */
.menu-items-list {
    flex: 1;
    overflow: hidden;
}

.menu-item {
    margin-bottom: 12px;
}

.menu-item-row {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    color: #2c2621;
}

.menu-dots {
    flex: 1;
    border-bottom: 1px dotted rgba(120, 80, 30, 0.28);
    margin: 0 3px;
    position: relative;
    top: -2px;
}

.menu-desc {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 9px;
    font-style: italic;
    color: rgba(44, 38, 33, 0.62);
    margin-top: 2px;
    line-height: 1.45;
}

/* ── Numéro de page ── */
.menu-page-num {
    text-align: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 9px;
    font-style: italic;
    color: rgba(120, 80, 30, 0.42);
    margin-top: 8px;
    flex-shrink: 0;
}