/* ============================================================
   Radar SEO — feuille de style unique
   Esthétique « salle de contrôle » : sombre, contrastée, sobre.
   Aucune dépendance externe. Mobile-first, breakpoints 720/1080.
   ============================================================ */

/* ---------- 1. Design tokens (contrat — ne pas modifier) ---------- */

:root {
  color-scheme: dark;
  --bg: #0d0d0d; --surface: #1a1a19; --surface-2: #222221;
  --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --border: rgba(255,255,255,.10);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s7: #9085e9; /* séries données */
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --accent: #3987e5; --accent-2: #9085e9;
  --grad: linear-gradient(135deg, #3987e5, #9085e9);
  --radius: 14px; --radius-s: 8px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- 2. Reset minimal ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul[class], ol[class] { list-style: none; padding: 0; }
::selection { background: rgba(57, 135, 229, .45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

.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;
}

/* ---------- 3. Typographie ---------- */

h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { overflow-wrap: break-word; }
code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* Titres de section : soulignés d'un trait dégradé */
.section__title,
.section > h2,
main section > h2 {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.section__title::after,
.section > h2::after,
main section > h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 44px; height: 3px;
  border-radius: 2px;
  background: var(--grad);
}

/* ---------- 4. Structure & layout ---------- */

.container { width: min(100% - 32px, 1080px); margin-inline: auto; }
main section, .section { margin-block: 40px; scroll-margin-top: 88px; }
.dashboard { padding-bottom: 80px; }

.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }

.noscript { padding: 64px 24px; text-align: center; color: var(--ink-2); }

/* ---------- 5. Barre supérieure ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(13, 13, 13, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { border-radius: 6px; }
.topbar__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 6. Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .15s ease, filter .2s ease;
}
.btn:hover { border-color: rgba(255, 255, 255, .24); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }

.btn--primary {
  background: var(--grad);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(57, 135, 229, .28);
}
.btn--primary:hover { filter: brightness(1.08); border-color: transparent; }

.btn--ghost { background: transparent; }
.btn--big { padding: 14px 26px; font-size: 1.05rem; border-radius: 10px; }

/* ---------- 7. Cartes ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.error-card { border-left: 4px solid var(--critical); }
.error-card__title { font-size: 1.4rem; margin-bottom: 6px; }
.error-card__message { margin-top: 12px; color: var(--ink-2); }
.error-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.empty {
  border: 1px dashed var(--grid);
  border-radius: var(--radius-s);
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: .95rem;
}

/* ---------- 8. Héros & formulaire URL ---------- */

.hero { padding: 64px 0 32px; text-align: center; }
.hero .lead {
  color: var(--ink-2);
  font-size: 1.08rem;
  max-width: 640px;
  margin: 16px auto 0;
}

.url-form {
  display: flex;
  gap: 10px;
  max-width: 660px;
  margin: 34px auto 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.url-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(57, 135, 229, .22);
}
.url-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 12px;
  font-size: 1.05rem;
  color: var(--ink);
}
.url-form input::placeholder { color: var(--muted); }

.form-error {
  color: var(--critical);
  font-weight: 600;
  margin: 12px auto 0;
  max-width: 660px;
}

/* ---------- 9. Cartes piliers ---------- */

.pillars { display: grid; gap: 16px; margin-block: 44px; }
.pillar-card { --pillar-color: var(--accent); }
.pillar-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pillar-card h3::before {
  content: "";
  width: 18px; height: 4px;
  border-radius: 2px;
  background: var(--pillar-color);
}
.pillar-card p { color: var(--ink-2); font-size: .95rem; }
.pillar-card--technique { --pillar-color: var(--s1); }
.pillar-card--contenu { --pillar-color: var(--s3); }
.pillar-card--popularite { --pillar-color: var(--s7); }

/* ---------- 10. Bandeau « données réelles » ---------- */

.real-banner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(57, 135, 229, .10), rgba(144, 133, 233, .10));
}
.real-banner p { color: var(--ink-2); }
.real-banner strong { color: var(--ink); }

/* ---------- 11. Chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: .85rem;
  white-space: nowrap;
}

/* ---------- 12. Historique ---------- */

