*{box-sizing:border-box}
:root{--yellow:#ffd51f;--ink:#10141a;--red:#e91d2e;--panel:#17202a}
html,body{margin:0;background:#0c1117;color:#fff;font-family:Arial,Helvetica,sans-serif}
body{min-height:100%}.wrap{padding:12px}.game{max-width:980px;margin:auto;position:relative;border:3px solid #0b0e12;background:#10151c;box-shadow:0 12px 40px #0008;overflow:hidden}
.scene{height:min(68vw,610px);min-height:470px;position:relative;overflow:hidden;background-size:cover;background-position:center bottom;touch-action:manipulation;user-select:none}
.scene-0{background-image:url('assets/backgrounds/arenes.jpg')}.scene-1{background-image:url('assets/backgrounds/canal.jpg')}.scene-2{background-image:url('assets/backgrounds/centre-ville.jpg')}.scene-3{background-image:url('assets/backgrounds/eglise.jpg')}
.sceneShade{position:absolute;inset:0;background:linear-gradient(#0000 45%,#0002 63%,#0008 100%);pointer-events:none}
.ground{position:absolute;left:0;right:0;bottom:0;height:118px;background:linear-gradient(#766f65 0 10px,#3a3b3b 10px 100%);border-top:2px solid #161616}
.groundMarks{position:absolute;bottom:40px;left:0;width:220%;height:7px;background:repeating-linear-gradient(90deg,#eee 0 65px,transparent 65px 105px)}
.hud{position:absolute;z-index:20;left:14px;right:14px;top:14px;display:flex;align-items:center;gap:12px;pointer-events:none}
.hudBtn{pointer-events:auto;width:48px;height:48px;border:2px solid #fff;background:#23364a;color:#fff;font-size:25px;font-weight:1000;border-radius:6px}
.distance{background:#1e3041;border:2px solid #fff3;padding:8px 15px;border-radius:6px;font-size:30px;font-weight:1000;line-height:1}
.hearts{margin-left:auto;font-size:31px;letter-spacing:2px;color:#f4293e;text-shadow:0 2px #111}
.levelTag{position:absolute;z-index:20;top:72px;left:14px;background:#162a3d;color:#fff;font-weight:1000;padding:7px 12px;border-radius:4px;letter-spacing:.04em}
.runner{position:absolute;z-index:8;left:14%;bottom:103px;width:auto;height:132px;object-fit:contain;filter:drop-shadow(0 5px 3px #0006);pointer-events:none}
.obstacle{position:absolute;z-index:7;bottom:103px;height:92px;width:auto;object-fit:contain;filter:drop-shadow(0 4px 3px #0006);pointer-events:none}
.collectible{position:absolute;z-index:7;bottom:240px;height:64px;width:64px;object-fit:contain;filter:drop-shadow(0 4px 4px #0005)}
.hidden{display:none!important}.toast{position:absolute;top:100px;left:50%;transform:translateX(-50%);z-index:25;background:var(--yellow);color:#111;padding:9px 14px;font-weight:1000;border:2px solid #111}
.overlay{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:24px;background:#0d141bc9;backdrop-filter:blur(2px)}
.start{background:linear-gradient(90deg,#0b1118e9 0 44%,#0003 70%);align-items:flex-start;justify-content:flex-start;flex-direction:column;padding:44px 42px}
.brand{position:relative;margin-top:10px}.brandAccent{position:absolute;left:-13px;top:0;width:14px;height:125px;background:var(--yellow);transform:rotate(2deg)}
.brand h1{margin:0;font-size:clamp(48px,8vw,88px);line-height:.79;letter-spacing:-.07em;font-weight:1000}.brand p{font-weight:1000;margin:12px 0 0;letter-spacing:.03em}
.heroLine{background:var(--yellow);color:#111;font-size:clamp(32px,5vw,52px);line-height:.9;font-weight:1000;padding:10px 16px;transform:rotate(-2deg);margin:34px 0 20px}
.btn{display:inline-flex;justify-content:center;align-items:center;min-height:50px;padding:12px 22px;border:3px solid #101010;border-radius:5px;text-decoration:none;font-weight:1000;font-size:17px;cursor:pointer}.primary{background:var(--yellow);color:#111;box-shadow:4px 4px #111}.light{background:#fff;color:#111}.slogan{font-weight:900;font-size:16px}.slogan strong{color:var(--yellow)}.micro{font-size:12px;font-weight:bold;opacity:.85}
.compact .card{background:#101720;border:3px solid #fff;padding:35px;text-align:center}.card h2{font-size:45px;margin:0 0 20px}
.gameOver{background:#10151df2}.goCard{max-width:850px;width:100%;display:grid;grid-template-columns:.8fr 1.2fr;background:#111820;border:3px solid #fff3;overflow:hidden}.mayorArt{width:100%;height:100%;object-fit:cover;min-height:390px}.goCopy{text-align:center;padding:22px}.goCopy h2{color:#ed2635;font-size:clamp(48px,8vw,82px);margin:0;font-weight:1000;letter-spacing:-.05em}.encounter{font-size:21px;font-weight:1000}.bigScore{font-size:48px;font-weight:1000;margin:6px}.goActions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.small{font-size:14px;margin-top:20px}
.victory{background:linear-gradient(#1b8cdaee,#102238ee)}.victoryCard{text-align:center;max-width:560px}.victoryTitle{font-size:clamp(70px,12vw,120px);color:var(--yellow);font-weight:1000;line-height:.9;text-shadow:4px 5px #111;transform:rotate(-2deg)}.victoryCard p{font-weight:900}.victoryScore{font-size:68px;font-weight:1000}.yellowStrip{display:inline-block;background:var(--yellow);color:#111;padding:8px 14px;font-weight:1000;transform:rotate(-2deg)}.victoryText{font-size:20px}.victoryCard .btn{margin:7px}
.controlsNote{text-align:center;padding:10px;font-size:13px;color:#d5d9de;background:#121923}
@media(max-width:650px){.wrap{padding:0}.game{border:0}.scene{height:650px;min-height:580px}.start{padding:90px 22px 24px;background:#0b1118d9}.brand h1{font-size:58px}.heroLine{font-size:37px;margin-top:28px}.runner{height:108px;left:8%;bottom:100px}.obstacle{height:78px;bottom:100px}.hud{top:10px;left:9px;right:9px}.levelTag{top:67px;left:9px}.distance{font-size:24px}.hearts{font-size:24px}.goCard{grid-template-columns:1fr}.mayorArt{height:170px;min-height:0;object-position:center 35%}.gameOver{padding:10px;align-items:flex-start;overflow:auto}.goCopy h2{font-size:48px}.goCopy{padding:12px}.encounter{font-size:16px}.bigScore{font-size:40px}.goActions{display:grid}.goActions .btn{width:100%}}

.jumpBtn{
  position:absolute;z-index:22;right:18px;bottom:18px;
  width:112px;height:58px;border:3px solid #111;border-radius:10px;
  background:var(--yellow);color:#111;font-weight:1000;font-size:19px;
  box-shadow:4px 4px #111;cursor:pointer;touch-action:manipulation
}
.jumpBtn:active{transform:translate(2px,2px);box-shadow:2px 2px #111}
@media(max-width:650px){
  .jumpBtn{right:12px;bottom:14px;width:104px;height:56px;font-size:18px}
}

/* V3 — accueil */
.start{background:
 linear-gradient(90deg,#071019ed 0 42%,#0710199c 62%,#07101955 100%),
 url('assets/backgrounds/arenes.jpg') center/cover no-repeat;
 align-items:center;justify-content:flex-start;padding:30px 44px}
.startHero{position:relative;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}
.welcomeRunner{position:absolute;right:4%;bottom:5%;height:min(55%,390px);max-width:48%;object-fit:contain;filter:drop-shadow(0 10px 7px #0008)}
.playBig{font-size:25px;min-width:280px;min-height:65px}
.startLinks{display:flex;gap:8px;margin-top:18px;z-index:2;flex-wrap:wrap}
.startLinks button{border:1px solid #ffffff33;background:#101923dd;color:#fff;padding:10px 12px;font-weight:900;cursor:pointer;border-radius:4px}
.tutorial{background:#0b131bea}.tutorialCard{width:min(500px,100%);text-align:center;background:#101a24;border:3px solid #ffffff33;padding:30px}
.tutorialCard .kicker{display:inline-block;background:var(--yellow);color:#111;padding:7px 12px;font-weight:1000;transform:rotate(-2deg)}
.tutorialCard h2{font-size:42px;margin:20px 0}.tutorialRows{text-align:left;max-width:330px;margin:0 auto 25px;font-size:18px}
.tutorialRows p{padding:10px 0;border-bottom:1px solid #ffffff20}
.infoCard{position:relative;max-width:500px}.infoCard h2{font-size:35px}.infoCard p{line-height:1.5}.closeInfo{position:absolute;right:8px;top:8px;border:0;background:transparent;color:#fff;font-size:34px;cursor:pointer}
@media(max-width:650px){
 .start{padding:76px 20px 20px;background:linear-gradient(#071019a5,#071019e8),url('assets/backgrounds/arenes.jpg') center/cover no-repeat}
 .startHero{justify-content:flex-start}
 .welcomeRunner{right:-8%;bottom:4%;height:37%;max-width:60%;opacity:.95}
 .playBig{min-width:230px}
 .startLinks{max-width:260px}
 .startLinks button{font-size:11px}
}

/* V4 — finition gameplay */
.scene{transition:background-image .35s ease}
.runner{will-change:bottom,transform;transform-origin:center bottom}
.runner.running{animation:runnerBob .24s ease-in-out infinite alternate}
@keyframes runnerBob{from{transform:translateY(0) rotate(-1deg)}to{transform:translateY(-3px) rotate(1deg)}}
.obstacle{will-change:left}
.levelTag{transition:transform .25s,opacity .25s}
.levelTag.levelPulse{transform:scale(1.12);background:var(--yellow);color:#111}
.impactFlash{position:absolute;inset:0;z-index:29;display:flex;align-items:center;justify-content:center;
 background:#e51e32e8;color:#fff;font-size:clamp(70px,15vw,150px);font-weight:1000;letter-spacing:-.06em;
 text-shadow:5px 5px #111;pointer-events:none}
.impactFlash.hidden{display:none}
.game.shake{animation:shake .22s linear}
@keyframes shake{0%{transform:translate(0)}25%{transform:translate(-7px,3px)}50%{transform:translate(6px,-2px)}75%{transform:translate(-4px,1px)}100%{transform:translate(0)}}
.jumpBtn{transition:opacity .2s}
@media(min-width:651px){.jumpBtn{opacity:.2}.jumpBtn:hover,.jumpBtn:focus-visible{opacity:1}}
@media(prefers-reduced-motion:reduce){.runner.running,.game.shake{animation:none!important}.scene{transition:none}}

/* V5.1 — accueil et Game Over premium */
.premiumStart{
  overflow:hidden;padding:0!important;justify-content:flex-start!important;
  background:url('assets/backgrounds/arenes.jpg') center/cover no-repeat!important
}
.startShade{position:absolute;inset:0;background:linear-gradient(90deg,#07111cf5 0%,#07111cdd 38%,#07111c78 63%,#07111c25 100%)}
.premiumStartContent{position:relative;z-index:3;width:min(620px,58%);height:100%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:42px 5.5%}
.premiumBrand h1{font-size:clamp(52px,6.2vw,92px)!important;line-height:.82!important;margin:0 0 14px!important;letter-spacing:-.065em}
.premiumBrand p{font-size:clamp(11px,1.2vw,17px);letter-spacing:.16em}
.startChallenge{font-size:clamp(30px,4.2vw,62px);line-height:.88;font-weight:1000;margin:22px 0 20px;letter-spacing:-.055em}
.premiumPlay{min-width:300px!important;font-size:27px!important;box-shadow:7px 7px #000}
.premiumSlogan{font-size:clamp(14px,1.5vw,20px);line-height:1.25;margin:22px 0 8px}
.premiumSlogan strong{color:var(--yellow)}
.premiumRunner{z-index:2!important;right:3%!important;bottom:-2%!important;height:min(72%,560px)!important;max-width:50%!important;filter:drop-shadow(0 18px 14px #0008)}
.premiumLinks{margin-top:12px!important}
.premiumLinks button{background:#091521d9!important}

.premiumGameOver{padding:0!important;background:#050b12!important;overflow:hidden;display:flex!important;align-items:stretch!important}
.premiumGameOver.hidden{display:none!important}
.goBackdrop{position:absolute;inset:0;background:radial-gradient(circle at 24% 45%,#253444 0,#0b141e 40%,#05090e 75%);opacity:.95}
.goPortraitPane{position:relative;z-index:2;width:48%;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.premiumMayor{width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;object-position:center bottom!important;filter:drop-shadow(12px 0 24px #000a)}
.goContent{position:relative;z-index:3;width:52%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:35px 6% 35px 2%}
.goEyebrow{display:inline-block;background:#fff;color:#111;font-weight:1000;padding:8px 13px;transform:rotate(-2deg);margin-bottom:10px}
.goContent h2{font-size:clamp(58px,8vw,120px)!important;line-height:.8!important;margin:8px 0!important;color:#ed2839!important;transform:rotate(-2deg);text-shadow:5px 5px #000}
.goScore{font-size:clamp(55px,7vw,100px);font-weight:1000;line-height:1;margin-top:20px}
.goScore small{font-size:.42em}
.goPhrase{font-size:clamp(16px,1.7vw,23px);margin:8px 0 18px;color:#dce5ec}
.goActions{width:min(440px,100%);display:grid;gap:9px}
.goActions .btn{width:100%;box-sizing:border-box;text-align:center}
.goReplay{font-size:22px!important}
.goReport{background:var(--yellow)!important;color:#111!important;border-color:#111!important}
.goShare{font-size:14px!important}
.goSignature{font-size:13px;line-height:1.3;margin-top:18px;letter-spacing:.04em}
.goSignature strong{color:var(--yellow)}

@media(max-width:650px){
 .startShade{background:linear-gradient(#07111c9b 0,#07111ce9 65%,#07111cf8 100%)}
 .premiumStartContent{width:100%;height:100%;box-sizing:border-box;justify-content:flex-start;padding:68px 20px 20px}
 .premiumBrand h1{font-size:57px!important}.startChallenge{font-size:34px;margin:16px 0}
 .premiumPlay{min-width:225px!important;font-size:22px!important}
 .premiumSlogan{font-size:13px}.premiumRunner{height:36%!important;right:-12%!important;bottom:1%!important;max-width:62%!important}
 .premiumGameOver{flex-direction:column!important}
 .goPortraitPane{position:absolute;width:100%;height:52%;left:0;top:0;opacity:.5}
 .premiumMayor{object-position:left bottom!important}
 .goContent{width:100%;height:100%;box-sizing:border-box;padding:62px 20px 18px;justify-content:flex-end;background:linear-gradient(transparent 5%,#07111ca5 38%,#050b12 61%)}
 .goContent h2{font-size:61px!important}.goScore{font-size:60px}.goActions{width:100%}
}

/* V5.2 — correctif personnage écran d'accueil */
.premiumStart{overflow:hidden}
.premiumRunner{
  position:absolute!important;
  right:2.5%!important;
  bottom:3%!important;
  height:72%!important;
  width:auto!important;
  max-width:46%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  transform:none!important;
}
@media(max-width:900px){
  .premiumStartContent{width:56%}
  .premiumRunner{
    right:0!important;
    bottom:3%!important;
    height:62%!important;
    max-width:48%!important;
  }
}
@media(max-width:650px){
  .premiumStartContent{width:100%!important;padding-bottom:38%!important}
  .premiumRunner{
    right:0!important;
    left:auto!important;
    bottom:1%!important;
    height:34%!important;
    max-width:48%!important;
    object-fit:contain!important;
    object-position:right bottom!important;
  }
}
@media(max-width:420px){
  .premiumRunner{height:31%!important;max-width:45%!important}
  .premiumStartContent{padding-bottom:35%!important}
}

/* V5.3 — accueil final intégré */
.finalSplash{
  background:#07111c url('assets/ui/accueil-premium.png') center center/contain no-repeat!important;
  padding:0!important;overflow:hidden!important
}
.finalSplash .splashActions{position:absolute;inset:0;z-index:5}
.splashPlay{
  position:absolute;left:52.2%;top:50.4%;width:32.8%;height:9.8%;
  border:0;border-radius:18px;background:transparent;color:transparent;
  cursor:pointer;touch-action:manipulation
}
.splashPlay:focus-visible{outline:4px solid #fff;outline-offset:3px}
.splashMini{position:absolute;border:0;background:transparent;color:transparent;cursor:pointer;touch-action:manipulation}
.rulesHotspot{left:64%;top:2.5%;width:13%;height:6%}
.aboutHotspot{left:78%;top:2.5%;width:14%;height:6%}
.soundHotspot{right:1%;bottom:1%;width:5%;height:6%}
@media(max-width:650px){
  .finalSplash{background-size:cover!important;background-position:center center!important}
  .splashPlay{left:51%;top:50%;width:37%;height:10%}
}

/* V7 Challenge — obstacles spéciaux */
.obstacle.mayorObstacle{
  width:92px!important;height:128px!important;object-fit:cover!important;
  object-position:50% 20%!important;border-radius:12px 12px 0 0;
  border:3px solid rgba(255,255,255,.9);box-shadow:0 8px 18px rgba(0,0,0,.35)
}
.obstacle.toroObstacle{width:132px!important;height:auto!important}
.obstacle.flamantObstacle{width:90px!important;height:auto!important}
.obstacle.poopObstacle{width:62px!important;height:auto!important}

/* V7.1 — maire pixelisée pendant la partie */
.obstacle.mayorObstacle{
  width:112px!important;height:132px!important;
  object-fit:cover!important;object-position:center!important;
  image-rendering:pixelated!important;
  border:0!important;border-radius:0!important;
  box-shadow:0 7px 16px rgba(0,0,0,.32)!important;
}

/* V8 — gameplay pixel-art final */
#toast.mayorAlert{
  display:block!important;
  position:absolute!important;
  left:50%!important;top:17%!important;
  transform:translateX(-50%)!important;
  max-width:min(620px,88vw)!important;
  padding:18px 28px!important;
  background:#fff!important;color:#111!important;
  border:6px solid #e31b23!important;border-radius:22px!important;
  font-size:clamp(24px,5vw,52px)!important;
  font-weight:1000!important;line-height:1!important;
  text-align:center!important;text-transform:none!important;
  box-shadow:0 8px 0 #111,0 16px 30px rgba(0,0,0,.3)!important;
  z-index:100!important;
}
#toast.mayorAlert strong{color:#d71920}

/* V8.2 — événement spécial Maire */
#toast.mayorAlert{
  position:absolute!important;
  left:50%!important;
  top:12%!important;
  transform:translateX(-50%) scale(1)!important;
  width:min(680px,90vw)!important;
  padding:22px 30px!important;
  background:#fff!important;
  color:#111!important;
  border:7px solid #e21b23!important;
  border-radius:24px!important;
  font-size:clamp(28px,6vw,58px)!important;
  font-weight:1000!important;
  line-height:.98!important;
  text-align:center!important;
  box-shadow:0 8px 0 #111,0 18px 35px rgba(0,0,0,.34)!important;
  z-index:150!important;
  animation:mayorPop .22s cubic-bezier(.2,1.5,.4,1) both!important;
}
#toast.mayorAlert strong{
  display:block!important;
  color:#d71920!important;
  font-size:1.13em!important;
  text-shadow:2px 2px 0 #111!important;
}
#toast.mayorAlert:after{
  content:""!important;
  position:absolute!important;
  left:58%!important;
  bottom:-30px!important;
  border-width:30px 18px 0 5px!important;
  border-style:solid!important;
  border-color:#e21b23 transparent transparent transparent!important;
}
@keyframes mayorPop{
  from{transform:translateX(-50%) scale(.55);opacity:0}
  to{transform:translateX(-50%) scale(1);opacity:1}
}
.obstacle.mayorObstacle{
  width:124px!important;
  height:142px!important;
  z-index:35!important;
  filter:drop-shadow(0 8px 5px rgba(0,0,0,.3));
}

/* V8.3 — vrai responsive mobile */
html,body{width:100%;max-width:100%;overflow-x:hidden}
.game,.scene{max-width:100%}

@media(max-width:650px){
  body{background:#07111c}
  .wrap{width:100%;padding:0!important;overflow-x:hidden}
  .game{width:100%;max-width:100%;margin:0;border:0!important;box-shadow:none!important;overflow:hidden}

  /* Le gameplay prend la largeur exacte du téléphone. */
  .scene{
    width:100%;
    height:min(76svh,680px);
    min-height:560px;
    max-height:720px;
    overflow:hidden;
    background-position:center bottom;
  }

  /* Accueil : on montre l'intégralité du visuel au lieu de le rogner avec cover. */
  .finalSplash{
    background-color:#07111c!important;
    background-image:url('assets/ui/accueil-premium-mobile.jpg')!important;
    background-size:contain!important;
    background-repeat:no-repeat!important;
    background-position:center center!important;
  }

  /* Hotspots repositionnés sur le visuel portrait complet. */
  .splashPlay{
    left:55.5%!important;
    top:50.2%!important;
    width:38%!important;
    height:9.5%!important;
  }
  .rulesHotspot{left:58%!important;top:2%!important;width:16%!important;height:7%!important}
  .aboutHotspot{left:75%!important;top:2%!important;width:18%!important;height:7%!important}
  .soundHotspot{right:2%!important;bottom:2%!important;width:9%!important;height:7%!important}

  /* HUD et commandes : rien ne doit dépasser. */
  .hud{left:8px!important;right:8px!important;gap:7px!important}
  .hudBtn{width:42px!important;height:42px!important;font-size:21px!important}
  .distance{font-size:21px!important;padding:7px 10px!important}
  .levelTag{font-size:12px!important;max-width:58vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .runner{left:7%!important;height:104px!important}
  .obstacle{max-width:34vw}
  .obstacle.mayorObstacle{width:102px!important;height:126px!important}
  .obstacle.toroObstacle{width:112px!important}
  .obstacle.flamantObstacle{width:76px!important}
  .obstacle.poopObstacle{width:52px!important}

  .jumpBtn{
    right:10px!important;
    bottom:10px!important;
    width:98px!important;
    height:52px!important;
    font-size:16px!important;
  }

  .controlsNote{
    width:100%;
    max-width:100%;
    padding:8px 108px 8px 10px!important;
    font-size:11px!important;
    line-height:1.25;
    white-space:normal!important;
    overflow-wrap:anywhere;
    min-height:48px;
  }

  /* La bulle de la maire reste entièrement dans l'écran. */
  #toast.mayorAlert{
    top:13%!important;
    width:88vw!important;
    max-width:88vw!important;
    padding:16px 18px!important;
    border-width:5px!important;
    font-size:clamp(25px,8vw,40px)!important;
    box-shadow:0 6px 0 #111,0 12px 24px rgba(0,0,0,.32)!important;
  }

  /* Modales adaptées au viewport mobile. */
  .overlay{padding:14px}
  .tutorialCard{max-height:92%;overflow:auto;padding:22px 18px}
  .tutorialCard h2{font-size:34px}
  .premiumGameOver{min-height:100%}
  .goContent{padding-left:16px!important;padding-right:16px!important}
  .goActions .btn{font-size:14px!important;min-height:46px}
}

@media(max-width:390px){
  .scene{height:min(74svh,640px);min-height:535px}
  .splashPlay{left:54%!important;width:40%!important}
  .controlsNote{font-size:10px!important}
  .runner{height:98px!important}
}

/* V8.4 — Game Over mobile final */
@media(max-width:650px){
  .premiumGameOver{
    width:100%!important;
    max-width:100%!important;
    min-height:100%!important;
    display:flex!important;
    flex-direction:column!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    background:#07111c!important;
  }

  .goVisual{
    width:100%!important;
    max-width:100%!important;
    flex:0 0 auto!important;
    min-height:0!important;
    height:auto!important;
    aspect-ratio:4/5!important;
    overflow:hidden!important;
    position:relative!important;
  }

  .goVisual img,
  .goVisual .goPortrait{
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    object-fit:cover!important;
    object-position:center center!important;
    display:block!important;
  }

  .goContent{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    padding:18px 16px 24px!important;
    flex:0 0 auto!important;
  }

  .goReaction{
    font-size:18px!important;
    margin-bottom:8px!important;
  }

  .goTitle{
    font-size:clamp(52px,17vw,76px)!important;
    line-height:.82!important;
    letter-spacing:-3px!important;
    margin:0 0 14px!important;
  }

  .goScore{
    font-size:clamp(54px,17vw,78px)!important;
    line-height:1!important;
    margin:0 0 8px!important;
  }

  .goMessage{
    font-size:18px!important;
    line-height:1.25!important;
    margin:0 0 18px!important;
  }

  .goActions{
    width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    gap:10px!important;
  }

  .goActions .btn{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    min-height:58px!important;
    margin:0!important;
    font-size:16px!important;
  }

  .goSignature{
    font-size:15px!important;
    line-height:1.3!important;
    margin-top:20px!important;
  }

  /* Pendant le Game Over, les commandes de jeu n'ont plus lieu d'être. */
  .game:has(.premiumGameOver:not(.hidden)) .jumpBtn,
  .game:has(.premiumGameOver:not(.hidden)) .controlsNote{
    display:none!important;
  }
}

@media(max-width:650px){
  body.gameOverActive .jumpBtn,
  body.gameOverActive .controlsNote{display:none!important}
}

.obstacle.mayorObstacle{object-fit:contain!important;background:transparent!important;box-shadow:none!important;border:0!important;image-rendering:pixelated!important;filter:drop-shadow(0 8px 5px rgba(0,0,0,.38))!important}
@media(max-width:650px){
 #gameOver.premiumGameOver{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;padding:0!important;margin:0!important;display:block!important;overflow-y:auto!important;overflow-x:hidden!important;background:#050b12!important;z-index:120!important}
 #gameOver.premiumGameOver.hidden{display:none!important}
 #gameOver .goBackdrop{display:none!important}
 #gameOver .goPortraitPane{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;aspect-ratio:16/10!important;display:block!important;opacity:1!important;overflow:hidden!important;background:#050b12!important}
 #gameOver .premiumMayor{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;display:block!important;object-fit:cover!important;object-position:center 35%!important;filter:none!important}
 #gameOver .goContent{position:relative!important;width:100%!important;height:auto!important;box-sizing:border-box!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;padding:18px 18px calc(28px + env(safe-area-inset-bottom))!important;margin:0!important;background:#050b12!important}
 #gameOver .goEyebrow{align-self:flex-start!important;font-size:17px!important;padding:7px 12px!important;margin:-42px 0 10px 2px!important;z-index:3!important}
 #gameOver .goContent h2{font-size:clamp(50px,15.5vw,68px)!important;line-height:.84!important;letter-spacing:-2px!important;margin:0 0 15px!important;transform:none!important;text-shadow:4px 4px #000!important}
 #gameOver .goScore{font-size:clamp(58px,18vw,78px)!important;line-height:.95!important;margin:0 0 8px!important}
 #gameOver .goPhrase{font-size:17px!important;line-height:1.25!important;margin:0 0 18px!important}
 #gameOver .goActions{width:100%!important;max-width:none!important;display:flex!important;flex-direction:column!important;gap:10px!important;margin:0!important}
 #gameOver .goActions .btn{width:100%!important;min-height:56px!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:12px 10px!important;margin:0!important;border-radius:4px!important;font-size:15px!important;line-height:1.1!important;text-align:center!important}
 #gameOver .goReplay{font-size:18px!important}
 #gameOver .goSignature{width:100%!important;box-sizing:border-box!important;margin:20px 0 0!important;font-size:14px!important;line-height:1.35!important}
 body.gameOverActive #jumpBtn,body.gameOverActive .controlsNote{display:none!important}
 .obstacle.mayorObstacle{width:112px!important;height:145px!important}
}

/* V8.6 — maire = silhouette seule pendant le gameplay */
.obstacle.mayorObstacle{
  width:118px!important;
  height:160px!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 8px 5px rgba(0,0,0,.34))!important;
  image-rendering:pixelated!important;
}
@media(max-width:650px){
  .obstacle.mayorObstacle{
    width:108px!important;
    height:148px!important;
  }
}

/* V8.7 — bulle dédiée à l'apparition de la maire */
#mayorSpeechBubble{
  position:absolute;
  top:10%;
  left:50%;
  transform:translateX(-50%) scale(.55);
  width:min(650px,88%);
  box-sizing:border-box;
  padding:18px 24px 20px;
  background:#fff;
  color:#111;
  border:6px solid #111;
  border-radius:22px;
  text-align:center;
  font-family:Arial,Helvetica,sans-serif;
  font-size:clamp(27px,5vw,48px);
  font-weight:900;
  font-style:italic;
  line-height:.95;
  opacity:0;
  pointer-events:none;
  z-index:999;
  box-shadow:0 8px 0 rgba(0,0,0,.28);
}
#mayorSpeechBubble span{display:inline}
#mayorSpeechBubble strong{
  display:inline;
  margin-left:.15em;
  color:#ed1c24;
  font-size:1.08em;
  text-shadow:2px 2px 0 #111;
}
#mayorSpeechBubble:after{
  content:"";
  position:absolute;
  right:24%;
  bottom:-32px;
  width:0;height:0;
  border-left:14px solid transparent;
  border-right:5px solid transparent;
  border-top:32px solid #111;
  transform:rotate(-8deg);
}
#mayorSpeechBubble.show{
  animation:mayorSpeechPop 2.6s ease both;
}
@keyframes mayorSpeechPop{
  0%{opacity:0;transform:translateX(-50%) scale(.55)}
  8%{opacity:1;transform:translateX(-50%) scale(1.08)}
  14%,84%{opacity:1;transform:translateX(-50%) scale(1)}
  100%{opacity:0;transform:translateX(-50%) scale(.96)}
}
@media(max-width:650px){
  #mayorSpeechBubble{
    top:9%;
    width:90%;
    padding:15px 12px 17px;
    border-width:5px;
    border-radius:18px;
    font-size:clamp(25px,8vw,39px);
  }
  #mayorSpeechBubble span,
  #mayorSpeechBubble strong{display:block;margin-left:0}
}
