/* =========================================================
   Nizar Chtioui — App-like mobile layer (<= 768px)
   Loaded only on small screens. Desktop untouched.
   ========================================================= */
@media (max-width: 768px) {

  :root { --tabbar-h: 68px; }

  html, body { overflow-x: hidden; max-width: 100%; }
  body { -webkit-tap-highlight-color: transparent; }
  body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px); }
  .container { overflow-x: clip; }

  /* ---------- compact top bar ---------- */
  .nav { padding: 14px 0; }
  .nav.scrolled { padding: 10px 0; }
  .nav .container { padding: 0 18px; }
  .nav-toggle { display: none !important; }
  .nav-links { display: none !important; }
  .brand { font-size: 16px; gap: 9px; }
  .brand .mark svg { width: 30px; height: 30px; }

  /* ---------- bottom tab bar (app nav) ---------- */
  .tabbar {
    position: fixed; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 300; height: var(--tabbar-h);
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    background: rgba(14, 10, 32, .82); backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--line2); border-radius: 22px;
    box-shadow: 0 14px 40px -10px rgba(0,0,0,.7);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    color: var(--faint); font-family: var(--fh); font-size: 10.5px; font-weight: 600;
    letter-spacing: .02em; padding: 8px 2px; transition: color .2s, transform .15s; position: relative;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.active svg { color: var(--c); filter: drop-shadow(0 0 7px rgba(34,211,238,.6)); }
  .tabbar a:active { transform: scale(.9); }
  .tabbar a.tab-book {
    color: #06010f;
  }
  .tabbar a.tab-book .tb-ico {
    width: 46px; height: 46px; margin-top: -22px; border-radius: 16px;
    background: var(--grad); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(124,92,255,.5);
    border: 3px solid #0a0820;
  }
  .tabbar a.tab-book .tb-ico svg { color: #06010f; width: 24px; height: 24px; }
  .tabbar a.tab-book span { color: var(--v2); }

  /* ---------- sections / spacing ---------- */
  section { padding: 54px 0; }
  .container { padding: 0 18px; }
  h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .lead { font-size: 1.05rem; }
  .section-head { margin-bottom: 34px; }

  /* ---------- hero (app feel) ---------- */
  .hero { padding-top: 96px; padding-bottom: 40px; text-align: center; }
  .hero-split { gap: 28px; }
  .hero-split > div:first-child { order: 2; }   /* text under photo */
  .hero-orbit { order: 1; max-width: 300px; }
  .hero .hero-badge { margin-inline: auto; }
  .hero .aud-row { justify-content: center; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-photo { max-width: 320px; margin: 0 auto; }

  /* about/contact/consultation centered heroes too */
  .hero-split > div { text-align: center; }
  .aud-row { justify-content: center; }

  /* ---------- cards / grids ---------- */
  .grid-2, .grid-3, .grid-4, .price-grid, .video-grid, .ig-grid, .split, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 22px; }
  .card:active { transform: scale(.985); }
  .split { gap: 28px; }
  .footer-grid { gap: 28px; text-align: left; }

  /* buttons: big, app-like */
  .btn { padding: 15px 24px; font-size: 16px; }
  .btn:active { transform: scale(.97); }

  /* ---------- booking: app-style ---------- */
  /* cap the grid column to the container — flex-wrap children would otherwise
     blow the column out to their single-line max-content width */
  .booking { gap: 22px; grid-template-columns: minmax(0, 1fr); }
  .booking-form-area, .bk-step { min-width: 0; }
  .bk-step h3 { font-size: 1rem; }
  /* swipeable day row */
  .bk-days {
    display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .bk-days::-webkit-scrollbar { display: none; }
  .bk-day { min-width: 78px; flex: 0 0 auto; scroll-snap-align: start; padding: 12px 10px; }
  .bk-day:active { transform: scale(.94); }
  /* time chips: flex-wrap can't overflow sideways like a grid can */
  .bk-times { display: flex !important; flex-wrap: wrap; gap: 9px; }
  .bk-time { flex: 1 1 calc(33.333% - 6px); min-width: 0; padding: 15px 6px; text-align: center; }
  .bk-time:active { transform: scale(.94); }
  /* iOS: 16px inputs prevent auto-zoom */
  .field input, .field textarea, .field select { font-size: 16px; padding: 15px 16px; }
  .bk-form-fields .grid-2 { grid-template-columns: 1fr; }

  /* ask-ai / cta padding */
  .ask-ai, .cta-band { padding: 28px 20px; border-radius: 22px; }
  .ask-ai h2 { font-size: 1.5rem; }
  .ask-ai .prompt { font-size: 1rem; padding: 14px 16px; }

  /* footer socials centered-left ok */
  .footer { padding-bottom: 30px; }

  /* dashboard-ish tables already separate */

  /* page reveal: a touch snappier */
  .reveal { transform: translateY(22px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
}

/* very small phones */
@media (max-width: 360px) {
  .tabbar a span { font-size: 9.5px; }
  .bk-time { flex-basis: calc(50% - 5px); }
}
