/* ===========================================================
   data_theme.css — Styles page Data Raw Materials
   Layout, header, bouton backup, boutons action.
   Charge après style.css + tabulator_theme.css.
   NE redeclare PAS :root (palette dans style.css).
   =========================================================== */

/* --- Layout page Data --- */
.data-page,
.data-view {
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 100%;
  overflow: hidden;
}

/* T_DRM_010+012 — section vue-globale doit propager la hauteur jusqu'a Tabulator */
.data-sections {
  height: 100%;
  overflow: hidden;
}
.data-section {
  height: 100%;
  overflow: hidden;
}
.data-section[hidden] { display: none; }

/* --- Header Data : titre + sous-titre + bouton Backup --- */
.data-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--color-bg-panel);
  border-bottom: 1px solid var(--color-border);
}

.data-header__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.data-header__subtitle {
  color: var(--color-text-secondary);
  font-size: 12px;
}

.data-header__spacer {
  flex: 1;
}

/* --- Bouton Backup prioritaire (CTA vert) --- */
.btn-backup {
  background: var(--color-success);
  color: #0a1a0e;
  border: none;
  border-radius: var(--radius);
  padding: 8px 18px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-backup:hover {
  filter: brightness(1.1);
}

.btn-backup__icon {
  font-size: 16px;
}

/* --- Meta backup (timestamp, statut) --- */
.backup-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
}

.backup-meta__ok {
  color: var(--color-success);
}

/* --- Variantes boutons action (absent de style.css) --- */
.btn--primary {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn--ghost {
  background: transparent;
}

/* --- Sous-nav Data (6 onglets) --- */
.data-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  background: var(--color-bg-base);
  border-bottom: 1px solid var(--color-border);
}

.subtab-btn {
  background: transparent;
  color: var(--color-text-secondary);
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

.subtab-btn:hover {
  color: var(--color-text-primary);
}

.subtab-btn--active {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-accent);
}

.subtab-counter {
  display: inline-block;
  background: var(--color-bg-panel-alt);
  color: var(--color-text-muted);
  font-size: 10px;
  border-radius: 8px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* ===========================================================
   T_DRM_008.3 — Layout contenu, sidebar, grille raw materials,
   tags, pills, dots, cellules, icon-btn.
   Source : temp/spike/data_raw_materials_spike.html
   NE redeclare PAS :root.
   =========================================================== */

/* --- Layout contenu principal --- */
.data-main {
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
  height: 100%;
}

/* Variante sans sidebar (T_DAV_008 Research Data) : 1 seule colonne pleine
   largeur. Sinon le contenu se loge dans la colonne 240px et la grille est
   compressee a gauche. */
.data-main--full {
  grid-template-columns: 1fr;
}

/* --- Sidebar filtres --- */
.filters-panel {
  background: var(--color-bg-panel);
  border-right: 1px solid var(--color-border);
  padding: 16px;
  overflow-y: auto;
}

.filters-panel h3 {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  margin-top: 14px;
}

.filters-panel h3:first-child { margin-top: 0; }

.filter-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; cursor: pointer; }
.filter-row:hover { color: var(--color-accent-hover); }
.filter-row input[type="checkbox"] { accent-color: var(--color-accent); }
.filter-count { margin-left: auto; color: var(--color-text-muted); font-size: 11px; }

.toggle-research {
  margin-top: 16px;
  padding: 10px;
  background: var(--color-bg-panel-alt);
  border-radius: var(--radius);
  border: 1px solid var(--color-border-accent);
}

