/* FormGuard — pages secondaires */
:root {
  --bg: #fafbfd;
  --surface: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --indigo: #4f46e5;
  --primary: #2563eb;
  --emerald: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-lg: 22px;
  --max-w: 880px;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

body.page {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

.subnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 251, 253, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.subnav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.subnav-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.subnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
}

.subnav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.subnav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
}

.subnav-links a.is-active {
  color: var(--primary);
  font-weight: 600;
}

.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.page-hero {
  margin-bottom: 32px;
}

.page-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-lead {
  margin: 0;
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.page-card + .page-card { margin-top: 20px; }

.page-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-card h3 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.page-card p,
.page-card li {
  color: var(--text-secondary);
}

.page-card ul,
.page-card ol {
  padding-left: 1.25rem;
}

.page-card li { margin-bottom: 8px; }

.page-card code {
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}

.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 44px;
  margin-bottom: 20px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signal-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.signal-item {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.signal-item strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.signal-item span {
  font-size: 13px;
  color: var(--text-secondary);
}

.page-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

.page-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.page-footer a:hover { color: var(--primary); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 99px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: rgba(15, 23, 42, 0.2);
}

/* Test bench */
.test-grid {
  display: grid;
  gap: 20px;
}

.test-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.test-card--danger { border-color: rgba(239, 68, 68, 0.25); }

.level-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.level-safe { background: #dcfce7; color: #166534; }
.level-warn { background: #fef3c7; color: #92400e; }
.level-danger { background: #fee2e2; color: #991b1b; }

.test-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.test-card .desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.test-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.test-card input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
}

.test-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.test-card button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #0f172a;
  cursor: pointer;
}

.test-card button.btn-warn { background: var(--warn); }
.test-card button.btn-danger { background: var(--danger); }

.test-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 24px;
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
}

.test-notice strong { color: var(--text); }

.test-notice-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.test-expected {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.test-browser-mini {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f8fafc;
}

.test-browser-mini-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #e8edf3;
  border-bottom: 1px solid var(--border);
}

.test-browser-mini-dots {
  display: flex;
  gap: 5px;
}

.test-browser-mini-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.test-browser-mini-dots span:nth-child(1) { background: #fca5a5; }
.test-browser-mini-dots span:nth-child(2) { background: #fcd34d; }
.test-browser-mini-dots span:nth-child(3) { background: #86efac; }

.test-browser-mini-url {
  flex: 1;
  min-width: 0;
  padding: 5px 10px;
  background: #fff;
  border-radius: 6px;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.test-browser-mini-url--danger { color: #dc2626; font-weight: 600; }

.test-browser-mini-body {
  padding: 20px 16px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.test-browser-mini-body form {
  margin: 0;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.test-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-checklist li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 22px;
  position: relative;
}

.test-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
}

.test-card--safe .test-checklist li::before { background: #86efac; }
.test-card:not(.test-card--safe):not(.test-card--danger) .test-checklist li::before { background: #fcd34d; }
.test-card--danger .test-checklist li::before { background: #fca5a5; }

.test-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.test-card--warn { border-color: rgba(245, 158, 11, 0.3); }

/* Welcome — page post-installation */
body.page-welcome .subnav-links a[href="USER_GUIDE.html"] { display: none; }

.welcome-hero {
  text-align: center;
  margin-bottom: 32px;
}

.welcome-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: welcomePop 0.6s ease-out;
}

@keyframes welcomePop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.welcome-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.welcome-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.welcome-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 32px 0;
}

.welcome-step {
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.welcome-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.welcome-step h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
}

.welcome-step p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.welcome-cta-box {
  text-align: center;
  padding: 28px 24px;
  margin-top: 28px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-lg);
}

.welcome-cta-box h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.welcome-cta-box p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.welcome-popup-preview {
  margin-top: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  max-width: 280px;
}

.welcome-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}

.welcome-popup-score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px;
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  margin-bottom: 10px;
}

.welcome-popup-score strong {
  font-size: 26px;
  font-weight: 800;
  color: #dc2626;
}

.welcome-popup-score span {
  font-size: 12px;
  color: var(--text-secondary);
}

.welcome-popup-line {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  margin-bottom: 6px;
}

.welcome-popup-line:nth-child(3) { width: 70%; }

.welcome-trust {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-tertiary);
}

@media (max-width: 640px) {
  .welcome-steps { grid-template-columns: 1fr; }
}

/* Uninstall — page post-désinstallation */
.uninstall-hero {
  text-align: center;
  margin-bottom: 24px;
}

.uninstall-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.uninstall-form {
  margin-top: 0;
  padding: 24px;
}

.uninstall-reasons {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uninstall-reason {
  display: block;
  cursor: pointer;
}

.uninstall-reason input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.uninstall-reason-box {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.uninstall-reason-box strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.uninstall-reason-box span {
  font-size: 12px;
  color: var(--text-secondary);
}

.uninstall-reason input:focus-visible + .uninstall-reason-box {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.uninstall-reason input:checked + .uninstall-reason-box {
  border-color: rgba(37, 99, 235, 0.45);
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.uninstall-detail-label {
  display: block;
  margin: 20px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.uninstall-detail {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
}

.uninstall-detail:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.uninstall-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--danger);
}

.uninstall-submit {
  width: 100%;
  margin-top: 20px;
}

.uninstall-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.uninstall-thanks {
  text-align: center;
  padding: 32px 24px;
}

.uninstall-thanks-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uninstall-thanks h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.uninstall-thanks p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.uninstall-trust {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.page-pitch {
  background: #0f172a;
  color: #e2e8f0;
}

body.page-pitch .subnav {
  background: rgba(15, 23, 42, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.page-pitch .subnav-links a { color: #94a3b8; }
body.page-pitch .subnav-links a:hover { color: #fff; background: rgba(255,255,255,0.06); }

body.page-pitch .page-lead { color: #94a3b8; }

body.page-pitch .page-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body.page-pitch .page-card h2 { color: #fff; }
body.page-pitch .page-card p,
body.page-pitch .page-card li { color: #94a3b8; }

body.page-pitch .page-kicker { color: #38bdf8; }

.pitch-stat {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(79, 70, 229, 0.25));
  color: #fff;
}

.pitch-stat strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

/* Center card (payment legacy) */
.page-center {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.center-card {
  width: 100%;
  max-width: 440px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.center-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecfdf5;
  color: var(--emerald);
}

.center-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.center-card p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 15px;
}

@media (max-width: 640px) {
  .subnav-inner { flex-direction: column; align-items: flex-start; }
  .subnav-links { gap: 4px 10px; }
  .page-wrap { padding-top: 28px; }
}
