/*
 * Site vitrine d'Anatomind, sur le design system de l'app (tokens.css, copié tel quel à côté) :
 * aucune couleur, taille, rayon ni durée en dur hors des variables, sauf les tailles de titre du
 * site, plus grandes que celles de l'app sur ordinateur. Mise en page inspirée du site de Tekio
 * (`~/Business/Dev/Tekio/website/src/site.css`, commit `19d6630e`).
 */

/* ——— Ce que tokens.css règle pour l'app et qu'une page web défait ——— */
html,
body {
  height: auto;
}

html {
  scroll-padding-top: calc(var(--nav-height) + var(--space-8));
  -webkit-text-size-adjust: 100%;
}

body {
  overscroll-behavior: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* La lumière de scène : un noir bleuté et une lueur qui tombe du haut. */
  background:
    radial-gradient(120% 52rem at 50% -14rem, color-mix(in srgb, var(--scene-top) 70%, transparent), transparent 70%)
      no-repeat,
    var(--bg);
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page-wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.overline {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.reading {
  font-size: 17px;
  line-height: 27px;
  color: var(--ink-2);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.skip-link:focus {
  top: var(--space-2);
}

/* ——— Boutons ——— */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: 0 var(--space-5);
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
  transition:
    transform var(--dur-1) var(--ease-out),
    background var(--dur-2) var(--ease-out);
}

.button:hover {
  background: var(--accent-strong);
}

.button:active {
  transform: scale(0.97);
}

.button-small {
  min-height: 36px;
  padding: 0 var(--space-4);
  font-size: 14px;
}

.button-secondary {
  background: var(--surface-3);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--separator-strong);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  color: var(--accent);
  font-weight: 700;
}

.text-link .icon {
  width: 18px;
  height: 18px;
  transition: transform var(--dur-2) var(--ease-out);
}

.text-link:hover .icon {
  transform: translateX(3px);
}

/* Boutons des boutiques : pastille « Bientôt » tant que l'app n'est pas publiée. */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.store {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-2) var(--space-5) var(--space-2) var(--space-4);
  border-radius: var(--radius-m);
  background: var(--surface-2);
  box-shadow: var(--card-edge);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 15px;
  line-height: 19px;
}

.store small {
  display: block;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.store .icon {
  width: 22px;
  height: 22px;
  color: var(--ink-3);
}

.store-live {
  background: var(--ink);
  color: var(--bg);
  box-shadow: none;
  transition: transform var(--dur-1) var(--ease-out);
}

.store-live .icon {
  color: var(--bg);
}

.store-live:active {
  transform: scale(0.97);
}

/* ——— En-tête ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--separator);
  padding-top: var(--safe-top);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 50% 30%, var(--accent-strong), var(--scene-top) 80%);
  box-shadow:
    inset 0 0 0 2px var(--accent),
    0 0 14px var(--accent-glow);
}

.header-nav {
  display: none;
  gap: var(--space-1);
  margin-left: var(--space-6);
}

.header-nav a {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  color: var(--ink-3);
  font-size: 15px;
  transition:
    color var(--dur-2) var(--ease-out),
    background var(--dur-2) var(--ease-out);
}

.header-nav a:hover {
  color: var(--ink);
  background: var(--press);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--tap);
  min-height: var(--tap);
  border-radius: var(--radius-full);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 700;
}

.lang-link:hover {
  color: var(--ink);
}

.lang-link .icon {
  width: 16px;
  height: 16px;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }
}

/* Sur les plus petits écrans, les boutons des boutiques suivent juste sous l'en-tête. */
@media (max-width: 359px) {
  .header-actions .button {
    display: none;
  }
}

/* ——— Accueil : en-tête de page ——— */
.hero {
  padding-block: var(--space-10) var(--space-12);
}

.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.hero h1 {
  font-size: clamp(34px, 7.4vw, 60px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero .lead {
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-2);
  max-width: 34em;
  margin-bottom: var(--space-2);
}

.hero-note {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  width: 100%;
}

/* Le corps posé dans la lumière océan de la scène d'Explorer. */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% 4% 4%;
  border-radius: var(--radius-full);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--scene-top) 90%, transparent), transparent);
  filter: blur(8px);
}

