/* ============================================================
   SOCLE MOBILE ProtorMundi - mobile-base-pm.css
   Configuration minimale commune a TOUTES les pages du site
   (reference : index.html mobile).
   Contenu : bandeau haut fixe (logo/Contact/burger) + trait
   rouge ombre, barre d'appel basse, back-to-top, correctif
   window.scrollTo, masquage du menu horizontal.
   Prerequis : menu-pm.css + menu-pm.min.js + pm-topbar dans
   le header + callbar + bouton back-to-top dans la page.
   Mobile uniquement (max-width: 768px) - zero impact desktop.
   ============================================================ */

#callbar-mobile { display: none; }

@media (max-width: 768px) {

  /* Espace reserve pour le bandeau haut fixe + la barre d'appel basse */
  body { padding-top: 64px !important; padding-bottom: 64px !important; }

  /* Anti scroll horizontal SANS casser window.scrollTo / scrollY */
  html, body { overflow-x: clip !important; }

  /* Bandeau haut FIXE : la page glisse dessous.
     Trait rouge 0.5px + ombre portee sous la ligne inferieure */
  .pm-topbar {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    transform: none !important;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 0.5px solid #B90E22;
    box-shadow: 0 5px 12px rgba(0,0,0,0.45);
  }

  /* Menu horizontal desktop masque : le drawer pm prend le relais */
  #main .nav { display: none !important; }

  /* Barre d'appel rouge fixe en bas */
  #callbar-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 980;
    min-height: 56px;
    padding: 6px 12px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: #B90E22;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  }
  #callbar-mobile svg { flex-shrink: 0; }

  /* Composant back-to-top pm : remonte au-dessus de la barre d'appel */
  .back-to-top { bottom: 74px !important; }
}
