/* ============================================================
   css-comparateur.css — broker-forex.fr
   CSS INDEPENDANT : toutes les regles sont scopees sous
   .bfx-comparateur pour ne pas interferer avec le CSS principal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ---- Variables -------------------------------------------- */
.bfx-comparateur {
  --bfx-bg:           #ffffff;
  --bfx-surface:      #ffffff;
  --bfx-surface2:     #f6f8fa;
  --bfx-border:       #d0d7de;
  --bfx-border-light: #e8ecf0;
  --bfx-text:         #1a1f2e;
  --bfx-text-muted:   #57606a;
  --bfx-text-dim:     #9ca3af;
  --bfx-accent:       #d4820a;
  --bfx-accent-dim:   rgba(212,130,10,.08);
  --bfx-green:        #1a7f37;
  --bfx-green-dim:    rgba(26,127,55,.08);
  --bfx-red:          #cf222e;
  --bfx-red-dim:      rgba(207,34,46,.07);
  --bfx-blue:         #0969da;
  --bfx-blue-dim:     rgba(9,105,218,.08);
  --bfx-gold:         #b08800;
  --bfx-radius:       10px;
  --bfx-radius-sm:    6px;
  --bfx-shadow:       0 1px 6px rgba(0,0,0,.08), 0 0 0 1px var(--bfx-border);
  --bfx-font:         'DM Sans', sans-serif;
  --bfx-mono:         'JetBrains Mono', monospace;
  --bfx-transition:   .18s ease;
  /* Couleur principale des boutons/accents - bleu marine moderne */
  --bfx-primary:      #1d4ed8;
  --bfx-primary-dim:  rgba(29,78,216,.09);
  --bfx-primary-dark: #1e40af;
}

/* ---- Reset scoped ----------------------------------------- */
.bfx-comparateur *,
.bfx-comparateur *::before,
.bfx-comparateur *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.bfx-comparateur {
  font-family: var(--bfx-font);
  color: var(--bfx-text);
  font-size: 16px;
  line-height: 1.5;
}

/* ---- Section ---------------------------------------------- */
.bfx-section {
  margin-bottom: 40px;
}

.bfx-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bfx-border-light);
}

.bfx-section-icon {
  width: 39px;
  height: 39px;
  background: var(--bfx-primary-dim);
  border: 1px solid rgba(29,78,216,.2);
  border-radius: var(--bfx-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.bfx-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--bfx-text);
  letter-spacing: -0.1px;
}

.bfx-section-subtitle {
  font-size: 15px;
  color: var(--bfx-text-muted);
  margin-top: 1px;
}

/* ---- Scroll wrapper (mobile) ------------------------------ */
.bfx-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--bfx-radius);
  border: 1px solid var(--bfx-border);
  background: #ffffff;
  box-shadow: var(--bfx-shadow);
}

.bfx-table-scroll::-webkit-scrollbar { height: 5px; }
.bfx-table-scroll::-webkit-scrollbar-track { background: var(--bfx-surface2); }
.bfx-table-scroll::-webkit-scrollbar-thumb { background: var(--bfx-border); border-radius: 10px; }
.bfx-table-scroll::-webkit-scrollbar-thumb:hover { background: var(--bfx-primary); }

/* ---- Table ------------------------------------------------ */
.bfx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: #ffffff;
}

.bfx-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.bfx-table thead tr {
  background: var(--bfx-surface2);
}

.bfx-table thead th {
  padding: 12px 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--bfx-text-muted);
  border-bottom: 2px solid var(--bfx-border);
  white-space: nowrap;
  background: var(--bfx-surface2);
}

.bfx-table thead th:first-child {
  border-radius: var(--bfx-radius) 0 0 0;
  min-width: 118px;
  width: 118px;
  position: sticky;
  left: 0;
  background: var(--bfx-surface2);
  z-index: 11;
  text-align: center;
}

/* ---- Suppression tri colonnes ----------------------------- */
/* (flèches retirées, pas de cursor pointer) */

.bfx-table tbody tr {
  border-bottom: 1px solid var(--bfx-border-light);
  transition: background var(--bfx-transition);
  background: #ffffff;
}

.bfx-table tbody tr:last-child { border-bottom: none; }

.bfx-table tbody tr:hover { background: #f9fafb; }

.bfx-table tbody td {
  padding: 12px 12px;
  vertical-align: middle;
  color: var(--bfx-text);
  background: inherit;
  text-align: center;
}

/* Sticky first col */
.bfx-table tbody td:first-child {
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 5;
  border-right: 1px solid var(--bfx-border-light);
  text-align: center;
}

.bfx-table tbody tr:hover td:first-child { background: #f9fafb; }

/* ---- Broker cell ------------------------------------------ */
.bfx-broker-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 106px;
}

.bfx-broker-logo {
  width: 100px;
  height: 33px;
  background: var(--bfx-surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--bfx-primary);
  flex-shrink: 0;
  text-transform: uppercase;
  overflow: hidden;
}

.bfx-broker-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bfx-broker-name {
  font-weight: 600;
  color: var(--bfx-blue);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--bfx-transition);
}

