:root {
  --bg: #d9dad7;
  --concrete: #f5f4f0;
  --ink: #15171a;
  --ink-2: #464a50;
  --ink-3: #565b62;
  --rule: #c2c3be;
  --glass: #7fa3b8;
  --glass-ink: #2f5d78;
  --late: #ff5a1f;
  --shadow: 0 12px 24px -14px rgba(28, 30, 34, 0.34), 0 2px 6px -3px rgba(28, 30, 34, 0.16);
  --gutter: clamp(16px, 4.5vw, 64px);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114;
    --concrete: #1a1d21;
    --ink: #eceae4;
    --ink-2: #b2b6bc;
    --ink-3: #8a9097;
    --rule: #30343a;
    --glass: #ffb76b;
    --glass-ink: #ffc58a;
    --shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.7), 0 2px 6px -3px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--ink-3) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in srgb, var(--glass) 45%, transparent); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--glass-ink); outline-offset: 3px; border-radius: 2px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }

/* La dalle : derrière tout, plein écran. */
#slab {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0;
  transition: opacity 1.2s ease;
  background: #a8bac3;
}
@media (prefers-color-scheme: dark) {
  #slab { background: #1b2433; }
}
.no-webgl #slab { display: none; }
main, .top, .foot { position: relative; z-index: 1; }

/* En-tête : un cartouche de plan. */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  color: #fff;
  background: linear-gradient(180deg, rgba(9, 11, 15, 0.5), transparent);
}
.mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-stretch: 112%; font-size: 17px; letter-spacing: -0.01em; text-decoration: none;
}
.mark img { border-radius: 7px; }
.top nav { display: flex; gap: 6px; }
.top nav a {
  font-stretch: 125%; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, 0.45); color: #fff;
}
.top nav a:hover { background: rgba(255, 255, 255, 0.16); }