.toggle-research__label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle-research__title { font-weight: 600; color: var(--color-research); }
.toggle-research__hint { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

/* --- Panneau contenu --- */
.content-panel {
  overflow: auto;
  padding: 16px 20px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.section-header__spacer { flex: 1; }

.btn-add-favorite {
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.btn-add-favorite:hover { background: var(--color-accent-hover); }

/* --- Toggle vue tableau / timeline --- */
.view-toggle {
  display: inline-flex;
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-toggle__btn {
  background: transparent;
  color: var(--color-text-secondary);
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.view-toggle__btn:hover { color: var(--color-text-primary); }

.view-toggle__btn--active {
  background: var(--color-accent);
  color: white;
}

/* --- Grille raw materials (table-like) --- */
.materials-grid {
  width: 100%;
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-collapse: collapse;
  font-size: 12px;
}

.materials-grid thead th {
  background: var(--color-bg-panel-alt);
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.materials-grid tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 12px;
}

.materials-grid tbody tr:hover { background: var(--color-bg-panel-alt); }
.materials-grid tbody tr.row-research { background: rgba(165, 105, 189, 0.05); }
.materials-grid tbody tr.row-research:hover { background: rgba(165, 105, 189, 0.10); }

/* --- Tags type instrument / source --- */
.tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
}

.tag--fut  { background: rgba(59, 110, 245, 0.18); color: var(--color-accent); }
.tag--cash { background: rgba(245, 166, 35, 0.18); color: var(--color-warning); }
.tag--stk  { background: rgba(41, 217, 122, 0.18); color: var(--color-success); }
.tag--ind  { background: rgba(168, 168, 168, 0.18); color: var(--color-text-secondary); }
.tag--live { background: rgba(41, 217, 122, 0.15); color: var(--color-success); }
.tag--sample { background: rgba(165, 105, 189, 0.18); color: var(--color-research); }

/* --- Pills timeframe (source = natif DB, agg = compute-at-read) --- */
.tf-pills { display: inline-flex; gap: 2px; flex-wrap: nowrap; }

.tf-pill {
  background: var(--color-bg-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 0 4px;
  font-size: 9px;
  line-height: 14px;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.tf-pill--source { background: var(--color-accent); color: white; border-color: var(--color-accent); }

.tf-pill--agg {
  background: transparent;
  color: var(--color-accent);
  border: 1px dashed var(--color-accent);
}

.tf-pill--agg::before {
  content: "f";
  font-style: italic;
  font-size: 8px;
  vertical-align: super;
  margin-right: 1px;
  opacity: 0.7;
}

/* --- Dots statut (certification, sync) --- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot--ok      { background: var(--color-success); box-shadow: 0 0 5px var(--color-success); }
.dot--warn    { background: var(--color-warning); }
.dot--err     { background: var(--color-danger); }
.dot--unknown { background: var(--color-text-muted); }
.dot--research { background: var(--color-research); }

/* --- Cellules spécialisées --- */
.cell-coverage {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cell-coverage__bar {
  height: 6px;
  background: var(--color-bg-panel-alt);
  border-radius: 3px;
  overflow: hidden;
}

.cell-coverage__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-success), var(--color-accent));
}

.cell-coverage__text { font-size: 10px; color: var(--color-text-muted); }

.cell-certif {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cell-sync {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--color-text-muted);
}

.cell-actions {
  display: inline-flex;
  gap: 4px;
}

/* --- Boutons icône (actions inline par row) --- */
.icon-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.icon-btn:hover { color: var(--color-accent); border-color: var(--color-accent); }
.icon-btn--danger:hover { color: var(--color-danger); border-color: var(--color-danger); }

/* --- T_TS_014 : feedback visuel actions Tabulator (spinner + badges) --- */
@keyframes timeline-v2-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.timeline-v2-action-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: timeline-v2-spin 0.6s linear infinite;
}
.timeline-v2-action-badge--ok  { color: #4ade80; font-size: 11px; }
.timeline-v2-action-badge--warn { color: var(--color-warn, #f59e0b); font-size: 9px; }
.timeline-v2-action-badge--err { color: var(--color-danger); font-size: 11px; }

/* ===========================================================
   T_DRM_008.4 — Panneau Backup (data_backup.js)
   Classes : .data-backup-*, .backup-spinner
   NE redeclare PAS :root.
   =========================================================== */

/* --- Spinner animation --- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.backup-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}

/* --- Panneau principal --- */
.data-backup-panel {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 800px;
}

/* --- Header panneau (titre + bouton) --- */
.data-backup-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* --- Titre panneau --- */
.data-backup-panel__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: none;
}

/* --- Zone actions header (bouton + spinner) --- */
.data-backup-panel__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* --- Message resultat (succes / erreur) --- */
.data-backup-result {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.data-backup-result--success {
  background: rgba(41, 217, 122, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(41, 217, 122, 0.3);
}

.data-backup-result--error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --- Section (cron + liste backups) --- */
.data-backup-panel__section {
  margin-top: 20px;
}

/* --- Titre section --- */
.data-backup-panel__section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

/* --- Bloc statut cron (pre) --- */
.data-backup-cron-status {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--color-bg-panel-alt);
  color: var(--color-text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* --- Table backups (stylisee comme .materials-grid) --- */
.data-backup-table {
  width: 100%;
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-collapse: collapse;
  font-size: 12px;
}

.data-backup-table thead th {
  background: var(--color-bg-panel-alt);
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.data-backup-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
}

.data-backup-table tbody tr:hover { background: var(--color-bg-panel-alt); }

/* --- Cellule nom de fichier (mono) --- */
.data-backup-table__filename {
  font-family: var(--font-mono);
}

/* --- Etat vide (aucun backup) --- */
.data-backup-empty {
  color: var(--color-text-muted);
  font-size: 13px;
  font-style: italic;
  padding: 8px 0;
}

/* --- Erreur chargement liste --- */
.data-backup-error {
  color: var(--color-danger);
  font-size: 13px;
  padding: 8px 0;
}

/* T_DRM_015 — Toggle Tableau/Timeline en-tete section vue-globale */
#data-section-vue-globale > .view-toggle {
  display: inline-flex;
  margin: 10px 16px 6px;
}

/* Vue Timeline recablee : padding coherent avec la vue Tableau */
#data-vue-timeline {
  padding: 6px 16px 16px;
}

#data-vue-timeline .timeline-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* ===========================================================
   T_DRM_016 — Wizard 9 etapes (data_wizard.js)
   Classes : .wz-overlay, .wz-dialog, .wz-*, etc.
   NE redeclare PAS :root.
   =========================================================== */

/* --- Overlay plein ecran --- */
.wz-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: wz-fadeIn 0.15s ease;
}

@keyframes wz-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Dialog central --- */
.wz-dialog {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) * 2);
  width: 520px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: wz-slideUp 0.18s ease;
}

@keyframes wz-slideUp {
  from { transform: translateY(12px); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* --- Header dialog (titre + bouton fermer) --- */
.wz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-border);
}

.wz-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.wz-close {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: var(--transition-fast);
}
.wz-close:hover { color: var(--color-text-primary); }

/* --- Barre de progression (dots 1-9) --- */
.wz-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--color-bg-panel-alt);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: nowrap;
}

.wz-progress__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  background: var(--color-bg-base);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: var(--transition-fast);
}