.bfx-broker-name:hover { color: var(--bfx-primary); }

/* --- Mobile : logo masqué, nom visible -------------------- */
@media (max-width: 768px) {
  .bfx-broker-logo { display: none; }
  .bfx-broker-name { display: inline; }
}

/* --- Desktop : logo visible, nom masqué ------------------- */
@media (min-width: 769px) {
  .bfx-broker-logo { display: flex; }
  .bfx-broker-name { display: none; }
}

/* ---- Score badge ------------------------------------------ */
.bfx-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--bfx-mono);
}

.bfx-score-stars { color: var(--bfx-gold); font-size: 10px; }

.bfx-score.excellent {
  background: rgba(26,127,55,.1);
  color: var(--bfx-green);
  border: 1px solid rgba(26,127,55,.25);
}

.bfx-score.good {
  background: rgba(212,130,10,.09);
  color: var(--bfx-accent);
  border: 1px solid rgba(212,130,10,.25);
}

.bfx-score.average {
  background: var(--bfx-blue-dim);
  color: var(--bfx-blue);
  border: 1px solid rgba(9,105,218,.2);
}

.bfx-score.fair {
  background: rgba(207,34,46,.07);
  color: var(--bfx-red);
  border: 1px solid rgba(207,34,46,.2);
}

/* ---- Prop firm specific: payout badges ------------------- */
.bfx-payout-high {
  display: inline-flex;
  align-items: center;
  background: rgba(26,127,55,.08);
  color: var(--bfx-green);
  border: 1px solid rgba(26,127,55,.2);
  border-radius: var(--bfx-radius-sm);
  padding: 2px 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--bfx-mono);
}

.bfx-payout-mid {
  display: inline-flex;
  align-items: center;
  background: rgba(212,130,10,.09);
  color: var(--bfx-accent);
  border: 1px solid rgba(212,130,10,.25);
  border-radius: var(--bfx-radius-sm);
  padding: 2px 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--bfx-mono);
}

/* ---- Boolean indicators ----------------------------------- */
.bfx-yes { color: var(--bfx-green); font-size: 15px; font-weight: 700; }
.bfx-no  { color: var(--bfx-text-dim); font-size: 15px; }

.bfx-yes-text {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(26,127,55,.08);
  color: var(--bfx-green);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
  border: 1px solid rgba(26,127,55,.18);
}

.bfx-no-text {
  display: inline-flex;
  align-items: center;
  color: var(--bfx-text-dim);
  font-size: 13px;
}

.bfx-no-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(207,34,46,.07);
  color: var(--bfx-red);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
  border: 1px solid rgba(207,34,46,.18);
}

.bfx-limited-text {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(212,130,10,.08);
  color: var(--bfx-accent);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
  border: 1px solid rgba(212,130,10,.22);
}

/* ---- Tags ------------------------------------------------- */
.bfx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 250px;
}

.bfx-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bfx-surface2);
  border: 1px solid var(--bfx-border);
  color: var(--bfx-text-muted);
  white-space: nowrap;
	margin: auto;
}

.bfx-tag.highlight {
  background: rgba(9,105,218,.07);
  border-color: rgba(9,105,218,.22);
  color: var(--bfx-blue);
}

/* Couleurs régulateurs selon niveau de confiance */
.bfx-tag.reg-green {
  background: rgba(26,127,55,.08);
  border-color: rgba(26,127,55,.3);
  color: var(--bfx-green);
  font-weight: 700;
}

.bfx-tag.reg-yellow {
  background: rgba(212,130,10,.09);
  border-color: rgba(212,130,10,.3);
  color: var(--bfx-accent);
  font-weight: 700;
}

.bfx-tag.reg-red {
  background: rgba(207,34,46,.07);
  border-color: rgba(207,34,46,.22);
  color: var(--bfx-red);
  font-weight: 700;
}

/* Bouton voir plus régulateurs */
.bfx-reg-more {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bfx-primary-dim);
  border: 1px solid rgba(29,78,216,.22);
  color: var(--bfx-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--bfx-transition);
  line-height: 1.4;
	margin: auto;
}

.bfx-reg-more:hover {
  background: rgba(29,78,216,.16);
}

.bfx-reg-hidden { display: none; }
.bfx-reg-hidden.open { display: inline-flex; }

/* ---- Number cells ----------------------------------------- */
.bfx-num {
  font-family: var(--bfx-mono);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--bfx-text);
}

.bfx-num .unit {
  font-size: 10px;
  color: var(--bfx-text-muted);
  font-weight: 400;
  margin-left: 2px;
}

.bfx-spread-low  { color: var(--bfx-green) !important; }
.bfx-spread-mid  { color: var(--bfx-accent) !important; }
.bfx-spread-high { color: var(--bfx-red) !important; }

/* ---- Best-pick badge - retiré ----------------------------- */
/* .bfx-best-badge supprimé */

