
:root{
  --ink:#142637;--muted:#697786;--line:#dce4ea;--soft:#f4f7f9;--panel:#fff;
  --navy:#122537;--navy2:#1b3449;--orange:#f07b23;--orange2:#ff9a3c;
  --cyan:#1aa8cf;--red:#dc3b4d;--green:#2a9d68;--shadow:0 10px 30px rgba(23,44,63,.10);
  font-family:"Segoe UI",Inter,Arial,sans-serif;color:var(--ink);background:#eef2f5;
}
*{box-sizing:border-box} html,body{margin:0;min-height:100%;background:#eef2f5} body{font-size:14px}
button,input,select{font:inherit} button{cursor:pointer} button:disabled{cursor:not-allowed;opacity:.55}
[hidden],.hidden{display:none!important}
.topbar{height:70px;display:flex;align-items:center;gap:24px;padding:0 20px;background:linear-gradient(100deg,var(--navy),var(--navy2));color:#fff;box-shadow:0 3px 14px rgba(0,0,0,.18);position:sticky;top:0;z-index:1000}
.brand{display:flex;align-items:center;gap:12px;min-width:250px}.brand-logo{width:42px;height:42px;object-fit:contain}.product-name{font-size:18px;letter-spacing:.08em}.brand-subtitle{font-size:11px;color:#bdcad4;margin-top:2px}
.main-nav{display:flex;align-self:stretch;gap:4px;flex:1}.nav-item{position:relative;border:0;background:transparent;color:#bfcbd5;padding:8px 18px;min-width:128px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;border-bottom:3px solid transparent}.nav-item strong{font-size:14px}.nav-item small{font-size:10px;text-transform:uppercase;letter-spacing:.09em;opacity:.68;margin-top:2px}.nav-item.active{color:#fff;border-bottom-color:var(--orange2);background:rgba(255,255,255,.05)}.nav-item:disabled{opacity:.42}
.top-actions{display:flex;align-items:center;gap:8px}.prototype-badge{font-size:10px;padding:5px 8px;border:1px solid rgba(255,255,255,.22);border-radius:999px;color:#dce6ed}
.button{border:1px solid transparent;border-radius:8px;padding:9px 13px;font-weight:600;transition:.15s ease;display:inline-flex;align-items:center;justify-content:center;gap:7px}.button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 5px 14px rgba(18,37,55,.12)}
.button.primary{background:linear-gradient(135deg,var(--orange),var(--orange2));color:#fff}.button.secondary{background:#e9f5f9;color:#126c88;border-color:#b8dfe9}.button.subtle{background:#fff;color:#425365;border-color:#d8e1e7}.button.ghost{background:rgba(255,255,255,.06);color:#fff;border-color:rgba(255,255,255,.18)}.button.danger{background:#be3044;color:#fff}.button.danger-soft{background:#fff0f2;color:#b72d40;border-color:#f1c3ca}.button.full{width:100%}.file-button{position:relative}.file-button input{position:absolute;inset:0;opacity:0;cursor:pointer}
.workspace{display:grid;grid-template-columns:330px minmax(0,1fr);min-height:calc(100vh - 70px)}
.sidebar{background:#f8fafb;border-right:1px solid var(--line);min-width:0;overflow:auto;max-height:calc(100vh - 70px);position:sticky;top:70px}.project-heading{padding:18px 18px 12px;background:#fff;border-bottom:1px solid var(--line)}.eyebrow,.workflow-context span,.active-layout-building span,.calepinage-context-heading span,.parapet-heading span,.module-edit-heading span,.module-row-move-heading span,.future-tool-card span,.building-results-heading span{font-size:10px;font-weight:700;letter-spacing:.11em;color:#8795a2}.project-name{width:100%;border:0;padding:5px 0;font-size:20px;font-weight:700;color:var(--ink);background:transparent;outline:none}.project-address-summary{font-size:12px;color:var(--muted);display:flex;gap:7px}.pin{color:var(--orange)}.autosave-state{margin-top:8px;font-size:11px;color:#82919e;display:flex;align-items:center;gap:6px}.autosave-state span{width:7px;height:7px;border-radius:50%;background:var(--green)}
.workflow-context{margin:10px 12px;background:linear-gradient(135deg,#172f44,#244b65);color:#fff;border-radius:10px;padding:12px 13px;display:grid;gap:3px}.workflow-context span{color:#9fc0d2}.workflow-context strong{font-size:14px}.workflow-context small{color:#c5d5df;line-height:1.3}
.sidebar-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:8px 10px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:4}.sidebar-tab{border:0;background:transparent;border-radius:8px;padding:8px 3px;color:#687887;display:flex;flex-direction:column;align-items:center;gap:3px}.sidebar-tab:hover{background:#f1f5f7}.sidebar-tab.active{background:#fff3e8;color:#c95d11}.tab-icon{font-size:18px;line-height:1}.tab-text{font-size:10px;font-weight:700}
.sidebar-panel{padding:0 12px 14px}.step-title{width:100%;border:0;background:transparent;text-align:left;padding:16px 4px 8px;display:flex;gap:9px;align-items:center}.step-number{display:none}.step-title strong{display:block;font-size:17px}.step-title small{display:block;color:var(--muted);font-weight:400;margin-top:2px}.step-content{display:grid;gap:11px}
label{display:grid;gap:5px;font-size:12px;font-weight:600;color:#405263}label small,.zone-note,.module-edit-note{font-weight:400;color:#7b8996;line-height:1.4}
input,select{width:100%;border:1px solid #cfd9e0;background:#fff;border-radius:7px;padding:9px 10px;color:var(--ink);outline:none}input:focus,select:focus{border-color:#46a9c6;box-shadow:0 0 0 3px rgba(70,169,198,.12)}input:disabled,select:disabled{background:#eef2f4;color:#89949c}
.unit-input{display:flex;align-items:center;border:1px solid #cfd9e0;background:#fff;border-radius:7px;overflow:hidden}.unit-input:focus-within{border-color:#46a9c6;box-shadow:0 0 0 3px rgba(70,169,198,.12)}.unit-input input{border:0;border-radius:0;box-shadow:none!important}.unit-input span{padding:0 9px;color:#6f7f8d;font-size:11px;white-space:nowrap}.input-grid{display:grid;gap:9px}.input-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.input-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.project-address-field{background:#fff;border:1px solid var(--line);border-radius:10px;padding:11px}.project-address-field-title{font-size:12px}.project-address-control{display:flex;align-items:center;gap:7px}.project-address-icon{color:var(--orange)}
.building-manager,.selection-card,.parapet-section,.module-edit-section,.layout-lock-section,.calepinage-context,.result-assumptions,.future-tool-card,.active-layout-building{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;box-shadow:0 2px 8px rgba(22,44,63,.03)}
.building-manager-heading,.selection-card-heading,.parapet-heading,.module-edit-heading,.layout-lock-heading,.module-row-move-heading,.calepinage-context-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.building-list,.obstacle-list,.parapet-list{display:grid;gap:6px}.building-list-empty,.obstacle-list-empty,.parapet-list-empty,.building-results-empty{padding:12px;text-align:center;color:#8a98a4;background:#f6f8fa;border-radius:7px;font-size:12px}
.building-color-legend,.solar-legend{display:flex;gap:10px;flex-wrap:wrap;font-size:10px;color:#71808c;margin-top:8px}.legend-swatch{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:4px}.active-building{background:#ff7c29}.project-building{background:#15a6cd}.candidate-building{background:#a8b2ba}
.geometry-action-grid,.parapet-action-grid,.obstacle-editor-actions,.module-selection-grid{display:grid;gap:8px}.geometry-action-grid,.parapet-action-grid,.module-selection-grid.two,.obstacle-editor-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.module-selection-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.selected-building-properties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.footprint-actions-secondary{display:grid;grid-template-columns:1fr 1.1fr 1.2fr;gap:7px}
.section-divider{margin-top:6px;padding-top:14px;border-top:1px solid var(--line);font-size:12px;font-weight:800;color:#394d5f;text-transform:uppercase;letter-spacing:.08em}
.calepinage-context{background:linear-gradient(135deg,#f8fbfc,#eef5f8)}.calepinage-type-switch{display:grid;grid-template-columns:1fr 1fr;gap:7px}.calepinage-type-switch button{border:1px solid #d4dfe6;border-radius:8px;background:#fff;padding:10px;color:#647585;font-weight:700}.calepinage-type-switch button.active{border-color:#ee9a5b;background:#fff5ec;color:#bf5b16}.calepinage-type-switch button span{font-size:18px;margin-right:4px}.calepinage-type-switch button small{display:block;font-size:9px;font-weight:500}
.active-layout-building{display:grid;gap:3px;border-left:4px solid var(--cyan)}.module-reference-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:9px}.segmented{display:grid;grid-template-columns:1fr 1fr;border:1px solid #d2dce3;border-radius:8px;padding:3px;background:#edf2f5}.segment{border:0;border-radius:6px;padding:8px;background:transparent;color:#647585}.segment.active{background:#fff;color:#c65c13;box-shadow:0 2px 6px rgba(20,38,55,.08)}
.switch-line{grid-template-columns:1fr auto auto;align-items:center;padding:10px;border:1px solid var(--line);border-radius:9px;background:#fff}.switch-line input{width:auto}.switch{width:38px;height:21px;border-radius:999px;background:#c6d0d7;position:relative}.switch:before{content:"";position:absolute;width:15px;height:15px;border-radius:50%;background:#fff;top:3px;left:3px;transition:.2s}.switch-line input:checked+.switch{background:var(--orange)}.switch-line input:checked+.switch:before{left:20px}.switch-line input{position:absolute;opacity:0}
.layout-lock-status,.module-selection-status,.module-axis-reference,.zone-status,.site-status,.candidate-status{background:#f5f8fa;border-radius:7px;padding:9px;color:#637381;font-size:12px}.layout-lock-status strong,.module-selection-status strong{display:block;color:#34495b}.layout-lock-status span,.module-selection-status span{display:block;margin-top:3px}
.module-edit-help,.zone-help{font-size:12px;color:#657582;line-height:1.45}.module-selection-count,.parapet-count{background:#f5eee7;color:#b85813;border-radius:999px;padding:3px 8px;font-weight:800}.module-row-move{padding-top:10px;border-top:1px solid var(--line)}.module-row-move-pad{width:145px;margin:8px auto;display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.module-row-move-pad button{padding:8px}.row-reset{background:#f7eee6!important;color:#b75d1d!important}
.future-tool-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;background:#f7f9fa;border-style:dashed}.future-tool-icon{width:36px;height:36px;border-radius:9px;display:grid;place-items:center;background:#e8eef2;color:#5d7180;font-size:20px}.future-tool-card strong,.future-tool-card small{display:block}.future-tool-card small{color:#768591;margin-top:2px}.future-badge{background:#e9eef2;border-radius:999px;padding:4px 8px;color:#687987!important;white-space:nowrap}
.obstacle-editor{background:#fff7ef;border:1px solid #f1cfb1;border-radius:10px;padding:11px}.obstacle-editor-heading{display:flex;justify-content:space-between}.obstacle-editor-close,.obstacle-remove-button{border:0;background:transparent;font-size:20px;color:#8795a0}.zone-parameters{display:grid;gap:9px}
.sidebar-actions{padding:12px;display:grid;gap:8px;border-top:1px solid var(--line);background:#fff;position:sticky;bottom:0}
.design-area{padding:16px;min-width:0}.viewport-card{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);overflow:hidden}.viewport-toolbar{height:54px;display:flex;justify-content:space-between;align-items:center;padding:0 14px;border-bottom:1px solid var(--line)}.view-title strong,.view-title span{display:block}.view-title span{font-size:11px;color:#7b8994;margin-top:2px}.toolbar-right,.view-switch,.tool-group{display:flex;align-items:center;gap:5px}.view-switch{background:#eef3f5;border-radius:8px;padding:3px}.view-switch-button,.icon-button{border:0;border-radius:6px;background:transparent;padding:8px 10px;color:#536575;font-weight:700}.view-switch-button.active,.icon-button.active{background:#fff;color:#c85d12;box-shadow:0 2px 6px rgba(20,38,55,.08)}
.canvas-wrap{position:relative;height:58vh;min-height:480px;background:#fff}.site-map,.three-d-layer,#sceneCanvas{position:absolute;inset:0;width:100%;height:100%}.map-onboarding{position:absolute;left:16px;top:16px;z-index:500;background:rgba(18,37,55,.90);color:#fff;padding:10px 12px;border-radius:8px;display:grid;gap:3px;font-size:11px}.map-actions{position:absolute;left:16px;bottom:16px;z-index:500;display:flex;gap:7px}.map-action{border:1px solid #cbd8df;background:#fff;border-radius:7px;padding:8px 11px;font-weight:700}.map-action.primary{background:var(--orange);color:#fff;border-color:var(--orange)}.scene-chip{position:absolute;padding:5px 8px;background:rgba(18,37,55,.82);color:#fff;border-radius:6px;font-size:10px}.north-chip{top:14px;left:14px}.demo-chip{top:14px;right:14px}.scene-help{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);background:rgba(18,37,55,.82);color:#fff;padding:7px 10px;border-radius:6px;font-size:10px;white-space:nowrap}.sun-panel{position:absolute;right:14px;bottom:14px;width:220px;background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:10px;padding:10px;box-shadow:var(--shadow)}.sun-title{font-weight:800;margin-bottom:6px}.sun-panel label{grid-template-columns:58px 1fr 38px;align-items:center}.sun-panel input{padding:0}.legend-shadow,.legend-safety{display:inline-block;width:10px;height:10px;margin-right:4px}.legend-shadow{background:#53606a}.legend-safety{background:#ff8c38}
.results-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-top:12px}.metric{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;min-width:0}.metric-label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#81909c}.metric strong{display:block;font-size:20px;margin-top:5px}.metric small{color:#7b8994}.primary-metric{border-top:3px solid var(--orange)}.status-metric{display:flex;align-items:center;gap:9px}.status-dot{width:10px;height:10px;border-radius:50%;background:var(--green)}
.building-results{margin-top:12px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:var(--shadow)}.building-results-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:12px}.building-results-heading h2{margin:3px 0 0;font-size:18px}.building-results-heading small{color:#81909b}.building-results-list{display:grid;gap:10px;margin-top:12px}.result-assumptions{margin-top:12px}.result-assumptions summary{cursor:pointer;font-weight:800;color:#405365}.result-assumptions p{font-size:12px;color:#758490}.result-assumptions .input-grid{max-width:520px;margin-top:10px}
.building-result-card{border:1px solid var(--line);border-radius:9px;padding:12px}.building-result-card.active{border-color:#f0a064;box-shadow:0 0 0 3px rgba(240,160,100,.12)}.building-result-card header,.building-result-meta,.building-result-kpis{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.layout-state{font-size:10px;padding:4px 7px;border-radius:999px;background:#eef3f5}.layout-state.locked{background:#fff0e6;color:#bf5a13}
.report-sheet{display:none}.toast{position:fixed;left:50%;bottom:20px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#172d40;color:#fff;padding:10px 14px;border-radius:8px;z-index:3000;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1180px){.workspace{grid-template-columns:310px 1fr}.results-strip{grid-template-columns:repeat(3,1fr)}.prototype-badge{display:none}.main-nav .nav-item{min-width:105px;padding-inline:10px}}
@media(max-width:900px){.topbar{height:auto;min-height:70px;flex-wrap:wrap;padding:10px}.brand{min-width:180px}.main-nav{order:3;width:100%;height:52px}.workspace{display:block}.sidebar{position:relative;top:auto;max-height:none;border-right:0}.design-area{padding:10px}.results-strip{grid-template-columns:repeat(2,1fr)}.canvas-wrap{height:55vh;min-height:380px}}
@media(max-width:580px){.top-actions .new-project-button,.top-actions #saveButton{display:none}.main-nav .nav-item{min-width:0;flex:1;padding:5px}.workspace{display:block}.input-grid.two,.input-grid.three,.module-reference-grid,.selected-building-properties{grid-template-columns:1fr}.results-strip{grid-template-columns:1fr}.canvas-wrap{min-height:330px}.sun-panel{display:none}.scene-help{white-space:normal;width:90%;text-align:center}.sidebar-tabs{grid-template-columns:repeat(4,1fr)}}
@media print{body{background:#fff}.topbar,.workspace,.toast{display:none!important}.report-sheet{display:block!important;padding:20px}.report-header,.report-title-block,.report-kpis,.report-columns{display:flex;justify-content:space-between;gap:20px}.report-hero canvas{width:100%}.report-kpis>div{flex:1;padding:10px;border:1px solid #ddd}.report-columns>div{flex:1}}


/* V0.17.1 — aperçus 2D/3D résultats + rapport */
.project-views-section{margin:16px 0 18px;padding:18px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow)}
.project-views-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px}
.project-views-header h2{margin:4px 0 0;font-size:18px}
.project-views-header p{margin:6px 0 0;color:#71818d;font-size:13px}
.project-views-actions{display:flex;gap:10px;align-items:center}
.project-views-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.project-view-card{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fbfdfe}
.project-view-title{display:flex;justify-content:space-between;gap:12px;align-items:flex-end;padding:12px 14px;border-bottom:1px solid var(--line);background:#fff}
.project-view-title strong{font-size:14px;color:#1c3140}
.project-view-title small{color:#7b8995;font-size:11px;text-align:right}
.project-view-card canvas{display:block;width:100%;height:auto;background:#fff}
.report-hero-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:14px;align-items:start}
.report-hero-main,.report-hero-side{border:1px solid #d9e1e8;border-radius:12px;padding:10px;background:#fff}
.report-hero-main h2,.report-hero-side h2{margin:0 0 8px;font-size:15px;color:#1f3241}
.report-hero-main canvas,.report-hero-side canvas{width:100%;height:auto;display:block;background:#fff;border-radius:8px}
@media (max-width:1100px){.project-views-grid{grid-template-columns:1fr}.report-hero-grid{grid-template-columns:1fr}}
@media print{.project-views-section{display:none!important}.report-hero-grid{grid-template-columns:1.4fr 1fr!important}.report-hero-main,.report-hero-side{break-inside:avoid}}


/* V0.17.2 — synthèse commerciale et stabilisation 3D */
.commercial-results-hero{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.75fr);gap:18px;margin-bottom:14px;padding:24px;border-radius:16px;background:linear-gradient(135deg,#102c42 0%,#174d68 55%,#0c7281 100%);color:#fff;overflow:hidden;position:relative}
.commercial-results-hero:after{content:"";position:absolute;right:-90px;top:-120px;width:310px;height:310px;border-radius:50%;background:rgba(255,255,255,.07)}
.commercial-results-copy,.commercial-potential-card{position:relative;z-index:1}
.commercial-eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:.16em;color:#84e6ef}
.commercial-results-copy h1{margin:8px 0 7px;font-size:30px;line-height:1.08;max-width:720px}
.commercial-results-copy p{margin:0;color:rgba(255,255,255,.78);font-size:14px;max-width:700px}
.commercial-results-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.commercial-results-actions .button.subtle{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.28);color:#fff}
.commercial-results-actions .button.primary{box-shadow:0 8px 22px rgba(0,0,0,.18)}
.commercial-potential-card{align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:20px;border:1px solid rgba(255,255,255,.22);border-radius:14px;background:rgba(255,255,255,.10);backdrop-filter:blur(8px)}
.commercial-potential-card span{font-size:10px;font-weight:800;letter-spacing:.13em;color:#9deef3}
.commercial-potential-card strong{margin-top:9px;font-size:25px;line-height:1.1}
.commercial-potential-card p{margin:8px 0 0;font-size:12px;line-height:1.45;color:rgba(255,255,255,.76)}
.commercial-kpi-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 16px}
.commercial-kpi-strip article{padding:16px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(180deg,#fff,#f8fbfc)}
.commercial-kpi-strip span{display:block;color:#748490;font-size:11px;font-weight:700}
.commercial-kpi-strip strong{display:block;margin:5px 0 4px;color:#173a4d;font-size:23px}
.commercial-kpi-strip small{display:block;color:#8a98a3;font-size:10px;line-height:1.35}
.project-views-section{border-color:#dbe5ea;background:linear-gradient(180deg,#fff,#f9fcfd)}
.project-view-card{box-shadow:0 8px 20px rgba(24,59,78,.06)}
.yield-report-card{border-radius:14px;overflow:hidden}
.building-result-card{transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.building-result-card:hover{transform:translateY(-1px);box-shadow:0 9px 22px rgba(22,53,72,.08)}
@media (max-width:1050px){.commercial-results-hero{grid-template-columns:1fr}.commercial-kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:680px){.commercial-results-copy h1{font-size:24px}.commercial-kpi-strip{grid-template-columns:1fr}.commercial-results-actions{flex-direction:column}.commercial-results-actions .button{width:100%}}
@media print{.commercial-results-actions{display:none!important}.commercial-results-hero{background:#eef4f6!important;color:#173446!important;border:1px solid #d6e0e6}.commercial-results-copy p,.commercial-potential-card p{color:#536975!important}.commercial-eyebrow,.commercial-potential-card span{color:#08798a!important}.commercial-potential-card{background:#fff!important;border-color:#d6e0e6}.commercial-kpi-strip{break-inside:avoid}}


/* V0.17.3 — snapshots 3D convertis en image pour un rendu fiable à l'écran et à l'impression */
.snapshot-render-source{position:absolute!important;left:-20000px!important;top:-20000px!important;width:1200px!important;height:700px!important;visibility:hidden!important;pointer-events:none!important}
.project-scene-snapshot,.report-scene-snapshot{display:block;width:100%;height:auto;aspect-ratio:12/7;object-fit:contain;background:#fff;border-radius:8px}
.project-scene-snapshot:not([src]),.report-scene-snapshot:not([src]){min-height:280px;background:linear-gradient(135deg,#f7fafc,#fff)}
@media print{.snapshot-render-source{display:none!important}.report-scene-snapshot{display:block!important;width:100%!important;max-height:420px!important;object-fit:contain!important}}


/* V0.17.4 — pertes détaillées et supports productifs uniquement */
.yield-losses-panel{margin:14px 0;border:1px solid #d9e3ea;border-radius:12px;background:#f8fbfd;overflow:hidden}
.yield-losses-panel summary{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:13px 15px;cursor:pointer;background:#fff;font-weight:800;color:#203746}
.yield-losses-panel summary strong{color:#f47721;font-size:13px}
.yield-losses-intro{margin:0;padding:12px 15px 0;color:#6e7f8b;font-size:12px;line-height:1.45}
.yield-losses-grid{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:12px;padding:14px 15px 16px}
.yield-losses-grid label{font-size:12px;font-weight:700;color:#334b5b}
.yield-losses-grid label small{display:block;color:#8b99a3;font-weight:500;margin-top:2px}
.yield-losses-grid .unit-input{margin-top:6px}
.yield-loss-total-card{display:flex;flex-direction:column;justify-content:center;border:1px solid #f1b07d;border-radius:10px;background:#fff8f2;padding:10px 12px}
.yield-loss-total-card span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#8d6b52}
.yield-loss-total-card strong{font-size:20px;color:#e86616;margin:4px 0}
.yield-loss-total-card small{color:#7b8993;font-size:10px;line-height:1.35}
.report-losses-block{margin-top:14px;border:1px solid #d8e0e6;border-radius:10px;padding:10px 12px;break-inside:avoid}
.report-losses-block h3{margin:0 0 8px;font-size:14px;color:#203746}
.report-losses-block table{width:100%;border-collapse:collapse;font-size:10px}
.report-losses-block td,.report-losses-block th{border:1px solid #d9e0e5;padding:5px 7px;text-align:left}
.report-losses-block .loss-total-row{font-weight:800;background:#fff4ea}
@media(max-width:1150px){.yield-losses-grid{grid-template-columns:repeat(2,minmax(145px,1fr))}}
@media(max-width:700px){.yield-losses-grid{grid-template-columns:1fr}.yield-losses-panel summary{align-items:flex-start;flex-direction:column}}

/* V0.18.0 — Centrale au sol et cadastre */
body.ground-mode .ground-workflow{display:block}
.ground-workflow{min-width:0}
.ground-sidebar-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
.ground-sidebar-tabs .sidebar-tab{padding-inline:4px}
.ground-panel .step-title{border-top:0}
.ground-context{background:linear-gradient(135deg,#173f35,#256b55)}
.ground-context strong{color:#fff}
.ground-context small,.ground-context span{color:#cde7dc}
.ground-list{display:grid;gap:8px}
.ground-list-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:stretch}
.ground-list-select{display:flex;gap:10px;align-items:center;text-align:left;border:1px solid #dbe4e8;background:#fff;border-radius:10px;padding:9px 10px;color:#253947;cursor:pointer}
.ground-list-item.active .ground-list-select{border-color:#2d9c72;box-shadow:0 0 0 2px rgba(45,156,114,.13);background:#f4fbf8}
.ground-list-index{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#dff2e9;color:#176246;font-weight:800;flex:0 0 auto}
.ground-list-copy{display:grid;gap:2px;min-width:0}.ground-list-copy strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ground-list-copy small{color:#75848e}
.ground-list-remove{border:0;border-radius:9px;background:#fff0f2;color:#c62f4b;font-weight:700;padding:7px 9px;cursor:pointer}
.ground-edit-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.ground-active-card{border-left:4px solid #2d9c72}
.cadastre-intro{display:grid;gap:3px;border:1px solid #d7e8df;background:#f5fbf8;border-radius:10px;padding:11px 12px;margin-bottom:10px}.cadastre-intro span{color:#657a6f;font-size:12px}
.cadastre-summary{display:grid;gap:4px;margin:10px 0;border:1px solid #dbe4e8;border-radius:10px;padding:11px 12px;background:#fff}.cadastre-summary strong{color:#1d4336}.cadastre-summary span{font-size:12px;color:#73828b}
.ground-status,.ground-calculated{margin-top:10px;padding:10px 12px;border-radius:10px;background:#eef7f3;border:1px solid #d4e8df;color:#33574a;font-size:12px;line-height:1.45}
.ground-calculated strong{font-size:14px;color:#173f35}
.ground-map-ribbon{border-top:2px solid #3b9d75}
.ground-map-ribbon .map-tool-ribbon-title{color:#287c5d}
.ground-map-ribbon .map-ribbon-button.active{background:#e8f6ef;border-color:#56a985;color:#1e6b50}
.cadastre-parcel-label{font-size:10px;font-weight:800;color:#163e31;text-shadow:0 1px #fff}
.ground-exclusion-item{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 9px;border:1px solid #ead9dc;background:#fff8f9;border-radius:9px;margin-bottom:6px}.ground-exclusion-item span{font-size:12px}.ground-exclusion-item button{border:0;background:transparent;color:#c62f4b;font-weight:700;cursor:pointer}
.ground-draw-marker{background:#fff;border:2px solid #2d9c72;border-radius:50%;width:10px!important;height:10px!important;margin-left:-5px!important;margin-top:-5px!important}
.ground-mode .map-onboarding strong{color:#1c6048}
@media(max-width:1180px){.ground-sidebar-tabs .tab-text{font-size:9px}.ground-sidebar-tabs .tab-icon{font-size:13px}}
.ground-result-parcels{margin:8px 0;padding:7px 9px;border-radius:8px;background:#f1f8f4;color:#45685a;font-size:11px}
.report-ground-cadastre-section{break-inside:avoid}


/* V0.18.2 — historique global Annuler / Rétablir */
.history-actions{display:flex;align-items:center;gap:5px;padding-right:6px;border-right:1px solid rgba(255,255,255,.16)}
.history-button{display:inline-flex!important;align-items:center;gap:5px;padding:8px 10px!important;min-width:auto!important;white-space:nowrap}
.history-button>span:first-child{font-size:18px;line-height:1;font-weight:800}
.history-button:disabled{opacity:.38;cursor:not-allowed;filter:saturate(.3)}
.history-button:not(:disabled):hover{background:rgba(255,255,255,.14)}
@media(max-width:1320px){.history-button>span:last-child{display:none}.history-button{padding:8px!important}.history-actions{gap:2px}}

/* V0.18.6 — bandeau de consentement non bloquant */
.telemetry-button{display:inline-flex!important;align-items:center;gap:6px}.telemetry-dot{width:8px;height:8px;border-radius:50%;background:#2ebd85;box-shadow:0 0 0 3px rgba(46,189,133,.13)}.telemetry-dot.disabled{background:#9aa7b1;box-shadow:none}.telemetry-panel{position:fixed;z-index:100000;right:18px;top:78px;width:min(430px,calc(100vw - 36px));padding:16px;border:1px solid #d5dfe6;border-radius:14px;background:#fff;box-shadow:0 22px 70px rgba(17,36,51,.24);color:#263b49}.telemetry-panel[hidden]{display:none!important}.telemetry-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.telemetry-panel-heading strong{display:block;font-size:16px}.telemetry-panel-heading small{display:block;margin-top:3px;color:#778793}.telemetry-close{border:0;background:transparent;font-size:25px;line-height:1;color:#71808c;cursor:pointer}.telemetry-panel p{margin:12px 0;font-size:13px;line-height:1.5;color:#526572}.telemetry-toggle{display:flex;gap:9px;align-items:flex-start;padding:11px;border:1px solid #e0e7ec;border-radius:10px;background:#f8fafb;font-size:13px;font-weight:700}.telemetry-toggle input{margin-top:2px}.telemetry-status{margin:10px 2px 0;font-size:11px;color:#758691}.telemetry-panel-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:13px}@media(max-width:900px){.telemetry-button span:last-child{display:none}.telemetry-panel{top:72px;right:10px;width:calc(100vw - 20px)}}

.telemetry-consent-banner{position:fixed;z-index:99999;left:18px;right:18px;bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;border:1px solid #d3dee6;border-radius:14px;background:rgba(255,255,255,.98);box-shadow:0 18px 55px rgba(15,35,50,.22);color:#263b49;backdrop-filter:blur(8px)}
.telemetry-consent-banner[hidden]{display:none!important}.telemetry-consent-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.telemetry-consent-copy strong{font-size:14px}.telemetry-consent-copy span{font-size:12px;line-height:1.45;color:#5f717e}.telemetry-consent-actions{display:flex;gap:8px;flex:0 0 auto}.telemetry-consent-actions .button{white-space:nowrap}
@media(max-width:760px){.telemetry-consent-banner{left:10px;right:10px;bottom:10px;align-items:stretch;flex-direction:column}.telemetry-consent-actions{display:grid;grid-template-columns:1fr 1fr}.telemetry-consent-actions #telemetryAllowButton{grid-column:1/-1}}

.ground-area-note{margin-top:6px;font-size:12px;color:#a55b18;}

.ground-road-settings{margin-top:10px}
.ground-road-legend{display:flex;align-items:center;gap:8px;margin:8px 0 2px;font-size:12px;color:#7b511e}
.ground-road-swatch{display:inline-block;width:34px;height:12px;border:2px solid #cf6817;background:rgba(241,154,62,.34);border-radius:5px}

/* V0.19.2 — zones de sécurité des centrales */
.ground-safety-list-item{width:100%;display:flex;align-items:center;text-align:left;border:1px solid var(--line);background:#fff;border-radius:9px;padding:9px 10px;margin-bottom:6px;color:var(--ink);cursor:pointer}.ground-safety-list-item span{display:grid;gap:2px}.ground-safety-list-item strong{font-size:13px}.ground-safety-list-item small{font-size:11px;color:var(--muted)}.ground-safety-list-item.active{border-color:#e07a20;background:#fff7ed}.ground-safety-editor{display:grid;gap:9px;margin:9px 0;padding:10px;border:1px solid #efc08f;border-radius:10px;background:#fffaf4}.ground-safety-editor .ground-edit-actions{grid-template-columns:1fr 1fr 1fr}


/* V0.19.3 — mode dessin centrale : les calques existants ne bloquent plus les clics */
#siteMap.ground-drawing-active{cursor:crosshair!important;}
#siteMap.ground-drawing-active .leaflet-interactive{pointer-events:none!important;}
#groundSafetyDrawButton.active{outline:2px solid rgba(226,121,25,.35);}

/* V0.19.4 — édition fiable des zones et voies */
.ground-vertex-handle,.ground-mid-handle{background:transparent!important;border:0!important}
.ground-vertex-handle span{display:block;width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid #176fc1;box-shadow:0 1px 4px rgba(0,0,0,.35)}
.ground-mid-handle span{display:flex;width:14px;height:14px;align-items:center;justify-content:center;border-radius:50%;background:#176fc1;color:#fff;font:bold 12px/1 Arial;box-shadow:0 1px 4px rgba(0,0,0,.3)}
.ground-drawing-active{cursor:crosshair!important}


/* V0.19.6 — édition fiable et simplification des sécurités */
#siteMap.ground-geometry-edit-active .leaflet-cadastrePane-pane,
#siteMap.ground-geometry-edit-active .leaflet-groundPane-pane,
#siteMap.ground-geometry-edit-active .leaflet-groundExclusionPane-pane,
#siteMap.ground-geometry-edit-active .leaflet-groundSafetyPane-pane,
#siteMap.ground-geometry-edit-active .leaflet-groundAccessPane-pane,
#siteMap.ground-geometry-edit-active .leaflet-groundTablePane-pane{pointer-events:none!important}
#siteMap.ground-geometry-edit-active .leaflet-groundEditPane-pane{pointer-events:auto!important}
.ground-vertex-handle{cursor:move!important}
.ground-vertex-handle span{width:20px!important;height:20px!important;border-width:3px!important}
.ground-mid-handle span{width:16px!important;height:16px!important}

/* V0.19.7 — seules les poignées du contour extérieur des sécurités sont éditables */
.ground-geometry-edit-active .ground-mid-handle{pointer-events:auto}


/* V0.19.8 — édition épurée du contour extérieur global de la centrale */
.ground-boundary-handle{background:transparent!important;border:0!important;cursor:move!important}
.ground-boundary-handle span{display:block;width:12px;height:12px;border-radius:3px;background:#fff;border:2px solid #176fc1;box-shadow:0 1px 3px rgba(0,0,0,.38)}
#siteMap.ground-geometry-edit-active .leaflet-groundTablePane-pane{opacity:.16!important}


/* V0.19.9 — rose des vents 2D / 3D */
.north-rose{position:absolute;width:72px;height:72px;z-index:680;pointer-events:none;filter:drop-shadow(0 4px 8px rgba(17,36,51,.22));user-select:none}
.north-rose-map{left:14px;bottom:18px}
.north-rose-3d{left:14px;top:14px;z-index:20}
.north-rose svg{display:block;width:100%;height:100%;overflow:visible}
.north-rose-disc{fill:rgba(255,255,255,.94);stroke:rgba(28,53,70,.72);stroke-width:1.5}
.north-rose-ticks{fill:none;stroke:#526b7b;stroke-width:2;stroke-linecap:round}
.north-rose-arrow-north{fill:#ef6b21;stroke:#b9470d;stroke-width:1.2;stroke-linejoin:round}
.north-rose-arrow-south{fill:#dbe3e8;stroke:#718391;stroke-width:1.1;stroke-linejoin:round}
.north-rose-center{fill:#17384d;stroke:#fff;stroke-width:1.2}
.north-rose-letter{font:800 11px system-ui,-apple-system,"Segoe UI",sans-serif;fill:#c34f11;text-anchor:middle;dominant-baseline:middle}
.north-rose-3d .north-rose-disc{fill:rgba(255,255,255,.90)}
@media(max-width:580px){.north-rose{width:58px;height:58px}.north-rose-map{left:10px;bottom:14px}.north-rose-3d{left:10px;top:10px}}

/* V0.20.0 — Relief et pentes des centrales au sol */
.ground-terrain-result {
  margin-top: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(35, 151, 99, .24);
  border-radius: 10px;
  background: rgba(35, 151, 99, .07);
  color: #334651;
  font-size: 12px;
  line-height: 1.55;
}
.ground-terrain-result strong { color: #17384b; font-size: 13px; }
.ground-terrain-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  font-size: 11px;
  color: #52636e;
}
.ground-terrain-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ground-terrain-legend i {
  width: 16px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(32, 50, 60, .25);
  display: inline-block;
}
.terrain-slope-low { background: rgba(71, 168, 93, .58); }
.terrain-slope-medium { background: rgba(239, 159, 47, .62); }
.terrain-slope-high { background: rgba(218, 67, 55, .64); }
.ground-terrain-loading { opacity: .72; pointer-events: none; }
