/* Pulsar Media — correctifs mobile layout/overflow (v2.4, 2026-09-18)
   Chargé par toutes les pages EN + FR. Ne cible que des classes pm-* ajoutées au
   markup, et uniquement sous 1080px : le rendu desktop est inchangé. */

/* Zone tactile portée à 44px minimum (lang switch, burger, liens CTA soulignés),
   sans modifier le rendu : la zone cliquable est étendue par un pseudo-élément. */
@media (max-width: 1020px) {
  .pm-tap { position: relative; }
  .pm-tap::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
}

/* Partners — grilles 2 colonnes (hero, en-têtes de section) empilées sur tablette/mobile. */
@media (max-width: 1080px) {
  .pm-stack { grid-template-columns: 1fr !important; }
  .pm-stack > * { min-width: 0; }
}

/* Contact — les colonnes de .grid2 ne doivent pas s'élargir au contenu. */
@media (max-width: 1080px) {
  .grid2 > * { min-width: 0; }
}

@media (max-width: 760px) {
  /* Home — COSMOS « 01 Scan / 02 Cluster / 03 Time » : numéro + titre sur une ligne,
     description en pleine largeur dessous (au lieu de 112px + 180px fixes qui
     poussaient le texte hors de l'écran). */
  .pm-steps { flex-wrap: wrap !important; align-items: center !important; gap: 12px 18px !important; padding: 28px 0 !important; }
  .pm-steps > .pm-steps-num { width: auto !important; }
  .pm-steps > .pm-steps-title { width: auto !important; flex: 1 1 auto !important; }
  .pm-steps > .pm-steps-text { flex: 1 1 100% !important; min-width: 0; }

  /* Partners — cartes « Single brief / Local execution / One report » en une colonne. */
  .pm-cards { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* Contact — longues adresses (LinkedIn, e-mail) autorisées à passer à la ligne. */
  .pm-break { max-width: 100%; overflow-wrap: anywhere; }
}

/* ---------------------------------------------------------------------------
   Navigation mobile (panneau construit par assets/mobile-nav.js)
   --------------------------------------------------------------------------- */
.pm-mnav { display: none; }

@media (max-width: 1020px) {
  html.pm-mnav-lock, html.pm-mnav-lock body { overflow: hidden; }

  .pm-mnav {
    display: flex; flex-direction: column; gap: 12px;
    position: fixed; inset: 0; z-index: 70;
    padding: 0 clamp(24px,4vw,56px) calc(32px + env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain;
    font-family: "Lexend Deca", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
    background: radial-gradient(120% 80% at 20% 100%, rgba(56,182,171,.18) 0%, rgba(56,182,171,.05) 45%, rgba(18,16,29,0) 75%), #12101d;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .22s ease-out, transform .22s ease-out, visibility 0s linear .22s;
  }
  .pm-mnav.pm-mnav-open { opacity: 1; visibility: visible; transform: none; transition: opacity .22s ease-out, transform .22s ease-out, visibility 0s; }

  /* Barre du haut calquée sur le header (logo 36px, padding 18px) */
  .pm-mnav-bar {
    position: sticky; top: 0; z-index: 1; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    margin: 0 calc(-1 * clamp(24px,4vw,56px)); padding: 18px clamp(24px,4vw,56px);
    background: #12101d; border-bottom: 1px solid rgba(56,182,171,.14);
  }
  .pm-mnav-logo { display: flex; align-items: center; }
  .pm-mnav-logo img { height: 36px !important; width: auto !important; display: block; }
  .pm-mnav-close {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 34px; padding: 0; background: transparent; cursor: pointer;
    border: 1px solid rgba(56,182,171,.4); border-radius: 0;
  }
  .pm-mnav-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
  .pm-mnav-close span { position: absolute; left: 50%; top: 50%; width: 16px; height: 1px; margin-left: -8px; background: #38b6ab; transform: rotate(45deg); }
  .pm-mnav-close span + span { transform: rotate(-45deg); }
  .pm-mnav-close:focus-visible { outline: 1px solid #38b6ab; outline-offset: 3px; }

  .pm-mnav-links { display: flex; flex-direction: column; flex: 1 0 auto; }
  .pm-mnav-link {
    display: flex; align-items: center; gap: 18px; min-height: 60px; padding: 14px 0;
    border-bottom: 1px solid rgba(56,182,171,.14);
    color: rgba(244,245,247,.72); font-size: 1.375rem; font-weight: 300; letter-spacing: -.01em;
    transition: color .2s ease-out;
  }
  .pm-mnav-link:hover, .pm-mnav-link:focus-visible { color: #fff; }
  .pm-mnav-num { flex: 0 0 auto; width: 24px; font-size: .6875rem; letter-spacing: .2em; color: #38b6ab; }
  .pm-mnav-label { flex: 1 1 auto; min-width: 0; }
  .pm-mnav-arrow { flex: 0 0 auto; font-size: 1rem; color: rgba(56,182,171,.7); }
  .pm-mnav-current { color: #fff; }
  .pm-mnav-current .pm-mnav-label { padding-bottom: 3px; border-bottom: 1px solid #38b6ab; flex: 0 1 auto; margin-right: auto; }

  .pm-mnav-foot { flex: 0 0 auto; padding-top: 28px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
  .pm-mnav-cta {
    display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 14px 28px;
    background: #38b6ab; color: #08131a; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
    transition: background .2s ease-out;
  }
  .pm-mnav-cta:hover, .pm-mnav-cta:focus-visible { background: #5fd0c6; color: #08131a; }
  .pm-mnav-lang { display: flex; align-items: center; gap: 4px; font-size: 11px; letter-spacing: .16em; }
  .pm-mnav-lang > * { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 2px; }
  .pm-mnav-lang-on { color: #08131a; background: #38b6ab; min-height: 28px !important; min-width: 36px !important; }
  .pm-mnav-lang a { color: rgba(244,245,247,.6); }
  .pm-mnav-lang a:hover, .pm-mnav-lang a:focus-visible { color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-mnav, .pm-mnav.pm-mnav-open { transition: none !important; }
}
