/* Anatomo, site vitrine. Tokens de design/DESIGN.md (direction « Standard de la catégorie »). */
:root {
  color-scheme: dark;
  --tint: #0a84ff;
  /* Fond des boutons : même bleu, assombri pour tenir 4,5:1 avec le texte blanc. */
  --tint-fill: #0071e3;
  --scene: #111316;
  --bg: #000;
  --grouped: #1c1c1e;
  --cell: #2c2c2e;
  --label: #fff;
  --label-2: rgba(235, 235, 245, 0.62);
  /* label-tertiary de DESIGN.md (.34) relevé à .5 pour tenir 4,5:1 sur le web. */
  --label-3: rgba(235, 235, 245, 0.5);
  --fill: rgba(118, 118, 128, 0.24);
  --separator: rgba(84, 84, 88, 0.6);
  --control: rgba(44, 44, 46, 0.94);
  --sheet: rgba(28, 28, 30, 0.9);
  --success: #30d158;
  --error: #ff453a;
  --os: #d6c9a8;
  --muscle: #c4594d;
  --artere: #ff453a;
  --veine: #4a84ff;
  --saillie: #f5a623;
  --articulaire: #2bb0e8;
  --depression: #5cbf5c;
  --repere: #d08ed6;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --gutter: max(20px, calc((100vw - 1120px) / 2));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #48484a var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--tint);
}
::selection { background: rgba(10, 132, 255, 0.45); color: #fff; }
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.prose { max-width: 680px; }

/* En-tête : barre translucide, posée sur l'atlas en page d'accueil. */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.is-index .top { position: absolute; left: 0; right: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.is-index .top .wrap { max-width: none; padding-inline: 32px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--label); font: 600 19px/1 var(--display); }
.brand:hover { text-decoration: none; }
.brand img { width: auto; height: 30px; }
.nav { display: flex; gap: 24px; font-size: 15px; }
.nav a { color: var(--label-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--label); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border: 0; border-radius: 12px;
  background: var(--tint-fill); color: #fff; font-weight: 600; font-size: 17px; white-space: nowrap; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.is-soon { background: var(--cell); color: var(--label); cursor: default; }
.btn.is-soon:hover { filter: none; }
.btn.is-soon svg { width: 18px; height: 18px; fill: currentColor; }
.btn.small { height: 36px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.btn.plain { background: var(--fill); color: var(--label); }

/* ---------- Atlas plein cadre (accueil) ---------- */
.atlas { position: relative; background: var(--scene); overflow: hidden; }
.atlas-scene { position: relative; height: max(640px, min(100svh, 62.5vw)); }
.atlas-img, .atlas-mask {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focus, 50% 38%);
}
.atlas-img { transition: opacity 0.35s ease; }
.atlas-mask { pointer-events: none; }
.atlas.is-loading .atlas-img { opacity: 0.4; }
.js .atlas-scene { cursor: crosshair; }
.js [data-mode="quiz"] .atlas-scene { cursor: pointer; }
.atlas-scene::before, .atlas-scene::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }
.atlas-scene::before { top: 0; height: 140px; background: linear-gradient(var(--scene), rgba(17, 19, 22, 0)); }
.atlas-scene::after { bottom: 0; height: 200px; background: linear-gradient(rgba(17, 19, 22, 0), var(--scene)); }

.atlas-title {
  position: absolute; z-index: 21; top: 18px; left: 50%; transform: translateX(-50%);
  text-align: center; font: 600 17px/1.25 var(--font); pointer-events: none; white-space: nowrap;
}
.atlas-title small { display: block; font-size: 12px; font-weight: 400; color: var(--label-2); margin-top: 2px; }

/* Calques : pastilles de systèmes à gauche, comme le bouton « Tout afficher » de l'app. */
.layers { position: absolute; z-index: 2; left: 32px; top: 50%; transform: translateY(-62%); display: flex; flex-direction: column; gap: 8px; }
.layer {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px 0 13px;
  border: 0; border-radius: 19px; background: var(--control); box-shadow: var(--shadow);
  font-size: 15px; font-weight: 500; cursor: pointer; width: max-content;
}
.layer i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); }
.layer[aria-checked="true"] { background: #fff; color: #000; }
.layer[aria-checked="true"] i { box-shadow: 0 0 0 1.5px #000; }
.layer:hover { filter: brightness(1.15); }

/* Étiquette qui suit le pointeur, avec son filet. */
.tip {
  position: absolute; z-index: 3; left: 0; top: 0; margin: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; max-width: 300px;
  padding: 7px 12px; border-radius: 10px; background: var(--control); box-shadow: var(--shadow);
  font-size: 15px; font-weight: 600; line-height: 1.25;
  transform: translate(var(--x, 0), var(--y, 0)) translate(14px, -50%);
  opacity: 0; transition: opacity 0.15s;
}
.tip.is-left { transform: translate(var(--x, 0), var(--y, 0)) translate(calc(-100% - 14px), -50%); }
.tip.is-on { opacity: 1; }
.tip i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--tint)); }
.tip.is-good { background: #14351f; }
.tip.is-good i { background: var(--success); }
.tip.is-bad { background: #3d1513; }
.tip.is-bad i { background: var(--error); }

/* Question du quiz, à la place du titre. */
.prompt {
  position: absolute; z-index: 22; top: 92px; left: 50%; transform: translateX(-50%);
  display: none; flex-direction: column; align-items: center; gap: 4px; width: max-content; max-width: calc(100% - 40px);
  padding: 12px 22px 14px; border-radius: 14px; background: var(--control); box-shadow: var(--shadow); text-align: center;
}
.prompt span { font-size: 13px; color: var(--label-2); }
.prompt strong { font: 700 24px/1.2 var(--display); }
[data-mode="quiz"] .prompt { display: flex; animation: drop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } }

/* Feuille du bas. */
.sheet {
  position: relative; z-index: 4; width: min(960px, calc(100% - 40px)); margin: -230px auto 0;
  padding: 10px 32px 28px; border-radius: 18px;
  background: var(--sheet); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
  display: grid; grid-template-columns: 1fr auto; gap: 6px 40px; align-items: end;
}
.grab { grid-column: 1 / -1; width: 36px; height: 5px; border-radius: 3px; background: rgba(235, 235, 245, 0.3); margin: 0 auto 10px; }
.sheet h1 { margin: 0; font: 700 clamp(34px, 4.2vw, 48px)/1.04 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.sheet p { margin: 10px 0 0; color: var(--label-2); max-width: 48ch; }
.sheet .actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.explore-line, .quiz-line { min-height: 3em; }
.quiz-line { display: none; }
[data-mode="quiz"] .explore-line { display: none; }
[data-mode="quiz"] .quiz-line { display: block; }
.quiz-line b { color: var(--label); font-weight: 600; }
.quiz-line .btn { margin-left: 4px; vertical-align: middle; }

.seg { display: none; padding: 2px; border-radius: 9px; background: var(--fill); }
.js .seg { display: grid; grid-template-columns: 1fr 1fr; }
.seg button { height: 32px; border: 0; border-radius: 7px; background: none; font-size: 15px; font-weight: 500; cursor: pointer; padding: 0 18px; }
.seg button[aria-pressed="true"] { background: #636366; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12); font-weight: 600; }

.atlas-foot { padding: 22px 0 64px; text-align: center; color: var(--label-3); font-size: 13px; }

/* ---------- Sections ---------- */
.band { padding: 120px 0; }
.band + .band { border-top: 0.5px solid var(--separator); }
h2 { font: 700 clamp(30px, 3.6vw, 40px)/1.1 var(--display); letter-spacing: -0.02em; margin: 0 0 18px; text-wrap: balance; }
.band p { color: var(--label-2); margin: 0 0 16px; max-width: 46ch; }
.band p strong { color: var(--label); font-weight: 600; }

/* Quiz : grande question typographique. */
.quiz-band { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ask { margin: 0; padding: 0; list-style: none; font: 700 clamp(28px, 3.4vw, 40px)/1.15 var(--display); letter-spacing: -0.02em; }
.ask li { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 0.5px solid var(--separator); }
.ask li:first-child { border-top: 0.5px solid var(--separator); }
.ask small { flex: none; width: 70px; font: 600 13px/1 var(--font); letter-spacing: 0; }
.ask .ok small { color: var(--success); }
.ask .ko small { color: var(--error); }
.ask .ko span { color: var(--label-3); text-decoration: line-through 2px var(--error); }
.ask .next small { color: var(--label-3); }
.ask .next span { color: var(--label-3); }

/* Repères : planche + légende. */
.plate { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 72px; align-items: center; }
.plate figure { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: var(--scene); }
.ring {
  position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 2.5px solid var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, background 0.2s;
}
.ring.is-on { transform: scale(1.5); background: color-mix(in srgb, var(--c) 30%, transparent); }
.marks { margin: 24px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 28px; font-size: 15px; }
.marks li { break-inside: avoid; display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 0.5px solid var(--separator); cursor: default; }
.marks i { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c); }
.marks li:hover, .marks li.is-on { color: var(--label); }
.marks li { color: var(--label-2); }
.band .kinds { display: flex; max-width: none; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 13px; color: var(--label-3); }
.kinds span { display: inline-flex; align-items: center; gap: 6px; }
.kinds i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* Recherche : champ iOS et résultats. */
.names { display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: 72px; align-items: center; }
.search { background: var(--grouped); border-radius: 14px; padding: 14px; }
.field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: 10px; background: var(--fill); color: var(--label); }
.field svg { width: 17px; height: 17px; fill: var(--label-2); flex: none; }
.field .caret { width: 2px; height: 20px; background: var(--tint); margin-left: -6px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.results { list-style: none; margin: 10px 0 0; padding: 0; }
.results li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 6px; border-bottom: 0.5px solid var(--separator); }
.results li:last-child { border-bottom: 0; }
.results b { font-weight: 600; color: var(--label); }
.results span { display: block; font-size: 13px; color: var(--label-2); }
.results code { font: 500 12px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--label-3); white-space: nowrap; }
.results mark { background: none; color: var(--tint); }
.results i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 10px; }
.results div { display: flex; align-items: center; }

