:root{color-scheme:dark;--bg:#080d17;--panel:#101a29;--line:#253249;--text:#e1eaf5;--muted:#93a5bc;--cyan:#66dfd4;--orange:#f4b469}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 'Segoe UI',sans-serif}header{height:88px;padding:18px 36px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{text-decoration:none;color:var(--text);font-size:25px;font-weight:800;letter-spacing:4px}.brand span{color:var(--cyan)}.brand small{display:block;font:11px/1.8 Consolas,monospace;letter-spacing:2px;color:var(--muted)}#save{font:13px Consolas,monospace;color:var(--cyan)}main{display:flex;min-height:calc(100vh - 88px)}aside{width:248px;flex-shrink:0;border-right:1px solid var(--line);padding:28px 20px;display:flex;flex-direction:column}h1,h2,h3,p{margin-top:0}h1{font-size:34px;line-height:1.2}h2{font-size:22px;font-weight:600}h3{font-size:19px;font-weight:600}aside h2{margin:10px 0 3px}.eyebrow{font:12px/1.6 Consolas,monospace;letter-spacing:1.4px;color:var(--cyan)}.muted{color:var(--muted);font-size:14px}.credits{font-size:32px;font-weight:600;margin:17px 0 28px}.credits span{font-size:14px;color:var(--muted)}button{background:#18273a;border:1px solid #3a4e65;border-radius:4px;padding:10px 15px;color:var(--text);font:14px/1.4 "Segoe UI",sans-serif;cursor:pointer;transition:background .15s,border .15s}button:hover{background:#25405a;border-color:var(--cyan)}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid var(--cyan);outline-offset:4px}nav{display:grid;gap:6px}nav button{text-align:left;border-color:transparent;background:transparent;padding:12px 8px}nav button span{margin-right:12px;color:#68839b;font:12px Consolas,monospace}nav .active{border-left:2px solid var(--cyan);background:#132c36;color:var(--cyan)}.aside-bottom{display:grid;gap:8px;margin-top:auto;padding-top:30px}.workspace{padding:28px 34px;flex:1;min-width:0;max-width:1600px}.location{display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}.location h1{margin:5px 0}.location h1 span{font:11px Consolas,monospace;letter-spacing:1px;margin-left:18px;color:var(--muted)}.faction{text-align:right;font-size:14px}.faction small{display:block;color:var(--orange);font:13px/2 Consolas,monospace}.telemetry{display:grid;grid-template-columns:repeat(4,1fr);gap:28px;background:#0d1724;border:1px solid var(--line);padding:18px 22px;margin-bottom:28px}.meter>div{display:flex;justify-content:space-between;font-size:13px;margin-bottom:7px}.meter b{font:13px Consolas,monospace}progress{width:100%;height:4px;border:0;background:#243044;display:block}progress::-webkit-progress-bar{background:#243044}progress::-webkit-progress-value{background:var(--cyan)}progress::-moz-progress-bar{background:var(--cyan)}.section-title{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin:22px 0 14px}.section-title h2{margin:0}.section-title span{font:12px Consolas,monospace;color:var(--muted)}.map-layout{display:grid;grid-template-columns:1fr 260px;gap:18px}.map{position:relative;min-height:430px;border:1px solid var(--line);overflow:hidden;background:radial-gradient(ellipse at 60% 35%,#18243980,transparent 65%),linear-gradient(#22304924 1px,transparent 1px),linear-gradient(90deg,#22304924 1px,transparent 1px);background-size:auto,40px 40px,40px 40px}.star{position:absolute;transform:translate(-50%,-50%);border:0;padding:5px;background:transparent;text-align:center;min-width:60px;color:#a7b6ca}.star:hover{background:#1c3045}.star i{display:block;width:7px;height:7px;border-radius:50%;background:currentColor;margin:0 auto 6px;box-shadow:0 0 12px currentColor}.star span{font:12px Consolas,monospace}.star small{display:block;font:9px Consolas,monospace;color:var(--muted)}.star.current i{outline:1px solid var(--cyan);outline-offset:6px}.star.selected{border:1px solid #829caf;border-radius:6px}.f0{color:var(--cyan)}.f1{color:#94b8ff}.f2{color:#ec977f}.map-key{position:absolute;bottom:12px;left:15px;display:flex;gap:16px;font:11px Consolas,monospace;color:var(--muted)}.panel{background:var(--panel);border:1px solid var(--line);padding:22px;border-radius:5px}.destination h2{font-size:30px;margin:10px 0}.destination p{color:var(--muted);font-size:14px}.data-row{display:flex;justify-content:space-between;gap:12px;font-size:13px;padding:9px 0;border-bottom:1px solid var(--line)}.data-row span{color:var(--muted)}.data-row b{font-weight:400;text-align:right}.jump-cost{font:38px Consolas,monospace;margin:18px 0 14px;color:var(--cyan)}.jump-cost small{display:block;font-size:11px;letter-spacing:1px;color:var(--muted)}.destination button{width:100%;background:#17443f;border-color:#367d72}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px;margin-bottom:22px}.cards .panel{display:flex;flex-direction:column}.cards h3{margin-top:8px}.cards p{color:var(--muted);font-size:14px}.cards button{margin-top:auto}.utility{display:flex;align-items:center;gap:15px}.utility span{font-size:13px;color:var(--muted)}footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);margin-top:28px;padding-top:18px;font:11px Consolas,monospace;color:#69829d}.encounter{padding:24px;border:1px solid #c88848;background:#2a211d;margin-bottom:24px}.encounter h2{margin:8px 0}.encounter button{margin:0 8px 6px 0}.quantity{font:42px Consolas,monospace;color:var(--cyan);margin-bottom:12px}table{border-collapse:collapse;width:100%;text-align:left;font-size:14px}th{font-weight:400;color:var(--muted)}td,th{padding:13px 8px;border-bottom:1px solid var(--line)}td button{padding:7px 10px;margin:3px}.journal>div{display:flex;gap:25px;border-bottom:1px solid var(--line);padding:14px 0}.journal span{white-space:nowrap;font:12px Consolas,monospace;color:var(--cyan)}.journal p{margin:0;font-size:14px}.start{max-width:900px;padding:9vh 8vw;width:100%}.start h1{font-size:clamp(44px,6vw,76px);letter-spacing:-3px;margin:25px 0}.start>p{color:var(--muted)}form{max-width:390px;display:grid;gap:12px;margin:35px 0}label{font-size:14px}input{padding:12px;border:1px solid #4a6177;border-radius:4px;background:#101a29;color:var(--text);font:18px "Segoe UI",sans-serif}.primary{background:var(--cyan);color:#082221;border:0;font-weight:700;padding:14px}.import{color:var(--muted);cursor:pointer;font-size:13px}.import input{display:block;width:100%;font-size:12px;margin-top:6px;padding:5px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#263c50;color:white;box-shadow:0 5px 30px #0009;padding:14px 22px;border:1px solid #769bb0;border-radius:6px;opacity:0;pointer-events:none;max-width:90%;transition:opacity .15s}#toast.show{opacity:1}@media(max-width:1100px){aside{width:210px}.workspace{padding:22px}.map-layout{grid-template-columns:1fr}.destination{display:grid;grid-template-columns:1fr 1fr;gap:8px 20px}.destination .jump-cost{margin:0}.map{min-height:420px}}@media(max-width:760px){header{padding:14px 18px;height:auto;gap:15px}.brand{font-size:20px}.brand small{font-size:9px}#save{font-size:11px}main{display:block}aside{width:100%;padding:15px;border-right:0;border-bottom:1px solid var(--line)}aside>.eyebrow,aside>h2,aside>p,aside>.credits{display:none}nav{grid-template-columns:repeat(3,1fr)}nav button{font-size:12px;padding:8px}nav button span{display:none}.aside-bottom{display:flex;margin:0;padding-top:10px;flex-wrap:wrap}.aside-bottom .import{max-width:180px}.workspace{padding:18px 12px}.location h1{font-size:26px}.location h1 span{display:block;margin:5px 0}.telemetry{grid-template-columns:1fr 1fr;gap:16px;padding:15px}.map{min-height:410px}.star{min-width:42px}.star span{font-size:10px}.section-title span{display:none}.utility{align-items:flex-start;flex-direction:column}table{font-size:12px}td,th{padding:8px 3px}.panel{padding:16px}.journal>div{gap:12px}footer{font-size:9px}.start{padding:8vh 7vw}.faction{max-width:130px}}
/* Le vol occupe l'écran ; les instruments restent ancrés au cockpit. */
.in-flight main>aside{display:none}.flight-workspace{padding:0;max-width:none}.flight-workspace>.location,.flight-workspace>.telemetry,.flight-workspace>footer{display:none}.flight-workspace>.encounter{margin:0;padding:12px 24px}.flight-workspace>.encounter h2{font-size:18px;margin:0}.flight-workspace>.encounter p{margin:4px 0}.flight-shell{position:relative;height:calc(100vh - 88px);min-height:640px;overflow:hidden;background:#020610}.viewport{position:absolute;inset:0}.viewport canvas{width:100%;height:100%;display:block}.flight-top{position:absolute;left:28px;right:28px;top:22px;display:flex;justify-content:space-between;gap:20px;pointer-events:none}.flight-top b{font:18px Consolas,monospace;color:#d5fff7}.flight-top small{display:block;font:12px/2 Consolas,monospace;color:#70c6bd}.flight-top button{background:#0e1d2bcc;pointer-events:auto;margin:0 3px;font-size:13px}.flight-labels{position:absolute;inset:0;pointer-events:none}.flight-label{position:absolute;transform:translate(-50%,-50%);padding:5px 8px;color:#b8d8ea;background:#0d182980;font:13px Consolas,monospace;border:1px solid #61788a80;pointer-events:auto}.flight-label.targeted{color:#85ffe8;border-color:#85ffe8}.reticle{position:absolute;left:50%;top:50%;width:32px;height:32px;border:1px solid #79cfbb88;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}.reticle:after{content:'+';position:absolute;inset:0;color:#83dbc7;text-align:center;line-height:28px}.target-direction{position:absolute;top:95px;left:50%;transform:translateX(-50%);font:14px Consolas,monospace;color:#b4eddb;background:#09152177;padding:8px 14px}.flight-instructions{position:absolute;left:28px;bottom:220px;color:#a7b8ca;font:13px/1.8 Consolas,monospace;background:#07101c99;padding:12px 16px;border-left:2px solid #689eab}.flight-instructions b{color:#a8f4e2}.flight-bottom{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);width:min(760px,94%);background:linear-gradient(135deg,#0c1928eb,#101f2bf2);border:1px solid #324b5f;border-top:2px solid #528d8b;padding:18px 24px;box-shadow:0 0 40px #000a;text-align:center}.flight-instruments{display:flex;justify-content:space-around;gap:12px;font:12px Consolas,monospace;color:#8fabbe}.flight-instruments b{display:block;color:#ccedeb;font-size:18px;margin-top:4px}.flight-readout{color:#78efce;font:16px Consolas,monospace;margin:12px 0 8px}.flight-prompt{font:14px Consolas,monospace;color:#cde7e8;margin:10px 0}.flight-controls{display:flex;gap:8px;justify-content:center}.flight-controls select{background:#101f2c;color:#bcd9e0;border:1px solid #476270;font:14px 'Segoe UI',sans-serif;max-width:300px;padding:8px}.flight-controls button{font-size:13px}@media(max-width:760px){.flight-shell{min-height:700px}.flight-top{left:12px;right:12px;top:14px;flex-direction:column;gap:6px}.flight-top button{font-size:11px;padding:5px}.target-direction{top:140px;white-space:nowrap;font-size:11px}.flight-instructions{left:10px;bottom:230px;font-size:11px;padding:8px}.flight-bottom{padding:10px;bottom:12px}.flight-instruments{font-size:10px;gap:4px}.flight-instruments b{font-size:15px}.flight-controls{flex-wrap:wrap}.flight-prompt{font-size:12px}.flight-label{font-size:10px}.flight-readout{font-size:12px}}
.ground-shell .flight-instructions{bottom:205px}.ground-status{font:15px/1.6 Consolas,monospace;color:#b9ead2}.ground-shell .flight-top b{color:#f0ffef;text-shadow:0 1px 6px #000}.ground-shell .flight-top small{color:#dbf4e4;text-shadow:0 1px 6px #000}.ground-hit:after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 120px #ff2633a0}.ground-shell .flight-bottom{border-top-color:#a4b87a}.ground-shell .flight-instructions{background:#112322cc}.ground-shell .target-direction{background:#112322bb;color:#f3fff1}
.ground-label{pointer-events:none;background:#102621bb;color:#d7f8e2;border-color:#aed5b199}.ground-label.rare-label{color:#ffd2ff;border-color:#ee8aee}.ground-label.hostile-label{color:#ffe2d7;border-color:#fb6c5d;background:#471d20bb}

.ground-shell .flight-bottom{width:min(940px,94%)}.ground-shell .flight-controls{flex-wrap:wrap}.ground-shell .flight-controls button{padding:10px 12px}.civ-label{border-color:#e2c99b;color:#fff0c8}.resident-label{color:#f1e4cc;border-color:#a28c67}.dialogue p{font-size:16px;line-height:1.7}.ground-label{pointer-events:none}
.pilot-health{--hp-color:#79e5a3;text-align:left;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid #46634d}.pilot-health>div{display:flex;justify-content:space-between;align-items:center;font:12px Consolas,monospace;color:#c9e5d2}.pilot-health-value{font-size:16px;color:var(--hp-color)}.pilot-health progress{display:block;width:100%;height:12px;margin-top:7px;border:0;border-radius:3px;background:#182b2b;accent-color:var(--hp-color)}.pilot-health progress::-webkit-progress-bar{background:#182b2b;border-radius:3px}.pilot-health progress::-webkit-progress-value{background:var(--hp-color);border-radius:3px;transition:width .2s}.pilot-health progress::-moz-progress-bar{background:var(--hp-color);border-radius:3px}.pilot-health.low-health{--hp-color:#efbd6c}.pilot-health.critical-health{--hp-color:#ff7474}.ground-shell .flight-instructions{bottom:268px}.station-shell .flight-instructions{bottom:195px}.station-shell .flight-bottom{width:min(870px,94%)}.station-shell .flight-top b{text-shadow:0 1px 6px #000}.station-shell .flight-top small{text-shadow:0 1px 6px #000}.station-shell .target-direction{background:#091521cc}.merchant-return{margin:26px 0 0}.dialogue table+p{font-size:14px}
.ground-time{font:13px/1.6 Consolas,monospace;color:#f3d7a7;margin:3px 0 7px}.ground-shell .flight-instructions{bottom:294px}.space-warning{position:absolute;left:28px;top:135px;max-width:390px;padding:11px 14px;background:#131e2de0;border:1px solid #688174;color:#dfd6b4;font:13px/1.7 Consolas,monospace;pointer-events:none}.space-warning:empty{display:none}.space-warning.danger{border-color:#ddaa64;color:#ffe1a5}.space-hit:after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 110px #ff402fa0}.in-toxic:before,.in-radiation:before{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;box-shadow:inset 0 0 120px #70b06a55}.in-radiation:before{box-shadow:inset 0 0 120px #e6ac7755}.flight-controls{flex-wrap:wrap}.flight-instruments{gap:8px}.flight-instructions{bottom:240px}

/* V0.7 : identité du vaisseau et base personnelle. */
.rename-form{display:grid;gap:12px;max-width:460px}.rename-form input{font:18px Consolas,monospace;background:#0b1925;color:#d4fff0;border:1px solid #456674;padding:12px}.rename-form button{justify-self:start}.home-offer{border-color:#7b9172;margin-bottom:24px}.home-offer .eyebrow{color:#bde7a7}.home-shell .flight-top b{color:#e4f8d0}.home-shell .flight-instructions{border-left-color:#9faa76}.home-shell .flight-bottom{border-top-color:#a7b780;width:min(870px,94%)}.storage-distance{color:#e5c78c}.start form{gap:12px}.start form label:not(:first-child){margin-top:12px}

/* V0.8 : vie persistante et réserve de la combinaison. */
.telemetry{grid-template-columns:repeat(3,1fr)}.survival-bars{display:grid;grid-template-columns:1fr 1fr;gap:18px;text-align:left;margin-bottom:10px}.survival-bars .pilot-health{margin-bottom:0;border:0;padding:0}.pilot-energy>div{display:flex;justify-content:space-between;align-items:center;font:12px Consolas,monospace;color:#bddbe8}.pilot-energy-value{font-size:16px;color:#81c7f7}.pilot-energy progress{display:block;width:100%;height:12px;margin-top:7px;border:0;border-radius:3px;background:#182b2b;accent-color:#81c7f7}.pilot-energy progress::-webkit-progress-bar{background:#182b2b}.pilot-energy progress::-webkit-progress-value{background:#81c7f7}.pilot-energy.low-energy progress{accent-color:#ffb45b}.pilot-energy.low-energy progress::-webkit-progress-value{background:#ffb45b}.pilot-energy.low-energy .pilot-energy-value{color:#ffb45b}.suit-warning{font:13px/1.5 Consolas,monospace;color:#ffb47e}.suit-warning:empty{display:none}.ground-shell .flight-instructions{bottom:315px}.station-shell .flight-instructions,.home-shell .flight-instructions{bottom:245px}.healing-offers{margin:24px 0}.healing-offers .panel{padding:18px}.healing-offers h3{font-size:17px} @media(max-width:760px){.telemetry{grid-template-columns:1fr 1fr}.survival-bars{gap:10px}.pilot-health-value,.pilot-energy-value{font-size:14px}.survival-bars>div>div{font-size:10px}.ground-shell .flight-instructions{bottom:340px}}

/* V0.9 : tableau compact et objectifs lisibles. */
.contract-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:16px;margin:20px 0 30px}.contract-card{display:flex;flex-direction:column;gap:10px}.contract-card h3{margin:0;font-size:19px;line-height:1.35}.contract-card p{margin:0;font-size:14px;line-height:1.65}.contract-card .contract-objective{color:#e1f6ee;font-weight:600}.contract-meta{display:flex;justify-content:space-between;gap:12px;font:13px Consolas,monospace;color:#b6c9d4}.contract-meta b{color:var(--cyan);font-size:19px}.contract-card small{font:12px/1.7 Consolas,monospace;color:var(--muted)}.contract-progress{color:#a8ebcc}.contract-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:12px}.contract-buttons button{font-size:13px;padding:9px 12px}.contract-history{margin-top:24px}.contract-history p{font-size:14px}.legacy-contract{border-color:#9b9671}.dialogue .contract-grid p{font-size:14px}.dialogue>.contract-grid{margin-bottom:12px}@media(max-width:760px){.contract-grid{grid-template-columns:1fr}}

/* V0.10 : jauge indépendante, actualisée à chaque frame de vol. */
.flight-fuel{position:absolute;right:28px;top:94px;width:280px;padding:14px 16px;background:#0b1829ed;border:1px solid #528d8b;border-top:3px solid var(--cyan);font:12px/1.5 Consolas,monospace;box-shadow:0 8px 24px #0008}
.flight-fuel-heading{display:flex;justify-content:space-between;color:#a7c4cf;letter-spacing:1px}
.flight-fuel-value{display:block;font:25px/1.7 Consolas,monospace;color:#d8fff5;font-variant-numeric:tabular-nums}
.flight-fuel-meter{height:12px;margin:2px 0 8px;background:#23384a;border-radius:2px;overflow:hidden}
.flight-fuel small{display:block;color:#b3c6d2;margin-bottom:8px}
.flight-fuel button{display:block;width:100%;padding:7px;margin-top:6px;font-size:12px}
.flight-fuel.low-fuel{border-color:#edb45e}.flight-fuel.low-fuel .flight-fuel-value{color:#ffd897}.low-fuel progress::-webkit-progress-value{background:#f4b469}.low-fuel progress::-moz-progress-bar{background:#f4b469}
.flight-fuel.empty-fuel{border-color:#f28574}.flight-fuel.empty-fuel .flight-fuel-value{color:#ffab99}
@media(max-width:900px){.flight-fuel{right:12px;top:112px;width:240px;padding:9px 12px}.flight-fuel-value{font-size:21px}.flight-fuel button{padding:5px}.space-warning{max-width:calc(100% - 288px)}}
@media(max-height:640px){.flight-fuel{top:84px;padding:8px 12px}.flight-fuel-value{font-size:21px}.flight-fuel-meter{height:8px}.flight-fuel small{margin-bottom:4px}.flight-fuel button{padding:5px}.flight-instructions{font-size:11px;bottom:208px}}

/* V0.11 : cible et santé pirates, sans interrompre le cockpit. */
.pirate-status{position:absolute;left:28px;top:235px;width:330px;padding:12px 15px;background:#1d111de8;border:1px solid #9d5465;border-left:3px solid #ff7756;color:#ffe2d6;font:13px/1.6 Consolas,monospace;pointer-events:none}.pirate-status[hidden]{display:none}.pirate-status>div{display:flex;justify-content:space-between;gap:12px}.pirate-status .pirate-name{font-size:12px}.pirate-status .pirate-hp{white-space:nowrap}.pirate-status progress{height:5px;margin:9px 0}.pirate-status progress::-webkit-progress-value{background:#ff7756}.pirate-status progress::-moz-progress-bar{background:#ff7756}.pirate-status small{display:block;color:#ecb9a9;font-size:11px}
@media(max-width:900px){.pirate-status{left:12px;top:228px;width:275px;padding:9px 11px}}

.flight-workspace>.combat-encounter{display:none}.pirate-status .pirate-flee{pointer-events:auto;width:100%;margin-top:9px;padding:6px 10px;font-size:12px}.pirate-status .pirate-flee[hidden]{display:none}
