/* NETWARS — interface de jeu, DA « stratégie miniature stylisée » (docs/DA.md).
   Panneaux crème arrondis à liseré cuivré, boutons épais et biseautés, texte brun chaud ; accent selon la faction. */
:root {
  --ink: #3b2a1a; --mut: #7d6650; --dim: #a08a72;
  --panel: linear-gradient(#fffaf0, #f3e6cf); --edge: rgba(150, 105, 50, .25); --lip: #c9a77a; --well: rgba(130, 90, 40, .09);
  --acc: #3d7fe6; --acc-hi: #6ea6ff; --acc-ink: #fff; --gold: #f2b632; --gold-lo: #b06f00;
  --cr: #f2b632; --bp: #a37bff; --cpu: #36b9f0; --bad: #d9363e; --good: #2f9e55; --warn: #c77700;
  --r: 20px; --font: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, 'Segoe UI', sans-serif;
}
body.f-linux { --acc: #2fae5f; --acc-hi: #6fe39a; --gold: #ff9b45; --gold-lo: #b0520d; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: #8fcbef; color: var(--ink); font: 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
svg { display: block; }
[hidden] { display: none !important; } /* sinon les règles display des boutons l'emportent */
body.auth-open > :not(#auth):not(#game):not(script) { display: none !important; } /* pas d'interface de jeu avant connexion */
#game { position: fixed; inset: 0; }
#game canvas { display: block; }

.card { position: fixed; background: var(--panel); border-radius: var(--r); box-shadow: 0 5px 0 var(--lip), 0 14px 28px rgba(60, 40, 10, .25); }

/* joueur */
.player { top: 14px; left: 14px; display: flex; gap: 12px; align-items: center; padding: 8px 18px 8px 8px; }
.emblem { width: 50px; height: 50px; color: var(--acc); filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .18)); }
.who b { display: block; font-size: 16px; font-weight: 800; }
.who small { display: block; color: var(--mut); font-size: 12px; }
.mode { display: inline-block; margin-top: 4px; font: 800 10px var(--font); letter-spacing: .6px; text-transform: uppercase; color: var(--warn); background: rgba(242, 182, 50, .18); border-radius: 8px; padding: 2px 8px; }
.mode.on { color: #fff; background: var(--good); }

.tools { top: 96px; left: 14px; display: flex; gap: 4px; padding: 6px; border-radius: 16px; }
.tools button { width: 38px; height: 36px; border: 0; border-radius: 12px; background: transparent; color: var(--mut); display: grid; place-items: center; }
.tools button svg { width: 18px; height: 18px; }
.tools button:hover { background: var(--well); color: var(--ink); }
.tools button[aria-pressed="true"] { background: var(--acc); color: var(--acc-ink); }
.tools .txt { width: auto; padding: 0 12px; font-size: 12px; font-weight: 800; }

/* ressources : capsules */
.res { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.pill { background: var(--panel); border-radius: 999px; box-shadow: 0 4px 0 var(--lip), 0 10px 20px rgba(60, 40, 10, .2);
  padding: 5px 18px 6px 6px; display: grid; grid-template-columns: 34px 1fr; gap: 0 9px; align-items: center; min-width: 150px; }
.pill .ic { grid-row: span 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22), inset 0 2px 0 rgba(255, 255, 255, .5); }
.pill .ic svg { width: 19px; height: 19px; }
.pill.cr .ic { background: var(--cr); } .pill.bp .ic { background: var(--bp); } .pill.cpu .ic { background: var(--cpu); }
.pill b { font: 900 17px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.pill small { color: var(--mut); font-size: 11px; line-height: 1.2; font-weight: 700; }
.pill .bar { height: 4px; background: var(--well); border-radius: 2px; overflow: hidden; margin-top: 3px; }
.pill .bar > span { display: block; height: 100%; border-radius: 2px; }
.pill.cr .bar > span { background: var(--cr); } .pill.bp .bar > span { background: var(--bp); } .pill.cpu .bar > span { background: var(--cpu); }

/* fiche d'équipement */
.ctx { right: 14px; top: 92px; width: 300px; padding: 16px; }
.ctx .x { position: absolute; top: 10px; right: 10px; }
.ctx h3 { margin: 0 28px 2px 0; font-size: 19px; font-weight: 900; }
.ctx .lv { color: var(--acc); font: 800 12px var(--font); }
.ctx p { color: var(--mut); margin: 8px 0 10px; font-size: 13px; }
.ctx .work { color: var(--ink); background: rgba(242, 182, 50, .2); border-radius: 12px; padding: 8px 10px; font-weight: 700; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; margin: 0 0 12px; padding: 10px 12px; background: var(--well); border-radius: 14px; font-size: 13px; }
.stats dt { color: var(--mut); } .stats dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; font-weight: 800; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn { border: 0; border-radius: 14px; padding: 10px 8px; font-weight: 800; background: #fff; box-shadow: 0 3px 0 var(--lip); }
.btn:hover:not(:disabled) { filter: brightness(1.04); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--lip); }
.btn.main { grid-column: 1 / -1; background: linear-gradient(var(--acc-hi), var(--acc)); color: var(--acc-ink); box-shadow: 0 4px 0 rgba(0, 0, 0, .25), inset 0 2px 0 rgba(255, 255, 255, .4); display: flex; justify-content: center; gap: 10px; text-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.note { color: var(--dim); font-size: 11px; margin: 10px 0 0; }
.x { width: 30px; height: 30px; border: 0; border-radius: 10px; background: var(--well); color: var(--mut); font-size: 18px; line-height: 1; }
.x:hover { color: var(--ink); }

.cost { display: inline-flex; gap: 8px; font: 800 12px var(--font); font-variant-numeric: tabular-nums; }
.cost span::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; vertical-align: 0; }
.cost .cr::before { background: var(--cr); } .cost .bp::before { background: var(--bp); } .cost .cpu::before { background: var(--cpu); }
.cost .lack { color: var(--bad); }
.btn.main .cost .lack { color: #ffe0e0; text-decoration: line-through; }

/* menus et construction */
.dock { position: fixed; left: 14px; bottom: 16px; display: flex; gap: 10px; }
.round { width: 66px; height: 66px; border-radius: 20px; border: 0; background: var(--panel); box-shadow: 0 5px 0 var(--lip), 0 10px 20px rgba(60, 40, 10, .2);
  display: grid; place-items: center; align-content: center; gap: 3px; font-size: 10px; font-weight: 800; color: var(--mut); }
.round svg { width: 24px; height: 24px; color: var(--ink); opacity: .45; }
.round:disabled { cursor: default; }
.round:not(:disabled) svg { opacity: 1; color: var(--acc); } .round:not(:disabled) { color: var(--ink); }
.round:not(:disabled):active { transform: translateY(3px); }

.build { position: fixed; right: 18px; bottom: 20px; width: 128px; height: 84px; border: 0; border-radius: 24px; font: 900 16px var(--font);
  background: linear-gradient(#ffd56b, var(--gold)); color: #4a2a00; box-shadow: 0 7px 0 var(--gold-lo), inset 0 2px 0 rgba(255, 255, 255, .6), 0 14px 26px rgba(60, 40, 10, .3); }
.build::before { content: '＋'; display: block; font-size: 28px; line-height: 1; }
.build:hover { filter: brightness(1.05); } .build:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--gold-lo); }
.tray { left: 50%; bottom: 16px; transform: translateX(-50%); width: min(1000px, calc(100vw - 340px)); padding: 12px 14px 14px; }
.tray-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs button { border: 0; border-radius: 12px; padding: 7px 14px; font-size: 13px; font-weight: 800; background: transparent; color: var(--mut); }
.tabs button:hover { color: var(--ink); background: var(--well); }
.tabs button.on { background: var(--acc); color: var(--acc-ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.cards { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.bc { flex: 0 0 136px; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--lip); padding: 6px 6px 9px; text-align: center; display: grid; gap: 2px; transition: transform .12s; }
.bc:hover:not(.no) { transform: translateY(-4px); }
.bc.sel { box-shadow: 0 4px 0 var(--acc), 0 0 0 3px var(--acc); }
.bc.no { opacity: .55; cursor: not-allowed; filter: grayscale(.4); }
.bc img { width: 100%; height: 96px; object-fit: contain; }
.bc b { font-size: 12.5px; font-weight: 900; } .bc .cost { justify-content: center; font-size: 11px; }
.bc em { font: normal 700 10.5px var(--font); color: var(--acc); } .bc .why { font-size: 10.5px; color: var(--warn); font-weight: 700; }
.bc .t { font-size: 10.5px; color: var(--mut); font-weight: 700; }
.bc .tag { font: 900 9px var(--font); text-transform: uppercase; letter-spacing: .5px; color: #fff; background: var(--acc); border-radius: 6px; justify-self: center; padding: 1px 6px; }

.hint { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: rgba(59, 42, 26, .82); color: #fff3df; border-radius: 20px;
  padding: 7px 16px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.hint b { color: #ffd56b; }
.toast { position: fixed; left: 50%; top: 84px; transform: translateX(-50%) translateY(-6px); background: #fff; color: var(--bad); border-radius: 14px; box-shadow: 0 4px 0 #e9b1b4, 0 10px 20px rgba(60, 40, 10, .2);
  padding: 9px 16px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 5; font-weight: 800; }
.toast.ok { color: var(--good); box-shadow: 0 4px 0 #a9dcb9, 0 10px 20px rgba(60, 40, 10, .2); }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* recherche : arbre technologique */
.lab { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1120px, calc(100vw - 32px)); height: min(640px, calc(100vh - 120px)); padding: 14px; display: grid; grid-template-rows: auto 1fr; gap: 10px; z-index: 6; }
.lab-head { display: flex; align-items: center; gap: 12px; } .lab-head b { font-size: 20px; font-weight: 900; }
.lab-info { flex: 1; color: var(--mut); font-weight: 700; font-size: 13px; }
.lab-body { display: grid; grid-template-columns: 1fr 320px; gap: 12px; min-height: 0; }
.tree-wrap { overflow: auto; border-radius: 16px; background: radial-gradient(circle, rgba(130, 90, 40, .12) 1px, transparent 1.5px) 0 0 / 18px 18px, rgba(255, 255, 255, .45); }
.tree { position: relative; }
.tree svg { position: absolute; inset: 0; pointer-events: none; }
.tree path { fill: none; stroke: #cbb592; stroke-width: 3; stroke-dasharray: 6 5; }
.tree path.ok { stroke: var(--good); stroke-dasharray: none; }
.node { position: absolute; width: 150px; height: 66px; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--lip); padding: 8px 10px 8px 46px; text-align: left; display: grid; align-content: center; gap: 1px; }
.node .ico { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font: 900 13px var(--font); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.node b { font-size: 12.5px; font-weight: 900; line-height: 1.15; } .node small { font-size: 11px; color: var(--mut); font-weight: 700; }
.node .pg { position: absolute; left: 46px; right: 10px; bottom: 7px; height: 4px; border-radius: 2px; background: var(--well); overflow: hidden; } .node .pg i { display: block; height: 100%; background: var(--gold); }
.node.locked { opacity: .6; filter: grayscale(.5); }
.node.avail { box-shadow: 0 4px 0 var(--lip), 0 0 0 2px var(--acc); }
.node.run { background: #fff6dc; box-shadow: 0 4px 0 var(--gold-lo), 0 0 0 2px var(--gold); }
.node.done small { color: var(--good); }
.node.sel { outline: 3px solid var(--ink); outline-offset: 2px; }
.node:hover { transform: translateY(-2px); }
.ico.reseau { background: #38bdf8; } .ico.systemes { background: #7c8aa0; } .ico.securite { background: #ff8a3c; } .ico.economie { background: #a78bfa; } .ico.windows { background: #3d7fe6; } .ico.linux { background: #2fae5f; }
.tdet { overflow-y: auto; background: #fff; border-radius: 16px; box-shadow: 0 4px 0 var(--lip); padding: 14px; display: grid; align-content: start; gap: 8px; }
.tdet h3 { margin: 0; font-size: 18px; font-weight: 900; } .tdet p { margin: 0; color: var(--mut); font-size: 13px; }
.tdet .tags { display: flex; gap: 6px; flex-wrap: wrap; } .tdet .tag { font: 800 10px var(--font); text-transform: uppercase; letter-spacing: .5px; border-radius: 6px; padding: 2px 7px; background: var(--well); color: var(--mut); }
.tdet .tag.f { background: var(--acc); color: #fff; }
.eff { border-radius: 12px; padding: 8px 10px; font-weight: 800; font-size: 13px; background: rgba(47, 158, 85, .12); color: #1f6b3a; }
.eff.future { background: rgba(130, 90, 40, .1); color: var(--mut); font-weight: 700; }
.tdet ul { margin: 0; padding-left: 18px; font-size: 13px; } .tdet li.no { color: var(--bad); } .tdet li.ok { color: var(--good); }
.tdet .why { color: var(--warn); font-weight: 800; font-size: 12px; }

/* connexion / inscription */
.auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at 50% 40%, #bfe6ff, #6fb3e6); z-index: 10; overflow-y: auto; }
.auth-card { position: relative; width: min(440px, 100%); padding: 26px; display: grid; gap: 12px; }
.logo { font: 900 34px/1 var(--font); letter-spacing: 3px; text-align: center; color: var(--ink); } .logo span { color: var(--acc); }
.sub { margin: -6px 0 4px; text-align: center; color: var(--mut); font-weight: 700; }
.auth .tabs { background: var(--well); padding: 4px; border-radius: 14px; }
.auth .tabs button { flex: 1; }
.auth form { display: grid; gap: 10px; }
.auth label { display: grid; gap: 5px; font-size: 13px; color: var(--mut); font-weight: 700; }
.auth label small, .auth legend small { color: var(--dim); }
.auth input:not([type=radio]) { font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--edge); border-radius: 12px; padding: 10px 12px; }
.auth input:focus { outline: 3px solid var(--acc-hi); outline-offset: 0; border-color: transparent; }
.factions { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.factions legend { font-size: 13px; color: var(--mut); margin-bottom: 6px; padding: 0; font-weight: 700; }
.fc { position: relative; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--lip); padding: 8px; text-align: center; cursor: pointer; gap: 0 !important; }
.fc input { position: absolute; opacity: 0; }
.fc img { width: 100%; height: 118px; object-fit: contain; }
.fc b { color: var(--ink); font-size: 15px; } .fc small { font-size: 11px; }
.fc.w:has(input:checked) { box-shadow: 0 4px 0 #2b5ea8, 0 0 0 3px #3d7fe6; }
.fc.l:has(input:checked) { box-shadow: 0 4px 0 #1f7a45, 0 0 0 3px #2fae5f; }
.fc:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.auth .btn.main { padding: 13px; font-size: 16px; }
.err { margin: 0; min-height: 1.2em; color: var(--bad); font-weight: 800; text-align: center; }
.demo-link { text-align: center; color: var(--mut); font-size: 13px; font-weight: 700; }
.demo-link:hover { color: var(--ink); }

/* Missions, inventaire, caisses (7.2) */
.nbadge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: #e5484d; color: #fff; font: 900 12px var(--font); display: grid; place-items: center; box-shadow: 0 2px 0 #9b2c2f; }
.round { position: relative; } .round.bump { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-6deg); } 100% { transform: scale(1); } }
.missp .lab-head .tabs { flex: 1; } .missbody { overflow-y: auto; min-height: 0; padding-right: 4px; }
.mgrid, .igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.mcard { display: grid; grid-template-columns: 64px 1fr; gap: 6px 10px; align-items: center; background: #f6ead2; border-radius: 16px; padding: 10px; box-shadow: inset 0 -3px 0 #e3cfa9; }
.mcard.ready { background: #fff4c9; box-shadow: inset 0 -3px 0 #f2b632, 0 0 0 3px #f2b632; animation: glowcard 1.6s ease-in-out infinite; }
.mcard.done { opacity: .6; } .mcard .btn, .mcard .mok { grid-column: 1 / -1; } .mok { color: #2f9e5b; font-weight: 900; text-align: center; }
@keyframes glowcard { 50% { box-shadow: inset 0 -3px 0 #f2b632, 0 0 0 5px rgba(242, 182, 50, .45); } }
.mtxt p { margin: 2px 0 6px; font-size: 12px; color: var(--mut); } .mtxt small { color: var(--mut); font-weight: 700; }
.mbar { height: 9px; background: #e3cfa9; border-radius: 6px; overflow: hidden; } .mbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3dd68c, #2f9e5b); transition: width .6s; }
.mchest svg { width: 64px; height: 54px; }
.icard { background: #f6ead2; border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.icard svg { width: 80px; height: 66px; } .icard p { margin: 0; font-size: 12px; color: var(--mut); } .icard small { color: var(--mut); }
.icard.rare { background: #e4edff; } .icard.legendary { background: #fff1c9; }
.iact { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; } .iact .btn { padding: 4px 10px; font-size: 12px; }
.cico { font-size: 30px; line-height: 1; } .empty { color: var(--mut); font-size: 13px; }
.odds { list-style: none; padding: 0; margin: 4px 0 0; font-size: 12px; text-align: left; width: 100%; } .odds li { padding: 2px 0; border-bottom: 1px dashed #e3cfa9; } .odds b { color: #b4553a; display: inline-block; min-width: 44px; }
.boosts { position: fixed; top: 92px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 4; }
.boost { display: inline-block; background: #2b5ea8; color: #fff; border-radius: 999px; padding: 3px 10px; font: 800 12px var(--font); box-shadow: 0 3px 0 #1c3f73; margin: 2px; }
.vchip.storm { background: #dbeafe; } .vchip.storm.on { background: #2b5ea8; color: #fff; }
/* coffre (SVG) : bois, ferrures selon la rareté, couvercle articulé */
.chest .wood { fill: #b9783f; stroke: #5b3a1e; stroke-width: 2.5; } .chest .band { fill: #c9ced6; stroke: #5b3a1e; stroke-width: 1.5; }
.chest .lock { fill: #e9edf2; stroke: #5b3a1e; stroke-width: 2; } .chest .hole { fill: #3b2a1a; } .chest .rays { display: none; }
.chest.rare .band, .chest.rare .lock { fill: #6ea8ff; } .chest.legendary .band, .chest.legendary .lock { fill: #f2c14e; }
.chest .lid { transform-box: fill-box; transform-origin: 0% 100%; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.crate-ov { position: fixed; inset: 0; z-index: 30; background: rgba(40, 26, 14, .6); display: grid; place-items: center; }
.crate-card { position: relative; width: min(420px, calc(100vw - 32px)); min-height: 380px; background: var(--panel); border-radius: 26px; box-shadow: 0 8px 0 var(--lip), 0 20px 40px rgba(0, 0, 0, .35); display: grid; place-items: center; padding: 20px; }
.chestbox svg { width: 220px; height: 184px; overflow: visible; }
.crate-ov.shake .chestbox svg { animation: shake .16s linear infinite; }
@keyframes shake { 25% { transform: rotate(-4deg) translateY(-2px); } 75% { transform: rotate(4deg) translateY(-2px); } }
.crate-ov.glow .chestbox svg, .crate-ov.opened .chestbox svg { filter: drop-shadow(0 0 18px #fff3a8); }
.crate-ov.glow .chestbox.rare svg, .crate-ov.opened .chestbox.rare svg { filter: drop-shadow(0 0 22px #6ea8ff); }
.crate-ov.glow .chestbox.legendary svg, .crate-ov.opened .chestbox.legendary svg { filter: drop-shadow(0 0 30px #f2b632); }
.crate-ov.opened .chest .lid { transform: rotate(-38deg) translate(-6px, -10px); }
.crate-ov.opened .chestbox.legendary .rays { display: block; fill: rgba(255, 220, 120, .55); transform-origin: 60px 50px; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal { position: absolute; inset: 20px; background: var(--panel); border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.rtitle { font-size: 22px; font-weight: 900; } .rw { background: #f6ead2; border-radius: 14px; padding: 10px 14px; font-weight: 900; font-size: 17px; color: #2f9e5b; }
.rw.cardw { color: var(--ink); display: grid; gap: 2px; } .rw.cardw p { margin: 0; font-size: 12px; font-weight: 600; color: var(--mut); }
.quip { font-style: italic; color: var(--mut); margin: 0; font-size: 13px; } .crate-skip { position: absolute; bottom: 12px; right: 12px; padding: 4px 10px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .crate-ov.shake .chestbox svg, .mcard.ready, .round.bump, .chest .rays, .reveal { animation: none !important; } }

/* Raids (6.1) */
.raidp { top: 160px; bottom: auto; max-height: calc(100vh - 270px); overflow-y: auto; z-index: 6; } /* ancré en haut : les commandes ne bougent pas quand le journal grandit */
.away #buildBtn, .away #tray, .away #lab, .away #netp, .away #netBtn, .away #labBtn { display: none !important; }
.raidp h4 { margin: 12px 0 6px; font-size: 14px; } .raidp h4 small { color: var(--mut); font-weight: 700; }
.rlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rlist li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; background: #f6ead2; border-radius: 12px; padding: 6px 8px; font-size: 13px; }
.rlist li .btn { margin-left: auto; padding: 4px 10px; font-size: 12px; } .rlist small { color: var(--mut); }
.blk { color: #b4553a !important; font-weight: 800; } .shield { color: #2b5ea8 !important; font-weight: 800; }
.raidp .stars { color: #e3a008; letter-spacing: 1px; } .raidp .stars.big { font-size: 26px; text-shadow: 0 2px 0 #9a6a00; }
.pill.f-windows { background: #2b5ea8; } .pill.f-linux { background: #1f7a45; }
.unit { display: flex; gap: 8px; align-items: center; border-bottom: 1px dashed #e3cfa9; padding: 6px 0; } .unit p { margin: 2px 0 0 !important; font-size: 12px !important; }
.unit small { color: var(--mut); } .stepper { margin-left: auto; display: flex; align-items: center; gap: 6px; } .stepper .x { position: static; }
.report { display: flex; align-items: center; justify-content: space-between; border-radius: 14px; padding: 10px 12px; font-size: 18px; }
.report.good { background: #e5f6e7; } .report.bad { background: #fbe3dc; } .line { font-style: italic; color: var(--ink) !important; }
.raidp .btn.wide { margin-top: 8px; }
.rbar { height: 8px; background: #ead9b8; border-radius: 6px; overflow: hidden; margin: 6px 0; } .rbar span { display: block; height: 100%; width: 0; background: #e3a008; transition: width .3s; }
.rctl { display: flex; gap: 6px; } .rctl .btn { flex: 1; padding: 6px 4px; font-size: 12px; }
.rtick { font-weight: 900; color: var(--ink) !important; margin: 6px 0 2px !important; }
.rarmy { min-height: 18px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--mut); }
.rlog { min-height: 104px; } .rlog, .moments { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 12px; display: grid; gap: 3px; }
.rlog li, .moments li { background: #f6ead2; border-radius: 8px; padding: 3px 8px; } .rlog b, .moments b { color: #b4553a; margin-right: 4px; }
.stars3 .st { display: inline-block; font-size: 30px; color: #d9cbb0; }
.stars3 .st.on { color: #f2b632; text-shadow: 0 2px 0 #9a6a00; animation: starpop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.stars3 .st:nth-child(2) { animation-delay: .45s; } .stars3 .st:nth-child(3) { animation-delay: .9s; }
@keyframes starpop { 0% { transform: scale(0) rotate(-45deg); } 100% { transform: scale(1) rotate(0); } }
.lootline { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0; font-weight: 800; } .loot b { font-size: 18px; color: #2f9e5b; }
@media (prefers-reduced-motion: reduce) { .stars3 .st.on { animation: none; } }

/* Réseau (5.1) */
.netp { left: 14px; bottom: 100px; width: 320px; padding: 14px; z-index: 5; }
.netp p { color: var(--mut); font-size: 13px; margin: 8px 0; } .netp .big { color: var(--ink); font-weight: 800; }
.btn.wide { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; } .btn.wide small { font-weight: 700; opacity: .75; font-size: 11px; }
.adv { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 10px; font-weight: 800; font-size: 13px; } .adv small { color: var(--mut); font-weight: 600; flex-basis: 100%; padding-left: 22px; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 8px; font: 800 11px var(--font); color: #fff; background: #8a7a68; } .pill.ok { background: #2f9e5b; } .pill.ko { background: #c2410c; }
.netbox { border-top: 2px dashed #e3cfa9; margin-top: 10px; padding-top: 8px; } .netbox p { margin: 6px 0; }
.peers { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; } .peers .cut { position: static; width: 24px; height: 24px; font-size: 13px; margin-left: 4px; }
.vchips, .legend { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 8px; } .legend { font-size: 12px; color: var(--mut); align-items: center; }
.vchip { border: 2px solid transparent; border-radius: 10px; padding: 4px 8px; font: 800 12px var(--font); cursor: pointer; background: #f3e6cc; }
.vchip.on { border-color: var(--ink); } .v10 { background: #facc15; } .v20 { background: #60a5fa; } .v1 { background: var(--acc); }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
@media (max-width: 1180px) { .hint { display: none; } .pill { min-width: 0; } .pill small { display: none; } .tray { width: calc(100vw - 190px); left: 14px; transform: none; } }
@media (max-width: 760px) {
  .player { padding: 6px 10px 6px 6px; } .emblem { width: 38px; height: 38px; } .who small { display: none; }
  .tools { top: auto; bottom: 108px; left: 14px; }
  .res { top: 76px; left: 14px; right: 14px; transform: none; } .pill { flex: 1; grid-template-columns: 26px 1fr; padding: 5px 8px 5px 5px; } .pill .ic { width: 26px; height: 26px; } .pill b { font-size: 13px; }
  .dock { display: flex; bottom: 16px; } .dock .round:not(#labBtn):not(#netBtn):not(#missBtn) { display: none; } .build { width: 100px; height: 70px; }
  .lab { height: calc(100vh - 100px); } .lab-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; } .tdet { max-height: 42vh; }
  .tray, .ctx, .netp { left: 8px; right: 8px; width: auto; bottom: 98px; top: auto; transform: none; max-height: 60vh; overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) { .bc, .toast { transition: none; } }

.ctx .warn { color: #b4553a; font-weight: 800; font-size: 12px; margin: 6px 0; width: 100%; }

/* Expérience joueur (8) : tutoriel, avis */
.tuto-focus { animation: tutofocus 1.2s ease-in-out infinite; z-index: 7; } /* pas de position : le bouton ciblé garde la sienne (fixe) */
@keyframes tutofocus { 50% { box-shadow: 0 0 0 6px rgba(242, 182, 50, .9), 0 0 24px 8px rgba(242, 182, 50, .55); } }
.coach { left: 50%; bottom: 66px; transform: translateX(-50%); width: min(620px, calc(100vw - 32px)); padding: 10px 12px; display: flex; gap: 12px; align-items: center; z-index: 8; }
.coach.cheer { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
.coach .mascot { width: 56px; height: 56px; flex: none; }
.coach .ctext { flex: 1; display: grid; gap: 2px; } .coach .ctext small { color: var(--mut); font-weight: 800; } .coach .ctext span { font-size: 13px; color: var(--ink); }
.coach .cbtn { display: flex; gap: 6px; align-items: center; } .coach .cbtn .btn { padding: 6px 10px; font-size: 12px; } .coach .cbtn .x { position: static; }
.dots { display: flex; gap: 4px; margin-top: 4px; } .dots i { width: 8px; height: 8px; border-radius: 4px; background: #e3cfa9; } .dots i.on { background: #f2b632; } .dots i.ok { background: #2f9e5b; }
.avisp { right: 14px; top: 92px; width: 320px; padding: 14px; z-index: 9; } .avisp textarea { width: 100%; box-sizing: border-box; border-radius: 12px; border: 2px solid #e3cfa9; padding: 8px; font: inherit; resize: vertical; margin: 6px 0; }
@media (prefers-reduced-motion: reduce) { .tuto-focus, .coach.cheer { animation: none; outline: 4px solid #f2b632; } }
@media (max-width: 760px) { .coach { bottom: 96px; } .coach .mascot { display: none; } .avisp { left: 8px; right: 8px; width: auto; } }

/* Barre de ressources (8.5) : trois cartouches distinctes, compactes, dans la DA (crème, liseré, relief doux) */
.res { top: 12px; z-index: 4; gap: 10px; }
.rc { --c: var(--cr); --d: #b8860b; --l: #ffe08a; position: relative; display: grid; grid-template-columns: 38px auto; column-gap: 8px; align-items: center;
  min-width: 150px; padding: 5px 14px 9px 6px; border-radius: 16px; background: linear-gradient(#fffdf7, #f6ead2); border: 2px solid var(--c);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .85), 0 3px 0 var(--d), 0 7px 14px rgba(60, 40, 10, .18); }
.rc.bp { --c: var(--bp); --d: #6d48c9; --l: #d5c2ff; } .rc.cpu { --c: var(--cpu); --d: #1f7fae; --l: #a9e3fb; }
.rc .ic { grid-row: span 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, var(--l), var(--c) 55%, var(--d)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 2px 0 rgba(0, 0, 0, .12); }
.rc .ic svg { width: 21px; height: 21px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
.rc .rv { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.rc .val { font: 900 20px/1.05 var(--font); color: var(--ink); font-variant-numeric: tabular-nums; }
.rc .cap { font: 800 11px var(--font); color: var(--dim); font-variant-numeric: tabular-nums; }
.rc .rate { font: 800 11px/1.2 var(--font); color: var(--d); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc .gauge { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 3px; border-radius: 2px; background: var(--well); }
.rc .gauge > span { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--c); transition: width .6s; }
.rc .tag { position: absolute; top: -9px; right: 8px; font: 900 9px/1 var(--font); letter-spacing: .04em; color: #fff; background: var(--warn); border-radius: 6px; padding: 3px 6px; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.rc.near .gauge > span { background: var(--warn); }
.rc.full { border-color: var(--bad); } .rc.full .tag { background: var(--bad); } .rc.full .gauge > span { background: var(--bad); }
.rc .need { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); font: 900 11px/1 var(--font); color: #fff; background: var(--bad); border-radius: 8px; padding: 3px 7px; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.rc.miss { border-color: var(--bad); }
.rc.gain { animation: rcbump .45s cubic-bezier(.3, 1.6, .5, 1); } @keyframes rcbump { 40% { transform: scale(1.08); } }
.rc.shake { animation: rcshake .4s; } @keyframes rcshake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
.rc .float { position: absolute; right: 10px; top: 2px; font: 900 13px var(--font); color: var(--good); text-shadow: 0 1px 0 #fff; pointer-events: none; animation: rcfloat 1.1s ease-out forwards; }
@keyframes rcfloat { from { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-16px); } }
@media (prefers-reduced-motion: reduce) { .rc.gain, .rc.shake, .rc .float { animation: none; } }
@media (min-width: 1900px) { .rc { min-width: 172px; } .rc .val { font-size: 22px; } .rc .ic { width: 42px; height: 42px; } .rc { grid-template-columns: 42px auto; } }
@media (min-width: 2400px) { .res { transform: translateX(-50%) scale(1.2); transform-origin: top center; } }
@media (max-width: 1180px) and (min-width: 761px) { .res { left: 306px; transform: none; } .boosts { left: 306px; transform: none; } .rc { min-width: 0; } }
@media (max-width: 960px) and (min-width: 761px) { .rc .cap { display: none; } .rc { padding-right: 10px; } }
@media (max-width: 760px) { .res { top: 76px; gap: 6px; } .rc { flex: 1; min-width: 0; grid-template-columns: 26px auto; column-gap: 5px; padding: 4px 6px 8px 4px; border-radius: 12px; }
  .rc .ic { width: 26px; height: 26px; } .rc .ic svg { width: 15px; height: 15px; } .rc .val { font-size: 14px; } .rc .cap { display: none; } .rc .rate { font-size: 10px; } }
