/* ============================================================
   ASTRA GENESIS, 40-REFONTE.CSS
   v0.91.2, chapitre « redesign » (clôture en v0.92.0) : l'habillage de
   l'écran d'accueil (coins coupés, liseré cyan, panneaux sombres) étendu
   au jeu, d'après les croquis de l'utilisateur du 31/10/2026. Une
   évolution, pas un changement total : mêmes couleurs, mêmes écrans.

   Règles de la refonte :
     - rien qui se voie « fait par une IA » : ni point lumineux ou qui
       pulse, ni halo au repos, ni police « terminal » pour les libellés
       et les chiffres, ni sur-titre, ni cartes toutes identiques, ni
       émoji ;
     - des images partout (ressources peintes, planètes, illustrations
       attendues sous leur nom définitif) ;
     - DEUX FORMES, pas plus :
         * un BLOC (panneau, fenêtre, panneau latéral, infobulle, élément
           posé sur le fond de l'écran) a ses quatre coins coupés :
           --rf-oct, liseré --rf-ring ;
         * tout ce qui est POSÉ DANS UN BLOC (bouton, ligne, carte,
           puce, champ, image) a trois coins coupés, comme les onglets de
           titre : en haut à gauche, un petit pan en haut à droite, un
           grand pan en bas à droite, le coin bas gauche droit (« ça donne
           une dynamique ») : --rf-in, liseré --rf-in-ring ;
         * une étiquette (badge) est une pastille teintée de sa couleur,
           coupée en haut à gauche et en bas à droite, sans contour ;
     - le liseré suit toujours la coupe : par un calque ::after en anneau
       quand l'élément en a un de libre, sinon dessiné dans son fond
       (§0, « cadre dans le fond ») ;
     - chaque panneau : onglet de titre avec son pictogramme
       (AG.panelTabHTML, js/00zi-pictos.js) et sa couleur (--pn-c) : cyan
       par défaut, ambre pour ce qui demande une action, violet pour la
       recherche et les colonies, rose pour les menaces.

   Ce fichier est chargé en dernier : il passe devant les anciennes
   règles sans les modifier. Portée au 01/11/2026 : barre du haut, menu du
   bas, notifications, panneau latéral, infobulles, fenêtres, l'écran
   Contrôle (trois onglets), l'écran Bâtiments (v0.91.3, ses fenêtres
   Détails et Main-d'oeuvre comprises), Usines (v0.91.4) et Quêtes
   (v0.91.6), puis Expéditions, Recherche, le lobby, le Hangar et le
   Marché (v0.91.8 à v0.91.12). Les autres écrans y entrent vue par vue en
   reprenant les mêmes formes ; à la clôture (v0.92.0), les anciennes
   règles devenues inutiles sont retirées de leurs fichiers.

   Sommaire : 0. formes  1. barre du haut  2. menu du bas
   3. panneaux de l'écran Contrôle  4. Centre de contrôle  5. Messages
   6. tutoriel  7. infobulles, fenêtres, bulles  8. panneau latéral et
   alertes  9. fenêtres du Centre de contrôle  10. notifications
   11. écran Bâtiments (v0.91.3)  12. surbrillance du tutoriel
   15. bandeau des alertes et ses icônes (v0.91.5)
   13. arbre technologique (v0.91.3)  14. écran Usines (v0.91.4)
   16. écran Quêtes (v0.91.6)  17. couleurs par sens (v0.91.7)
   18. écran Expéditions (v0.91.8)  19. écran Recherche (v0.91.9)
   20. lobby des serveurs (v0.91.10)  21. écran Hangar (v0.91.11)
   22. écran Marché (v0.91.12)  23. écran Carte (v0.91.13)
   24. écran Profil et Réglages (v0.91.14)  25. écran Alliance (v0.91.15)
   26. écran Support (v0.92.1)  27. onglet Finances (v0.93.1)
   ============================================================ */

/* ============================================================
   0. COULEURS ET FORMES
   ============================================================ */
/* Palette APAISÉE (31/10/2026, « ça pète les yeux, il faut que ce soit
   reposant ») : des teintes moins saturées que les couleurs d'origine du
   jeu (cyan #2DD4BF, rose #F87171...), des liserés fins et discrets. Le
   joueur passe des heures sur ces écrans : la couleur signale, elle ne
   remplit pas. Toute nouvelle couleur de la refonte se prend ici. */
:root{
  --rf-line:rgba(95,170,160,.36);       /* liseré des blocs */
  --rf-line-soft:rgba(95,170,160,.13);  /* séparateurs internes */
  --rf-edge:#29425A;                    /* liseré d'un élément au repos */
  --rf-bg:rgba(0,4,10,.85);             /* fond des blocs : noir fumé de l'écran Recherche (v0.91.7.3, était le bleu nuit rgba(6,13,22,.86)) */
  --rf-cyan:#5FB5A9;                    /* vert d'eau du jeu (--cyan) */
  --rf-amber:#DDA048;
  --rf-violet:#9C8FDA;
  --rf-rose:#DE7F8C;
  --rf-label:#A5B3C2;                   /* libellés */
  --rf-dim:#8396AA;                     /* heures, mentions secondaires */
  --rf-text:#BCC6D0;                    /* texte courant, jamais de blanc pur */
  --rf-text-hi:var(--ink-1);            /* titres, valeurs, survol (#CCD4DC) */
  --rf-cut:10px;
  /* bouton d'action principale (01/11/2026, retour de l'utilisateur :
     « ce jaune/orange bien précis », celui du bouton héros d'origine,
     css/11-quests.css) : plein, avec son relief */
  --rf-hero:#F59E0B;
  --rf-hero-hi:#FBBF24;
  --rf-hero-ink:#1A1003;
  /* couleurs par sens (v0.91.7, « tout est bleu, tout est identique ») :
     des teintes déjà présentes dans le jeu, chacune garde un seul sens
     sur tous les écrans (charte : docs/regles/interface.md) */
  --rf-green:#9CC979;                   /* gagné, obtenu, la vie de la colonie (plus jaune que l'accent) */
  --rf-blue:#7FA3CF;                    /* chiffres, information, historique */
  --rf-gold:#CDB65A;                    /* prestige : hauts faits, classement */
  --rf-orange:#D19A52;                  /* industrie, ouvriers */
  /* bouton principal rempli, comme le bouton d'origine du jeu */
  --rf-fill:#123B36;
  --rf-fill-hi:#1A5249;
  --rf-on-fill:#D5EEE8;
  --rf-fill-line:#8FDCCB;                /* liseré d'un bouton au survol */
}
/* couleurs des catégories de messages et d'alertes (d'origine :
   css/20-control-center.css), adoucies comme le reste */
/* contraste renforcé (réglage du joueur) : le texte courant remonte aussi */
html.contrast-high{--rf-text:#DCE3EA;}
.c-menaces{--cc-c:#D9848B;}
.c-energie{--cc-c:#CDB65A;}
.c-economie{--cc-c:#D19A52;}
.c-construction{--cc-c:#7FA3CF;}
.c-expeditions,.c-all{--cc-c:#5FB5A9;}
.c-diplomatie{--cc-c:#A196D3;}
/* Centre de contrôle : cyan, texte, niveaux d'alerte et balayage du
   radar (d'origine : css/20-control-center.css) */
.cc-root,.cc-modal{--cc-teal:#5FB5A9;--cc-text:var(--rf-text-hi);}
.cc-wrap .t-teal,.cc-modal .t-teal{--cc-t:#5FB5A9;}
.cc-wrap .t-amber,.cc-modal .t-amber{--cc-t:#D19A52;}
.cc-wrap .t-rose,.cc-modal .t-rose{--cc-t:#D9848B;}
.cc-wrap .t-violet{--cc-t:#A196D3;}
.cc-modal :is(.cc-select, .cc-sim-unit),.cc-select option{color:var(--rf-text);}
.cc-blip.sel .cc-blip-halo{stroke:var(--rf-text-hi);}
.cc-blip.k-pvp .cc-blip-core{fill:#D46A6A;}
.cc-b-held{fill:#5FB5A9;background:#5FB5A9;}
.cc-b-lost{fill:#D9848B;background:#D9848B;}
.cc-b-off{fill:#D19A52;background:#D19A52;}
.cc-sweep i{background:conic-gradient(from 0deg, rgba(95,181,169,0) 0deg, rgba(95,181,169,0) 300deg, rgba(95,181,169,.12) 356deg, rgba(95,181,169,.26) 360deg);}
/* Les formes se calculent sur chaque élément avec SA taille de coin :
   déclarées sur :root, elles garderaient la valeur de :root partout ;
   déclarées sur tous les éléments (*), elles coûtaient environ 200 ms à
   chaque recalcul complet du style (7 600 éléments, mesure du
   31/10/2026). Elles ne se calculent donc que sur les éléments qui les
   utilisent, listés ici ; leurs calques ::before et ::after en héritent.
   TOUT ÉLÉMENT QUI PREND UNE FORME (clip-path ou cadre de ce fichier)
   S'AJOUTE À CETTE LISTE : tools/refonte-css-tests.mjs le vérifie.
   --rf-cut : coin haut gauche (et les quatre pour un bloc) ;
   --rf-s / --rf-b : petit pan haut droit et grand pan bas droit d'un
   élément posé dans un bloc (par défaut, la moitié du coin et le coin
   plus 1 px, les proportions des onglets de titre). */
/* rf-formes:debut */
#screen-planet .panel,#screen-planet .dv2-dock-block,#screen-planet .dv2-id-card,#screen-planet .dv2-colony-select,
#screen-planet .dv2-chip,#screen-planet .cc-tabs,#screen-planet .cc-alert,#screen-planet .cc-card-art,#screen-planet .cc-card-img,
#screen-planet .msg-empty-img,#screen-planet .btn.sm,#screen-planet .dv2-legend-pill,
#screen-planet :is(.cc-chip, .cc-seg, .cc-legend, .cc-danger, .cc-tile, .cc-posture, .cc-card, .msg-tile, .msg-cat, .msg-row, .msg-agenda button),
#hud .hud-btn,#hud .res-hub,#nav .nav-btn.active,
.ag-tip,.tuto-bubble,.tuto-celebrate,.rurik-say,#modal,#confirm-box,#sidepanel,.toast,.rk-face,
:is(.tuto-bubble, .rurik-say, #modal, #confirm-box, #sidepanel) .btn.btn,
.ag-tip .rich-tip-go,#modal .sp-head .close,#sidepanel .sp-head .close,
.notif-banner,.notif-empty-img,#sidepanel :is(.notif-chip, .notif-item),
.cc-modal :is(.cc-select, .cc-num, .cc-stepper button, .cc-seg, .cc-chip, .cc-sim-kpi, .cc-sim-note, .cc-sim-col, .hg-gar),.cc-modal .hg-gar .hg-thumb,
#screen-buildings .panel,#screen-buildings .btn.sm,#screen-buildings .tt-open-btn,
#screen-buildings :is(.bcat-pill, .bld-card, .bld-sitework-item, .bld-workforce-mini, .bld-upgrade-btn, .bld-demolish-btn, .bld-staff-dd, .bld-wf-banner),
:is(#screen-buildings, .bld-sheet) .bld-chain-banner,
.bld-sheet :is(.bld-sheet-bg, .bcat-pill, .unlock-chip, .bld-ptable-wrap),
.bld-wf-modal :is(.bld-wf-banner, .pill-tab, .bcard, .unlock-chip),
.tt-wrap :is(.tt-card, .ag-select-btn, .ag-select-list),.tt-wrap .tt-search input,
#screen-factories .panel,#screen-factories .btn.sm,#screen-factories .tt-open-btn,#screen-factories .fgx-tabs,
#screen-factories :is(.bld-upgrade-btn, .bld-demolish-btn, .bld-staff-dd, .fg-node-card, .fgx-planet-row, .fgx-cat-row, .fgx-stat-tile, .fg-recipe-card, .fgx-cockpit-art, .fgx-tb-btn, .ag-select-btn, .ag-select-list, .fgx-table-wrap),
#screen-factories .fgx-tb-search input,#screen-factories .fgx-cockpit .pill-tab,
#fg-colonies-list .bcat-pill,#ribbon-alerts .ribbon-go,
#screen-quests .panel,#screen-quests .qx-campaign,#screen-quests .qx-screen-tabs,#screen-quests .btn.sm,#screen-quests #btn-deliver,
#screen-quests :is(.qx-campaign-summary, .qx-sum-img, .qs-lb-art, .pip, .pal-req-row, .qx-unlock, .qx-unlock-art, .qs-hist, .qs-lt, .qs-ach, .qs-achm, .qs-ach-badge, .qs-toggle-track, .qs-lb-scroll, .qs-lb-mini),
#screen-quests :is(.qs-ach-chips, .qs-lb-bar) .pill-tab,
#screen-expeditions .panel,#screen-expeditions .xp-ribbon,#screen-expeditions .btn.sm,#screen-expeditions .qx-launch,#screen-expeditions .qx-tabs .pill-tab,
#qx-discoveries .qx-disc,
#screen-research .panel,#screen-research .rs-branch,#screen-research .btn.sm,#screen-research .rs-act-btn,
#lobby .hub-server,#lobby .hub-bar,#lobby .hub-news,#lobby .hub-opening,#lobby .hub-enter,#lobby .hub-logout,#lobby .hub-opening-cta,#lobby :is(#btn-lobby-steam, #btn-steam-play),
#lobby :is(.hub-stat, .hub-count-cell, .hub-server-note, .hub-avatar, .hub-news-empty-art),
#screen-research :is(.rs-tcard, .rs-colony, .rs-idle-art, .rs-bh-art, .rs-dt-hero, .rs-dt-fx, .rs-doc-card, .rs-doc-art),
#modal .hg-sel-art,#screen-hangar .panel,#screen-hangar .qx-screen-tabs,#screen-hangar .btn.sm,#screen-hangar .hg-hero,#screen-hangar .hg-search input,#screen-hangar .hg-slot.busy,#screen-hangar .hg-slot.free,
#screen-hangar :is(.hg-fslot, .hg-fresult, .hg-popover, .hg-card, .hg-mini, .hg-mission, .hg-gar, .hg-sel-stats, .hg-queue, .hg-act-btn, .hg-status-row, .hg-chip, .hg-x, .hg-legend-btn, .hg-cls-letter, .hg-immune, .hg-thumb, .hg-sel-art, .hg-fslot-art, .hg-silhouette, .hg-mini-art, .hg-empty-art, .hg-yard-off-art, .hg-yard-art, .ag-select-btn, .ag-select-list),
#screen-market .panel,#screen-market .qx-screen-tabs,#screen-market .btn.sm,#screen-market .mk-hero,#screen-market .mk-search input,#screen-market .mk-input,
#screen-market .mk-ctc-figs > div,
#screen-market :is(.mk-tx-total, .mk-static, .mk-place-sum, .mk-plan-cell, .mk-bonus, .mk-bonus-art, .mk-ctc, .mk-ctc-art, .mk-ctn-art, .mk-tx-art, .mk-empty-art, .mk-ref-art, .mk-res-img, .mk-seg-btn, .mk-ctn-tile, .mk-tx-bonus, .mk-ctn-fig, .mk-step, .mk-tool, .mk-auto, .mk-tx-after, .mk-ctc-crate, .ag-select-btn, .ag-select-list),
#screen-expeditions :is(.qx-qcard, .qx-qcard-art, .qx-thumb, .qx-run, .qx-slot, .qx-disc-empty, .qx-sensor-art, .qx-prep-empty-art, .qx-prep-art, .qx-ship, .qx-stat, .qx-picker-row, .qx-meter, .qx-dur, .qx-reward, .xp-sector-art, .xp-map-legend, .xp-zoom),
#screen-map .panel,#screen-map .btn.sm,#screen-map .map-hover,#screen-map .map-search input,
#screen-map :is(.map-tool, .map-zoom, .leg-item, .crumb-link, .crumb-cur, .pvh-num, .pvh-own, .sys-card, .map-sel-art, .map-squad-art, .sq-row, .md-note),
#screen-profile .panel,#screen-profile .pf-banner,#screen-profile .qx-screen-tabs,#screen-profile .btn.sm,#screen-profile .pref-input,
#screen-profile :is(.set-cat, .pf-stat, .pf-slot, .pf-emblem, .pf-avatar-edit, .pf-ally, .set-cat-art, .pf-guest-art, .vac-art, .acc-art, .pw-block, .vac-rules-box, .ag-select-btn, .ag-select-list, .ag-toggle, .ag-chip, .ag-pick),
#screen-alliance .panel,#screen-alliance .al-hero,#screen-alliance .qx-screen-tabs,#screen-support .qx-screen-tabs,#screen-alliance .btn.sm,#screen-alliance .pref-input,
#screen-alliance :is(.pf-stat, .al-art, .al-cos-card, .ag-toggle, .ag-pick),
#screen-support .panel,#screen-support .su-banner,#screen-support .btn.sm,#screen-support .pref-input,
#screen-support :is(.pf-stat, .su-art, .su-topic, .su-ticket, .su-cat, .su-bubble, .su-issue, .su-guide-card),
.qx-cmp-list :is(.qx-cmp-item, .qx-cmp-art, .qx-cmp-chip),.cn-card,.cn-all,.sh-side,.sh-item,.sh-pack,
#screen-planet :is(.fin-subnav, .fin-chip, .fin-kpi, .fin-state, .fin-ines-face, .fin-blank-img, .fin-table-wrap, .fin-colrow, .fin-dl, .fin-wl, .fin-bart),
.dfs :is(.dfs-card, .dfs-tag, .dfs-rule, .dfs-ask, .dfs-btn),.dfp :is(.dfp-art, .dfp-pending){
/* rf-formes:fin */
  --rf-s_:var(--rf-s, calc(var(--rf-cut) / 2));
  --rf-b_:var(--rf-b, calc(var(--rf-cut) + 1px));
  /* bloc : octogone, et son anneau de 1 px */
  --rf-oct:polygon(var(--rf-cut) 0, calc(100% - var(--rf-cut)) 0, 100% var(--rf-cut), 100% calc(100% - var(--rf-cut)), calc(100% - var(--rf-cut)) 100%, var(--rf-cut) 100%, 0 calc(100% - var(--rf-cut)), 0 var(--rf-cut));
  --rf-ring:polygon(evenodd, var(--rf-cut) 0, calc(100% - var(--rf-cut)) 0, 100% var(--rf-cut), 100% calc(100% - var(--rf-cut)), calc(100% - var(--rf-cut)) 100%, var(--rf-cut) 100%, 0 calc(100% - var(--rf-cut)), 0 var(--rf-cut), var(--rf-cut) 0, calc(var(--rf-cut) + .41px) 1px, 1px calc(var(--rf-cut) + .41px), 1px calc(100% - (var(--rf-cut) + .41px)), calc(var(--rf-cut) + .41px) calc(100% - 1px), calc(100% - (var(--rf-cut) + .41px)) calc(100% - 1px), calc(100% - 1px) calc(100% - (var(--rf-cut) + .41px)), calc(100% - 1px) calc(var(--rf-cut) + .41px), calc(100% - (var(--rf-cut) + .41px)) 1px, calc(var(--rf-cut) + .41px) 1px);
  /* élément posé dans un bloc : trois coins coupés, et son anneau */
  --rf-in:polygon(var(--rf-cut) 0, calc(100% - var(--rf-s_)) 0, 100% var(--rf-s_), 100% calc(100% - var(--rf-b_)), calc(100% - var(--rf-b_)) 100%, 0 100%, 0 var(--rf-cut));
  --rf-in-ring:polygon(evenodd, var(--rf-cut) 0, calc(100% - var(--rf-s_)) 0, 100% var(--rf-s_), 100% calc(100% - var(--rf-b_)), calc(100% - var(--rf-b_)) 100%, 0 100%, 0 var(--rf-cut), var(--rf-cut) 0, calc(var(--rf-cut) + .41px) 1px, 1px calc(var(--rf-cut) + .41px), 1px calc(100% - 1px), calc(100% - var(--rf-b_) - .41px) calc(100% - 1px), calc(100% - 1px) calc(100% - var(--rf-b_) - .41px), calc(100% - 1px) calc(var(--rf-s_) + .41px), calc(100% - var(--rf-s_) - .41px) 1px, calc(var(--rf-cut) + .41px) 1px);
  /* « cadre dans le fond » (élément sans calque libre : menu déroulant,
     champ, bouton) : côtés droits par une ombre intérieure de 1 px
     (couleur --rf-fl), biais des trois coins par un dégradé chacun, posé
     à l'intérieur de la coupe (centré sur la coupe, il y perdait sa
     moitié et paraissait plus fin que les côtés) */
  --rf-dtl:linear-gradient(to bottom right, transparent 50%, var(--rf-fl, var(--rf-edge)) 50%, var(--rf-fl, var(--rf-edge)) calc(50% + 1.2px), transparent calc(50% + 1.2px));
  --rf-dtr:linear-gradient(to bottom left, transparent 50%, var(--rf-fl, var(--rf-edge)) 50%, var(--rf-fl, var(--rf-edge)) calc(50% + 1.2px), transparent calc(50% + 1.2px));
  --rf-dbr:linear-gradient(to bottom right, transparent calc(50% - 1.2px), var(--rf-fl, var(--rf-edge)) calc(50% - 1.2px), var(--rf-fl, var(--rf-edge)) 50%, transparent 50%);
  --rf-frame-img:var(--rf-dtl), var(--rf-dtr), var(--rf-dbr);
  --rf-frame-pos:left top, right top, right bottom;
  --rf-frame-size:var(--rf-cut) var(--rf-cut), var(--rf-s_) var(--rf-s_), var(--rf-b_) var(--rf-b_);
}

/* ---------- relief des boutons (01/11/2026) ----------
   « les nouveaux boutons sont un peu fades et manquent de relief » :
   un dégradé discret (clair en haut, sombre en bas) passe sous les biais
   du cadre ; il suit la coupe et reste au survol (les règles de survol
   reprennent var(--rf-frame-img)). Plus franc sur un bouton plein
   (--rf-relief, posé par le bouton). */
#screen-planet .btn.sm,#screen-buildings .btn.sm,#screen-buildings .tt-open-btn,#screen-factories .btn.sm,#screen-factories .tt-open-btn,#screen-factories .fgx-tb-btn,
:is(.tuto-bubble, .rurik-say, #modal, #confirm-box, #sidepanel) .btn.btn,
.ag-tip .rich-tip-go,#hud .hud-btn,#hud .res-hub,
#screen-buildings :is(.bcat-pill, .bld-workforce-mini),.bld-sheet .bcat-pill,.bld-wf-modal .pill-tab,
#screen-quests .btn.sm,#screen-quests #btn-deliver,#screen-quests :is(.qs-ach-chips, .qs-lb-bar) .pill-tab,
#screen-expeditions .btn.sm,#screen-expeditions .qx-launch,#screen-expeditions .qx-tabs .pill-tab,
#screen-research .btn.sm,#screen-research .rs-act-btn,
#screen-hangar .btn.sm,#screen-hangar .hg-hero,#screen-hangar .hg-act-btn,
#screen-market .btn.sm,#screen-market .mk-hero,#screen-market .mk-seg-btn,#screen-market .mk-tool,
#screen-map .btn.sm,#screen-map .map-tool,
#screen-profile .btn.sm,#screen-profile .set-cat,
#screen-alliance .btn.sm,
#screen-support .btn.sm,#screen-support :is(.su-topic, .su-cat),
#lobby .hub-enter,#lobby .hub-logout,#lobby .hub-opening-cta,#lobby :is(#btn-lobby-steam, #btn-steam-play){
  --rf-relief:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 45%, rgba(0,0,0,.22));
  --rf-frame-img:var(--rf-dtl), var(--rf-dtr), var(--rf-dbr), var(--rf-relief);
  --rf-frame-pos:left top, right top, right bottom, 0 0;
  --rf-frame-size:var(--rf-cut) var(--rf-cut), var(--rf-s_) var(--rf-s_), var(--rf-b_) var(--rf-b_), 100% 100%;
}

/* ---------- cadre dans le fond : un seul jeu de règles ----------
   Tous les éléments posés dans un bloc qui n'ont pas de calque libre.
   Chacun règle ensuite --rf-cut (coin), --rf-fl (liseré) et sa couleur
   de fond (background-color, jamais « background », qui effacerait le
   cadre). */
#hud .hud-btn,
#hud .res-hub,
#screen-planet .btn.sm,
#screen-planet .dv2-legend-pill,
#screen-buildings .btn.sm,
#screen-buildings .tt-open-btn,
#screen-factories .btn.sm,
#screen-factories .tt-open-btn,
#screen-factories :is(.bld-upgrade-btn, .bld-demolish-btn, .bld-staff-dd, .fgx-tb-btn, .ag-select-btn, .ag-select-list, .fgx-table-wrap),
#screen-factories .fgx-tb-search input,
#screen-factories .fgx-cockpit .pill-tab,
#fg-colonies-list .bcat-pill,
#ribbon-alerts .ribbon-go,
#screen-quests .btn.sm,
#screen-quests #btn-deliver,
#screen-quests .pip,
#screen-quests :is(.qs-ach-chips, .qs-lb-bar) .pill-tab,
#screen-quests :is(.qs-toggle-track, .qs-lb-scroll, .qs-lb-mini),
#screen-expeditions .btn.sm,
#screen-expeditions .qx-launch,
#screen-expeditions .qx-tabs .pill-tab,
#screen-expeditions :is(.qx-slot, .qx-stat, .qx-picker-row, .qx-meter, .qx-dur, .qx-reward, .xp-map-legend, .xp-zoom),
#screen-research .btn.sm,
#screen-research .rs-act-btn,
#screen-research :is(.rs-colony, .rs-dt-fx),
#screen-hangar .btn.sm,
#screen-hangar .hg-hero,
#screen-hangar .hg-search input,
#screen-hangar .hg-slot.free,
#screen-hangar :is(.hg-act-btn, .hg-status-row, .hg-chip, .hg-x, .hg-legend-btn, .hg-cls-letter, .hg-immune, .hg-gar, .hg-sel-stats, .hg-queue, .ag-select-btn, .ag-select-list),
#screen-market .btn.sm,
#screen-market .mk-hero,
#screen-market .mk-search input,
#screen-market .mk-input,
#screen-market :is(.mk-seg-btn, .mk-ctn-tile, .mk-tx-bonus, .mk-ctn-fig, .mk-step, .mk-tool, .mk-auto, .mk-tx-after, .mk-ctc-crate, .ag-select-btn, .ag-select-list),
#screen-map .btn.sm,
#screen-map .map-search input,
#screen-map :is(.map-tool, .map-zoom, .leg-item, .crumb-link, .crumb-cur, .pvh-num, .pvh-own, .sq-row, .md-note),
#screen-profile .btn.sm,
#screen-profile .pref-input,
#screen-profile :is(.set-cat, .pf-stat, .pf-avatar-edit, .pf-ally, .ag-select-btn, .ag-select-list, .ag-toggle, .ag-chip, .ag-pick),
#screen-alliance .btn.sm,
#screen-alliance .pref-input,
#screen-alliance :is(.pf-stat, .al-cos-card, .ag-toggle, .ag-pick),
#screen-support .btn.sm,
#screen-support .pref-input,
#screen-support :is(.pf-stat, .su-topic, .su-ticket, .su-cat),
#lobby .hub-enter,
#lobby :is(#btn-lobby-steam, #btn-steam-play),
#lobby .hub-logout,
#lobby .hub-opening-cta,
#lobby :is(.hub-stat, .hub-count-cell, .hub-server-note),
.qx-cmp-list .qx-cmp-chip,
#screen-buildings :is(.bcat-pill, .bld-workforce-mini, .bld-upgrade-btn, .bld-demolish-btn, .bld-staff-dd),
:is(#screen-buildings, .bld-sheet) .bld-chain-banner,
.bld-sheet :is(.bcat-pill, .unlock-chip, .bld-ptable-wrap),
.bld-wf-modal :is(.pill-tab, .unlock-chip),
.tt-wrap :is(.ag-select-btn, .ag-select-list),
.tt-wrap .tt-search input,
:is(.tuto-bubble, .rurik-say, #modal, #confirm-box, #sidepanel) .btn.btn,
.ag-tip .rich-tip-go,
#modal .sp-head .close,
#sidepanel .sp-head .close,
.cc-modal :is(.cc-select, .cc-num, .cc-seg, .cc-chip, .cc-sim-kpi, .cc-sim-note, .cc-sim-col, .hg-gar),
.cc-modal .cc-stepper button{
  --rf-cut:6px;--rf-fl:var(--rf-line);
  border:0 !important;border-radius:0 !important;clip-path:var(--rf-in);
  box-shadow:inset 0 0 0 1px var(--rf-fl) !important;
  background-image:var(--rf-frame-img);background-position:var(--rf-frame-pos);
  background-size:var(--rf-frame-size);background-repeat:no-repeat;
}
/* au survol, un bouton garde son cadre (les anciennes règles de survol
   remplissaient le fond d'un bloc de couleur, ce qui l'effaçait) */
#screen-planet .btn.sm:hover:not(:disabled),
#screen-buildings .btn.sm:hover:not(:disabled),
#screen-factories .btn.sm:hover:not(:disabled),
#screen-quests .btn.sm:hover:not(:disabled),
#screen-expeditions .btn.sm:hover:not(:disabled),
#screen-research .btn.sm:hover:not(:disabled),
#screen-hangar .btn.sm:hover:not(:disabled),
#screen-market .btn.sm:hover:not(:disabled),
#screen-map .btn.sm:hover:not(:disabled),
#screen-profile .btn.sm:hover:not(:disabled),
#screen-alliance .btn.sm:hover:not(:disabled),
#screen-support .btn.sm:hover:not(:disabled),
:is(.tuto-bubble, .rurik-say, #modal, #confirm-box, #sidepanel) .btn.btn:hover:not(:disabled),
.ag-tip .rich-tip-go:hover{
  --rf-fl:var(--rf-cyan);background-image:var(--rf-frame-img);box-shadow:inset 0 0 0 1px var(--rf-fl) !important;
}

/* ============================================================
   1. BARRE DU HAUT
   Même dessin que la barre de l'accueil (.lobby-top, css/06-lobby.css) :
   décollée des bords (--edge), semi-transparente (le fond de l'écran
   se voit dessous), la ligne descend sur les côtés, coupe en biais dans
   les coins du bas et file en bas. ::before = fond, ::after = ligne.
   ============================================================ */
#hud{
  --edge:clamp(0px, 1vw, 16px);
  --hud-cut:calc(11px*var(--text-scale));
  --hud-line:rgba(95,170,160,.36);
  background:none;border-bottom:0;box-shadow:none;
  backdrop-filter:none;-webkit-backdrop-filter:none;
  padding:0 var(--edge);box-sizing:border-box;
}
#hud::before,#hud::after{
  content:'';position:absolute;top:0;bottom:0;left:var(--edge);right:var(--edge);z-index:-1;pointer-events:none;
}
/* fond en verre foncé, celui des blocs (bleu nuit de --rf-bg, léger
   flou), en dégradé comme une visière de casque : très léger en bas du
   cadre, presque opaque en haut ; seulement dans le cadre (les coins
   hors cadre gardent le fond de l'écran) */
#hud::before{
  background:linear-gradient(to top, rgba(6,13,22,.4) 0%, rgba(6,13,22,.72) 50%, rgba(6,13,22,.94) 100%);
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  clip-path:polygon(0 0, 100% 0, 100% calc(100% - var(--hud-cut)), calc(100% - var(--hud-cut)) 100%, var(--hud-cut) 100%, 0 calc(100% - var(--hud-cut)));
}
#hud::after{
  background:var(--hud-line);
  clip-path:polygon(evenodd, 0 0, 100% 0, 100% calc(100% - var(--hud-cut)), calc(100% - var(--hud-cut)) 100%, var(--hud-cut) 100%, 0 calc(100% - var(--hud-cut)), 0 0, 1px 0, 1px calc(100% - var(--hud-cut) - .4px), calc(var(--hud-cut) + .4px) calc(100% - 1px), calc(100% - var(--hud-cut) - .4px) calc(100% - 1px), calc(100% - 1px) calc(100% - var(--hud-cut) - .4px), calc(100% - 1px) 0, 1px 0);
}
#hud .hud-right{background:none;}
/* séparateurs, sens des onglets de titre : trait droit depuis le haut,
   puis biais vers la gauche dans le bas (2 px) */
#hud .hud-brand::after,
#hud .hud-right::before{
  --sc:calc(14px*var(--text-scale));
  width:var(--sc);background:var(--hud-line);
  clip-path:polygon(calc(100% - 2px) 0, 100% 0, 100% calc(100% - var(--sc)), 2.8px 100%, 0 100%, calc(100% - 2px) calc(100% - var(--sc) - .8px));
}
/* à gauche : le gouverneur, puis sa colonie, lisibles d'un coup d'oeil */
#hud .hud-brand{padding-left:calc(14px*var(--text-scale));}
#hud .hud-brand-txt{gap:2px;}
#hud .hud-brand .pseudo{font-family:var(--font-head);font-size:1rem;font-weight:700;letter-spacing:.04em;color:var(--rf-text-hi);text-transform:none;}
#hud .hud-brand .pseudo::before{content:none;}
#hud .hud-clock{font-family:var(--font-head);font-size:.9rem;font-weight:600;letter-spacing:.03em;color:var(--rf-cyan);}
#hud .hud-time{font-family:var(--font-head);font-weight:600;font-size:.95rem;letter-spacing:.04em;}

/* ressources : image peinte du pack, nom dans une étiquette de la couleur
   de la ressource, valeur en grand, débit dessous */
#hud .res{gap:calc(8px*var(--text-scale));padding:0 calc(11px*var(--text-scale));}
#hud .res:hover{background:rgba(95,181,169,.06);}
#hud .res .ic{
  width:calc(34px*var(--text-scale));height:calc(34px*var(--text-scale));
  background:none;border:0;box-shadow:none;border-radius:0;
}
#hud .res .ic .res-img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 3px rgba(0,0,0,.5));}
#hud .res .txt{gap:1px;}
#hud .res .name{
  --cut:4px;align-self:flex-start;
  padding:0 7px;line-height:1.45;font-family:var(--font-head);font-weight:700;font-size:.62rem;letter-spacing:.07em;
  color:var(--res-tint, var(--rf-cyan));
  background:color-mix(in srgb, var(--res-tint, var(--rf-cyan)) 14%, transparent);
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
#hud .res .v{font-family:var(--font-head);font-size:1.02rem;font-weight:700;letter-spacing:.01em;line-height:1.05;}
#hud .res .v.up,#hud .res .v.down{color:var(--ink-1);}
#hud .res .rate{font-family:var(--font-head);font-size:.72rem;font-weight:600;color:var(--rf-label);line-height:1.1;}
#hud .res .rate.up{color:#4ADE80;}
#hud .res .rate.down{color:var(--rf-rose);}
#hud .res.res-group-start{border-left:1px solid var(--rf-line-soft);}
/* bouton des matériaux et boutons à icône : cadre dans le fond */
#hud .res-hub{--rf-cut:7px;background-color:#07111b;font-family:var(--font-head);font-weight:700;letter-spacing:.08em;}
#hud .res-hub > *{position:relative;z-index:1;}
#hud .res-hub-ring,#hud .res-hub::before,#hud .res-hub::after{display:none;}
#hud .res-hub:hover,#hud .res-hub[aria-expanded="true"]{--rf-fl:var(--rf-cyan);}
#hud .hud-btn{
  background-color:#07111b;color:var(--ink-1);
  width:calc(40px*var(--text-scale));height:calc(32px*var(--text-scale));
}
#hud .hud-btn::before{display:none;}
#hud .hud-btn > *{position:relative;z-index:1;}
#hud .hud-btn:hover{--rf-fl:var(--rf-cyan);color:var(--rf-cyan);}
#hud .hud-badge{top:2px;right:3px;font-family:var(--font-head);border-radius:2px;z-index:2;}

/* images de ressource (barre du haut, matériaux, Scrip) */
.res-img{display:inline-block;vertical-align:middle;}
.sr-ic .res-img,.scrip-ic .res-img{width:100%;height:100%;object-fit:contain;}

/* le fond de l'écran Contrôle remonte sous la barre du haut et s'y voit,
   voilé en haut comme celui de l'accueil (.lobby-bg) ; seuls les calques
   de fond débordent, le contenu garde sa place */
#viewport:has(#screen-planet.active){overflow:visible;}
#screen-planet.screen,#screen-planet .holo-stage,#screen-planet .dv2-surface{overflow:visible;}
#screen-planet .dv2-surface-bg,
#screen-planet .cc-stage{top:calc(-1 * (var(--hud-h) + var(--ribbon-h)));}
#screen-planet .dv2-surface-bg{
  box-shadow:inset 0 calc(var(--hud-h) * 2.4) calc(var(--hud-h) * 1.8) calc(var(--hud-h) * -.6) rgba(4,7,13,.62);
}
/* v0.91.3 : même chose pour les écrans Bâtiments et Usines (retour de
   l'utilisateur : « le fond ne monte pas tout en haut comme sur la vue
   planète ») ; leur scène (image, éclairage, vignette) remonte sous la
   barre du haut, le voile du haut de l'image la garde lisible */
@media (min-width:1101px){
  #viewport:has(#screen-buildings.active),#viewport:has(#screen-factories.active){overflow:visible;}
  .screen.bld-fullbleed,.screen.fgx-fullbleed{overflow:visible;}
  .bldx-stage,.fgx-stage{top:calc(-1 * (var(--hud-h) + var(--ribbon-h)));}
  .bldx-stage-bg,.fgx-stage-bg{
    box-shadow:inset 0 calc(var(--hud-h) * 2.4) calc(var(--hud-h) * 1.8) calc(var(--hud-h) * -.6) rgba(4,7,13,.62);
  }
}
/* v0.91.12.1 : même chose pour les écrans du cadre commun (Quêtes,
   Expéditions, Recherche, Hangar, Marché) ; retour de l'utilisateur :
   « le header n'est pas transparent comme Contrôle, Bâtiments, Usines ».
   Seule la scène (image, variante Fusion du Hangar, éclairage) remonte
   sous la barre du haut ; le contenu garde sa place. */
@media (min-width:1101px){
  #viewport:has(.screen.qx-fullbleed.active){overflow:visible;}
  .screen.qx-fullbleed{overflow:visible;}
  .screen.qx-fullbleed .qx-wrap > .qx-stage{top:calc(-1 * (var(--hud-h) + var(--ribbon-h)));}
  .screen.qx-fullbleed .qx-stage-bg{
    box-shadow:inset 0 calc(var(--hud-h) * 2.4) calc(var(--hud-h) * 1.8) calc(var(--hud-h) * -.6) rgba(4,7,13,.62);
  }
}

/* ============================================================
   2. MENU DU BAS
   Barre encadrée d'un double filet, coins coupés ; pictogrammes pleins
   (js/00zi-pictos.js) ; entrée active dans une case à trois coins
   coupés ; un filet vertical entre deux entrées ; la marque du jeu
   (logo, nom, version) en bas à gauche.
   ============================================================ */
#nav .nav-bar{
  --cut:14px;
  position:relative;gap:0;border:0;border-radius:0;padding:5px 8px;
  background:var(--rf-line);
  clip-path:polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  box-shadow:none;
}
#nav .nav-bar::before{
  content:'';position:absolute;inset:1px;z-index:0;pointer-events:none;
  background:linear-gradient(180deg, rgba(10,22,35,.97), rgba(5,11,19,.97));
  clip-path:polygon(calc(var(--cut) - .4px) 0, calc(100% - var(--cut) + .4px) 0, 100% calc(var(--cut) - .4px), 100% calc(100% - var(--cut) + .4px), calc(100% - var(--cut) + .4px) 100%, calc(var(--cut) - .4px) 100%, 0 calc(100% - var(--cut) + .4px), 0 calc(var(--cut) - .4px));
}
/* second filet, à 4 px du bord */
#nav .nav-bar::after{
  content:'';position:absolute;inset:4px;z-index:0;pointer-events:none;
  border-top:1px solid var(--rf-line-soft);border-bottom:1px solid var(--rf-line-soft);
}
#nav .nav-btn{
  z-index:1;border:0;border-radius:0;background:none;gap:5px;
  min-width:calc(84px*var(--scale));padding:calc(9px*var(--scale)) calc(12px*var(--scale)) calc(8px*var(--scale));
  color:var(--rf-label);
}
#nav .nav-btn + .nav-btn::before{
  content:'';position:absolute;left:0;top:22%;bottom:22%;width:1px;background:var(--rf-line-soft);
}
#nav .nav-sep{z-index:1;width:1px;margin:10px 3px;background:var(--rf-line);opacity:.7;}
#nav .nav-sep + .nav-btn::before{display:none;}
#nav .nav-btn svg{width:calc(25px*var(--scale));height:calc(25px*var(--scale));color:var(--rf-text);}
#nav .nav-btn .lbl{font-family:var(--font-head);font-weight:700;font-size:.7rem;letter-spacing:.06em;color:#B9C8DA;}
#nav .nav-btn:hover{background:rgba(95,181,169,.07);}
#nav .nav-btn:hover svg,#nav .nav-btn:hover .lbl{color:var(--rf-text-hi);}
#nav .nav-btn.active{--rf-cut:8px;background:#0E2C29;clip-path:var(--rf-in);}
#nav .nav-btn.active::after{
  content:'';position:absolute;inset:0;pointer-events:none;background:var(--rf-cyan);clip-path:var(--rf-in-ring);
}
#nav .nav-btn.active::before,
#nav .nav-btn.active + .nav-btn::before{display:none;}
#nav .nav-btn.active svg,#nav .nav-btn.active .lbl{color:var(--rf-cyan);filter:none;}
/* nouveauté sur une entrée : un losange, plus de point lumineux */
#nav .nav-btn .ping{top:8px;right:16px;width:7px;height:7px;border:0;border-radius:0;box-shadow:none;transform:rotate(45deg);}

/* marque du jeu : une plaque à coins coupés, comme la barre du menu
   (v0.92.15.23 ; la marge intérieure est retirée de la position pour
   que logo et texte restent à leur place d'avant) */
.nav-brand{
  --cut:10px;
  position:fixed;z-index:801;left:calc(clamp(0px, 1vw, 16px) + 4px);bottom:calc(14px*var(--scale) - 8px);
  display:flex;align-items:center;gap:10px;pointer-events:auto;padding:8px 18px 8px 10px;
}
.nav-brand-logo{width:34px;height:34px;flex:none;}
.nav-brand-txt{display:flex;flex-direction:column;line-height:1.15;}
.nav-brand-name{font-family:var(--font-display);font-weight:600;font-size:.78rem;letter-spacing:.3em;color:var(--rf-text-hi);white-space:nowrap;}
.nav-brand .ver{
  align-self:flex-start;padding:0;border:0;background:none;cursor:pointer;
  font-family:var(--font-head);font-size:.8rem;font-weight:600;letter-spacing:.04em;color:var(--rf-text-hi);
}
/* v0.92.15.5 (audit D2-05) : la marque et le numéro de version (que les
   testeurs citent) passent sur le fond de chaque écran : sur le sol clair
   du Support, 3,24 à 3,83 même sans le vignettage. Voile sombre fondu
   derrière, sans bord, et texte en --rf-text-hi.
   v0.92.15.23 : cet ovale se voyait comme une tache noire sur les fonds
   clairs (signalé par l'utilisateur). Un voile plus large passait sur les
   textes des écrans en 1366 (la marque est au-dessus d'eux) : la marque
   prend donc la plaque du menu, filet clair (::after) et fond sombre
   (::before), à sa taille exacte. */
.nav-brand::after{
  content:'';position:absolute;z-index:-2;inset:0;pointer-events:none;background:var(--rf-line);
  clip-path:polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.nav-brand::before{
  content:'';position:absolute;z-index:-1;inset:1px;pointer-events:none;
  background:linear-gradient(180deg, rgba(10,22,35,.97), rgba(5,11,19,.97));
  clip-path:polygon(calc(var(--cut) - .4px) 0, calc(100% - var(--cut) + .4px) 0, 100% calc(var(--cut) - .4px), 100% calc(100% - var(--cut) + .4px), calc(100% - var(--cut) + .4px) 100%, calc(var(--cut) - .4px) 100%, 0 calc(100% - var(--cut) + .4px), 0 calc(var(--cut) - .4px));
}
.nav-brand .ver:hover,.nav-brand .ver:focus-visible{color:var(--rf-cyan);outline:none;text-decoration:underline;}
/* écran trop étroit pour le nom à côté du menu : le logo seul */
/* v0.91.5 : sous 1440 px aussi (à 1366, « Astra Genesis » couvrait la
   première icône du menu) */
@media (max-width:1700px){ .nav-brand-name{display:none;} }
@media (max-width:1100px){
  .nav-brand{bottom:calc(var(--nav-h) + 8px);padding:5px 12px;}
  .nav-brand-logo,.nav-brand-name{display:none;}
}
/* v0.92.0 : mention « jeu en développement », pendant de la marque en bas
   à droite ; fond rouge pâle demandé par l'utilisateur, coins coupés */
.nav-wip{
  position:fixed;z-index:801;right:calc(clamp(0px, 1vw, 16px) + 14px);bottom:calc(14px*var(--scale));
  display:flex;flex-direction:column;gap:1px;padding:6px 12px 7px 14px;white-space:nowrap;
  background:#EFC7C9;color:#5C1A22;line-height:1.2;pointer-events:none;
  clip-path:polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  font-family:var(--font-head);
}
.nav-wip-head{display:flex;align-items:center;justify-content:space-between;gap:6px;}
.nav-wip strong{font-weight:700;font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;}
.nav-wip-body{font-weight:600;font-size:.76rem;}
/* le « ? » ouvre l'infobulle (nav.wipTip) : seul point cliquable de la mention */
.nav-wip-help{
  display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;border-radius:50%;
  border:1px solid rgba(92,26,34,.55);font-size:.66rem;font-weight:700;line-height:1;cursor:help;pointer-events:auto;
}
.nav-wip-help:hover,.nav-wip-help:focus-visible{background:#5C1A22;color:#EFC7C9;border-color:#5C1A22;outline:none;}
/* à 1366, le menu du bas s'arrête à 1118 : 200 px de large laissent 20 px
   d'écart. À 1280 (menu jusqu'à 1075), le titre seul ; au-dessus du menu,
   la mention couvrirait le Compas, donc seulement sous 1100 px, comme la
   marque */
@media (max-width:1500px){
  .nav-wip{padding:5px 9px 6px 11px;}
  .nav-wip strong{font-size:.68rem;letter-spacing:.08em;}
  .nav-wip-body{font-size:.7rem;}
}
@media (max-width:1300px){
  .nav-wip{padding:5px 8px 5px 10px;}
  .nav-wip strong{letter-spacing:.04em;}
  .nav-wip-body{display:none;}
}
@media (max-width:1100px){ .nav-wip{bottom:calc(var(--nav-h) + 8px);} }

/* ============================================================
   3. PANNEAUX DE L'ÉCRAN CONTRÔLE (blocs et leur contenu)
   ============================================================ */
/* la police « terminal » disparaît de l'écran, de la barre du haut, du
   menu et de la bulle du tutoriel : chiffres à chasse fixe pour rester
   alignés (Rajdhani étant plus étroite, les libellés sont agrandis) */
#screen-planet,#screen-buildings,#screen-factories,#screen-quests,#screen-expeditions,#screen-research,#screen-hangar,#screen-market,#screen-map,#screen-profile,#screen-alliance,#screen-support,.qx-cmp-list,#fg-colonies-list,.bld-sheet,.bld-wf-modal,#hud,#nav,.tuto-bubble{--font-mono:var(--font-head);font-variant-numeric:tabular-nums;}

#screen-planet .panel,
#screen-planet .dv2-dock-block,
#screen-buildings .panel,
#screen-factories .panel,
#screen-quests .panel,
#screen-quests .qx-campaign,
#screen-expeditions .panel,
#screen-expeditions .xp-ribbon,
#screen-research .panel,
#screen-research .rs-branch,
#screen-hangar .panel,
#screen-hangar .hg-fslot,
#screen-hangar .hg-fresult,
#screen-hangar .hg-popover,
#screen-market .panel,
#screen-map .panel,
#screen-profile .panel,
#screen-support .panel,
#screen-alliance .panel{
  --pn-c:var(--rf-cyan);
  position:relative;border:0;border-radius:0;box-shadow:none;
  /* v0.91.7 : chaque bloc garde la couleur de son onglet, très
     légèrement, en haut de son fond et dans son liseré */
  background:linear-gradient(180deg, color-mix(in srgb, var(--pn-c) 15%, transparent), transparent 170px), var(--rf-bg);
  /* le fond de l'écran se devine flouté derrière chaque bloc, sur tous
     les écrans refaits (v0.91.7.1 : Bâtiments, Usines et Quêtes l'avaient
     perdu bloc par bloc) ; réglage du jeu --glass-blur */
  backdrop-filter:blur(var(--glass-blur));-webkit-backdrop-filter:blur(var(--glass-blur));
  clip-path:var(--rf-oct);
  animation:none;
}
#screen-planet .panel::after,
#screen-planet .dv2-dock-block::after,
#screen-buildings .panel::after,
#screen-factories .panel::after,
#screen-quests .panel::after,
#screen-quests .qx-campaign::after,
#screen-expeditions .panel::after,
#screen-expeditions .xp-ribbon::after,
#screen-research .panel::after,
#screen-research .rs-branch::after,
#screen-hangar .panel::after,
#screen-hangar .hg-fslot::after,
#screen-hangar .hg-fresult::after,
#screen-hangar .hg-popover::after,
#screen-market .panel::after,
#screen-map .panel::after,
#screen-profile .panel::after,
#screen-support .panel::after,
#screen-alliance .panel::after{
  content:'';position:absolute;inset:0;z-index:3;pointer-events:none;
  background:color-mix(in srgb, var(--pn-c) 52%, var(--rf-line));clip-path:var(--rf-ring);
}
/* couleurs d'onglet */
#phase-panel,#advisor-panel,#cc-panel-posture,#msg-panel-agenda,.dv2-dock-block.dock-build{--pn-c:var(--rf-amber) !important;}
#colonies-panel,.dv2-dock-block.dock-research{--pn-c:var(--rf-violet) !important;}
#cc-panel-incursions,#cc-panel-status{--pn-c:var(--rf-rose) !important;}

#screen-planet .panel-head,
#screen-buildings .panel-head,
#screen-factories .panel-head,
#screen-quests .panel-head,
#screen-expeditions .panel-head,
#screen-research .panel-head,
#screen-hangar .panel-head,
#screen-market .panel-head,
#screen-map .panel-head,
#screen-profile .panel-head,
#screen-support .panel-head,
#screen-alliance .panel-head{
  display:flex;align-items:center;gap:10px;min-height:38px;
  padding:0 12px 0 0;border-bottom:1px solid var(--rf-line-soft);
  font-family:var(--font-head);text-transform:none;letter-spacing:0;
}
/* l'onglet du titre (forme du croquis) : pan coupé en haut à gauche
   (celui du bloc), à droite une pointe à deux pans (petit en haut,
   grand en bas) ; liseré de la couleur du bloc (--pn-c) */
.pn-tab{
  --tab-tr:5px;--tab-br:11px;
  position:relative;isolation:isolate;flex:none;align-self:stretch;
  display:inline-flex;align-items:center;gap:9px;min-height:36px;
  padding:0 calc(var(--tab-br) + 14px) 0 11px;
}
.pn-tab::before{
  content:'';position:absolute;inset:0;z-index:-2;background:color-mix(in srgb, var(--pn-c, var(--rf-cyan)) 60%, #0A1521);
  clip-path:polygon(var(--rf-cut, 10px) 0, calc(100% - var(--tab-tr)) 0, 100% var(--tab-tr), 100% calc(100% - var(--tab-br)), calc(100% - var(--tab-br)) 100%, 0 100%, 0 var(--rf-cut, 10px));
}
.pn-tab::after{
  content:'';position:absolute;inset:1.5px;z-index:-1;
  background:linear-gradient(180deg, color-mix(in srgb, var(--pn-c, var(--rf-cyan)) 20%, #0A1521), color-mix(in srgb, var(--pn-c, var(--rf-cyan)) 6%, #08121D));
  clip-path:polygon(calc(var(--rf-cut, 10px) - .6px) 0, calc(100% - var(--tab-tr) + .6px) 0, 100% calc(var(--tab-tr) - .6px), 100% calc(100% - var(--tab-br) + .6px), calc(100% - var(--tab-br) + .6px) 100%, 0 100%, 0 calc(var(--rf-cut, 10px) - .6px));
}
.pn-ic{display:inline-flex;width:20px;height:20px;flex:none;color:var(--pn-c, var(--rf-cyan));}
.pn-ic svg{width:100%;height:100%;}
/* titre teinté, très légèrement, de la couleur de son bloc (--pn-c) */
.pn-title{font-family:var(--font-head);font-weight:700;font-size:.8rem;letter-spacing:.06em;text-transform:uppercase;color:color-mix(in srgb, var(--pn-c, var(--rf-cyan)) 40%, var(--rf-text-hi));white-space:nowrap;}
/* indication à droite de l'en-tête, en clair */
#screen-planet .panel-head .eyebrow,
#screen-buildings .panel-head .eyebrow,
#screen-factories .panel-head .eyebrow,
#screen-quests .panel-head .eyebrow,
#screen-expeditions .panel-head .eyebrow,
#screen-research .panel-head .eyebrow,
#screen-hangar .panel-head .eyebrow,
#screen-market .panel-head .eyebrow,
#screen-map .panel-head .eyebrow,
#screen-profile .panel-head .eyebrow,
#screen-support .panel-head .eyebrow,
#screen-alliance .panel-head .eyebrow{
  margin-left:auto;font-family:var(--font-head);font-size:.82rem;font-weight:600;letter-spacing:.02em;
  color:var(--rf-label);text-transform:none;display:inline-block;
}
#screen-planet .panel-head .eyebrow::first-letter,
#screen-buildings .panel-head .eyebrow::first-letter,
#screen-factories .panel-head .eyebrow::first-letter,
#screen-quests .panel-head .eyebrow::first-letter,
#screen-expeditions .panel-head .eyebrow::first-letter,
#screen-research .panel-head .eyebrow::first-letter,
#screen-hangar .panel-head .eyebrow::first-letter,
#screen-market .panel-head .eyebrow::first-letter,
#screen-map .panel-head .eyebrow::first-letter,
#screen-profile .panel-head .eyebrow::first-letter,
#screen-support .panel-head .eyebrow::first-letter,
#screen-alliance .panel-head .eyebrow::first-letter{text-transform:uppercase;}
/* chevron de repli : un simple chevron cyan, sans pastille remplie */
#screen-planet .panel-head > .panel-collapse,
#screen-buildings .panel-head > .panel-collapse,
#screen-factories .panel-head > .panel-collapse,
#screen-quests .panel-head > .panel-collapse,
#screen-expeditions .panel-head > .panel-collapse,
#screen-research .panel-head > .panel-collapse,
#screen-hangar .panel-head > .panel-collapse,
#screen-market .panel-head > .panel-collapse,
#screen-map .panel-head > .panel-collapse,
#screen-profile .panel-head > .panel-collapse,
#screen-support .panel-head > .panel-collapse,
#screen-alliance .panel-head > .panel-collapse{
  border:0;background:none;color:var(--rf-cyan);width:22px;height:22px;padding:0;border-radius:0;
}
#screen-planet .agc.collapsed .agc-head > .panel-collapse{background:none;color:var(--rf-cyan);}
#screen-planet .agc.collapsed .agc-head > .panel-collapse svg path{fill:none;}
/* plus de pastille ambre lumineuse sur un panneau replié */
.agc-dot{display:none !important;}
#screen-planet .panel-body,
#screen-buildings .panel-body,
#screen-factories .panel-body,
#screen-quests .panel-body,
#screen-expeditions .panel-body,
#screen-research .panel-body,
#screen-hangar .panel-body,
#screen-market .panel-body,
#screen-map .panel-body,
#screen-profile .panel-body,
#screen-support .panel-body,
#screen-alliance .panel-body{font-family:var(--font-head);}
#screen-planet .qx-hint{font-family:var(--font-head);font-size:.88rem;}
#screen-planet .qx-link{font-family:var(--font-head);font-size:.84rem;font-weight:600;}

/* petits boutons des écrans : cadre dans le fond (§0), texte cyan ;
   ambre plein pour l'action principale */
#screen-planet .btn.sm,
#screen-buildings .btn.sm,
#screen-factories .btn.sm,
#screen-quests .btn.sm,
#screen-expeditions .btn.sm,
#screen-research .btn.sm,
#screen-hangar .btn.sm,
#screen-market .btn.sm,
#screen-map .btn.sm,
#screen-profile .btn.sm,
#screen-support .btn.sm,
#screen-alliance .btn.sm{
  --rf-cut:5px;background-color:#08141F;color:var(--rf-cyan);
  font-family:var(--font-head);font-weight:700;letter-spacing:.08em;text-transform:uppercase;position:relative;
}
#screen-planet .btn.sm::before{content:none;}
#screen-planet .btn.sm:hover:not(:disabled),
#screen-buildings .btn.sm:hover:not(:disabled),
#screen-factories .btn.sm:hover:not(:disabled),
#screen-quests .btn.sm:hover:not(:disabled),
#screen-expeditions .btn.sm:hover:not(:disabled),
#screen-research .btn.sm:hover:not(:disabled),
#screen-hangar .btn.sm:hover:not(:disabled),
#screen-market .btn.sm:hover:not(:disabled),
#screen-map .btn.sm:hover:not(:disabled),
#screen-profile .btn.sm:hover:not(:disabled),
#screen-support .btn.sm:hover:not(:disabled),
#screen-alliance .btn.sm:hover:not(:disabled){background-color:#0E2C29;color:var(--rf-text-hi);}
:is(#screen-planet, #screen-buildings, #screen-factories, #screen-quests, #screen-expeditions, #screen-research, #screen-hangar, #screen-market, #screen-map, #screen-profile, #screen-alliance, #screen-support) .btn.primary.sm{
  --rf-fl:color-mix(in srgb, var(--rf-cyan) 75%, transparent);
  --rf-relief:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 45%, rgba(0,0,0,.18));
  background-color:var(--rf-fill);color:var(--rf-on-fill);
}
:is(#screen-planet, #screen-buildings, #screen-factories, #screen-quests, #screen-expeditions, #screen-research, #screen-hangar, #screen-market, #screen-map, #screen-profile, #screen-alliance, #screen-support) .btn.primary.sm:hover:not(:disabled){--rf-fl:var(--rf-fill-line);background-color:var(--rf-fill-hi);color:var(--rf-on-fill);}
#screen-planet .btn.amber.sm,#screen-planet .btn.qx-hero.sm{--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));background-color:var(--rf-hero);color:var(--rf-hero-ink);}
#screen-planet .btn.amber.sm:hover:not(:disabled),#screen-planet .btn.qx-hero.sm:hover:not(:disabled){--rf-fl:transparent;background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#screen-planet .btn.qx-hero:not(.sm){background:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18)), var(--rf-hero);color:var(--rf-hero-ink);box-shadow:none;}
#screen-planet .btn.qx-hero:not(.sm):hover:not(:disabled){background:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18)), var(--rf-hero-hi);}

/* lignes clé / valeur (signes vitaux, orbite, statut défensif) */
#screen-planet .mini-row,
#screen-planet .cc-kv,
#screen-buildings .mini-row{
  display:flex;align-items:center;gap:10px;min-height:32px;padding:3px 0;
  border-bottom:1px solid var(--rf-line-soft);font-family:var(--font-head);font-size:.95rem;
}
#screen-planet .mini-row:last-child,#screen-planet .cc-kv:last-child,#screen-buildings .mini-row:last-child{border-bottom:0;}
#screen-planet .mini-row .k,#screen-planet .cc-kv > span,#screen-buildings .mini-row .k{
  display:flex;align-items:center;gap:10px;flex:1;min-width:0;
  font-size:.95rem;font-weight:500;color:var(--rf-label);letter-spacing:.01em;text-transform:none;
}
#screen-planet .mini-row .v,#screen-planet .cc-kv > b,#screen-buildings .mini-row .v{
  margin-left:auto;font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);letter-spacing:.02em;white-space:nowrap;
}
#screen-planet .cc-kv b.dim{font-size:.9rem;color:var(--rf-dim);}
#screen-planet .mini-row .v.down{color:var(--rf-rose);}
#screen-planet .vs-ic,#screen-planet .cc-kv > span > i,#screen-buildings .vs-ic{display:inline-flex;width:20px;height:20px;flex:none;color:var(--rf-cyan);}
#screen-planet .vs-ic svg,#screen-planet .cc-kv > span > i svg,#screen-buildings .vs-ic svg{width:100%;height:100%;}
#screen-planet .vs-res,#screen-buildings .vs-res{width:24px;height:24px;margin:-2px;}
#screen-planet .vs-res .res-img,#screen-buildings .vs-res .res-img{width:100%;height:100%;object-fit:contain;}
/* colonne de droite : tout tient sur un écran de 1080 px de haut */
#screen-planet .side-stack .mini-row{min-height:29px;padding:2px 0;}
#screen-planet .side-stack .mini-row .k{font-size:.92rem;}
#screen-planet .side-stack .mini-row .v{font-size:.96rem;}
/* jauges Bonheur et Pollution : barres droites */
#screen-planet .vs-gauge .k{flex:0 0 auto;min-width:118px;}
.vs-bar{
  flex:1;height:8px;margin:0 6px;overflow:hidden;
  background:rgba(4,10,18,.9);box-shadow:inset 0 0 0 1px var(--rf-line-soft);
}
.vs-bar i{display:block;height:100%;width:0;background:var(--rf-cyan);transition:width .6s cubic-bezier(.2,.8,.2,1);}
.vs-bar.warn i{background:#F5C518;}

/* Conseiller : un losange de la couleur du niveau, sans halo */
#screen-planet .advisor-row,#screen-buildings .advisor-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--rf-line-soft);}
#screen-planet .advisor-row:last-child,#screen-buildings .advisor-row:last-child{border-bottom:0;}
#screen-planet .advisor-dot,#screen-buildings .advisor-dot{width:7px;height:7px;margin:0 1px;border-radius:0;transform:rotate(45deg);box-shadow:none !important;animation:none !important;flex:none;}
#screen-planet .advisor-msg,#screen-buildings .advisor-msg{flex:1;font-family:var(--font-head);font-size:.92rem;font-weight:500;line-height:1.25;color:var(--rf-text);}

/* Orbite : schéma dessiné, planète en image au centre */
#screen-planet .dv2-orbit-visual{position:relative;height:74px;margin:6px 0 4px;display:block;}
.orb-svg{position:absolute;inset:0;width:100%;height:100%;}
.orb-path{fill:none;stroke:var(--rf-line);stroke-width:1;}
.orb-path.far{stroke:var(--rf-line-soft);}
.orb-mod{fill:#9FB4C9;}
.orb-mod.on{fill:var(--rf-cyan);}
#screen-planet .dv2-orbit-planet{
  position:absolute;left:50%;top:50%;width:50px;height:50px;transform:translate(-50%,-50%);
  border-radius:50%;overflow:hidden;background:none;box-shadow:0 0 0 1px rgba(0,0,0,.6);
}
#screen-planet .dv2-orbit-planet img{width:100%;height:100%;object-fit:cover;transform:scale(1.25);}
/* module verrouillé : grisé, sans émoji cadenas (le pictogramme suffit) */
#screen-planet .dv2-orbit-locked{opacity:1;}
#screen-planet .dv2-orbit-locked .k::before{content:none;}
#screen-planet .dv2-orbit-locked .k,#screen-planet .dv2-orbit-locked .v,#screen-planet .dv2-orbit-locked .vs-ic{color:var(--rf-dim);}

/* Mes colonies : planète en image, vocation, état */
#screen-planet .dv2-colony-thumb{display:flex;align-items:center;gap:12px;padding:8px 0;border:0;background:none;border-radius:0;}
#screen-planet .dv2-colony-thumb .dv2-thumb-art{
  width:46px;height:46px;border-radius:50%;overflow:hidden;background:none;flex:none;
}
#screen-planet .dv2-thumb-art img{width:100%;height:100%;object-fit:cover;transform:scale(1.25);}
#screen-planet .dv2-thumb-txt{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;}
#screen-planet .dv2-thumb-txt b{flex-basis:100%;font-size:.98rem;color:var(--rf-text-hi);font-weight:700;}

/* Compas : illustration de phase, frise sobre, déblocage */
#phase-panel .tc-art{position:relative;height:72px;overflow:hidden;border-bottom:1px solid var(--rf-line-soft);}
/* v0.91.15.1 : d'où viennent les étapes, posé sur l'image comme l'en-tête d'un terminal */
#phase-panel .tc-art-src{position:absolute;left:0;bottom:0;padding:3px 10px 3px 8px;background:rgba(6,14,22,.82);font-family:var(--font-head);font-size:.68rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--rf-text-hi);}
#phase-panel .tc-art-img{width:100%;height:100%;object-fit:cover;display:block;}
#phase-panel .tc-pip{font-size:.72rem;box-shadow:none !important;animation:none !important;}
#phase-panel .tc-phase{font-family:var(--font-head);font-weight:700;font-size:1.05rem;letter-spacing:.02em;}
#phase-panel .tc-explain{border-radius:0;}
#phase-panel .tc-explain b{font-size:.74rem;}
#phase-panel .tc-explain p,#phase-panel .tc-intro,#phase-panel .dv2-mission-label,#phase-panel .tc-note{font-family:var(--font-head);font-size:.9rem;line-height:1.3;}
#phase-panel .dv2-mission-reward{display:flex;align-items:center;gap:8px;font-family:var(--font-head);font-weight:600;}
.tc-unlock-ic{display:inline-flex;width:18px;height:18px;color:var(--rf-amber);flex:none;}
.tc-unlock-ic svg{width:100%;height:100%;}

/* ---------- carte d'identité de la colonie (haut gauche, un bloc) ---------- */
#screen-planet .dv2-id-card,
#screen-planet .dv2-colony-select{
  --rf-cut:8px;position:relative;border:0;border-radius:0;box-shadow:none;background:var(--rf-bg);clip-path:var(--rf-oct);
}
#screen-planet .dv2-id-card::after,
#screen-planet .dv2-colony-select::after{
  content:'';position:absolute;inset:0;pointer-events:none;background:var(--rf-line);clip-path:var(--rf-ring);
}
#screen-planet .dv2-id-thumb{border-radius:50%;overflow:hidden;background:none;box-shadow:none;}
#screen-planet .dv2-id-thumb-sm{overflow:hidden;background:none;box-shadow:none !important;}
#screen-planet .dv2-id-thumb img,#screen-planet .dv2-id-thumb-sm img{width:100%;height:100%;object-fit:cover;transform:scale(1.25);}
#screen-planet .dv2-id-name{font-family:var(--font-head);font-size:1.15rem;font-weight:700;letter-spacing:.02em;}
#screen-planet .dv2-id-coord{font-family:var(--font-head);font-size:.82rem;font-weight:500;color:var(--rf-label);letter-spacing:.02em;}
#screen-planet .rosette,#screen-planet .dv2-rosette{display:none;}
#screen-planet .dv2-tier-badge{border-radius:0;font-family:var(--font-head);font-weight:700;box-shadow:none;}
/* étiquette de vocation (Classique...) */
.vc-tag{
  --cut:4px;border-radius:0;box-shadow:none;text-shadow:none;
  font-family:var(--font-head);font-weight:700;letter-spacing:.1em;
}
#screen-planet .vc-tag{
  border:0;padding:1px 10px;background:color-mix(in srgb, currentColor 16%, transparent);
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
/* météo et altitude : un seul bandeau posé sur le fond (un bloc) */
#screen-planet .dv2-render-widgets{
  background:none;border:0;border-radius:0;box-shadow:none;overflow:visible;
  backdrop-filter:none;-webkit-backdrop-filter:none;
}
#screen-planet .dv2-chip{
  --rf-cut:8px;position:relative;gap:14px;padding:6px 16px;border:0;border-radius:0;box-shadow:none;
  background:rgba(6,13,22,.82);clip-path:var(--rf-oct);
}
#screen-planet .dv2-chip::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--rf-line);clip-path:var(--rf-ring);}
#screen-planet .dv2-chip-sep{width:1px;align-self:stretch;margin:2px 0;background:var(--rf-line-soft);}
#screen-planet .dv2-chip-txt b{font-family:var(--font-head);font-size:1.05rem;font-weight:700;}
#screen-planet .dv2-chip-sub{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
/* raccourci vers la vue planète : la planète en image, plus une sphère lumineuse */
#screen-planet .dv2-minglobe{
  background:url('../assets/planets/thumbs/prima.webp') center / 125% no-repeat, #04070d;
  box-shadow:0 0 0 1px var(--rf-line), 0 4px 14px rgba(0,0,0,.5);animation:none;
}
#screen-planet .dv2-minglobe::after{display:none;}

/* ---------- onglets Planète / Centre de contrôle / Messages ----------
   un seul bloc ; entre deux onglets, un trait qui descend puis coupe en
   biais vers le bas. L'onglet actif remplit aussi le petit triangle
   laissé par le biais de son voisin de gauche. */
#screen-planet .cc-tabs,#screen-factories .fgx-tabs,#screen-quests .qx-screen-tabs,#screen-hangar .qx-screen-tabs,#screen-market .qx-screen-tabs,#screen-profile .qx-screen-tabs,#screen-alliance .qx-screen-tabs,#screen-support .qx-screen-tabs{
  --rf-cut:9px;display:flex;gap:0;padding:0;isolation:isolate;
  background:rgba(6,13,22,.9);clip-path:var(--rf-oct);
  backdrop-filter:blur(var(--glass-blur));-webkit-backdrop-filter:blur(var(--glass-blur));
}
#screen-planet .cc-tabs::after,#screen-factories .fgx-tabs::after,#screen-quests .qx-screen-tabs::after,#screen-hangar .qx-screen-tabs::after,#screen-market .qx-screen-tabs::after,#screen-profile .qx-screen-tabs::after,#screen-alliance .qx-screen-tabs::after,#screen-support .qx-screen-tabs::after{
  content:'';position:absolute;inset:0;z-index:3;pointer-events:none;
  background:var(--rf-line);clip-path:var(--rf-ring);
}
#screen-planet .cc-tabs .pill-tab,#screen-factories .fgx-tabs .pill-tab,#screen-quests .qx-screen-tabs .pill-tab,#screen-hangar .qx-screen-tabs .pill-tab,#screen-market .qx-screen-tabs .pill-tab,#screen-profile .qx-screen-tabs .pill-tab,#screen-alliance .qx-screen-tabs .pill-tab,#screen-support .qx-screen-tabs .pill-tab{
  --cut:10px;position:relative;isolation:auto;margin:0;padding:8px 26px 8px 22px;
  border:0;border-radius:0;background:none;box-shadow:none;clip-path:none;
  font-family:var(--font-head);font-weight:700;font-size:.8rem;letter-spacing:.09em;color:var(--rf-label);
}
/* fond de l'onglet (survol, actif) ; z-index -1 dans le bloc des onglets,
   sous les séparateurs */
#screen-planet .cc-tabs .pill-tab::before,#screen-factories .fgx-tabs .pill-tab::before,#screen-quests .qx-screen-tabs .pill-tab::before,#screen-hangar .qx-screen-tabs .pill-tab::before,#screen-market .qx-screen-tabs .pill-tab::before,#screen-profile .qx-screen-tabs .pill-tab::before,#screen-alliance .qx-screen-tabs .pill-tab::before,#screen-support .qx-screen-tabs .pill-tab::before{
  content:'';position:absolute;inset:0;z-index:-1;background:none;
  clip-path:polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
#screen-planet .cc-tabs .pill-tab + .pill-tab::before,#screen-factories .fgx-tabs .pill-tab + .pill-tab::before,#screen-quests .qx-screen-tabs .pill-tab + .pill-tab::before,#screen-hangar .qx-screen-tabs .pill-tab + .pill-tab::before,#screen-market .qx-screen-tabs .pill-tab + .pill-tab::before,#screen-profile .qx-screen-tabs .pill-tab + .pill-tab::before,#screen-alliance .qx-screen-tabs .pill-tab + .pill-tab::before,#screen-support .qx-screen-tabs .pill-tab + .pill-tab::before{
  left:calc(-1 * var(--cut));
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, var(--cut) calc(100% - var(--cut)));
}
#screen-planet .cc-tabs .pill-tab:last-child::before,#screen-factories .fgx-tabs .pill-tab:last-child::before,#screen-quests .qx-screen-tabs .pill-tab:last-child::before,#screen-hangar .qx-screen-tabs .pill-tab:last-child::before,#screen-market .qx-screen-tabs .pill-tab:last-child::before,#screen-profile .qx-screen-tabs .pill-tab:last-child::before,#screen-alliance .qx-screen-tabs .pill-tab:last-child::before,#screen-support .qx-screen-tabs .pill-tab:last-child::before{
  clip-path:polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, var(--cut) calc(100% - var(--cut)));
}
#screen-planet .cc-tabs .pill-tab:not(:last-child)::after,#screen-factories .fgx-tabs .pill-tab:not(:last-child)::after,#screen-quests .qx-screen-tabs .pill-tab:not(:last-child)::after,#screen-hangar .qx-screen-tabs .pill-tab:not(:last-child)::after,#screen-market .qx-screen-tabs .pill-tab:not(:last-child)::after,#screen-profile .qx-screen-tabs .pill-tab:not(:last-child)::after,#screen-alliance .qx-screen-tabs .pill-tab:not(:last-child)::after,#screen-support .qx-screen-tabs .pill-tab:not(:last-child)::after{
  content:'';position:absolute;top:0;right:0;bottom:0;width:var(--cut);pointer-events:none;background:var(--rf-line);
  clip-path:polygon(calc(100% - 1px) 0, 100% 0, 100% calc(100% - var(--cut)), 1.4px 100%, 0 100%, calc(100% - 1px) calc(100% - var(--cut) - .4px));
}
#screen-planet .cc-tabs .pill-tab:hover,#screen-factories .fgx-tabs .pill-tab:hover,#screen-quests .qx-screen-tabs .pill-tab:hover,#screen-hangar .qx-screen-tabs .pill-tab:hover,#screen-market .qx-screen-tabs .pill-tab:hover,#screen-profile .qx-screen-tabs .pill-tab:hover,#screen-alliance .qx-screen-tabs .pill-tab:hover,#screen-support .qx-screen-tabs .pill-tab:hover{color:var(--rf-text-hi);background:none;}
#screen-planet .cc-tabs .pill-tab:hover::before,#screen-factories .fgx-tabs .pill-tab:hover::before,#screen-quests .qx-screen-tabs .pill-tab:hover::before,#screen-hangar .qx-screen-tabs .pill-tab:hover::before,#screen-market .qx-screen-tabs .pill-tab:hover::before,#screen-profile .qx-screen-tabs .pill-tab:hover::before,#screen-alliance .qx-screen-tabs .pill-tab:hover::before,#screen-support .qx-screen-tabs .pill-tab:hover::before{background:rgba(95,181,169,.07);}
#screen-planet .cc-tabs .pill-tab.active,#screen-factories .fgx-tabs .pill-tab.active,#screen-quests .qx-screen-tabs .pill-tab.active,#screen-hangar .qx-screen-tabs .pill-tab.active,#screen-market .qx-screen-tabs .pill-tab.active,#screen-profile .qx-screen-tabs .pill-tab.active,#screen-alliance .qx-screen-tabs .pill-tab.active,#screen-support .qx-screen-tabs .pill-tab.active,
#screen-planet .cc-tabs .pill-tab[aria-selected="true"],#screen-factories .fgx-tabs .pill-tab[aria-selected="true"],#screen-quests .qx-screen-tabs .pill-tab[aria-selected="true"],#screen-hangar .qx-screen-tabs .pill-tab[aria-selected="true"],#screen-market .qx-screen-tabs .pill-tab[aria-selected="true"],#screen-profile .qx-screen-tabs .pill-tab[aria-selected="true"],#screen-alliance .qx-screen-tabs .pill-tab[aria-selected="true"],#screen-support .qx-screen-tabs .pill-tab[aria-selected="true"]{color:var(--rf-cyan);background:none;}
#screen-planet .cc-tabs .pill-tab.active::before,#screen-factories .fgx-tabs .pill-tab.active::before,#screen-quests .qx-screen-tabs .pill-tab.active::before,#screen-hangar .qx-screen-tabs .pill-tab.active::before,#screen-market .qx-screen-tabs .pill-tab.active::before,#screen-profile .qx-screen-tabs .pill-tab.active::before,#screen-alliance .qx-screen-tabs .pill-tab.active::before,#screen-support .qx-screen-tabs .pill-tab.active::before,
#screen-planet .cc-tabs .pill-tab[aria-selected="true"]::before,#screen-factories .fgx-tabs .pill-tab[aria-selected="true"]::before,#screen-quests .qx-screen-tabs .pill-tab[aria-selected="true"]::before,#screen-hangar .qx-screen-tabs .pill-tab[aria-selected="true"]::before,#screen-market .qx-screen-tabs .pill-tab[aria-selected="true"]::before,#screen-profile .qx-screen-tabs .pill-tab[aria-selected="true"]::before,#screen-alliance .qx-screen-tabs .pill-tab[aria-selected="true"]::before,#screen-support .qx-screen-tabs .pill-tab[aria-selected="true"]::before{background:#0E2C29;box-shadow:inset 0 -2px 0 var(--rf-cyan);}
/* message non lu : un losange ambre, plus de point lumineux */
#screen-planet .cc-tab-dot{top:6px;right:16px;width:6px;height:6px;border-radius:0;transform:rotate(45deg);box-shadow:none;animation:none;}

/* ---------- dock : Constructions, Recherche, Expéditions & raids ---------- */
#screen-planet .dv2-dock-block{padding:0 0 10px;}
#screen-planet .dv2-dock-block:hover{box-shadow:none;}
#screen-planet .dv2-dock-block:hover::after{background:var(--rf-cyan);}
#screen-planet .dv2-dock-head{margin:0 0 8px;min-height:38px;padding-right:12px;border-bottom:1px solid var(--rf-line-soft);}
#screen-planet .dv2-dock-title{display:flex;align-self:stretch;flex:1;font-family:var(--font-head);}
#screen-planet .dv2-dock-title .pn-tab{min-height:38px;}
#screen-planet .dv2-dock-item,
#screen-planet .dv2-dock-empty,
#screen-planet .dv2-legend{margin-left:14px;margin-right:14px;}
#screen-planet .dv2-dock-empty{font-family:var(--font-head);font-size:.95rem;color:var(--rf-label);}
#screen-planet .dv2-dock-lab{font-family:var(--font-head);font-size:.92rem;}
#screen-planet .dv2-dock-sub,#screen-planet .dv2-dock-time,#screen-planet .dv2-dock-carousel{font-family:var(--font-head);font-size:.8rem;}
/* alerte d'un bloc du dock : un losange fixe, plus de point qui pulse */
#screen-planet .dv2-dock-badge{border-radius:0;transform:rotate(45deg);box-shadow:none;animation:none !important;}
/* légende des catégories : puces posées dans le bloc */
#screen-planet .dv2-legend{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px;}
#screen-planet .dv2-legend-pill{
  --rf-cut:5px;--rf-fl:var(--rf-line-soft);display:inline-flex;align-items:center;gap:7px;
  padding:4px 11px 4px 8px;background-color:#091520;
  font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-text);letter-spacing:.01em;
}
#screen-planet .dv2-legend-pill::before{content:none;}
#screen-planet .dv2-legend-pill i{
  display:inline-flex;width:16px;height:16px;border-radius:0;background:none;box-shadow:none;flex:none;
  color:var(--dv2-cat, var(--dv2-free));
}
#screen-planet .dv2-legend-pill i svg{width:100%;height:100%;}
#screen-planet .dv2-legend-pill.cat-production{--dv2-cat:var(--dv2-production);}
#screen-planet .dv2-legend-pill.cat-elec{--dv2-cat:var(--dv2-elec);}
#screen-planet .dv2-legend-pill.cat-recherche{--dv2-cat:var(--dv2-recherche);}
#screen-planet .dv2-legend-pill.cat-defense{--dv2-cat:var(--dv2-defense);}
#screen-planet .dv2-legend-pill.cat-infra{--dv2-cat:var(--dv2-infra);}
#screen-planet .dv2-legend-pill.cat-free{--dv2-cat:#8A9BB0;}

/* ---------- éléments posés dans un bloc : trois coins coupés et liseré
   en anneau (::after). Chacun règle --rf-cut et --ring ; une étiquette
   (badge) est une pastille teintée, coupée en haut à gauche et en bas à
   droite, sans contour. ---------- */
#screen-planet :is(.cc-chip, .cc-seg, .cc-legend, .cc-danger, .cc-tile, .cc-posture, .cc-card, .msg-tile, .msg-cat, .msg-row),
#screen-planet .msg-agenda button{
  --rf-cut:6px;--ring:var(--rf-edge);position:relative;border:0;border-radius:0;box-shadow:none;clip-path:var(--rf-in);
}
#screen-planet :is(.cc-chip, .cc-seg, .cc-legend, .cc-danger, .cc-tile, .cc-posture, .cc-card, .msg-tile, .msg-cat, .msg-row)::after,
#screen-planet .msg-agenda button::after{
  content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);
}
#screen-planet :is(.cc-atk, .cc-res, .msg-chip),#screen-planet .cc-rec b,#screen-planet .msg-cat em{
  --cut:5px;border:0 !important;border-radius:0;
  background:color-mix(in srgb, currentColor 15%, transparent);
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  font-family:var(--font-head);font-weight:700;letter-spacing:.07em;
}
/* une image posée dans un bloc */
#screen-planet .msg-empty-img{--rf-cut:12px;clip-path:var(--rf-in);}

/* ============================================================
   4. CENTRE DE CONTRÔLE
   ============================================================ */
#screen-planet .cc-head h1{font-size:1.25rem;letter-spacing:.07em;}
#screen-planet .cc-head p{font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
#screen-planet .cc-head-ic{color:var(--rf-cyan);filter:none;}
#screen-planet .qx-card .panel-head .eyebrow{color:var(--rf-label);}
#screen-planet .cc-head-btn,#screen-planet .cc-head-link{margin-left:auto;}
#screen-planet .cc-sect{font-size:.78rem;font-weight:700;}

/* niveau d'alerte : une ligne « Niveau d'alerte : Élevé », plus de sur-titre */
#screen-planet .cc-alert{
  --rf-cut:8px;border:0;border-radius:0;box-shadow:none;clip-path:var(--rf-in);
  background:linear-gradient(100deg, color-mix(in srgb, var(--cc-t) 16%, transparent), rgba(6,13,22,.4) 85%);
}
#screen-planet .cc-alert-txt{display:block;}
#screen-planet .cc-alert-txt small{
  display:inline;font-family:var(--font-head);font-size:.9rem;font-weight:600;letter-spacing:.02em;
  text-transform:none;color:var(--rf-label);
}
#screen-planet .cc-alert-txt small::after{content:" :";}
#screen-planet .cc-alert-txt b{display:inline;margin-left:4px;font-family:var(--font-head);font-weight:700;font-size:1.2rem;letter-spacing:.06em;}
#screen-planet .cc-alert-txt em{display:block;font-style:normal;font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-planet .cc-segbar i.on{box-shadow:none;}
#screen-planet .cc-rule{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}

/* postures défensives */
#screen-planet .cc-posture{
  --rf-cut:7px;--ring:var(--rf-line-soft);background:rgba(12,24,38,.9);
  font-size:.78rem;font-weight:700;letter-spacing:.06em;
}
#screen-planet .cc-posture:hover,#screen-planet .cc-posture.on{--ring:var(--rf-cyan);}
#screen-planet .cc-posture.on{background:#0E2C29;box-shadow:none;}
#screen-planet .cc-posture i{width:22px;height:22px;}
#screen-planet .cc-posture em{font-size:.72rem;}
#screen-planet .cc-activity{font-family:var(--font-head);font-size:.88rem;}
#screen-planet .cc-activity time{font-size:.8rem;}

/* situation tactique : légende, indice de danger */
#screen-planet .cc-planet-lbl{font-family:var(--font-head);font-weight:700;font-size:21px;}
#screen-planet .cc-blip-org{font-size:17px;}
#screen-planet .cc-legend{--rf-cut:9px;--ring:var(--rf-line-soft);position:absolute;padding:8px 12px;background:rgba(4,8,16,.72);font-family:var(--font-head);font-size:.82rem;}
#screen-planet .cc-danger{--rf-cut:9px;--ring:var(--rf-line-soft);position:absolute;padding:8px 12px;background:rgba(4,8,16,.8);}
#screen-planet .cc-danger small{font-size:.74rem;font-weight:700;}
#screen-planet .cc-danger-row b{font-family:var(--font-head);font-size:1.6rem;}

/* filtres et segments (7 j / 30 j) */
#screen-planet .cc-chip{background:rgba(12,24,38,.9);padding:4px 11px;font-family:var(--font-head);font-size:.8rem;font-weight:700;}
#screen-planet .cc-chip:hover,#screen-planet .cc-chip.on{--ring:var(--rf-cyan);}
#screen-planet .cc-chip.on{background:#0E2C29;}
#screen-planet .cc-seg button{font-family:var(--font-head);font-size:.8rem;font-weight:700;padding:3px 10px;border-radius:0;}
#screen-planet .cc-seg button + button{border-left:1px solid var(--rf-edge);}
#screen-planet .cc-seg button.on{background:#24585A;color:var(--rf-text);}

/* statistiques militaires : une ligne par chiffre, le chiffre décollé du bord */
#screen-planet .cc-tiles{display:flex;flex-direction:column;gap:4px;}
#screen-planet .cc-tile{--rf-cut:7px;display:flex;align-items:center;gap:10px;padding:6px 16px 6px 10px;background:none;}
#screen-planet .cc-tile > i{width:20px;height:20px;flex:none;}
#screen-planet .cc-tile > span{display:flex;flex-direction:row !important;align-items:baseline;justify-content:space-between;flex:1;gap:10px;}
#screen-planet .cc-tile small{flex:1;font-family:var(--font-head);font-size:.92rem;font-weight:500;text-transform:none;letter-spacing:.01em;color:var(--rf-label);}
#screen-planet .cc-tile b{margin-left:auto;font-family:var(--font-head);font-size:1.02rem;}
#screen-planet .cc-chart-ticks text{font-size:10px;}
#screen-planet .cc-chart-legend{font-family:var(--font-head);font-size:.84rem;}
#screen-planet .cc-table th{font-size:.74rem;font-weight:700;}
#screen-planet .cc-res{font-size:.72rem;}

/* cartes d'incursion : portrait de la menace, liseré de sa couleur */
#screen-planet .cc-card{--rf-cut:11px;--ring:color-mix(in srgb, var(--cc-f) 45%, #1E2E40);transform:none;}
#screen-planet .cc-card:hover{transform:none;}
#screen-planet .cc-card:hover,#screen-planet .cc-card.sel{--ring:var(--cc-f);}
#screen-planet .cc-card.sel{box-shadow:none;background:linear-gradient(160deg, color-mix(in srgb, var(--cc-f) 24%, transparent), rgba(4,8,16,.7) 60%);}
#screen-planet .cc-card-art{
  --rf-cut:8px;width:52px;height:52px;flex:none;overflow:hidden;box-sizing:border-box;padding:1px;border:0;
  background:color-mix(in srgb, var(--cc-f) 70%, #1E2E40);clip-path:var(--rf-in);
}
#screen-planet .cc-card-img{--rf-cut:7.4px;width:100%;height:100%;object-fit:cover;display:block;clip-path:var(--rf-in);}
#screen-planet .cc-card-names b{font-family:var(--font-head);font-size:1.02rem;}
#screen-planet .cc-card-cd{font-size:.9rem;}
#screen-planet .cc-atk{padding:3px 10px;font-size:.74rem;}
#screen-planet .cc-atk b{font-size:1rem;}
#screen-planet .cc-card-desc,#screen-planet .cc-rec{font-family:var(--font-head);font-size:.86rem;}
#screen-planet .cc-rec b{padding:2px 9px;font-size:.84rem;}
/* boutons des cartes : coupe plus franche, visible même petite */
#screen-planet .cc-card-acts .btn.sm{--rf-cut:7px;padding:6px 10px;}
#screen-planet .cc-card-acts .cc-act-sub{min-width:34px;}

/* ============================================================
   5. MESSAGES
   ============================================================ */
/* vue d'ensemble : un bandeau de quatre compteurs */
#screen-planet .msg-kpis{display:flex;gap:0;}
#screen-planet .msg-kpi{
  flex:1;border:0;border-radius:0;background:none;box-shadow:none;padding:6px 14px;
  border-left:1px solid var(--rf-line-soft);
}
#screen-planet .msg-kpi:first-child{border-left:0;}
#screen-planet .msg-kpi b{font-family:var(--font-head);font-size:1.5rem;}
#screen-planet .msg-kpi small{font-family:var(--font-head);font-size:.82rem;text-transform:none;letter-spacing:.01em;color:var(--rf-label);}
#screen-planet .msg-kpi em{font-family:var(--font-head);font-style:normal;font-size:.74rem;}

/* boîte de réception : la catégorie choisie prend le cadre cyan */
#screen-planet .msg-cat{--ring:transparent;background:none;font-family:var(--font-head);font-size:.95rem;font-weight:600;}
#screen-planet .msg-cat:hover{--ring:var(--rf-edge);background:rgba(95,181,169,.05);}
#screen-planet .msg-cat.on{--ring:var(--rf-cyan);background:#0E2C29;}
#screen-planet .msg-cat b{font-size:.88rem;}
#screen-planet .msg-cat em{padding:0 6px;font-size:.74rem;color:var(--rf-cyan);background:rgba(60,200,224,.18);}

/* filtres rapides : interrupteurs à pans coupés */
#screen-planet #msg-filters{font-family:var(--font-head);font-size:.92rem;}
#screen-planet .msg-toggle{font-family:var(--font-head);font-size:.92rem;font-weight:600;color:var(--rf-text);padding:6px 0;}
#screen-planet .msg-toggle i{
  width:34px;height:16px;border-radius:0;border:0;background:#0E1826;
  clip-path:polygon(4px 0,100% 0,100% calc(100% - 4px),calc(100% - 4px) 100%,0 100%,0 4px);
  box-shadow:inset 0 0 0 1px var(--rf-edge);
}
#screen-planet .msg-toggle i::after{
  top:3px;left:3px;width:12px;height:10px;border-radius:0;
  clip-path:polygon(3px 0,100% 0,100% calc(100% - 3px),calc(100% - 3px) 100%,0 100%,0 3px);
}
#screen-planet .msg-toggle:hover i{box-shadow:inset 0 0 0 1px var(--rf-cyan);}
#screen-planet .msg-toggle.on i{background:rgba(95,181,169,.16);box-shadow:inset 0 0 0 1px #5FB5A9;}
#screen-planet .msg-toggle.on i::after{transform:translateX(16px);}

/* flux : une ligne par message, à la couleur de sa catégorie ; son titre
   dans l'onglet, badge, heure et rapport à droite, le texte dessous */
#screen-planet .msg-feed{gap:6px;}
#screen-planet .msg-row{
  --rf-cut:10px;--rc:var(--cc-c, #5FB5A9);--pn-c:var(--rc);--ring:color-mix(in srgb, var(--rc) 20%, #1E2E40);
  display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0 0 9px;font-family:var(--font-head);
  background:linear-gradient(100deg, color-mix(in srgb, var(--rc) 9%, transparent), rgba(4,8,16,.5) 55%);
}
#screen-planet .msg-row:hover{--ring:color-mix(in srgb, var(--rc) 60%, #1E2E40);background:linear-gradient(100deg, color-mix(in srgb, var(--rc) 16%, transparent), rgba(4,8,16,.5) 60%);}
#screen-planet .msg-row.sel{--ring:var(--rc);background:linear-gradient(100deg, color-mix(in srgb, var(--rc) 22%, transparent), rgba(4,8,16,.55) 65%);}
#screen-planet .msg-row:not(.unread){opacity:.82;}
#screen-planet .msg-row.unread{box-shadow:none;}
/* repère de non-lu : 2 px, depuis le trait sous l'onglet jusqu'en bas */
#screen-planet .msg-row.unread::before{content:'';position:absolute;left:0;top:30px;bottom:0;z-index:2;width:2px;background:var(--rc);}
#screen-planet .msg-row-head{
  display:flex;align-items:center;gap:12px;min-height:32px;padding-right:calc(var(--rf-b_) + 10px);
  border-bottom:1px solid color-mix(in srgb, var(--rc) 22%, transparent);
}
#screen-planet .msg-row-head .pn-tab{min-height:32px;gap:8px;padding-right:calc(var(--tab-br) + 12px);min-width:0;}
#screen-planet .msg-row-head .pn-ic{width:16px;height:16px;}
#screen-planet .msg-row-head .pn-title{font-size:.8rem;overflow:hidden;text-overflow:ellipsis;}
#screen-planet .msg-row.l-rose .pn-title{color:#E3A1A8;}
#screen-planet .msg-row-head .pn-tab{margin-right:auto;}
#screen-planet .msg-row-head time{font-size:.8rem;color:var(--rf-dim);white-space:nowrap;}
#screen-planet .msg-row-head .msg-clip:empty{display:none;}
#screen-planet .msg-row-ic{width:20px;height:20px;}
#screen-planet .msg-row-txt{padding:7px 16px 0 18px;}
#screen-planet .msg-row-txt small{font-size:.9rem;color:var(--rf-label);}
#screen-planet .msg-chip{padding:3px 10px;font-size:.74rem;}
/* une phrase commence par une majuscule, même quand le texte d'origine
   reprend après « : » (« toutes les ressources… ») */
#screen-planet .msg-row-txt small::first-letter,
#sidepanel .notif-msg::first-letter{text-transform:uppercase;}

/* boîte vide illustrée */
#screen-planet .msg-empty{display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px 16px;}
#screen-planet .msg-empty-img{width:min(420px, 80%);aspect-ratio:16/9;object-fit:cover;opacity:.92;}
#screen-planet .msg-empty .qx-hint{font-size:.98rem;color:var(--rf-label);}

/* détail du message */
#screen-planet .msg-tile{--rf-cut:7px;}
#screen-planet .msg-detail-top b{font-size:1.02rem;}
#screen-planet .msg-detail-top small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-dim);}
#screen-planet .msg-detail-txt{font-family:var(--font-head);font-size:.95rem;line-height:1.4;color:var(--rf-text);}
#screen-planet .msg-detail .mr-detail{font-family:var(--font-head);font-size:.86rem;}
#screen-planet .msg-detail-acts .btn{font-size:.76rem;padding:7px 8px;}

/* agenda : liseré de la couleur de l'échéance */
#screen-planet .msg-agenda button{
  --rf-cut:9px;--ring:color-mix(in srgb, var(--cc-t, #2DD4BF) 35%, #1E2E40);
  padding-right:16px;background:rgba(4,8,16,.5);font-family:var(--font-head);font-size:.88rem;font-weight:600;
}
#screen-planet .msg-agenda button:hover{--ring:var(--cc-t, var(--rf-cyan));}
#screen-planet .msg-ag-cd{font-family:var(--font-head);font-size:.8rem;font-weight:600;min-width:96px;}
#screen-planet .msg-ag-lbl{font-size:.95rem;}

/* ============================================================
   6. TUTORIEL (bulle de pas)
   ============================================================ */
.tb-eyebrow,.tb-tip b,.tc-explain b,.tc-pip,.tcb-eyebrow,.tcb-text p.tcb-next,.tg-go{font-family:var(--font-head);letter-spacing:.08em;}
.tb-eyebrow{font-size:.74rem;font-weight:700;}
.tb-goal{font-family:var(--font-head);font-size:1.02rem;font-weight:700;}
.tb-tip{font-family:var(--font-head);font-size:.9rem;}

/* ============================================================
   7. INFOBULLES, FENÊTRES, BULLE DU TUTORIEL, RURIK, MATÉRIAUX
   Des blocs : quatre coins coupés et liseré, dessinés par deux calques
   (::before = fond, ::after = liseré) plutôt que par un clip-path sur
   la boîte, pour ne rien rogner de ce qui dépasse (pointe de la bulle,
   ombre). La boîte elle-même n'a plus ni fond ni bordure.
   ============================================================ */
.ag-tip,.tuto-bubble,.rurik-say,#modal,#confirm-box{
  --rf-cut:12px;
  background:none !important;border:0 !important;border-radius:0 !important;
  box-shadow:none !important;backdrop-filter:none !important;-webkit-backdrop-filter:none !important;
  isolation:isolate;
}
.ag-tip::before,.tuto-bubble::before,.rurik-say::before,#modal::before,#confirm-box::before{
  content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:rgba(7,14,24,.96);clip-path:var(--rf-oct);
}
.ag-tip::after,.tuto-bubble::after,.rurik-say::after,#modal::after,#confirm-box::after{
  content:'';position:absolute;inset:0;z-index:5;pointer-events:none;
  background:var(--rf-line);clip-path:var(--rf-ring);
}
.ag-tip{--rf-cut:9px;filter:drop-shadow(0 10px 22px rgba(0,0,0,.55));}
#modal,#confirm-box,.rurik-say{--rf-cut:16px;}
#modal,#confirm-box{position:relative;}
.rurik-say::after{background:var(--rf-amber);}
/* bulle du tutoriel : même verre que le panneau d'alertes (fond bleu
   nuit flouté, liseré des blocs) ; la couleur ambre du tutoriel est
   portée par l'onglet du titre. Pas d'ombre en filtre sur la bulle :
   elle couperait le flou du fond. */
.tuto-bubble{--rf-cut:10px;--pn-c:var(--rf-amber);padding:0 0 11px;}
.tuto-bubble::before{background:rgba(6,13,22,.8);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);}
.tuto-bubble.compact{padding:0 0 9px;}
.tuto-bubble .tb-head{display:flex;margin:0 0 8px;border-bottom:1px solid var(--rf-line-soft);}
.tuto-bubble .tb-head .pn-tab{min-height:30px;gap:7px;padding-right:calc(var(--tab-br) + 12px);}
.tuto-bubble .tb-head .pn-ic{width:16px;height:16px;}
.tuto-bubble .tb-eyebrow{margin:0;font-size:.74rem;}
.tuto-bubble .tb-goal,.tuto-bubble .tb-tip{margin-left:14px;margin-right:14px;}
.tuto-bubble .tb-arrow{border-color:var(--rf-line);background:rgb(8,15,24);z-index:6;}

/* en-têtes des fenêtres et du panneau : titre, son étiquette à côté */
#modal .sp-head{align-items:center;border-bottom:1px solid var(--rf-line-soft);}
:is(#modal, #sidepanel) .sp-head > div:first-child{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;}
:is(#modal, #sidepanel, #confirm-box) .sp-head :is(h2, h3),.rurik-say h2{font-family:var(--font-head);font-weight:700;letter-spacing:.03em;margin:0;}
/* étiquettes (« Simulation prédictive », « Confirmation »…) */
:is(.rurik-say, .tuto-bubble, #modal, #confirm-box, #sidepanel) .tag{
  --cut:4px;border:0;border-radius:0;font-family:var(--font-head);font-weight:700;letter-spacing:.08em;
  background:color-mix(in srgb, currentColor 14%, transparent);
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
/* fermer (✕) : carré rouge, posé dans le bloc */
#modal .sp-head .close,
#sidepanel .sp-head .close{
  --rf-cut:7px;--rf-fl:rgba(251,113,133,.65);position:relative;flex:none;display:grid;place-items:center;
  width:36px;height:36px;font-size:1rem;color:#FDA4AF;background-color:rgba(251,113,133,.14);cursor:pointer;
}
#modal .sp-head .close:hover,#sidepanel .sp-head .close:hover{--rf-fl:var(--rf-rose);background-color:rgba(251,113,133,.3);color:var(--rf-text-hi);}

/* boutons des fenêtres, du panneau, de Rurik et de la bulle (cadre §0) */
:is(.tuto-bubble, .rurik-say, #modal, #confirm-box, #sidepanel) .btn.btn{font-family:var(--font-head);font-weight:700;letter-spacing:.08em;}
:is(.tuto-bubble, .rurik-say, #modal, #confirm-box, #sidepanel) .btn.btn.primary{--rf-fl:var(--rf-cyan);}
/* bouton principal d'un panneau (ex. « Ouvrir le catalogue ») : plein,
   vert d'eau (v0.91.7) */
:is(#sidepanel, #modal) .btn.btn.primary:not(.sm){
  --rf-cut:8px;background-color:var(--rf-fill);color:var(--rf-on-fill);letter-spacing:.1em;text-transform:uppercase;padding:12px 16px;
}
:is(#sidepanel, #modal) .btn.btn.primary:not(.sm):hover:not(:disabled){--rf-fl:var(--rf-fill-line);background-color:var(--rf-fill-hi);color:var(--rf-on-fill);}

/* contenu des infobulles en police de jeu */
.ag-tip .rich-tip-title{font-family:var(--font-head);font-weight:700;font-size:.95rem;letter-spacing:.03em;}
.ag-tip .rich-tip-def,.ag-tip.is-text{font-family:var(--font-head);font-size:.9rem;font-weight:500;line-height:1.35;color:var(--rf-label);}
.ag-tip .rich-tip-row{font-family:var(--font-head);font-size:.86rem;font-variant-numeric:tabular-nums;}
/* v0.92.0.1 : ligne Total du résumé d'une ressource */
.ag-tip .rich-tip-row.rich-tip-total{margin-top:3px;padding-top:5px;border-top:1px solid rgba(255,255,255,.12);font-weight:700;color:var(--rf-text-hi);}
.ag-tip .rich-tip-rel{font-family:var(--font-head);font-size:.84rem;}
.ag-tip .rich-tip-go,
.ag-tip .rich-tip-go:hover{background-color:#0E2C29;color:var(--rf-cyan);}

/* Rurik */
.rurik-say .rk-line{font-family:var(--font-head);font-size:1.08rem;font-weight:500;line-height:1.5;}
.rk-face{--rf-cut:8px;border:0;border-radius:0;clip-path:var(--rf-in);}

/* lignes des matériaux (panneau des ressources, panneau Ressources
   secondaires) */
.sr-name{font-size:.9rem;font-weight:600;}
.sr-tier,.sr-v,.sr-rate{font-family:var(--font-head);}
.sr-tier{font-size:.74rem;}
.sr-v{font-size:.95rem;font-weight:700;}
.sr-rate{font-size:.8rem;}
.sr-row{border-radius:0 !important;}
/* v0.91.7.2 : la ressource seule, sans case autour (fenêtre Matériaux,
   panneau Ressources secondaires) */
.sr-ic{width:26px;height:26px;border:0;border-radius:0;background:none !important;box-shadow:none !important;}

/* ============================================================
   8. PANNEAU LATÉRAL (#sidepanel) ET ALERTES DE LA CLOCHE
   Un bloc qui flotte entre la barre du haut et le menu, décollé du bord
   droit ; fond semi-transparent flouté (le contenu de dessous ne se lit
   pas à travers).
   ============================================================ */
#sidepanel{
  --rf-cut:14px;
  top:calc(var(--hud-h) + var(--ribbon-h) + 10px);bottom:calc(var(--nav-h) + 14px);
  right:clamp(0px, 1vw, 16px);
  background:rgba(6,13,22,.8);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border:0;box-shadow:none;clip-path:var(--rf-oct);
  transform:translateX(calc(100% + 24px));
}
#sidepanel.open{transform:translateX(0);}
#sidepanel::after{
  content:'';position:absolute;inset:0;z-index:5;pointer-events:none;
  background:var(--rf-line);clip-path:var(--rf-ring);
}
#sidepanel .sp-head{padding:16px 18px 14px;border-bottom:1px solid var(--rf-line-soft);align-items:center;}
#sidepanel .sp-head h2{font-size:1.3rem;}
#sidepanel .sp-body{padding:14px 16px 18px;}
#sidepanel .sp-body p{font-family:var(--font-head);font-size:.92rem;}
/* petits boutons du panneau */
#sidepanel .btn.btn.sm{background-color:#08141F;color:var(--rf-cyan);text-transform:uppercase;padding:8px 12px;font-size:.78rem;}
#sidepanel .btn.btn.sm::before{content:none;}
#sidepanel .btn.btn.sm:hover:not(:disabled){color:var(--rf-text-hi);}
/* bouton rouge (démolir, renvoyer, retirer) : texte, liseré et fond
   teinté rouges, fond rouge plus franc au survol ; placé après les
   règles des petits boutons (texte cyan) et du survol (liseré cyan) */
:is(#screen-planet, #screen-buildings, #screen-factories, .tuto-bubble, .rurik-say, #modal, #confirm-box, #sidepanel) .btn.btn.rose{
  --rf-fl:rgba(251,113,133,.75);background-color:rgba(251,113,133,.14);color:#FDA4AF;
}
:is(#screen-planet, #screen-buildings, #screen-factories, .tuto-bubble, .rurik-say, #modal, #confirm-box, #sidepanel) .btn.btn.rose:hover:not(:disabled){
  --rf-fl:var(--rf-rose);background-color:rgba(251,113,133,.32);color:var(--rf-text-hi);
}

/* ---------- alertes ---------- */
.notif-banner{--rf-cut:10px;position:relative;height:96px;margin:0 0 12px;overflow:hidden;clip-path:var(--rf-in);}
.notif-banner-img{width:100%;height:100%;object-fit:cover;display:block;}
.notif-banner::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--rf-line-soft);clip-path:var(--rf-in-ring);}
#sidepanel .notif-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px;}
#sidepanel .notif-actions{display:grid;grid-template-columns:1fr;gap:8px;margin:0 0 14px;}
#sidepanel .notif-actions .btn{justify-content:center;text-align:center;}
#sidepanel .btn.btn.sm.notif-inbox-link{--rf-fl:var(--rf-cyan);width:auto;margin:0;background-color:#0E2C29;color:var(--rf-text-hi);}
#notif-list{display:flex;flex-direction:column;gap:6px;}
#sidepanel :is(.notif-chip, .notif-item){
  --rf-cut:6px;--rc:var(--cc-c, #2DD4BF);--ring:#243A50;position:relative;border:0;border-radius:0;clip-path:var(--rf-in);cursor:pointer;
}
#sidepanel :is(.notif-chip, .notif-item)::after{
  content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);
}
/* filtres : icône et couleur de la catégorie */
#sidepanel .notif-chip{
  display:inline-flex;align-items:center;gap:6px;padding:5px 10px;
  background:rgba(12,24,38,.9);color:#7C8DA0;text-transform:uppercase;
  font-family:var(--font-head);font-weight:700;font-size:.76rem;letter-spacing:.07em;
}
#sidepanel .notif-chip i{display:inline-flex;width:14px;height:14px;color:#5B6B7D;}
#sidepanel .notif-chip i svg{width:100%;height:100%;}
#sidepanel .notif-chip.active{--ring:color-mix(in srgb, var(--rc) 60%, #1E2E40);color:var(--rf-text);background:color-mix(in srgb, var(--rc) 14%, rgba(12,24,38,.9));}
#sidepanel .notif-chip.active i{color:var(--rc);}
#sidepanel .notif-chip:hover{--ring:var(--rc);}
/* une alerte : son titre dans l'onglet, l'heure à droite, le texte et le
   badge dessous */
#sidepanel .notif-item{
  --rf-cut:9px;--pn-c:var(--rc);--ring:color-mix(in srgb, var(--rc) 20%, #1E2E40);
  display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0 0 10px;
  background:linear-gradient(100deg, color-mix(in srgb, var(--rc) 9%, transparent), rgba(4,8,16,.5) 60%);
}
#sidepanel .notif-item:hover{--ring:color-mix(in srgb, var(--rc) 65%, #1E2E40);background:linear-gradient(100deg, color-mix(in srgb, var(--rc) 16%, transparent), rgba(4,8,16,.5) 65%);}
#sidepanel .notif-item:not(.unread){opacity:.78;}
#sidepanel .notif-item.unread::before{content:'';position:absolute;left:0;top:30px;bottom:0;z-index:2;width:2px;background:var(--rc);}
#sidepanel .notif-head{display:flex;align-items:center;gap:8px;min-height:32px;border-bottom:1px solid color-mix(in srgb, var(--rc) 22%, transparent);}
#sidepanel .notif-head .pn-tab{min-height:32px;gap:7px;padding-right:calc(var(--tab-br) + 10px);min-width:0;}
#sidepanel .notif-head .pn-ic{width:16px;height:16px;}
#sidepanel .notif-head .pn-title{font-size:.76rem;overflow:hidden;text-overflow:ellipsis;}
#sidepanel .notif-item.l-rose .pn-title{color:#E3A1A8;}
#sidepanel .notif-head time{margin-left:auto;padding-right:10px;flex:none;font-family:var(--font-head);font-size:.78rem;color:var(--rf-dim);}
#sidepanel .notif-body{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;padding:8px 12px 0 14px;}
#sidepanel .notif-msg{display:block;font-family:var(--font-head);font-size:.84rem;font-weight:500;color:var(--rf-label);line-height:1.3;}
#sidepanel .msg-chip{
  --cut:5px;border:0;border-radius:0;padding:2px 9px;font-family:var(--font-head);font-weight:700;font-size:.72rem;letter-spacing:.07em;
  background:color-mix(in srgb, currentColor 15%, transparent);
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.notif-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:8px 0;text-align:center;}
.notif-empty-img{--rf-cut:10px;width:100%;aspect-ratio:16/9;object-fit:cover;clip-path:var(--rf-in);}

/* ============================================================
   9. FENÊTRES DU CENTRE DE CONTRÔLE (simulateur, garnison)
   Champs, menus, segments, puces, résultats et lignes : cadre dans le
   fond (§0), trois coins coupés.
   ============================================================ */
.cc-modal{--font-mono:var(--font-head);font-family:var(--font-head);}
.cc-modal .qx-hint{font-size:.9rem;}
.cc-modal .qx-link{font-size:.86rem;}
.cc-modal .cc-field,
.cc-modal .cc-sim-sect,
.cc-modal .cc-sim-postures{font-size:.78rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}

/* menu déroulant : cadre, plus sa flèche */
.cc-modal .cc-select{
  --rf-fl:var(--rf-edge);
  font-family:var(--font-head);font-size:.95rem;font-weight:600;background-color:#0E1826;
  background-image:linear-gradient(45deg, transparent 50%, var(--rf-cyan) 50%), linear-gradient(135deg, var(--rf-cyan) 50%, transparent 50%), var(--rf-frame-img);
  background-position:calc(100% - 15px) 50%, calc(100% - 10px) 50%, var(--rf-frame-pos);
  background-size:5px 5px, 5px 5px, var(--rf-frame-size);
}
.cc-modal :is(.cc-num, .cc-seg, .cc-chip, .cc-sim-kpi),.cc-modal .cc-stepper button{--rf-fl:var(--rf-edge);background-color:#0E1826;}
.cc-modal :is(.cc-select, .cc-num):hover,.cc-modal .cc-stepper button:hover{--rf-fl:#3B5A78;}
.cc-modal .cc-select:focus-visible,.cc-modal .cc-num:focus{--rf-fl:var(--rf-cyan);}
.cc-modal .cc-num{font-size:1rem;font-weight:700;}
.cc-modal .cc-stepper button{--rf-cut:5px;font-weight:700;}
/* curseur : rail droit, poignée en losange */
.cc-modal .cc-range::-webkit-slider-runnable-track{border-radius:0;height:3px;background:var(--rf-edge);}
.cc-modal .cc-range::-moz-range-track{border-radius:0;height:3px;background:var(--rf-edge);}
.cc-modal .cc-range::-moz-range-progress{border-radius:0;height:3px;}
.cc-modal .cc-range::-webkit-slider-thumb{width:16px;height:16px;margin-top:-6.5px;border:0;border-radius:0;box-shadow:none;clip-path:polygon(50% 0, 100% 50%, 50% 100%, 0 50%);}
.cc-modal .cc-range::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:0;clip-path:polygon(50% 0, 100% 50%, 50% 100%, 0 50%);}
.cc-modal .cc-range:hover::-webkit-slider-thumb{box-shadow:none;background:#5EEAD4;}

/* bandeau d'avertissement */
.cc-modal .cc-sim-note{--rf-cut:8px;--rf-fl:rgba(245,165,36,.5);background-color:rgba(245,165,36,.08);font-size:.95rem;padding:8px 14px;}

/* colonnes Attaquant / Défenseur : un bloc dans la fenêtre, titre en onglet */
.cc-modal .cc-sim-col{--rf-cut:10px;background-color:rgba(6,13,22,.6);padding:0 0 12px;gap:7px;}
.cc-modal .cc-sim-col > :not(.cc-sim-head){margin-left:12px;margin-right:12px;}
.cc-modal .cc-sim-col.sim-atk{--pn-c:var(--rf-rose);}
.cc-modal .cc-sim-col.sim-def{--pn-c:var(--rf-cyan);}
.cc-modal .cc-sim-head{display:flex;align-items:center;gap:10px;min-height:36px;border-bottom:1px solid var(--rf-line-soft);}
.cc-modal .cc-sim-mod{margin-left:auto;margin-right:12px;font-size:.8rem;font-weight:700;}
.cc-modal .cc-sim-unit{font-size:.92rem;}
.cc-modal .cc-sim-unit small{font-size:.78rem;}

/* segments, postures simulées, vaisseaux */
.cc-modal .cc-seg{overflow:hidden;}
.cc-modal .cc-seg button{font-size:.82rem;font-weight:700;padding:5px 12px;}
.cc-modal .cc-seg button + button{border-left:1px solid var(--rf-edge);}
.cc-modal .cc-seg button.on{background:#24585A;color:var(--rf-text);}
.cc-modal .cc-chip{font-size:.86rem;font-weight:600;padding:5px 11px;color:var(--rf-label);}
.cc-modal .cc-chip b{font-weight:700;color:var(--rf-text-hi);}
.cc-modal .cc-chip small{font-size:.74rem;color:var(--rf-dim);}
.cc-modal .cc-chip:hover{--rf-fl:#3B5A78;}
.cc-modal .cc-chip.on{--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-cyan);}

/* résultats (tient dans la fenêtre sans défiler à 1080) */
.cc-modal .cc-sim-kpi{--rf-cut:7px;padding:8px 10px;}
.cc-modal .cc-sim-kpi small{font-size:.68rem;font-weight:700;letter-spacing:.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cc-modal .cc-sim-kpi b{font-size:1.15rem;font-weight:700;}
.cc-modal .cc-table{font-size:.88rem;}
.cc-modal .cc-table th{font-size:.72rem;font-weight:700;color:var(--rf-dim);}
.cc-modal .cc-table td{padding:4px 5px;font-variant-numeric:tabular-nums;}

/* boutons du bas : Fermer en rouge, Appliquer en ambre */
#modal .cc-modal-acts .btn.btn{--rf-cut:7px;padding:8px 16px;}
#modal .cc-modal-acts .btn.btn.ghost{--rf-fl:rgba(251,113,133,.75);background-color:rgba(251,113,133,.16);color:#FDA4AF;}
#modal .cc-modal-acts .btn.btn.ghost:hover:not(:disabled){--rf-fl:var(--rf-rose);background-color:rgba(251,113,133,.28);color:var(--rf-text-hi);}
#modal .cc-modal-acts .btn.btn.qx-hero{--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));background-color:var(--rf-hero);color:var(--rf-hero-ink);}
#modal .cc-modal-acts .btn.btn.qx-hero:hover:not(:disabled){--rf-fl:transparent;background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#modal .cc-modal-acts .btn.btn.qx-hero:disabled{background-color:#3A3020;color:#8A7A5C;}

/* garnison */
.cc-modal .hg-gar{--rf-cut:9px;--rf-fl:#243A50;background-color:rgba(6,13,22,.55);padding:8px 10px;}
.cc-modal .hg-gar.on{--rf-fl:var(--rf-cyan);background-color:rgba(14,44,41,.75);}
.cc-modal .hg-gar .hg-thumb{--rf-cut:6px;border:0;border-radius:0;clip-path:var(--rf-in);}
.cc-modal .hg-gar-txt b{font-size:1.02rem;}
.cc-modal .hg-gar-txt small{font-size:.84rem;color:var(--rf-label);}
.cc-modal :is(.hg-tag, .hg-status){
  --cut:5px;border:0;border-radius:0;font-weight:700;font-size:.74rem;letter-spacing:.07em;
  background:color-mix(in srgb, currentColor 15%, transparent);padding:2px 9px;
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
#modal .cc-modal .btn.btn.hg-gar-btn{background-color:#08141F;color:var(--rf-cyan);padding:7px 14px;}
#modal .cc-modal .btn.btn.hg-gar-btn:hover:not(:disabled){--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}
#modal .cc-modal .btn.btn.hg-gar-btn.on{--rf-fl:rgba(251,113,133,.7);background-color:rgba(251,113,133,.14);color:#FDA4AF;}

/* ============================================================
   10. NOTIFICATIONS EN BAS À DROITE (toutes les vues)
   Des blocs posés sur l'écran : quatre coins coupés, liseré, repère de
   couleur sur tout le bord gauche (biais compris), police du jeu.
   ============================================================ */
#toasts{filter:drop-shadow(0 8px 18px rgba(0,0,0,.5));}
.toast{
  --rf-cut:9px;--tc:var(--rf-cyan);position:relative;
  background:rgba(6,13,22,.94);border:0;border-radius:0;box-shadow:none;clip-path:var(--rf-oct);
  padding:11px 16px 11px 18px;font-family:var(--font-head);font-size:.95rem;font-weight:500;line-height:1.3;color:var(--rf-text);
}
.toast.amber{--tc:var(--rf-amber);}
.toast.rose{--tc:var(--rf-rose);}
.toast::before{
  --t:3px;content:'';position:absolute;left:0;top:0;bottom:0;width:calc(var(--rf-cut) + var(--t));background:var(--tc);
  clip-path:polygon(var(--rf-cut) 0, calc(var(--rf-cut) + var(--t)) 0, var(--t) var(--rf-cut), var(--t) calc(100% - var(--rf-cut)), calc(var(--rf-cut) + var(--t)) 100%, var(--rf-cut) 100%, 0 calc(100% - var(--rf-cut)), 0 var(--rf-cut));
}
.toast::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:color-mix(in srgb, var(--tc) 40%, #1E2E40);clip-path:var(--rf-ring);
}
.toast.clickable:hover::after{background:var(--tc);}

/* ============================================================
   11. ÉCRAN BÂTIMENTS (v0.91.3)
   Mêmes formes que l'écran Contrôle, rien de nouveau : chaque panneau est
   un bloc (§3) avec son onglet de titre ; la grille des cartes est dans
   un bloc dont l'onglet porte la catégorie affichée ; une carte, une
   ligne de chantier, un bouton, une pastille de catégorie sont posés
   dans un bloc (trois coins) ; débit, coûts, niveau sont des étiquettes.
   Les fenêtres Détails (.bld-sheet) et Main-d'oeuvre (.bld-wf-modal)
   suivent les mêmes règles.
   ============================================================ */
/* couleurs des catégories, adoucies comme la palette (d'origine :
   css/design-system.css) ; elles valent pour tout le jeu (Usines,
   arbre technologique) */
:root{
  --bld-extraction:var(--rf-green);
  --bld-energie:#CDB65A;
  --bld-usine:#D19A52;
  --bld-recherche:var(--rf-violet);
  --bld-defense:var(--rf-rose);
  --bld-infra:var(--rf-cyan);
  --bld-orbital:#7FA3CF;
}
/* éléments posés dans un bloc, liseré en anneau (::after) : la forme et le
   calque, communs ; chacun règle ensuite --rf-cut, --ring, sa position et
   son fond (contrôle de la feuille, v0.91.4) */
#screen-buildings .bld-card,
#screen-buildings .bld-sitework-item,
.bld-wf-modal .bcard,
.tt-wrap .tt-card,
#screen-factories .fg-node-card,
#screen-factories .fgx-planet-row,
#screen-factories .fgx-cat-row,
#screen-factories .fgx-stat-tile,
#screen-factories .fg-recipe-card,
#screen-quests .qx-campaign-summary,
#screen-quests .pal-req-row,
#screen-quests .qx-unlock,
#screen-quests .qs-hist,
#screen-quests .qs-lt,
#screen-quests .qs-ach,
#screen-quests .qs-achm,
#screen-expeditions .qx-qcard,
#screen-expeditions .qx-run,
#qx-discoveries .qx-disc,
#screen-expeditions .qx-ship,
#screen-research .rs-tcard,
#screen-research .rs-doc-card,
#screen-hangar .hg-card,
#screen-hangar .hg-mini,
#screen-hangar .hg-mission,
#screen-hangar .hg-slot.busy,
#screen-market .mk-bonus,
#screen-market .mk-ctc,
#screen-map .sys-card,
.qx-cmp-list .qx-cmp-item{
  border:0;border-radius:0;box-shadow:none;clip-path:var(--rf-in);transform:none;transition:none;
}
#screen-buildings .bld-card::after,
#screen-buildings .bld-sitework-item::after,
.bld-wf-modal .bcard::after,
.tt-wrap .tt-card::after,
#screen-factories .fg-node-card::after,
#screen-factories .fgx-planet-row::after,
#screen-factories .fgx-cat-row::after,
#screen-factories .fgx-stat-tile::after,
#screen-factories .fg-recipe-card::after,
#screen-quests .qx-campaign-summary::after,
#screen-quests .pal-req-row::after,
#screen-quests .qx-unlock::after,
#screen-quests .qs-hist::after,
#screen-quests .qs-lt::after,
#screen-quests .qs-ach::after,
#screen-quests .qs-achm::after,
#screen-expeditions .qx-qcard::after,
#screen-expeditions .qx-run::after,
#qx-discoveries .qx-disc::after,
#screen-expeditions .qx-ship::after,
#screen-research .rs-tcard::after,
#screen-research .rs-doc-card::after,
#screen-hangar .hg-card::after,
#screen-hangar .hg-mini::after,
#screen-hangar .hg-mission::after,
#screen-hangar .hg-slot.busy::after,
#screen-market .mk-bonus::after,
#screen-market .mk-ctc::after,
#screen-map .sys-card::after,
.qx-cmp-list .qx-cmp-item::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);}
/* étiquettes : pastille coupée en haut à gauche et en bas à droite, sans
   contour ; chacune règle sa couleur, sa taille et --cut si besoin */
#screen-buildings .ag-lvl-badge,
#screen-factories .ag-lvl-badge,
.tt-wrap .ag-lvl-badge,
#screen-buildings .bld-card-art .bld-prod-pill,
#screen-factories .fg-node-info .bld-prod-pill,
#screen-buildings .bld-cost-chip,
.bld-sheet .bld-cost-chip,
#screen-buildings .bld-badge,
.bld-sheet .bld-badge.lvl,
#screen-buildings .bld-lock-label,
.bld-sheet .bld-prereq-chip,
.bld-wf-modal .cost-chip,
.tt-wrap .tt-id,
.tt-wrap .tt-tier,
.tt-wrap .tt-req-chip,
#screen-factories .fgx-tb-zone,
#screen-factories .fgx-cat-tag,
#screen-factories .fg-formula-chip,
#screen-factories .fg-effect-chip,
#screen-factories .fg-equipped-tag,
#screen-factories .tag,
#fg-colonies-list .tag,
#screen-factories .fg-io-chip,
#fg-colonies-list .fg-io-chip,
#screen-quests .qx-sum-kicker,
#screen-quests .qs-ach-cat,
#screen-quests .qs-lb-rank span,
#screen-quests .tag,
#screen-expeditions .tag,
#screen-expeditions .qx-tag,
#screen-expeditions .qx-rw,
#screen-expeditions .qx-status,
#screen-research .rs-tier-badge,
#screen-research .rs-link,
#screen-research .rs-cost-chip,
#screen-research .rs-queue-pos,
#screen-research .rs-dt-branch,
#screen-hangar .hg-rar-badge,
#screen-hangar .hg-status,
#screen-hangar .hg-tag,
#screen-hangar .hg-rar-chip,
#screen-hangar .rs-cost-chip,
#screen-hangar .hg-mini-check,
#modal .hg-rar-badge,
#screen-market .mk-mult,
#screen-market .mk-status,
#screen-market .mk-tag,
#screen-market .mk-side,
#screen-market .mk-step-n,
#lobby .hub-state,
#lobby .hub-server-tag,
.qx-cmp-list .qx-cmp-pip,
.qx-cmp-list .tag{
  --cut:4px;border:0;border-radius:0;box-shadow:none;font-family:var(--font-head);font-weight:700;
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
/* couleur d'onglet des panneaux */
#bld-global-queue,#bld-panel-alerts{--pn-c:var(--rf-amber) !important;}
#bld-colonies .bldx-card{--pn-c:var(--rf-violet) !important;}
#screen-buildings .bldx-grid-panel{--pn-c:var(--bld-cat, var(--rf-cyan)) !important;}
#screen-buildings :is(.cat-extraction, .cat-energie, .cat-usine, .cat-recherche, .cat-defense, .cat-infra, .cat-orbital){--bld-cat:var(--rf-cyan);}
#screen-buildings .cat-extraction,.bld-sheet.cat-extraction{--bld-cat:var(--bld-extraction);}
#screen-buildings .cat-energie,.bld-sheet.cat-energie{--bld-cat:var(--bld-energie);}
#screen-buildings .cat-usine,.bld-sheet.cat-usine{--bld-cat:var(--bld-usine);}
#screen-buildings .cat-recherche,.bld-sheet.cat-recherche{--bld-cat:var(--bld-recherche);}
#screen-buildings .cat-defense,.bld-sheet.cat-defense{--bld-cat:var(--bld-defense);}
#screen-buildings .cat-infra,.bld-sheet.cat-infra{--bld-cat:var(--bld-infra);}
#screen-buildings .cat-orbital,.bld-sheet.cat-orbital{--bld-cat:var(--bld-orbital);}

/* ---------- en-tête de l'écran ---------- */
#screen-buildings .bldx-head-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;min-width:0;}
#screen-buildings .bldx-head-top .bldx-head-txt{flex:1 1 auto;min-width:0;}
#screen-buildings .bldx-head-top .tt-open-btn{margin-top:2px;}
#screen-buildings .bldx-head-txt h1,#screen-factories .fgx-head-txt h1,#screen-quests .qx-head-txt h1,#screen-expeditions .qx-head-txt h1,#screen-research .qx-head-txt h1,#screen-hangar .qx-head-txt h1,#screen-market .qx-head-txt h1{
  font-family:var(--font-head);font-size:1.5rem;font-weight:700;letter-spacing:.08em;color:var(--rf-text-hi);
}
/* le fond est clair en haut (ciel) : ombre sombre serrée pour la lecture */
#screen-buildings .bldx-head-txt p,#screen-factories .fgx-head-txt p,#screen-quests .qx-head-txt p,#screen-expeditions .qx-head-txt p,#screen-research .qx-head-txt p,#screen-hangar .qx-head-txt p,#screen-market .qx-head-txt p{
  font-family:var(--font-head);font-size:.95rem;font-weight:600;color:var(--rf-text-hi);
  text-shadow:0 1px 3px rgba(4,10,18,1);
}
/* v0.92.15.5 (audit D2-06) : voile sombre fondu derrière le titre et le
   sous-titre. Sur un écran étroit, l'image recadrée met le ciel clair
   derrière eux (Bâtiments à 768 px : titre 1,96, sous-titre 2,36). */
:is(#screen-buildings .bldx-head-txt,#screen-factories .fgx-head-txt,#screen-quests .qx-head-txt,#screen-expeditions .qx-head-txt,#screen-research .qx-head-txt,#screen-hangar .qx-head-txt,#screen-market .qx-head-txt){position:relative;isolation:isolate;}
:is(#screen-buildings .bldx-head-txt,#screen-factories .fgx-head-txt,#screen-quests .qx-head-txt,#screen-expeditions .qx-head-txt,#screen-research .qx-head-txt,#screen-hangar .qx-head-txt,#screen-market .qx-head-txt)::before{
  content:'';position:absolute;z-index:-1;left:-56px;right:-72px;top:-30px;bottom:-28px;pointer-events:none;
  background:radial-gradient(closest-side, rgba(3,6,10,.74) 50%, rgba(3,6,10,.44) 76%, rgba(3,6,10,0) 100%);
}
/* pastilles de catégorie : posées sur le fond comme les filtres des
   alertes, pictogramme de la catégorie, cadre de sa couleur une fois
   choisie */
#screen-buildings .bldx-chips{gap:6px;}
#screen-buildings .bcat-pill{
  --rf-cut:7px;--rf-fl:var(--rf-edge);
  gap:8px;padding:9px 17px 9px 12px;background-color:#0A1622;
  backdrop-filter:none;-webkit-backdrop-filter:none;transition:none;
  font-family:var(--font-head);font-weight:700;font-size:.9rem;letter-spacing:.07em;color:var(--rf-text);
}
#screen-buildings .bcat-pill i{
  display:inline-flex;width:18px;height:18px;border-radius:0;background:none;flex:none;
  color:color-mix(in srgb, var(--bld-cat) 80%, #5B6B7D);
}
#screen-buildings .bcat-pill i svg{width:100%;height:100%;}
#screen-buildings .bcat-pill:hover{--rf-fl:color-mix(in srgb, var(--bld-cat) 70%, #1E2E40);color:var(--rf-text-hi);background-color:#0E1C2A;}
#screen-buildings .bcat-pill.active{
  --rf-fl:color-mix(in srgb, var(--bld-cat) 80%, #1E2E40);color:var(--rf-text-hi);
  background-color:color-mix(in srgb, var(--bld-cat) 18%, #0A1622);
}
#screen-buildings .bcat-pill.active i{color:var(--bld-cat);background:none;}
#screen-buildings .bcat-pill.locked{opacity:.62;filter:none;color:var(--rf-label);}
#screen-buildings .bcat-pill.locked:hover{--rf-fl:var(--rf-edge);color:var(--rf-label);background-color:#0A1622;}
#screen-buildings .bcat-pill .bcat-lock{width:13px;height:13px;color:var(--rf-dim);}
/* arbre technologique : bouton posé sur le fond, texte cyan (Bâtiments et
   Usines) */
#screen-buildings .tt-open-btn,#screen-factories .tt-open-btn{
  --rf-cut:7px;--rf-fl:var(--rf-line);padding:9px 15px;background-color:#0A1622;
  font-family:var(--font-head);font-weight:700;font-size:.9rem;letter-spacing:.07em;color:var(--rf-cyan);
}
#screen-buildings .tt-open-btn:hover,#screen-factories .tt-open-btn:hover{--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}
#screen-buildings .tt-open-btn svg,#screen-factories .tt-open-btn svg{color:currentColor;}

/* ---------- blocs des colonnes ---------- */
#screen-buildings .bldx-card,#screen-buildings .bldx-queue{overflow:visible;}
#screen-buildings .bldx-queue{padding:0;}
/* colonne étroite (1366 px) : l'onglet se tronque, le compte reste entier */
#screen-buildings .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-buildings .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-buildings .panel-head .eyebrow{flex:none;white-space:nowrap;}
#screen-buildings .bldx-card .panel-body,#screen-buildings .bldx-queue .panel-body{padding:9px 14px 12px;}
#screen-buildings .bldx-card .mini-row{min-height:31px;padding:2px 0;}
#screen-buildings .panel-head .bldx-queue-count{color:var(--rf-amber);}
#screen-buildings .bldx-queue-sub,#screen-buildings .bld-sitework-time{
  font-family:var(--font-head);font-size:.86rem;font-weight:500;color:var(--rf-label);margin-top:6px;
}
/* v0.92.9 : chantier en attente (Dagny Aalto), sous le chantier en cours */
#screen-buildings .bldx-queue-next{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid var(--rf-line-soft);}
#screen-buildings .bldx-queue-next-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;font-family:var(--font-head);font-size:.86rem;line-height:1.3;color:var(--rf-label);}
#screen-buildings .bldx-queue-next-txt b{font-weight:700;color:var(--rf-text-hi);}
#screen-buildings .bldx-queue-next .btn{align-self:flex-start;}
#screen-buildings .bldx-queue-free{margin-top:10px;padding-top:9px;border-top:1px solid var(--rf-line-soft);color:var(--rf-dim);}
#screen-buildings .bld-next-note{flex-wrap:wrap;line-height:1.35;}
#screen-buildings .bld-next-note b{color:var(--rf-amber);font-weight:700;}
#screen-buildings .bldx-hint{font-family:var(--font-head);font-size:.86rem;line-height:1.35;color:var(--rf-label);}
/* barres droites, celles des signes vitaux de l'écran Contrôle */
:is(#screen-buildings, #screen-factories, #screen-quests, #screen-expeditions, #screen-research, #screen-hangar, #screen-market) .bar,.bld-sheet .bar{
  height:8px;border-radius:0;background:rgba(4,10,18,.9);box-shadow:inset 0 0 0 1px var(--rf-line-soft);
}
:is(#screen-buildings, #screen-factories, #screen-quests, #screen-expeditions, #screen-research, #screen-hangar, #screen-market) .bar i,.bld-sheet .bar i{border-radius:0;background:var(--rf-cyan);}
#screen-buildings .bar.amber i,#screen-buildings .bld-card-progress .bar i,.bld-sheet .bar.amber i{background:var(--rf-amber);}

/* colonies : la colonie affichée prend un liseré violet, l'état est un
   losange fixe (plus de point lumineux) */
#screen-buildings .bldx-card.current{box-shadow:none;}
#screen-buildings .bldx-card.current::after{background:color-mix(in srgb, var(--rf-violet) 65%, transparent);}
#screen-buildings .bldx-dot{
  width:7px;height:7px;margin-left:auto;border-radius:0;transform:rotate(45deg);box-shadow:none;background:var(--rf-dim);
}
#screen-buildings .bldx-dot.active{background:var(--lime);box-shadow:none;}
#screen-buildings .bldx-dot.busy{background:var(--rf-amber);box-shadow:none;}
#screen-buildings .bld-colony-id{display:flex;align-items:center;gap:11px;margin:0 0 9px;}
#screen-buildings .bld-colony-art{width:40px;height:40px;flex:none;border-radius:50%;overflow:hidden;}
#screen-buildings .bld-colony-art img{width:100%;height:100%;object-fit:cover;transform:scale(1.25);display:block;}
#screen-buildings .bld-colony-txt{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;}
#screen-buildings .bld-colony-txt b{flex-basis:100%;font-size:.98rem;font-weight:700;color:var(--rf-text-hi);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#screen-buildings .vc-tag{
  border:0;padding:1px 9px;font-size:.7rem;background:color-mix(in srgb, currentColor 16%, transparent);
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
#screen-buildings .bld-sitework-empty{font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-buildings .bld-colony-meta{display:flex;flex-direction:column;gap:2px;}
#screen-buildings .bld-colony-meta .fgx-mini-row{
  display:flex;justify-content:space-between;align-items:center;min-height:28px;
  border-bottom:1px solid var(--rf-line-soft);font-family:var(--font-head);font-size:.92rem;
}
#screen-buildings .bld-colony-meta .fgx-mini-row .k{color:var(--rf-label);}
#screen-buildings .bld-colony-meta .fgx-mini-row .v{font-weight:700;color:var(--rf-text-hi);}
#screen-buildings .bld-colony-meta .btn.sm{margin-top:8px;justify-content:center;}
/* chantier en cours : une ligne posée dans le bloc, liseré ambre */
#screen-buildings .bld-sitework-item{
  --rf-cut:7px;--ring:color-mix(in srgb, var(--rf-amber) 35%, #1E2E40);position:relative;
  background:rgba(4,10,18,.5);padding:8px 14px 9px 11px;
}
#screen-buildings .bld-sitework-name{font-family:var(--font-head);font-size:.95rem;color:var(--rf-text-hi);margin-bottom:7px;}
#screen-buildings .bld-sitework-name b{font-weight:700;}
#screen-buildings .bld-sitework-name span{font-family:var(--font-head);font-size:.82rem;font-weight:600;color:var(--rf-label);}
#screen-buildings .bld-sitework-time{text-align:left;}

/* colonne droite : alertes et main-d'oeuvre */
#screen-buildings #bld-alerts-body .advisor-row{padding:8px 0;}
#screen-buildings #bld-alerts-body .advisor-msg{font-size:.92rem;}
#screen-buildings #bld-alerts-body .btn.sm{padding:5px 10px;font-size:.76rem;}
#screen-buildings .advisor-empty{font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);margin:4px 0;}
/* bandeau illustré, une image posée dans le bloc (comme celui des alertes) */
:is(#screen-buildings, .bld-wf-modal) .bld-wf-banner{--rf-cut:9px;position:relative;height:64px;margin:0 0 10px;overflow:hidden;clip-path:var(--rf-in);}
.bld-wf-banner-img{width:100%;height:100%;object-fit:cover;display:block;}
:is(#screen-buildings, .bld-wf-modal) .bld-wf-banner::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--rf-line-soft);clip-path:var(--rf-in-ring);}
#screen-buildings .bld-workforce-mini{
  --rf-cut:6px;--rf-fl:var(--rf-line);gap:10px;padding:8px 14px 8px 10px;background-color:#08141F;transition:none;
}
#screen-buildings .bld-workforce-mini:hover{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-buildings .bld-wf-ic{width:18px;height:18px;color:var(--rf-cyan);}
#screen-buildings .bld-wf-label{font-family:var(--font-head);font-size:.92rem;font-weight:600;color:var(--rf-text);}
#screen-buildings .bld-wf-count{font-family:var(--font-head);font-size:.95rem;font-weight:700;color:var(--rf-text-hi);}
#screen-buildings .bld-wf-seg{width:5px;height:12px;border-radius:0;background:var(--rf-edge);}
#screen-buildings .bld-wf-seg.filled{background:var(--lime);box-shadow:none;}

/* ---------- bloc central : la grille des cartes ---------- */
#screen-buildings .bldx-grid-panel{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;}
#screen-buildings .bldx-grid-panel .panel-head{flex:none;}
/* les cartes remplissent la largeur du bloc (plus de vide à droite) :
   autant de colonnes que la place en permet, d'au moins --bldx-card-w
   (210 px sur un écran de 1366, pour y garder trois colonnes) */
#screen-buildings .bldx-grid{
  gap:12px;padding:12px 14px 16px;
  grid-template-columns:repeat(auto-fill, minmax(clamp(210px, 14vw, var(--bldx-card-w)), 1fr));
}

/* une carte : trois coins coupés, liseré de la couleur de sa catégorie */
#screen-buildings .bld-card{
  --rf-cut:10px;--ring:color-mix(in srgb, var(--bld-cat) 30%, #1E2E40);
  overflow:hidden;
  background:linear-gradient(180deg, rgba(10,19,30,.94), rgba(6,13,22,.94));
  backdrop-filter:none;-webkit-backdrop-filter:none;
}
#screen-buildings .bld-card::after{
  z-index:6;
}
#screen-buildings .bld-card:hover{--ring:color-mix(in srgb, var(--bld-cat) 70%, #1E2E40);transform:none;}
#screen-buildings .bld-card.constructing{--ring:color-mix(in srgb, var(--rf-amber) 70%, #1E2E40);}
#screen-buildings .bld-card.focus{--ring:var(--rf-cyan);box-shadow:none;}
/* verrouillée (retour de l'utilisateur du 01/11/2026) : tout s'efface,
   sauf l'étiquette du verrou, en rouge et en grand.
   v0.92.15.2 (audit pré-playtest D2-02) : l'opacité .42 éteignait aussi
   les textes (« Nécessite d'abord Champ solaire » à 2,25, bouton
   « Détails », cliquable, à 2,00). L'opacité n'éteint plus que la
   décoration (image, boutons d'icône désactivés, badge de niveau) ; les
   textes passent en couleurs atténuées, au moins --rf-dim ; la raison du
   verrou garde l'ambre plein ; « Détails » garde son contraste. Règle :
   docs/regles/interface.md ; garde-fou : tools/locked-contrast-tests.mjs. */
#screen-buildings .bld-card.locked{opacity:1;}
#screen-buildings .bld-card.locked :is(.bld-upgrade-btn, .bld-demolish-btn, .ag-lvl-badge){opacity:.42;}
#screen-buildings .bld-card.locked .bld-card-name{color:var(--rf-label);}
/* la note du verrou (« Débloqué au palier II ») est la raison du verrou :
   ambre plein, comme le bandeau de prérequis (relecture du lot 2) ; la
   même classe sert au minuteur de chantier et au chantier suivant, exclus */
#screen-buildings .bld-card.locked .bld-lock-note:not(.bld-next-note, .bld-next-st, [id^="bld-construct-time"]){color:var(--rf-amber);}
#screen-buildings .bld-card.locked :is(.bld-card-desc, .bld-timer, .bld-cost-chip){color:var(--rf-dim);}
#screen-buildings .bld-card.locked .bld-cost-chip .res-img{filter:grayscale(1);opacity:.6;}
#screen-buildings .bld-card.locked,#screen-buildings .bld-card.locked:hover{--ring:#1E2E40;}
#screen-buildings .bld-card-art{border-bottom:1px solid var(--rf-line-soft);background:#07111B;}
#screen-buildings .bld-card-art::after{background:linear-gradient(180deg, transparent 55%, rgba(4,10,18,.7));}
/* niveau, débit : étiquettes posées sur l'image */
:is(#screen-buildings, #screen-factories) .ag-lvl-badge{
  top:7px;left:7px;padding:3px 8px;font-size:.74rem;letter-spacing:.04em;line-height:1.1;
  color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 18%, rgba(6,13,22,.9));
}
#screen-buildings .bld-card-art .bld-prod-pill{
  left:36px;bottom:6px;max-width:calc(100% - 72px);gap:5px;padding:2px 9px 2px 5px;
  font-size:.82rem;letter-spacing:.02em;
  color:var(--bld-cat);background:color-mix(in srgb, var(--bld-cat) 16%, rgba(6,13,22,.9));
}
#screen-buildings .bld-card-art .bld-prod-pill.elec{color:var(--bld-energie);background:color-mix(in srgb, var(--bld-energie) 16%, rgba(6,13,22,.9));}
#screen-buildings .bld-card-art .bld-prod-pill.elec.neg{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 16%, rgba(6,13,22,.9));}
#screen-buildings .bld-card-art .bld-prod-pill.neutral{color:var(--rf-label);background:rgba(6,13,22,.9);}
:is(#screen-buildings, #screen-factories) .bld-prod-pill .res-img{width:16px;height:16px;flex:none;}
/* améliorer / démolir : petits boutons posés dans les coins bas de l'image */
:is(#screen-buildings, #screen-factories) :is(.bld-upgrade-btn, .bld-demolish-btn){
  --rf-cut:5px;bottom:6px;width:24px;height:24px;transition:none;
}
:is(#screen-buildings, #screen-factories) .bld-upgrade-btn{left:6px;--rf-fl:color-mix(in srgb, var(--lime) 70%, transparent);background-color:color-mix(in srgb, var(--lime) 18%, rgba(6,13,22,.92));color:var(--lime);}
:is(#screen-buildings, #screen-factories) .bld-demolish-btn{right:6px;--rf-fl:rgba(251,113,133,.65);background-color:color-mix(in srgb, #FDA4AF 16%, rgba(6,13,22,.92));color:#FDA4AF;}
:is(#screen-buildings, #screen-factories) .bld-upgrade-btn:hover{--rf-fl:var(--lime);background-color:color-mix(in srgb, var(--lime) 34%, rgba(6,13,22,.92));filter:none;}
:is(#screen-buildings, #screen-factories) .bld-demolish-btn:hover{--rf-fl:var(--rf-rose);background-color:rgba(251,113,133,.32);color:var(--rf-text-hi);filter:none;}
:is(#screen-buildings, #screen-factories) :is(.bld-upgrade-btn, .bld-demolish-btn) svg{width:11px;height:11px;}
:is(#screen-buildings, #screen-factories) :is(.bld-upgrade-btn, .bld-demolish-btn).is-disabled{opacity:.4;}
/* verrouillé : voile, étiquette « Palier IV » ou « Prérequis manquant » */
#screen-buildings .bld-lock-veil{background:rgba(4,10,18,.58);}
#screen-buildings .bld-lock-label{
  --cut:5px;padding:6px 15px;font-size:1rem;letter-spacing:.1em;color:#E3A1A8;
  background:color-mix(in srgb, var(--rf-rose) 24%, rgba(6,13,22,.92));
}
/* corps : nom, description, coûts */
#screen-buildings .bld-card-body{padding:9px 12px 0;gap:4px;}
#screen-buildings .bld-card-name{font-family:var(--font-head);font-size:1.05rem;font-weight:700;letter-spacing:.01em;color:var(--rf-text-hi);}
#screen-buildings .bld-card-desc{font-family:var(--font-head);font-size:.86rem;font-weight:500;color:var(--rf-label);}
#screen-buildings .bld-badge{padding:1px 7px;font-size:.72rem;}
#screen-buildings .bld-badge.count{color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 15%, transparent);}
/* deux coûts au nom long (« 160 Superconductor ») passent à la ligne,
   jamais coupés */
#screen-buildings .bld-cost-row{flex-wrap:wrap;gap:4px 5px;margin-top:3px;}
#screen-buildings .bld-cost-chip{flex:none;overflow:visible;}
#screen-buildings .bld-cost-chip,.bld-sheet .bld-cost-chip{
  display:inline-flex;align-items:center;gap:4px;padding:2px 8px 2px 4px;font-size:.8rem;letter-spacing:.01em;
}
#screen-buildings .bld-cost-chip .res-img,.bld-sheet .bld-cost-chip .res-img{width:14px;height:14px;flex:none;}
#screen-buildings .bld-cost-chip.ok,.bld-sheet .bld-cost-chip.ok{color:var(--lime);background:color-mix(in srgb, var(--lime) 14%, transparent);}
#screen-buildings .bld-cost-chip.ko,.bld-sheet .bld-cost-chip.ko{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, transparent);}
#screen-buildings .bld-cost-chip.more{padding:2px 8px;color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 14%, transparent);}
#screen-buildings .bld-timer,.bld-sheet .bld-timer{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-dim);}
/* bas de carte (retours de l'utilisateur du 01/11/2026) : boutons plus
   grands et au fond plein, lisibles sur l'image de fond ; Construire et
   Améliorer en cyan comme avant la refonte (bouton principal d'un
   panneau : plein, cyan sombre) ; Embaucher et Affecter au cadre ambre ;
   équipe complète : plus de ligne Ouvriers (retrait dans la fiche) */
#screen-buildings .bld-card-actions{padding:8px 12px 11px;gap:7px;}
#screen-buildings .bld-row1{gap:6px;}
#screen-buildings .bld-card-actions .btn.sm{padding:8px 12px;font-size:.84rem;letter-spacing:.07em;background-color:#0A1622;}
#screen-buildings .bld-card-actions .btn.primary.sm{--rf-fl:var(--rf-cyan);background-color:var(--rf-fill);color:var(--rf-on-fill);}
#screen-buildings .bld-card-actions .btn.primary.sm:hover:not(:disabled){--rf-fl:var(--rf-fill-line);background-color:var(--rf-fill-hi);color:var(--rf-on-fill);}
#screen-buildings .bld-card-actions .btn.primary.sm:disabled{--rf-fl:var(--rf-edge);background-color:#0A1622;color:var(--rf-dim);opacity:1;}
/* v0.92.15.2 (audit D2-02) : sur une carte verrouillée, « Construire »
   désactivé a la couleur du bouton « Détails », actif ; sans opacité, la
   carte semblerait constructible (la carte n'est plus éteinte d'un bloc) */
#screen-buildings .bld-card.locked .bld-card-actions .btn.primary.sm.bld-action-btn:disabled{opacity:.42;}
/* v0.92.5 (demande du 11/11/2026) : Détails est secondaire, plus petit
   et gris, pour laisser la place à Construire ou Améliorer */
#screen-buildings .bld-card-actions .btn.sm.bld-details-btn{--rf-fl:var(--rf-edge);padding:5px 9px;font-size:.68rem;letter-spacing:.05em;color:var(--rf-dim);align-self:center;}
#screen-buildings .bld-card-actions .btn.sm.bld-details-btn:hover{--rf-fl:var(--rf-dim);color:var(--rf-text);}
/* Embaucher, Affecter : contour du même ambre que l'action principale,
   plein au survol, comme les boutons ambre d'origine */
:is(#screen-buildings, #screen-factories) .btn.amber.sm{--rf-fl:var(--rf-hero);background-color:#0A1622;color:var(--rf-hero);}
:is(#screen-buildings, #screen-factories) .btn.amber.sm:hover:not(:disabled){--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));background-color:var(--rf-hero);color:var(--rf-hero-ink);}
:is(#screen-buildings, #screen-factories) .btn.sm:disabled{opacity:.45;}
:is(#screen-buildings, #screen-factories) .bld-staff-label{font-family:var(--font-head);font-size:.88rem;font-weight:500;color:var(--rf-label);}
:is(#screen-buildings, #screen-factories) .bld-staff-label .v{font-weight:700;color:var(--rf-text-hi);}
:is(#screen-buildings, #screen-factories) .bld-staff-label .v.warn{color:var(--rf-amber);}
/* personne affecté : un losange rouge fixe, plus de point qui pulse */
:is(#screen-buildings, #screen-factories) .bld-staff-warn-dot{width:6px;height:6px;border-radius:0;transform:rotate(45deg);background:var(--rf-rose);animation:none;}
#screen-buildings .bld-lock-note,.bld-sheet .bld-lock-note{
  display:flex;align-items:center;gap:6px;font-family:var(--font-head);font-size:.86rem;font-weight:500;letter-spacing:.01em;color:var(--rf-label);
}
.bld-lock-ic{display:inline-flex;width:14px;height:14px;flex:none;vertical-align:-2px;margin-right:4px;color:var(--rf-dim);}
.bld-lock-ic svg{width:100%;height:100%;}
/* prérequis manquant : bandeau d'avertissement, celui du simulateur */
:is(#screen-buildings, .bld-sheet) .bld-chain-banner{
  --rf-cut:7px;--rf-fl:rgba(245,165,36,.5);background-color:rgba(245,165,36,.08);border-radius:0;
  padding:6px 12px;font-family:var(--font-head);font-size:.86rem;font-weight:500;line-height:1.3;color:var(--rf-amber);
}
/* liste d'affectation directe */
:is(#screen-buildings, #screen-factories) .bld-staff-dd{--rf-cut:7px;--rf-fl:var(--rf-line);background-color:rgba(6,13,22,.97);padding:8px 10px;}
:is(#screen-buildings, #screen-factories) .bld-staff-dd-title{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
:is(#screen-buildings, #screen-factories) .bld-staff-dd-item{border-radius:0;font-family:var(--font-head);font-size:.92rem;color:var(--rf-text);}
:is(#screen-buildings, #screen-factories) .bld-staff-dd-item:hover{background:#0E2C29;}
:is(#screen-buildings, #screen-factories) .bld-staff-dd-item small{font-size:.78rem;color:var(--rf-label);}
:is(#screen-buildings, #screen-factories) .bld-staff-dd-empty{font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}

/* ---------- fenêtre Détails (.bld-sheet) ---------- */
/* l'illustration du bâtiment : une image posée dans la fenêtre */
.bld-sheet .bld-sheet-bg{
  --rf-cut:12px;height:150px;margin:0;clip-path:var(--rf-in);
  background-size:cover;background-position:center;
}
.bld-sheet .bld-sheet-bg::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--rf-line-soft);clip-path:var(--rf-in-ring);}
.bld-sheet .bld-sheet-hero{margin:-44px 0 14px;padding:0 12px;height:44px;align-items:flex-end;padding-bottom:10px;}
.bld-sheet .bld-badge.lvl{
  padding:3px 10px;font-size:.8rem;letter-spacing:.04em;
  color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 18%, rgba(6,13,22,.9));
}
/* onglets de la fiche et de la fenêtre Main-d'oeuvre : les segments du
   Centre de contrôle (cadre, cyan sombre une fois choisi) */
.bld-sheet .pill-tabs,.bld-wf-modal .pill-tabs{gap:6px;margin-bottom:12px;}
.bld-sheet .bcat-pill,.bld-wf-modal .pill-tab{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:7px 14px;background-color:#0E1826;
  backdrop-filter:none;-webkit-backdrop-filter:none;transition:none;
  font-family:var(--font-head);font-weight:700;font-size:.82rem;letter-spacing:.08em;color:var(--rf-label);
}
.bld-sheet .bcat-pill:hover,.bld-wf-modal .pill-tab:hover{--rf-fl:#3B5A78;color:var(--rf-text-hi);background-color:#0E1826;}
.bld-sheet .bcat-pill.active,.bld-wf-modal .pill-tab.active{--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-cyan);}
.bld-sheet .bcat-pill.active i{background:none;}
/* lignes de la fiche */
.bld-sheet .mini-row{
  display:flex;align-items:center;gap:10px;min-height:32px;padding:3px 0;
  border-bottom:1px solid var(--rf-line-soft);font-family:var(--font-head);font-size:.95rem;
}
.bld-sheet .mini-row .k{flex:1;color:var(--rf-label);}
.bld-sheet .mini-row .v{margin-left:auto;font-weight:700;color:var(--rf-text-hi);}
.bld-sheet .bld-prod-line,.bld-sheet .bld-elec-line{gap:7px;font-family:var(--font-head);font-size:.95rem;font-weight:700;margin:2px 0 6px;}
.bld-sheet .bld-prod-line{color:var(--bld-cat, var(--rf-cyan));}
.bld-sheet .bld-elec-line{margin-top:8px;}
.bld-sheet .bld-elec-line.pos{color:var(--bld-energie);}
.bld-sheet .bld-elec-line.neg{color:var(--rf-rose);}
.bld-sheet :is(.bld-prod-line, .bld-elec-line) .res-img{width:18px;height:18px;flex:none;}
:is(.bld-sheet, .bld-wf-modal) .sp-list-label{font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
.bld-sheet .bld-sheet-lore{font-family:var(--font-head);font-size:1rem;line-height:1.5;color:var(--rf-text);}
/* affecter, retirer : puces posées dans la fenêtre */
:is(.bld-sheet, .bld-wf-modal) .unlock-chip{
  --rf-cut:5px;--rf-fl:var(--rf-edge);padding:5px 11px;background-color:#0E1826;cursor:pointer;
  font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-text);
}
:is(.bld-sheet, .bld-wf-modal) .unlock-chip:hover{--rf-fl:var(--rf-cyan);color:var(--rf-text-hi);}
:is(.bld-sheet, .bld-wf-modal) .assign-chip{color:var(--rf-cyan);}
/* boutons de la fiche sur une rangée (retour de l'utilisateur, v0.91.4) :
   action principale, embauche, démolition ; ils passent à la ligne si la
   fenêtre est étroite */
.bld-sheet .bld-sheet-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.bld-sheet .bld-sheet-actions .btn{flex:1 1 auto;justify-content:center;white-space:nowrap;}
/* « Aucun profil compatible embauché » : une mention, pas une puce cliquable */
.bld-sheet .unlock-chip:not(.assign-chip):not(.unassign-chip){--rf-fl:transparent;background-color:transparent;padding-left:0;cursor:default;color:var(--rf-label);}
/* l'action principale de la fiche (Construire, Améliorer) : cyan sombre */
#modal .bld-sheet .btn.btn:is(.sheet-build-btn, .sheet-upgrade-btn){--rf-fl:var(--rf-cyan);background-color:var(--rf-fill);color:var(--rf-on-fill);padding:10px 14px;font-size:.84rem;}
#modal .bld-sheet .btn.btn:is(.sheet-build-btn, .sheet-upgrade-btn):hover:not(:disabled){--rf-fl:var(--rf-fill-line);background-color:var(--rf-fill-hi);color:var(--rf-on-fill);}
#modal .bld-sheet .btn.btn:is(.sheet-build-btn, .sheet-upgrade-btn):disabled{--rf-fl:var(--rf-edge);background-color:#0A1622;color:var(--rf-dim);opacity:1;}
#modal .bld-sheet .btn.btn.amber{--rf-fl:var(--rf-hero);background-color:#0A1622;color:var(--rf-hero);}
#modal .bld-sheet .btn.btn.amber:hover:not(:disabled){--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));background-color:var(--rf-hero);color:var(--rf-hero-ink);}
/* tableau de production : celui du simulateur, dans un cadre posé */
.bld-sheet .bld-ptable-wrap{--rf-cut:8px;--rf-fl:var(--rf-line-soft);border:0;border-radius:0;background-color:rgba(6,13,22,.5);}
.bld-sheet .bld-ptable{font-family:var(--font-head);font-size:.92rem;font-variant-numeric:tabular-nums;}
.bld-sheet .bld-ptable th{background:none;font-size:.74rem;font-weight:700;letter-spacing:.08em;color:var(--rf-dim);border-bottom:1px solid var(--rf-line-soft);}
.bld-sheet .bld-ptable td{border-bottom:1px solid var(--rf-line-soft);color:var(--rf-text);}
.bld-sheet .bld-ptable td.pos{color:var(--bld-energie);}
.bld-sheet .bld-ptable td.neg{color:var(--rf-rose);}
.bld-sheet .bld-ptable-current{background:color-mix(in srgb, var(--rf-amber) 10%, transparent);}
.bld-sheet .bld-ptable-current td{color:var(--rf-text-hi);}
.bld-sheet .bld-ptable-locked td{color:var(--rf-dim);opacity:1;}
.bld-sheet .bld-ptable-next .v{font-family:var(--font-head);}
/* chaîne de prérequis : des étiquettes */
.bld-sheet .bld-prereq-chip{
  padding:3px 10px;font-size:.84rem;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 14%, transparent);
}
.bld-sheet .bld-prereq-chip.done{color:var(--lime);background:color-mix(in srgb, var(--lime) 14%, transparent);}
.bld-sheet .bld-prereq-chip.pending{color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 14%, transparent);}
.bld-sheet .bld-prereq-arrow{color:var(--rf-dim);}

/* ---------- fenêtre Main-d'oeuvre (.bld-wf-modal) ---------- */
#modal .bld-wf-modal .bld-wf-banner{height:96px;margin-bottom:12px;}
.bld-wf-modal p{font-family:var(--font-head);font-size:.95rem;color:var(--rf-text);}
.bld-wf-modal .info-dot{border-radius:0;font-family:var(--font-head);}
/* un ouvrier : une carte posée dans la fenêtre */
.bld-wf-modal .bcard{
  --rf-cut:10px;--ring:#243A50;position:relative;
  background:linear-gradient(180deg, rgba(10,19,30,.9), rgba(6,13,22,.9));
}
.bld-wf-modal .bcard:hover{--ring:#3B5A78;transform:none;}
.bld-wf-modal .bcard h3{font-family:var(--font-head);font-size:1.05rem;font-weight:700;color:var(--rf-text-hi);}
.bld-wf-modal .bcard .desc{font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
.bld-wf-modal .bcard .foot{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
.bld-wf-modal .cost-chip{
  display:inline-flex;align-items:center;gap:5px;padding:2px 9px;
  font-size:.82rem;color:var(--rf-text);
  background:color-mix(in srgb, var(--rf-label) 14%, transparent);
}
.bld-wf-modal .cost-chip.ko{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, transparent);}
.bld-wf-modal .lock-note{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
/* embaucher : l'action principale de la carte, cyan sombre comme
   Construire */
#modal .bld-wf-modal .btn.btn.primary.hire-pool-btn{--rf-fl:var(--rf-cyan);background-color:var(--rf-fill);color:var(--rf-on-fill);padding:10px 14px;font-size:.84rem;}
#modal .bld-wf-modal .btn.btn.primary.hire-pool-btn:hover:not(:disabled){--rf-fl:var(--rf-fill-line);background-color:var(--rf-fill-hi);color:var(--rf-on-fill);}

/* ============================================================
   12. SURBRILLANCE DU TUTORIEL SUR LES FORMES DE LA REFONTE
   Un élément à coins coupés rognait la surbrillance dorée (.tuto-glow,
   css/05-screens.css) et son libellé « ▼ » : le bouton Embaucher de la
   fenêtre Main-d'oeuvre ne se signalait plus depuis la v0.91.2. Le temps
   de la surbrillance, l'élément reprend sa boîte droite. Une carte de
   bâtiment garde sa pulsation par l'ombre (css/33-tutorial.css).
   ============================================================ */
:is(#screen-planet, #screen-buildings, #screen-factories, #screen-quests, #screen-expeditions, #screen-research, #screen-hangar, #screen-market, #modal, #sidepanel, .tuto-bubble) .tuto-glow.tuto-glow:not(.bld-card){
  clip-path:none !important;background-image:none !important;
  box-shadow:0 0 0 3px rgba(245,158,11,.9), 0 0 30px 6px rgba(245,158,11,.5) !important;
}
:is(#screen-planet, #screen-buildings, #screen-factories, #screen-quests, #screen-expeditions, #screen-research, #screen-hangar, #screen-market, #modal, #sidepanel, .tuto-bubble) .tuto-glow.tuto-glow::before{content:"▼ " attr(data-tuto-label);}
:is(#screen-planet, #screen-buildings, #screen-factories, #screen-quests, #screen-expeditions, #screen-research, #screen-hangar, #screen-market, #modal, #sidepanel, .tuto-bubble) .tuto-glow.tuto-label-low:not(.bld-card)::before{content:"▲ " attr(data-tuto-label);}
/* carte : boîte droite, et le halo de repos de .tuto-glow (sans
   !important, pour que la pulsation l'anime ; seul en effets réduits) */
#screen-buildings .bld-card.tuto-glow{
  clip-path:none !important;
  box-shadow:0 0 0 3px rgba(245,158,11,.9), 0 0 30px 6px rgba(245,158,11,.5);
}

/* ============================================================
   13. ARBRE TECHNOLOGIQUE (v0.91.3, fenêtre ouverte depuis Bâtiments et
   Usines, js/14-tech-tree.js)
   Barre de filtres : listes de choix maison et champ de recherche au
   cadre posé ; un groupe par catégorie, titre dans l'onglet de sa
   couleur ; une carte par bâtiment ou recette, trois coins coupés,
   liseré de sa catégorie ; numéro, palier et niveau en étiquettes.
   ============================================================ */
.tt-wrap{--font-mono:var(--font-head);font-family:var(--font-head);font-variant-numeric:tabular-nums;gap:18px;}
.tt-wrap .tt-toolbar{gap:8px;padding:4px 0 12px;background:rgba(7,14,24,.97);border-bottom:1px solid var(--rf-line-soft);}
/* listes de choix et champ de recherche (aussi la barre d'outils des
   Usines, §14, qui n'en règle que la taille) */
.tt-wrap .ag-select{min-width:200px;}
.tt-wrap .ag-select-btn,#screen-factories .ag-select-btn{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:9px 12px;background-color:#0E1826;
  font-family:var(--font-head);font-size:.92rem;font-weight:600;color:var(--rf-text);transition:none;
}
.tt-wrap .ag-select-btn:hover,.tt-wrap .ag-select.open .ag-select-btn,
#screen-factories .ag-select-btn:hover,#screen-factories .ag-select.open .ag-select-btn{--rf-fl:var(--rf-cyan);}
.tt-wrap .ag-select-caret,#screen-factories .ag-select-caret{color:var(--rf-cyan);}
.tt-wrap .ag-select-list,#screen-factories .ag-select-list{--rf-cut:8px;--rf-fl:var(--rf-line);padding:5px;background-color:rgba(7,14,24,.98);box-shadow:none;}
.tt-wrap .ag-select-opt,#screen-factories .ag-select-opt{border-radius:0;font-family:var(--font-head);font-size:.92rem;color:var(--rf-text);}
.tt-wrap .ag-select-opt:hover,.tt-wrap .ag-select-opt.active,
#screen-factories .ag-select-opt:hover,#screen-factories .ag-select-opt.active{background:#0E2C29;color:var(--rf-text-hi);}
.tt-wrap .ag-select-opt.selected,#screen-factories .ag-select-opt.selected{color:var(--rf-cyan);}
.tt-wrap .tt-search svg,#screen-factories .fgx-tb-search svg{left:11px;z-index:1;color:var(--rf-label);}
.tt-wrap .tt-search input,#screen-factories .fgx-tb-search input{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:9px 12px 9px 32px;background-color:#0E1826;
  font-family:var(--font-head);font-size:.92rem;color:var(--rf-text-hi);
}
.tt-wrap .tt-search input::placeholder,#screen-factories .fgx-tb-search input::placeholder{color:var(--rf-dim);}
.tt-wrap .tt-search input:focus,#screen-factories .fgx-tb-search input:focus{--rf-fl:var(--rf-cyan);}
.tt-wrap .tt-count{font-size:.86rem;font-weight:600;color:var(--rf-label);}
/* groupe : onglet du titre, trait dessous, compte à droite */
.tt-wrap .tt-group{gap:10px;}
.tt-wrap .tt-group-head{min-height:34px;padding:0 4px 0 0;border-bottom:1px solid var(--rf-line-soft);text-transform:none;letter-spacing:0;}
.tt-wrap .tt-group-head .pn-tab{min-height:34px;}
/* l'ancien repère de couleur (.tt-group-head i, css/09-tech-tree.css)
   réduisait le pictogramme à un point lumineux */
.tt-wrap .tt-group-head i.pn-ic{width:20px;height:20px;border-radius:0;background:none;box-shadow:none;}
.tt-wrap .tt-group-count{font-size:.9rem;font-weight:600;color:var(--rf-label);}
.tt-wrap .tt-tier-label{font-size:.78rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
.tt-wrap .tt-grid{gap:10px;grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));}
/* carte */
.tt-wrap .tt-card{
  --rf-cut:9px;--ring:color-mix(in srgb, var(--tt-cat) 30%, #1E2E40);position:relative;
  background:linear-gradient(180deg, rgba(10,19,30,.94), rgba(6,13,22,.94));
}
.tt-wrap .tt-card::after{z-index:5;}
.tt-wrap .tt-card:hover{--ring:color-mix(in srgb, var(--tt-cat) 75%, #1E2E40);transform:none;box-shadow:none;}
.tt-wrap .tt-art{height:76px;background:#07111B;border-bottom:1px solid var(--rf-line-soft);}
.tt-wrap .tt-lock{background:rgba(4,10,18,.5);color:#E3A1A8;}
.tt-wrap .tt-lock svg{width:20px;height:20px;}
/* numéro, niveau, palier, prérequis : étiquettes */
.tt-wrap .tt-id{
  top:6px;right:6px;min-width:0;height:auto;padding:2px 8px;font-size:.78rem;
  color:var(--tt-cat);background:color-mix(in srgb, var(--tt-cat) 16%, rgba(6,13,22,.92));
}
.tt-wrap .ag-lvl-badge{top:6px;left:6px;padding:2px 8px;font-size:.74rem;color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 18%, rgba(6,13,22,.9));}
.tt-wrap .tt-body{gap:5px;padding:8px 11px 10px;}
.tt-wrap .tt-name{font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
.tt-wrap .tt-tier{padding:1px 8px;font-size:.76rem;color:var(--tt-cat);background:color-mix(in srgb, var(--tt-cat) 14%, transparent);}
.tt-wrap .tt-state{font-size:.84rem;font-weight:600;color:var(--rf-label);}
.tt-wrap .tt-card.state-unlocked .tt-state{color:var(--lime);}
.tt-wrap .tt-card.state-locked .tt-state{color:#E3A1A8;}
.tt-wrap .tt-card.state-quest .tt-state{color:var(--rf-violet);}
.tt-wrap .tt-req-label{font-size:.8rem;color:var(--rf-dim);}
.tt-wrap .tt-req-chip{padding:1px 7px;font-size:.76rem;color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 14%, transparent);}
.tt-wrap .tt-empty{font-size:.95rem;color:var(--rf-label);}

/* ============================================================
   14. ÉCRAN USINES (v0.91.4)
   Mêmes formes que Bâtiments (dont il reprend les règles partagées :
   niveau, flèches, ouvriers, petits boutons, barres) : chaque panneau
   est un bloc avec son onglet de titre ; le graphe et sa barre d'outils
   forment un bloc ; un nœud, une ligne de liste, une tuile, une carte de
   recette sont posés dans un bloc (trois coins) ; onglets de vue comme
   ceux de l'écran Contrôle. Le curseur de cadence et la case « arrêt
   automatique » restent des contrôles du navigateur, habillés (même
   traitement que le simulateur de combat, §9), en attendant les
   contrôles maison.
   ============================================================ */
/* en-tête : plus de sur-titre « Écran 03 » ; titre et sous-titre : règles
   de Bâtiments (§11) ; planète et zone à droite */
#screen-factories .fgx-head-txt .eyebrow{display:none;}
#screen-factories .fgx-head-planet{font-family:var(--font-head);font-weight:700;letter-spacing:.08em;color:var(--rf-text-hi);}
#screen-factories .fgx-tb-zone{
  padding:2px 10px;font-size:.78rem;letter-spacing:.06em;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 16%, rgba(6,13,22,.9));
}
/* onglets de vue : un bloc (règles des onglets de l'écran Contrôle) */
#screen-factories .fgx-tabs{position:relative;margin:0;flex:none;}
#screen-factories .fgx-tabs .pill-tab{text-transform:uppercase;}

/* panneaux : couleur d'onglet */
#fgx-panel-colony,#fgx-panel-planets{--pn-c:var(--rf-violet) !important;}
#screen-factories .fgx-bottom-recipes,#screen-factories .fgx-recipes-full{--pn-c:var(--rf-violet) !important;}
#screen-factories .fgx-cockpit{--pn-c:var(--rf-amber) !important;}
#screen-factories :is(.fgx-card, .fgx-card-static, .fgx-cockpit){overflow:visible;}
#screen-factories .fgx-card .panel-body{padding:9px 14px 12px;}

/* colonie, planètes, catégories (colonne gauche) */
#screen-factories .fgx-colony-head{gap:11px;margin-bottom:6px;}
#screen-factories .fgx-colony-thumb{width:42px;height:42px;border-radius:50%;overflow:hidden;box-shadow:none;}
#screen-factories .fgx-colony-thumb img{transform:scale(1.25);}
#screen-factories .fgx-colony-name{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-factories .fgx-colony-sub{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-factories .fgx-colony-dot{width:7px;height:7px;border-radius:0;transform:rotate(45deg);box-shadow:none;background:var(--rf-dim);}
#screen-factories .fgx-colony-dot.active{background:var(--lime);box-shadow:none;}
#screen-factories .fgx-colony-dot.busy{background:var(--rf-amber);box-shadow:none;}
#screen-factories .fgx-mini-row{
  display:flex;align-items:center;gap:10px;min-height:30px;padding:2px 0;border-bottom:1px solid var(--rf-line-soft);
  font-family:var(--font-head);font-size:.93rem;
}
#screen-factories .fgx-mini-row:last-child{border-bottom:0;}
#screen-factories .fgx-mini-row .k{flex:1;color:var(--rf-label);}
#screen-factories .fgx-mini-row .v{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-head);font-size:.96rem;font-weight:700;color:var(--rf-text-hi);}
#screen-factories .fgx-mini-row .v .res-img{width:16px;height:16px;}
/* une planète, une catégorie : une ligne posée dans le bloc ; la
   choisie prend le cadre cyan (comme les catégories de Messages) */
#screen-factories :is(.fgx-planet-row, .fgx-cat-row){
  --rf-cut:7px;--ring:transparent;position:relative;background:none;
}
#screen-factories :is(.fgx-planet-row, .fgx-cat-row):hover{--ring:var(--rf-edge);background:rgba(95,181,169,.05);}
#screen-factories :is(.fgx-planet-row, .fgx-cat-row):is(.current, .active){--ring:var(--rf-cyan);background:#0E2C29;}
#screen-factories .fgx-planet-thumb{border-radius:50%;overflow:hidden;}
#screen-factories .fgx-planet-thumb img{transform:scale(1.25);}
#screen-factories .fgx-planet-name{font-family:var(--font-head);font-size:.95rem;font-weight:700;color:var(--rf-text-hi);}
#screen-factories .fgx-planet-status{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
#screen-factories .fgx-planet-status.active{color:var(--rf-cyan);}
#screen-factories .fgx-cat-row{font-family:var(--font-head);font-size:.95rem;font-weight:600;color:var(--rf-text);}
#screen-factories .fgx-cat-dot{width:7px;height:7px;border-radius:0;transform:rotate(45deg);box-shadow:none;}
#screen-factories .fgx-cat-count{font-family:var(--font-head);font-size:.86rem;font-weight:700;color:var(--rf-label);}

/* le graphe et sa barre d'outils : un bloc */
/* deux rangées (le bloc du graphe, la rangée du bas) au lieu de trois :
   mêmes règles qu'avant pour les panneaux du bas repliés
   (css/16-panel-collapse.css) et l'écran étroit (css/design-system.css) */
#screen-factories .fgx-tabpanel.fgx-tab-overview{grid-template-rows:minmax(280px,1fr) var(--fgx-bottom-h);}
#screen-factories .fgx-tabpanel.fgx-tab-overview:not(:has(.fgx-bottom-panel:not(.collapsed))){grid-template-rows:minmax(280px,1fr) auto;}
@media (max-width:1300px){
  #screen-factories .fgx-tabpanel.fgx-tab-overview{grid-template-rows:440px auto;}
}
/* plein écran du graphe : son fond d'origine (css/design-system.css) */
#screen-factories .fg-graph-scroll:fullscreen{background:#0B1020;}
/* nœud choisi depuis l'arbre technologique : la coupe rognait le halo du
   clignotement (css/09-tech-tree.css) ; le temps du clignotement, le
   nœud reprend sa boîte droite (même principe que le tutoriel, §12) */
#screen-factories .fg-node-card.fg-node-flash{clip-path:none;}
#screen-factories .fgx-graph-panel{display:flex;flex-direction:column;min-height:0;min-width:0;}
#screen-factories .fgx-toolbar{
  flex:none;gap:8px;padding:8px 12px;background:none;border:0;border-radius:0;box-shadow:none;
  backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom:1px solid var(--rf-line-soft);
}
#screen-factories .fg-graph-scroll{flex:1 1 auto;min-height:0;background:rgba(5,10,18,.25);border:0;border-radius:0;backdrop-filter:none;-webkit-backdrop-filter:none;}
/* liste de choix et recherche : règles de l'arbre technologique (§13),
   en plus serré pour tenir sur une ligne */
#screen-factories .ag-select{min-width:165px;}
#screen-factories .ag-select-btn{padding:7px 12px;font-size:.9rem;}
#screen-factories .ag-select-opt{font-size:.9rem;}
/* une seule ligne à 1920 px : la recherche prend la place qui reste */
#screen-factories .fgx-legend{gap:10px;font-family:var(--font-head);font-size:.78rem;font-weight:500;color:var(--rf-label);}
#screen-factories .fgx-legend-line{border-radius:0;box-shadow:none;height:3px;}
#screen-factories .fgx-legend-dot{border-radius:0;}
#screen-factories .fgx-legend-lock svg{width:13px;height:13px;}
#screen-factories .fgx-tb-search svg{left:10px;}
#screen-factories .fgx-tb-search input{padding:7px 10px 7px 30px;font-size:.9rem;}
#screen-factories .fgx-tb-btn{--rf-cut:5px;--rf-fl:var(--rf-edge);width:30px;height:30px;background-color:#0E1826;color:var(--rf-text);transition:none;}
#screen-factories .fgx-tb-btn:hover{--rf-fl:var(--rf-cyan);color:var(--rf-cyan);}
#screen-factories .fgx-tb-zoom-val{font-family:var(--font-head);font-size:.88rem;font-weight:700;color:var(--rf-text);}

/* un nœud du graphe : trois coins coupés, liseré de sa catégorie */
#screen-factories .fg-node-card{
  --rf-cut:9px;--ring:color-mix(in srgb, var(--bld-cat) 32%, #1E2E40);
  background:linear-gradient(180deg, rgba(10,19,30,.95), rgba(6,13,22,.95));
}
#screen-factories .fg-node-card::after{z-index:6;}
#screen-factories .fg-node-card:hover{--ring:color-mix(in srgb, var(--bld-cat) 75%, #1E2E40);transform:none;box-shadow:none;}
#screen-factories .fg-node-card.open{--ring:var(--rf-cyan);background:linear-gradient(180deg, rgba(14,44,41,.95), rgba(6,13,22,.95));box-shadow:none;}
#screen-factories .fg-node-card.bottleneck{--ring:var(--rf-rose);box-shadow:none;animation:none;}
#screen-factories .fg-node-card.underpowered{--ring:var(--rf-amber);box-shadow:none;}
#screen-factories .fg-node-card.ghost{--ring:#243A50;border:0;background:rgba(6,13,22,.7);}
#screen-factories .fg-node-card.ghost:hover{--ring:color-mix(in srgb, var(--bld-cat) 60%, #1E2E40);}
#screen-factories .fg-node-card.locked{--ring:#1E2E40;border:0;background:rgba(6,13,22,.6);}
#screen-factories .fg-node-card.dim{opacity:.32;}
#screen-factories .fg-node-thumb{border-right:1px solid var(--rf-line-soft);background:#07111B;}
/* nœud de 74 px de haut : nom, cadence et débit tiennent sans se
   chevaucher en Rajdhani */
#screen-factories .fg-node-info{padding:5px 10px;gap:1px;}
#screen-factories .fg-node-name{font-family:var(--font-head);font-size:.84rem;font-weight:700;line-height:1.15;color:var(--rf-text-hi);}
#screen-factories .fg-node-sub{font-family:var(--font-head);font-size:.7rem;font-weight:500;line-height:1.15;color:var(--rf-label);}
/* v0.92.15.2 (audit D2-02) : verrouillée, l'état « Verrouillée » passe en
   ambre plein (la carte n'est plus éteinte d'un bloc, css/design-system.css) */
#screen-factories .fg-node-card.locked .fg-node-sub{color:var(--rf-amber);}
#screen-factories .fg-node-card.ghost .fg-node-name,#screen-factories .fg-node-card.locked .fg-node-name{color:var(--rf-label);}
#screen-factories .fg-node-lock{color:#E3A1A8;}
#screen-factories .fg-node-lock svg{width:18px;height:18px;}
#screen-factories .fg-node-ghost-cta{font-family:var(--font-head);font-weight:700;letter-spacing:.06em;}
/* niveau, débit, flèches dans la vignette carrée du nœud : plus petits */
#screen-factories .fg-node-thumb .ag-lvl-badge{top:4px;left:4px;padding:1px 6px;font-size:.68rem;}
#screen-factories .fg-node-thumb :is(.bld-upgrade-btn, .bld-demolish-btn){--rf-cut:4px;bottom:4px;width:20px;height:20px;}
#screen-factories .fg-node-thumb .bld-upgrade-btn{left:4px;}
#screen-factories .fg-node-thumb .bld-demolish-btn{right:4px;}
#screen-factories .fg-node-info .bld-prod-pill{
  gap:4px;padding:0 7px 0 3px;font-size:.72rem;line-height:1.35;color:var(--bld-cat);
  background:color-mix(in srgb, var(--bld-cat) 16%, rgba(6,13,22,.9));
}
#screen-factories .fgx-cat-tag{padding:2px 9px;font-size:.76rem;letter-spacing:.06em;background:color-mix(in srgb, currentColor 15%, transparent);}

/* statistiques globales : des tuiles posées dans le bloc */
#screen-factories .fgx-stats-grid{gap:8px;}
#screen-factories .fgx-stat-tile{
  --rf-cut:7px;--ring:var(--rf-line-soft);position:relative;
  background:rgba(6,13,22,.55);padding:8px 12px;
}
#screen-factories .fgx-stat-label{font-family:var(--font-head);font-size:.8rem;font-weight:600;letter-spacing:.02em;text-transform:none;color:var(--rf-label);}
#screen-factories .fgx-stat-value{display:flex;align-items:center;gap:6px;font-family:var(--font-head);font-size:1.25rem;font-weight:700;color:var(--rf-text-hi);}
#screen-factories .fgx-stat-value .res-img{width:20px;height:20px;}

/* livre de recettes : une carte par recette, trois coins coupés */
#screen-factories .fg-recipe-card{
  --rf-cut:10px;--ring:#243A50;position:relative;
  background:linear-gradient(180deg, rgba(10,19,30,.92), rgba(6,13,22,.92));
}
#screen-factories .fg-recipe-card:hover{--ring:#3B5A78;transform:none;box-shadow:none;}
#screen-factories .fg-recipe-card.equipped{--ring:var(--rf-cyan);}
/* illustration de la recette (onglet Recettes) : en tête de carte, rognée
   par la coupe de la carte */
#screen-factories .fg-recipe-art{height:110px;margin:calc(-12px*var(--scale)) calc(-12px*var(--scale)) 4px;overflow:hidden;border-bottom:1px solid var(--rf-line-soft);}
#screen-factories .fg-recipe-art-img{width:100%;height:100%;object-fit:cover;display:block;}
#screen-factories .fg-recipe-card.locked .fg-recipe-art-img{filter:grayscale(.7) brightness(.7);}
#screen-factories .fg-recipe-card.locked{opacity:1;}
/* v0.92.15.2 (audit D2-02) : l'opacité .6 des textes (formule à 3,81)
   devient une couleur atténuée, au moins --rf-dim */
#screen-factories .fg-recipe-card.locked :is(.fg-formula-text, .desc){color:var(--rf-dim);}
#screen-factories .fg-recipe-head h3{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-factories .fg-recipe-ic{width:24px;height:24px;color:var(--rf-violet);}
#screen-factories .fg-recipe-ic .res-img{width:100%;height:100%;object-fit:contain;}
#screen-factories .fg-recipe-lock{display:inline-flex;width:15px;height:15px;color:#E3A1A8;}
#screen-factories .fg-recipe-lock svg{width:100%;height:100%;}
#screen-factories .fg-formula-text,#screen-factories .fg-recipe-card .desc{font-family:var(--font-head);font-size:.9rem;line-height:1.35;color:var(--rf-label);}
#screen-factories .fg-recipe-card .desc{color:var(--rf-text);}
#screen-factories .fg-formula-chip{gap:4px;padding:2px 8px 2px 4px;font-size:.84rem;color:var(--rf-text);background:color-mix(in srgb, var(--rf-label) 14%, transparent);}
#screen-factories .fg-formula-chip .res-img{width:18px;height:18px;}
#screen-factories .fg-effect-chip{padding:2px 8px;font-size:.8rem;}
#screen-factories .fg-effect-chip.pos{color:var(--lime);background:color-mix(in srgb, var(--lime) 14%, transparent);}
#screen-factories .fg-effect-chip.neg{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, transparent);}
#screen-factories .fg-equipped-tag{padding:2px 9px;font-size:.8rem;color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 15%, transparent);}
#screen-factories .fg-chain-missing{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
/* équiper une recette : action principale, cyan sombre comme Construire */
#screen-factories .fg-recipe-card .btn.green.sm{--rf-fl:var(--rf-cyan);background-color:var(--rf-fill);color:var(--rf-on-fill);}
#screen-factories .fg-recipe-card .btn.green.sm:hover:not(:disabled){--rf-fl:var(--rf-fill-line);background-color:var(--rf-fill-hi);}
/* étiquettes : palier de la recette, source (quête) */
:is(#screen-factories, #fg-colonies-list) .tag{
  letter-spacing:.07em;
  background:color-mix(in srgb, currentColor 14%, transparent);
}

/* liste des usines : le tableau du simulateur, dans un cadre posé */
#screen-factories .fgx-table-wrap{--rf-cut:8px;--rf-fl:var(--rf-line-soft);background-color:rgba(6,13,22,.4);}
#screen-factories .fgx-table{font-family:var(--font-head);font-size:.94rem;font-variant-numeric:tabular-nums;}
#screen-factories .fgx-table th{font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.08em;color:var(--rf-dim);border-bottom:1px solid var(--rf-line-soft);}
#screen-factories .fgx-table td{border-bottom:1px solid var(--rf-line-soft);color:var(--rf-text);}
#screen-factories .fgx-table td.name{font-weight:700;color:var(--rf-text-hi);}
#screen-factories .fgx-table tr:hover td{background:rgba(95,181,169,.05);}
#screen-factories .fgx-table tr.selected td{background:#0E2C29;color:var(--rf-text-hi);}

/* usine sélectionnée (cockpit), aussi dans « Gérer toutes les planètes » */
#screen-factories .fgx-cockpit-empty b{font-family:var(--font-head);font-size:1rem;color:var(--rf-text-hi);}
#screen-factories .fgx-cockpit-empty span{font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-factories .fgx-cockpit-art{
  --rf-cut:12px;position:relative;border:0;border-radius:0;clip-path:var(--rf-in);overflow:hidden;
}
#screen-factories .fgx-cockpit-name h3{font-family:var(--font-head);font-size:1.15rem;font-weight:700;color:var(--rf-text-hi);}
#screen-factories .fgx-cockpit-sec .desc{font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-factories .fgx-cockpit-sec + .fgx-cockpit-sec{border-top-color:var(--rf-line-soft);}
:is(#screen-factories, #fg-colonies-list) .fgx-cockpit-section-title,
:is(#screen-factories, #fg-colonies-list) .sp-list-label{
  font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);
}
:is(#screen-factories, #fg-colonies-list) .fg-cadence-val{color:var(--rf-text-hi);}
:is(#screen-factories, #fg-colonies-list) .fg-cadence-note{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
/* recette et priorité : les segments du simulateur */
#screen-factories .fgx-cockpit .pill-tab,#fg-colonies-list .bcat-pill{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:6px 12px;background-color:#0E1826;transition:none;
  backdrop-filter:none;-webkit-backdrop-filter:none;
  font-family:var(--font-head);font-weight:700;font-size:.82rem;letter-spacing:.06em;color:var(--rf-label);
}
#screen-factories .fgx-cockpit .pill-tab:hover,#fg-colonies-list .bcat-pill:hover{--rf-fl:#3B5A78;color:var(--rf-text-hi);background-color:#0E1826;}
#screen-factories .fgx-cockpit .pill-tab.active,#fg-colonies-list .bcat-pill.active{--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-cyan);}
#screen-factories .fgx-cockpit .pill-tab.locked,#fg-colonies-list .bcat-pill.locked{opacity:.55;}
#screen-factories .fgx-cockpit .pill-tab i,#fg-colonies-list .bcat-pill i{display:none;}
#screen-factories .fgx-cockpit .pill-tab .bld-lock-ic,#fg-colonies-list .bcat-pill .bld-lock-ic{display:inline-flex;margin:0 0 0 6px;}
/* entrées et sorties de la recette : étiquettes avec l'image peinte */
:is(#screen-factories, #fg-colonies-list) .fg-io-chip{
  display:inline-flex;align-items:center;gap:4px;padding:2px 8px 2px 4px;
  font-size:.84rem;color:var(--lime);background:color-mix(in srgb, var(--lime) 14%, transparent);
}
:is(#screen-factories, #fg-colonies-list) .fg-io-chip.ko{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, transparent);}
:is(#screen-factories, #fg-colonies-list) .fg-io-chip .res-img{width:16px;height:16px;}
:is(#screen-factories, #fg-colonies-list) .bld-elec-line{gap:6px;font-family:var(--font-head);font-size:.9rem;font-weight:700;color:var(--bld-energie);}
:is(#screen-factories, #fg-colonies-list) .bld-elec-line .res-img{width:16px;height:16px;}
/* curseur de cadence : rail droit, poignée en losange (comme le
   simulateur, §9) */
:is(#screen-factories, #fg-colonies-list) .fg-cadence-slider{accent-color:var(--rf-cyan);}
:is(#screen-factories, #fg-colonies-list) .fg-cadence-slider::-webkit-slider-runnable-track{border-radius:0;height:3px;background:var(--rf-edge);}
:is(#screen-factories, #fg-colonies-list) .fg-cadence-slider::-moz-range-track{border-radius:0;height:3px;background:var(--rf-edge);}
:is(#screen-factories, #fg-colonies-list) .fg-cadence-slider::-webkit-slider-thumb{width:16px;height:16px;margin-top:-6.5px;border:0;border-radius:0;box-shadow:none;background:var(--rf-cyan);clip-path:polygon(50% 0, 100% 50%, 50% 100%, 0 50%);}
:is(#screen-factories, #fg-colonies-list) .fg-cadence-slider::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:0;background:var(--rf-cyan);clip-path:polygon(50% 0, 100% 50%, 50% 100%, 0 50%);}
#screen-factories .fg-node-info .bld-prod-pill .res-img{width:14px;height:14px;}

/* ============================================================
   15. BANDEAU DES ALERTES ET SES ICÔNES (v0.91.5)
   Demande de l'utilisateur du 01/11/2026 : à gauche de la cloche, un
   cadenas (allumé tant que la colonie est sous immunité) et un triangle
   (les autres alertes, leur nombre en pastille) ; le bandeau se replie
   dans ces icônes ; déplié, sa couleur s'efface vers la droite au lieu
   de tirer sur le noir (l'écran se voit dessous).
   ============================================================ */
#hud :is(.hud-imm, .hud-tri) svg{width:19px;height:19px;color:#5B6B7D;}
#hud :is(.hud-imm, .hud-tri)[aria-disabled="true"]{cursor:default;}
#hud :is(.hud-imm, .hud-tri)[aria-disabled="true"]:hover{--rf-fl:var(--rf-line);}
#hud .hud-imm.is-on svg{color:var(--rf-cyan);}
#hud .hud-imm.is-on{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, transparent);}
#hud .hud-tri.is-on svg{color:var(--rf-amber);}
#hud .hud-tri.is-on{--rf-fl:color-mix(in srgb, var(--rf-amber) 60%, transparent);}
#hud .hud-tri.is-rose svg{color:var(--rf-rose);}
#hud .hud-tri.is-rose{--rf-fl:color-mix(in srgb, var(--rf-rose) 60%, transparent);}
#hud .hud-tri.is-rose .hud-badge{background:var(--rf-rose);}
/* pastille dans le coin du bouton (la règle « #hud .hud-btn > * » du §1
   la remettait dans le flux, à côté de l'icône, cloche comprise) */
#hud .hud-btn > .hud-badge{position:absolute;}
/* barre du haut sur un écran étroit : avec le cadenas et le triangle,
   les ressources débordaient (Scrip coupé dès 1600 px, Électricité à
   1366). Sous 1800 px, le nom de chaque ressource s'efface (son image et
   son infobulle la nomment) ; sous 1500 px, ressources resserrées,
   bouton des matériaux réduit à son « + », nom de la colonie tronqué. */
@media (max-width:1799px){
  #hud .res .name{display:none;}
}
@media (max-width:1500px){
  #hud .res{gap:6px;padding:0 7px;}
  #hud .res .ic{width:28px;height:28px;}
  #hud .res-hub .res-hub-lbl{display:none;}
  #hud .hud-brand-txt{max-width:170px;min-width:0;}
  #hud .hud-brand-txt > *{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
}
/* le bandeau : couleur pleine à gauche, transparente à droite */
.ribbon-row{
  background:linear-gradient(90deg, var(--ribbon-c) 0%, var(--ribbon-c) var(--ribbon-hold), color-mix(in srgb, var(--ribbon-c) 0%, transparent) 72%);
  border-bottom:0;color:var(--rf-text-hi);font-size:.86rem;
  text-shadow:0 1px 3px rgba(4,10,18,.9);
}
.ribbon-row::after{
  content:'';position:absolute;left:0;right:0;bottom:0;height:1px;pointer-events:none;
  background:linear-gradient(90deg, color-mix(in srgb, var(--ribbon-c) 70%, transparent), transparent 72%);
}
.ribbon-row{position:relative;}
/* Voir, Plus tard, Réduire : petits boutons posés */
#ribbon-alerts .ribbon-go{
  --rf-cut:5px;--rf-fl:color-mix(in srgb, var(--ribbon-c) 70%, #5B6B7D);
  padding:4px 11px;background-color:rgba(6,13,22,.72);color:var(--rf-text-hi);
  font-family:var(--font-head);font-weight:700;font-size:.74rem;letter-spacing:.08em;transition:none;
}
#ribbon-alerts .ribbon-go:hover{--rf-fl:var(--rf-text);background-color:color-mix(in srgb, var(--ribbon-c) 40%, rgba(6,13,22,.85));}
#ribbon-alerts .ribbon-fold{color:var(--rf-label);}

/* ============================================================
   16. ÉCRAN QUÊTES (v0.91.6)
   Mêmes formes que Bâtiments et Usines : le bloc de la campagne et
   chaque panneau sont des blocs avec leur onglet de titre ; une ligne
   d'exigence, une carte de déblocage, un haut fait, une ligne
   d'historique, une tuile sont posés dans un bloc (trois coins) ; les
   onglets de l'écran reprennent ceux de l'écran Contrôle ; « Palier V »
   devient une étiquette à côté du nom (plus de sur-titre) ; le bouton
   « Livrer » est le bouton héros ambre, avec son relief. Les pastilles
   rondes de la frise deviennent des éléments posés, sans halo ni
   pulsation. La fenêtre « Voir les détails » (.qx-cmp-list, dans
   #modal) suit les mêmes règles.
   ============================================================ */
/* couleurs d'onglet : la campagne et la directive demandent une action
   (ambre), la colonie est violette comme partout */
#screen-quests .qx-campaign,#qx-panel-directive{--pn-c:var(--rf-amber) !important;}
#qs-panel-colony{--pn-c:var(--rf-violet) !important;}
#screen-quests .qx-card{overflow:visible;}
#screen-quests .qx-card .panel-body{padding:9px 14px 12px;}
#screen-quests .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-quests .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-quests .panel-head .eyebrow{flex:none;white-space:nowrap;}
#screen-quests .qx-hint{font-family:var(--font-head);font-size:.9rem;line-height:1.4;color:var(--rf-label);}
#screen-quests .qx-label,.qx-cmp-list .qx-cmp-label{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-quests .bar.amber i,#screen-quests .qs-status-info .bar i{background:var(--rf-amber);}

/* ---------- en-tête : titre et sous-titre (règles de Bâtiments, §11),
   onglets de l'écran, citation du palier ---------- */
#screen-quests .qx-head-txt h1{text-transform:uppercase;white-space:nowrap;}
#screen-quests .qx-screen-tabs{position:relative;margin:0 0 0 14px;flex:none;}
#screen-quests .qx-screen-tabs .pill-tab{display:inline-flex;align-items:center;gap:8px;text-transform:uppercase;}
#screen-quests .qx-screen-tabs .pill-tab svg{width:17px;height:17px;flex:none;}
#screen-quests .qx-quote{border-right-color:var(--rf-amber);}
#screen-quests .qx-quote blockquote{font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-quests .qx-quote figcaption{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}

/* ---------- bloc de la campagne : onglet de titre dans le coin, frise à
   gauche, résumé du palier à droite ---------- */
#screen-quests .qx-campaign{--rf-cut:10px;padding:0 12px 12px 0;align-items:start;}
#screen-quests .qx-sect-head{min-height:38px;}
#screen-quests .pal-timeline{margin:4px 0 0 12px;padding-top:8px;}
#screen-quests .pal-timeline::before{
  top:calc(8px + 18px * var(--scale));height:2px;
  background:linear-gradient(90deg, var(--rf-cyan) 0%, var(--rf-cyan) var(--pal-progress,0%), var(--rf-edge) var(--pal-progress,0%), var(--rf-edge) 100%);
}
/* une étape : élément posé (trois coins, cadre dans le fond) */
#screen-quests .pal-node .pip{
  --rf-cut:8px;--rf-fl:var(--rf-edge);
  width:calc(38px * var(--scale));height:calc(36px * var(--scale));
  background-color:#0A1622;color:var(--rf-dim);font-family:var(--font-head);font-size:.9rem;transition:none;
}
#screen-quests .pal-node .pip svg{width:16px;height:16px;}
#screen-quests .pal-node .pip::after{content:none;animation:none;}
#screen-quests .pal-node:hover .pip{--rf-fl:var(--rf-cyan);}
#screen-quests .pal-node.done .pip{--rf-fl:var(--rf-cyan);color:var(--rf-cyan);background-color:#0E2C29;}
#screen-quests .pal-node.viewing:not(.active) .pip{--rf-fl:#8FDCCB;background-color:#17483F;color:var(--rf-text-hi);}
#screen-quests .pal-node.active .pip{
  --rf-fl:var(--rf-amber);width:calc(44px * var(--scale));height:calc(40px * var(--scale));margin-top:calc(-2px * var(--scale));
  color:var(--rf-amber);background-color:color-mix(in srgb, var(--rf-amber) 18%, #0A1622);font-size:1rem;
}
#screen-quests .pal-node.next .pip{--rf-fl:color-mix(in srgb, var(--rf-cyan) 40%, var(--rf-edge));}
#screen-quests .pal-node.mystery{opacity:.55;}
#screen-quests .pal-node .lbl{font-family:var(--font-head);font-size:.78rem;letter-spacing:.06em;color:var(--rf-label);}
#screen-quests .pal-node .lbl b{font-weight:700;}
#screen-quests .pal-node .lbl small{font-family:var(--font-head);font-size:.74rem;}
#screen-quests .pal-node.done .lbl{color:var(--rf-cyan);}
#screen-quests .pal-node.active .lbl{color:var(--rf-amber);}

/* résumé du palier en cours : son illustration, son nom et son
   étiquette, ce qu'il débloque, sa citation */
#screen-quests .qx-campaign-summary{
  --rf-cut:10px;--ring:color-mix(in srgb, var(--rf-amber) 50%, var(--rf-edge));
  margin-top:10px;padding:10px 12px 10px 10px;border-radius:0;
  grid-template-columns:clamp(140px, 36%, 240px) minmax(0,1fr);gap:6px 14px;align-items:start;
  background:#0A1622;
}
#screen-quests .qx-sum-img{--rf-cut:8px;grid-row:1 / span 2;aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-quests .qx-sum-img img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-quests .qx-sum-top{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;min-width:0;}
#screen-quests .qx-sum-name{font-family:var(--font-head);font-size:1.3rem;font-weight:700;letter-spacing:.08em;color:var(--rf-text-hi);}
#screen-quests .qx-sum-kicker{
  padding:2px 9px;font-size:.76rem;letter-spacing:.06em;text-transform:uppercase;
  color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 16%, rgba(6,13,22,.9));
}
#screen-quests .qx-sum-desc{margin-top:3px;font-family:var(--font-head);font-size:.9rem;font-weight:500;color:var(--rf-label);}
#screen-quests .qx-sum-lore{margin-top:5px;font-family:var(--font-head);font-size:.9rem;line-height:1.35;color:var(--rf-text);}
#screen-quests .qx-sum-btn{align-self:end;}

/* ---------- colonne gauche : colonie, statut, statistiques ---------- */
#screen-quests .qx-kv{
  flex-wrap:nowrap;align-items:center;min-height:27px;padding:1px 0;border-bottom:1px solid var(--rf-line-soft);
  font-family:var(--font-head);font-size:.93rem;color:var(--rf-label);
}
#screen-quests .qx-kv:last-child{border-bottom:0;}
#screen-quests .qx-kv > span{gap:9px;}
#screen-quests .qx-kv > span svg{width:18px;height:18px;opacity:1;}
#screen-quests .qx-kv b{font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-quests .qs-score{margin-top:4px;padding-top:6px;border-top:1px solid var(--rf-line-soft);}
#screen-quests .qs-score b{color:var(--rf-amber);}
#screen-quests .qs-colony-thumb{box-shadow:none;}
#screen-quests .qs-colony-id b{font-family:var(--font-head);font-size:1.05rem;font-weight:700;color:var(--rf-text-hi);}
#screen-quests .qs-colony-id small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-quests .qs-status-ring{background:conic-gradient(var(--rf-amber) calc(var(--qs-pct)*1%), var(--rf-edge) 0);}
#screen-quests .qs-status-ring::before{background:#08121D;}
#screen-quests .qs-status-ring span{font-family:var(--font-head);font-size:1rem;color:var(--rf-amber);}
#screen-quests .qs-status-name{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}

/* ---------- centre : directive et déblocages ---------- */
#screen-quests .qx-dir-title{font-family:var(--font-head);font-size:1.25rem;font-weight:700;letter-spacing:.04em;color:var(--rf-text-hi);}
#screen-quests .qx-dir-desc{font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
#screen-quests .pal-mystery-note{font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-quests .pal-req-row{--rf-cut:7px;--ring:var(--rf-edge);position:relative;grid-template-columns:minmax(118px, 1.4fr) minmax(40px, 1.3fr) auto auto auto;padding:6px 12px 6px 10px;background:#0A1622;}
#screen-quests .pal-req-name{gap:9px;font-family:var(--font-head);font-size:.98rem;font-weight:600;color:var(--rf-text-hi);}
#screen-quests .pal-req-name .res-img{width:22px;height:22px;flex:none;}
#screen-quests .pal-req-qty{font-family:var(--font-head);font-size:.95rem;font-weight:700;color:var(--rf-text-hi);}
#screen-quests :is(.pal-req-rate, .pal-req-eta){font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-label);}
#screen-quests .pal-req-rate.pos{color:var(--rf-cyan);}
#screen-quests .pal-req-rate.neg{color:var(--rf-rose);}
/* « Livrer » : le bouton héros ambre et son relief ; sans rien à livrer,
   un cadre neutre et son motif dessous */
#screen-quests #btn-deliver{
  --rf-cut:9px;--rf-fl:var(--rf-edge);
  min-height:44px;padding:10px 16px;background-color:#0A1622;color:var(--rf-dim);opacity:1;
  font-family:var(--font-head);font-size:1rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
}
#screen-quests #btn-deliver.qx-hero{--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));background-color:var(--rf-hero);color:var(--rf-hero-ink);}
#screen-quests #btn-deliver.qx-hero:hover:not(:disabled){--rf-fl:transparent;background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#screen-quests .qx-deliver-motif{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
/* carte de déblocage : nom sur deux lignes au plus (plus de « Quêtes x… ») */
#screen-quests .qx-unlocks{grid-template-columns:repeat(auto-fit, minmax(min(100%, 100px), 1fr));gap:7px;}
#screen-quests .qx-unlock{--rf-cut:8px;--ring:var(--rf-edge);position:relative;padding:7px;gap:5px;background:#0A1622;}
#screen-quests .qx-unlock-name{align-items:flex-start;min-height:2.3em;font-family:var(--font-head);font-size:.9rem;font-weight:700;line-height:1.15;color:var(--rf-text-hi);}
#screen-quests .qx-unlock-name span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
#screen-quests .qx-unlock-name svg{width:15px;height:15px;margin-top:1px;}
#screen-quests .qx-unlock-name .res-img{width:17px;height:17px;flex:none;}
#screen-quests .qx-unlock-art{--rf-cut:6px;border-radius:0;clip-path:var(--rf-in);background:#08121D;}
#screen-quests .qx-unlock-art .qx-ph .res-img{width:48px;height:48px;}
#screen-quests .qx-unlock-kind{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
#screen-quests .qx-unlock-state{font-family:var(--font-head);font-size:.82rem;font-weight:700;color:var(--rf-amber);}

/* ---------- résumés classement et hauts faits, onglets complets ---------- */
#screen-quests .qs-lb-bar .pill-tab,
#screen-quests .qs-ach-chips .pill-tab{
  --rf-cut:6px;--rf-fl:var(--rf-edge);
  display:inline-flex;align-items:center;gap:7px;padding:7px 16px 7px 12px;background-color:#0E1826;
  backdrop-filter:none;-webkit-backdrop-filter:none;transition:none;
  font-family:var(--font-head);font-size:.82rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);
}
#screen-quests :is(.qs-lb-bar, .qs-ach-chips) .pill-tab svg{width:15px;height:15px;}
#screen-quests :is(.qs-lb-bar, .qs-ach-chips) .pill-tab small{font-family:var(--font-head);font-size:.8rem;font-weight:700;opacity:1;color:var(--rf-dim);}
#screen-quests :is(.qs-lb-bar, .qs-ach-chips) .pill-tab:hover:not(:disabled){--rf-fl:var(--rf-cyan);color:var(--rf-text-hi);background-color:#0E1C2A;}
#screen-quests :is(.qs-lb-bar, .qs-ach-chips) .pill-tab.active{--rf-fl:var(--rf-cyan);color:var(--rf-cyan);background-color:#0E2C29;}
#screen-quests :is(.qs-lb-bar, .qs-ach-chips) .pill-tab.active small{color:var(--rf-text);}
#screen-quests .qs-lb-bar .pill-tab.locked{opacity:.55;}
/* tableau du classement : un cadre posé, rangs du podium en étiquettes */
#screen-quests :is(.qs-lb-scroll, .qs-lb-mini){--rf-cut:8px;--rf-fl:var(--rf-edge);background-color:#08121D;}
#screen-quests .qs-lb-table{font-family:var(--font-head);font-size:.92rem;}
#screen-quests .qs-lb-table th{font-family:var(--font-head);font-size:.78rem;font-weight:700;color:var(--rf-label);background:#0A1622;border-bottom-color:var(--rf-line-soft);}
#screen-quests .qs-lb-table td{border-bottom-color:var(--rf-line-soft);color:var(--rf-text);}
#screen-quests .qs-lb-table tbody tr:hover td{background:rgba(95,181,169,.05);}
#screen-quests :is(.qs-lb-ally, .qs-lb-pal, .qs-lb-stamp){font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-quests .qs-lb-player{font-size:.95rem;font-weight:700;color:var(--rf-text-hi);}
#screen-quests .qs-lb-rank span{min-width:28px;height:auto;padding:2px 8px;font-size:.84rem;color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));}
#screen-quests .qs-lb-rank.podium span{color:var(--rf-hero-ink);}
#screen-quests .qs-lb-rank.p1 span{background:var(--rf-hero-hi);}
#screen-quests .qs-lb-rank.p2 span{background:#B7C3CF;}
#screen-quests .qs-lb-rank.p3 span{background:#C98A3E;}
#screen-quests .qs-lb-table tr.me td{background:color-mix(in srgb, var(--rf-amber) 12%, transparent);border-color:color-mix(in srgb, var(--rf-amber) 50%, transparent);}
#screen-quests .qs-lb-table tr.me td:first-child{box-shadow:inset 3px 0 0 var(--rf-amber);}
#screen-quests .tag{padding:2px 8px;font-size:.72rem;letter-spacing:.06em;}
#screen-quests :is(.qs-lb-foot, .qs-note){font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-quests .qs-lb-empty{font-family:var(--font-head);font-size:.95rem;color:var(--rf-label);}
#screen-quests .qs-lb-empty svg{color:var(--rf-cyan);opacity:1;}
/* classement vide (invité, aucun joueur, erreur) : son illustration */
#screen-quests .qs-lb-art{--rf-cut:10px;width:min(440px, 80%);aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-quests .qs-lb-art img{display:block;width:100%;height:100%;object-fit:cover;}
/* hauts faits : chaque succès a son insigne (image attendue) */
#screen-quests .qs-ach-badge{
  --rf-cut:8px;flex:none;width:58px;aspect-ratio:1;overflow:hidden;clip-path:var(--rf-in);background:#08121D;
}
#screen-quests .qs-ach-badge img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-quests .qs-ach{--rf-cut:9px;--ring:var(--rf-edge);position:relative;align-items:flex-start;gap:12px;padding:10px 12px 10px 10px;background:#0A1622;opacity:1;}
#screen-quests .qs-ach:not(.done) .qs-ach-badge img{filter:grayscale(.85) brightness(.7);}
#screen-quests .qs-ach:not(.done) .qs-ach-body{opacity:.8;}
#screen-quests .qs-ach-grid{grid-template-columns:repeat(auto-fill, minmax(min(100%, 340px), 1fr));}
#screen-quests .qs-ach-top{align-items:flex-start;}
#screen-quests .qs-ach-top h4{font-family:var(--font-head);font-size:1rem;font-weight:700;line-height:1.2;color:var(--rf-text-hi);white-space:normal;}
#screen-quests .qs-ach-cat{padding:2px 7px;font-size:.72rem;letter-spacing:.06em;}
#screen-quests .qs-ach-body p{font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-quests .qs-ach-prog span,#screen-quests .qs-ach-date{font-family:var(--font-head);font-size:.86rem;font-weight:700;}
#screen-quests .qs-ach-prog span{color:var(--rf-text-hi);}
#screen-quests .qs-achm{--rf-cut:8px;position:relative;gap:12px;padding:7px 10px 7px 8px;}
#screen-quests .qs-achm .qs-ach-badge{width:42px;--rf-cut:6px;}
#screen-quests .qs-achm-meta b{font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-quests .qs-achm-meta small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
/* « Masquer les débloqués » : l'interrupteur prend la coupe des éléments
   posés */
#screen-quests .qs-toggle{font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);border-radius:0;}
#screen-quests .qs-toggle-track{--rf-cut:4px;--rf-fl:var(--rf-edge);width:38px;height:20px;background-color:#0A1622;}
#screen-quests .qs-toggle-track::after{top:4px;left:4px;width:12px;height:12px;border-radius:0;background:var(--rf-dim);}
#screen-quests .qs-toggle.on .qs-toggle-track{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-quests .qs-toggle.on .qs-toggle-track::after{left:22px;background:var(--rf-cyan);}

/* ---------- colonne droite : historique, long terme ---------- */
#screen-quests .qs-hist{--rf-cut:7px;--ring:var(--rf-edge);position:relative;gap:10px;padding:6px 10px 6px 8px;border-radius:0;background:#0A1622;}
#screen-quests .qs-hist-ic{width:auto;height:auto;border:0;border-radius:0;background:none;color:var(--rf-cyan);}
#screen-quests .qs-hist-ic svg{width:19px;height:19px;}
#screen-quests .qs-hist.k-palier .qs-hist-ic{color:var(--rf-amber);}
#screen-quests .qs-hist.k-research .qs-hist-ic{color:var(--rf-violet);}
#screen-quests .qs-hist-kind{font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);}
#screen-quests .qs-hist-msg{font-family:var(--font-head);font-size:.9rem;color:var(--rf-text-hi);}
#screen-quests .qs-hist-when{font-family:var(--font-head);font-size:.8rem;color:var(--rf-dim);}
#screen-quests .qs-lt{--rf-cut:8px;--ring:var(--rf-edge);position:relative;gap:9px;padding:8px 10px 8px 9px;border-radius:0;background:#0A1622;}
#screen-quests .qs-lt-ic{color:var(--rf-cyan);}
#screen-quests .qs-lt-ic svg{width:21px;height:21px;}
#screen-quests .qs-lt b{font-family:var(--font-head);font-size:1.15rem;font-weight:700;color:var(--rf-text-hi);}
#screen-quests .qs-lt small{font-family:var(--font-head);font-size:.78rem;color:var(--rf-label);}

/* ---------- fenêtre « Voir les détails » de la campagne ---------- */
.qx-cmp-list .qx-cmp-item{--rf-cut:9px;--ring:var(--rf-edge);position:relative;gap:14px;padding:12px 12px 12px 12px;border-radius:0;background:#0A1622;}
.qx-cmp-list .qx-cmp-item.active{--ring:color-mix(in srgb, var(--rf-amber) 60%, var(--rf-edge));}
.qx-cmp-list .qx-cmp-item.locked{opacity:.62;}
.qx-cmp-list .qx-cmp-pip{
  align-self:flex-start;width:auto;min-width:40px;height:auto;padding:4px 9px;
  font-family:var(--font-head);font-size:.9rem;color:var(--rf-dim);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));
}
.qx-cmp-list .qx-cmp-item.done .qx-cmp-pip{color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 16%, rgba(6,13,22,.9));}
.qx-cmp-list .qx-cmp-item.active .qx-cmp-pip{color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 16%, rgba(6,13,22,.9));}
.qx-cmp-list .qx-cmp-top b{font-family:var(--font-head);font-size:1.05rem;font-weight:700;color:var(--rf-text-hi);}
.qx-cmp-list .tag{padding:2px 8px;font-size:.72rem;letter-spacing:.06em;}
.qx-cmp-list .qx-cmp-desc{font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
.qx-cmp-list .qx-cmp-lore{font-family:var(--font-head);font-size:.92rem;color:var(--rf-text);border-left-color:var(--rf-amber);}
.qx-cmp-list .qx-cmp-chip{--rf-cut:5px;--rf-fl:var(--rf-edge);gap:6px;padding:4px 10px 4px 8px;background-color:#0E1826;font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-text);}
.qx-cmp-list .qx-cmp-chip svg{width:14px;height:14px;color:var(--rf-amber);}
.qx-cmp-list .qx-cmp-chip .res-img{width:16px;height:16px;}
.qx-cmp-list .qx-cmp-art{--rf-cut:8px;flex:none;align-self:flex-start;width:clamp(120px, 24%, 190px);aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
.qx-cmp-list .qx-cmp-art img{display:block;width:100%;height:100%;object-fit:cover;}
@media (max-width:700px){
  .qx-cmp-list .qx-cmp-art{display:none;}
}
/* écran étroit (1366, 1500) : colonnes latérales d'environ 240 px, les
   titres d'onglet et les tuiles du long terme se resserrent */
@media (max-width:1500px){
  #screen-quests .pn-tab{gap:7px;padding-right:calc(var(--tab-br) + 9px);}
  #screen-quests .pn-title{font-size:.74rem;letter-spacing:.03em;}
  #screen-quests .qs-lt{padding:7px 8px;}
  #screen-quests .qs-lt-ic{display:none;}
  #screen-quests .qs-lt b{font-size:1.05rem;white-space:nowrap;}
  #screen-quests .qs-lt small{font-size:.72rem;}
}
/* écran peu haut (1366 x 768) : en-tête, frise et résumé se resserrent */
@media (max-height:820px){
  #screen-quests .qx-head-txt h1{font-size:1.2rem;}
  #screen-quests .qx-screen-tabs .pill-tab{padding-top:6px;padding-bottom:6px;}
  #screen-quests .qx-campaign{padding-bottom:8px;}
  #screen-quests .pal-timeline{margin-top:0;}
  #screen-quests .qx-campaign-summary{margin-top:8px;padding:8px 10px 8px 8px;grid-template-columns:clamp(110px, 28%, 170px) minmax(0,1fr);}
  #screen-quests .qx-sum-name{font-size:1.1rem;}
}

/* ============================================================
   17. COULEURS PAR SENS (v0.91.7)
   Retour de l'utilisateur du 01/11/2026 : « tout est bleu, tout est
   identique, pauvre en couleur » ; « ne pas refaire le design, qui est
   beau, juste le rendre agréable ». Les formes ne changent pas : seule la
   couleur suit maintenant ce que l'élément montre, la même sur tous les
   écrans, prise dans les teintes déjà présentes du jeu (§0) :
     vert d'eau  navigation, choix (l'accent du jeu, plus le bleu)
     ambre       ce qui demande une action
     violet      recherche, colonies
     rose        menaces, combat
     vert        gagné, obtenu, la vie de la colonie
     bleu        chiffres, information, historique
     or          prestige (hauts faits, classement), électricité
     orange      industrie, ouvriers
   Chaque bloc garde sa couleur, très légèrement, en haut de son fond et
   dans son liseré (§3) ; les cartes et tuiles d'une couleur ont un fond
   à peine teinté en dégradé. Ni halo ni lueur au repos.
   ============================================================ */
/* une couleur par sens, posée par le code (classe rf-c-<sens>) et lue
   par chaque élément dans --c */
.rf-c-cyan{--c:var(--rf-cyan);}
.rf-c-amber{--c:var(--rf-amber);}
.rf-c-violet{--c:var(--rf-violet);}
.rf-c-rose{--c:var(--rf-rose);}
.rf-c-green{--c:var(--rf-green);}
.rf-c-blue{--c:var(--rf-blue);}
.rf-c-gold{--c:var(--rf-gold);}
.rf-c-orange{--c:var(--rf-orange);}
.rf-c-dim{--c:var(--rf-dim);}

/* ---------- couleur des panneaux, écran par écran ---------- */
/* Contrôle : Planète */
#vital-signs-panel,.dv2-dock-block.dock-exped{--pn-c:var(--rf-green) !important;}
#orbit-panel{--pn-c:var(--rf-blue) !important;}
/* Contrôle : Centre de contrôle, Messages */
#cc-panel-activity,#cc-panel-chart,#cc-panel-history,#msg-panel-overview{--pn-c:var(--rf-blue) !important;}
#cc-panel-stats{--pn-c:var(--rf-gold) !important;}
/* Bâtiments */
#bld-panel-vitals{--pn-c:var(--rf-green) !important;}
#bld-panel-workforce{--pn-c:var(--rf-orange) !important;}
#bld-panel-secres,#fgx-panel-secres{--pn-c:var(--rf-blue) !important;}
/* Usines */
#fgx-panel-cats{--pn-c:var(--rf-orange) !important;}
#screen-factories .fgx-bottom-panel:not(.fgx-bottom-recipes){--pn-c:var(--rf-blue) !important;}
/* Quêtes */
#qs-panel-status{--pn-c:var(--rf-amber) !important;}
#qs-panel-stats,#qs-panel-history{--pn-c:var(--rf-blue) !important;}
#qx-panel-unlocks{--pn-c:var(--rf-green) !important;}
#qs-panel-longterm{--pn-c:var(--rf-violet) !important;}
#qs-panel-lbmini,#qs-panel-achmini,#qs-panel-achievements,#qs-panel-leaderboard{--pn-c:var(--rf-gold) !important;}

/* ---------- pictogrammes des lignes : la couleur de ce qu'ils comptent
   (signes vitaux, orbite, colonie de l'écran Planète et de Bâtiments) ---------- */
.vs-ic[data-picto="rowHappy"],.vs-ic[data-picto="rowPopulation"]{color:var(--rf-green) !important;}
.vs-ic[data-picto="rowPollution"]{color:var(--rf-orange) !important;}
.vs-ic[data-picto="rowSatellite"]{color:var(--rf-blue) !important;}
.vs-ic[data-picto="pnShield"]{color:var(--rf-rose) !important;}
.vs-ic[data-picto="rowLock"]{color:var(--rf-dim) !important;}
#screen-planet #dv2-bar-bonheur{background:var(--rf-green);}

/* ---------- Bâtiments, Usines : la carte garde sa catégorie dans son fond ---------- */
#screen-buildings .bld-card{
  background:linear-gradient(180deg, color-mix(in srgb, var(--bld-cat) 16%, rgba(10,19,30,.94)), rgba(6,13,22,.94) 60%);
}
#screen-factories .fg-node-card{
  background:linear-gradient(180deg, color-mix(in srgb, var(--bld-cat) 16%, rgba(10,19,30,.95)), rgba(6,13,22,.95) 65%);
}
/* tuiles de statistiques : la couleur de ce qu'elles mesurent */
#screen-factories .fgx-stat-tile{
  --ring:color-mix(in srgb, var(--c, var(--rf-cyan)) 55%, var(--rf-edge));
  background:linear-gradient(160deg, color-mix(in srgb, var(--c, var(--rf-cyan)) 22%, rgba(6,13,22,.8)), rgba(6,13,22,.6) 75%);
}
#screen-factories .fgx-stat-value{color:color-mix(in srgb, var(--c, var(--rf-cyan)) 80%, var(--rf-text-hi));}

/* ---------- Quêtes ---------- */
/* lignes Colonie et Statistiques : pictogramme de leur couleur */
#screen-quests .qx-kv > span svg{color:var(--c, var(--rf-cyan));}
#screen-quests .qs-score b{color:var(--rf-gold);}
/* résumé du palier : fond chaud */
#screen-quests .qx-campaign-summary{background:linear-gradient(110deg, #0A1622 40%, color-mix(in srgb, var(--rf-amber) 13%, #0A1622));}
/* déblocages : la couleur de ce qu'ils ouvrent ; « Débloqué » en vert */
#screen-quests .qx-unlock{--c:var(--rf-cyan);}
#screen-quests .qx-unlock:is(.k-building, .k-category, .k-recipe){--c:var(--rf-orange);}
#screen-quests .qx-unlock.k-expeditions{--c:var(--rf-green);}
#screen-quests .qx-unlock.k-colony{--c:var(--rf-violet);}
#screen-quests .qx-unlock:is(.k-ship, .k-grade, .k-orbital){--c:var(--rf-blue);}
#screen-quests .qx-unlock.k-defense{--c:var(--rf-rose);}
#screen-quests .qx-unlock.k-cosmetic{--c:var(--rf-gold);}
#screen-quests .qx-unlock{--ring:color-mix(in srgb, var(--c) 30%, var(--rf-edge));}
#screen-quests .qx-unlock.is-unlocked{
  --ring:color-mix(in srgb, var(--c) 55%, var(--rf-edge));
  background:linear-gradient(170deg, color-mix(in srgb, var(--c) 18%, #0A1622), #0A1622 65%);
}
#screen-quests .qx-unlock:hover{--ring:color-mix(in srgb, var(--c) 80%, var(--rf-edge));}
#screen-quests .qx-unlock-name svg,#screen-quests .qx-unlock-art .qx-ph svg{color:var(--c);}
#screen-quests .qx-unlock-state.ok{color:var(--rf-green);}
/* hauts faits : la couleur de leur catégorie */
#screen-quests .cat-firststeps{--c:var(--rf-cyan);}
#screen-quests .cat-exploration{--c:var(--rf-green);}
#screen-quests .cat-industry{--c:var(--rf-orange);}
#screen-quests .cat-campaign{--c:var(--rf-amber);}
#screen-quests .cat-combat{--c:var(--rf-rose);}
#screen-quests .qs-ach-chips .pill-tab:not(.cat-all) svg{color:var(--c);}
#screen-quests .qs-ach-chips .pill-tab.active:not(.cat-all){--rf-fl:var(--c);color:var(--c);background-color:color-mix(in srgb, var(--c) 16%, #0A1622);}
#screen-quests .qs-ach .qs-ach-cat{color:var(--c);background:color-mix(in srgb, var(--c) 16%, rgba(6,13,22,.9));}
#screen-quests .qs-ach .bar i{background:var(--c);}
#screen-quests .qs-ach:hover{--ring:color-mix(in srgb, var(--c) 65%, var(--rf-edge));}
#screen-quests .qs-ach.done{
  --ring:color-mix(in srgb, var(--c) 65%, var(--rf-edge));
  background:linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, #0A1622), #0A1622 78%);
}
#screen-quests .qs-ach.done .qs-ach-date{color:var(--c);}
#screen-quests .qs-achm{
  --ring:color-mix(in srgb, var(--c, var(--rf-gold)) 45%, var(--rf-edge));
  background:linear-gradient(160deg, color-mix(in srgb, var(--c, var(--rf-gold)) 18%, #0A1622), #0A1622 72%);
}
#screen-quests .qs-achm:hover{--ring:color-mix(in srgb, var(--c, var(--rf-gold)) 75%, var(--rf-edge));}
/* tuiles du long terme */
#screen-quests .qs-lt{
  --ring:color-mix(in srgb, var(--c, var(--rf-cyan)) 45%, var(--rf-edge));
  background:linear-gradient(160deg, color-mix(in srgb, var(--c, var(--rf-cyan)) 22%, #0A1622), #0A1622 75%);
}
#screen-quests .qs-lt-ic,#screen-quests .qs-lt b{color:var(--c, var(--rf-cyan));}
/* historique : couleur de l'événement */
#screen-quests .qs-hist.k-building .qs-hist-ic{color:var(--rf-orange);}
#screen-quests .qs-hist.k-palier{--ring:color-mix(in srgb, var(--rf-amber) 35%, var(--rf-edge));}

/* ============================================================
   18. ÉCRAN EXPÉDITIONS (v0.91.8)
   Mêmes formes que Quêtes : chaque panneau et le ruban des mesures sont
   des blocs avec leur onglet de titre ; une carte du journal, une
   expédition en cours, une découverte et le vaisseau choisi sont posés
   dans un bloc (trois coins, anneau) ; les choix (onglets, vaisseaux,
   approches, durée, jauges) sont des cadres dans le fond. Chaque
   destination a son illustration (AG.IMG.expedition) et la couleur de
   son type (§17) : exploration vert d'eau, récolte vert, PvE rose,
   quotidienne ambre. Le journal prend toute la largeur du centre, en
   colonnes fixes (AG.EXPEDITIONS_SCREEN.journalCols) ; un onglet à
   moins de cartes finit sa rangée par « aucun autre signal ».
   ============================================================ */
/* couleurs d'onglet : la colonie en violet, ce qui part et revient en
   vert, les capteurs et les ressources en bleu (information), la
   préparation en ambre (elle demande une action) */
#xp-panel-colony{--pn-c:var(--rf-violet) !important;}
#qx-panel-ongoing,#qx-panel-discoveries{--pn-c:var(--rf-green) !important;}
#qx-panel-sensors,#qx-panel-secres{--pn-c:var(--rf-blue) !important;}
#qx-panel-prep{--pn-c:var(--rf-amber) !important;}
#screen-expeditions .qx-card{overflow:visible;}
#screen-expeditions .qx-card .panel-body{padding:9px 14px 12px;}
#screen-expeditions .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-expeditions .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-expeditions .panel-head .eyebrow{flex:none;white-space:nowrap;color:var(--rf-green);}
#screen-expeditions .qx-hint{font-family:var(--font-head);font-size:.9rem;line-height:1.4;color:var(--rf-label);}
#screen-expeditions .qx-label{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-expeditions .qx-label small{font-weight:500;letter-spacing:0;text-transform:none;}
#screen-expeditions .qx-link{font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-cyan);}
#screen-expeditions .tag{padding:2px 8px;font-size:.72rem;letter-spacing:.06em;}
#screen-expeditions .tag.qx-tier{color:var(--c);background:color-mix(in srgb, var(--c) 22%, rgba(6,13,22,.92));}

/* ---------- en-tête : titre (règles de Bâtiments, §11), citation ---------- */
#screen-expeditions .qx-head-txt h1{text-transform:uppercase;white-space:nowrap;}
#screen-expeditions .qx-quote{border-right-color:var(--rf-green);}
#screen-expeditions .qx-quote blockquote{font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-expeditions .qx-quote figcaption{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}

/* ---------- ruban des mesures : un bloc, une couleur par mesure ---------- */
#screen-expeditions .xp-ribbon{--rf-cut:10px;padding:9px 0;}
#screen-expeditions .xp-stat{gap:12px;padding:0 18px;}
#screen-expeditions .xp-stat + .xp-stat{border-left:1px solid var(--rf-line-soft);}
#screen-expeditions .xp-stat-ic{width:30px;height:30px;border:0;border-radius:0;background:none;color:var(--c);}
#screen-expeditions .xp-stat-ic svg{width:100%;height:100%;}
#screen-expeditions .xp-stat-txt{gap:3px;}
#screen-expeditions .xp-stat-txt b{font-family:var(--font-head);font-size:1.32rem;font-weight:700;line-height:1.05;color:color-mix(in srgb, var(--c) 55%, var(--rf-text-hi));}
#screen-expeditions .xp-stat-txt small{font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-label);}
#screen-expeditions .xp-stat .qx-gauge.lvl-good i.on,#screen-expeditions .xp-stat .bar i{background:var(--c);}

/* ---------- jauges à segments : segments droits ---------- */
#screen-expeditions .qx-gauge{gap:3px;}
#screen-expeditions .qx-gauge i{height:8px;border-radius:0;background:rgba(95,181,169,.13);}
#screen-expeditions .qx-gauge.lvl-good i.on{background:var(--rf-cyan);}
#screen-expeditions .qx-gauge.lvl-mid i.on,#screen-expeditions .qx-gauge.risk-mid i.on{background:var(--rf-amber);}
#screen-expeditions .qx-gauge.lvl-low i.on,#screen-expeditions .qx-gauge.risk-high i.on{background:var(--rf-rose);}
#screen-expeditions .qx-gauge.risk-low i.on{background:var(--rf-green);}
#screen-expeditions .qx-lvl-good{color:var(--rf-cyan);}
#screen-expeditions :is(.qx-lvl-mid, .qx-risk-mid){color:var(--rf-amber);}
#screen-expeditions :is(.qx-lvl-low, .qx-risk-high){color:var(--rf-rose);}
#screen-expeditions .qx-risk-low{color:var(--rf-green);}
#screen-expeditions .qx-meter-row b{font-family:var(--font-head);font-size:.98rem;font-weight:700;}
#screen-expeditions .qx-meter-lbl{font-family:var(--font-head);font-size:.82rem;font-weight:600;color:var(--rf-label);}

/* ---------- colonne gauche ---------- */
#screen-expeditions .qx-kv{
  flex-wrap:nowrap;align-items:center;min-height:27px;padding:1px 0;
  font-family:var(--font-head);font-size:.93rem;color:var(--rf-label);
}
#screen-expeditions .qx-kv > span svg{width:18px;height:18px;opacity:1;color:var(--rf-green);}
#screen-expeditions .qx-kv b{font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-expeditions .qs-colony-thumb{box-shadow:none;}
#screen-expeditions .xp-colony{gap:11px;margin-bottom:6px;}
#screen-expeditions .xp-colony-meta b{font-family:var(--font-head);font-size:1.05rem;font-weight:700;color:var(--rf-text-hi);}
#screen-expeditions .xp-colony-meta small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
/* expédition en cours : posée, teintée de vert ; emplacement libre : un
   cadre sombre et son « + » */
#screen-expeditions .qx-run{
  --rf-cut:8px;--ring:color-mix(in srgb, var(--rf-green) 40%, var(--rf-edge));
  position:relative;gap:10px;padding:7px 10px 7px 7px;
  background:linear-gradient(160deg, color-mix(in srgb, var(--rf-green) 14%, #0A1622), #0A1622 70%);
}
#screen-expeditions .qx-run.clickable:hover{--ring:color-mix(in srgb, var(--rf-green) 75%, var(--rf-edge));}
#screen-expeditions .qx-run-dest{font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-expeditions .qx-run-ship{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
#screen-expeditions .qx-run-foot{font-family:var(--font-head);font-size:.84rem;font-weight:700;color:var(--rf-green);}
#screen-expeditions .qx-run .bar i{background:var(--rf-green);}
#screen-expeditions .qx-slot{
  --rf-cut:8px;--rf-fl:var(--rf-edge);gap:10px;padding:9px 10px;background-color:rgba(6,13,22,.55);
  font-family:var(--font-head);font-size:.9rem;font-weight:600;color:var(--rf-label);
}
#screen-expeditions .qx-slot-ic{
  width:24px;height:24px;border:0;border-radius:0;color:var(--rf-green);font-family:var(--font-head);font-weight:700;font-size:1rem;
  background:color-mix(in srgb, var(--rf-green) 18%, #0A1622);
  clip-path:polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}
#screen-expeditions .qx-thumb{--rf-cut:6px;border:0;border-radius:0;clip-path:var(--rf-in);background:#08121D;}
/* réseau de capteurs : son illustration, l'état en étiquette */
#screen-expeditions .qx-status{
  flex:none;align-self:flex-start;margin:0 0 2px;gap:6px;padding:2px 8px;font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;
  color:var(--rf-dim);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));
}
#screen-expeditions .qx-status .qx-dot{width:6px;height:6px;border-radius:0;transform:rotate(45deg);box-shadow:none;background:var(--rf-dim);}
#screen-expeditions .qx-status.online{color:var(--rf-green);background:color-mix(in srgb, var(--rf-green) 16%, rgba(6,13,22,.9));}
#screen-expeditions .qx-status.online .qx-dot{background:var(--rf-green);box-shadow:none;}
#screen-expeditions .qx-sensor{gap:12px;margin-bottom:10px;}
#screen-expeditions .qx-sensor-info{gap:3px;}
/* portée : le libellé au-dessus, le lieu entier dessous */
#screen-expeditions .qx-sensor-info .qx-kv{flex-direction:column;align-items:flex-start;gap:0;}
#screen-expeditions .qx-sensor-info .qx-kv b{margin-left:0;text-align:left;white-space:normal;}
#screen-expeditions .qx-sensor-art{--rf-cut:8px;width:76px;border:0;border-radius:0;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-expeditions :is(.qx-sensor-art, .qx-disc-empty, .qx-prep-empty-art) img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-expeditions .qx-sensor-grade{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
/* dernières découvertes : une ligne posée, son pictogramme de la couleur
   de sa nature ; vide : son illustration au-dessus du texte */
#screen-expeditions .qx-disc-list{gap:6px;}
#qx-discoveries .qx-disc{--rf-cut:7px;--ring:var(--rf-edge);position:relative;gap:10px;padding:6px 10px 6px 8px;border-radius:0;background:#0A1622;}
#qx-discoveries .qx-disc-ic{width:auto;height:auto;border:0;border-radius:0;background:none;color:var(--rf-green);}
#qx-discoveries .qx-disc-ic svg{width:20px;height:20px;}
#qx-discoveries .qx-disc-ic.k-scan_system{color:var(--rf-blue);}
#qx-discoveries .qx-disc-ic.k-scan_planet{color:var(--rf-violet);}
#qx-discoveries .qx-disc-name{font-family:var(--font-head);font-size:.92rem;font-weight:700;color:var(--rf-text-hi);}
#qx-discoveries .qx-disc-sub{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
#qx-discoveries .qx-disc-when{font-family:var(--font-head);font-size:.78rem;color:var(--rf-dim);}
#screen-expeditions .qx-disc-empty{--rf-cut:8px;aspect-ratio:4 / 1;margin-bottom:8px;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}

/* ---------- centre : carte des secteurs et secteur choisi ---------- */
#screen-expeditions .xp-maprow{height:clamp(220px, 23vh, 260px);}
#screen-expeditions .xp-map-sub{margin-left:4px;font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);}
#screen-expeditions .xp-map-stage{background:radial-gradient(ellipse at 50% 50%, rgba(95,181,169,.07), transparent 65%);}
#screen-expeditions .xp-map-legend{
  --rf-cut:7px;--rf-fl:var(--rf-edge);left:10px;top:10px;gap:4px;padding:8px 12px 8px 10px;border-radius:0;
  background-color:rgba(6,13,22,.84);
}
#screen-expeditions .xp-leg{gap:8px;font-family:var(--font-head);font-size:.8rem;font-weight:600;color:var(--rf-text);}
#screen-expeditions .xp-map-tools{left:10px;right:10px;bottom:10px;}
#screen-expeditions .xp-zoom{--rf-cut:6px;--rf-fl:var(--rf-edge);gap:2px;padding:2px;border-radius:0;background-color:rgba(6,13,22,.84);}
#screen-expeditions .xp-zoom button{border-radius:0;color:var(--rf-cyan);font-family:var(--font-head);font-size:1.05rem;font-weight:700;}
#screen-expeditions .xp-zoom button:hover:not(:disabled){background:#0E2C29;color:var(--rf-text-hi);}
#screen-expeditions .xp-zoom span{font-family:var(--font-head);font-size:.8rem;font-weight:600;color:var(--rf-label);}
#screen-expeditions .xp-sector-body{gap:6px;}
/* les textes gardent leur hauteur, seule l'illustration se resserre */
#screen-expeditions .xp-sector-body > :not(.xp-sector-art){flex:none;}
#screen-expeditions .xp-sector-art{--rf-cut:9px;border:0;border-radius:0;clip-path:var(--rf-in);background-color:#08121D;}
#screen-expeditions .xp-sector-art .qx-tier{top:8px;right:8px;}
#screen-expeditions .xp-sector-kicker{font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--rf-cyan);}
#screen-expeditions .xp-sector-name{font-family:var(--font-head);font-size:1.15rem;font-weight:700;letter-spacing:.03em;color:var(--rf-text-hi);}
#screen-expeditions .xp-sector-desc{font-family:var(--font-head);font-size:.88rem;color:var(--rf-label);}
#screen-expeditions .xp-sector-state{gap:8px;font-family:var(--font-head);font-size:.84rem;font-weight:700;color:var(--rf-text);}
#screen-expeditions .xp-sector-state i{border-radius:0;transform:rotate(45deg);box-shadow:none;}

/* ---------- centre : journal sur toute la largeur ---------- */
#screen-expeditions #qx-panel-journal{width:auto;align-self:stretch;}
#screen-expeditions .qx-sect-hint{margin-left:12px;font-family:var(--font-head);font-size:.86rem;font-weight:500;color:var(--rf-label);}
/* onglets : posés sur le fond, la couleur du type une fois choisis */
#screen-expeditions .qx-tabs{margin:0 0 10px;gap:6px;}
#screen-expeditions .qx-tabs .pill-tab{
  --rf-cut:6px;--rf-fl:var(--rf-edge);
  padding:7px 18px 7px 14px;background-color:#0E1826;backdrop-filter:none;-webkit-backdrop-filter:none;transition:none;
  font-family:var(--font-head);font-size:.84rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);
}
#screen-expeditions .qx-tabs .pill-tab:hover{--rf-fl:color-mix(in srgb, var(--c) 70%, var(--rf-edge));color:var(--rf-text-hi);background-color:#0E1C2A;}
#screen-expeditions .qx-tabs .pill-tab.active{--rf-fl:var(--c);color:var(--c);background-color:color-mix(in srgb, var(--c) 16%, #0A1622);}
#screen-expeditions .qx-grid{grid-template-columns:repeat(var(--xp-cols, 3), minmax(0,1fr));gap:12px;align-content:start;}
/* une destination : posée dans le bloc, son illustration en tête, fond
   à peine teinté de la couleur de son type */
#screen-expeditions .qx-qcard{
  --rf-cut:10px;--ring:color-mix(in srgb, var(--c) 30%, var(--rf-edge));
  background:linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, #0A1622), #0A1622 55%);
}
#screen-expeditions .qx-qcard:not(.locked):not(.qx-qcard-none):hover{--ring:color-mix(in srgb, var(--c) 75%, var(--rf-edge));}
#screen-expeditions .qx-qcard.selected{
  --ring:var(--c);
  background:linear-gradient(180deg, color-mix(in srgb, var(--c) 24%, #0A1622), #0A1622 70%);
}
#screen-expeditions .qx-qcard.in-progress{--ring:color-mix(in srgb, var(--rf-green) 70%, var(--rf-edge));}
#screen-expeditions .qx-qcard.locked{--ring:var(--rf-edge);background:#0A1622;}
#screen-expeditions .qx-qcard-art{aspect-ratio:16 / 6;border-bottom:0;background:#08121D;}
/* carte choisie : un trait de sa couleur sous l'illustration */
#screen-expeditions .qx-qcard.selected .qx-qcard-art::after{content:'';position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--c);}
#screen-expeditions .qx-qcard-art .qx-tier{top:8px;right:8px;}
#screen-expeditions .qx-qcard-lockic{background:rgba(4,9,16,.55);}
#screen-expeditions .qx-qcard-lockic svg{width:26px;height:26px;color:var(--rf-text-hi);}
#screen-expeditions .qx-qcard-body{gap:6px;padding:9px 12px 12px;}
#screen-expeditions .qx-qcard-title{font-family:var(--font-head);font-size:1.08rem;font-weight:700;letter-spacing:.03em;color:var(--rf-text-hi);}
#screen-expeditions .qx-qcard-desc{font-family:var(--font-head);font-size:.88rem;color:var(--rf-label);}
#screen-expeditions .qx-tags{gap:5px;}
#screen-expeditions .qx-tag{gap:5px;padding:2px 8px;font-size:.74rem;letter-spacing:.05em;color:var(--rf-text);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));}
#screen-expeditions .qx-tag svg{width:12px;height:12px;}
#screen-expeditions .qx-tag-type{text-transform:uppercase;color:var(--c);background:color-mix(in srgb, var(--c) 16%, rgba(6,13,22,.9));}
#screen-expeditions .qx-qcard-meta{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);}
#screen-expeditions .qx-qcard-sys svg{width:13px;height:13px;color:var(--c);}
/* la coordonnée ouvre la Carte (bouton sans fond) */
#screen-expeditions button.qx-qcard-sys{padding:0;border:0;background:none;font:inherit;color:var(--rf-cyan);cursor:pointer;}
#screen-expeditions button.qx-qcard-sys:hover{color:var(--rf-text-hi);text-decoration:underline;}
/* récompenses : le libellé et ses étiquettes sur une ligne */
#screen-expeditions .qx-qcard-rewards{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;}
#screen-expeditions .qx-qcard-rewards .qx-label{margin:0;font-size:.72rem;}
/* récompenses : une couleur par nature (ressources, recette, xénocristaux) */
#screen-expeditions .qx-rw{--c:var(--rf-green);gap:5px;padding:3px 8px;color:var(--c);background:color-mix(in srgb, var(--c) 14%, rgba(6,13,22,.9));}
#screen-expeditions .qx-rw.k-scan{--c:var(--rf-orange);}
#screen-expeditions .qx-rw.k-fight{--c:var(--rf-rose);}
#screen-expeditions .qx-rw svg{width:13px;height:13px;}
#screen-expeditions .qx-rw b{font-family:var(--font-head);font-size:.86rem;font-weight:700;color:var(--rf-text-hi);}
#screen-expeditions .qx-qcard-lock{font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-amber);}
#screen-expeditions .qx-qcard-done{font-family:var(--font-head);font-size:.9rem;font-weight:700;color:var(--rf-green);}
#screen-expeditions .qx-qcard-progress{font-family:var(--font-head);font-size:.86rem;font-weight:700;color:var(--rf-green);}
#screen-expeditions .qx-qcard-progress .bar i{background:var(--rf-green);}
/* « Choisie » : le bouton prend la couleur du type */
#screen-expeditions .btn.primary.sm.qx-btn-prepare.is-selected{--rf-fl:var(--c);background-color:color-mix(in srgb, var(--c) 32%, #0A1622);color:var(--rf-text-hi);}
#screen-expeditions .btn.sm.qx-btn-locked{--rf-fl:color-mix(in srgb, var(--rf-amber) 40%, var(--rf-edge));background-color:#0A1622;}
/* fin de rangée : aucun autre signal de ce type */
#screen-expeditions .qx-qcard-none{
  --c:var(--rf-dim);--ring:var(--rf-line-soft);cursor:default;
  background:rgba(6,13,22,.55);
}
#screen-expeditions .qx-qcard-none .qx-qcard-art{flex:1 1 auto;aspect-ratio:auto;min-height:110px;opacity:.7;}
#screen-expeditions .qx-qcard-none .qx-hint{padding:10px 16px 12px;text-align:center;}

/* ---------- colonne droite : préparation ---------- */
#screen-expeditions .qx-prep-empty{gap:12px;padding:2px 0 4px;font-family:var(--font-head);font-size:.95rem;color:var(--rf-label);}
#screen-expeditions .qx-prep-empty-art{--rf-cut:10px;width:100%;aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-expeditions .qx-prep-target{grid-template-columns:minmax(0,1fr);gap:8px;padding-bottom:12px;margin-bottom:12px;border-bottom-color:var(--rf-line-soft);}
#screen-expeditions .qx-prep-art{--rf-cut:10px;width:100%;aspect-ratio:16 / 6;border:0;border-radius:0;clip-path:var(--rf-in);background:#08121D;}
#screen-expeditions .qx-prep-kicker{gap:8px;font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--c);}
#screen-expeditions .qx-prep-title{margin:3px 0 3px;font-family:var(--font-head);font-size:1.3rem;font-weight:700;letter-spacing:.03em;color:var(--rf-text-hi);}
#screen-expeditions .qx-prep-sector{gap:4px 10px;font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-expeditions .qx-prep-sector svg{width:13px;height:13px;color:var(--rf-cyan);}
#screen-expeditions .qx-prep-desc{font-family:var(--font-head);font-size:.9rem;line-height:1.4;color:var(--rf-text);}
#screen-expeditions .qx-prep-sec{margin-bottom:12px;}
#screen-expeditions .qx-ship{--rf-cut:8px;--ring:var(--rf-edge);position:relative;gap:10px;padding:7px 8px 7px 7px;border-radius:0;background:#0A1622;}
#screen-expeditions .qx-ship-meta b{font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-expeditions .qx-ship-meta small{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
#screen-expeditions .qx-ship-stats{gap:6px;margin-top:7px;}
#screen-expeditions .qx-stat{--rf-cut:6px;--rf-fl:var(--rf-edge);padding:6px 8px;background-color:#0A1622;}
#screen-expeditions .qx-stat span{font-family:var(--font-head);font-size:.72rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);}
#screen-expeditions .qx-stat b{font-family:var(--font-head);font-size:1.02rem;font-weight:700;color:var(--rf-blue);}
#screen-expeditions .qx-picker-row{--rf-cut:6px;--rf-fl:var(--rf-edge);background-color:#0A1622;}
#screen-expeditions .qx-picker-row:hover{--rf-fl:var(--rf-cyan);}
#screen-expeditions .qx-picker-row.sel{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-expeditions .qx-picker-meta b{font-family:var(--font-head);font-size:.92rem;font-weight:700;color:var(--rf-text-hi);}
#screen-expeditions .qx-picker-meta small{font-family:var(--font-head);font-size:.78rem;color:var(--rf-label);}
/* durée sur place : un cadre, le curseur droit et ambre */
#screen-expeditions .qx-dur{--rf-cut:8px;--rf-fl:var(--rf-edge);padding:9px 11px;background-color:#0A1622;}
#screen-expeditions .qx-dur-val{font-family:var(--font-head);font-size:1.05rem;font-weight:700;color:var(--rf-amber);}
#screen-expeditions .qx-dur-scale{font-family:var(--font-head);font-size:.76rem;color:var(--rf-dim);}
#screen-expeditions .qx-dur-breakdown{font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-text);}
#screen-expeditions .qx-range::-webkit-slider-runnable-track{
  height:6px;border:0;border-radius:0;
  background:linear-gradient(90deg, var(--rf-amber) 0, var(--rf-amber) var(--qx-range-pct), rgba(95,181,169,.26) var(--qx-range-pct));
}
#screen-expeditions .qx-range::-moz-range-track{height:6px;border:0;border-radius:0;background:rgba(95,181,169,.26);}
#screen-expeditions .qx-range::-moz-range-progress{height:6px;border-radius:0;background:var(--rf-amber);}
#screen-expeditions .qx-range::-webkit-slider-thumb{width:12px;height:20px;margin-top:-7px;border-radius:0;background:var(--rf-amber);border:2px solid #0A1622;}
#screen-expeditions .qx-range::-moz-range-thumb{width:8px;height:16px;border-radius:0;background:var(--rf-amber);border:2px solid #0A1622;}
#screen-expeditions .qx-range:is(:hover, :focus-visible)::-webkit-slider-thumb{box-shadow:0 0 0 4px rgba(214,158,46,.25);}
#screen-expeditions .qx-meter{--rf-cut:8px;--rf-fl:var(--rf-edge);padding:8px 10px;background-color:#0A1622;}
/* approche : la couleur de ce qu'elle rapporte */
#screen-expeditions .qx-reward{--c:var(--rf-green);--rf-cut:7px;--rf-fl:var(--rf-edge);gap:10px;padding:8px 10px;background-color:#0A1622;}
#screen-expeditions .qx-reward[data-choice="scan"]{--c:var(--rf-orange);}
#screen-expeditions .qx-reward[data-choice="fight"]{--c:var(--rf-rose);}
#screen-expeditions .qx-reward:hover{--rf-fl:color-mix(in srgb, var(--c) 70%, var(--rf-edge));}
#screen-expeditions .qx-reward.sel{--rf-fl:var(--c);background-color:color-mix(in srgb, var(--c) 14%, #0A1622);}
#screen-expeditions .qx-reward-ic{width:28px;height:28px;border-radius:0;color:var(--c);background:color-mix(in srgb, var(--c) 18%, #0A1622);}
#screen-expeditions .qx-reward-ic svg{width:16px;height:16px;}
#screen-expeditions .qx-reward-txt b{font-family:var(--font-head);font-size:.95rem;font-weight:700;color:var(--rf-text-hi);}
#screen-expeditions .qx-reward-txt small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
#screen-expeditions .qx-reward-prob{font-family:var(--font-head);font-size:.78rem;font-weight:700;color:var(--rf-dim);}
#screen-expeditions .qx-reward.sel .qx-reward-prob{color:var(--c);}
#screen-expeditions .qx-rw-mult{font-family:var(--font-head);color:var(--rf-amber);}
/* lancer : le bouton héros ambre et son relief ; bloqué, un cadre neutre
   et son motif dessous */
#screen-expeditions .qx-launch{
  --rf-cut:9px;--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));
  min-height:46px;padding:11px 16px;background-color:var(--rf-hero);color:var(--rf-hero-ink);
  font-family:var(--font-head);font-size:1.02rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
}
#screen-expeditions .qx-launch:hover:not(:disabled){background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#screen-expeditions .qx-launch:disabled{
  --rf-fl:var(--rf-edge);--rf-relief:linear-gradient(transparent, transparent);
  background-color:#0A1622;color:var(--rf-dim);opacity:1;
}
/* le lancement reste en vue en bas de la colonne pendant qu'on règle la
   préparation (la colonne défile, sans barre visible) ; sous l'anneau du
   bloc (z-index 3) */
#screen-expeditions .qx-prep-launch{
  position:sticky;bottom:0;z-index:2;margin:4px -14px -12px;padding:18px 14px 12px;
  background:linear-gradient(180deg, rgba(0,4,10,0), rgba(0,4,10,.95) 18px);
}
#screen-expeditions .qx-prep-cost{margin-top:8px;font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-expeditions .qx-prep-cost b{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
#screen-expeditions .qx-launch-motif{font-family:var(--font-head);font-size:.88rem;font-weight:600;color:var(--rf-amber);}

/* écran étroit (1366, 1500) : le ruban garde ses quatre mesures sur une
   ligne, plus serrées ; titres d'onglet resserrés */
@media (max-width:1500px){
  #screen-expeditions .xp-ribbon{grid-template-columns:repeat(4, minmax(0,1fr));}
  #screen-expeditions .xp-stat{padding:0 12px;}
  #screen-expeditions .xp-stat:nth-child(3){border-left:1px solid var(--rf-line-soft);}
  /* le libellé entier plutôt que le pictogramme : le chiffre garde la
     couleur de sa mesure */
  #screen-expeditions .xp-stat-ic{display:none;}
  #screen-expeditions .xp-stat-txt b{font-size:1.2rem;}
  #screen-expeditions .xp-stat-txt small{font-size:.76rem;}
  #screen-expeditions .pn-tab{gap:7px;padding-right:calc(var(--tab-br) + 9px);}
  #screen-expeditions .pn-title{font-size:.74rem;letter-spacing:.03em;}
  #screen-expeditions .qx-sensor-art{width:64px;}
  #screen-expeditions .qx-qcard-body{padding:9px 10px 11px;}
  #screen-expeditions .qx-qcard-title{font-size:1rem;}
}
/* écran peu haut (1366 x 768) : carte des secteurs et illustrations
   plus basses, pour que les cartes du journal restent en vue */
@media (max-height:820px){
  #screen-expeditions .xp-maprow{height:clamp(190px, 26vh, 230px);}
  #screen-expeditions .xp-sector-art{min-height:44px;}
  #screen-expeditions .xp-sector-desc{display:none;}
  #screen-expeditions .xp-ribbon{padding:8px 0;}
  #screen-expeditions .qx-qcard-art{aspect-ratio:16 / 5;}
  #screen-expeditions .qx-qcard-desc{display:none;}
  #screen-expeditions .qx-prep-art{aspect-ratio:16 / 6;}
  #screen-expeditions .qx-prep-empty-art{aspect-ratio:16 / 8;}
}

/* ============================================================
   19. ÉCRAN RECHERCHE (v0.91.9)
   Mêmes formes que Quêtes et Expéditions : chaque panneau et chaque
   carte de branche sont des blocs ; une technologie de l'arbre et une
   doctrine sont posées dans leur bloc (trois coins, anneau) ; une
   colonie, l'effet d'une technologie et les boutons sont des cadres dans
   le fond ; tier, coûts, liens et rang dans la file en étiquettes.
   Chaque branche garde sa couleur (AG.RS_BRANCH_META, couleurs par sens
   du §17) : sa carte, l'arbre et la fiche Détails la prennent (--pn-c
   posé par le code). Illustrations attendues : une par technologie
   (fiche), une par branche (en-tête de l'arbre), une par doctrine, et
   « aucune recherche en cours ».
   ============================================================ */
/* couleurs d'onglet : la recherche en violet, la file et les chiffres en
   bleu, la doctrine en ambre (un choix à faire) */
#rs-panel-planets,#rs-panel-active{--pn-c:var(--rf-violet) !important;}
#rs-panel-queue,#rs-panel-stats{--pn-c:var(--rf-blue) !important;}
#rs-panel-doctrine{--pn-c:var(--rf-amber) !important;}
#screen-research .qx-card{overflow:visible;}
#screen-research .qx-card .panel-body{padding:9px 14px 12px;}
#screen-research .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-research .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-research .panel-head .eyebrow{flex:none;white-space:nowrap;}
#screen-research #rs-queue-count{color:var(--rf-blue);}
#screen-research .qx-hint{font-family:var(--font-head);font-size:.9rem;line-height:1.4;color:var(--rf-label);}
#screen-research .bar i{background:var(--rf-violet);}

/* ---------- en-tête : titre, citation ---------- */
#screen-research .qx-head-txt h1{text-transform:uppercase;white-space:nowrap;}
#screen-research .qx-quote{border-right-color:var(--rf-violet);}
#screen-research .qx-quote blockquote{font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-research .qx-quote figcaption{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}

/* ---------- colonne gauche ---------- */
#screen-research .rs-colony-list{gap:6px;}
#screen-research .rs-colony{
  --rf-cut:7px;--rf-fl:var(--rf-edge);gap:10px;padding:7px 10px;background-color:#0A1622;transition:none;
}
#screen-research .rs-colony:hover{--rf-fl:color-mix(in srgb, var(--rf-violet) 60%, var(--rf-edge));background-color:#0E1826;}
#screen-research .rs-colony.sel{--rf-fl:var(--rf-violet);background-color:color-mix(in srgb, var(--rf-violet) 14%, #0A1622);}
#screen-research .rs-colony-dot{width:7px;height:7px;border-radius:0;transform:rotate(45deg);box-shadow:none;background:var(--rf-dim);}
#screen-research .rs-colony-dot.on{background:var(--rf-green);box-shadow:none;}
#screen-research .rs-colony-dot.busy{background:var(--rf-violet);box-shadow:none;}
#screen-research .rs-colony-txt b{font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-research .rs-colony-txt small{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
/* pictogramme d'une technologie : sans pastille, la couleur de sa branche */
#screen-research .rs-tech-ic{width:22px;height:22px;border:0;border-radius:0;background:none;color:var(--rs-cat);}
#screen-research .rs-tech-ic svg{width:100%;height:100%;}
/* recherche en cours */
#screen-research .rs-idle-art{--rf-cut:8px;aspect-ratio:4 / 1;margin-bottom:8px;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-research :is(.rs-idle-art, .rs-bh-art, .rs-dt-hero, .rs-doc-art) img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-research .rs-active{gap:11px;padding:0;border-radius:0;}
#screen-research .rs-active .rs-tech-ic{width:30px;height:30px;}
#screen-research .rs-active-name{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-research .rs-active:hover .rs-active-name{color:var(--rs-cat);}
#screen-research .rs-active-sub{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-research .rs-progress-row{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);}
#screen-research #rs-active .rs-progress .bar i{background:var(--rf-violet);}
#screen-research .rs-sci-line{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);}
#screen-research .rs-sci-line > span:first-child{color:var(--rf-violet);}
/* file d'attente : rang en étiquette violette */
#screen-research .rs-queue-row{gap:10px;padding:6px 0;border-bottom:1px solid var(--rf-line-soft);}
#screen-research .rs-queue-pos{
  width:auto;min-width:24px;height:auto;padding:2px 7px;font-size:.84rem;color:var(--rf-violet);
  background:color-mix(in srgb, var(--rf-violet) 16%, rgba(6,13,22,.9));
}
#screen-research .rs-queue-lab b{font-family:var(--font-head);font-size:.94rem;font-weight:700;color:var(--rf-text-hi);}
#screen-research .rs-queue-lab:hover b{color:var(--rf-violet);}
#screen-research .rs-queue-lab small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
#screen-research .rs-queue-note{font-style:normal;}
/* statistiques : pictogrammes bleus */
#screen-research .qx-kv{
  flex-wrap:nowrap;align-items:center;min-height:27px;padding:1px 0;
  font-family:var(--font-head);font-size:.93rem;color:var(--rf-label);
}
#screen-research .qx-kv > span svg{width:18px;height:18px;opacity:1;color:var(--rf-blue);}
#screen-research .qx-kv b{font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-research .rs-overview-btn{margin-top:10px;}
#screen-research .rs-foot-quote{border-left-color:var(--rf-violet);}
#screen-research .rs-foot-quote blockquote{font-family:var(--font-head);font-size:.9rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-research .rs-foot-quote figcaption{font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);}

/* ---------- branches : un bloc par branche, à sa couleur ---------- */
#screen-research .rs-branch{
  --pn-c:var(--rs-cat);--rf-cut:9px;
  gap:5px;padding:10px 7px 9px 10px;transform:none;transition:none;
  background:linear-gradient(170deg, color-mix(in srgb, var(--rs-cat) 16%, transparent), transparent 75%), var(--rf-bg);
}
#screen-research .rs-branch::after{background:color-mix(in srgb, var(--rs-cat) 35%, var(--rf-edge));}
#screen-research .rs-branch:hover{transform:none;}
#screen-research .rs-branch:hover::after{background:color-mix(in srgb, var(--rs-cat) 75%, var(--rf-edge));}
/* branche choisie : fond plus teinté, liseré plein et un trait en pied */
#screen-research .rs-branch.sel{
  box-shadow:none;
  background:
    linear-gradient(0deg, var(--rs-cat) 0 3px, transparent 3px),
    linear-gradient(170deg, color-mix(in srgb, var(--rs-cat) 30%, transparent), transparent 85%), var(--rf-bg);
}
#screen-research .rs-branch.sel::after{background:var(--rs-cat);}
#screen-research .rs-branch-ic{width:24px;height:24px;}
#screen-research .rs-branch-name{font-family:var(--font-head);font-size:.72rem;font-weight:700;letter-spacing:0;color:var(--rf-text-hi);}
#screen-research .rs-branch-n{font-family:var(--font-head);font-size:.84rem;font-weight:700;color:color-mix(in srgb, var(--rs-cat) 70%, var(--rf-text-hi));}
/* recherche en cours dans la branche : un losange fixe (plus de point qui pulse) */
#screen-research .rs-branch-run{width:7px;height:7px;border-radius:0;transform:rotate(45deg);box-shadow:none;animation:none;background:var(--rf-violet);}

/* ---------- arbre de la branche ---------- */
/* l'en-tête garde sa hauteur, c'est l'arbre qui défile */
#screen-research .panel-head.rs-branch-head{flex:none;min-height:0;padding:10px 12px 10px 10px;border-bottom:1px solid var(--rf-line-soft);}
#screen-research .rs-bh{gap:14px;}
#screen-research .rs-bh-art{--rf-cut:8px;flex:none;width:118px;aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-research .rs-bh-ic{width:28px;height:28px;}
#screen-research .rs-bh-txt{gap:3px;}
#screen-research .rs-bh-txt b{font-family:var(--font-head);font-size:1.3rem;font-weight:700;letter-spacing:.08em;color:var(--rf-text-hi);}
#screen-research .rs-bh-txt small{font-family:var(--font-head);font-size:.95rem;font-weight:500;color:var(--rf-label);white-space:normal;}
#screen-research .rs-bh-count{padding-left:16px;border-left-color:var(--rf-line-soft);}
#screen-research .rs-bh-count b{font-family:var(--font-head);font-size:1.25rem;font-weight:700;color:color-mix(in srgb, var(--rs-cat) 70%, var(--rf-text-hi));}
#screen-research .rs-bh-count small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
#screen-research .rs-tier-lbl{border-right-color:var(--rf-line-soft);}
#screen-research .rs-tier-lbl b{font-family:var(--font-head);font-size:1rem;font-weight:700;letter-spacing:.08em;color:var(--rf-text-hi);}
#screen-research .rs-tier-lbl small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);text-wrap:balance;}
#screen-research .rs-ah{fill:var(--rf-edge);}
#screen-research .rs-arrow line{stroke:var(--rf-edge);}
/* une technologie : posée, son état dans son anneau et son fond */
#screen-research .rs-tcard{
  --rf-cut:9px;--ring:color-mix(in srgb, var(--rs-cat) 22%, var(--rf-edge));
  gap:5px;padding:9px 12px 10px;background:#0A1622;transition:none;
}
#screen-research .rs-tcard:hover{--ring:color-mix(in srgb, var(--rs-cat) 70%, var(--rf-edge));}
#screen-research .rs-tcard.st-available{
  --ring:color-mix(in srgb, var(--rs-cat) 50%, var(--rf-edge));
  background:linear-gradient(170deg, color-mix(in srgb, var(--rs-cat) 12%, #0A1622), #0A1622 70%);
}
#screen-research .rs-tcard.st-done{
  --ring:color-mix(in srgb, var(--rf-green) 45%, var(--rf-edge));
  background:linear-gradient(170deg, color-mix(in srgb, var(--rf-green) 13%, #0A1622), #0A1622 70%);
}
#screen-research .rs-tcard.st-active{--ring:color-mix(in srgb, var(--rf-violet) 70%, var(--rf-edge));background:linear-gradient(170deg, color-mix(in srgb, var(--rf-violet) 16%, #0A1622), #0A1622 70%);}
#screen-research .rs-tcard.st-queued{--ring:color-mix(in srgb, var(--rf-blue) 55%, var(--rf-edge));}
/* v0.92.15.2 (audit D2-02) : verrouillée, la carte n'est plus éteinte
   d'un bloc (raison du verrou à 3,76) : icône atténuée, nom et effet en
   couleurs atténuées (au moins --rf-dim), badge de palier neutre, raison
   du verrou en ambre plein. Garde-fou : tools/locked-contrast-tests.mjs */
#screen-research .rs-tcard.st-locked .rs-tcard-name{color:var(--rf-label);}
#screen-research .rs-tcard.st-locked .rs-tcard-fx{color:var(--rf-dim);}
#screen-research .rs-tcard.st-locked .rs-tier-badge{color:var(--rf-label);background:rgba(6,13,22,.9);}
#screen-research .rs-tcard.st-locked .rs-st.lock{color:var(--rf-amber);}
/* technologie choisie : liseré plein de la branche et un trait à gauche */
#screen-research .rs-tcard.sel{
  --ring:var(--rs-cat);opacity:1;box-shadow:none;
  background:
    linear-gradient(90deg, var(--rs-cat) 0 3px, transparent 3px),
    linear-gradient(170deg, color-mix(in srgb, var(--rs-cat) 22%, #0A1622), #0A1622 75%);
}
#screen-research .rs-tcard-name{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-research .rs-tcard-fx{font-family:var(--font-head);font-size:.9rem;font-weight:600;color:color-mix(in srgb, var(--rs-cat) 75%, var(--rf-text-hi));}
#screen-research .rs-tier-badge{padding:2px 7px;font-size:.74rem;letter-spacing:.06em;color:var(--rs-cat, var(--rf-cyan));background:color-mix(in srgb, var(--rs-cat, var(--rf-cyan)) 16%, rgba(6,13,22,.9));}
#screen-research .rs-st{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);}
#screen-research .rs-st.done{color:var(--rf-green);}
#screen-research .rs-st.ok{color:var(--rf-cyan);}
#screen-research .rs-st.on{color:var(--rf-violet);}
#screen-research .rs-st.q{color:var(--rf-blue);}
#screen-research .rs-tcard.st-queued .rs-progress .bar i{background:var(--rf-blue);}
#screen-research .rs-chips{gap:5px;}
#screen-research .rs-link{padding:2px 8px;font-size:.74rem;font-weight:600;letter-spacing:.02em;color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 10%, rgba(6,13,22,.9));}
#screen-research .rs-link.rs-link-level{color:var(--rs-cat);background:color-mix(in srgb, var(--rs-cat) 16%, rgba(6,13,22,.9));}
#screen-research .rs-cost-chip{gap:5px;padding:3px 8px;font-size:.84rem;color:var(--rf-text-hi);background:color-mix(in srgb, var(--rf-blue) 12%, rgba(6,13,22,.92));}
#screen-research .rs-cost-chip svg{width:13px;height:13px;color:var(--rf-blue);}
#screen-research .rs-cost-chip b{font-weight:700;}
#screen-research .rs-cost-chip.ko{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, rgba(6,13,22,.92));}
#screen-research .rs-cost-chip.ko svg{color:var(--rf-rose);}

/* ---------- fiche Détails : l'illustration de la technologie ---------- */
#screen-research .qx-card .panel-head .rs-tier-badge{margin-left:auto;text-transform:uppercase;}
#screen-research .rs-dt-hero{
  --rf-cut:10px;height:auto;aspect-ratio:16 / 8;border:0;border-radius:0;clip-path:var(--rf-in);background:#08121D;
}
#screen-research .rs-dt-branch{
  left:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:3px 9px;
  font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--rs-cat);background:rgba(6,13,22,.88);
}
#screen-research .rs-dt-branch svg{width:13px;height:13px;}
#screen-research .rs-dt-name{margin:12px 0 4px;font-family:var(--font-head);font-size:1.35rem;font-weight:700;letter-spacing:.02em;color:var(--rf-text-hi);}
#screen-research .rs-dt-desc{font-family:var(--font-head);font-size:.94rem;line-height:1.4;color:var(--rf-text);}
#screen-research .rs-dt-sect{margin:12px 0 5px;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-research .rs-dt-fx{
  --rf-cut:7px;--rf-fl:color-mix(in srgb, var(--rs-cat) 40%, var(--rf-edge));gap:3px;padding:8px 11px;
  background-color:color-mix(in srgb, var(--rs-cat) 10%, #0A1622);
  font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);
}
#screen-research .rs-dt-fx svg{width:16px;height:16px;}
#screen-research .rs-dt-fx small{padding-left:22px;font-family:var(--font-head);font-size:.82rem;font-weight:500;color:var(--rf-label);}
#screen-research .rs-dt-repeat{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-research .rs-dt-grid{gap:0 14px;}
#screen-research .rs-dt-v{gap:7px;font-family:var(--font-head);font-size:.95rem;font-weight:700;color:var(--rf-text-hi);}
#screen-research .rs-dt-v svg{width:14px;height:14px;color:var(--rf-blue);}
#screen-research .rs-dt-v.ko{color:var(--rf-rose);}
#screen-research .rs-dt-v.ko svg{color:var(--rf-rose);}
#screen-research .rs-dt-state{margin-top:12px;font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
#screen-research .rs-dt-state b{font-family:var(--font-head);font-weight:700;}
#screen-research .rs-st-done{color:var(--rf-green);}
#screen-research .rs-st-active{color:var(--rf-violet);}
#screen-research .rs-st-queued{color:var(--rf-blue);}
#screen-research .rs-st-available{color:var(--rf-cyan);}
#screen-research .rs-st-locked{color:var(--rf-dim);}
/* l'action : le bouton héros ambre et son relief ; retirer ou annuler,
   un cadre sombre au texte rose ; bloqué, un cadre neutre et son motif */
#screen-research .rs-act-btn{
  --rf-cut:9px;--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));
  min-height:46px;padding:11px 16px;background-color:var(--rf-hero);color:var(--rf-hero-ink);box-shadow:none;
  font-family:var(--font-head);font-size:1.02rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
}
#screen-research .rs-act-btn:hover:not(:disabled){background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#screen-research .rs-act-btn.rs-cancel-btn{
  --rf-fl:color-mix(in srgb, var(--rf-rose) 45%, var(--rf-edge));--rf-relief:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 45%, rgba(0,0,0,.2));
  background-color:#0A1622;color:var(--rf-rose);
}
#screen-research .rs-act-btn.rs-cancel-btn:hover:not(:disabled){--rf-fl:var(--rf-rose);background-color:color-mix(in srgb, var(--rf-rose) 14%, #0A1622);color:var(--rf-text-hi);}
#screen-research .rs-act-btn:disabled{
  --rf-fl:var(--rf-edge);--rf-relief:linear-gradient(transparent, transparent);
  background-color:#0A1622;color:var(--rf-dim);opacity:1;
}
#screen-research .rs-motif{font-family:var(--font-head);font-size:.88rem;font-weight:600;color:var(--rf-label);}
#screen-research .rs-motif.ko{color:var(--rf-amber);}

/* ---------- doctrine : deux choix posés, chacun avec son illustration ---------- */
#screen-research .rs-doctrine{gap:12px;}
#screen-research .rs-doc-card{
  --rf-cut:9px;--ring:color-mix(in srgb, var(--rs-doc) 30%, var(--rf-edge));
  gap:14px;padding:9px 14px 9px 9px;
  background:linear-gradient(170deg, color-mix(in srgb, var(--rs-doc) 10%, #0A1622), #0A1622 70%);
}
#screen-research .rs-doc-card{--rs-doc:var(--rf-orange);}
#screen-research .rs-doc-card.doc-b{--rs-doc:var(--rf-rose);}
#screen-research .rs-doc-card:hover{--ring:color-mix(in srgb, var(--rs-doc) 70%, var(--rf-edge));}
#screen-research .rs-doc-card.picked{--ring:var(--rf-amber);box-shadow:none;background:linear-gradient(170deg, color-mix(in srgb, var(--rf-amber) 18%, #0A1622), #0A1622 75%);}
#screen-research .rs-doc-card:is(.locked, .dimmed):hover{--ring:color-mix(in srgb, var(--rs-doc) 30%, var(--rf-edge));}
#screen-research .rs-doc-art{--rf-cut:7px;flex:none;width:64px;aspect-ratio:1;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-research .rs-doc-name{font-family:var(--font-head);font-size:1.02rem;font-weight:700;color:var(--rf-text-hi);}
#screen-research .rs-doc-desc{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-research .rs-doc-lock{font-family:var(--font-head);font-size:.82rem;font-weight:600;color:var(--rf-amber);}
#screen-research .rs-doc-tag{font-family:var(--font-head);font-size:.82rem;font-weight:700;color:var(--rf-amber);}
#screen-research .rs-doc-note{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
#screen-research .rs-doc-note.on{color:var(--rf-cyan);}
#screen-research .rs-doc-fx{border-left-color:var(--rf-line-soft);}
#screen-research .rs-doc-fx li{font-family:var(--font-head);font-size:.88rem;font-weight:700;}
#screen-research .rs-doc-fx li.up{color:var(--rf-green);}
#screen-research .rs-doc-fx li.down{color:var(--rf-rose);}
/* v0.92.15.2 (audit D2-02) : doctrine verrouillée ou non choisie, la carte
   n'est plus éteinte d'un bloc (raison du verrou à 2,94) : illustration
   éteinte (css/17-research.css), textes atténués par leur couleur, la
   raison du verrou et les effets gardent leur couleur pleine */
#screen-research .rs-doc-card:is(.locked, .dimmed) .rs-doc-name{color:var(--rf-label);}
#screen-research .rs-doc-card:is(.locked, .dimmed) .rs-doc-desc{color:var(--rf-dim);}
#screen-research .rs-doctrine-tag{color:var(--rf-label) !important;}

/* écran étroit (1366, 1500, 1600) */
/* deux rangées de tuiles : pictogramme et compte à gauche, nom sur deux
   lignes à droite */
@media (max-width:1600px){
  #screen-research .rs-branch{
    display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-items:center;
    gap:2px 6px;padding:6px 6px 6px 7px;
  }
  #screen-research .rs-branch-ic{grid-column:1;grid-row:1;justify-self:center;width:20px;height:20px;}
  #screen-research .rs-branch-n{grid-column:1;grid-row:2;gap:3px;font-size:.72rem;letter-spacing:0;white-space:nowrap;}
  #screen-research .rs-branch-name{grid-column:2;grid-row:1 / span 2;min-height:0;font-size:.67rem;line-height:1.15;}
}
@media (max-width:1500px){
  #screen-research .pn-tab{gap:7px;padding-right:calc(var(--tab-br) + 9px);}
  #screen-research .pn-title{font-size:.74rem;letter-spacing:.03em;}
  #screen-research .rs-bh-art{width:96px;}
  #screen-research .rs-bh-txt b{font-size:1.1rem;}
  #screen-research .rs-bh-txt small{font-size:.84rem;}
  #screen-research .rs-tcard-name{font-size:.92rem;}
}
/* écran peu haut (1366 x 768) */
@media (max-height:820px){
  #screen-research .rs-bh-art{display:none;}
  #screen-research .rs-dt-hero{aspect-ratio:16 / 6;}
  #screen-research .rs-idle-art{display:none;}
}
/* écran de portable (1536 x 864 et moins haut) : en-tête de l'arbre et
   doctrine resserrés, l'arbre garde la place */
@media (max-height:900px){
  #screen-research .panel-head.rs-branch-head{padding:7px 12px 7px 10px;}
  #screen-research .rs-bh-txt b{font-size:1.05rem;}
  #screen-research .rs-bh-txt small{font-size:.82rem;}
  #screen-research .rs-bh-count b{font-size:1.05rem;}
  #screen-research .rs-bh-count small{font-size:.74rem;}
  /* doctrine : une ligne par information, la rangée laisse la place à l'arbre */
  #screen-research .rs-doc-card{gap:10px;padding:6px 12px 6px 6px;}
  #screen-research .rs-doc-art{width:40px;}
  #screen-research .rs-doc-name{font-size:.9rem;}
  #screen-research :is(.rs-doc-lock, .rs-doc-tag, .rs-doc-note){display:block;font-size:.76rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  #screen-research .rs-doc-lock svg{display:inline-block;vertical-align:-1px;margin-right:4px;}
  #screen-research .rs-doc-fx li{font-size:.8rem;}
}

/* ============================================================
   20. LOBBY DES SERVEURS (v0.91.10)
   Après la connexion (#lobby.hub-on, js/00b2-lobby-hub.js,
   css/06b-lobby-hub.css) : les mêmes formes que les écrans du jeu.
   Carte du serveur, compte, actualités et annonce de l'ouverture sont
   des blocs ; mesures, compte à rebours, note et boutons sont posés
   dedans ; état et type du serveur sont des étiquettes. « Entrer » est
   le bouton héros ambre, l'accès au Playtest le bouton plein vert d'eau.
   Couleurs par sens : serveur et compte vert d'eau, actualités bleu
   (information), ouverture ambre.
   ============================================================ */
#lobby .lobby-hub{--font-mono:var(--font-head);font-variant-numeric:tabular-nums;}

/* ---------- blocs ---------- */
#lobby .hub-server,
#lobby .hub-bar,
#lobby .hub-news,
#lobby .hub-opening{
  --pn-c:var(--rf-cyan);
  position:relative;border:0;border-radius:0;box-shadow:none;
  background:linear-gradient(180deg, color-mix(in srgb, var(--pn-c) 15%, transparent), transparent 170px), var(--rf-bg);
  backdrop-filter:blur(var(--glass-blur, 10px));-webkit-backdrop-filter:blur(var(--glass-blur, 10px));
  clip-path:var(--rf-oct);
}
#lobby .hub-server::after,
#lobby .hub-bar::after,
#lobby .hub-news::after,
#lobby .hub-opening::after{
  content:'';position:absolute;inset:0;z-index:3;pointer-events:none;
  background:color-mix(in srgb, var(--pn-c) 52%, var(--rf-line));clip-path:var(--rf-ring);
}
#lobby .hub-bar{--rf-cut:8px;}
#lobby .hub-news{--pn-c:var(--rf-blue);}
#lobby .hub-opening{--pn-c:var(--rf-amber);}

/* ---------- titre du centre ---------- */
#lobby .hub-center-title{font-family:var(--font-display);font-size:1.5rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-text-hi);}
#lobby .hub-intro{font-family:var(--font-head);font-size:1.02rem;font-weight:500;color:var(--rf-text);opacity:1;}

/* ---------- compte ---------- */
#lobby .hub-avatar{--rf-cut:8px;overflow:hidden;clip-path:var(--rf-in);}
#lobby .hub-avatar .av{width:48px;height:48px;border-radius:0;}
#lobby .hub-hello{font-family:var(--font-head);font-size:1.22rem;font-weight:700;letter-spacing:.02em;color:var(--rf-text-hi);}
#lobby .hub-account-sub{margin-top:3px;font-family:var(--font-head);font-size:.86rem;font-weight:500;letter-spacing:.01em;color:var(--rf-label);}
#lobby .hub-logout{
  --rf-cut:5px;--rf-fl:var(--rf-edge);
  padding:7px 13px;background-color:#0A1622;color:var(--rf-label);
  font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
}
#lobby .hub-logout:hover:not(:disabled){--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}

/* ---------- carte du serveur ---------- */
/* illustration : celle du serveur (attendue sous son nom définitif),
   l'illustration du prologue en dessous tant qu'elle manque */
#lobby .hub-art-wave1{background-image:url('../assets/img/lobby/serveur-vague-pilote.webp'), url('../assets/img/prologue/autres.webp');}
#lobby .hub-server-art::after{background:linear-gradient(0deg, rgba(0,4,10,.97) 0%, rgba(0,4,10,.4) 55%, rgba(0,4,10,.05) 100%);}
#lobby .hub-server-name{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;color:var(--rf-text-hi);}
/* état et type du serveur : étiquettes */
#lobby .hub-state{
  --c:var(--rf-dim);
  padding:4px 11px;font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--c);background:color-mix(in srgb, var(--c) 18%, rgba(0,4,10,.85));
}
#lobby .hub-state.is-open{--c:var(--rf-cyan);}
#lobby .hub-state:is(.is-closed, .is-maintenance){--c:var(--rf-amber);}
#lobby .hub-server-tag{
  margin:0;padding:3px 9px;vertical-align:0;font-size:.72rem;letter-spacing:.1em;
  color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 16%, rgba(0,4,10,.85));
}
#lobby .hub-server-lore{font-family:var(--font-head);font-size:1rem;font-weight:500;line-height:1.5;color:var(--rf-text);}
/* mesures : posées dans la carte, un pictogramme devant le libellé */
#lobby .hub-stat{--rf-cut:7px;--rf-fl:var(--rf-edge);padding:10px 13px;background-color:rgba(8,18,29,.72);}
#lobby .hub-stat dt{display:flex;align-items:center;gap:7px;margin-bottom:5px;font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-label);}
#lobby .hub-stat-ic{display:inline-flex;width:16px;height:16px;flex:none;color:var(--rf-cyan);}
#lobby .hub-stat-ic svg{width:100%;height:100%;}
#lobby .hub-stat dd{font-family:var(--font-head);font-size:1.06rem;font-weight:600;color:var(--rf-text-hi);}
#lobby .hub-stat .hub-stat-big{font-size:1.55rem;font-weight:700;letter-spacing:.02em;color:var(--rf-blue);}
#lobby .hub-server-mandate{font-family:var(--font-head);font-size:.96rem;font-weight:500;color:var(--rf-text);border-left-color:color-mix(in srgb, var(--rf-amber) 70%, transparent);}
#lobby .hub-server-note{
  --rf-cut:6px;--rf-fl:color-mix(in srgb, var(--rf-amber) 45%, var(--rf-edge));
  padding:9px 12px;background-color:color-mix(in srgb, var(--rf-amber) 8%, #0A1622);
  font-family:var(--font-head);font-size:.92rem;font-weight:600;color:var(--rf-amber);
}
/* « Entrer » : le bouton héros ambre et son relief ; serveur fermé, un
   cadre neutre qui porte la date d'ouverture */
#lobby .hub-enter{
  --rf-cut:10px;--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));
  min-height:52px;background-color:var(--rf-hero);color:var(--rf-hero-ink);text-shadow:none;
  font-family:var(--font-head);font-size:1.12rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;
}
#lobby .hub-enter:hover:not(:disabled){background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#lobby .hub-enter:disabled{
  --rf-fl:var(--rf-edge);--rf-relief:linear-gradient(transparent, transparent);
  background-color:#0A1622;color:var(--rf-label);opacity:1;letter-spacing:.08em;
}
/* v0.92.15.12 (Playtest, demande de l'utilisateur) : dans le jeu lancé par
   Steam, « Se connecter avec Steam » est LE chemin des testeurs (compte
   créé par Steam seulement) : bouton héros ambre, comme « Entrer », au-
   dessus du formulaire e-mail qui reste en retrait */
#lobby :is(#btn-lobby-steam, #btn-steam-play){
  --rf-cut:10px;--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));
  min-height:52px;background-color:var(--rf-hero);color:var(--rf-hero-ink);text-shadow:none;border:0;
  font-family:var(--font-head);font-size:1.05rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
}
#lobby :is(#btn-lobby-steam, #btn-steam-play):hover:not(:disabled){background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#lobby :is(#btn-lobby-steam, #btn-steam-play):focus-visible{outline:2px solid var(--rf-hero-hi);outline-offset:3px;}
#lobby :is(#btn-lobby-steam, #btn-steam-play):disabled{opacity:.7;cursor:progress;}

/* ---------- annonce de l'ouverture (serveur fermé) ---------- */
#lobby .hub-opening-art::after{background:linear-gradient(0deg, rgba(0,4,10,1) 0%, rgba(0,4,10,.3) 60%, rgba(0,4,10,0) 100%);}
#lobby .hub-opening-title{font-family:var(--font-head);font-size:2.1rem;letter-spacing:.03em;color:var(--rf-text-hi);}
#lobby .hub-opening-date{font-size:1.1rem;color:var(--rf-amber);}
#lobby .hub-count-cell{--rf-cut:7px;--rf-fl:color-mix(in srgb, var(--rf-amber) 30%, var(--rf-edge));padding:10px 4px 8px;background-color:rgba(8,18,29,.72);}
#lobby .hub-count-n{font-family:var(--font-head);font-size:2.2rem;font-weight:700;color:var(--rf-text-hi);}
#lobby .hub-count-u{font-family:var(--font-head);font-size:.76rem;font-weight:600;letter-spacing:.1em;color:var(--rf-label);}
#lobby .hub-opening-text{font-family:var(--font-head);font-size:1rem;font-weight:500;color:var(--rf-text);}
/* accès au Playtest : le bouton plein vert d'eau */
#lobby .hub-opening-cta{
  --rf-cut:9px;--rf-fl:color-mix(in srgb, var(--rf-cyan) 55%, transparent);
  background-color:var(--rf-fill);color:var(--rf-on-fill);text-shadow:none;text-decoration:none;
  font-family:var(--font-head);font-size:1rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
}
#lobby .hub-opening-cta:hover{--rf-fl:var(--rf-fill-line);background-color:var(--rf-fill-hi);color:var(--rf-on-fill);}

/* ---------- actualités ---------- */
#lobby .hub-news{padding:0;}
#lobby .hub-news-head{
  display:flex;align-items:center;min-height:38px;margin:0;padding:0;
  border-bottom:1px solid var(--rf-line-soft);font-size:inherit;
}
#lobby .hub-news-list{padding:12px 10px 0 14px;}
#lobby .hub-news-list .feed-link{background:#0A1622;}
#lobby .hub-news-list .feed-link::after{background:var(--rf-edge);}
#lobby .hub-news-list .feed-link:is(:hover, :focus-visible)::after{background:var(--rf-cyan);}
#lobby .hub-news-list .feed-title{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
#lobby .hub-news-list .feed-excerpt{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#lobby .hub-news .lobby-feed-empty{margin:12px 14px 0;padding:0;border:0;border-radius:0;background:none;text-align:left;font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
/* journal muet : la liste vide s'efface, l'illustration et le texte
   montent sous l'en-tête */
#lobby .hub-news-list:empty{display:none;}
#lobby .hub-news-empty-art{
  --rf-cut:8px;display:block;aspect-ratio:16 / 9;margin-bottom:10px;clip-path:var(--rf-in);
  background:url('../assets/img/lobby/transmissions-vide.webp') center / cover no-repeat,
    url('../assets/no-img.webp') center / cover no-repeat;
}
#lobby .hub-news-links{margin:0;padding:12px 16px 14px;}
#lobby .hub-news-all{font-family:var(--font-head);font-size:.92rem;font-weight:600;color:var(--rf-cyan);}

/* serveur fermé, centre étroit (1366 à 1500) : les trois mesures sur une
   ligne, libellés sans pictogramme pour tenir entiers */
@media (max-width:1500px){
  #lobby.hub-closed .hub-server-stats{grid-template-columns:minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);}
  #lobby.hub-closed :is(.hub-stat-gov, .hub-stat-ver) .hub-stat-ic{display:none;}
  #lobby.hub-closed .hub-stat dt{font-size:.78rem;}
}
/* ---------- écran peu haut (1366 x 768) ----------
   serveur fermé : l'annonce se resserre pour garder la carte et son
   bouton en vue */
@media (max-height:820px) and (min-width:821px){
  #lobby .hub-center-title{font-size:1.4rem;}
  #lobby .hub-opening-art{height:64px;}
  #lobby .hub-opening-body{margin-top:-26px;gap:7px;padding-bottom:14px;}
  #lobby .hub-opening-title{font-size:1.5rem;}
  #lobby .hub-opening-date{font-size:.98rem;}
  #lobby .hub-count-cell{padding:6px 4px 5px;}
  #lobby .hub-count-n{font-size:1.5rem;}
  #lobby .hub-opening-text{display:none;}
  #lobby .hub-opening-cta{padding:10px 0;}
  #lobby.hub-closed .hub-server-art{height:62px;}
  #lobby .hub-server-art{height:84px;}
  #lobby .hub-stat{padding:7px 10px;}
  #lobby .hub-stat dt{margin-bottom:3px;font-size:.8rem;}
  #lobby .hub-stat .hub-stat-big{font-size:1.25rem;}
  #lobby .hub-enter{min-height:46px;}
}

/* ============================================================
   21. ÉCRAN HANGAR (v0.91.11)
   Mêmes formes que Recherche et Expéditions : chaque panneau, les deux
   emplacements de la fusion, son résultat et la légende des gènes sont
   des blocs ; une carte de vaisseau, un vaisseau de la fusion, une
   mission et un emplacement du chantier occupé sont posés dans leur
   bloc (trois coins, anneau) ; les boutons, les statuts, les filtres, la
   garnison, les champs et la liste de tri sont des cadres dans le fond ;
   rareté, statut, rôle et coûts en étiquettes. Chaque vaisseau garde la
   couleur de sa rareté (--hg-r), adoucie comme le reste ; les gènes
   gardent leurs hexagones. Couleurs d'onglet : la flotte en vert d'eau,
   les missions en vert (ce qui part et revient), les statuts en bleu
   (information), la défense en rose, la fusion en violet (recherche),
   le chantier en orange (industrie) et sa file en ambre (une action).
   Illustrations attendues (AG.IMG) : missions et flotte vides, chantier
   non construit, chantier naval.
   ============================================================ */
/* raretés et tons, adoucis (d'origine : css/18-hangar.css) ; la fiche
   d'un vaisseau (#modal) les reprend */
:is(#screen-hangar, #modal) .r-commun{--hg-r:#A5B3C2;}
:is(#screen-hangar, #modal) .r-rare{--hg-r:#7FA3CF;}
:is(#screen-hangar, #modal) .r-epique{--hg-r:#9C8FDA;}
:is(#screen-hangar, #modal) .r-legendaire{--hg-r:#DDA048;}
:is(#screen-hangar, #modal) .r-mythique{--hg-r:#DE7F8C;}
:is(#screen-hangar, #modal) .t-good{--hg-t:var(--rf-cyan);}
:is(#screen-hangar, #modal) .t-warn{--hg-t:var(--rf-amber);}
:is(#screen-hangar, #modal) .t-bad{--hg-t:var(--rf-rose);}
#hg-panel-missions{--pn-c:var(--rf-green) !important;}
#hg-panel-status{--pn-c:var(--rf-blue) !important;}
#hg-panel-defstate,#hg-panel-command,#hg-panel-units,#hg-panel-garrison,#hg-panel-defbuild{--pn-c:var(--rf-rose) !important;}
#hg-panel-analysis{--pn-c:var(--rf-violet) !important;}
#hg-panel-slots{--pn-c:var(--rf-amber) !important;}
#hg-panel-recipes,#hg-panel-yardlevel{--pn-c:var(--rf-orange) !important;}
#screen-hangar .qx-card .panel-body{padding:9px 14px 12px;}
#screen-hangar .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-hangar .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-hangar .panel-head .eyebrow{flex:none;white-space:nowrap;color:color-mix(in srgb, var(--pn-c) 70%, var(--rf-text-hi));}
#screen-hangar .qx-hint{font-family:var(--font-head);font-size:.9rem;line-height:1.4;color:var(--rf-label);}
#screen-hangar .qx-link{font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-cyan);}
#screen-hangar .hg-sect{margin:12px 0 6px;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
/* libellé et valeur : la valeur passe à la ligne, à droite, plutôt que de
   coller au libellé dans une colonne étroite */
#screen-hangar .qx-kv{
  flex-wrap:wrap;column-gap:12px;align-items:center;min-height:27px;padding:1px 0;
  font-family:var(--font-head);font-size:.93rem;color:var(--rf-label);
}
#screen-hangar .qx-kv > span svg{width:17px;height:17px;opacity:1;color:var(--pn-c, var(--rf-cyan));}
#screen-hangar .qx-kv b{margin-left:auto;font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-hangar .qx-kv b.hg-tone,#screen-hangar .hg-kv b.hg-tone{color:var(--hg-t);}
#screen-hangar .hg-info svg{width:15px;height:15px;color:var(--rf-amber);}
#screen-hangar .hg-motif{font-family:var(--font-head);font-size:.88rem;font-weight:600;line-height:1.35;color:var(--rf-label);}
#screen-hangar .hg-motif.ko{color:var(--rf-amber);}

/* ---------- en-tête : titre, onglets à pictogramme, citation ---------- */
#screen-hangar .qx-head-txt h1{text-transform:uppercase;white-space:nowrap;}
#screen-hangar .qx-screen-tabs{position:relative;margin:0 0 0 18px;flex:none;}
#screen-hangar .qx-screen-tabs .pill-tab{display:inline-flex;align-items:center;gap:8px;text-transform:uppercase;}
#screen-hangar .hg-tab-ic{display:inline-flex;width:17px;height:17px;flex:none;}
#screen-hangar .hg-tab-ic svg{width:100%;height:100%;}
#screen-hangar .qx-quote{border-right-color:var(--rf-cyan);}
#screen-hangar .qx-quote blockquote{font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-hangar .qx-quote figcaption{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-hangar .rs-foot-quote{border-left-color:var(--rf-violet);}
#screen-hangar .rs-foot-quote blockquote{font-family:var(--font-head);font-size:.9rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-hangar .rs-foot-quote figcaption{font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}

/* ---------- pièces communes ---------- */
/* barres droites, celles des autres écrans refaits */
#screen-hangar .hg-bar{height:6px;margin-top:5px;border-radius:0;background:rgba(4,10,18,.9);box-shadow:inset 0 0 0 1px var(--rf-line-soft);}
#screen-hangar .hg-bar > i{border-radius:0;background:var(--hg-t, var(--rf-cyan));}
/* vignette d'un vaisseau ou d'une unité : posée, trois coins */
#screen-hangar .hg-thumb{--rf-cut:6px;border:0;border-radius:0;clip-path:var(--rf-in);background:#08121D;}
/* lettre de classe : un petit cadre de la couleur de la rareté */
#screen-hangar .hg-cls-letter{
  --rf-cut:5px;--rf-fl:color-mix(in srgb, var(--hg-r, var(--rf-cyan)) 55%, var(--rf-edge));
  width:28px;height:28px;border-radius:0;background-color:#0A1622;
  font-family:var(--font-head);font-weight:700;font-size:1rem;color:color-mix(in srgb, var(--hg-r, var(--rf-cyan)) 60%, var(--rf-text-hi));
}
#screen-hangar .hg-cls-letter.lg{--rf-cut:6px;width:36px;height:36px;font-size:1.2rem;}
#screen-hangar .hg-card-names b{font-family:var(--font-head);font-weight:700;font-size:1rem;color:var(--rf-text-hi);}
#screen-hangar .hg-card-names small{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
/* étiquettes : rareté, statut, rôle */
/* v0.92.15.5 (audit D2-04) : fond teinté à 12 % au lieu de 20 %, pour la
   marge (« Rare » à 4,12 avant le vignettage corrigé, 4,5 tout juste après) */
:is(#screen-hangar, #modal) .hg-rar-badge{
  top:7px;right:7px;padding:2px 8px;font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;
  color:var(--hg-r);background:color-mix(in srgb, var(--hg-r) 12%, rgba(6,13,22,.92));
}
#screen-hangar .hg-status{
  gap:5px;padding:2px 8px;font-size:.78rem;letter-spacing:.02em;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));
}
#screen-hangar .hg-status svg{width:12px;height:12px;}
#screen-hangar .hg-status.s-mission{color:var(--rf-green);background:color-mix(in srgb, var(--rf-green) 14%, rgba(6,13,22,.9));}
#screen-hangar .hg-status.s-garrison{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, rgba(6,13,22,.9));}
#screen-hangar .hg-status.s-chantier{color:var(--rf-orange);background:color-mix(in srgb, var(--rf-orange) 14%, rgba(6,13,22,.9));}
#screen-hangar .hg-tag{padding:2px 8px;font-size:.72rem;letter-spacing:.06em;color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));}
#screen-hangar .hg-tag.t-defense{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, rgba(6,13,22,.9));}
#screen-hangar .hg-tag.t-recon{color:var(--rf-blue);background:color-mix(in srgb, var(--rf-blue) 14%, rgba(6,13,22,.9));}
#screen-hangar .hg-tag.t-support{color:var(--rf-green);background:color-mix(in srgb, var(--rf-green) 14%, rgba(6,13,22,.9));}
#screen-hangar .rs-chips{gap:5px;}
#screen-hangar .rs-cost-chip{gap:5px;padding:2px 8px;font-size:.84rem;color:var(--rf-text-hi);background:color-mix(in srgb, var(--rf-blue) 12%, rgba(6,13,22,.92));}
#screen-hangar .rs-cost-chip svg{width:13px;height:13px;color:var(--rf-blue);}
#screen-hangar .rs-cost-chip b{font-weight:700;}
#screen-hangar .rs-cost-chip.ko{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, rgba(6,13,22,.92));}
#screen-hangar .rs-cost-chip.ko svg{color:var(--rf-rose);}
#screen-hangar :is(.hg-costs-lbl, .hg-per){font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);}
/* gènes : l'hexagone garde sa forme, teinté de son grade */
:is(#screen-hangar, #modal) .hg-gene-hex{font-family:var(--font-head);font-size:.76rem;font-weight:700;}
/* v0.92.15.5 (audit D2-04) : fonds des gènes D à A teintés à 14 % au lieu
   de 24 % (« D » à 4,50 tout juste à 3440 px) */
:is(#screen-hangar, #modal) .hg-gene-hex.g-D{background:color-mix(in srgb, var(--rf-rose) 14%, #0A1622);color:var(--rf-rose);}
:is(#screen-hangar, #modal) .hg-gene-hex.g-C{background:color-mix(in srgb, var(--rf-amber) 14%, #0A1622);color:var(--rf-amber);}
:is(#screen-hangar, #modal) .hg-gene-hex.g-B{background:color-mix(in srgb, var(--rf-blue) 14%, #0A1622);color:var(--rf-blue);}
:is(#screen-hangar, #modal) .hg-gene-hex.g-A{background:color-mix(in srgb, var(--rf-green) 14%, #0A1622);color:var(--rf-green);}
:is(#screen-hangar, #modal) .hg-gene-hex.g-S{background:color-mix(in srgb, var(--rf-cyan) 32%, #0A1622);color:var(--rf-text-hi);}
:is(#screen-hangar, #modal) .hg-gene-hex.g-SS{background:color-mix(in srgb, var(--rf-cyan) 60%, #0A1622);color:#F2F6F8;}
/* petits boutons carrés : légende des gènes, retirer */
#screen-hangar .hg-legend-btn{
  --rf-cut:5px;--rf-fl:color-mix(in srgb, var(--rf-cyan) 50%, var(--rf-edge));
  width:22px;height:22px;border-radius:0;background-color:#08141F;
  font-family:var(--font-head);font-size:.86rem;font-weight:700;color:var(--rf-cyan);
}
#screen-hangar .hg-legend-btn:hover{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-hangar .hg-x{--rf-cut:5px;--rf-fl:var(--rf-edge);width:24px;height:24px;border-radius:0;background-color:#08141F;font-family:var(--font-head);font-size:1rem;color:var(--rf-label);}
#screen-hangar .hg-x:hover{--rf-fl:var(--rf-rose);color:var(--rf-rose);}
/* légende des gènes : un bloc qui flotte sous son bouton */
#screen-hangar .hg-popover{--rf-cut:10px;position:absolute;padding:12px 14px;box-shadow:none;}
#screen-hangar .hg-pop-head{font-family:var(--font-head);font-size:.86rem;font-weight:700;letter-spacing:.08em;color:var(--rf-text-hi);}
#screen-hangar .hg-pop-gene{border-bottom:1px solid var(--rf-line-soft);}
#screen-hangar .hg-pop-gene b{font-family:var(--font-head);font-size:.92rem;font-weight:700;color:var(--rf-text-hi);}
#screen-hangar .hg-pop-gene small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-hangar .hg-pop-grades small{font-family:var(--font-head);font-size:.76rem;color:var(--rf-label);}
/* bouton héros : ambre plein et son relief (Réparer, Fusionner) ;
   bloqué, un cadre neutre et son motif */
#screen-hangar .hg-hero{
  --rf-cut:9px;--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));
  min-height:46px;margin-top:12px;padding:11px 16px;border-radius:0;background-color:var(--rf-hero);color:var(--rf-hero-ink);text-shadow:none;
  font-family:var(--font-head);font-size:1.02rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
}
#screen-hangar .hg-hero:hover:not(:disabled){background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#screen-hangar .hg-hero:disabled{
  --rf-fl:var(--rf-edge);--rf-relief:linear-gradient(transparent, transparent);
  background-color:#0A1622;color:var(--rf-dim);opacity:1;
}
#screen-hangar .hg-hero svg{width:18px;height:18px;}
/* état vide : son illustration au-dessus du texte */
#screen-hangar .hg-empty{display:flex;flex-direction:column;gap:8px;}
#screen-hangar .hg-empty .qx-hint{margin:0;}
#screen-hangar .hg-empty-art{--rf-cut:8px;display:block;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-hangar :is(.hg-empty-art, .hg-yard-off-art, .hg-yard-art) img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-hangar .hg-empty-missions .hg-empty-art{aspect-ratio:4 / 1;}
#screen-hangar .hg-empty-grid{align-items:center;padding:24px 0;text-align:center;}
/* grille vide (filtre sans résultat) : le panneau garde la largeur de
   trois cartes au lieu de se caler sur l'illustration seule */
#screen-hangar #hg-panel-ships:has(.hg-grid.empty){min-width:min(100%, calc(3*var(--hg-card-w) + 20px + var(--agc-fitw-extra)));}
#screen-hangar .hg-empty-grid .hg-empty-art{--rf-cut:10px;width:min(100%, 440px);aspect-ratio:16 / 9;}
#screen-hangar .hg-empty-sel .hg-empty-art{--rf-cut:10px;aspect-ratio:16 / 8;}

/* ---------- colonne gauche ---------- */
#screen-hangar .hg-power-big b{font-family:var(--font-head);font-weight:700;font-size:2.1rem;line-height:1;color:var(--rf-cyan);}
#screen-hangar .hg-power-big span{margin-top:3px;font-family:var(--font-head);font-size:.84rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-hangar .hg-rar-chips{gap:6px;margin-top:10px;}
#screen-hangar .hg-rar-chip{
  gap:7px;padding:4px 9px;font-size:.86rem;letter-spacing:.02em;color:var(--rf-text-hi);
  background:color-mix(in srgb, var(--hg-r) 14%, rgba(6,13,22,.9));
}
#screen-hangar .hg-rar-chip i{width:7px;height:7px;border-radius:0;transform:rotate(45deg);box-shadow:none;background:var(--hg-r);}
/* mission en cours : posée, teintée de vert */
#screen-hangar .hg-mission-list{gap:6px;}
#screen-hangar .hg-mission{
  --rf-cut:8px;--ring:color-mix(in srgb, var(--rf-green) 40%, var(--rf-edge));
  position:relative;gap:10px;padding:6px 10px 6px 6px;
  background:linear-gradient(160deg, color-mix(in srgb, var(--rf-green) 12%, #0A1622), #0A1622 70%);
}
#screen-hangar .hg-mission:hover{--ring:color-mix(in srgb, var(--rf-green) 75%, var(--rf-edge));}
#screen-hangar .hg-mission > .hg-thumb{width:52px;height:38px;}
#screen-hangar .hg-mission-txt b{font-family:var(--font-head);font-size:.96rem;font-weight:700;color:var(--rf-text-hi);}
#screen-hangar .hg-mission-txt small{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
#screen-hangar .hg-mission-eta{font-family:var(--font-head);font-size:.88rem;font-weight:700;color:var(--rf-green);}
/* statuts : des cadres, le choisi en bleu */
#screen-hangar .hg-status-list{gap:5px;}
#screen-hangar .hg-status-row{
  --rf-cut:7px;--rf-fl:var(--rf-edge);gap:10px;padding:7px 10px;background-color:#0A1622;transition:none;
  font-family:var(--font-head);font-size:.96rem;font-weight:600;color:var(--rf-text);
}
#screen-hangar .hg-status-row svg{width:16px;height:16px;color:var(--rf-blue);}
#screen-hangar .hg-status-row b{font-family:var(--font-head);font-weight:700;color:var(--rf-label);}
#screen-hangar .hg-status-row:hover{--rf-fl:color-mix(in srgb, var(--rf-blue) 60%, var(--rf-edge));background-color:#0E1826;color:var(--rf-text-hi);}
#screen-hangar .hg-status-row.sel{--rf-fl:var(--rf-blue);background-color:color-mix(in srgb, var(--rf-blue) 14%, #0A1622);color:var(--rf-text-hi);}
#screen-hangar .hg-status-row.sel b{color:var(--rf-blue);}
/* immunité en cours : un cadre vert d'eau */
#screen-hangar .hg-immune{
  --rf-cut:7px;--rf-fl:color-mix(in srgb, var(--rf-cyan) 45%, var(--rf-edge));
  gap:9px;padding:8px 11px;border-radius:0;background-color:color-mix(in srgb, var(--rf-cyan) 9%, #0A1622);
  font-family:var(--font-head);font-size:.9rem;color:var(--rf-text);
}
#screen-hangar .hg-immune svg{color:var(--rf-cyan);}
#screen-hangar .hg-immune b{font-family:var(--font-head);font-weight:700;color:var(--rf-cyan);}

/* ---------- FLOTTE : recherche, tri, cartes ---------- */
#screen-hangar .hg-toolbar{gap:10px;padding:10px 14px 0;}
#screen-hangar .hg-search svg{z-index:1;left:10px;width:14px;height:14px;color:var(--rf-dim);}
#screen-hangar .hg-search input{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:7px 10px 7px 30px;background-color:#08141F;
  font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);
}
#screen-hangar .hg-search input:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 50%, var(--rf-edge));}
#screen-hangar .hg-search input:focus{--rf-fl:var(--rf-cyan);outline:none;}
#screen-hangar .hg-search input::placeholder{color:var(--rf-dim);}
#screen-hangar .hg-sort{gap:8px;}
#screen-hangar .hg-sort-lbl{font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
/* liste de tri maison (AG.controls.select), celle d'Usines */
#screen-hangar .ag-select{min-width:150px;}
#screen-hangar .ag-select-btn{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:7px 12px;background-color:#08141F;
  font-family:var(--font-head);font-size:.92rem;font-weight:600;color:var(--rf-text-hi);transition:none;
}
#screen-hangar .ag-select-btn:hover,#screen-hangar .ag-select.open .ag-select-btn{--rf-fl:var(--rf-cyan);}
#screen-hangar .ag-select-caret{color:var(--rf-cyan);}
#screen-hangar .ag-select-list{--rf-cut:8px;--rf-fl:var(--rf-line);padding:5px;background-color:rgba(7,14,24,.98);box-shadow:none;}
#screen-hangar .ag-select-opt{border-radius:0;font-family:var(--font-head);font-size:.92rem;color:var(--rf-text);}
#screen-hangar .ag-select-opt:hover,#screen-hangar .ag-select-opt.active{background:#0E2C29;color:var(--rf-text-hi);}
#screen-hangar .ag-select-opt.selected{color:var(--rf-cyan);}
/* carte d'un vaisseau : posée, teintée de sa rareté ; choisie, liseré
   vert d'eau et un trait en pied */
#hg-panel-ships{--hg-card-w:232px;}
#screen-hangar .hg-grid{gap:12px;}
#screen-hangar .hg-card{
  --rf-cut:10px;--ring:color-mix(in srgb, var(--hg-r) 42%, var(--rf-edge));
  background:linear-gradient(180deg, color-mix(in srgb, var(--hg-r) 12%, #0A1622), #0A1622 62%);
}
#screen-hangar .hg-card:hover{--ring:color-mix(in srgb, var(--hg-r) 80%, var(--rf-edge));}
#screen-hangar .hg-card.sel{
  --ring:var(--rf-cyan);
  background:linear-gradient(0deg, var(--rf-cyan) 0 3px, transparent 3px), linear-gradient(180deg, color-mix(in srgb, var(--rf-cyan) 16%, #0A1622), #0A1622 70%);
}
#screen-hangar .hg-card-art{height:calc(104px*var(--scale));background:#08121D;}
#screen-hangar .hg-card-body{gap:6px;padding:9px 12px 12px;}
#screen-hangar .hg-kv{align-items:center;font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-hangar .hg-kv b{font-family:var(--font-head);font-weight:700;font-size:.96rem;color:var(--rf-text-hi);}
#screen-hangar .hg-power{color:var(--rf-cyan) !important;}
/* vaisseau sélectionné */
#screen-hangar .hg-sel{gap:8px;}
:is(#screen-hangar, #modal) .hg-sel-art{--rf-cut:10px;height:auto;aspect-ratio:16 / 8;border:0;border-radius:0;clip-path:var(--rf-in);background:#08121D;}
#screen-hangar .hg-sel-id .hg-card-names b{font-size:1.2rem;}
#screen-hangar .hg-sel-role{font-family:var(--font-head);font-size:.92rem;line-height:1.4;color:var(--rf-text);}
#screen-hangar .hg-sel-stats{--rf-cut:8px;--rf-fl:var(--rf-edge);gap:2px;padding:6px 12px;border-radius:0;background-color:#08141F;}
#screen-hangar .hg-details-btn{margin-top:10px;gap:8px;}
#screen-hangar .hg-sel-actions{gap:8px;margin-top:8px;}
#screen-hangar .hg-act-btn{
  --rf-cut:7px;--rf-fl:var(--rf-edge);gap:5px;padding:10px 4px;border-radius:0;background-color:#08141F;transition:none;
  font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.07em;color:var(--rf-text);
}
#screen-hangar .hg-act-btn svg{width:18px;height:18px;color:var(--rf-cyan);}
#screen-hangar .hg-act-btn:hover:not(:disabled){--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}
#screen-hangar .hg-act-btn:hover:not(:disabled) svg{color:var(--rf-cyan);}
#screen-hangar .hg-act-btn.on{--rf-fl:var(--rf-cyan);background-color:color-mix(in srgb, var(--rf-cyan) 16%, #08141F);color:var(--rf-text-hi);}
#screen-hangar .hg-act-btn:disabled{opacity:1;color:var(--rf-dim);}
#screen-hangar .hg-act-btn:disabled svg{color:var(--rf-dim);}

/* ---------- DÉFENSE ---------- */
#screen-hangar .hg-def-power{gap:14px;padding:4px 2px 12px;}
#screen-hangar .hg-def-shield{width:46px;height:46px;color:var(--rf-rose);filter:none;}
#screen-hangar .hg-def-power b{font-family:var(--font-head);font-weight:700;font-size:2.1rem;line-height:1;color:var(--rf-text-hi);}
#screen-hangar .hg-def-power small{font-family:var(--font-head);font-size:.84rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-hangar .hg-rows{gap:0;padding-top:8px;border-top:1px solid var(--rf-line-soft);}
#screen-hangar .hg-unit{gap:5px 12px;padding:9px 0;border-bottom:1px solid var(--rf-line-soft);}
#screen-hangar .hg-unit:last-child{border-bottom:0;}
#screen-hangar .hg-unit > .hg-thumb{width:58px;height:44px;}
#screen-hangar .hg-unit-txt b{font-family:var(--font-head);font-weight:700;font-size:1rem;color:var(--rf-text-hi);}
#screen-hangar .hg-unit-txt small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-hangar .hg-unit.locked > .hg-thumb .ag-art{filter:grayscale(.8) brightness(.75);}
#screen-hangar .hg-owned{font-family:var(--font-head);font-weight:700;font-size:1rem;color:var(--rf-text-hi);}
#screen-hangar .hg-qty{min-width:56px;}
#screen-hangar .hg-lock{gap:6px;font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-amber);}
#screen-hangar .hg-lock svg{width:13px;height:13px;}
/* file de défense en cours : un cadre teinté d'ambre */
#screen-hangar .hg-queue{
  --rf-cut:8px;--rf-fl:color-mix(in srgb, var(--rf-amber) 40%, var(--rf-edge));
  margin-top:12px;padding:8px 12px;border-radius:0;background-color:color-mix(in srgb, var(--rf-amber) 7%, #0A1622);
}
#screen-hangar .hg-queue .hg-bar > i{background:var(--rf-amber);}
/* garnison : le sélecteur partagé avec la fenêtre du Centre de contrôle */
#screen-hangar .hg-gar-list{gap:7px;}
#screen-hangar .hg-gar{--rf-cut:9px;--rf-fl:var(--rf-edge);padding:8px 10px;border-radius:0;background-color:rgba(6,13,22,.55);transition:none;}
#screen-hangar .hg-gar.on{--rf-fl:var(--rf-cyan);background-color:rgba(14,44,41,.75);}
#screen-hangar .hg-gar > .hg-thumb{width:56px;height:42px;}
#screen-hangar .hg-gar-txt b{font-family:var(--font-head);font-weight:700;font-size:1rem;color:var(--rf-text-hi);}
#screen-hangar .hg-gar-txt small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-hangar .hg-gar-chips{gap:5px;}
#screen-hangar .hg-gar-btn{min-width:88px;}
#screen-hangar .hg-gar-btn.on{--rf-fl:color-mix(in srgb, var(--rf-rose) 55%, var(--rf-edge));background-color:color-mix(in srgb, var(--rf-rose) 12%, #08141F);color:var(--rf-rose);}

/* ---------- FUSION ---------- */
#screen-hangar .hg-chamber{gap:calc(22px*var(--scale));}
/* emplacements et résultat : des blocs posés sur la chambre, à la
   couleur de leur rareté */
#screen-hangar .hg-fslot,#screen-hangar .hg-fresult{--pn-c:var(--hg-r, var(--rf-cyan));--rf-cut:12px;gap:6px;padding:12px 14px 14px;}
#screen-hangar .hg-fslot.empty,#screen-hangar .hg-fresult.empty{--pn-c:var(--rf-edge);}
#screen-hangar .hg-fslot-head{gap:7px;font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.1em;color:color-mix(in srgb, var(--pn-c) 60%, var(--rf-text-hi));}
#screen-hangar .hg-fslot.empty .hg-fslot-head{color:var(--rf-cyan);}
#screen-hangar .hg-fslot-head svg{width:15px;height:15px;}
#screen-hangar .hg-fslot-art,#screen-hangar .hg-silhouette{--rf-cut:8px;border-radius:0;clip-path:var(--rf-in);background:#08121D;}
#screen-hangar .hg-silhouette{background:radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--hg-r, var(--rf-cyan)) 35%, transparent), transparent 70%), #08121D;}
#screen-hangar .hg-silhouette span{font-family:var(--font-head);font-size:2.4rem;color:var(--rf-text-hi);text-shadow:none;}
#screen-hangar .hg-fslot-name{font-family:var(--font-head);font-weight:700;font-size:1.02rem;color:var(--rf-text-hi);}
#screen-hangar :is(.hg-fslot, .hg-fresult) small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-hangar .hg-fslot-genes > span{font-family:var(--font-head);font-size:.88rem;color:var(--rf-text);}
#screen-hangar .hg-fresult-head{font-family:var(--font-head);font-size:.88rem;font-weight:700;letter-spacing:.14em;color:var(--rf-text-hi);}
#screen-hangar .hg-fresult-power{font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
#screen-hangar .hg-fresult-power b{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
/* sélecteur : filtres de rareté en cadres, vaisseaux posés */
#screen-hangar .hg-chips{gap:6px;}
#screen-hangar .hg-chip{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:5px 12px;border-radius:0;background-color:#08141F;transition:none;
  font-family:var(--font-head);font-size:.82rem;font-weight:700;letter-spacing:.07em;color:var(--hg-r, var(--rf-text));
}
#screen-hangar .hg-chip:hover{--rf-fl:color-mix(in srgb, var(--hg-r, var(--rf-cyan)) 70%, var(--rf-edge));}
#screen-hangar .hg-chip.sel{--rf-fl:var(--hg-r, var(--rf-cyan));background-color:color-mix(in srgb, var(--hg-r, var(--rf-cyan)) 18%, #08141F);color:var(--rf-text-hi);}
#screen-hangar .hg-picker{gap:10px;grid-template-columns:repeat(auto-fill, minmax(136px, 1fr));}
#screen-hangar .hg-mini{
  --rf-cut:8px;--ring:color-mix(in srgb, var(--hg-r) 40%, var(--rf-edge));
  position:relative;gap:3px;padding:6px 6px 8px;
  background:linear-gradient(180deg, color-mix(in srgb, var(--hg-r) 10%, #0A1622), #0A1622 60%);
}
#screen-hangar .hg-mini:hover{--ring:color-mix(in srgb, var(--hg-r) 80%, var(--rf-edge));}
#screen-hangar .hg-mini.sel{
  --ring:var(--rf-cyan);
  background:linear-gradient(0deg, var(--rf-cyan) 0 3px, transparent 3px), linear-gradient(180deg, color-mix(in srgb, var(--rf-cyan) 16%, #0A1622), #0A1622 70%);
}
#screen-hangar .hg-mini-art{--rf-cut:6px;border-radius:0;clip-path:var(--rf-in);}
#screen-hangar .hg-mini b{font-family:var(--font-head);font-weight:700;font-size:.94rem;color:var(--rf-text-hi);}
#screen-hangar .hg-mini small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
#screen-hangar .hg-mini-check{width:auto;height:auto;padding:1px 7px;border-radius:0;font-family:var(--font-head);font-size:.8rem;font-weight:700;color:var(--rf-on-fill);background:var(--rf-fill-hi);}
/* analyse de fusion */
#screen-hangar .hg-chance{font-family:var(--font-head);font-size:.94rem;color:var(--rf-text);}
#screen-hangar .hg-chance span i{width:7px;height:7px;border-radius:0;transform:rotate(45deg);}
#screen-hangar .hg-chance b{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
#screen-hangar .hg-mut{font-family:var(--font-head);font-size:1.08rem;font-weight:700;color:var(--rf-violet);}
#screen-hangar .hg-inherit{font-family:var(--font-head);font-size:.92rem;color:var(--rf-text);}
#screen-hangar .hg-inherit small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
#screen-hangar .hg-inherit b{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
#screen-hangar .hg-irrev{font-family:var(--font-head);font-size:.86rem;font-style:normal;color:var(--rf-dim);}

/* ---------- CHANTIER ---------- */
/* chantier non construit : son illustration, ce qu'il débloque et le
   bouton vers l'écran Bâtiments */
#screen-hangar .hg-yard-off{display:flex;align-items:center;gap:20px;}
#screen-hangar .hg-yard-off-art{--rf-cut:10px;flex:none;width:clamp(180px, 24%, 260px);aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-hangar .hg-yard-off-txt{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;}
#screen-hangar .hg-yard-off-txt b{font-family:var(--font-head);font-size:1.3rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--rf-text-hi);}
#screen-hangar .hg-yard-off-txt .qx-hint{margin:0;max-width:60ch;}
#screen-hangar .hg-yard-go{margin-top:6px;gap:8px;padding:8px 14px;}
#screen-hangar .hg-yard-go svg{width:16px;height:16px;}
/* emplacements : occupé, posé et teinté d'ambre ; libre, un cadre sombre */
#screen-hangar .hg-slots{gap:10px;}
#screen-hangar .hg-slot.busy{
  --rf-cut:9px;--ring:color-mix(in srgb, var(--rf-amber) 45%, var(--rf-edge));
  position:relative;gap:12px;padding:8px 10px;
  background:linear-gradient(160deg, color-mix(in srgb, var(--rf-amber) 12%, #0A1622), #0A1622 70%);
}
#screen-hangar .hg-slot.free{--rf-cut:9px;--rf-fl:var(--rf-edge);gap:12px;padding:8px 10px;background-color:rgba(6,13,22,.55);}
#screen-hangar .hg-slot > .hg-thumb{width:70px;height:48px;}
#screen-hangar .hg-slot-plus{
  width:46px;height:46px;border:0;border-radius:0;color:var(--rf-amber);
  background:color-mix(in srgb, var(--rf-amber) 14%, #0A1622);
  clip-path:polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
#screen-hangar .hg-slot-main b{font-family:var(--font-head);font-weight:700;font-size:1rem;color:var(--rf-text-hi);}
#screen-hangar .hg-slot-main small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-hangar .hg-slot-time{font-family:var(--font-head);font-size:.9rem;font-weight:700;color:var(--rf-text-hi);}
#screen-hangar .hg-slot-time svg{color:var(--rf-amber);}
#screen-hangar .hg-slot-pct{color:var(--rf-label);}
#screen-hangar .hg-slot .hg-bar > i{background:var(--rf-amber);}
/* tables de construction : rangées séparées d'un trait */
#screen-hangar .hg-tr{gap:8px 14px;padding:7px 0;border-bottom:1px solid var(--rf-line-soft);}
#screen-hangar .hg-tr:last-child{border-bottom:0;}
#screen-hangar .hg-th{padding-top:2px;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-hangar .hg-td-name > .hg-thumb{width:58px;height:42px;}
/* le rôle d'un vaisseau sur deux lignes au plus, jamais coupé au milieu
   d'un mot */
#screen-hangar .hg-table-ships .hg-td-name .hg-card-names small{display:-webkit-box;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
#screen-hangar .hg-table-def .hg-td-name .hg-card-names small{gap:5px;}
#screen-hangar .hg-td-name .hg-card-names small svg{color:var(--rf-orange);}
#screen-hangar :is(.hg-td-dur, .hg-td-req){gap:6px;font-family:var(--font-head);font-size:.9rem;font-weight:700;color:var(--rf-text-hi);}
#screen-hangar .hg-td-dur svg{color:var(--rf-orange);}
#screen-hangar .hg-td-req.ok svg{color:var(--rf-green);}
#screen-hangar .hg-td-req.ko{color:var(--rf-label);}
#screen-hangar .hg-td-req.ko svg{color:var(--rf-amber);}
#screen-hangar .hg-build{min-width:104px;}
/* niveau du chantier : l'illustration du chantier naval */
#screen-hangar .hg-yard{gap:14px;align-items:flex-start;}
#screen-hangar .hg-yard-art{--rf-cut:8px;flex:none;width:84px;aspect-ratio:1;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-hangar .hg-yard-txt b{font-family:var(--font-head);font-size:1.1rem;font-weight:700;letter-spacing:.06em;color:var(--rf-text-hi);}
#screen-hangar .hg-yard-txt small{font-family:var(--font-head);font-size:.88rem;color:var(--rf-label);}
#screen-hangar .hg-yard-next{color:var(--rf-dim) !important;}

/* écran étroit (1366, 1500) */
@media (max-width:1500px){
  #screen-hangar .qx-screen-tabs{margin-left:12px;}
  #screen-hangar .qx-screen-tabs .pill-tab{padding-left:16px;padding-right:20px;}
  #screen-hangar .hg-yard-off-art{width:200px;}
  /* colonnes étroites : titres, raretés et garnison resserrés */
  #screen-hangar .pn-ic{width:17px;height:17px;}
  #screen-hangar .pn-tab{gap:6px;padding-left:9px;padding-right:calc(var(--tab-br) + 6px);}
  #screen-hangar .pn-title{font-size:.7rem;letter-spacing:.02em;}
  #screen-hangar .hg-rar-chips{gap:5px;}
  #screen-hangar .hg-rar-chip{gap:5px;padding:4px 6px;font-size:.78rem;letter-spacing:0;}
  #screen-hangar .hg-gar{padding:7px 8px;}
  #screen-hangar .hg-gar > .hg-thumb{width:44px;height:34px;}
  #screen-hangar .hg-gar-txt small{white-space:nowrap;}
  #screen-hangar .hg-gar-btn{min-width:0;padding:6px 10px;}
  #screen-hangar .hg-yard-art{width:60px;}
}
/* table des vaisseaux sur deux lignes (1600 et moins) : le rôle se
   masque, comme avant la refonte, pour garder les six classes en vue */
@media (max-width:1600px){
  #screen-hangar .hg-table-ships .hg-td-name .hg-card-names small{display:none;}
}
/* écran peu haut (1366 x 768) */
@media (max-height:820px){
  #screen-hangar .hg-empty-missions .hg-empty-art{display:none;}
  #screen-hangar .hg-card-art{height:calc(76px*var(--scale));}
  #screen-hangar .hg-sel-art{aspect-ratio:16 / 5;}
  #screen-hangar .hg-empty-sel .hg-empty-art{aspect-ratio:16 / 6;}
  #screen-hangar .hg-power-big b,#screen-hangar .hg-def-power b{font-size:1.7rem;}
}

/* ============================================================
   22. ÉCRAN MARCHÉ (v0.91.12)
   Mêmes formes que le Hangar : chaque panneau est un bloc ; une offre du
   jour et le contrat en cours sont posés dans leur bloc (trois coins,
   anneau) ; les boutons, les champs, les tuiles de ressource, la
   bascule Vendre/Acheter, la caisse du livreur et les chiffres du
   contrat sont des cadres dans le fond ; sens, statut et multiplicateur
   en étiquettes. Le curseur de quantité (AG.mktQtyControl) a une piste
   droite et une poignée en losange. Couleurs d'onglet : les offres en
   ambre (une action), les cours et l'information en bleu, la
   transaction et le nouveau contrat en vert d'eau, le contrat en cours
   en vert (ce qui rapporte), à vendre en rose, demandés en vert.
   Illustrations attendues (AG.IMG) : le comptoir, le livreur, aucun
   ordre ouvert.
   ============================================================ */
#mk-panel-bonus,#mk-panel-otools{--pn-c:var(--rf-amber) !important;}
#mk-panel-counter,#mk-panel-info,#mk-panel-ctrules,#mk-panel-ctgain,#mk-panel-ctplan,#mk-panel-ref,#mk-panel-binfo,#mk-panel-closed,#mk-panel-osum{--pn-c:var(--rf-blue) !important;}
#mk-panel-ctcur,#mk-panel-bids{--pn-c:var(--rf-green) !important;}
#mk-panel-asks{--pn-c:var(--rf-rose) !important;}
#screen-market .qx-card .panel-body{padding:9px 14px 12px;}
#screen-market .qx-card .panel-body.mk-scroll{padding:0 !important;}
#screen-market .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-market .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-market .panel-head .eyebrow{flex:none;white-space:nowrap;color:color-mix(in srgb, var(--pn-c) 70%, var(--rf-text-hi));}

/* ---------- en-tête : titre, onglets à pictogramme, citation ---------- */
#screen-market .qx-head-txt h1{text-transform:uppercase;white-space:nowrap;}
#screen-market .qx-screen-tabs{position:relative;margin:0 0 0 18px;flex:none;}
#screen-market .qx-screen-tabs .pill-tab{display:inline-flex;align-items:center;gap:8px;font-size:inherit;text-transform:uppercase;}
#screen-market .qx-screen-tabs .pill-tab i.mk-tab-ic{display:inline-flex;width:17px;height:17px;flex:none;}
#screen-market .mk-tab-ic svg{width:100%;height:100%;}
#screen-market .qx-quote{border-right-color:var(--rf-cyan);}
#screen-market .qx-quote blockquote{font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-market .qx-quote figcaption{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}

/* ---------- textes courants ---------- */
#screen-market :is(.mk-sub, .mk-note, .mk-hint, .mk-rule, .mk-empty, .mk-lock){font-family:var(--font-head);}
#screen-market .mk-sub{font-size:.88rem;color:var(--rf-label);}
#screen-market .mk-note{margin:8px 0 0;font-size:.86rem;line-height:1.45;color:var(--rf-label);}
#screen-market .mk-hint{margin:6px 0 0;font-size:.84rem;line-height:1.4;color:var(--rf-dim);}
#screen-market .mk-hint.warn{color:var(--rf-amber);}
#screen-market .mk-empty{font-size:.9rem;color:var(--rf-label);}
#screen-market .mk-motif{margin:8px 0 0;font-family:var(--font-head);font-size:.86rem;font-weight:600;line-height:1.35;color:var(--rf-amber);}
#screen-market .mk-rule{margin:0 0 9px;padding-left:16px;font-size:.88rem;line-height:1.45;color:var(--rf-text);}
#screen-market .mk-rule::before{top:.5em;width:6px;height:6px;border-radius:0;transform:rotate(45deg);background:var(--pn-c, var(--rf-cyan));}
#screen-market .mk-field-lbl,#screen-market .mk-auto-lbl,
#screen-market .mk-field > span:first-child{
  margin-bottom:6px;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);
}
#screen-market .mk-num{font-family:var(--font-head);font-weight:600;}
#screen-market .mk-num.up,#screen-market .mk-num.pos,#screen-market b.up{color:var(--rf-green);}
#screen-market .mk-num.down,#screen-market b.down,#screen-market .neg{color:var(--rf-rose);}
#screen-market .scrip-amt{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
#screen-market .mk-scrip{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
#screen-market .mk-scrip.pos{color:var(--rf-green);}
/* libellé et valeur */
#screen-market .mk-kv{align-items:center;min-height:27px;padding:2px 0;font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
#screen-market .mk-kv > b,#screen-market .mk-kv > .scrip-amt,#screen-market .mk-kv > .mk-scrip{font-family:var(--font-head);font-size:.96rem;font-weight:700;color:var(--rf-text-hi);}
#screen-market .mk-kv.total{margin-top:6px;padding-top:8px;border-top:1px solid var(--rf-line-soft);}
#screen-market .mk-kv.total > b{color:var(--rf-green);}
#screen-market .mk-kv b.warn{color:var(--rf-amber);}
/* étiquettes : sens, statut, multiplicateur, type */
#screen-market .mk-tag{
  padding:2px 8px;border:0;border-radius:0;font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));
}
#screen-market .mk-tag.teal{color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 14%, rgba(6,13,22,.9));}
#screen-market .mk-side{padding:2px 8px;font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.06em;}
#screen-market .mk-side.sell{color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 14%, rgba(6,13,22,.9));}
#screen-market .mk-side.buy{color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 14%, rgba(6,13,22,.9));}
#screen-market .mk-status{
  gap:0;padding:2px 9px;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.04em;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));
}
#screen-market .mk-status::before{display:none;}
#screen-market .mk-status[data-k="active"],#screen-market .mk-status[data-k="open"],#screen-market .mk-status[data-k="filled"]{color:var(--rf-green);background:color-mix(in srgb, var(--rf-green) 14%, rgba(6,13,22,.9));}
#screen-market .mk-status[data-k="auto"],#screen-market .mk-status[data-k="partial"]{color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 14%, rgba(6,13,22,.9));}
#screen-market .mk-status[data-k="expired"]{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, rgba(6,13,22,.9));}
#screen-market .mk-mult{
  padding:2px 9px;border-radius:0;box-shadow:none;font-family:var(--font-head);font-size:.86rem;font-weight:700;
  color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 20%, rgba(6,13,22,.92));
}
#screen-market .mk-step-n{
  display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;padding:0 6px;
  font-family:var(--font-head);font-size:.86rem;font-weight:700;color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 18%, rgba(6,13,22,.92));
}

/* ---------- pièces communes ---------- */
/* barres droites */
#screen-market .mk-bar{height:6px;margin-top:5px;border-radius:0;background:rgba(4,10,18,.9);box-shadow:inset 0 0 0 1px var(--rf-line-soft);}
#screen-market .mk-bar > i{border-radius:0;background:var(--rf-cyan);}
#screen-market .mk-bar.amber > i{background:var(--rf-amber);}
/* image d'une ressource : posée, trois coins */
#screen-market .mk-res-img{--rf-cut:5px;flex:none;display:inline-block;width:30px;height:30px;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-market .mk-res-img.lg{--rf-cut:7px;width:48px;height:48px;}
#screen-market .mk-res-img img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-market .mk-res-ic{width:28px;height:28px;border:0;border-radius:0;color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 12%, #08121D);}
#screen-market .mk-res-name{font-family:var(--font-head);font-weight:700;font-size:.96rem;color:var(--rf-text-hi);}
#screen-market .mk-res[role="button"]{border-radius:0;}
#screen-market .mk-res[role="button"]:hover .mk-res-name{color:var(--rf-cyan);}
/* champs : cadres sombres, liseré vert d'eau au survol */
#screen-market .mk-input,#screen-market .mk-search input{
  --rf-cut:6px;--rf-fl:var(--rf-edge);border-radius:0;background-color:#08141F;box-shadow:none;transition:none;
  font-family:var(--font-head);font-size:.94rem;font-weight:600;color:var(--rf-text-hi);
}
#screen-market .mk-search input{padding:7px 10px 7px 30px;}
#screen-market .mk-input:hover:not(:disabled),#screen-market .mk-search input:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 50%, var(--rf-edge));}
#screen-market .mk-input:focus,#screen-market .mk-search input:focus{--rf-fl:var(--rf-cyan);outline:none;box-shadow:none;}
#screen-market .mk-input::placeholder,#screen-market .mk-search input::placeholder{color:var(--rf-dim);}
#screen-market .mk-search svg{z-index:1;left:10px;width:14px;height:14px;color:var(--rf-dim);}
#screen-market .mk-static{
  --rf-cut:6px;border:0;border-radius:0;clip-path:var(--rf-in);background:#0A1622;
  font-family:var(--font-head);font-size:.94rem;font-weight:600;color:var(--rf-text);
}
#screen-market .mk-step{
  --rf-cut:6px;--rf-fl:var(--rf-edge);width:34px;border-radius:0;background-color:#08141F;transition:none;
  font-family:var(--font-head);font-size:1.05rem;font-weight:700;color:var(--rf-cyan);
}
#screen-market .mk-step:hover:not(:disabled){--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}
/* listes maison (catégorie, ressource, filtres) */
#screen-market .ag-select{min-width:150px;}
#screen-market .ag-select-btn{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:7px 12px;background-color:#08141F;
  font-family:var(--font-head);font-size:.92rem;font-weight:600;color:var(--rf-text-hi);transition:none;
}
#screen-market .ag-select-btn:hover,#screen-market .ag-select.open .ag-select-btn{--rf-fl:var(--rf-cyan);}
#screen-market .ag-select-caret{color:var(--rf-cyan);}
#screen-market .ag-select-list{--rf-cut:8px;--rf-fl:var(--rf-line);padding:5px;background-color:rgba(7,14,24,.98);box-shadow:none;}
#screen-market .ag-select-opt{border-radius:0;font-family:var(--font-head);font-size:.92rem;color:var(--rf-text);}
#screen-market .ag-select-opt:hover,#screen-market .ag-select-opt.active{background:#0E2C29;color:var(--rf-text-hi);}
#screen-market .ag-select-opt.selected{color:var(--rf-cyan);}
/* bascule Vendre / Acheter : deux cadres, le choisi teinté de son sens */
#screen-market .mk-seg{gap:6px;padding:0;border:0;border-radius:0;background:transparent;}
#screen-market .mk-seg-btn{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:8px 10px;border:0;border-radius:0;background-color:rgba(8,20,31,.94);transition:none;
  font-family:var(--font-head);font-size:.86rem;font-weight:700;letter-spacing:.09em;color:var(--rf-label);
}
#screen-market .mk-seg-btn:hover:not(:disabled):not(.active){--rf-fl:color-mix(in srgb, var(--rf-cyan) 55%, var(--rf-edge));color:var(--rf-text-hi);}
#screen-market .mk-seg-btn.sell.active{--rf-fl:var(--rf-amber);background-color:color-mix(in srgb, var(--rf-amber) 22%, #08141F);color:var(--rf-text-hi);}
#screen-market .mk-seg-btn.buy.active{--rf-fl:var(--rf-cyan);background-color:color-mix(in srgb, var(--rf-cyan) 22%, #08141F);color:var(--rf-text-hi);}
#screen-market .mk-seg-btn:disabled{opacity:1;color:var(--rf-dim);}
/* boutons de sens dans les rangées : le texte prend la couleur du sens */
#screen-market .btn.sm.mk-sell{color:var(--rf-amber);}
#screen-market .btn.sm.mk-buy{color:var(--rf-cyan);}
#screen-market .btn.sm.mk-sell:hover:not(:disabled){--rf-fl:var(--rf-amber);background-color:color-mix(in srgb, var(--rf-amber) 20%, #08141F);color:var(--rf-text-hi);}
#screen-market .btn.sm.mk-buy:hover:not(:disabled){--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}
#screen-market .btn.sm.mk-cancel:hover:not(:disabled){--rf-fl:var(--rf-rose);background-color:color-mix(in srgb, var(--rf-rose) 16%, #08141F);color:var(--rf-text-hi);}
#screen-market .btn.sm:disabled{opacity:1;color:var(--rf-dim);}
/* bouton héros : ambre plein et son relief ; bloqué, un cadre neutre */
#screen-market .mk-hero{
  --rf-cut:9px;--rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));
  width:100%;min-height:46px;margin-top:12px;padding:11px 16px;border:0;border-radius:0;background-color:var(--rf-hero);color:var(--rf-hero-ink);text-shadow:none;
  font-family:var(--font-head);font-size:1.02rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
}
#screen-market .mk-hero:hover:not(:disabled){--rf-fl:transparent;background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#screen-market .mk-hero:disabled{
  --rf-fl:var(--rf-edge);--rf-relief:linear-gradient(transparent, transparent);
  background-color:#0A1622;color:var(--rf-dim);opacity:1;
}

/* ---------- curseur de quantité (AG.mktQtyControl) ---------- */
#screen-market .mk-qc{display:flex;flex-direction:column;gap:4px;min-width:0;container-type:inline-size;}
#screen-market .mk-qc-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px 12px;min-width:0;}
#screen-market .mk-qc-track{flex:3 1 170px;min-width:0;display:flex;flex-direction:column;gap:2px;}
#screen-market .mk-qc .ag-slider{width:100%;min-width:0;height:28px;}
#screen-market .mk-qc .ag-slider-track{height:6px;margin-top:-3px;border-radius:0;background:rgba(4,10,18,.95);box-shadow:inset 0 0 0 1px var(--rf-edge);}
#screen-market .mk-qc .ag-slider-fill{background:var(--rf-cyan);}
#screen-market .mk-qc .ag-slider-thumb{
  width:14px;height:14px;margin:-7px 0 0 -7px;border:2px solid var(--rf-cyan);border-radius:0;background:#0A1622;
  transform:rotate(45deg);transition:none;
}
#screen-market .mk-qc .ag-slider:hover .ag-slider-thumb,#screen-market .mk-qc .ag-slider.dragging .ag-slider-thumb{background:var(--rf-cyan);transform:rotate(45deg);}
#screen-market .mk-qc .ag-slider:focus-visible{outline:1px solid var(--rf-cyan);outline-offset:3px;}
#screen-market .mk-qc-val{flex:none;display:inline-flex;align-items:baseline;justify-content:flex-end;gap:5px;min-width:76px;padding-top:4px;}
#screen-market .mk-qc-val b{font-family:var(--font-head);font-size:1.3rem;font-weight:700;line-height:1;color:var(--rf-text-hi);}
#screen-market .mk-qc-val small,#screen-market .mk-qc-unit{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);white-space:nowrap;}
#screen-market .mk-qc-input{flex:none;width:110px;padding:6px 10px;text-align:right;}
#screen-market .mk-qc-field .mk-qc-row{flex-wrap:nowrap;align-items:center;}
#screen-market .mk-qc-field .mk-qc-input{flex:0 1 170px;width:auto;min-width:80px;}
#screen-market .mk-qc-edit,#screen-market .mk-qc-max{flex:none;min-width:84px;justify-content:center;}
#screen-market .mk-qc-slider .mk-qc-edit{margin-left:auto;}
#screen-market .mk-qc-slider .mk-qc-input{margin-top:-1px;}
#screen-market .mk-qc-scale{display:flex;justify-content:space-between;gap:10px;padding:0 4px;font-family:var(--font-head);font-size:.78rem;font-weight:600;color:var(--rf-dim);}
#screen-market .mk-qc-field .mk-qc-scale{justify-content:flex-start;}
/* colonne étroite : la piste seule sur sa ligne, la valeur et Modifier dessous */
@container (max-width:360px){
  #screen-market .mk-qc-track{flex-basis:100%;}
  #screen-market .mk-qc-val{justify-content:flex-start;padding-top:2px;}
}
#screen-market .mk-qc.locked .ag-slider-fill{background:var(--rf-dim);}
#screen-market .mk-qc.locked .ag-slider-thumb{border-color:var(--rf-dim);background:#0A1622;}
#screen-market .mk-qc.locked .mk-qc-val b{color:var(--rf-dim);}

/* ---------- COMPTOIR : offres du jour ---------- */
#screen-market .mk-bonus-grid{grid-template-columns:repeat(auto-fit, minmax(min(100%, 270px), 1fr));gap:12px;}
#screen-market .mk-bonus{
  --rf-cut:10px;--ring:color-mix(in srgb, var(--rf-amber) 40%, var(--rf-edge));
  position:relative;align-items:stretch;gap:12px;padding:8px 12px 8px 8px;
  background:linear-gradient(160deg, color-mix(in srgb, var(--rf-amber) 12%, #0A1622), #0A1622 70%);
}
#screen-market .mk-bonus:hover{--ring:color-mix(in srgb, var(--rf-amber) 80%, var(--rf-edge));}
#screen-market .mk-bonus.sel{--ring:var(--rf-amber);background:linear-gradient(0deg, var(--rf-amber) 0 3px, transparent 3px), linear-gradient(160deg, color-mix(in srgb, var(--rf-amber) 18%, #0A1622), #0A1622 70%);}
#screen-market .mk-bonus-art{--rf-cut:7px;flex:none;width:76px;align-self:center;aspect-ratio:1;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-market .mk-bonus-art img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-market .mk-bonus-main{gap:4px;justify-content:center;}
#screen-market .mk-bonus-top h3{font-family:var(--font-head);font-size:1.02rem;font-weight:700;letter-spacing:.03em;color:var(--rf-text-hi);}
#screen-market .mk-bonus-price{align-items:baseline;justify-content:flex-start;gap:8px;font-family:var(--font-head);}
#screen-market .mk-bonus-price .scrip-amt{font-size:1.06rem;color:var(--rf-amber);}
#screen-market .mk-bonus-price small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-dim);text-decoration:line-through;text-decoration-color:color-mix(in srgb, var(--rf-dim) 60%, transparent);}
#screen-market .mk-bonus-foot{margin-top:2px;font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
#screen-market .mk-bonus-pick{flex:none;align-self:center;min-width:86px;justify-content:center;color:var(--rf-amber);}
#screen-market .mk-bonus-pick:hover:not(:disabled){--rf-fl:var(--rf-amber);background-color:color-mix(in srgb, var(--rf-amber) 20%, #08141F);color:var(--rf-text-hi);}

/* ---------- COMPTOIR : cours ---------- */
#screen-market .mk-toolbar{gap:10px;padding:10px 14px 8px;}
#screen-market .mk-toolbar .mk-sub{margin:0 auto 0 0;}
#screen-market .mk-search{flex:0 1 240px;}
#screen-market .mk-table{font-family:var(--font-head);font-size:.92rem;}
#screen-market .mk-table th{
  padding:8px 10px;background:rgba(3,8,14,.97);border-bottom:1px solid var(--rf-line-soft);
  font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);
}
#screen-market .mk-table td{padding:7px 10px;border-bottom:1px solid var(--rf-line-soft);color:var(--rf-text);}
#screen-market .mk-table tbody tr:last-child td{border-bottom:0;}
#screen-market .mk-table tbody tr:hover td{background:rgba(95,181,169,.05);}
#screen-market .mk-table tr.sel td{background:color-mix(in srgb, var(--rf-cyan) 11%, transparent);}
#screen-market .mk-table tr.sel td:first-child{box-shadow:inset 3px 0 0 var(--rf-cyan);}
#screen-market .mk-table tr.mine td{background:color-mix(in srgb, var(--rf-cyan) 8%, transparent);}
#screen-market .mk-table td.mk-empty{padding:22px 14px !important;}
#screen-market .mk-trend{display:inline-flex;align-items:center;gap:8px;}
#screen-market .mk-trend .mk-num{font-size:.86rem;}
#screen-market .mk-trend.up .mk-num{color:var(--rf-green);}
#screen-market .mk-trend.down .mk-num{color:var(--rf-rose);}
#screen-market .mk-spark.up polyline{stroke:var(--rf-green);}
#screen-market .mk-spark.down polyline{stroke:var(--rf-rose);}
#screen-market .mk-quota{min-width:120px;}
#screen-market .mk-quota-txt{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);}
#screen-market .mk-acts{gap:6px;}
#screen-market .mk-acts .btn.sm{min-width:74px;justify-content:center;}

/* ---------- COMPTOIR : transaction ---------- */
/* le comptoir en image, la bascule Vendre/Acheter posée en bas */
#screen-market .mk-tx-art{--rf-cut:10px;position:relative;display:block;aspect-ratio:3 / 1;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-market .mk-tx-art > img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-market .mk-tx-art .mk-seg{position:absolute;left:10px;right:10px;bottom:10px;}
#screen-market .mk-tx-res{gap:12px;margin:12px 0 10px;}
#screen-market .mk-tx-res b{font-family:var(--font-head);font-size:1.14rem;font-weight:700;letter-spacing:.03em;color:var(--rf-text-hi);}
#screen-market .mk-tx-res small{margin-top:2px;font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
/* offre du jour : une case à cocher maison en cadre ambre */
#screen-market .mk-tx-bonus{
  --rf-cut:6px;--rf-fl:color-mix(in srgb, var(--rf-amber) 40%, var(--rf-edge));
  display:flex;align-items:center;gap:10px;width:100%;margin:0 0 10px;padding:8px 10px;border:0;border-radius:0;cursor:pointer;text-align:left;
  background-color:color-mix(in srgb, var(--rf-amber) 7%, #08141F);
  font-family:var(--font-head);font-size:.9rem;font-weight:600;color:var(--rf-text);
}
#screen-market .mk-tx-bonus:hover{--rf-fl:color-mix(in srgb, var(--rf-amber) 75%, var(--rf-edge));}
#screen-market .mk-tx-bonus.on{--rf-fl:var(--rf-amber);background-color:color-mix(in srgb, var(--rf-amber) 18%, #08141F);color:var(--rf-text-hi);}
#screen-market .mk-tx-bonus-box{flex:none;width:16px;height:16px;box-shadow:inset 0 0 0 1px var(--rf-amber);background:#08141F;}
#screen-market .mk-tx-bonus.on .mk-tx-bonus-box{background:var(--rf-amber);box-shadow:inset 0 0 0 1px var(--rf-amber), inset 0 0 0 4px #08141F;}
#screen-market #mk-tx .mk-field{margin-bottom:6px;}
#screen-market .mk-tx-total{
  --rf-cut:8px;margin-top:10px;padding:10px 12px;border:0;border-radius:0;clip-path:var(--rf-in);
  background:linear-gradient(160deg, color-mix(in srgb, var(--rf-cyan) 12%, #0A1622), #0A1622 75%);
  font-family:var(--font-head);font-size:.9rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--rf-label);
}
#screen-market .mk-tx-total .mk-scrip{font-size:1.4rem;letter-spacing:0;text-transform:none;color:var(--rf-text-hi);}
#screen-market .mk-tx-total .scrip-ic{width:19px;height:19px;}
#screen-market .mk-tx-after{--rf-cut:7px;--rf-fl:var(--rf-edge);margin-top:8px;padding:6px 12px;background-color:#08141F;}
#screen-market .mk-tx-after > span{display:block;margin:3px 0 1px;font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-market .mk-tx-after .mk-kv{min-height:24px;font-size:.88rem;}

/* ---------- CONTRAT : nouveau contrat ---------- */
#screen-market .mk-ctn{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:14px 18px;}
#screen-market .mk-ctn-head{grid-column:1 / -1;display:flex;align-items:center;gap:18px;}
#screen-market .mk-ctn-art{--rf-cut:10px;flex:none;width:clamp(180px, 22%, 280px);aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-market :is(.mk-ctn-art, .mk-ctc-art, .mk-empty-art, .mk-ref-art) img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-market .mk-ctn-head h2{margin:0 0 6px;font-family:var(--font-head);font-size:1.3rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--rf-text-hi);}
#screen-market .mk-ctn-head p{margin:0;max-width:72ch;font-family:var(--font-head);font-size:.94rem;line-height:1.45;color:var(--rf-text);}
#screen-market .mk-ctn-step{min-width:0;}
#screen-market .mk-ctn-step:has(.mk-ctn-res){grid-column:1 / -1;}
#screen-market .mk-ctn-step h3{
  display:flex;align-items:center;gap:9px;margin:0 0 9px;
  font-family:var(--font-head);font-size:.94rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--rf-text-hi);
}
/* ressources : une tuile par ressource, la choisie en vert d'eau */
#screen-market .mk-ctn-res{display:grid;grid-template-columns:repeat(auto-fill, minmax(165px, 1fr));gap:8px;}
#screen-market .mk-ctn-tile{
  --rf-cut:7px;--rf-fl:var(--rf-edge);display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:9px;align-items:center;
  padding:6px 9px 6px 6px;border:0;border-radius:0;cursor:pointer;text-align:left;background-color:#08141F;transition:none;
}
#screen-market .mk-ctn-tile .mk-res-img{grid-row:1 / 4;width:38px;height:38px;}
#screen-market .mk-ctn-tile b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-head);font-size:.92rem;font-weight:700;color:var(--rf-text-hi);}
#screen-market .mk-ctn-tile small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-head);font-size:.78rem;line-height:1.25;color:var(--rf-label);}
#screen-market .mk-ctn-tile small + small{color:var(--rf-dim);}
#screen-market .mk-ctn-tile:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, var(--rf-edge));background-color:#0B1A26;}
#screen-market .mk-ctn-tile.sel{--rf-fl:var(--rf-cyan);background-color:color-mix(in srgb, var(--rf-cyan) 16%, #08141F);}
#screen-market .mk-ctn-tile.sel small{color:var(--rf-text);}
#screen-market .mk-ctn-tile.off:not(.sel){background-color:rgba(8,20,31,.5);}
#screen-market .mk-ctn-tile.off b,
#screen-market .mk-ctn-tile.off .mk-res-img{opacity:.55;}
#screen-market .mk-ctn-tile.off small:first-of-type{color:var(--rf-dim);}
/* réglage automatique : un cadre pointillé, la fonction d'appoint */
#screen-market .mk-auto{--rf-cut:7px;--rf-fl:var(--rf-edge);margin-top:10px;padding:8px 10px 10px;background-color:rgba(8,20,31,.6);}
#screen-market .mk-auto-lbl{display:block;}
#screen-market .mk-auto-row{display:flex;align-items:center;gap:8px;}
#screen-market .mk-auto-in{flex:1 1 auto;width:auto;min-width:60px;max-width:150px;padding:6px 10px;text-align:right;}
#screen-market .mk-auto-row small{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);white-space:nowrap;}
#screen-market .mk-auto-go{margin-left:auto;min-width:90px;justify-content:center;}
/* bilan du réglage et signature, sur une ligne */
#screen-market .mk-ctn-sum{
  grid-column:1 / -1;display:grid;grid-template-columns:repeat(3, minmax(0,1fr)) minmax(220px, 1.2fr);gap:10px;align-items:stretch;
  padding-top:12px;border-top:1px solid var(--rf-line-soft);
}
#screen-market .mk-ctn-fig{
  --rf-cut:7px;--rf-fl:var(--rf-edge);display:flex;flex-direction:column;gap:3px;min-width:0;padding:8px 12px;background-color:#08141F;
}
#screen-market .mk-ctn-fig > span{font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-market .mk-ctn-fig > b{font-family:var(--font-head);font-size:1.2rem;font-weight:700;color:var(--rf-text-hi);}
#screen-market .mk-ctn-fig > b.warn{color:var(--rf-amber);}
#screen-market .mk-ctn-fig > small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-dim);}
#screen-market .mk-ct-gain{align-items:baseline;gap:6px;color:var(--rf-green);}
#screen-market .mk-ct-gain b{font-family:var(--font-head);font-size:1.3rem;font-weight:700;}
#screen-market .mk-ct-gain small{font-family:var(--font-head);font-size:.82rem;font-weight:600;color:var(--rf-label);}
#screen-market .mk-ct-gain .scrip-ic{width:18px;height:18px;align-self:center;}
#screen-market .mk-ct-gain.big b{font-size:1.9rem;line-height:1;}
#screen-market .mk-ctn-go{display:flex;flex-direction:column;justify-content:center;min-width:0;}
#screen-market .mk-ctn-go .mk-hero{margin-top:0;}

/* ---------- CONTRAT : le contrat en cours ---------- */
#screen-market .mk-ctc{
  --rf-cut:12px;--ring:color-mix(in srgb, var(--rf-green) 40%, var(--rf-edge));
  position:relative;display:flex;align-items:stretch;gap:18px;padding:10px 16px 12px 10px;
  background:linear-gradient(160deg, color-mix(in srgb, var(--rf-green) 10%, #0A1622), #0A1622 65%);
}
#screen-market .mk-ctc[data-k="paused"]{--ring:var(--rf-edge);background:#0A1622;}
#screen-market .mk-ctc[data-k="auto"]{--ring:color-mix(in srgb, var(--rf-amber) 45%, var(--rf-edge));background:linear-gradient(160deg, color-mix(in srgb, var(--rf-amber) 9%, #0A1622), #0A1622 65%);}
#screen-market .mk-ctc-art{--rf-cut:10px;flex:none;width:clamp(200px, 26%, 340px);align-self:flex-start;aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-market .mk-ctc-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:12px;}
#screen-market .mk-ctc-top{display:flex;align-items:center;gap:12px;}
#screen-market .mk-ctc-name{flex:1 1 auto;min-width:0;}
#screen-market .mk-ctc-name h3{margin:0;font-family:var(--font-head);font-size:1.24rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rf-text-hi);}
#screen-market .mk-ctc-name small{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-market .mk-ctc-figs{display:grid;grid-template-columns:repeat(4, minmax(0,1fr));gap:8px;}
#screen-market .mk-ctc-figs > div{
  --rf-cut:7px;display:flex;flex-direction:column;gap:3px;min-width:0;padding:8px 12px;
  clip-path:var(--rf-in);background:rgba(4,10,18,.7);
}
#screen-market .mk-ctc-figs > div > span{font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-market .mk-ctc-figs b{font-family:var(--font-head);font-size:1.12rem;font-weight:700;color:var(--rf-text-hi);}
#screen-market .mk-ctc-figs small{font-family:var(--font-head);font-size:.8rem;color:var(--rf-dim);}
#screen-market .mk-ctc-figs small.mk-ctc-next{color:var(--rf-amber);}
/* la caisse du livreur : ce qu'elle contient, l'heure qui avance, le passage */
#screen-market .mk-ctc-crate{--rf-cut:8px;--rf-fl:color-mix(in srgb, var(--rf-green) 40%, var(--rf-edge));padding:9px 14px 10px;background-color:#08141F;}
#screen-market .mk-ctc-crate-top{display:flex;align-items:baseline;gap:12px;font-family:var(--font-head);}
#screen-market .mk-ctc-crate-top > span{font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-market .mk-ctc-crate-top > b{font-size:1.16rem;font-weight:700;color:var(--rf-text-hi);}
#screen-market .mk-ctc-crate-top > .mk-scrip{margin-left:auto;font-size:1.16rem;}
#screen-market .mk-ctc-crate .mk-bar{height:8px;margin:7px 0 6px;}
#screen-market .mk-ctc-crate .mk-bar > i{background:var(--rf-green);}
#screen-market .mk-ctc-crate-foot{display:flex;justify-content:space-between;gap:6px 14px;flex-wrap:wrap;font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-market .mk-ctc-crate-foot > span:first-child{font-weight:700;color:var(--rf-text-hi);}
/* modification en place : les deux réglages côte à côte */
#screen-market .mk-ctc-edit{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:12px 18px;padding:12px 0 0;border-top:1px solid var(--rf-line-soft);}
#screen-market .mk-ctc-edit > :is(.mk-cte-note, .mk-ctc-acts, .mk-motif){grid-column:1 / -1;}
#screen-market .mk-cte-note{margin:0;color:var(--rf-text);}
#screen-market .mk-ctc-foot{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:auto;}
#screen-market .mk-ctc-earned{display:inline-flex;align-items:center;gap:8px;font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-market .mk-ctc-acts{display:flex;gap:8px;margin-left:auto;}
#screen-market .mk-ctc-edit .mk-ctc-acts{justify-content:flex-end;}
#screen-market .mk-ctc-acts .btn.sm{min-width:96px;justify-content:center;}

/* prochains passages : six heures côte à côte, la prochaine en vert */
#screen-market .mk-plan{display:grid;grid-template-columns:repeat(6, minmax(0,1fr));gap:8px;}
#screen-market .mk-plan-cell{
  --rf-cut:7px;display:flex;flex-direction:column;gap:2px;min-width:0;padding:8px 12px 9px;
  clip-path:var(--rf-in);background:rgba(4,10,18,.7);font-family:var(--font-head);
}
#screen-market .mk-plan-cell.next{background:linear-gradient(0deg, var(--rf-green) 0 2px, transparent 2px), linear-gradient(160deg, color-mix(in srgb, var(--rf-green) 14%, #0A1622), #0A1622 75%);}
#screen-market .mk-plan-cell > b{font-size:1.16rem;font-weight:700;color:var(--rf-text-hi);}
#screen-market .mk-plan-cell > .mk-scrip{font-size:1.02rem;}
#screen-market .mk-plan-cell > small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8rem;color:var(--rf-label);}
#screen-market .mk-plan-cell > small.mk-plan-stock{color:var(--rf-dim);}
#screen-market .mk-plan-cell > small.mk-plan-stock + small{margin-top:4px;}
#screen-market #mk-ctplan .mk-hint{margin-top:8px;}

/* ---------- BOURSE ---------- */
#screen-market .mk-ref{gap:16px;}
#screen-market .mk-ref-art{--rf-cut:9px;width:84px;height:84px;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-market .mk-ref-top{gap:10px;}
#screen-market .mk-ref-lbl{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-market .mk-ref-desc{margin-top:8px;font-family:var(--font-head);font-size:.88rem;color:var(--rf-label);}
#screen-market .mk-ref-val b{font-family:var(--font-head);font-size:1.6rem;font-weight:700;color:var(--rf-amber);}
#screen-market .mk-ref-val small{font-family:var(--font-head);font-size:.84rem;color:var(--rf-label);}
#screen-market .mk-ref-price .mk-num{font-size:.88rem;}
#screen-market .mk-ref-chart small{font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-market .mk-b-status{font-family:var(--font-head);font-size:.84rem;color:var(--rf-dim);}
#screen-market .mk-b-status.err{color:var(--rf-rose);}
#screen-market .mk-duo{flex:1 1 auto;min-height:calc(240px*var(--scale));align-items:stretch;}
#screen-market .mk-duo > .mk-book{display:flex;flex-direction:column;min-height:0;}
#screen-market .mk-book .mk-scroll{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;}
/* poser un ordre : un formulaire en colonne, dans le panneau de droite */
#screen-market .mk-place{display:flex;flex-direction:column;align-items:stretch;gap:12px;}
#screen-market .mk-place-side{flex-direction:row;}
#screen-market .mk-place .mk-qc{margin-top:0;}
#screen-market .mk-stepper{gap:6px;}
#screen-market .mk-stepper .mk-input{flex:1 1 auto;width:auto;}
#screen-market .mk-step:disabled{opacity:1;color:var(--rf-dim);}
#screen-market #mk-panel-place .panel-head .pn-tab{flex:none;}
#screen-market #mk-panel-place .panel-head .eyebrow{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;}
#screen-market .mk-place.locked{opacity:1;}
#screen-market .mk-place.locked > :not(.mk-place-go){opacity:.55;}
#screen-market .mk-place-sum{--rf-cut:8px;padding:6px 12px 8px;clip-path:var(--rf-in);background:rgba(4,10,18,.7);}
#screen-market .mk-place-go .mk-hero{margin-top:0;}
#screen-market .mk-lock{gap:10px;font-size:.9rem;color:var(--rf-label);}
#screen-market .mk-lock svg{color:var(--rf-amber);}
#screen-market .mk-mine{gap:0;}
#screen-market .mk-mine-row{padding:7px 0;border-bottom:1px solid var(--rf-line-soft);font-family:var(--font-head);font-size:.9rem;}
#screen-market .mk-mine-row:last-child{border-bottom:0;}

/* ---------- MES ORDRES ---------- */
#screen-market .mk-empty-art{--rf-cut:10px;display:block;width:min(100%, 420px);aspect-ratio:16 / 9;margin:0 auto 12px;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-market .mk-last{gap:10px;font-family:var(--font-head);font-size:.9rem;color:var(--rf-text);}
#screen-market .mk-last b{color:var(--rf-text-hi);}
#screen-market .mk-tools{gap:10px;}
#screen-market .mk-tool{
  --rf-cut:8px;--rf-fl:var(--rf-edge);gap:8px;padding:14px 8px;border:0;border-radius:0;background-color:#08141F;box-shadow:none;transition:none;
  font-family:var(--font-head);font-size:.84rem;font-weight:700;letter-spacing:.08em;
}
#screen-market .mk-tool.buy:hover:not(:disabled){--rf-fl:var(--rf-cyan);background-color:#0E2C29;box-shadow:none;color:var(--rf-text-hi);}
#screen-market .mk-tool.sell:hover:not(:disabled){--rf-fl:var(--rf-amber);background-color:color-mix(in srgb, var(--rf-amber) 18%, #08141F);box-shadow:none;color:var(--rf-text-hi);}
#screen-market .mk-tool:disabled{opacity:1;color:var(--rf-dim);}

/* écran étroit (1366 à 1600) */
@media (max-width:1600px){
  #screen-market .mk-plan{grid-template-columns:repeat(3, minmax(0,1fr));}
  #screen-market .mk-ctn-sum{grid-template-columns:repeat(3, minmax(0,1fr));}
  #screen-market .mk-ctn-go{grid-column:1 / -1;}
  #screen-market .mk-table .mk-acts{flex-direction:row;}
}
@media (max-width:1500px){
  #screen-market .qx-screen-tabs{margin-left:12px;}
  #screen-market .qx-screen-tabs .pill-tab{padding-left:14px;padding-right:18px;}
  #screen-market .pn-ic{width:17px;height:17px;}
  #screen-market .pn-tab{gap:6px;padding-left:9px;padding-right:calc(var(--tab-br) + 6px);}
  #screen-market .pn-title{font-size:.7rem;letter-spacing:.02em;}
  #screen-market .mk-table{font-size:.86rem;}
  #screen-market .mk-table th,#screen-market .mk-table td{padding-left:7px;padding-right:7px;}
  #screen-market .mk-acts .btn.sm{min-width:0;}
  #screen-market .mk-ctc-art{width:180px;}
  #screen-market .mk-ctc-figs > div{padding:7px 10px;}
  #screen-market .mk-ctc-figs > div > span{letter-spacing:.04em;}
  #screen-market .mk-ctn-art{width:170px;}
  #screen-market .mk-bonus{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:1fr auto;column-gap:12px;row-gap:6px;}
  #screen-market .mk-bonus-art{grid-row:1 / 3;width:64px;}
  #screen-market .mk-bonus-pick{justify-self:start;align-self:end;}
  #screen-market .mk-bonus-price small{display:none;}
  #screen-market .mk-qc-val{min-width:60px;}
  #screen-market .mk-qc-val b{font-size:1.14rem;}
}
/* écran de 1080 de haut et moins : la transaction tient sans défiler */
@media (max-height:1100px){
  #screen-market .mk-tx-art{aspect-ratio:4 / 1;}
  #screen-market .mk-tx-res{margin:10px 0 8px;}
}
/* écran peu haut (1366 x 768) */
@media (max-height:820px){
  #screen-market .mk-tx-art{aspect-ratio:5 / 1;}
  #screen-market .mk-tx-after > span{display:none;}
  #screen-market #mk-tx .mk-field-lbl,#screen-market #mk-tx .mk-field > span:first-child{margin-bottom:2px;}
  #screen-market .mk-tx-res small{font-size:.78rem;}
  #screen-market .mk-tx-res .mk-res-img.lg{width:40px;height:40px;}
  #screen-market .mk-tx-res{margin:8px 0 6px;}
  #screen-market .mk-tx-total{margin-top:6px;padding:7px 12px;}
  #screen-market .mk-ctn-art{width:150px;}
  #screen-market .mk-ctc-art{width:170px;}
  #screen-market .mk-bonus-art{width:54px;}
  #screen-market .mk-empty-art{width:min(100%, 300px);}
}

/* ============================================================
   23. ÉCRAN CARTE (v0.91.13)
   Demande de l'utilisateur (05/11/2026) : ergonomie, « au survol avoir
   les options », points lisibles sur le décor. Les repères eux-mêmes
   sont dans css/08-map.css (une pastille sombre cerclée, l'étiquette
   sous elle) ; ici, l'habillage de la refonte : la colonne de droite en
   blocs (mission en ambre, sélection en vert d'eau, escadre en violet,
   liste en bleu), la carte au survol comme un bloc, l'en-tête de
   l'écran (titre, fil d'Ariane en étiquettes), la légende en filtres,
   les outils et le zoom en cadres. Illustrations attendues (AG.IMG) :
   un système par type, un terrain, un signal, rien de sélectionné, le
   bandeau de l'escadre.
   ============================================================ */
#map-panel-mission{--pn-c:var(--rf-amber) !important;}
#map-panel-sel{--pn-c:var(--rf-cyan) !important;}
#map-panel-squad{--pn-c:var(--rf-violet) !important;}
#map-syslist-panel{--pn-c:var(--rf-blue) !important;}
#screen-map .qx-card .panel-body{padding:10px 12px 12px;}
/* l'onglet garde son titre entier ; c'est l'indication de droite qui
   cède la place (elle écrasait le titre de la liste, constaté à la capture) */
#screen-map .panel-head .pn-tab{min-width:0;flex:none;}
#screen-map .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-map .panel-head .eyebrow{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;text-align:right;white-space:nowrap;color:color-mix(in srgb, var(--pn-c) 70%, var(--rf-text-hi));}
#screen-map .panel[hidden]{display:none;}

/* la scène remonte sous la barre du haut, comme sur les autres écrans
   refaits (retour de l'utilisateur du 06/11/2026 : « n'oublie pas le
   header comme sur les autres vues »). Ici le décor bouge avec la
   caméra : c'est donc tout l'écran qui remonte, et ce qui est posé
   dessus redescend de --map-top (titre, légende, puces de la planète,
   vue planète, colonne de droite ; la fiche au survol se borne sous la
   barre, js/10d-map-hover.js). Un voile garde la barre lisible. */
@media (min-width:1101px){
  #viewport:has(#screen-map.active){overflow:visible;}
  #screen-map.screen{overflow:visible;--map-top:calc(var(--hud-h) + var(--ribbon-h));}
  #screen-map .map-wrap{margin-top:calc(-1 * var(--map-top));height:calc(100% + var(--map-top));}
  #screen-map .map-side{padding-top:calc(var(--map-top) + 14px*var(--scale));}
  #screen-map .map-stage::after{
    content:'';position:absolute;left:0;right:0;top:0;z-index:1;pointer-events:none;
    height:calc(var(--hud-h) * 2.4);
    background:linear-gradient(180deg, rgba(4,7,13,.62), rgba(4,7,13,0));
  }
}

/* colonne de droite : un voile sombre la sépare de la carte */
#screen-map .map-side{background:linear-gradient(90deg, rgba(2,6,11,.62), rgba(2,6,11,.82));border-left:1px solid var(--rf-line-soft);}
#screen-map .map-side::-webkit-scrollbar-thumb{background:var(--rf-edge);border-radius:0;}
#screen-map .map-side::-webkit-scrollbar-thumb:hover{background:var(--rf-cyan);}
#screen-map .map-side{scrollbar-color:var(--rf-edge) transparent;}

/* ---------- en-tête : titre de l'écran et fil d'Ariane ---------- */
#screen-map .map-title{
  margin:0;font-family:var(--font-display);font-weight:700;font-size:1.15rem;letter-spacing:.14em;
  color:var(--ink-1);text-transform:uppercase;text-shadow:0 2px 12px rgba(4,10,18,.9);white-space:nowrap;
}
#screen-map .crumb-link,#screen-map .crumb-cur{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:5px 11px;background-color:rgba(6,14,22,.92);
  font-family:var(--font-head);font-size:.9rem;font-weight:700;letter-spacing:.03em;white-space:nowrap;
}
#screen-map .crumb-link{color:var(--rf-cyan);cursor:pointer;}
#screen-map .crumb-link:hover{--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}
#screen-map .crumb-cur{--rf-fl:color-mix(in srgb, var(--rf-cyan) 55%, var(--rf-edge));color:var(--rf-text-hi);}
#screen-map .crumb-sep{font-family:var(--font-head);font-size:1rem;color:var(--rf-dim);}
#screen-map .crumb-hint{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);text-shadow:0 1px 4px rgba(2,6,11,1);}
/* chiffres de la vue planète, en étiquettes */
#screen-map .pvh-num,#screen-map .pvh-own{
  --rf-cut:5px;--rf-fl:var(--rf-edge);padding:3px 10px;background-color:rgba(6,14,22,.9);
  font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);
}
#screen-map .pvh-own{color:var(--rf-cyan);}

/* ---------- légende : des filtres ---------- */
#screen-map .leg-item{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:6px 11px 6px 8px;background-color:rgba(6,14,22,.92);transition:none;
  font-family:var(--font-head);font-size:.86rem;font-weight:600;color:var(--rf-text);
}
#screen-map .leg-item:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 55%, var(--rf-edge));color:var(--rf-text-hi);}
#screen-map .leg-item.off{color:var(--rf-dim);background-color:rgba(6,14,22,.72);}
#screen-map .leg-item.off .leg-lbl{text-decoration:line-through;text-decoration-color:color-mix(in srgb, var(--rf-dim) 70%, transparent);}
#screen-map .leg-item.off .leg-mark{opacity:.4;}

/* ---------- outils et zoom ---------- */
#screen-map .map-tool{
  --rf-cut:6px;--rf-fl:var(--rf-edge);padding:8px 14px;background-color:rgba(6,14,22,.92);transition:none;
  font-family:var(--font-head);font-size:.84rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--rf-cyan);
}
#screen-map .map-tool:hover:not([disabled]){--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}
#screen-map .map-tool[disabled]{color:var(--rf-dim);}
#screen-map .map-zoom{--rf-cut:6px;--rf-fl:var(--rf-edge);padding:3px;background-color:rgba(6,14,22,.92);}
#screen-map .mz-btn{width:28px;height:28px;padding:0;border:0;border-radius:0;background:transparent;color:var(--rf-cyan);font-family:var(--font-head);font-size:1.1rem;font-weight:700;transition:none;}
#screen-map .mz-btn:hover:not([disabled]){background:#0E2C29;color:var(--rf-text-hi);}
#screen-map .mz-btn[disabled]{color:var(--rf-dim);}
#screen-map .mz-pct{min-width:48px;text-align:center;font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);}

/* ---------- carte d'un point au survol ---------- */
#screen-map .map-hover{
  --rf-cut:10px;padding:12px 14px 10px;
  background:linear-gradient(180deg, color-mix(in srgb, var(--rf-cyan) 12%, transparent), transparent 120px), rgba(2,7,13,.96);
  clip-path:var(--rf-oct);
}
#screen-map .map-hover::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:color-mix(in srgb, var(--rf-cyan) 50%, var(--rf-line));clip-path:var(--rf-ring);
}
#screen-map .mh-head{display:flex;align-items:center;gap:10px;padding-bottom:9px;border-bottom:1px solid var(--rf-line-soft);}
#screen-map .mh-head .leg-mark{width:20px;height:20px;}
#screen-map .mh-id{flex:1;min-width:0;}
#screen-map .mh-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-head);font-size:1.08rem;font-weight:700;color:var(--rf-text-hi);}
#screen-map .mh-coord{font-family:var(--font-head);font-size:.84rem;font-weight:600;letter-spacing:.04em;color:var(--rf-dim);}
#screen-map .mh-state{
  flex:none;padding:2px 8px;font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--nc);background:color-mix(in srgb, var(--nc) 16%, rgba(6,13,22,.92));
}
#screen-map .mh-facts{margin-top:4px;}
#screen-map .mh-fact{
  display:flex;align-items:baseline;gap:12px;min-height:27px;padding:3px 0;border-bottom:1px solid var(--rf-line-soft);
  font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);
}
#screen-map .mh-fact:last-child{border-bottom:0;}
#screen-map .mh-fact b{margin-left:auto;text-align:right;font-weight:700;color:var(--rf-text-hi);}
#screen-map .mh-note{margin:7px 0 0;font-family:var(--font-head);font-size:.86rem;line-height:1.4;color:var(--rf-label);}
#screen-map .mh-actions{margin-top:10px;}
#screen-map .mh-foot{margin-top:9px;padding-top:7px;border-top:1px solid var(--rf-line-soft);font-family:var(--font-head);font-size:.8rem;color:var(--rf-dim);}

/* niveaux de danger et pronostic (survol, détail, liste) */
#screen-map .mh-fact b.d-low,#screen-map .v.d-low{color:var(--rf-green);}
#screen-map .mh-fact b.d-moderate,#screen-map .v.d-moderate{color:var(--rf-amber);}
#screen-map .mh-fact b.d-high,#screen-map .mh-fact b.d-extreme,#screen-map .v.d-high,#screen-map .v.d-extreme{color:var(--rf-rose);}
#screen-map .mh-fact b.good{color:var(--rf-green);}
#screen-map .mh-fact b.bad{color:var(--rf-rose);}

/* ---------- boutons d'action : coût et durée sous le libellé ---------- */
#screen-map .md-actions{gap:7px;margin-top:12px;}
#screen-map .md-actions .btn.sm{min-height:36px;padding:7px 12px;font-size:.84rem;}
#screen-map .md-actions .act-meta{font-family:var(--font-head);font-size:.76rem;font-weight:600;letter-spacing:.02em;text-transform:none;color:var(--rf-label);}
#screen-map .md-actions .btn.primary .act-meta{color:color-mix(in srgb, var(--rf-on-fill) 72%, transparent);}
#screen-map .md-actions .btn.amber .act-meta{color:rgba(26,16,3,.72);}
#screen-map .md-actions .act-meta.act-night{color:var(--rf-amber);}
#screen-map .btn.amber.sm{
  --rf-fl:transparent;--rf-relief:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 42%, rgba(120,60,0,.18));
  background-color:var(--rf-hero);color:var(--rf-hero-ink);
}
#screen-map .btn.amber.sm:hover:not(:disabled){--rf-fl:transparent;background-color:var(--rf-hero-hi);color:var(--rf-hero-ink);}
#screen-map .btn.sm:disabled{opacity:1;color:var(--rf-dim);}

/* ---------- bloc Sélection ---------- */
#screen-map .map-sel-art{--rf-cut:9px;position:relative;margin:0 0 10px;aspect-ratio:16 / 9;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-map .map-sel-art img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-map .map-sel-art.is-planet{background:radial-gradient(circle at 50% 55%, #0E1E2E, #05090F 70%);}
#screen-map .map-sel-art.is-planet img{object-fit:contain;padding:5%;box-sizing:border-box;}
#screen-map .map-detail{padding:0;border:0;border-radius:0;background:none;animation:none;}
#screen-map .map-detail.empty{padding:2px 2px 4px;font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-map .md-head{gap:10px;margin-bottom:6px;}
#screen-map .md-dot{width:9px;height:9px;margin-top:8px;border-radius:0;transform:rotate(45deg);box-shadow:none;}
#screen-map .md-title{font-family:var(--font-head);font-size:1.12rem;font-weight:700;color:var(--rf-text-hi);}
#screen-map .md-tag{font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);}
#screen-map .md-desc{margin:0 0 8px;font-family:var(--font-head);font-size:.9rem;line-height:1.4;color:var(--rf-text);}
#screen-map .mini-row{
  display:flex;align-items:center;gap:10px;min-height:30px;padding:2px 0;border-bottom:1px solid var(--rf-line-soft);
  font-family:var(--font-head);
}
#screen-map .mini-row .k{flex:1;min-width:0;font-size:.92rem;font-weight:500;color:var(--rf-label);text-transform:none;letter-spacing:.01em;}
#screen-map .mini-row .v{margin-left:auto;font-size:.96rem;font-weight:700;color:var(--rf-text-hi);white-space:nowrap;}
#screen-map .map-detail .v.mono{font-family:var(--font-head);font-size:.96rem;}
#screen-map .md-note{
  --rf-cut:6px;--rf-fl:var(--rf-edge);margin:10px 0 0;padding:8px 11px;background-color:#08141F;
  font-family:var(--font-head);font-size:.86rem;line-height:1.4;color:var(--rf-label);
}
#screen-map .md-raid{border-top-color:var(--rf-line-soft);}
#screen-map .md-raid-head{font-family:var(--font-head);font-size:.94rem;font-weight:700;color:var(--rf-text-hi);}
#screen-map .md-raid-head span{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}

/* ---------- bloc Mission en cours ---------- */
#screen-map .map-mission{padding:0;border:0;border-radius:0;background:none;}
#screen-map .map-mission .mm-head{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-map .map-mission .mm-head span{font-family:var(--font-head);font-size:.84rem;font-weight:600;color:var(--rf-label);}
#screen-map .map-mission .mm-target{font-family:var(--font-head);font-size:.88rem;font-weight:600;color:var(--rf-cyan);}
#screen-map .map-mission .bar{height:6px;border-radius:0;background:rgba(4,10,18,.9);box-shadow:inset 0 0 0 1px var(--rf-line-soft);}
#screen-map .map-mission .bar i{background:var(--rf-cyan);}
#screen-map .map-mission.hostile .bar i{background:var(--rf-amber);}
#screen-map .map-mission .mm-time{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-map .map-mission .mm-night{font-family:var(--font-head);font-size:.84rem;color:var(--rf-amber);}

/* ---------- bloc Escadre ---------- */
#screen-map .map-squad{padding:0;border:0;border-radius:0;background:none;}
#screen-map .map-squad-art{--rf-cut:8px;margin:0 0 8px;aspect-ratio:3 / 1;overflow:hidden;clip-path:var(--rf-in);background:#08121D;}
#screen-map .map-squad-art img{display:block;width:100%;height:100%;object-fit:cover;}
/* la liste de l'escadre et celle des systèmes défilent chacune chez elle :
   une flotte de dix vaisseaux repoussait la liste des systèmes hors
   de l'écran, et la colonne entière défilait d'un bloc */
#screen-map .map-squad .sq-list{max-height:calc(62px * 3.5);overflow-y:auto;gap:6px;padding-right:4px;}
#screen-map #map-sys-list{position:relative;max-height:min(52vh, 560px);overflow-y:auto;padding-right:4px;}
#screen-map .map-squad .sq-list{scrollbar-width:thin;scrollbar-color:var(--rf-edge) transparent;}
#screen-map #map-sys-list{scrollbar-width:thin;scrollbar-color:var(--rf-edge) transparent;}
#screen-map .sq-row{--rf-cut:6px;--rf-fl:var(--rf-edge);padding:7px 9px;background-color:#08141F;}
#screen-map .sq-row:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 55%, var(--rf-edge));background-color:#0B1B26;}
#screen-map .sq-row.on{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-map .sq-row.locked:hover{--rf-fl:var(--rf-edge);background-color:#08141F;}
#screen-map .sq-nm{font-family:var(--font-head);font-size:.94rem;font-weight:700;color:var(--rf-text-hi);}
#screen-map .sq-sub{font-family:var(--font-head);font-size:.8rem;color:var(--rf-label);}
#screen-map .sq-sub .sq-dmg{color:var(--rf-amber);}
#screen-map .sq-repair{border-radius:0;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.04em;}
#screen-map .map-squad .sq-note{font-family:var(--font-head);font-size:.84rem;line-height:1.4;color:var(--rf-dim);}

/* ---------- liste (systèmes, planètes, terrains) ---------- */
#screen-map .map-search{position:relative;margin-bottom:8px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;}
#screen-map .map-search:focus-within{box-shadow:none;}
#screen-map .map-search .ms-ic{position:absolute;z-index:1;left:10px;top:50%;transform:translateY(-50%);color:var(--rf-dim);}
#screen-map .map-search input{
  --rf-cut:6px;--rf-fl:var(--rf-edge);width:100%;padding:8px 30px 8px 32px;background-color:#08141F;
  font-family:var(--font-head);font-size:.92rem;font-weight:600;color:var(--rf-text-hi);
}
#screen-map .map-search input:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 50%, var(--rf-edge));}
#screen-map .map-search input:focus{--rf-fl:var(--rf-cyan);outline:none;}
#screen-map .map-search input::placeholder{color:var(--rf-dim);}
#screen-map .map-search .ms-clear{position:absolute;z-index:1;right:8px;top:50%;transform:translateY(-50%);}
#screen-map .sys-card{--rf-cut:8px;--ring:color-mix(in srgb, var(--sc) 30%, var(--rf-edge));position:relative;padding:8px 10px 9px;background:#0A1622;}
#screen-map .sys-card:hover{background:#0E1F2B;}
#screen-map .sys-card.selected{--ring:var(--sc);background:color-mix(in srgb, var(--sc) 10%, #0A1622);}
#screen-map .sys-card .sys-dot{width:8px;height:8px;margin-top:7px;border-radius:0;transform:rotate(45deg);}
#screen-map .sys-card .sys-nm{font-family:var(--font-head);font-size:.96rem;font-weight:700;color:var(--rf-text-hi);}
#screen-map .sys-card .sys-coord{font-family:var(--font-head);font-size:.82rem;color:var(--rf-dim);}
#screen-map .sys-card .sys-owner{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
#screen-map .sys-chip{
  padding:1px 7px;border:0;border-radius:0;font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.04em;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 12%, rgba(6,13,22,.9));
}
#screen-map .sys-chip.st{opacity:1;color:var(--sc);background:color-mix(in srgb, var(--sc) 14%, rgba(6,13,22,.9));}
#screen-map .sys-chip.d-low{color:var(--rf-green);background:color-mix(in srgb, var(--rf-green) 14%, rgba(6,13,22,.9));}
#screen-map .sys-chip.d-moderate{color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 14%, rgba(6,13,22,.9));}
#screen-map .sys-chip.d-high,#screen-map .sys-chip.d-extreme{color:var(--rf-rose);background:color-mix(in srgb, var(--rf-rose) 14%, rgba(6,13,22,.9));}
#screen-map .map-empty{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-map .map-report{border:0;border-radius:0;background:#08141F;box-shadow:inset 2px 0 0 var(--rf-cyan);}
#screen-map .map-report.contact.hard{box-shadow:inset 2px 0 0 var(--rf-amber);}
#screen-map .map-report .mr-dot{border-radius:0;transform:rotate(45deg);}
#screen-map .map-report .mr-txt{font-family:var(--font-head);font-size:.88rem;color:var(--rf-text);}
#screen-map .map-report .mr-when{font-family:var(--font-head);font-size:.8rem;color:var(--rf-dim);}
#screen-map .mr-detail li{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}

/* ============================================================
   24. ÉCRAN PROFIL ET RÉGLAGES (v0.91.14)
   Même cadre que les autres écrans refaits (fond 11 sous la barre du
   haut). Une bannière d'identité, un bloc de toute la largeur : l'image
   de la bannière de gouverneur à droite, voilée vers la gauche où se
   lisent l'avatar, le pseudo et l'alliance ; les chiffres du parcours en
   cadres dans le fond. Puis l'onglet choisi, qui défile seul sous la
   bannière. Réglages : la liste des catégories à gauche, une catégorie à
   droite, son illustration en tête, une ligne par réglage et son
   contrôle à droite. Contrôles maison (AG.controls) reformés : coins
   coupés, poignée en losange, interrupteur carré. Couleurs d'onglet :
   présentation en vert d'eau, visibilité et compte en bleu
   (information), avatar en violet, vitrine en or (prestige), mode
   vacances en violet (le repos), administration en rose.
   Illustrations attendues (AG.IMG) : la bannière, l'invité, le compte,
   le mode vacances, une par catégorie de réglages.
   ============================================================ */
#pf-vis,#set-panel-account{--pn-c:var(--rf-blue) !important;}
#pf-look,#set-panel-gameplay{--pn-c:var(--rf-violet) !important;}
#pf-cosmetics{--pn-c:var(--rf-gold) !important;}
#profile-admin-panel{--pn-c:var(--rf-rose) !important;}
#screen-profile .qx-card .panel-body{padding:12px 16px 14px;}
#screen-profile .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-profile .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-profile .panel-head .eyebrow{flex:none;white-space:nowrap;color:color-mix(in srgb, var(--pn-c) 70%, var(--rf-text-hi));}
#screen-profile .btn[hidden]{display:none;}

/* ---------- en-tête : titre, onglets à pictogramme, citation ---------- */
#screen-profile .qx-head-txt h1{text-transform:uppercase;white-space:nowrap;}
#screen-profile .qx-screen-tabs{position:relative;margin:0 0 0 18px;flex:none;}
#screen-profile .qx-screen-tabs .pill-tab{display:inline-flex;align-items:center;gap:8px;font-size:inherit;text-transform:uppercase;}
#screen-profile .pf-tab-ic{display:inline-flex;width:17px;height:17px;flex:none;}
#screen-profile .pf-tab-ic svg{width:100%;height:100%;}
#screen-profile .qx-quote{border-right-color:var(--rf-cyan);}
#screen-profile .qx-quote blockquote{font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-profile .qx-quote figcaption{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}

/* ---------- bannière d'identité ---------- */
#screen-profile .pf-banner{
  --rf-cut:14px;--pn-c:var(--rf-cyan);
  position:relative;z-index:2;flex:none;display:grid;
  grid-template-columns:auto minmax(240px,1fr) auto auto;grid-template-areas:"av id stats acts";
  align-items:center;column-gap:calc(24px*var(--scale));row-gap:12px;
  min-height:calc(150px*var(--scale));padding:calc(18px*var(--scale)) calc(26px*var(--scale));
  background:var(--rf-bg);clip-path:var(--rf-oct);overflow:hidden;
}
#screen-profile .pf-banner::after{
  content:'';position:absolute;inset:0;z-index:3;pointer-events:none;
  background:color-mix(in srgb, var(--pn-c) 52%, var(--rf-line));clip-path:var(--rf-ring);
}
#screen-profile .pf-banner-art{position:absolute;inset:0;z-index:0;}
#screen-profile .pf-banner-art img{position:absolute;top:0;right:0;width:68%;height:100%;object-fit:cover;object-position:center;}
/* voile : opaque sous le texte, l'image se lit à droite */
#screen-profile .pf-banner-art::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(90deg, rgba(0,4,10,.97) 0%, rgba(0,4,10,.93) 32%, rgba(0,4,10,.55) 58%, rgba(0,4,10,.35) 78%, rgba(0,4,10,.7) 100%);
}
#screen-profile .pf-banner > :not(.pf-banner-art){position:relative;z-index:1;}
#screen-profile .pf-banner-avatar{grid-area:av;display:flex;flex-direction:column;align-items:center;gap:8px;}
#screen-profile .pf-emblem{
  --rf-cut:12px;width:calc(108px*var(--scale));height:calc(108px*var(--scale));
  border:0;border-radius:0;clip-path:var(--rf-in);background:#0A1824;
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--rf-cyan) 55%, transparent);
}
#screen-profile .pf-emblem .av{width:100%;height:100%;border:0;border-radius:0;}
#screen-profile .pf-emblem .av img{width:86%;height:86%;}
#screen-profile .pf-avatar-edit{
  --rf-cut:5px;display:inline-flex;align-items:center;gap:6px;padding:4px 10px;
  background-color:#08141F;color:var(--rf-cyan);cursor:pointer;
  font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
}
#screen-profile .pf-avatar-edit[hidden]{display:none;}
#screen-profile .pf-avatar-edit i{display:inline-flex;width:13px;height:13px;}
#screen-profile .pf-avatar-edit svg{width:100%;height:100%;}
#screen-profile .pf-avatar-edit:hover{--rf-fl:var(--rf-cyan);color:var(--rf-text-hi);}
#screen-profile .pf-banner-id{grid-area:id;min-width:0;}
#screen-profile .pf-pseudo{
  margin:0;font-family:var(--font-display);font-size:2rem;font-weight:700;letter-spacing:.06em;line-height:1.1;
  color:var(--rf-text-hi);text-shadow:0 2px 10px rgba(0,0,0,.85);overflow-wrap:anywhere;
}
#screen-profile .pf-banner-line{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;margin-top:6px;}
#screen-profile .pf-ally{
  --rf-cut:5px;padding:3px 10px;background-color:#08141F;color:var(--rf-cyan);cursor:pointer;
  font-family:var(--font-head);font-size:.92rem;font-weight:700;letter-spacing:.05em;
}
#screen-profile .pf-ally[hidden]{display:none;}
#screen-profile .pf-ally:hover{--rf-fl:var(--rf-cyan);color:var(--rf-text-hi);}
#screen-profile .pf-since{margin:0;font-family:var(--font-head);font-size:.98rem;color:var(--rf-label);}
#screen-profile .pf-tags{margin-top:10px;}
#screen-profile .pf-tags .tag{
  padding:3px 9px;border:0;border-radius:0;font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 13%, rgba(6,13,22,.9));
  clip-path:polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
#screen-profile .pf-tags .tag.cyan{color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 15%, rgba(6,13,22,.9));}
#screen-profile .pf-tags .tag.lime{color:var(--rf-green);background:color-mix(in srgb, var(--rf-green) 15%, rgba(6,13,22,.9));}
#screen-profile .pf-tags .tag.amber{color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 15%, rgba(6,13,22,.9));}
/* chiffres du parcours : un cadre chacun, la valeur en grand */
#screen-profile .pf-banner .pf-stats{grid-area:stats;display:flex;flex-wrap:wrap;gap:8px;margin:0;}
#screen-profile .pf-banner .pf-stats:empty{display:none;}
#screen-profile .pf-stat{
  --rf-cut:7px;flex-direction:column;align-items:flex-start;gap:3px;position:relative;
  min-width:calc(104px*var(--scale));padding:9px 14px 9px 12px;border-radius:0;background-color:rgba(4,10,18,.82);
}
#screen-profile .pf-stat:hover,#screen-profile .pf-stat:focus-visible{--rf-fl:var(--rf-cyan);}
#screen-profile .pf-stat-ic{position:absolute;top:9px;right:10px;width:16px;height:16px;color:var(--rf-dim);}
#screen-profile .pf-stat-txt{display:flex;flex-direction:column-reverse;gap:2px;}
#screen-profile .pf-stat-txt b{font-family:var(--font-head);font-size:1.45rem;font-weight:700;line-height:1;color:var(--rf-text-hi);}
#screen-profile .pf-stat-txt small{padding-right:20px;font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--rf-label);}
#screen-profile .pf-banner-acts{grid-area:acts;display:flex;flex-direction:column;align-items:stretch;gap:8px;}

/* ---------- corps : l'onglet choisi, qui défile seul ---------- */
#screen-profile .pf-body{position:relative;z-index:1;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;}
/* un volet masqué l'est vraiment : les règles display de cette section
   l'emportaient sur l'attribut hidden (comptes et invité mêlés) */
#screen-profile :is(.pf-layout, .acc-layout, .set-layout, .pf-guest, .pf-state)[hidden]{display:none !important;}
#screen-profile .pf-state{
  max-width:720px;margin:24px auto;border:0;border-radius:0;align-items:center;text-align:center;
  font-family:var(--font-head);font-size:1rem;color:var(--rf-label);background:var(--rf-bg);
}

/* ---------- onglet Profil ---------- */
#screen-profile .pf-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:var(--qx-gap);align-items:start;}
#screen-profile .pf-layout > .pf-cosmetics{grid-column:1 / -1;}
#screen-profile .pf-col{display:flex;flex-direction:column;gap:var(--qx-gap);min-width:0;}
#screen-profile .pf-layout .panel:focus-within{z-index:5;}
#screen-profile :is(.pf-bio-head, .pf-name-desc, .pf-bio-foot, .set-note, .pf-guest-txt){font-family:var(--font-head);}
#screen-profile .pf-bio-head{font-size:1.02rem;font-weight:700;color:var(--rf-text-hi);}
#screen-profile .pf-name-desc{font-size:.9rem;line-height:1.45;color:var(--rf-label);}
#screen-profile .pf-name{border-bottom-color:var(--rf-line-soft);}
#screen-profile .pf-bio{min-height:calc(132px*var(--scale));}
#screen-profile .pf-bio-foot{font-size:.86rem;}
#screen-profile .pf-bio-msg{color:var(--rf-label);}
#screen-profile .pf-bio-msg.is-err{color:var(--rf-amber);}
#screen-profile .pf-bio-msg.is-ok{color:var(--rf-cyan);}
#screen-profile .pf-bio-count{font-family:var(--font-head);font-weight:700;color:var(--rf-dim);}
#screen-profile .pf-bio-actions{border-bottom:0;padding-bottom:0;}
#screen-profile .set-note{font-size:.86rem;line-height:1.45;color:var(--rf-dim);}
/* avatar : la grille du catalogue, grandes vignettes */
#screen-profile .pf-look-fields .set-row{flex-direction:column;align-items:stretch;gap:12px;border-bottom:0;padding-top:4px;}
#screen-profile .pf-look-fields .set-row-ctl{flex:auto;}
#screen-profile .av-picker{gap:8px;}
#screen-profile .av-picker .ag-pick{--rf-cut:7px;width:calc(66px*var(--scale));height:calc(66px*var(--scale));border-radius:0;background-color:#08141F;}
#screen-profile .av-picker .ag-pick .av{width:100%;height:100%;border:0;border-radius:0;background:none;}
#screen-profile .av-picker .ag-pick:hover{--rf-fl:var(--rf-cyan);}
#screen-profile .av-picker .ag-pick.on{--rf-fl:var(--rf-violet);background-color:color-mix(in srgb, var(--rf-violet) 16%, #08141F);}
/* vitrine : chaque emplacement posé dans le bloc */
#screen-profile .pf-slots{grid-template-columns:repeat(auto-fit,minmax(calc(250px*var(--scale)),1fr));gap:8px;}
#screen-profile .pf-slot{--rf-cut:7px;--ring:var(--rf-edge);position:relative;border:0;border-radius:0;clip-path:var(--rf-in);background:#0A1622;color:var(--rf-label);}
#screen-profile .pf-slot::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);}
#screen-profile .pf-slot:hover,#screen-profile .pf-slot:focus-visible{--ring:var(--rf-gold);}
#screen-profile .pf-slot.pf-theme:hover,#screen-profile .pf-slot.pf-theme:focus-visible{--ring:var(--rf-cyan);}
#screen-profile .pf-slot-txt b{font-family:var(--font-head);font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-profile .pf-slot-txt small{font-family:var(--font-head);font-size:.84rem;}
#screen-profile .pf-slot-price{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
/* invité : ce qu'un compte apporte, l'illustration à gauche */
#screen-profile .pf-guest{max-width:1180px;margin:0 auto;}
#screen-profile .pf-guest .panel-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:center;padding:18px 20px 20px;}
#screen-profile .pf-guest-art{--rf-cut:12px;--ring:var(--rf-edge);position:relative;aspect-ratio:16/9;overflow:hidden;clip-path:var(--rf-in);background:#0A1622;}
#screen-profile .pf-guest-art::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);}
#screen-profile .pf-guest-art img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-profile .pf-guest-txt p{margin:0 0 12px;font-size:1.04rem;line-height:1.5;color:var(--rf-text);}
#screen-profile .pf-guest-points{margin:0 0 16px;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px;}
#screen-profile .pf-guest-points li{position:relative;padding-left:18px;font-size:.96rem;line-height:1.45;color:var(--rf-label);}
#screen-profile .pf-guest-points li::before{content:'';position:absolute;left:2px;top:.5em;width:6px;height:6px;transform:rotate(45deg);background:var(--rf-cyan);}

/* ---------- onglet Réglages : une catégorie à la fois ---------- */
#screen-profile .set-layout{grid-template-columns:calc(310px*var(--scale)) minmax(0,1040px);justify-content:center;gap:var(--qx-gap);}
#screen-profile .set-cats{position:sticky;top:0;padding:0;}
#screen-profile .set-cats .panel-body{padding:10px;}
#screen-profile .set-cats-list{gap:6px;}
#screen-profile .set-cat{--rf-cut:7px;gap:12px;padding:11px 12px;border:0;border-radius:0;background-color:#08141F;color:var(--rf-text);}
#screen-profile .set-cat:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, var(--rf-edge));background-color:#0B1B26;}
#screen-profile .set-cat.active{--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-text-hi);}
#screen-profile .set-cat-ic{color:var(--rf-cyan);}
#screen-profile .set-cat-txt b{font-family:var(--font-head);font-size:1rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;}
#screen-profile .set-cat-txt small{font-family:var(--font-head);font-size:.86rem;color:var(--rf-label);}
#screen-profile .set-cat-n{margin-left:auto;flex:none;font-family:var(--font-head);font-size:.9rem;font-weight:700;color:var(--rf-dim);}
#screen-profile .set-cat.active .set-cat-n{color:var(--rf-cyan);}
#screen-profile .set-cats-note{margin:12px 4px 2px;font-family:var(--font-head);font-size:.86rem;line-height:1.45;color:var(--rf-dim);}
#screen-profile .set-panels{display:block;}
#screen-profile .set-panel.is-off{display:none;}
#screen-profile .set-cat-art{--rf-cut:12px;--ring:var(--rf-edge);position:relative;height:clamp(120px, 19vh, 210px);margin-bottom:4px;overflow:hidden;clip-path:var(--rf-in);background:#0A1622;}
#screen-profile .set-cat-art::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);}
#screen-profile .set-cat-art img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-profile .set-cat-lead{
  position:absolute;left:0;right:0;bottom:0;margin:0;padding:28px 18px 12px;
  background:linear-gradient(180deg, transparent, rgba(0,4,10,.9) 55%);
  font-family:var(--font-head);font-size:1rem;line-height:1.45;color:var(--rf-text-hi);
}
/* une ligne de réglage */
#screen-profile .set-row{gap:28px;padding:15px 2px;border-bottom-color:var(--rf-line-soft);}
#screen-profile .set-row-text .k{font-family:var(--font-head);font-size:1.04rem;font-weight:700;color:var(--rf-text-hi);}
#screen-profile .set-row-text .d{margin-top:4px;font-family:var(--font-head);font-size:.92rem;line-height:1.45;color:var(--rf-label);}
#screen-profile .set-val{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-profile .set-help{border-radius:0;border-color:var(--rf-edge);color:var(--rf-dim);font-family:var(--font-head);font-size:.74rem;}
#screen-profile .set-help:hover,#screen-profile .set-help:focus-visible{border-color:var(--rf-cyan);color:var(--rf-cyan);}
#screen-profile .set-row.is-locked .set-row-text .k{color:var(--rf-dim);}

/* ---------- contrôles maison, reformés ---------- */
#screen-profile .ag-toggle{--rf-cut:4px;width:46px;height:24px;background-color:#0A1622;}
#screen-profile .ag-toggle i{top:5px;left:5px;width:14px;height:14px;border-radius:0;background:var(--rf-dim);}
#screen-profile .ag-toggle:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, var(--rf-edge));}
#screen-profile .ag-toggle.on{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-profile .ag-toggle.on i{transform:translateX(22px);background:var(--rf-cyan);}
#screen-profile .ag-slider{width:calc(230px*var(--scale));height:28px;}
#screen-profile .set-row.is-wide .ag-slider{width:auto;}
#screen-profile .ag-slider-track{height:6px;margin-top:-3px;border-radius:0;background:rgba(4,10,18,.95);box-shadow:inset 0 0 0 1px var(--rf-edge);}
#screen-profile .ag-slider-fill{background:var(--rf-cyan);}
#screen-profile .ag-slider-thumb{width:14px;height:14px;margin:-7px 0 0 -7px;border:2px solid var(--rf-cyan);border-radius:0;background:#0A1622;transform:rotate(45deg);transition:none;}
#screen-profile .ag-slider:hover .ag-slider-thumb,#screen-profile .ag-slider.dragging .ag-slider-thumb{background:var(--rf-cyan);transform:rotate(45deg);}
#screen-profile .ag-slider:focus-visible{outline:1px solid var(--rf-cyan);outline-offset:3px;}
#screen-profile .ag-slider.is-locked .ag-slider-thumb{border-color:var(--rf-dim);background:#0A1622;}
#screen-profile .ag-select{min-width:calc(210px*var(--scale));}
#screen-profile .ag-select-btn{--rf-cut:5px;padding:8px 11px;background-color:#08141F;font-family:var(--font-head);font-size:.96rem;font-weight:600;color:var(--rf-text-hi);}
#screen-profile .ag-select-btn:hover,#screen-profile .ag-select.open .ag-select-btn{--rf-fl:var(--rf-cyan);}
#screen-profile .ag-select-list{--rf-cut:5px;padding:4px;background-color:#07111B;}
#screen-profile .ag-select-opt{border-radius:0;font-family:var(--font-head);font-size:.94rem;}
#screen-profile .ag-chips{gap:6px;}
#screen-profile .ag-chip{--rf-cut:5px;padding:6px 11px;border-radius:0;background-color:#08141F;font-family:var(--font-head);font-size:.82rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);}
#screen-profile .ag-chip:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, var(--rf-edge));color:var(--rf-text-hi);}
#screen-profile .ag-chip.on{--rf-fl:var(--rf-cyan);background-color:#0E2C29;color:var(--rf-cyan);}
/* champs : cadre dans le fond, liseré vert d'eau au focus */
#screen-profile .pref-input{--rf-cut:6px;padding:10px 12px;background-color:#060F18;font-family:var(--font-head);font-size:1rem;color:var(--rf-text-hi);}
#screen-profile .pref-input:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 50%, var(--rf-edge));}
#screen-profile .pref-input:focus{--rf-fl:var(--rf-cyan);}
#screen-profile .pref-input[aria-invalid="true"]{--rf-fl:var(--rf-amber);}

/* ---------- onglet Compte ---------- */
#screen-profile .acc-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:var(--qx-gap);align-items:start;max-width:1640px;margin:0 auto;}
#screen-profile .acc-side{display:flex;flex-direction:column;gap:var(--qx-gap);min-width:0;}
#screen-profile :is(.acc-art, .vac-art){--rf-cut:12px;--ring:var(--rf-edge);position:relative;height:clamp(110px, 17vh, 190px);margin-bottom:6px;overflow:hidden;clip-path:var(--rf-in);background:#0A1622;}
#screen-profile :is(.acc-art, .vac-art)::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);}
#screen-profile :is(.acc-art, .vac-art) img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-profile .pw-block{--rf-cut:8px;--ring:var(--rf-edge);position:relative;margin-top:14px;padding:14px 16px 12px;border:0;clip-path:var(--rf-in);background:rgba(8,20,31,.7);}
#screen-profile .pw-block::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);}
#screen-profile .pw-block .k{font-family:var(--font-head);font-size:1.04rem;font-weight:700;color:var(--rf-text-hi);}
#screen-profile .pw-block .d{margin-top:4px;font-family:var(--font-head);font-size:.9rem;line-height:1.45;color:var(--rf-label);}
#screen-profile .pw-form{gap:12px 14px;margin-top:12px;}
#screen-profile .pw-form label{gap:6px;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.07em;color:var(--rf-label);}
#screen-profile .pw-msg{font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-profile .pw-msg.pw-ok{color:var(--rf-cyan);}
#screen-profile .pw-msg.pw-err{color:var(--rf-rose);}
#screen-profile .pw-msg:empty{display:none;}
/* mode vacances */
#screen-profile #set-panel-gameplay .panel-head .tag{
  margin-left:auto;padding:3px 9px;border:0;border-radius:0;font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 13%, rgba(6,13,22,.9));
  clip-path:polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
#screen-profile #set-panel-gameplay .set-row.is-wide{flex-direction:row;align-items:center;}
#screen-profile #set-panel-gameplay .set-row.is-wide .set-row-ctl{flex:none;}
#screen-profile .vac-rules-box{--rf-cut:8px;--ring:var(--rf-edge);position:relative;margin-top:10px;padding:12px 16px;border:0;border-radius:0;clip-path:var(--rf-in);background:rgba(8,20,31,.7);}
#screen-profile .vac-rules-box::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);}
#screen-profile .vac-rules-title{font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-profile .vac-rules{gap:6px;font-family:var(--font-head);font-size:.92rem;color:var(--rf-text);}
#screen-profile .vac-rules li::marker{color:var(--rf-violet);}

/* ---------- barre du haut : l'icône de profil allumée sur l'écran ---------- */
#hud .hud-btn.active{--rf-fl:var(--rf-cyan);color:var(--rf-cyan);background-color:#0E2C29;}

/* ---------- largeurs ---------- */
/* sous 1600 px : les deux boutons passent sous le pseudo, les chiffres
   restent sur la ligne, libellés sur deux lignes */
@media (max-width: 1599px){
  #screen-profile .pf-banner{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"av id stats" "av acts stats";min-height:0;padding:14px 20px;row-gap:10px;}
  #screen-profile .pf-emblem{width:calc(88px*var(--scale));height:calc(88px*var(--scale));}
  #screen-profile .pf-pseudo{font-size:1.65rem;}
  #screen-profile .pf-tags{margin-top:6px;}
  #screen-profile .pf-banner-acts{flex-direction:row;flex-wrap:wrap;align-self:start;}
  #screen-profile .pf-banner .pf-stats{flex-wrap:nowrap;align-self:center;}
  #screen-profile .pf-stat{min-width:0;width:calc(100px*var(--scale));padding:8px 10px;}
  #screen-profile .pf-stat-ic{display:none;}
  #screen-profile .pf-stat-txt small{padding-right:0;white-space:normal;line-height:1.2;}
}
@media (max-width: 1200px){
  #screen-profile :is(.pf-layout, .acc-layout){grid-template-columns:minmax(0,1fr);}
  #screen-profile .pf-guest .panel-body{grid-template-columns:minmax(0,1fr);}
  #screen-profile .set-layout{grid-template-columns:calc(250px*var(--scale)) minmax(0,1fr);}
}
@media (max-width: 900px){
  #screen-profile .pf-banner{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"av id" "stats stats" "acts acts";}
  #screen-profile .pf-banner-acts{flex-direction:row;flex-wrap:wrap;}
  #screen-profile .set-layout{grid-template-columns:minmax(0,1fr);}
  #screen-profile .set-cats{position:static;}
}

/* ============================================================
   25. ÉCRAN ALLIANCE (v0.91.15)
   Même cadre que les autres écrans refaits (fond 9 sous la barre du
   haut). En tête, une bannière : celle de l'alliance (emblème, [TAG] et
   nom, devise, la place du joueur, les chiffres lus par le serveur),
   l'image par défaut à droite sous la bannière cosmétique que l'alliance
   porte ; sans alliance, la même bannière sans emblème et le bouton
   Fonder. Puis la vue choisie, qui défile seule. Sans alliance, deux
   portes dans l'en-tête : Rejoindre (les alliances qui recrutent et la
   recherche par tag à gauche, invitations, candidatures et l'essentiel à
   droite) et Fonder (le formulaire à gauche, l'aperçu à droite). Avec
   alliance, quatre onglets. Couleurs d'onglet : annonce et trésorerie en
   or et ambre (la parole, l'argent), demandes et rôles en bleu
   (information), identité et nom en violet, départ en rose.
   Illustrations attendues (AG.IMG) : la bannière, sans alliance,
   l'invité, l'aperçu de la fondation, les rôles, le recrutement, la
   trésorerie.
   ============================================================ */
#al-pin,#al-say{--pn-c:var(--rf-amber) !important;}
#screen-alliance :is(.al-invites-panel, .al-applies-panel, .al-know, .al-roles-panel, .al-requests-panel, .al-sent-panel){--pn-c:var(--rf-blue) !important;}
#al-edit,#al-ren,#screen-alliance .al-preview-panel{--pn-c:var(--rf-violet) !important;}
#screen-alliance :is(.al-cos-panel, .al-tr-panel){--pn-c:var(--rf-gold) !important;}
#screen-alliance .al-exit{--pn-c:var(--rf-rose) !important;}
#screen-alliance .qx-card .panel-body{padding:12px 16px 14px;}
#screen-alliance .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-alliance .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;}
#screen-alliance .panel-head .eyebrow{color:color-mix(in srgb, var(--pn-c) 70%, var(--rf-text-hi));}
#screen-alliance .btn[hidden]{display:none;}
/* un volet masqué l'est vraiment : les règles display de cette section
   l'emportent sinon sur l'attribut hidden */
#screen-alliance :is(.al-none, .al-home, .al-state, .al-join, .al-form, .al-tabpanel, .qx-screen-tabs, .al-badge, .al-edit, .al-edit-foot, .al-pin, .al-say, .al-ren, .al-art, .al-points, .al-state-title)[hidden]{display:none !important;}

/* ---------- en-tête : titre, onglets à pictogramme, citation ---------- */
#screen-alliance .qx-head-txt h1{text-transform:uppercase;white-space:nowrap;}
/* le sous-titre passe sur deux lignes plutôt que d'être coupé par les onglets */
#screen-alliance .qx-head-txt{max-width:430px;}
#screen-alliance .qx-head-txt p{white-space:normal;line-height:1.35;}
#screen-alliance .qx-screen-tabs{position:relative;margin:0 0 0 18px;flex:none;}
#screen-alliance .qx-screen-tabs .pill-tab{display:inline-flex;align-items:center;gap:8px;font-size:inherit;text-transform:uppercase;}
#screen-alliance .al-tab-ic{display:inline-flex;width:17px;height:17px;flex:none;}
#screen-alliance .al-tab-ic svg{width:100%;height:100%;}
#screen-alliance .qx-screen-tabs .al-badge{
  margin-left:2px;padding:1px 7px;border-radius:0;background:var(--rf-amber);color:#1a1205;
  font-family:var(--font-head);font-size:.78rem;font-weight:700;
  clip-path:polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}
#screen-alliance .qx-quote{border-right-color:var(--rf-cyan);}
#screen-alliance .qx-quote blockquote{font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-alliance .qx-quote figcaption{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}

/* ---------- vues : la bannière, puis le corps qui défile seul ---------- */
#screen-alliance .al-none,#screen-alliance .al-home{position:relative;z-index:1;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:stretch;gap:var(--qx-gap);}
#screen-alliance .al-body{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;}
#screen-alliance .al-col{gap:var(--qx-gap);}
#screen-alliance .al-body .panel:focus-within{z-index:5;}

/* ---------- bannière ---------- */
#screen-alliance .al-hero{
  --rf-cut:14px;--pn-c:var(--rf-cyan);
  position:relative;z-index:2;flex:none;display:grid;
  grid-template-columns:minmax(300px,1fr) auto auto auto;grid-template-areas:"main place stats acts";
  align-items:center;column-gap:calc(26px*var(--scale));row-gap:12px;
  min-height:calc(150px*var(--scale));padding:calc(18px*var(--scale)) calc(26px*var(--scale));
  background:var(--rf-bg);clip-path:var(--rf-oct);overflow:hidden;
}
#screen-alliance .al-hero::after{
  content:'';position:absolute;inset:0;z-index:3;pointer-events:none;
  background:color-mix(in srgb, var(--pn-c) 52%, var(--rf-line));clip-path:var(--rf-ring);
}
#screen-alliance .al-hero-art{position:absolute;inset:0;z-index:0;}
#screen-alliance .al-hero-art img{position:absolute;top:0;right:0;width:68%;height:100%;object-fit:cover;object-position:center;}
/* voile : opaque sous l'identité, l'image se lit à droite */
#screen-alliance .al-hero-art::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(90deg, rgba(0,4,10,.97) 0%, rgba(0,4,10,.92) 34%, rgba(0,4,10,.55) 60%, rgba(0,4,10,.4) 78%, rgba(0,4,10,.72) 100%);
}
/* la bannière cosmétique que l'alliance porte, posée sur l'image */
#screen-alliance .al-hero-cos{position:absolute;inset:0;z-index:0;pointer-events:none;}
#screen-alliance .al-hero-cos.al-banner{border:0;border-radius:0;}
#screen-alliance .al-hero > :not(.al-hero-art):not(.al-hero-cos){position:relative;z-index:1;}
#screen-alliance .al-hero-main{grid-area:main;display:flex;align-items:center;gap:calc(20px*var(--scale));min-width:0;}
#screen-alliance .al-hero-main .al-ident{gap:calc(20px*var(--scale));}
/* la bannière cosmétique se lit sur toute la bannière, pas derrière le seul nom */
#screen-alliance .al-hero .al-ident.al-banner{padding:0;border:0;background-image:none;}
#screen-alliance .al-hero .al-emblem.lg{width:calc(104px*var(--scale));height:calc(104px*var(--scale));border-radius:0;background-color:rgba(4,10,18,.75);}
#screen-alliance .al-hero .al-emblem-empty{border:1px dashed var(--rf-edge);color:var(--rf-dim);background-color:rgba(4,10,18,.6);}
#screen-alliance .al-hero .al-name{
  margin:0;font-family:var(--font-display);font-size:2rem;font-weight:700;letter-spacing:.06em;line-height:1.1;
  color:var(--rf-text-hi);text-shadow:0 2px 10px rgba(0,0,0,.85);
}
#screen-alliance .al-hero .al-tag{font-family:var(--font-head);font-size:.8em;font-weight:700;color:var(--rf-cyan);letter-spacing:.06em;}
#screen-alliance .al-hero .al-motto{margin:6px 0 0;font-family:var(--font-head);font-size:1.04rem;line-height:1.4;color:var(--rf-text);text-shadow:0 1px 4px rgba(0,0,0,.9);}
#screen-alliance .al-hero .al-motto.is-empty{color:var(--rf-dim);}
#screen-alliance .al-hero .al-since{margin-top:6px;font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
/* la place du joueur : rôle, numéro, arrivée */
#screen-alliance .al-hero-place{grid-area:place;display:flex;flex-direction:column;gap:7px;min-width:calc(220px*var(--scale));}
#screen-alliance .al-hero-place:empty{display:none;}
#screen-alliance .al-hero-place .al-place-row{padding:0;border:0;gap:16px;font-family:var(--font-head);font-size:.92rem;color:var(--rf-label);}
#screen-alliance .al-hero-place .al-place-row > span:last-child{color:var(--rf-text-hi);font-weight:700;}
/* chiffres de l'alliance : un cadre chacun, la valeur en grand */
#screen-alliance .al-hero-stats{grid-area:stats;display:flex;flex-wrap:nowrap;gap:8px;margin:0;}
#screen-alliance .al-hero-stats:empty{display:none;}
#screen-alliance .pf-stat{
  --rf-cut:7px;flex-direction:column;align-items:flex-start;gap:3px;position:relative;
  min-width:calc(104px*var(--scale));padding:9px 14px 9px 12px;border-radius:0;background-color:rgba(4,10,18,.82);
}
#screen-alliance .pf-stat:hover,#screen-alliance .pf-stat:focus-visible{--rf-fl:var(--rf-cyan);}
#screen-alliance .pf-stat-ic{position:absolute;top:9px;right:10px;width:16px;height:16px;color:var(--rf-dim);}
#screen-alliance .pf-stat-txt{display:flex;flex-direction:column-reverse;gap:2px;}
#screen-alliance .pf-stat-txt b{font-family:var(--font-head);font-size:1.45rem;font-weight:700;line-height:1;color:var(--rf-text-hi);}
#screen-alliance .pf-stat-txt small{padding-right:20px;font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--rf-label);}
#screen-alliance .al-hero-acts{grid-area:acts;display:flex;flex-direction:column;align-items:stretch;gap:8px;}
/* sans alliance : l'identité vide et le bouton Fonder */
#screen-alliance .al-hero-none{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main acts";}
#screen-alliance .al-hero-none .al-motto{max-width:640px;}

/* ---------- attente, erreur, invité ---------- */
#screen-alliance .al-state{position:relative;z-index:1;flex:none;width:100%;max-width:760px;margin:24px auto 0;}
#screen-alliance .al-state-txt{padding:18px 22px;text-align:center;font-family:var(--font-head);font-size:1rem;line-height:1.5;color:var(--rf-label);}
#screen-alliance .al-state-txt p{margin:0;}
#screen-alliance .al-state-foot{display:flex;justify-content:center;gap:10px;margin-top:14px;}
#screen-alliance .al-state.is-guest{
  max-width:1180px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:center;padding:20px;
}
#screen-alliance .al-state.is-guest .al-state-txt{padding:0;text-align:left;}
#screen-alliance .al-state.is-guest .al-state-txt p{margin-bottom:14px;font-size:1.04rem;color:var(--rf-text);}
#screen-alliance .al-state.is-guest .al-state-foot{justify-content:flex-start;}
#screen-alliance .al-state-title{margin:0 0 10px;font-family:var(--font-display);font-size:1.2rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--rf-text-hi);}

/* ---------- illustrations posées dans un bloc ---------- */
#screen-alliance .al-art{--rf-cut:12px;--ring:var(--rf-edge);position:relative;overflow:hidden;clip-path:var(--rf-in);background:#0A1622;}
#screen-alliance .al-art::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);}
#screen-alliance .al-art img{display:block;width:100%;height:100%;object-fit:cover;}
#screen-alliance .al-state-art{aspect-ratio:16/9;}
#screen-alliance :is(.al-found-art, .al-roles-art, .al-recruit-art){height:clamp(100px, 14vh, 170px);margin-bottom:14px;}
#screen-alliance .al-tr-art{flex:none;width:calc(220px*var(--scale));aspect-ratio:4/3;}

/* ---------- textes des blocs ---------- */
#screen-alliance :is(.al-note, .al-empty, .al-find, .al-field, .al-act-text, .al-actions, .al-req-text, .al-ev, .al-pin-by, .al-cos-balance, .al-cos-title){font-family:var(--font-head);}
#screen-alliance .al-note{margin:12px 0 0;font-size:.88rem;line-height:1.45;color:var(--rf-dim);}
#screen-alliance .al-empty{font-size:.95rem;color:var(--rf-dim);}
#screen-alliance .al-points{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:9px;}
#screen-alliance .al-points li{position:relative;padding-left:18px;font-family:var(--font-head);font-size:.95rem;line-height:1.45;color:var(--rf-label);}
#screen-alliance .al-points li::before{content:'';position:absolute;left:2px;top:.5em;width:6px;height:6px;transform:rotate(45deg);background:var(--rf-cyan);}
#screen-alliance .al-state .al-points{margin-bottom:16px;}
/* champs */
#screen-alliance .al-field-head{font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-alliance .al-field-head small{font-size:.82rem;font-weight:600;color:var(--rf-dim);}
#screen-alliance .al-field-foot{font-size:.86rem;}
#screen-alliance .al-msg{font-family:var(--font-head);color:var(--rf-label);}
#screen-alliance .al-msg.is-err{color:var(--rf-amber);}
#screen-alliance .al-count{font-family:var(--font-head);font-weight:700;color:var(--rf-dim);}
#screen-alliance .al-count.is-over{color:var(--rf-rose);}
#screen-alliance .al-actions{border-top-color:var(--rf-line-soft);}
#screen-alliance .set-help{border-radius:0;border-color:var(--rf-edge);color:var(--rf-dim);font-family:var(--font-head);font-size:.74rem;}
#screen-alliance .set-help:hover,#screen-alliance .set-help:focus-visible{border-color:var(--rf-cyan);color:var(--rf-cyan);}
#screen-alliance .pref-input{--rf-cut:6px;padding:10px 12px;background-color:#060F18;font-family:var(--font-head);font-size:1rem;color:var(--rf-text-hi);}
#screen-alliance .pref-input:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 50%, var(--rf-edge));}
#screen-alliance .pref-input:focus{--rf-fl:var(--rf-cyan);}
#screen-alliance .pref-input[aria-invalid="true"]{--rf-fl:var(--rf-amber);}
#screen-alliance .al-input.al-input-tag,#screen-alliance .al-find-input,#screen-alliance .al-ren-input-tag{font-family:var(--font-head);font-weight:700;}
/* choix de l'emblème : coins coupés, l'icône choisie prend la couleur choisie */
#screen-alliance .ag-pick{--rf-cut:6px;border-radius:0;background-color:#08141F;}
#screen-alliance .ag-pick:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, var(--rf-edge));}
#screen-alliance .ag-pick.on{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-alliance :is(#al-icon-host, #al-edit-icon-host) .ag-pick.on{--rf-fl:var(--al-color, var(--rf-cyan));color:var(--al-color, var(--rf-cyan));background-color:color-mix(in srgb, var(--al-color, var(--rf-cyan)) 14%, #08141F);}
#screen-alliance :is(#al-color-host, #al-edit-color-host) .ag-pick.on{--rf-fl:var(--rf-text-hi);}
#screen-alliance .al-swatch{width:42%;height:42%;border-radius:0;transform:rotate(45deg);}
/* interrupteur et ligne de réglage (Recrutement) */
#screen-alliance .ag-toggle{--rf-cut:4px;width:46px;height:24px;background-color:#0A1622;}
#screen-alliance .ag-toggle i{top:5px;left:5px;width:14px;height:14px;border-radius:0;background:var(--rf-dim);}
#screen-alliance .ag-toggle:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, var(--rf-edge));}
#screen-alliance .ag-toggle.on{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-alliance .ag-toggle.on i{transform:translateX(22px);background:var(--rf-cyan);}
#screen-alliance .set-row{gap:28px;padding:6px 2px 14px;border-bottom-color:var(--rf-line-soft);}
#screen-alliance .set-row-text .k{font-family:var(--font-head);font-size:1.04rem;font-weight:700;color:var(--rf-text-hi);}
#screen-alliance .set-row-text .d{margin-top:4px;font-family:var(--font-head);font-size:.92rem;line-height:1.45;color:var(--rf-label);}
/* étiquettes (rôles, « vous ») */
#screen-alliance .tag{
  padding:3px 9px;border:0;border-radius:0;font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 13%, rgba(6,13,22,.9));
  clip-path:polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
#screen-alliance .tag.cyan{color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 15%, rgba(6,13,22,.9));}
#screen-alliance .tag.lime{color:var(--rf-green);background:color-mix(in srgb, var(--rf-green) 15%, rgba(6,13,22,.9));}
#screen-alliance .tag.amber{color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 15%, rgba(6,13,22,.9));}
/* bouton de dissolution : rose, cadre dans le fond */
#screen-alliance .btn.rose.sm{--rf-fl:color-mix(in srgb, var(--rf-rose) 55%, transparent);color:var(--rf-rose);}
#screen-alliance .btn.rose.sm:hover:not(:disabled){--rf-fl:var(--rf-rose);color:var(--rf-text-hi);background-color:color-mix(in srgb, var(--rf-rose) 18%, #08141F);}

/* ---------- sans alliance : Rejoindre ---------- */
#screen-alliance .al-join{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:var(--qx-gap);align-items:start;}
#screen-alliance .al-find{gap:8px;margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid var(--rf-line-soft);}
#screen-alliance .al-find label{font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-alliance .al-find-row{gap:12px;}
#screen-alliance .al-find-input{width:calc(170px*var(--scale));}
#screen-alliance .al-find-hint{flex:1 1 260px;font-size:.9rem;line-height:1.4;color:var(--rf-dim);}
#screen-alliance .al-list-scroll{max-height:none;overflow:visible;padding-right:0;}
/* une alliance, une invitation, une candidature : une ligne */
#screen-alliance .al-req{padding:12px 0;border-bottom-color:var(--rf-line-soft);}
#screen-alliance .al-req-name,#screen-alliance .al-req .al-link{font-family:var(--font-head);font-size:1.04rem;font-weight:700;color:var(--rf-text-hi);}
#screen-alliance .al-req .al-link:hover,#screen-alliance .al-req .al-link:focus-visible{color:var(--rf-cyan);}
#screen-alliance .al-req .al-tag{font-family:var(--font-head);font-weight:700;color:var(--rf-cyan);}
#screen-alliance .al-req-text small{font-size:.86rem;color:var(--rf-label);}
#screen-alliance .al-rec-motto{font-family:var(--font-head);font-size:.92rem;color:var(--rf-text);}
#screen-alliance .al-req .al-emblem{width:calc(48px*var(--scale));height:calc(48px*var(--scale));border-radius:0;}
#screen-alliance .al-req.al-banner{padding:12px calc(14px*var(--scale));border-radius:0;}

/* ---------- sans alliance : Fonder ---------- */
#screen-alliance .al-form{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:var(--qx-gap);align-items:start;max-width:1560px;margin:0 auto;}
#screen-alliance .al-form-ids{display:grid;grid-template-columns:minmax(0,1fr) calc(190px*var(--scale));gap:16px;}
#screen-alliance .al-input.al-input-tag{max-width:none;}
#screen-alliance .al-preview{
  margin:0;padding:16px 18px;border:0;border-radius:0;background:rgba(4,10,18,.6);
  box-shadow:inset 0 0 0 1px var(--rf-line-soft);
}
#screen-alliance .al-preview .al-name{font-family:var(--font-display);font-size:1.5rem;font-weight:700;letter-spacing:.05em;color:var(--rf-text-hi);}
#screen-alliance .al-preview .al-tag{font-family:var(--font-head);font-weight:700;}
#screen-alliance .al-preview .al-motto{font-family:var(--font-head);font-size:.98rem;color:var(--rf-text);}
#screen-alliance .al-preview .al-emblem.lg{border-radius:0;}
#screen-alliance .al-edit .al-preview{margin-bottom:14px;}

/* ---------- avec alliance : Vue d'ensemble ---------- */
#screen-alliance .al-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:var(--qx-gap);align-items:start;}
#screen-alliance .al-pin-text{font-family:var(--font-head);font-size:1.06rem;line-height:1.55;color:var(--rf-text-hi);}
#screen-alliance .al-pin-by{font-size:.86rem;color:var(--rf-label);}
#screen-alliance .al-ev{padding:9px 0;border-bottom-color:var(--rf-line-soft);font-size:.96rem;}
#screen-alliance .al-ev-text{color:var(--rf-text);}
#screen-alliance .al-ev-ic{color:var(--pn-c, var(--rf-cyan));}
#screen-alliance .al-ev-day{font-family:var(--font-head);font-size:.84rem;font-weight:700;color:var(--rf-dim);}
#screen-alliance .al-exit .al-act:first-child{padding-top:0;border-top:0;}
#screen-alliance .al-exit .al-act + .al-act{margin-top:12px;border-top-color:var(--rf-line-soft);}
#screen-alliance .al-act-text b{font-size:1.02rem;font-weight:700;color:var(--rf-text-hi);}
#screen-alliance .al-act-text p{margin:3px 0 0;font-size:.88rem;line-height:1.45;color:var(--rf-label);}
/* cosmétiques : chaque carte posée dans le bloc */
#screen-alliance .al-cos-balance{font-size:.92rem;color:var(--rf-label);}
#screen-alliance .al-cos-title{font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-alliance .al-cos-card{--rf-cut:8px;border-radius:0;background-color:#0A1622;}
#screen-alliance .al-cos-card.is-worn{--rf-fl:var(--rf-green);}
#screen-alliance .al-cos-name{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-alliance .al-cos-meta{font-family:var(--font-head);font-size:.86rem;}

/* ---------- Membres : la liste, les rôles à côté ---------- */
#screen-alliance .al-members-tab{display:grid;grid-template-columns:minmax(0,1fr) calc(400px*var(--scale));gap:var(--qx-gap);align-items:start;}
#screen-alliance .al-table{font-family:var(--font-head);font-size:.98rem;}
#screen-alliance .al-table th{font-family:var(--font-head);font-size:.76rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);border-bottom-color:var(--rf-line);}
#screen-alliance .al-table td{padding:10px 12px;border-bottom-color:var(--rf-line-soft);color:var(--rf-text);}
#screen-alliance .al-table .num{font-family:var(--font-head);font-weight:700;color:var(--rf-text-hi);}
#screen-alliance .al-table .al-mono{font-family:var(--font-head);color:var(--rf-label);}
#screen-alliance .al-table tbody tr.me td{background:rgba(45,212,191,.06);}
#screen-alliance .al-table .al-link{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-alliance .al-presence{font-family:var(--font-head);}
#screen-alliance .al-presence i{border-radius:0;transform:rotate(45deg);}
#screen-alliance .al-roles-k{margin:16px 0 8px;font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-alliance .al-roles-k:first-child{margin-top:0;}
#screen-alliance .al-role-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px;}
#screen-alliance .al-role{display:flex;flex-direction:column;align-items:flex-start;gap:5px;}
#screen-alliance .al-role p{margin:0;font-family:var(--font-head);font-size:.9rem;line-height:1.45;color:var(--rf-label);}

/* ---------- Recrutement ---------- */
#screen-alliance .al-recruit{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:var(--qx-gap);align-items:start;}
#screen-alliance .al-recruit-lists{display:flex;flex-direction:column;align-items:stretch;gap:var(--qx-gap);}

/* ---------- Trésorerie ---------- */
#screen-alliance .al-treasury{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:var(--qx-gap);align-items:start;}
#screen-alliance .al-tr-top{display:flex;align-items:center;gap:20px;}
#screen-alliance .al-tr-sum{flex:1;min-width:0;}
#screen-alliance .al-balance{flex-direction:column;align-items:flex-start;gap:4px;}
#screen-alliance .al-balance-k{font-family:var(--font-head);font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--rf-label);}
#screen-alliance .al-balance-v{font-family:var(--font-head);font-size:2.3rem;font-weight:700;line-height:1;color:var(--rf-text-hi);}
#screen-alliance .al-give{border-top-color:var(--rf-line-soft);}
#screen-alliance .al-give-input{width:calc(150px*var(--scale));font-family:var(--font-head);font-weight:700;}
#screen-alliance :is(.al-wallet, .al-price){font-family:var(--font-head);font-size:.88rem;color:var(--rf-label);}

/* ---------- largeurs ---------- */
/* sous 1600 px : la place passe sous l'identité, les chiffres restent sur
   la ligne, libellés sur deux lignes */
@media (max-width: 1599px){
  #screen-alliance .al-hero{grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"main stats acts" "place stats acts";min-height:0;padding:14px 20px;row-gap:10px;}
  #screen-alliance .al-hero-none{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main acts";}
  #screen-alliance .al-hero .al-emblem.lg{width:calc(84px*var(--scale));height:calc(84px*var(--scale));}
  #screen-alliance .al-hero .al-name{font-size:1.65rem;}
  #screen-alliance .al-hero-place{flex-direction:row;flex-wrap:wrap;gap:4px 20px;min-width:0;}
  #screen-alliance .pf-stat{min-width:0;width:calc(98px*var(--scale));padding:8px 10px;}
  #screen-alliance .pf-stat-ic{display:none;}
  #screen-alliance .pf-stat-txt small{padding-right:0;white-space:normal;line-height:1.2;}
  #screen-alliance .al-members-tab{grid-template-columns:minmax(0,1fr) calc(320px*var(--scale));}
}
@media (max-width: 1200px){
  #screen-alliance :is(.al-join, .al-form, .al-overview, .al-recruit, .al-treasury, .al-members-tab){grid-template-columns:minmax(0,1fr);}
  #screen-alliance .al-state.is-guest{grid-template-columns:minmax(0,1fr);}
}
@media (max-width: 900px){
  #screen-alliance .al-hero{grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "place" "stats" "acts";}
  #screen-alliance .al-hero-stats{flex-wrap:wrap;}
  #screen-alliance .al-hero-acts{flex-direction:row;flex-wrap:wrap;}
  #screen-alliance .al-form-ids{grid-template-columns:minmax(0,1fr);}
  #screen-alliance .al-tr-top{flex-direction:column;align-items:stretch;}
  #screen-alliance .al-tr-art{width:100%;aspect-ratio:3/1;}
}

/* v0.92.0.1 : une catégorie fermée par le tutoriel se visite : curseur de clic */
#screen-buildings .bcat-pill.locked{cursor:pointer;}

/* ============================================================
   26. ÉCRAN SUPPORT (v0.92.1)
   Même cadre que Profil et Alliance (fond 12 sous la barre du haut).
   En tête, la bannière du bureau de liaison : le texte à gauche, les
   chiffres du joueur (demandes ouvertes, réponses non lues, problèmes
   en cours), puis les deux boutons ; l'image à droite, voilée vers la
   gauche. Puis l'onglet choisi, qui défile seul.
   - FAQ : les thèmes et la recherche à gauche ; au centre le thème
     choisi (son image, une phrase, les questions en accordéon) ; à
     droite « Pas trouvé ? » qui mène à une demande.
   - Mes demandes : la liste à gauche, la conversation à droite (l'équipe
     à gauche avec son portrait, le joueur à droite), la réponse dessous.
   - Problèmes connus : trois colonnes (en cours, à l'étude, corrigés).
   - Guide : trois cartes illustrées, le glossaire, les raccourcis et
     les liens.
   Couleurs d'onglet : demandes et rédaction en ambre (l'action),
   problèmes en cours en ambre, à l'étude en violet, corrigés en vert,
   glossaire en bleu (information), « Pas trouvé ? » en or.
   Illustrations attendues (AG.IMG) : la bannière, une par thème de la
   FAQ, « Pas trouvé ? », le portrait de l'équipe, l'invité, aucune
   demande, aucun problème, une par carte du guide.
   ============================================================ */
#screen-support :is(.su-tickets-list, .su-compose){--pn-c:var(--rf-amber) !important;}
#screen-support .su-notfound{--pn-c:var(--rf-gold) !important;}
#screen-support :is(.su-gloss, .su-keys, .su-links){--pn-c:var(--rf-blue) !important;}
#screen-support .su-issue-col.st-en_cours{--pn-c:var(--rf-amber) !important;}
#screen-support .su-issue-col.st-enquete{--pn-c:var(--rf-violet) !important;}
#screen-support .su-issue-col.st-corrige{--pn-c:var(--rf-green) !important;}
#screen-support .qx-card .panel-body{padding:12px 16px 14px;}
#screen-support .panel-head .pn-tab{min-width:0;flex:0 1 auto;}
#screen-support .panel-head .pn-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#screen-support .panel-head .eyebrow{flex:none;white-space:nowrap;color:color-mix(in srgb, var(--pn-c) 70%, var(--rf-text-hi));}
#screen-support :is(.su-pane, .btn, .su-tab-badge, .su-q-body)[hidden]{display:none !important;}

/* ---------- en-tête ---------- */
#screen-support .qx-head-txt h1{text-transform:uppercase;white-space:nowrap;}
#screen-support .qx-head-txt{max-width:430px;}
#screen-support .qx-head-txt p{white-space:normal;line-height:1.35;}
#screen-support .qx-screen-tabs{position:relative;margin:0 0 0 18px;flex:none;}
#screen-support .qx-screen-tabs .pill-tab{display:inline-flex;align-items:center;gap:8px;font-size:inherit;text-transform:uppercase;}
#screen-support .su-tab-ic{display:inline-flex;width:17px;height:17px;flex:none;}
#screen-support .su-tab-ic svg{width:100%;height:100%;}
#screen-support .su-tab-badge{
  margin-left:2px;padding:1px 7px;background:var(--rf-amber);color:#1a1205;
  font-family:var(--font-head);font-size:.78rem;font-weight:700;font-style:normal;
  clip-path:polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}
#screen-support .qx-quote{border-right-color:var(--rf-cyan);}
#screen-support .qx-quote blockquote{font-family:var(--font-head);font-size:.92rem;font-weight:500;color:var(--rf-text-hi);text-shadow:0 1px 3px rgba(4,10,18,1);}
#screen-support .qx-quote figcaption{font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;color:var(--rf-label);text-shadow:0 1px 3px rgba(4,10,18,1);}

/* ---------- bannière ---------- */
#screen-support .su-banner{
  --rf-cut:14px;--pn-c:var(--rf-cyan);
  position:relative;z-index:2;flex:none;display:grid;
  grid-template-columns:minmax(300px,1fr) auto auto;grid-template-areas:"txt stats acts";
  align-items:center;column-gap:calc(26px*var(--scale));
  min-height:calc(140px*var(--scale));padding:calc(18px*var(--scale)) calc(26px*var(--scale));
  background:var(--rf-bg);clip-path:var(--rf-oct);overflow:hidden;
}
#screen-support .su-banner::after{
  content:'';position:absolute;inset:0;z-index:3;pointer-events:none;
  background:color-mix(in srgb, var(--pn-c) 52%, var(--rf-line));clip-path:var(--rf-ring);
}
#screen-support .su-banner-art{position:absolute;inset:0;z-index:0;}
#screen-support .su-banner-art img{position:absolute;top:0;right:0;width:68%;height:100%;object-fit:cover;object-position:center;}
#screen-support .su-banner-art::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(90deg, rgba(0,4,10,.97) 0%, rgba(0,4,10,.92) 34%, rgba(0,4,10,.55) 60%, rgba(0,4,10,.4) 78%, rgba(0,4,10,.72) 100%);
}
#screen-support .su-banner > :not(.su-banner-art){position:relative;z-index:1;}
#screen-support .su-banner-txt{grid-area:txt;min-width:0;}
#screen-support .su-banner-txt h2{
  margin:0;font-family:var(--font-display);font-size:1.9rem;font-weight:700;letter-spacing:.06em;line-height:1.1;text-transform:uppercase;
  color:var(--rf-text-hi);text-shadow:0 2px 10px rgba(0,0,0,.85);
}
#screen-support .su-banner-txt p{max-width:600px;margin:8px 0 0;font-family:var(--font-head);font-size:1.02rem;line-height:1.45;color:var(--rf-text);text-shadow:0 1px 4px rgba(0,0,0,.9);}
#screen-support .su-stats{grid-area:stats;display:flex;gap:8px;}
#screen-support .su-stats:empty{display:none;}
#screen-support .pf-stat{
  --rf-cut:7px;display:flex;flex-direction:column;align-items:flex-start;gap:3px;position:relative;
  min-width:calc(112px*var(--scale));padding:9px 14px 9px 12px;background-color:rgba(4,10,18,.82);
}
#screen-support .pf-stat-ic{position:absolute;top:9px;right:10px;width:16px;height:16px;color:var(--rf-dim);}
#screen-support .pf-stat-ic svg{width:100%;height:100%;}
#screen-support .pf-stat-txt{display:flex;flex-direction:column-reverse;gap:2px;}
#screen-support .pf-stat-txt b{font-family:var(--font-head);font-size:1.45rem;font-weight:700;line-height:1;color:var(--rf-text-hi);}
#screen-support .pf-stat-txt small{padding-right:20px;font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--rf-label);}
#screen-support .su-banner-acts{grid-area:acts;display:flex;flex-direction:column;align-items:stretch;gap:8px;}

/* ---------- corps : l'onglet choisi, qui défile seul ---------- */
#screen-support .su-body{position:relative;z-index:1;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;}
#screen-support .su-body .panel:focus-within{z-index:5;}
#screen-support .su-pane{display:flex;flex-direction:column;gap:var(--qx-gap);}

/* ---------- illustrations posées dans un bloc ---------- */
#screen-support .su-art{--rf-cut:12px;position:relative;overflow:hidden;clip-path:var(--rf-in);background:#0A1622;}
#screen-support .su-art::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--rf-edge);clip-path:var(--rf-in-ring);}
#screen-support .su-art img{display:block;width:100%;height:100%;object-fit:cover;}

/* ---------- textes communs ---------- */
#screen-support :is(.su-note, .su-lead, .su-intro, .su-msg, .su-count, .su-lbl, .su-empty, .su-col-empty, .su-state){font-family:var(--font-head);}
#screen-support .su-note{margin:12px 0 0;font-size:.88rem;line-height:1.45;color:var(--rf-dim);}
#screen-support .su-lead{margin:0 0 14px;font-size:.98rem;line-height:1.5;color:var(--rf-label);}
#screen-support .su-intro{margin:0;font-size:.98rem;line-height:1.5;color:var(--rf-label);}
#screen-support .su-msg{min-height:1.2em;margin:8px 0 0;font-size:.92rem;color:var(--rf-label);}
#screen-support .su-msg.is-err{color:var(--rf-amber);}
#screen-support .su-msg.is-ok{color:var(--rf-green);}
#screen-support .su-acts{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px;}
#screen-support .su-empty{padding:18px 4px;font-size:.98rem;color:var(--rf-dim);}
#screen-support .su-empty p{margin:0;}
#screen-support .su-col-empty{margin:4px 0;font-size:.92rem;line-height:1.45;color:var(--rf-dim);}
#screen-support .su-state{
  max-width:720px;margin:24px auto;padding:20px 24px;text-align:center;
  font-size:1rem;line-height:1.5;color:var(--rf-label);background:var(--rf-bg);
  box-shadow:inset 0 0 0 1px var(--rf-line-soft);
}
#screen-support .su-state p{margin:0 0 12px;}
#screen-support .su-state p:last-child{margin-bottom:0;}
/* étiquettes d'état */
#screen-support :is(.su-tag, .su-chip){
  display:inline-flex;align-items:center;padding:3px 9px;font-family:var(--font-head);font-size:.74rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;
  color:var(--rf-label);background:color-mix(in srgb, var(--rf-label) 13%, rgba(6,13,22,.9));
  clip-path:polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
#screen-support .su-tag:is(.st-ouvert, .st-en_cours){color:var(--rf-amber);background:color-mix(in srgb, var(--rf-amber) 15%, rgba(6,13,22,.9));}
#screen-support .su-tag.st-repondu{color:var(--rf-cyan);background:color-mix(in srgb, var(--rf-cyan) 15%, rgba(6,13,22,.9));}
#screen-support .su-tag.st-enquete{color:var(--rf-violet);background:color-mix(in srgb, var(--rf-violet) 15%, rgba(6,13,22,.9));}
#screen-support .su-tag.st-corrige{color:var(--rf-green);background:color-mix(in srgb, var(--rf-green) 15%, rgba(6,13,22,.9));}
/* champs */
#screen-support .su-field{display:flex;flex-direction:column;gap:7px;margin-top:16px;}
#screen-support .su-field:first-child{margin-top:0;}
#screen-support .su-lbl{font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-support .pref-input{--rf-cut:6px;width:100%;padding:10px 12px;background-color:#060F18;font-family:var(--font-head);font-size:1rem;color:var(--rf-text-hi);}
#screen-support .pref-input:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 50%, var(--rf-edge));}
#screen-support .pref-input:focus{--rf-fl:var(--rf-cyan);outline:none;}
#screen-support .su-textarea{min-height:120px;resize:vertical;line-height:1.5;}
#screen-support .su-count{align-self:flex-end;font-size:.82rem;font-weight:700;color:var(--rf-dim);}

/* ---------- invité ---------- */
#screen-support .su-guest{max-width:1180px;width:100%;margin:24px auto 0;}
#screen-support .su-guest .panel-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:center;}
#screen-support .su-guest-art{aspect-ratio:16/9;}
#screen-support .su-guest-txt p{margin:0 0 14px;font-family:var(--font-head);font-size:1.04rem;line-height:1.5;color:var(--rf-text);}
#screen-support .su-guest-txt p + p{color:var(--rf-label);}

/* ---------- FAQ ---------- */
#screen-support .su-faq{display:grid;grid-template-columns:calc(330px*var(--scale)) minmax(0,1fr);gap:var(--qx-gap);align-items:start;}
#screen-support .su-faq-main{display:grid;grid-template-columns:minmax(0,1fr) calc(340px*var(--scale));gap:var(--qx-gap);align-items:start;}
#screen-support .su-search{display:block;margin-bottom:12px;}
#screen-support .su-topic-list{display:flex;flex-direction:column;gap:6px;}
#screen-support .su-topic{
  --rf-cut:7px;display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;text-align:left;cursor:pointer;
  background-color:#08141F;color:var(--rf-text);
}
#screen-support .su-topic:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, var(--rf-edge));}
#screen-support .su-topic.on{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-support .su-topic-ic{display:inline-flex;width:22px;height:22px;flex:none;color:var(--rf-dim);}
#screen-support .su-topic.on .su-topic-ic{color:var(--rf-cyan);}
#screen-support .su-topic-ic svg{width:100%;height:100%;}
#screen-support .su-topic-txt{display:flex;flex-direction:column;gap:2px;min-width:0;}
#screen-support .su-topic-txt b{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-support .su-topic-txt small{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
/* tête du thème : son image, une phrase posée dessus */
#screen-support .su-topic-art{aspect-ratio:3/1;max-height:220px;margin-bottom:6px;}
#screen-support .su-topic-art::before{content:'';position:absolute;inset:0;z-index:1;background:linear-gradient(0deg, rgba(0,4,10,.92) 0%, rgba(0,4,10,.45) 45%, rgba(0,4,10,0) 75%);}
#screen-support .su-topic-art p{
  position:absolute;left:18px;right:18px;bottom:14px;z-index:2;margin:0;
  font-family:var(--font-head);font-size:1.02rem;line-height:1.45;color:var(--rf-text-hi);text-shadow:0 1px 4px rgba(0,0,0,.9);
}
/* questions en accordéon */
#screen-support .su-qs{display:flex;flex-direction:column;}
#screen-support .su-q{border-bottom:1px solid var(--rf-line-soft);}
#screen-support .su-q:last-child{border-bottom:0;}
#screen-support .su-q-head{
  display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:14px 2px;
  border:0;background:none;cursor:pointer;text-align:left;
  font-family:var(--font-head);font-size:1.04rem;font-weight:700;line-height:1.35;color:var(--rf-text-hi);
}
#screen-support .su-q-head:hover{color:var(--rf-cyan);}
#screen-support .su-q-head:focus-visible{outline:none;color:var(--rf-cyan);box-shadow:inset 3px 0 0 var(--rf-cyan);}
#screen-support .su-q-chev{display:inline-flex;width:18px;height:18px;flex:none;color:var(--rf-amber);transition:transform .18s ease;}
#screen-support .su-q-chev svg{width:100%;height:100%;}
#screen-support .su-q.open .su-q-chev{transform:rotate(180deg);}
#screen-support .su-q-body{padding:0 2px 16px;}
#screen-support .su-q-body p{margin:0;font-family:var(--font-head);font-size:.98rem;line-height:1.6;color:var(--rf-text);}
#screen-support .su-q-body .su-note{margin-top:10px;}
#screen-support .su-q-body .su-chip{margin-top:10px;}
/* Pas trouvé ? */
#screen-support .su-nf-art{aspect-ratio:3/1;margin-bottom:12px;}
#screen-support .su-notfound p{margin:0;font-family:var(--font-head);font-size:.96rem;line-height:1.5;color:var(--rf-label);}
#screen-support .su-notfound .su-acts{flex-direction:column;align-items:stretch;}

/* ---------- Mes demandes ---------- */
#screen-support .su-tickets{display:grid;grid-template-columns:calc(400px*var(--scale)) minmax(0,1fr);gap:var(--qx-gap);align-items:start;}
#screen-support .su-new-btn{width:100%;margin-bottom:12px;}
#screen-support .su-ticket-list{display:flex;flex-direction:column;gap:6px;}
#screen-support .su-ticket{
  --rf-cut:7px;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"ic txt" "ic tag";
  align-items:center;column-gap:12px;row-gap:6px;width:100%;padding:10px 12px;text-align:left;cursor:pointer;
  background-color:#08141F;color:var(--rf-text);
}
#screen-support .su-ticket:hover{--rf-fl:color-mix(in srgb, var(--rf-cyan) 60%, var(--rf-edge));}
#screen-support .su-ticket.on{--rf-fl:var(--rf-cyan);background-color:#0E2C29;}
#screen-support .su-ticket.unread{--rf-fl:var(--rf-amber);}
#screen-support .su-ticket.st-ferme:not(.on){opacity:.7;}
#screen-support .su-ticket-ic{grid-area:ic;display:inline-flex;width:24px;height:24px;color:var(--rf-dim);}
#screen-support .su-ticket-ic svg{width:100%;height:100%;}
#screen-support .su-ticket-txt{grid-area:txt;display:flex;flex-direction:column;gap:2px;min-width:0;}
#screen-support .su-ticket-txt b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-support .su-ticket-txt small{font-family:var(--font-head);font-size:.82rem;color:var(--rf-label);}
#screen-support .su-ticket .su-tag{grid-area:tag;justify-self:start;}
#screen-support .su-empty-art .su-art{aspect-ratio:16/9;margin-bottom:12px;}
/* aucune demande choisie */
#screen-support .su-pick-art{float:left;width:calc(120px*var(--scale));aspect-ratio:1;margin:0 18px 8px 0;}
#screen-support .su-thread-empty p{margin:0;font-family:var(--font-head);font-size:1rem;line-height:1.55;color:var(--rf-text);}
#screen-support .su-thread-empty .su-acts{clear:both;}
/* rédaction : une catégorie par carte */
#screen-support .su-cats{display:grid;grid-template-columns:repeat(auto-fill, minmax(calc(170px*var(--scale)), 1fr));gap:8px;}
#screen-support .su-cat{
  --rf-cut:8px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:12px 12px 12px;text-align:left;cursor:pointer;
  background-color:#08141F;color:var(--rf-text);
}
#screen-support .su-cat:hover{--rf-fl:color-mix(in srgb, var(--rf-amber) 60%, var(--rf-edge));}
#screen-support .su-cat.on{--rf-fl:var(--rf-amber);background-color:color-mix(in srgb, var(--rf-amber) 10%, #08141F);}
#screen-support .su-cat-ic{display:inline-flex;width:22px;height:22px;margin-bottom:4px;color:var(--rf-dim);}
#screen-support .su-cat.on .su-cat-ic{color:var(--rf-amber);}
#screen-support .su-cat-ic svg{width:100%;height:100%;}
#screen-support .su-cat b{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-support .su-cat small{font-family:var(--font-head);font-size:.82rem;line-height:1.4;color:var(--rf-label);}
#screen-support .su-diag-note{max-width:760px;}
/* conversation */
#screen-support .su-thread-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;font-family:var(--font-head);font-size:.9rem;color:var(--rf-label);}
#screen-support .su-thread .su-note{margin-top:8px;}
#screen-support .su-msgs{display:flex;flex-direction:column;gap:14px;margin:16px 0;padding:16px 0;border-top:1px solid var(--rf-line-soft);border-bottom:1px solid var(--rf-line-soft);}
#screen-support .su-msg-row{display:flex;align-items:flex-start;gap:12px;max-width:min(860px, 88%);}
#screen-support .su-msg-row.from-me{align-self:flex-end;flex-direction:row-reverse;}
#screen-support .su-avatar{flex:none;width:calc(52px*var(--scale));aspect-ratio:1;--rf-cut:8px;}
#screen-support .su-bubble{
  --rf-cut:9px;position:relative;min-width:0;padding:12px 16px 12px;clip-path:var(--rf-in);
  background:color-mix(in srgb, var(--rf-cyan) 9%, #08141F);
}
#screen-support .su-msg-row.from-me .su-bubble{background:#0C1824;}
#screen-support .su-bubble header{display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin-bottom:6px;}
#screen-support .su-bubble header b{font-family:var(--font-head);font-size:.86rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--rf-cyan);}
#screen-support .su-msg-row.from-me .su-bubble header b{color:var(--rf-label);}
#screen-support .su-bubble time{font-family:var(--font-head);font-size:.8rem;color:var(--rf-dim);white-space:nowrap;}
#screen-support .su-bubble p{margin:0;font-family:var(--font-head);font-size:1rem;line-height:1.55;color:var(--rf-text-hi);overflow-wrap:anywhere;}
#screen-support .su-orig{
  margin-top:8px;padding:0;border:0;background:none;cursor:pointer;
  font-family:var(--font-head);font-size:.84rem;font-weight:700;color:var(--rf-label);
  text-decoration:underline;text-decoration-color:color-mix(in srgb, var(--rf-label) 40%, transparent);text-underline-offset:3px;
}
#screen-support .su-orig:hover,#screen-support .su-orig:focus-visible{color:var(--rf-cyan);outline:none;}
#screen-support .su-closed{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;}
#screen-support .su-closed p{margin:0;font-family:var(--font-head);font-size:.96rem;color:var(--rf-label);}

/* ---------- Problèmes connus ---------- */
#screen-support .su-issues{display:grid;grid-template-columns:repeat(3, minmax(0,1fr));gap:var(--qx-gap);align-items:start;}
#screen-support .su-issue-col .panel-body{display:flex;flex-direction:column;gap:8px;}
#screen-support .su-issue{--rf-cut:8px;padding:12px 14px;clip-path:var(--rf-in);background:#08141F;}
#screen-support .su-issue h3{margin:0 0 6px;font-family:var(--font-head);font-size:1.02rem;font-weight:700;line-height:1.35;color:var(--rf-text-hi);}
#screen-support .su-issue p{margin:0;font-family:var(--font-head);font-size:.94rem;line-height:1.5;color:var(--rf-text);}
#screen-support .su-issue footer{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:10px;font-family:var(--font-head);font-size:.82rem;color:var(--rf-dim);}
#screen-support .su-fixed{font-weight:700;color:var(--rf-green);}
#screen-support .su-ie-art{aspect-ratio:16/9;max-width:640px;margin-bottom:12px;}
#screen-support .su-issues-empty{max-width:720px;width:100%;margin:0 auto;}
#screen-support .su-issues-empty p{margin:0;font-family:var(--font-head);font-size:1rem;line-height:1.5;color:var(--rf-text);}

/* ---------- Guide du joueur ---------- */
#screen-support .su-guide{display:flex;flex-direction:column;gap:var(--qx-gap);}
#screen-support .su-guide-cards{display:grid;grid-template-columns:repeat(3, minmax(0,1fr));gap:var(--qx-gap);}
#screen-support .su-guide-card{--rf-cut:12px;display:flex;flex-direction:column;clip-path:var(--rf-oct);background:var(--rf-bg);box-shadow:inset 0 0 0 1px var(--rf-line-soft);}
#screen-support .su-guide-card .su-art{height:clamp(110px, 15vh, 190px);clip-path:none;}
#screen-support .su-guide-card .su-art::after{display:none;}
#screen-support .su-guide-txt{display:flex;flex-direction:column;align-items:flex-start;gap:8px;flex:1;padding:14px 18px 18px;}
#screen-support .su-guide-txt h3{margin:0;font-family:var(--font-display);font-size:1.1rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rf-text-hi);}
#screen-support .su-guide-txt p{flex:1;margin:0;font-family:var(--font-head);font-size:.96rem;line-height:1.5;color:var(--rf-label);}
#screen-support .su-guide-cols{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:var(--qx-gap);align-items:start;}
#screen-support .su-guide-side{display:flex;flex-direction:column;gap:var(--qx-gap);}
#screen-support .su-terms{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:4px 24px;margin:0;}
#screen-support .su-term{padding:10px 0;border-bottom:1px solid var(--rf-line-soft);}
#screen-support .su-term dt{font-family:var(--font-head);font-size:1rem;font-weight:700;color:var(--rf-text-hi);}
#screen-support .su-term dd{margin:3px 0 0;font-family:var(--font-head);font-size:.92rem;line-height:1.45;color:var(--rf-label);}
#screen-support .su-keylist{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px;}
#screen-support .su-keylist li{display:flex;align-items:center;gap:12px;font-family:var(--font-head);font-size:.94rem;color:var(--rf-text);}
#screen-support .su-keylist kbd{
  flex:none;min-width:70px;padding:4px 8px;text-align:center;font-family:var(--font-head);font-size:.8rem;font-weight:700;color:var(--rf-text-hi);
  background:#0C1824;box-shadow:inset 0 0 0 1px var(--rf-edge),inset 0 -2px 0 rgba(0,0,0,.4);
}
#screen-support .su-links .su-acts{margin-top:0;}

/* ---------- largeurs ---------- */
@media (max-width: 1599px){
  #screen-support .su-banner{padding:14px 20px;min-height:0;}
  #screen-support .su-banner-txt h2{font-size:1.6rem;}
  #screen-support .pf-stat{min-width:0;width:calc(104px*var(--scale));padding:8px 10px;}
  #screen-support .pf-stat-ic{display:none;}
  #screen-support .pf-stat-txt small{padding-right:0;white-space:normal;line-height:1.2;}
  #screen-support .su-faq-main{grid-template-columns:minmax(0,1fr);}
  #screen-support .su-tickets{grid-template-columns:calc(340px*var(--scale)) minmax(0,1fr);}
}
@media (max-width: 1200px){
  #screen-support .su-faq,#screen-support .su-tickets,#screen-support .su-guide-cols{grid-template-columns:minmax(0,1fr);}
  #screen-support .su-guide .su-guide-cards{grid-template-columns:minmax(0,1fr);}
  #screen-support .su-guest .panel-body{grid-template-columns:minmax(0,1fr);}
  #screen-support .su-issues{grid-template-columns:minmax(0,1fr);}
}
@media (max-width: 900px){
  #screen-support .su-banner{grid-template-columns:minmax(0,1fr);grid-template-areas:"txt" "stats" "acts";row-gap:12px;}
  #screen-support .su-banner-acts{flex-direction:row;flex-wrap:wrap;}
  #screen-support .su-terms{grid-template-columns:minmax(0,1fr);}
  #screen-support .su-msg-row{max-width:100%;}
}

/* ============================================================
   27. ONGLET FINANCES DE L'ÉCRAN CONTRÔLE (v0.93.1)
   js/04g-screen-finances.js : quatre sous-onglets en trois colonnes,
   comme Messages. Mêmes blocs (§3), mêmes éléments posés (formes déclarées
   en tête de feuille) ; une couleur garde son sens : vert ce qui entre,
   rose ce qui sort ou la dette, orange les ouvriers, ambre ce qui demande
   une action, bleu les chiffres et l'historique.
   ============================================================ */
#fin-p-wallet,#fin-p-flows,#fin-p-cats{--pn-c:var(--rf-green) !important;}
#fin-p-staff,#fin-p-roles,#fin-p-team,#fin-p-open,#fin-p-blist,#fin-p-bsel,#fin-p-bcats{--pn-c:var(--rf-orange) !important;}
#fin-p-ines,#fin-p-idle.fin-alerting,#fin-p-watch.fin-alerting{--pn-c:var(--rf-amber) !important;}
#fin-p-proj,#fin-p-days,#fin-p-dlist,#fin-p-period,#fin-p-fam,#fin-p-lnote{--pn-c:var(--rf-blue) !important;}
#fin-p-cols,#fin-p-others,#fin-p-more{--pn-c:var(--rf-violet) !important;}
#screen-planet .fin-panel .panel-body{padding:9px 14px 12px;font-family:var(--font-head);}
#screen-planet .fin-panel.cc-flex > .panel-body{display:flex;flex-direction:column;min-height:0;}
#screen-planet .fin-panel .panel-head .eyebrow{color:var(--rf-label);}

/* ---------- formes (v0.93.2.1) ----------
   Les éléments posés des Finances déclaraient leur coin (--rf-cut) et leur
   liseré (--ring) sans règle pour les dessiner : boîtes carrées sans cadre
   depuis la v0.93.1. Même dessin que Messages : trois coins coupés et
   liseré en anneau (::after). Le tableau défile : son cadre est peint dans
   le fond (une pseudo-boîte en absolu défilerait avec les lignes). */
#screen-planet :is(.fin-chip, .fin-kpi, .fin-state, .fin-ines-face, .fin-colrow, .fin-dl, .fin-wl, .fin-bart){
  position:relative;border:0;border-radius:0;clip-path:var(--rf-in);
}
#screen-planet :is(.fin-chip, .fin-kpi, .fin-state, .fin-ines-face, .fin-colrow, .fin-dl, .fin-wl, .fin-bart)::after{
  content:'';position:absolute;inset:0;z-index:2;pointer-events:none;background:var(--ring);clip-path:var(--rf-in-ring);
}
#screen-planet .fin-blank-img{clip-path:var(--rf-in);}

/* ---------- sous-onglets : une bande pleine largeur sous le titre ----------
   Quatre parts égales dans un seul cadre, séparées par un filet ; chacune
   dit son chiffre du moment. L'onglet ouvert est rempli et souligné. */
#screen-planet .fin-subnav{
  --rf-cut:10px;--ring:var(--rf-edge);
  position:relative;flex:none;display:grid;grid-template-columns:repeat(4, minmax(0,1fr));
  background:rgba(4,8,16,.66);clip-path:var(--rf-oct);
  backdrop-filter:blur(var(--glass-blur));-webkit-backdrop-filter:blur(var(--glass-blur));
}
#screen-planet .fin-subnav::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--ring);clip-path:var(--rf-ring);}
#screen-planet .fin-tab{
  position:relative;display:flex;align-items:center;gap:14px;min-width:0;padding:11px 22px 12px;border:0;cursor:pointer;
  background:transparent;text-align:left;font-family:var(--font-head);color:var(--rf-label);
}
#screen-planet .fin-tab + .fin-tab{border-left:1px solid var(--rf-line-soft);}
#screen-planet .fin-tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:2px;background:transparent;}
#screen-planet .fin-tab-ic{display:inline-flex;flex:none;width:24px;height:24px;color:var(--rf-dim);}
#screen-planet .fin-tab-ic svg{width:100%;height:100%;}
#screen-planet .fin-tab-txt{display:flex;flex-direction:column;gap:3px;min-width:0;}
#screen-planet .fin-tab-name{font-weight:700;font-size:.9rem;letter-spacing:.09em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#screen-planet .fin-tab-n{font-size:.86rem;font-weight:600;color:var(--rf-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#screen-planet .fin-tab:hover{color:var(--rf-text-hi);background:rgba(95,181,169,.06);}
#screen-planet .fin-tab:hover .fin-tab-ic{color:var(--rf-cyan);}
#screen-planet .fin-tab:focus-visible{outline:2px solid var(--rf-cyan);outline-offset:-3px;}
#screen-planet .fin-tab.active{color:var(--rf-cyan);background:#0E2C29;}
#screen-planet .fin-tab.active .fin-tab-ic{color:var(--rf-cyan);}
#screen-planet .fin-tab.active::after{background:var(--rf-cyan);}

/* ---------- valeurs ---------- */
#screen-planet .fin-pos{color:var(--rf-green);}
#screen-planet .fin-neg{color:var(--rf-rose);}
#screen-planet .fin-zero{color:var(--rf-text-hi);}
#screen-planet .fin-wrap :is(b, small, span, td).fin-pos{color:var(--rf-green);}
#screen-planet .fin-wrap :is(b, small, span, td).fin-neg{color:var(--rf-rose);}
#screen-planet .fin-wrap :is(b, small, span, td).fin-zero{color:var(--rf-text-hi);}
#screen-planet .fin-sc{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;}
#screen-planet .fin-sc .scrip-ic img{width:16px;height:16px;}
#screen-planet .fin-kv{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:2px 10px;padding:5px 0;border-bottom:1px solid var(--rf-line-soft);font-size:.95rem;color:var(--rf-label);}
#screen-planet .fin-kv:last-child{border-bottom:0;}
#screen-planet .fin-kv b,#screen-planet .fin-kv .fin-sc{margin-left:auto;text-align:right;}
#screen-planet .fin-kv b{font-weight:700;color:var(--rf-text-hi);}
#screen-planet .fin-kv.total{margin-top:4px;border-top:1px solid var(--rf-line-soft);}
#screen-planet .fin-kv.grand{font-size:1.05rem;padding:8px 0;}
#screen-planet .fin-kv.grand b{font-size:1.15rem;}
#screen-planet .fin-hint{margin:8px 0 0;font-size:.88rem;line-height:1.4;color:var(--rf-dim);}
#screen-planet .fin-note{margin:6px 0 0;font-size:.86rem;color:var(--rf-dim);}
#screen-planet .fin-empty{margin:4px 0;font-size:.95rem;color:var(--rf-label);}
#screen-planet .fin-sub{margin:12px 0 6px;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rf-label);}
#screen-planet .fin-dim{color:var(--rf-dim);}
#screen-planet .fin-btn{margin-top:8px;}
#screen-planet .fin-wide{width:100%;justify-content:center;}

/* ---------- Bilan : portefeuille ---------- */
#screen-planet .fin-balance{display:flex;align-items:center;gap:10px;padding:4px 0 8px;}
#screen-planet .fin-balance .scrip-ic img{width:34px;height:34px;}
#screen-planet .fin-balance b{font-size:2.2rem;font-weight:700;line-height:1;color:var(--rf-text-hi);}
#screen-planet .fin-balance b.fin-neg{color:var(--rf-rose);}
#screen-planet .fin-state{
  --rf-cut:6px;--ring:color-mix(in srgb, var(--c) 45%, transparent);
  margin:0 0 8px;padding:7px 12px;font-size:.9rem;font-weight:600;line-height:1.3;color:var(--c);
  background:color-mix(in srgb, var(--c) 11%, transparent);
}
/* intendante : portrait et sa phrase */
#screen-planet .fin-ines{display:flex;gap:12px;align-items:flex-start;}
#screen-planet .fin-ines-face{--rf-cut:10px;--ring:color-mix(in srgb, var(--rf-amber) 45%, var(--rf-edge));flex:none;width:96px;aspect-ratio:2/3;overflow:hidden;background:#0A1521;}
#screen-planet .fin-ines-img{width:100%;height:100%;object-fit:cover;object-position:50% 12%;}
#screen-planet .fin-ines.off .fin-ines-img{filter:grayscale(.85) brightness(.75);}
#screen-planet .fin-ines-txt{display:flex;flex-direction:column;gap:6px;min-width:0;}
#screen-planet .fin-quote{margin:0;font-size:.98rem;line-height:1.42;color:var(--rf-text);font-style:italic;}
#screen-planet .fin-ines-status{margin:0;font-size:.86rem;line-height:1.35;color:var(--rf-dim);}
#screen-planet .fin-ines-txt .fin-btn{align-self:flex-start;}

/* ---------- graphiques (SVG) ---------- */
#screen-planet .fin-chart{width:100%;height:clamp(150px, 19vh, 230px);}
#screen-planet .fin-chart svg{display:block;width:100%;height:100%;overflow:visible;}
#screen-planet .fin-grid{stroke:var(--rf-line-soft);stroke-width:1;vector-effect:non-scaling-stroke;}
#screen-planet .fin-zero{stroke:var(--rf-label);stroke-width:1;stroke-opacity:.55;vector-effect:non-scaling-stroke;}
#screen-planet .fin-floorline{stroke:var(--rf-rose);stroke-width:1;stroke-dasharray:5 4;vector-effect:non-scaling-stroke;}
#screen-planet .fin-axis{font-family:var(--font-head);font-size:11px;fill:var(--rf-dim);}
#screen-planet .fin-floor-lbl{fill:var(--rf-rose);}
#screen-planet .fin-val{fill:var(--rf-label);}
#screen-planet .fin-line{fill:none;stroke:var(--rf-blue);stroke-width:2;vector-effect:non-scaling-stroke;}
#screen-planet .fin-area.up{fill:var(--rf-green);fill-opacity:.12;}
#screen-planet .fin-area.down{fill:var(--rf-rose);fill-opacity:.12;}
#screen-planet .fin-mark{fill:var(--rf-amber);}
#screen-planet .fin-bars .fin-in{fill:var(--rf-green);fill-opacity:.7;}
#screen-planet .fin-bars .fin-out{fill:var(--rf-rose);fill-opacity:.65;}
#screen-planet .fin-bars .fin-netmark{fill:var(--rf-text-hi);}
#screen-planet .fin-bars .fin-hit{fill:transparent;cursor:pointer;}
#screen-planet .fin-bars .fin-day:hover .fin-hit{fill:rgba(127,163,207,.08);}
#screen-planet .fin-bars .fin-day.sel .fin-hit{fill:rgba(127,163,207,.16);}
#screen-planet .fin-legend{display:flex;gap:16px;margin-top:6px;font-size:.84rem;color:var(--rf-label);}
#screen-planet .fin-legend span::before{content:'';display:inline-block;width:9px;height:9px;margin-right:6px;transform:rotate(45deg);}
#screen-planet .fin-legend .in::before{background:var(--rf-green);}
#screen-planet .fin-legend .out::before{background:var(--rf-rose);}
#screen-planet .fin-legend .net::before{background:var(--rf-text-hi);}

/* ---------- barres de répartition ---------- */
#screen-planet .fin-flows{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:18px;}
#screen-planet .fin-flow,#screen-planet .fin-role{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;align-items:center;gap:10px;padding:5px 0;font-size:.93rem;}
/* colonnes étroites (familles, métiers, catégories) : nom et chiffre sur une ligne, barre dessous */
#screen-planet .fin-role{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;}
#screen-planet .fin-role .fin-track{grid-column:1 / -1;grid-row:2;}
#screen-planet .fin-flow-lbl,#screen-planet .fin-role-n{color:var(--rf-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#screen-planet .fin-role-n em{font-style:normal;color:var(--rf-dim);margin-left:4px;}
#screen-planet .fin-pic{display:inline-flex;width:15px;height:15px;margin-right:6px;vertical-align:-2px;color:var(--rf-orange);}
#screen-planet .fin-pic svg{width:100%;height:100%;}
#screen-planet .fin-flow b,#screen-planet .fin-role b{font-weight:700;color:var(--rf-text-hi);white-space:nowrap;text-align:right;}
#screen-planet .fin-track{position:relative;display:block;height:7px;background:rgba(127,163,207,.08);}
#screen-planet .fin-track i{position:absolute;left:0;top:0;bottom:0;width:0;background:var(--c, var(--rf-orange));transition:width .4s ease;}
#screen-planet .fin-track.in i{background:var(--rf-green);}
#screen-planet .fin-track.out i{background:var(--rf-rose);}
#screen-planet .fin-track.back i{background:var(--rf-amber);}
#screen-planet .fin-wrap tr.fin-unpaid td{background:rgba(221,160,72,.06);}
#screen-planet .fin-wrap tr.fin-unpaid td b{color:var(--rf-amber);}

/* ---------- colonies, alertes, listes ---------- */
#screen-planet .fin-cols{display:flex;flex-direction:column;gap:6px;}
#screen-planet .fin-colrow{
  --rf-cut:6px;--ring:var(--rf-edge);
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;padding:7px 12px;background:rgba(4,8,16,.45);
}
#screen-planet .fin-colrow.here{--ring:color-mix(in srgb, var(--rf-violet) 55%, var(--rf-edge));}
#screen-planet .fin-colname{font-weight:700;font-size:.95rem;color:var(--rf-text-hi);overflow-wrap:anywhere;}
#screen-planet .fin-colname em{font-style:normal;font-weight:600;font-size:.78rem;color:var(--rf-violet);}
#screen-planet .fin-colmeta{grid-column:1;font-size:.84rem;color:var(--rf-dim);}
#screen-planet .fin-colnet{grid-column:2;grid-row:1 / span 2;align-self:center;font-size:1rem;}
#screen-planet .fin-watch,#screen-planet .fin-list,#screen-planet .fin-days{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;}
#screen-planet .fin-wl{
  --rf-cut:6px;--ring:color-mix(in srgb, var(--c) 40%, var(--rf-edge));
  display:flex;flex-direction:column;gap:2px;padding:8px 12px 9px;font-size:.92rem;line-height:1.35;color:var(--rf-text);
  background:linear-gradient(100deg, color-mix(in srgb, var(--c) 10%, transparent), rgba(4,8,16,.5) 60%);
}
#screen-planet .fin-wl .fin-btn{align-self:flex-start;margin-top:6px;}
#screen-planet .fin-li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 0;border-bottom:1px solid var(--rf-line-soft);font-size:.93rem;color:var(--rf-text);}
#screen-planet .fin-li:last-child{border-bottom:0;}
#screen-planet .fin-li small{display:block;font-size:.8rem;color:var(--rf-dim);}
#screen-planet .fin-li > b{font-weight:700;color:var(--rf-rose);white-space:nowrap;}
#screen-planet .fin-li .fin-btn{margin-top:0;flex:none;}
#screen-planet .fin-who{display:flex;align-items:center;gap:8px;min-width:0;}
#screen-planet .fin-who .worker-avatar{width:28px;height:28px;flex:none;object-fit:contain;}
#screen-planet .fin-who > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#screen-planet .fin-more{display:flex;gap:8px;flex-wrap:wrap;}
/* effectifs : quatre compteurs */
#screen-planet .fin-kpis{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:6px;margin-bottom:8px;}
#screen-planet .fin-kpi{--rf-cut:6px;--ring:var(--rf-edge);display:flex;flex-direction:column;gap:2px;padding:8px 12px;background:rgba(4,8,16,.45);}
#screen-planet .fin-kpi b{font-size:1.6rem;font-weight:700;line-height:1.05;color:var(--rf-text-hi);}
#screen-planet .fin-kpi b.fin-neg{color:var(--rf-amber);}
#screen-planet .fin-kpi small{font-size:.84rem;color:var(--rf-label);}

/* ---------- tableaux ---------- */
#screen-planet .fin-table-wrap{
  --rf-cut:8px;--rf-fl:var(--rf-edge);flex:1 1 auto;min-height:0;overflow:auto;clip-path:var(--rf-in);
  background-color:rgba(4,8,16,.4);background-image:var(--rf-frame-img);background-position:var(--rf-frame-pos);
  background-size:var(--rf-frame-size);background-repeat:no-repeat;box-shadow:inset 0 0 0 1px var(--rf-fl);
}
#screen-planet .fin-table{width:100%;border-collapse:collapse;font-size:.92rem;color:var(--rf-text);}
#screen-planet .fin-table th{position:sticky;top:0;z-index:1;padding:0;text-align:left;background:#08121D;border-bottom:1px solid var(--rf-line);}
#screen-planet .fin-table th.num,#screen-planet .fin-table td.num{text-align:right;}
#screen-planet .fin-table thead th:not(:has(button)){padding:8px 10px;font-size:.78rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--rf-label);}
#screen-planet .fin-th{width:100%;padding:8px 10px;border:0;background:none;cursor:pointer;text-align:inherit;font-family:var(--font-head);font-size:.78rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--rf-label);}
#screen-planet .fin-th:hover,#screen-planet .fin-th.on{color:var(--rf-cyan);}
#screen-planet .fin-th:focus-visible{outline:2px solid var(--rf-cyan);outline-offset:-2px;}
#screen-planet .fin-table td{padding:6px 10px;border-bottom:1px solid var(--rf-line-soft);vertical-align:middle;}
#screen-planet .fin-table td b{font-weight:700;color:var(--rf-text-hi);}
#screen-planet .fin-table tr.idle td{background:rgba(221,160,72,.06);}
#screen-planet .fin-table tr.idle td em{font-style:normal;color:var(--rf-amber);}
#screen-planet .fin-table tfoot td{position:sticky;bottom:0;background:#08121D;border-top:1px solid var(--rf-line);border-bottom:0;font-weight:700;color:var(--rf-text-hi);}
#screen-planet .fin-sites{max-width:22ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--rf-label);}
#screen-planet .fin-brow{cursor:pointer;}
#screen-planet .fin-brow:hover td{background:rgba(95,181,169,.05);}
#screen-planet .fin-brow.sel td{background:#0E2C29;}
#screen-planet .fin-brow:focus-visible{outline:2px solid var(--rf-cyan);outline-offset:-2px;}
#screen-planet .fin-brow td em{font-style:normal;color:var(--rf-dim);}
#screen-planet .fin-bname{display:flex;align-items:center;gap:12px;min-width:0;}
#screen-planet .fin-bname small{display:block;font-size:.8rem;color:var(--rf-dim);}
#screen-planet .fin-bthumb{position:relative;flex:none;width:78px;height:52px;overflow:hidden;clip-path:polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);} /* v0.93.2 : contient l’image (.ag-art est en absolu) */
#screen-planet .fin-bthumb > *{width:100%;height:100%;}
#screen-planet .fin-bthumb img{object-fit:cover;}
#screen-planet .fin-outs{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;}
#screen-planet .fin-outs.wrap{flex-wrap:wrap;}
#screen-planet .fin-res{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;color:var(--rf-green);font-weight:600;}
#screen-planet .fin-outs.neg .fin-res{color:var(--rf-rose);}
#screen-planet .fin-res img{width:16px;height:16px;}
#screen-planet .fin-bart{position:relative;--rf-cut:10px;--ring:var(--rf-edge);aspect-ratio:16/10;margin-bottom:8px;overflow:hidden;}
#screen-planet .fin-bart > *{width:100%;height:100%;}
#screen-planet .fin-bart img{object-fit:cover;}
#screen-planet .fin-bart > .fin-bart-cap{position:absolute;left:0;bottom:0;z-index:1;width:auto;height:auto;padding:4px 12px 5px;font-size:.84rem;font-weight:600;color:var(--rf-text-hi);background:rgba(4,8,16,.78);}

/* ---------- bâtiments : tableau groupé par catégorie (v0.93.2.1) ---------- */
#screen-planet .fin-btable td{padding:8px 12px;}
#screen-planet .fin-btable td.num{white-space:nowrap;}
#screen-planet .fin-btable tr.fin-grp td{padding:12px 12px 6px;background:rgba(127,163,207,.045);border-bottom:1px solid var(--rf-line);}
#screen-planet .fin-grp-n{display:flex;align-items:center;font-weight:700;font-size:.8rem;letter-spacing:.09em;text-transform:uppercase;color:var(--rf-label);}
#screen-planet .fin-grp-n em{margin-left:12px;font-style:normal;font-weight:600;font-size:.8rem;letter-spacing:0;text-transform:none;color:var(--rf-dim);}
#screen-planet .fin-btxt{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;}
#screen-planet .fin-bn{font-size:.98rem;font-weight:700;color:var(--rf-text-hi);}
#screen-planet .fin-bstat{
  --cut:4px;display:inline-block;margin-top:3px;padding:1px 9px 2px;font-size:.74rem;font-weight:700;letter-spacing:.03em;
  color:var(--c);background:color-mix(in srgb, var(--c) 16%, transparent);
  clip-path:polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
#screen-planet .fin-brow.st-nostaff td:first-child,#screen-planet .fin-brow.st-partial td:first-child{box-shadow:inset 3px 0 0 var(--rf-amber);}
#screen-planet .fin-brow.st-power td:first-child{box-shadow:inset 3px 0 0 var(--rf-rose);}
#screen-planet .fin-staff{display:flex;flex-direction:column;gap:5px;width:70px;}
#screen-planet .fin-staff > span:first-child{font-weight:700;color:var(--rf-text-hi);}
#screen-planet .fin-staff .fin-track{height:5px;}
#screen-planet .fin-staff .fin-track i{background:var(--rf-green);}
#screen-planet .fin-staff .fin-track.warn i{background:var(--rf-amber);}
#screen-planet .fin-btable .fin-outs{flex-wrap:wrap;gap:4px 14px;}
#screen-planet .fin-btable .fin-outs + .fin-outs{margin-top:5px;font-size:.86rem;}
#screen-planet .fin-btable .fin-outs em{font-style:normal;color:var(--rf-dim);}
#screen-planet .fin-minus{font-size:.76rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--rf-dim);}
#screen-planet .fin-split{display:block;margin-top:2px;font-size:.76rem;color:var(--rf-dim);}
#screen-planet .fin-bnet{font-size:1.04rem;}
#screen-planet .fin-btable tfoot td{padding:10px 12px;}
/* relevé : catégories */
#screen-planet .fin-ctable td{border-bottom:1px solid var(--rf-line-soft);}
#screen-planet .fin-cat{color:var(--rf-text);}
#screen-planet .fin-cat::before{content:'';display:inline-block;width:8px;height:8px;margin-right:8px;transform:rotate(45deg);background:var(--c);}
#screen-planet .fin-cat small{display:block;margin-left:16px;font-size:.78rem;color:var(--rf-dim);}
#screen-planet .fin-bar-cell{width:38%;}

/* ---------- relevé : période et jours ---------- */
#screen-planet .fin-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px;}
#screen-planet .fin-chip{
  --rf-cut:6px;--ring:var(--rf-edge);
  padding:6px 14px 6px 11px;border:0;cursor:pointer;font-family:var(--font-head);font-weight:600;font-size:.88rem;
  color:var(--rf-label);background:rgba(4,8,16,.5);
}
#screen-planet .fin-chip:hover{--ring:var(--rf-cyan);color:var(--rf-text-hi);}
#screen-planet .fin-chip:focus-visible{outline:2px solid var(--rf-cyan);outline-offset:-2px;}
#screen-planet .fin-chip.on{--ring:var(--rf-cyan);color:var(--rf-cyan);background:#0E2C29;}
#screen-planet .fin-dl{
  --rf-cut:6px;--ring:var(--rf-edge);
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 10px;padding:6px 12px;cursor:pointer;background:rgba(4,8,16,.45);font-size:.92rem;
}
#screen-planet .fin-dl:hover{--ring:var(--rf-blue);}
#screen-planet .fin-dl.on{--ring:var(--rf-blue);background:rgba(127,163,207,.12);}
#screen-planet .fin-dl:focus-visible{outline:2px solid var(--rf-blue);outline-offset:-2px;}
#screen-planet .fin-dl span{color:var(--rf-text);text-transform:capitalize;}
#screen-planet .fin-dl small{grid-column:1;font-size:.8rem;color:var(--rf-dim);}
#screen-planet .fin-dl b{grid-column:2;grid-row:1 / span 2;align-self:center;font-weight:700;}

/* ---------- images d'attente ---------- */
#screen-planet .fin-blank{display:flex;flex-direction:column;align-items:center;gap:12px;padding:18px 12px;text-align:center;}
#screen-planet .fin-blank-img{--rf-cut:12px;width:min(420px, 80%);aspect-ratio:16/9;object-fit:cover;opacity:.92;}

/* ---------- étroit ---------- */
@media (max-width: 1500px){
  /* sous-onglets plus serrés, vignettes plus petites */
  #screen-planet .fin-tab{gap:10px;padding:8px 14px 9px;}
  #screen-planet .fin-tab-ic{width:19px;height:19px;}
  #screen-planet .fin-tab-name{font-size:.8rem;}
  #screen-planet .fin-tab-n{font-size:.78rem;}
  #screen-planet .fin-bthumb{width:46px;height:32px;}
  #screen-planet .fin-bname{gap:8px;}
  #screen-planet .fin-btable td{padding:6px 7px;}
  #screen-planet .fin-btable thead th{white-space:nowrap;}
  #screen-planet .fin-btable thead th:not(:has(button)){padding:7px;letter-spacing:.03em;}
  #screen-planet .fin-bn{font-size:.9rem;white-space:nowrap;}
  #screen-planet .fin-btable .fin-split{display:none;}
  #screen-planet .fin-staff{width:52px;}
  #screen-planet .fin-btable .fin-outs{gap:2px 10px;}
  #screen-planet .fin-flows{grid-template-columns:minmax(0,1fr);gap:4px;}
  #screen-planet .fin-ines-face{width:72px;}
  #screen-planet .fin-sites{max-width:14ch;}
}