.hero-visual img {
  position: relative;
  width: auto;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
}

@media (min-width: 900px) {
  .hero {
    padding-block: var(--space-16);
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

@media (max-width: 899px) {
  .hero-visual {
    max-height: 440px;
  }

  .hero-visual img {
    max-height: 440px;
  }
}

/* ——— Accueil : les trois piliers ——— */
.home-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding-bottom: var(--space-16);
}

.pillar {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-1);
  box-shadow: var(--card-edge);
}

.pillar-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.pillar-scene .pillar-media {
  background: linear-gradient(180deg, var(--scene-top), var(--scene-mid));
}

.pillar-steel .pillar-media {
  background: linear-gradient(180deg, var(--steel-top), var(--steel-mid));
}

.pillar-lesson .pillar-media {
  display: grid;
  place-items: center;
  aspect-ratio: auto;
  padding: var(--space-5);
  background: linear-gradient(180deg, var(--scene-top), var(--scene-mid));
}

/* Image coupée : plein cadre, fondue dans la carte là où elle la touche (design-system.md, « Images »). */
.pillar-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

.pillar-scene .pillar-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, var(--surface-1));
  pointer-events: none;
}

/* Une image entière de la vidéo, montrée comme dans le lecteur 16:9 de l'app. */
.pillar-lesson .pillar-media img {
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--glass-line);
}

/* Rendu entier (l'avatar au squat) : posé « contenu » dans sa scène. */
.pillar-steel .pillar-media img {
  object-fit: contain;
  object-position: 50% 50%;
  padding: var(--space-4);
}

.pillar-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5) var(--space-8);
}

.pillar h2,
.section-head h2,
.section-title,
.cta h2 {
  font-size: clamp(26px, 4.4vw, 36px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.points {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding: 0;
  list-style: none;
}

.points li {
  display: flex;
  gap: var(--space-3);
  font-size: 15px;
  line-height: 21px;
  color: var(--ink-2);
}

.points .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--accent);
}

@media (min-width: 900px) {
  .pillar {
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }

  .pillar-flip .pillar-media {
    order: 2;
  }

  .pillar-media {
    aspect-ratio: auto;
    min-height: 420px;
  }

  .pillar-lesson .pillar-media {
    padding: var(--space-8);
  }

  /* Côte à côte, l'image se fond vers le texte et non plus vers le bas. */
  .pillar-scene .pillar-media::after {
    inset: 0 0 0 auto;
    width: 30%;
    height: auto;
    background: linear-gradient(90deg, transparent, var(--surface-1));
  }

  .pillar-flip.pillar-scene .pillar-media::after {
    inset: 0 auto 0 0;
    background: linear-gradient(270deg, transparent, var(--surface-1));
  }

  .pillar-copy {
    justify-content: center;
    padding: var(--space-10);
  }
}

/* ——— Accueil : l'offre ——— */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 40em;
  margin-bottom: var(--space-6);
}

.plans {
  display: grid;
  gap: var(--space-4);
}

.plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-l);
  background: var(--surface-1);
  box-shadow: var(--card-edge);
}