.history { margin-block: 48px; }
.history-grid { display: grid; gap: 14px; }
.history-card {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  transition: transform .15s ease, border-color .2s ease;
}
.history-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .26);
}
.history-card__score {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.history-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.history-card__url { font-weight: 600; overflow-wrap: anywhere; }
.history-card__date { color: var(--muted); font-size: .85rem; }

/* Couleurs de score (seuils : >= 90 vert, 50-89 orange, < 50 rouge) */
.score--good { color: var(--good); }
.score--warn { color: var(--warn); }
.score--critical { color: var(--critical); }
.score--muted { color: var(--muted); }

/* ---------- 13. Écran de progression ---------- */

.progress-view { max-width: 720px; margin: 48px auto; }
.progress-card { padding: 28px; }
.progress-title { font-size: 1.45rem; margin-bottom: 6px; }
.progress-url { color: var(--ink-2); overflow-wrap: anywhere; }

.progress-track {
  height: 10px;
  margin: 22px 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad);
  background-size: 200% 100%;
  animation: progress-slide 1.4s linear infinite;
  transition: width .5s ease;
}
@keyframes progress-slide {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

.progress-label { font-weight: 600; min-height: 1.5em; }
.progress-meta { color: var(--muted); font-size: .9rem; min-height: 1.4em; }
.progress-note { margin-top: 20px; color: var(--muted); font-size: .9rem; }

.steps { margin-top: 22px; display: grid; gap: 10px; }
.step {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  transition: color .2s ease;
}
.step__mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--grid);
  font-size: .78rem;
  transition: border-color .2s ease, background-color .2s ease;
}
.step--active { color: var(--ink); }
.step--active .step__mark { border-color: var(--accent); }
.step--active .step__mark::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
.step--done { color: var(--ink-2); }
.step--done .step__mark {
  border-color: var(--good);
  background: rgba(12, 163, 12, .15);
  color: var(--good);
}
.step--done .step__mark::after { content: "✓"; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- 14. Gauges, anneaux, barres (rendus SVG de charts.js) ---------- */

/* Apparition : chaque gauge / anneau / barre monte en fondu */
.gauge, .donut, .meter, .hbar, .sparkline {
  animation: rise .5s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
}

/* Tracé de l'arc : charts.js pose stroke-dasharray et --arc-length
   sur l'élément portant la classe .gauge__arc (ou data-animate="arc"). */
.gauge .gauge__arc,
.gauge [data-animate="arc"],
.donut .donut__arc,
.donut [data-animate="arc"] {
  animation: draw-arc 900ms cubic-bezier(.25, .8, .35, 1) both;
}
@keyframes draw-arc {
  from { stroke-dashoffset: var(--arc-length, 500); }
}

.gauge text, .donut text, .meter text, .hbar text, .sparkline text {
  font-family: var(--font);
}

/* Conteneurs d'agencement usuels */
.gauge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-end;
  justify-content: center;
}
.donut-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 14px;
  text-align: center;
}
.donut-row figcaption, .gauge-caption { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.meter-list { display: grid; gap: 12px; }
.meter { display: flex; align-items: center; gap: 12px; }
.meter__label { min-width: 64px; font-weight: 600; font-size: .9rem; }
.meter__value { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .9rem; }

/* ---------- 15. KPI (chiffres héros) ---------- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.kpi { display: grid; gap: 2px; }
.kpi__value { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi__label { color: var(--muted); font-size: .85rem; }

/* ---------- 16. Badges de statut & de pilier ---------- */

/* Statut = toujours icône + libellé, jamais couleur seule */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}
.status::before { line-height: 1; font-size: .95em; }
.status--pass::before { content: "✓"; color: var(--good); }
.status--warn::before { content: "⚠"; color: var(--warn); }
.status--fail::before { content: "✕"; color: var(--critical); }
.status--info::before { content: "ℹ"; color: var(--s1); }
.status--na::before { content: "–"; color: var(--muted); }

/* Ratings Core Web Vitals (good / ni / poor) */
.rating--good::before { content: "✓"; color: var(--good); }
.rating--ni::before { content: "⚠"; color: var(--warn); }
.rating--poor::before { content: "✕"; color: var(--critical); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge--technique { color: var(--s1); }
.badge--contenu { color: var(--s3); }
.badge--popularite { color: var(--s7); }
.badge--quickwin {
  background: rgba(250, 178, 25, .14);
  border-color: rgba(250, 178, 25, .4);
  color: var(--warn);
}

/* ---------- 17. Accordéons (catégories de checks) ---------- */

.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  overflow: hidden;
}
.accordion + .accordion { margin-top: 10px; }

.accordion__header,
details.accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s ease;
}
.accordion__header:hover,
details.accordion > summary:hover { background: var(--surface-2); }

.accordion__header::after,
details.accordion > summary::after {
  content: "▾";
  color: var(--muted);
  transition: transform .2s ease;
  flex: none;
}
.accordion.open > .accordion__header::after,
details.accordion[open] > summary::after { transform: rotate(180deg); }

details.accordion > summary { list-style: none; }
details.accordion > summary::-webkit-details-marker { display: none; }

.accordion__body {
  padding: 6px 18px 16px;
  border-top: 1px solid var(--border);
}
/* Variante à classes : fermé par défaut, ouvert via .open (details gère seul son ouverture) */
.accordion:not(details):not(.open) > .accordion__body { display: none; }
.accordion.open > .accordion__body { animation: rise .25s ease both; }

