@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--ink:#152039;--ink2:#31425b;--navy:#111c32;--muted:#8995a6;--border:#e7edf3;--surface:#fff;--page:#f7f9fc;--teal:#0f9188;--teal-light:#e1f6f1;--blue:#426bdd;--amber:#c68529;--red:#c64b52;--shadow:0 18px 45px rgba(18,42,77,.05)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--page);color:var(--ink);font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}a{color:inherit;text-decoration:none}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}.hidden{display:none!important}.shell{display:flex;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;width:247px;flex-shrink:0;background:var(--navy);color:#eaf1fc;display:flex;flex-direction:column;padding:31px 18px 22px;z-index:20}.brand{display:flex;align-items:center;gap:12px;padding:4px 14px 39px}.brand-logo{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#1fd3b8;color:#072e34;box-shadow:0 5px 30px rgba(31,211,184,.17)}.brand-logo svg{width:25px;height:25px;stroke-width:2}.brand strong{display:block;font:800 20px 'Manrope',system-ui,sans-serif,system-ui,sans-serif;letter-spacing:-.6px}.brand small{font-size:11px;color:#8592ac;letter-spacing:.15px}.sidebar-label{font-size:10px;color:#65748d;letter-spacing:1.2px;font-weight:800;margin:0 14px 14px}.nav{display:flex;flex-direction:column;gap:5px}.nav-link{border:0;background:transparent;width:100%;text-align:left;display:flex;align-items:center;gap:13px;padding:12px 14px;color:#a2aec3;border-radius:11px;font-size:13px;font-weight:700}.nav-link:hover,.nav-link.active{background:#20324c;color:#f9ffff}.nav-link.active{box-shadow:inset 3px 0 #27d2bd}.nav-link svg{width:18px;height:18px}.nav-counter{margin-left:auto;background:#304764;color:#bfd1e6;font-size:11px;border-radius:7px;padding:3px 7px}.sidebar-bottom{margin-top:auto}.privacy-mini{display:flex;gap:12px;padding:15px 12px 17px;background:#1b2a42;border:1px solid #26374f;border-radius:13px}.privacy-mini svg{color:#38d9bf;width:18px;height:18px}.privacy-mini b{font-size:11px;display:block;line-height:1.5}.privacy-mini span{font-size:11px;color:#8e9bb0;line-height:1.55;display:block;margin-top:3px}.app-version{color:#67758e;font-size:10px;text-align:center;margin-top:17px}.workspace{flex:1;min-width:0}.topbar{height:74px;padding:0 48px;display:flex;align-items:center;justify-content:space-between;background:white;border-bottom:1px solid var(--border)}.crumb{font-size:12px;color:#9aa5b4}.crumb span{padding:0 11px;color:#c8d0da}.crumb b{font-weight:700;color:#485671}.topbar-end{display:flex;align-items:center;gap:9px;color:#73829a;font-size:11px;font-weight:700}.local-dot{width:7px;height:7px;border-radius:50%;background:#20c0a3}.topbar-badge{margin-left:13px;padding:7px 11px;border-radius:7px;background:#f1f6fb;color:#536681;font-size:10px;letter-spacing:.4px}.main{max-width:1320px;margin:0 auto;padding:39px 48px 70px}.page{display:none}.page.active{display:block}.page-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:27px}.eyebrow{color:#13a193;font-weight:800;letter-spacing:1.3px;font-size:10px;margin-bottom:11px}.eyebrow-star{font-size:15px;margin-right:3px}.page-heading h1,.simple-heading h1{font:800 clamp(27px,3vw,36px)/1.16 'Manrope',system-ui,sans-serif;letter-spacing:-1.4px;margin:0 0 12px}.page-heading h1 span{color:#15a995}.page-heading p,.simple-heading p{font-size:13px;line-height:1.7;color:#8290a4;margin:0}.page-heading-decoration{width:74px;height:74px;background:linear-gradient(135deg,#e3f8f4,#eff9ff);border-radius:26px;display:grid;place-items:center;color:#1da99c;transform:rotate(7deg)}.page-heading-decoration svg{height:34px;width:34px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:24px}.metric{display:flex;gap:14px;align-items:center;padding:21px 22px;border:1px solid var(--border);border-radius:15px;background:#fff;box-shadow:0 8px 27px rgba(24,49,73,.023)}.metric-icon{width:43px;height:43px;border-radius:12px;display:grid;place-items:center}.metric-icon.teal{color:#0c998e;background:#e8f8f4}.metric-icon.amber{color:#d19531;background:#fff5e5}.metric-icon.blue{color:#5074db;background:#eaf0ff}.metric span{font-size:11px;color:#8a97a8;display:block;margin-bottom:4px;font-weight:600}.metric strong{font:800 24px 'Manrope',system-ui,sans-serif;letter-spacing:-.5px}.dropzone{border:1.6px dashed #b9e2db;position:relative;overflow:hidden;background:linear-gradient(110deg,#effcf9 0%,#f4fcfb 50%,#eff8ff 100%);border-radius:18px;min-height:237px;display:flex;align-items:center;padding:27px 45px;gap:30px;outline:none;transition:.2s}.dropzone.dragover,.dropzone:focus-visible{border-color:#07bca3;box-shadow:0 0 0 3px rgba(31,211,184,.13)}.drop-ornament{position:absolute;border:1px solid rgba(34,164,162,.10);border-radius:50%;width:180px;height:180px;right:5%;top:-104px}.drop-ornament.d2{width:260px;height:260px;right:-190px;bottom:-177px;top:auto}.upload-symbol{width:101px;height:101px;flex-shrink:0;background:rgba(255,255,255,.85);color:#0fac9e;border-radius:25px;display:grid;place-items:center;box-shadow:0 12px 40px rgba(20,131,128,.07)}.upload-symbol svg{width:44px;height:44px;stroke-width:1.5}.upload-content{position:relative;z-index:1}.upload-kicker{color:#27a899;font-size:10px;font-weight:800;letter-spacing:1.25px;margin-bottom:5px}.upload-content h2{font:800 20px 'Manrope',system-ui,sans-serif;letter-spacing:-.6px;margin:0 0 5px}.upload-content p{font-size:12px;color:#7f91a3;margin:0 0 17px}.upload-buttons{display:flex;gap:10px;flex-wrap:wrap}.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:11px 17px;border:1px solid transparent;border-radius:10px;white-space:nowrap;transition:.17s;font-size:12px;font-weight:800}.button svg{width:16px;height:16px}.button.primary{background:#129d90;color:#fff;box-shadow:0 5px 10px rgba(18,157,144,.12)}.button.primary:hover{background:#087e75}.button.secondary{background:white;color:#304258;border-color:#dbe9ee}.button.secondary:hover{border-color:#9ad5cd}.button.dark{color:#fff;background:#182840}.button.dark:hover{background:#314966}.button.outline{color:#243d58;border-color:#d7e3ed;background:white}.button.outline:hover{border-color:#81b5af}.upload-content small{display:block;color:#9eabb8;margin-top:12px;font-size:10px}.section-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:35px 0 17px}.section-title{display:flex;align-items:center;gap:9px}.section-title svg{color:#6d7e96;width:18px}.section-title h2{font:800 16px 'Manrope',system-ui,sans-serif;margin:0;letter-spacing:-.3px}.count-pill{background:#e8eff7;color:#60738e;font-size:10px;padding:4px 7px;border-radius:6px;font-weight:800}.section-heading p{color:#9aa6b3;font-size:11px;margin:6px 0 0}.list-actions{display:flex;gap:9px;align-items:center}.text-button{background:transparent;color:#8998aa;border:0;display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;padding:8px}.text-button svg{width:15px;height:15px}.editor-grid{display:grid;grid-template-columns:minmax(265px,.85fr) minmax(310px,1.15fr);gap:16px;align-items:start}.editor-grid:not(.has-tickets){display:block}.empty-state{min-height:305px;border:1px solid var(--border);border-radius:16px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;padding:35px}.empty-graphic{background:#f0f6fb;width:67px;height:67px;display:grid;place-items:center;border-radius:20px;color:#8bb0cb;margin-bottom:5px}.empty-graphic svg{width:30px;height:30px}.empty-state h3{font:800 15px 'Manrope',system-ui,sans-serif;margin:0}.empty-state p{font-size:12px;color:#94a0b2;margin:0}.empty-demo{color:#0c988c;border:0;background:transparent;font-size:12px;font-weight:800;margin-top:9px}.empty-demo:hover{text-decoration:underline}.empty-demo span{padding-left:5px}.ticket-list,.ticket-editor{background:white;border:1px solid var(--border);border-radius:15px;overflow:hidden;box-shadow:var(--shadow)}.ticket-list-header{padding:16px 19px;border-bottom:1px solid var(--border);font-weight:800;font-size:12px;display:flex;justify-content:space-between}.ticket-list-header small{font-size:10px;color:#9da9b9;font-weight:500}.ticket-items{max-height:700px;overflow-y:auto}.ticket-item{display:flex;gap:11px;padding:13px 15px;border:0;border-bottom:1px solid #f1f4f8;background:white;width:100%;text-align:left;align-items:center;transition:.18s}.ticket-item:hover{background:#f8fbfc}.ticket-item.active{background:#f1fcf9;box-shadow:inset 3px 0 #21b3a6}.ticket-thumb{height:53px;width:44px;border-radius:7px;object-fit:contain;background:#f3f6f8;border:1px solid #ebeff3}.ticket-item-body{flex:1;min-width:0}.ticket-item-name{font-size:11px;font-weight:800;overflow-wrap:anywhere;line-height:1.5;color:#25384f}.ticket-item-meta{display:flex;gap:8px;align-items:center;margin-top:5px;color:#8c9aab;font-size:10px}.status-pill{font-size:9px;font-weight:800;border-radius:5px;padding:3px 6px;display:inline-flex;align-items:center;gap:4px;width:max-content}.status-pill.ready{color:#0c9783;background:#dff9f1}.status-pill.pending{color:#b77b23;background:#fff3dd}.status-pill.processing{color:#5275c5;background:#edf2ff}.ticket-item-arrow{color:#bcc7d3;width:15px}.ticket-editor{min-width:0}.editor-top{padding:17px 20px;display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border)}.editor-top b{font-size:13px}.editor-top p{font-size:10px;color:#9da9b9;margin:5px 0 0}.editor-top-actions{display:flex;align-items:center;gap:8px}.icon-button{width:31px;height:31px;background:#f5f8fb;border:1px solid #eaf0f6;border-radius:9px;color:#7a8da2;display:grid;place-items:center}.icon-button:hover{background:#eaf2f7}.icon-button.danger:hover{background:#fff1f2;color:#b83f45}.icon-button svg{width:15px;height:15px}.preview-wrap{overflow:hidden;background:linear-gradient(130deg,#f4f7fb,#eef2f6);padding:15px;position:relative;height:235px;display:grid;place-items:center;border-bottom:1px solid var(--border)}.preview-wrap img{display:block;position:absolute;top:13px;left:50%;transform:translateX(-50%);height:calc(100% - 26px);width:auto;max-width:calc(100% - 30px);max-height:calc(100% - 26px);object-fit:contain;box-shadow:0 7px 24px rgba(43,63,83,.12);background:white}.preview-label{position:absolute;top:12px;left:13px;color:#7288a0;background:#fff;border:1px solid #e6edf3;padding:5px 9px;border-radius:7px;font-size:9px;font-weight:800}.preview-progress{position:absolute;bottom:10px;background:rgba(16,29,49,.9);color:white;border-radius:18px;padding:8px 13px;font-size:11px;display:flex;gap:7px;align-items:center}.pulse{width:8px;height:8px;border-radius:50%;background:#27d6be;animation:pulse 1s infinite alternate}@keyframes pulse{to{opacity:.25}}.editor-form{padding:20px}.form-section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.form-section-title h3{margin:0;font-size:12px;font-weight:800}.recognition-hint{font-size:10px;color:#7f8c9f}.fields-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field.full{grid-column:1/-1}.field label{font-size:10px;color:#718198;font-weight:800}.field input,.field select,.field textarea{min-width:0;width:100%;padding:11px 10px;border:1px solid #dfe7ef;background:#fff;border-radius:9px;color:#20334c;outline:none;font-size:12px}.field input:focus,.field select:focus,.field textarea:focus{border-color:#1eafa2;box-shadow:0 0 0 3px rgba(30,175,162,.11)}.field textarea{resize:vertical;min-height:91px;font-size:11px;line-height:1.5}.field .field-help{font-size:10px;line-height:1.5;color:#94a2b3}.input-suffix{position:relative}.input-suffix input{padding-right:30px}.input-suffix .suffix{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:11px;color:#91a0b1}.category-detection{margin-top:13px;border-radius:10px;padding:11px 12px;font-size:10px;line-height:1.6;display:flex;gap:9px;align-items:flex-start}.category-detection.good{background:#eaf9f5;color:#207c73}.category-detection.caution{background:#fff8eb;color:#957029}.category-detection svg{width:15px;height:15px;margin-top:1px}.filename-preview{margin-top:16px;border-radius:10px;padding:14px;background:#f3f7fb;border:1px solid #e8eef4}.filename-preview span{display:block;color:#8493a6;font-size:9px;letter-spacing:.65px;font-weight:800;margin-bottom:9px}.filename-preview strong{font-size:12px;color:#273f58;overflow-wrap:anywhere;display:block;line-height:1.6}.filename-preview.invalid strong{color:#bc685c}.editor-actions{display:flex;gap:10px;align-items:center;margin-top:16px}.editor-actions .button{flex:1}.editor-actions .button:first-child{flex:1.25}.ocr-details{margin-top:16px;border-top:1px solid var(--border);padding-top:13px}.ocr-details summary{cursor:pointer;color:#7e8ea2;font-size:11px;font-weight:700;list-style:none;display:flex;align-items:center;justify-content:space-between}.ocr-details summary::after{content:'+';font-size:16px}.ocr-details[open] summary::after{content:'−'}.ocr-details textarea{width:100%;border:1px solid #e3eaf0;border-radius:8px;padding:10px;resize:vertical;min-height:95px;margin-top:11px;font:11px/1.6 monospace}.ocr-details .text-button{margin-top:6px;color:var(--teal)}.footnote{display:flex;align-items:flex-start;gap:8px;font-size:10px;color:#a3afbc;margin-top:23px;line-height:1.6}.footnote svg{width:14px;height:14px;flex-shrink:0;margin-top:1px}.simple-heading{margin-bottom:25px}.card-panel{background:#fff;border:1px solid var(--border);border-radius:16px;padding:26px;box-shadow:var(--shadow)}.history-row{display:flex;align-items:center;gap:15px;padding:14px 0;border-bottom:1px solid #eef2f6}.history-row:last-child{border-bottom:none}.history-file{display:grid;place-items:center;border-radius:10px;height:42px;width:42px;background:#edf6fc;color:#4d8bb8;flex-shrink:0}.history-name{font-weight:800;font-size:12px;overflow-wrap:anywhere}.history-meta{font-size:10px;color:#8b9bad;margin-top:5px}.history-empty{text-align:center;color:#99a8b9;padding:75px 0;font-size:12px}.history-empty svg{display:block;margin:0 auto 15px;width:34px;height:34px;color:#b5cbd9}.history-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.rules-panel{min-height:365px}.card-title{display:flex;align-items:center;gap:10px;border-bottom:1px solid #edf0f5;padding-bottom:17px;margin-bottom:20px}.card-title svg{color:var(--teal)}.card-title h2{margin:0;font:800 14px 'Manrope',system-ui,sans-serif}.file-pattern{background:#f1f7f9;color:#274661;padding:18px;border-radius:10px;text-align:center;font-size:15px;font-weight:800;letter-spacing:-.3px;overflow-wrap:anywhere}.file-pattern span{color:#12998c}.file-pattern em{font-style:normal;color:#99a9b7;margin:0 4px}.rules-panel p{font-size:11px;color:#92a0af;line-height:1.65}.rule-row{display:flex;align-items:flex-start;gap:9px;font-size:11px;color:#617289;padding:8px 0}.rule-row svg{color:#25ac99;width:15px;height:15px}.category-tokens{display:flex;gap:8px;flex-wrap:wrap}.category-token{background:#f1f6fa;color:#47647f;border-radius:7px;padding:8px 10px;font-size:10px;font-weight:800}.example-card{margin-top:24px;padding:15px;border:1px solid #dfece9;background:#f6fcfa;border-radius:10px}.example-card span{display:block;font-size:9px;color:#75a699;letter-spacing:1px;font-weight:800;margin-bottom:6px}.example-card strong{font-size:11px;overflow-wrap:anywhere}.subtle-note{margin-top:15px}.toast{position:fixed;right:28px;bottom:25px;z-index:100;background:#182840;color:white;box-shadow:0 15px 40px rgba(16,28,43,.18);padding:14px 18px;font-size:12px;max-width:400px;border-radius:11px;opacity:0;pointer-events:none;transform:translateY(12px);transition:.2s;line-height:1.5}.toast.show{opacity:1;transform:translateY(0)}.toast.error{background:#a13d42}
@media(max-width:1040px){.sidebar{width:205px}.main{padding:30px 26px 70px}.topbar{padding:0 26px}.metric{padding:17px}.dropzone{padding:25px}.editor-grid{grid-template-columns:1fr 1.15fr}}
@media(max-width:760px){.shell{display:block}.sidebar{position:sticky;top:0;height:63px;width:100%;flex-direction:row;padding:10px 15px;align-items:center}.brand{padding:0;gap:9px}.brand-logo{height:36px;width:36px;border-radius:10px}.brand-logo svg{width:20px}.brand strong{font-size:16px}.brand small{font-size:9px}.sidebar-label,.sidebar-bottom{display:none}.nav{display:flex;flex-direction:row;gap:2px;margin-left:auto}.nav-link{width:39px;height:39px;padding:10px;justify-content:center}.nav-link svg{width:20px}.nav-link span{display:none}.nav-link.active{box-shadow:inset 0 -3px #27d2bd}.topbar{height:45px;padding:0 16px}.topbar-end{font-size:9px}.topbar-badge{display:none}.main{padding:23px 16px 80px}.page-heading{margin-bottom:21px}.page-heading-decoration{display:none}.page-heading h1,.simple-heading h1{font-size:29px}.page-heading p{font-size:12px}.metrics{gap:9px}.metric{padding:12px 10px;gap:9px}.metric-icon{width:32px;height:32px;border-radius:9px}.metric-icon svg{width:17px}.metric span{font-size:9px}.metric strong{font-size:20px}.dropzone{padding:25px 18px;min-height:195px;gap:17px}.upload-symbol{width:56px;height:56px;border-radius:15px;align-self:flex-start}.upload-symbol svg{width:27px}.upload-content h2{font-size:17px}.upload-content p{font-size:11px}.upload-buttons{gap:7px}.button{padding:10px 11px;font-size:11px}.section-heading{align-items:flex-start;flex-direction:column;margin-top:26px}.list-actions{width:100%;justify-content:space-between}.list-actions .button{margin-left:auto}.editor-grid{grid-template-columns:1fr}.ticket-items{max-height:230px}.ticket-item{padding:10px}.preview-wrap{height:250px}.settings-grid{grid-template-columns:1fr}.card-panel{padding:20px}.footnote{font-size:10px}}
@media(max-width:400px){.upload-symbol{display:none}.upload-content h2{font-size:18px}.metrics{gap:5px}.metric{padding:10px 8px;gap:7px}.metric-icon{display:none}.button{font-size:10px}.editor-form{padding:14px}.fields-grid{gap:10px}}

/* Version 1.2 — Bleu profond, bleu minéral et sable écru */
:root {
  --ink:#1d3448; --ink2:#435b6b; --navy:#193b5a; --muted:#8b918f;
  --border:#e6dfd4; --surface:#fffdf9; --page:#f8f4ed;
  --teal:#376e9b; --teal-light:#ede5d8; --blue:#4777a5;
  --amber:#b98747; --red:#b84e50;
  --shadow:0 14px 36px rgba(26,50,66,.055);
}
.sidebar{background:linear-gradient(162deg,#193b5a 0%,#16344f 100%);color:#f9f5eb}
.brand-logo{background:#e9d7b9;color:#244e70;box-shadow:0 6px 24px rgba(8,24,43,.12)}
.brand small,.sidebar-label{color:#b0c1cf}
.nav-link{color:#b9c9d5}
.nav-link:hover,.nav-link.active{background:#2e5372;color:#fff8ee}
.nav-link.active{box-shadow:inset 3px 0 #e4c398}
.nav-counter{background:#40617d;color:#f8eddc}
.privacy-mini{background:#244660;border-color:#395870}
.privacy-mini svg{color:#e8d0a9}
.privacy-mini span{color:#b6c7d2}
.app-version{color:#a6b8c7}
.topbar{background:#fffdfa;border-bottom-color:#e8e0d4}
.topbar-badge{background:#eee7dc;color:#536a80}
.local-dot{background:#5a829d}
.eyebrow{color:#47799f}
.page-heading h1 span{color:#396f9b}
.page-heading p,.simple-heading p{color:#7e8e99}
.page-heading-decoration{background:linear-gradient(135deg,#f3e6d2,#e8f0f5);color:#4d7697}
.metric,.ticket-list,.ticket-editor,.empty-state,.card-panel{background:#fffdfa;border-color:#e8dfd4}
.metric-icon.teal{color:#3b719b;background:#e8eff4}
.metric-icon.amber{color:#a77c48;background:#f6eadd}
.metric-icon.blue{color:#4c76a2;background:#e6edf3}
.dropzone{border-color:#d3b996;background:linear-gradient(114deg,#f4eadb 0%,#fcf6ed 57%,#edf2f5 100%);box-shadow:inset 0 1px rgba(255,255,255,.5)}
.dropzone.dragover,.dropzone:focus-visible{border-color:#4b80a9;box-shadow:0 0 0 4px rgba(69,116,159,.13)}
.drop-ornament{border-color:rgba(57,96,130,.10)}
.upload-symbol{background:#fffdfa;color:#386d98;box-shadow:0 12px 40px rgba(56,82,103,.08)}
.upload-kicker{color:#42749c}
.upload-content p,.upload-content small{color:#738591}
.button.primary{background:#356d9c;box-shadow:0 7px 15px rgba(42,94,141,.15)}
.button.primary:hover{background:#285b84}
.button.secondary{background:#fffdfa;border-color:#e0d1ba;color:#244c6c}
.button.secondary:hover,.button.outline:hover{border-color:#afc7d6;background:#f4f8fb}
.button.dark{background:#1b405e}
.button.dark:hover{background:#315d7f}
.button.outline{background:#fffdfa;border-color:#d6d9d9;color:#2d5575}
.count-pill{background:#eae3d9;color:#627789}
.ticket-item{background:#fffdfa;border-bottom-color:#efe8dc}
.ticket-item:hover{background:#faf4eb}
.ticket-item.active{background:#edf3f6;box-shadow:inset 3px 0 #4678a3}
.ticket-thumb{background:#faf5ea;border-color:#e7ded1}
.status-pill.ready{color:#33677d;background:#e7f2ed}
.status-pill.processing{color:#436c94;background:#e7eff8}
.empty-graphic{color:#7799b3;background:#eee9e1}
.empty-demo{color:#316c9e}
.icon-button{background:#f7f1e8;border-color:#ebe2d7;color:#5f798d}
.icon-button:hover{background:#e7eef3}
.preview-wrap{height:405px;background:linear-gradient(145deg,#e8e1d7,#f5f1eb);padding:14px;display:block}
.preview-label{z-index:2;background:#fffdf8;color:#4a6680;border-color:#e5d9c9}
.preview-enlarge{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:relative;border:0;background:transparent;border-radius:11px;padding:16px;cursor:zoom-in}
.preview-enlarge img{display:block;position:static;top:auto;left:auto;transform:none;height:auto;width:auto;max-width:100%;max-height:100%;object-fit:contain;background:#fff;box-shadow:0 12px 34px rgba(33,51,67,.14)}
.preview-enlarge-caption{position:absolute;right:11px;bottom:11px;z-index:2;display:inline-flex;align-items:center;gap:6px;background:#193b5a;color:#fffdf7;border-radius:9px;padding:9px 12px;font-size:11px;font-weight:800;box-shadow:0 4px 16px rgba(10,32,52,.22)}
.preview-enlarge-caption svg{width:16px;height:16px}
.preview-enlarge:hover .preview-enlarge-caption,.preview-enlarge:focus-visible .preview-enlarge-caption{background:#356f9d}
.preview-enlarge:focus-visible{outline:3px solid #578bb1;outline-offset:-3px}
.preview-progress{z-index:4;bottom:12px;pointer-events:none}
.pulse{background:#e2bd8c}
.field input,.field select,.field textarea{border-color:#e0ddd6;background:#fffefa}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#4b7fa6;box-shadow:0 0 0 3px rgba(62,114,157,.12)}
.category-detection.good{background:#e9f0ed;color:#35687b}
.category-detection.caution{background:#f8efdf;color:#946c3b}
.filename-preview{background:#f5efe5;border-color:#e8dece}
.filename-preview strong{color:#254b6b}
.file-pattern{background:#f5eee4;color:#254760}
.file-pattern span{color:#3a75a1}
.rule-row svg{color:#3c7ea4}
.category-token{background:#eee7dc;color:#46677c}
.example-card{background:#f7f1e8;border-color:#e7d6c1}
.example-card span{color:#987b55}
.toast{background:#173b59}

/* Visionneuse grand format avec zoom et déplacement sur mobile / ordinateur */
body.viewer-open{overflow:hidden}
.image-viewer{position:fixed;inset:0;z-index:200;background:#142d44;display:flex;flex-direction:column;color:#fcf8f0}
.image-viewer-header{padding:13px 22px;min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#193b59;border-bottom:1px solid #416079}
.image-viewer-title{display:flex;align-items:center;gap:13px;min-width:0}
.image-viewer-title>svg{width:23px;height:23px;color:#efd8b6}
.image-viewer-title div{min-width:0}
.image-viewer-title strong{display:block;font-size:15px;font-weight:800}
.image-viewer-title span{display:block;margin-top:4px;font-size:11px;color:#bdd0df;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:min(54vw,520px)}
.viewer-close{border:1px solid #5c7690;border-radius:9px;padding:10px 13px;background:#254a69;color:#fffdfa;display:flex;gap:8px;align-items:center;font-size:12px;font-weight:800}
.viewer-close svg{width:16px;height:16px}
.viewer-close:hover{background:#3a6283}
.image-viewer-stage{flex:1;min-height:0;overflow:auto;background:#eae3d9;overscroll-behavior:contain;scrollbar-color:#9b9589 #eae3d9}
.image-viewer-canvas{display:flex;align-items:center;justify-content:center;min-width:100%;min-height:100%;box-sizing:border-box}
.image-viewer-canvas img{display:block;flex:none;background:#fff;box-shadow:0 16px 48px rgba(22,39,55,.25);max-width:none;max-height:none;user-select:none;-webkit-user-drag:none}
.image-viewer-toolbar{background:#193b59;min-height:76px;padding:14px 20px;display:flex;justify-content:center;align-items:center;gap:12px;border-top:1px solid #45637a}
.image-viewer-toolbar button{min-height:41px;border:1px solid #688198;background:#284f6e;color:#f9f8f2;border-radius:9px;font-size:22px;font-weight:700;min-width:46px}
.image-viewer-toolbar button:disabled{opacity:.4}
.image-viewer-toolbar button:hover:not(:disabled){background:#3a6789}
.image-viewer-toolbar .viewer-fit{font-size:12px;padding:0 14px}
#viewerZoomLevel{min-width:61px;text-align:center;font-weight:800;font-size:12px;color:#f4e9d7}
.viewer-help{font-size:11px;color:#b4cbdc;margin-left:16px}
@media(max-width:1040px){.editor-grid{grid-template-columns:minmax(260px,.7fr) minmax(335px,1.3fr)}}
@media(max-width:760px){
  .nav-link.active{box-shadow:inset 0 -3px #e4c398}
  .editor-grid{grid-template-columns:1fr}
  .preview-wrap{height:370px}
  .image-viewer-header{padding:10px 14px;min-height:62px}
  .image-viewer-toolbar{gap:8px;padding:9px 12px;min-height:66px}
  .viewer-help{display:none}
  .image-viewer-toolbar button{min-width:42px}
  .image-viewer-toolbar .viewer-fit{padding:0 10px}
}
@media(max-width:400px){.preview-wrap{height:335px}.preview-enlarge-caption{font-size:10px;padding:8px 10px}}

/* V1.3 — gestion des rubriques personnalisées */
.add-category-form{margin-top:22px;border-top:1px solid #e9dece;padding-top:20px;display:flex;flex-direction:column;gap:9px}
.add-category-form h3{font:800 13px 'Manrope',system-ui,sans-serif;margin:0 0 4px;color:#193b5a}
.add-category-form label{font-size:11px;font-weight:750;color:#48667e}
.add-category-form input{width:100%;padding:12px;border:1px solid #d8cfc2;border-radius:9px;background:#fffdfa;color:#193b5a;font-size:12px}
.add-category-form input:focus{outline:2px solid #87a8be;outline-offset:1px}
.add-category-form p{margin:0 0 5px}
.add-category-form .button{align-self:flex-start}
.custom-category-token{display:inline-flex;align-items:center;gap:8px;background:#e5edf2}
.custom-category-token button{width:19px;height:19px;display:inline-grid;place-items:center;padding:0;border:none;border-radius:50%;background:#cbdce6;color:#244c6b;font-size:14px;cursor:pointer}
.custom-category-token button:hover{background:#b9cedb}

/* Fenêtre de confirmation d'archivage après export : CBPRO v1.4 */
body.archive-dialog-open{overflow:hidden}
.archive-dialog{position:fixed;inset:0;z-index:260;background:rgba(18,40,60,.65);padding:22px;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(3px)}
.archive-panel{width:min(100%,510px);max-height:calc(100dvh - 44px);overflow-y:auto;background:#fbf7ef;border-radius:22px;box-shadow:0 24px 90px rgba(10,29,45,.32);padding:30px;border:1px solid #e6d8c2}
.archive-symbol{background:#e6efe8;border-radius:14px;width:48px;height:48px;display:grid;place-items:center;color:#256e62;margin-bottom:16px}
.archive-symbol svg{width:26px;height:26px}
.archive-overline{font-size:10px;letter-spacing:1.3px;font-weight:850;color:#3a6686;margin:0 0 7px}
.archive-panel h2{font-size:22px;color:#173b5e;line-height:1.25;margin:0 0 12px;font-weight:850}
.archive-panel p{font-size:13px;color:#516477;line-height:1.7;margin:0 0 18px}
.archive-note{display:flex;align-items:flex-start;gap:11px;padding:15px;background:#f3e7d4;border:1px solid #ead6b9;border-radius:12px;color:#5f543f;font-size:12px;line-height:1.6}
.archive-note svg{height:19px;width:19px;flex-shrink:0;color:#976b2d;margin-top:2px}
.archive-actions{display:flex;flex-direction:column;gap:9px;margin-top:22px}
.archive-actions .button{min-height:46px;white-space:normal}
.archive-actions .button.primary{background:#193b5a;color:#fff}
.archive-actions .button.primary:hover{background:#2e5677}
.archive-actions .button.outline{border:1px solid #d7c6ac;background:#fffdf9;color:#28445b}
@media(max-width:520px){.archive-panel{padding:23px;border-radius:18px}.archive-panel h2{font-size:20px}.archive-dialog{padding:12px}}

/* V1.5 : sauvegarde automatique et gestion de toutes les rubriques */
.storage-status{display:inline-flex;align-items:center;margin:7px 0 18px;padding:9px 13px;border-radius:9px;background:#e7eee7;border:1px solid #bfd6c5;color:#285d4f;font-size:12px;font-weight:750}
.storage-status[data-kind='saving']{background:#ecf2f5;border-color:#d0dfea;color:#3a5972}
.storage-status[data-kind='error']{background:#fff0e4;border-color:#e9b6a5;color:#a53f2c}
.hidden-categories{margin:12px 0}
.hidden-categories-title{font-size:11px;font-weight:750;color:#596c79;margin:0 0 8px}
.restore-category{margin:0 6px 6px 0;padding:7px 10px;background:#f6f0e7;border:1px solid #e2d2ba;border-radius:9px;color:#365a72;font-weight:750;font-size:11px;cursor:pointer}
.restore-category:hover{background:#e9ddcc}
