/* ============================================================
   Darts — Outils & Calibration guidée
   ============================================================ */

.tools-head {
  margin-bottom: 18px;
}

.tools-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 800;
}

.tools-head p {
  margin: 0;
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- Tabs (data-tab-btn / data-tab) ---- */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: var(--pill);
  background: rgba(11, 19, 38, .7);
  border: 1px solid var(--border);
  margin: 16px 0;
}

.tab-btn {
  -webkit-tap-highlight-color: transparent;
  border: 0;
  cursor: pointer;
  min-height: 44px;
  border-radius: var(--pill);
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  transition: color var(--t-fast), background var(--t-fast);
}

.tab-btn.active {
  color: #06121f;
  background: var(--accent);
}

.dg-tab {
  display: none;
  animation: fadeIn .25s var(--ease);
}

.dg-tab.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Barre de connexion ---- */
.connect-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.connect-bar .status {
  justify-content: center;
}

/* ---- Grille entraînement ---- */
.train-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
}

.summary-row .lbl {
  font-size: .82rem;
  color: var(--muted);
}

.summary-row .val {
  font-size: 1.15rem;
  font-weight: 800;
}

/* Liste derniers lancers (#throws) */
.throw-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.throw-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  animation: throwIn .25s var(--ease);
}

@keyframes throwIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.throw-list .value {
  font-weight: 800;
  font-size: 1rem;
}

.throw-list .ts {
  font-size: .76rem;
  color: var(--faint);
}

.throw-empty {
  color: var(--faint);
  font-size: .85rem;
  text-align: center;
  padding: 18px 0;
}

/* ---- Calibration ---- */
.calib-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* Carte assistant : très lisible étape par étape */
.calib-panel {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-progress {
  height: 8px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
  margin: 6px 0 14px;
}

.cal-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: var(--pill);
  background: var(--accent);
  box-shadow: 0 0 14px rgba(34, 211, 238, .6);
  transition: width .3s var(--ease);
}

.cal-step-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.cal-step-instruction {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 12px;
  min-height: 3em;
}

.cal-step-instruction strong {
  color: var(--cyan);
}

.cal-step-count {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.cal-status {
  font-size: .85rem;
  color: var(--muted);
  margin: 14px 0 0;
  line-height: 1.5;
}

.calib-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* Cible live dans la calibration */
.calib-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@media (min-width: 768px) {
  .train-grid {
    grid-template-columns: 1.4fr 1fr;
  }
  .calib-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
  .connect-bar {
    flex-direction: row;
    align-items: center;
  }
  .connect-bar .status {
    justify-content: flex-start;
  }
}
