/* SignalNids Rando — recentrage de l'accueil mobile uniquement.
   Ne modifie pas les autres pages, les cartes Leaflet ni GPS Live.
   Ajoute après les feuilles de style existantes. */
@media screen and (max-width:767px) {
  body.sn-home {
    --snr-home-gutter:14px;
  }
  /* Une seule convention de conteneur sur l'accueil : largeur de l'écran
     et gouttière intérieure identique des deux côtés. */
  body.sn-home .site-shell > main,
  body.sn-home .site-shell > main > :is(section,div) {
    box-sizing:border-box;
    min-width:0;
    max-width:100%;
  }
  body.sn-home .site-shell > main > section.wrap,
  body.sn-home .site-shell > main > div.wrap,
  body.sn-home .site-shell .sn-info-strip > .wrap,
  body.sn-home .site-shell .sn-photo-section > .wrap,
  body.sn-home .site-shell .sn-hero > .wrap {
    box-sizing:border-box;
    width:100%!important;
    max-width:100%!important;
    margin-inline:auto!important;
    padding-inline:var(--snr-home-gutter)!important;
  }
  /* Les grilles ne peuvent plus imposer une colonne plus large que l'écran. */
  body.sn-home .site-shell :is(
    .sn-hero-inner,.sn-hero-content,.sn-info-strip-inner,
    .snr310-community-home,.snr310-home-intro,.snr310-home-topics,
    .sn-dashboard-section,.sn-home-grid,.sn-featured-section,
    .sn-featured-grid,.sn-photo-section-inner,.sn-visual-showcase,
    .sn-photo-copy,.sn-regions-section,.sn-region-grid,
    .sn183-popular,.sn183-popular-grid,.sn183-reviews,
    .sn183-review-grid,.sn183-benefits,.sn183-install,
    .sn183-faq-grid,.sn-safety-feature,.sn-safety-copy
  ) {
    box-sizing:border-box;
    min-width:0;
    max-width:100%;
  }
  body.sn-home .site-shell :is(
    .sn-home-grid,.sn-photo-section-inner,.snr310-community-home,
    .sn183-install,.sn183-faq-grid
  ) {
    grid-template-columns:minmax(0,1fr)!important;
  }
  body.sn-home .site-shell :is(
    .sn-home-grid,.sn-photo-section-inner,.snr310-community-home,
    .sn-featured-grid,.sn-region-grid,.sn183-popular-grid,
    .sn183-benefits,.sn183-review-grid,.sn-mini-gallery
  ) > * {
    box-sizing:border-box;
    min-width:0;
    max-width:100%;
  }
  /* Origine du décalage : marges négatives des sliders historiques V1.8.4,
     ajoutées avant le mode mobile bord à bord. Les sliders gardent le swipe. */
  body.sn-home .site-shell .sn184-scroll {
    box-sizing:border-box!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    scroll-padding-left:0!important;
    scroll-padding-right:0!important;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  body.sn-home .site-shell .sn184-scroll::-webkit-scrollbar {display:none;}
  body.sn-home .site-shell .sn184-scroll > * {
    box-sizing:border-box;
    min-width:0;
    margin-left:0;
    margin-right:0;
    scroll-snap-align:start;
  }
  /* Une carte, un panneau, une photo : aucune marge latérale cachée. */
  body.sn-home .site-shell :is(
    .sn-home-grid > .sn-panel,.snr310-home-intro,.snr310-home-topics,
    .sn-visual-block,.sn-visual-block-main,.sn-mini-card,
    .sn183-empty,.sn-empty-feature,.snr310-home-topic
  ) {
    box-sizing:border-box;
    max-width:100%;
  }
  body.sn-home .site-shell :is(
    .sn-section-title,.snr310-home-topics-head,.sn-photo-actions,
    .sn-hero-buttons,.sn-feature-list,.sn-home-badges
  ) {
    box-sizing:border-box;
    max-width:100%;
    min-width:0;
  }
  body.sn-home .site-shell :is(
    .sn-section-title h2,.sn-section-title p,.sn-photo-copy h2,
    .snr310-home-intro h2,.snr310-home-topic strong
  ) {
    max-width:100%;
    overflow-wrap:anywhere;
  }
  /* La carte Leaflet conserve sa propre gestion de déplacement/zoom. */
  body.sn-home .site-shell .sn-home-map {width:100%;max-width:100%;min-width:0;}
}
@media screen and (max-width:359px) {
  body.sn-home { --snr-home-gutter:12px; }
}
