:root {
  --tsf-ink: #061226;
  --tsf-midnight: #081b36;
  --tsf-panel: #e8f3ff;
  --tsf-panel-2: #d8eaff;
  --tsf-line: rgba(25, 69, 117, .28);
  --tsf-white: #f8fbff;
  --tsf-muted: #9fb3cb;
  --tsf-red: #ff314d;
  --tsf-cyan: #1fd5f3;
  --tsf-blue: #1457ff;
  --tsf-violet: #7d2cff;
  --tsf-font-ui: Inter, "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --tsf-font-display: "Barlow Condensed", "Archivo Black", Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif;
  --tsf-font-cond: "Barlow Semi Condensed", "Barlow Condensed", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--tsf-ink);
  background: #dce9f6;
  font-family: var(--tsf-font-ui);
}

button { font: inherit; }

.demo-site {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 26%, rgba(40, 96, 190, .30), transparent 40%),
    radial-gradient(circle at 78% 72%, rgba(90, 60, 180, .22), transparent 42%),
    linear-gradient(160deg, #0a1c38, #06111f 70%);
}

.demo-site__reference {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 20%;
  filter: saturate(.82) contrast(.92);
}

.demo-site__launcher {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 1;
  transform: translateX(-50%);
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 9px;
  color: white;
  background: #0b2346;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
}

.tsf-game-choice {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 28px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.tsf-game-choice.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.tsf-game-choice__backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(3, 12, 27, .72), rgba(2, 8, 20, .84)),
    radial-gradient(circle at 50% 30%, rgba(25, 96, 187, .24), transparent 44%);
  -webkit-backdrop-filter: blur(14px) saturate(.72);
  backdrop-filter: blur(14px) saturate(.72);
}

.tsf-game-choice__dialog {
  --dialog-width: 1160px;
  position: relative;
  width: min(var(--dialog-width), calc(100vw - 56px));
  min-height: 744px;
  overflow: hidden;
  border: 1px solid rgba(56, 105, 157, .6);
  border-radius: 27px;
  color: var(--tsf-white);
  background:
    linear-gradient(145deg, rgba(230, 244, 255, .98), rgba(211, 232, 255, .97)),
    var(--tsf-panel);
  box-shadow:
    0 40px 120px rgba(0, 8, 24, .5),
    0 16px 36px rgba(0, 20, 60, .22),
    inset 0 1px rgba(255,255,255,.9);
  transform: translateY(20px) scale(.98);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
  outline: none;
}

.tsf-game-choice.is-open .tsf-game-choice__dialog {
  transform: translateY(0) scale(1);
}

.tsf-game-choice__header {
  position: relative;
  min-height: 186px;
  padding: 48px 48px 22px;
  color: #09244b;
  background:
    linear-gradient(90deg, rgba(255,255,255,.38), transparent 55%),
    linear-gradient(180deg, rgba(247,252,255,.78), rgba(221,238,255,.5));
}

.tsf-game-choice__header::after {
  content: "";
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, #ff324d 0 76px, rgba(44,85,129,.24) 76px 100%);
}

.tsf-game-choice__heading { max-width: 760px; }

.tsf-game-choice__eyebrow {
  margin: 0 0 9px;
  color: var(--tsf-red);
  font-family: var(--tsf-font-cond);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .22em;
}

.tsf-game-choice__heading h1 {
  margin: 0;
  font-family: var(--tsf-font-display);
  font-style: italic;
  font-size: 54px;
  line-height: .98;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  text-transform: uppercase;
}

.tsf-game-choice__heading p:last-child {
  margin: 12px 0 0;
  color: #4d6685;
  font-family: var(--tsf-font-ui);
  font-size: 18px;
  font-weight: 600;
}

.tsf-game-choice__progress {
  position: absolute;
  top: 96px;
  right: 92px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(58, 96, 142, .28);
  border-radius: 999px;
  color: #1d3f6b;
  background: rgba(255,255,255,.68);
  box-shadow: inset 0 1px rgba(255,255,255,.85), 0 3px 10px rgba(18,52,102,.06);
  font-family: var(--tsf-font-cond);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
}

.tsf-game-choice__progress strong { color: var(--tsf-red); font-weight: 800; }

.tsf-game-choice__progress-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: #123a72;
}