.wz-progress__dot--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.wz-progress__dot--done {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #0a1a0e;
}

/* --- Corps wizard (scrollable) --- */
.wz-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- Titre de l'etape --- */
.wz-step__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 4px;
}

/* --- Hint / description --- */
.wz-step__hint {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: 0;
}

.wz-step__hint--note {
  background: var(--color-bg-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-style: italic;
}

/* --- Zone erreur inline --- */
.wz-error {
  background: rgba(232, 76, 76, 0.12);
  border: 1px solid rgba(232, 76, 76, 0.4);
  border-radius: var(--radius);
  color: var(--color-danger);
  font-size: 12px;
  padding: 8px 12px;
}

/* --- Champ de saisie generique --- */
.wz-input {
  background: var(--color-bg-base);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius);
  color: var(--color-text-primary);
  font-size: 13px;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: var(--transition-fast);
}

.wz-input:focus {
  border-color: var(--color-accent);
}

.wz-input--date {
  font-family: var(--font-mono);
}

/* --- Zone recherche E1 --- */
.wz-search-wrap {
  position: relative;
}

.wz-search-results {
  margin-top: 6px;
}

.wz-search-loading,
.wz-search-empty,
.wz-search-error {
  display: block;
  font-size: 12px;
  padding: 8px 4px;
  color: var(--color-text-muted);
}

.wz-search-error { color: var(--color-danger); }

/* --- Liste de resultats --- */
.wz-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
  background: var(--color-bg-panel);
}

.wz-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition-fast);
}

.wz-result-item:last-child { border-bottom: none; }
.wz-result-item:hover,
.wz-result-item:focus     { background: var(--color-bg-panel-alt); outline: none; }

.wz-result-symbol {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-primary);
  min-width: 48px;
}

.wz-result-desc {
  flex: 1;
  font-size: 12px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-result-exch {
  font-size: 10px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* --- Instrument selectionne --- */
.wz-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 110, 245, 0.08);
  border: 1px solid rgba(59, 110, 245, 0.3);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 12px;
}

.wz-selected__label  { color: var(--color-text-muted); font-size: 11px; }
.wz-selected__symbol { color: var(--color-text-primary); font-size: 14px; }
.wz-selected__desc   { color: var(--color-text-secondary); }

/* --- Radio groupe E2 --- */
.wz-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wz-radio-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--color-bg-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.wz-radio-item:hover         { border-color: var(--color-border-accent); }
.wz-radio-item input:checked ~ .wz-radio-text .wz-radio-label {
  color: var(--color-accent);
}

.wz-radio-item input[type="radio"] { accent-color: var(--color-accent); margin-top: 2px; }

.wz-radio-text   { display: flex; flex-direction: column; gap: 3px; }
.wz-radio-label  { font-weight: 600; color: var(--color-text-primary); font-size: 13px; }
.wz-radio-desc   { font-size: 11px; color: var(--color-text-muted); line-height: 1.4; }

/* --- Champ labellise E3 --- */
.wz-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wz-field__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Checkbox groupe TF E3 --- */
.wz-checkbox-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wz-checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-bg-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}

.wz-checkbox-item:hover { border-color: var(--color-accent); color: var(--color-accent); }
.wz-checkbox-item input[type="checkbox"] { accent-color: var(--color-accent); }
.wz-checkbox-item input:checked ~ span { color: var(--color-accent); }

/* --- Recapitulatif E4 --- */
.wz-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.wz-summary__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}

.wz-summary__row:last-child { border-bottom: none; }

.wz-summary__row:nth-child(even) { background: var(--color-bg-panel-alt); }

.wz-summary__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 90px;
  flex-shrink: 0;
}

.wz-summary__value {
  font-size: 13px;
  color: var(--color-text-primary);
  flex: 1;
}

.wz-summary__missing {
  color: var(--color-text-muted);
  font-style: italic;
}

/* --- Pre-flight probe E5 (T_DRM_017) --- */
.wz-probe-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.wz-probe-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.wz-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: wz-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes wz-spin {
  to { transform: rotate(360deg); }
}

.wz-probe-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 13px;
}

.wz-probe-source {
  font-weight: 600;
  color: var(--color-text-primary);
  min-width: 110px;
  flex-shrink: 0;
}

.wz-probe-status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  min-width: 80px;
}

.wz-probe-detail {
  font-size: 11px;
  color: var(--color-text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-probe-cached {
  font-size: 11px;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0;
}

/* --- Lancer jobs E6 (T_DRM_017) --- */
.wz-launch-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.wz-jobs-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.wz-job-result {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
}

.wz-job-tf {
  min-width: 36px;
  flex-shrink: 0;
}

.wz-job-info {
  flex: 1;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-family: var(--font-mono);
}

.wz-job-info--err {
  color: var(--color-danger);
}

/* --- Footer navigation --- */
.wz-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-panel-alt);
}

.wz-btn-prev { min-width: 90px; }
.wz-btn-next { min-width: 140px; }

/* --- Certification E7-E8 (T_DRM_018) --- */
.wz-cert-status-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.wz-cert-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 13px;
}

