.content{display:block;padding:28px}.workspace{width:100%;max-width:1600px;margin:auto}.intro,.panel-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:20px}h1{font-size:1.65rem;color:#183654}h2{font-size:1.02rem}p{color:#64748b;line-height:1.6;margin-top:6px}button,select,input{font:inherit}button{cursor:pointer;border:1px solid #ccd8e4;border-radius:8px;background:#fff;padding:9px 13px;color:#213e5c}button:hover{background:#edf4fa}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #38bdf8;outline-offset:2px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:20px 0 28px}.category{border:1px solid #dbe4ee;border-top:4px solid var(--accent);border-radius:14px;padding:20px;background:white;box-shadow:0 4px 16px #18365408;display:flex;flex-direction:column}.c0{--accent:#2865a1}.c1{--accent:#16786f}.c2{--accent:#476faa}.c3{--accent:#aa7427}.c4{--accent:#637c45}.card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.category-icon{background:#f0f5fa;color:var(--accent);border-radius:10px;padding:10px;font-size:22px;min-width:48px;text-align:center}.count{font-size:2rem;color:#193854}.category h2{min-height:42px;line-height:1.4}.category p{font-size:.8rem}.card-buttons{display:flex;gap:8px;margin-top:18px;flex-wrap:wrap}.card-buttons button{font-size:.8rem}.panel{background:#fff;border:1px solid #dbe4ee;border-radius:14px;padding:22px}.panel-head strong{white-space:nowrap;font-size:.9rem}.filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:14px}label{display:flex;flex-direction:column;gap:7px;font-size:.82rem;color:#475569}input[type=search],select{padding:11px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;width:100%;min-width:0;color:#183654}input[type=checkbox]{width:18px;height:18px;accent-color:#205988}.actions{display:flex;align-items:center;gap:14px;background:#f3f7fb;padding:14px;border-radius:10px;margin:18px 0;flex-wrap:wrap}.actions strong{font-size:.85rem}.target-label{margin-left:auto;min-width:240px}.primary{background:#1e527f;color:#fff;border-color:#1e527f}.primary:hover{background:#163e61}.table-wrap{overflow:auto;max-height:560px}table{width:100%;border-collapse:collapse;text-align:left;font-size:.86rem}th{background:#f2f6fa;position:sticky;top:0;z-index:1;color:#39516a}td,th{padding:13px 10px;border-bottom:1px solid #e7edf3}th button{border:0;background:none;padding:0;font-weight:600}tbody tr:hover{background:#f8fbfe}.badge{display:inline-block;background:#edf3f9;color:#31506e;border-radius:5px;padding:4px 6px;font-size:.72rem;margin:2px}.muted{color:#8291a3}#status{min-height:24px;font-size:.86rem}.error{color:#a32626!important;background:#fff0f0;padding:12px;border-radius:8px}dialog{margin:auto;border:1px solid #d3dfeb;border-radius:14px;padding:26px;width:min(850px,94vw);max-height:85vh;overflow:auto}dialog::backdrop{background:#10243b88}.detail-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 0;border-bottom:1px solid #e2e8f0}.detail-row span{display:block;margin-top:4px;color:#64748b}.empty{padding:30px 0}@media(max-width:760px){.content{padding:16px}.filters{grid-template-columns:1fr}.intro,.panel-head{align-items:flex-start;flex-wrap:wrap}.target-label{margin-left:0;width:100%}.panel{padding:16px}.cards{grid-template-columns:1fr 1fr}.category{padding:14px}}@media(max-width:480px){.cards{grid-template-columns:1fr}}

.page-tools{display:flex;gap:10px;flex-wrap:wrap}#statistics{color:#1e527f;border-color:#9cb6ce;font-weight:600}#stats-modal{width:min(850px,94vw)}#stats-title{font-size:1.25rem;color:#183654}.stats-layout{display:grid;grid-template-columns:260px 1fr;align-items:center;gap:32px;margin:30px 0}.stats-ring{width:250px;height:250px;border-radius:50%;display:grid;place-items:center;margin:auto}.stats-center{width:170px;height:170px;border-radius:50%;background:white;display:flex;align-items:center;justify-content:center;flex-direction:column}.stats-center strong{font-size:2.3rem;color:#183654}.stats-center span{font-size:.85rem;color:#64748b;margin-top:4px}.stats-line{display:grid;grid-template-columns:12px 1fr 38px 65px;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid #e8eef4;font-size:.86rem}.stats-dot{width:10px;height:10px;border-radius:50%}.stats-line strong,.stats-percent{text-align:right;font-variant-numeric:tabular-nums}.stats-percent{color:#64748b}.stats-summary{padding:14px;background:#f2f6fa;border-radius:9px;font-size:.88rem;color:#26435e;line-height:1.6}.stats-note{font-size:.8rem;margin-top:14px}@media(max-width:650px){.stats-layout{grid-template-columns:1fr;gap:20px}.stats-ring{width:220px;height:220px}.stats-center{width:150px;height:150px}.stats-line{grid-template-columns:10px 1fr 30px 57px;gap:7px;font-size:.8rem}}

.inline-details{margin:0 0 24px;border-top:3px solid #2865a1}.inline-details[hidden]{display:none!important}.category{cursor:pointer}.category.selected-category{outline:2px solid var(--accent);outline-offset:2px}.inline-details .panel-head{margin-bottom:8px}.inline-details .detail-row:last-child{border-bottom:0}

#stats-modal{width:min(960px,96vw)}.stats-layout{grid-template-columns:minmax(240px,340px) 1fr;gap:24px}.stats-ring{width:100%;height:auto;border-radius:0;display:block}.pie-svg{width:100%;height:auto;display:block;overflow:visible}.pie-slice{cursor:pointer;transition:transform .28s ease;outline:none}.pie-slice:focus-visible>path:nth-of-type(3){stroke:#10243b;stroke-width:3}.stats-legend-button{width:100%;text-align:left;border:0;border-bottom:1px solid #e8eef4;border-radius:7px;background:white;color:#334155}.stats-legend-button.is-selected{background:#edf4fb;box-shadow:inset 3px 0 #2865a1}.stats-legend-button:disabled{opacity:1;color:#7c8898;cursor:default}.stats-line{grid-template-columns:12px 1fr 46px 65px}@media(max-width:650px){.stats-layout{grid-template-columns:1fr}.stats-ring{max-width:300px}.stats-line{grid-template-columns:10px 1fr 38px 57px}}@media(prefers-reduced-motion:reduce){.pie-slice{transition:none}}

#stats-modal{width:min(1100px,96vw)}.stats-layout{grid-template-columns:minmax(300px,470px) 1fr}.sphere-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.sphere-tools span{font-size:.8rem;color:#64748b;margin-left:8px}#sphere-canvas{width:100%;height:auto;display:block;touch-action:none;cursor:grab}#sphere-canvas:active{cursor:grabbing}.stats-ring{max-width:470px}.stats-layout{margin:14px 0 20px}@media(max-width:700px){.stats-layout{grid-template-columns:1fr}.stats-ring{max-width:360px}}

.sphere-column{min-width:0}.sphere-labels{display:grid;gap:8px;margin:0 8px 12px}.sphere-part-label{display:grid;grid-template-columns:10px 1fr auto;align-items:center;gap:10px;border:1px solid #e1e7ef;border-left:4px solid var(--slice-color);border-radius:10px;padding:10px 12px;background:#fff;box-shadow:0 4px 14px #1836540d;font-size:.82rem;line-height:1.4;animation:partLabelAppear .38s ease-out both}.part-label-dot{width:9px;height:9px;border-radius:50%;background:var(--slice-color)}.sphere-part-label strong{color:var(--slice-color);font-size:1.05rem;white-space:nowrap;font-variant-numeric:tabular-nums}@keyframes partLabelAppear{from{opacity:0;transform:translateY(-12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.sphere-part-label{animation:none}}

#stats-modal{width:min(1200px,97vw)}.stats-layout{display:block}.sphere-column,.stats-ring{max-width:none;width:100%}.fixed-sphere{width:100%;height:auto;display:block}.fixed-slice{cursor:pointer;outline:none;transition:transform .6s ease}.fixed-slice:focus-visible>path:first-of-type{stroke:#111827;stroke-width:4}.sphere-callout{pointer-events:none;transform-box:fill-box;transform-origin:center;animation:calloutAppear 2s cubic-bezier(.2,.78,.25,1) both}.color-category{display:flex;align-items:center;gap:9px;min-width:0}.color-category input[type=color]{width:34px;height:34px;padding:3px;border:1px solid #ccd8e4;border-radius:8px;background:#fff;cursor:pointer;flex-shrink:0}.color-category .stats-line{grid-template-columns:1fr 45px 65px;min-width:0;gap:10px}.color-category .stats-line span:first-child{overflow-wrap:anywhere}#stats-legend{display:grid;grid-template-columns:1fr 1fr;gap:4px 25px;border-top:1px solid #e5ecf3;padding-top:10px}@keyframes calloutAppear{from{opacity:0;transform:translateX(var(--callout-shift,0)) scale(.985)}to{opacity:1;transform:translateX(0) scale(1)}}@media(max-width:650px){#stats-legend{grid-template-columns:1fr}#stats-modal{padding:14px}.sphere-column{overflow:auto}.fixed-sphere{min-width:680px}.sphere-tools span{margin-left:0;width:100%}}@media(prefers-reduced-motion:reduce){.sphere-callout{animation:none}}


/* ===== Ajustements capture & impression ===== */
.page-tools{justify-content:flex-end;align-items:center}.main-list-tools,.detail-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.inline-details .panel-head{align-items:flex-start}.inline-details .panel-head p{margin-top:6px;max-width:700px}.inline-details .detail-row:last-child{border-bottom:0}.detail-row strong{font-size:.95rem}.detail-row span{font-size:.86rem}.main-list-tools strong{font-size:.9rem}#print-filtered,#print-detail{color:#1e527f;border-color:#9cb6ce;font-weight:600}#stats-modal{width:min(1380px,98vw);max-width:98vw;max-height:calc(100vh - 24px);min-height:min(860px,calc(100vh - 36px));overflow:hidden;padding:20px 24px 18px}.sphere-tools{margin-bottom:10px}.sphere-column{display:flex;align-items:center;justify-content:center}.stats-layout{margin:10px 0 16px}.fixed-sphere{width:100%;max-height:560px}.stats-summary{margin-top:2px}.stats-note{margin-top:10px}#stats-legend{gap:6px 25px}@media(max-width:1280px){#stats-modal{min-height:auto;overflow:auto}}@media(max-width:760px){.page-tools,.detail-tools,.main-list-tools{width:100%}.detail-tools button,.page-tools button{flex:1 1 auto}}

@media print{body{background:#fff!important}.sidebar,.main-header,.intro,.actions,.filters,.page-tools,.detail-tools button,.card-buttons button,#statistics,#reload,#clear,#add,#close-details,#close-stats,.sphere-tools{display:none!important}.content,.workspace,.panel{padding:0!important;margin:0!important;box-shadow:none!important;border:none!important;background:#fff!important}.panel-head{margin-bottom:10px!important}table{font-size:11px}th,td{padding:8px 6px}}

.stats-head-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}#stats-screenshot{color:#1e527f;border-color:#9cb6ce;font-weight:600}.capture-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:99999;background:#14324d;color:#fff;padding:10px 16px;border-radius:9px;box-shadow:0 10px 30px #0f172a33;font-size:.86rem;opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease}.capture-toast.show{opacity:1;transform:translateX(-50%) translateY(-4px)}
/* Lisibilité de la légende et des choix de couleurs */
#stats-legend{column-gap:30px;row-gap:12px;padding-top:16px}
.color-category{gap:16px}
.color-category input[type=color]{width:38px;height:38px;flex-basis:38px}
.color-category .stats-line{padding:13px 12px;border:1px solid #dfe8f1;border-radius:8px;gap:12px}
.stats-note{line-height:1.55}
@media(max-width:650px){#stats-legend{row-gap:10px}.color-category{gap:12px}}
/* Apparition progressive des parts et de leurs étiquettes */
.fixed-slice{animation:piePartAppear 2s cubic-bezier(.2,.78,.25,1) both}
@keyframes piePartAppear{from{opacity:0;filter:brightness(1.45)}to{opacity:1;filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.fixed-slice{animation:none}.sphere-callout{animation:none}}