.tsf-game-choice__close {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(50, 90, 135, .28);
  border-radius: 12px;
  color: #153a67;
  background: rgba(237,247,255,.68);
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.tsf-game-choice__close:hover { background: white; transform: scale(1.04); }
.tsf-game-choice__close:focus-visible { outline: 3px solid var(--tsf-cyan); outline-offset: 3px; }
.tsf-game-choice__close svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

.tsf-game-choice__cards {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.46fr) minmax(0, 1fr);
  gap: 20px;
  min-height: 470px;
  padding: 27px 40px 22px;
  background:
    radial-gradient(circle at 32% 60%, rgba(38, 115, 255, .14), transparent 31%),
    radial-gradient(circle at 75% 58%, rgba(116, 50, 255, .12), transparent 28%),
    linear-gradient(180deg, rgba(213,232,253,.62), rgba(226,241,255,.74));
}

.tsf-game-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(85, 125, 167, .48);
  border-radius: 17px;
  color: white;
  background: #071b39;
  box-shadow: 0 16px 34px rgba(5, 24, 56, .18);
  isolation: isolate;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.tsf-game-card.is-selected {
  border-color: var(--tsf-cyan);
  box-shadow:
    0 18px 45px rgba(5,24,56,.25),
    0 0 0 2px rgba(31,213,243,.8),
    0 0 34px rgba(31,213,243,.24);
  transform: translateY(-6px);
}

.tsf-game-card.is-selected::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  z-index: 6;
  height: 5px;
  background: linear-gradient(90deg, var(--tsf-red), #ff3656 55%, var(--tsf-violet));
}

.tsf-game-card:focus-within { outline: 3px solid white; outline-offset: 3px; }

.tsf-game-card__art,
.tsf-game-card__shade {
  position: absolute;
  inset: 0;
}

.tsf-game-card--player .tsf-game-card__art--stadium {
  background-image: url(../jeux/jeux-stadium.webp);
  background-size: cover;
  background-position: right center;
  background-color: #061634;
}

.tsf-game-card__stadium-lines {
  position: absolute;
  inset: 0;
  opacity: .54;
  background:
    radial-gradient(ellipse at 50% 30%, transparent 0 37%, rgba(129,190,255,.2) 38% 39%, transparent 40%),
    repeating-radial-gradient(ellipse at 50% 50%, transparent 0 38px, rgba(97,160,239,.12) 40px 42px, transparent 44px 58px),
    linear-gradient(100deg, transparent 0 42%, rgba(110,187,255,.18) 48%, transparent 54%),
    linear-gradient(-100deg, transparent 0 42%, rgba(110,187,255,.13) 48%, transparent 54%);
}

.tsf-game-card__stadium-lines::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 5%;
  height: 35%;
  border-radius: 50% 50% 12px 12px;
  background:
    radial-gradient(circle, rgba(214,236,255,.62) 0 1px, transparent 1.4px) 0 0/11px 9px,
    linear-gradient(180deg, rgba(27,91,176,.2), rgba(2,14,35,.72));
  transform: perspective(300px) rotateX(46deg);
}

.tsf-game-card__player {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -2%;
  width: min(64%, 370px);
  height: 94%;
  object-fit: contain;
  object-position: bottom center;
  transform: translateX(-50%);
  filter: drop-shadow(0 24px 24px rgba(0,0,0,.45));
}

.tsf-game-card--career .tsf-game-card__art {
  background:
    radial-gradient(circle at 67% 46%, rgba(158,84,255,.65), transparent 27%),
    linear-gradient(135deg, #14143c, #4e218c 54%, #10102e);
}

.tsf-game-card__career-wall {
  position: absolute;
  inset: -5%;
  opacity: .3;
  background:
    linear-gradient(90deg, rgba(111,39,203,.5), transparent 23% 73%, rgba(118,45,214,.46)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.1) 0 2px, transparent 2px 120px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 2px, transparent 2px 84px);
  transform: perspective(620px) rotateY(-9deg);
}

.tsf-game-card__career-glow {
  position: absolute;
  top: 12%;
  right: 6%;
  width: 56%;
  height: 78%;
  border-radius: 50%;
  background: rgba(150, 74, 240, .5);
  filter: blur(42px);
}

.tsf-game-card__manager {
  position: absolute;
  z-index: 1;
  right: -3%;
  bottom: 0;
  width: 64%;
  height: 99%;
  object-fit: cover;
  object-position: 47% 4%;
  transform: scale(1.08);
  transform-origin: 60% 20%;
  filter: saturate(1.02) contrast(1.04) brightness(1.02) drop-shadow(-16px 16px 22px rgba(9,4,25,.45));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 84%, transparent 100%), linear-gradient(to bottom, #000 0 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 84%, transparent 100%), linear-gradient(to bottom, #000 0 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.tsf-game-card__shade {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(3,15,37,.97) 0%, rgba(5,19,44,.84) 42%, rgba(5,17,37,.15) 75%),
    linear-gradient(180deg, rgba(5,16,37,.02) 35%, rgba(4,14,33,.92) 100%);
}