.accordion__counts { display: inline-flex; gap: 6px; margin-left: auto; }

/* Lignes de check dans les accordéons */
.check {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--grid);
}
.check:last-child { border-bottom: none; }
.check__label { font-weight: 600; flex: 1; min-width: 180px; }
.check__value { color: var(--ink-2); font-size: .92rem; }
.check__detail {
  flex-basis: 100%;
  color: var(--muted);
  font-size: .88rem;
  overflow-wrap: anywhere;
}

/* ---------- 18. Recommandations ---------- */

.reco-list { display: grid; gap: 14px; }
.reco-card {
  display: grid;
  gap: 8px;
  border-left: 3px solid var(--accent);
}
.reco-card--quickwin { border-left-color: var(--warn); }
.reco-card__title { font-size: 1rem; }
.reco-card p { color: var(--ink-2); font-size: .94rem; }
.reco-card__badges { display: flex; flex-wrap: wrap; gap: 8px; }

/* Filtres par pilier (boutons toggle) */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.filter-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: .88rem;
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.filter-btn:hover { border-color: rgba(255, 255, 255, .24); }
.filter-btn[aria-pressed="true"],
.filter-btn.active {
  background: var(--grad);
  border-color: transparent;
  color: #ffffff;
}

/* ---------- 19. Tables (pages crawlées, mots-clés…) ---------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 640px;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--grid);
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
td { font-variant-numeric: tabular-nums; }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
tbody tr:last-child td { border-bottom: none; }

th[data-sort], th[aria-sort] { cursor: pointer; user-select: none; }
th[aria-sort="ascending"]::after { content: " ↑"; color: var(--accent); }
th[aria-sort="descending"]::after { content: " ↓"; color: var(--accent); }

tr.row--issue td { background: rgba(208, 59, 59, .08); }
tr.row--warn td { background: rgba(250, 178, 25, .07); }
td.cell-url { overflow-wrap: anywhere; min-width: 220px; font-variant-numeric: normal; }

/* ---------- 20. Toast (erreurs passagères) ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  max-width: min(92vw, 480px);
  padding: 12px 18px;
  border: 1px solid var(--critical);
  border-left-width: 4px;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  animation: rise .25s ease both;
}
.toast--out { opacity: 0; transition: opacity .3s ease; }

/* ---------- 21. Pied de page ---------- */

.footer {
  margin: 64px 0 32px;
  padding-top: 24px;
  border-top: 1px solid var(--grid);
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
}

/* ---------- 22. Barres de défilement (discret) ---------- */

.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--grid); border-radius: 4px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }

/* ---------- 23. Breakpoints (720 px / 1080 px) ---------- */

@media (max-width: 719.98px) {
  .url-form { flex-direction: column; padding: 12px; }
  .url-form .btn { width: 100%; }
  .topbar__actions { width: 100%; justify-content: flex-start; }
}

