:root {
  --bg: #f4f5f8;
  --ink: #141a33;
  --muted: #5a6178;
  --blue-ink: #3f51c4;
  --blue: #5b6ee1;
  --blue-dk: #4a5bd0;
  --blue-2: #7b8ef0;
  --navy: #262f6b;
  --night: #10142b;
  --led: #22d17a;
  --alert: #ff4b55;
  --line: rgba(20, 26, 51, .1);
  --hair: 0 0 0 1px rgba(20, 26, 51, .06);
  --r: 16px;
  --pad: clamp(96px, 14vh, 160px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --surface: #fff;
  --edge: rgba(20,26,51,.16);
  --solid: #141a33;
  --on-solid: #fff;
  --nav-bg: rgba(244,245,248,.97);
  --ok-ink: #0d7a48;
  --info-ink: #3446a8;
  /* spacing scale (every gap, margin and padding picks from here) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  /* rhythm: eyebrow to title, title to text, text to the next component, card inner padding, list rows, label to value */
  --gap-eyebrow: var(--sp-4); --gap-head: var(--sp-5); --gap-head-s: var(--sp-4); --gap-comp: var(--sp-6);
  --card-pad: var(--sp-6); --gap-list: var(--sp-2); --gap-label: var(--sp-2);
  --nav-h: 68px; /* fixed header: 12 px + 44 px controls + 12 px */
  color-scheme: light;
}
@media (max-width: 760px) { :root { --gap-eyebrow: var(--sp-3); --gap-head: var(--sp-4); --gap-head-s: var(--sp-3); --gap-comp: var(--sp-5); --card-pad: var(--sp-5); } }
/* dark theme: same tokens, redefined (data-theme is set before first paint by Layout.astro; no JS = follow the OS) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1326; --surface: #181d36; --ink: #e8ebf6; --muted: #a6adc8; --blue-ink: #a9b8f4; --navy: #3a4890; --night: #090c1c;
  --line: rgba(255,255,255,.12); --hair: 0 0 0 1px rgba(255,255,255,.09); --solid: #e8ebf6; --on-solid: #141a33; --nav-bg: rgba(15,19,38,.97); --edge: rgba(255,255,255,.2);
  --ok-ink: #5fe0a0; --info-ink: #b9c4ff; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0f1326; --surface: #181d36; --ink: #e8ebf6; --muted: #a6adc8; --blue-ink: #a9b8f4; --navy: #3a4890; --night: #090c1c;
  --line: rgba(255,255,255,.12); --hair: 0 0 0 1px rgba(255,255,255,.09); --solid: #e8ebf6; --on-solid: #141a33; --nav-bg: rgba(15,19,38,.97); --edge: rgba(255,255,255,.2);
  --ok-ink: #5fe0a0; --info-ink: #b9c4ff; color-scheme: dark;
}
/* while Barlow loads (display=swap): Arial scaled to Barlow's width and line box, so the hero does not jump when it swaps in */
@font-face { font-family: "Barlow Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 100 500; size-adjust: 95.2%; ascent-override: 105.1%; descent-override: 21%; line-gap-override: 0%; }
@font-face { font-family: "Barlow Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 900; size-adjust: 90.1%; ascent-override: 111%; descent-override: 22.2%; line-gap-override: 0%; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button, a { touch-action: manipulation; }
button { -webkit-user-select: none; user-select: none; }
[id] { scroll-margin-top: 80px; }
body {
  margin: 0;
  font-family: Barlow, "Barlow Fallback", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip; /* not hidden: hidden makes body a scroll box and breaks position: sticky */
  -webkit-font-smoothing: antialiased;
}
#scene {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 0; touch-action: pan-y pinch-zoom; cursor: grab;
  opacity: 0; transition: opacity 1.2s ease;
}
.scene-ready #scene { opacity: 1; }
#scene:active { cursor: grabbing; }
.nw { white-space: nowrap; }
#scene.over { z-index: 9; pointer-events: none !important; } /* phones, composer: drawn only inside its sticky viewer, under the nav */
main, .foot { position: relative; z-index: 1; pointer-events: none; }
main:focus { outline: none; }
main a, main button, main video, main .card, .foot a, main .grid-spec, main .does, main .steps, main summary, main details { pointer-events: auto; }
main :is(p, h1, h2, h3, li) { pointer-events: auto; cursor: auto; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .nav .pill:focus-visible, .toggles button:focus-visible { border-radius: 999px; }

.skip { position: absolute; left: 8px; top: 8px; z-index: 100; transform: translateY(-200%); background: var(--solid); color: var(--on-solid); padding: 12px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { transform: none; }

.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.col { max-width: 520px; }
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(44px, 6vw, 92px); line-height: .95; font-weight: 600; letter-spacing: -.04em; }
h1 em { font-style: normal; color: var(--blue); }
h2 { font-size: clamp(40px, 5.5vw, 80px); line-height: .98; font-weight: 600; letter-spacing: -.035em; margin-bottom: 28px; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
p { line-height: 1.6; color: var(--muted); font-size: 17px; }
strong { color: var(--ink); }
.lead { font-size: clamp(18px, 1.5vw, 21px); max-width: 520px; }
.quote { color: var(--ink); font-size: 19px; font-weight: 500; line-height: 1.45; padding-left: 16px; border-left: 2px solid var(--blue); }
.eyebrow {
  font: 600 12px/1 Barlow, "Barlow Fallback", sans-serif; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 20px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--blue); flex: none; }
.hero .eyebrow::before { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--led); box-shadow: 0 0 0 4px rgba(34,209,122,.2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(34,209,122,0); } }

/* tiles logo */
.tiles { display: inline-flex; gap: 4px; }
.tiles i {
  font: 700 17px/1 "Barlow Condensed", sans-serif; font-style: normal; color: #fff;
  background: linear-gradient(180deg, var(--blue-2), var(--blue)); border-radius: 6px;
  width: 26px; height: 32px; display: grid; place-items: center; position: relative;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.tiles i.ko { width: 40px; background: linear-gradient(180deg, #34408a, #1e2556); }
.tiles i::after { content: ""; position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--led); }
.tiles i.ko::after { left: 5px; right: auto; }
.tiles.sm i { width: 20px; height: 25px; font-size: 13px; }
.tiles.sm i.ko { width: 31px; }

/* brand tile icon (modules, composer) */
.tile-ic { position: relative; flex: none; display: block; width: 24px; height: 30px; border-radius: 6px; background: linear-gradient(180deg, var(--blue-2), var(--blue)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.tile-ic::after { content: ""; position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--led); }
.tile-ic.off { background: #d9dce6; box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); }
.tile-ic.off::after { background: #b4b9cb; }

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(16px, calc((100vw - 1180px) / 2));
  transition: box-shadow .2s ease; /* background follows the theme switch in the same frame as the page */
}
.nav { padding-top: max(12px, env(safe-area-inset-top, 0px)); }
.nav.solid, .nav.open { background: var(--nav-bg); box-shadow: 0 1px 0 var(--line); }
.nav.solid { -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.brand { text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.nav nav { display: flex; gap: 22px; align-items: center; }
.nav nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; opacity: .75; min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; position: relative; }
.nav nav a[aria-current] { opacity: 1; }
.nav nav a[aria-current]:not(.pill)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: var(--blue); }
.nav .pill { background: var(--solid); color: var(--on-solid); padding: 0 18px; border-radius: 999px; opacity: 1; }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--solid); color: var(--on-solid); font: 600 15px Barlow, "Barlow Fallback", sans-serif; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; transition: transform .2s; }
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -5px; } .bars::after { top: 5px; }
.nav.open .bars { background: transparent; }
.nav.open .bars::before { transform: translateY(5px) rotate(45deg); }
.nav.open .bars::after { transform: translateY(-5px) rotate(-45deg); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--blue-dk); color: #fff; text-decoration: none; font: 600 17px Barlow, "Barlow Fallback", sans-serif;
  min-height: 52px; padding: 0 26px; border-radius: 999px; white-space: nowrap; transition: transform .16s var(--ease-out), background .2s ease, box-shadow .2s ease;
}
.btn:active, .toggles button:active, .menu-btn:active, .nav .pill:active { transform: scale(.97); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: var(--hair), 0 1px 2px rgba(20,26,51,.06); }
.btn.small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* sections */
.panel { display: flex; align-items: center; padding: var(--pad) 0; }
.panel.tall, .composer, #couleurs { min-height: 100vh; }
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; padding-top: 90px; }
/* wide screens: centred in the space under the fixed nav, same air above and below */
@media (min-width: 1101px) { .hero { padding-top: calc(var(--nav-h) + 12px); padding-bottom: 12px; } }
.hero .wrap > * { max-width: 540px; }
.hero .lead { max-width: 480px; }
.hint { font-size: 14px; margin-top: 40px; color: var(--muted); }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; width: 26px; height: 42px; border: 2px solid var(--muted); border-radius: 14px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: cue 1.8s infinite; }
@media (max-height: 650px) { .scroll-cue { display: none; } }
@keyframes cue { 60% { transform: translateY(12px); opacity: 0; } }

