/* ============================================================
   MOBILE REFONTE - moulinpaysage.com
   Carrousel univers (swipe) + recherche 10s + barre sticky + anims
   Active <=700px. Desktop inchange. Charge APRES service-landing.css.
   Ajoute 2026-06-19 (vague B mobile)
   ============================================================ */

/* ---------- RECHERCHE (mobile only) ---------- */
.mob-find { display: none; }

@media (max-width: 700px) {
  .mob-find { display: block; margin: 1.1rem 0 .3rem; text-align: left; }
  .mob-find__bar { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--sl-stone); border-radius: 50px; padding: 0 .5rem 0 .95rem; box-shadow: var(--sl-shadow-sm); }
  .mob-find__bar svg { flex: none; color: var(--sl-sage); }
  .mob-find__input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; min-height: 48px; color: var(--sl-text); }
  .mob-find__clear { border: 0; background: transparent; color: var(--sl-muted); font-size: 1.4rem; line-height: 1; width: 44px; height: 44px; display: none; cursor: pointer; }
  .mob-find__clear.is-on { display: block; }

  .mob-find__chips { display: flex; gap: .5rem; overflow-x: auto; padding: .7rem 0 .25rem; scrollbar-width: none; }
  .mob-find__chips::-webkit-scrollbar { display: none; }
  .mob-chip { flex: none; border: 1px solid var(--sl-stone); background: #fff; border-radius: 50px; padding: .45rem .95rem; font-size: .85rem; color: var(--sl-text); min-height: 40px; cursor: pointer; transition: background .2s var(--sl-ease), color .2s, border-color .2s; }
  .mob-chip[aria-pressed="true"] { background: var(--sl-green); color: #fff; border-color: var(--sl-green); }

  .mob-find__count { font-size: .82rem; color: var(--sl-muted); padding: .35rem .2rem 0; min-height: 1.2em; }

  .mob-results { display: none; list-style: none; margin: .5rem 0 0; padding: 0; }
  .mob-results.is-on { display: block; }
  .mob-results li { margin: 0; border-bottom: 1px solid var(--sl-stone); }
  .mob-results a { display: flex; align-items: center; gap: .6rem; padding: .85rem .25rem; min-height: 48px; color: var(--sl-text); text-decoration: none; }
  .mob-results a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sl-leaf); flex: none; }
  .mob-results__cat { margin-left: auto; font-size: .7rem; color: var(--sl-muted); text-transform: uppercase; letter-spacing: .04em; }

  .mob-noresult { display: none; text-align: center; padding: 1.3rem .5rem; }
  .mob-noresult.is-on { display: block; }
  .mob-noresult p { color: var(--sl-muted); margin: 0 0 .9rem; }
  .mob-noresult__cta { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
  .mob-noresult__cta a { padding: .7rem 1.2rem; border-radius: 50px; font-weight: 700; font-size: .9rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
  .mob-noresult__cta .is-primary { background: var(--sl-gold); color: #1c1c18; }
  .mob-noresult__cta .is-ghost { background: transparent; color: var(--sl-green); border: 1px solid var(--sl-stone); }

  /* quand la recherche est active, on masque carrousel + stats */
  .mob-searching .sl-univers,
  .mob-searching .mob-swipe-hint,
  .mob-searching .mob-dots,
  .mob-searching .sl-services-intro { display: none !important; }
}

/* ---------- CARROUSEL UNIVERS (mobile) ---------- */
@media (max-width: 700px) {
  .sl-univers {
    display: flex; grid-template-columns: none;
    overflow-x: auto; gap: 1rem;
    scroll-snap-type: x mandatory; scroll-padding-left: 16px;
    padding: .4rem 16px 1rem; margin: .3rem -16px 0;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .sl-univers::-webkit-scrollbar { display: none; }
  .sl-univers > .sl-card {
    flex: 0 0 80vw; max-width: 330px;
    scroll-snap-align: start; scroll-snap-stop: always;
  }
  /* sous-listes reduites a 2 colonnes deja gerees ; sur carte swipe on garde 1 col */
  .sl-univers .sl-card__sublist--2col { grid-template-columns: 1fr; }

  /* indice de swipe (montre une fois) */
  .mob-swipe-hint { display: flex; align-items: center; gap: .45rem; justify-content: center; font-size: .82rem; color: var(--sl-muted); padding: .25rem 0 0; opacity: 1; transition: opacity .4s var(--sl-ease); }
  .mob-swipe-hint.is-dismissed { opacity: 0; pointer-events: none; height: 0; padding: 0; }
  .mob-swipe-hint svg { color: var(--sl-gold); }

  /* dots de position + compteur */
  .mob-dots { display: flex; gap: .45rem; justify-content: center; align-items: center; padding: .7rem 0 0; }
  .mob-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--sl-stone); padding: 0; position: relative; cursor: pointer; transition: width .3s var(--sl-ease), background .3s; }
  .mob-dot::after { content: ""; position: absolute; inset: -18px -8px; } /* hit-area ~44px */
  .mob-dot--active { width: 22px; border-radius: 50px; background: var(--sl-gold); }
  .mob-dots__count { font-size: .8rem; color: var(--sl-muted); margin-left: .6rem; }
}

/* desktop : conteneurs mobiles caches */
@media (min-width: 701px) { .mob-swipe-hint, .mob-dots { display: none; } }

/* nudge "tug" montre une fois (translateX, transform only) */
@keyframes mobSwipeNudge { 0% { transform: translateX(0); } 35% { transform: translateX(-20px); } 70% { transform: translateX(5px); } 100% { transform: translateX(0); } }
.sl-univers.mob-nudge { animation: mobSwipeNudge 1.15s var(--sl-ease) 1; }

/* ---------- BARRE STICKY durcie (existe : .mobile-bar) ---------- */
@media (max-width: 700px) {
  .mobile-bar { padding-bottom: env(safe-area-inset-bottom, 0); }
  body.has-mobile-bar { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)); }
}

/* compactage mobile : intro courte + bandeau stats sur 1 ligne -> carrousel plus haut */
@media (max-width: 700px) {
  #services .section-intro { font-size: .92rem; margin-top: .35rem; }
  .sl-services-intro { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 1.3rem; margin: .7rem -16px .2rem; padding: 0 16px; scrollbar-width: none; }
  .sl-services-intro::-webkit-scrollbar { display: none; }
  .sl-services-intro__stat { flex: none; }
  .sl-services-intro__num { font-size: 1.5rem; }
  .sl-services-intro__lbl { font-size: .66rem; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .sl-univers.mob-nudge { animation: none; }
  .sl-univers { scroll-behavior: auto; }
}
