:root {
  --bg: #f4f7fb;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #0f766e;
  --primary-dark: #0d5c56;
  --primary-light: #ccfbf1;
  --accent: #0369a1;
  --border: #e2e8f0;
  --good: #059669;
  --good-bg: #ecfdf5;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --bad: #dc2626;
  --bad-bg: #fef2f2;
  --info: #475569;
  --info-bg: #f1f5f9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --ring-size: 264;
}

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

html {
  /* scroll volontaire uniquement */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: min(920px, 100% - 2rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.brand:hover { opacity: 0.85; }

.brand-icon { display: flex; }

.header-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Hero */
.hero {
  background: linear-gradient(160deg, #0f766e 0%, #0e7490 45%, #0369a1 100%);
  color: #fff;
  padding: 3rem 0 3.5rem;
}

.hero-inner h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.hero-lead {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.scan-form { margin-bottom: 1.5rem; }

.scan-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.scan-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.scan-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.9rem 1.1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
}

.scan-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.scan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--primary-dark);
  cursor: pointer;
  min-width: 8rem;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}

.scan-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.scan-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.form-error {
  margin: 0.6rem 0 0;
  color: #fecaca;
  font-size: 0.9rem;
}

.form-hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

.hero .form-hint,
.hero .form-error {
  color: rgba(255, 255, 255, 0.9);
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  opacity: 0.85;
}

.hero-features li::before {
  content: '✓ ';
  font-weight: 700;
}

/* Scan panel */
.scan-panel {
  padding: 2rem 0 3rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.scan-status { margin-bottom: 1.5rem; }

.status-top {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.status-progress-ring {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.status-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: var(--ring-size);
  stroke-dashoffset: var(--ring-size);
  transition: stroke-dashoffset 0.4s ease;
}

.ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.status-text h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.status-sub { margin: 0; color: var(--text-muted); }

.status-hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.check-steps {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.4rem;
}

.check-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: var(--info-bg);
}

.check-step.running {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.check-step.done { color: var(--good); }

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  flex-shrink: 0;
}

.check-step.running .step-dot {
  opacity: 1;
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Results summary */
.results-summary { margin-bottom: 1.5rem; }

.score-block {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.summary-content {
  flex: 1;
  min-width: min(100%, 280px);
}

.summary-risk {
  margin: 0.75rem 0 0;
  padding: 0;
  max-width: 420px;
}

.score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.score-label {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.25rem 0;
  color: var(--primary);
}

.score-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Result cards */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.25rem 0.75rem;
}

.result-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.result-badge.good { background: var(--good-bg); color: var(--good); }
.result-badge.warning { background: var(--warning-bg); color: var(--warning); }
.result-badge.bad { background: var(--bad-bg); color: var(--bad); }
.result-badge.info { background: var(--info-bg); color: var(--info); }

.result-title-wrap { flex: 1; min-width: 0; }

.result-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.result-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

.result-col {
  padding: 1.25rem;
}

.explain-col {
  background: var(--info-bg);
  border-right: 1px solid var(--border);
}

.result-col-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.result-explain {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
}

.finding-col .result-summary {
  margin: 0 0 1rem;
  padding: 0;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}

.result-details {
  margin: 0;
}

.result-details .detail-row {
  display: grid;
  grid-template-columns: minmax(100px, 38%) 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.875rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.result-details .detail-row:last-child { border-bottom: none; }

.result-details dt {
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}

.result-details dd {
  margin: 0;
  word-break: break-word;
}

.result-details .is-multiline dd {
  white-space: pre-wrap;
}

.result-details .is-markdown {
  grid-template-columns: 1fr;
}

.result-details .is-markdown dt {
  margin-bottom: 0.35rem;
}

.page-md {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: normal;
}

.geo-map {
  width: 100%;
  height: 220px;
  margin-top: 0.9rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e2e8f0;
}

.geo-map-note {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Stream (analyse SSR) */
.stream-main {
  padding: 1.5rem 0 3rem;
}

.stream-banner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  border-color: var(--primary-light);
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 120%);
}

.stream-banner-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.stream-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.stream-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.mono {
  font-family: ui-monospace, monospace;
  font-size: 0.95em;
}

.stream-summary {
  margin-top: 1.5rem;
}

.summary-heading {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.summary-back {
  margin-top: 1rem;
}

.stream-error {
  margin: 1rem 0;
  text-align: center;
}

.stream-error p { margin: 0 0 1rem; }

.result-status-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.35rem;
}

.result-status-pill.good { background: var(--good-bg); color: var(--good); }
.result-status-pill.warning { background: var(--warning-bg); color: var(--warning); }
.result-status-pill.bad { background: var(--bad-bg); color: var(--bad); }
.result-status-pill.info { background: var(--info-bg); color: var(--info); }

/* Buttons */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.scan-again-wrap {
  text-align: center;
  margin-top: 2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
  background: var(--bg-card);
}

.footer-inner p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-muted { margin-top: 0.35rem; font-size: 0.8rem; }

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.error-inner {
  text-align: center;
  padding: 2rem;
}

.error-inner h1 { margin-top: 0; }

.hidden { display: none !important; }

/* Niveau de connaissance */
.knowledge-field {
  margin: 1.25rem 0 1rem;
}

.knowledge-current {
  margin: 0.35rem 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.knowledge-slider {
  width: 100%;
  height: 8px;
  accent-color: var(--primary);
  cursor: pointer;
}

.knowledge-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.35rem;
}

.scan-btn-full {
  width: 100%;
  margin-top: 0.5rem;
  background: #fff;
  color: var(--primary-dark);
}

/* Barre de progression (remplace le sticky banner) */
.progress-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.875rem;
}

.progress-bar.is-ai {
  background: #0e7490;
}

.progress-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0;
}

.progress-spinner,
.block-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.block-loader .block-spinner {
  border-color: var(--border);
  border-top-color: var(--primary);
}

.block-loader {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

.group-loading-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.skeleton-badge {
  background: var(--border) !important;
  color: transparent !important;
}

.group-skeleton .skeleton-body {
  opacity: 0.95;
}

.group-error .block-loader {
  color: var(--bad);
}

/* Résumé IA */
.ai-summary {
  margin-bottom: 1.25rem;
  border-color: #99f6e4;
  background: linear-gradient(180deg, #fff 0%, var(--primary-light) 140%);
}

.ai-summary-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.ai-summary-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ai-draft {
  margin-top: 0.85rem;
}

.ai-draft-status {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.ai-draft-line {
  margin: 0;
  min-height: 1.6em;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
}

.ai-caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--primary);
  vertical-align: text-bottom;
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.ai-draft-bars {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.ai-draft-bars.is-writing {
  gap: 0.5rem;
  margin-top: 1.15rem;
}

.ai-draft-bars span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #ccfbf1 45%, #e2e8f0 90%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.ai-draft-bars span:nth-child(6n+1) { width: 94%; }
.ai-draft-bars span:nth-child(6n+2) { width: 71%; animation-delay: 0.12s; }
.ai-draft-bars span:nth-child(6n+3) { width: 86%; animation-delay: 0.24s; }
.ai-draft-bars span:nth-child(6n+4) { width: 63%; animation-delay: 0.08s; }
.ai-draft-bars span:nth-child(6n+5) { width: 90%; animation-delay: 0.32s; }
.ai-draft-bars span:nth-child(6n) { width: 78%; animation-delay: 0.18s; }

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.unreachable-box {
  margin-top: 0.5rem;
}

.unreachable-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--bad);
}

.unreachable-hint {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.prose h3,
.prose h4 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.ai-summary-content.prose > :first-child {
  margin-top: 0;
}

.prose p {
  margin: 0.5rem 0;
}

.prose ul,
.prose ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.25rem 0;
}

.prose strong {
  font-weight: 650;
}

.prose a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--info-bg);
  padding: 0.12em 0.38em;
  border-radius: 5px;
}

