@font-face { font-family: "Bungee"; src: url("fonts/bungee-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
/* Plein écran jeu : scène 3D derrière, interface en surimpression ; une seule ambiance de nuit, assumée */
:root {
  --nuit: #0B1230;
  --nuit-2: #141D45;
  --trait: #2E3D78;
  --encre: #F4F1E8;
  --brume: #B4BDDF;
  --orange: #FF7A3D;
  --orange-ombre: #A9441A;
  --or: #FFC83D;
  --display: "Bungee", Impact, "Arial Black", sans-serif;
  --texte: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--nuit); color: var(--encre); font-family: var(--texte); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#jeu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; touch-action: none; }
.lignes { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; pointer-events: none; mix-blend-mode: screen; }
.impact { position: fixed; inset: 0; background: #FFFFFF; pointer-events: none; z-index: 5; }
#jeu canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.hud { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: calc(env(safe-area-inset-top, 0px) + 14px); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.pastille { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 14px; background: rgba(20, 29, 69, .9); box-shadow: 0 4px 0 #070B1F; font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; transition: transform .15s; }
.pastille.pop { transform: scale(1.14); }
.compteurs { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.bouton-pause { width: 50px; height: 50px; border-radius: 14px; border: 3px solid var(--encre); background: #3D6BE0; box-shadow: 0 4px 0 #1F3EA8; display: grid; place-items: center; cursor: pointer; }
.bouton-pause:focus-visible, .btn:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
.quartier { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 74px); transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(20, 29, 69, .85); font-weight: 900; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap; transition: transform .3s; pointer-events: none; }
.quartier.flash { transform: translateX(-50%) scale(1.25); }
.ecran { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 14px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); padding-top: 28px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); background: linear-gradient(to top, rgba(7, 12, 36, .96) 55%, rgba(7, 12, 36, 0)); }
.titre-haut { position: fixed; top: 0; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: calc(env(safe-area-inset-top, 0px) + 22px); padding-bottom: 48px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); background: linear-gradient(to bottom, rgba(7, 12, 36, .9) 35%, rgba(7, 12, 36, 0)); pointer-events: none; }
.titre-haut h1 { text-shadow: 0 4px 0 #070B1F; }
.ecran-centre { max-width: 420px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.sur-titre { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--brume); }
h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(44px, 13vw, 60px); line-height: .95; text-wrap: balance; }
h1 span { color: var(--orange); }
.accroche { margin: 0; font-size: 16px; line-height: 1.45; color: var(--brume); max-width: 34ch; }
.ligne { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--nuit-2); border: 1px solid var(--trait); font-size: 14px; color: var(--brume); }
.ligne b { font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--encre); font-variant-numeric: tabular-nums; }
.btn { height: 62px; border: 0; border-radius: 18px; background: var(--orange); box-shadow: 0 5px 0 var(--orange-ombre); color: var(--nuit); font-family: var(--display); font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--orange-ombre); }
.btn.second { height: 52px; background: var(--nuit-2); color: var(--encre); box-shadow: none; border: 1px solid var(--trait); font-family: var(--texte); font-weight: 800; font-size: 16px; }
.gestes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; font-weight: 800; color: var(--brume); text-align: center; }
.gestes div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; border: 1px dashed var(--trait); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 16px; border-radius: 18px; background: var(--nuit-2); border: 1px solid var(--trait); }
.stats div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--brume); }
.stats b { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--encre); font-variant-numeric: tabular-nums; }
.nouveau { margin: 0; color: var(--or); font-weight: 900; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.alerte { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 112px); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 14px; background: var(--or); color: var(--nuit); font-weight: 900; font-size: 15px; text-align: center; box-shadow: 0 4px 0 #B9862C; pointer-events: none; }
.pastille.bonus { flex-direction: column; justify-content: center; align-items: stretch; gap: 4px; height: auto; padding: 8px 14px; background: #0F3F45; color: #7FF0E2; font-size: 16px; }
.jauge { display: block; width: 100%; height: 6px; border-radius: 99px; background: rgba(127, 240, 226, .25); overflow: hidden; }
.jauge i { display: block; height: 100%; width: 100%; background: #3DD6C4; border-radius: 99px; }
.pastille.double { color: #7FF0E2; box-shadow: 0 4px 0 #070B1F, 0 0 0 2px #3DD6C4; }
.pastille.tourbadge { background: #4A3410; color: #FFD56A; }
.pastille.tourbadge .jauge { background: rgba(255, 213, 106, .25); }
.pastille.tourbadge .jauge i { background: #FFC83D; }
.eclat { position: fixed; inset: 0; background: radial-gradient(circle at 50% 45%, #FFF7DA, #FFD56A 55%, #FFB547); pointer-events: none; z-index: 6; animation: eclat 1.1s ease-out forwards; }
@keyframes eclat { 0% { opacity: 0; } 22% { opacity: 1; } 100% { opacity: 0; } }
.pastille.fragile { font-family: var(--texte); font-weight: 900; font-size: 14px; background: #4A2A16; color: var(--or); }
.boutons-hud { display: flex; gap: 10px; }
.bouton-son { width: 50px; height: 50px; border-radius: 14px; border: 2px solid rgba(244, 241, 232, .5); background: rgba(20, 29, 69, .85); display: grid; place-items: center; cursor: pointer; }
.bouton-son:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
.mult-badge { display: inline-flex; align-items: center; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--or); color: var(--nuit); font-family: var(--display); font-size: 13px; line-height: 1.4; }
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 112px); transform: translateX(-50%); width: min(340px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 16px; background: rgba(20, 29, 69, .95); border: 2px solid var(--or); text-align: center; pointer-events: none; z-index: 4; animation: arrivee .35s ease-out; }
.toast b { font-family: var(--display); font-weight: 400; font-size: 17px; color: var(--or); }
.toast span { font-size: 13px; font-weight: 800; color: var(--encre); }
.toast.mult { background: var(--or); }
.toast.mult b, .toast.mult span { color: var(--nuit); }
@keyframes arrivee { from { transform: translate(-50%, -12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.score-fin { display: flex; align-items: baseline; gap: 10px; }
.score-fin span:first-child { font-size: 14px; font-weight: 800; color: var(--brume); text-transform: uppercase; letter-spacing: 2px; }
.score-fin b { font-family: var(--display); font-weight: 400; font-size: 34px; color: var(--or); font-variant-numeric: tabular-nums; }
.fin-missions { margin: 0; padding: 10px 14px; list-style: none; border-radius: 14px; background: rgba(255, 200, 61, .12); border: 1px solid rgba(255, 200, 61, .4); display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; color: var(--or); }
.fin-missions li::before { content: "Réussie : "; color: var(--brume); font-weight: 600; }
.ecran-missions { top: 0; overflow-y: auto; background: rgba(7, 12, 36, .96); padding-top: calc(env(safe-area-inset-top, 0px) + 28px); }
.ecran-missions h1 { color: var(--or); }
.titre-bloc { margin: 8px 0 0; font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--encre); }
.liste-missions { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.mission { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--nuit-2); border: 1px solid var(--trait); }
.mission .coche { flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--trait); }
.mission.faite { border-color: var(--or); }
.mission.faite .coche { background: var(--or); border-color: var(--or); box-shadow: inset 0 0 0 4px var(--nuit-2); }
.mission-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mission-corps p { margin: 0; font-weight: 800; font-size: 15px; line-height: 1.3; }
.mission-corps small { font-size: 12px; font-weight: 800; color: var(--brume); font-variant-numeric: tabular-nums; }
.mission .jauge { height: 8px; background: rgba(244, 241, 232, .12); }
.mission .jauge i { background: var(--orange); }
.mission.faite .jauge i { background: var(--or); }
.serie { margin: 0; font-size: 13px; font-weight: 800; color: var(--brume); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (prefers-reduced-motion: reduce) { .quartier, .pastille { transition: none; } }
.pied { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; font-size: 12px; font-weight: 800; color: var(--brume); }
.pied a, .lien { color: var(--brume); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 6px 0; font: inherit; cursor: pointer; }
.pied .lien-installer { color: var(--or); }
.pied .version { opacity: .6; font-weight: 600; }
.astuce { margin: 0; text-align: center; font-size: 13px; color: var(--or); }
/* pages légales */
.page-legale { min-height: 100%; overflow: auto; touch-action: auto; -webkit-user-select: text; user-select: text; }
.page-legale main { max-width: 640px; margin: 0 auto; padding-top: calc(env(safe-area-inset-top, 0px) + 28px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 14px; line-height: 1.55; }
.page-legale h1 { font-size: clamp(30px, 9vw, 40px); }
.page-legale h2 { margin: 10px 0 0; font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--or); }
.page-legale p { margin: 0; color: var(--brume); }
.page-legale a { color: var(--orange); }
.retour { align-self: flex-start; padding: 0 18px; text-decoration: none; }
