/* Mona Sans (SIL OFL 1.1), servie depuis ce site : aucune requête vers Google. Axes largeur et graisse. */
@font-face {
  font-family: "Mona Sans";
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url(/fonts/mona-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Mona Sans";
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url(/fonts/mona-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Le champ d'un microscope à fluorescence : fond noir, la lumière vient des atomes.
   Les couleurs vives n'existent que dans la scène ; la page reste en blancs froids. */
:root {
  --void: #05060c;
  --ink: #eef1ff;
  --text: #cfd5ec;
  --mute: #98a1c4;
  --line: rgba(220, 227, 255, 0.14);
  --glass: rgba(11, 13, 26, 0.58);
  --oxygen: #ff5470;
  --nitrogen: #5c7cff;
  --focus: #8fa4ff;
  --og: #38d6f2;
  --sf: #ff7a3d;
  --gut: clamp(16px, 6vw, 112px);
  --col: 33rem;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--void);
}
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: "Mona Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  max-width: 100%;
}
a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(238, 241, 255, 0.35);
  text-underline-offset: 0.28em;
  transition: text-decoration-color 0.2s;
}
a:hover {
  text-decoration-color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 4px;
}
::selection {
  background: var(--nitrogen);
  color: #fff;
}
sub {
  font-size: 0.62em;
  line-height: 0;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--ink);
  color: var(--void);
  padding: 10px 14px;
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}

/* ------------------------------------------------------------ scène */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.webgl #scene {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}
.webgl.scene-ready #scene {
  opacity: 1;
}
/* Sans WebGL (ou sans JavaScript) : la molécule en SVG et sa légende fixe ; les places
   des copies et la barre d'échelle, sans molécule à montrer, se retirent. */
html:not(.webgl) #scene,
html:not(.webgl) .live,
html:not(.webgl) .scale,
.webgl .still {
  display: none;
}
html:not(.webgl) .panel .slot {
  height: 28px;
}

/* ------------------------------------------------------------ en-tête : une barre de verre */
.top {
  position: fixed;
  top: 12px;
  left: max(10px, calc(var(--gut) - 18px));
  right: max(10px, calc(var(--gut) - 18px));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 30px);
  padding: 7px 7px 7px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  font-size: 14.5px;
  font-weight: 500;
  font-stretch: 104%;
}
.top a {
  text-decoration: none;
}
/* Les petites cibles (marque, langues, pied) gardent leur aspect mais reçoivent une zone de
   toucher d'au moins 40 px, compensée par des marges négatives. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  margin: -9px auto -9px -9px;
  color: var(--ink);
  font-weight: 600;
  font-stretch: 118%;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}
.brand svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.top nav ul {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.top nav a,
.lang a {
  color: var(--mute);
  transition: color 0.2s;
}
.top nav a:hover,
.lang a:hover {
  color: var(--ink);
}
.lang {
  display: flex;
  gap: 4px;
}
.lang a {
  padding: 9px 6px;
  margin: -7px 0;
}
.lang a[aria-current="page"] {
  color: var(--ink);
}
.write {
  border-radius: 999px;
  background: var(--ink);
  color: var(--void) !important;
  padding: 8px 18px;
  font-weight: 600;
  transition: box-shadow 0.25s;
}
.write:hover {
  box-shadow: 0 0 0 1px #fff, 0 0 28px rgba(143, 164, 255, 0.55);
}
/* Petits écrans : les sections passent dans un menu dépliant, sous la barre. Pas de second
   flou dans la barre déjà floutée (il n'y verrait que la barre) : un fond presque opaque. */
.menu {
  display: none;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  transition: background-color 0.2s;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu[open] summary {
  background: rgba(238, 241, 255, 0.1);
}
.menu ul {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px 22px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(11, 13, 26, 0.96);
}
.menu li + li {
  border-top: 1px solid var(--line);
}
.menu a {
  display: block;
  padding: 14px 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 300;
  font-stretch: 115%;
  letter-spacing: -0.02em;
}

/* ------------------------------------------------------------ chapitres */
main {
  position: relative;
  z-index: 1;
}
/* Chaque chapitre : le texte d'un côté, la place de la molécule (.slot) de l'autre. La
   place colle à l'écran pendant qu'on lit la section ; scene.js y ajuste la molécule. */
.ch {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 80px);
  align-items: center;
  padding: 96px var(--gut);
}
.ch > .slot {
  align-self: start;
  position: sticky;
  top: 76px;
  height: calc(100svh - 120px);
  pointer-events: none;
}
.right {
  grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
}
.right > .slot {
  grid-column: 1;
  grid-row: 1;
}
.right .col {
  grid-column: 2;
}
.center {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}
.center .col {
  max-width: 46rem;
}
/* Dernier chapitre : la page ne défile plus assez pour le centrer, le texte se pose en bas
   et laisse le haut de l'écran à la molécule. */
