  /* ============================================================
   * Cat's Eye SEO · Outil Rédaction (redaction.php)
   * Base visuelle identique aux autres outils (semantique.css).
   * ============================================================ */
  :root {
    --bs-primary: #4f46e5;
    --brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --brand-soft: #eef2ff;
    --ink: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
    --card-border: #e2e8f0;
    --green: #16a34a; --green-soft: #dcfce7;
    --yellow: #ca8a04; --yellow-soft: #fef3c7;
    --red: #dc2626; --red-soft: #fee2e2;
    --gray: #64748b; --gray-soft: #f1f5f9;
  }
  html { overflow-x: hidden; max-width: 100vw; }
  body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; max-width: 100vw; position: relative; }
  img, video, iframe, pre, table { max-width: 100%; }
  .container, .container-fluid { overflow-x: hidden; }
  code, .mono { font-family: 'JetBrains Mono', monospace; font-size: 0.875em; word-break: break-word; }

  .hero { background: var(--brand-grad); color: white; padding: 3.5rem 1rem 4.5rem; margin-bottom: 2rem; position: relative; overflow: hidden; border-radius: 14px; }
  .hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.1) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(255,255,255,.08) 0%, transparent 50%); pointer-events: none; }
  .hero-content { position: relative; max-width: 760px; margin: 0 auto; }
  .hero .eyebrow { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.75); margin-bottom: 0.6rem; }
  .hero h1 { font-weight: 800; letter-spacing: -0.04em; font-size: clamp(2rem, 5.5vw, 3.2rem); line-height: 1.02; margin-bottom: 0.8rem; }
  .hero .lead { color: rgba(255,255,255,0.88); font-size: 1.05rem; margin-bottom: 1.8rem; }
  .launcher-form { background: white; padding: 0.5rem; border-radius: 14px; box-shadow: 0 20px 60px -15px rgba(0,0,0,0.3); display: flex; gap: 0.4rem; }
  .launcher-form input { border: none !important; box-shadow: none !important; font-size: 1.05rem; padding: 0.85rem 1rem; color: var(--ink); flex: 1; }
  .launcher-form button { background: var(--ink); color: white; border: none; padding: 0.85rem 1.5rem; border-radius: 10px; font-weight: 600; white-space: nowrap; transition: all 0.15s; }
  .launcher-form button:hover { background: #1e293b; transform: translateY(-1px); }
  .launcher-form button:disabled { opacity: 0.6; cursor: wait; transform: none; }

  .group-heading { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
  .group-heading i { color: var(--bs-primary); }

  .panel { background: white; border: 1px solid var(--card-border); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; }
  .panel-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
  .panel-title i { color: var(--bs-primary); }
  .panel-sub { color: var(--muted); font-size: 0.85rem; font-weight: 400; }

  /* ---- Étapes du pipeline ---- */
  .rd-steps { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; }
  .rd-step { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; padding: 0.3rem 0.4rem; border-radius: 8px; }
  .rd-step-icon { width: 1.3rem; text-align: center; color: var(--muted); flex-shrink: 0; }
  .rd-step-label { font-weight: 500; }
  .rd-step-note { color: var(--muted); font-size: 0.8rem; margin-left: auto; text-align: right; }
  .rd-step.running { background: var(--brand-soft); }
  .rd-step.running .rd-step-icon { color: var(--bs-primary); }
  .rd-step.ok .rd-step-icon { color: var(--green); }
  .rd-step.warn .rd-step-icon { color: var(--yellow); }
  .rd-step.warn .rd-step-note { color: var(--yellow); }
  .rd-step.fail .rd-step-icon { color: var(--red); }
  .rd-step.fail .rd-step-note { color: var(--red); }
  #rd-progress { background: var(--brand-grad); transition: width 0.4s ease; }

  /* ---- Chips (entités, related searches) ---- */
  .rd-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.3rem 0; }
  .rd-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500; background: var(--gray-soft); color: var(--ink); border: 1px solid var(--card-border); text-decoration: none; }
  .rd-chip:hover { border-color: var(--bs-primary); color: var(--ink); }
  .rd-chip .rd-chip-count { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--muted); }
  .rd-chip.src-serp { background: var(--brand-soft); border-color: #c7d2fe; }
  .rd-chip.src-wiki { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.3); }
  .rd-chip.src-both { background: linear-gradient(90deg, var(--brand-soft), rgba(16,185,129,0.1)); border-color: var(--bs-primary); font-weight: 600; }
  .rd-chip.src-gap { background: #fff7ed; border-color: #fdba74; color: #9a3412; font-weight: 600; }
  .rd-chip.src-weak { background: var(--yellow-soft); border-color: rgba(202,138,4,0.35); color: #854d0e; }
  .rd-chip.src-recognized { background: #ecfeff; border-color: #67e8f9; color: #0e7490; font-weight: 600; }
  .rd-chip.src-recognized .bi-patch-check-fill { color: #0891b2; font-size: 0.8rem; }

  /* ---- Panneau gap ---- */
  .rd-gap-panel { border-color: #fdba74; background: linear-gradient(180deg, #fffbf5, #ffffff 30%); }
  .rd-gap-panel .panel-title i { color: #ea580c; }
  .rd-gap-panel .rd-list li i { color: #ea580c; }
  .rd-chip .bi-box-arrow-up-right { font-size: 0.7rem; color: var(--muted); }
  .rd-legend { font-size: 0.75rem; color: var(--muted); margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
  .rd-legend .dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: baseline; }

  /* ---- Listes ---- */
  .rd-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
  .rd-list li { padding: 0.45rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; display: flex; gap: 0.5rem; align-items: baseline; }
  .rd-list li:last-child { border-bottom: none; }
  .rd-list li i { color: var(--bs-primary); font-size: 0.8rem; flex-shrink: 0; }

  /* ---- SERP concurrents ---- */
  .rd-serp-row { display: flex; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid #f1f5f9; align-items: baseline; }
  .rd-serp-row:last-child { border-bottom: none; }
  .rd-serp-rank { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.85rem; color: var(--muted); min-width: 2rem; text-align: right; flex-shrink: 0; }
  .rd-serp-main { min-width: 0; }
  .rd-serp-title { font-weight: 600; font-size: 0.92rem; }
  .rd-serp-title a { color: var(--ink); text-decoration: none; }
  .rd-serp-title a:hover { color: var(--bs-primary); }
  .rd-serp-domain { font-size: 0.78rem; color: var(--muted); }
  .rd-serp-badge { margin-left: auto; flex-shrink: 0; font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 5px; align-self: center; white-space: nowrap; }
  .rd-serp-badge.analyzed { background: var(--green-soft); color: var(--green); }
  .rd-serp-badge.skipped { background: var(--gray-soft); color: var(--gray); }

  /* ---- Brief ---- */
  .rd-brief-panel { border-color: #c7d2fe; }
  .rd-brief-textarea { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; line-height: 1.55; background: #fbfcfe; border-color: var(--card-border); resize: vertical; }
  .rd-brief-textarea:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 0.15rem rgba(79,70,229,0.15); }

  /* ---- Article généré ---- */
  .rd-article { font-size: 0.95rem; line-height: 1.7; max-height: 560px; overflow-y: auto; padding-right: 0.5rem; }
  .rd-article h2 { font-size: 1.25rem; font-weight: 700; margin: 1.4rem 0 0.5rem; letter-spacing: -0.01em; }
  .rd-article h3 { font-size: 1.05rem; font-weight: 700; margin: 1.1rem 0 0.4rem; }
  .rd-article h4 { font-size: 0.95rem; font-weight: 700; margin: 0.9rem 0 0.3rem; }
  .rd-article p { margin-bottom: 0.7rem; }
  .rd-article ul { margin-bottom: 0.7rem; }
  .rd-article li { margin-bottom: 0.25rem; }

  .copied { background: var(--green-soft) !important; color: var(--green) !important; border-color: var(--green) !important; }

  /* ---- Toast partagé (footer) ---- */
  .copy-toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: white; padding: 0.5rem 1.1rem; border-radius: 8px; font-size: 0.85rem; opacity: 0; pointer-events: none; transition: all 0.2s; z-index: 2000; }
  .copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
