/* ===== HERO ===== */
.page-hero--toolbox {
  background-image: linear-gradient(135deg, rgba(0,0,0,0.72) 0%, rgba(0,30,40,0.65) 100%),
                    url('../images/Herobg.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ===== TOOLBOX SECTION ===== */
.toolbox-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 6% 88px;
}

/* ===== TABS ===== */
.toolbox-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
}

.toolbox-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border-radius: calc(var(--radius-md) - 2px);
  transition: all var(--transition);
  white-space: nowrap;
}

.toolbox-tab:hover { color: var(--text); background: var(--bg-soft); }

.toolbox-tab.active { background: var(--cyan); color: #000; }

.toolbox-tab svg { flex-shrink: 0; }

/* ===== PANELS ===== */
.toolbox-panel { display: none; }
.toolbox-panel.active { display: block; }

/* ===== PSU RESULT ===== */
.psu-result {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.4s ease forwards;
}

.psu-result.visible { display: flex; }

.psu-watt-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.psu-watt-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  color: var(--text);
  line-height: 1;
}

.psu-watt-unit {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-muted);
}

.psu-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.psu-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.psu-breakdown-row:last-child { border-bottom: none; }
.psu-breakdown-row strong { color: var(--text); font-weight: 600; }

.psu-recommendation {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.psu-rec-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.psu-rec-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--cyan);
}

.psu-rec-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ===== FPS RESULT ===== */
.fps-result {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.4s ease forwards;
}

.fps-result.visible { display: flex; }

.fps-display {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.fps-number-wrap { display: flex; align-items: baseline; gap: 8px; }

.fps-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 4rem;
  color: var(--text);
  line-height: 1;
}

.fps-unit {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.fps-milestones {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fps-milestone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
}

.fps-milestone--ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.fps-milestone--no {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.btool-result-badge--excellent {
  background: rgba(0, 200, 232, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 200, 232, 0.3);
}

/* Game select wider */
#fps-game-select { width: 100%; }

/* ===== SEARCH INPUT ===== */
.btool-search {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  margin-bottom: 6px;
  box-sizing: border-box;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.btool-search::placeholder { color: var(--text-muted); opacity: 0.6; }
.btool-search:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 200, 232, 0.12);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
  /* Tabs : scroll horizontal sur mobile */
  .toolbox-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 5px;
  }
  .toolbox-tabs::-webkit-scrollbar { display: none; }
  .toolbox-tab {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 0.83rem;
    gap: 6px;
    white-space: nowrap;
  }
  .toolbox-tab svg { width: 14px; height: 14px; }

  /* Résultats PSU/FPS */
  .fps-display { flex-direction: column; gap: 14px; }
}

@media (max-width: 480px) {
  .toolbox-section { padding: 32px 4% 60px; }

  /* Réduction des grandes valeurs numériques */
  .fps-number { font-size: 2.8rem; }
  .psu-watt-number { font-size: 2.2rem; }
  .psu-rec-value { font-size: 1.4rem; }

  /* Barres bottleneck : nom sur une ligne, barre dessous */
  .btool-bar-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 6px;
  }
  .btool-bar-name { grid-column: 1; grid-row: 1; white-space: normal; }
  .btool-bar-tag  { grid-column: 2; grid-row: 1; text-align: right; font-size: 0.72rem; }
  .btool-bar-track { grid-column: 1 / -1; grid-row: 2; }

  /* Pills plus compactes */
  .pill { padding: 7px 13px; font-size: 0.82rem; }

  /* Search inputs */
  .btool-search { font-size: 0.85rem; padding: 9px 12px; }

  /* Milestones FPS */
  .fps-milestones { gap: 6px; }
  .fps-milestone  { padding: 4px 10px; font-size: 0.76rem; }
}
