/* ------------------------------------------------------------
   nav.css — barre de navigation flottante (remplace la sidebar)
   Référence : design/prompts/handoffs/01-composants/screenshots/01-navigation.png
   ------------------------------------------------------------ */

.app-nav {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
  height: 68px;
  margin: 0 auto;
  max-width: 480px;
  border-radius: var(--r-nav);
  background: var(--nav-bar);
  box-shadow: var(--shadow-nav);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  padding: 0 6px;
  gap: 2px;
  z-index: 40;
}

.app-nav__tab {
  flex: 1 1 auto;
  min-width: 56px;
  height: 56px;
  margin: auto 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  color: var(--nav-inactive);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r-tab);
}

.app-nav__tab .icon {
  width: 22px;
  height: 22px;
}

.app-nav__tab[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

/* Réserve de contenu : le contenu défilant ne doit jamais passer sous la
   barre (68 de haut + 4 de marge basse + 16 d'air + 20 de zone de sécurité). */
.app-content {
  padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}

/* Écran sans barre de navigation (ex. outil, lot 04) : pas de réserve,
   chaque écran gère alors son propre padding bas. */
.app-content--no-nav {
  padding-bottom: 0;
}

/* app.js pose le focus clavier ici après chaque navigation (repère
   d'accessibilité, pas un contrôle interactif) : l'anneau de focus par
   défaut traverserait l'écran à vide une fois la sidebar retirée. */
.app-content:focus-visible {
  outline: none;
}

/* Grand écran : la barre reste en bas, centrée, largeur bornée (règle
   maison DA 2026-2027 — jamais de barre latérale, même sur le web). */
@media (min-width: 960px) {
  .app-nav {
    left: 50%;
    right: auto;
    bottom: 24px;
    transform: translateX(-50%);
  }
}
