/* 100 KM — habillage live
   Tout est dessiné sur une scène fixe de 1920×1080, mise à l'échelle par screen.js. */

:root {
  --ink: #07090D;
  --panel: #0F131A;
  --line: #1C2330;
  --line2: #2A3343;
  --txt: #F2F4F7;
  --dim: #8A94A6;
  --dim2: #A3ACBC;
  --volt: #C8FF2E;
  --hot: #FF4A2B;
  --gold: #FFB800;
  --red: #FF2D2D;
  --cond: "Barlow Condensed", Bahnschrift, "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans: Inter, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; color: var(--txt); }
html { background: transparent; }
body { background: var(--ink); }
[hidden] { display: none !important; }
body { font-family: var(--sans); cursor: none; -webkit-font-smoothing: antialiased; }
body.vue-overlay, body.vue-partenaires { background: transparent; }
b, strong { font-weight: inherit; }
i { font-style: normal; }
.num, b { font-variant-numeric: tabular-nums; }

#streaks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; }
body.vue-ecran #streaks, body.vue-depart #streaks { display: block; }

#stage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  z-index: 1;
}

/* ---------- visibilité des vues ---------- */
.ecran, .overlay, .depart, .finish { display: none; }
body.vue-ecran .ecran { display: flex; }
body.vue-partenaires .ecran { display: flex; justify-content: flex-end; background: transparent; }
body.vue-partenaires .ecran > :not(.sponsors) { display: none; }
body.vue-overlay .overlay { display: block; }
body.vue-depart .depart,
body.vue-ecran.pre .depart { display: block; }
body.vue-ecran.fini .finish { display: block; }
body[data-mode="ref"] .obj-only { display: none !important; }
body[data-mode="obj"] .ref-only { display: none !important; }
body.no-sponsors .sponsors, body.no-sponsors .ov-partner, body.no-sponsors .dp-sponsors, body.no-sponsors .fn-sponsors { display: none !important; }

/* ---------- briques communes ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; position: relative; }
.label { font: 600 14px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
.gold { color: var(--gold); }
.volt { color: var(--volt); }
.hot { color: var(--hot); }
.dim { color: var(--dim); }
.row-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; position: relative; }
.sweep {
  position: absolute; left: 0; top: 0; bottom: 0; width: 200px;
  background: linear-gradient(90deg, transparent, rgba(200, 255, 46, .9), transparent);
  mix-blend-mode: screen; animation: sweep 2.4s linear infinite; pointer-events: none;
}
@keyframes sweep { from { transform: translateX(-200px); } to { transform: translateX(1900px); } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scaleY(1); box-shadow: 0 0 14px var(--volt); } 50% { transform: scaleY(1.45); box-shadow: 0 0 30px var(--volt); } }
@keyframes ghostPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 184, 0, .55); } 50% { box-shadow: 0 0 0 10px rgba(255, 184, 0, 0); } }
@keyframes hb { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.04); } 24% { transform: scale(1); } 36% { transform: scale(1.02); } }

/* logos partenaires */
.plate {
  height: 52px; min-width: 150px; padding: 0 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--txt); color: var(--ink); border-radius: 10px;
}
.plate.clear { background: transparent; border: 1px solid var(--line2); color: var(--txt); }
.plate img { max-height: 36px; max-width: 180px; object-fit: contain; display: block; }
.plate.txt { font: 800 22px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; font-style: italic; white-space: nowrap; }

/* ================= ÉCRAN PLEIN ================= */
.ecran {
  position: absolute; inset: 0; z-index: 2;
  flex-direction: column; gap: 14px; padding: 20px 28px;
}
.ecran::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 96px 100%;
}
body.vue-partenaires .ecran::before { display: none; }