.prose pre {
  margin: 0.75rem 0;
  padding: 0.9rem 1rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

.results-main {
  padding: 1.5rem 0 5.5rem;
}

.report-dock {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.25;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  text-align: left;
}

.report-dock:hover,
.report-dock:focus-visible {
  background: #0d5c56;
  outline: none;
}

.report-dock.is-ready {
  background: #1e293b;
}

.report-dock.is-ready:hover,
.report-dock.is-ready:focus-visible {
  background: #0f172a;
}

.report-dock-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.report-dock-up {
  display: none;
  flex-shrink: 0;
  line-height: 0;
}

.report-dock.is-ready .report-dock-up {
  display: block;
}

.report-dock.is-ready .report-dock-spinner,
.report-dock.is-ready .report-dock-wait {
  display: none;
}

.report-dock.is-writing .report-dock-done {
  display: none;
}

@media (max-width: 600px) {
  .report-dock {
    font-size: 0.82rem;
    padding: 0.65rem 0.85rem;
  }
}

.scan-again-wrap {
  text-align: center;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .result-body {
    grid-template-columns: 1fr;
  }

  .explain-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 600px) {
  .hero { padding: 2rem 0 2.5rem; }

  .scan-row { flex-direction: column; }

  .scan-btn { width: 100%; }

  .header-tag { display: none; }

  .result-details .detail-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* Sticky loader pendant l’analyse */
.sticky-loader {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--primary-dark), var(--accent));
  color: #fff;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.4s, transform 0.4s;
}