.wz-cert-status-msg {
  flex: 1;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* --- Rapport E8 --- */
.wz-cert-report {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.wz-cert-report__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}

.wz-cert-report__row:last-child { border-bottom: none; }
.wz-cert-report__row:nth-child(even) { background: var(--color-bg-panel-alt); }

.wz-cert-report__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 110px;
  flex-shrink: 0;
}

.wz-cert-report__value {
  font-size: 13px;
  color: var(--color-text-primary);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wz-cert-issues__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 12px 0 6px;
}

.wz-cert-issues {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wz-cert-issue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-panel-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 12px;
}

.wz-cert-issue-type {
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  flex: 1;
}

.wz-cert-issue-count {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-text-primary);
  min-width: 30px;
  text-align: right;
}

/* --- Actions E9 --- */
.wz-e9-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ===========================================================
   T_TS_010 (V2-1) + T_TS_011 (V2-2) — Vue Tableau Timeline V2
   Namespace : .timeline-v2-*
   NE redeclare PAS :root.
   =========================================================== */

/* --- Conteneur principal --- */
.timeline-v2-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* --- Barre de filtres --- */
.timeline-v2-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--color-bg-panel);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.timeline-v2-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.timeline-v2-select,
.timeline-v2-input {
  background: var(--color-bg-base);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius);
  color: var(--color-text-primary);
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
  transition: var(--transition-fast);
}

.timeline-v2-select:focus,
.timeline-v2-input:focus {
  border-color: var(--color-accent);
}

/* --- Conteneur lignes (scrollable) --- */
.timeline-v2-rows {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

/* --- Table --- */
.timeline-v2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--color-bg-panel);
}

.timeline-v2-th {
  background: var(--color-bg-panel-alt);
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.timeline-v2-th--coverage { width: 50%; }
.timeline-v2-th--actions  { width: 80px; text-align: center; }

/* --- Lignes --- */
.timeline-v2-row:hover { background: var(--color-bg-panel-alt); }

.timeline-v2-cell {
  padding: 6px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.timeline-v2-cell--symbol {
  white-space: nowrap;
}

.timeline-v2-cell--actions {
  text-align: center;
}

/* --- Badges sec_type / exchange --- */
.timeline-v2-symbol-name {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-right: 6px;
}

.timeline-v2-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  background: var(--color-bg-panel-alt);
  color: var(--color-text-muted);
  margin-right: 3px;
}

.timeline-v2-badge--fut      { background: rgba(59, 110, 245, 0.18); color: var(--color-accent); }
.timeline-v2-badge--stk      { background: rgba(41, 217, 122, 0.18); color: var(--color-success); }
.timeline-v2-badge--cash     { background: rgba(245, 166, 35, 0.18);  color: var(--color-warning); }
.timeline-v2-badge--ind      { background: rgba(168, 168, 168, 0.18); color: var(--color-text-secondary); }
.timeline-v2-badge--exchange { background: rgba(165, 105, 189, 0.18); color: var(--color-research); }

/* --- Placeholder --- */
.timeline-v2-placeholder {
  color: var(--color-text-muted);
  font-size: 14px;
}

/* --- Vide filtres --- */
.timeline-v2-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 20px;
  font-style: italic;
}

/* ===========================================================
   T_TS_011 (V2-2) — Sparklines SVG annuelles
   Namespace : .timeline-v2-sparkline-*
   =========================================================== */

/* --- Cellule coverage cliquable --- */
.timeline-v2-sparkline-cell {
  cursor: pointer;
}

.timeline-v2-sparkline-cell:hover .timeline-v2-sparkline {
  filter: brightness(1.08);
}

/* --- SVG sparkline --- */
.timeline-v2-sparkline {
  display: block;
  max-width: 100%;
  height: 20px;
  border-radius: 2px;
  overflow: visible;
}

.timeline-v2-sparkline--empty {
  opacity: 0.5;
}

/* --- Bandes annuelles (elements <rect>) --- */
.timeline-v2-sparkline-band {
  transition: opacity 0.15s ease;
}

.timeline-v2-sparkline-cell:hover .timeline-v2-sparkline-band {
  opacity: 0.85;
}

/* --- Labels annees (elements <text>) --- */
.timeline-v2-sparkline-label {
  font-family: var(--font-mono);
  font-size: 8px;
  pointer-events: none;
  user-select: none;
}

/* ===========================================================
   T_TS_012bis (refactor) — Modale timeline rebrachee sur renderTimeline() V1
   Namespace propre modale : .timeline-v2-modal-*
   Classes rendu V1 (.timeline-segment-*, .timeline-row, .timeline-header*) :
     dans style.css — NE PAS redupliquer ici.
   NE recouvre PAS le namespace .timeline-v2-sparkline-* ci-dessus.
   =========================================================== */

/* --- Overlay fond semi-transparent --- */
.timeline-v2-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

/* --- Dialog --- */
.timeline-v2-modal-dialog {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 8px);
  max-width: 1400px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* --- Header --- */
.timeline-v2-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--color-bg-panel);
  z-index: 1;
}

.timeline-v2-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  font-family: var(--font-mono);
}

.timeline-v2-modal-close {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: var(--transition-fast);
}

.timeline-v2-modal-close:hover {
  background: var(--color-bg-panel-alt);
  color: var(--color-text-primary);
}

