/* ------------------ ESPACE POUR LES BARRES UNIQUEMENT EN PWA ------------------ */

/* Android PWA (Chrome, APK, etc.) */
@media all and (display-mode: standalone) {
  body {
    padding-top: 45px;   /* espace pour topbar */
    padding-bottom: 75px; /* espace pour navbar */
  }
}

/* iOS PWA (Safari standalone) */
body.pwa-ios {
  padding-top: 45px;
  padding-bottom: 75px;
}


/* ------------------ NAVBAR BAS ------------------ */
.pwa-navbar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 75px;
  background-color: #333;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  z-index: 999998;
  border-top: 1px solid #ccc;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.pwa-nav-item {
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5px;
  cursor: pointer;
  flex: 1;
  min-width: 60px;
  background: none;
  border: none;
  text-decoration: none;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0 3px;
}

.pwa-nav-icon {
  font-size: 22px;
  margin-bottom: 5px;
  color: #fff;
}

.pwa-nav-item span {
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ✅ Effet vert sur bouton actif */
.pwa-nav-item.active {
  background-color: #226901 !important;
  border-radius: 8px;
}
.pwa-nav-item.active .pwa-nav-icon,
.pwa-nav-item.active span {
  color: #fff !important;
}

/* Bouton central rond */
.pwa-nav-item-center {
  position: relative;
  top: -20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 6px;
}
.pwa-nav-center-circle {
  width: 70px;
  height: 70px;
  background-color: #b32121;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}
.pwa-nav-center-circle.active {
  background-color: #226901;
}
.pwa-nav-center-circle i {
  font-size: 20px;
  margin-bottom: 2px;
  color: #fff;
}
.pwa-nav-center-circle span {
  font-size: 11px;
  line-height: 1.2;
  color: #fff;
}

/* Sous-menu */
.pwa-submenu {
  position: fixed;
  bottom: 85px;
  right: 10px;
  background: #333;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  z-index: 999999;
  min-width: 180px;
  display: none; /* pas d’animation, affichage direct */
}
.pwa-submenu.show {
  display: flex;
}
.pwa-submenu a {
  color: #fff;
  padding: 10px;
  text-decoration: none;
  border-bottom: 1px solid #444;
  display: block;
}
.pwa-submenu a:hover {
  background: #b32121;
}
.pwa-submenu a:last-child {
  border-bottom: none;
}
.pwa-submenu a.active {
  background: #226901;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 400px) {
  .pwa-nav-icon {
    font-size: 18px;
  }
  .pwa-nav-item span {
    font-size: 10px;
  }
  .pwa-nav-center-circle {
    width: 60px;
    height: 60px;
  }
  .pwa-nav-center-circle span {
    font-size: 10px;
  }
}


/* ------------------ TOPBAR HAUTE ------------------ */
.pwa-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px;
  background: #b32121;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 1000001;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  font-family: sans-serif;
}

.pwa-topbar .pwa-back-button {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-topbar .pwa-logo {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pwa-topbar .pwa-logo img {
  height: 24px;
}

/* ✅ Ajustement iOS notch */
.pwa-topbar {
  padding-top: env(safe-area-inset-top);
}
.pwa-navbar {
  padding-bottom: env(safe-area-inset-bottom);
}
