*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%;font-family:Inter,"Segoe UI",Arial,sans-serif;color:#172033;background:#f3f5f8}button,input,select{font:inherit}.app{min-height:100vh}.topbar{height:68px;background:#13243a;color:#fff;display:flex;align-items:center;padding:0 28px;gap:30px;position:sticky;top:0;z-index:30;box-shadow:0 6px 22px #17203326}.brand{display:flex;align-items:center;gap:12px;min-width:310px}.helmet{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#c99a45;color:#172033;font:bold 22px Georgia}.brand strong{display:block;font:700 18px Georgia;color:#f7e7bd;letter-spacing:.04em}.brand span{display:block;margin-top:4px;font-size:9px;font-weight:800;letter-spacing:.15em;color:#aebed0}.topbar nav{display:flex;gap:4px;flex:1}.topbar nav span{padding:9px 12px;border-radius:8px;font-size:10px;font-weight:800;color:#afbed0}.topbar nav .active{background:#ffffff12;color:#fff}.badge{font-size:9px;font-weight:900;letter-spacing:.08em;color:#f5d995;background:#0d1b2d;border:1px solid #36506e;padding:7px 11px;border-radius:999px}
main{max-width:1900px;margin:auto;padding:18px 20px 28px}.card{background:#fff;border:1px solid #dfe5ec;border-radius:14px;box-shadow:0 5px 18px #2230440b}.setup{display:grid;grid-template-columns:minmax(360px,1fr) minmax(220px,.55fr) 240px;gap:14px;padding:14px 16px;border-top:3px solid #c99a45}.setup label,.export-panel>label,.ally-manager label,.period-card label{display:flex;flex-direction:column;gap:5px;font-size:9px;font-weight:900;letter-spacing:.06em;color:#6c7b8e}.setup input,.export-panel input,.export-panel select,.ally-manager select,.period-card input,.period-card select,.corps input,.corps select,.search{height:34px;border:1px solid #d4dce6;border-radius:8px;background:#fff;color:#1c2a3b;padding:0 10px;outline:none;transition:.15s}.setup input:focus,.export-panel input:focus,.export-panel select:focus,.period-card input:focus,.period-card select:focus,.corps input:focus,.corps select:focus,.search:focus{border-color:#9b7540;box-shadow:0 0 0 3px #c99a4518}.army-field input:disabled{background:#f8f3e8;color:#42351e;font-weight:800}.points{display:flex;flex-direction:column;justify-content:center}.points>span{font-size:8px;font-weight:900;letter-spacing:.14em;color:#8793a2}.points strong{font-size:25px;line-height:1;color:#287044}.points strong.danger{color:#b43b36}.points>div{height:5px;background:#e8edf2;border-radius:99px;margin-top:7px;overflow:hidden}.points i{display:block;height:100%;background:#3d8a59;border-radius:99px}
.period-card{margin-top:14px;padding:16px 18px;border-top:3px solid #375a7c}.period-heading{display:flex;justify-content:space-between;gap:20px}.eyebrow{font-size:8px;font-weight:900;letter-spacing:.15em;color:#a8792e}.period-heading h2{margin:4px 0;font:700 21px Georgia;color:#243c58}.period-heading p{margin:0;max-width:800px;font-size:10px;line-height:1.45;color:#718094}.current-year{min-width:160px;background:#203f60;color:#fff;border-radius:11px;padding:11px 14px}.current-year span{display:block;font-size:7px;font-weight:900;letter-spacing:.14em;color:#b7cce0}.current-year strong{display:block;margin-top:3px;font-size:17px}.date-row{display:grid;grid-template-columns:1fr 160px;gap:16px;align-items:end;margin-top:13px}.year-control input{width:100%;accent-color:#a87b34}.range-labels{display:flex;justify-content:space-between;font-size:8px;color:#8b97a5}.historical-options{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:13px}.historical-options button{position:relative;min-height:65px;text-align:left;border:1px solid #dfe5ec;background:#fafbfd;border-radius:10px;padding:10px 10px 9px 31px;cursor:pointer;transition:.14s}.historical-options button:hover:not(:disabled){border-color:#c49a54;background:#fff}.historical-options button.selected{background:#fff7e7;border-color:#c99a45;box-shadow:inset 0 0 0 1px #c99a45}.historical-options button:disabled{opacity:.42;cursor:not-allowed}.option-dot{position:absolute;left:11px;top:12px;width:12px;height:12px;border:2px solid #aeb9c6;border-radius:50%;background:#fff}.selected .option-dot{border:4px solid #b58537}.historical-options strong{display:block;font-size:10px;color:#26394e}.historical-options small{display:block;margin-top:3px;font-size:8px;color:#77879a}.historical-options em{display:block;margin-top:4px;font-size:7px;color:#a64d46;font-style:normal;font-weight:800}.option-explainer{display:flex;gap:9px;margin-top:10px;border-left:3px solid #c99a45;background:#fbf6eb;padding:8px 10px;border-radius:7px}.option-explainer strong,.option-explainer span{font-size:9px}.option-explainer strong{color:#70511e}.option-explainer span{color:#746957}.period-rules{display:grid;grid-template-columns:1.3fr .7fr;gap:8px;margin-top:9px}.rule-block{padding:8px 10px;border-radius:8px;background:#f7f9fb;border:1px solid #e5e9ef;display:flex;flex-direction:column;gap:3px}.rule-block>b{font-size:8px;color:#53677d}.rule-block span{font-size:8px;color:#728194}.civil-side{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;margin-top:9px;border:1px solid #dfe5ec;border-radius:8px;background:#f8fafc}.civil-side span{font-size:9px;font-weight:900}.civil-side button{border:1px solid #d4dce6;background:#fff;border-radius:7px;padding:5px 10px;font-size:8px;font-weight:900}.civil-side button.active{background:#203f60;color:#fff}
.workspace{display:grid;grid-template-columns:330px minmax(700px,1fr) 325px;gap:14px;margin-top:14px;align-items:start}.units-panel,.builder,.export-panel{padding:12px}.units-panel{max-height:calc(100vh - 88px);overflow:auto;position:sticky;top:82px;background:#fbfcfe}.export-panel{position:sticky;top:82px;background:#fffdfa}.section-title{display:flex;justify-content:space-between;align-items:end;margin-bottom:9px}.section-title span{font-size:11px;font-weight:900;letter-spacing:.1em;color:#28435f}.section-title small{font-size:8px;color:#8a96a5}.search{width:100%;margin-bottom:8px}.class-chips{display:flex;gap:5px;overflow:auto;padding-bottom:3px}.class-chips button{flex:0 0 auto;border:1px solid #dce3eb;background:#fff;border-radius:999px;padding:5px 8px;cursor:pointer}.class-chips button b{font-size:9px}.class-chips button span{display:none}.class-chips button.active{background:#203f60;color:#fff;border-color:#203f60}.target{display:flex;gap:8px;align-items:center;background:#fff8ea;border:1px dashed #d6b16d;border-radius:8px;padding:7px 9px;margin:8px 0}.target>span{color:#a47831}.target strong{display:block;font-size:9px}.target small{display:block;font-size:7px;color:#887551}.unit-list{display:flex;flex-direction:column;gap:7px}.unit-group{border:1px solid #e1e6ec;border-left:3px solid var(--class-color,#8091a4);border-radius:9px;overflow:hidden;background:#fff}.unit-group-title{display:flex;align-items:center;gap:7px;background:#f7f9fb;padding:6px 8px;border-bottom:1px solid #e7ebf0}.unit-group-title>span{width:20px;height:20px;display:grid;place-items:center;border-radius:6px;background:var(--class-color,#8091a4);color:#fff;font-size:10px}.unit-group-title strong{flex:1;font-size:8px}.unit-group-title em{font-style:normal;font-size:7px;color:#8995a3}.unit-card{width:100%;display:flex;justify-content:space-between;gap:8px;text-align:left;border:0;border-bottom:1px solid #edf0f4;background:#fff;padding:8px 9px;cursor:grab}.unit-card:hover:not(:disabled){background:#f8fafc}.unit-card:disabled{opacity:.42}.unit-card strong{display:block;font-size:9px;color:#25394e}.unit-card>div>span{display:block;margin-top:2px;font-size:7px;color:#718094}.unit-card small{display:block;margin-top:3px;font-size:7px;color:#8a6835}.type-tags{display:flex;gap:3px;flex-wrap:wrap;margin-top:3px}.type-tag,.type-pill{display:inline-flex;align-items:center;border-radius:999px;background:color-mix(in srgb,var(--class-color,#8091a4) 12%,#fff);border:1px solid color-mix(in srgb,var(--class-color,#8091a4) 30%,#fff);color:color-mix(in srgb,var(--class-color,#8091a4) 75%,#223044);font-weight:900}.type-tag{padding:1px 5px;font-size:6px}.type-pill{padding:2px 5px;font-size:6px;margin-top:3px}.minmax{display:flex;flex-direction:column;align-items:end;justify-content:center;min-width:46px}.minmax span{font-size:7px}.minmax em{font-size:6px;font-style:normal;font-weight:900;color:#a65d22}.minmax b{margin-top:3px;width:21px;height:21px;display:grid;place-items:center;border-radius:50%;background:#203f60;color:#fff}.option-tag,.external-ally-tag{display:inline-block;margin-left:4px;padding:1px 4px;border-radius:999px;font-size:5px;font-style:normal}.option-tag{background:#e8f1ff;color:#315f93}.external-ally-tag{background:#fff0d7;color:#835b12}.ally-reserve-banner{display:flex;flex-direction:column;gap:1px;margin-bottom:8px;padding:8px 9px;border-radius:8px;background:#eef5fb;border-left:3px solid #4f77a4}.ally-reserve-banner strong{font-size:9px}.ally-reserve-banner span,.ally-reserve-banner small{font-size:7px}
.tabs{display:flex;justify-content:space-between;margin:-12px -12px 10px;padding:10px 12px;border-bottom:1px solid #e1e6ec;background:#f8fafc;border-radius:14px 14px 0 0}.tabs b{font-size:10px;letter-spacing:.09em;color:#304a67}.tabs span{font-size:8px;color:#8390a0}.corps{border:1px solid #dfe5ec;border-radius:11px;overflow:hidden;margin-bottom:10px;background:#fff;transition:.14s}.corps.selected{border-color:#c49a54;box-shadow:0 0 0 2px #c99a4520}.corps.drag-over{border:2px dashed #4b78a7}.ally-corps{border-color:#b88a3f}.corps-head{display:grid;grid-template-columns:minmax(165px,1.15fr) minmax(145px,.9fr) 105px 105px 62px;gap:7px;align-items:center;padding:8px 9px;background:#f7f9fb;border-bottom:1px solid #e2e7ed}.ally-corps .corps-head{background:#fff8eb}.corps-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.corps-title>strong{font-size:11px;letter-spacing:.06em;color:#253f5c}.chief{font-size:7px;font-weight:800;color:#758497}.chief input{width:auto;height:auto}.ally-chip{padding:2px 6px;border-radius:999px;background:#8b6325;color:#fff;font-size:6px;font-weight:900}.corps-head .gen-name{background:transparent;border-color:transparent;font-weight:700}.corps-head .gen-name:hover,.corps-head .gen-name:focus{background:#fff;border-color:#d4dce6}.corps-head select{background:#fff}.corps-total{background:#203f60;color:#fff;border-radius:999px;padding:6px 5px;text-align:center;font-size:8px;font-weight:900}.table-head,.line{display:grid;grid-template-columns:22px 1.15fr 1.05fr 48px 1.3fr 75px 68px;gap:6px;align-items:center}.table-head{padding:5px 8px;background:#edf1f5;font-size:7px;font-weight:900;color:#6b7c90}.line{padding:6px 8px;border-bottom:1px solid #edf0f4;border-left:3px solid var(--class-color,#8091a4);min-height:54px}.line:hover{background:#fafbfd}.drag-handle{font-size:14px;color:#a0aab6;cursor:grab;text-align:center}.line-name strong{display:block;font-size:9px}.line-name small{display:block;margin-top:2px;font-size:6px;color:#8995a3}.type-select-wrap select{width:100%;height:30px;font-size:8px}.line input[type=number]{width:100%;height:30px;font-size:8px}.options{display:flex;gap:3px;align-items:center;flex-wrap:wrap}.options select{height:29px;min-width:76px;font-size:8px}.options label{display:flex;align-items:center;gap:2px;background:#f2f5f8;border-radius:999px;padding:3px 5px;font-size:6px;font-weight:800;color:#52657a}.options label input{width:auto;height:auto}.cost{font-size:8px;color:#536176;text-align:right}.cost span{display:block;font-size:9px;color:#1f3957}.line-actions{display:flex;gap:3px;justify-content:end}.line-actions button{border-radius:7px;border:1px solid #dde3ea;background:#fff;padding:4px 6px;font-size:6px;font-weight:900;cursor:pointer}.split{color:#6e571e;background:#fff8e8!important}.trash{font-size:12px!important;color:#a53a34!important;background:#fff2f1!important}.empty{padding:12px;text-align:center;font-size:8px;color:#8a96a5;background:#fbfcfd}.invalid-line{opacity:.65;background:#fff5f3!important;border-left-color:#c94b43!important}.invalid-badge{display:inline-block;margin-top:3px;padding:2px 5px;border-radius:999px;background:#b93832;color:#fff;font-size:5px;font-weight:900}.summary{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #e0e5eb;border-radius:10px;overflow:hidden}.summary div{padding:8px;text-align:center;background:#f8fafc;border-right:1px solid #e5e9ef}.summary div:last-child{border-right:0;background:#fff6e5}.summary span{display:block;font-size:6px;font-weight:900;letter-spacing:.09em;color:#8794a3}.summary b{display:block;margin-top:2px;font-size:13px;color:#2f4966}
.ally-manager{padding:10px;border:1px solid #dce4ed;border-radius:10px;background:#f7fafc}.ally-manager h3{margin:0 0 8px;font-size:10px;color:#2d4f73}.ally-manager h3 small{font-size:7px;color:#7c8d9f}.ally-status{margin-top:7px;padding:7px 8px;border-radius:8px;display:flex;flex-direction:column;gap:1px}.ally-status.ok{background:#edf7ef;color:#2d6e3b}.ally-status.bad{background:#fff0ef;color:#933e37}.ally-status strong{font-size:8px}.ally-status span,.ally-status small{font-size:7px}.ally-help{margin:7px 0 0;font-size:7px;line-height:1.4;color:#6d7d90}.export-panel hr{border:0;border-top:1px solid #e4e8ed;margin:11px 0}.defenses{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}.excel{width:100%;margin-top:10px;border:0;border-radius:9px;padding:10px;background:#c99a45;color:#1c2430;font-size:8px;font-weight:900;letter-spacing:.05em;cursor:pointer}.excel:disabled{opacity:.42}.validity{margin-top:9px;border-radius:8px;padding:8px}.validity.valid{background:#edf7ef;color:#2f7040}.validity.invalid{background:#fff3f1;color:#8b4039}.validity strong{font-size:8px}.validity ul{margin:5px 0 0;padding-left:15px;max-height:150px;overflow:auto}.validity li{font-size:7px;line-height:1.35;margin-bottom:2px}.legend{margin-top:9px;padding:8px;border:1px solid #e2e7ed;border-radius:8px;background:#fafbfc}.legend>b{display:block;font-size:7px;margin-bottom:6px}.legend>div{display:grid;grid-template-columns:1fr 1fr;gap:4px}.legend span{display:flex;align-items:center;gap:4px;font-size:6px;color:#718090}
.class-li{--class-color:#3f8b65}.class-lmi{--class-color:#4d86a4}.class-mi{--class-color:#c47b36}.class-hi{--class-color:#b6534c}.class-lh{--class-color:#6673c4}.class-cv{--class-color:#6653aa}.class-hch{--class-color:#59467d}.class-ct{--class-color:#76506e}.class-kn{--class-color:#9b633a}.class-el{--class-color:#8c7742}.class-art{--class-color:#697889}.class-wwg{--class-color:#788367}.class-sch{--class-color:#9e5f73}footer{padding:14px;background:#13243a;color:#9fb0c3;font-size:8px;text-align:center}
@media(max-width:1450px){.workspace{grid-template-columns:300px minmax(620px,1fr) 300px}.corps-head{grid-template-columns:minmax(150px,1fr) minmax(130px,.8fr) 95px 95px 58px}.table-head,.line{grid-template-columns:20px 1fr .95fr 44px 1.15fr 68px 60px}}
@media(max-width:1150px){.workspace{grid-template-columns:1fr}.units-panel,.export-panel{position:static;max-height:none}.historical-options{grid-template-columns:repeat(2,1fr)}.setup{grid-template-columns:1fr 1fr}.points{grid-column:1/-1}}
.army-field select{width:100%;height:38px;border:1px solid #cfd8e3;border-radius:9px;background:#fff;padding:0 11px;font-size:11px;font-weight:800;color:#243d58;outline:none}.army-field select:focus{border-color:#c4974e;box-shadow:0 0 0 3px #c4974e1f}.army-status{display:block;margin-top:5px;font-size:7px;font-weight:800;letter-spacing:.03em}.army-status.ready{color:#347247}.army-status.indexed{color:#8a6835}.pending-army{max-width:900px;margin:16px auto;padding:28px;display:flex;gap:22px;align-items:flex-start;border:1px solid #e2d1b2;background:linear-gradient(135deg,#fffdf8,#f8f3e9)}.pending-icon{width:52px;height:52px;display:grid;place-items:center;border-radius:14px;background:#203f60;color:#fff;font-size:22px;flex:0 0 auto}.pending-army h2{margin:4px 0 8px;font-size:21px;color:#223b57}.pending-army p{margin:0;max-width:760px;font-size:11px;line-height:1.6;color:#607187}.pending-actions{display:flex;gap:12px;align-items:center;margin-top:16px;flex-wrap:wrap}.pending-actions button{border:0;border-radius:9px;background:#203f60;color:white;padding:9px 13px;font-size:9px;font-weight:900;cursor:pointer}.pending-actions span{font-size:8px;color:#8a6a36;font-weight:800}

/* V2.3 — revue des 300 sources importées */
.source-review{padding:22px 24px;margin-bottom:20px}
.source-review-head{display:flex;gap:24px;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #e7dfd2;padding-bottom:18px;margin-bottom:18px}
.source-review-head h2{margin:4px 0 6px;font-size:26px;color:#18243a}.source-review-head p{max-width:760px;margin:0;color:#667085;line-height:1.5}
.source-status{min-width:165px;background:#13233c;color:white;border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:4px;box-shadow:0 8px 22px #13233c20}.source-status strong{color:#e7bf73}.source-status span{font-weight:700}.source-status small{color:#c9d2df}
.source-meta{display:grid;grid-template-columns:1fr 1fr .7fr 1.4fr;gap:10px;margin-bottom:14px}.source-meta>div{background:#fbf8f2;border:1px solid #eadfcd;border-radius:12px;padding:11px 12px;display:flex;flex-direction:column;gap:4px}.source-meta span{font-size:11px;font-weight:800;color:#8b7351;text-transform:uppercase;letter-spacing:.06em}.source-meta b{font-size:14px;color:#25344c}
.source-flags,.source-allies{display:flex;gap:12px;align-items:flex-start;margin:10px 0}.source-flags>b,.source-allies>b{min-width:180px;font-size:12px;color:#344054}.source-flags>div,.source-allies>div{display:flex;flex-wrap:wrap;gap:6px}.source-flags span{background:#eef2f7;color:#344054;border:1px solid #d8e0ea;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:700}.source-allies span{background:#fff7e9;color:#7a5421;border:1px solid #edd7ad;border-radius:8px;padding:5px 8px;font-size:11px}
.source-columns{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(300px,.8fr);gap:16px;margin-top:18px}.source-block{border:1px solid #e1d8c9;background:#fffdf9;border-radius:14px;overflow:hidden}.source-block-title{background:#f4efe6;border-bottom:1px solid #e1d8c9;padding:11px 14px;display:flex;justify-content:space-between;align-items:center}.source-block-title b{font-size:12px;letter-spacing:.05em;color:#26364f}.source-block-title small{color:#8a8176}.source-block pre{margin:0;padding:14px 16px;max-height:560px;overflow:auto;white-space:pre-wrap;font:12px/1.48 ui-monospace,SFMono-Regular,Consolas,monospace;color:#374151;background:#fff}.source-side{display:flex;flex-direction:column;gap:16px}.source-block.notes pre{max-height:300px}.review-next{background:linear-gradient(145deg,#172944,#213956);color:#fff;border-radius:14px;padding:16px}.review-next strong{color:#e7bf73}.review-next p{font-size:12px;line-height:1.5;color:#d8e0ea}.review-next button{border:0;border-radius:9px;background:#e7bf73;color:#1b2b43;font-weight:800;padding:9px 11px;cursor:pointer}.missing-source{padding:30px;text-align:center;color:#9b1c31}
@media(max-width:1050px){.source-meta{grid-template-columns:1fr 1fr}.source-columns{grid-template-columns:1fr}.source-status{min-width:140px}}

/* V2.4 — métadonnées historiques par liste */
.strategist-strip{margin-top:14px;padding:14px 16px;border:1px solid #d9c99f;border-radius:14px;background:linear-gradient(135deg,#fffaf0,#f4ead2);display:flex;align-items:center;justify-content:space-between;gap:18px}.strategist-strip>div{display:flex;flex-direction:column;gap:3px}.strategist-strip span{font-size:11px;font-weight:800;letter-spacing:.09em;color:#876b32}.strategist-strip strong{font-size:15px;color:#283349}.strategist-strip small{max-width:360px;color:#6f6d67;text-align:right}.period-segments{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.period-segments span{font-size:11px;font-weight:700;padding:4px 8px;border-radius:999px;background:#ede6d7;color:#665837;border:1px solid #ddd0b2}
@media(max-width:900px){.strategist-strip{align-items:flex-start;flex-direction:column}.strategist-strip small{text-align:left}}


/* V2.5 — contrôles compacts et lisibles */
.compact-select{appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,#607286 50%),linear-gradient(135deg,#607286 50%,transparent 50%);background-position:calc(100% - 13px) 50%,calc(100% - 9px) 50%;background-size:4px 4px,4px 4px;background-repeat:no-repeat;padding-right:27px!important;cursor:pointer}
.compact-select:hover:not(:disabled){border-color:#aebdcb;background-color:#fcfdff}.compact-select:disabled{cursor:not-allowed;opacity:.55;background-color:#f4f6f8}
.corps-head{grid-template-columns:minmax(175px,1.05fr) minmax(150px,.82fr) 108px 118px 64px;gap:8px;padding:9px 11px}.corps-head .gen-name{height:32px!important;border:1px solid transparent!important;border-radius:9px!important;background:transparent!important;font-size:10px!important;font-weight:750!important;color:#263b53!important;padding:0 9px!important}.corps-head .gen-name:hover,.corps-head .gen-name:focus{background:#fff!important;border-color:#cfd9e4!important;box-shadow:0 0 0 3px #315d8510!important}.general-select{height:32px!important;border:1px solid #cfd9e4!important;border-radius:999px!important;background-color:#fff!important;font-size:9px!important;font-weight:750!important;color:#2d4057!important;padding-left:11px!important}.ally-corps .general-select{background-color:#fffaf0!important;border-color:#dec38d!important}.corps-total{min-width:62px;padding:7px 7px;font-size:8px;box-shadow:inset 0 0 0 1px #ffffff12}
.table-head,.line{grid-template-columns:20px minmax(150px,1.15fr) minmax(180px,1.08fr) 86px minmax(155px,1.15fr) 70px 62px}.line{min-height:62px;padding:8px 9px;gap:8px}.line-name strong{font-size:9.5px;line-height:1.25}.line-name small{font-size:6.5px;letter-spacing:.03em}
.type-select-wrap{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0}.type-select-wrap .type-control{width:100%;height:32px!important;border:1px solid #d2dbe5!important;border-radius:9px!important;background-color:#fbfcfe!important;font-size:9px!important;font-weight:650!important;color:#283e57!important;padding-left:10px!important;box-shadow:0 1px 2px #17203308}.type-select-wrap .type-control:hover:not(:disabled){background-color:#fff!important;border-color:#aebdcb!important}.type-pill{margin-top:0;padding:3px 7px;font-size:6.5px;letter-spacing:.02em}
.qty-stepper{height:32px;display:grid;grid-template-columns:26px 1fr 26px;align-items:center;border:1px solid #d2dbe5;border-radius:999px;background:#fff;overflow:hidden;box-shadow:0 1px 2px #17203308}.qty-stepper button{height:100%;border:0;background:#f3f6f9;color:#35506d;font-size:14px;font-weight:800;cursor:pointer;line-height:1}.qty-stepper button:hover:not(:disabled){background:#e7eef5;color:#173a60}.qty-stepper button:disabled{opacity:.34;cursor:not-allowed}.qty-stepper span{text-align:center;font-size:10px;font-weight:850;color:#203b58;min-width:24px}.qty-stepper.disabled{opacity:.55}
.options{gap:5px}.options .quality-control{height:30px!important;min-width:88px!important;border:1px solid #d2dbe5!important;border-radius:999px!important;background-color:#fff!important;font-size:8.5px!important;font-weight:750!important;color:#334b64!important;padding-left:10px!important}.options label{min-height:28px;padding:4px 8px;border:1px solid #dce4ec;background:#f7f9fb;border-radius:999px;font-size:7px;color:#455d76;transition:.12s}.options label:hover{background:#eef3f7;border-color:#c8d4df}.options label input{accent-color:#315d85}
.cost{font-size:7.5px}.cost span{font-size:9.5px;margin-top:2px}.line-actions button{min-height:28px;border-radius:8px}.split{padding:4px 7px!important}.trash{width:28px;height:28px;padding:0!important;display:grid;place-items:center}
@media(max-width:1450px){.corps-head{grid-template-columns:minmax(155px,1fr) minmax(130px,.75fr) 100px 108px 58px}.table-head,.line{grid-template-columns:18px minmax(135px,1fr) minmax(165px,.95fr) 82px minmax(145px,1fr) 64px 58px}}

.strategist-notice{max-width:1500px;margin:12px auto 0;padding:10px 14px;border:1px solid #d7b869;background:#fff7df;border-radius:12px;display:flex;align-items:center;gap:10px;color:#5a4518;box-shadow:0 4px 14px rgba(65,48,10,.08)}.strategist-notice span{font-size:18px}.strategist-notice strong{font-size:13px;flex:1}.strategist-notice button{border:0;background:transparent;color:#745c28;font-size:20px;cursor:pointer;padding:0 4px}

/* V2.7 — lisibilité FHD 27\" + alignement des contrôles */
:root{font-size:16px}
body{font-size:14px;line-height:1.35}
button,input,select{font-size:12px}
main{max-width:1920px;padding:18px 18px 30px}
.workspace{grid-template-columns:300px minmax(760px,1fr) 285px;gap:16px}
.builder{min-width:0}
.corps{overflow:hidden}
.corps-head>* ,.table-head>* ,.line>*{min-width:0}
.corps input,.corps select{max-width:100%;min-width:0}

/* En-tête de corps : alignement horizontal stable */
.corps-head{
  grid-template-columns:minmax(190px,1.05fr) minmax(180px,1.05fr) 120px 128px 76px;
  gap:10px;
  padding:11px 13px;
  min-height:58px;
}
.corps-title>strong{font-size:13px}
.chief{font-size:10px;gap:5px}
.ally-chip{font-size:8px;padding:3px 7px}
.corps-head .gen-name{
  width:100%!important;height:38px!important;
  font-size:13px!important;font-weight:700!important;
  padding:0 11px!important;border-radius:10px!important;
}
.general-select{
  width:100%!important;height:38px!important;
  font-size:12px!important;font-weight:750!important;
  padding-left:13px!important;padding-right:30px!important;
}
.corps-total{min-width:76px;padding:10px 8px;font-size:11px;border-radius:999px;text-align:center}

/* Colonnes unités : plus larges et parfaitement alignées */
.table-head,.line{
  grid-template-columns:22px minmax(190px,1.15fr) minmax(235px,1.30fr) 92px minmax(190px,1.12fr) 82px 72px;
  gap:10px;
}
.table-head{padding:8px 12px}
.table-head span{font-size:9px;letter-spacing:.035em;font-weight:900;color:#607186}
.line{min-height:78px;padding:11px 12px;align-items:center}
.line-name strong{font-size:12.5px;line-height:1.3}
.line-name small{font-size:8.5px;line-height:1.25;margin-top:3px}
.invalid-badge{font-size:8px}
.drag-handle{font-size:15px}

/* Type / classe */
.type-select-wrap{gap:6px}
.type-select-wrap .type-control{
  height:38px!important;font-size:12px!important;font-weight:650!important;
  padding-left:12px!important;padding-right:30px!important;border-radius:10px!important;
}
.type-pill{padding:4px 8px;font-size:9px;line-height:1}

/* Quantité */
.qty-stepper{height:38px;grid-template-columns:30px 1fr 30px;border-radius:12px}
.qty-stepper button{font-size:18px}
.qty-stepper span{font-size:13px;min-width:28px}

/* Qualité / options */
.options{gap:7px;align-items:center;flex-wrap:wrap}
.options .quality-control{
  height:36px!important;min-width:105px!important;
  font-size:11.5px!important;padding-left:12px!important;padding-right:28px!important;
}
.options label{min-height:34px;padding:6px 10px;font-size:10px;gap:5px}
.options label input{width:15px;height:15px}

.cost{font-size:10px;line-height:1.15}
.cost span{font-size:12px;margin-top:4px}
.line-actions{gap:5px}
.line-actions button{font-size:10px;min-height:32px}
.trash{width:32px;height:32px;font-size:16px}

/* Le reste de l'UI n'utilise plus de micro-texte */
.tabs b,.section-title span{font-size:12px}
.tabs span,.section-title small{font-size:10px}
.unit-group-title strong{font-size:10px}
.unit-group-title em{font-size:9px}
.unit-card strong{font-size:11.5px}
.unit-card>div>span,.unit-card small{font-size:9.5px;line-height:1.3}
.type-tag{font-size:8px;padding:2px 6px}
.minmax span{font-size:9px}.minmax em{font-size:8px}.minmax b{font-size:10px}
.target strong{font-size:11px}.target small{font-size:9px}
.setup label,.export-panel>label,.ally-manager label,.period-card label{font-size:10.5px}
.setup input,.export-panel input,.export-panel select,.ally-manager select,.period-card input,.period-card select,.search{height:38px;font-size:12px}
.period-heading p{font-size:12px}.eyebrow{font-size:10px}
.current-year span{font-size:9px}.current-year strong{font-size:19px}
.range-labels{font-size:10px}
.historical-options strong{font-size:12px}.historical-options small{font-size:10px}.historical-options em{font-size:9px}
.option-explainer strong,.option-explainer span{font-size:11px}
.rule-block>b{font-size:10px}.rule-block span{font-size:10px}
.validity strong{font-size:10px}.validity li{font-size:9.5px}
.legend>b{font-size:9px}.legend span{font-size:8.5px}

@media(max-width:1600px){
  .workspace{grid-template-columns:280px minmax(700px,1fr) 270px;gap:12px}
  .corps-head{grid-template-columns:minmax(170px,1fr) minmax(160px,.95fr) 112px 120px 70px}
  .table-head,.line{grid-template-columns:20px minmax(170px,1.05fr) minmax(205px,1.15fr) 86px minmax(175px,1fr) 76px 66px}
}
@media(max-width:1280px){
  .workspace{grid-template-columns:1fr}
  .units-panel,.export-panel{position:static;max-height:none}
  .corps-head{grid-template-columns:minmax(170px,1fr) minmax(160px,1fr) 112px 120px 70px}
}

/* =========================================================
   V2.8 — composition UX refresh
   Objectif : supprimer l'effet "textbox", améliorer la densité
   et la lisibilité sur 27\" FHD à zoom navigateur 100%.
   ========================================================= */

:root{
  --ui-ink:#1f3349;
  --ui-muted:#65778a;
  --ui-line:#dce4ec;
  --ui-soft:#f6f8fb;
  --ui-blue:#203f60;
  --ui-gold:#c49345;
}

/* Plus de place au builder central */
.workspace{grid-template-columns:260px minmax(760px,1fr) 260px;gap:12px}
.builder{padding:14px}

/* Corps = carte compacte et réellement structurée */
.corps{border-radius:14px;margin-bottom:14px;box-shadow:0 2px 8px #24364a0a}
.corps-head{
  grid-template-columns:minmax(190px,1fr) minmax(210px,.95fr) 120px 132px 78px;
  gap:12px;
  min-height:64px;
  padding:10px 14px;
  background:linear-gradient(180deg,#f9fbfd,#f3f6f9);
}
.corps-title>strong{font-size:14px;letter-spacing:.045em;color:#163a5d}
.chief{font-size:10.5px;color:#5f7286;gap:5px;display:inline-flex;align-items:center}
.chief input{width:15px!important;height:15px!important;accent-color:#1e66c5}
.ally-chip{font-size:8.5px;padding:4px 8px}

/* Le nom du général n'a plus l'apparence d'une textbox permanente */
.corps-head .gen-name{
  height:38px!important;
  border:0!important;
  border-bottom:1px solid transparent!important;
  border-radius:0!important;
  background:transparent!important;
  font-size:13.5px!important;
  font-weight:800!important;
  color:var(--ui-ink)!important;
  padding:0 4px!important;
}
.corps-head .gen-name:hover{background:#ffffff80!important;border-bottom-color:#b9c8d6!important}
.corps-head .gen-name:focus{background:#fff!important;border-bottom-color:#416b94!important;box-shadow:none!important}

/* Selects de général = vrais "pills" */
.general-select{
  height:38px!important;
  border:1px solid #cad6e2!important;
  border-radius:999px!important;
  background:#fff!important;
  font-size:11.5px!important;
  font-weight:800!important;
  color:#263f58!important;
  padding:0 32px 0 14px!important;
  box-shadow:0 1px 2px #1e33470a!important;
}
.general-select:hover{border-color:#9eb2c5!important;background:#fbfdff!important}
.corps-total{min-width:76px;padding:9px 8px;font-size:11px;border-radius:999px}

/* Entête de colonnes plus lisible */
.table-head,
.line{
  grid-template-columns:24px minmax(190px,1.15fr) minmax(210px,1.2fr) 96px minmax(190px,1.1fr) 82px 76px;
  gap:10px;
}
.table-head{
  padding:8px 12px;
  font-size:9.5px;
  letter-spacing:.035em;
  background:#eaf0f5;
  color:#50667b;
}
.line{
  min-height:72px;
  padding:10px 12px;
  background:#fff;
}
.line:hover{background:#fbfcfe}
.drag-handle{font-size:17px;color:#aab6c2}
.line-name strong{font-size:13.5px;line-height:1.25;color:#1f3349}
.line-name small{font-size:9px;line-height:1.2;margin-top:4px;color:#8190a0;font-weight:700}
.invalid-badge{font-size:8px;margin-top:5px}

/* Type : plus de grosse boîte blanche, on édite comme un champ inline */
.type-select-wrap{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px}
.type-select-wrap .type-control{
  width:100%;
  height:34px!important;
  border:0!important;
  border-bottom:1px solid #d4dee8!important;
  border-radius:0!important;
  background-color:transparent!important;
  font-size:12.5px!important;
  font-weight:800!important;
  color:#263f58!important;
  padding:0 28px 0 2px!important;
  box-shadow:none!important;
}
.type-select-wrap .type-control:hover{border-bottom-color:#8fa7bd!important;background:#f8fbfd!important}
.type-select-wrap .type-control:focus{border-bottom-color:#315f89!important;background:#f8fbfd!important;box-shadow:none!important}
.type-pill{padding:4px 8px;font-size:9.5px;margin-top:0}

/* Quantité : stepper lisible */
.qty-stepper{height:38px;grid-template-columns:30px 1fr 30px;border-radius:10px;border-color:#d0dae4}
.qty-stepper button{font-size:18px;background:#f2f6f9}
.qty-stepper span{font-size:13px;font-weight:900}

/* Qualité / options : chips cohérentes, jamais des textbox */
.options{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.options .quality-control{
  height:34px!important;
  min-width:104px!important;
  border:1px solid #cad6e2!important;
  border-radius:999px!important;
  background:#fff!important;
  font-size:10.5px!important;
  font-weight:800!important;
  color:#314b66!important;
  padding:0 28px 0 12px!important;
}
.options label{
  min-height:34px;
  padding:6px 10px;
  border:1px solid #d7e0e8;
  background:#f7f9fb;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  color:#3d5872;
  gap:6px;
  display:inline-flex;
  align-items:center;
}
.options label input{width:15px!important;height:15px!important;margin:0;accent-color:#315f89}

.cost{font-size:10px;color:#65768a;text-align:right}
.cost span{font-size:12.5px;color:#1f3349;margin-top:3px}
.line-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px}
.line-actions button{font-size:9.5px;font-weight:800;min-height:32px}
.split{background:#fff7e5!important;border-color:#e2c37e!important;color:#785719!important}
.trash{border-radius:9px!important}

/* Plus de microtexte dans la zone de composition */
.tabs b{font-size:13px}.tabs span{font-size:10.5px}
.summary span{font-size:9.5px}.summary b{font-size:15px}
.empty{font-size:11px;padding:20px}

/* Sur FHD, ne pas compresser les colonnes jusqu'à l'illisible :
   les sidebars passent sous le builder si l'espace devient trop faible. */
@media(max-width:1550px){
  .workspace{grid-template-columns:240px minmax(720px,1fr) 240px}
  .corps-head{grid-template-columns:minmax(175px,1fr) minmax(190px,.9fr) 112px 124px 74px;gap:9px}
  .table-head,.line{grid-template-columns:22px minmax(175px,1.08fr) minmax(190px,1.08fr) 90px minmax(175px,1fr) 76px 70px;gap:8px}
}
@media(max-width:1360px){
  .workspace{grid-template-columns:1fr}
  .units-panel,.export-panel{position:static;max-height:none}
  .corps-head{grid-template-columns:minmax(180px,1fr) minmax(210px,1fr) 116px 130px 76px}
  .table-head,.line{grid-template-columns:24px minmax(190px,1.15fr) minmax(210px,1.2fr) 96px minmax(190px,1.1fr) 82px 76px}
}
.field-help{display:block;margin-top:5px;font-size:11px;color:#64748b;font-weight:600}

/* =========================================================
   V3.0 — COMFORT / READABILITY PASS
   Priorité : lecture confortable en 1920x1080 sur 27" à 100%.
   Les sidebars ont plus de largeur, aucun texte critique < 10px.
   ========================================================= */

/* Cadre général : exploite toute la largeur d'un écran FHD */
main{max-width:none;width:100%;padding:18px 22px 30px}
.workspace{
  grid-template-columns:360px minmax(760px,1fr) 330px;
  gap:16px;
}
.units-panel,.export-panel{padding:16px}

/* Titres / navigation latérale */
.section-title{margin-bottom:12px;align-items:center}
.section-title span{font-size:15px;letter-spacing:.06em;color:#203f60}
.section-title small{font-size:11.5px;line-height:1.35;color:#738397}
.search{height:44px!important;font-size:14px!important;border-radius:11px!important;padding:0 13px!important;margin-bottom:11px}
.class-chips{gap:7px;padding-bottom:7px}
.class-chips button{padding:7px 11px;border-radius:999px}
.class-chips button b{font-size:11px}

/* Cible / réserve */
.target{padding:10px 12px;margin:10px 0 12px;border-radius:11px;gap:10px}
.target>span{font-size:18px}
.target strong{font-size:13px;line-height:1.25}
.target small{font-size:11px;line-height:1.35;margin-top:2px}
.ally-reserve-banner{padding:11px 12px;margin-bottom:11px;border-radius:10px}
.ally-reserve-banner strong{font-size:13px}
.ally-reserve-banner span,.ally-reserve-banner small{font-size:11px;line-height:1.35}

/* Groupes de classes de la réserve */
.unit-list{gap:10px}
.unit-group{border-radius:12px;border-left-width:4px}
.unit-group-title{padding:9px 10px;gap:9px}
.unit-group-title>span{width:27px;height:27px;border-radius:8px;font-size:13px}
.unit-group-title strong{font-size:12.5px;line-height:1.2}
.unit-group-title em{font-size:10.5px}

/* Cartes unités : le texte doit être lisible sans effort */
.unit-card{padding:11px 11px;gap:10px;min-height:78px;align-items:flex-start}
.unit-card strong{font-size:13.5px;line-height:1.25;color:#18334e}
.unit-card>div>span{font-size:11.5px;line-height:1.35;margin-top:5px;color:#53677d}
.unit-card small{font-size:10.5px;line-height:1.35;margin-top:5px;color:#7a5b2e}
.type-tags{gap:5px;margin-top:5px}
.type-tag{font-size:9.5px;padding:3px 7px}
.option-tag,.external-ally-tag{font-size:8.5px;padding:2px 6px;margin-left:5px}
.minmax{min-width:68px;padding-top:2px}
.minmax span{font-size:11px;font-weight:800;color:#4b5f74}
.minmax em{font-size:9.5px;margin-top:3px}
.minmax b{margin-top:7px;width:30px;height:30px;font-size:14px}

/* Colonne de droite : fini le micro-texte */
.export-panel>label,.ally-manager label{font-size:12px;letter-spacing:.035em;gap:7px;margin-bottom:10px}
.export-panel input,.export-panel select,.ally-manager select{height:42px!important;font-size:13.5px!important;border-radius:10px!important}
.ally-manager h3{font-size:14px;line-height:1.3;margin:0 0 12px;color:#203f60}
.ally-manager h3 small{font-size:10.5px;display:block;margin-top:3px;color:#748398;font-weight:600}
.ally-status{padding:11px 12px!important;border-radius:10px!important}
.ally-status strong{font-size:12.5px!important}
.ally-status span,.ally-status small{font-size:10.5px!important;line-height:1.35!important}
.ally-help{font-size:11px!important;line-height:1.45!important;color:#63758a!important}
.validity{padding:12px!important;border-radius:11px!important}
.validity strong{font-size:13px!important;line-height:1.3!important}
.validity ul{padding-left:18px;margin:8px 0 0}
.validity li{font-size:11.5px!important;line-height:1.4!important;margin:4px 0}
.legend{margin-top:12px!important;padding-top:12px!important}
.legend>b{font-size:11.5px!important}
.legend span{font-size:10.5px!important;line-height:1.35!important}
.legend .type-tag{font-size:9px!important;min-width:40px;justify-content:center}

/* Composition centrale : légèrement plus grande également */
.tabs b{font-size:14px}.tabs span{font-size:11.5px}
.corps-title>strong{font-size:15px}
.chief{font-size:11.5px}
.corps-head .gen-name{font-size:14.5px!important}
.general-select{font-size:12.5px!important}
.table-head span{font-size:10.5px!important}
.line-name strong{font-size:14px}
.line-name small{font-size:10px}
.type-select-wrap .type-control{font-size:13px!important}
.type-pill{font-size:10px;padding:4px 8px}
.options .quality-control{font-size:11.5px!important}
.options label{font-size:10.5px}
.cost{font-size:10.5px}.cost span{font-size:13px}
.summary span{font-size:10.5px}.summary b{font-size:16px}

/* Espace supérieur : descriptions et règles lisibles */
.setup label,.period-card label{font-size:11.5px}
.setup input,.period-card input,.period-card select{height:42px;font-size:13px}
.period-heading h2{font-size:24px}
.period-heading p{font-size:13px;line-height:1.5}
.eyebrow{font-size:11px}
.current-year span{font-size:10px}.current-year strong{font-size:21px}
.range-labels{font-size:11px}
.historical-options button{min-height:76px;padding:12px 12px 11px 35px}
.historical-options strong{font-size:13px}.historical-options small{font-size:11px;line-height:1.35}.historical-options em{font-size:10px}
.option-explainer strong,.option-explainer span{font-size:12px;line-height:1.4}
.rule-block>b{font-size:11.5px}.rule-block span{font-size:11px;line-height:1.4}

/* Sur 1600-1750px on garde les sidebars lisibles, plutôt que les écraser */
@media(max-width:1750px){
  .workspace{grid-template-columns:330px minmax(720px,1fr) 310px;gap:13px}
  .units-panel,.export-panel{padding:14px}
}
@media(max-width:1450px){
  .workspace{grid-template-columns:1fr}
  .units-panel,.export-panel{position:static;max-height:none}
  .units-panel{order:1}.builder{order:2}.export-panel{order:3}
  .unit-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}
@media(max-width:900px){
  main{padding:12px}
  .unit-list{grid-template-columns:1fr}
}


/* =========================================================
   V3.2 — LISIBILITÉ DE LA ZONE SUPÉRIEURE
   Pensé pour écran 27\" FHD à 100 % de zoom navigateur.
   ========================================================= */
.topbar{
  height:76px;
  padding:0 30px;
  gap:34px;
}
.brand{min-width:340px;gap:14px}
.helmet{width:44px;height:44px;border-radius:12px;font-size:24px}
.brand strong{font-size:20px;letter-spacing:.035em}
.brand span{margin-top:5px;font-size:11px;letter-spacing:.13em;color:#c0cede}
.topbar nav{gap:7px}
.topbar nav span{padding:11px 14px;font-size:12px;border-radius:9px}
.badge{font-size:11px;padding:8px 13px}

main{padding-top:20px}
.setup{
  grid-template-columns:minmax(420px,1.45fr) minmax(260px,.75fr) 270px;
  gap:18px;
  padding:18px 20px;
  border-top-width:4px;
}
.setup label,.export-panel>label,.ally-manager label,.period-card label{
  gap:7px;
  font-size:12px;
  line-height:1.2;
  letter-spacing:.045em;
  color:#52657a;
}
.setup input,.setup select,
.export-panel input,.export-panel select,.ally-manager select,
.period-card input,.period-card select{
  height:43px;
  border-radius:10px;
  padding:0 13px;
  font-size:14px;
  border-color:#ccd6e2;
}
.army-field select{font-weight:800;color:#203b58}
.army-status{font-size:11px!important;line-height:1.35;margin-top:1px;letter-spacing:0;font-weight:700}
.points>span{font-size:11px;letter-spacing:.12em;color:#697a8d}
.points strong{font-size:31px;margin-top:2px}
.points>div{height:7px;margin-top:9px}

.period-card{
  margin-top:16px;
  padding:20px 22px 21px;
  border-top-width:4px;
}
.period-heading{align-items:stretch;gap:28px}
.eyebrow{font-size:11px;letter-spacing:.13em}
.period-heading h2{margin:6px 0 6px;font-size:27px;line-height:1.08}
.period-heading p{
  max-width:980px;
  font-size:13px;
  line-height:1.55;
  color:#637489;
}
.current-year{
  min-width:190px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-radius:13px;
  padding:14px 18px;
  box-shadow:inset 0 0 0 1px #ffffff14;
}
.current-year span{font-size:10px;letter-spacing:.13em}
.current-year strong{margin-top:5px;font-size:23px}
.date-row{
  grid-template-columns:minmax(0,1fr) 190px;
  gap:20px;
  margin-top:17px;
}
.range-labels{font-size:11px;margin-top:3px;color:#718195;font-weight:700}

.historical-options{gap:10px;margin-top:17px}
.historical-options button{
  min-height:84px;
  border-radius:12px;
  padding:13px 12px 12px 39px;
}
.option-dot{left:14px;top:16px;width:14px;height:14px}
.historical-options strong{font-size:13px;line-height:1.25}
.historical-options small{margin-top:5px;font-size:11px;line-height:1.35}
.historical-options em{margin-top:5px;font-size:10px;line-height:1.3}
.option-explainer{
  gap:11px;
  margin-top:13px;
  padding:11px 13px;
  border-radius:9px;
}
.option-explainer strong,.option-explainer span{font-size:12px;line-height:1.4}
.period-rules{gap:10px;margin-top:12px}
.rule-block{padding:11px 13px;border-radius:10px;gap:5px}
.rule-block>b{font-size:11px}
.rule-block span{font-size:11px;line-height:1.4}
.civil-side{padding:11px 13px;margin-top:12px;border-radius:10px}
.civil-side span{font-size:12px}
.civil-side button{padding:7px 12px;font-size:11px;border-radius:8px}

.strategist-notice{
  font-size:13px!important;
  line-height:1.4;
}

@media (max-width:1300px){
  .topbar{padding:0 18px;gap:18px}
  .brand{min-width:285px}
  .brand strong{font-size:18px}
  .topbar nav span{font-size:11px;padding:9px 10px}
  .badge{font-size:10px}
  .setup{grid-template-columns:minmax(340px,1.25fr) minmax(220px,.7fr) 220px}
  .historical-options{grid-template-columns:repeat(3,1fr)}
}

/* V3.2 — les classes ADLG doivent être identifiables au premier coup d'œil */
.type-pill,.type-tag{
  background:var(--class-color,#526b82)!important;
  border:0!important;
  color:#fff!important;
  box-shadow:0 2px 5px #17203320;
  letter-spacing:.035em;
}
.type-pill{
  padding:6px 10px!important;
  font-size:11px!important;
  line-height:1.05!important;
  font-weight:950!important;
}
.type-tag{
  padding:4px 7px!important;
  font-size:10.5px!important;
  line-height:1!important;
  font-weight:950!important;
}
.unit-group-title>span{
  width:32px!important;height:32px!important;
  border-radius:9px!important;
  font-size:13px!important;font-weight:950!important;
  box-shadow:0 2px 5px #17203320;
}
.class-chips button{
  min-width:44px;
  padding:8px 10px!important;
  border-width:2px!important;
}
.class-chips button b{font-size:12px!important;font-weight:950!important;letter-spacing:.04em}
.class-chips button.active{box-shadow:0 2px 6px #17203324}
/* V4.0 generic 300-list builder */
.generic-workspace{display:grid;gap:14px}.generic-options{padding:18px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.generic-options h2{margin:4px 0 2px;font-size:22px}.generic-options p{margin:0;font-size:14px;color:var(--muted)}.generic-option-list{max-width:65%;display:grid;gap:8px}.generic-option-list>div{display:flex;flex-wrap:wrap;gap:7px}.generic-option-list button{border:1px solid #c8c0b0;background:#f8f4eb;border-radius:999px;padding:7px 10px;font-weight:750;font-size:12px;cursor:pointer}.generic-option-list button.active{background:#26364a;color:white;border-color:#26364a}.generic-option-list small{font-size:11px;color:var(--muted)}.generic-grid{grid-template-columns:minmax(360px,1.05fr) minmax(720px,2.25fr) minmax(310px,.9fr)}.generic-builder .line{grid-template-columns:minmax(190px,1.4fr) minmax(230px,1.6fr) 100px 100px 34px}.generic-corps-head{grid-template-columns:minmax(220px,1.2fr) minmax(260px,1.4fr) auto}.generic-general{font-size:13px;font-weight:750;color:#49566a}.source-context{display:block;margin-top:5px;color:#8b5b25!important;font-style:italic}.inline-check{display:flex!important;align-items:center;gap:8px;margin-top:8px!important;font-size:12px!important}.inline-check input{width:auto!important}.import-audit{margin-top:14px;background:#f4efe3;border:1px solid #ded3bc;border-radius:12px;padding:12px;display:grid;gap:6px}.import-audit b{font-size:13px}.import-audit p{margin:0;font-size:11px;line-height:1.45;color:#666}.import-audit span{font-size:11px;font-weight:700;color:#5d5143}@media(max-width:1450px){.generic-grid{grid-template-columns:340px minmax(620px,1fr) 300px}.generic-builder .line{grid-template-columns:minmax(160px,1.2fr) minmax(190px,1.4fr) 92px 92px 30px}}@media(max-width:1180px){.generic-grid{grid-template-columns:1fr}.generic-option-list{max-width:100%}.generic-options{flex-direction:column}.generic-builder .line{grid-template-columns:1fr}}

/* V4.1.5 — groupes d'options exclusifs */
.generic-option-group{display:grid!important;gap:6px;width:100%}
.option-group-label{font-size:12px;font-weight:900;color:#26364a;display:flex;align-items:center;gap:4px}
.option-group-label em{font-size:10px;font-style:normal;color:#a35b1f;font-weight:800}
.generic-option-choices{display:flex!important;flex-wrap:wrap;gap:8px!important}
.generic-option-choices button{display:grid;gap:2px;text-align:left;min-width:170px;padding:9px 12px!important}
.generic-option-choices button strong{font-size:12px}
.generic-option-choices button small{font-size:10px!important;color:inherit;opacity:.78}
.generic-option-choices button.active{box-shadow:0 0 0 2px #26364a24,0 2px 6px #17203320}
.invalid-option-line{background:#fff2f0!important;box-shadow:inset 4px 0 0 #c43c30!important;opacity:.78}

/* V4.2 RC — contrôles génériques de généraux et options de troupe */
.generic-general-controls{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;flex-wrap:wrap}
.generic-general-controls .generic-general{white-space:nowrap}
.generic-general-select{min-width:128px!important;height:34px!important;font-size:12px!important;font-weight:750!important}
.generic-included{display:flex!important;align-items:center;gap:5px;font-size:10.5px!important;font-weight:750;color:#5b6777;white-space:nowrap}
.generic-included input{width:auto!important;height:auto!important}
.general-status-pill{padding:5px 8px;border-radius:999px;background:#fff2d8;border:1px solid #dfc38a;color:#77541d;font-size:10px;font-weight:850;white-space:nowrap}
.line-modifiers{display:flex;flex-wrap:wrap;gap:5px;margin-top:1px}
.modifier-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 7px;border:1px solid #d6dee7;border-radius:999px;background:#f7f9fb;color:#536579;font-size:9.5px;font-weight:750;line-height:1.15;cursor:pointer}
.modifier-chip:hover{border-color:#9fb1c3;background:#fff}
.modifier-chip.active{background:#e8f1fb;border-color:#7fa2c4;color:#244d73}
.modifier-chip input{width:auto!important;height:auto!important;margin:0}
.modifier-chip em{font-size:9px;font-style:normal;font-weight:900;color:#8a5a14}
.ally-status.internal{background:#f4f0e7;color:#6e5529;border:1px solid #e2d5bc}
@media(max-width:1450px){.generic-general-controls{gap:5px}.generic-general-select{min-width:112px!important;font-size:11px!important}.modifier-chip{font-size:9px;padding:3px 6px}}
/* V4.2 RC2 — infrastructures, alliés et export générique */
.defense-controls{display:grid;gap:8px;margin-top:10px;padding:10px;border:1px solid #d9e1ea;border-radius:12px;background:#f7f9fb}
.defense-step{display:flex;align-items:center;justify-content:space-between;gap:10px}.defense-step>span{font-size:11px;font-weight:800;color:#526274}.defense-step .qty-stepper{min-width:92px}
.export-panel .export-main{width:100%;margin-top:12px;min-height:42px;border:0;border-radius:10px;background:#21476f;color:white;font-size:12px;font-weight:900;cursor:pointer;box-shadow:0 3px 8px #203c5a26}.export-panel .export-main:hover{filter:brightness(1.06)}.export-panel .export-main:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.ally-option-group{display:grid;gap:5px;margin-top:9px;padding-top:8px;border-top:1px dashed #d7c79f}.ally-option-group>small{font-weight:850!important;color:#674f27!important}.generic-option-choices.compact button{min-width:0!important;padding:6px 8px!important;font-size:10px!important}

/* =========================================================
   V4.3.1 AUDIT RC — refonte lisibilité / chaleur / hiérarchie
   ========================================================= */
:root{
  --v43-paper:#f7f1e5;
  --v43-paper-2:#fffaf0;
  --v43-card:#fffdf8;
  --v43-ink:#253044;
  --v43-muted:#677184;
  --v43-navy:#193451;
  --v43-navy-2:#284f72;
  --v43-bronze:#a9702f;
  --v43-gold:#d3a44d;
  --v43-line:#ddcfba;
  --v43-soft:#efe5d4;
  --v43-green:#2f704f;
  --v43-red:#a9473e;
}
html,body,#root{background:linear-gradient(180deg,#eee7da 0,#f6f1e8 240px,#efeae2 100%);color:var(--v43-ink)}
body{font-size:15px;line-height:1.45}
.app{background:transparent}
.topbar{
  height:76px;
  padding:0 28px;
  background:linear-gradient(135deg,#13283f,#1b3c5a 62%,#244b68);
  border-bottom:3px solid #c89743;
  box-shadow:0 10px 28px #17203324;
}
.brand{min-width:330px}.helmet{width:44px;height:44px;border-radius:12px;background:linear-gradient(145deg,#e6bd68,#ad742f);color:#162b42;box-shadow:inset 0 1px 0 #fff8,0 3px 9px #0003;font-size:24px}
.brand strong{font-size:20px;color:#fff2cf;text-shadow:0 1px #0004}.brand span{font-size:10.5px;color:#c8d8e6}
.topbar nav span{font-size:11px;padding:10px 14px}.topbar nav .active{background:#fff1;border:1px solid #ffffff17}
.badge{font-size:10px;background:#0f2539;border-color:#d6ac5c66;color:#f4d994}
main{max-width:1920px;padding:20px 22px 34px}
.card{background:var(--v43-card);border:1px solid var(--v43-line);box-shadow:0 7px 22px #57452b12;border-radius:16px}
.setup{grid-template-columns:minmax(420px,1.2fr) minmax(260px,.7fr) 260px;gap:18px;padding:18px 20px;border-top:4px solid var(--v43-gold);background:linear-gradient(180deg,#fffdf9,#fbf5e9)}
.setup label,.period-card label,.export-panel>label,.ally-manager label{font-size:11px;color:#6d604d;letter-spacing:.055em}
.setup input,.setup select,.period-card input,.period-card select,.export-panel input,.export-panel select,.ally-manager select,.search{height:43px;border-radius:11px;border-color:#d7c8b4;background:#fffefb;font-size:13.5px;color:#26384d}
.army-field select{font-weight:800;font-size:14px}
.army-status{font-size:10.5px!important;margin-top:2px}
.points>span{font-size:10px;color:#7f715e}.points strong{font-size:29px}.points>div{height:7px;background:#eadfcd}.points i{background:linear-gradient(90deg,#2f7050,#6c9a62)}
.period-card{margin-top:16px;padding:20px 22px;border-top:4px solid var(--v43-navy-2);background:linear-gradient(180deg,#fffdf8,#f9f3e8)}
.period-heading h2{font-size:25px;color:#1d3d5d}.period-heading p{font-size:13px;line-height:1.55;color:#68758a;max-width:1000px}.eyebrow{font-size:10.5px;color:#9d6b2d}
.current-year{min-width:185px;border-radius:14px;padding:13px 16px;background:linear-gradient(145deg,#173753,#285879);box-shadow:0 5px 14px #1737532e}.current-year span{font-size:9.5px}.current-year strong{font-size:22px}
.date-row{grid-template-columns:1fr 190px;gap:22px}.range-labels{font-size:11px}.strategist-strip{border-radius:12px!important;padding:11px 14px!important}.strategist-strip span{font-size:9.5px!important}.strategist-strip strong{font-size:13px!important}.strategist-strip small{font-size:10.5px!important}
.historical-options{gap:11px}.historical-options button{min-height:78px;border-radius:13px;padding:12px 12px 11px 35px;background:#fffaf0;border-color:#ddcfba}.historical-options button.selected{background:#fff3d5;border-color:#bd8335;box-shadow:0 4px 13px #9f6b2920,inset 0 0 0 1px #c69547}.historical-options strong{font-size:13px}.historical-options small{font-size:11px;line-height:1.35}.historical-options em{font-size:9.5px}.option-dot{width:14px;height:14px;top:14px}.selected .option-dot{border-color:#a66b25}
.option-explainer{padding:11px 13px;background:#f6ead1;border-left-width:4px}.option-explainer strong,.option-explainer span{font-size:12px}.rule-block{padding:10px 12px;background:#fcf8f0;border-color:#e2d6c4}.rule-block>b{font-size:11px}.rule-block span{font-size:11px;line-height:1.4}

/* grille principale : panneaux latéraux réellement lisibles en FHD */
.workspace,.generic-grid{grid-template-columns:365px minmax(760px,1fr) 320px;gap:15px;margin-top:16px}
.units-panel,.export-panel{top:90px;border-radius:16px}.units-panel{padding:15px;background:linear-gradient(180deg,#fffdf9,#faf4e9);max-height:calc(100vh - 108px)}
.export-panel{padding:15px;background:linear-gradient(180deg,#fffdf8,#fbf5ea)}
.builder{padding:14px;background:#fffdfa}
.section-title{margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #e4d8c6}.section-title span{font-size:14px;color:#1d405f;letter-spacing:.085em}.section-title small{font-size:11px;color:#7a6f60}
.search{margin-bottom:10px;padding:0 13px;font-size:13px!important;box-shadow:inset 0 1px 2px #4b3c2410}
.class-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;overflow:visible;padding-bottom:8px}
.class-chips button{min-height:36px;padding:6px 5px;border-radius:10px;background:#fffdf8;border-color:#dacdbb;display:grid;place-items:center;gap:1px}.class-chips button b{font-size:11px}.class-chips button span{display:block;font-size:7.5px;line-height:1;color:#7d756b}.class-chips button.active{background:linear-gradient(145deg,#1b3d5d,#2a5879);border-color:#1b3d5d;box-shadow:0 3px 8px #173b5a22}.class-chips button.active span{color:#dbe8f2}
.target{padding:9px 11px;border-radius:11px;background:#fff4db;border-color:#cfab6b}.target strong{font-size:12px}.target small{font-size:10px}

/* réserve regroupée et ordonnée par classes ADLG */
.unit-list{gap:10px}.grouped-reserve{display:flex;flex-direction:column;gap:12px}
.unit-group{border:1px solid #dfd2bf;border-left:4px solid var(--class-color,#7b8da1);border-radius:13px;background:#fffefa;box-shadow:0 2px 8px #58462e0b;overflow:hidden}
.unit-group-title{position:sticky;top:-15px;z-index:2;padding:9px 10px;background:linear-gradient(180deg,#f5eee2,#ede3d3);border-bottom:1px solid #daccb8;gap:9px}
.unit-group-title .class-code,.unit-group-title>span{width:34px;height:28px;border-radius:8px;font-size:11px;font-weight:950;letter-spacing:.03em;background:var(--class-color,#71869b);box-shadow:inset 0 1px 0 #fff4}
.unit-group-title strong{font-size:12.5px;color:#283b4e}.unit-group-title em{font-size:9.5px;color:#7f725f}
.unit-card{padding:11px 10px;gap:10px;min-height:82px;background:#fffefb;border-bottom-color:#eee5d8;transition:background .12s,transform .12s}.unit-card:hover:not(:disabled){background:#fff8e8;transform:translateX(2px)}
.unit-card-main{min-width:0;flex:1}.unit-name-row{display:flex;align-items:flex-start;gap:7px;flex-wrap:wrap}.unit-card strong{font-size:13.5px;line-height:1.25;color:#1f354b}.unit-card>div>span,.unit-card .unit-types{font-size:11.5px;line-height:1.35;color:#5d6878;margin-top:4px}.unit-card small{font-size:10.5px;line-height:1.35}.unit-modifiers{color:#6f542a!important;font-weight:700}.source-context{font-size:9.5px!important;color:#8d6f44!important;opacity:.9}.type-tags{margin-top:5px}.type-tag{padding:3px 7px;font-size:9.5px;letter-spacing:.025em;box-shadow:inset 0 0 0 1px #fff5}.mandatory-unit{background:linear-gradient(90deg,#fff8e7,#fffefb 32%)}.mandatory-badge{font-size:8.5px;font-style:normal;font-weight:900;color:#855318;background:#f3dfb8;border:1px solid #dab16d;padding:2px 6px;border-radius:999px;letter-spacing:.05em}
.minmax{min-width:58px}.minmax small{font-size:7.5px!important;color:#8c7e6c!important;letter-spacing:.04em}.minmax span{font-size:11.5px;font-weight:850;color:#34475b}.minmax b{width:29px;height:29px;font-size:15px;background:linear-gradient(145deg,#1c4668,#2f6488);box-shadow:0 2px 5px #183b5924}

/* options génériques : vraies cartes de choix */
.generic-workspace{gap:16px}.generic-options{padding:18px 20px;background:linear-gradient(180deg,#fffdf8,#faf2e5);border-top:4px solid #b27b36;align-items:stretch}.generic-options>div:first-child{min-width:300px}.generic-options h2{font:700 24px Georgia,serif;color:#1f3f5d;margin:5px 0}.generic-options p{font-size:12.5px;line-height:1.45}.generic-option-list{max-width:none;flex:1;padding-left:20px;border-left:1px solid #e1d4c1}.generic-option-list>b{font-size:12px;color:#705127;letter-spacing:.04em}.option-group-label{font-size:11.5px!important;font-weight:850;color:#63533d}.option-group-label em{font-size:9.5px!important;color:#a14b3b;font-style:normal}.generic-option-choices{gap:9px!important}.generic-option-choices button{min-width:190px;min-height:52px;border-radius:12px!important;padding:9px 12px!important;background:#fffaf0!important;border:1px solid #d8c7ae!important;color:#394657}.generic-option-choices button:hover:not(:disabled){background:#fff4d9!important;border-color:#c39452!important}.generic-option-choices button.active{background:linear-gradient(145deg,#203f5e,#2d5d7e)!important;color:#fff!important;border-color:#1d3b57!important;box-shadow:0 4px 12px #17334e25!important}.generic-option-choices button strong{font-size:13px}.generic-option-choices button small{font-size:10.5px!important}.generic-option-list>small{font-size:10.5px!important;line-height:1.4}

/* composition */
.tabs{margin:-14px -14px 12px;padding:12px 14px;background:linear-gradient(180deg,#f7f1e7,#efe6d8);border-bottom-color:#dccdb9}.tabs b{font-size:13px;color:#1d3e5e}.tabs span{font-size:10.5px;color:#7d7468}
.corps{border-color:#ded1be;background:#fffefb;border-radius:14px;box-shadow:0 3px 10px #5b482d0c}.corps.selected{border-color:#c18a3a;box-shadow:0 0 0 2px #c7934142,0 5px 14px #6d4a1c12}.corps-head{background:linear-gradient(180deg,#f8f4ed,#eee6da);border-bottom-color:#dbcebd}.ally-corps .corps-head{background:linear-gradient(180deg,#fff4dc,#f3e2c4)}.corps-title>strong{font-size:14px;color:#173d60}.corps-total{font-size:12px;background:#1f4466;color:#fff;padding:10px 11px;box-shadow:0 2px 6px #17364f25}.empty{padding:26px!important;font-size:12px!important;color:#8b7d69!important;background:#fffdfa!important}
.line{min-height:84px;background:#fffefb;border-bottom-color:#eee4d7}.line:hover{background:#fffbf2}.line-name strong{font-size:13.5px;color:#213b53}.line-name small{font-size:9px}.type-select-wrap .type-control{font-size:12.5px!important;background:#fffdf8!important;border-color:#d8cbbb!important}.qty-stepper{border-color:#d6c9b8;background:#fffefb}.qty-stepper button{background:#f2ebe0}.options label,.modifier-chip{background:#f7f1e7!important;border-color:#ded1bf!important}.cost{font-size:10.5px}.cost span{font-size:13px;color:#173f62}
.summary{background:linear-gradient(180deg,#f8f1e4,#efe3d1)!important;border-color:#ddcaae!important}.summary span{font-size:9.5px!important;color:#756755!important}.summary b{font-size:15px!important;color:#203d58!important}

/* colonne droite */
.export-panel hr{border:0;border-top:1px solid #dfd3c1;margin:15px 0}.export-panel label{gap:7px}.ally-manager h3{font-size:13px;color:#203e5b}.ally-help,.field-help{font-size:10.5px!important;line-height:1.45!important;color:#746b61!important}.ally-status{border-radius:11px!important;padding:10px 11px!important}.ally-status strong{font-size:12px!important}.ally-status span,.ally-status small{font-size:10.5px!important}.validity{border-radius:12px!important;padding:12px!important}.validity strong{font-size:12px!important}.validity li{font-size:10.5px!important;line-height:1.4}.validity.valid{background:#edf7f0!important;border-color:#a8cbb4!important}.validity.invalid{background:#fff0ec!important;border-color:#dfb0a6!important}.excel,.export-main{min-height:46px!important;border-radius:11px!important;background:linear-gradient(145deg,#1c496d,#2c6b8e)!important;box-shadow:0 4px 10px #173a5723!important;font-size:11.5px!important;letter-spacing:.03em}.legend{background:#f8f2e8!important;border-color:#dfd2bf!important}.legend>b{font-size:10.5px!important}.legend span{font-size:9.5px!important}.import-audit{background:#f6efe2;border-color:#dbc9aa}.import-audit b{font-size:12.5px}.import-audit p,.import-audit span{font-size:10.5px}
footer{color:#786d5e!important;font-size:10px!important;padding-top:12px!important}

@media(max-width:1650px){
  .workspace,.generic-grid{grid-template-columns:340px minmax(690px,1fr) 300px;gap:12px}
  .unit-card strong{font-size:12.5px}.unit-card>div>span,.unit-card .unit-types{font-size:10.5px}
}
@media(max-width:1380px){
  .workspace,.generic-grid{grid-template-columns:310px minmax(620px,1fr) 285px}
  .class-chips{grid-template-columns:repeat(3,minmax(0,1fr))}
  .generic-options{flex-direction:column}.generic-option-list{border-left:0;border-top:1px solid #e1d4c1;padding:12px 0 0}
}
@media(max-width:1180px){
  .workspace,.generic-grid{grid-template-columns:1fr}.units-panel,.export-panel{position:static;max-height:none}.class-chips{grid-template-columns:repeat(6,minmax(0,1fr))}
}

/* ================================================================
   V4.3.7 AUDIT 300 LISTES — reserve, cursor and corps rows
   ================================================================ */
.generic-workspace .unit-card{cursor:default!important;user-select:text}
.generic-workspace .unit-card:hover:not(.maxed-unit){transform:none!important}
.generic-workspace .unit-card.maxed-unit{opacity:.68;background:#f5f1e9!important}
.generic-workspace .reserve-counter{min-width:92px;align-items:center;text-align:center;gap:2px}
.generic-workspace .reserve-counter small{margin:0;font-size:9px;font-weight:900;letter-spacing:.04em;color:#6f7d8c}
.generic-workspace .reserve-counter>span{margin:0;font-size:13px;line-height:1.1;font-weight:900;color:#1f4567}
.generic-workspace .reserve-counter em{margin:1px 0 2px;font-size:8.5px;line-height:1.1;color:#9b5f22;white-space:nowrap}
.generic-workspace .reserve-counter .ok-label{color:#347247}
.generic-workspace .reserve-counter .max-label{color:#8d5140}
.generic-workspace .reserve-add{width:32px!important;height:32px!important;min-width:32px;margin-top:2px!important;padding:0!important;border:0!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:#214d73!important;color:#fff!important;font-size:18px!important;font-weight:900!important;line-height:1!important;cursor:pointer!important;box-shadow:0 2px 5px #173b5725}
.generic-workspace .reserve-add:hover:not(:disabled){background:#173d60!important;transform:translateY(-1px)}
.generic-workspace .reserve-add:disabled{cursor:not-allowed!important;opacity:.32;box-shadow:none}
.generic-builder .drag-handle{cursor:grab!important;user-select:none;touch-action:none}
.generic-builder .drag-handle:active{cursor:grabbing!important}
/* Six rendered controls need six columns. */
.generic-builder .line{grid-template-columns:28px minmax(180px,1.05fr) minmax(250px,1.45fr) 104px 86px 38px!important;gap:10px!important;min-height:92px!important;padding:11px 12px!important;align-items:center!important}
.generic-builder .line-name{align-self:center;padding-right:4px}
.generic-builder .line-name strong{font-size:13.5px!important;line-height:1.22!important;overflow-wrap:anywhere}
.generic-builder .line-name small{margin-top:4px!important;font-size:9px!important;letter-spacing:.035em}
.generic-builder .type-select-wrap{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;align-items:center}
.generic-builder .type-select-wrap .type-control{grid-column:1;width:100%;min-width:0;height:38px!important;padding-left:11px!important;font-size:12.5px!important;font-weight:700}
.generic-builder .type-select-wrap>.type-pill{grid-column:2;margin:0!important;padding:5px 8px!important;font-size:10px!important;align-self:center}
.generic-builder .line-modifiers{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:5px;margin-top:1px}
.generic-builder .modifier-chip{font-size:10px!important;padding:5px 8px!important}
.generic-builder .qty-stepper{width:104px;height:38px!important;grid-template-columns:31px 42px 31px!important}
.generic-builder .qty-stepper span{font-size:13px!important}
.generic-builder .qty-stepper button{font-size:16px!important}
.generic-builder .cost{min-width:0;text-align:right!important;font-size:10.5px!important;line-height:1.2;white-space:nowrap}
.generic-builder .cost span{margin-top:3px;font-size:13px!important}
.generic-builder .trash{width:34px;height:34px;padding:0!important;border-radius:9px!important;display:grid;place-items:center;justify-self:end;cursor:pointer}
@media(max-width:1450px){.generic-grid{grid-template-columns:320px minmax(660px,1fr) 290px!important}.generic-builder .line{grid-template-columns:26px minmax(150px,1fr) minmax(205px,1.25fr) 96px 76px 34px!important;gap:8px!important}.generic-builder .qty-stepper{width:96px;grid-template-columns:28px 40px 28px!important}}
@media(max-width:1180px){.generic-grid{grid-template-columns:1fr!important}.generic-builder .line{grid-template-columns:24px minmax(165px,1fr) minmax(210px,1.3fr) 96px 76px 34px!important}}
@media(max-width:820px){.generic-builder .line{grid-template-columns:24px minmax(0,1fr) 94px 34px!important;grid-template-areas:"drag name qty trash" "drag type type cost";row-gap:8px!important}.generic-builder .drag-handle{grid-area:drag}.generic-builder .line-name{grid-area:name}.generic-builder .type-select-wrap{grid-area:type}.generic-builder .qty-stepper{grid-area:qty;width:94px}.generic-builder .cost{grid-area:cost}.generic-builder .trash{grid-area:trash}}

/* =========================================================
   V4.4 TEST — sauvegarde locale + ergonomie web
   ========================================================= */
.topbar nav button,.web-topbar nav button{border:0;background:transparent;color:#b9c7d7;padding:10px 14px;border-radius:9px;font-size:11px;font-weight:850;letter-spacing:.03em;cursor:pointer}
.topbar nav button:hover,.web-topbar nav button:hover{background:#ffffff0c;color:#fff}
.topbar nav button.active,.web-topbar nav button.active{background:#ffffff12;color:#fff;box-shadow:inset 0 0 0 1px #ffffff14}
.topbar nav span{display:none}

.savebar{margin-top:16px;padding:12px 14px;display:grid;grid-template-columns:190px minmax(260px,1fr) auto;gap:14px;align-items:center;border-left:4px solid #3d8060;background:linear-gradient(180deg,#ffffff,#f8fbf9)}
.savebar-title{display:flex;align-items:center;gap:10px}.savebar-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#e7f4ec;color:#2d7251;font-size:18px}.savebar-title strong{display:block;font-size:11px;letter-spacing:.08em;color:#2b5d47}.savebar-title small{display:block;margin-top:2px;font-size:10px;color:#6b7d73}.savebar-name{display:flex;flex-direction:column;gap:4px}.savebar-name>span{font-size:9px;font-weight:900;letter-spacing:.08em;color:#758276}.savebar-name input{height:40px;border:1px solid #d3dfd7;border-radius:10px;padding:0 12px;font-size:13px;font-weight:750;color:#253b31;background:#fff}.savebar-name input:focus{outline:none;border-color:#6ea482;box-shadow:0 0 0 3px #6ea48218}.savebar-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.savebar-actions button{height:36px;border:1px solid #d5ddd8;background:#fff;color:#334b40;border-radius:9px;padding:0 11px;font-size:10.5px;font-weight:800;cursor:pointer}.savebar-actions button:hover{background:#f3f8f5;border-color:#b9cbc0}.savebar-actions .save-primary{background:#2f6f50;color:#fff;border-color:#2f6f50}.savebar-actions .save-primary:hover{background:#285f45}.savebar-actions .ghost{color:#69786f;background:#fafcfa}

.web-shell{min-height:100vh;background:#f3f5f8}.web-topbar{height:72px;background:#13243a;color:#fff;display:flex;align-items:center;padding:0 30px;gap:34px;position:sticky;top:0;z-index:30;box-shadow:0 6px 22px #17203326}.web-topbar .brand{min-width:330px}.web-topbar nav{display:flex;gap:5px;flex:1}
.library-page,.catalog-page{max-width:1480px;margin:0 auto;padding:28px 28px 60px}.library-hero,.catalog-hero{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:20px}.library-hero h1,.catalog-hero h1{font:700 34px/1.05 Georgia,serif;color:#1e3853;margin:5px 0 7px}.library-hero p,.catalog-hero p{margin:0;color:#69798b;font-size:13px}.hero-new{border:0;background:#c49345;color:#17283d;font-weight:900;border-radius:11px;padding:13px 18px;cursor:pointer;box-shadow:0 5px 14px #a8782e26}.hero-new:hover{filter:brightness(1.04)}
.library-toolbar{padding:12px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;margin-bottom:24px}.library-toolbar .search{margin:0;height:42px!important}.library-toolbar>div{display:flex;gap:8px}.library-toolbar button{height:38px;border:1px solid #d3dce5;background:#fff;border-radius:9px;padding:0 12px;font-size:10.5px;font-weight:800;color:#405770;cursor:pointer}.library-toolbar button:hover{background:#f7f9fb}
.library-section-title{display:flex;align-items:center;justify-content:space-between;margin:22px 2px 11px}.library-section-title h2{margin:0;font-size:16px;color:#233c57}.library-section-title span{font-size:10.5px;color:#7b8998}.draft-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.draft-card{border:1px solid #ded7c8;background:#fffaf0;border-radius:12px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.draft-card>div:first-child{min-width:0}.draft-card strong{display:block;font-size:12px;color:#503e22;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.draft-card span{display:block;margin-top:3px;font-size:10px;color:#806d4d}.draft-card small{display:block;margin-top:5px;font-size:9.5px;color:#9a896c}.draft-card>div:last-child{display:flex;gap:5px;align-items:center}.draft-card button{border:1px solid #d9c69e;background:#fff;border-radius:8px;padding:7px 9px;font-size:9.5px;font-weight:850;color:#6a532c;cursor:pointer}.draft-card .trash-lite{width:30px;padding:7px 0;color:#92645f}
.army-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.army-card{padding:16px 16px 14px;display:flex;flex-direction:column;min-height:230px;transition:.15s}.army-card:hover{transform:translateY(-1px);box-shadow:0 8px 24px #22304413}.army-card-head{display:flex;align-items:center;justify-content:space-between}.army-number{font-size:10px;font-weight:900;color:#8c652d;background:#fff4df;border:1px solid #ead3aa;padding:5px 8px;border-radius:999px}.status-valid,.status-draft{font-size:9px;font-weight:900;padding:5px 8px;border-radius:999px}.status-valid{background:#eaf6ee;color:#2b7047}.status-draft{background:#fff4dc;color:#8a6322}.army-card h3{font-size:17px;color:#223a55;margin:14px 0 4px}.army-card p{font-size:11px;color:#758498;margin:0 0 14px}.army-card-stats{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin-top:auto;background:#f7f9fb;border-radius:10px;padding:9px}.army-card-stats b{font-size:16px;color:#234a6c}.army-card-stats span{font-size:10px;color:#607388;display:flex;align-items:center}.army-card>small{font-size:9px;color:#8a96a4;margin:10px 0}.army-card-actions{display:flex;gap:6px}.army-card-actions button{border:1px solid #d7e0e8;background:#fff;border-radius:8px;padding:8px 10px;font-size:9.5px;font-weight:850;color:#52667b;cursor:pointer}.army-card-actions .open-army{background:#203f60;color:#fff;border-color:#203f60;flex:1}.army-card-actions .danger-lite{color:#9a4b45}.empty-library{padding:40px;text-align:center}.empty-library strong{font-size:16px;color:#344d66}.empty-library p{font-size:11px;color:#7b8997}
.catalog-search{width:100%;height:52px;border:1px solid #cfd9e4;border-radius:13px;padding:0 16px;font-size:15px;box-shadow:0 4px 12px #17203308;outline:none;margin:0 0 18px}.catalog-search:focus{border-color:#a77a3a;box-shadow:0 0 0 4px #c4934518}.catalog-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.catalog-card{text-align:left;min-height:126px;border:1px solid #dce3ea;background:#fff;border-radius:12px;padding:14px;display:flex;flex-direction:column;cursor:pointer;transition:.13s}.catalog-card:hover{border-color:#c49a54;box-shadow:0 7px 18px #5e492018;transform:translateY(-1px)}.catalog-no{font-size:9px;color:#9a6f30;font-weight:900}.catalog-card strong{font-size:13px;color:#263f59;margin:7px 0 4px}.catalog-card small{font-size:9.5px;color:#7c8997}.catalog-card em{font-style:normal;margin-top:auto;font-size:9.5px;font-weight:900;color:#2b5b82}

@media(max-width:1100px){.savebar{grid-template-columns:1fr}.savebar-actions{justify-content:flex-start}.army-grid,.draft-row{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.web-topbar{padding:0 18px}.web-topbar .brand{min-width:260px}}
@media(max-width:760px){.topbar,.web-topbar{height:auto;min-height:64px;align-items:flex-start;flex-wrap:wrap;padding:10px 14px;gap:8px}.topbar .brand,.web-topbar .brand{min-width:0;flex:1}.topbar nav,.web-topbar nav{order:3;width:100%;overflow:auto}.topbar nav button,.web-topbar nav button{white-space:nowrap}.badge{display:none}.library-page,.catalog-page{padding:20px 12px 40px}.library-hero,.catalog-hero{align-items:flex-start;flex-direction:column}.library-toolbar{grid-template-columns:1fr}.army-grid,.draft-row,.catalog-grid{grid-template-columns:1fr}.savebar{margin:12px 0}.savebar-name input{font-size:16px}}

/* OST official branding */
.ost-logo{width:54px;height:54px;flex:0 0 54px;object-fit:cover;border-radius:13px;background:#090b0f;border:1px solid #b88a3f;box-shadow:0 3px 12px #0006,inset 0 0 0 1px #f0cf7b33}
.topbar .brand,.web-topbar .brand{align-items:center}
@media(max-width:760px){.ost-logo{width:44px;height:44px;flex-basis:44px;border-radius:10px}.topbar .brand span,.web-topbar .brand span{font-size:9px}}


/* =========================================================
   OST V4.4.3 RC — correctifs web / densité
   ========================================================= */
.import-audit,
.army-status{display:none!important}

/* Logo d'en-tête : variante recadrée pour rester lisible en petit format. */
.topbar{height:78px;padding-left:18px;padding-right:18px;gap:20px}
.topbar .brand{min-width:260px;gap:10px}
.ost-logo{
  width:68px!important;height:68px!important;flex:0 0 68px!important;
  object-fit:contain!important;border-radius:10px!important;
  background:#090b0f!important;border:1px solid #c89b49!important;
}
.topbar .brand strong{font-size:21px}
.topbar .brand span{font-size:10px;margin-top:3px}
.badge{white-space:nowrap}

/* Le bloc haut reste dense : pas d'information d'audit redondante. */
.setup{padding:10px 14px!important;gap:12px!important}
.setup select,.setup input{height:38px!important}

/* Sauvegarde : barre flottante en bas du bureau, elle ne consomme plus une rangée entière. */
main{padding-bottom:96px!important}
.savebar{
  position:fixed!important;
  left:50%!important;bottom:12px!important;transform:translateX(-50%)!important;
  z-index:45!important;
  width:min(1180px,calc(100vw - 28px))!important;
  margin:0!important;padding:8px 10px!important;
  grid-template-columns:150px minmax(230px,1fr) auto!important;
  gap:10px!important;border-radius:14px!important;
  box-shadow:0 10px 32px #14203335!important;
}
.savebar-icon{width:28px!important;height:28px!important;font-size:15px!important}
.savebar-title strong{font-size:9px!important}
.savebar-title small{font-size:9px!important}
.savebar-name>span{display:none!important}
.savebar-name input{height:34px!important}
.savebar-actions button{height:32px!important;padding:0 9px!important;font-size:9.5px!important}

/* Les groupes de variantes restent compacts même pour les listes complexes (#41 notamment). */
.generic-options{padding:14px 16px!important;gap:16px!important}
.generic-options h2{font-size:21px!important}
.generic-option-list{padding-left:14px!important;gap:6px!important}
.generic-option-choices{gap:6px!important}
.generic-option-choices button{
  min-width:155px!important;min-height:42px!important;
  padding:7px 9px!important;font-size:11px!important;
}
.generic-option-choices button strong{font-size:11.5px!important}
.generic-option-choices button small{font-size:9.5px!important}

@media(max-width:760px){
  .topbar{min-height:70px;height:auto}
  .ost-logo{width:54px!important;height:54px!important;flex-basis:54px!important}
  main{padding-bottom:24px!important}
  .savebar{
    position:static!important;left:auto!important;bottom:auto!important;transform:none!important;
    width:auto!important;margin:10px 0!important;
    grid-template-columns:1fr!important;
  }
  .savebar-actions{justify-content:flex-start!important}
}

.web-topbar{height:78px!important;padding-left:18px!important;padding-right:18px!important;gap:20px!important}.web-topbar .brand{min-width:260px!important;gap:10px!important}.web-topbar .brand strong{font-size:21px}.web-topbar .brand span{font-size:10px;margin-top:3px}

/* =========================================================
   OST V4.4.3 RC — RC3 : branding plus visible + sauvegarde non flottante
   ========================================================= */
/* Le blason porte déjà OST + Art De La Guerre v4 : on supprime tout doublon textuel. */
.topbar,.web-topbar{
  height:98px!important;
  min-height:98px!important;
  padding:0 22px!important;
  gap:24px!important;
}
.topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{
  min-width:96px!important;
  width:96px!important;
  flex:0 0 96px!important;
  gap:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
}
.topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{
  width:88px!important;
  height:88px!important;
  flex:0 0 88px!important;
  border-radius:12px!important;
  object-fit:contain!important;
  box-shadow:0 4px 15px #0007,inset 0 0 0 1px #f0cf7b33!important;
}
.topbar nav,.web-topbar nav{align-items:center!important}
.badge{margin-left:auto!important}

/* La sauvegarde reste accessible mais ne masque plus jamais l'armée. */
main{padding-bottom:24px!important}
.savebar{
  position:static!important;
  left:auto!important;right:auto!important;bottom:auto!important;
  transform:none!important;
  width:auto!important;
  margin:10px 0 14px!important;
  padding:7px 10px!important;
  min-height:48px!important;
  grid-template-columns:132px minmax(220px,1fr) auto!important;
  gap:9px!important;
  border-radius:11px!important;
  box-shadow:0 2px 8px #14203312!important;
}
.savebar-icon{width:26px!important;height:26px!important;font-size:14px!important;border-radius:8px!important}
.savebar-title{gap:7px!important}
.savebar-title strong{font-size:8.5px!important;letter-spacing:.06em!important}
.savebar-title small{font-size:8px!important;margin-top:1px!important;white-space:nowrap!important}
.savebar-name input{height:32px!important;font-size:11px!important;border-radius:8px!important}
.savebar-actions{gap:5px!important;flex-wrap:nowrap!important}
.savebar-actions button{height:30px!important;padding:0 8px!important;font-size:9px!important;border-radius:8px!important;white-space:nowrap!important}

@media(max-width:900px){
  .topbar,.web-topbar{height:auto!important;min-height:82px!important;padding:8px 12px!important;gap:10px!important;flex-wrap:wrap!important}
  .topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{min-width:74px!important;width:74px!important;flex-basis:74px!important}
  .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:70px!important;height:70px!important;flex-basis:70px!important}
  .topbar nav,.web-topbar nav{order:3;width:100%;overflow:auto!important}
  .savebar{grid-template-columns:1fr!important;gap:6px!important}
  .savebar-title{display:none!important}
  .savebar-actions{justify-content:flex-start!important;flex-wrap:wrap!important}
}


/* RC4 — header readable logo + first 10 historical images */
.topbar,.web-topbar{align-items:center;min-height:110px;padding:12px 20px;gap:18px}
.topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{display:flex;align-items:center;flex:0 0 auto}
.topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{
  width:340px!important;height:auto!important;max-height:90px;flex:0 0 auto!important;object-fit:contain!important;
  border:none!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
.topbar nav,.web-topbar nav{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.topbar .badge,.web-topbar .badge{margin-left:auto}
@media(max-width:980px){
  .topbar,.web-topbar{min-height:unset;padding:10px 12px;gap:12px;flex-wrap:wrap}
  .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:260px!important;max-height:68px}
}
@media(max-width:620px){
  .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:210px!important;max-height:56px}
}
.army-status,.import-audit{display:none!important}
footer{font-size:12px}

.historical-hero{margin:14px 0 4px;border:1px solid #d8c4a3;border-radius:16px;overflow:hidden;background:#fff9ef;box-shadow:0 4px 16px rgba(36,54,74,.06)}
.historical-hero img{display:block;width:100%;height:260px;object-fit:cover;background:#efe7d3}
.historical-hero figcaption{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 14px;color:#30465c;background:linear-gradient(180deg,#fffaf0,#f8f1e3)}
.historical-hero figcaption strong{font-size:13px;color:#243c58}
.historical-hero figcaption span{font-size:11px;color:#7a6a53;font-weight:700}
@media(max-width:760px){.historical-hero img{height:190px}.historical-hero figcaption{display:block}.historical-hero figcaption span{display:block;margin-top:4px}}


/* RC5 — header corrected, no overlap */
.topbar,.web-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap;min-height:unset!important;padding:10px 20px 12px!important}
.topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{display:flex;align-items:flex-start;flex:0 1 360px;min-width:240px}
.topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:300px!important;max-width:100%;height:auto!important;max-height:none!important;display:block;object-fit:contain!important}
.topbar nav,.web-topbar nav{display:flex;align-items:center;gap:12px;flex:1 1 380px;flex-wrap:wrap;padding-top:10px}
.topbar .badge,.web-topbar .badge{margin-left:auto;align-self:flex-start;margin-top:12px}
@media(max-width:1250px){
  .topbar,.web-topbar{flex-direction:column;align-items:flex-start!important}
  .topbar nav,.web-topbar nav{width:100%;padding-top:0}
  .topbar .badge,.web-topbar .badge{margin-left:0;align-self:flex-end;margin-top:-38px}
}
@media(max-width:760px){
  .topbar,.web-topbar{padding:10px 12px!important}
  .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:260px!important}
  .topbar nav,.web-topbar nav{gap:8px}
  .topbar nav button,.web-topbar nav button{font-size:11px;padding:8px 11px}
  .topbar .badge,.web-topbar .badge{margin-top:0;align-self:flex-start}
}


/* RC6 — historical illustrations compact cards + safer header */
.topbar,.web-topbar{display:grid!important;grid-template-columns:minmax(360px,430px) minmax(420px,1fr) auto;grid-template-areas:"brand nav badge";align-items:center!important;column-gap:26px;row-gap:8px;padding:10px 20px 12px!important}
.topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{grid-area:brand;min-width:0!important;flex:none!important}
.topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:410px!important;max-width:100%!important;height:auto!important;max-height:105px!important;object-fit:contain!important;object-position:left center!important}
.topbar nav,.web-topbar nav{grid-area:nav;display:flex!important;align-items:center;gap:10px;flex-wrap:wrap;padding-top:0!important;min-width:0}
.topbar .badge,.web-topbar .badge{grid-area:badge;margin:0!important;align-self:center!important;white-space:nowrap}
@media(max-width:1220px){
  .topbar,.web-topbar{grid-template-columns:minmax(320px,430px) 1fr;grid-template-areas:"brand badge" "nav nav"}
  .topbar nav,.web-topbar nav{width:100%}
  .topbar .badge,.web-topbar .badge{justify-self:end}
}
@media(max-width:720px){
  .topbar,.web-topbar{grid-template-columns:1fr;grid-template-areas:"brand" "nav" "badge";padding:8px 12px 10px!important}
  .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:330px!important;max-height:86px!important}
  .topbar .badge,.web-topbar .badge{justify-self:start}
}

.generic-options{align-items:flex-start!important;flex-wrap:wrap!important}
.historical-hero{width:350px!important;max-width:100%;flex:0 0 350px;margin:0!important;border-radius:13px!important}
.historical-hero img{width:100%!important;height:160px!important;object-fit:cover!important}
.historical-hero figcaption{padding:7px 10px!important;gap:8px!important}
.historical-hero figcaption strong{font-size:11.5px!important;line-height:1.2}
.historical-hero figcaption span{font-size:9.5px!important}
@media(max-width:1180px){.historical-hero{width:320px!important;flex-basis:320px!important}.historical-hero img{height:150px!important}}
@media(max-width:760px){.historical-hero{width:100%!important;flex-basis:100%!important}.historical-hero img{height:145px!important}}


/* RC7 — grand blason carré lisible, sans chevauchement */
.topbar,.web-topbar{
  display:grid!important;
  grid-template-columns:170px minmax(420px,1fr) auto!important;
  grid-template-areas:"brand nav badge"!important;
  align-items:center!important;
  min-height:165px!important;
  padding:8px 22px!important;
  column-gap:24px!important;
  overflow:visible!important;
}
.topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{
  grid-area:brand!important;width:160px!important;min-width:160px!important;height:160px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important;
}
.topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{
  width:158px!important;height:158px!important;max-width:none!important;max-height:none!important;
  object-fit:contain!important;object-position:center!important;display:block!important;
}
.topbar nav,.web-topbar nav{grid-area:nav!important;display:flex!important;align-items:center!important;gap:12px!important;flex-wrap:wrap!important;padding:0!important;min-width:0!important}
.topbar .badge,.web-topbar .badge{grid-area:badge!important;margin:0!important;justify-self:end!important;white-space:nowrap!important}
@media(max-width:900px){
 .topbar,.web-topbar{grid-template-columns:150px 1fr!important;grid-template-areas:"brand badge" "nav nav"!important;min-height:190px!important;row-gap:3px!important;padding:6px 14px 10px!important}
 .topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{width:145px!important;min-width:145px!important;height:145px!important}
 .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:145px!important;height:145px!important}
 .topbar nav,.web-topbar nav{width:100%!important;align-self:start!important}
}
@media(max-width:560px){
 .topbar,.web-topbar{grid-template-columns:125px 1fr!important;min-height:170px!important}
 .topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{width:120px!important;min-width:120px!important;height:120px!important}
 .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:120px!important;height:120px!important}
 .topbar nav button,.web-topbar nav button{font-size:10.5px!important;padding:8px 10px!important}
}

/* Images historiques : ambiance, pas une bannière envahissante */
.historical-hero{width:330px!important;max-width:100%!important;flex:0 0 330px!important;margin:0!important}
.historical-hero img{height:150px!important;width:100%!important;object-fit:cover!important}
@media(max-width:1180px){.historical-hero{width:300px!important;flex-basis:300px!important}.historical-hero img{height:140px!important}}
@media(max-width:760px){.historical-hero{width:100%!important;flex-basis:100%!important}.historical-hero img{height:135px!important}}


/* RC8 — images historiques 1–50 + crédit/source compact */
.historical-credit{display:flex;align-items:center;gap:7px;justify-content:flex-end;flex-wrap:wrap}
.historical-credit span{font-size:9px!important}
.historical-credit a{font-size:9px;color:#356087;font-weight:800;text-decoration:none;border-bottom:1px dotted #7b9ab5}
.historical-credit a:hover{color:#173f61;border-bottom-style:solid}
@media(max-width:760px){.historical-credit{justify-content:flex-start;margin-top:4px}}


/* RC9 — retour du bouton Scinder dans le builder générique */
.generic-builder .line{grid-template-columns:28px minmax(180px,1.05fr) minmax(250px,1.45fr) 104px 86px 112px!important}
.generic-line-actions{display:flex!important;align-items:center;justify-content:flex-end;gap:6px;min-width:0}
.generic-line-actions .split{min-height:34px!important;padding:5px 9px!important;border-radius:9px!important;border:1px solid #e2c37e!important;background:#fff7e5!important;color:#785719!important;font-size:9.5px!important;font-weight:850!important;cursor:pointer}
.generic-line-actions .trash{flex:0 0 34px}
@media(max-width:1450px){.generic-builder .line{grid-template-columns:26px minmax(150px,1fr) minmax(205px,1.25fr) 96px 76px 104px!important}}
@media(max-width:1180px){.generic-builder .line{grid-template-columns:24px minmax(165px,1fr) minmax(210px,1.3fr) 96px 76px 104px!important}}
@media(max-width:820px){
 .generic-builder .line{grid-template-columns:24px minmax(0,1fr) 94px 104px!important;grid-template-areas:"drag name qty actions" "drag type type cost"!important}
 .generic-builder .generic-line-actions{grid-area:actions}
}


/* RC10 — Sauvegarde en dock fixe compact, bas-droite */
@media(min-width:761px){
  main{padding-bottom:118px!important}
  .savebar{
    position:fixed!important;
    left:auto!important;
    right:16px!important;
    bottom:16px!important;
    transform:none!important;
    z-index:70!important;
    width:min(610px,calc(100vw - 32px))!important;
    min-height:72px!important;
    margin:0!important;
    padding:9px 10px!important;
    display:grid!important;
    grid-template-columns:minmax(190px,1fr) auto!important;
    grid-template-rows:auto auto!important;
    grid-template-areas:"name actions" "status actions"!important;
    column-gap:10px!important;
    row-gap:4px!important;
    border-left:4px solid #3d8060!important;
    border-radius:13px!important;
    background:rgba(255,255,255,.97)!important;
    box-shadow:0 10px 32px rgba(20,32,51,.24)!important;
    backdrop-filter:blur(7px)!important;
  }
  .savebar-name{grid-area:name!important;min-width:0!important}
  .savebar-name>span{display:none!important}
  .savebar-name input{
    width:100%!important;height:34px!important;
    font-size:11.5px!important;font-weight:750!important;
  }
  .savebar-title{
    grid-area:status!important;
    display:flex!important;align-items:center!important;gap:6px!important;
    min-width:0!important;
  }
  .savebar-icon{width:22px!important;height:22px!important;font-size:12px!important;flex:0 0 22px!important}
  .savebar-title strong{display:none!important}
  .savebar-title small{
    display:block!important;margin:0!important;font-size:8.5px!important;
    color:#5f7468!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  .savebar-actions{
    grid-area:actions!important;
    display:flex!important;align-items:center!important;justify-content:flex-end!important;
    gap:5px!important;flex-wrap:wrap!important;max-width:300px!important;
  }
  .savebar-actions button{
    height:31px!important;padding:0 8px!important;font-size:9px!important;
    border-radius:8px!important;white-space:nowrap!important;
  }
}
@media(max-width:760px){
  main{padding-bottom:24px!important}
  .savebar{
    position:static!important;left:auto!important;right:auto!important;bottom:auto!important;transform:none!important;
    width:auto!important;margin:10px 0 14px!important;
  }
}


/* RC11 — Liste #85 : iconographie + options harmonisées */
.list85-history-options{
  display:grid;
  grid-template-columns:330px minmax(0,1fr);
  align-items:start;
  gap:18px;
  margin-top:14px;
}
.list85-history-options .historical-hero{
  width:330px!important;
  max-width:100%!important;
  flex:none!important;
}
.list85-option-list{
  max-width:none!important;
  width:100%;
  align-self:start;
}
.list85-option-list>.generic-option-choices{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.list85-option-list .generic-option-choices button{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  min-height:42px;
  max-width:280px;
}
.list85-option-list .generic-option-choices button strong{font-size:12px;line-height:1.15}
.list85-option-list .generic-option-choices button small{font-size:9.5px;line-height:1.25;margin-top:3px}
@media(max-width:1180px){
  .list85-history-options{grid-template-columns:300px minmax(0,1fr)}
  .list85-history-options .historical-hero{width:300px!important}
}
@media(max-width:820px){
  .list85-history-options{grid-template-columns:1fr}
  .list85-history-options .historical-hero{width:100%!important}
  .list85-option-list .generic-option-choices button{max-width:none;flex:1 1 190px}
}


/* RC12 — corps actif nettement identifiable */
.corps{
  position:relative;
  transition:border-color .14s ease, box-shadow .14s ease, transform .14s ease, background .14s ease;
}
.corps.selected{
  border:3px solid #b7791f!important;
  background:#fffdf7!important;
  box-shadow:
    0 0 0 2px rgba(255,220,139,.78),
    0 8px 22px rgba(83,52,14,.18),
    inset 6px 0 0 #c98a2d!important;
  transform:translateY(-1px);
}
.corps.selected .corps-head{
  background:linear-gradient(90deg,#fff0c9 0%,#f7ead7 48%,#efe3d2 100%)!important;
  border-bottom-color:#c68d38!important;
}
.corps.selected .corps-title>strong{
  color:#123d61!important;
  font-weight:950!important;
}
.corps.selected .corps-title::after{
  content:'CORPS ACTIF';
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:2px 8px;
  border-radius:999px;
  background:#b97820;
  color:#fff;
  font-size:9px;
  line-height:1;
  font-weight:950;
  letter-spacing:.07em;
  box-shadow:0 2px 6px rgba(80,48,8,.20);
}
.corps.selected .corps-total{
  background:#123f63!important;
  box-shadow:0 0 0 2px #e5bb6c,0 3px 8px rgba(18,63,99,.2)!important;
}
.active-corps-destination{
  color:#9b6418!important;
  font-weight:950!important;
  font-size:11px!important;
  letter-spacing:.025em;
}
@media(max-width:760px){
  .corps.selected{border-width:2px!important;box-shadow:0 0 0 2px rgba(255,220,139,.72),inset 4px 0 0 #c98a2d!important}
  .corps.selected .corps-title::after{font-size:8px;padding:2px 6px}
}


/* RC13 — sauvegarde intégrée dans la colonne de validation */
.export-panel .savebar{
  position:static!important;
  inset:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  top:auto!important;
  width:100%!important;
  max-width:none!important;
  margin:12px 0 0!important;
  padding:12px!important;
  z-index:auto!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:9px!important;
  box-sizing:border-box!important;
  border:1px solid #b8d5c3!important;
  border-left:1px solid #b8d5c3!important;
  border-radius:12px!important;
  background:#eff8f2!important;
  box-shadow:none!important;
}
.export-panel .savebar-title{display:flex!important;align-items:center!important;gap:8px!important}
.export-panel .savebar-title strong{display:block!important;font-size:11px!important;letter-spacing:.04em!important;color:#286044!important}
.export-panel .savebar-title small{display:block!important;font-size:9.5px!important;color:#60786a!important;white-space:normal!important}
.export-panel .savebar-icon{width:26px!important;height:26px!important;flex:0 0 26px!important;font-size:13px!important;border-radius:8px!important}
.export-panel .savebar-name{display:block!important;min-width:0!important}
.export-panel .savebar-name>span{display:none!important}
.export-panel .savebar-name input{
  width:100%!important;height:36px!important;box-sizing:border-box!important;
  font-size:11px!important;border-radius:9px!important;background:#fff!important;
}
.export-panel .savebar-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;justify-content:stretch!important}
.export-panel .savebar-actions button{
  width:100%!important;height:32px!important;padding:0 7px!important;
  font-size:9px!important;border-radius:8px!important;white-space:normal!important;line-height:1.15!important;
}
.export-panel .savebar-actions .save-primary{grid-column:1/-1!important;height:36px!important;font-size:9.5px!important}
@media(max-width:1180px){
  .export-panel .savebar{position:static!important;width:100%!important}
}


/* RC14 — impact dynamique du curseur historique */
.date-impact{margin:12px 0 4px;border:1px solid #d6c9b6;border-left:5px solid #c08a2d;border-radius:12px;background:#fffaf1;box-shadow:0 3px 10px rgba(43,54,69,.06);overflow:hidden}
.date-impact-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;background:#f6eddd;border-bottom:1px solid #e3d5be}
.date-impact-title strong{font-size:12px;color:#263e57}.date-impact-title small{font-size:10px;color:#796b58;font-weight:700}
.date-impact-body{display:grid;gap:6px;padding:9px 12px}
.date-impact-row{display:grid;grid-template-columns:112px minmax(0,1fr);gap:9px;align-items:start;font-size:11px;line-height:1.4}
.date-impact-row b{font-size:10.5px;white-space:nowrap}.date-impact-row span{font-weight:650;color:#3d4d5e}
.date-impact-row.added b,.date-impact-row.option-added b{color:#287149}.date-impact-row.removed b,.date-impact-row.option-removed b{color:#a13f32}
.date-impact-row.added{background:#edf8f0;border-radius:8px;padding:6px 8px}.date-impact-row.removed{background:#fff0ed;border-radius:8px;padding:6px 8px}
.date-impact-row.option-added,.date-impact-row.option-removed{padding:3px 8px}
.date-impact-none{font-size:11px;color:#69788a;font-weight:700;padding:2px 0}
@media(max-width:760px){.date-impact-title{display:block}.date-impact-title small{display:block;margin-top:3px}.date-impact-row{grid-template-columns:1fr;gap:2px}}


/* RC15 — blason légèrement agrandi, texte Art De La Guerre v4 plus lisible */
@media(min-width:901px){
  .topbar,.web-topbar{
    grid-template-columns:195px minmax(420px,1fr) auto!important;
    min-height:188px!important;
    padding:5px 22px!important;
    column-gap:26px!important;
  }
  .topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{
    width:184px!important;min-width:184px!important;height:184px!important;
  }
  .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{
    width:182px!important;height:182px!important;max-width:none!important;max-height:none!important;
  }
}
@media(min-width:561px) and (max-width:900px){
  .topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{width:158px!important;min-width:158px!important;height:158px!important}
  .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:156px!important;height:156px!important}
}
@media(max-width:560px){
  .topbar .brand.brand-logo-only,.web-topbar .brand.brand-logo-only{width:132px!important;min-width:132px!important;height:132px!important}
  .topbar .brand.brand-logo-only .ost-logo,.web-topbar .brand.brand-logo-only .ost-logo{width:130px!important;height:130px!important}
}


/* RC16 — frise historique persistante */
.history-timeline{margin:11px 0 5px;padding:10px 12px 12px;border:1px solid #d5c5ad;border-radius:13px;background:linear-gradient(180deg,#fffdf8,#f8f1e5);box-shadow:0 3px 10px rgba(41,53,68,.055)}
.history-timeline.empty{padding:9px 12px;color:#718092;font-size:10.5px;font-weight:700}
.timeline-caption{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:12px}.timeline-caption strong{font-size:10px;letter-spacing:.08em;color:#8c5b1d}.timeline-caption small{font-size:9.5px;color:#7a7063;font-weight:650}
.timeline-track-wrap{position:relative;height:28px;margin:0 10px}.timeline-track{position:absolute;left:0;right:0;top:12px;height:4px;border-radius:999px;background:linear-gradient(90deg,#d3c3a7,#b8c5d1)}
.timeline-marker{position:absolute;top:7px;transform:translateX(-50%);width:14px;height:14px;padding:0!important;border-radius:50%!important;border:2px solid #fff!important;background:#6e8194!important;box-shadow:0 0 0 2px #7d8ea0;z-index:3;cursor:pointer;min-width:0!important}
.timeline-marker.past{background:#9d865e!important;box-shadow:0 0 0 2px #ad9873}.timeline-marker.future{background:#3f7096!important;box-shadow:0 0 0 2px #6790af}.timeline-marker.current{width:18px;height:18px;top:5px;background:#c48221!important;box-shadow:0 0 0 3px #f1d79e,0 2px 7px #6d461f55}
.timeline-now{position:absolute;top:1px;width:2px;height:25px;background:#b4711d;transform:translateX(-1px);z-index:2;opacity:.75}
.timeline-neighbours{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:4px}.timeline-event-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;padding:8px 10px!important;border:1px solid #d7c9b5!important;border-radius:10px!important;background:#fff!important;min-height:70px;cursor:pointer;box-shadow:none!important}.timeline-event-card:hover{border-color:#b88840!important;background:#fffaf0!important}.timeline-event-card.muted{cursor:default;opacity:.62;background:#f7f5f1!important}.timeline-event-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:4px}.timeline-event-head span,.timeline-event-card>span{font-size:9px;font-weight:900;letter-spacing:.045em;color:#756958}.timeline-event-head strong{font-size:11px;color:#263f59}.timeline-event-card small{font-size:9.5px;line-height:1.35;margin-top:2px;white-space:normal}.timeline-event-card .tl-added{color:#27714a;font-weight:750}.timeline-event-card .tl-removed{color:#a23e35;font-weight:750}.timeline-event-card .tl-option{color:#9b671a;font-weight:750}.timeline-event-card .tl-option.removed{color:#93604f}
@media(max-width:760px){.timeline-caption{display:block}.timeline-caption small{display:block;margin-top:3px}.timeline-neighbours{grid-template-columns:1fr}.timeline-track-wrap{margin:0 4px}.timeline-event-card{min-height:unset}}


/* RC17 — navigation auto-hide : plus de hauteur utile pendant la construction */
.topbar,.web-topbar{
  transition:transform .22s ease,box-shadow .22s ease!important;
  will-change:transform;
}
body.header-hidden .topbar,body.header-hidden .web-topbar{
  transform:translateY(calc(-100% - 6px))!important;
  box-shadow:none!important;
  pointer-events:none;
}
body.header-hidden::before{
  content:"";position:fixed;z-index:60;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,#9d6a22,#d6ad57,#9d6a22);
  pointer-events:none;opacity:.9;
}
body.header-hidden .units-panel,body.header-hidden .export-panel{
  top:10px!important;
  max-height:calc(100vh - 20px)!important;
}
@media(max-width:1180px){
  body.header-hidden .units-panel,body.header-hidden .export-panel{top:auto!important;max-height:none!important}
}
@media(prefers-reduced-motion:reduce){.topbar,.web-topbar{transition:none!important}}


/* =========================================================
   RC19 — consolidation / polish global
   ========================================================= */

/* Images historiques : montrer l’œuvre ENTIÈRE, sans crop. */
.historical-hero{
  width:350px!important;
  max-width:100%!important;
  flex:0 0 350px!important;
  margin:0!important;
  border:1px solid #d7c7ad!important;
  border-radius:13px!important;
  overflow:hidden!important;
  background:#f2eee6!important;
  box-shadow:0 3px 12px rgba(37,49,62,.07)!important;
}
.historical-hero img{
  display:block!important;
  width:100%!important;
  height:170px!important;
  padding:6px!important;
  object-fit:contain!important;
  object-position:center center!important;
  background:radial-gradient(circle at 50% 42%,#f8f4ec 0,#e9e2d6 100%)!important;
}
.historical-hero figcaption{
  min-height:52px!important;
  padding:7px 10px 8px!important;
  gap:7px!important;
  background:linear-gradient(180deg,#fffaf1,#f4ecde)!important;
  border-top:1px solid #ded0bb!important;
}
.historical-hero figcaption strong{
  font-size:11px!important;
  line-height:1.25!important;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.historical-credit{gap:5px!important}
.historical-credit span{font-size:8.5px!important;line-height:1.2!important}
.historical-credit a{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:23px!important;padding:2px 7px!important;border:1px solid #c5d2dc!important;
  border-radius:999px!important;background:#fff!important;text-decoration:none!important;
  font-size:8.5px!important;font-weight:900!important;color:#315d80!important;
}
.historical-credit a:hover{border-color:#7898af!important;background:#f5f9fc!important;color:#173f61!important}
.historical-hero.image-error{min-height:148px!important}
.historical-hero.image-error::before{
  content:'Image indisponible — le lien Source reste accessible';
  display:flex;align-items:center;justify-content:center;text-align:center;
  min-height:92px;padding:14px;color:#746958;font-size:10px;font-weight:800;
  background:linear-gradient(135deg,#f6f1e8,#ece4d7);
}
@media(max-width:1180px){
  .historical-hero{width:320px!important;flex-basis:320px!important}
  .historical-hero img{height:155px!important}
}
@media(max-width:760px){
  .historical-hero{width:100%!important;flex-basis:100%!important}
  .historical-hero img{height:150px!important}
  .historical-hero figcaption{display:block!important}
  .historical-credit{justify-content:flex-start!important;margin-top:5px!important}
}

/* #85 utilise exactement le même cadre iconographique. */
.list85-history-options .historical-hero{width:350px!important;max-width:100%!important}
@media(max-width:1180px){.list85-history-options .historical-hero{width:320px!important}}
@media(max-width:820px){.list85-history-options .historical-hero{width:100%!important}}

/* Le dock de sauvegarde n’est plus flottant : supprimer le vide hérité de RC10. */
main{padding-bottom:32px!important}

/* Panneaux latéraux : ne jamais passer sous le grand header lorsqu’il est visible. */
@media(min-width:1181px){
  .units-panel,.export-panel{
    top:198px!important;
    max-height:calc(100vh - 210px)!important;
    scrollbar-gutter:stable;
  }
  body.header-hidden .units-panel,body.header-hidden .export-panel{
    top:10px!important;
    max-height:calc(100vh - 20px)!important;
  }
}

/* Lisibilité générale des actions et focus clavier. */
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{
  outline:2px solid #c28a31!important;
  outline-offset:2px!important;
}
button:disabled{cursor:not-allowed!important}
.generic-option-choices button,.list85-option-list .generic-option-choices button{
  transition:border-color .12s ease,background .12s ease,color .12s ease,box-shadow .12s ease!important;
}
.generic-option-choices button.active,.list85-option-list .generic-option-choices button.active{
  box-shadow:0 2px 7px rgba(32,63,96,.16)!important;
}

/* Corps non actif un peu plus neutre : l’actif ressort encore mieux sans être criard. */
.corps:not(.selected){border-color:#d9e0e7!important;box-shadow:0 1px 3px rgba(27,43,60,.035)!important}
.corps:not(.selected):hover{border-color:#b9c7d4!important}

/* Frise : les changements restent lisibles sans grossir la zone. */
.timeline-marker{transition:transform .12s ease,box-shadow .12s ease!important}
.timeline-marker:hover{transform:translateX(-50%) scale(1.18)!important;z-index:5!important}
.timeline-event-card:focus-visible{outline-offset:1px!important}

/* Validation et sauvegarde : même rythme visuel dans la colonne droite. */
.export-panel .validity,.export-panel .savebar{margin-top:11px!important}
.export-panel .savebar{border-radius:12px!important}
.export-panel .savebar-title strong{font-size:11.5px!important}
.export-panel .savebar-actions button{min-height:34px!important}

/* Footer volontairement discret. */
footer{padding:10px 12px!important;font-size:9.5px!important;letter-spacing:.035em!important}

/* Réduction de mouvement respectueuse du réglage système. */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}
}


/* RC20 — logo cliquable vers l’accueil */
.logo-home-button{
  appearance:none;border:0;background:transparent;padding:0;margin:0;display:block;
  cursor:pointer;border-radius:16px;line-height:0;position:relative;
}
.logo-home-button::after{
  content:'Accueil';position:absolute;left:50%;bottom:4px;transform:translate(-50%,6px);
  padding:4px 8px;border-radius:999px;background:rgba(10,22,36,.88);color:#f3d99d;
  font-size:9px;font-weight:900;letter-spacing:.08em;line-height:1;opacity:0;pointer-events:none;
  transition:opacity .15s ease,transform .15s ease;white-space:nowrap;
}
.logo-home-button:hover::after,.logo-home-button:focus-visible::after{opacity:1;transform:translate(-50%,0)}
.logo-home-button:hover .ost-logo{filter:brightness(1.06);transform:translateY(-1px)}
.logo-home-button .ost-logo{transition:filter .15s ease,transform .15s ease}
.logo-home-button:focus-visible{outline:3px solid #d9ab55;outline-offset:4px}


/* RC21 — bibliothèque : tri, ascenseurs et suppression globale */
.library-toolbar{grid-template-columns:minmax(0,1fr) auto!important;position:sticky;top:8px;z-index:8}
body:not(.header-hidden) .library-toolbar{top:190px}
.library-search-sort{display:grid!important;grid-template-columns:minmax(260px,1fr) minmax(245px,320px);gap:10px!important;align-items:end}
.library-sort{display:grid;grid-template-columns:auto minmax(190px,1fr);gap:8px;align-items:center;font-size:10px;font-weight:900;color:#5f7184;white-space:nowrap}
.library-sort select{height:42px;border:1px solid #d3dce5;border-radius:9px;background:#fff;padding:0 30px 0 11px;font-size:11px;font-weight:750;color:#405770}
.library-toolbar-actions{display:flex!important;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.library-toolbar .delete-all-library{border-color:#dfaaa4!important;background:#fff3f1!important;color:#9b433e!important}
.library-toolbar .delete-all-library:hover:not(:disabled){background:#ffe8e5!important;border-color:#cf837b!important;color:#7d2f2a!important}
.library-toolbar button:disabled{opacity:.45}
.library-scroll-area{overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;padding-right:7px;overscroll-behavior:contain}
.saved-scroll{max-height:min(62vh,720px);padding-top:2px;padding-bottom:8px}
.draft-scroll{max-height:245px;padding-bottom:5px}
.library-scroll-area::-webkit-scrollbar{width:11px}
.library-scroll-area::-webkit-scrollbar-track{background:#eef1f4;border-radius:999px}
.library-scroll-area::-webkit-scrollbar-thumb{background:#a9b6c2;border:3px solid #eef1f4;border-radius:999px}
.library-scroll-area::-webkit-scrollbar-thumb:hover{background:#7e91a4}
.library-no-match{padding:18px;border:1px dashed #d7dde4;border-radius:11px;background:#fafbfd;color:#778697;font-size:11px;text-align:center}
.saved-section{min-height:260px}
.sticky-library-title{position:relative;z-index:2}
@media(max-width:1100px){
  .library-toolbar{position:static!important}
  .library-search-sort{grid-template-columns:1fr!important}
  .library-toolbar{grid-template-columns:1fr!important}
  .library-toolbar-actions{justify-content:flex-start}
  .saved-scroll{max-height:68vh}
}
@media(max-width:760px){
  .library-sort{grid-template-columns:1fr;gap:4px}
  .library-sort select{width:100%}
  .saved-scroll,.draft-scroll{max-height:none;overflow:visible;padding-right:0}
}

.choice-badge{font-size:8.5px;font-style:normal;font-weight:900;color:#275a84;background:#e7f1fa;border:1px solid #a9c3dd;padding:2px 6px;border-radius:999px;letter-spacing:.04em}

/* RC27 — rétablit la barre de résumé sticky pendant la construction. */
.generic-workspace .generic-builder .summary{
  position:sticky!important;
  bottom:10px!important;
  z-index:12!important;
  margin-top:10px!important;
  border:1px solid #cdbb9f!important;
  border-radius:12px!important;
  overflow:hidden!important;
  box-shadow:0 8px 22px rgba(38,45,54,.16)!important;
  backdrop-filter:blur(7px);
}
.generic-workspace .generic-builder .summary div{
  padding:10px 8px!important;
  background:rgba(251,247,239,.96)!important;
}
.generic-workspace .generic-builder .summary div:last-child{
  background:linear-gradient(145deg,#173f60,#285f82)!important;
}
.generic-workspace .generic-builder .summary div:last-child span,
.generic-workspace .generic-builder .summary div:last-child b{color:#fff!important}
.generic-workspace .generic-builder .summary span{font-size:8px!important}
.generic-workspace .generic-builder .summary b{font-size:14px!important}


/* RC28 — cinq indicateurs dans la barre sticky (ajout de l'initiative). */
.summary{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.ally-choice-required{display:block;margin-top:7px;padding:7px 9px;border-radius:8px;background:#fff4df;border:1px solid #e1bc76;color:#7b5018!important;font-weight:850!important}

/* RC38 — exploration de toutes les troupes */
.reserve-visibility{margin:-1px 0 11px;padding:8px 9px;border:1px solid #e1d6c6;border-radius:11px;background:#fffaf1;display:flex;align-items:center;justify-content:space-between;gap:8px}
.reserve-visibility>span{font-size:8.5px;font-weight:950;letter-spacing:.09em;color:#7c6a51}
.reserve-visibility>div{display:flex;gap:4px;background:#eee5d8;padding:3px;border-radius:9px}
.reserve-visibility button{border:0;background:transparent;color:#667484;border-radius:7px;padding:6px 8px;font-size:9.5px;font-weight:850;cursor:pointer;white-space:nowrap}
.reserve-visibility button.active{background:#fff;box-shadow:0 1px 5px #563a171c;color:#29435d}
.availability-badge{font-size:8px!important;font-style:normal;font-weight:950;letter-spacing:.045em;padding:2px 6px;border-radius:999px;border:1px solid}
.availability-badge.ok{color:#2f6d43;background:#eaf6ed;border-color:#b8dec2}
.availability-badge.locked{color:#7a6650;background:#f0ece6;border-color:#d7cbbb}
.unit-card.unavailable-unit{background:#f4f3f1!important;border-bottom-color:#dedbd6!important;opacity:1!important;cursor:default!important}
.unit-card.unavailable-unit:disabled{opacity:1!important;color:inherit}
.unit-card.unavailable-unit strong{color:#66717c!important}
.unit-card.unavailable-unit .unit-types,.unit-card.unavailable-unit>div>span{color:#7d858d!important}
.unit-card.unavailable-unit .type-tag{filter:grayscale(.65);opacity:.72}
.availability-info{margin-top:7px;padding:7px 8px;border-left:3px solid #c9a66c;background:#faf7f1;border-radius:0 7px 7px 0;display:flex;flex-direction:column;gap:3px;max-width:100%}
.availability-info>b{font-size:9px;color:#68502e;text-transform:uppercase;letter-spacing:.045em}
.availability-info>span{display:block!important;margin:0!important;font-size:9px!important;line-height:1.35!important;color:#665f55!important}
.availability-info .variant-condition{color:#586777!important}
.availability-info .variant-condition strong{font-size:9px!important;color:#41566b!important}
.availability-info .current-lock-reason{margin-top:3px!important;padding-top:4px;border-top:1px dashed #d8cdc0;color:#8a4d3a!important}
.availability-info .current-lock-reason strong{font-size:9px!important;color:#8a4d3a!important}
.locked-label{color:#8a7761!important}.locked-plus{background:#9c9388!important}
.unit-card.unavailable-unit .reserve-add{background:#b9b1a7!important;color:#fff!important;cursor:not-allowed!important}
@media(max-width:520px){.reserve-visibility{align-items:stretch;flex-direction:column}.reserve-visibility>div{display:grid;grid-template-columns:1fr 1fr}.reserve-visibility button{white-space:normal}}

/* RC39 — signal de choix visible dans la fiche centrale, pas seulement dans la réserve */
.line-choice-badge{display:inline-flex;align-items:center;width:max-content;padding:3px 7px;border-radius:999px;background:#e7f1fa;border:1px solid #a9c3dd;color:#275a84;font-size:8.5px;font-style:normal;font-weight:900;letter-spacing:.05em;line-height:1;white-space:nowrap}
.generic-builder .type-select-wrap>.line-choice-badge{grid-column:1/-1;margin-bottom:-2px}


/* RC41 — finitions UX demandées en test terrain */
.corps-total{display:grid!important;align-content:center;justify-items:center;gap:2px;line-height:1.05!important;white-space:nowrap}
.corps-total .corps-unit-count{font-size:9px;font-weight:800;opacity:.82;letter-spacing:.01em}
.corps-total .corps-point-count{font-size:12px;font-weight:950}
.line-name .general-eligible-star{color:#a56e24;font-size:.92em;font-weight:950;margin-left:2px}
/* La frise et le slider partagent désormais exactement la largeur utile de la colonne date. */
.period-card .history-timeline .timeline-track-wrap{margin-left:2px!important;margin-right:212px!important}
@media(max-width:900px){.period-card .history-timeline .timeline-track-wrap{margin-right:2px!important}}

/* RC45 — curseur de date : preview purement visuelle pendant le drag, sans rerender du builder. */
.fast-year-slider{position:relative;contain:layout paint style;isolation:isolate}
.fast-year-slider>input[type="range"]{width:100%;display:block;transform:translateZ(0);will-change:transform;touch-action:pan-y;cursor:ew-resize}
.date-slider-preview{position:absolute;right:0;top:-22px;min-width:88px;text-align:right;font-size:10px;font-weight:900;color:#8a5b1e;pointer-events:none;user-select:none}
.history-timeline,.date-impact,.workspace{contain:paint}
\n\n/* RC46 — indicateur tactique de résistance (Σ cohésion individuelle) par corps. */
.corps-total{min-width:104px!important;padding-left:9px!important;padding-right:9px!important}
.corps-total .corps-resistance-count{font-size:9px;font-weight:950;color:#ffe2a0;letter-spacing:.015em;opacity:1}
.generic-corps-head{grid-template-columns:minmax(220px,1.2fr) minmax(260px,1.4fr) minmax(104px,auto)!important}
@media(max-width:1180px){.corps-total{min-width:96px!important}.generic-corps-head{grid-template-columns:1fr!important}}

/* RC47 — statistiques de corps lisibles : unités / résistance / points */
.corps-total.corps-stats{
  display:grid!important;grid-template-columns:repeat(3,minmax(48px,1fr))!important;
  gap:0!important;min-width:190px!important;padding:0!important;overflow:hidden;
  border-radius:10px!important;background:#1f4466!important;box-shadow:0 2px 6px #17364f25;
}
.corps-total.corps-stats .corps-stat{
  display:flex!important;flex-direction:column;align-items:center;justify-content:center;
  min-height:42px;padding:5px 7px!important;border-right:1px solid #ffffff24;line-height:1.05;
}
.corps-total.corps-stats .corps-stat:last-child{border-right:0}
.corps-total.corps-stats .corps-stat small{
  display:block;font-size:7px!important;font-weight:850!important;letter-spacing:.07em;opacity:.78;color:#fff!important;
}
.corps-total.corps-stats .corps-stat strong{
  display:block;margin-top:3px;font-size:13px!important;font-weight:950!important;color:#fff!important;
}
.corps-total.corps-stats .corps-resistance-count strong{color:#ffe2a0!important}
@media(max-width:1180px){
  .corps-total.corps-stats{min-width:170px!important}
  .corps-total.corps-stats .corps-stat{padding:5px 5px!important}
}

/* RC48 — encart statistiques plus compact et lisible, sans débordement. */
.corps-total.corps-stats{
  grid-template-columns:repeat(3,minmax(44px,1fr))!important;
  min-width:158px!important;
  width:158px!important;
  max-width:158px!important;
  border-radius:12px!important;
}
.corps-total.corps-stats .corps-stat{
  min-height:46px!important;
  padding:5px 6px!important;
}
.corps-total.corps-stats .corps-stat small{
  font-size:7.5px!important;
  letter-spacing:.045em!important;
  white-space:nowrap!important;
}
.corps-total.corps-stats .corps-resistance-count small{
  font-size:16px!important;
  line-height:.8!important;
  font-weight:950!important;
  color:#ffe2a0!important;
  opacity:1!important;
  letter-spacing:0!important;
}
.corps-total.corps-stats .corps-stat strong{font-size:14px!important}
/* Builder #85 : réserver réellement la largeur de l'encart dans la grille. */
.corps-head:not(.generic-corps-head){
  grid-template-columns:minmax(145px,1fr) minmax(115px,.78fr) 94px 98px 158px!important;
  gap:7px!important;
}
.generic-corps-head{
  grid-template-columns:minmax(210px,1.15fr) minmax(245px,1.35fr) 158px!important;
}
@media(max-width:1450px){
  .corps-head:not(.generic-corps-head){
    grid-template-columns:minmax(130px,1fr) minmax(105px,.72fr) 90px 94px 152px!important;
    gap:6px!important;
  }
  .corps-total.corps-stats{min-width:152px!important;width:152px!important;max-width:152px!important}
  .generic-corps-head{grid-template-columns:minmax(190px,1.1fr) minmax(220px,1.25fr) 152px!important}
}
@media(max-width:1180px){
  .corps-head:not(.generic-corps-head),.generic-corps-head{grid-template-columns:1fr!important}
  .corps-total.corps-stats{justify-self:start!important;width:158px!important;max-width:158px!important}
}


/* RC54 — encart statistiques : retour à une base saine, texte visible et correctement aligné. */
.corps-total.corps-stats,
.corps-total.corps-stats *{ box-sizing:border-box!important; }
.corps-total.corps-stats{
  display:grid!important;
  grid-template-columns:repeat(3,1fr)!important;
  gap:0!important;
  width:168px!important;
  min-width:168px!important;
  max-width:168px!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#1f4b73 0%, #173d60 100%)!important;
  border:2px solid #d0a253!important;
  box-shadow:0 2px 6px rgba(23,54,79,.14)!important;
}
.corps-total.corps-stats .corps-stat{
  display:grid!important;
  grid-template-rows:auto auto!important;
  align-content:center!important;
  justify-items:center!important;
  row-gap:4px!important;
  min-height:50px!important;
  padding:7px 6px 6px!important;
  margin:0!important;
  border-right:1px solid rgba(255,255,255,.16)!important;
  text-align:center!important;
  opacity:1!important;
}
.corps-total.corps-stats .corps-stat:last-child{ border-right:0!important; }
.corps-total.corps-stats .corps-stat small,
.corps-total.corps-stats .corps-stat strong{
  display:block!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  line-height:1!important;
  color:#ffffff!important;
  opacity:1!important;
  justify-self:center!important;
  align-self:center!important;
  font-family:inherit!important;
}
.corps-total.corps-stats .corps-stat small{
  font-size:8.6px!important;
  font-weight:900!important;
  letter-spacing:.05em!important;
  white-space:nowrap!important;
}
.corps-total.corps-stats .corps-resistance-count small{
  font-size:13px!important;
  letter-spacing:0!important;
  font-weight:950!important;
}
.corps-total.corps-stats .corps-stat strong{
  font-size:15px!important;
  font-weight:950!important;
  font-variant-numeric:tabular-nums!important;
}
/* Largeur réservée, y compris pour la liste 85 */
.corps-head:not(.generic-corps-head){
  grid-template-columns:minmax(145px,1fr) minmax(115px,.78fr) 94px 98px 168px!important;
  gap:7px!important;
}
.generic-corps-head{
  grid-template-columns:minmax(210px,1.15fr) minmax(245px,1.35fr) 168px!important;
}
@media(max-width:1450px){
  .corps-head:not(.generic-corps-head){
    grid-template-columns:minmax(130px,1fr) minmax(105px,.72fr) 90px 94px 160px!important;
    gap:6px!important;
  }
  .generic-corps-head{grid-template-columns:minmax(190px,1.1fr) minmax(220px,1.25fr) 160px!important;}
  .corps-total.corps-stats{width:160px!important;min-width:160px!important;max-width:160px!important;}
}
@media(max-width:1180px){
  .corps-head:not(.generic-corps-head),.generic-corps-head{grid-template-columns:1fr!important;}
  .corps-total.corps-stats{justify-self:start!important;width:168px!important;min-width:168px!important;max-width:168px!important;}
}


/* RC55 — encart statistiques : lignes verrouillées pour un alignement strict des valeurs. */
.corps-total.corps-stats,
.corps-total.corps-stats *{ box-sizing:border-box!important; }
.corps-total.corps-stats{
  display:grid!important;
  grid-template-columns:repeat(3,1fr)!important;
  width:168px!important;
  min-width:168px!important;
  max-width:168px!important;
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#1f4b73 0%, #173d60 100%)!important;
  border:2px solid #d0a253!important;
  box-shadow:0 2px 6px rgba(23,54,79,.14)!important;
}
.corps-total.corps-stats .corps-stat{
  display:grid!important;
  grid-template-rows:14px 18px!important;
  align-content:center!important;
  justify-items:center!important;
  align-items:center!important;
  row-gap:3px!important;
  min-height:52px!important;
  height:52px!important;
  padding:8px 4px 7px!important;
  margin:0!important;
  border-right:1px solid rgba(255,255,255,.16)!important;
  text-align:center!important;
  opacity:1!important;
}
.corps-total.corps-stats .corps-stat:last-child{ border-right:0!important; }
.corps-total.corps-stats .corps-stat small,
.corps-total.corps-stats .corps-stat strong{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  line-height:1!important;
  color:#ffffff!important;
  opacity:1!important;
  font-family:inherit!important;
}
.corps-total.corps-stats .corps-stat small{
  font-size:8.8px!important;
  font-weight:900!important;
  letter-spacing:.05em!important;
  white-space:nowrap!important;
}
/* Sigma un peu plus grand sans casser la hauteur de ligne */
.corps-total.corps-stats .corps-resistance-count small{
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:0!important;
}
.corps-total.corps-stats .corps-stat strong{
  font-size:15px!important;
  font-weight:950!important;
  font-variant-numeric:tabular-nums!important;
}
.corps-head:not(.generic-corps-head){
  grid-template-columns:minmax(145px,1fr) minmax(115px,.78fr) 94px 98px 168px!important;
  gap:7px!important;
}
.generic-corps-head{
  grid-template-columns:minmax(210px,1.15fr) minmax(245px,1.35fr) 168px!important;
}
@media(max-width:1450px){
  .corps-head:not(.generic-corps-head){
    grid-template-columns:minmax(130px,1fr) minmax(105px,.72fr) 90px 94px 160px!important;
    gap:6px!important;
  }
  .generic-corps-head{grid-template-columns:minmax(190px,1.1fr) minmax(220px,1.25fr) 160px!important;}
  .corps-total.corps-stats{width:160px!important;min-width:160px!important;max-width:160px!important;}
}
@media(max-width:1180px){
  .corps-head:not(.generic-corps-head),.generic-corps-head{grid-template-columns:1fr!important;}
  .corps-total.corps-stats{justify-self:start!important;width:168px!important;min-width:168px!important;max-width:168px!important;}
}


/* RC57 — réserve alliée contextuelle + finitions typographiques. */
.units-panel.ally-reserve-focus{
  border-color:#b88a3f!important;
  box-shadow:0 0 0 2px rgba(184,138,63,.10), 0 6px 18px rgba(50,65,80,.05)!important;
}
.ally-reserve-banner.ally-focus-banner{
  margin:2px 0 10px!important;
  padding:10px 11px!important;
  border:1px solid #d7bd8f!important;
  border-left:4px solid #a9792e!important;
  border-radius:9px!important;
  background:linear-gradient(90deg,#fff5df,#fffdf7)!important;
}
.ally-reserve-banner.ally-focus-banner strong{
  font-size:10px!important;
  color:#6f4d18!important;
  line-height:1.3!important;
}
.ally-reserve-banner.ally-focus-banner span{
  margin-top:3px!important;
  font-size:9px!important;
  color:#5c6673!important;
  line-height:1.35!important;
}
.ally-reserve-banner.ally-focus-banner small{
  margin-top:4px!important;
  font-size:9px!important;
  line-height:1.4!important;
  color:#78694f!important;
}
/* Les commentaires de contexte et de disponibilité ne doivent jamais être coupés visuellement. */
.source-context,
.availability-info,
.availability-info>span,
.availability-info .variant-condition,
.availability-info .current-lock-reason{
  max-width:100%!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
.source-context{
  display:block!important;
  line-height:1.4!important;
}

/* RC60/RC62 — contraste renforcé : Cv moyenne / Cv lourde / Char léger / Char lourd */
.type-tone-cv-medium{--class-color:#8b7bd0}
.type-tone-cv-heavy{--class-color:#38265f}
.type-tone-cv-light-chariot{--class-color:#5676a8}
.type-tone-hch{--class-color:#a76632}
.generic-general-flags{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.generic-general-flags .generic-included{margin:0!important;white-space:nowrap}
.generic-unreliable{color:#7d4d22!important}

/* RC63 — variantes des corps alliés */
.ally-variant-forced{display:block;margin-top:7px;padding:7px 9px;border-radius:8px;background:#edf7ef;border:1px solid #acd0b5;color:#2d6e3b!important;font-weight:800!important}
.ally-focus-banner .ally-variant-forced{margin-top:4px}
.ally-option-group .generic-option-choices.compact button.active{box-shadow:0 0 0 2px rgba(45,110,59,.16)}


/* ===========================================================
  V4.4.36 RC66 — actions d'unité, sans libellé permanent
  Pictogramme de déplacement (6 points + flèches) et corbeille.
  La logique de glisser-déposer / suppression n'est pas modifiée.
  =========================================================== */
.builder .line .drag-handle.ost-unit-grip{
  width:46px!important;min-width:46px!important;min-height:54px!important;
  box-sizing:border-box;display:flex!important;align-items:center!important;
  justify-content:center!important;padding:6px!important;
  border:1.5px solid #8eacc3!important;border-radius:10px!important;
  background:#eaf2f9!important;color:#2c597b!important;
  box-shadow:inset 0 1px 0 #fff,0 1px 2px rgba(18,52,77,.08);
  cursor:grab!important;user-select:none;-webkit-user-select:none;
  transition:background .13s,border-color .13s,box-shadow .13s,transform .13s;
}
.builder .line .drag-handle.ost-unit-grip .ost-grip-symbol{
  display:block!important;width:28px;height:40px;pointer-events:none;
}
.builder .line .drag-handle.ost-unit-grip:hover{
  background:#d6e9f8!important;border-color:#376b96!important;
  color:#1c4c76!important;box-shadow:0 0 0 3px rgba(37,100,148,.14)!important;
}
.builder .line .drag-handle.ost-unit-grip:active{
  cursor:grabbing!important;background:#c0dff3!important;transform:scale(.98);
}
.builder .line .ost-unit-remove.trash{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:46px!important;min-width:46px!important;max-width:46px!important;
  height:46px!important;min-height:46px!important;
  flex:0 0 46px!important;padding:0!important;margin:0!important;
  box-sizing:border-box!important;
  color:#a02b28!important;background:#fff1ef!important;
  border:1.5px solid #cc7770!important;border-radius:10px!important;
  line-height:1!important;cursor:pointer!important;
  transition:background .13s,border-color .13s,box-shadow .13s;
}
.builder .line .ost-unit-remove.trash svg{display:block!important;width:22px;height:22px;flex:0 0 22px}
.builder .line .ost-unit-remove.trash:hover{
  background:#fbd9d5!important;border-color:#a92f2a!important;
  box-shadow:0 2px 8px rgba(153,45,41,.14)!important;
}
.builder .line .ost-unit-remove.trash:focus-visible{
  outline:3px solid #296a9d!important;outline-offset:2px!important;
}
.builder .line .line-actions{align-items:center!important;gap:7px!important;min-width:0!important}
.builder .line .line-actions .split{min-height:38px!important}
/* Grande largeur : garder les deux actions côte à côte. */
.workspace .builder .line{
  grid-template-columns:46px minmax(135px,1.12fr) minmax(175px,1.07fr)
    86px minmax(145px,1.1fr) 78px 115px!important;
  gap:8px!important;
}
.generic-builder.builder .line{
  grid-template-columns:46px minmax(160px,1.05fr) minmax(200px,1.45fr)
    104px 86px 115px!important;
  gap:8px!important;
}
/* Largeur moyenne : deux rangées, les commandes restent accessibles. */
@media(max-width:1650px){
  .workspace .builder .line{
    grid-template-columns:46px minmax(108px,1fr) minmax(132px,1.2fr) 82px 62px 88px!important;
    grid-template-areas:
      "drag name name qty cost actions"
      "drag type options options options actions"!important;
    row-gap:8px!important;
  }
  .workspace .builder .line>.ost-unit-grip{grid-area:drag}
  .workspace .builder .line>.line-name{grid-area:name}
  .workspace .builder .line>.type-select-wrap{grid-area:type}
  .workspace .builder .line>.qty-stepper{grid-area:qty}
  .workspace .builder .line>.options{grid-area:options}
  .workspace .builder .line>.cost{grid-area:cost}
  .workspace .builder .line>.line-actions{grid-area:actions;flex-direction:column!important;justify-content:center!important}
  .generic-builder.builder .line{
    grid-template-columns:46px minmax(135px,1fr) minmax(168px,1.2fr) 94px 90px!important;
    grid-template-areas:
      "drag name name qty actions"
      "drag type type cost actions"!important;
    row-gap:8px!important;
  }
  .generic-builder.builder .line>.ost-unit-grip{grid-area:drag}
  .generic-builder.builder .line>.line-name{grid-area:name}
  .generic-builder.builder .line>.type-select-wrap{grid-area:type}
  .generic-builder.builder .line>.qty-stepper{grid-area:qty}
  .generic-builder.builder .line>.cost{grid-area:cost}
  .generic-builder.builder .line>.generic-line-actions{grid-area:actions;flex-direction:column!important;justify-content:center!important}
}
@media(max-width:820px){
  .workspace .builder .line{
    grid-template-columns:46px minmax(0,1fr) 94px!important;
    grid-template-areas:
      "drag name name"
      "drag type type"
      "drag qty cost"
      "drag options options"
      "drag actions actions"!important;
    column-gap:9px!important;
  }
  .workspace .builder .line>.line-actions,
  .generic-builder.builder .line>.generic-line-actions{
    flex-direction:row!important;justify-content:flex-end!important;
  }
  .generic-builder.builder .line{
    grid-template-columns:46px minmax(0,1fr) 94px!important;
    grid-template-areas:
      "drag name qty"
      "drag type type"
      "drag cost cost"
      "drag actions actions"!important;
    column-gap:9px!important;
  }
}
@media(max-width:380px){
  .builder .line .drag-handle.ost-unit-grip{width:44px!important;min-width:44px!important}
  .workspace .builder .line,.generic-builder.builder .line{grid-template-columns:44px minmax(0,1fr) 94px!important}
}
@media(prefers-reduced-motion:reduce){
 .builder .line .drag-handle.ost-unit-grip,
 .builder .line .ost-unit-remove.trash{transition:none!important;transform:none!important}
}