.card { position: relative; background: var(--surface); border-radius: var(--r); padding: 32px; box-shadow: var(--hair), 0 12px 32px -20px rgba(20,26,51,.25); }
.split h2 { font-size: clamp(40px, 4.6vw, 68px); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

.tiny { font-size: 13px; margin: 14px 0 0; }

/* how it works */
#comment { background: var(--bg); position: relative; z-index: 2; }
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { border-top: 1px solid var(--edge); padding-top: 24px; }
.steps b { display: block; font: 600 80px/.9 "Barlow Condensed", sans-serif; color: var(--blue); letter-spacing: -.02em; }
.steps h3 { margin: 20px 0 8px; }
.steps p { margin: 0; }
.compat { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); max-width: 820px; }
.compat b { color: var(--ink); }
#comment .quote { margin: 64px 0 32px; max-width: 620px; }
.does { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 900px; }
.does h3 { font-size: 17px; margin-bottom: 12px; }
.does ul { list-style: none; padding: 0; margin: 0; }
.does li { display: flex; gap: 12px; align-items: baseline; font-size: 17px; padding: 12px 0; border-top: 1px solid var(--line); }
.yes li::before { content: "✓"; color: #12985a; font-weight: 700; }
.no li { color: var(--muted); }
.no li::before { content: "✕"; color: #8d93a8; font-weight: 700; }

/* modules */
.mod-stage { height: 130vh; }
.mod-list .col { margin-bottom: 56px; }
.mod-list { background: var(--bg); position: relative; z-index: 2; }
.grid-spec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(20,26,51,.1); border: 1px solid rgba(20,26,51,.1); border-radius: var(--r); overflow: hidden; }
.grid-spec article { background: var(--surface); padding: 32px 24px; }
.grid-spec h3 { margin: 22px 0 8px; }
.grid-spec p { margin: 0; font-size: 16px; }
.grid-spec .soon { background: var(--bg); }
.note { font-size: 14px; margin: 16px 0 0; }

/* side cards */
.side-card { max-width: 460px; padding: 36px; }
.side-card h2, .build h2 { font-size: clamp(32px, 3vw, 48px); line-height: 1.02; margin-bottom: 18px; }
.panel.right .wrap { display: flex; justify-content: flex-end; }
.spec { list-style: none; padding: 0; margin: 20px 0 0; }
.spec li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.spec span { color: var(--muted); }
.spec b { text-align: right; font-weight: 600; }
.swatches { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.swatches button {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .16s var(--ease-out), box-shadow .2s ease;
}
.swatches button:active { transform: scale(.94); }
.swatches button:focus-visible { outline-offset: 8px; border-radius: 50%; }
.swatches button[aria-checked="true"] { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 2px #fff, 0 0 0 6px var(--blue); }
.swname { font-weight: 600; color: var(--ink); margin-bottom: 0; }

/* « en mouvement »: like a film, centred: the text on top, the 3D loop plays centred in the free space under it */
.film3d { align-items: flex-start; padding-top: calc(var(--nav-h, 64px) + 40px); }
.film3d .film-txt { max-width: 560px; margin: 0 auto; text-align: center; }
.film3d .film-txt .eyebrow { justify-content: center; }
.film-pause { margin-top: 12px; padding: 10px 16px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink, inherit); font: inherit; font-size: 13px; line-height: 1.3; cursor: pointer; }
.film-pause:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.no-3d .film-pause, .no-webgl .film-pause { display: none; }

/* dark project */
.dark { background: var(--night); color: #fff; position: relative; z-index: 2; pointer-events: auto; padding: clamp(120px, 18vh, 200px) 0; }
.dark h2, .dark h3 { color: #fff; }
.dark p { color: #a9b0cc; }
.dark .eyebrow { color: #a9b0cc; }
.dark .eyebrow::before { background: var(--blue-2); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 40px; margin-top: 64px; }
.stats > div { border-top: 1px solid rgba(255,255,255,.16); padding-top: 20px; }
.stats b { display: block; font: 600 96px/.9 "Barlow Condensed", sans-serif; color: #fff; letter-spacing: -.02em; }
.stats span { display: block; color: #a9b0cc; margin-top: 10px; }
.status-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 56px; }
.status-list div { border-top: 1px solid rgba(255,255,255,.16); padding-top: 16px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.status-list em { font-style: normal; font-weight: 500; color: #a9b0cc; font-size: 15px; }
.ok { color: var(--led); } .wip { color: #f5b942; }
.sub { margin: 112px 0 28px; font-size: 28px; letter-spacing: -.02em; }
.team { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 40px; }
.team li { border-top: 1px solid rgba(255,255,255,.16); padding: 16px 0 28px; }
.team b { display: block; font-size: 19px; }
.team span { font-size: 15px; color: #a9b0cc; }
.proc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
.proc figure { margin: 0; }
.proc img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); border-radius: 10px; }
.proc img.tall-img { object-position: 50% 30%; }
.proc figcaption { padding-top: 14px; font-size: 15px; color: #a9b0cc; line-height: 1.45; }
.proc figcaption b { display: block; color: #fff; font-size: 15px; margin-bottom: 4px; }
.road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.road div { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); position: relative; }
.road div::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--blue-2); }
.road div:first-child::before { background: var(--led); }
.road time { font: 600 12px Barlow, "Barlow Fallback", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #a9b0cc; }
.road b { display: block; font-size: 20px; margin: 8px 0 6px; }
.road p { font-size: 16px; margin: 0; }

.contact { min-height: 100vh; }
.contact .wrap > * { max-width: 520px; }
.contact h2 { font-size: clamp(40px, 4.2vw, 64px); }

.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 56px max(16px, calc((100vw - 1180px) / 2)) 28px; border-top: 1px solid var(--line); pointer-events: auto; background: var(--bg); z-index: 2; }
.foot-brand p { margin: 8px 0 0; font-size: 15px; }
.foot-col { display: flex; flex-direction: column; font-size: 15px; }
.foot-col b { margin-bottom: 4px; }
.foot-col a { color: var(--muted); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.sig { font: 700 22px Caveat, cursive; color: var(--navy); margin-left: 10px; }
.copy { grid-column: 1 / -1; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 18px; }

/* progress bar */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 20; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }

/* hero intro */
.intro > span { display: block; overflow: hidden; padding-bottom: .06em; }
.intro > span > span { display: inline-block; transform: translateY(110%); animation: rise .9s var(--ease-out) forwards; }
.intro > span:nth-child(2) > span { animation-delay: .12s; }
.intro > span:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }
/* hover only where a real pointer can hover (no sticky hover after a tap) */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--blue-ink); }
  .btn.ghost:hover { background: var(--surface); box-shadow: 0 0 0 1px var(--edge); }
  .nav nav a:hover { opacity: 1; }
  .foot-col a:hover { color: var(--ink); }
  .toggles button:not([aria-pressed="true"]):hover { box-shadow: inset 0 0 0 1px var(--edge); }
}
.hero .eyebrow, .hero .lead, .hero .ctas, .hero .hint { opacity: 0; animation: fade .6s .45s var(--ease-out) forwards; }
.hero .lead { animation-delay: .6s; } .hero .ctas { animation-delay: .7s; } .hero .hint { animation-delay: 1s; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.nav .tiles i { animation: drop .7s cubic-bezier(.3,1.5,.5,1) backwards; }
.nav .tiles i:nth-child(2) { animation-delay: .08s; } .nav .tiles i:nth-child(3) { animation-delay: .16s; } .nav .tiles i:nth-child(4) { animation-delay: .24s; }
@keyframes drop { from { transform: translateY(-40px); opacity: 0; } }


/* composer */
.composer { align-items: flex-end; padding-bottom: 5vh; }
.build { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; }
.build > * { min-width: 0; }
.config { border-left: 1px solid var(--line); padding-left: 32px; display: flex; flex-direction: column; }
.config-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.count { color: var(--ink); letter-spacing: 0; text-transform: none; font-size: 14px; }
.count b { font: 600 22px/1 "Barlow Condensed", sans-serif; }
#configList { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
#configList li { padding: 6px 12px; border-radius: 999px; background: var(--bg); box-shadow: var(--hair); font-size: 14px; font-weight: 600; }
#configList li:first-child { background: var(--solid); color: var(--on-solid); box-shadow: none; }
.config .btn { margin-top: auto; white-space: normal; text-align: center; min-height: 52px; padding: 10px 22px; line-height: 1.25; }
.master { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.master legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.master label { position: relative; cursor: pointer; }
.master input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.master label > span { display: block; min-height: 44px; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.3; color: var(--muted); box-shadow: inset 0 0 0 1px var(--edge); transition: box-shadow .15s ease, background .15s ease; }
.master label b { display: block; color: var(--ink); font-size: 14px; }
.master input:checked + span { background: var(--bg); box-shadow: inset 0 0 0 2px var(--blue); }
.master input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
#configList li.nfc { display: inline-flex; align-items: center; gap: 8px; padding: 2px 4px 2px 12px; }
.step { position: relative; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--edge); font: 600 16px/1 Barlow, "Barlow Fallback", sans-serif; color: var(--ink); cursor: pointer; transition: transform .16s var(--ease-out); }
.step::after { content: ""; position: absolute; inset: -6px; }
.step:active { transform: scale(.9); }
.step:disabled { opacity: .4; cursor: default; }
.measures { margin-top: 4px; border-top: 1px solid var(--line); }
.measures summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--blue-ink); list-style: none; }
.measures summary::-webkit-details-marker { display: none; }
.measures summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease-out); }
.measures[open] summary::after { transform: rotate(-135deg); }
.measures .spec { margin-top: 0; }
.toggles { display: flex; flex-wrap: wrap; gap: 10px; }
.toggles button {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: 0; min-height: 44px;
  font: 600 15px Barlow, "Barlow Fallback", sans-serif; color: var(--ink); background: var(--surface); padding: 6px 16px 6px 10px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--edge); transition: background .2s ease, color .2s ease, transform .16s var(--ease-out); white-space: nowrap;
}
.toggles button .tile-ic { width: 18px; height: 23px; border-radius: 5px; background: #d9dce6; box-shadow: none; }
.toggles button .tile-ic::after { top: 4px; right: 4px; width: 4px; height: 4px; background: #b4b9cb; }
.toggles button[aria-pressed="true"] { background: var(--solid); color: var(--on-solid); box-shadow: none; }
.toggles button[aria-pressed="true"] .tile-ic { background: linear-gradient(180deg, var(--blue-2), var(--blue)); }
.toggles button[aria-pressed="true"] .tile-ic::after { background: var(--led); }

/* 3D hover label */
/* hotspots: a pulsing dot on each 3D box in the hero, until one has been opened */
.hotspots { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.hotspots.on { opacity: 1; }
.hotspots span { position: absolute; top: -7px; left: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #fff; }
.hotspots span::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--blue); animation: hotspot 1.8s ease-out infinite; }
@keyframes hotspot { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hotspots span::after { animation: none; } }
@media (max-width: 760px) { .hotspots span { top: -4px; left: -4px; width: 8px; height: 8px; box-shadow: 0 0 0 2px #fff; } .hotspots span::after { inset: -2px; border-width: 1.5px; } } /* phone: small boxes, keep their faces readable */
.tip { position: fixed; top: 0; left: 0; z-index: 30; pointer-events: none; max-width: 240px; padding: 12px 14px; border-radius: 12px;
  background: rgba(20,26,51,.94); color: #fff; box-shadow: 0 14px 40px -12px rgba(0,0,0,.5); opacity: 0; transition: opacity .15s ease; }
.tip.on { opacity: 1; }
.tip b { display: block; font-size: 15px; }
.tip span { font-size: 13.5px; color: #b9bfdb; line-height: 1.4; }
/* clicked box: the label stays as a small window with a close button */
.tip.pin { pointer-events: auto; padding-right: 38px; }
.tip-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.tip-x:hover { background: rgba(255,255,255,.12); }
.tip-x:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.tip-mark { display: none; }
/* phone: the window is a full-width bottom sheet; a ring marks the tapped box */
@media (max-width: 760px) {
  .tip { top: auto; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); max-width: none; transform: none !important;
    padding: 16px 18px; border-radius: 16px; translate: 0 12px; transition: opacity .2s ease, translate .3s var(--ease-out); }
  .tip.on { translate: 0 0; }
  .tip.pin { padding-right: 56px; }
  .tip.pin .tip-x { top: 6px; right: 6px; width: 44px; height: 44px; font-size: 22px; }
  .tip-mark { display: block; position: fixed; top: -11px; left: -11px; z-index: 29; width: 22px; height: 22px; border-radius: 50%; pointer-events: none;
    border: 3px solid var(--blue); box-shadow: 0 0 0 2px #fff; opacity: 0; transition: opacity .2s ease; }
  .tip-mark.on { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .tip { translate: none; } }

/* product photo: only when the 3D can't run (no JS, no WebGL, models failed or too slow); never swapped for the 3D */
.hero .fallback { position: absolute; right: 2%; top: 50%; transform: translateY(-50%); width: min(44vw, 640px); height: auto; border-radius: 24px; z-index: -1; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.no-webgl .hero .fallback, .no-3d .hero .fallback { opacity: 1; visibility: visible; }
.no-webgl #scene, .no-3d #scene { display: none; }
.no-3d .hint { display: none; }
.no-webgl .hint { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .intro > span > span { transform: none; }
  .hero .eyebrow, .hero .lead, .hero .ctas, .hero .hint { opacity: 1; }
}

/* tablet */
@media (max-width: 1100px) {
  .hero { align-items: flex-end; padding-bottom: 80px; }
  .hero .wrap > * { max-width: 540px; }
  .hero .fallback { top: 96px; right: 16px; transform: none; width: min(56vw, 560px); }
}
/* short tablet / small landscape window: the text fills the screen height, leaving no room beside it,
   so keep a band above the headline for the model (as on phones) */
@media (min-width: 761px) and (max-width: 1100px) and (max-height: 720px) {
  .hero { padding-top: calc(72px + 32vh); padding-bottom: 32px; }
  /* no 3D: the poster takes the same band */
  .hero .fallback { top: 80px; left: 50%; right: auto; transform: translateX(-50%); width: auto; height: calc(32vh - 24px); max-width: none; }
}
/* burger menu up to 1240 px: the full link row needs ~1000 px of its own, more while the web font loads */
@media (max-width: 1240px) {
  .menu-btn { display: inline-flex; }
  .nav nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 20px 40px -20px rgba(20,26,51,.3); padding: 8px 16px 16px; }
  .nav.open nav { display: flex; }
  .nav nav a { min-height: 48px; font-size: 17px; opacity: 1; border-bottom: 1px solid var(--line); }
  .nav nav a[aria-current]:not(.pill)::after { left: auto; right: 0; top: 50%; bottom: auto; width: 6px; height: 6px; margin-top: -3px; }
  .nav .pill { justify-content: center; margin-top: 12px; border-bottom: 0; }
  /* the page under the open menu dims, so the menu stands off it (dark mode especially); a tap there closes it */
  .nav nav { z-index: 1; }
  .nav.open::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 100vh; background: rgba(9,12,28,.5); animation: nav-dim .2s ease; }
}
@keyframes nav-dim { from { opacity: 0; } }
@media (max-width: 1000px) {
  .grid-spec { grid-template-columns: repeat(2, 1fr); }
  .status-list { grid-template-columns: repeat(2, 1fr); }
  .proc { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(3, 1fr); }
  .build { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .config { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
}

/* phone */
@media (max-width: 760px) {
  :root { --pad: 80px; }
  .hint, .scroll-cue { display: none; }
  .hero { padding-bottom: 48px; }
  h1 { font-size: 44px; }
  .ctas { margin-top: 24px; gap: 10px; }
  .hero .btn { min-height: 46px; padding: 0 18px; font-size: 16px; }
  #probleme { padding-top: 52vh; }
  .card { padding: 24px; }
  .steps, .road, .does { grid-template-columns: 1fr; gap: 28px; }
  .steps { margin-top: 32px; }
  .steps b { font-size: 64px; }
  #comment .quote { margin: 48px 0 28px; }
  .grid-spec { grid-template-columns: 1fr; }
  .grid-spec article { padding: 24px 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
  .grid-spec .tile-ic { grid-row: span 2; }
  .grid-spec h3 { margin: 0 0 4px; }
  .mod-stage { height: 110vh; }
  .mod-list .col { margin-bottom: 32px; }
  /* inside + colours: small card pinned at the bottom so the model stays visible */
  .panel.right { min-height: 100vh; align-items: flex-end; padding-bottom: 12px; }
  .panel.right .wrap { justify-content: stretch; }
  .side-card { position: sticky; bottom: max(12px, env(safe-area-inset-bottom, 0px)); max-width: none; width: 100%; padding: 18px 20px; }
  .side-card h2 { font-size: 24px; margin-bottom: 6px; }
  .side-card p { font-size: 15px; margin: 0; }
  .side-card .eyebrow { margin-bottom: 10px; }
  .spec { margin-top: 10px; }
  .spec li { padding: 7px 0; font-size: 13.5px; flex-direction: column; gap: 2px; }
  .spec b { text-align: left; }
  .swatches { margin-top: 12px; }
  .swname { margin-top: 8px; }
  .composer { padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
  .build { padding: 18px 20px; gap: 14px; }
  .build h2 { font-size: 24px; margin-bottom: 12px; }
  .build .eyebrow { margin-bottom: 10px; }
  .build .tiny { display: none; }
  .toggles { gap: 8px; flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 2px 20px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .toggles::-webkit-scrollbar { display: none; }
  .build h2 { font-size: 22px; }
  #configList li:first-child { display: none; }
  .master { margin-bottom: 10px; }
  .master legend { margin-bottom: 6px; font-size: 13px; }
  .master label > span { min-height: 40px; padding: 6px 10px; }
  .toggles button { font-size: 14px; min-height: 40px; padding: 4px 12px 4px 8px; }
  .config { padding-top: 14px; }
  .config-head { margin-bottom: 10px; }
  #configList { margin-bottom: 14px; gap: 6px; }
  #configList li { font-size: 13px; padding: 4px 10px; }
  .config .btn { min-height: 46px; font-size: 15px; }
  .film3d { align-items: flex-start; padding-top: 88px; }
  .dark { padding: 96px 0; }
  .stats { grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
  .stats b { font-size: 64px; }
  .status-list { gap: 24px; margin-top: 40px; }
  .sub { margin: 72px 0 20px; font-size: 24px; }
  .proc { grid-template-columns: 1fr; gap: 32px; }
  .team { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .contact { min-height: 0; padding: 96px 0; }
  .foot { grid-template-columns: 1fr; gap: 16px; }
  .hero .fallback { left: 16px; right: 16px; top: 84px; width: calc(100% - 32px); max-width: 480px; margin: 0 auto; border-radius: 16px; }
  .no-webgl #probleme, .no-3d #probleme { padding-top: var(--pad); }
  /* no 3D: the poster sits in the flow above the hero copy, so it can never cover the text */
  .no-webgl .hero, .no-3d .hero { flex-direction: column; justify-content: flex-end; align-items: stretch; }
  .no-webgl .hero .fallback, .no-3d .hero .fallback { position: static; order: -1; flex: none; align-self: center; width: calc(100% - 32px); margin: 0 0 20px; }
}
@media (max-width: 400px) {
  .nav { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 36px; }
  h2 { font-size: 36px; }
  .lead { font-size: 17px; }
  .hero .btn { padding: 0 14px; font-size: 15px; }
  .nav .tiles { gap: 3px; }
  .nav .tiles i { width: 22px; height: 28px; font-size: 15px; }
  .nav .tiles i.ko { width: 34px; }
  .team { grid-template-columns: 1fr; }
}

.toggles button[aria-disabled="true"] { cursor: not-allowed; }

/* ===== Cart: header button + count, composer actions, drawer (dialog) ===== */
.cart-btn { position: relative; }
.cart-n { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--blue-dk); color: #fff; font: 700 11px/18px Barlow, "Barlow Fallback", sans-serif; text-align: center; pointer-events: none; }
.cfg-actions { margin-top: auto; display: grid; gap: 10px; }
.config .cfg-actions .btn { margin-top: 0; }
dialog.cart { position: fixed; top: 0; bottom: 0; right: 0; left: auto; margin: 0; width: min(420px, 100%); max-width: 100%; height: 100%; max-height: 100%; padding: 0; border: 0; background: var(--surface); color: var(--ink); box-shadow: -24px 0 48px -24px rgba(10,14,40,.45); }
.cart::backdrop { background: rgba(10,14,32,.5); }
html.theme-switch *, html.theme-switch *::before, html.theme-switch *::after { transition: none !important; } /* app.js: the theme changes in one frame */
html:has(dialog.cart[open]) { overflow: hidden; }
.cart-in { display: flex; flex-direction: column; height: 100%; padding: max(14px, env(safe-area-inset-top, 0px)) 20px 0; overflow-y: auto; overscroll-behavior: contain; }
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cart-head h2 { margin: 0; font: 700 26px/1.1 Barlow, "Barlow Fallback", sans-serif; letter-spacing: -.02em; }
.cart-empty p { margin: 0 0 16px; color: var(--muted); }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cart-lines[hidden] { display: none; }
.cart-line { padding: 16px; border-radius: var(--r); background: var(--bg); box-shadow: var(--hair); }
.cart-line h3 { margin: 0 0 8px; font-size: 18px; }
.cl-mods { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.cl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cl-qty { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.cl-qty b { min-width: 28px; text-align: center; font-size: 17px; }
.cl-q, .cl-edit, .cl-rm { min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge); font: 600 15px Barlow, "Barlow Fallback", sans-serif; cursor: pointer; transition: transform .16s var(--ease-out), box-shadow .15s ease; }
.cl-q { font-size: 20px; line-height: 1; }
.cl-edit, .cl-rm { padding: 0 16px; }
.cl-q:active:not(:disabled), .cl-edit:active, .cl-rm:active { transform: scale(.94); }
.cl-q:disabled { opacity: .4; cursor: default; }
.cl-q:focus-visible, .cl-edit:focus-visible, .cl-rm:focus-visible { border-radius: 999px; }
@media (hover: hover) and (pointer: fine) { .cl-q:not(:disabled):hover, .cl-edit:hover, .cl-rm:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } }
.cart-foot { position: sticky; bottom: 0; margin-top: auto; padding: 16px 0 max(16px, env(safe-area-inset-bottom, 0px)); background: var(--surface); }
.cart-note { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.cart-go { width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding: 10px 22px; }
/* quote form in the drawer (POST /api/order, mailto as fallback) */
.cart-form, .cart-done { --err: #b3261e; padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
:root[data-theme="dark"] .cart-form { --err: #ff9a9f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cart-form { --err: #ff9a9f; } }
.cart-form h3, .cart-done h3 { margin: 4px 0 6px; font: 700 22px/1.15 Barlow, "Barlow Fallback", sans-serif; letter-spacing: -.02em; }
.cart-form h3:focus, .cart-done h3:focus { outline: none; }
.cf-field { display: grid; gap: 6px; margin-bottom: 14px; }
.cf-field label { font-weight: 600; font-size: 15px; }
.cf-field input, .cf-field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge); font: 400 16px/1.4 Barlow, "Barlow Fallback", sans-serif; }
.cf-field textarea { resize: vertical; }
.cf-field input:focus-visible, .cf-field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.cf-field [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--err); }
.cf-err, .cf-status { margin: 0; font-size: 14px; font-weight: 600; color: var(--err); }
.cf-status:empty { display: none; }
.cf-status { margin-bottom: 12px; }
.cf-mail { color: var(--blue-ink); }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-actions { display: grid; gap: 10px; }
.cf-actions .btn { width: 100%; }
.cart-send:disabled { opacity: .6; cursor: progress; }
.cart-done p { color: var(--muted); }

/* ===== Composer 3D viewer (scene.js): hint, Recentrer button; armed stage takes touch gestures ===== */
.stage3d { position: relative; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.stage3d.is-live { touch-action: none; }
.stage-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--muted); font-size: 12px; line-height: 1.3; white-space: nowrap;
  pointer-events: none; transition: opacity .3s ease; }
.stage-hint.off { opacity: 0; }
@media (max-width: 760px) { .stage-hint { top: 6px; bottom: auto; left: 8px; transform: none; padding: 4px 10px; font-size: 11px; } .stage-reset { top: 6px; right: 6px; padding: 4px 10px; font-size: 11px; } } /* phone: in the free band above the model */
.stage-reset { position: absolute; top: 10px; right: 10px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink, inherit); font: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; }
.stage-reset[hidden] { display: none; }
.no-3d .stage-hint, .no-3d .stage-reset, .no-webgl .stage-hint, .no-webgl .stage-reset { display: none; }