/* --- T_DDB_004 — Bouton DL chaine (header) + zone status --- */
.timeline-v2-modal-dlchain-btn {
  background: var(--color-accent);
  color: white;
  border: 1px solid var(--color-accent);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-right: 12px;
  font-family: var(--font-mono);
}

.timeline-v2-modal-dlchain-btn:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.timeline-v2-modal-dlchain-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.timeline-v2-modal-dlchain-status {
  padding: 6px 20px;
  font-size: 12px;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  min-height: 16px;
  border-bottom: 1px solid var(--color-border);
}

.timeline-v2-modal-dlchain-status:empty {
  display: none;
}

/* --- T_DDB_005 — Selecteur DL annee (header modale FUT) --- */
.timeline-v2-modal-dl-year-select {
  background: var(--color-bg-panel);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-right: 8px;
  font-family: var(--font-mono);
  height: 30px;
  min-width: 90px;
}

.timeline-v2-modal-dl-year-select:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}

.timeline-v2-modal-dl-year-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- HF-DDB-ACTIONS-HEADER-01 — Boutons actions secondaires (Certify, Rebuild) --- */
.timeline-v2-modal-action-btn {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-right: 8px;
  font-family: var(--font-mono);
}

.timeline-v2-modal-action-btn:hover:not(:disabled) {
  background: var(--color-bg-panel-alt);
  color: var(--color-text-primary);
  border-color: var(--color-accent);
}

.timeline-v2-modal-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- HF-DDB-CONFIRM-CUSTOM-01 — Modale custom de confirmation --- */
.timeline-v2-modal-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: tlFadeIn 0.12s ease-out;
}

@keyframes tlFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.timeline-v2-modal-confirm-dialog {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  min-width: 380px;
  max-width: 520px;
  padding: 20px 22px 16px;
  font-family: var(--font-mono);
}

.timeline-v2-modal-confirm-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.timeline-v2-modal-confirm-body {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.timeline-v2-modal-confirm-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0 0 10px 0;
}

.timeline-v2-modal-confirm-grid dt {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.timeline-v2-modal-confirm-grid dd {
  margin: 0;
  color: var(--color-text-primary);
}

.timeline-v2-modal-confirm-warn {
  margin: 8px 0 0 0;
  padding: 8px 10px;
  background: var(--color-bg-panel-alt);
  border-left: 3px solid var(--color-warning, #d97706);
  font-size: 11px;
  color: var(--color-text-secondary);
}

.timeline-v2-modal-confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.timeline-v2-modal-confirm-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-mono);
  border: 1px solid var(--color-border);
}

.timeline-v2-modal-confirm-btn--secondary {
  background: transparent;
  color: var(--color-text-secondary);
}

.timeline-v2-modal-confirm-btn--secondary:hover {
  background: var(--color-bg-panel-alt);
  color: var(--color-text-primary);
}

