/* Shell web app — barre de navigation basse (mobile / standalone) */

body {
  padding-bottom: calc(4.35rem + env(safe-area-inset-bottom, 0px));
}

.app-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  padding: 0.4rem 0.55rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(22, 56, 47, 0.08);
}

.app-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 3.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-faint);
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}

.app-tab svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-tab:hover {
  color: var(--bone-dim);
}

.app-tab.active {
  color: var(--emerald-deep);
  background: var(--emerald-soft);
  border-color: rgba(0, 200, 150, 0.35);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

@media (display-mode: standalone) {
  .header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--line);
  }
}

@supports (-webkit-touch-callout: none) {
  .app-tabbar {
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
  }
}

/* La barre basse reste une affaire de mobile / app installée */
@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }

  .app-tabbar {
    display: none;
  }
}