.bar { flex-shrink: 0; height: 60px; display: flex; align-items: center; gap: 26px; padding: 0 22px; border-radius: 14px; }
.live { display: flex; align-items: center; gap: 10px; margin: 0; background: var(--red); color: #fff; padding: 7px 14px 7px 12px; border-radius: 6px; font: 700 15px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.live i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1.1s steps(1) infinite; }
.title { margin: 0; font: 800 34px/1 var(--cond); font-style: italic; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.title em { color: var(--volt); font-style: italic; }
.who { margin: 0; font: 600 15px/1 var(--sans); color: var(--dim); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.who:empty { display: none; }
.badge { margin: 0; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 6px; font: 700 12px/1 var(--sans); letter-spacing: .2em; color: var(--dim2); text-transform: uppercase; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.refchip { margin: 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line2); border-radius: 8px; font: 600 14px/1 var(--sans); letter-spacing: .18em; color: #C3CAD6; text-transform: uppercase; }
.refchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--volt); animation: breathe 1.6s ease infinite; }
.objchip { margin: 0; display: flex; align-items: center; gap: 12px; }
.objchip > span { font: 600 13px/1 var(--sans); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.objchip b { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border: 1px solid rgba(255, 184, 0, .4); border-radius: 8px; color: var(--gold); font: 700 24px/1 var(--cond); letter-spacing: .04em; }
.objchip b i, .ghost, .ov-ghost { border-radius: 50%; background: var(--gold); color: #1A1203; display: grid; place-items: center; font: 800 11px/1 var(--sans); }
.objchip b i { width: 18px; height: 18px; }
.presente { display: flex; align-items: center; gap: 12px; }
.presente > span { font: 600 12px/1 var(--sans); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.presente .plate { height: 42px; min-width: 120px; }
.presente .plate img { max-height: 28px; }

.grid { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 1.52fr 1fr; gap: 14px; }
.col { display: flex; flex-direction: column; gap: 14px; min-height: 0; min-width: 0; }

/* héros distance */
.hero { flex: 1.25; min-height: 0; padding: 26px 40px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.ghost-num { position: absolute; right: -40px; top: -70px; font: 800 520px/1 var(--cond); font-style: italic; color: rgba(255, 255, 255, .025); letter-spacing: -.04em; pointer-events: none; }
.now-tag { display: flex; align-items: center; gap: 8px; font: 600 14px/1 var(--sans); letter-spacing: .2em; color: var(--volt); text-transform: uppercase; }
.now-tag i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: breathe 1.6s ease infinite; }
.hero-main { position: relative; display: flex; align-items: flex-end; gap: 18px; }
.km { font: 800 290px/.74 var(--cond); font-style: italic; letter-spacing: -.035em; white-space: nowrap; }
.km .dec { color: var(--volt); font-size: .5em; }
.km-unit { font: 800 54px/1 var(--cond); font-style: italic; letter-spacing: .08em; margin-bottom: 12px; color: var(--dim); white-space: nowrap; }
.hero-side { margin-left: auto; text-align: right; margin-bottom: 8px; }
.pct { font: 700 84px/.85 var(--cond); white-space: nowrap; }
.pct small { font-size: .5em; color: var(--dim); }
.left { font: 500 20px/1.3 var(--sans); color: var(--dim); margin-top: 10px; white-space: nowrap; }
.bar-prog { position: relative; height: 14px; }
.bar-prog .clip { position: absolute; inset: 0; border-radius: 7px; background: var(--line); overflow: hidden; }
.bar-prog .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--txt); border-radius: 7px; }
.obj-mark { position: absolute; top: -3px; bottom: -3px; width: 4px; margin-left: -2px; background: var(--gold); border-radius: 2px; left: 0; }

/* graphique des temps au km */
.splits { flex: 1; min-height: 0; padding: 20px 32px 16px; display: flex; flex-direction: column; gap: 12px; }
.legend { display: flex; gap: 20px; font: 500 14px/1 var(--sans); color: var(--dim); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; }
.c-fast { background: var(--volt); }
.c-slow { background: var(--hot); }
.chart-wrap { flex: 1; min-height: 0; display: flex; gap: 14px; }
.yaxis { width: 50px; display: flex; flex-direction: column; justify-content: space-between; font: 600 13px/1 var(--cond); color: var(--dim); padding: 2px 0; }
.yaxis span:nth-child(2) { color: var(--txt); }
body[data-mode="obj"] .yaxis span:nth-child(2) { color: var(--gold); }
.bars { position: relative; flex: 1; display: flex; gap: 4px; }
.refline { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(242, 244, 247, .3); }
body[data-mode="obj"] .refline { background: rgba(255, 184, 0, .5); }
.bars .b { position: relative; flex: 1; height: 100%; }
.bars .b::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: var(--line); }
.bars .b.done::after { display: none; }
.bars .b .v { position: absolute; left: 0; right: 0; border-radius: 2px; height: 0; }
.bars .b.cur .v { opacity: .5; }
.xaxis { display: flex; justify-content: space-between; padding-left: 64px; font: 600 13px/1 var(--cond); color: var(--dim); letter-spacing: .08em; }

/* carte projection / objectif */
.focus { flex: 1.25; min-height: 0; padding: 26px 34px 18px; display: flex; flex-direction: column; overflow: hidden; border-color: rgba(242, 244, 247, .22); }
.pill { padding: 7px 12px; border-radius: 6px; font: 700 13px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; background: var(--txt); color: var(--ink); }
.big-row { display: flex; align-items: flex-end; gap: 16px; margin-top: 12px; }
.big { font: 800 160px/.8 var(--cond); font-style: italic; letter-spacing: -.03em; white-space: nowrap; }
.focus > .big { margin-top: 12px; }
.big-unit { font: 600 24px/1.2 var(--sans); margin-bottom: 10px; margin-left: 14px; white-space: nowrap; }
.sub { display: flex; gap: 24px; margin-top: 14px; font: 500 17px/1.3 var(--sans); color: var(--dim2); }
.sub b { color: var(--txt); font-weight: 700; }
.sub b.gold { color: var(--gold); }
.sub b.volt { color: var(--volt); }
.sub b.hot { color: var(--hot); }
.curve { flex: 1; min-height: 0; position: relative; margin-top: 14px; }
.curve svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.curve .axis { stroke: var(--line2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.curve .axis.goldline { stroke: rgba(255, 184, 0, .5); }
.curve .cursor { stroke: var(--line2); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.curve path { fill: none; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.p-white { stroke: var(--txt); }
.p-gap { stroke: var(--hot); }
.a-gap { fill: var(--hot) !important; fill-opacity: .12; stroke: none !important; }
body.ahead .p-gap { stroke: var(--volt); }
body.ahead .a-gap { fill: var(--volt) !important; }
.curve > span { position: absolute; font: 600 12px/1 var(--sans); letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }
.c-tl { left: 0; top: 0; } .c-bl { left: 0; bottom: 0; } .c-tr { right: 0; top: 0; }

#gapCard { border-color: rgba(255, 74, 43, .4); box-shadow: inset 0 0 80px rgba(255, 74, 43, .07); }
#gapCard .big { color: var(--hot); transform-origin: left bottom; }
#gapCard .pill { background: var(--hot); color: #1A0500; }
body.behind #gapCard .big { animation: hb 1.3s ease infinite; }
body.ahead #gapCard { border-color: rgba(200, 255, 46, .4); box-shadow: inset 0 0 80px rgba(200, 255, 46, .06); }
body.ahead #gapCard .big { color: var(--volt); text-shadow: 0 0 40px rgba(200, 255, 46, .35); }
body.ahead #gapCard .pill { background: var(--volt); color: #0B0F02; }
body.even #gapCard { border-color: rgba(242, 244, 247, .25); box-shadow: none; }
body.even #gapCard .big { color: var(--txt); }
body.even #gapCard .pill { background: var(--txt); color: var(--ink); }

/* tuiles */
.tiles { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile { border-radius: 16px; padding: 18px 22px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.tile .label { font-size: 13px; letter-spacing: .22em; }
.tile b { font: 700 62px/.9 var(--cond); white-space: nowrap; }
.tile-row { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.tile-row small { font: 700 24px/1 var(--cond); color: var(--dim); }
.tile-row em { font: 600 18px/1 var(--cond); font-style: normal; color: var(--dim); }
.tile-row em.volt { color: var(--volt); } .tile-row em.hot { color: var(--hot); }

/* piste */
.lane { flex-shrink: 0; height: 128px; padding: 16px 32px 12px; display: flex; flex-direction: column; justify-content: space-between; }
.lane-info { display: flex; gap: 26px; font: 600 14px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.lane-info > span { display: flex; align-items: center; gap: 8px; }
.lane-info i { width: 12px; height: 12px; border-radius: 50%; }
.lane-info .me i { background: #fff; box-shadow: 0 0 10px var(--volt); }
.lane-info .gold i { background: var(--gold); }
.lane-info b { font-weight: 700; color: inherit; }
.lane-info .dim b { color: var(--txt); }
.track { position: relative; height: 36px; }
.cells { display: flex; gap: 3px; height: 100%; }
.cells i { flex: 1; border-radius: 3px; background: var(--line); }
.cells i.mile { outline: 1px solid rgba(242, 244, 247, .35); }
.cells i.on { background: var(--txt); outline: none; }
.cells i.on.mile { background: var(--volt); }
.cells i.now { background: var(--volt); outline: none; animation: pulse .9s ease infinite; }
body.final .cells i.now { background: var(--gold); }
.head { position: absolute; top: 50%; left: 0; width: 20px; height: 20px; translate: -50% -50%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 7px rgba(255, 255, 255, .16), 0 0 26px var(--volt); z-index: 3; }
.ghost { position: absolute; top: 50%; left: 0; width: 26px; height: 26px; translate: -50% -50%; font-size: 12px; animation: ghostPulse 1.8s ease infinite; z-index: 2; }
.miles { position: relative; height: 14px; font: 600 14px/1 var(--cond); color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.miles span { position: absolute; top: 0; translate: -50% 0; white-space: nowrap; }
.miles span.first { translate: 0 0; }
.miles span.end { left: auto !important; right: 0; translate: 0 0; color: var(--gold); }
.miles span.hi { color: var(--txt); }

/* partenaires (bandeau) */
.sponsors { flex-shrink: 0; height: 74px; padding: 0 28px; display: flex; align-items: center; gap: 28px; overflow: hidden; }
.sponsors .label { white-space: nowrap; }
.logos { flex: 1; display: flex; align-items: center; justify-content: space-around; gap: 18px; transition: opacity .5s ease, transform .5s ease; }
.logos.swap { opacity: 0; transform: translateY(8px); }
body.vue-partenaires .sponsors { margin: 0 28px 20px; background: rgba(7, 9, 13, .88); }

/* mode final (dernier km) */
body.final .km .dec { color: var(--gold); }
body.final .km { font-size: 215px; }
body.final .km-unit { font-size: 44px; letter-spacing: .04em; }
body.final .now-tag { color: var(--gold); }
body.final .hero { border-color: rgba(255, 184, 0, .35); }

/* ================= OVERLAY ================= */
.overlay { position: absolute; inset: 0; z-index: 2; }
.ov-bug { position: absolute; left: 96px; top: 54px; display: flex; height: 58px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.ov-live { display: flex; align-items: center; gap: 10px; background: var(--red); padding: 0 18px; border-radius: 10px 0 0 10px; font: 700 16px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.ov-live i { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: blink 1.1s steps(1) infinite; }
.ov-title { display: flex; align-items: center; gap: 14px; background: var(--ink); padding: 0 22px; border-radius: 0 10px 10px 0; }
.ov-title b { font: 800 34px/1 var(--cond); font-style: italic; letter-spacing: .05em; text-transform: uppercase; }
.ov-title span { width: 1px; height: 26px; background: var(--line2); }
.ov-title em { font: 600 15px/1 var(--sans); font-style: normal; letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }

.ov-chip { position: absolute; right: 96px; top: 54px; display: flex; border-radius: 12px; overflow: hidden; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.ov-chip-l { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 14px 20px; background: var(--ink); }
.ov-chip-l span:first-child { font: 600 12px/1 var(--sans); letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }
.ov-chip-l span:last-child { font: 600 15px/1 var(--sans); }
.ov-chip-v { display: flex; align-items: center; padding: 0 22px; font: 800 62px/1 var(--cond); font-style: italic; letter-spacing: -.02em; background: var(--txt); color: var(--ink); min-width: 150px; justify-content: center; }
#ovGapChip .ov-chip-v { background: var(--hot); color: #1A0500; }
body.ahead #ovGapChip .ov-chip-v { background: var(--volt); color: #0B0F02; }
body.even #ovGapChip .ov-chip-v { background: var(--txt); color: var(--ink); }
body.behind #ovGapChip { animation: hb 1.3s ease infinite; }

.ov-partner { position: absolute; right: 96px; top: 158px; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; background: var(--ink); border-radius: 12px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1); }
.ov-partner > span { font: 600 11px/1 var(--sans); letter-spacing: .22em; color: var(--dim); text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); }
.ov-partner .plate { height: 64px; min-width: 190px; }
.ov-partner .plate img { max-height: 44px; max-width: 200px; }
.ov-partner.swap { opacity: 0; transform: translateX(40px); }

.ov-banner { position: absolute; left: 96px; bottom: 236px; display: flex; height: 96px; border-radius: 14px; overflow: hidden; background: var(--ink); filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .5)); transform: translateX(-130%); transition: transform .6s cubic-bezier(.7, 0, .2, 1); }
.ov-banner.on { transform: none; }
.ov-banner-km { display: flex; align-items: center; padding: 0 26px; background: var(--volt); color: #0B0F02; font: 800 70px/1 var(--cond); font-style: italic; letter-spacing: -.02em; white-space: nowrap; }
.ov-banner-cells { display: flex; gap: 34px; align-items: center; padding: 0 30px; }
.ov-banner-cells div { display: flex; flex-direction: column; gap: 6px; }
.ov-banner-cells span { font: 600 11px/1 var(--sans); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; white-space: nowrap; }
.ov-banner-cells b { font: 700 40px/.9 var(--cond); white-space: nowrap; }

.ov-lower { position: absolute; left: 96px; right: 96px; bottom: 54px; display: flex; flex-direction: column; gap: 10px; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .5)); }
.ov-stats { display: flex; height: 118px; border-radius: 14px; overflow: hidden; background: var(--ink); }
.ov-dist { position: relative; display: flex; align-items: flex-end; gap: 10px; padding: 0 30px 16px; background: var(--txt); color: var(--ink); min-width: 390px; }
.ov-dist span { position: absolute; left: 30px; top: 14px; font: 700 12px/1 var(--sans); letter-spacing: .24em; color: #4A5262; text-transform: uppercase; }
.ov-dist b { font: 800 94px/.78 var(--cond); font-style: italic; letter-spacing: -.03em; }
.ov-dist em { font: 800 30px/1 var(--cond); font-style: italic; margin-bottom: 4px; }
body.final .ov-dist { background: var(--gold); }
.ov-cells { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ov-cells > div { padding: 18px 24px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); min-width: 0; }
.ov-cells > div:last-child { border-right: 0; }
.ov-cells span { font: 600 12px/1 var(--sans); letter-spacing: .22em; color: var(--dim); text-transform: uppercase; white-space: nowrap; }
.ov-cells b { font: 700 50px/.9 var(--cond); white-space: nowrap; }
.ov-cells b small { font-size: .5em; color: var(--dim); }
.ov-cells .hl { background: #10160A; }
.ov-cells .hl span, .ov-cells .hl b { color: var(--volt); }
body.arrive .ov-cells .hl { background: #1A1405; }
body.arrive .ov-cells .hl span, body.arrive .ov-cells .hl b { color: var(--gold); }
.ov-lane { position: relative; height: 34px; border-radius: 10px; background: var(--ink); padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.ov-lane > span { font: 700 13px/1 var(--cond); letter-spacing: .14em; color: var(--dim); white-space: nowrap; }
.ov-lane > span.gold { color: var(--gold); }
.ov-track { position: relative; flex: 1; height: 10px; }
.ov-track .clip { position: absolute; inset: 0; border-radius: 5px; background: var(--line); overflow: hidden; }
.ov-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--txt); }
.ov-track .sweep { width: 140px; animation-duration: 2.6s; }
.ov-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #4A5262; }
.ov-head { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; translate: -50% -50%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, .18), 0 0 18px var(--volt); }
.ov-ghost { position: absolute; top: 50%; left: 0; width: 20px; height: 20px; translate: -50% -50%; font-size: 10px; }

/* ================= CARTE « KM BOUCLÉ » ================= */
.split-card { position: absolute; z-index: 20; width: 380px; border-radius: 14px; overflow: hidden; background: var(--ink); filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .5)); opacity: 0; transform: translateX(120%); transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s ease; display: none; }
body.vue-overlay .split-card { display: block; right: 96px; top: 400px; }
body.vue-ecran .split-card { display: block; left: 720px; top: 108px; border: 1px solid var(--line2); }
.split-card.on { opacity: 1; transform: none; }
.sc-bar { height: 5px; background: var(--volt); }
.split-card.slow .sc-bar { background: var(--hot); }
.sc-in { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.sc-top { display: flex; justify-content: space-between; gap: 12px; font: 600 13px/1 var(--sans); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; white-space: nowrap; }
.sc-top span:last-child { color: var(--volt); }
.split-card.slow .sc-top span:last-child { color: var(--hot); }
.sc-main { display: flex; align-items: baseline; gap: 14px; }
.sc-main b { font: 800 64px/.9 var(--cond); font-style: italic; }
.sc-main em { font: 700 26px/1 var(--cond); font-style: normal; color: var(--volt); }
.split-card.slow .sc-main em { color: var(--hot); }
.sc-foot { font: 500 15px/1.4 var(--sans); color: var(--dim); }

/* ================= AVANT DÉPART ================= */
.depart { position: absolute; inset: 0; z-index: 30; background: var(--ink); overflow: hidden; }
body.vue-ecran.pre .depart { animation: none; }
.dp-ghost { position: absolute; left: -60px; bottom: -150px; font: 800 1100px/.8 var(--cond); font-style: italic; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 2px var(--line); pointer-events: none; }
.dp-marquee { position: absolute; left: 0; right: 0; top: 0; height: 56px; background: var(--volt); color: var(--ink); overflow: hidden; display: flex; align-items: center; }
.dp-marquee-in { display: flex; gap: 48px; white-space: nowrap; font: 800 26px/1 var(--cond); font-style: italic; letter-spacing: .08em; text-transform: uppercase; animation: drift 24s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.dp-top { position: absolute; left: 120px; right: 120px; top: 120px; display: flex; justify-content: space-between; align-items: center; }
.dp-live { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 16px/1 var(--sans); letter-spacing: .22em; color: var(--red); text-transform: uppercase; }
.dp-live i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: blink 1.1s steps(1) infinite; }
.dp-info { margin: 0; font: 600 16px/1 var(--sans); letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }
.dp-count { position: absolute; left: 120px; top: 220px; display: flex; flex-direction: column; gap: 8px; }
.dp-count > span { font: 700 30px/1 var(--cond); letter-spacing: .3em; color: var(--dim); text-transform: uppercase; }
.dp-count b { font: 800 340px/.8 var(--cond); font-style: italic; letter-spacing: -.03em; white-space: nowrap; }
.dp-count b em { color: var(--volt); font-style: italic; animation: blink 1s steps(1) infinite; }
.dp-count b.go { color: var(--volt); }
.dp-plan { position: absolute; right: 120px; top: 230px; width: 560px; display: flex; flex-direction: column; gap: 16px; }
.dp-ref { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; border-radius: 16px; border: 1px solid var(--line2); background: var(--panel); }
.dp-ref > div { display: flex; flex-direction: column; gap: 8px; }
.dp-ref > div span { font: 600 13px/1 var(--sans); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.dp-ref > div b { font: 800 72px/.85 var(--cond); font-style: italic; color: transparent; -webkit-text-stroke: 2px #4A5262; text-transform: uppercase; }
.dp-ref strong { font: 800 30px/1 var(--cond); font-style: italic; letter-spacing: .06em; color: var(--volt); text-align: right; text-transform: uppercase; }
.dp-obj { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-radius: 14px; border: 1px solid rgba(255, 184, 0, .45); background: var(--panel); }
.dp-obj span { font: 600 13px/1 var(--sans); letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.dp-obj b { font: 800 48px/.9 var(--cond); font-style: italic; color: var(--gold); }
.dp-tiles { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 12px; }
.dp-tiles > div { padding: 18px 16px; min-width: 0; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.dp-tiles span { font: 600 11px/1 var(--sans); letter-spacing: .12em; color: var(--dim); text-transform: uppercase; white-space: nowrap; }
.dp-tiles b { font: 700 34px/.9 var(--cond); white-space: nowrap; }
.dp-plan p { margin: 0; font: 500 17px/1.5 var(--sans); color: var(--dim2); }
.dp-sponsors { position: absolute; left: 120px; right: 760px; top: 640px; display: flex; flex-direction: column; gap: 16px; }
.dp-sponsors .row { display: flex; flex-wrap: wrap; gap: 14px; }
.dp-lane { position: absolute; left: 120px; right: 120px; bottom: 80px; display: flex; flex-direction: column; gap: 14px; }
.dp-lane .row-top span { font: 600 14px/1 var(--sans); letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }
.dp-lane .row-top span:last-child { color: var(--gold); }
.dp-track { position: relative; height: 16px; border-radius: 8px; background: var(--line); overflow: hidden; }
.dp-track i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(200, 255, 46, 0), rgba(200, 255, 46, .5)); animation: fillbar 5s cubic-bezier(.6, 0, .2, 1) infinite; }
@keyframes fillbar { from { width: 0; } to { width: 100%; } }
.dp-scale { display: flex; justify-content: space-between; font: 600 14px/1 var(--cond); letter-spacing: .1em; color: #4A5262; }

/* ================= ARRIVÉE ================= */
.finish { position: absolute; inset: 0; z-index: 30; background: var(--ink); overflow: hidden; animation: finIn .9s ease both; }
@keyframes finIn { from { opacity: 0; } to { opacity: 1; } }
.fn-rays { position: absolute; left: 560px; top: 380px; width: 2000px; height: 2000px; margin: -1000px 0 0 -1000px; background: repeating-conic-gradient(from 0deg, rgba(255, 184, 0, .07) 0deg 5deg, transparent 5deg 15deg); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.conf i { position: absolute; top: 0; width: 10px; height: 16px; animation: conf linear infinite; opacity: 0; }
@keyframes conf { 0% { transform: translateY(-60px) rotate(0); opacity: 0; } 8% { opacity: 1; } 100% { transform: translateY(1150px) rotate(720deg); opacity: 0; } }
.fn-head { position: absolute; left: 120px; top: 90px; max-width: 1120px; display: flex; flex-direction: column; gap: 18px; }
.fn-badge { align-self: flex-start; padding: 10px 16px; border-radius: 8px; background: var(--gold); color: #1A1203; font: 800 20px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.fn-who { font: 700 30px/1 var(--cond); letter-spacing: .24em; color: var(--dim2); text-transform: uppercase; }
.fn-time { font: 800 330px/.8 var(--cond); font-style: italic; letter-spacing: -.03em; color: transparent; background: linear-gradient(100deg, var(--gold) 0%, var(--gold) 40%, #FFF1C2 50%, var(--gold) 60%, var(--gold) 100%); background-size: 1200px 100%; -webkit-background-clip: text; background-clip: text; animation: shimmer 3.5s linear infinite; white-space: nowrap; }
@keyframes shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } }
.fn-line { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.fn-line > span:first-child { font: 800 44px/1 var(--cond); font-style: italic; letter-spacing: .04em; text-transform: uppercase; }
.fn-obj { padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(255, 184, 0, .5); font: 700 24px/1 var(--cond); color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.fn-stats { position: absolute; right: 120px; top: 110px; width: 520px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fn-stats > div { padding: 20px 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.fn-stats span { font: 600 12px/1 var(--sans); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.fn-stats b { font: 700 54px/.9 var(--cond); white-space: nowrap; }
.fn-sponsors { position: absolute; right: 120px; top: 500px; width: 520px; display: flex; flex-direction: column; gap: 14px; }
.fn-sponsors .row { display: flex; flex-wrap: wrap; gap: 12px; }
.fn-sponsors .plate { height: 46px; min-width: 120px; }
.fn-sponsors .plate img { max-height: 30px; }
.fn-curve { position: absolute; left: 120px; right: 120px; bottom: 70px; height: 270px; padding: 22px 28px; display: flex; flex-direction: column; gap: 12px; }
.fn-curve .row-top span { font: 600 14px/1 var(--sans); letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }
.fn-curve .curve { margin: 0; }
.fn-curve path#fnPath { stroke: var(--volt); }
.fn-curve path#fnArea { fill: var(--volt); fill-opacity: .1; stroke: none; }

/* ================= MOMENTS (plein écran) ================= */
.moment { position: absolute; inset: 0; z-index: 50; display: none; place-items: center; overflow: hidden; --d: 2600ms; }
.moment.on { display: grid; }
.moment > * { grid-area: 1 / 1; }
.m-bg { position: absolute; inset: 0; background: rgba(7, 9, 13, .86); animation: mFade var(--d) ease forwards; }
body.vue-overlay .m-bg { background: rgba(7, 9, 13, .62); }
@keyframes mFade { 0% { opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.m-band, .m-doors, .m-lines, .m-rays, .m-conf, .m-flash { display: none; }
.m-text { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; animation: slam var(--d) cubic-bezier(.15, .8, .2, 1) forwards; text-align: center; }
.m-kicker { font: 700 40px/1 var(--cond); letter-spacing: .3em; text-transform: uppercase; color: var(--txt); }
.m-kicker:empty, .m-sub:empty { display: none; }
.m-word { font: 800 300px/.8 var(--cond); font-style: italic; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; }
.m-sub { padding: 10px 18px; border-radius: 8px; font: 800 44px/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; background: var(--txt); color: var(--ink); }
@keyframes slam { 0%, 4% { transform: scale(1.6); opacity: 0; filter: blur(10px); } 14% { transform: scale(.97); opacity: 1; filter: blur(0); } 20%, 80% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.05); opacity: 0; } }

/* wipe : bande volt en biais (10 km, heures) */
.moment[data-kind="wipe"] .m-band { display: block; position: absolute; left: -15%; right: -15%; top: 50%; height: 340px; margin-top: -200px; background: var(--volt); animation: wipe var(--d) cubic-bezier(.7, 0, .2, 1) forwards; }
.moment[data-kind="wipe"] .m-word { color: var(--ink); }
.moment[data-kind="wipe"] .m-sub { background: var(--ink); color: var(--volt); }
.moment[data-kind="wipe"] .m-kicker { color: var(--ink); }
@keyframes wipe { 0% { transform: translateX(-120%) skewX(-18deg); } 16%, 76% { transform: translateX(0) skewX(-18deg); } 100% { transform: translateX(130%) skewX(-18deg); } }

/* flash : semi, marathon, meilleur km, devant */
.moment[data-kind="flash"] .m-flash { display: block; position: absolute; inset: 0; background: var(--volt); animation: flash var(--d) ease forwards; }
.moment[data-kind="flash"] .m-lines { display: flex; position: absolute; inset: 0; flex-direction: column; justify-content: space-around; opacity: .5; }
.moment[data-kind="flash"] .m-word { color: var(--volt); text-shadow: 0 0 60px rgba(200, 255, 46, .5); }
.moment[data-kind="flash"] .m-sub { background: var(--volt); }
.m-lines i { height: 3px; background: var(--volt); animation: lines .7s linear infinite; }
.m-lines i:nth-child(2n) { background: var(--txt); animation-duration: .5s; margin-left: 30%; width: 30%; }
.m-lines i:nth-child(3n) { animation-duration: .9s; width: 55%; }
.m-lines i:nth-child(1), .m-lines i:nth-child(5) { width: 40%; }
@keyframes lines { from { transform: translateX(110vw); } to { transform: translateX(-60vw); } }
@keyframes flash { 0%, 3% { opacity: 0; } 6% { opacity: .9; } 22%, 100% { opacity: 0; } }

/* hot : retard (mode objectif) */
.moment[data-kind="hot"] .m-bg { box-shadow: inset 0 0 160px 60px rgba(255, 74, 43, .5); }
.moment[data-kind="hot"] .m-word { color: var(--hot); }
.moment[data-kind="hot"] .m-text { animation: slam var(--d) cubic-bezier(.15, .8, .2, 1) forwards, shake .5s .25s ease 2; }
.moment[data-kind="hot"] .m-sub { background: var(--ink); color: var(--txt); border: 2px solid var(--hot); }
@keyframes shake { 0%, 100% { translate: 0 0; } 20% { translate: -14px 3px; } 40% { translate: 12px -3px; } 60% { translate: -6px 2px; } 80% { translate: 3px -1px; } }

/* split : moitié */
.moment[data-kind="split"] .m-doors { display: block; position: absolute; inset: 0; }
.m-door { position: absolute; top: 0; bottom: 0; width: 50%; display: flex; align-items: center; animation: var(--d) cubic-bezier(.7, 0, .2, 1) forwards; }
.m-door b { font: 800 84px/1 var(--cond); white-space: nowrap; font-style: italic; text-transform: uppercase; }
.m-door.l { left: 0; background: var(--txt); color: var(--ink); justify-content: flex-end; padding-right: 40px; animation-name: doorL; }
.m-door.r { right: 0; background: var(--line); justify-content: flex-start; padding-left: 40px; animation-name: doorR; }
@keyframes doorL { 0%, 6% { transform: translateX(0); } 26%, 76% { transform: translateX(-56%); } 92%, 100% { transform: translateX(-102%); } }
@keyframes doorR { 0%, 6% { transform: translateX(0); } 26%, 76% { transform: translateX(56%); } 92%, 100% { transform: translateX(102%); } }
.moment[data-kind="split"] .m-text { animation-name: reveal; }
.moment[data-kind="split"] .m-word { font-size: 380px; }
.moment[data-kind="split"] .m-sub { background: transparent; color: var(--volt); padding: 0; letter-spacing: .3em; }
@keyframes reveal { 0%, 14% { opacity: 0; transform: scale(.7); } 30%, 78% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }

/* heart : dernier km */
.moment[data-kind="heart"] .m-kicker { color: var(--gold); }
.moment[data-kind="heart"] .m-word { animation: heart 1.1s ease infinite; }
.moment[data-kind="heart"] .m-sub { background: var(--gold); color: #1A1203; }
@keyframes heart { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.12); } 16% { transform: scale(1); } 24% { transform: scale(1.07); } 36% { transform: scale(1); } }

/* gold : arrivée / record */
.moment[data-kind="gold"] .m-rays { display: block; position: absolute; left: 50%; top: 50%; width: 3000px; height: 3000px; margin: -1500px 0 0 -1500px; background: repeating-conic-gradient(from 0deg, rgba(255, 184, 0, .2) 0deg 6deg, transparent 6deg 18deg); animation: spin 14s linear infinite; }
.moment[data-kind="gold"] .m-conf { display: block; position: absolute; inset: 0; }
.moment[data-kind="gold"] .m-word { color: var(--gold); text-shadow: 0 12px 0 #000, 0 0 70px rgba(255, 184, 0, .6); }
.moment[data-kind="gold"] .m-sub { background: var(--gold); color: #1A1203; }

/* ================= MERCI AUX PARTENAIRES ================= */
.merci { position: absolute; inset: 0; z-index: 45; display: none; place-items: center; background: rgba(7, 9, 13, .92); --d: 12000ms; }
body.vue-overlay .merci { background: rgba(7, 9, 13, .8); }
.merci.on { display: grid; animation: mFade var(--d) ease forwards; }
.merci-in { display: flex; flex-direction: column; align-items: center; gap: 46px; max-width: 1500px; }
.merci-in .label { font-size: 22px; letter-spacing: .4em; color: var(--txt); }
.merci-title { font: 800 120px/.85 var(--cond); font-style: italic; text-transform: uppercase; text-align: center; text-wrap: balance; }
.merci-title em { color: var(--volt); font-style: italic; white-space: nowrap; }
.merci-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
.merci-logos .plate { height: 110px; min-width: 260px; padding: 0 34px; border-radius: 16px; opacity: 0; animation: plateIn .6s cubic-bezier(.2, .8, .2, 1) forwards; }
.merci-logos .plate img { max-height: 70px; max-width: 280px; }
.merci-logos .plate.txt { font-size: 40px; }
.merci-logos .plate.main { height: 150px; min-width: 400px; }
.merci-logos .plate.main img { max-height: 100px; max-width: 380px; }
@keyframes plateIn { from { opacity: 0; transform: translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }

/* ================= AIDE / MESSAGES ================= */
.hint { position: absolute; left: 50%; bottom: 24px; z-index: 60; translate: -50% 0; padding: 10px 18px; border-radius: 10px; background: rgba(7, 9, 13, .92); border: 1px solid var(--line2); font: 600 15px/1.3 var(--sans); letter-spacing: .06em; color: var(--dim2); opacity: 0; transition: opacity .3s ease; pointer-events: none; white-space: nowrap; }
.hint.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