.plan-paid {
  background:
    radial-gradient(90% 70% at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.plan-name {
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
  color: var(--ink);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--ink-3);
  font-size: 15px;
}

.plan-price b {
  font-size: 34px;
  line-height: 40px;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.offer-note {
  margin-top: var(--space-4);
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
  max-width: 48em;
}

@media (min-width: 768px) {
  .plans {
    grid-template-columns: 1fr 1fr;
  }

  .plan {
    padding: var(--space-8);
  }
}

/* ——— Accueil : les données ——— */
.trust {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.trust-list {
  display: grid;
  gap: var(--space-3);
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-3);
  row-gap: var(--space-1);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background: var(--surface-1);
  box-shadow: var(--card-edge);
}

.trust-list .icon {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.trust-list b {
  font-size: 16px;
  line-height: 22px;
  color: var(--ink);
}

.trust-list span {
  font-size: 14px;
  line-height: 19px;
  color: var(--ink-3);
}

@media (min-width: 900px) {
  .trust-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ——— Accueil : l'appel final ——— */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-12) var(--space-5);
  border-radius: var(--radius-xl);
  text-align: center;
  background:
    radial-gradient(80% 90% at 50% 0%, color-mix(in srgb, var(--scene-top) 85%, transparent), transparent 75%),
    var(--surface-1);
  box-shadow: var(--card-edge);
}

.cta .stores {
  justify-content: center;
  margin-top: var(--space-2);
}

/* ——— Pied de page ——— */
.site-footer {
  border-top: 1px solid var(--separator);
  padding-block: var(--space-10) calc(var(--space-8) + var(--safe-bottom));
  background: var(--bg);
}

.footer-grid {
  display: grid;
  gap: var(--space-8);
}

.footer-brand p {
  margin-top: var(--space-3);
  color: var(--ink-3);
  font-size: 14px;
  line-height: 19px;
  max-width: 22em;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-6);
}

.footer-nav h2 {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--space-2);
}

.footer-nav ul {
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink-2);
  font-size: 14px;
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--separator);
}

.footer-bottom p {
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-3);
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1.6fr;
  }
}

/* ——— Pages légales ——— */
.legal-layout {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-10) var(--space-16);
}

.legal {
  max-width: var(--page-max);
  min-width: 0;
}

.legal-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.legal-head h1 {
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.legal-date {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-3);
}

/* Sans poids de sélecteur : les classes (surtitre, date, cartes) gardent leur propre style. */
:where(.legal) :where(p, li) {
  font-size: 16px;
  line-height: 26px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.legal p + p,
.legal p + ul,
.legal ul + p {
  margin-top: var(--space-3);
}

.legal ul,
.legal ol {
  padding-left: var(--space-5);
}

.legal li + li {
  margin-top: var(--space-2);
}

.legal b {
  color: var(--ink);
}

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 3px;
}

.legal a:hover {
  text-decoration-color: var(--accent);
}

.legal section {
  margin-top: var(--space-10);
}

.legal h2 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: var(--space-3);
}

.legal-num {
  color: var(--ink-3);
}

.legal-summary {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background: var(--surface-1);
  box-shadow: var(--card-edge);
}

.legal-summary ul {
  margin-top: var(--space-3);
}

.legal-toc {
  display: none;
}

.legal-toc ol {
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal-toc li {
  counter-increment: toc;
}

.legal-toc a {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: 14px;
  line-height: 19px;
  color: var(--ink-3);
}

.legal-toc a::before {
  content: counter(toc) ".";
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.legal-toc a:hover {
  color: var(--ink);
}

@media (min-width: 1024px) {
  .legal-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--space-12);
  }

  .legal-layout-single {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-toc {
    display: block;
    position: sticky;
    top: calc(60px + var(--space-8));
    align-self: start;
  }
}

/* Champ que Nicolas doit encore remplir (config.js) : refusé par `build.mjs --release`. */
mark.todo {
  padding: 0 var(--space-1);
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--warning) 20%, transparent);
  color: var(--warning);
  font-weight: 700;
}

/* ——— Suppression du compte : les deux chemins ——— */
.steps {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background: var(--surface-1);
  box-shadow: var(--card-edge);
}

.step-card:first-child {
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.step-head .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.legal .step-head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 24px;
}

.pill {
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.legal .step-list li + li {
  margin-top: var(--space-3);
}

.legal .step-after {
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-3);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

/* ——— Choix de la langue et 404 ——— */
.chooser-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  min-height: 100vh;
  padding: var(--space-8) var(--gutter);
  text-align: center;
}

.chooser-main .brand {
  font-size: 28px;
}

.chooser-main .brand-mark {
  width: 30px;
  height: 30px;
}

.chooser-main h1 {
  font-size: 28px;
  line-height: 34px;
}

.chooser-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}
