/* TerritoRisk — parcours commercial, projet portable et rapports. */
.portfolio-demo,.portfolio-project-bar{max-width:1200px;margin:0 auto 16px;padding:18px 22px;display:flex;gap:20px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.portfolio-demo{border-left:4px solid #008D36}
.portfolio-demo h2{font-size:1.15rem;margin:5px 0}
.portfolio-demo p{max-width:780px;margin:0;color:var(--muted);font-size:.9rem;line-height:1.5}
#portfolio-demo-status,#portfolio-project-status{width:100%;color:var(--muted);font-size:.84rem}
.portfolio-project-bar{border-left:4px solid #3C63AD}
.portfolio-project-bar strong,.portfolio-project-bar small{display:block}
.portfolio-project-bar small{color:var(--muted);margin-top:4px}
.project-open-label{position:relative;display:inline-flex;align-items:center;cursor:pointer}
.project-open-label input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;inset:auto}
.project-open-label:focus-within{outline:3px solid #3C63AD;outline-offset:3px}
.portfolio-column-mapping{margin:16px 0;border:1px solid var(--line);padding:14px;border-radius:12px;background:#fff}
.portfolio-column-mapping summary{font-weight:700;cursor:pointer;color:#3C3C3B}
.portfolio-mapping-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:10px;margin:14px 0}
.portfolio-map-row{display:flex;flex-direction:column;gap:5px;border:1px solid var(--line);border-radius:9px;padding:10px;font-size:.82rem}
.portfolio-map-row span{font-weight:650;overflow-wrap:anywhere}
.portfolio-map-row select{width:100%;min-height:38px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:7px;color:#3C3C3B}
#portfolio-mapping-status{font-size:.82rem;color:var(--muted)}
.portfolio-demo-banner{background:#fff8e8;color:#3C3C3B;border-left:4px solid #F9BF30;border-radius:8px;padding:12px 16px;margin:8px 0 18px;font-weight:600;line-height:1.5}
.portfolio-results .result-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#portfolio-report-type{min-height:41px;max-width:230px;padding:8px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#3C3C3B}
.portfolio-followup{margin:14px 0}
.portfolio-followup .table-wrap{overflow-x:auto}
.followup-table{width:100%;table-layout:fixed;min-width:680px}
.followup-table th:first-child{width:27%}
.followup-table th:nth-child(2){width:12%}
.followup-table th:nth-child(3){width:25%}
.followup-table th:nth-child(4){width:36%}
.followup-table small{display:block;color:var(--muted);margin-top:5px}
.followup-table input,.followup-table select{width:100%;max-width:100%;font-size:.86rem;padding:8px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#3C3C3B}
#portfolio-followup-more{margin-top:12px}
#territorisk-report{display:none}
@media(max-width:650px){
 .portfolio-demo,.portfolio-project-bar{margin-left:14px;margin-right:14px;padding:16px}
 .portfolio-demo>button{width:100%}
 #portfolio-report-type,#portfolio-print-report{width:100%;max-width:none}
 .portfolio-results .result-actions>*{flex:1 1 200px}
}
@media print{
 body.territorisk-print-report{background:#fff!important;color:#111!important}
 body.territorisk-print-report > :not(#territorisk-report){display:none!important}
 body.territorisk-print-report #territorisk-report{display:block!important;font-family:Arial,Helvetica,sans-serif;font-size:10pt;line-height:1.4;max-width:none;margin:0;padding:0;color:#222;background:#fff}
 @page{size:A4;margin:14mm 12mm}
 .tr-report-header{display:flex;justify-content:space-between;gap:15px;border-bottom:2px solid #3C63AD;padding-bottom:12px;margin-bottom:18px}
 .tr-report-header strong{font-size:20pt;color:#3C3C3B;letter-spacing:-.03em}
 .tr-report-header strong span{color:#E71D73}
 .tr-report-header p,.tr-report-header small{font-size:9pt;color:#666;margin:0}
 #territorisk-report h1{font-size:18pt;line-height:1.2;color:#3C3C3B;margin:0 0 12px}
 #territorisk-report h2{font-size:12pt;color:#3C63AD;margin:20px 0 6px;break-after:avoid}
 #territorisk-report p{font-size:9pt;line-height:1.55;margin:8px 0 12px}
 #territorisk-report .tr-report-lead{font-size:10pt}
 #territorisk-report .tr-report-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0}
 #territorisk-report .tr-report-kpis div{border:1px solid #ddd;border-radius:6px;padding:10px;break-inside:avoid}
 #territorisk-report .tr-report-kpis strong{display:block;color:#3C63AD;font-size:17pt}
 #territorisk-report .tr-report-kpis span{font-size:8pt;color:#666}
 #territorisk-report .tr-report-demo{background:#fff0d0;border-left:5px solid #F9BF30;padding:10px;font-weight:bold}
 #territorisk-report .tr-report-table{font-size:7.5pt;width:100%;border-collapse:collapse;table-layout:fixed;margin:12px 0}
 #territorisk-report .tr-report-table th{background:#eaf0fa;color:#3C3C3B;border-bottom:1px solid #bbb;font-size:7.2pt;text-align:left;padding:6px 4px;vertical-align:top}
 #territorisk-report .tr-report-table td{border-bottom:1px solid #ddd;padding:6px 4px;vertical-align:top;overflow-wrap:anywhere}
 #territorisk-report .tr-report-table tr{break-inside:avoid}
 #territorisk-report .tr-report-table small{font-size:7pt;color:#666}
 #territorisk-report a{color:#3C63AD;text-decoration:underline}
 #territorisk-report .tr-report-footer{border-top:1px solid #ddd;padding-top:10px;margin-top:25px;font-size:8pt;color:#666}
}

/* Rapport PDF opérationnel : quatre colonnes lisibles sur A4 */
@media print{
 #territorisk-report .tr-report-table{font-size:8.4pt;width:100%;table-layout:fixed;line-height:1.35}
 #territorisk-report .tr-report-table th{font-size:8pt;padding:8px 6px;overflow-wrap:normal;word-break:normal}
 #territorisk-report .tr-report-table th:nth-child(1){width:23%}
 #territorisk-report .tr-report-table th:nth-child(2){width:13%}
 #territorisk-report .tr-report-table th:nth-child(3){width:43%}
 #territorisk-report .tr-report-table th:nth-child(4){width:21%}
 #territorisk-report .tr-report-table td{padding:9px 6px;overflow-wrap:break-word;word-break:normal;vertical-align:top;line-height:1.38}
 #territorisk-report .tr-report-table td strong{display:block;font-weight:700;font-size:8.5pt}
 #territorisk-report .tr-report-table td small{display:block;margin-top:5px;color:#555;font-size:7.9pt;line-height:1.35}
 #territorisk-report .tr-report-table .tr-report-ref{font-size:7pt;overflow-wrap:anywhere;color:#666}
 #territorisk-report .tr-report-index-note{font-size:8pt;line-height:1.4;break-inside:avoid}
}
