/* Pelicular — the reel (prototype, the editor's request of 30/10/2026): the page unrolled left to
   right like a film, one screen per frame, perforations along both edges travelling with it.
   Loaded after framer.css and visite.css, it only acts once bobine.js has built the reel
   (html.bobine): without JavaScript, with motion reduced by the system, on a phone or in print,
   the page stays the vertical page of framer.css. */

@media screen {

/* --- Waiting for the reel: the vertical page is not shown for an instant -------------------- */

html.bobine-wait:not(.bobine) body > main,
html.bobine-wait:not(.bobine) body > footer { visibility: hidden; animation: bobine-show 0s linear 2.5s forwards; }
@keyframes bobine-show { to { visibility: visible; } }

/* --- The film ------------------------------------------------------------------------------- */

html.bobine {
  --film: #050b13;
  --film-line: rgba(120, 170, 255, 0.07);
  --film-print: #6f7b8d;
  --band: clamp(20px, 3.1svh, 30px);
  --gate-pad: clamp(12px, 2.6svh, 34px);
  --perf: 24px;
  --perf-hole: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Crect x='7.5' y='7' width='9' height='12' rx='2' fill='%23000206' stroke='%2378aaff' stroke-opacity='.22'/%3E%3C/svg%3E");
  scroll-behavior: auto;
}
html.bobine[data-theme="light"] {
  --film: #dde4ec;
  --film-line: rgba(20, 60, 110, 0.08);
  --film-print: #5a6576;
  --perf-hole: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Crect x='7.5' y='7' width='9' height='12' rx='2' fill='%23f3f6fa' stroke='%23143c6e' stroke-opacity='.2'/%3E%3C/svg%3E");
}

html.bobine, html.bobine body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.bobine body { display: flex; flex-direction: column; height: 100vh; height: 100svh; }
html.bobine .bar { position: relative; flex: none; }

/* The reel: the one scroller of the page, sideways. bobine.js drives it; its bar is not shown. */
html.bobine body > main {
  flex: 1 1 auto; min-height: 0; display: flex; align-items: stretch;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior: none; scroll-behavior: auto;
  scrollbar-width: none; background: var(--film);
}
html.bobine body > main::-webkit-scrollbar { display: none; }
html.bobine .bobine-stash { display: none; }

/* A frame: the width and the height of the window, under the bar. The perforations run in both
   bands, a whole number of them per frame so that they carry on from one frame to the next. */
html.bobine .frame {
  position: relative; flex: 0 0 100%; width: 100%; height: 100%; min-width: 0;
  display: grid; grid-template-rows: var(--band) minmax(0, 1fr) var(--band);
  overflow: clip;
}
html.bobine .frame::before, html.bobine .frame::after {
  content: ""; background: var(--perf-hole) 0 50% / var(--perf) var(--band) repeat-x;
}
/* The picture of the frame: its corners rounded like a gate's, a thin line of film base between
   two frames. */
html.bobine .frame-gate {
  position: relative; isolation: isolate; min-height: 0; margin-inline: 1px;
  display: flex; flex-direction: column; padding-block: var(--gate-pad);
  background: var(--ground); border-radius: 10px; overflow: clip;
  box-shadow: inset 0 0 0 1px var(--film-line);
}
html.bobine .frame-fit { margin-block: auto; width: 100%; flex: none; }
/* Last resort, when even made smaller a frame does not hold: it scrolls, on its own. */
html.bobine .frame-gate.is-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
html.bobine .frame-gate.is-scroll > .frame-fit { margin-block: 0 auto; }

/* The edge print, as on a film's edge: the frame's number and its chapter above, a timecode
   under; printed over a few perforations, never over the picture. */
html.bobine .frame-edge, html.bobine .frame-tc {
  position: absolute; z-index: 1; display: flex; align-items: center; gap: 10px;
  height: calc(var(--band) - 8px); padding: 0 10px; border-radius: 4px;
  background: var(--film); color: var(--film-print);
  font: 500 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  pointer-events: none; user-select: none;
}
html.bobine .frame-edge { top: 4px; left: clamp(20px, 3vw, 44px); }
html.bobine .frame-edge b { color: var(--accent); font-weight: 600; letter-spacing: 0.1em; }
html.bobine .frame-tc { bottom: 4px; right: clamp(20px, 3vw, 44px); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

/* Where one is in the reel: a thin strip at the foot of the window, a mark at each chapter. One
   points or drags along it to wind the reel. */
html.bobine .reel-progress {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 14px; cursor: pointer; touch-action: none;
}
html.bobine .reel-progress::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line-strong);
}
html.bobine .reel-progress-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow); transform-origin: 0 50%; transform: scaleX(0);
}
html.bobine .reel-progress-mark {
  position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--line-strong); transform: translateX(-0.5px);
}
html.bobine .reel-progress:hover .reel-progress-fill, html.bobine .reel-progress.held .reel-progress-fill,
html.bobine .reel-progress:hover::before { height: 5px; }

