/* Navigation mobile fixe (includes/mobile-nav.php) — smartphone et tablette (jusqu'à 1119 px, seuil du menu « burger » du site public).
   Isolée : tous les sélecteurs sont préfixés .bp-mnav / .bp-msheet / .bp-account-quick ; sur ordinateur rien n'est affiché ni modifié.
   Jetons Bus Pro (clair/sombre automatiques), Poppins hérité, zones de sécurité des téléphones (safe-area-inset-bottom), cibles tactiles >= 44 px,
   état actif signalé par un trait, une pastille, le gras et aria-current (jamais par la couleur seule). */
.bp-mnav, .bp-msheet, .bp-account-quick { display: none; }

@media (max-width: 1119.98px) {
  .bp-mnav {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: var(--bp-surface, #fff);
    border-top: 1px solid var(--bp-border, #dee2e6);
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    font-family: 'Poppins', sans-serif;
  }
  .bp-mnav-list { display: flex; margin: 0; padding: 0; list-style: none; max-width: 640px; margin-inline: auto; }
  .bp-mnav-list > li { flex: 1 1 0; min-width: 0; }
  .bp-mnav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    min-height: 62px;
    padding: .45rem .2rem .4rem;
    color: var(--bp-text-muted, #503744);
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .bp-mnav-ico {
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 1.7rem;
    border-radius: 999px;
    font-size: 1.1rem;
    transition: background-color .2s ease;
  }
  .bp-mnav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bp-mnav-item:hover { color: var(--bp-accent-text, #8E2157); text-decoration: none; }
  .bp-mnav-item:active .bp-mnav-ico { background: var(--bp-accent-soft, #f8e9f1); }
  .bp-mnav-item:focus-visible { outline: 3px solid var(--bp-focus, #1a73e8); outline-offset: -3px; border-radius: 10px; }
  .bp-mnav-item.is-active { color: var(--bp-accent-text, #8E2157); font-weight: 700; }
  .bp-mnav-item.is-active .bp-mnav-ico { background: var(--bp-accent-soft, #f8e9f1); }
  .bp-mnav-item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24%;
    right: 24%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--bp-brand, #8E2157);
  }

  /* Le contenu ne passe jamais sous la barre : espace réservé en bas de page (zone de sécurité comprise). */
  body:has(.bp-mnav) { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  html.bp-msheet-lock, html.bp-msheet-lock body { overflow: hidden; }

  /* Menu « Plus » : feuille depuis le bas (téléphone) / carte centrée (tablette). */
  .bp-msheet { position: fixed; inset: 0; z-index: 1100; font-family: 'Poppins', sans-serif; }
  .bp-msheet.is-open, .bp-msheet:target { display: block; }
  .bp-msheet-backdrop { position: absolute; inset: 0; background: rgba(8, 4, 8, .5); }
  .bp-msheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 700px);
    margin-inline: auto;
    background: var(--bp-surface, #fff);
    color: var(--bp-text, #0b0f18);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bp-msheet-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem .5rem; }
  .bp-msheet-head h2 { margin: 0; font-size: 1.1rem; font-weight: 700; }
  .bp-msheet-close {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
    font-size: 1.1rem;
  }
  .bp-msheet-close:hover { background: var(--bp-accent-soft, #f8e9f1); }
  .bp-msheet-close:focus-visible, .bp-msheet-sec a:focus-visible, .bp-msheet-lang button:focus-visible, .bp-msheet-theme:focus-visible { outline: 3px solid var(--bp-focus, #1a73e8); outline-offset: 2px; }
  .bp-msheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 1.1rem 1.1rem; }
  .bp-msheet-sec { padding: .4rem 0 .6rem; border-top: 1px solid var(--bp-border, #dee2e6); }
  .bp-msheet-sec:first-child { border-top: 0; }
  .bp-msheet-sec h3 { margin: .35rem 0 .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bp-text-muted, #503744); }
  .bp-msheet-sec ul { margin: 0; padding: 0; list-style: none; }
  .bp-msheet-sec ul a {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-height: 48px;
    padding: .3rem .4rem;
    border-radius: 10px;
    color: inherit;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
  }
  .bp-msheet-sec ul a i { flex: 0 0 1.4rem; text-align: center; color: var(--bp-accent-text, #8E2157); font-size: 1rem; }
  .bp-msheet-sec ul a:hover { background: var(--bp-accent-soft, #f8e9f1); }
  .bp-msheet-lang { display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: .2rem .4rem; }
  .bp-msheet-lang > i { flex: 0 0 1.4rem; text-align: center; color: var(--bp-accent-text, #8E2157); }
  .bp-msheet-lang form { margin: 0; }
  .bp-msheet-lang button {
    min-height: 40px;
    padding: .3rem .9rem;
    border: 1px solid var(--bp-border, #dee2e6);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
  }
  .bp-msheet-lang button.is-on { background: var(--bp-brand, #8E2157); border-color: var(--bp-brand, #8E2157); color: #fff; font-weight: 600; }
  .bp-msheet .bp-msheet-theme {
    display: flex;
    align-items: center;
    gap: .85rem;
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: .3rem .4rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .95rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
  }
  .bp-msheet .bp-msheet-theme i { flex: 0 0 1.4rem; text-align: center; color: var(--bp-accent-text, #8E2157); }
  .bp-msheet .bp-msheet-theme:hover { background: var(--bp-accent-soft, #f8e9f1); }

  @media (min-width: 768px) {
    .bp-msheet-panel { width: min(520px, 100%); bottom: 84px; border-radius: 20px; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .bp-msheet.is-open .bp-msheet-panel, .bp-msheet:target .bp-msheet-panel { animation: bp-msheet-up .24s ease-out; }
    .bp-msheet.is-open .bp-msheet-backdrop, .bp-msheet:target .bp-msheet-backdrop { animation: bp-msheet-fade .24s ease-out; }
  }

  /* « Mon compte » en haut à droite (site public) : le burger est remplacé par la barre du bas (le panneau complet n'est plus nécessaire). */
  body:has(.bp-mnav) .bp-nav-toggle, body:has(.bp-mnav) .bp-nav-panel { display: none !important; }
  body:has(.bp-mnav) .bp-account-quick {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
    min-height: 44px;
    padding: .4rem .95rem;
    border: 1px solid var(--bpv-border, var(--bp-border, #dee2e6));
    border-radius: 999px;
    color: var(--bpv-text, var(--bp-text, #0b0f18));
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }
  body:has(.bp-mnav) .bp-account-quick:hover { background: var(--bp-accent-soft, #f8e9f1); color: var(--bp-accent-text, #8E2157); text-decoration: none; }
  body:has(.bp-mnav) .bp-account-quick:focus-visible { outline: 3px solid var(--bp-focus, #1a73e8); outline-offset: 2px; }
  body:has(.bp-mnav) .bp-account-quick i { color: var(--bp-accent-text, #8E2157); }
}

@media (max-width: 359.98px) {
  .bp-mnav-item { font-size: .66rem; }
  .bp-mnav-ico { width: 2.3rem; }
}

@keyframes bp-msheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bp-msheet-fade { from { opacity: 0; } to { opacity: 1; } }

@media print { .bp-mnav, .bp-msheet, .bp-account-quick { display: none !important; } body:has(.bp-mnav) { padding-bottom: 0 !important; } }