.tsf-game-card--career .tsf-game-card__shade {
  background:
    radial-gradient(ellipse 46% 40% at 100% 0%, rgba(40,20,86,.92), rgba(40,20,86,0) 70%),
    linear-gradient(90deg, rgba(16,11,51,.97) 0%, rgba(25,15,61,.82) 49%, rgba(21,11,52,.09) 78%),
    linear-gradient(180deg, rgba(9,9,38,.02) 34%, rgba(11,9,39,.9) 100%);
}

.tsf-game-card__content {
  position: relative;
  z-index: 3;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  padding: 25px 27px 22px;
}

.tsf-game-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tsf-game-card__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  padding: 0 16px;
  border: 1px solid rgba(150,190,240,.5);
  border-radius: 999px;
  color: #eef6ff;
  background: rgba(6,18,40,.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  font-family: var(--tsf-font-cond);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
}

.tsf-game-card__status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--tsf-red);
  box-shadow: 0 0 0 3px rgba(255,49,77,.22);
}

.tsf-game-card--career .tsf-game-card__status::before {
  background: #9a54ff;
  box-shadow: 0 0 0 3px rgba(154,84,255,.22);
}

.tsf-game-card[data-state="completed"] .tsf-game-card__status::before {
  background: #3fdc8b;
  box-shadow: 0 0 0 3px rgba(63,220,139,.22);
}

.tsf-game-card__copy {
  margin-top: 32px;
}

