/* Ex-bloc <style> de training.html (lot 21, CSP sans 'unsafe-inline'). */
:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface2: #1f1f23;
  --border: #2a2a2f;
  --accent: #f59e0b;
  --accent2: #d97706;
  --text: #f4f4f5;
  --text-muted: #52525b;
  --text-secondary: #a1a1aa;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  --orange: #f97316;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
#cyber-nodes { position: fixed; inset: 0; pointer-events: none; z-index: -1; width: 100vw; height: 100vh; }

/* Navbar — harmonisée avec index.html */
.navbar { background: rgba(9,9,11,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.navbar .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.navbar-logo { display: inline-flex; align-items: center; font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; font-family: 'Bebas Neue', sans-serif; letter-spacing: .06em; }
.navbar-logo span { color: var(--accent); }
.navbar-logo .logo-radar { color: var(--accent); flex-shrink: 0; margin-right: 8px; }
.navbar-links { display: flex; gap: 24px; }
.navbar-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s; }
.navbar-links a:hover { color: var(--text); }
.navbar-links a.btn-nav { background: var(--accent); color: #fff; padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; }
.navbar-links a.btn-nav:hover { opacity: .88; }

/* Hero */
.hero { text-align: center; padding: 48px 24px 32px; }
.hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-secondary); font-size: 1rem; max-width: 560px; margin: 0 auto 24px; line-height: 1.6; }
.badge-free { display: inline-block; background: rgba(245,158,11,.15); color: var(--accent); border: 1px solid rgba(245,158,11,.3); border-radius: 20px; padding: 4px 14px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }

/* Main layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; }

/* Identification form */
#id-form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; max-width: 480px; margin: 0 auto 32px; display: none; }
#id-form-wrap h2 { font-size: 1.1rem; margin-bottom: 8px; }
#id-form-wrap p { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.form-row input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text); font-size: 14px; }
.form-row input:focus { outline: none; border-color: var(--accent); }

/* Buttons */
.btn { padding: 10px 24px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .2s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { opacity: .85; }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Progress bar */
.progress-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; display: flex; align-items: center; gap: 16px; }
.progress-bar-bg { flex: 1; background: var(--border); border-radius: 4px; height: 6px; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s; }
.progress-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Scenario card */
.scenario-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.scenario-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.scenario-num { font-size: 12px; color: var(--text-muted); }
.scenario-title { font-size: 15px; font-weight: 700; flex: 1; }
.badge-diff { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.diff-easy { background: rgba(34,197,94,.15); color: var(--green); }
.diff-medium { background: rgba(245,158,11,.15); color: var(--yellow); }
.diff-hard { background: rgba(239,68,68,.15); color: var(--red); }

/* Simulated email */
.email-sim { margin: 16px 20px; background: var(--bg-card); border: 1px solid rgba(245,158,11,.2); border-top: 3px solid rgba(245,158,11,.3); border-radius: 8px; overflow: hidden; }
.email-sim::before { content: '📧 Email à analyser'; display: block; padding: 6px 16px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: rgba(245,158,11,.85); background: rgba(245,158,11,.05); border-bottom: 1px solid rgba(245,158,11,.1); text-transform: uppercase; }
.email-sim-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.email-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.email-meta span { color: var(--text-secondary); }
.email-subject { font-size: 14px; font-weight: 600; margin-top: 6px; }
.email-body { padding: 16px; font-size: 13px; color: var(--text-secondary); line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; }
.email-body.click-mode { white-space: normal; max-height: 340px; }

/* Click-hunt */
.ci { cursor: pointer; border-radius: 3px; padding: 1px 4px; margin: 0 1px; transition: background .15s, outline .15s; outline: 1px dashed rgba(245,158,11,.35); }
.ci:hover { background: rgba(245,158,11,.12); outline-color: rgba(245,158,11,.7); }
.ci.selected { background: rgba(245,158,11,.15); outline: 1px solid var(--accent); color: var(--text); }
.click-instruction { background: rgba(245,158,11,.05); border: 1px solid rgba(245,158,11,.2); border-radius: 8px; padding: 12px 16px; margin: 12px 20px; font-size: 13px; color: var(--text-secondary); }
.click-counter { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.click-counter.all-found { color: var(--green); }

/* Questions */
.questions-wrap { padding: 16px 20px 20px; }
.question-block { margin-bottom: 20px; }
.question-text { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.options-list { display: flex; flex-direction: column; gap: 6px; }
.option-btn { text-align: left; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.option-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.option-btn.selected { border-color: var(--accent); background: rgba(245,158,11,.08); color: var(--text); }
.option-btn.correct { border-color: var(--green); background: rgba(34,197,94,.1); color: var(--green); }
.option-btn.wrong { border-color: var(--red); background: rgba(239,68,68,.1); color: var(--red); text-decoration: line-through; }
.option-btn:disabled { cursor: default; }

/* Nav between scenarios */
.scenario-nav { padding: 0 20px 20px; display: flex; justify-content: flex-end; gap: 8px; }

/* Explanation box */
.explanation-box { margin: 0 20px 20px; padding: 14px; background: rgba(245,158,11,.05); border: 1px solid rgba(245,158,11,.2); border-radius: 8px; font-size: 12px; color: var(--text-secondary); line-height: 1.6; display: none; }
.explanation-box strong { color: var(--accent); }

/* Results screen */
#results-screen { display: none; }
.results-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 40px 32px; text-align: center; max-width: 860px; margin: 0 auto; }
.score-big { font-size: 4rem; font-weight: 800; line-height: 1; margin-bottom: 8px; }
.level-badge { display: inline-block; padding: 6px 20px; border-radius: 20px; font-size: 14px; font-weight: 700; margin-bottom: 20px; }
.level-expert { background: rgba(34,197,94,.15); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.level-confirme { background: rgba(245,158,11,.15); color: var(--accent); border: 1px solid rgba(245,158,11,.3); }
.level-inter { background: rgba(245,158,11,.15); color: var(--yellow); border: 1px solid rgba(245,158,11,.3); }
.level-debutant { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.results-breakdown { margin-top: 28px; text-align: left; }
.result-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 8px; margin-bottom: 6px; background: var(--surface2); font-size: 13px; }
.result-score { font-weight: 700; }
.upsell-box { margin-top: 32px; padding: 20px; background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); border-radius: 10px; }
.upsell-box h3 { font-size: 14px; color: var(--accent2); margin-bottom: 8px; }
.upsell-box p { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }

/* Free CTA (shown when no token) */
#free-cta { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; max-width: 540px; margin: 0 auto 32px; text-align: center; }
#free-cta h2 { font-size: 1.1rem; margin-bottom: 10px; }
#free-cta p { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.features-mini { list-style: none; text-align: left; margin-bottom: 20px; }
.features-mini li { font-size: 13px; color: var(--text-secondary); padding: 4px 0; }
.features-mini li::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* Loader */
#loader { text-align: center; padding: 60px 0; color: var(--text-secondary); font-size: 15px; }
#loader.error { color: var(--red); background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.2); border-radius: 10px; padding: 24px 32px; }

/* Lot 23 : la barre (sans menu burger sur cette page) débordait à ~570 px sur mobile. */
@media (max-width: 640px) {
  .navbar .nav-inner { height: auto; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; }
  .navbar-links { flex-wrap: wrap; gap: 8px 16px; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .results-card { padding: 28px 16px; }
  .score-big { font-size: 3rem; }
}

