/* ============================================================
   Kabana Pizz — thème pizza lumineux, 3D & motion original
   Scoped sous .motion-site
   ============================================================ */

.motion-site {
  --dough: #fff9f0;
  --dough-2: #fff3dc;
  --sauce: #e83f27;
  --sauce-light: #ff6b4a;
  --cheese: #ffc857;
  --cheese-melt: #ffe08a;
  --basil: #2d9f62;
  --crust: #c47a3a;
  --wood: #a0622e;
  --ink-pizza: #2a1810;
  --muted-pizza: #7a5c48;
  --board: #f5e6c8;
  --perspective: 1100px;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--dough) !important;
  color: var(--ink-pizza);
}

.motion-site h1,
.motion-site h2,
.motion-site h3,
.motion-site .brand,
.motion-site .section-head h2 {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
}

/* ---------- Fond : pâte + sauce en taches ---------- */

.motion-site body::before {
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(232, 63, 39, 0.09) 0%, transparent 22%),
    radial-gradient(circle at 88% 12%, rgba(255, 200, 87, 0.14) 0%, transparent 18%),
    radial-gradient(circle at 70% 75%, rgba(232, 63, 39, 0.06) 0%, transparent 20%),
    linear-gradient(rgba(196, 122, 58, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 122, 58, 0.04) 1px, transparent 1px);
  background-size: auto, auto, auto, 40px 40px, 40px 40px;
  mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
}

.motion-site .bg-glow {
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 200, 87, 0.35), transparent 42%),
    radial-gradient(circle at 80% 20%, rgba(232, 63, 39, 0.12), transparent 38%);
  filter: blur(30px);
  animation: dough-warmth 10s ease-in-out infinite alternate;
}

@keyframes dough-warmth {
  to { opacity: 0.85; transform: scale(1.04); }
}

/* ---------- Ingrédients flottants 3D ---------- */

.motion-site .scene-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  perspective: 800px;
}

.motion-site .float-ingredient {
  position: absolute;
  display: grid;
  place-items: center;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  filter: drop-shadow(0 8px 16px rgba(196, 122, 58, 0.25));
  animation: ingredient-float var(--dur, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
  opacity: 0.75;
}

.motion-site .float-ingredient.ing-pepperoni {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a70, var(--sauce) 55%, #b82a18);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.15);
  font-size: 0;
}

.motion-site .float-ingredient.ing-basil {
  width: 22px;
  height: 22px;
  border-radius: 50% 0 50% 50%;
  background: linear-gradient(135deg, #4ecf82, var(--basil));
  transform: rotate(-25deg);
  font-size: 0;
}

.motion-site .float-ingredient.ing-cheese {
  width: 18px;
  height: 18px;
  border-radius: 40% 60% 50% 40%;
  background: linear-gradient(135deg, var(--cheese-melt), var(--cheese));
  font-size: 0;
}

@keyframes ingredient-float {
  0%, 100% { transform: translateY(0) rotate(0deg) translateZ(0); }
  33% { transform: translateY(-18px) rotate(8deg) translateZ(20px); }
  66% { transform: translateY(-8px) rotate(-6deg) translateZ(10px); }
}

.motion-site #particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.45;
}

/* ---------- Curseur fromage fondu ---------- */

.motion-site .cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 87, 0.35), rgba(232, 63, 39, 0.08) 55%, transparent 70%);
  mix-blend-mode: multiply;
}

/* ---------- Header léger ---------- */

.motion-site .site-header {
  background: rgba(255, 249, 240, 0.88);
  border-bottom-color: rgba(196, 122, 58, 0.18);
  backdrop-filter: blur(20px) saturate(1.3);
}

.motion-site .site-header.is-scrolled {
  background: rgba(255, 249, 240, 0.96);
  box-shadow: 0 10px 30px rgba(196, 122, 58, 0.12);
}

.motion-site .topnav a.active,
.motion-site .topnav a[aria-current="true"] {
  background: rgba(232, 63, 39, 0.12);
  color: var(--sauce);
  box-shadow: none;
}

.motion-site .mobile-nav {
  background: rgba(255, 243, 220, 0.9);
  border-top-color: rgba(196, 122, 58, 0.12);
}

