/* ============================================================
   FulgurZone — Global Mobile Navigation
   Barre fixe globale + bottom sheet hamburger
   Uniquement mobile (max-width: 768px)
   ============================================================ */

.fz-global-nav,
.fz-sheet-overlay,
.fz-sheet {
  display: none;
}

@media (max-width: 768px) {

  :root {
    --fz-global-nav-h: 64px;
  }

  /* ── Barre principale ── */
  .fz-global-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--fz-global-nav-h);
    z-index: 3000;
    display: flex;
    align-items: center;
    padding: 0 4px;
    background: rgba(11, 22, 30, 0.97);
    border-top: 1px solid rgba(79, 195, 247, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /*box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.45);*/
  }

  /* ── Bouton nav générique ── */
  .fz-nav-item {
    flex: 1;
    height: var(--fz-global-nav-h);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.38);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.18s;
    text-decoration: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  .fz-nav-item:active,
  .fz-nav-item.active {
    color: #4fc3f7;
  }

  .fz-nav-item svg {
    width: 24px;
    height: 24px;
  }

  .fz-nav-item.active svg {
    filter: drop-shadow(0 0 5px rgba(79, 195, 247, 0.55));
  }

  /* ── SVG Galerie (plus grand, style map-view-btn) ── */
  .fz-nav-gallery .fz-nav-gallery-svg {
    width: 30px;
    height: 30px;
    opacity: 0.38;
    transition: opacity 0.18s;
  }

  .fz-nav-gallery.active .fz-nav-gallery-svg {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(79, 195, 247, 0.5));
  }

  /* ── SVGs custom Maps et User (gradient, état inactif/actif via opacity) ── */
  .fz-nav-maps svg,
  .fz-nav-user svg {
    transition: opacity 0.18s;
  }

  .fz-maps-circle svg {
    opacity: 0.38;
  }

  .fz-nav-maps.active .fz-maps-circle svg,
  .fz-nav-maps:active .fz-maps-circle svg {
    opacity: 1;
  }

  .fz-nav-user svg {
    opacity: 0.38;
  }

  .fz-nav-user.active svg,
  .fz-nav-user:active svg {
    opacity: 1;
  }

  /* ── Logo FulgurPedia ── */
  .fz-nav-fp-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    opacity: 0.38;
    transition: opacity 0.18s;
  }

  .fz-nav-item.active .fz-nav-fp-img,
  .fz-nav-item:active .fz-nav-fp-img {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(79, 195, 247, 0.55));
  }

  /* ── Maps : flex légèrement plus large pour le cercle ── */
  .fz-nav-maps {
    flex: 1.15;
  }

  .fz-maps-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s, box-shadow 0.18s;
  }

  .fz-nav-maps.active .fz-maps-circle,
  .fz-nav-maps:active .fz-maps-circle {
    border-color: #4fc3f7;
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.32);
  }

  .fz-maps-circle svg {
    width: 24px;
    height: 24px;
  }

  /* ── Badge notifications sur bouton User ── */
  .fz-nav-user-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
  }

  .fz-nav-user-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: #f44;
    color: #fff !important;
    font-size: 9px;
    font-weight: 700;
    line-height: 16px !important;
    text-align: center;
    padding: 0 3px;
    display: none;
    z-index: 10 !important;
    box-sizing: border-box;
    pointer-events: none;
  }

  .fz-nav-user-badge.visible {
    display: block !important;
  }

  /* ═══════════════════════════════════════
     BOTTOM SHEET
  ═══════════════════════════════════════ */

  .fz-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    z-index: 3500;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .fz-sheet-overlay.open {
    display: block;
  }

  .fz-sheet {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3761;
    background: #0c1d28;
    border-radius: 18px 18px 0 0;
    border-top: 1px solid rgba(79, 195, 247, 0.22);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: 88dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .fz-sheet.open {
    transform: translateY(0);
  }

  .fz-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 6px;
    cursor: pointer;
  }

  .fz-sheet-handle div {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 4px;
  }

  .fz-sheet-inner {
    padding: 2px 10px 0;
  }

  /* ── Items de la sheet ── */
  .fz-sheet-btn,
  .fz-sheet-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 10px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.9rem;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .fz-sheet-btn:active,
  .fz-sheet-link:active {
    background: rgba(79, 195, 247, 0.09);
  }

  .fz-sheet-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(79, 195, 247, 0.07);
  }

  .fz-sheet-icon svg,
  .fz-sheet-icon img {
    width: 22px;
    height: 22px;
  }

  /* ── Séparateurs ── */
  .fz-sheet-sep {
    height: 1px;
    background: rgba(79, 195, 247, 0.1);
    margin: 4px 10px;
  }

  .fz-sheet-sep-light {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 2px 22px;
  }

  /* ── Sélecteur fond de carte ── */
  .fz-sheet-basemap-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 4px;
  }

  .fz-sheet-basemap-row select {
    flex: 1;
    background: rgba(7, 18, 26, 0.95);
    border: 1px solid rgba(79, 195, 247, 0.3);
    color: #dff3ff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
  }

  /* ── Ligne compacte : basemap + réseaux ── */
  .fz-sheet-compact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 4px;
    flex-wrap: wrap;
  }

  .fz-sheet-basemap-select-inline {
    flex: 1 1 0;
    min-width: 0;
  }

  .fz-sheet-lang-select-inline {
    flex: 0 0 auto;
    width: max-content;
    min-width: 48px;
  }

  .fz-sheet-basemap-select-inline,
  .fz-sheet-lang-select-inline {
    background: rgba(7, 18, 26, 0.95);
    border: 1px solid rgba(79, 195, 247, 0.3);
    color: #dff3ff;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.82rem;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
  }

  .fz-sheet-social-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  @media (max-width: 360px) {
    .fz-sheet-social-inline {
      width: 100%;
      justify-content: center;
    }
  }

  /* ── Boutons réseaux sociaux ── */
  .fz-sheet-social {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 4px;
  }

  .fz-sheet-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 195, 247, 0.07);
    border: 1px solid rgba(79, 195, 247, 0.18);
    color: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .fz-sheet-social-btn:active {
    background: rgba(79, 195, 247, 0.2);
    color: #4fc3f7;
  }

  .fz-sheet-social-btn svg {
    width: 18px;
    height: 18px;
  }

  /* ── Don + feedback ── */
  .fz-sheet-donation {
    display: flex;
    gap: 8px;
    padding: 6px 20px 4px;
    flex-wrap: wrap;
  }

  /* ── Café + Avis : 2 colonnes égales ── */
  .fz-sheet-cafe-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 10px 4px;
  }

  .fz-sheet-cafe-btn {
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 200, 60, 0.55);
    background: linear-gradient(135deg, rgba(255, 180, 30, 0.18), rgba(255, 140, 0, 0.12));
    color: rgba(255, 220, 120, 0.95);
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
  }

  .fz-sheet-cafe-btn:active {
    background: linear-gradient(135deg, rgba(255, 180, 30, 0.32), rgba(255, 140, 0, 0.24));
  }

  .fz-sheet-avis-btn {
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(79, 195, 247, 0.28);
    background: rgba(79, 195, 247, 0.06);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
  }

  .fz-sheet-avis-btn:active {
    background: rgba(79, 195, 247, 0.16);
  }

  .fz-sheet-donation-btn {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    border: 1px solid rgba(79, 195, 247, 0.28);
    background: rgba(79, 195, 247, 0.06);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .fz-sheet-donation-btn:active {
    background: rgba(79, 195, 247, 0.16);
  }

  /* ── Liens légaux (centrés) ── */
  .fz-sheet-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 10px;
    padding: 8px 22px 14px;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.32);
    text-align: center;
  }

  .fz-sheet-legal a {
    color: rgba(255, 255, 255, 0.32);
    text-decoration: none;
  }

  .fz-sheet-legal a:active {
    color: #4fc3f7;
  }

  /* ═══════════════════════════════════════
     BARRES TABS HORIZONTALES (haut de page)
     FulgurPedia + User
  ═══════════════════════════════════════ */

  /* Barre commune */
  .fz-top-tabs {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding: 5px 8px;
    background: rgba(11, 22, 30, 0.97);
    border-bottom: 1px solid rgba(79, 195, 247, 0.25);
    border: 1px solid rgba(79, 195, 247, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .fz-top-tabs::-webkit-scrollbar {
    display: none;
  }

  .fz-top-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.55);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .fz-top-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .fz-top-tab.active {
    background: rgba(79, 195, 247, 0.15);
    border-color: rgba(79, 195, 247, 0.4);
    color: #dff3ff;
  }

  .fz-top-tab:active {
    background: rgba(79, 195, 247, 0.1);
  }

}
