/* Simulateur drawdown */
.dd-simulator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.dd-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dd-field { display: flex; flex-direction: column; gap: 6px; }
.dd-field label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.dd-result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.dd-result-item { display: flex; justify-content: space-between; align-items: center; }
.dd-result-label { font-size: 14px; color: var(--text-muted); }
.dd-result-val { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 700; color: var(--text); }

/* Prop firm disclaimer */
.propfirm-disclaimer {
  max-width: 760px;
  margin: 16px 0 0;
  padding: 12px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Prop firm grid */
.propfirm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.propfirm-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.propfirm-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.propfirm-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.propfirm-logo.apex     { background: rgba(50,200,255,0.1);  border-color: rgba(50,200,255,0.3);  color: #32c8ff; }
.propfirm-logo.tradeify { background: rgba(61,217,196,0.1);  border-color: rgba(61,217,196,0.3);  color: #3dd9c4; }
.propfirm-logo.ts       { background: rgba(82,224,160,0.1);  border-color: rgba(82,224,160,0.3);  color: #52e0a0; }
.propfirm-logo.lucid    { background: rgba(106,180,255,0.1); border-color: rgba(106,180,255,0.3); color: #6ab4ff; }

.propfirm-header h3 { font-size: 20px; margin-bottom: 4px; }

.propfirm-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.propfirm-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.rule-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.rule-icon {
  flex-shrink: 0;
  font-size: 13px;
  width: 20px;
  text-align: center;
}
.rule-icon.ok { color: #52e07a; }
.rule-icon.warn { color: #e0a052; }
.rule-icon.bad { color: #e05252; }
.rule-icon.info { color: var(--accent-light); }

.propfirm-checklist h4 { font-size: 14px; margin-bottom: 12px; color: var(--text-muted); }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s;
  line-height: 1.5;
}

.check-item:hover { color: var(--text); }

.check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.check-item input:checked + span { color: var(--text); text-decoration: line-through; opacity: 0.6; }
.check-item input:checked ~ * { text-decoration: line-through; opacity: 0.6; }

/* Readiness grid */
.readiness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.readiness-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.readiness-card h4 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .dd-simulator { grid-template-columns: 1fr; }
  .dd-form { grid-template-columns: 1fr; }
  .propfirm-grid { grid-template-columns: 1fr; }
  .readiness-grid { grid-template-columns: 1fr; }
}

/* Avertissement affiché au visiteur non connecté : ses cases ne sont pas
   sauvegardées. Volontairement discret — c'est une précision, pas un mur. */
.readiness-note {
  max-width: 720px;
  margin: -8px 0 28px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}
.readiness-note a { color: var(--accent-light); }

/* ══════════════════════════════════════════════════════════════════
   COMPARATEUR — tableau, fiches par firme, fraîcheur des données
   Ces styles servent /propfirm.html et les pages /propfirms/<cle>/,
   toutes générées par scripts/build-propfirm.mjs.
════════════════════════════════════════════════════════════════════ */

/* Le tableau déborde forcément sur mobile : il défile dans son propre
   conteneur, sinon c'est la page entière qui part de côté. */
.compare-scroll {
  overflow-x: auto;
  margin-top: 36px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
  /* Les seuils et pourcentages doivent s'aligner d'une ligne à l'autre. */
  font-variant-numeric: tabular-nums;
}

.compare-table caption {
  caption-side: top;
  text-align: left;
  padding: 18px 22px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.compare-table th,
.compare-table td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.compare-table thead th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--bg-alt);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover { background: var(--accent-faint); }

.compare-table tbody th[scope="row"] {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.compare-table tbody th[scope="row"] a { color: var(--accent-light); text-decoration: none; }
.compare-table tbody th[scope="row"] a:hover { text-decoration: underline; }

.compare-date {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.compare-table td { color: var(--text-sub); line-height: 1.5; }

/* Date de relevé. C'est ce qui distingue une page tenue à jour d'une page
   morte, pour le lecteur comme pour Google — donc elle est visible, pas
   reléguée en petits caractères de bas de page. */
.propfirm-freshness {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.propfirm-freshness time { color: var(--text); font-weight: 600; }
.propfirm-freshness a { color: var(--accent-light); }

.propfirm-more {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  text-decoration: none;
}
.propfirm-more:hover { color: var(--text); }

/* Fil d'Ariane des fiches */
.fil-ariane {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 60px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.fil-ariane a { color: var(--text-sub); text-decoration: none; }
.fil-ariane a:hover { color: var(--accent-light); }
.fil-ariane span { margin: 0 4px; }

.firm-prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-sub);
}

.firm-rules-card { max-width: 760px; margin-top: 28px; }
.firm-rules-card .propfirm-rules { padding-bottom: 0; border-bottom: none; }
.firm-rules-card .rule-row { font-size: 15px; }

/* « Adaptée à » / « À éviter si » : la question que le lecteur se pose
   vraiment, et à laquelle aucun site de comparaison ne répond. */
.firm-fit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 760px;
  margin-top: 28px;
}
.firm-fit-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left-width: 3px;
}
.firm-fit-card h3 {
  font-size: 14px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.firm-fit-card p { font-size: 14px; line-height: 1.7; color: var(--text-sub); }
.firm-fit-yes { border-left-color: #52e07a; }
.firm-fit-yes h3 { color: #52e07a; }
.firm-fit-no  { border-left-color: #e0a052; }
.firm-fit-no  h3 { color: #e0a052; }

.firm-checklist { max-width: 720px; margin-top: 28px; }

.firm-faq {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 720px;
  margin-top: 32px;
}
.firm-faq-item { padding: 22px 0; border-bottom: 1px solid var(--border); }
.firm-faq-item:last-child { border-bottom: none; }
.firm-faq-item h3 { font-size: 16px; margin-bottom: 8px; color: var(--text); }
.firm-faq-item p  { font-size: 15px; line-height: 1.7; color: var(--text-sub); }

@media (max-width: 768px) {
  .fil-ariane { padding: 16px 20px 0; }
  .firm-fit { grid-template-columns: 1fr; }
  .compare-table caption { padding: 14px 16px 12px; }
  .compare-table th, .compare-table td { padding: 13px 14px; }
}
