@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-style: italic; font-display: block; src: url(fonts/barlowcondensed-800-italic.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: italic; font-display: block; src: url(fonts/barlowcondensed-700-italic.woff2) format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-weight: 600; font-display: block; src: url(fonts/chakrapetch-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-weight: 700; font-display: block; src: url(fonts/chakrapetch-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 400; font-display: swap; src: url(fonts/jost-400-normal.woff2) format('woff2'); }

:root {
  --bg: #04060c;
  --ink: #f2f6ff;
  --mute: #9aa7c2;
  --cyan: #4cc9ff;
  --orange: #f89e1c;
  --line: rgba(160, 190, 255, .16);
  --glass: rgba(10, 16, 32, .55);
  --accent: var(--orange);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body { font: 400 16px/1.45 Jost, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
.grain { position: fixed; inset: -50%; pointer-events: none; opacity: .07; mix-blend-mode: overlay; z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .6s steps(4) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-6%, 4%); } 50% { transform: translate(5%, -3%); } 75% { transform: translate(-3%, -6%); } }
.flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 30; }

.screen { position: fixed; inset: 0; z-index: 10; display: none; }
.screen.is-on { display: flex; }

/* ---------- 1. Code ---------- */
.gate { flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.gate::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(4, 6, 12, .82), rgba(4, 6, 12, .35) 70%, transparent); }
.gate > * { animation: rise .9s var(--ease) both; }
.gate > :nth-child(2) { animation-delay: .1s; } .gate > :nth-child(3) { animation-delay: .18s; } .gate > :nth-child(4) { animation-delay: .26s; }
.gate > :nth-child(5) { animation-delay: .34s; } .gate > :nth-child(6) { animation-delay: .5s; } .gate > :nth-child(7) { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.gate-logo { width: min(220px, 56vw); margin-bottom: 6vh; opacity: .92; }
.gate-kicker { margin: 0; font: 600 13px/1 'Chakra Petch'; letter-spacing: .32em; text-transform: uppercase; color: var(--orange); }
.gate-title { margin: 14px 0 6px; font: 800 italic clamp(40px, 9vw, 72px)/.95 'Barlow Condensed'; text-transform: uppercase; letter-spacing: .01em; }
.gate-sub { margin: 0 0 32px; color: var(--mute); max-width: 32ch; }
#gate-form { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.tiles { position: relative; display: flex; gap: clamp(8px, 2.4vw, 14px); cursor: text; }
.tiles input { position: absolute; inset: 0; opacity: 0; font-size: 16px; letter-spacing: 3em; caret-color: transparent; color: transparent; background: none; border: 0; outline: 0; text-transform: uppercase; }
.tile { width: clamp(52px, 14vw, 72px); height: clamp(64px, 17vw, 88px); display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 44, 80, .55), rgba(8, 12, 24, .75)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .4);
  font: 700 clamp(30px, 8vw, 42px)/1 'Chakra Petch'; color: var(--ink); text-shadow: 0 0 18px rgba(76, 201, 255, .8);
  transition: border-color .2s, transform .25s var(--pop), box-shadow .25s; }
