:root {
  --bg-body: #05060a;
  --bg-card: #080a10;
  --bg-section: #090c13;
  --bg-input: #05070d;
  --border-card: #151824;
  --border-input: #1a1e2d;
  --border-focus: #3b82f6;
  --text-primary: #f8fafc;
  --text-muted: #64748b;
  --text-placeholder: #2e3748;
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.35);
  --accent-cyan: #38bdf8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

code, pre, .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: #1e2230;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2d3348;
}

/* Header Brand */
.logo-eleck {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.4rem;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.logo-eleck span {
  color: #3b82f6;
}

/* Top Right Icon Buttons */
.btn-icon-top {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #090c14;
  border: 1px solid #1a1e2d;
  color: #8b9bb4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-icon-top:hover {
  background: #101524;
  color: #f8fafc;
  border-color: #2a334a;
}

/* Main Box Container */
.searcher-main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* Card Header: Recherche */
.searcher-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Sections */
.search-section {
  border-bottom: 1px solid var(--border-card);
  background: var(--bg-section);
  position: relative;
  transition: background 0.2s ease;
}

/* Liseré bleu latéral identique à la capture */
.search-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.search-section.active-border::before {
  background-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.section-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.section-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}

.section-title svg, .section-title .sec-icon {
  color: #3b82f6;
  width: 16px;
  height: 16px;
}

.section-chevron {
  color: #3b82f6;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.search-section.collapsed .section-chevron {
  transform: rotate(180deg);
}

.search-section.collapsed .section-body {
  display: none;
}

.section-body {
  padding: 8px 20px 20px 20px;
}

/* Labels et Inputs */
.field-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 7px;
}

.input-eleck {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 10px 14px;
  width: 100%;
  transition: all 0.2s ease;
}

.input-eleck:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #080b14;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.input-eleck::placeholder {
  color: var(--text-placeholder);
}

/* Card Footer */
.searcher-card-footer {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}

.btn-circle-help {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #1a1e2d;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-circle-help:hover {
  border-color: #3b82f6;
  color: #f1f5f9;
}

.btn-clear {
  background: #090c14;
  border: 1px solid #1a1e2d;
  color: #8b9bb4;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-clear:hover {
  background: #121726;
  color: #ffffff;
  border-color: #2b334a;
}

.btn-search {
  background: #2563eb;
  border: 1px solid #3b82f6;
  color: #ffffff;
  border-radius: 6px;
  padding: 8px 22px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}
.btn-search:hover {
  background: #1d4ed8;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}
.btn-search:active {
  transform: translateY(0);
}
.btn-search:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Results Panel */
.results-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Nav Tabs */
.nav-tabs-container {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 12px;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #080a11;
  border: 1px solid #161928;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab-btn:hover {
  background: #0d111d;
  color: #f1f5f9;
  border-color: #262c44;
}

.nav-tab-btn.active {
  background: #111728;
  color: #60a5fa;
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

/* Stat Cards */
.stat-card {
  background: #080a12;
  border: 1px solid #161a29;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Drag & Drop Zone */
.drop-zone {
  border: 2px dashed #20263c;
  background: #060810;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #3b82f6;
  background: #0a0e1c;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

/* Progress bar */
.progress-container {
  background: #05070f;
  border: 1px solid #1a1f33;
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
  width: 100%;
}

.progress-fill {
  background: linear-gradient(90deg, #3b82f6, #38bdf8);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

/* Console Log Box */
.log-box {
  background: #04050a;
  border: 1px solid #131724;
  border-radius: 8px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.75rem;
  max-height: 160px;
  overflow-y: auto;
}

/* Stepper Cards */
.step-card {
  background: #060810;
  border: 1px solid #161a28;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  transition: all 0.2s ease;
}
.step-card.active {
  background: #0c1222;
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}
.step-card.completed {
  background: #061510;
  border-color: #10b981;
  color: #34d399;
}
.step-card .step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  background: #111728;
  border: 1px solid #1f283e;
}
.step-card.active .step-num {
  background: #2563eb;
  color: white;
  border-color: #3b82f6;
}
.step-card.completed .step-num {
  background: #059669;
  color: white;
  border-color: #10b981;
}

/* Telemetry Metrics Pills */
.telemetry-pill {
  background: #070913;
  border: 1px solid #151928;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Animations ultra-fluides d'apparition */
@keyframes resultsFadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardCascadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-results-in {
  animation: resultsFadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Result Cards - Interface Haute Définition */
.result-card {
  background: #080b13;
  border: 1px solid #161d2d;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  animation: cardCascadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.result-card:hover {
  border-color: #24324f;
  background: #090e1a;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

.btn-copy-card {
  background: #0d121f;
  border: 1px solid #232d44;
  color: #94a3b8;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
  user-select: none;
}
.btn-copy-card:hover {
  background: #151e33;
  color: #ffffff;
  border-color: #3b82f6;
}
.btn-copy-card.copied {
  background: #062416;
  color: #34d399;
  border-color: #10b981;
}

.badge-brut {
  background: #0b0f19;
  border: 1px solid #1e2638;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

.badge-resultats {
  background: #071510;
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

.badge-timing {
  background: #0b0f19;
  border: 1px solid #1e2638;
  color: #64748b;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

.select-sort {
  background: #090d16;
  border: 1px solid #1e2638;
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}
.select-sort:focus {
  border-color: #3b82f6;
}

/* Pagination */
.pagination-btn {
  background: #090d16;
  border: 1px solid #1e2638;
  color: #94a3b8;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 36px;
  text-align: center;
}
.pagination-btn:hover:not(:disabled) {
  background: #101828;
  border-color: #3b82f6;
  color: #ffffff;
}
.pagination-btn.active {
  background: #1d3a6e;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}
.pagination-btn.disabled,
.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Modal Détail Fiche - Animation & Design */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-backdrop-animate {
  animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-content-animate {
  animation: modalScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-card {
  cursor: pointer;
}
.result-card:hover {
  border-color: #2b3e66;
  background: #090f1e;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

/* Fiches Unifiées / Consolidation Multi-Bases */
.result-card.consolidated-card {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, #0d1222 0%, #070913 100%);
  position: relative;
}
.result-card.consolidated-card:hover {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75), 0 0 20px rgba(245, 158, 11, 0.15);
}

.badge-unified-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.badge-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #0b1120;
  border: 1px solid #1e293b;
  color: #93c5fd;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: ui-monospace, monospace;
}

.badge-consolidated {
  background: #171207;
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

/* Switcher Mode Fiches Unifiées vs Fiches Brutes */
.view-mode-toggle {
  background: #070a14;
  border: 1px solid #161c2d;
  border-radius: 8px;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.view-toggle-btn.active {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.view-toggle-btn.active-consolidated {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef3c7;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}