.end {
  align-content: end;
  padding-bottom: 12svh;
}
.end > .slot {
  position: static;
  width: 100%;
  height: 34svh;
}
h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
/* Deux voix de titre dans la même famille : large et léger, ou étroit et appuyé pour les
   deux affirmations (le labo, le terrain). */
h2 {
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 1;
  font-weight: 300;
  font-stretch: 115%;
  letter-spacing: -0.035em;
  margin-bottom: 0.5em;
}
.cond h2 {
  font-size: clamp(46px, 6.2vw, 104px);
  line-height: 0.94;
  font-weight: 560;
  font-stretch: 76%;
  letter-spacing: -0.02em;
}
.col > p {
  margin: 0 0 1em;
  max-width: 56ch;
}
p {
  text-wrap: pretty;
}
.center .col > p {
  margin-inline: auto;
}
.lede {
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--text);
}

/* Héros : le titre s'élargit et sort du flou pendant que les particules convergent.
   C'est le seul mouvement que la page lance d'elle-même. */
.hero {
  grid-template-columns: minmax(0, 1fr);
  align-content: end;
  padding-bottom: clamp(44px, 8vh, 100px);
}
.hero h1 {
  font-size: clamp(60px, 12.4vw, 220px);
  line-height: 0.84;
  font-weight: 260;
  font-stretch: 125%;
  letter-spacing: -0.045em;
  margin: 0 0 0.34em -0.05em;
}
.webgl .hero h1 {
  animation: widen 2.4s cubic-bezier(0.2, 0.7, 0.1, 1) 0.2s both;
}
@keyframes widen {
  from {
    font-stretch: 75%;
    font-weight: 200;
    letter-spacing: 0.02em;
    opacity: 0;
    filter: blur(14px);
  }
}
.hero-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 18px 40px;
}
.hero .lede {
  max-width: 30rem;
  margin: 0;
}
.caption {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  font-stretch: 110%;
  color: var(--mute);
}
#stage {
  position: absolute;
  top: 8%;
  right: 0;
  width: 60%;
  height: 64%;
  cursor: grab;
  touch-action: pan-y;
}
.dragging #stage {
  cursor: grabbing;
}
.fallback {
  position: absolute;
  top: 12%;
  right: 12%;
  width: min(38vw, 500px);
  height: auto;
}
.webgl .fallback {
  display: none;
}
/* Légendes du signal : posées par scene.js, le point en bas sur l'attendu et sur le pic,
   un filet vertical, le nom au-dessus. */
.marks {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}
html:not(.webgl) .marks {
  display: none;
}
.mark {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  justify-items: start;
  font-size: 13px;
  font-weight: 500;
  font-stretch: 110%;
  color: var(--ink);
  white-space: nowrap;
  will-change: transform;
}
.mark b {
  font-weight: inherit;
  margin-bottom: 6px;
}
.mark i {
  position: relative;
  width: 6px;
  height: 24px;
}
.mark i::before {
  content: "";
  position: absolute;
  left: 2.5px;
  top: 0;
  bottom: 6px;
  width: 1px;
  background: rgba(220, 227, 255, 0.45);
}
.mark i::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255, 92, 122, 0.8);
}

/* Les titres de section entrent comme celui du héros (scene.js pose .in à leur arrivée). */
.motion .ch h2 {
  transition: font-stretch 1.6s var(--ease), font-weight 1.6s var(--ease), letter-spacing 1.6s var(--ease), opacity 0.9s ease-out, filter 1.2s ease-out;
}
.motion .ch h2:not(.in) {
  font-stretch: 75%;
  font-weight: 200;
  letter-spacing: 0.02em;
  opacity: 0;
  filter: blur(12px);
}

