/* ExoMatch v7 — coupe le défilement horizontal de la page sur téléphone.
   Un panneau hors écran pouvait décaler l'ensemble du site vers la gauche.
   Règles indépendantes du positionnement V6 de la barre inférieure. */
@media (max-width: 1180px) {
  html { overflow-x: clip !important; overscroll-behavior-x: none; }
  html body.exo-ui-coherent {
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: clip !important;
  }
  /* Le drawer ne doit pas exister au-delà du bord droit lorsqu'il est fermé. */
  body.exo-ui-coherent:not(.exo-header-menu-open) .exo-site-header #mainNav {
    display: none !important;
    transform: none !important;
  }
  body.exo-ui-coherent.exo-header-menu-open .exo-site-header #mainNav {
    display: flex !important;
    transform: none !important;
  }
}

/* ExoMatch v6 — navigation ancrée au bord du viewport VISIBLE (Chrome Android).
   La barre ne dépend plus du bord inférieur du layout viewport, qui peut être
   sous les contrôles Chrome tant que la barre d'adresse est dépliée. */
.mobile-bottom-nav.exo-tabbar { display: none !important; }
@media (max-width: 1180px) {
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar {
    box-sizing: border-box !important;
    position: fixed !important;
    display: block !important;
    /* 100dvh suit la barre d'adresse; visualViewport affine sur Android. */
    inset: 0 0 auto 0 !important;
    top: max(0px, calc(var(--exo-visible-bottom, 100dvh) - var(--exo-tabbar-height, 69px))) !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 5px max(7px,env(safe-area-inset-right,0px)) calc(5px + env(safe-area-inset-bottom,0px)) max(7px,env(safe-area-inset-left,0px)) !important;
    border: 0 !important;
    border-top: 1px solid #dce6f3 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: 0 -4px 20px rgba(14,45,86,.11) !important;
    color: #263e5e !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    overflow: visible !important;
    transform: none !important;
    scale: 1 !important;
    filter: none !important;
    z-index: 2147483000 !important;
    -webkit-tap-highlight-color: transparent;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__inner {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 580px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link {
    box-sizing: border-box !important;
    display: flex !important;
    flex-flow: column nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 58px !important;
    padding: 4px 1px 3px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #526984 !important;
    font: 750 10px/1.2 Inter,system-ui,-apple-system,'Segoe UI',sans-serif !important;
    text-align: center !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    touch-action: manipulation;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__icon {
    box-sizing: border-box !important;
    display: grid !important;
    flex: 0 0 auto !important;
    place-items: center !important;
    width: 34px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__icon svg {
    display: block !important;
    width: 21px !important;
    height: 21px !important;
    stroke-width: 1.9 !important;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__label {
    box-sizing: border-box !important;
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font: inherit !important;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link[aria-current='page'],
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link--menu.is-active,
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link--menu[aria-expanded='true'] {
    color: #075fcf !important;
    background: #eef5ff !important;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link--session,
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link--session[aria-current='page'] {
    color: #075fcf !important;
    background: transparent !important;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link--session .exo-tabbar__icon {
    width: 39px !important;
    height: 36px !important;
    margin-top: -3px !important;
    background: linear-gradient(145deg,#1388ff,#0660dc) !important;
    color: white !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 9px #146edc36 !important;
  }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link--session[aria-current='page'] { background: #edf5ff !important; }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link:focus-visible {
    outline: 2px solid #126de3 !important;
    outline-offset: -2px !important;
  }
  /* Toujours visible et au-dessus des overlays mobiles, même pendant la séance. */
  body.exo-ui-coherent.exo-workout-active .mobile-bottom-nav.exo-tabbar,
  body.exo-ui-coherent.exo-header-menu-open .mobile-bottom-nav.exo-tabbar,
  body.exo-ui-coherent.exo-calendar-open .mobile-bottom-nav.exo-tabbar {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  /* Réserve toujours l'espace réel occupé par les 5 raccourcis. */
  body.exo-ui-coherent {
    padding-bottom: calc(var(--exo-tabbar-height, 76px) + 8px) !important;
  }
  body.exo-ui-coherent .site-footer { padding-bottom: 12px; }
}
/* Le menu « Plus » reste utilisable pendant une séance guidée :
   le header est normalement masqué, mais le drawer peut s'ouvrir. */
@media (max-width: 1180px) {
  body.exo-ui-coherent.exo-workout-active.exo-header-menu-open .exo-site-header {
    display: block !important;
    position: fixed !important;
    inset: 0 0 auto !important;
    height: 0 !important;
    width: 100% !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
  }
  body.exo-ui-coherent.exo-workout-active.exo-header-menu-open .exo-site-header .nav-wrap {
    display: block !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body.exo-ui-coherent.exo-workout-active.exo-header-menu-open .exo-site-header .nav-wrap > :not(#mainNav) {
    display: none !important;
  }
}
@media (max-width: 345px) {
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__link { font-size: 9px !important; }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__icon { width: 30px !important; }
  body.exo-ui-coherent .mobile-bottom-nav.exo-tabbar .exo-tabbar__icon svg { width: 19px !important; height: 19px !important; }
}
@media (prefers-reduced-motion: reduce) { .mobile-bottom-nav.exo-tabbar * { transition: none !important; } }
