:root {
  --bg: #0A0D12; --fg: #E7EBF0; --dim: #A3ACB9; --line: rgba(231,235,240,.14);
  --accent: #5B9BFF; --glow: rgba(91,155,255,.4);
  --font: "IBM Plex Sans", system-ui, sans-serif; --display: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--font); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.dim { color: var(--dim); }
.accent { color: var(--accent); }
.tag { color: var(--accent); margin-bottom: 18px; }

/* header */
.hud-top { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 28px; padding: 18px 28px;
  background: linear-gradient(180deg, rgba(10,13,18,.7), transparent); transition: background .3s; }
.hud-top.solid { background: rgba(10,13,18,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.logo { font: 700 15px var(--font); letter-spacing: .3em; text-decoration: none; }
.logo span { color: var(--accent); margin: 0 .3em; }
nav { display: flex; gap: 26px; margin-left: auto; }
nav a { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--dim); transition: color .2s; }
nav a:hover { color: var(--fg); }
.btn { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 11px 16px;
  border: 1px solid var(--accent); color: var(--fg); background: rgba(91,155,255,.1); transition: background .25s, box-shadow .25s; }
.btn:hover { background: var(--accent); color: #0A0D12; box-shadow: 0 0 32px var(--glow); }
.btn.big { display: inline-block; font-size: 13px; padding: 18px 26px; margin-top: 28px; }

/* hero */
#hero { position: relative; height: 100vh; }
.stage { position: relative; height: 100vh; overflow: hidden; }
.poster, #seq { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster { display: none; }
.corners i { position: absolute; width: 22px; height: 22px; border: 1px solid var(--line); z-index: 3; }
.corners i:nth-child(1) { top: 80px; left: 24px; border-width: 1px 0 0 1px; }
.corners i:nth-child(2) { top: 80px; right: 24px; border-width: 1px 1px 0 0; }
.corners i:nth-child(3) { bottom: 24px; left: 24px; border-width: 0 0 1px 1px; }
.corners i:nth-child(4) { bottom: 24px; right: 24px; border-width: 0 1px 1px 0; }
.scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .18;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0,0,0,.5) 3px 4px); }
.stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 70% 50%, transparent 40%, rgba(0,0,0,.75)), linear-gradient(90deg, rgba(0,0,0,.65), transparent 55%); }

.title { position: absolute; left: clamp(20px, 5vw, 72px); bottom: clamp(70px, 14vh, 140px); z-index: 4; max-width: 760px; }
h1, h2 { font-weight: 700; letter-spacing: -.035em; line-height: .92; }
h1 { font-size: clamp(52px, 9vw, 148px); }
h2 { font-size: clamp(42px, 6.6vw, 104px); }
.l { display: block; }
.sub { margin-top: 22px; max-width: 420px; color: var(--dim); font-size: 17px; }

.beat { position: absolute; z-index: 4; right: clamp(20px, 6vw, 96px); top: 50%; transform: translateY(-50%);
  font: 700 clamp(40px, 6vw, 96px)/.95 var(--font); letter-spacing: -.035em; text-align: right; opacity: 0; }
.beat .w { display: inline-block; }

