/* ==========================================================================
   COMPONENTS.CSS - Composants UI réutilisables GrainBoard
   ========================================================================== */

/* --------------------------------------------------------------------------
   Custom Select (dropdowns)
   -------------------------------------------------------------------------- */
.custom-select {
  padding: 8px 12px;
  background: rgba(15, 23, 32, 0.9);
  color: #e6eef8;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  min-width: 150px;
}

.custom-select:hover {
  background: rgba(15, 23, 32, 1);
  border-color: rgba(96, 165, 250, 0.5);
}

.custom-select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.custom-select option {
  background: #0f1720;
  color: #e6eef8;
  padding: 8px;
}

.custom-select option[data-premium="true"] {
  color: #9ca3af;
}

.custom-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   View Tabs (onglets de navigation)
   -------------------------------------------------------------------------- */
.view-tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
  max-width: 100%;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  color: #94a3b8;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
  margin-bottom: -2px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #60a5fa;
}

.tab-btn.active {
  color: #e6eef8;
  border-bottom-color: #60a5fa;
}

/* Tabs alternatifs (style login) */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab:hover {
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* --------------------------------------------------------------------------
   Filter Section (accordéon / panneaux de filtres)
   -------------------------------------------------------------------------- */
.filter-section {
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}

/* Variante simple (non-accordéon) */
.filter-section--simple {
  margin: 20px 0;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: visible;
}

.filter-header {
  padding: 12px 16px;
  background: rgba(96, 165, 250, 0.1);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  user-select: none;
}

.filter-header:hover {
  background: rgba(96, 165, 250, 0.2);
}

.filter-header.active {
  background: rgba(96, 165, 250, 0.15);
}

.filter-title {
  font-weight: bold;
  color: #e6eef8;
  font-size: 15px;
}

.filter-badge {
  background: #60a5fa;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
}

.filter-arrow {
  color: #60a5fa;
  font-size: 18px;
  transition: transform 0.3s;
}

.filter-arrow.open {
  transform: rotate(180deg);
}

.filter-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.filter-content.open {
  max-height: 2000px;
  transition: max-height 0.4s ease-in;
}

.filter-body {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.filter-body > label {
  width: 100%;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 12px !important;
  min-height: 38px;
  box-sizing: border-box;
}

.filter-body-column {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-body-column > label {
  flex-wrap: wrap;
  row-gap: 6px;
}

.filter-body-column .custom-select {
  max-width: 100%;
}

@media (max-width: 600px) {
  .tab-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .filter-body-column > label {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  .filter-body-column > label > span {
    min-width: 0 !important;
    width: 100%;
  }
  .filter-body-column .custom-select {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Filters Container (layout horizontal des filtres)
   -------------------------------------------------------------------------- */
.filters-container {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label,
.filter-label {
  font-weight: bold;
  color: #60a5fa;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Quick Select Buttons
   -------------------------------------------------------------------------- */
.quick-select-btn {
  padding: 8px 16px;
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-select-btn:hover {
  background: rgba(96, 165, 250, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
}

.quick-select-btn.active {
  background: #60a5fa;
  color: white;
  border-color: #60a5fa;
}

/* --------------------------------------------------------------------------
   Lookback Buttons (périodes temporelles)
   -------------------------------------------------------------------------- */
.lookback-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.lookback-btn,
.lookback-btn-delivered {
  padding: 6px 12px;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.lookback-btn:hover,
.lookback-btn-delivered:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #e6eef8;
}

.lookback-btn.active,
.lookback-btn-delivered.active {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.4);
}

/* --------------------------------------------------------------------------
   Source Selector
   -------------------------------------------------------------------------- */
.source-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px 16px;
  background: rgba(96, 165, 250, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  margin-bottom: 20px;
}

.source-btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  white-space: nowrap;
  min-height: 42px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.source-btn:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.4);
  color: #e6eef8;
}

.source-btn.active {
  background: rgba(96, 165, 250, 0.2);
  border-color: #60a5fa;
  color: #60a5fa;
}

/* --------------------------------------------------------------------------
   Summary Cards (style aligné sur basisInfoPanel de futures.php)
   -------------------------------------------------------------------------- */
.summary-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0;
  padding: 20px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 8px;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.summary-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 5px;
}

.summary-value {
  font-size: 16px;
  font-weight: 600;
  color: #e6eef8;
}

.summary-delta {
  font-size: 16px;
  font-weight: 600;
}

.summary-delta.positive {
  color: #22c55e;
}

.summary-delta.negative {
  color: #ef4444;
}

/* --------------------------------------------------------------------------
   Secondary Buttons
   -------------------------------------------------------------------------- */
.btn-secondary {
  padding: 8px 16px;
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.3);
  color: #e6eef8;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Toggle Other Countries (expand/collapse)
   -------------------------------------------------------------------------- */
.toggle-other-countries {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  margin-top: 8px;
  display: block;
  width: 100%;
}

.toggle-other-countries:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e6eef8;
}

.other-countries-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
}

.other-countries-section.visible {
  display: block;
}
/* --------------------------------------------------------------------------
   Download Buttons (PNG/CSV export)
   Style professionnel pour plateforme d'analyse de marché
   -------------------------------------------------------------------------- */
.btn-download {
  padding: 6px 14px;
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-download:hover {
  color: #e6eef8;
  border-color: rgba(148, 163, 184, 0.7);
}

.btn-download:active {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.6);
}

.btn-download:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-download .icon {
  font-size: 11px;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Country Tags (selection badges)
   -------------------------------------------------------------------------- */
.country-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(96, 165, 250, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 6px;
  color: #e6eef8;
  font-size: 13px;
  font-weight: bold;
}

.country-tag .remove-btn {
  cursor: pointer;
  color: #ef4444;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s;
}

.country-tag .remove-btn:hover {
  transform: scale(1.2);
}

/* --------------------------------------------------------------------------
   Overheat Buttons & Signals (PRO feature indicators)
   -------------------------------------------------------------------------- */
.overheat-btn {
  padding: 8px 16px;
  background: rgba(251, 191, 36, 0.06);
  color: #d4a855;
  border: 1px solid rgba(212, 168, 85, 0.5);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overheat-btn:hover {
  background: rgba(251, 191, 36, 0.12);
}

.overheat-btn:active {
  background: rgba(251, 191, 36, 0.15);
}

.overheat-btn.locked {
  position: relative;
  cursor: pointer;
  background: rgba(251, 191, 36, 0.05);
  color: #c9a654;
  border-color: rgba(201, 166, 84, 0.4);
}

.overheat-btn.locked:hover {
  background: rgba(251, 191, 36, 0.10);
}

/* Overheat Signal States */
.overheat-signal {
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  border: 2px solid;
  transition: all 0.3s;
}

.overheat-signal .icon {
  font-size: 18px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

.overheat-signal .text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overheat-signal .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.overheat-signal .value {
  font-size: 16px;
}

.overheat-signal.cold {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.5);
  color: #60a5fa;
}

.overheat-signal.cool {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.5);
  color: #06b6d4;
}

.overheat-signal.normal {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.5);
  color: #22c55e;
}

.overheat-signal.warm {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.5);
  color: #f97316;
}

.overheat-signal.hot {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

/* --------------------------------------------------------------------------
   Signal Teaser — locked preview (ANALYST/PRO upsell)
   Self-contained component used inside summary-card grids when a user
   doesn't have access to the underlying signal (overheat / correlation / etc.).
   3-column grid layout: [icon] [label+blurred value 1fr] [badge auto].
   -------------------------------------------------------------------------- */
.signal-teaser {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
  color: #94a3b8;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  overflow: hidden;
}

.signal-teaser:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
}

.signal-teaser__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
}

.signal-teaser__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.signal-teaser__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.signal-teaser__value {
  font-size: 16px;
  filter: blur(4px);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.signal-teaser__badge {
  flex-shrink: 0;
  font-size: 11px;
  color: #ffffff;
  background: #3b82f6;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  white-space: nowrap;
}

.signal-teaser__badge--gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* --------------------------------------------------------------------------
   Period Selector (timeframe buttons)
   -------------------------------------------------------------------------- */
.period-selector {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.period-btn {
  padding: 8px 16px;
  background: rgba(15, 23, 32, 0.9);
  color: #e6eef8;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  font-weight: 500;
}

.period-btn:hover {
  background: rgba(15, 23, 32, 1);
  border-color: rgba(96, 165, 250, 0.5);
}

.period-btn.active {
  background: #60a5fa;
  border-color: #60a5fa;
  color: #0f1720;
}

/* --------------------------------------------------------------------------
   Premium Locked Styles
   -------------------------------------------------------------------------- */
.lookback-btn.premium-locked,
.lookback-btn-delivered.premium-locked {
  opacity: 0.75;
  cursor: pointer;
  position: relative;
}

.lookback-btn.premium-locked:hover,
.lookback-btn-delivered.premium-locked:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
  color: #60a5fa;
}

.custom-select option[data-analyst="true"] {
  color: #94a3b8;
}

/* --------------------------------------------------------------------------
   Data Source Notes
   -------------------------------------------------------------------------- */
.data-source-note {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(96, 165, 250, 0.05);
  border-left: 3px solid rgba(96, 165, 250, 0.3);
  border-radius: 4px;
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}

.data-source-note strong {
  color: #60a5fa;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   Premium CTA Styles
   -------------------------------------------------------------------------- */
.delivered-premium-cta {
  margin-top: 30px;
  padding: 50px 40px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(15, 23, 32, 0.95) 100%);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.delivered-premium-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6, #60a5fa);
}

.premium-cta-icon {
  font-size: 56px;
  margin-bottom: 20px;
}

.delivered-premium-cta h3 {
  color: #e6eef8;
  font-size: 26px;
  margin: 0 0 15px 0;
  font-weight: 700;
}

.delivered-premium-cta p {
  color: #94a3b8;
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 25px auto;
}

.premium-features-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 30px auto;
  max-width: 400px;
  text-align: left;
}

.premium-features-list li {
  color: #cbd5e1;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-features-list li:last-child {
  border-bottom: none;
}

.premium-cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta-premium {
  padding: 14px 32px;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.btn-cta-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.btn-cta-secondary {
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.1);
  color: #e6eef8;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   Compare Section
   -------------------------------------------------------------------------- */
.compare-section {
  margin-top: 20px;
  padding: 15px;
  background: rgba(15, 23, 32, 0.5);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}

.compare-section h4 {
  margin: 0 0 15px 0;
  color: #94a3b8;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Supply & Demand Table — horizontal scroll + sticky identity columns
   -------------------------------------------------------------------------- */
.sd-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.sd-table {
  min-width: 600px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.sd-table th,
.sd-table td {
  white-space: nowrap;
  padding: 8px 12px;
  font-size: 13px;
}

/* Sticky identity columns (always visible while scrolling data) */
.sd-table .sd-col-sticky {
  position: sticky;
  background: #0f1720;
  z-index: 2;
}
.sd-table thead .sd-col-sticky {
  background: #131c27;
  z-index: 3;
}
.sd-table tbody tr:nth-child(even) .sd-col-sticky {
  background: #182230;
}
.sd-table tbody tr:hover .sd-col-sticky {
  background: #1f2b3a;
}

/* Stack offsets — order: Source | Country | Commodity | Year */
.sd-table .sd-col-source    { left: 0;     min-width: 80px;  }
.sd-table .sd-col-country   { left: 80px;  min-width: 120px; box-shadow: 1px 0 0 rgba(255,255,255,0.05); }
.sd-table .sd-col-commodity { left: 200px; min-width: 110px; }
.sd-table .sd-col-year      { left: 310px; min-width: 70px;
  box-shadow: 2px 0 4px rgba(0,0,0,0.4); /* visual separator from scrolling area */
}

@media (max-width: 700px) {
  /* On small screens, only Country stays sticky to keep context */
  .sd-table .sd-col-source,
  .sd-table .sd-col-commodity,
  .sd-table .sd-col-year { position: static; box-shadow: none; }
  .sd-table .sd-col-country {
    left: 0;
    min-width: 100px;
    box-shadow: 2px 0 4px rgba(0,0,0,0.4);
  }
  .sd-table th, .sd-table td { padding: 6px 8px; font-size: 12px; }
}

/* --------------------------------------------------------------------------
   Exports / Imports Table — horizontal scroll + sticky Date column
   -------------------------------------------------------------------------- */
.exports-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.exports-table {
  min-width: 600px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.exports-table th,
.exports-table td {
  white-space: nowrap;
  padding: 8px 12px;
  font-size: 13px;
}

.exports-table .exports-col-date {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #0f1720;
  min-width: 90px;
  box-shadow: 2px 0 4px rgba(0,0,0,0.4);
}
.exports-table thead .exports-col-date {
  background: #131c27;
  z-index: 3;
}
.exports-table tbody tr:nth-child(even) .exports-col-date {
  background: #182230;
}
.exports-table tbody tr:hover .exports-col-date {
  background: #1f2b3a;
}

@media (max-width: 700px) {
  .exports-table th, .exports-table td { padding: 6px 8px; font-size: 12px; }
  .exports-table .exports-col-date { min-width: 75px; }
}

/* --------------------------------------------------------------------------
   Trituration Table — horizontal scroll + sticky first column
   -------------------------------------------------------------------------- */
.trituration-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.trituration-table {
  min-width: 600px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.trituration-table th,
.trituration-table td {
  white-space: nowrap;
  padding: 8px 12px;
  font-size: 13px;
}

.trituration-table .trituration-col-first {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #0f1720;
  min-width: 110px;
  box-shadow: 2px 0 4px rgba(0,0,0,0.4);
}
.trituration-table thead .trituration-col-first {
  background: #131c27;
  z-index: 3;
}
.trituration-table tbody tr:nth-child(even) .trituration-col-first {
  background: #182230;
}
.trituration-table tbody tr:hover .trituration-col-first {
  background: #1f2b3a;
}

@media (max-width: 700px) {
  .trituration-table th, .trituration-table td { padding: 6px 8px; font-size: 12px; }
  .trituration-table .trituration-col-first { min-width: 90px; }
}

/* --------------------------------------------------------------------------
   Uniform Button Grid (boutons de même largeur quand ils wrappent)
   -------------------------------------------------------------------------- */
.uniform-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

/* Quand un uniform-button-grid est imbriqué dans un .filter-group
   à l'intérieur d'une .filter-row (flex), forcer le filter-group
   à prendre toute la largeur disponible pour que la grille puisse
   créer plusieurs colonnes au lieu d'empiler verticalement. */
.filter-row > .filter-group:has(.uniform-button-grid) {
  flex: 1 1 100%;
  min-width: 0;
}

.uniform-button-grid > button {
  width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

@media (max-width: 480px) {
  .uniform-button-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Filter Section — Simple variant responsive
   Aligne menus déroulants et boutons à largeur uniforme quand ils wrappent
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .filter-section--simple {
    padding: 14px;
  }
  .filter-section--simple .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .filter-section--simple .filter-group {
    width: 100%;
  }
  .filter-section--simple .custom-select,
  .filter-section--simple .overheat-btn {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-content: center;
  }
  /* Masquer le label "Action" invisible du bouton overheat (économise de la place) */
  .filter-section--simple #overheat-btn-container .filter-label {
    display: none;
  }
}