/* ---- Footnote --------------------------------------------- */
.bfx-footnote {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bfx-surface2);
  border: 1px solid var(--bfx-border-light);
  border-radius: var(--bfx-radius-sm);
  font-size: 15px;
  color: var(--bfx-text-muted);
  line-height: 1.6;
}

.bfx-footnote strong { color: var(--bfx-text); }

/* ---- Tab navigation --------------------------------------- */
.bfx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 18px;
  border: 1px solid var(--bfx-border);
  border-radius: var(--bfx-radius-sm);
  overflow: hidden;
  background: var(--bfx-surface2);
}

.bfx-tab {
  flex: 1;
  min-width: 110px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--bfx-text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-right: 1px solid var(--bfx-border);
  transition: var(--bfx-transition);
  text-align: center;
  white-space: nowrap;
  font-family: var(--bfx-font);
}

.bfx-tab:last-child { border-right: none; }
.bfx-tab:hover { background: #fff; color: var(--bfx-primary); }

.bfx-tab.active {
  background: #fff;
  color: var(--bfx-primary);
  border-bottom: 2px solid var(--bfx-primary);
  font-weight: 700;
}

/* ---- Tab panels ------------------------------------------- */
.bfx-tab-panel { display: none; }
.bfx-tab-panel.active { display: block; }

/* ---- Cards (compactes) ------------------------------------ */
.bfx-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.bfx-card {
  background: linear-gradient(135deg, #eef4ff 0%, #f0f7ff 100%);
  border: 1px solid rgba(29,78,216,.18);
  border-radius: var(--bfx-radius);
  padding: 0;
  transition: var(--bfx-transition);
  position: relative;
  overflow: hidden;
  display: block;
  cursor: pointer;
}

/* Le lien principal couvre toute la carte */
.bfx-card > a.bfx-card-cta {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.bfx-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--bfx-primary), #60a5fa);
  opacity: 0;
  transition: opacity var(--bfx-transition);
}

.bfx-card:hover {
  border-color: var(--bfx-primary);
  box-shadow: 0 4px 16px rgba(29,78,216,.13);
}

.bfx-card:hover::before { opacity: 1; }

.bfx-card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--bfx-primary);
  font-weight: 700;
  margin-bottom: 5px;
}

.bfx-card-broker {
  font-size: 18px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 3px;
}

.bfx-card-detail {
  font-size: 13px;
  color: #3b5ca8;
  line-height: 1.4;
  flex: 1;
}

.bfx-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 12px;
margin-left: auto;
	margin-right: auto;
  padding: 5px 10px;
  background: var(--bfx-primary);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  border-radius: 5px;
  align-self: flex-start;
  transition: opacity var(--bfx-transition);
}

.bfx-card:hover .bfx-card-btn { opacity: .85; }

/* ---- Legend ----------------------------------------------- */
.bfx-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 9px 14px;
  background: var(--bfx-surface2);
  border: 1px solid var(--bfx-border-light);
  border-radius: var(--bfx-radius-sm);
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--bfx-text-muted);
}

.bfx-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Légende tableau - régulateurs & note ---------------- */
.bfx-table-legend {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bfx-surface2);
  border: 1px solid var(--bfx-border-light);
  border-radius: var(--bfx-radius-sm);
  font-size: 15px;
  color: var(--bfx-text-muted);
  line-height: 1.8;
}

.bfx-table-legend strong { color: var(--bfx-text); }

.bfx-table-legend .leg-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 12px;
}

/* ---- Tooltip - SUPPRIMÉ ----------------------------------- */
/* (le ? à coté de Note et Exécution STP a été retiré) */

/* ---- Scroll hint (mobile) --------------------------------- */
.bfx-scroll-hint {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--bfx-text-muted);
  margin-bottom: 7px;
}

@media (max-width: 768px) {
  .bfx-scroll-hint { display: flex; }
}

.bfx-scroll-hint-arrow {
  animation: bfxSlide 1.4s ease-in-out infinite;
}

@keyframes bfxSlide {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(5px); }
}

/* ---- Mobile ------------------------------------------- */
@media (max-width: 900px) {
  .bfx-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .bfx-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .bfx-tab {
    font-size: 11px;
    padding: 9px 8px;
  }

  .bfx-table { font-size: 13px; }

  .bfx-table thead th,
  .bfx-table tbody td {
    padding: 10px 8px;
  }

  .bfx-section-title { font-size: 19px; }
  .bfx-tags { max-width: 180px; }

  /* Sur mobile la colonne broker ne montre que le nom */
  .bfx-broker-cell { min-width: 70px; }
  .bfx-table thead th:first-child { min-width: 80px; width: 80px; }
}

@media (max-width: 540px) {
  .bfx-cards {
    grid-template-columns: 1fr 1fr;
  }

  .bfx-tabs {
    flex-direction: column;
  }

  .bfx-tab {
    border-right: none;
    border-bottom: 1px solid var(--bfx-border);
    text-align: left;
    padding: 9px 12px;
  }

  .bfx-tab:last-child { border-bottom: none; }
}

@media (max-width: 380px) {
  .bfx-cards { grid-template-columns: 1fr; }
}
