/* ============================================================================
   FITCONVERTER — Styles pages marques & tableaux universels
   ============================================================================ */

/* ---- Brand page ---- */
.brand-page-header {
  margin-bottom: 1.75rem;
}

.brand-page-title {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text, #141414);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.brand-page-intro {
  color: var(--text-muted, #666);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ---- Gender / category nav ---- */
.tables-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tables-nav-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 1.5px solid var(--border, #D1D5DB);
  background: transparent;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-muted, #444);
  transition: all 0.15s ease;
}

.tables-nav-btn.active {
  background: var(--text, #141414);
  color: var(--bg, #FFFFFF);
  border-color: var(--text, #141414);
}

/* ---- Table sections ---- */
.table-section {
  display: none;
}

.table-section.active {
  display: block;
}

.table-block {
  margin-bottom: 2.5rem;
}

.table-block h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text, #141414);
  text-transform: none;
  letter-spacing: 0;
}

/* ---- Data table ---- */
.measure-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.measure-table th {
  background: var(--surface-alt, #F3F4F6);
  padding: 0.6rem 1rem;
  text-align: center;
  font-weight: 700;
  border: 1px solid var(--border, #E5E7EB);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  color: var(--text, #141414);
}

.measure-table th:first-child {
  text-align: left;
}

.measure-table td {
  padding: 0.55rem 1rem;
  border: 1px solid var(--border, #E5E7EB);
  color: var(--text-muted, #444);
  text-align: center;
}

.measure-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text, #141414);
}

.measure-table tr:hover td {
  background: var(--surface-hover, #F9FAFB);
}

/* ---- Note ---- */
.measure-note {
  font-size: 0.78rem;
  color: var(--text-faint, #888);
  margin-top: 0.5rem;
  font-style: italic;
}

.no-data {
  color: var(--text-faint, #999);
  font-size: 0.875rem;
  font-style: italic;
}

/* ---- Brand grid (index page) ---- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.brand-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--border, #E5E7EB);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.15s ease;
  background: var(--surface, #FAFAFA);
}

.brand-card:hover {
  border-color: var(--text, #141414);
  background: var(--bg, #FFFFFF);
}

.brand-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text, #141414);
}

.brand-card-genres {
  font-size: 0.75rem;
  color: var(--text-faint, #888);
}

/* ---- Universal table page heading ---- */
.tables-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text, #141414);
}

.tables-intro {
  color: var(--text-muted, #666);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ---- AdSense zones ---- */
.ad-zone {
  width: 100%;
  margin: 1.75rem 0;
  text-align: center;
  overflow: hidden;
}

.ad-zone ins {
  display: block;
}

/* ---- Responsive ---- */

/* Scroll horizontal sur les tableaux en mobile */
.table-block {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .measure-table {
    font-size: 0.78rem;
    min-width: 480px; /* force scroll plutôt qu'écrasement */
  }
  .measure-table th,
  .measure-table td {
    padding: 0.45rem 0.6rem;
  }
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .brand-page-title {
    font-size: 1.5rem;
  }
}

/* ---- Dark mode ---- */
[data-theme="dark"] .measure-table {
  border-color: var(--border, #303030);
}

[data-theme="dark"] .measure-table th {
  background: var(--surface-alt, #242424);
  border-color: var(--border, #303030);
  color: var(--text, #EEEEEE);
}

[data-theme="dark"] .measure-table td {
  border-color: var(--border, #303030);
  color: var(--text-muted, #9CA3AF);
}

[data-theme="dark"] .measure-table td:first-child {
  color: var(--text, #EEEEEE);
}

[data-theme="dark"] .measure-table tr:hover td {
  background: var(--surface-hover, #2C2C2C);
}

[data-theme="dark"] .tables-nav-btn {
  border-color: var(--border, #303030);
  color: var(--text-muted, #9CA3AF);
}

[data-theme="dark"] .tables-nav-btn.active {
  background: var(--text, #EEEEEE);
  color: var(--bg, #121212);
  border-color: var(--text, #EEEEEE);
}