.motion-site .mobile-nav a.active,
.motion-site .mobile-nav a[aria-current="true"] {
  background: linear-gradient(135deg, var(--sauce), var(--sauce-light));
  box-shadow: 0 4px 14px rgba(232, 63, 39, 0.28);
}

/* ---------- Hero split : gauche texte · droite vidéo ---------- */

.motion-site .hero-split {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(0.82rem, 3vw, 2rem) clamp(2rem, 5vw, 3.5rem);
}

.motion-site .hero-split__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.motion-site .hero-split__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.motion-site .hero-split__title {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.motion-site .hero-split__line {
  display: block;
}

.motion-site .hero-split__line:nth-child(1) {
  color: var(--sauce);
}

.motion-site .hero-split__line:nth-child(2) {
  color: var(--ink-pizza);
}

.motion-site .hero-split__line--brand {
  margin-top: 0.35rem;
  font-size: 0.9em;
  font-weight: 700;
  color: var(--muted-pizza);
}

.motion-site .hero-split__line--brand em {
  font-style: normal;
  font-weight: 900;
  color: var(--sauce);
}

.motion-site .hero-split__video {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  border: 3px solid var(--crust);
  background: #1a100c;
  box-shadow:
    0 0 0 4px var(--cheese-melt),
    0 20px 48px rgba(160, 98, 46, 0.2);
}

.motion-site .hero-split__video iframe,
.motion-site .hero-split__video img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  transform: scale(1.06);
  pointer-events: none;
}

.motion-site .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

/* ---------- Boutons sauce & fromage ---------- */

.motion-site .btn-primary {
  background: linear-gradient(135deg, var(--sauce) 0%, var(--sauce-light) 100%);
  box-shadow: 0 10px 28px rgba(232, 63, 39, 0.3);
  border: 2px solid rgba(255, 200, 87, 0.4);
}

.motion-site .btn-outline {
  background: #fff;
  border-color: rgba(196, 122, 58, 0.25);
  color: var(--sauce);
}

/* ---------- Ticker ---------- */

.motion-site .ticker {
  background: linear-gradient(90deg, var(--sauce), #d43520);
  border: none;
}

.motion-site .ticker-track {
  color: rgba(255, 255, 255, 0.85);
}

.motion-site .ticker-track span:nth-child(even) {
  color: var(--cheese-melt);
  text-shadow: none;
}

/* ---------- Sections : carton à pizza ---------- */

.motion-site .menu-section.in-view::before {
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.12), rgba(255, 249, 240, 0.8));
  border: 2px solid rgba(196, 122, 58, 0.15);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(160, 98, 46, 0.08);
}

.motion-site .section-eyebrow {
  color: var(--sauce);
}

.motion-site .section-eyebrow::before {
  content: "● ";
  color: var(--cheese);
}

.motion-site .section-head h2 {
  color: var(--ink-pizza);
  text-shadow: none;
}

.motion-site .section-sub {
  color: var(--muted-pizza);
}

.motion-site .menu-section,
.motion-site .infos-col,
.motion-site .visit-panel {
  opacity: 1;
  transform: translateY(32px);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--section-delay, 0ms);
}

.motion-site .menu-section.section-visible,
.motion-site .infos-col.section-visible,
.motion-site .visit-panel.section-visible {
  transform: translateY(0);
}

