/* ====== Ichibani 15 ans — Bottom Navigation (mobile only) ====== */
/* Visible uniquement sur ≤768px. Desktop : inchangé. */

/* ---- Pill flottante ---- */
.bottom-nav {
  display: none; /* caché par défaut, activé par media query */
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;

  width: calc(100vw - 24px);
  max-width: 480px;
  height: 64px;

  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 28px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.08);

  display: none; /* reset — la media query l'active */
  align-items: stretch;
  padding: 0 6px;
  gap: 2px;
}

/* ---- Items ---- */
.bnav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  min-width: 0;
  min-height: 48px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  border-radius: 20px;
  transition: color 0.18s ease, background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

/* Icône wrapper */
.bnav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Label */
.bnav-label {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---- État inactif (défaut) ---- */
.bnav-item svg { stroke: var(--grey); transition: stroke 0.18s ease; }

/* ---- État actif (tab seulement, pas CTA) ---- */
.bnav-item.active {
  color: var(--burgundy);
}
.bnav-item.active svg {
  stroke: var(--burgundy);
}
/* Fond pill autour de l'icône pour l'état actif */
.bnav-item.active .bnav-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 32px;
  background: rgba(117, 32, 49, 0.08);
  border-radius: 12px;
  z-index: 0;
}

/* ---- Feedback tactile ---- */
.bnav-item:active {
  opacity: 0.75;
  transform: scale(0.94);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

/* ---- Item CTA S'inscrire (4e item) ---- */
.bnav-item.bnav-cta {
  background: var(--burgundy);
  color: #faf7f2;
  border-radius: 20px;
  flex: 0 0 auto;
  padding: 8px 14px;
  min-width: 80px;
}
.bnav-item.bnav-cta svg { stroke: #faf7f2; }
/* Le CTA ne prend PAS la classe active — il reste toujours bordeaux */
.bnav-item.bnav-cta.active {
  background: var(--burgundy);
  color: #faf7f2;
}
.bnav-item.bnav-cta.active svg { stroke: #faf7f2; }
.bnav-item.bnav-cta.active .bnav-icon::before { display: none; }

/* ---- Séparateur vertical subtil avant le CTA ---- */
.bnav-sep {
  width: 1px;
  background: var(--line);
  margin: 12px 2px;
  flex-shrink: 0;
  align-self: stretch;
}

/* ---- Media query : mobile ≤768px ---- */
@media (max-width: 768px) {

  /* Afficher la bottom nav */
  .bottom-nav {
    display: flex;
  }

  /* Top nav : cacher onglets + CTA, garder logo + bandeau date */
  .topnav .tabs {
    display: none;
  }
  .topnav .topnav-right {
    display: none;
  }

  /* Compenser la hauteur de la bottom nav sous le contenu */
  main {
    padding-bottom: 100px;
  }
  .page-footer {
    padding-bottom: calc(40px + 100px);
  }

  /* Simplifier le topnav-inner : logo seul, bien centré */
  .topnav-inner {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 12px 20px;
  }
}

/* ---- Très petits écrans (≤380px) : label plus court ---- */
@media (max-width: 380px) {
  .bnav-item {
    font-size: 8px;
    padding: 6px 2px;
  }
  .bnav-item.bnav-cta {
    padding: 6px 10px;
    min-width: 64px;
  }
  .bottom-nav {
    height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bnav-item { transition: none !important; }
  .bnav-item:active { transform: none; }
}
