/* ============================================================
   NOUS FOREZ — Mobile Bottom Navigation Bar
   Fichier : nous-forez-theme/css/mobile-nav.css
   ============================================================ */

/* Variables du projet (déjà définies dans le child theme,
   ici pour référence) */
:root {
  --nf-cream:    #F7F5F0;
  --nf-black:    #1F1F1F;
  --nf-pink:     #F62DAE;
  --nf-gray:     #333333;
  --nf-green:    #63A46C;
  --nf-nav-h:    64px;
  --nf-safe-bot: env(safe-area-inset-bottom, 0px); /* iPhone notch */
}

/* ── 1. PADDING BODY pour ne pas cacher le contenu sous la barre ── */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--nf-nav-h) + var(--nf-safe-bot)) !important;
  }

  /* Cacher le menu hamburger Astra sur mobile — on le remplace */
  .ast-mobile-header-wrap,
  .ast-menu-toggle,
  #ast-mobile-header {
    display: none !important;
  }
}

/* ── 2. LA BARRE ── */
#nf-bottom-nav {
  display: none; /* cachée par défaut, JS l'active */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;

  height: calc(var(--nf-nav-h) + var(--nf-safe-bot));
  padding-bottom: var(--nf-safe-bot);

  background: var(--nf-black);
  border-top: 2px solid var(--nf-pink);

  /* Grille 5 colonnes égales */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
}

@media (max-width: 768px) {
  #nf-bottom-nav {
    display: grid;
  }
}

/* ── 3. ITEMS ── */
.nf-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;

  text-decoration: none;
  color: rgba(247, 245, 240, 0.55);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  padding: 8px 4px;
  transition: color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.nf-nav-item:hover,
.nf-nav-item:focus {
  color: var(--nf-cream);
  background: rgba(246, 45, 174, 0.08);
  text-decoration: none;
}

/* État actif — page courante */
.nf-nav-item.is-active {
  color: var(--nf-pink);
}

.nf-nav-item.is-active .nf-nav-icon {
  color: var(--nf-pink);
}

/* Indicateur trait rose en haut de l'item actif */
.nf-nav-item.is-active::before {
  content: '';
  position: absolute;
  top: -2px; /* couvre la border-top de la barre */
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--nf-pink);
  border-radius: 0 0 2px 2px;
}

/* ── 4. ICÔNES SVG inline ── */
.nf-nav-icon {
  width: 22px;
  height: 22px;
  color: inherit;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.nf-nav-item:active .nf-nav-icon {
  transform: scale(0.88);
}

/* ── 5. ITEM "REJOINDRE" — accent rose ── */
.nf-nav-item--cta {
  color: var(--nf-pink) !important;
}

.nf-nav-item--cta .nf-nav-icon {
  background: var(--nf-pink);
  color: var(--nf-black);
  border-radius: 50%;
  padding: 5px;
  width: 32px;
  height: 32px;
  margin-top: -4px;
}

.nf-nav-item--cta.is-active::before {
  display: none; /* pas d'indicateur sur le CTA */
}

/* ── 6. BADGE compteur (ex: missions disponibles) ── */
.nf-nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--nf-pink);
  color: var(--nf-black);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
