/* ============================================================
   NAVIGATION.CSS — Barre de navigation basse (mobile/tablette)
   Remplace la sidebar. Accessible avec les pouces, robuste.
   ============================================================ */

/* ------------------------------------------------------------
   Barre de navigation basse — mobile et tablette
   ------------------------------------------------------------ */
.nav-bottom {
  display: none; /* Cachée sur desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-bottom-height);
  background: var(--color-surface);
  border-top: 2px solid var(--color-primary);
  box-shadow: 0 -2px 12px rgba(26,35,25,0.10);
}

.nav-bottom__inner {
  display: flex;
  align-items: stretch;
  height: 100%;
  max-width: var(--content-max-width);
  margin-inline: auto;
}

.nav-bottom__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding-block: var(--space-2);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  min-width: 0; /* Évite le débordement sur petits écrans */
  -webkit-tap-highlight-color: transparent;
}

.nav-bottom__item:hover,
.nav-bottom__item:active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  text-decoration: none;
}

.nav-bottom__item.active {
  color: var(--color-primary);
}

/* Indicateur actif — trait en haut de l'item */
.nav-bottom__item.active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--color-primary);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.nav-bottom__icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.nav-bottom__item.active .nav-bottom__icon {
  transform: scale(1.1);
}

.nav-bottom__label {
  font-size: 0.65rem;
  font-weight: var(--font-semi);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding-inline: var(--space-1);
}

/* Badge compteur sur un item */
.nav-bottom__badge {
  position: absolute;
  top: var(--space-1);
  right: 50%;
  transform: translateX(0.85rem);
  min-width: 1.1rem;
  height: 1.1rem;
  background: var(--color-danger);
  color: white;
  font-size: 0.6rem;
  font-weight: var(--font-bold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.2rem;
  border: 2px solid var(--color-surface);
}

/* Afficher sur mobile et tablette */
@media (max-width: 768px) {
  .nav-bottom {
    display: block;
  }
}


/* ------------------------------------------------------------
   Menu déroulant mobile (hamburger) — overlay
   ------------------------------------------------------------ */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,35,25,0.5);
  backdrop-filter: blur(2px);
  animation: fadeIn var(--transition-fast);
}

.nav-overlay.is-open {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideIn var(--transition-normal);
  overflow-y: auto;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.nav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.nav-drawer__title {
  font-weight: var(--font-bold);
  font-size: var(--text-md);
  color: var(--color-text);
}

.nav-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.nav-drawer__close:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.nav-drawer__body {
  flex: 1;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nav-drawer__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  min-height: var(--touch-target);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.nav-drawer__link:hover,
.nav-drawer__link.active {
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.nav-drawer__link.active {
  font-weight: var(--font-semi);
  color: var(--color-primary);
}

.nav-drawer__link svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: inherit;
}

.nav-drawer__section-title {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: var(--space-4) var(--space-4) var(--space-1);
}

.nav-drawer__divider {
  height: 1px;
  background: var(--color-border);
  margin-block: var(--space-2);
}

.nav-drawer__footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* Indicateur mode dans le drawer */
.nav-drawer__mode {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.nav-drawer__mode--bureau {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.nav-drawer__mode--terrain {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