@media (min-width: 720px) {
  .container { width: min(100% - 48px, 1080px); }
  .topbar { padding: 12px 24px; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .history-grid { grid-template-columns: repeat(2, 1fr); }
  .real-banner { flex-direction: row; align-items: center; justify-content: space-between; }
  .real-banner p { max-width: 46ch; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
  .history-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .reco-list { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 80px; }
}

/* ---------- 24. Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 25. Mode impression (« Exporter en PDF ») ----------
   app.js pose la classe .printing sur <body> avant window.print()
   (et ouvre les <details>), puis la retire après. Les règles
   body.printing garantissent les accordéons déployés ; @media print
   fait le reste : fond blanc, encre noire, navigation masquée. */

body.printing .accordion__body,
body.printing .accordion:not(details) > .accordion__body {
  display: block !important;
}

@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff; --surface: #ffffff; --surface-2: #f2f2f2;
    --ink: #000000; --ink-2: #333333; --muted: #555555;
    --grid: #dddddd; --border: #cccccc;
  }
  html, body { background: #ffffff !important; color: #000000 !important; }

  /* Navigation, boutons d'action et éléments interactifs masqués */
  .topbar, .btn, .filters, .filter-btn, .url-form, .toast,
  .form-error, .progress-note, .no-print { display: none !important; }

  a { color: #000000 !important; text-decoration: underline; }

  .card, .accordion, .table-wrap {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  /* Accordéons déployés à l'impression */
  .accordion__body,
  .accordion:not(details) > .accordion__body { display: block !important; }
  .accordion__header::after,
  details.accordion > summary::after { content: "" !important; }

  h2, h3 { break-after: avoid; }
  tr, .reco-card, .check { break-inside: avoid; }

  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  th { position: static; }

  .progress-fill, .gauge, .donut, .meter, .hbar, .sparkline,
  .accordion.open > .accordion__body { animation: none !important; }

  @page { margin: 14mm; }
}

/* ==================================================================
   Complément dashboard — sections, mots-clés, autorité, Google
   ================================================================== */

/* Alias boutons (google-panels utilise btn-primary / btn-ghost) */
.btn-primary { background: var(--grad); color: #fff; border: none; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--ink-2); }

/* Animation d'apparition des jauges et anneaux */
@keyframes trace-arc { from { stroke-dasharray: 0 100; } }
.gauge-value, .donut-value { animation: trace-arc 900ms ease-out both; }

/* En-tête du tableau de bord */
.dash-header { margin: 8px 0 20px; }
.dash-header h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: 4px; }
.dash-header .muted { overflow-wrap: anywhere; }

/* Vue d'ensemble */
.overview-redirect { margin-top: 12px; font-size: 0.85rem; overflow-wrap: anywhere; }
.overview-redirect code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.lighthouse-card { margin-top: 16px; }
.donut-group h4 { color: var(--ink-2); margin-bottom: 10px; }
.donut-group figure { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; }
.donut-group figcaption { font-size: 0.78rem; color: var(--muted); text-align: center; }
.donut-group .donut-row { display: flex; gap: 18px; flex-wrap: wrap; }

/* Core Web Vitals */
.section-intro { margin-bottom: 14px; }
.chip--source { border-color: var(--accent); color: var(--ink); }
.cwv-grid { gap: 26px; }
.cwv-col h4 { margin-bottom: 12px; color: var(--ink-2); }
.meter__hint { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

/* Recommandations */
.reco-group-title { margin: 22px 0 12px; }

/* Pilier & autorité */
.pillar-score { float: right; font-size: 1.3rem; font-weight: 700; }
.authority-card { margin-top: 16px; }
.authority-card h4 { margin: 16px 0 8px; color: var(--ink-2); }
.authority-note { margin-top: 12px; font-size: 0.85rem; }
.chip--on { border-color: var(--good); }
.chip--off { border-color: var(--critical); opacity: 0.75; }

/* Mots-clés */
.chips--seeds { margin-bottom: 8px; }
.chip--seed { border-color: var(--accent-2); font-weight: 600; }
.question-list { margin: 8px 0 16px; padding-left: 20px; display: grid; gap: 6px; }
.question-list li { color: var(--ink-2); }
.bank-note { margin: 10px 0 16px; font-size: 0.85rem; }
.kw-explorer { margin-top: 10px; }
.kw-explorer input {
  width: 100%; max-width: 480px; padding: 12px 16px; border-radius: var(--radius-s);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
  font-size: 1rem;
}
.kw-explorer input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.kw-explorer__results { margin-top: 14px; display: grid; gap: 14px; }
.kw-suggest-group h4 { margin-bottom: 8px; color: var(--ink-2); }

/* Pages : groupes de doublons */
.dup-group { margin: 8px 0; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-s); display: grid; gap: 4px; list-style: none; }
.dup-group a { overflow-wrap: anywhere; }
.table-hint { margin-top: 10px; font-size: 0.8rem; }

/* Méthodologie */
.methodo-list { margin: 12px 0; padding-left: 20px; display: grid; gap: 8px; }
.methodo-list li { color: var(--ink-2); }

/* Panneaux Google */
.google-card { margin-bottom: 16px; }
.google-benefits { margin: 10px 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.google-privacy { font-size: 0.82rem; color: var(--muted); margin-top: 12px; }
.google-error-inline, .google-error { color: var(--serious); margin-top: 10px; }
.google-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.google-status { color: var(--ink-2); }
.google-period { color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }
.section-head { margin-bottom: 2px; }
.section-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0; }
.stat-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 12px 18px; min-width: 120px; }
.stat-value { display: block; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.google-spark, .google-chart { margin: 14px 0; }
.google-spark h4, .google-chart h4 { margin-bottom: 8px; color: var(--ink-2); }
.google-table { margin: 14px 0; }
.google-table .table-scroll { overflow-x: auto; }
.cell-key { overflow-wrap: anywhere; }
.empty-note { color: var(--muted); padding: 10px 0; }
.google-loading { display: grid; gap: 10px; padding: 8px 0; }
.skeleton { background: var(--surface-2); border-radius: 6px; animation: pulse 1.4s ease-in-out infinite; }
.skeleton-line { height: 14px; max-width: 420px; }
.skeleton-block { height: 72px; max-width: 560px; }

@media (max-width: 719.98px) {
  .pillar-score { float: none; display: block; margin-top: 4px; }
  .stat-tile { flex: 1 1 40%; }
}
