/* Rien qu'à Vous.
   One overhead picture per trade, the app on the tablet, large plain type,
   hairlines, native scroll. Nothing is tied to scroll position. */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url("/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url("/fonts/Inter-SemiBold.woff2") format("woff2"); }

:root {
  --paper: #f4f4f2;
  --ink: #101113;
  --mute: #4c4f54;
  --faint: #6c6e72;
  --line: #c9cac7;
  --phase: #b3261a;
  --page-x: clamp(20px, 4.2vw, 72px);
  --top-h: 68px;
  --display: clamp(2.9rem, 1.2rem + 6.4vw, 7.6rem);
  --title: clamp(1.9rem, 1.1rem + 2.6vw, 3.5rem);
  --lead: clamp(1.08rem, .95rem + .45vw, 1.35rem);
  --handle: 7px;
  --tap: 44px;
  --swap: .7s;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --rotate-every: 7s;

  /* Text over the picture: dark on pale surfaces, white on dark ones. */
  --on-pic: var(--ink);
  --on-pic-mute: #33363a;
}

:root[data-tone="dark"] {
  --on-pic: #fff;
  --on-pic-mute: #f0f1f2;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.5 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
main:focus { outline: 0; }

/* First stop of the keyboard: jump over the top bar. */
.skip { position: absolute; left: var(--page-x); top: -80px; z-index: 5; background: var(--ink); color: #fff; font-weight: 600; padding: 12px 18px; text-decoration: none; }
.skip:focus { top: 12px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* ---------- Top bar ---------- */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  height: var(--top-h);
  padding: 0 var(--page-x);
  display: flex;
  align-items: center;
  gap: 36px;
  color: var(--on-pic);
  transition: color var(--swap) ease-out;
}

.mark { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; text-decoration: none; }

.call:hover { text-decoration: underline; text-underline-offset: 4px; }
.call { display: none; margin-left: auto; font-size: .95rem; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--phase); padding: 4px 0; }

/* Short text links get a finger-sized hit area without moving their underline. */
.mark, .call, .open a, .foot-nav a, .foot-id a { position: relative; }
.mark::after, .call::after, .open a::after, .foot-nav a::after, .foot-id a::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: var(--tap); transform: translateY(-50%); }

/* ---------- Hero ---------- */

.hero { min-height: 100svh; display: flex; flex-direction: column; }
.view { position: relative; flex: 1; min-height: 540px; overflow: hidden; display: flex; align-items: center; background: #d9d6d1; }

/* The stage covers the view like a background image, anchored right, and
   keeps the picture's 2:1 ratio so the tablet stays on its empty spot. */
.stage {
  position: absolute;
  top: 50%;
  right: 0;
  height: max(100%, 50vw);
  aspect-ratio: 2 / 1;
  transform: translateY(-50%);
  container-type: size;
}

.surface { position: absolute; inset: 0; opacity: 0; transition: opacity var(--swap) ease-out; }
.surface.on { opacity: 1; }
.surface img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Tablet: placed in stage units so it follows the picture at any size.
   --u is one percent of the picture's width. --keep is the share of the
   picture the stage shows, counted from the right edge (1 = all of it). */
.stage { --keep: 1; }
.tablet {
  --u: calc(1cqw / var(--keep));
  --x: 69.8;
  --y: 52;
  --w: 27;
  --r: -3deg;
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--w) * var(--u));
  aspect-ratio: 1472 / 932;
  padding: calc(.3 * var(--u));
  background: linear-gradient(145deg, #2b2d31, #0a0b0d 40%);
  border-radius: calc(.85 * var(--u));
  transform: translate(calc((var(--x) - (1 - var(--keep)) * 100) * var(--u) - 50%), calc(var(--y) * 1cqh - 50%)) rotate(var(--r));
  transition: transform var(--swap) var(--ease);
  /* Window light comes from the upper left: the shadow falls lower right. */
  box-shadow:
    calc(.25 * var(--u)) calc(.35 * var(--u)) calc(.5 * var(--u)) rgba(0, 0, 0, .38),
    calc(1.1 * var(--u)) calc(1.6 * var(--u)) calc(2.6 * var(--u)) calc(-.4 * var(--u)) rgba(0, 0, 0, .42);
}


.glass { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: calc(.55 * var(--u)); background: #0c0f15; }
.glass img { width: 100%; height: 100%; display: block; transition: opacity .3s ease-out; }
.glass img.out { opacity: 0; }

/* On dark surfaces the left side is deepened so white text holds. */
.view::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, 0) 58%); opacity: 0; transition: opacity var(--swap) ease-out; pointer-events: none; }
:root[data-tone="dark"] .view::after { opacity: 1; }