.tile.is-filled { border-color: rgba(76, 201, 255, .55); animation: tilePop .28s var(--pop); }
.tile.is-cur { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(248, 158, 28, .18), 0 10px 30px rgba(0, 0, 0, .4); }
.tile.is-cur::after { content: ''; width: 2px; height: 42%; background: var(--orange); animation: blink 1s steps(1) infinite; }
@keyframes tilePop { 50% { transform: translateY(-6px) scale(1.06); } }
@keyframes blink { 50% { opacity: 0; } }
.tiles.is-bad { animation: shake .45s; }
.tiles.is-bad .tile { border-color: #ff4d6d; }
.tiles.is-ok .tile { border-color: var(--orange); background: linear-gradient(180deg, rgba(248, 158, 28, .45), rgba(120, 50, 0, .5)); text-shadow: 0 0 22px #ffd08a; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }

.btn-enter, .btn-play { position: relative; min-width: 220px; min-height: 58px; padding: 0 34px; border: 0; border-radius: 999px; overflow: hidden;
  font: 800 italic 24px/1 'Barlow Condensed'; letter-spacing: .06em; text-transform: uppercase; color: #1a0d00;
  background: linear-gradient(180deg, #ffc061, var(--orange) 55%, #d97a00); box-shadow: 0 10px 40px rgba(248, 158, 28, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .2s var(--pop), filter .2s, opacity .3s; }
.btn-enter::before, .btn-play::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: sheen 2.8s 1s infinite; }
@keyframes sheen { 0% { left: -60%; } 40%, 100% { left: 130%; } }
.btn-enter:hover:not(:disabled), .btn-play:hover { transform: translateY(-2px) scale(1.03); }
.btn-enter:active:not(:disabled), .btn-play:active { transform: scale(.97); }
.btn-enter:disabled { opacity: .35; filter: grayscale(.7); cursor: default; }
.btn-enter:disabled::before { display: none; }
.btn-enter span, .btn-play span { position: relative; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.gate-msg { min-height: 1.4em; margin: 0; color: #ff8fa3; font-size: 15px; }
.gate-hint { margin: 2vh 0 0; color: var(--mute); font-size: 13px; opacity: .8; }
.preview-tag { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 999px;
  font: 600 12px/1 'Chakra Petch'; letter-spacing: .08em; color: #ffd08a; background: rgba(248, 158, 28, .12); border: 1px dashed rgba(248, 158, 28, .5); white-space: nowrap; }
.gate.is-leaving > * { animation: leave .6s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: scale(1.4); filter: blur(10px); } }

/* ---------- 2. Bienvenue ---------- */
.intro { align-items: center; justify-content: center; pointer-events: none; }
.intro-stack { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; padding: 0 16px; }
.intro-l1 { margin: 0; font: 800 italic clamp(64px, 17vw, 220px)/.85 'Barlow Condensed'; text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap;
  background: linear-gradient(180deg, #fff 30%, #9fdcff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(76, 201, 255, .55)); opacity: 0; transition: transform .9s var(--ease), opacity .4s, font-size .9s var(--ease); }
.intro-l1 .g { color: var(--orange); -webkit-text-fill-color: var(--orange); }
.intro-l2 { margin: .3em 0 0; font: 700 clamp(18px, 3.6vw, 40px)/1 'Chakra Petch'; letter-spacing: .5em; text-transform: uppercase; color: #cfe6ff; opacity: 0; padding-left: .5em; }
.intro-logo { position: relative; width: min(980px, 88vw); margin-top: 3vh; opacity: 0; }
.intro-logo img { display: block; width: 100%; }
.intro-logo .lg-r, .intro-logo .lg-c { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .9; }
.intro-logo .lg-r { filter: brightness(0) saturate(100%) invert(31%) sepia(98%) saturate(5000%) hue-rotate(350deg); }
.intro-logo .lg-c { filter: brightness(0) saturate(100%) invert(70%) sepia(70%) saturate(1500%) hue-rotate(170deg); }
.intro-logo .lg { position: relative; filter: drop-shadow(0 0 24px rgba(248, 158, 28, .55)) drop-shadow(0 0 60px rgba(76, 201, 255, .35)); }
.intro-l3 { margin: 4vh 0 0; font: 600 clamp(13px, 2vw, 18px)/1 'Chakra Petch'; letter-spacing: .4em; text-transform: uppercase; color: var(--orange); opacity: 0; padding-left: .4em; }
.scanline { position: absolute; left: 50%; top: 50%; width: 0; height: 2px; transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, #fff, transparent); box-shadow: 0 0 20px #9fdcff, 0 0 60px #4cc9ff; opacity: 0; }
.skip { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + var(--safe-b)); pointer-events: auto; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 16, 32, .5); color: var(--mute); font: 600 13px/1 'Chakra Petch'; letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; animation: fadeIn .6s 2s forwards; }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- 3. Choix ---------- */
.hub { display: none; grid-template-columns: clamp(220px, 22vw, 340px) 1fr clamp(290px, 28vw, 420px); grid-template-rows: auto 1fr auto;
  grid-template-areas: 'top top top' 'list stage info' 'nav nav nav'; padding: calc(20px + var(--safe-t)) clamp(16px, 3vw, 48px) calc(20px + var(--safe-b)); gap: 12px 28px; pointer-events: none; }
.hub.is-on { display: grid; }
.hub > * { pointer-events: auto; }
.hub-top { grid-area: top; display: flex; align-items: center; gap: 22px; }
.hub-logo { height: 26px; }
.hub-title { margin: 0; flex: 1; font: 600 13px/1 'Chakra Petch'; letter-spacing: .32em; text-transform: uppercase; color: var(--mute); padding-left: 22px; border-left: 1px solid var(--line); }
.sound { display: flex; align-items: flex-end; gap: 3px; width: 44px; height: 44px; padding: 12px 11px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); }
.sound i { flex: 1; background: var(--ink); border-radius: 2px; height: 30%; animation: eq 1s ease-in-out infinite; }
.sound i:nth-child(2) { animation-delay: -.3s; } .sound i:nth-child(3) { animation-delay: -.6s; } .sound i:nth-child(4) { animation-delay: -.15s; }
.sound[aria-pressed='false'] i { animation: none; height: 15%; opacity: .5; }
@keyframes eq { 50% { height: 100%; } }

.hub-list { grid-area: list; align-self: center; display: flex; flex-direction: column; gap: 12px; }
.card { position: relative; display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 14px; width: 100%; min-height: 84px; padding: 12px 16px 12px 12px; text-align: left;
  border-radius: 16px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .35s var(--ease), border-color .3s, background .3s, opacity .3s; opacity: 0; transform: translateX(-40px); }
.hub.is-in .card { opacity: .72; transform: none; }
.hub.is-in .card:hover { opacity: 1; transform: translateX(4px); }
.hub.is-in .card[aria-selected='true'] { opacity: 1; transform: translateX(10px); border-color: var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent), var(--glass));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 14px 40px rgba(0, 0, 0, .45); }
.card[aria-selected='true']::before { content: ''; position: absolute; left: -12px; top: 22%; bottom: 22%; width: 4px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.card-ico { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.card-ico svg { width: 30px; height: 30px; }
.card-n { display: block; font: 600 11px/1 'Chakra Petch'; letter-spacing: .2em; color: var(--mute); margin-bottom: 6px; }
.card-t { display: block; font: 800 italic 25px/1 'Barlow Condensed'; text-transform: uppercase; letter-spacing: .01em; }
.card-s { display: block; font-size: 13px; color: var(--mute); margin-top: 4px; }

.hub-info { grid-area: info; align-self: center; padding: 28px; border-radius: 22px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transform: translateX(40px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.hub.is-in .hub-info { opacity: 1; transform: none; }
.info-kicker { margin: 0 0 10px; font: 600 12px/1 'Chakra Petch'; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); }
.info-name { margin: 0; font: 800 italic clamp(44px, 4.6vw, 68px)/.88 'Barlow Condensed'; text-transform: uppercase; }
.info-pitch { margin: 14px 0 22px; color: #c9d4ea; }
.info-stats { margin: 0 0 26px; display: grid; gap: 12px; }
.stat { display: grid; grid-template-columns: 128px 1fr auto; align-items: center; gap: 12px; }
.stat dt { font: 600 11px/1 'Chakra Petch'; letter-spacing: .12em; white-space: nowrap; text-transform: uppercase; color: var(--mute); }
.stat dd { margin: 0; font: 600 13px/1 'Chakra Petch'; color: var(--ink); }
.stat .bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.stat .bar b { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #fff); transform-origin: left; animation: barIn .9s var(--ease) both; }
@keyframes barIn { from { transform: scaleX(0); } }
.btn-play { width: 100%; }
.info-note { margin: 12px 0 0; font-size: 13px; color: var(--mute); text-align: center; min-height: 1.2em; }
.hub-info.swap > * { animation: swapIn .5s var(--ease) both; }
.hub-info.swap > :nth-child(2) { animation-delay: .04s; } .hub-info.swap > :nth-child(3) { animation-delay: .08s; } .hub-info.swap > :nth-child(4) { animation-delay: .12s; }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); } }

.hub-nav { grid-area: nav; justify-self: center; display: flex; align-items: center; gap: 18px; font: 600 13px/1 'Chakra Petch'; letter-spacing: .2em; color: var(--mute); opacity: 0; transition: opacity .6s .6s; }
.hub.is-in .hub-nav { opacity: 1; }
.hub-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); font-size: 22px; line-height: 1; }

.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); z-index: 40; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: 12px; max-width: calc(100vw - 32px);
  background: rgba(10, 16, 32, .9); border: 1px solid var(--line); opacity: 0; pointer-events: none; transition: .3s var(--ease); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* téléphone : la scène en haut, la liste en onglets, le bouton sous le pouce */
@media (max-width: 860px) {
  .hub { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto auto; grid-template-areas: 'top' 'stage' 'list' 'info'; gap: 10px; padding: calc(12px + var(--safe-t)) 16px calc(14px + var(--safe-b)); }
  .hub-title { display: none; }
  .hub-top { justify-content: space-between; }
  .hub-list { flex-direction: row; gap: 8px; align-self: end; }
  .card { grid-template-columns: 1fr; justify-items: center; text-align: center; min-height: 0; padding: 10px 6px; gap: 6px; }
  .card-ico { width: 40px; height: 40px; } .card-ico svg { width: 22px; height: 22px; }
  .card-t { font-size: 16px; } .card-s, .card-n { display: none; }
  .hub.is-in .card[aria-selected='true'] { transform: translateY(-4px); }
  .card[aria-selected='true']::before { left: 25%; right: 25%; top: auto; bottom: -8px; width: auto; height: 3px; }
  .hub-info { padding: 16px 18px; border-radius: 18px; }
  .info-kicker { margin-bottom: 6px; } .info-name { font-size: 38px; }
  .info-pitch { margin: 8px 0 12px; font-size: 14px; line-height: 1.4; }
  .info-stats { gap: 8px; margin-bottom: 14px; } .stat { grid-template-columns: 122px 1fr auto; } .stat dt { letter-spacing: .1em; white-space: nowrap; }
  .hub-nav { display: none; }
  .btn-enter, .btn-play { min-height: 56px; }
}
@media (max-width: 860px) and (max-height: 700px) { .info-pitch { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* vue d'inspection : la maquette seule, plein écran (?vue) */
.vue .hub > *:not(.hub-stage), .vue .grain { display: none !important; }
