/* Barre d'onglets du bas (ion-tabs.tictac) : accent sur l'onglet actif, icônes Ionicons iOS
   homogènes (contour inactif / plein actif), police système moderne, zones tactiles de 60 px.
   Chargée après les feuilles Ionic : sélecteurs limités à ion-tabs.tictac. */
ion-tabs.tictac {
  --tab-height: 60px;
  --tab-safe: env(safe-area-inset-bottom, 0px);
  --tab-accent: #2b7f7a;        /* teal TicTac assombri : contraste 4,9:1 sur blanc */
  --tab-accent-soft: #e2f2f0;
  --tab-muted: #66787f;         /* inactif : 4,6:1 sur blanc, lisible mais en retrait */
  --tab-line: #e3e9ec;
}

ion-tabs.tictac > .tabs,
ion-tabs.tictac .tab-nav.tabs {
  height: calc(var(--tab-height) + var(--tab-safe));
  padding: 0 4px var(--tab-safe);
  background: #fff;
  background-image: none;
  border-top: 1px solid var(--tab-line);
  box-shadow: 0 -6px 18px rgba(23, 50, 59, 0.06);
  line-height: normal;
}

ion-tabs.tictac.tabs-icon-top .tab-item {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: none;
  min-width: 0;
  height: var(--tab-height);
  min-height: 48px;
  margin: 0;
  padding: 6px 2px 7px;
  border: 0;
  color: var(--tab-muted);
  opacity: 1;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s ease;
}

ion-tabs.tictac.tabs-icon-top .tab-item .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 30px;
  margin: 0;
  border-radius: 15px;
  font-size: 24px;
  line-height: 30px;
  color: inherit;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

ion-tabs.tictac.tabs-icon-top .tab-item .tab-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Onglet actif : couleur d'accent, pastille derrière l'icône, libellé plus appuyé. */
ion-tabs.tictac.tabs-icon-top .tab-item.tab-item-active,
ion-tabs.tictac.tabs-icon-top .tab-item.active {
  margin: 0;
  border: 0;
  color: var(--tab-accent);
  font-weight: 650;
}
ion-tabs.tictac.tabs-icon-top .tab-item.tab-item-active .icon,
ion-tabs.tictac.tabs-icon-top .tab-item.active .icon {
  background-color: var(--tab-accent-soft);
}

/* Retour tactile et clavier. */
ion-tabs.tictac.tabs-icon-top .tab-item.activated .icon,
ion-tabs.tictac.tabs-icon-top .tab-item:active .icon {
  transform: scale(0.94);
}
ion-tabs.tictac.tabs-icon-top .tab-item:focus-visible {
  outline: 2px solid var(--tab-accent);
  outline-offset: -4px;
  border-radius: 12px;
}

/* Badge (messages internes sur « Plus ») accroché à l'icône. */
ion-tabs.tictac.tabs-icon-top .tab-item .badge {
  position: absolute;
  top: 4px;
  right: auto;
  left: calc(50% + 10px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  opacity: 1;
}

/* Le contenu laisse la place à la barre plus haute. */
ion-tabs.tictac .has-tabs,
ion-tabs.tictac .bar-footer.has-tabs,
ion-tabs.tictac .has-tabs.pane {
  bottom: calc(var(--tab-height) + var(--tab-safe));
}
ion-tabs.tictac .has-footer.has-tabs {
  bottom: calc(var(--tab-height) + 44px + var(--tab-safe));
}

@media (prefers-reduced-motion: reduce) {
  ion-tabs.tictac .tab-item,
  ion-tabs.tictac .tab-item .icon {
    transition: none;
  }
}
