/* ==========================================================================
   SHARED TABS CORE
   Extrait de css/style.css pour conserver un ordre de cascade stable.
   Charge apres css/base/shared-settings.css puis avant css/style.css.
   ========================================================================== */

.tabs-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(84px + var(--safe-top)) var(--content-x) calc(var(--gap) * 2);
  gap: var(--gap);
  overflow-x: hidden;
  box-sizing: border-box;
}

.tabs-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.tabs-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #1d1d1d;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.tabs-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-ink);
}

.tabs-bar {
  position: sticky;
  top: calc(64px + var(--safe-top));
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.tabs-btn {
  min-height: var(--btn-height);
  padding-inline: var(--btn-pad-x);
  padding-block: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);
  border-radius: var(--radius-8);
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    color 120ms ease,
    opacity 120ms ease,
    box-shadow 120ms ease;
}

.tabs-btn.active {
  background: transparent;
  color: var(--state-active-text);
  border: none;
  box-shadow: none;
  background-image: linear-gradient(var(--state-active-text), var(--state-active-text));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
}

.tabs-btn:active {
  opacity: 0.76;
}

.tabs-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--state-focus-ring);
}

.tabs-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  scrollbar-width: none;
}

.tabs-track {
  height: 100%;
  display: flex;
  transition: transform 0.25s ease;
  box-sizing: border-box;
}

.tabs-track.dragging {
  transition: none;
}

.tab-page {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  width: 100%;
  flex: 0 0 auto;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  padding-top: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: none;
}

.tabs-content::-webkit-scrollbar,
.tab-page::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.tab-page .settings-card {
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.tabs-view .settings-card {
  padding: var(--card-pad);
}

.tab-page .settings-actions {
  width: 100%;
}

.tab-page .settings-actions button {
  width: 100%;
}
