/* ================================================
   MOBILE BOTTOM MENU - Floating Pill Navigation
   Vibe: Floating Pill + Spectrum Scan
   Brand: #e33922 | Dark: #212121
   ================================================ */

/* Masqué sur desktop */
.bl-nav-wrapper {
  display: none;
}

@media (max-width: 768px) {

  /* Espace en bas du body pour ne pas cacher le contenu */
  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
  }

  /* ================================================
     WRAPPER - Floating pill container
     ================================================ */
  .bl-nav-wrapper {
    display: block;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* ================================================
     NAV BAR - Glassmorphism pill
     ================================================ */
  .bl-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 64px;
    will-change: transform;
    background: rgba(30, 30, 30, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 0 8px;
  }

  /* ================================================
     NAV ITEMS - Standard items
     ================================================ */
  .bl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #aaa;
    gap: 3px;
    flex: 1;
    height: 100%;
    transition: color 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .bl-item:hover,
  .bl-item:focus {
    text-decoration: none !important;
  }

  .bl-item.active {
    color: #fff;
  }

  .bl-item:active {
    transform: scale(0.92);
  }

  .bl-icon {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
  }

  .bl-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  /* ================================================
     CTA - Bouton + central (style TikTok squircle)
     ================================================ */
  .bl-cta {
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  .bl-cta-btn {
    width: 46px;
    height: 38px;
    background: linear-gradient(145deg, #e33922, #c22d1a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(227, 57, 34, 0.45),
                inset 0 1px 2px rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 22px;
    transition: transform 0.15s ease;
  }

  .bl-cta:active .bl-cta-btn {
    transform: scale(0.9);
  }

  /* ================================================
     DEEPFAKE - Holographic spectrum scan animation
     ================================================ */
  .bl-df-wrap {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
  }

  .bl-df-icon {
    font-size: 20px;
    position: relative;
    z-index: 2;
    animation: bl-spectrum 4s infinite linear;
  }

  /* Scanline grid overlay */
  .bl-df-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100% 3px;
    z-index: 3;
    pointer-events: none;
  }

  /* Scan line + tint */
  .bl-df-wrap::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom,
      transparent,
      rgba(0, 242, 255, 0.25),
      rgba(255, 255, 255, 0.7),
      transparent);
    z-index: 4;
    animation: bl-scan 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
  }

  @keyframes bl-scan {
    0% { top: -100%; opacity: 0; }
    8% { opacity: 1; }
    42% { top: 100%; opacity: 1; }
    48%, 100% { top: 100%; opacity: 0; }
  }

  @keyframes bl-spectrum {
    0%, 8% { color: #aaa; filter: none; }
    14% { color: #00f2ff; filter: drop-shadow(0 0 4px #00f2ff); }
    22% { color: #e33922; filter: drop-shadow(0 0 5px #e33922); }
    30% { color: #fff; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8)); }
    42%, 100% { color: #aaa; filter: none; }
  }

  /* ================================================
     SCROLL HIDE/SHOW
     ================================================ */
  .bl-nav-wrapper.hidden {
    transform: translateY(calc(100% + 20px));
    transition: transform 0.3s ease;
  }

  .bl-nav-wrapper:not(.hidden) {
    transform: translateY(0);
    transition: transform 0.3s ease;
  }

  /* ===== FOCUS INDICATORS ===== */
  .bl-item:focus-visible,
  .bl-cta:focus-visible {
    outline: 2px solid #e33922;
    outline-offset: -2px;
  }
}