.timeline-v2-modal-confirm-btn--primary {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.timeline-v2-modal-confirm-btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* --- Corps — scroll horizontal pour timeline etendue (FUT longs) --- */
.timeline-v2-modal-body {
  padding: 8px 0 16px;
  flex: 1;
  overflow-x: auto;
}

/* ===========================================================
   T_TS_016 — Panel tracking jobs (polling 5s)
   Classes : .timeline-v2-jobs-*
   NE redeclare PAS :root.
   =========================================================== */

.timeline-v2-jobs-panel {
  /* HF-T_TS_016-01 : widget flottant sticky bottom-right (visible quand onglet Data actif) */
  /* HF-T_TS_016-06 : largeur adaptative clamp(720, 50vw, 1100) — responsive sur petits/grands écrans */
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  width: clamp(720px, 50vw, 1100px);
  max-width: calc(100vw - 32px);
  max-height: 65vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border, #2d2d2d);
  border-radius: 8px;
  background: var(--color-bg-panel, #161616);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* HF-T_TS_016-04 : barre de progression inline */
.timeline-v2-jobs-progress {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: #2d2d2d;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 6px;
  overflow: hidden;
}
.timeline-v2-jobs-progress-fill {
  height: 100%;
  background: #2980b9;
  transition: width 0.3s ease-out;
}
.timeline-v2-jobs-details {
  font-size: 11px;
  color: var(--color-text-muted, #888);
  font-family: ui-monospace, "SF Mono", monospace;
  line-height: 1.3;
}
.timeline-v2-jobs-error {
  color: #c0392b;
  font-size: 11px;
  font-style: italic;
}

.timeline-v2-jobs-content {
  overflow-y: auto;
  max-height: calc(60vh - 40px);
}

.timeline-v2-jobs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--color-bg-secondary, #1a1a1a);
}

.timeline-v2-jobs-toggle {
  background: none;
  border: none;
  color: var(--color-text, #e0e0e0);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-v2-jobs-toggle:hover {
  color: var(--color-accent, #3b82f6);
}

.timeline-v2-jobs-count {
  font-size: 11px;
  color: var(--color-text-muted, #888);
}

.timeline-v2-jobs-content {
  padding: 8px;
}

.timeline-v2-jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.timeline-v2-jobs-table th {
  text-align: left;
  padding: 4px 8px;
  color: var(--color-text-muted, #888);
  border-bottom: 1px solid var(--color-border, #2d2d2d);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-v2-jobs-table td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--color-border-subtle, #1e1e1e);
  color: var(--color-text, #e0e0e0);
  vertical-align: middle;
  white-space: nowrap;
}

/* HF-T_TS_016-05 : la colonne Detail seule peut wrapper (progress bar + texte long) */
.timeline-v2-jobs-table td:nth-child(6) {
  white-space: normal;
  min-width: 180px;
}

.timeline-v2-jobs-table tr:last-child td {
  border-bottom: none;
}

.timeline-v2-jobs-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.timeline-v2-jobs-empty {
  text-align: center;
  color: var(--color-text-muted, #888);
  font-size: 12px;
  padding: 12px 0;
  margin: 0;
}

/* ===========================================================
   T_DDB_006 — Warning inline status DL chaine / DL annee
   Classe appliquee dynamiquement par JS sur dlChainStatusEl
   quand la plage depasse 30j (heuristique IB coverage).
   =========================================================== */

.timeline-v2-modal-dlchain-status--warn {
  color: var(--color-warning, #f5a623);
  font-size: 11px;
  padding: 4px 8px;
  border-left: 3px solid var(--color-warning, #f5a623);
  background: rgba(245, 166, 35, 0.08);
  border-radius: 0 var(--radius, 4px) var(--radius, 4px) 0;
}

/* ===========================================================
   T_DDB_007 — Bouton Annuler dans colonne Action du panel jobs
   Variante secondaire compacte — meme token que .timeline-v2-modal-action-btn
   =========================================================== */

.timeline-v2-jobs-cancel-btn {
  background: transparent;
  color: var(--color-text-secondary, #aaa);
  border: 1px solid var(--color-border, #2d2d2d);
  border-radius: var(--radius, 4px);
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.timeline-v2-jobs-cancel-btn:hover:not(:disabled) {
  background: var(--color-bg-panel-alt, #1e1e1e);
  color: var(--color-danger, #e74c3c);
  border-color: var(--color-danger, #e74c3c);
}

.timeline-v2-jobs-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.timeline-v2-jobs-cancel-msg {
  font-size: 11px;
  color: var(--color-text-muted, #888);
  font-style: italic;
}

/* ===========================================================
   T_DAV_002 — Sous-page Marche (data_marche.js)
   Bandeau inventory + selecteur cable + filtres + empty-state.
   Source : temp/spike/data_marche_spike.html. NE redeclare PAS :root.
   =========================================================== */

/* La section Marche doit propager la hauteur jusqu'a la grille Tabulator
   (cf. .data-section vue-globale pattern). */
#data-section-marche {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

/* --- Bandeau overview / inventory (4 cartes) --- */
.inventory-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 20px;
  background: var(--color-bg-base);
  border-bottom: 1px solid var(--color-border);
}

.inv-card {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-border-accent);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.inv-card:hover { border-color: var(--color-accent); }

.inv-card--active {
  border-left-color: var(--color-accent);
  background: rgba(59, 110, 245, 0.06);
}

.inv-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.inv-card__icon { font-size: 15px; }
.inv-card__name { font-weight: 600; font-size: 13px; }

.inv-card__big {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.1;
}

.inv-card__big-unit { font-size: 11px; color: var(--color-text-muted); }
.inv-card__meta { font-family: var(--font-mono); font-size: 10px; color: var(--color-text-muted); margin-top: 4px; }
.inv-card__meta strong { color: var(--color-text-secondary); font-weight: 600; }

/* --- Selecteur de cable --- */
/* --- Compteur de lignes --- */
.row-counter { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); }

/* --- Champ de filtre (label + input) --- */
.filter-field { margin-bottom: 4px; }
.filter-field label { display: block; font-size: 11px; color: var(--color-text-secondary); margin-bottom: 3px; }

/* --- Separateur sidebar + bloc filtre obligatoire (greeks) --- */
.filters-divider { border: none; border-top: 1px solid var(--color-border); margin: 14px 0; }

.filters-required {
  margin-bottom: 6px;
  padding: 10px;
  background: rgba(245, 166, 35, 0.07);
  border: 1px solid rgba(245, 166, 35, 0.30);
  border-radius: var(--radius);
}

.filters-required__title {
  font-weight: 600;
  color: var(--color-warning);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.filters-required__hint { font-size: 10px; color: var(--color-text-muted); margin-top: 6px; line-height: 1.4; }

/* --- Bouton Appliquer sidebar Marche : pleine largeur (base .btn + .btn--primary
   herites de style.css / data_theme.css L89). Seul l'agencement est ajoute ici. --- */
.filters-panel .btn--primary { width: 100%; margin-top: 8px; }

/* --- Tags Marche supplementaires (importance / option type) --- */
.tag--high   { background: rgba(232, 76, 76, 0.18);  color: var(--color-danger); }
.tag--medium { background: rgba(245, 166, 35, 0.18); color: var(--color-warning); }
.tag--low    { background: rgba(136, 146, 168, 0.18); color: var(--color-text-secondary); }
.tag--call   { background: rgba(41, 217, 122, 0.18); color: var(--color-success); }
.tag--put    { background: rgba(232, 76, 76, 0.18);  color: var(--color-danger); }

/* --- Tags source Actualites (T_DAV_005) --- */
.tag--rss    { background: rgba(59, 110, 245, 0.18); color: var(--color-accent); }
.tag--sec    { background: rgba(165, 105, 189, 0.18); color: var(--color-research); }

/* --- Cellule numerique alignee a droite (colonnes num) --- */
.num { text-align: right; }

/* --- Bandeau d'alerte (info / drill-down greeks) --- */
.alert {
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 11px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.alert--info {
  background: rgba(59, 110, 245, 0.10);
  border-left: 3px solid var(--color-accent);
  color: #b8c8f0;
}

.alert code,
.empty-state code {
  background: var(--color-bg-panel-alt);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  color: var(--color-accent);
}

/* --- Empty state (drill-down greeks sans symbole) --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 60px 20px;
  background: var(--color-bg-panel);
  border: 1px dashed var(--color-border-accent);
  border-radius: var(--radius);
  color: var(--color-text-secondary);
}

.empty-state__icon { font-size: 32px; opacity: 0.5; }
.empty-state__title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
.empty-state__hint { font-size: 12px; color: var(--color-text-muted); max-width: 380px; }

/* =========================================================
   Sous-page Options (DATA-MARCHE-OPTIONS T_DMO_002)
   Layout 3 colonnes fidelite spike : sidebar | matrice | drill droite
   ========================================================= */

.opt-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 820px;
  gap: 0;
  height: calc(100vh - 200px);
  min-height: 480px;
  overflow: hidden;
}
.opt-main > .content-panel { overflow: auto; }

/* Compteur de groupe (Actives / Expirees) dans les group headers Tabulator */
.opt-group-count {
  display: inline-block;
  background: var(--color-bg-panel-alt, #1a1d27);
  color: var(--color-text-secondary);
  font-size: 10px;
  border-radius: 8px;
  padding: 0 6px;
  margin-left: 6px;
  font-family: var(--font-mono);
}

/* Tags Source colores */
.tag--src-databento { background: rgba(59, 110, 245, 0.16); color: var(--color-accent, #3b6ef5); }
.tag--src-ib        { background: rgba(245, 166, 35, 0.16); color: var(--color-warning, #f5a623); }
.tag--src-hist      { background: rgba(120, 128, 150, 0.16); color: var(--color-text-secondary, #8892a8); }

/* Pastilles Status (deduites) */
.cell-fresh { color: var(--color-success, #29d97a); }
.cell-stale { color: var(--color-warning, #f5a623); }
.cell-old   { color: var(--color-text-muted, #4e5670); }

/* Panel drill (colonne droite) */
.opt-drill-aside {
  background: var(--color-bg-panel, #141720);
  border-left: 1px solid var(--color-border);
  padding: 14px 16px;
  overflow-y: auto;
}
.opt-drill-header { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.opt-drill-header h3 { font-size: 13px; font-weight: 600; margin: 0; }
.opt-drill-empty { text-align: center; padding: 48px 16px; color: var(--color-text-muted); }
.opt-drill-empty__icon { font-size: 26px; opacity: 0.4; }
.opt-drill-empty__title { font-size: 13px; margin-top: 8px; color: var(--color-text-secondary); }
.opt-drill-empty__hint { font-size: 11px; margin-top: 6px; max-width: 280px; margin-left: auto; margin-right: auto; }

/* Bloc meta drill */
.opt-meta { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); margin-bottom: 12px; line-height: 1.7; }
.opt-meta__row { display: flex; justify-content: space-between; gap: 8px; }
.opt-meta__row strong { color: var(--color-text-primary); text-align: right; }
.opt-meta__src { color: var(--color-accent, #3b6ef5); }

/* Ligne ATM surlignee dans la grille strikes */
.opt-atm-row { background: rgba(59, 110, 245, 0.16) !important; }
.opt-atm-row .tabulator-cell { font-weight: 600; }

/* Note open_interest + actions drill */
.opt-oi-note { font-size: 10px; color: var(--color-text-muted); margin: 10px 0; font-family: var(--font-mono); }
.opt-drill-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Modale timeline IV (overlay plein ecran) */
.opt-iv-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opt-iv-modal[hidden] { display: none; }
.opt-iv-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.opt-iv-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(880px, 92vw);
  background: var(--color-bg-elevated, #161b22);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.opt-iv-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}
.opt-iv-modal__header h3 { margin: 0; font-size: 14px; }
.opt-iv-modal__close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.opt-iv-modal__close:hover { color: var(--color-text); }
.opt-iv-modal__body { padding: 16px; }
.opt-iv-chart { width: 100%; height: 360px; }

/* =========================================================
   OPTIONS-DL-UI (T_ODLUI_004 / T_ODLUI_005)
   Bloc telechargement sidebar + popup config DL + matrice
   enrichie (Etat/Fraicheur/Cert%/Trous) + drill couverture/trous.
   Blueprint : temp/spike/options_dl_ui_spike.html.
   ========================================================= */

/* --- Sidebar : bloc Telechargement --- */
.opt-dl-section .btn--primary { width: 100%; margin-top: 8px; }
.dl-hint {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 6px;
  font-family: var(--font-mono);
}

/* --- Popup config DL (dialog large) --- */
.timeline-v2-modal-confirm-dialog--wide { min-width: 560px; max-width: 600px; }
.dlcfg-section { margin-bottom: 16px; }
.dlcfg-section > h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.dlcfg-db {
  background: var(--color-bg-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.dlcfg-db__line { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-size: 12px; }
.dlcfg-db__k { color: var(--color-text-muted); }
.dlcfg-db__v { color: var(--color-text-primary); }
.dlcfg-exp-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 11px; }
.dlcfg-exp-table th, .dlcfg-exp-table td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--color-border); }
.dlcfg-exp-table th { color: var(--color-text-muted); font-weight: 600; }
.dlcfg-exp-table td { color: var(--color-text-secondary); }
.dlcfg-exp-table { display: block; max-height: 160px; overflow-y: auto; }
.dlcfg-radio { display: flex; flex-direction: column; gap: 6px; }
.dlcfg-radio label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--color-text-secondary); font-size: 12px; }
.dlcfg-radio input[type="radio"] { accent-color: var(--color-accent); }
.dlcfg-radio label.is-active { color: var(--color-text-primary); }
.dlcfg-inline { display: flex; gap: 12px; margin-top: 8px; }
.dlcfg-inline .filter-field { flex: 1; margin: 0; }
.dlcfg-inline label { display: block; font-size: 11px; color: var(--color-text-secondary); margin-bottom: 3px; }
.dlcfg-inline input[type="date"] {
  width: 100%;
  background: var(--color-bg-panel-alt);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.dlcfg-est {
  margin-top: 4px;
  padding: 8px 10px;
  background: rgba(59, 110, 245, 0.10);
  border-left: 3px solid var(--color-accent);
  font-size: 11px;
  color: var(--color-text-secondary);
}
.dlcfg-disabled { opacity: 0.45; pointer-events: none; }

/* --- Badges matrice : Etat / Cert% / Fraicheur / Trous --- */
.badge { display: inline-block; padding: 1px 7px; border-radius: 8px; font-size: 10px; font-weight: 600; }
.badge--live { background: rgba(41, 217, 122, 0.18); color: var(--color-success); }
.badge--dead { background: rgba(136, 146, 168, 0.18); color: var(--color-text-secondary); }
.cert-ok { color: var(--color-success); }
.cert-warn { color: var(--color-warning); }
.fresh-ok { color: var(--color-success); }
.fresh-stale { color: var(--color-warning); }
.gap-none { color: var(--color-text-muted); }
.gap-some { color: var(--color-danger); font-weight: 700; cursor: pointer; }

/* --- Drill : couverture & trous --- */
.drill-block {
  background: var(--color-bg-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.drill-block h5 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.drill-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 2px 0; }
.drill-line span:first-child { color: var(--color-text-muted); }
.drill-gaps-list { font-family: var(--font-mono); font-size: 11px; color: var(--color-danger); margin: 6px 0; line-height: 1.7; max-height: 140px; overflow-y: auto; }
.drill-redl-btn { width: 100%; }
.drill-note { font-size: 10px; color: var(--color-text-muted); margin-top: 8px; }

/* ===========================================================
   DATA-SYMBOLS-CONTEXT (T_DSC_005) — Vue globale enrichie
   Carte d'identité symbols : catégorie, économie contrat, ML regime,
   ref. index, TF non dispo, tooltip description sombre.
   Source visuelle : temp/drafts/spike_data_vue_globale.html.
   NE redeclare PAS :root.
   =========================================================== */

/* --- Catégorie : swatch couleur (en-tête de groupe + sidebar) --- */
.cat-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
  margin-right: 8px;
  vertical-align: middle;
}

/* --- Compteur dans l'en-tête de groupe Tabulator (· N symbols) ---
   Specificite renforcee : Tabulator (tabulator.min.css) applique
   `.tabulator-group span { color:#d00 }` (rouge) au compteur natif ; on l'ecrase. */
.tabulator-group span.group-count {
  color: var(--color-text-muted);
  font-size: 11px;
  margin-left: 8px;
  font-weight: 400;
}

/* --- Colonnes économie : Point value / Granularité / Marge --- */
.econ-val { color: var(--color-text-primary); font-weight: 600; }
.econ-ccy { color: var(--color-text-muted); font-size: 10px; margin-left: 3px; }
.econ-na  { color: var(--color-text-muted); font-style: italic; }
.econ-loading { color: var(--color-text-muted); opacity: 0.6; }

/* --- Indicateur ML regime (variante A : icône ◆ dans la cellule Symbol) --- */
.ml-icon {
  display: inline-block;
  margin-left: 6px;
  color: var(--color-accent);
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 0 7px var(--color-accent);
  cursor: help;
  vertical-align: middle;
}

/* --- Badge ref. index (colonne dédiée + filtre sidebar) --- */
.ref-badge {
  display: inline-block;
  padding: 0 7px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--color-bg-panel-alt);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-accent);
  vertical-align: middle;
}

/* --- TF non disponible (plus fine que la source physique) : grisée. --- */
.tf-pill--na {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  opacity: 0.5;
}

/* --- Pills TF de taille uniforme -> alignement colonne par colonne entre lignes.
       inline-block (pas flex sur l'item) pour préserver l'exposant "f" des pills --agg. --- */
.tf-pills { gap: 2px; align-items: center; }
.tf-pills .tf-pill {
  min-width: 23px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
  padding: 0 3px;
  font-size: 9px;
}

/* --- Tooltip Tabulator forcé en thème sombre (description Symbol) --- */
.tabulator-tooltip {
  background: #05060a !important;
  color: var(--color-text-secondary) !important;
  border: 1px solid var(--color-border-accent) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  max-width: 300px !important;
  padding: 9px 11px !important;
  white-space: pre-wrap !important;
}