/* Accueil */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start;
  padding: clamp(92px, 13svh, 130px) var(--gutter) 60px;
}
.hero h1 {
  font-size: clamp(3.1rem, 8.6vw, 6rem); line-height: 0.92; font-stretch: 112%; font-weight: 750;
  letter-spacing: -0.04em; max-width: 12ch;
}
.lede { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.45; color: var(--ink-2); max-width: 27em; margin: 26px 0 30px; }
.get { display: flex; flex-wrap: wrap; gap: 10px; }
.plat {
  display: inline-flex; align-items: center; gap: 12px; min-width: 176px;
  padding: 12px 18px 12px 14px; text-decoration: none;
  background: var(--concrete); color: var(--ink); border: 1px solid transparent;
  box-shadow: var(--shadow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
}
.plat svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.plat[data-platform="windows"] svg { fill: currentColor; stroke: none; }
.plat span { display: grid; line-height: 1.15; }
.plat b { font-size: 16px; font-weight: 700; font-stretch: 110%; }
.plat small { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.plat:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.plat:active { transform: translateY(0) scale(0.98); }
.plat.you { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.plat.you small { color: color-mix(in srgb, var(--bg) 72%, var(--ink)); }
.fine { margin: 18px 0 0; font-size: 13px; color: var(--ink-3); }

/* Les travées : le texte à même la scène, sur une ombre qui s'efface ; l'app dans son appareil. */
/* Le texte et l'app tiennent dans une colonne : le reste de l'écran est au campus, où la caméra cadre
   le lieu de la section. */
.bay {
  position: relative; isolation: isolate;
  min-height: 130svh; display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
  align-content: center; column-gap: clamp(24px, 5vw, 80px); row-gap: 34px; padding: 16svh var(--gutter);
}
.bay::before {
  content: ""; position: absolute; inset: 0 44% 0 0; z-index: -1;
  /* Une ombre qui s'efface dans tous les sens : aucun bord net ne coupe l'écran. */
  background: radial-gradient(ellipse 100% 46% at 0% 50%, rgba(9, 11, 15, 0.82), rgba(9, 11, 15, 0.55) 55%, transparent);
}
.bay .panel, .bay figure { grid-column: 1; }
.bay figure { justify-self: start; }
.bay.right { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); }
.bay.right::before { inset: 0 0 0 44%; background: radial-gradient(ellipse 100% 46% at 100% 50%, rgba(9, 11, 15, 0.82), rgba(9, 11, 15, 0.55) 55%, transparent); }
.bay.right .panel, .bay.right figure { grid-column: 2; }
.bay.right figure { justify-self: end; }
.bay .iphone { --w: min(100%, 36svh, 250px); }
.bay .mac, .bay .win { width: min(100%, 30rem); }
.panel { color: #fff; }
.panel h2 { font-size: clamp(2.1rem, 3.7vw, 3.4rem); line-height: 1; font-stretch: 108%; letter-spacing: -0.032em; margin-bottom: 18px; }
.panel p { margin: 0; color: rgba(255, 255, 255, 0.86); font-size: 19px; line-height: 1.55; max-width: 28em; }
.panel a { color: #fff; }
figure { margin: 0; }

/* L'app, entière, dans son appareil. */
.device { justify-self: center; position: relative; }
.device img { display: block; width: 100%; height: auto; }
.iphone {
  --w: min(100%, 40svh, 372px);
  width: var(--w); padding: calc(var(--w) * 0.03); border-radius: calc(var(--w) * 0.155);
  background: #08090b;
  box-shadow: 0 0 0 1.5px #a8aaae, 0 0 0 3px #4b4d52, 0 50px 90px -34px rgba(0, 0, 0, 0.75), 0 18px 34px -18px rgba(0, 0, 0, 0.5);
}
.iphone img { border-radius: calc(var(--w) * 0.125); }
.iphone::before {
  content: ""; position: absolute; z-index: 1; top: calc(var(--w) * 0.058); left: 50%; translate: -50% 0;
  width: 29%; height: calc(var(--w) * 0.085); border-radius: 99px; background: #08090b;
}
.mac, .win {
  width: min(100%, 118svh * 0.74, 860px); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 50px 90px -34px rgba(0, 0, 0, 0.75), 0 18px 34px -18px rgba(0, 0, 0, 0.5);
}
.win { width: min(100%, 980px); }
.mac { border-radius: 13px; background: #15140f; }
.win { border-radius: 9px; background: #f4efe4; }
.bar { display: flex; align-items: center; height: 34px; padding: 0 14px; gap: 8px; }
.bar i { width: 12px; height: 12px; border-radius: 50%; }
.mac .bar i:nth-child(1) { background: #ff5f57; }
.mac .bar i:nth-child(2) { background: #febc2e; }
.mac .bar i:nth-child(3) { background: #28c840; }
.win .bar { justify-content: flex-end; gap: 22px; padding-right: 16px; }
.win .bar i { width: 10px; height: 1.5px; border-radius: 0; background: #5a564d; }
.win .bar i:nth-child(2) { height: 10px; background: none; border: 1.5px solid #5a564d; }
.win .bar i:nth-child(3) { position: relative; height: 10px; background: none; }
.win .bar i:nth-child(3)::before, .win .bar i:nth-child(3)::after { content: ""; position: absolute; left: -2px; top: 4px; width: 14px; height: 1.5px; background: #5a564d; rotate: 45deg; }
.win .bar i:nth-child(3)::after { rotate: -45deg; }

/* Le plan : la caméra monte au-dessus de la dalle. */
.plan { height: 80svh; }

/* Télécharger : la dalle s'arrête ici. */
.download {
  position: relative; z-index: 2; background: var(--concrete); border-top: 1px solid var(--rule);
  padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(48px, 7vw, 88px);
}
.download h2 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 0.98; font-stretch: 112%; letter-spacing: -0.035em; margin-bottom: clamp(32px, 5vw, 56px); }
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.columns article { padding: 28px clamp(16px, 2.4vw, 32px) 8px 0; }
.columns article + article { padding-left: clamp(16px, 2.4vw, 32px); border-left: 1px solid var(--rule); }
.columns h3 { font-size: 26px; font-stretch: 112%; letter-spacing: -0.02em; }
.ver { margin: 6px 0 20px; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.go {
  display: inline-block; padding: 13px 20px; text-decoration: none; font-weight: 650;
  border: 1px solid var(--ink); color: var(--ink);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.go:hover { background: var(--ink); color: var(--concrete); }
.go:active { transform: scale(0.98); }
.you .go { background: var(--ink); color: var(--concrete); }
.how { margin: 20px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; max-width: 32em; }
.help { margin: 40px 0 0; font-size: 14.5px; color: var(--ink-3); }


.foot {
  z-index: 2; background: var(--concrete); border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 26px var(--gutter) 40px; font-size: 14px; color: var(--ink-3);
}
.foot span { margin-right: auto; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 900px) {
  .bay, .bay.right, .bay.wide, .bay.right.wide { grid-template-columns: minmax(0, 1fr); min-height: auto; padding: 20svh var(--gutter) 16svh; gap: 32px; }
  .bay::before, .bay.right::before { inset: 0; background: linear-gradient(180deg, transparent, rgba(9, 11, 15, 0.62) 16%, rgba(9, 11, 15, 0.62) 84%, transparent); }
  .bay.right .panel, .bay.right figure { grid-column: 1; grid-row: auto; }
  .iphone, .bay .iphone { --w: min(78vw, 340px); }
  .bay figure, .bay.right figure { justify-self: center; }
  .bay .mac, .bay .win { width: 100%; }
  .columns { grid-template-columns: minmax(0, 1fr); border-top: none; }
  .columns article, .columns article + article { padding: 26px 0; border-left: none; border-top: 1px solid var(--rule); }
  .columns article:first-child { border-top: 1px solid var(--ink); }
}
@media (max-width: 560px) {
  .top nav a:last-child { display: none; }
  .panel p { font-size: 17px; }
  .hero { padding-top: 96px; justify-content: flex-end; padding-bottom: 40px; color: #fff; }
  .hero::before { content: ""; position: absolute; inset: 30% 0 0; z-index: -1; background: linear-gradient(180deg, transparent, rgba(9, 11, 15, 0.72) 34%, rgba(9, 11, 15, 0.84)); }
  .hero .lede, .hero .fine { color: rgba(255, 255, 255, 0.88); }
  /* Entre deux sections, l'écran entier au campus : on voit la caméra voler, sans rien devant. */
  .bay, .bay.right, .bay.wide, .bay.right.wide { padding-top: 76svh; padding-bottom: 10svh; }
  .bay::before, .bay.right::before { background: linear-gradient(180deg, transparent 60svh, rgba(9, 11, 15, 0.66) 74svh, rgba(9, 11, 15, 0.66) calc(100% - 6svh), transparent); }
  .get { flex-direction: column; }
  .plat { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plat, .go { transition: none; }
}

/* L'intro : la caméra plonge du ciel ; le texte arrive quand elle se pose. */
.hero > *, .top { transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.16, 1, 0.3, 1); }
.hero > :nth-child(2) { transition-delay: 0.12s; }
.hero > :nth-child(3) { transition-delay: 0.24s; }
.hero > :nth-child(4) { transition-delay: 0.36s; }
.intro:not(.intro-done) .hero > *, .intro:not(.intro-done) .top { opacity: 0; transform: translateY(14px); }
.intro-card, .skip, .geo-credit {
  position: fixed; z-index: 6; opacity: 0; pointer-events: none;
  transition: opacity 0.8s ease;
}
.intro:not(.intro-done) .intro-card, .intro:not(.intro-done) .skip, .intro:not(.intro-done) .geo-credit { opacity: 1; pointer-events: auto; }
.intro-card {
  transform: translateY(8px); transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  left: var(--gutter); bottom: clamp(32px, 8vh, 80px); display: grid; gap: 6px; color: #f4f2ec;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.intro-card .coords { font-stretch: 125%; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.intro-card .place { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 700; font-stretch: 108%; letter-spacing: -0.02em; }
.skip {
  right: var(--gutter); bottom: clamp(32px, 8vh, 80px); padding: 10px 16px; cursor: pointer;
  font: 600 12px/1 var(--font); font-stretch: 125%; letter-spacing: 0.12em; text-transform: uppercase;
  color: #f4f2ec; background: rgba(16, 18, 22, 0.35); border: 1px solid rgba(244, 242, 236, 0.5);
}
.skip:hover { background: rgba(16, 18, 22, 0.55); }
.geo-credit { left: var(--gutter); bottom: 10px; margin: 0; font-size: 11px; color: rgba(244, 242, 236, 0.85); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.credits { flex-basis: 100%; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
@media (prefers-reduced-motion: reduce) {
  .hero > *, .top { transition: none; }
}

@media (max-width: 760px) {
  .skip { top: 16px; bottom: auto; }
}

/* Les légendes de l'intro apparaissent l'une après l'autre. */
.intro:not(.intro-done) .intro-card { opacity: 0; }
.intro:not(.intro-done) .intro-card.show { opacity: 1; transform: none; }


/* Tant que le décor charge, le ciel et déjà le lieu (le canevas apparaît avec l'intro). */
.intro-wait #slab { opacity: 0; }
.intro.intro-wait .intro-card { opacity: 1; transform: none; }

@media (max-width: 560px) {
    }

@media (max-width: 560px) {
  .hero h1 { font-size: 2.55rem; line-height: 0.98; max-width: 11ch; }
  .lede { font-size: 17.5px; margin: 18px 0 22px; }
}
