:root{--green:#0b3d2e;--lime:#b6ff5c;--dark:#07130f;--card:rgba(7,19,15,.9);--white:#fff}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:#08130f;color:var(--white);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;touch-action:none}#game{position:fixed;inset:0;width:100vw;height:100vh;background:#10231b;transform:translateZ(0)}#ui{position:fixed;inset:0;pointer-events:none}.panel{pointer-events:auto;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(92vw,560px);max-height:92vh;overflow:auto;background:linear-gradient(145deg,rgba(8,34,25,.96),rgba(4,12,10,.96));border:1px solid rgba(182,255,92,.35);border-radius:22px;padding:18px;box-shadow:0 22px 70px #000}.hidden{display:none!important}.brand{display:flex;gap:14px;align-items:center}.logo{width:72px;height:72px;border-radius:18px;background:linear-gradient(135deg,#b6ff5c,#0b7a4a);color:#082014;font-weight:1000;display:grid;place-items:center;font-size:24px;box-shadow:0 12px 30px #0008}h1{margin:.2rem 0;font-size:26px}p{line-height:1.35}.rules{background:#ffffff10;border:1px solid #ffffff20;border-radius:16px;padding:12px;margin:14px 0}.mini{margin-top:8px;font-size:13px;color:#d8ffd0}input,button{width:100%;border:0;border-radius:14px;padding:14px 16px;margin-top:10px;font-weight:800;font-size:16px}input{background:#fff;color:#111}.primary{background:linear-gradient(135deg,#b6ff5c,#36d47e);color:#082014}button{background:#1a3d2f;color:white;border:1px solid #ffffff20}#hud{pointer-events:auto;position:absolute;left:10px;right:10px;top:10px;display:flex;gap:8px;align-items:center}#hud div,#pauseBtn{background:var(--card);border:1px solid #ffffff20;border-radius:14px;padding:8px 12px;min-width:72px;text-align:center;box-shadow:0 8px 24px #0007}#hud small{display:block;color:#bcd6c6;font-size:11px}#hud b{font-size:18px}#pauseBtn{width:auto;margin:0;margin-left:auto}#mission{pointer-events:none;position:absolute;top:74px;left:10px;right:10px;background:rgba(8,20,15,.86);border:1px solid rgba(182,255,92,.35);border-radius:16px;padding:10px 12px;text-align:center;box-shadow:0 10px 30px #0008}.mission b{display:block;color:#b6ff5c}.mission span{font-size:12px;color:#d8f2df}#tools{pointer-events:auto;position:absolute;left:8px;right:8px;bottom:8px;display:grid;grid-template-columns:repeat(4,1fr);gap:7px}#tools button{margin:0;padding:10px 6px;font-size:11px;min-height:48px;border-radius:12px;background:rgba(6,23,18,.94)}#tools button.sel{background:linear-gradient(135deg,#b6ff5c,#35d37c);color:#082014;border-color:#dfff8a}#toast{position:absolute;left:50%;bottom:78px;transform:translateX(-50%);background:#000d;border:1px solid #ffffff40;border-radius:999px;padding:10px 14px;font-weight:800;box-shadow:0 10px 30px #000;white-space:nowrap}.active{display:block}@media (min-width:780px){#tools{left:50%;transform:translateX(-50%);width:760px;grid-template-columns:repeat(7,1fr)}#tools button{font-size:12px}.mission{left:50%;right:auto;transform:translateX(-50%);width:720px}}

#rotateHint{position:fixed;inset:0;z-index:50;background:linear-gradient(145deg,#07130f,#0b3d2e);display:grid;place-items:center;text-align:center;padding:24px;color:#fff}#rotateHint div{font-size:64px;font-weight:1000;animation:spinphone 1.5s ease-in-out infinite alternate}#rotateHint b{font-size:24px;margin-top:-12vh;color:#b6ff5c}#rotateHint span{max-width:360px;line-height:1.35;color:#d8ffd0}#rotateHint button{pointer-events:auto;max-width:260px;background:linear-gradient(135deg,#b6ff5c,#36d47e);color:#082014}@keyframes spinphone{from{transform:rotate(0deg)}to{transform:rotate(90deg)}}body.mobile #hud{top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}body.mobile #tools{bottom:max(8px,env(safe-area-inset-bottom));grid-template-columns:repeat(7,1fr)}body.mobile #tools button{min-height:54px;font-size:10px;padding:8px 4px}body.mobile .panel{width:min(94vw,720px)}@media (orientation:portrait) and (max-width:900px){body.mobile #rotateHint{display:grid!important}body.mobile #ui,body.mobile #game{filter:blur(2px)}}@media (orientation:landscape){#rotateHint{display:none!important}}

.top3{pointer-events:none;position:absolute;right:10px;top:146px;width:230px;background:rgba(8,20,15,.86);border:1px solid rgba(255,215,90,.45);border-radius:16px;padding:10px 12px;box-shadow:0 10px 30px #0008}
.top3 b{display:block;color:#ffd95a;margin-bottom:6px;font-size:13px}.top3 ol{margin:0;padding-left:20px;font-size:12px;line-height:1.35}.top3 li{margin:2px 0}.top3 small{color:#cde6d6}
body.mobile .top3{top:74px;right:max(8px,env(safe-area-inset-right));width:210px;max-height:104px;overflow:hidden}.panel .top3{position:static;width:auto;margin:12px 0}.scoreHelp{font-size:12px;color:#d8ffd0;margin-top:8px}
@media (max-width:760px){.top3{display:none}.panel .top3{display:block}}

/* Correctif mobile orientation + lisibilite jeu */
html,body{width:100%;height:100%;height:100dvh;overflow:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}#game{width:100vw;height:100vh;height:100dvh}body.mobile{position:fixed;inset:0;overscroll-behavior:none}body.mobile a[href="index.php"],body.mobile a[href^="tel:"]{font-size:clamp(11px,2.5vw,14px)!important;padding:clamp(6px,1.4vw,9px) clamp(9px,2vw,12px)!important;min-height:38px;display:inline-flex;align-items:center}body.mobile .panel{font-size:clamp(13px,2.2vw,16px);padding:clamp(12px,2.2vw,20px);border-radius:18px;max-height:calc(100dvh - 20px)}body.mobile h1{font-size:clamp(22px,4.4vw,34px);line-height:1.05}body.mobile h2{font-size:clamp(20px,3.6vw,28px)}body.mobile p,body.mobile li{font-size:clamp(13px,2.3vw,16px);line-height:1.35}body.mobile input,body.mobile button{font-size:clamp(13px,2.2vw,16px);padding:clamp(9px,1.8vw,13px) clamp(10px,2vw,16px);min-height:42px}body.mobile #hud{gap:6px;top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}body.mobile #hud div,body.mobile #pauseBtn{padding:6px 9px;min-width:58px;border-radius:12px}body.mobile #hud b{font-size:clamp(15px,2.8vw,20px)}body.mobile #hud small{font-size:clamp(9px,1.8vw,11px)}body.mobile #mission{top:58px;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));padding:7px 10px}body.mobile #mission b{font-size:clamp(12px,2.4vw,15px)}body.mobile #mission span{font-size:clamp(10px,2vw,13px)}body.mobile #tools{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}body.mobile #tools button{min-height:44px;font-size:clamp(9px,1.8vw,12px);line-height:1.1;padding:6px 4px;white-space:normal}body.mobile #toast{bottom:64px;font-size:clamp(12px,2.2vw,15px);max-width:92vw;white-space:normal;text-align:center}.orientationBadge{display:none}
@media (orientation:portrait) and (max-width:900px){body.mobile #rotateHint{display:grid!important}body.mobile #rotateHint b{font-size:clamp(20px,6vw,28px)}body.mobile #rotateHint span{font-size:clamp(15px,4vw,18px)}body.mobile #ui,body.mobile #game{filter:blur(1.5px)}}
@media (orientation:landscape) and (max-height:520px){body.mobile .brand{gap:10px}body.mobile .logo{width:54px;height:54px;font-size:18px;border-radius:14px}body.mobile .rules{margin:8px 0;padding:9px}body.mobile #start.panel{width:min(78vw,760px)}body.mobile #tools button{min-height:40px}body.mobile .top3{display:none!important}}
@media (orientation:landscape) and (max-height:430px){body.mobile #mission{display:none!important}body.mobile #hud div:nth-child(3){display:none}body.mobile .panel{max-height:96dvh;overflow:auto}body.mobile #start.panel{width:min(84vw,820px)}}

/* Nouvelle version : intro photo unique + maison toujours visible */
.siteBack,.callBtn{position:fixed;z-index:34;top:max(10px,env(safe-area-inset-top));padding:8px 12px;border-radius:999px;text-decoration:none;font:900 13px system-ui;box-shadow:0 8px 22px rgba(0,0,0,.25)}.siteBack{left:max(10px,env(safe-area-inset-left));background:rgba(255,255,255,.94);color:#10231b}.callBtn{right:max(10px,env(safe-area-inset-right));background:#ff7a00;color:white}.introOnce{position:fixed;inset:0;z-index:80;background:linear-gradient(145deg,rgba(3,10,17,.96),rgba(6,24,28,.96));display:grid;place-items:center;padding:clamp(10px,2vw,24px);overflow:auto}.introCard{position:relative;width:min(1100px,96vw);min-height:min(620px,92dvh);display:grid;grid-template-columns:1.05fr .95fr;border:1px solid rgba(255,122,0,.45);border-radius:26px;overflow:hidden;background:#07131f;box-shadow:0 28px 90px rgba(0,0,0,.65)}.introPhoto{min-height:360px;background:#111;position:relative}.introPhoto:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(7,19,31,.05),rgba(7,19,31,.88))}.introPhoto img{width:100%;height:100%;object-fit:cover;display:block}.introText{padding:clamp(20px,4vw,52px);display:flex;flex-direction:column;justify-content:center;gap:14px}.introLogo{width:min(230px,48vw);height:auto;object-fit:contain;align-self:flex-start}.introText h1{font-size:clamp(32px,5.5vw,66px);line-height:.95;margin:0;text-transform:uppercase;color:#fff}.introText p{font-size:clamp(17px,2.2vw,25px);line-height:1.25;margin:0;color:#fff}.introGift{background:rgba(255,122,0,.14);border:1px solid rgba(255,122,0,.45);border-radius:18px;padding:14px}.introGift b{color:#ff9e2f}.introText small{color:#aab9c4;text-align:center}.introClose{position:absolute;right:14px;top:14px;z-index:2;width:44px;height:44px;margin:0;padding:0;border-radius:999px;background:rgba(0,0,0,.45);border:1px solid rgba(255,255,255,.3);font-size:30px;line-height:1}.centerBtn{pointer-events:auto;position:fixed;right:max(10px,env(safe-area-inset-right));bottom:max(72px,calc(env(safe-area-inset-bottom) + 72px));z-index:32;width:auto;min-height:42px;margin:0;background:rgba(255,122,0,.95);color:#fff;border:1px solid rgba(255,255,255,.25)}
body.mobile .introCard{grid-template-columns:1fr;min-height:auto;width:min(92vw,760px)}body.mobile .introPhoto{min-height:30dvh;max-height:44dvh}.mobile .introPhoto:after{background:linear-gradient(0deg,rgba(7,19,31,.80),rgba(7,19,31,.05))}.mobile .introText{padding:18px;gap:10px}.mobile .introLogo{width:160px}.mobile .introText h1{font-size:clamp(26px,7vw,42px)}.mobile .introText p{font-size:clamp(15px,4vw,20px)}
body.mobile #hud{right:110px}body.mobile #tools{grid-template-columns:repeat(7,minmax(0,1fr));bottom:max(6px,env(safe-area-inset-bottom))}body.mobile #tools button{min-height:48px;font-size:clamp(8px,1.9vw,11px)}body.mobile #mission{top:62px;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));padding:7px 10px}body.mobile #mission b{font-size:clamp(12px,2.5vw,15px)}body.mobile #mission span{font-size:clamp(10px,2vw,12px)}body.mobile .siteBack,body.mobile .callBtn{display:none}.top3{max-width:220px}.panel{z-index:40}.hidden{display:none!important}@media (orientation:landscape) and (max-height:520px){body.mobile #tools button{min-height:38px;padding:5px 3px}body.mobile #mission{display:none!important}.centerBtn{bottom:max(54px,calc(env(safe-area-inset-bottom) + 54px));font-size:11px;padding:7px 9px;min-height:34px}.top3{display:none!important}}@media (orientation:portrait) and (max-width:900px){body.mobile #rotateHint{display:grid!important}.introOnce~#rotateHint{z-index:60}}


/* === CORRECTION FINALE JEU MOBILE : maison plein écran sans décor === */
html,body{width:100%;height:100%;margin:0;overflow:hidden;touch-action:none;overscroll-behavior:none;background:#061522}#game{position:fixed;inset:0;width:100vw;height:100dvh;display:block;touch-action:none}.hidden{display:none!important}
body.mobile #hud{top:max(4px,env(safe-area-inset-top));left:max(4px,env(safe-area-inset-left));right:max(4px,env(safe-area-inset-right));gap:4px;z-index:35;pointer-events:auto}body.mobile #hud div,body.mobile #pauseBtn{padding:4px 7px!important;min-width:46px!important;border-radius:10px!important;background:rgba(6,21,34,.78)!important;backdrop-filter:blur(6px)}body.mobile #hud small{font-size:9px!important}body.mobile #hud b{font-size:15px!important}body.mobile #mission{display:none!important}body.mobile #tools{left:max(4px,env(safe-area-inset-left));right:max(4px,env(safe-area-inset-right));bottom:max(4px,env(safe-area-inset-bottom));grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;z-index:36}body.mobile #tools button{min-height:40px!important;padding:4px 2px!important;font-size:clamp(8px,1.75vw,11px)!important;line-height:1.05!important;border-radius:10px!important}body.mobile .top3{display:none!important}.centerBtn{right:max(6px,env(safe-area-inset-right))!important;bottom:max(50px,calc(env(safe-area-inset-bottom) + 50px))!important;min-height:34px!important;padding:7px 10px!important;font-size:11px!important;border-radius:999px!important}body.mobile .siteBack,body.mobile .callBtn{display:none!important}
@media (orientation:portrait) and (max-width:900px){body.mobile #rotateHint{display:grid!important;z-index:70!important}body.mobile #ui,body.mobile #game{filter:none!important}}
@media (orientation:landscape) and (max-height:520px){body.mobile #hud div:nth-child(3){display:none!important}body.mobile #tools button{min-height:34px!important;font-size:9px!important}.centerBtn{bottom:max(42px,calc(env(safe-area-inset-bottom) + 42px))!important}}

/* Correction demandée : suppression totale de la photo d’introduction avant le jeu */
#introOnce,.introOnce{display:none!important;visibility:hidden!important;pointer-events:none!important;}

/* === CORRECTION IMMEDIATE : jeu mobile jouable, maison visible entière === */
body.mobile #rotateHint{display:none!important;visibility:hidden!important;pointer-events:none!important}
body.mobile #ui,body.mobile #game{filter:none!important}
body.mobile #hud{top:4px!important;left:6px!important;right:auto!important;max-width:calc(100vw - 165px);display:flex!important;transform:none!important}
body.mobile #hud.hidden{display:none!important}
body.mobile #hud div,body.mobile #pauseBtn{min-height:34px!important;min-width:54px!important;padding:5px 8px!important;font-size:12px!important}
body.mobile #hud small{font-size:9px!important}body.mobile #hud b{font-size:16px!important}
body.mobile #mission{display:none!important}
body.mobile #tools{z-index:60!important;pointer-events:auto!important}
body.mobile #tools.hidden{display:none!important}
@media (orientation:landscape) and (max-width:980px){
  body.mobile #tools{top:max(8px,env(safe-area-inset-top))!important;right:max(8px,env(safe-area-inset-right))!important;bottom:max(8px,env(safe-area-inset-bottom))!important;left:auto!important;width:clamp(112px,17vw,150px)!important;display:grid!important;grid-template-columns:1fr!important;grid-auto-rows:1fr!important;gap:6px!important}
  body.mobile #tools button{width:100%!important;min-height:0!important;height:auto!important;font-size:clamp(10px,2.3vh,14px)!important;line-height:1.05!important;padding:5px 6px!important;border-radius:12px!important;white-space:normal!important;overflow:hidden!important}
  body.mobile .centerBtn{right:max(10px,env(safe-area-inset-right))!important;bottom:max(10px,env(safe-area-inset-bottom))!important;z-index:70!important;min-width:112px!important;min-height:42px!important;font-size:14px!important;padding:8px 12px!important}
}
@media (orientation:portrait) and (max-width:760px){
  body.mobile #tools{left:6px!important;right:6px!important;bottom:max(6px,env(safe-area-inset-bottom))!important;top:auto!important;width:auto!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
  body.mobile #tools button{min-height:44px!important;font-size:11px!important;padding:5px 3px!important;line-height:1.05!important}
  body.mobile .centerBtn{right:8px!important;bottom:calc(env(safe-area-inset-bottom) + 102px)!important;min-height:44px!important;min-width:118px!important;font-size:14px!important}
  body.mobile #hud{max-width:calc(100vw - 12px)!important;right:6px!important}
}
