/* Bollène V2 joueur : reprise visuelle de l'accueil V1, sans modifier son CSS ni la V2 technique. */
.app{--player-green:#315d46;--player-cream:#fff9eb;--player-text:#283e35}
.app:not(.debug-mode) .header,.app:not(.debug-mode) .panel,
.app:not(.debug-mode) .mini,.app:not(.debug-mode) .movement,
.app:not(.debug-mode) .footer,.app:not(.debug-mode) #labels{display:none!important}
.app.debug-mode .player-topbar,.app.debug-mode .player-location,
.app.debug-mode .player-welcome,.app.debug-mode .player-footer,
.app.debug-mode .player-reticle,.app.debug-mode .player-mobile-look{display:none!important}
.app:not(.debug-mode) .play-hud[hidden],.app:not(.debug-mode) .play-joystick[hidden],
.app .player-modal[hidden],.app .player-welcome[hidden],.app .player-location[hidden]{display:none!important}
.player-topbar{position:absolute;z-index:30;top:max(26px,env(safe-area-inset-top));left:30px;right:30px;
 display:flex;justify-content:space-between;align-items:center;gap:18px;pointer-events:none}
.player-topbar>*{pointer-events:auto}
.player-brand{display:flex;align-items:center;gap:12px;border:0;background:transparent;color:var(--player-text);
 text-align:left;padding:0;text-shadow:0 1px 15px #ffffef88}
.player-brand-mark{font:40px Georgia,serif;display:grid;place-items:center;position:relative;
 width:52px;height:59px;line-height:1;border:1px solid #fff7;background:#fff9e8e8;
 border-radius:23px 23px 7px 7px;padding-bottom:5px;flex-shrink:0}
.player-brand-mark span{position:absolute;right:9px;bottom:9px;font-size:26px;color:#ab8448}
.player-brand strong{display:block;font:normal 30px/1 Georgia,serif;letter-spacing:-1.1px}
.player-brand small{display:block;font-size:7px;font-weight:700;letter-spacing:1.6px;margin-top:8px;white-space:nowrap}
.player-nav{display:flex;align-items:center;gap:8px}
.player-nav button{display:inline-flex;justify-content:center;align-items:center;gap:8px;
 min-height:45px;border:1px solid #ffffff91;background:#fffaf0ed;box-shadow:0 5px 25px #23372c0c;
 border-radius:30px;padding:12px 16px;color:var(--player-text);font-weight:700;font-size:11px;
 white-space:nowrap;touch-action:manipulation}
.player-nav button svg{width:17px;height:17px}
.player-nav .player-settings-button{width:44px;height:44px;padding:0;border-radius:50%}
.player-location{position:absolute;z-index:18;top:110px;left:32px;display:flex;align-items:center;gap:8px;
 font-size:11px;color:#354c3b;text-shadow:0 1px 14px #fff9}
.player-location svg{width:15px;height:15px}.player-location strong{display:block;font-size:13px}
.player-location small{display:block;font-size:10px;margin-top:3px}
.player-welcome{position:absolute;z-index:20;inset:0;display:flex;align-items:center;
 background:linear-gradient(90deg,#f5eddaeb 0%,#f5eddacf 26%,#f5edda88 44%,#f5edda10 73%);
 pointer-events:auto;color:var(--player-text)}
.player-welcome-content{margin:30px 0 0 9%;max-width:min(620px,82vw)}
.player-eyebrow{font-size:9px;letter-spacing:3px;font-weight:700;display:flex;align-items:center;gap:10px;
 margin-bottom:24px;color:#6b7a62}.player-eyebrow>span{width:7px;height:7px;background:#b19456;border-radius:50%}
.player-welcome h1{font:normal clamp(48px,6.3vw,88px)/.98 Georgia,serif;letter-spacing:-3px;margin:0 0 24px}
.player-welcome h1 span{color:#b29152}
.player-welcome p{font-size:14px;line-height:1.85;color:#6d7b64;margin:0 0 30px}
.player-start{border:0;border-radius:11px;background:var(--player-green);color:#fff9eb;
 min-height:64px;min-width:375px;padding:15px 20px;display:flex;justify-content:space-between;
 align-items:center;gap:16px;font-size:14px;box-shadow:0 7px 18px #26412a24;touch-action:manipulation}
.player-start:disabled{opacity:.65;cursor:progress}
.player-start svg{width:23px;height:23px}
.player-welcome-meta{display:flex;gap:9px;align-items:center;margin-top:25px;color:#838c7e;
 font-size:10px}.player-welcome-meta svg{width:15px}
.player-welcome-note{display:block;margin-top:28px;font-size:10px;line-height:1.8;color:#8e9486}
.player-footer{position:absolute;bottom:max(17px,env(safe-area-inset-bottom));left:28px;right:28px;
 display:flex;justify-content:space-between;z-index:12;font-size:9px;letter-spacing:.06em;
 color:#fff9e6cc;text-shadow:0 1px 5px #13231e}
.player-footer a{color:inherit}
.player-reticle{display:none;position:absolute;top:50%;left:50%;z-index:11;width:5px;height:5px;
 border-radius:50%;border:1px solid #fff;transform:translate(-50%,-50%);pointer-events:none}
.app.is-playing:not(.debug-mode) .player-reticle{display:block}
.player-mobile-look{display:none;position:absolute;right:33px;bottom:110px;z-index:15;
 text-align:right;font-size:10px;color:#fff9e6d9;text-shadow:0 1px 5px #20372a}
.app:not(.is-playing) .player-footer{display:none}
.player-modal{position:absolute;inset:0;z-index:45;display:flex;align-items:center;
 justify-content:center;background:#172b20a8;backdrop-filter:blur(5px);padding:18px}
.player-modal-card{position:relative;max-width:560px;width:100%;max-height:min(82dvh,700px);
 background:#fffaf0;color:#293f35;border-radius:20px;box-shadow:0 18px 60px #071c1599;
 overflow:auto;padding:30px}
.player-modal-close{position:absolute;right:17px;top:17px;border:1px solid #dde1d5;
 width:42px;height:42px;border-radius:50%;background:#fff;color:#315440}
.player-modal-card .player-kicker{font-size:9px;letter-spacing:2.2px;color:#839079;font-weight:750}
.player-modal-card h2{font:normal 37px/1.12 Georgia,serif;letter-spacing:-1px;margin:8px 0 18px}
.player-modal-card p{line-height:1.75;font-size:13px;color:#69776c}
.player-modal-card .player-menu-items{display:grid;gap:9px;margin-top:20px}
.player-modal-card .player-menu-items button,.player-modal-card .player-menu-items a{
 color:#293d32;background:#f0efe1;border:1px solid #dadfce;border-radius:11px;
 padding:13px 14px;text-align:left;text-decoration:none;display:flex;
 align-items:center;justify-content:space-between;gap:14px;font-size:12px}
.player-modal-card .player-menu-items strong{font-size:13px}
.player-modal-card .player-menu-items small{display:block;color:#748376;margin-top:4px}
.player-modal-card .player-note{font-size:11px;color:#8c907d}
.player-toast{position:absolute;z-index:32;left:50%;bottom:95px;transform:translateX(-50%);
 background:#274635ea;color:#fff7e7;border-radius:15px;max-width:85vw;
 padding:11px 17px;font-size:12px;pointer-events:none;opacity:0;transition:opacity .2s}
.player-toast.visible{opacity:1}
.app:not(.debug-mode) .play-hud{position:absolute;z-index:15;top:137px;left:22px;right:auto;bottom:auto;
 display:flex;align-items:center;gap:10px;padding:8px 12px;background:#fffaf0ed;
 border:1px solid #e4e0cd;border-radius:16px;box-shadow:0 8px 30px #273e3418;
 max-width:min(500px,calc(100vw - 44px));width:auto;color:#293f34}
.app:not(.debug-mode) .play-hud strong{font:normal 26px Georgia,serif;white-space:nowrap}
.app:not(.debug-mode) .play-hud #play-vehicle-name{font-size:11px;font-weight:750;white-space:nowrap}
.app:not(.debug-mode) .play-hud #play-brake{background:#e9eddf;border:1px solid #c6cbb8;
 border-radius:11px;padding:10px;font-size:11px;color:#293f34}
.app:not(.debug-mode) .play-hud #play-brake[hidden],.app:not(.debug-mode) .play-hud #play-interact[hidden]{display:none!important}
.app:not(.debug-mode) .play-hud #play-brake small{display:block;font-size:8px}
.app:not(.debug-mode) .play-hud #play-interact{position:absolute;right:0;top:75px;background:#fffaf0ed;
 border:1px solid #dedfcb;padding:12px;border-radius:13px;color:#293f34;font-weight:700}
.app.is-playing:not(.is-driving):not(.debug-mode) .play-hud{top:auto;bottom:155px;left:auto;right:22px;
 background:transparent;border:0;box-shadow:none;padding:0;min-height:35px}
.app.is-playing:not(.is-driving):not(.debug-mode) .play-hud #play-speed,
.app.is-playing:not(.is-driving):not(.debug-mode) .play-hud #play-vehicle-name{display:none}
.app.is-playing:not(.is-driving):not(.debug-mode) .play-hud #play-interact:not([hidden]){
 position:relative;top:auto;right:auto}
.app:not(.debug-mode) .play-joystick{left:28px;bottom:92px;background:#fff8e733;
 border:1px solid #fff7;box-shadow:inset 0 0 0 12px #fff3;border-radius:50%;
 width:125px;height:125px;z-index:18}
.app:not(.debug-mode) .play-stick{background:#fff9e2cc;border:1px solid #fff8;box-shadow:0 4px 20px #33493333}
.app:not(.debug-mode) .play-joystick{display:none}
@media(pointer:coarse){
 .app.is-playing:not(.debug-mode) .play-joystick{display:block}
 .app.is-playing:not(.debug-mode) .player-mobile-look{display:block}
}
@media(max-width:900px){
 .player-topbar{left:20px;right:20px;top:20px}
 .player-brand strong{font-size:27px}.player-brand-mark{width:44px;height:50px;font-size:34px}
 .player-brand-mark span{font-size:22px;right:7px;bottom:7px}
 .player-nav{gap:5px}.player-nav button{padding:10px 12px}
}
@media(max-width:600px){
 .player-topbar{left:15px;right:15px;top:max(15px,env(safe-area-inset-top));gap:7px}
 .player-brand{gap:8px}.player-brand strong{font-size:24px}
 .player-brand-mark{width:37px;height:45px;font-size:30px;border-radius:18px 18px 5px 5px}
 .player-brand-mark span{font-size:20px;bottom:6px;right:5px}
 .player-brand small{font-size:5px;letter-spacing:.8px}
 .player-nav button{min-height:41px;width:41px;padding:0}
 .player-nav .player-nav-text{display:none}
 .player-nav button svg{width:17px;height:17px}
 .player-nav .player-settings-button{width:37px;height:37px}
 .player-location{left:18px;top:92px}.player-location strong{font-size:10px}.player-location small{font-size:8px}
 .player-welcome{background:linear-gradient(90deg,#f5eddaeb,#f5eddab8 58%,#f5edda57)}
 .player-welcome-content{margin:45px 28px 0;max-width:calc(100% - 45px)}
 .player-welcome h1{font-size:55px;line-height:1.03;letter-spacing:-2px;margin-bottom:21px}
 .player-eyebrow{font-size:8px;letter-spacing:2px;margin-bottom:22px}
 .player-welcome p{font-size:12px;line-height:1.9;margin-bottom:25px}
 .player-start{min-width:0;width:min(100%,365px);min-height:64px;font-size:12px}
 .player-welcome-meta{font-size:8px}
 .player-welcome-note{font-size:9px;margin-top:23px}
 .player-footer{left:17px;right:17px;font-size:7px}
 .player-modal{align-items:flex-end;padding:0}
 .player-modal-card{border-radius:22px 22px 0 0;padding:30px 24px;max-height:86dvh}
 .app:not(.debug-mode) .play-hud{top:125px;left:15px;right:auto;padding:7px 9px;max-width:calc(100vw - 30px)}
 .app:not(.debug-mode) .play-hud strong{font-size:23px}
 .app.is-playing:not(.is-driving):not(.debug-mode) .play-hud{right:16px;bottom:95px;left:auto}
 .app:not(.debug-mode) .play-joystick{left:23px;bottom:85px;width:116px;height:116px}
 .player-mobile-look{right:22px;bottom:120px}
}
@media(max-height:550px){
 .player-welcome-content{margin-top:60px}.player-welcome h1{font-size:44px;margin-bottom:12px}
 .player-welcome-note{display:none}.player-eyebrow{margin-bottom:12px}
 .player-welcome p{margin-bottom:14px}.player-start{min-height:46px}
 .player-welcome-meta{margin-top:12px}
 .app:not(.debug-mode) .play-hud{top:75px;left:12px}
 .app:not(.debug-mode) .play-joystick{bottom:48px;width:95px;height:95px}
 .app.is-playing:not(.is-driving):not(.debug-mode) .play-hud{bottom:65px}
 .player-mobile-look{bottom:75px}
 .player-footer{bottom:8px}
}

/* V1 maps reused verbatim: centre IGN/OSM and district / whole commune. */
.player-modal-card #player-map-surface{width:100%;margin:18px 0 10px}
.player-modal-card .plan-wrap{border:1px solid #e4e1cc;border-radius:15px;overflow:hidden;background:#ece9d8;margin:0}
.player-modal-card .plan-wrap svg{width:100%;height:auto;min-height:240px;display:block}
.player-modal-card .plan-wrap svg text{font-family:system-ui,sans-serif}
.player-map-scopes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
.player-map-scopes button{min-width:0;min-height:55px;padding:10px 5px;border:1px solid #d9ddc8;color:#314839;background:#fdfaf2;border-radius:12px;cursor:pointer;font-size:12px}
.player-map-scopes button.active{background:#e7ecdb;border-color:#aeba9a}
.player-map-key{display:flex;flex-wrap:wrap;align-items:center;gap:17px;color:#8b927c;font-size:10px}
.player-map-key span{display:flex;gap:6px;align-items:center}
.player-map-key i{display:inline-block;width:9px;height:9px;border-radius:50%;background:#456b5d}
.app.is-menu-open .play-joystick,.app.is-menu-open .play-hud,.app.is-menu-open .player-mobile-look{display:none!important}
.app:not(.debug-mode) .play-hud.is-near-vehicle{top:auto!important;bottom:150px!important;left:auto!important;right:22px!important;background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important}
.app:not(.debug-mode) .play-hud.is-near-vehicle #play-interact{position:static!important;border-radius:14px!important;min-height:45px!important;font-size:12px!important;box-shadow:0 4px 15px #263a292a}
@media(max-width:600px){
 .player-modal-card .plan-wrap svg{min-height:190px}
 .player-map-scopes{gap:6px}
 .player-map-scopes button{min-height:56px;font-size:11px}
 .app:not(.debug-mode) .play-hud.is-near-vehicle{bottom:118px!important;right:16px!important}
}
@media(max-height:550px){
 .app:not(.debug-mode) .play-hud.is-near-vehicle{bottom:55px!important}
}

/* Mobile landscape: moving controls must not cover the brand, street or place name. */
@media (max-height:550px) and (pointer:coarse){
 .app.is-driving:not(.debug-mode) .player-location{display:none!important}
 .app.is-driving:not(.debug-mode) .play-hud{
  top:auto!important;bottom:max(12px,env(safe-area-inset-bottom))!important;
  left:50%!important;right:auto!important;transform:translateX(-50%);
  gap:7px;min-height:46px;padding:5px 10px;max-width:calc(100vw - 205px);
  box-sizing:border-box
 }
 .app.is-driving:not(.debug-mode) .play-hud strong{font-size:18px}
 .app.is-driving:not(.debug-mode) .play-hud #play-interact{
  position:static;min-height:36px;padding:7px 10px;font-size:11px
 }
 .app.is-driving:not(.debug-mode) .play-hud #play-brake{padding:6px 8px}
}
/* Au volant sur téléphone en portrait (22/11/2026) : « Descendre » est placé sous la barre de conduite (top:75px) ;
   la barre ne doit pas le rogner (overflow:auto hérité de commune.css, @media max-width:740px). */
.app.is-driving:not(.debug-mode) .play-hud{overflow:visible;max-height:none}

/* Solar/audio preview: a single accessible mute control and legible nocturnal UI. */
.player-nav .player-audio-button{width:44px;height:44px;padding:0;border-radius:50%}
.player-nav .player-audio-button.is-muted{opacity:.73}
.app.sky-night .player-location{color:#fff5dc;text-shadow:0 1px 8px #07141d,0 0 18px #07141d}
.app.sky-night .player-brand{background:#fff8eae6;border-radius:19px;padding:5px 8px;box-shadow:0 5px 24px #13232620}
@media(max-width:600px){
 .player-nav .player-audio-button{width:37px;height:37px}
}
@media(max-width:400px){
 .player-topbar{left:9px;right:9px;gap:4px}
 .player-brand{gap:5px}
 .player-brand strong{font-size:21px}
 .player-brand-mark{width:32px;height:40px;font-size:27px}
 .player-nav{gap:4px}
 .player-nav button,.player-nav .player-audio-button,.player-nav .player-settings-button{width:35px;height:37px;min-height:37px}
 .player-nav button svg{width:16px;height:16px}
}

/* Accessibility/visual polish: improve HUD legibility against light limestone and sunlit streets.
   Applied only to the player shell; measured terrain, camera and collisions are untouched. */
.app.is-playing:not(.debug-mode) .player-brand{
 background:#fff9ebeb;
 border:1px solid #ffffffb8;
 border-radius:15px;
 padding:5px 10px 5px 5px;
 box-shadow:0 5px 18px #23372c25;
 text-shadow:none
}
.app.is-playing:not(.debug-mode) .player-location{
 background:#fff9ebee;
 color:#263f33;
 text-shadow:none;
 padding:9px 13px;
 border:1px solid #ffffffb8;
 border-radius:13px;
 box-shadow:0 3px 13px #20342c20;
 max-width:min(360px,calc(100vw - 36px))
}
.app.is-playing:not(.debug-mode) .player-nav button:focus-visible,
.app.is-playing:not(.debug-mode) .player-brand:focus-visible{
 outline:3px solid #a17b35;
 outline-offset:3px;
}
@media(max-width:600px){
 .app.is-playing:not(.debug-mode) .player-brand{padding:4px 6px 4px 4px;border-radius:12px}
 .app.is-playing:not(.debug-mode) .player-location{top:91px;left:14px;padding:7px 10px;border-radius:10px}
}
@media(prefers-reduced-motion:reduce){
 .player-toast{transition:none}
}

/* V2 mobile touch targets — compact portrait screens, no change to desktop.
   The previous 35px controls clipped the final settings button at 320px. */
@media (max-width:600px) and (pointer:coarse){
 .app:not(.debug-mode) .player-topbar{
  left:max(8px,env(safe-area-inset-left));
  right:max(8px,env(safe-area-inset-right));
  gap:4px
 }
 .app:not(.debug-mode) .player-brand{flex:0 1 auto;min-width:0;gap:5px}
 .app:not(.debug-mode) .player-brand strong{font-size:19px}
 .app:not(.debug-mode) .player-brand small{display:none}
 .app:not(.debug-mode) .player-nav{flex:0 0 auto;gap:3px}
 .app:not(.debug-mode) .player-nav button{
  box-sizing:border-box;
  flex:0 0 44px;
  width:44px;min-width:44px;height:44px;min-height:44px;
  padding:0;
  touch-action:manipulation
 }
 .app:not(.debug-mode) .player-nav button svg{width:19px;height:19px}
}
@media (max-width:350px) and (pointer:coarse){
 /* The brand remains available through its B icon and accessible button label. */
 .app:not(.debug-mode) .player-brand>span:last-child{display:none}
 .app:not(.debug-mode) .player-brand-mark{width:38px;height:44px}
}

/* Lot 21 : accélérateur à maintenir (téléphone). */
.app:not(.debug-mode) .play-hud #play-gas{background:#f3c74f;border:1px solid #d8a92a;border-radius:11px;padding:14px 12px;font-size:12px;font-weight:700;color:#1b1b1b;touch-action:none;user-select:none}
.app:not(.debug-mode) .play-hud #play-gas[hidden]{display:none!important}
.app:not(.debug-mode) .play-hud #play-gas small{display:block;font-size:8px;font-weight:500}
/* Keep transient tips off the thumb joystick and right-hand look area on phones. */
@media (max-width:600px) and (pointer:coarse){
 .app.is-playing:not(.debug-mode) .player-toast{
  top:calc(max(150px,env(safe-area-inset-top) + 142px));
  bottom:auto;
  max-width:calc(100vw - 32px);
  box-sizing:border-box
 }
}

/* Tap a precise destination on the real geographic SVG; readable on iPhone. */
.player-modal-card #player-map-surface .real-plan{cursor:crosshair;touch-action:manipulation}
/* « Ma maison » : adresse du joueur et retour chez soi, au-dessus du plan. */
.player-home{display:grid;gap:8px;margin:4px 0 14px;padding:13px 14px;border:1px solid #e1e2d2;border-radius:15px;background:#fffdf6}
.player-home h3{margin:0;font-size:15px;color:#223d31}
.player-home label{font-size:12px;color:#526d5a}
.player-home input{min-height:48px;padding:0 13px;border:1px solid #c9cdb8;border-radius:12px;background:white;font:inherit;font-size:16px;color:#1c2c24}
.player-home input:focus-visible,.player-home button:focus-visible{outline:3px solid #b28c3d;outline-offset:2px}
.player-home-address{margin:0;font-size:15px;font-weight:700;color:#1c2c24}
.player-home-actions{display:flex;flex-wrap:wrap;gap:8px}
.player-home-actions button,.player-home-results button{min-height:48px;padding:0 15px;border:0;border-radius:12px;background:#2b6045;color:white;font-weight:700;font-size:14px;cursor:pointer;touch-action:manipulation}
.player-home-actions button.quiet{background:transparent;color:#2b6045;border:1px solid #b9c4b1}
.player-home-results{display:grid;gap:6px}
.player-home-results button{display:grid;gap:2px;justify-items:start;text-align:left;background:#eef2e6;color:#1c2c24;font-weight:650}
.player-home-results small{font-weight:500;font-size:11px;color:#6b7a69}
.player-home .player-note{margin:0}
.player-teleport{position:sticky;bottom:-30px;z-index:2;background:#fffaf0;
 display:grid;gap:8px;padding:13px 0 8px;border-top:1px solid #e1e2d2}
.player-teleport p{font-size:12px;line-height:1.5;margin:0;color:#526d5a}
.player-teleport button{min-height:50px;border:0;border-radius:13px;background:#2b6045;
 color:white;font-weight:750;font-size:14px;cursor:pointer;touch-action:manipulation}
.player-teleport button:disabled{cursor:not-allowed;opacity:.48}
.player-teleport button:focus-visible{outline:3px solid #b28c3d;outline-offset:3px}
.player-modal-card .plan-wrap svg [data-teleport-marker]{filter:drop-shadow(0 1px 2px #192b246b)}
@media (max-width:600px){
 .player-teleport{bottom:-24px}
 .player-teleport button{min-height:54px}
}

/* Vue 1re / 3e personne et choix du personnage (20/11/2026). */
.player-chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 14px}
.player-chip{min-height:40px;padding:8px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.06);color:inherit;font:inherit;font-size:14px;cursor:pointer}
.player-chip.is-active{background:#f3c74f;border-color:#f3c74f;color:#1b1b1b;font-weight:600}
#player-view[aria-pressed="true"]{border-color:#f3c74f}
