/* Glint Labs. Mise en page issue de la réplique (replica-spec.md), gris du kit Glint v6 (glint/pivot/design-system), seul le dégradé du volet est en orange Nivine. Inter 400/500. */

@font-face {
  font-family: "Labs Sans";
  src: url(fonts/inter-var.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* Sentient (Indian Type Foundry, Fontshare), licence gratuite web et commerciale (fonts/sentient/LICENSE-FFL.txt). Texte des sections de l'accueil. */
@font-face { font-family: "Sentient"; src: url(fonts/sentient/Sentient-Light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Sentient"; src: url(fonts/sentient/Sentient-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sentient"; src: url(fonts/sentient/Sentient-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Sentient"; src: url(fonts/sentient/Sentient-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  /* Kit Glint, thème clair : text-primary, surface-page, text-secondary, border-low. */
  --ink: #161616;
  --paper: #f5f5f5;
  --muted: #595959;
  --rule: #1616161a;
  --hover-card: #16161608;
  --panel-shadow: inset 0 0 0 1px #00000009, inset 0 1px 4px #00000005;
  --thumb: #ffffff80;
  --thumb-focus: #ffffffa3;

  --font-sans: "Labs Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --text-small: min(calc(.3 * 1.2vw + 1rem), 1.54rem);
  --text-h1: max(calc(var(--text-small) * 1.4), min(calc(1.25 * 1.2vw + .5rem), 2.75rem));
  --text-caption: .875rem;
  --tracking-small: -.011em;
  --tracking-h1: -.022em;
  --measure: 47.59em;
  --measure-bio: 40.98em;

  --field: clamp(30vw, calc(100vw - 4rem - 47.6rem - 4rem), 40vw);

  --stagger-dur: .6s;
  --stagger-distance: 12px;
  --stagger-stagger: 40ms;
  --stagger-blur: 3px;
  --stagger-ease: cubic-bezier(.22, 1, .36, 1);
  --ease-ui: cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    /* Kit Glint, thème sombre. */
    --ink: #ededed;
    --paper: #101010;
    --muted: #a0a0a0;
    --rule: #ffffff14;
    --hover-card: #ffffff07;
    --panel-shadow: inset 0 0 0 1px #ffffff14, inset 0 1px 4px #ffffff09;
    --thumb: #ffffff6b;
    --thumb-focus: #ffffff94;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--paper);
  color: var(--ink);
  cursor: default;
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}
html::-webkit-scrollbar { display: none; }
body { margin: 0; }
p, h1, h2, h3, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }
::selection { background: var(--ink); color: var(--paper); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

#page-shell {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.text-small { font-size: var(--text-small); line-height: 1.3em; letter-spacing: var(--tracking-small); }
.manifesto .text-small, #nivine .text-small, #pecora .text-small { font-family: "Sentient", Georgia, serif; font-weight: 400; letter-spacing: 0; }
.manifesto strong, #nivine strong, #pecora strong { font-weight: 500; }
.muted { color: var(--muted); }
/* « Qui nous sommes » et « Contact » plus petits que le corps de page (demande d'Enzo, 21/11). */
.compact .text-small { font-size: calc(var(--text-small) * .8); }
.compact .portrait { width: 6rem; height: 6rem; }
.link { text-underline-offset: 4px; }
.link:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Colonne de lecture */
#article-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  margin: 2rem 0;
  padding: 0 calc(10px + 1.5rem) 0 1.5rem;
}

/* Logo */
.site-header { height: 1.5rem; pointer-events: none; }
/* Logo principal du design system Glint (21/11/2026) : symbole + « Glint Labs » en Inter Medium, en tracés. */
.logo {
  position: fixed; top: 2rem; left: 1.5rem; z-index: -10; will-change: opacity;
  display: flex; align-items: center; color: var(--ink);
}
.logo svg { height: 1.5rem; width: calc(1.5rem * 547 / 100); fill: currentColor; }

/* Hero */
.hero-sticky { position: sticky; top: 3.5rem; z-index: -10; }
.hero { margin-top: 11rem; margin-bottom: 4rem; }
.hero-title {
  font-size: var(--text-h1);
  line-height: 1.15em;
  letter-spacing: var(--tracking-h1);
  font-weight: 500;
  text-wrap: balance;
}
.hero-line { display: contents; }
.hero-the-second { display: none; }

/* Roue de mots */
.slot { position: relative; display: inline-block; white-space: nowrap; }
.slot.interactive { cursor: grab; touch-action: none; }
.slot.interactive.dragging { cursor: grabbing; }
.sizer { visibility: hidden; }
.rulers { position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: hidden; visibility: hidden; }
.rulers > span { position: absolute; top: 0; left: 0; white-space: nowrap; }
.selected { position: absolute; top: 0; left: 0; }
.wheel {
  position: absolute;
  left: 0;
  top: calc(50% - var(--half));
  width: min(var(--wheel-width), var(--visible-wheel-width));
  height: calc(2 * var(--half));
  font-size: var(--wheel-font-size, inherit);
  line-height: var(--wheel-line-height, inherit);
  letter-spacing: var(--wheel-letter-spacing, inherit);
  transform: scale(var(--wheel-scale, 1));
  transform-origin: 0;
  overflow: clip;
  pointer-events: none;
  user-select: none;
  --window: linear-gradient(to bottom, transparent 0, #000 calc(50% - var(--reach)), #000 calc(50% - var(--lip)), transparent calc(50% - var(--gap)), transparent calc(50% + var(--gap)), #000 calc(50% + var(--lip)), #000 calc(50% + var(--reach)), transparent 100%);
  -webkit-mask-image: var(--window);
  mask-image: var(--window);
}
.wheel-hit-area {
  position: absolute;
  left: 0;
  top: calc(50% - var(--half));
  width: min(var(--wheel-hit-width), var(--visible-wheel-hit-width));
  height: calc(2 * var(--half));
  pointer-events: none;
}
.slot.interactive .wheel-hit-area { pointer-events: auto; touch-action: none; }
.edge-fade {
  position: absolute;
  inset: 0;
  --edge: linear-gradient(to right, #000 0, #000 var(--wheel-fade-start), transparent 100%);
  -webkit-mask-image: var(--edge);
  mask-image: var(--edge);
}
.entrance { position: absolute; inset: 0; }
.stage { position: absolute; inset: 0; perspective: calc(var(--r) * 6); }
.drum { position: absolute; inset: 0; transform-style: preserve-3d; }
.row {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: max-content;
  margin-top: -.5lh;
  white-space: nowrap;
  color: color-mix(in oklab, var(--muted) 60%, var(--paper));
  transform: rotateX(calc(-1 * var(--i) * var(--step))) translateZ(var(--r));
  backface-visibility: hidden;
}
.row-ink { position: relative; }
.row-color { position: absolute; top: 0; left: 0; color: inherit; pointer-events: none; will-change: opacity; }
.wheel-entrance .row-ink {
  display: block;
  opacity: 0;
  transform: translateX(var(--stagger-distance));
  filter: blur(var(--stagger-blur));
  transition: opacity var(--stagger-dur) var(--stagger-ease), transform var(--stagger-dur) var(--stagger-ease), filter var(--stagger-dur) var(--stagger-ease);
  transition-delay: calc(var(--stagger-stagger) * var(--reveal-order));
  will-change: transform, opacity, filter;
}
.wheel-entrance.is-shown .row-ink { opacity: 1; filter: blur(0); transform: translate(0); }

/* Texte en dégradé : la rampe suit le volet à la même hauteur d'écran */
.gradient-text {
  background-image: var(--ramp);
  background-repeat: no-repeat;
  background-size: 100% 100vh;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-text[data-pinned] { background-image: var(--ramp-x); background-size: 100% 100%; }

/* Carte d'annonce */
.announce {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: var(--measure);
  padding: 1rem 1.5rem 1rem 1rem;
  border: 1px solid color-mix(in oklab, var(--rule) 60%, transparent);
  border-radius: 28px;
  background: var(--paper);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  transition: color .4s var(--ease-ui), background-color .15s var(--ease-ui), border-color .15s var(--ease-ui);
}
.announce:hover { border-color: var(--rule); background-color: var(--hover-card); }
.announce + .announce { margin-top: .75rem; }
.announce { position: relative; isolation: isolate; overflow: hidden; }
.announce-icon, .announce-body { position: relative; }
/* Survol : des pixels du volet arrivent un à un sur la carte et y redessinent le texte (js/announce.js, canvas). */
.announce-pixels { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.announce-icon { z-index: 2; } /* l'icône reste au-dessus des pixels ; le texte, lui, est redessiné dans les pixels */
.announce-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  filter: drop-shadow(0 10px 12px #00000013) drop-shadow(0 1px 1px #0000001a) drop-shadow(0 0 1px #00000026);
}
@media (prefers-color-scheme: dark) {
  .announce-icon { filter: drop-shadow(0 10px 18px #00000047) drop-shadow(0 1px 2px #0000005c); }
}
.announce-body {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem 1rem;
}
.announce-cta { flex-shrink: 0; }
.only-wide { display: none; }

/* Sections de texte */
.block { margin: 2.5rem 0; }
.prose-width { max-width: var(--measure); }
.label { margin-bottom: 1rem; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack strong { font-weight: 500; }
.plan { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.plan li { display: flex; gap: 1rem; }
.plan-num { width: 1rem; flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--muted); }


.people { display: flex; flex-direction: column; gap: 2.5rem; margin-top: 2.5rem; }
.person { display: flex; flex-direction: column; gap: 1rem; }
/* Case photo d'Enzo (assets/enzo.jpg, 256 px). */
.portrait { position: relative; flex-shrink: 0; width: 6rem; height: 6rem; overflow: hidden; background: var(--rule); }
/* Photo aux gris du kit Glint : noir et blanc ramené entre #101010 et #EDEDED (contraste 0,87 = (237 - 16) / 255). */
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(.87); }
.person-text { max-width: var(--measure-bio); }
.person-name { font-weight: 500; }
.person-bio { margin-top: .5rem; }

/* Contact */
.contact-mail { display: inline-block; margin-top: .75rem; padding-block: .75rem; }
.contact-note { margin-top: .5rem; }

/* Pied de page */
.site-footer { margin-top: 5rem; }
.footer-nav {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: var(--text-caption);
  line-height: 1.25rem;
}
.footer-nav a { flex-shrink: 0; padding-block: .75rem; }
.footer-nav a:first-child { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-rule { flex: 1; min-width: 6px; height: 1px; background: var(--rule); }

/* Volet du dégradé, fixe à droite */
.field-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 20;
  width: 10px;
  height: calc(100dvh - 24px);
  overflow: hidden;
  border-radius: 14px;
  pointer-events: none;
  user-select: none;
}
/* Peinture fixe à la place du dégradé (Enzo, 21/11). Le canvas tourne toujours, caché : il nourrit les dégradés du texte et des cartes. */
.field-canvas { position: absolute; top: 0; right: 0; left: 0; height: calc(100lvh - 24px); background: url(assets/paysage.jpg) center / cover; }
.field-canvas canvas { width: 100%; height: 100%; }
.field-canvas canvas, .field-canvas .grain { opacity: 0; }
.grain {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  image-rendering: pixelated;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.field-shadow { position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--panel-shadow); pointer-events: none; }

/* Pouce de défilement posé sur le volet */
.scroll-rail {
  position: fixed;
  top: 12px;
  right: 0;
  z-index: 20;
  width: 2.25rem;
  height: calc(100dvh - 24px);
  pointer-events: none;
  user-select: none;
}
.field-scrollbar {
  position: absolute;
  inset-block: 2px;
  inset-inline-end: 12px;
  z-index: 2;
  width: 10px;
  opacity: 0;
  outline: none;
  pointer-events: none;
  touch-action: none;
  user-select: none;
}
.field-scrollbar.scrollable { opacity: 1; pointer-events: auto; }
.field-scrollbar.dragging { cursor: ns-resize; }
.thumb {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  width: 6px;
  height: var(--thumb-height);
  min-height: 32px;
  margin-inline: auto;
  margin-block-start: 0;
  border-radius: 999px;
  background: var(--thumb);
  box-shadow: 0 0 0 1px #0000000f;
  opacity: 0;
  will-change: width, height, margin-block-start, transform;
  transition-property: width, height, margin-block-start, background-color, opacity;
  transition-duration: .14s, .14s, .14s, .14s, .6s;
  transition-timing-function: cubic-bezier(.2, .8, .2, 1);
}
.field-scrollbar.active .thumb { opacity: 1; transition-duration: .14s, .14s, .14s, .14s, 90ms; }
.field-scrollbar:hover .thumb, .field-scrollbar:focus-visible .thumb, .field-scrollbar.dragging .thumb {
  opacity: 1;
  width: 8px;
  height: calc(var(--thumb-height) + 2px);
  margin-block-start: -1px;
  transition-duration: .14s, .14s, .14s, .14s, 90ms;
}
.field-scrollbar:focus-visible .thumb { background: var(--thumb-focus); }

/* sm : 40rem */
@media (width >= 40rem) {
  #article-content { margin: 2.5rem 0; padding: 0 calc(80px + 2.5rem) 0 2.5rem; }
  .logo { top: 2.5rem; left: 2.5rem; }
  .hero-sticky { top: 4rem; }
  .only-narrow { display: none; }
  .people { margin-top: 3.5rem; }
  .person { flex-direction: row; gap: 1.5rem; }
  .portrait { width: 8rem; height: 8rem; }
  .only-wide { display: inline; }
  .footer-nav { gap: 1.25rem; }
  .field-panel { width: 80px; border-radius: 8px 14px 14px 8px; }
  .field-scrollbar { inset-block: 7px; inset-inline-end: 19px; width: 16px; }
  .thumb { width: 10px; margin-inline: 0; inset-inline: auto 0; }
  .field-scrollbar:hover .thumb, .field-scrollbar:focus-visible .thumb, .field-scrollbar.dragging .thumb { width: 14px; }
}

/* md : 48rem */
@media (width >= 48rem) {
  .hero {
    --hero-half-height: max(21.25rem, 50svh);
    --hero-lift: max(0px, calc(25.5rem - var(--hero-half-height)));
    margin-top: max(0px, calc(var(--hero-half-height) - 3.75rem - var(--hero-lift)));
    margin-bottom: max(calc(1rem + var(--hero-lift)), calc(var(--hero-half-height) - 13.75rem + var(--hero-lift)));
  }
  .block { margin: 3.5rem 0; }
  .site-footer { margin-top: 7rem; }
}

/* lg : 64rem */
@media (width >= 64rem) {
  #article-content { margin: 3rem 0; padding: 0 calc(var(--field) + 4rem) 0 4rem; }
  .logo { top: 3rem; left: 4rem; }
  .hero-sticky { top: 4.5rem; }
  .hero {
    --hero-lift: max(0px, calc(26rem - var(--hero-half-height)));
    margin-top: max(0px, calc(var(--hero-half-height) - 4.5rem - var(--hero-lift)));
    margin-bottom: max(calc(1rem + var(--hero-lift)), calc(var(--hero-half-height) - 13.5rem + var(--hero-lift)));
  }
  .field-panel { width: calc(var(--field) - 24px); border-radius: 14px; }
}

/* Mobile sous 48rem : titre sur trois lignes, levée d'intro, roue en carrousel */
@media (width < 48rem) {
  .hero {
    margin-bottom: 10rem;
    transform: translateY(0);
    transition: transform var(--hero-intro-lift-duration, 600ms) cubic-bezier(.65, 0, .35, 1);
    will-change: transform;
  }
  .hero.lifted { transform: translateY(-40px); }
  .hero-title { font-size: clamp(1.5rem, 7.8vw, 2rem); line-height: 1.08; }
  .hero-line { display: block; white-space: nowrap; }
  .hero-the-first { display: none; }
  .hero-the-second { display: inline; }
  .wheel-hit-area { top: 0; height: calc(50% + var(--half)); }
  .wheel {
    --window: linear-gradient(to bottom, transparent 0, transparent calc(50% - .62lh), #000 calc(50% - .62lh + .39lh), #000 calc(50% + var(--reach) - 1.5lh), transparent 100%);
  }
  .slot:not(.entered) .row.initial-row { visibility: hidden; }
  .slot.entered .selected { display: none; }
}

@media (width < 40rem) {
  .thumb { background: #ffffffa6; }
}
@media (width < 40rem) and (prefers-color-scheme: dark) {
  .thumb { background: #00000091; box-shadow: 0 0 0 1px #ffffff1f; }
}

@media (prefers-reduced-motion: reduce) {
  .wheel-entrance .row-ink { transition: none; }
  .hero { transition: none; }
  .thumb { transition-duration: .01ms !important; }
}

/* Pages légales */
.legal { max-width: var(--measure); margin-top: 6rem; }
.legal h1 { font-size: var(--text-h1); line-height: 1.15em; letter-spacing: var(--tracking-h1); font-weight: 500; text-wrap: balance; }
.legal h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1em; font-weight: 500; }
.legal strong { font-weight: 500; }
.legal .updated { margin-top: 1rem; }
.legal ul { display: flex; flex-direction: column; gap: .5rem; padding-left: 1.25rem; list-style: disc; }
.legal .link { text-decoration: underline; }
@media (width >= 48rem) { .legal { margin-top: 10rem; } }