.hero-text { position: relative; z-index: 2; width: min(46vw, 760px); padding: var(--top-h) 0 24px var(--page-x); color: var(--on-pic); transition: color var(--swap) ease-out; }

h1 { font-size: var(--display); font-weight: 600; line-height: .96; letter-spacing: -0.045em; text-wrap: balance; }
.lead { font-size: var(--lead); line-height: 1.42; max-width: 34ch; margin-top: 1.5em; }
.act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 2em; }

.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 17px 26px;
  border-radius: 2px;
  transition: background-color .18s ease-out;
}
.btn:hover { background: var(--phase); }
.note { font-size: .95rem; color: var(--mute); }
.hero-text .note { color: var(--on-pic-mute); }
:root[data-tone="dark"] .hero-text .btn { background: #fff; color: var(--ink); }
:root[data-tone="dark"] .hero-text .btn:hover { background: var(--phase); color: #fff; }

/* Trade bar: picks the surface, the app and the example. */

.bar { padding: 0 var(--page-x) 26px; background: var(--paper); border-top: 1px solid var(--ink); }
.trades { display: flex; flex-wrap: wrap; column-gap: clamp(18px, 2.4vw, 44px); }

.trade {
  position: relative;
  padding: 18px 0 14px;
  font-size: clamp(1.1rem, .8rem + .9vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--faint);
  text-decoration: none;
  transition: color .18s ease-out;
}
.trade:hover, .trade[aria-current="true"] { color: var(--ink); }

/* Marker on the picked trade; it fills while the hero waits to move on. */
.trade i { position: absolute; left: 0; right: 0; top: -1px; height: 4px; background: var(--phase); transform: scaleX(0); transform-origin: 0 50%; }
.trade[aria-current="true"] i { transform: scaleX(1); }
.auto .trade[aria-current="true"] i { animation: fill var(--rotate-every) linear; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.case { font-size: var(--lead); line-height: 1.42; max-width: 78ch; min-height: 2.84em; margin-top: 6px; }

/* ---------- Sections ---------- */

.sec { padding: clamp(64px, 9vw, 140px) var(--page-x); border-top: 1px solid var(--line); }
h2 { font-size: var(--title); font-weight: 600; line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }

/* Live screen in a hairline frame with corner handles. */

.screen-sec { border-top: 0; padding-top: clamp(48px, 6vw, 96px); }
.screen-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; }
/* What the screen below is for, in the shop's words. */
.what { min-height: 0; margin: 14px 0 clamp(22px, 2.6vw, 36px); }
.open { font-size: .95rem; color: var(--mute); }

.frame { position: relative; border: 1px solid var(--ink); padding: 10px; background: #fff; max-width: 1460px; }
.h { position: absolute; width: var(--handle); height: var(--handle); background: var(--paper); border: 1px solid var(--ink); }
.tl { top: calc(var(--handle) / -2 - 1px); left: calc(var(--handle) / -2 - 1px); }
.tr { top: calc(var(--handle) / -2 - 1px); right: calc(var(--handle) / -2 - 1px); }
.bl { bottom: calc(var(--handle) / -2 - 1px); left: calc(var(--handle) / -2 - 1px); }
.br { bottom: calc(var(--handle) / -2 - 1px); right: calc(var(--handle) / -2 - 1px); }

.screen { position: relative; aspect-ratio: 1440 / 900; overflow: hidden; background: #0c0f15; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.screen iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; }

/* Phone only: the preview does not take touches, this opens the app. */
.try { display: none; }

.trades.small { margin-top: 10px; }
.trades.small .trade { font-size: 1.05rem; padding: 14px 0 6px; }
.trades.small .trade i { top: auto; bottom: 0; height: 2px; }

/* Demonstration opened over the page: a bar with the way out, then the app. */
html:has(.demo[open]) { overflow: hidden; }
.demo { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ink); }
.demo[open] { display: flex; flex-direction: column; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px var(--page-x); color: #fff; font-weight: 600; }
.demo-close { font: inherit; font-weight: 600; color: var(--ink); background: #fff; border: 0; border-radius: 2px; min-height: var(--tap); padding: 0 20px; cursor: pointer; }
.demo-close:hover { background: var(--phase); color: #fff; }
.demo-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.demo iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* Figures */

.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 72px); }
.fig b { display: block; font-size: var(--display); font-weight: 600; line-height: .92; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.fig p { font-size: var(--lead); line-height: 1.42; max-width: 24ch; margin-top: 18px; }
.fig small { display: block; font-size: .875rem; color: var(--mute); margin-top: 10px; }

/* Title left, rows right */

.split { display: grid; grid-template-columns: minmax(280px, 4fr) 8fr; gap: clamp(28px, 4vw, 72px); align-items: start; }
.rows > * { display: grid; grid-template-columns: minmax(180px, 3fr) 5fr; gap: 12px 32px; padding: 22px 0 24px; border-top: 1px solid var(--line); }
.rows > *:last-child { border-bottom: 1px solid var(--line); }
.rows dt, .rows h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.rows dd, .rows p { max-width: 54ch; }

.steps { counter-reset: step; }
.steps h3::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font-size: .875rem; font-weight: 400; letter-spacing: 0; color: var(--mute); font-variant-numeric: tabular-nums; margin-bottom: 4px; }

.prose p { font-size: var(--lead); line-height: 1.45; max-width: 58ch; }
.prose p + p { margin-top: 1.1em; }

/* Close */

.close { background: var(--ink); color: #fff; border-top: 0; }
.close h2 { font-size: var(--display); line-height: .96; letter-spacing: -0.045em; }
.close .note { color: #b9bbbf; }
.close .btn { background: #fff; color: var(--ink); }
.close .btn:hover { background: var(--phase); color: #fff; }

/* Footer: who publishes, where to go, and the notice about the pictures. */
.foot { padding: 40px var(--page-x) 44px; border-top: 1px solid var(--ink); font-size: .95rem; color: var(--mute); display: grid; grid-template-columns: minmax(280px, 4fr) 8fr; gap: 28px clamp(28px, 4vw, 72px); }
.foot-id b { color: var(--ink); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.foot-id p + p { margin-top: 4px; }
.foot-nav { display: flex; flex-wrap: wrap; align-content: start; gap: 10px 32px; }
.foot-nav a { color: var(--ink); font-weight: 600; text-decoration: none; padding: 4px 0; border-bottom: 1px solid var(--line); }
.foot-nav a:hover { border-bottom-color: var(--phase); }
.foot-note { grid-column: 1 / -1; font-size: .875rem; padding-top: 18px; border-top: 1px solid var(--line); }
.close + .foot { border-top: 0; }

/* Plain pages (legal notice): no picture behind the top bar. */
.plain .top { position: static; color: var(--ink); border-bottom: 1px solid var(--line); }
.plain .call { display: block; }
.page-head { border-top: 0; padding-bottom: clamp(28px, 3vw, 56px); }
.legal p { font-size: 1.0625rem; }
.page-head .lead { max-width: 52ch; }
.prose a, .legal a, .foot a { text-underline-offset: 3px; }
.lost { border-top: 0; padding-top: 0; }

/* Trade pages: breadcrumb, the work surface as a band, the screen as a link. */
.crumb { font-size: .95rem; color: var(--mute); margin-bottom: 18px; }
.page-head h1 { max-width: 16ch; }
.page-head .act { margin-top: 1.6em; }
.band { display: block; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.band img { display: block; width: 100%; height: clamp(240px, 34vw, 520px); object-fit: cover; }
.band + .sec { border-top: 0; }
.shot { margin-top: clamp(18px, 2vw, 28px); }
.shot .screen { display: block; }
.other h2 { font-size: 1.3rem; letter-spacing: -0.02em; }
.trades.small .trade[aria-current="page"] { color: var(--ink); }
.trades.small .trade[aria-current="page"] i { transform: scaleX(1); }
.foot a { text-underline-offset: 3px; }

/* ---------- Stacked: the text sits above the picture ----------
   Used when the window is too narrow or too tall for the text to stay
   on the empty left part of the picture. */

@media (max-width: 1099px), (max-aspect-ratio: 13/10) {
  :root, :root[data-tone="dark"] { --on-pic: var(--ink); --on-pic-mute: var(--mute); }
  :root[data-tone="dark"] .hero-text .btn { background: var(--ink); color: #fff; }
  .top { position: static; }
  .call { display: block; }
  .hero { min-height: 0; }
  /* Text first, then the picture, so the trade bar sits right under it. */
  .view { display: flex; flex-direction: column; align-items: stretch; min-height: 0; background: var(--paper); }
  .stage { order: 2; }
  .view::after { display: none; }
  .hero-text { width: auto; max-width: 760px; padding: 16px var(--page-x) 40px; }
  .stage { position: relative; top: auto; height: auto; width: 100%; transform: none; }
  .split { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  /* The example already sits right above, under the trade bar. */
  .what { display: none; }
  .screen-head { margin-bottom: clamp(22px, 2.6vw, 36px); }
}

/* ---------- Narrow, not a phone: the picture loses its empty left part,
   which no longer carries the text, and the trades line up on two rows. ---------- */

@media (min-width: 700px) and (max-width: 1099px) {
  .stage { --keep: .75; aspect-ratio: 3 / 2; }
  .surface img { object-position: 100% 50%; }
}

@media (min-width: 700px) and (max-width: 899px) {
  .stage { --keep: .6667; aspect-ratio: 4 / 3; }
  .bar .trades { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 0; }
  .bar .trade { border-top: 1px solid var(--line); }
  .bar .trade:nth-child(-n+4) { border-top: 0; }
}

/* ---------- Phone: square crop of the right half ---------- */

@media (max-width: 699px) {
  /* The phone picture is the right half, already cut square. */
  .stage { --keep: .5; aspect-ratio: 1 / 1; }
  .top { gap: 16px; }
  .top a { white-space: nowrap; }
  .trades { column-gap: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .trade { padding: 14px 0 12px; border-top: 1px solid var(--line); font-size: 1.2rem; }
  .trade:nth-child(-n+2) { border-top: 0; }
  .trade i { top: -1px; }
  .bar { padding-bottom: 20px; }
  .case { min-height: 0; margin-top: 14px; }
  .trades.small { display: flex; column-gap: 18px; }
  .trades.small .trade { border-top: 0; }
  .figures { grid-template-columns: 1fr; }
  .rows > * { grid-template-columns: 1fr; }
  /* Phone: the app shows its phone layout as a preview. It takes no touch,
     so the thumb scrolls the page and nothing scrolls inside the frame.
     A tap, or the button below, opens the app full screen. */
  .frame { padding: 0; }
  .frame .h { display: none; }
  .screen.live { aspect-ratio: auto; height: min(560px, 68svh); cursor: pointer; }
  .screen.live iframe { width: 100%; height: 100%; pointer-events: none; }
  .try { display: block; margin-top: 14px; }
  .try .btn { display: block; text-align: center; }
  /* Until the app answers, the still shows its top left corner undistorted. */
  .screen.live img { object-fit: cover; object-position: 0 0; }
  .band img { height: auto; }
  .foot-nav { row-gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .surface, .tablet, .glass img, .trade, .top, .hero-text, .btn { transition: none; }
  .auto .trade[aria-current="true"] i { animation: none; }
}
