/* MARCHES & COMMERCES CI — V24.20.802
   Correctif transversal iPhone/iPad (Safari + Chrome iOS).
   Présentation uniquement : aucune règle métier, Supabase ou R2 modifiée. */

html{width:100%;min-height:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{width:100%;min-height:100%;overflow-x:hidden}

/* WebKit iOS : 100vh peut représenter le layout viewport et créer une grande
   zone vide. Les unités dynamiques suivent réellement la fenêtre visible. */
@supports (-webkit-touch-callout:none){
  html{height:-webkit-fill-available!important;min-height:-webkit-fill-available!important}
  body{height:auto!important;min-height:100svh!important;min-height:100dvh!important}

  @media (max-width:900px){
    .layout,.appShell,.enterprise{
      height:auto!important;
      min-height:100svh!important;
      min-height:100dvh!important;
    }
    main,.main,.mainArea,#content,.content{
      height:auto!important;
      min-height:0!important;
    }
    aside,.sidebar{
      height:auto!important;
      min-height:0!important;
    }

    /* Navigation basse : ancrage explicite au viewport iOS et safe-area. */
    .mcciV732BottomNav{
      position:fixed!important;
      left:0!important;right:0!important;top:auto!important;bottom:0!important;
      width:100%!important;
      min-height:66px!important;
      height:calc(66px + env(safe-area-inset-bottom,0px))!important;
      padding:5px 7px calc(5px + env(safe-area-inset-bottom,0px))!important;
      box-sizing:border-box!important;
      transform:none!important;
      -webkit-transform:none!important;
      -webkit-backdrop-filter:none!important;
      backdrop-filter:none!important;
      contain:layout paint!important;
    }
    main,.main,.mainArea{
      padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important;
    }
  }

  /* Fenêtres internes : ne jamais utiliser l'ancien vh sur iOS. */
  [class*="Modal"],[class*="modal"],[class*="Dialog"],[class*="dialog"]{
    max-height:94svh;
    max-height:94dvh;
  }
}