.tsf-game-card__copy h2 {
  margin: 0;
  font-family: var(--tsf-font-display);
  font-style: italic;
  font-size: 46px;
  line-height: .92;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.tsf-game-card--player .tsf-game-card__copy h2 { white-space: nowrap; }
.tsf-game-card--career .tsf-game-card__copy h2 { font-size: 50px; }

.tsf-game-card__copy > p:last-child {
  margin: 12px 0 0;
  color: #d7e4f2;
  font-family: var(--tsf-font-ui);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.tsf-game-card__meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 30px 0 0;
  padding: 0;
  font-family: var(--tsf-font-cond);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .05em;
  color: #eaf3ff;
}

.tsf-game-card__meta li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.tsf-game-card__meta-icon {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(18,44,84,.78);
  border: 1px solid rgba(120,170,235,.42);
  color: #bcd7ff;
}

.tsf-game-card--career .tsf-game-card__meta-icon {
  background: rgba(48,26,92,.7);
  border-color: rgba(168,130,240,.42);
  color: #d6c4ff;
}

.tsf-game-card__meta-icon--bare {
  background: none;
  border: 0;
  width: 22px;
  height: 22px;
}

.tsf-game-card__meta-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tsf-game-card__meta-icon svg circle { fill: currentColor; stroke: none; }
.tsf-game-card__meta-icon svg rect { fill: currentColor; stroke: none; }
.tsf-game-card__meta-icon:not(.tsf-game-card__meta-icon--bare) svg path[d^="m12 3"] { fill: currentColor; stroke: none; }

.tsf-game-card__cta {
  width: 100%;
  margin-top: auto;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: linear-gradient(90deg, #ff304c, #8a2eff);
  box-shadow: 0 11px 22px rgba(47,19,107,.3), inset 0 1px rgba(255,255,255,.25);
  font-family: var(--tsf-font-cond);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 140ms ease, transform 140ms ease;
}

.tsf-game-card--career .tsf-game-card__cta { background: linear-gradient(90deg, #6627e7, #8737ff); }
.tsf-game-card__cta:hover { filter: brightness(1.12); transform: translateY(-1px); }
.tsf-game-card__cta:active { transform: translateY(1px); }
.tsf-game-card__cta:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.tsf-game-card__cta svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; }

.tsf-game-card[data-state="completed"] .tsf-game-card__status {
  color: #eafff4;
  border-color: rgba(75,224,151,.7);
  background: rgba(12,105,68,.72);
}

.tsf-game-card[data-state="completed"] .tsf-game-card__cta {
  color: #19304e;
  background: rgba(228,241,252,.92);
  box-shadow: none;
}

.tsf-game-card[data-state="unavailable"] { filter: grayscale(.75); opacity: .72; }
.tsf-game-card[data-state="unavailable"] .tsf-game-card__cta { cursor: not-allowed; background: #536276; }

.tsf-game-choice__footer {
  min-height: 87px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 44px;
  border-top: 1px solid rgba(47,89,134,.26);
  color: #305071;
  background: rgba(229,243,255,.92);
}

.tsf-game-choice__controls {
  flex: none;
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--tsf-font-cond);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .07em;
  color: #23496f;
}

.tsf-game-choice__controls span { display: inline-flex; align-items: center; gap: 9px; }

.tsf-game-choice__controls b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-family: var(--tsf-font-cond);
  font-size: 13px;
  font-weight: 800;
}

.tsf-game-choice__controls .is-confirm { background: #36a746; }
.tsf-game-choice__controls .is-back { background: var(--tsf-red); }

.tsf-game-choice__rule {
  flex: 1;
  height: 1px;
  min-width: 24px;
  background: linear-gradient(90deg, rgba(70,110,165,.06), rgba(70,110,165,.34) 40%, rgba(70,110,165,.10));
}

.tsf-game-choice__footer p {
  flex: none;
  margin: 0;
  color: #4c72c6;
  font-family: var(--tsf-font-cond);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .tsf-game-choice { padding: 18px; }
  .tsf-game-choice__dialog { width: min(780px, calc(100vw - 36px)); min-height: auto; max-height: calc(100dvh - 36px); overflow-y: auto; }
  .tsf-game-choice__header { min-height: 170px; padding: 36px 32px 22px; }
  .tsf-game-choice__header::after { left: 32px; right: 32px; }
  .tsf-game-choice__heading h1 { font-size: 46px; white-space: normal; }
  .tsf-game-card--player .tsf-game-card__copy h2 { white-space: normal; }
  .tsf-game-choice__progress { position: static; width: max-content; margin-top: 18px; }
  .tsf-game-choice__cards { grid-template-columns: 1fr 1fr; padding: 24px 28px 20px; }
  .tsf-game-card, .tsf-game-card__content { min-height: 390px; }
  .tsf-game-card__copy { margin-top: 42px; }
  .tsf-game-card__copy h2, .tsf-game-card--career .tsf-game-card__copy h2 { font-size: 42px; }
  .tsf-game-card__copy > p:last-child { font-size: 13px; }
  .tsf-game-choice__footer { grid-template-columns: 1fr; justify-items: center; padding: 15px 24px; }
  .tsf-game-choice__footer p { grid-column: 1; grid-row: 1; }
  .tsf-game-choice__controls { grid-row: 2; }
}

@media (max-width: 680px) {
  .tsf-game-choice { padding: 0; place-items: stretch; }
  .tsf-game-choice__dialog { width: 100%; max-height: 100dvh; min-height: 100dvh; border: 0; border-radius: 0; }
  .tsf-game-choice__header { min-height: 190px; padding: 30px 22px 22px; }
  .tsf-game-choice__header::after { left: 22px; right: 22px; }
  .tsf-game-choice__eyebrow { font-size: 12px; }
  .tsf-game-choice__heading h1 { max-width: 310px; font-size: clamp(34px, 11vw, 46px); white-space: normal; }
  .tsf-game-card--player .tsf-game-card__copy h2 { white-space: normal; }
  .tsf-game-choice__footer p { white-space: normal; }
  .tsf-game-choice__heading p:last-child { font-size: 15px; }
  .tsf-game-choice__close { top: 20px; right: 18px; width: 42px; height: 42px; }
  .tsf-game-choice__progress { min-height: 32px; font-size: 10px; }
  .tsf-game-choice__cards { grid-template-columns: 1fr; gap: 17px; padding: 22px 18px; }
  .tsf-game-card, .tsf-game-card__content { min-height: 430px; }
  .tsf-game-card.is-selected { transform: none; }
  .tsf-game-card__copy { margin-top: 48px; }
  .tsf-game-card__copy h2, .tsf-game-card--career .tsf-game-card__copy h2 { font-size: 49px; }
  .tsf-game-card__copy > p:last-child { font-size: 14px; }
  .tsf-game-choice__footer { min-height: 95px; position: sticky; bottom: 0; z-index: 10; }
  .tsf-game-choice__controls { display: none; }
  .tsf-game-choice__footer p { font-size: 11px; }
}

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