.sticky-loader.is-done {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.sticky-loader-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  font-size: 0.9rem;
}

.sticky-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.sticky-loader.is-done .sticky-spinner {
  animation: none;
  border-color: #fff;
  border-top-color: #fff;
}

.sticky-sub {
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}

.page-scan .site-header {
  top: 0;
}

/* Jauge risque rouge → vert */
.risk-meter-wrap {
  padding: 0 1.25rem 1rem;
}

.risk-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.risk-meter-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: visible;
}

.risk-meter-gradient {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #dc2626 0%, #f59e0b 45%, #22c55e 100%);
}

.risk-meter-cursor {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: left 0.5s ease;
}

.risk-meter-verdict {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.risk-meter-verdict.good { color: var(--good); }
.risk-meter-verdict.warning { color: var(--warning); }
.risk-meter-verdict.bad { color: var(--bad); }
.risk-meter-verdict.info { color: var(--info); }

/* Bloc informations regroupé */
.info-subsection {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.info-subsection:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-sub-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.result-explain-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.analysis-date {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.analysis-date time {
  color: var(--text);
  font-weight: 600;
}

.cache-date-line {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.group-card.info .result-badge {
  background: var(--info-bg);
  color: var(--info);
}

/* Accueil : deux colonnes, 100% hauteur */
.page-home {
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  background: #082f2c;
}


.home-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.home-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 3.5rem 2.5rem;
  background:
    radial-gradient(800px 420px at 20% 0%, rgba(94, 234, 212, 0.22), transparent 55%),
    linear-gradient(165deg, #0b3d3a 0%, #0f766e 55%, #0e7490 100%);
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-mark { display: flex; }

.home-intro {
  max-width: 34rem;
  padding: 2rem 0 4rem;
}

.home-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #99f6e4;
}

.home-intro h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.home-lead {
  margin: 0 0 1.5rem;
  font-size: 1.12rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.home-lead em { font-style: normal; color: #ccfbf1; font-weight: 600; }

.home-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}

.home-benefits li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.home-benefits li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.2);
  flex-shrink: 0;
}

.home-right {
  background: #f3f7f6;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.home-form {
  width: min(520px, 100%);
}

.home-form-title {
  margin: 0 0 1.4rem;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.45rem;
}

.home-url {
  width: 100%;
  font-size: 1.15rem;
  font-family: inherit;
  padding: 1rem 1.1rem;
  border: 1.5px solid #d5e3df;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.field-hint {
  margin: 0 0 1.2rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.home-url:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.level-field {
  border: 0;
  margin: 0;
  padding: 0;
}

.level-name {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.level-slider {
  margin-top: 0.35rem;
  user-select: none;
}

.level-rail {
  position: relative;
  height: 28px;
  cursor: pointer;
  touch-action: none;
}

.level-rail::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background: #dbe8e4;
}

.level-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 6px;
  width: 0;
  margin-top: -3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2dd4bf, #0f766e);
  pointer-events: none;
}

.level-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border-radius: 50%;
  background: #0f766e;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
  pointer-events: none;
}

.level-stops {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 0.55rem;
}

.level-stop {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.2rem 0;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  text-align: center;
}

.level-stop:first-child { text-align: left; }
.level-stop:last-child { text-align: right; }
.level-stop.is-active { color: var(--primary-dark); }

.level-hint {
  margin: 0.9rem 0 0;
  min-height: 3.4em;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #475569;
}

.home-cta {
  width: 100%;
  margin-top: 1.35rem;
  border: 0;
  border-radius: 14px;
  padding: 1.05rem 1.2rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #129185, #0f766e);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
}

.home-cta:hover:not(:disabled) {
  filter: brightness(1.05);
}

.home-cta:disabled,
.home-cta.is-launching {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

.home-fine {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

.home-error {
  margin: 0.85rem 0 0;
  color: var(--bad);
  font-weight: 600;
}

@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; min-height: auto; }
  .home-left { padding: 1.4rem 1.4rem 2rem; }
  .home-intro { padding: 1.5rem 0 0.5rem; }
  .home-intro h1 { font-size: 2rem; }
  .home-right { padding: 1.4rem 1.4rem 2.2rem; align-items: stretch; }
  .home-form { width: 100%; }
}