.card { position: absolute; z-index: 4; left: clamp(20px, 5vw, 72px); top: 22vh; width: 280px; padding: 16px 18px; opacity: 0; }
.glass { background: rgba(20,20,20,.42); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card p + p { margin-top: 8px; }
.card p:nth-child(2) { font-size: 14px; line-height: 1.45; }

.hud-bottom { position: absolute; z-index: 4; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; color: var(--dim); }
.hud-bottom b { color: var(--fg); font-weight: 500; }
.bar { width: 160px; height: 2px; background: var(--line); }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.scroll-hint { position: absolute; z-index: 4; right: 32px; bottom: 28px; color: var(--dim); }

/* engine */
#live, #city { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
#live > img, #city > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#live::after, #city::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.85) 10%, rgba(0,0,0,.2) 70%); }
#dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.copy { position: relative; z-index: 3; padding: 120px clamp(20px, 5vw, 72px); max-width: 720px; }
.copy > p:not(.tag) { margin-top: 24px; color: var(--dim); max-width: 480px; }
.stats { list-style: none; margin-top: 36px; display: grid; gap: 12px; color: var(--dim); }
.stats li { border-top: 1px solid var(--line); padding-top: 12px; }
.stats b { color: var(--fg); font-weight: 500; margin-right: 8px; }

/* flip (light) */
#rules { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; background: #fff; color: #0b0b0b; overflow: hidden; }
#rules .tag { color: #2F6FD8; }
#rules .accent { color: #2F6FD8; }
.steps { list-style: none; margin-top: 40px; display: grid; gap: 20px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; border-top: 1px solid rgba(0,0,0,.12); padding-top: 16px; counter-increment: s; }
.steps b { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.steps b::before { content: "0" counter(s) " "; color: #2F6FD8; }
.steps span { color: #444; }
.hand { height: 100vh; position: relative; }
.hand img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }

#city .copy { max-width: 760px; }

/* brand */
h1, h2, .beat { font-family: var(--display); }
.logo { display: flex; align-items: center; gap: 10px; letter-spacing: .02em; font-weight: 500; }
.logo .mark { width: 30px; height: 30px; margin: 0; display: grid; place-items: center; border: 1.5px solid var(--accent); border-radius: 8px;
  color: #9CC2FF; font: 700 18px var(--font); box-shadow: 0 0 18px rgba(91,155,255,.25); }
#rules { background: #F4F6F9; color: #0A0D12; }
#rules .steps span { color: #4A5465; }

/* price */
#price { padding: 140px clamp(20px, 5vw, 72px); background: radial-gradient(60% 70% at 80% 40%, rgba(91,155,255,.12), transparent 70%), var(--bg); }
.price-wrap { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.price-wrap > div:first-child { flex: 1 1 420px; }
.lead { margin-top: 24px; color: var(--dim); max-width: 440px; }
.price-card { flex: 1 1 360px; padding: 36px; border-color: rgba(91,155,255,.35); }
.amount span { font: 600 64px/1 var(--mono); letter-spacing: -.03em; }
.amount small { color: var(--dim); margin-left: 6px; }
.price-card ul { list-style: none; margin-top: 28px; display: grid; gap: 12px; color: var(--dim); }
.price-card li { border-top: 1px solid var(--line); padding-top: 12px; }
.price-card .btn.big { display: block; text-align: center; }

/* faq */
#faq { max-width: 900px; margin: 0 auto; padding: 120px clamp(20px, 5vw, 72px); }
#faq h2 { margin-bottom: 40px; }
details { border-top: 1px solid var(--line); padding: 24px 0; }
summary { cursor: pointer; font: 500 20px/1.3 var(--font); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-family: var(--mono); }
details[open] summary::after { content: "−"; }
details p { margin-top: 14px; color: var(--dim); max-width: 720px; }

footer { padding: 32px clamp(20px, 5vw, 72px) 44px; color: var(--dim); border-top: 1px solid var(--line); }
footer .mono { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer p { margin-top: 16px; font-size: 13px; max-width: 760px; }

/* phone */
@media (max-width: 760px) {
  .hud-top { padding: 14px 16px; gap: 12px; }
  nav { display: none; }
  .hud-top .btn { margin-left: auto; padding: 9px 12px; font-size: 10px; }
  .title { left: 16px; right: 16px; bottom: 96px; }
  .sub { font-size: 15px; }
  .beat { right: 16px; left: 16px; top: 34%; text-align: left; }
  .card { display: none; }
  .bar { width: 80px; }
  .scroll-hint { display: none; }
  .copy { padding: 96px 16px; }
  #rules { grid-template-columns: 1fr; }
  .hand { height: 60vh; }
  .steps li { grid-template-columns: 1fr; gap: 4px; }
  #seq { object-position: 70% 50%; }
}

/* reduced motion: static poster, everything readable */
@media (prefers-reduced-motion: reduce) {
  #seq, .hud-bottom, .scroll-hint, .scan { display: none; }
  .poster { display: block; }
  .beat { display: none; }
  .card { opacity: 1; }
}

/* hero CTA */
.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero-cta .btn.big { margin-top: 0; }
.btn.solid { background: var(--accent); color: #0A0D12; border-color: var(--accent); box-shadow: 0 0 36px var(--glow); }
.btn.solid:hover { background: #9CC2FF; }
.ghost { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.ghost:hover { color: var(--fg); }
.hud-top .ghost { margin-left: 8px; }

/* hero fits short screens (iPhone Safari ~664px visible, SE 548px, laptops 720-760px): the title block sits at the
   bottom but never above the header; type scales with the height too */
#hero, .stage { height: 100vh; height: 100svh; }
.title { top: 92px; display: flex; flex-direction: column; justify-content: flex-end; }
h1 { font-size: clamp(36px, min(9vw, 10.5vh), 148px); }
h1 { font-size: clamp(36px, min(9vw, 10.5svh), 148px); }
.sub { margin-top: clamp(10px, 2.4vh, 22px); }
.hero-cta { margin-top: clamp(14px, 3.4vh, 30px); }
.title .tag { margin-bottom: clamp(8px, 2vh, 18px); }
@media (max-width: 760px) {
  .title { top: 86px; bottom: 76px; }
  .hud-top .ghost { display: none; }   /* phone: one button in the header, "Se connecter" stays in the hero */
}
@media (max-height: 600px) {
  .sub { font-size: 14px; }
  .hero-cta .btn.big { padding: 14px 18px; }
}
.steps li { grid-template-columns: 140px 1fr; }
.steps b { white-space: nowrap; }
@media (max-width: 760px) { .steps li { grid-template-columns: 1fr; } }

/* section animations (sections.js) */
video.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
video.bg.on { opacity: 1; }
#live > video.bg { z-index: 0; }
#live::after, #city::after { z-index: 1; }
.hand video.bg { object-position: 70% 50%; }
h2 .wm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
h2 .wi { display: inline-block; will-change: transform; }
li.draw { --draw: 1; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 0 / calc(var(--draw) * 100%) 1px; }
#rules li.draw { background-image: linear-gradient(#2F6FD8, #2F6FD8); }
.price-card { position: relative; overflow: hidden; transform-style: preserve-3d; --mx: 50%; --my: 0%; }
.price-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx) var(--my), rgba(91,155,255,.18), transparent 60%); }
.price-card::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(156,194,255,.16), transparent); animation: sweep 5s ease-in-out 1.5s infinite; }
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.cursor-glow { position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none;
  z-index: 40; background: radial-gradient(closest-side, rgba(91,155,255,.10), transparent); opacity: 0; transition: opacity .6s; mix-blend-mode: screen; }
.cursor-glow.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { video.bg, .cursor-glow, .price-card::after { display: none; } }

/* New York session block */
.session { margin-top: 26px; display: grid; gap: 6px; font-size: 13px; letter-spacing: .06em; }
.session p { margin: 0 !important; }
.session-hours { color: var(--fg); }
.session-local { color: var(--dim); }
.session-live { color: #F2C14E; display: inline-flex; align-items: center; gap: 8px; }
.session-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(242,193,78,.2); }
.session-live.is-open { color: #3CCB9F; }
.session-live.is-open::before { box-shadow: 0 0 0 4px rgba(60,203,159,.2); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(60,203,159,0); } }

/* the alpha emblem is centred: beats on the left, alert card on the right, never over the emblem */
@media (min-width: 761px) {
  .beat { left: clamp(20px, 5vw, 72px); right: auto; text-align: left; max-width: 38vw; }
  .card { left: auto; right: clamp(20px, 5vw, 72px); }
}

/* Portrait screens: every 16:9 shot is shown whole, full width, centred at 30 % of the screen, over a blurred copy of
   itself (same geometry as cover() in site.js). Text sits under the picture, never on the subject. */
@media (max-aspect-ratio: 1/1) {
  :root { --shot-h: 56.25vw; --shot-y: calc(30svh - 28.125vw); }
  .poster { object-fit: contain; object-position: 50% calc(30svh - 28.125vw); background: #000; }
  .beat { top: calc(30svh + 28.125vw + 12px); }
  #live, #city { align-items: flex-start; background: #000; }
  #live::before, #city::before { content: ""; position: absolute; inset: -40px; background: center / cover no-repeat;
    filter: blur(28px) brightness(.45); }
  #live::before { background-image: url(img/visor.webp); }
  #city::before { background-image: url(img/city.webp); }
  #live > img, #live > video.bg, #city > img, #city > video.bg { inset: auto 0; top: var(--shot-y); height: var(--shot-h); object-fit: cover; z-index: 0; }
  #live::after, #city::after { background: linear-gradient(180deg, transparent calc(30svh + 20vw), rgba(0,0,0,.75) calc(30svh + 28.125vw + 40px)); }
  #live .copy, #city .copy { padding-top: calc(30svh + 28.125vw + 32px); }
  .hand { height: auto; aspect-ratio: 16 / 9; }
  .hand img, .hand video.bg { object-position: 50% 50%; }
}