/* --- The page, cut into frames --------------------------------------------------------------- */

html.bobine section { padding-block: 0; }
html.bobine .frame-fit .halo::before { display: none; }
html.bobine .head { max-width: none; margin-bottom: clamp(18px, 3.4svh, 44px); }
html.bobine .wrap > :last-child, html.bobine .page-block > :last-child, html.bobine .head > :last-child { margin-bottom: 0; }

/* A frame that holds only a title: an intertitle, its words larger. */
html.bobine .frame.is-title h2 { font-size: clamp(2rem, min(5vw, 8.4svh), 4.4rem); max-width: 18ch; }
html.bobine .frame.is-title .head .lead { font-size: clamp(1.1rem, min(1.9vw, 3svh), 1.5rem); }
html.bobine h1 { font-size: clamp(2rem, min(4.6vw, 7.4svh), 4.5rem); }
html.bobine h2 { font-size: clamp(1.6rem, min(3.6vw, 6.2svh), 3rem); }
html.bobine .lead { font-size: clamp(1rem, min(1.6vw, 2.5svh), 1.3rem); }
html.bobine .page-block { margin-bottom: 0; gap: clamp(16px, 3svh, 40px); }
html.bobine .bento, html.bobine .grid, html.bobine .soon-cols { gap: clamp(14px, 2.4svh, 24px); }
html.bobine .card { padding: clamp(16px, 2.6svh, 24px); }
html.bobine .bento .card .demo { margin-bottom: clamp(14px, 2.4svh, 24px); }
html.bobine .ticks { gap: clamp(6px, 1.2svh, 12px); }
html.bobine .demo-caption { margin-top: 8px; margin-bottom: 0; }
html.bobine [tabindex="-1"]:focus { outline: none; }

/* The opening frame: the mark, the title on the left, what it promises on the right. */
html.bobine .hero { overflow: visible; }
html.bobine .hero-logo { margin-bottom: clamp(14px, 3.4svh, 40px); }
html.bobine .hero-logo img { width: auto; max-width: 100%; height: clamp(56px, 19svh, 260px); }
html.bobine .hero h1 { margin-bottom: 0; }
html.bobine .hero .lead { margin-bottom: 0; }
html.bobine .hero .ctas { margin-block: clamp(18px, 4svh, 44px) clamp(12px, 2.4svh, 24px); }
@media (min-aspect-ratio: 5/4) {
  html.bobine .hero-text {
    max-width: none; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    column-gap: clamp(28px, 4.4vw, 72px); align-items: end;
  }
  html.bobine .hero-text > .eyebrow { grid-column: 1; grid-row: 1; justify-self: start; }
  html.bobine .hero-text > h1 { grid-column: 1; grid-row: 2; }
  html.bobine .hero-text > .lead { grid-column: 2; grid-row: 1 / span 2; }
  html.bobine .hero-text > .ctas, html.bobine .hero-text > .chips { grid-column: 1 / -1; }
}

