/* ---------- Test de vitesse et de référencement ---------- */
.tool { display: grid; gap: 24px; padding-bottom: clamp(64px, 9vw, 112px); }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.hint { font-size: var(--fs-small); color: var(--muted); margin: 0; }

/* Formulaire */
.ask { display: grid; gap: 24px; }
.ask-row { display: flex; gap: 12px; }
.ask-row input { flex: 1; min-width: 0; }
.ask-row .btn { flex: none; }
@media (max-width: 560px) { .ask-row { flex-direction: column; } }
.status { margin: 0; font-size: var(--fs-small); }
.status:empty { display: none; }
.status.err { color: var(--err); }
.status a { color: inherit; font-weight: 600; }
.checks { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.checks li { display: grid; gap: 4px; font-size: var(--fs-small); color: var(--muted); }
.checks b { font-size: var(--fs-ui); font-weight: 600; color: var(--ink); }
@media (max-width: 760px) { .checks { grid-template-columns: 1fr; gap: 12px; } }

/* Mesure en cours : la barre avance vite puis ralentit, sans jamais boucler */
.progress { display: grid; gap: 12px; }
.bar { height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--sky-deep); border-radius: 2px; transition: width 0.6s var(--ease); }
.progress .step { margin: 0; font-weight: 600; }
.p-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
/* Pendant le test, le bouton reste lisible : 5,9:1 au lieu d'un gris à 45 % d'opacité */
.ask .btn[disabled] { opacity: 1; background: var(--muted); cursor: progress; }

/* ---------- Rapport ---------- */
.report { scroll-margin-top: 96px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.report:focus { outline: none; }
.r-head { padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) 0; }
.r-head h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-top: 8px; overflow-wrap: anywhere; }
.r-head h2 .mono { font-size: 0.8em; }
.r-verdict { margin: 12px 0 0; color: var(--ink-2); font-size: 1.125rem; max-width: 60ch; }

.r-body { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 40px; padding: 32px clamp(20px, 4vw, 40px) clamp(24px, 4vw, 40px); align-items: start; }
.r-body.no-shot { grid-template-columns: 1fr; }
@media (max-width: 820px) {
  .r-body { grid-template-columns: 1fr; gap: 32px; }
}
.r-main { display: grid; gap: 32px; min-width: 0; }

/* Les deux notes */
.scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.score { --c: var(--muted); display: grid; gap: 8px; padding: 20px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.score.good { --c: var(--ok); }
.score.mid { --c: var(--butter-ink); }
.score.bad { --c: var(--err); }
.s-label { font-weight: 600; font-size: var(--fs-ui); }
.s-fig { display: flex; align-items: baseline; gap: 4px; font-family: var(--display); line-height: 1; }
.s-fig b { font-weight: 600; font-size: clamp(2.75rem, 6vw, 3.5rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--c); }
.s-fig small { font-family: var(--mono); font-size: var(--fs-small); color: var(--muted); }
/* Repères à 50 et 90 : les seuils utilisés par Google */
.meter { position: relative; height: 6px; border-radius: 3px; background: var(--raised); }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: var(--c); transition: width 0.8s var(--ease); }
.meter::before, .meter::after { content: ""; position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--white); z-index: 1; }
.meter::before { left: 50%; }
.meter::after { left: 90%; }
.s-word { font-size: var(--fs-small); color: var(--c); font-weight: 600; }
@media (max-width: 420px) { .scores { grid-template-columns: 1fr; } }

.block { display: grid; gap: 12px; }
.block h3 { font-size: 1.25rem; }

/* Mesures */
.metrics { list-style: none; margin: 0; padding: 0; display: grid; }
.metrics > li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.metrics > li:last-child { border-bottom: 1px solid var(--line); }
.metrics .m-label { font-weight: 500; }
.metrics .m-val { font-family: var(--mono); font-size: var(--fs-ui); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.metrics .sub { grid-column: 2; font-size: var(--fs-small); color: var(--muted); }
.m-word { font-size: var(--fs-small); font-weight: 600; text-align: right; white-space: nowrap; color: var(--muted); }
.m-word.good { color: var(--ok); }
.m-word.mid { color: var(--butter-ink); }
.m-word.bad { color: var(--err); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ctl-line); align-self: center; }
.dot.good { background: var(--ok); }
.dot.mid { background: #d59a12; }
.dot.bad { background: var(--err); }

/* Corrections */
.fixes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: fix; }
.fixes li { counter-increment: fix; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 12px; }
.fixes li::before {
  content: counter(fix); grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sky-soft); color: var(--sky-deep); font-family: var(--mono); font-size: var(--fs-small); font-weight: 500;
}
.fixes b { font-weight: 600; padding-top: 4px; }
.fixes span { font-size: var(--fs-small); color: var(--muted); }
.fixes b .tag { display: inline-block; white-space: nowrap; font-family: var(--mono); font-size: var(--fs-meta); color: var(--muted); margin-left: 8px; font-weight: 400; }
.fixes li.none { grid-template-columns: 1fr; }
.fixes li.none::before { display: none; }

/* Capture d'écran dans un téléphone */
.phone { margin: 0; display: grid; gap: 12px; justify-items: center; position: sticky; top: 96px; }
.device {
  width: 100%; max-width: 232px; padding: 8px; border-radius: 32px; background: var(--ink);
  box-shadow: 0 24px 40px -24px rgba(22, 24, 29, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.device img { width: 100%; height: auto; border-radius: 24px; background: var(--white); }
.phone figcaption { font-size: var(--fs-meta); color: var(--muted); text-align: center; max-width: 24ch; }
@media (max-width: 820px) { .phone { position: static; } .device { max-width: 200px; } }

/* Prise de contact, dans le rapport */
.cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center;
  background: var(--ink); color: #fff; padding: clamp(24px, 4vw, 40px);
}
.cta h2 { font-size: 1.5rem; margin-bottom: 8px; }
.cta p { margin: 0; color: #c9d0da; max-width: 54ch; }
.cta-acts { display: grid; gap: 12px; justify-items: start; }
.cta .btn-ink { background: #fff; color: var(--ink); }
.cta .btn-ink:hover { background: var(--sky-soft); }
.cta-link { color: #c9d0da; font-size: var(--fs-small); text-underline-offset: 3px; }
.cta-link:hover { color: #fff; }
.cta-help { font-size: var(--fs-small); max-width: 46ch; }
.cta-help a { color: #fff; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .cta { grid-template-columns: 1fr; }
  .cta-link { display: inline-flex; align-items: center; min-height: 44px; }
}

.again { margin: 0; padding: 20px clamp(20px, 4vw, 40px); border-top: 1px solid var(--line); }

.privacy { margin: 0; font-size: var(--fs-small); color: var(--muted); padding-left: 16px; border-left: 2px solid var(--sky); }

/* Entrée du rapport */
.report.in { animation: rise 0.4s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .report.in { animation: none; } }
@media (max-width: 760px) { .btn-sm { min-height: 44px; } }