/* Pourquoi Dopamine : quatre repères. */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
  margin: 2.4em 0 0;
}
.facts div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.facts dt {
  font-size: 13.5px;
  font-weight: 500;
  font-stretch: 110%;
  color: var(--mute);
}
.facts dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 300;
  font-stretch: 115%;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* Le labo : ce qu'on garde d'une expérience à l'autre. */
.rules-h {
  margin: 2.4em 0 0.4em;
  font-size: 13.5px;
  font-weight: 500;
  font-stretch: 110%;
  color: var(--mute);
}
.rules {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rules li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.rules b {
  display: block;
  color: var(--ink);
  font-weight: 500;
  font-stretch: 108%;
}

/* Sortis du labo : un panneau par produit, sa copie de la molécule dans le haut du panneau,
   teinte et halo à sa couleur. La molécule principale reste à droite du titre. */
.wide {
  grid-template-areas: "intro slot" "panels panels";
  align-items: end;
  row-gap: 40px;
}
.wide .intro {
  grid-area: intro;
}
.wide > .slot {
  grid-area: slot;
  position: static;
  height: 30svh;
}
.panels {
  grid-area: panels;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.panel {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 clamp(20px, 2.4vw, 36px) clamp(24px, 2.6vw, 36px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 70%), rgba(255, 255, 255, 0.015);
}
.panel .slot {
  height: clamp(190px, 30svh, 320px);
  margin: 0 calc(-1 * clamp(20px, 2.4vw, 36px)) 4px;
}
.og {
  --tint: var(--og);
}
.sf {
  --tint: var(--sf);
}
.panel h3 {
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 350;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.panel h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 14px;
  background: var(--tint);
  box-shadow: 0 0 12px var(--tint);
}
.panel p {
  margin: 4px 0 6px;
  max-width: 46ch;
}
.panel a {
  justify-self: start;
  font-weight: 500;
}

/* Sous le microscope : le champ circulaire de l'oculaire, réticule, graduations et barre
   d'échelle ; les essais en cours flottent dedans. */
.scope {
  position: relative;
  width: min(60svh, 82vw);
  aspect-ratio: 1;
  margin-bottom: 40px;
  border: 1px solid rgba(220, 227, 255, 0.22);
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--reticle) 0 14%, transparent 14% 86%, var(--reticle) 86%) center / 1px 100% no-repeat,
    linear-gradient(to right, var(--reticle) 0 14%, transparent 14% 86%, var(--reticle) 86%) center / 100% 1px no-repeat,
    radial-gradient(circle closest-side, rgba(92, 124, 255, 0.08), transparent);
  box-shadow: inset 0 0 80px rgba(92, 124, 255, 0.08);
  pointer-events: none;
  --reticle: rgba(220, 227, 255, 0.28);
}
.scope::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(220, 227, 255, 0.4) 0 0.5deg, transparent 0.5deg 6deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 94%, #000 94.5%);
  mask: radial-gradient(circle closest-side, transparent 94%, #000 94.5%);
}
.scale {
  position: absolute;
  right: 22%;
  bottom: 17%;
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  font-stretch: 110%;
  color: var(--mute);
}
.scale::before {
  content: "";
  width: var(--bar, 48px);
  height: 2px;
  background: var(--ink);
}