/* The tour: as large as the frame lets it, its column beside, scrolling on its own if long. */
html.bobine .hero-shot { margin-top: 0; }
html.bobine .tour { --pic-w: calc((var(--gate-h, 600px) - var(--tour-chrome, 150px)) * 1.6); max-width: calc(var(--pic-w) + 320px); margin-inline: auto; }
html.bobine .tour-head { margin-bottom: clamp(8px, 1.6svh, 14px); }
html.bobine .tour-body { grid-template-columns: minmax(0, 1fr) 300px; align-items: stretch; }
html.bobine .tour-side { position: relative; top: auto; contain: size; min-height: 0; overflow: hidden; }
html.bobine .tour-side > * { flex-shrink: 0; }
html.bobine .tour-side > .tour-live { flex: 1 1 auto; min-height: 4em; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
html.bobine .tour-guide { margin-top: 0; }
html.bobine .tour-caption { margin-top: 8px; }
@media (max-width: 900px) {
  html.bobine .tour-body { grid-template-columns: minmax(0, 1fr) 240px; gap: 14px; }
  html.bobine .tour { max-width: calc(var(--pic-w) + 254px); }
}

/* A story is read in columns across the frame, its heading over them. */
html.bobine .story p:not(.story-tag) { max-width: none; }
html.bobine .card.story { display: block; column-width: 21em; column-gap: clamp(28px, 3.4vw, 56px); }
html.bobine .card.story > .pict, html.bobine .card.story > .story-tag, html.bobine .card.story > h3 { column-span: all; }
html.bobine .card.story > .pict { margin-bottom: clamp(10px, 1.8svh, 16px); }
html.bobine .page-block > .story, html.bobine .who > .wrap > .story { column-width: 22em; column-gap: clamp(28px, 3.4vw, 56px); }
html.bobine .page-block > .story > .story-tag, html.bobine .who > .wrap > .story > .story-tag { column-span: all; }
html.bobine .who > .wrap > .story { margin-bottom: clamp(18px, 3.4svh, 44px); }

/* A card with its picture: the words given a little more room. */
html.bobine .bento > .with-shot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(20px, 3vw, 40px); }
html.bobine .bento > .with-shot .shot-demo .demo, html.bobine .bento > .with-shot > .window { max-width: calc((var(--gate-h, 600px) - 110px) * var(--ar, 1.6)); margin-inline: auto; }

/* A living piece of interface alone in its frame: as large as the frame lets it. */
html.bobine .page-block > .reveal:has(> .demo) { width: 100%; max-width: calc((var(--gate-h, 600px) - 64px) * var(--ar, 1.78)); margin-inline: auto; }
html.bobine .split .demo { max-width: calc((var(--gate-h, 600px) - 64px) * var(--ar, 1.78)); }
/* A list or a demo of a split alone in its frame: across it, the list in columns. */
html.bobine .split > :only-child { grid-column: 1 / -1; }
html.bobine .split > .ticks:only-child { display: block; column-width: 22em; column-gap: clamp(28px, 3.4vw, 56px); }
html.bobine .split > .ticks:only-child > li { break-inside: avoid; margin-bottom: clamp(8px, 1.4svh, 14px); }
html.bobine .split > .reveal:only-child { width: 100%; max-width: calc((var(--gate-h, 600px) - 64px) * var(--ar, 1.78)); margin-inline: auto; }

/* Effects and Sound: the title and its words on the left, the pictures on the right. */
html.bobine .gallery { width: 100%; max-width: calc((var(--gate-h, 600px) - 128px) * 1.6 + 16px); margin-inline: auto; }
@media (min-aspect-ratio: 5/4) {
  html.bobine .page-block:has(> .gallery) {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); grid-template-rows: auto auto 1fr;
    column-gap: clamp(24px, 3.6vw, 56px); row-gap: clamp(14px, 2.6svh, 28px); align-items: start;
  }
  html.bobine .page-block:has(> .gallery) > .page-title { grid-column: 1; grid-row: 1; }
  html.bobine .page-block:has(> .gallery) > .page-title h2 { font-size: clamp(1.5rem, min(2.6vw, 5svh), 2.5rem); }
  html.bobine .page-block:has(> .gallery) > .lead { grid-column: 1; grid-row: 2; margin: 0; font-size: clamp(1rem, min(1.4vw, 2.3svh), 1.2rem); }
  html.bobine .page-block:has(> .gallery) > .gallery { grid-column: 2; grid-row: 1 / span 3; }
  /* Effects: its list under its words, beside the pictures, when the frame holds them. */
  html.bobine .page-block:has(> .gallery) > .ticks { grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr); font-size: 0.95rem; }
  html.bobine .page-block:has(> .gallery) > :nth-child(n+4):not(.ticks) { grid-column: 1 / -1; grid-row: auto; }
}

/* The waiting list, and the foot of the page under it: the end of the reel. */
html.bobine footer { border-top: 0; padding-block: clamp(16px, 4svh, 48px) 0; }
html.bobine .frame-fit > footer { margin-top: clamp(8px, 2svh, 24px); }

/* A narrow frame (a tablet held upright): one column. */
@media (max-aspect-ratio: 5/4) {
  html.bobine .bento > .with-shot { grid-template-columns: minmax(0, 1fr); }
}
}
