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

  :root {
    --accent: #6366f1;
    --accent-dark: #4f46e5;
    --bg: #0a0a0f;
    --bg2: #13131a;
    --bg3: #1a1a2e;
    --border: #2a2a3e;
    --text: #e8e8f0;
    --muted: #888;
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
  }

  nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 40px;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .nav-logo { font-size: 1.2rem; font-weight: 700; color: #fff; text-decoration: none; }
  .nav-logo span { color: var(--accent); }
  .nav-links { display: flex; gap: 24px; align-items: center; }
  .nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
  .nav-links a:hover { color: #fff; }
  .btn-nav {
    padding: 8px 20px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
  }
  .btn-nav:hover { background: var(--accent-dark); color: white; }

  #sign-in-trigger {
    padding: 8px 20px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }
  #sign-in-trigger:hover { border-color: var(--accent); color: var(--accent); }

  #hero {
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
  }
  #hero::before {
    content: "";
    position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
    pointer-events: none;
  }
  .badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 100px;
    font-size: 0.8rem; color: #a5b4fc;
    margin-bottom: 24px;
  }
  #hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800; line-height: 1.15;
    color: #fff; max-width: 800px;
    margin-bottom: 20px;
  }
  #hero h1 span { color: var(--accent); }
  #hero p {
    font-size: 1.15rem; color: var(--muted);
    max-width: 520px; line-height: 1.7;
    margin-bottom: 40px;
  }
  .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
  .btn-primary {
    padding: 14px 32px;
    background: var(--accent);
    color: white; border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
  }
  .btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
  .btn-secondary {
    padding: 14px 32px;
    background: transparent;
    color: var(--text); border: 1px solid var(--border); border-radius: 10px;
    font-size: 1rem; font-weight: 500; cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s;
  }
  .btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
  .hero-stats {
    display: flex; gap: 40px; margin-top: 64px;
    flex-wrap: wrap; justify-content: center;
  }
  .stat { text-align: center; }
  .stat strong { display: block; font-size: 1.8rem; font-weight: 700; color: #fff; }
  .stat span { font-size: 0.85rem; color: var(--muted); }

  #how { padding: 100px 24px; text-align: center; }
  .section-label {
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--accent); margin-bottom: 12px;
  }
  .section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700; color: #fff; margin-bottom: 16px;
  }
  .section-sub { color: var(--muted); font-size: 1rem; max-width: 500px; margin: 0 auto 60px; }
  .steps {
    display: flex; gap: 24px;
    max-width: 900px; margin: 0 auto;
    flex-wrap: wrap; justify-content: center;
  }
  .step-card {
    flex: 1; min-width: 220px; max-width: 280px;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 16px; padding: 32px 24px; text-align: left;
  }
  .step-num {
    width: 36px; height: 36px;
    background: rgba(99,102,241,0.2); border: 1px solid var(--accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: var(--accent); margin-bottom: 16px;
  }
  .step-card h3 { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 8px; }
  .step-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
  .step-icon { font-size: 2rem; margin-bottom: 12px; }

  #pricing { padding: 100px 24px; text-align: center; background: var(--bg2); }
  .pricing-cards {
    display: flex; gap: 24px; max-width: 760px; margin: 0 auto;
    flex-wrap: wrap; justify-content: center;
  }
  .pricing-card {
    flex: 1; min-width: 280px; max-width: 340px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 20px; padding: 36px 28px; text-align: left; position: relative;
  }
  .pricing-card.popular { border-color: var(--accent); background: linear-gradient(135deg, #13131a, #1a1a2e); }
  .popular-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: white; font-size: 0.75rem; font-weight: 700;
    padding: 4px 14px; border-radius: 100px;
  }
  .plan-name { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
  .plan-price { font-size: 2.6rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
  .plan-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
  .plan-desc { font-size: 0.88rem; color: var(--muted); margin-bottom: 28px; }
  .plan-features { list-style: none; margin-bottom: 28px; }
  .plan-features li {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0; font-size: 0.9rem; color: #ccc;
    border-bottom: 1px solid var(--border);
  }
  .plan-features li:last-child { border-bottom: none; }
  .plan-features li::before { content: "✓"; color: #22c55e; font-weight: 700; flex-shrink: 0; }
  .plan-features li.no::before { content: "✗"; color: #ef4444; }
  .btn-plan { width: 100%; padding: 13px; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
  .btn-plan-free { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
  .btn-plan-free:hover { border-color: var(--accent); color: var(--accent); }
  .btn-plan-pro { background: var(--accent); color: white; }
  .btn-plan-pro:hover { background: var(--accent-dark); }

  #app { padding: 100px 24px; display: flex; flex-direction: column; align-items: center; }
  #drop-zone {
    width: 100%; max-width: 560px;
    border: 2px dashed var(--border); border-radius: 20px; padding: 56px 24px;
    text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s;
  }
  #drop-zone:hover, #drop-zone.drag-over { border-color: var(--accent); background: rgba(99,102,241,0.05); }
  #drop-zone .dz-icon { font-size: 3.5rem; margin-bottom: 16px; }
  #drop-zone h3 { font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 8px; }
  #drop-zone p { color: var(--muted); font-size: 0.9rem; }
  #drop-zone strong { color: var(--accent); }
  #file-input { display: none; }

  #btn-process {
    margin-top: 16px; padding: 15px 40px;
    background: var(--accent); color: white; border: none;
    border-radius: 12px; font-size: 1rem; font-weight: 600;
    cursor: pointer; width: 100%; max-width: 560px;
    transition: background 0.2s; display: none;
  }
  #btn-process:hover { background: var(--accent-dark); }
  #btn-process:disabled { background: #333; color: #666; cursor: not-allowed; }

  #progress { margin-top: 28px; width: 100%; max-width: 560px; display: none; }
  .prog-step {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0; color: #444; font-size: 0.9rem; transition: color 0.3s;
  }
  .prog-step.active { color: var(--accent); }
  .prog-step.done { color: #22c55e; }
  .prog-icon { font-size: 1.2rem; width: 24px; text-align: center; }
  @keyframes spin { to { transform: rotate(360deg); } }

  #result { width: 100%; max-width: 760px; margin-top: 40px; display: none; }
  .result-header {
    background: linear-gradient(135deg, var(--bg2), var(--bg3));
    border: 1px solid var(--border); border-radius: 20px;
    padding: 32px; margin-bottom: 16px;
  }
  .result-header h2 { font-size: 1.5rem; color: #fff; margin-bottom: 6px; }
  .result-meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }
  .result-resume { color: #ccc; line-height: 1.8; font-size: 0.95rem; }
  .result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
  @media (max-width: 600px) { .result-grid { grid-template-columns: 1fr; } }
  .result-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
  .result-card-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 14px; }
  .result-list { list-style: none; }
  .result-list li { padding: 8px 0; border-bottom: 1px solid var(--border); color: #ddd; font-size: 0.9rem; line-height: 1.5; }
  .result-list li:last-child { border-bottom: none; }
  .result-list li::before { content: "→ "; color: var(--accent); }
  .action-row { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
  .action-row:last-child { margin-bottom: 0; }
  .action-quoi { color: #fff; font-weight: 500; font-size: 0.9rem; }
  .action-meta { color: #666; font-size: 0.8rem; margin-top: 4px; }
  .export-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
  .btn-export { padding: 10px 18px; border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
  .btn-export:hover { border-color: var(--accent); color: var(--accent); }
  #btn-reset { margin-top: 20px; padding: 12px 28px; background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 10px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; display: none; }
  #btn-reset:hover { border-color: var(--accent); color: var(--accent); }

  /* Modal auth */
  #auth-overlay {
    display: none; position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
  }
  #auth-overlay.visible { display: flex; }
  #auth-modal {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 20px; padding: 40px; text-align: center; max-width: 400px; width: 90%;
  }
  #auth-modal h3 { color: #fff; font-size: 1.3rem; margin-bottom: 10px; }
  #auth-modal p { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
  #clerk-sign-in-container { min-height: 100px; }

  /* Pages légales */
  .legal-page {
    max-width: 760px; margin: 100px auto 60px; padding: 0 24px;
    color: var(--text); line-height: 1.7;
  }
  .legal-page h1 { font-size: 2rem; color: #fff; margin-bottom: 32px; }
  .legal-page h2 { font-size: 1.2rem; margin-top: 32px; color: var(--accent); }
  .legal-page p { color: #ccc; margin-top: 10px; }
  .back-link { display: inline-block; margin-bottom: 32px; color: var(--accent); text-decoration: none; font-size: 0.9rem; }
  .back-link:hover { text-decoration: underline; }

  footer { padding: 40px 24px; text-align: center; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
  footer a { color: var(--muted); text-decoration: none; }
  footer a:hover { color: #fff; }
