@font-face { font-family: 'Lilita One'; src: url(assets/fonts/lilita_one_regular.ttf); font-display: swap; }
:root {
  --ink: #26304b; --ink2: #5a6486; --panel: rgba(255,255,255,.93); --line: rgba(38,48,75,.14);
  --mint: #4fd69c; --yellow: #ffd34d; --coral: #ff6b5c; --blue: #5aa9ff; --violet: #9a7bff;
  --r: 16px; --shadow: 0 6px 22px rgba(30,45,80,.22), 0 1px 0 rgba(255,255,255,.7) inset;
  --display: 'Lilita One', 'Trebuchet MS', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8fd0e8; color: var(--ink); font: 14px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif; user-select: none; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: default; touch-action: none; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
.btn { border: 0; background: #fff; padding: 8px 14px; border-radius: 12px; box-shadow: 0 3px 0 rgba(38,48,75,.18), 0 0 0 1px var(--line); font-weight: 700; transition: transform .08s, box-shadow .08s, background .15s; }
.btn:hover { background: #f4f8ff; } .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(38,48,75,.18), 0 0 0 1px var(--line); }
.btn.primary { background: var(--mint); color: #08402b; box-shadow: 0 3px 0 #2fa772; } .btn.primary:hover { background: #63e0aa; }
.btn.danger { background: var(--coral); color: #fff; box-shadow: 0 3px 0 #c8473b; }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 9px; }
.btn.big { padding: 14px 28px; font-size: 18px; font-family: var(--display); letter-spacing: .5px; font-weight: 400; border-radius: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .3px; }

/* ---------- Écrans ---------- */
.screen { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(20,40,70,.25), rgba(20,40,70,.6)); }
.title-card { text-align: center; animation: rise .6s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.logo { font-family: var(--display); font-size: clamp(54px, 9vw, 110px); line-height: .9; color: #fff; text-shadow: 0 5px 0 #2a6fc9, 0 10px 24px rgba(20,40,80,.5); -webkit-text-stroke: 3px #26304b; paint-order: stroke fill; display: flex; flex-direction: column; align-items: center; }
.logo .l2 { color: var(--yellow); letter-spacing: 12px; text-shadow: 0 5px 0 #d29b00, 0 10px 24px rgba(20,40,80,.5); }
.sub { color: #fff; font-family: var(--display); font-size: 20px; margin: 10px 0 26px; text-shadow: 0 2px 8px rgba(20,40,80,.6); }
.title-btns { display: flex; gap: 14px; justify-content: center; } .credits { color: rgba(255,255,255,.85); margin-top: 26px; font-size: 12px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.loading-card { background: var(--panel); border-radius: 22px; padding: 28px 36px; text-align: center; box-shadow: var(--shadow); min-width: 340px; max-width: 460px; font-family: var(--display); font-size: 19px; }
.bar { height: 10px; background: #e3e9f5; border-radius: 6px; margin-top: 16px; overflow: hidden; } .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--mint)); transition: width .25s; }
.spinner { width: 34px; height: 34px; border: 4px solid #dfe6f4; border-top-color: var(--blue); border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Modales ---------- */
#modal-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.modal-back { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,35,65,.38); pointer-events: auto; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border-radius: 22px; box-shadow: var(--shadow), 0 20px 60px rgba(20,35,65,.35); padding: 22px 24px; width: min(560px, 94vw); max-height: 92vh; overflow: auto; animation: pop .28s cubic-bezier(.2,.9,.3,1.25); }
.modal.wide { width: min(720px, 94vw); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.95); } }
.modal h2 { font-size: 26px; margin-bottom: 4px; } .modal .lead { color: var(--ink2); margin: 0 0 14px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.field { margin: 12px 0; } .field label { display: block; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink2); margin-bottom: 5px; }
.field input[type=text], .field textarea { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: #fff; color: var(--ink); outline: none; user-select: text; transition: border-color .15s; }
.field input:focus, .field textarea:focus { border-color: var(--blue); } .field textarea { resize: none; height: 66px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .chip { background: #eef3fc; border: 0; border-radius: 99px; padding: 4px 10px; font-size: 12px; color: var(--ink2); } .chip:hover { background: #dfeafb; }
.origins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.origin { background: #fff; border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); border-radius: 14px; padding: 12px; text-align: left; transition: .15s; }
.origin b { font-family: var(--display); font-weight: 400; font-size: 16px; display: block; } .origin span { font-size: 12px; color: var(--ink2); } .origin.sel { border-color: var(--mint); background: #f0fff8; transform: translateY(-2px); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud > * { pointer-events: auto; }
#topbar { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 10px; align-items: stretch; pointer-events: none; }
#topbar > * { pointer-events: auto; }
.card { background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px 14px; }
.tb-company { display: flex; flex-direction: column; justify-content: center; min-width: 170px; max-width: 250px; } .tb-company b { font-family: var(--display); font-weight: 400; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tb-company small { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cash { display: flex; align-items: center; gap: 10px; } .tb-cash img { width: 34px; height: 34px; } .tb-cash .amt { font-family: var(--display); font-size: 26px; line-height: 1; } .tb-cash .amt.neg { color: var(--coral); } .tb-cash small { display: block; font-weight: 700; } .pos { color: #1f9e68; } .neg { color: #e0493b; }
.tb-date { min-width: 150px; } .tb-date b { font-family: var(--display); font-weight: 400; font-size: 17px; display: block; } .meter { height: 7px; background: #e3e9f5; border-radius: 5px; overflow: hidden; margin-top: 4px; } .meter i { display: block; height: 100%; border-radius: 5px; transition: width .4s, background .4s; }
.tb-stat { min-width: 112px; } .tb-stat span { gap: 10px; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--ink2); display: flex; justify-content: space-between; } .tb-stat b { font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: 0; color: var(--ink); }
.tb-spacer { flex: 1; pointer-events: none !important; }
.tb-speed { display: flex; gap: 4px; align-items: center; padding: 6px; } .sp { width: 38px; height: 38px; border: 0; border-radius: 11px; background: #eef3fc; font-size: 15px; font-weight: 800; } .sp:hover { background: #dfeafb; } .sp.on { background: var(--blue); color: #fff; box-shadow: 0 3px 0 #3a82d4; }
.tb-btn { display: flex; align-items: center; justify-content: center; width: 52px; position: relative; font-size: 24px; border: 0; } .tb-btn:hover { background: #fff; transform: translateY(-1px); }
.badge { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--coral); color: #fff; font: 700 13px/22px var(--display); text-align: center; padding: 0 5px; box-shadow: 0 2px 6px rgba(0,0,0,.25); } .shake { animation: shake .6s; } @keyframes shake { 20%,60% { transform: rotate(-14deg); } 40%,80% { transform: rotate(14deg); } }

#palette { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; max-width: 96vw; }
.pal-tabs { display: flex; gap: 4px; align-items: center; } .pal-tabs .grow { flex: 1; }
.tab { border: 0; background: transparent; padding: 4px 12px; border-radius: 10px; font-family: var(--display); font-size: 15px; color: var(--ink2); } .tab:hover { background: #eef3fc; } .tab.on { background: var(--ink); color: #fff; }
.tool { border: 0; background: #eef3fc; border-radius: 10px; padding: 4px 10px; font-weight: 700; font-size: 13px; } .tool.on { background: var(--yellow); box-shadow: 0 2px 0 #d29b00; } .tool.dem.on { background: var(--coral); color: #fff; box-shadow: 0 2px 0 #c8473b; }
.pal-items { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.item { flex: 0 0 auto; width: 92px; border: 3px solid transparent; background: #fff; border-radius: 14px; padding: 4px 4px 6px; box-shadow: 0 0 0 1px var(--line); text-align: center; position: relative; transition: transform .12s, border-color .12s; }
.item:hover { transform: translateY(-3px); } .item.on { border-color: var(--yellow); background: #fffbea; transform: translateY(-4px); } .item.cant { opacity: .5; }
.item canvas { width: 72px; height: 72px; display: block; margin: 0 auto; } .item b { display: block; font-family: var(--display); font-weight: 400; font-size: 13px; line-height: 1.1; } .item .p { font-size: 12px; font-weight: 800; color: #1f9e68; } .item .k { position: absolute; top: 3px; left: 6px; font-size: 10px; font-weight: 800; color: var(--ink2); }
#tooltip { position: fixed; z-index: 30; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 9px; font-size: 12px; max-width: 240px; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: 0 4px 14px rgba(0,0,0,.3); } #tooltip.on { opacity: 1; }

#dock { position: absolute; right: 10px; top: 86px; display: flex; flex-direction: column; gap: 6px; }
.dk { width: 52px; height: 52px; border: 0; border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); font-size: 22px; position: relative; transition: transform .12s; } .dk:hover { transform: translateX(-3px); } .dk.on { background: var(--blue); } .dk small { position: absolute; bottom: 2px; left: 0; right: 0; font-size: 9px; font-weight: 800; color: var(--ink2); } .dk.on small { color: #fff; }

#drawer { position: absolute; right: 70px; top: 86px; bottom: 150px; width: 380px; max-width: calc(100vw - 90px); background: var(--panel); border-radius: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.2,.9,.3,1), opacity .2s; overflow: hidden; }
#drawer.closed { transform: translateX(30px) scale(.97); opacity: 0; pointer-events: none !important; }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; } .dr-head h2 { font-size: 22px; } .x { border: 0; background: #eef3fc; width: 30px; height: 30px; border-radius: 9px; font-weight: 800; } .x:hover { background: var(--coral); color: #fff; }
.dr-body { overflow-y: auto; padding: 6px 14px 16px; flex: 1; user-select: text; }
.dr-body::-webkit-scrollbar, .pal-items::-webkit-scrollbar, .modal::-webkit-scrollbar { width: 8px; height: 8px; } .dr-body::-webkit-scrollbar-thumb, .pal-items::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb { background: rgba(38,48,75,.25); border-radius: 4px; }
.sec { margin: 12px 0 6px; font-family: var(--display); font-size: 15px; color: var(--ink2); display: flex; align-items: center; justify-content: space-between; }
.emp { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 10px; padding: 9px 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); margin-bottom: 8px; align-items: center; }
.emp.warn { box-shadow: 0 0 0 2px #ffb3a8; background: #fff8f6; }
.av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 18px; color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); grid-row: span 2; }
.emp b { font-family: var(--display); font-weight: 400; font-size: 15px; } .emp small { color: var(--ink2); } .emp .acts { display: flex; gap: 4px; } .emp .bars { grid-column: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 11px; font-weight: 700; color: var(--ink2); }
.pips { color: #ffb400; letter-spacing: -1px; font-size: 13px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: #eef3fc; color: var(--ink2); margin-left: 4px; } .tag.bad { background: #ffe0dc; color: #b8352a; } .tag.good { background: #d9f7e8; color: #17744c; } .tag.trait { background: #ece6ff; color: #5b3fc0; }
.kv { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); } .kv b { font-family: var(--display); font-weight: 400; } .kv.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 7px; font-size: 16px; }
.slider { margin: 10px 0 14px; } .slider .top { display: flex; justify-content: space-between; font-weight: 700; } .slider .top b { font-family: var(--display); font-weight: 400; } input[type=range] { width: 100%; accent-color: var(--blue); margin: 6px 0 0; } .slider small { color: var(--ink2); }
.seg { display: flex; gap: 4px; margin-top: 6px; } .seg button { flex: 1; border: 0; background: #eef3fc; border-radius: 10px; padding: 7px 4px; font-weight: 700; } .seg button.on { background: var(--blue); color: #fff; box-shadow: 0 3px 0 #3a82d4; }
.cand { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 10px; } .cand .h { display: flex; gap: 10px; align-items: center; } .cand p { margin: 8px 0; color: var(--ink2); font-style: italic; }
.comp { background: #fff; border-radius: 12px; padding: 9px 11px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 7px; } .comp b { font-family: var(--display); font-weight: 400; } .threat { float: right; color: var(--coral); letter-spacing: 1px; font-size: 12px; }
.meet { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 10px; } .meet .ico { font-size: 34px; } .meet div { flex: 1; } .meet small { color: var(--ink2); display: block; }
.up { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 7px; } .up .ico { font-size: 22px; } .up div { flex: 1; } .up small { color: var(--ink2); display: block; }
svg.chart { width: 100%; height: 90px; background: #f4f8ff; border-radius: 12px; }
.note { background: #fff8dc; border-radius: 12px; padding: 8px 12px; font-size: 13px; color: #6b5200; margin: 8px 0; }

#tip { position: absolute; left: 10px; bottom: 156px; max-width: 290px; padding: 10px 14px; display: none; animation: pop .3s; background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); border-left: 6px solid var(--yellow); font-size: 13px; } #tip.on { display: block; } #tip b { font-family: var(--display); font-weight: 400; font-size: 15px; display: block; }
#toasts { position: absolute; top: 88px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none !important; width: 0; overflow: visible; }
.toast { background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.28); white-space: nowrap; font-weight: 600; animation: toastin .35s cubic-bezier(.2,.9,.3,1.3), toastout .4s 3.6s forwards; max-width: 80vw; } .toast.good { background: #1f8f62; } .toast.bad { background: #c8473b; } .toast.report { background: #fff; color: var(--ink); white-space: normal; width: 360px; padding: 12px 16px; animation: toastin .35s cubic-bezier(.2,.9,.3,1.3), toastout .4s 9s forwards; pointer-events: auto; box-shadow: var(--shadow); }
.toast.report h3 { font-size: 18px; margin-bottom: 4px; } .toast.report p { margin: 2px 0; font-size: 13px; font-weight: 500; }
@keyframes toastin { from { opacity: 0; transform: translateY(-16px) scale(.9); } } @keyframes toastout { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- Smartphone ---------- */
#phone { position: absolute; right: 70px; bottom: 150px; width: 330px; height: 560px; max-height: calc(100vh - 260px); background: #1c2236; border-radius: 38px; padding: 12px; box-shadow: 0 20px 50px rgba(10,20,45,.5), inset 0 0 0 2px #3c4668; transition: transform .35s cubic-bezier(.2,.9,.3,1.1), opacity .2s; display: flex; flex-direction: column; z-index: 5; }
#phone.closed { transform: translateY(40px) scale(.9); opacity: 0; pointer-events: none !important; }
.ph-screen { flex: 1; background: linear-gradient(180deg, #f6f9ff, #e8f0fd); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.ph-status { display: flex; justify-content: space-between; padding: 8px 18px 4px; font-size: 11px; font-weight: 800; } .ph-title { padding: 4px 16px 8px; display: flex; align-items: center; justify-content: space-between; } .ph-title h3 { font-size: 22px; }
.ph-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; user-select: text; }
.mail { background: #fff; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(30,45,80,.1); cursor: pointer; border-left: 5px solid var(--blue); } .mail.new { border-left-color: var(--coral); } .mail.done { opacity: .65; border-left-color: #b8c1d9; } .mail b { display: block; font-size: 13px; } .mail small { color: var(--ink2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mail:hover { transform: translateX(2px); }
.mail-view { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; animation: slidein .25s; } @keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.mv-head { padding: 12px 14px 8px; border-bottom: 1px solid var(--line); } .mv-head small { color: var(--ink2); } .mv-body { flex: 1; overflow-y: auto; padding: 12px 14px; user-select: text; } .mv-body p { margin: 0 0 12px; }
.choice { display: block; width: 100%; text-align: left; border: 0; background: #eef3fc; padding: 10px 12px; border-radius: 12px; margin-bottom: 7px; font-weight: 700; box-shadow: 0 2px 0 rgba(38,48,75,.12); } .choice:hover { background: #ddeaff; transform: translateY(-1px); } .choice small { display: block; font-weight: 500; color: var(--ink2); margin-top: 2px; }
.ai-tag { font-size: 10px; font-weight: 800; background: #ece6ff; color: #5b3fc0; padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: middle; }

/* ---------- Chat (entretien / négociation) ---------- */
.chat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .chat-head .av { width: 54px; height: 54px; font-size: 22px; grid-row: auto; }
.log { background: #f2f6fd; border-radius: 16px; padding: 10px; height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; user-select: text; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; animation: pop .2s; } .msg.them { background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.1); align-self: flex-start; } .msg.me { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; } .msg.typing { color: var(--ink2); font-style: italic; }
.askrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; } .sendrow { display: flex; gap: 8px; } .sendrow input { flex: 1; border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; outline: none; user-select: text; } .sendrow input:focus { border-color: var(--blue); }
.mood { height: 12px; background: #e3e9f5; border-radius: 8px; overflow: hidden; flex: 1; } .mood i { display: block; height: 100%; transition: width .5s, background .5s; }
.hints { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--ink2); }

/* ---------- Fin de partie ---------- */
.end { text-align: center; } .end .big { font-size: 56px; } .end h2 { font-size: 34px; margin: 6px 0; } .end .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0; text-align: left; } .end .stats div { background: #fff; border-radius: 12px; padding: 8px 12px; box-shadow: 0 0 0 1px var(--line); } .end .stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; }
@media (max-width: 1100px) { .tb-stat.opt { display: none; } .tb-company { min-width: 120px; } }
@media (max-width: 800px) { #drawer { right: 10px; top: 150px; } #dock { top: auto; bottom: 150px; flex-direction: row; right: auto; left: 10px; } .tb-date { min-width: 100px; } #topbar { flex-wrap: wrap; } }
#loading { z-index: 70; }

#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 5; background: radial-gradient(ellipse at center, rgba(20,40,70,0) 55%, rgba(20,40,70,.26) 100%); }

/* ---------- Rétention : objectifs, bandeau, bannières, bulles de chance ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.cf { position: absolute; border-radius: 2px; will-change: transform; }
.popv { position: absolute; font-family: var(--display); font-size: 26px; text-shadow: 0 2px 0 rgba(30,40,60,.9), 0 0 12px rgba(0,0,0,.4); white-space: nowrap; }
#banners { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none !important; z-index: 40; }
.banner { min-width: 320px; max-width: min(560px, 92vw); text-align: center; padding: 12px 26px 14px; border-radius: 18px; color: #fff; box-shadow: 0 10px 30px rgba(10,20,45,.4), inset 0 0 0 3px rgba(255,255,255,.35); animation: banin .5s cubic-bezier(.2,1.2,.3,1); }
.banner.gold { background: linear-gradient(180deg, #ffd34d, #f0a81a); color: #5a3a00; } .banner.epic { background: linear-gradient(180deg, #b69cff, #7a55e8); } .banner.bad { background: linear-gradient(180deg, #ff8576, #d4493b); }
.banner .bt { font-family: var(--display); font-size: 26px; letter-spacing: .4px; text-shadow: 0 2px 0 rgba(255,255,255,.35); } .banner.epic .bt, .banner.bad .bt { text-shadow: 0 2px 0 rgba(0,0,0,.25); } .banner .bs { font-weight: 700; font-size: 14px; opacity: .92; margin-top: 2px; }
.banner.out { animation: banout .4s forwards; } @keyframes banin { from { transform: translateY(-40px) scale(.7); opacity: 0; } } @keyframes banout { to { transform: translateY(-20px) scale(.95); opacity: 0; } }

#goals { position: absolute; left: 10px; top: 74px; width: 292px; padding: 8px 10px 10px; font-size: 12px; }
#goals .gh { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 14px; cursor: pointer; } #goals .gh small { font-family: system-ui; font-weight: 700; color: var(--ink2); }
#goals .gl { margin-top: 6px; } #goals .gl.collapsed { display: none; }
.gr { background: #fff; border-radius: 10px; padding: 5px 8px 6px; margin-top: 5px; box-shadow: 0 0 0 1px var(--line); position: relative; overflow: hidden; }
.gr .t { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; } .gr .t span { flex: 1; line-height: 1.2; } .gr .t em { font-style: normal; font-size: 11px; font-weight: 800; color: #17744c; background: #d9f7e8; border-radius: 99px; padding: 0 6px; white-space: nowrap; height: 16px; line-height: 16px; }
.gr .meter { height: 6px; margin-top: 4px; } .gr small { color: var(--ink2); font-weight: 700; font-size: 10px; } .gr.near { box-shadow: 0 0 0 2px var(--yellow); animation: nearpulse 1.4s infinite; }
@keyframes nearpulse { 50% { box-shadow: 0 0 0 2px var(--yellow), 0 0 12px rgba(255,211,77,.8); } }

#news { position: absolute; left: 50%; bottom: 214px; transform: translateX(-50%); max-width: min(620px, 60vw); padding: 5px 16px; border-radius: 99px; background: rgba(38,48,75,.86); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .5s; pointer-events: none !important; } #news.on { opacity: 1; }

.chip-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: #eef3fc; color: var(--ink2); margin-top: 3px; margin-right: 4px; } .chip-pill.fire { background: #ffe9c2; color: #9a5b00; } .chip-pill.up { background: #d9f7e8; color: #17744c; } .chip-pill.down { background: #ffe0dc; color: #b8352a; } .chip-pill.gold { background: #fff0b8; color: #7a5800; }
.tb-rank { min-width: 98px; } .tb-rank b { font-size: 20px !important; }

.lucky { position: absolute; width: 74px; height: 74px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #fff6c4, #ffd34d 55%, #f0a81a); box-shadow: 0 0 0 4px rgba(255,255,255,.7), 0 0 28px 8px rgba(255,211,77,.8); font-size: 38px; z-index: 30; animation: lucky-in .5s cubic-bezier(.2,1.4,.3,1), lucky-float 1.6s ease-in-out .5s infinite; cursor: pointer; }
.lucky::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.85); animation: spin 6s linear infinite; }
.lucky.gone { animation: lucky-out .25s forwards; } @keyframes lucky-in { from { transform: scale(0) rotate(-90deg); } } @keyframes lucky-float { 50% { transform: translateY(-9px) scale(1.06); } } @keyframes lucky-out { to { transform: scale(1.8); opacity: 0; } }

/* Projets, contrats, classement */
.proj { display: grid; grid-template-columns: 38px 1fr auto; gap: 2px 10px; align-items: center; background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 7px; } .proj .ico { font-size: 26px; grid-row: span 2; text-align: center; } .proj b { font-family: var(--display); font-weight: 400; font-size: 15px; } .proj small { color: var(--ink2); display: block; line-height: 1.25; } .proj .meter { grid-column: 2 / 4; }
.proj.locked { opacity: .55; } .proj.done { background: #f0fff8; } .proj.run { background: #fffbea; }
.land { background: linear-gradient(135deg, #e8f7ee, #f3fbf6); border-radius: 16px; padding: 12px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 8px; } .land .row2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.ctr { background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 8px; } .ctr h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 16px; display: flex; justify-content: space-between; gap: 8px; } .ctr h4 span { color: #1f9e68; } .ctr small { color: var(--ink2); display: block; } .ctr .dots { letter-spacing: 3px; font-size: 14px; }
.ctr.active { box-shadow: 0 0 0 2px var(--blue); } .ctr .acts { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.ctr .ok { color: #1f9e68; font-weight: 800; } .ctr .ko { color: #e0493b; font-weight: 800; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); margin-bottom: 6px; } .rank-row .n { font-family: var(--display); font-size: 20px; width: 26px; color: var(--ink2); } .rank-row b { flex: 1; font-family: var(--display); font-weight: 400; } .rank-row.you { background: #fff6cf; box-shadow: 0 0 0 2px var(--yellow); } .rank-row.you .n { color: #b27c00; }
.cyc { border-radius: 14px; padding: 8px 12px; margin: 6px 0 10px; font-weight: 700; } .cyc.boom, .cyc.hype { background: #d9f7e8; color: #17744c; } .cyc.recession { background: #ffe0dc; color: #b8352a; } .cyc.none { background: #eef3fc; color: var(--ink2); }
.gamble-tag { display: inline-block; font-size: 10px; font-weight: 800; background: #ece6ff; color: #5b3fc0; border-radius: 99px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.mail .rare, .rare-tag { font-size: 10px; font-weight: 800; background: #fff0b8; color: #7a5800; padding: 2px 7px; border-radius: 99px; margin-left: 6px; }
.mail .clock { color: #b8352a; font-weight: 800; }

/* Héritage & succès */
.legacy-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(135deg, #f1ecff, #fff6cf); border-radius: 16px; padding: 12px 16px; box-shadow: 0 0 0 1px var(--line); } .legacy-top b { font-family: var(--display); font-weight: 400; font-size: 34px; color: #7a55e8; }
.perk { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: 0 0 0 1px var(--line); margin-top: 6px; } .perk .ico { font-size: 24px; } .perk div { flex: 1; } .perk small { color: var(--ink2); display: block; } .perk .lv { font-size: 11px; font-weight: 800; color: #7a55e8; letter-spacing: 2px; }
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 6px; } .ach { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 12px; padding: 7px 9px; box-shadow: 0 0 0 1px var(--line); } .ach .ico { font-size: 22px; } .ach b { font-family: var(--display); font-weight: 400; font-size: 13px; display: block; line-height: 1.1; } .ach small { color: var(--ink2); font-size: 11px; line-height: 1.2; display: block; } .ach.lock { opacity: .45; filter: grayscale(1); }
.best { color: #fff; font-weight: 700; margin: 12px 0 0; text-shadow: 0 2px 8px rgba(20,40,80,.6); min-height: 20px; }
.title-btns #btnLegacy { padding: 14px 18px; }
@media (max-width: 900px) { #goals { width: 240px; } #news { display: none; } .banner { min-width: 240px; } }
#pills { position: absolute; top: 74px; left: 312px; display: flex; gap: 2px; flex-wrap: wrap; max-width: 55vw; pointer-events: none !important; } #pills .chip-pill { pointer-events: auto; box-shadow: 0 2px 6px rgba(30,45,80,.2); font-size: 12px; padding: 3px 10px; }
.perk .ico { flex: 0 0 34px; text-align: center; } .btn { white-space: nowrap; }

/* Animation des gains */
.coinfly { position: absolute; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); will-change: transform; }
.tb-cash { transition: box-shadow .3s; } .tb-cash.gain { animation: cashglow .9s; } .tb-cash.loss { animation: cashloss .7s; }
@keyframes cashglow { 0% { box-shadow: var(--shadow), 0 0 0 0 rgba(79,214,156,.9); } 40% { box-shadow: var(--shadow), 0 0 0 8px rgba(79,214,156,.5), 0 0 26px 6px rgba(255,211,77,.8); } 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(79,214,156,0); } }
@keyframes cashloss { 0%,100% { transform: none; } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.tb-cash .amt { transition: color .2s, transform .2s; font-variant-numeric: tabular-nums; } .tb-cash .amt.up { color: #1f9e68; transform: scale(1.06); transform-origin: left center; } .tb-cash .amt.down { color: #e0493b; }
.mv-body p { white-space: pre-line; }

.choice:disabled { cursor: not-allowed; transform: none !important; }

.btn.pulse { animation: nearpulse 1.2s infinite; }

/* ---------- Barre du haut : ne déborde plus sur les écrans étroits ---------- */
#topbar > .card { flex: 0 0 auto; }
#topbar > .tb-company { flex: 1 1 120px; min-width: 96px; max-width: 230px; }
.tb-cash .amt, .tb-date b, .tb-stat span, .tb-stat b, .tb-cash small { white-space: nowrap; }
.tb-cash .amt { font-size: clamp(20px, 1.9vw, 26px); }
@media (max-width: 1500px) {
  #topbar { gap: 7px; } #topbar > .card { padding: 7px 10px; } .tb-stat.opt { display: none; }
  .tb-date { min-width: 116px; } .tb-stat { min-width: 90px; } .tb-rank { min-width: 82px; } #topbar > .tb-company { max-width: 170px; }
  .sp { width: 32px; height: 32px; font-size: 13px; } .tb-btn { width: 44px; font-size: 21px; } .tb-cash img { width: 28px; height: 28px; }
  #goals { top: 70px; }
}
@media (max-width: 1250px) {
  .tb-company small, .tb-stat .meter { display: none; } .tb-date { min-width: 0; } .tb-stat { min-width: 0; } .tb-stat span { font-size: 10px; gap: 6px; }
  #topbar > .tb-company { max-width: 130px; } .tb-rank { min-width: 0; }
}