.motion-site .menu-section.section-visible .section-head.reveal,
.motion-site .infos-col.section-visible.reveal,
.motion-site .visit-panel.section-visible.reveal {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.motion-site .menu-section.in-view {
  background: transparent;
  box-shadow: none;
}

/* ---------- Cartes = mini pizzas sur planche ---------- */

.motion-site .card,
.motion-site .card-simple {
  background: #fff;
  border: 2px solid rgba(196, 122, 58, 0.14);
  border-radius: 18px;
  box-shadow:
    0 10px 28px rgba(160, 98, 46, 0.1),
    inset 0 -3px 0 var(--cheese-melt);
  transform-style: preserve-3d;
}

.motion-site .card.tilt-ready:hover,
.motion-site .card-simple.tilt-ready:hover {
  border-color: rgba(232, 63, 39, 0.35);
  box-shadow:
    0 20px 44px rgba(160, 98, 46, 0.18),
    0 0 0 3px rgba(255, 200, 87, 0.25),
    inset 0 -3px 0 var(--cheese);
}

.motion-site .card-img-wrap {
  background: radial-gradient(circle, var(--dough-2), #fff);
  border-radius: 14px 0 0 14px;
}

.motion-site .card h3,
.motion-site .card-simple h3 {
  color: var(--ink-pizza);
}

.motion-site .card-ingredients {
  color: var(--muted-pizza);
}

.motion-site .card-simple .price {
  color: var(--sauce);
  font-weight: 900;
}

.motion-site .base-chip {
  background: var(--sauce);
  color: #fff;
}

.motion-site .size-picker {
  background: var(--dough-2);
  border-color: rgba(196, 122, 58, 0.15);
}

.motion-site .size-pill[aria-pressed="true"] {
  background: #fff;
  color: var(--sauce);
  box-shadow: 0 4px 12px rgba(232, 63, 39, 0.15);
}

.motion-site .catalog-filters input,
.motion-site .catalog-filters select {
  background: #fff;
  border-color: rgba(196, 122, 58, 0.2);
  color: var(--ink-pizza);
}

/* ---------- Infos ---------- */

.motion-site .infos.in-view {
  background: transparent;
  box-shadow: none;
}

.motion-site .infos-col {
  background: #fff;
  border: 2px solid rgba(196, 122, 58, 0.12);
  box-shadow: 0 12px 32px rgba(160, 98, 46, 0.08);
}

.motion-site .infos h2 {
  color: var(--ink-pizza);
}

.motion-site .infos p {
  color: var(--muted-pizza);
}

.motion-site .hours tr.today td {
  color: var(--sauce);
}

.motion-site .visit-panel {
  background:
    radial-gradient(circle at 5% 5%, rgba(255, 200, 87, 0.2), transparent 16rem),
    #fff;
  border: 2px solid rgba(196, 122, 58, 0.15);
  box-shadow: 0 20px 50px rgba(160, 98, 46, 0.1);
}

.motion-site .visit-panel.in-view {
  border-color: rgba(232, 63, 39, 0.25);
  box-shadow: 0 20px 50px rgba(232, 63, 39, 0.08);
}

.motion-site .address-line {
  color: var(--ink-pizza) !important;
}

.motion-site .google-review {
  background: var(--dough-2);
  border-color: rgba(255, 200, 87, 0.5);
}

.motion-site .footer {
  color: var(--muted-pizza);
  border-color: rgba(196, 122, 58, 0.12);
  background: var(--dough-2);
}

/* Drawer reste lisible */
.motion-site .drawer {
  background: var(--dough);
  color: var(--ink-pizza);
}

.motion-site .drawer-head,
.motion-site .drawer-foot {
  background: var(--dough-2);
}

.motion-site .checkout-form input,
.motion-site .checkout-form select,
.motion-site .checkout-form textarea {
  background: #fff;
  color: var(--ink-pizza);
}

.motion-site .mini-cart {
  background: var(--ink-pizza);
  border-color: var(--cheese);
}

/* ---------- Responsive ---------- */

@media (max-width: 799px) {
  .motion-site .hero-split__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .motion-site .hero-split__text { align-items: center; text-align: center; }

  /* hero compact : la carte arrive plus vite à l'écran */
  .motion-site .hero-split__video {
    max-width: 100%;
    aspect-ratio: 16 / 10;
    margin-inline: auto;
  }

  .motion-site .hero-split__grid {
    gap: 1.1rem;
  }

  .motion-site .hero-cta {
    justify-content: center;
    width: 100%;
  }

  .motion-site .hero-cta .btn {
    flex: 1 1 45%;
  }

  .motion-site .hero-split__line.anim,
  .motion-site .hero-split__video.anim {
    animation-duration: 0.7s;
  }

  .motion-site .menu-section,
  .motion-site .infos-col,
  .motion-site .visit-panel {
    transform: translateY(20px);
  }

  .motion-site .card.reveal,
  .motion-site .card-simple.reveal {
    transform: translateY(16px);
  }

  .motion-site .cursor-glow { display: none; }
  .motion-site .float-ingredient { opacity: 0.55; }

  /* mobile : moitié moins d'éléments animés en continu (batterie, fluidité) */
  .motion-site .scene-layer .float-ingredient:nth-of-type(n + 5) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-site .float-ingredient,
  .motion-site .bg-glow,
  .motion-site .menu-section,
  .motion-site .infos-col,
  .motion-site .visit-panel {
    opacity: 1;
    transform: none;
  }
}