/* ════════════════════════════════════════════════════════════════
   Docteur SEO — design system « clinique de poche »
   Fond crème · encre quasi-noire · cartes galets · pilules
   Typo : Bricolage Grotesque (display) + Schibsted Grotesk (texte)
   ════════════════════════════════════════════════════════════════ */
:root {
  /* palette */
  --bg: #f2f0ea;
  --card: #ffffff;
  --ink: #17161b;
  --ink-2: #232228;
  --text: #1d1c22;
  --muted: #595762;
  --soft: #6e6b78; /* assombri : 4,5:1 sur fond crème (WCAG AA) — ex-#8b8894 */
  --line: #e5e2d9;
  --vital: #0da05f;        /* vert « signe vital » */
  --ok: #0da05f;
  --warn: #e8930c;
  --fail: #e23d3d;
  /* compat anciens noms (utilisés par les JS) */
  --primary: #17161b;
  --primary-dark: #17161b;
  /* géométrie */
  --r-lg: 28px;
  --r-md: 20px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(23, 22, 27, 0.04), 0 14px 36px -12px rgba(23, 22, 27, 0.12);
  --shadow-dock: 0 10px 30px -6px rgba(23, 22, 27, 0.45);
  --font-display: 'Bricolage Grotesque', 'Schibsted Grotesk', sans-serif;
  --font-body: 'Schibsted Grotesk', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  /* espace pour la barre flottante mobile */
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

img { max-width: 100%; }
a { color: var(--ink); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.container { max-width: 640px; margin: 0 auto; padding: 0 18px; }

/* ── Apparition douce des blocs ─────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.card, .hero > * { animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero > *:nth-child(2) { animation-delay: 0.06s; }
.hero > *:nth-child(3) { animation-delay: 0.12s; }
.hero > *:nth-child(4) { animation-delay: 0.18s; }
.hero > *:nth-child(5) { animation-delay: 0.24s; }
.hero > *:nth-child(6) { animation-delay: 0.3s; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 240, 234, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo img { height: 34px; width: auto; display: block; }
.logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  transition: transform 0.15s ease, background-color 0.2s;
}
.header-cta:hover { background: var(--ink-2); transform: translateY(-1px); }
.header-cta i { font-size: 12px; }

/* ── Hero (accueil) ─────────────────────────────────────────── */
/* padding vertical uniquement : ne pas écraser le padding horizontal de .container */
.hero { padding-top: 28px; padding-bottom: 8px; }
.hero .hello {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 4px;
}
.hero h1 {
  font-size: clamp(32px, 9vw, 44px);
  line-height: 1.04;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--ink);
}
.hero h1 em {
  font-style: normal;
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  padding: 0 10px 2px;
  transform: rotate(-1.2deg);
  /* effet surligneur : se déploie de gauche à droite au chargement */
  animation: marker 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
@keyframes marker {
  from { clip-path: inset(0 100% 0 0 round 12px); }
  to { clip-path: inset(0 0 0 0 round 12px); }
}
.hero p.lead {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 430px;
}

/* ── Barre « examiner mon site » (façon barre de recherche) ── */
.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: var(--r-pill);
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
}
.searchbar:focus-within { border-color: var(--ink); }
.searchbar .fa-magnifying-glass { color: var(--soft); font-size: 15px; }
.searchbar input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 10px 0;
}
.searchbar input::placeholder { color: var(--soft); }
.searchbar button {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.searchbar button:hover { background: var(--ink-2); transform: scale(1.05); }
.searchbar button:active { transform: scale(0.94); }
.searchbar button:disabled { opacity: 0.7; cursor: wait; transform: none; }
.searchbar button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* halo discret pour attirer l'œil au chargement (3 pulsations puis stop) */
.hero .searchbar button { animation: halo 2s ease-out 1.2s 3; }
@keyframes halo {
  0% { box-shadow: 0 0 0 0 rgba(23, 22, 27, 0.35); }
  70% { box-shadow: 0 0 0 12px rgba(23, 22, 27, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 22, 27, 0); }
}

.trust-note {
  font-size: 13px;
  color: var(--soft);
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.trust-note i { color: var(--vital); font-size: 12px; }

/* ── Chips scrollables ──────────────────────────────────────── */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 18px 6px;
  margin: 0 -18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  white-space: nowrap;
}
.chip i { font-size: 12px; }
.chip.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ── Cartes ─────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.card h2 svg, .card h2 i { color: var(--ink); flex-shrink: 0; font-size: 17px; }

/* carte sombre « vitrine » */
.card.ink {
  background: var(--ink);
  color: #f5f4ef;
}
.card.ink h2 { color: #fff; }
.card.ink h2 svg, .card.ink h2 i { color: #fff; }
.card.ink p { color: #b9b7c0; }

/* ── Boutons pilule (signature : pastille-chevron) ──────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 8px 8px 26px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-body);
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--ink-2); transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(23, 22, 27, 0.45); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn:disabled { opacity: 0.65; cursor: wait; transform: none; }
.btn .orb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.btn:hover .orb { transform: translateX(3px); }
.btn-block { width: 100%; justify-content: space-between; }
/* bouton sans pastille (formulaires simples) */
.btn.plain { padding: 8px 26px; justify-content: center; }
/* bouton inversé sur fond sombre */
.btn.light { background: #fff; color: var(--ink); }
.btn.light .orb { background: var(--ink); color: #fff; }
.btn.light:hover { background: #f1efe9; }

.form-error { color: var(--fail); font-size: 14px; font-weight: 600; min-height: 20px; margin: 6px 0 0; }

/* ── Reprise d'examen (analyse en cours) ────────────────────── */
.resume-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-top: 14px;
  text-decoration: none;
}
.resume-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.resume-txt strong { font-size: 15px; color: var(--ink); }
.resume-txt span { font-size: 13px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.resume-btn i { font-size: 12px; }

/* ── Historique des check-ups ───────────────────────────────── */
.hist-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin: 8px 0 14px;
}
.hist-card { padding: 6px 20px; }
.hist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f0eee8;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.hist-row:hover { transform: translateX(3px); }
.hist-row:active { transform: scale(0.98); }
.hist-row:last-child { border-bottom: none; }
.hist-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  min-width: 48px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hist-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hist-info strong { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-info small { font-size: 12px; color: var(--soft); }
.hist-row > i { color: var(--soft); font-size: 12px; }

/* ── Quota atteint ──────────────────────────────────────────── */
.quota-card { text-align: center; margin-top: 14px; }
.quota-card h2 { flex-direction: column; justify-content: center; gap: 10px; }
.quota-card h2 i { font-size: 24px; }
.quota-card .btn { margin-top: 2px; }

/* ── Pastille « analyse en direct » sur le dock ─────────────── */
.dock a { position: relative; }
.live-dot {
  position: absolute;
  top: 7px;
  right: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vital);
  box-shadow: 0 0 0 2px var(--ink);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.7; }
}

/* ── Étapes (comment ça marche) ─────────────────────────────── */
.steps { padding-top: 10px; padding-bottom: 28px; }
.steps h2 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 18px; }
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { margin: 2px 0 3px; font-size: 16px; color: var(--ink); }
.step p { margin: 0; font-size: 14px; color: var(--muted); }

/* ── Diagnostic : carte hero ────────────────────────────────── */
.diag-hero { padding: 20px 20px 24px; }
.diag-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.diag-face { width: 40px; flex-shrink: 0; display: flex; align-items: center; }
.diag-face img { display: block; width: 40px; height: auto; }
.diag-title { min-width: 0; display: flex; flex-direction: column; }
.diag-title strong {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#diag-step { font-size: 13px; color: var(--soft); }
.diag-bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: #edebe3;
  overflow: hidden;
  margin-bottom: 20px;
  transition: opacity 0.5s ease, height 0.4s ease 0.4s, margin-bottom 0.4s ease 0.4s;
}
.diag-bar i {
  display: block;
  height: 100%;
  width: 3%;
  border-radius: var(--r-pill);
  transition: width 0.5s ease;
  /* rayures animées : l'examen « travaille » */
  background: repeating-linear-gradient(
    -55deg,
    var(--ink) 0 8px,
    #3a3941 8px 16px
  );
  background-size: 200% 100%;
  animation: stripes 1.1s linear infinite;
}
@keyframes stripes {
  to { background-position: 22.6px 0; }
}
.diag-bar.done { opacity: 0; height: 0; margin-bottom: 8px; }
.diag-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.diag-hero .gauge-wrap { width: 150px; height: 150px; margin: 0; flex-shrink: 0; }
.diag-hero .mood-label { margin-top: 16px; }

/* jauge en mode scan (pendant l'examen) */
.gauge-scan {
  fill: none;
  stroke: var(--ink);
  stroke-width: 12;
  stroke-linecap: round;
  opacity: 0.75;
  transform-origin: center;
  animation: spin 1.5s linear infinite;
}
.scan-pct { color: var(--soft); }

/* mini-téléphone : l'aperçu apparaît, sans un mot */
.phone-mini {
  position: relative;
  width: 104px;
  height: 212px;
  border: 6px solid var(--ink);
  border-radius: 22px;
  background: #eceae2;
  overflow: hidden;
  flex-shrink: 0;
}
.phone-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  animation: rise 0.6s ease both;
}
.scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 38%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(13, 160, 95, 0.1) 35%,
    rgba(13, 160, 95, 0.45) 50%,
    rgba(13, 160, 95, 0.1) 65%,
    transparent
  );
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan {
  0% { top: -40%; }
  50% { top: 100%; }
  100% { top: -40%; }
}

/* ── Examen ciblé ───────────────────────────────────────────── */
.focus-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
  background: #eae8df;
  border-radius: var(--r-pill);
  padding: 10px 18px;
  margin-bottom: 14px;
  animation: rise 0.5s ease both;
}
.focus-note strong { color: var(--ink); }
.focus-note a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.focus-note a i { font-size: 11px; }
.phone-mini.phone-big { width: 150px; height: 306px; border-radius: 30px; border-width: 8px; }

/* ── Partage du diagnostic ──────────────────────────────────── */
.share-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.share-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.share-chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.share-chip:active { transform: scale(0.96); }
.share-chip i { font-size: 12px; }

/* ── Évolution du score ─────────────────────────────────────── */
.delta {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  margin: 6px 0 0;
}
.delta.up { color: var(--ok); }
.delta.down { color: var(--fail); }
.delta.flat { color: var(--soft); }

/* ── Le match (comparaison concurrent) ──────────────────────── */
.vs-card { text-align: center; }
.vs-card h2 { justify-content: center; }
.vs-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 6px 0 14px;
}
.vs-col {
  flex: 1;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 8px;
  border-radius: var(--r-md);
  background: #faf9f6;
}
.vs-col.lead { background: var(--bg); outline: 2px solid var(--ink); }
.vs-score {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.vs-host {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vs-vs {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--soft);
  flex-shrink: 0;
}
.vs-verdict { font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.vs-back { font-size: 13px; margin: 0; }
.vs-back a { color: var(--muted); }

/* ── Tuiles de constat (remplies en continu) ────────────────── */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
/* entonnoir : 3 étapes côte à côte (Trouvé → Convaincu → Action) */
.tiles.tiles-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .tiles.tiles-3 { grid-template-columns: 1fr; } }
.tile {
  background: var(--card);
  border: none;
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 15px 14px;
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 118px;
  transition: transform 0.15s ease, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tile:not(.loading):not(:disabled):hover { transform: translateY(-2px); }
.tile:not(.loading):not(:disabled):active { transform: scale(0.97); }
.tile:disabled { cursor: default; }
.tile.expanded { outline: 2px solid var(--ink); }
/* apparition en cascade au chargement */
.tiles .tile:nth-child(1) { animation-delay: 0.04s; }
.tiles .tile:nth-child(2) { animation-delay: 0.1s; }
.tiles .tile:nth-child(3) { animation-delay: 0.16s; }
.tiles .tile:nth-child(4) { animation-delay: 0.22s; }
/* petit « pop » quand une tuile reçoit son résultat */
.tile.filled { animation: tilepop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes tilepop {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.tile.filled .t-badge { animation: badgepop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both; }
@keyframes badgepop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.tile > i {
  font-size: 14px;
  color: var(--ink);
  width: 30px;
  height: 30px;
  background: var(--bg);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.t-label { font-size: 12.5px; font-weight: 600; color: var(--soft); }
.t-value {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  max-width: 100%;
}
.t-value.long { font-size: 16px; }
.t-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}
.t-badge.ok { background: #d9f3e6; color: #06673c; }
.t-badge.warn { background: #fcefd7; color: #8a5a07; }
.t-badge.fail { background: #fde2e2; color: #9b2222; }
.t-badge.neutral { background: #eceae3; color: #595762; }

/* squelettes pendant le chargement */
.sk, .sk-badge {
  display: inline-block;
  background: #edebe3;
  border-radius: 8px;
  animation: skpulse 1.2s ease-in-out infinite;
}
.sk { width: 64px; height: 18px; }
.sk-badge { width: 76px; height: 19px; border-radius: var(--r-pill); }
@keyframes skpulse {
  50% { opacity: 0.45; }
}

.tile-detail { animation: rise 0.4s ease both; }
.tile-detail h2 { margin-bottom: 12px; }

/* lignes web vitals (détail vitesse) */
.vital {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0eee8;
  font-size: 14.5px;
  font-weight: 600;
}
.vital:last-of-type { border-bottom: none; }
.vital strong { font-family: var(--font-display); font-size: 16px; letter-spacing: -0.01em; }

/* opportunités Lighthouse vulgarisées */
.opp-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 16px 0 6px;
}
.opp {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0eee8;
  font-size: 14px;
}
.opp:last-of-type { border-bottom: none; }
.opp i { color: var(--warn); font-size: 12px; flex-shrink: 0; }
.opp span { flex: 1; }
.opp em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--vital);
  white-space: nowrap;
}

/* ── Ordonnance : bouton « voir plus » ──────────────────────── */
.todo-toggle {
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  padding: 12px 0 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.todo-toggle i { font-size: 11px; }

/* ── Carte d'action unique (email ou RDV) ───────────────────── */
.cta-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #76747e;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 20px 0 16px;
}
.cta-or::before, .cta-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.cta-panel .btn.light { width: 100%; justify-content: space-between; }
.cta-note { font-size: 12.5px; color: #9a98a3; margin: 12px 0 0; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(23, 22, 27, 0.18);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
.spinner.light { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Jauge de score ─────────────────────────────────────────── */
.gauge-wrap { position: relative; width: 176px; height: 176px; margin: 10px auto; }
.gauge-wrap svg.gauge { transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: #edebe3; stroke-width: 12; }
.gauge-val {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gauge-score { font-family: var(--font-display); font-size: 42px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.gauge-label { font-size: 12px; color: var(--soft); font-weight: 600; }
.mood-label { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin: 10px 0 2px; color: var(--ink); }
.mood-sub { font-size: 14px; color: var(--muted); margin: 0; }

/* ── Lignes de diagnostic ───────────────────────────────────── */
.diag-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f0eee8;
  font-size: 15px;
}
.diag-row:last-child { border-bottom: none; }
.diag-icon { flex-shrink: 0; margin-top: 2px; font-size: 17px; }
.diag-icon.ok { color: var(--ok); }
.diag-icon.warn { color: var(--warn); }
.diag-icon.fail { color: var(--fail); }
.diag-row .detail { display: block; font-size: 13px; color: var(--soft); margin-top: 2px; }

/* ── Barres de mesure ───────────────────────────────────────── */
.metric { margin-bottom: 14px; }
.metric-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.metric-bar { height: 12px; border-radius: var(--r-pill); background: #edebe3; overflow: hidden; }
.metric-fill { height: 100%; border-radius: var(--r-pill); transition: width 1s ease; }

/* ── Ordonnance ─────────────────────────────────────────────── */
.todo {
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #faf9f6;
  border: 1px solid #f0eee8;
  border-left: 4px solid var(--soft);
}
.todo.haute { border-left-color: var(--fail); }
.todo.moyenne { border-left-color: var(--warn); }
.todo.basse { border-left-color: var(--ink); }
.todo .pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  padding: 3px 11px;
  border-radius: var(--r-pill);
}
.todo.haute .pill { background: var(--fail); }
.todo.moyenne .pill { background: var(--warn); }
.todo.basse .pill { background: var(--ink); }
.todo h3 { font-size: 15px; margin: 8px 0 4px; color: var(--ink); }
.todo p { font-size: 14px; color: var(--muted); margin: 0; }

/* ── Panneau CTA (email) ────────────────────────────────────── */
.cta-panel {
  background: var(--ink);
  color: #f5f4ef;
  text-align: center;
}
.cta-panel h2 { color: #fff; justify-content: center; }
.cta-panel h2 i { color: #fff; }
.cta-panel p { color: #b9b7c0; font-size: 15px; margin: 0 0 18px; }
.cta-panel .searchbar { box-shadow: none; }
.cta-panel .form-error { color: #fca5a5; }
.cta-panel .success { font-weight: 700; font-size: 16px; color: #fff; }

/* ── RDV ────────────────────────────────────────────────────── */
.day-group h3 {
  font-size: 15px;
  text-transform: capitalize;
  margin: 18px 0 10px;
  color: var(--ink);
}
.day-group:first-child h3 { margin-top: 0; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot-btn {
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.slot-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.slot-btn:active { transform: scale(0.95); }
.slot-btn.selected { background: var(--ink); border-color: var(--ink); color: #fff; animation: tilepop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-body);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); }

.confirm-box { text-align: center; padding: 30px 20px; }
.confirm-box .when {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  text-transform: capitalize;
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 16px;
  margin: 16px 0;
}

/* ── Admin ──────────────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-tab {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-body);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.admin-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left;
  padding: 8px 6px;
  color: var(--soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-table td { padding: 10px 6px; border-top: 1px solid #f0eee8; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.tag.open { background: #d9f3e6; color: #06673c; }
.tag.booked { background: #fde2e2; color: #9b2222; }
.tag.closed { background: #eceae3; color: #595762; }
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--soft);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
}
.icon-btn:hover { color: var(--fail); }
.days-row { display: flex; gap: 6px; flex-wrap: wrap; }
.days-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 7px 11px;
  cursor: pointer;
  background: #fff;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Liste de contenu du kit (carte d'achat) ────────────────── */
.kit-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  text-align: left;
}
.kit-list li {
  position: relative;
  padding: 5px 0 5px 26px;
  font-size: 14.5px;
  color: #d6d4dc;
  line-height: 1.45;
}
.kit-list li::before {
  content: '\2713';
  position: absolute;
  left: 2px;
  color: var(--vital);
  font-weight: 800;
}

/* ── Espace patient : navigation + progression ──────────────── */
.space-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 18px 10px;
  margin: 0 -18px 4px;
  background: rgba(242, 240, 234, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  scrollbar-width: none;
}
.space-nav::-webkit-scrollbar { display: none; }
.space-nav .chip { text-decoration: none; cursor: pointer; }

.apply-progress { margin-top: 4px; }
.apply-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.apply-progress-head strong { font-family: var(--font-display); color: var(--ink); }
.apply-bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: #edebe3;
  overflow: hidden;
}
.apply-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--vital);
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
}

.remedy-actions { display: inline-flex; gap: 6px; flex-shrink: 0; }
.apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--soft);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.apply-btn:hover { border-color: var(--vital); color: var(--vital); }
.apply-btn:active { transform: scale(0.95); }
.apply-btn.on { background: #d9f3e6; border-color: var(--vital); color: #06673c; }

.kw-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.kw {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 12px;
}

.plan-week { margin-bottom: 14px; }
.plan-week:last-child { margin-bottom: 0; }
.plan-week-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft);
  margin: 0 0 6px;
}
.plan-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--ink);
  background: #faf9f6;
  border: 1px solid #f0eee8;
  border-radius: 14px;
  padding: 11px 14px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.plan-item i { margin-top: 2px; color: var(--soft); }
.plan-item:hover { border-color: var(--vital); }
.plan-item:active { transform: scale(0.99); }
.plan-item.on { background: #f0faf4; border-color: var(--vital); }
.plan-item.on i { color: var(--vital); }
.plan-item.on span { text-decoration: line-through; text-decoration-color: rgba(13, 160, 95, 0.5); color: var(--muted); }

/* ── Espace patient : remèdes + surveillance ────────────────── */
.remedy {
  background: #faf9f6;
  border: 1px solid #f0eee8;
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.remedy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.remedy-head > span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.remedy-src {
  text-transform: none !important;
  letter-spacing: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.copy-btn:hover { border-color: var(--ink); }
.copy-btn:active { transform: scale(0.95); }
.copy-btn.done { background: var(--vital); border-color: var(--vital); color: #fff; }
.remedy-text {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}
.remedy-alt { margin: 6px 0 0; font-size: 13px; color: var(--soft); }
.remedy-code {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.watch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f0eee8;
}
.watch-row:last-child { border-bottom: none; }
.watch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.watch-dot.ok { background: var(--ok); }
.watch-dot.alerte { background: var(--warn); }
.watch-dot.panne { background: var(--fail); }
.watch-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.watch-info strong { font-family: var(--font-display); font-size: 15px; color: var(--ink); }
.watch-info small { font-size: 12.5px; color: var(--muted); }
.watch-date { font-size: 12px; color: var(--soft); flex-shrink: 0; }

/* ── Barre de navigation flottante (mobile) ─────────────────── */
.dock {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  border-radius: var(--r-pill);
  padding: 8px;
  box-shadow: var(--shadow-dock);
}
.dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 52px;
  border-radius: var(--r-pill);
  color: #9a98a3;
  text-decoration: none;
  font-size: 17px;
  gap: 3px;
  transition: color 0.2s, background-color 0.25s, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.dock a:active { transform: scale(0.92); }
.dock a small { font-size: 9.5px; font-weight: 600; letter-spacing: 0.01em; }
.dock a:hover { color: #fff; }
.dock a.active {
  background: #fff;
  color: var(--ink);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  margin: 36px 18px 0;
  background: var(--ink);
  border-radius: var(--r-lg);
  color: #b9b7c0;
  padding: 30px 24px 26px;
}
.f-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.f-brand .f-logo {
  height: 40px;
  width: auto;
  filter: invert(1);
  opacity: 0.95;
  flex-shrink: 0;
}
.f-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  margin: 0;
}
.f-tag { font-size: 13.5px; margin: 2px 0 0; line-height: 1.4; }
.f-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.f-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #d6d4dc;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  padding: 14px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  transition: color 0.2s;
}
.f-nav a:hover { color: #fff; }
.f-nav a i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.f-nav a .f-go { margin-left: auto; opacity: 0.45; font-size: 12px; background: none; width: auto; height: auto; }
.f-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.f-icons { display: flex; gap: 8px; }
.f-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.15s ease;
}
.f-icons a:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.f-copy { font-size: 12px; color: #9b99a4; margin: 0; }
.f-legal { display: flex; gap: 14px; flex-wrap: wrap; }
.f-legal a { color: #b9b7c0; font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
.f-legal a:hover { color: #fff; }

/* ── Utilitaires ────────────────────────────────────────────── */
.hidden { display: none !important; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.section-pad { padding-top: 22px; padding-bottom: 36px; }

/* ── ≥ 700px : la barre flottante disparaît, on respire ─────── */
@media (min-width: 700px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .hero { padding-top: 44px; }
  .chips { flex-wrap: wrap; overflow: visible; }
  .slot-grid { grid-template-columns: repeat(4, 1fr); }
  .site-footer { margin: 48px auto 28px; max-width: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   Accessibilité : focus clavier visible sur TOUS les éléments
   interactifs (tuiles, chips, créneaux, dock, copier, admin…)
   ════════════════════════════════════════════════════════════════ */
.tile:focus-visible,
.chip:focus-visible,
.slot-btn:focus-visible,
.dock a:focus-visible,
.share-chip:focus-visible,
.copy-btn:focus-visible,
.apply-btn:focus-visible,
.plan-item:focus-visible,
.admin-tab:focus-visible,
.icon-btn:focus-visible,
.btn:focus-visible,
.todo-toggle:focus-visible,
.header-cta:focus-visible,
.f-nav a:focus-visible,
.f-icons a:focus-visible,
.f-legal a:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.dock a:focus-visible,
.f-icons a:focus-visible,
.f-nav a:focus-visible,
.f-legal a:focus-visible,
.btn.light:focus-visible {
  outline-color: #fff; /* éléments sur fond sombre */
}

/* ── Pages légales ── */
.legal .legal-title {
  font-size: 26px;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
}
.legal h2 {
  font-size: 17px;
  margin: 22px 0 8px;
}
.legal p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 10px;
}
.legal .legal-meta {
  font-size: 13px;
  color: var(--soft);
}

/* ── Cadrage « objectif du site » dans l'ordonnance ── */
.goal-lead { margin: 0 0 16px; }
.goal-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  border-radius: var(--r-pill);
  padding: 6px 14px;
}
.goal-tag i { font-size: 12px; }
.goal-sub {
  display: block;
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 10px;
}