/* Le reste : liste groupée iOS. */
.list { display: grid; grid-template-columns: 300px 1fr; gap: 72px; align-items: start; }
.rows { margin: 0; padding: 0; list-style: none; background: var(--grouped); border-radius: 14px; overflow: hidden; }
.rows li { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 16px 20px; border-bottom: 0.5px solid var(--separator); }
.rows li:last-child { border-bottom: 0; }
.rows b { font-weight: 600; }
.rows span { color: var(--label-2); font-size: 16px; }

.closing { text-align: center; padding: 140px 0 120px; }
.closing h2 { font-size: clamp(36px, 5vw, 56px); }
.closing p { margin: 0 auto 32px; max-width: 40ch; color: var(--label-2); }
.closing .cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Pages de service ---------- */
.page { padding-block: 56px 80px; }
.page h1 { font: 700 clamp(32px, 5vw, 40px)/1.1 var(--display); letter-spacing: -0.02em; margin: 0 0 20px; }
.page h2 { font: 600 22px/1.3 var(--display); letter-spacing: 0; margin: 40px 0 10px; }
.page h3 { font: 600 17px/1.3 var(--font); margin: 24px 0 6px; }
.page p, .page li { color: var(--label-2); }
.page strong { color: var(--label); font-weight: 600; }
.page ul { padding-left: 20px; }
.page li { margin: 6px 0; }
.updated { color: var(--label-3); font-size: 15px; margin-top: -8px; }
.box { background: var(--grouped); border-radius: 12px; padding: 16px 18px; margin: 20px 0; }
.box p { margin: 0; }
.box.warn { background: #2b2210; }
dl.faq dt { color: var(--label); font-weight: 600; margin-top: 22px; }
dl.faq dd { margin: 6px 0 0; color: var(--label-2); }

footer { border-top: 0.5px solid var(--separator); padding: 28px 0 40px; color: var(--label-3); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { color: var(--label-2); }

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

@media (max-width: 900px) {
  .quiz-band, .plate, .names, .list { grid-template-columns: 1fr; gap: 40px; }
  .plate figure { max-width: 300px; margin-inline: auto; }
  .rows li { grid-template-columns: 1fr; gap: 2px; }
  .band { padding: 80px 0; }
}

@media (max-width: 1100px) {
  .atlas-title { display: none; }
}

@media (max-width: 760px) {
  .sheet h1 { font-size: 30px; }
  .wrap { padding-inline: 16px; }
  .nav { gap: 18px; }
  .nav .hide-sm { display: none; }
  .is-index .top .wrap { padding-inline: 16px; height: 60px; }
  .atlas-scene { height: 50svh; min-height: 380px; --focus: 46% 30%; }
  .layers { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 40px; }
  .layers { left: 0; right: 0; top: auto; bottom: 20px; transform: none; flex-direction: row; gap: 6px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .layer { height: 34px; padding: 0 13px 0 11px; font-size: 14px; flex: none; }
  .prompt { top: 70px; }
  .prompt strong { font-size: 20px; }
  .sheet { width: auto; margin: 0 16px; padding: 10px 20px 22px; grid-template-columns: 1fr; gap: 16px; }
  .marks { columns: 1; }
  .page { padding-block: 40px 56px; }
  .closing { padding: 96px 0 88px; }
}

@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {
  .atlas-scene { height: 58svh; --focus: 42% 30%; }
  .sheet { width: auto; margin: 0 24px; }
}

.example { display: inline-block; margin-bottom: 10px; padding: 2px 8px; border-radius: 6px; background: var(--fill); color: var(--label-2); font-size: 12px; font-weight: 600; }

/* Calques et modes n'apparaissent qu'une fois les noms chargés (sans JS : image fixe). */
.atlas:not(.is-ready) .layers, .atlas:not(.is-ready) .seg, .atlas:not(.is-ready) .tip { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.band .search p { margin: 0; max-width: none; }
.band .search .olds { margin: 12px 6px 2px; font-size: 13px; color: var(--label-3); }
.js-only { display: none; }
.js .js-only { display: inline-flex; }