/* Le terrain : les deux dates face à face. */
.tech {
  grid-template-columns: minmax(0, 44rem) minmax(0, 1fr);
}
.years {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 2em 0 1.8em;
  padding: 0;
  list-style: none;
}
.years li {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.year {
  margin: 0 0 0.12em;
  color: var(--ink);
  font-size: clamp(60px, 7vw, 120px);
  font-weight: 200;
  font-stretch: 125%;
  letter-spacing: -0.045em;
  line-height: 1;
}
.years h3 {
  font-size: 17px;
  font-weight: 500;
  font-stretch: 108%;
}
.years li > p:last-child {
  margin: 4px 0 0;
  color: var(--mute);
}
.go {
  font-weight: 500;
}

/* Écrire au labo : l'adresse sous le titre, sur une ligne dès 1024 px, coupée seulement après l'arobase. */
.mail {
  display: inline-block;
  margin-top: 0.4em;
  font-size: clamp(22px, 3vw, 48px);
  font-weight: 300;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-shadow 0.3s, text-decoration-color 0.3s;
}
.mail:hover {
  text-shadow: 0 0 32px rgba(143, 164, 255, 0.6);
}
/* Un bloc par moitié : la coupure tombe après l'arobase ou nulle part. Le soulignement
   ne descend pas dans un inline-block, chaque moitié le reprend. */
.mail span {
  display: inline-block;
  text-decoration: inherit;
}

/* ------------------------------------------------------------ pied */
.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: baseline;
  padding: 26px var(--gut) 34px;
  font-size: 13.5px;
  color: var(--mute);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--void) 80%, transparent);
}
.foot p {
  margin: 0;
}
.foot a {
  display: inline-block;
  padding: 11px 0;
  margin: -11px 0;
  color: var(--text);
}
.foot .tm {
  flex-basis: 100%;
}

/* ------------------------------------------------------------ page simple (mentions, 404) */
.page {
  position: relative;
  z-index: 1;
  padding: 150px var(--gut) 96px;
  max-width: calc(46rem + 2 * var(--gut));
}
.page h1 {
  font-size: clamp(44px, 6vw, 84px);
  line-height: 0.98;
  font-weight: 300;
  font-stretch: 115%;
  letter-spacing: -0.035em;
  margin-bottom: 0.6em;
}
.page h2 {
  font-size: 21px;
  font-weight: 500;
  font-stretch: 108%;
  margin: 2em 0 0.5em;
}
.page dl {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 6px 22px;
  margin: 0;
}
.page dt {
  color: var(--mute);
}
.page dd {
  margin: 0;
}
.pending {
  border-left: 3px solid var(--oxygen);
  padding: 8px 14px;
  background: color-mix(in srgb, var(--oxygen) 12%, var(--void));
}

/* ------------------------------------------------------------ petits écrans */
@media (max-width: 980px) {
  .top nav {
    display: none;
  }
  .menu {
    display: block;
  }
}
@media (max-width: 760px), (max-aspect-ratio: 85/100) {
  body {
    font-size: 17px;
  }
  /* Une colonne : la place de la molécule en bandeau collé sous l'en-tête, le texte ensuite. */
  .ch,
  .right,
  .tech,
  .wide {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
    padding: 0 var(--gut) 14svh;
  }
  .ch > .slot,
  .right > .slot,
  .wide > .slot {
    grid-area: auto;
    order: -1;
    position: sticky;
    top: 70px;
    height: 40svh;
    margin-bottom: 6svh;
  }
  .right .col {
    grid-column: auto;
  }
  .wide .intro,
  .panels {
    grid-area: auto;
  }
  .panels {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel {
    background: radial-gradient(120% 50% at 50% 0%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 70%), rgba(9, 11, 22, 0.6);
  }
  .center {
    padding-top: 90px;
  }
  .end > .slot {
    position: static;
    order: 0;
    height: 30svh;
    margin: 0;
  }
  .years {
    gap: 16px;
  }
  .year {
    font-size: clamp(40px, 12vw, 72px);
  }
  /* La molécule reste en haut de l'écran : le texte passe dessus sur un voile. */
  .col {
    margin-inline: -10px;
    padding: 22px 18px 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(9, 11, 22, 0.72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .hero {
    min-height: 100svh;
    padding-top: 0;
    padding-bottom: 34px;
  }
  .hero h1 {
    font-size: clamp(50px, 16.5vw, 120px);
    font-stretch: 112%;
  }
  #stage {
    top: 70px;
    width: 100%;
    height: 44%;
  }
  .fallback {
    top: 90px;
    right: 50%;
    transform: translateX(50%);
    width: min(76vw, 400px);
  }
  .facts {
    gap: 18px 20px;
  }
}
/* Téléphone de faible hauteur : la molécule du héros laisse la place au titre. */
@media (max-width: 760px) and (max-height: 700px) {
  #stage {
    height: 34%;
  }
}
@media (max-width: 460px) {
  .top {
    gap: 8px;
    padding-left: 14px;
  }
  .brand span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .webgl .hero h1 {
    animation: none;
  }
  .webgl #scene {
    transition: none;
  }
}
