.pd-dialog{width:min(100% - 20px,620px);max-height:94dvh;padding:0;border:1px solid #ccdce7;border-radius:18px;color:#15374b;background:white}.pd-dialog::backdrop{background:#14344988}.pd-dialog>header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #dce6ee;height:auto}.pd-dialog header button{padding:8px 12px;min-height:40px}.pd-body{padding:16px;overflow:auto;max-height:calc(94dvh - 72px)}.pd-body h2{font-size:21px}.pd-body label{display:block;margin:12px 0 6px;font-weight:600}.pd-body input:not([type=checkbox]){width:100%;box-sizing:border-box;padding:10px;border:1px solid #ccd9e4;border-radius:10px;font:inherit;min-width:0}.pd-grid{display:grid;grid-template-columns:1fr 2fr;gap:10px}.pd-body fieldset{border:0;padding:0;margin:18px 0}.pd-body legend{font-weight:700;font-size:14px}.pd-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}.pd-choices button,.pd-actions button{white-space:normal;min-height:46px;padding:10px;font-size:13px}.pd-choices button{background:white;color:#075985;border:1px solid #bfcedc}.pd-choices [aria-pressed=true]{background:#dff2ff;border-color:#0780b2}.pd-actions{display:flex;gap:8px;margin:18px 0}.pd-actions button{flex:1}.pd-list{display:grid;gap:8px;margin:16px 0}.pd-test{background:#fff5e8;padding:10px;border-radius:10px;font-size:12px}.pd-check{display:flex!important;align-items:flex-start;gap:10px;font-weight:400!important;font-size:13px}.pd-check input{width:22px;height:22px;flex:none}.pd-pages img{width:100%;height:auto;border:1px solid #dbe5ec;margin-bottom:12px}.pd-body canvas{display:block;width:100%;height:auto;aspect-ratio:900/280;touch-action:none;border:1px solid #7d9eb4;border-radius:10px;background:#f6fbfe}#pd-error{color:#b42336;font-size:13px}

.pd-body textarea{width:100%;box-sizing:border-box;padding:10px;border:1px solid #ccd9e4;border-radius:10px;font:inherit;resize:vertical}.pd-body #pd-pv-preview{display:block;width:100%;margin-top:12px}#tp-error{color:#b42336;font-size:13px}body>header #technician-profile{margin-left:auto;margin-right:6px;white-space:nowrap}

@media(max-width:400px){body>header:has(#technician-profile:not([hidden])) .brand small{display:none}body>header #technician-profile,body>header:has(#technician-profile:not([hidden])) #logout{font-size:12px;padding:8px}}

.pd-survey{width:100%;border-collapse:collapse;table-layout:fixed;margin:16px 0}.pd-survey th,.pd-survey td{border:1px solid #dce6ee;padding:4px;overflow-wrap:anywhere;text-align:center}.pd-survey th{font-size:10px;line-height:1.3}.pd-survey th:first-child{width:34%;text-align:left}.pd-survey tbody th{font-size:12px}.pd-survey button{width:100%;min-height:44px;padding:2px;background:white;color:#075985;border:1px solid #bfcedc;font-size:20px}.pd-survey button[aria-pressed=true]{background:#dff2ff;border-color:#0780b2}

.ps-stamp{display:block;max-width:100%;max-height:180px;object-fit:contain;margin:12px auto}

.bi-photo img{max-width:100%;max-height:180px;object-fit:contain}

/* Résumé des documents, limité à l’étape ouverte par le technicien. */
.pd-body .pd-dossier{margin:0 0 18px;overflow-wrap:anywhere;font-weight:600}
.pd-dossier span{display:block;margin-top:4px;font-size:13px;font-weight:400;color:#536c80}
.pd-complete{display:flex;align-items:center;gap:8px;padding:12px 14px;border-radius:12px;background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;font-weight:700}
.pd-document-section{margin:18px 0}.pd-document-section>h3{font-size:16px;margin:0 0 12px}
.pd-document-list{display:grid;gap:12px}
.pd-document{padding:14px;border:1px solid #dce6ee;border-radius:14px;background:#fff;min-width:0}
.pd-document.is-signed{border-color:#bbdfc8}
.pd-document-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.pd-document-heading h3{font-size:15px;line-height:1.4;margin:0;overflow-wrap:anywhere;min-width:0}
.pd-document-status{flex:none;border-radius:20px;padding:4px 8px;background:#f1f5f9;color:#475569;font-size:12px;white-space:nowrap}
.pd-document-status.is-signed{background:#dcfce7;color:#166534;font-weight:700}
.pd-document-detail{font-size:13px;color:#536c80;margin:8px 0 0;line-height:1.4}
.pd-document-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.pd-document-actions button,.pd-document-link{min-height:42px;font-size:13px;white-space:normal}
.pd-document-link{display:inline-flex;align-items:center;border:1px solid #ccdce7;border-radius:12px;padding:8px 12px;color:#075985;text-decoration:none;font-weight:600}
.pd-before-history{margin:18px 0}.pd-before-history>summary{padding:12px 0;cursor:pointer;color:#166534;font-weight:600;font-size:14px}
#pd-error:empty{display:none}

/* Un seul cadre pour le passage, le document apporteur et sa signature. */
.bi-flow-dialog{width:min(calc(100vw - 16px),620px);max-width:calc(100vw - 16px);height:min(94dvh,820px);max-height:94dvh;overflow:hidden}
.bi-flow-dialog[open]{display:flex;flex-direction:column}
.bi-flow-dialog>header{flex:none;min-height:58px;padding:10px 14px}
.bi-flow-dialog>header button{font-size:12px;min-height:36px;padding:7px 10px}
.bi-flow-dialog>#bi-flow-content{display:flex;flex-direction:column;flex:1;min-height:0}
.bi-flow-dialog #bi-flow-content>.portal-page{flex:1;min-height:0;padding:12px 16px}
.bi-flow-dialog #bi-back,.bi-flow-dialog .bi-wizard-page>h1{display:none}
.bi-flow-dialog .bi-wizard-page #bi-content>.note{margin-bottom:10px}
.bi-flow-dialog .bi-wizard-page #bi-form{border:0;box-shadow:none;border-radius:0;padding:0;background:white}
.bi-flow-dialog>.pd-body{flex:1;min-height:0;max-height:none;overflow:auto}
.bi-flow-dialog #bi-form .bi-wizard-progress button{font-size:10px;overflow-wrap:anywhere}
.bi-flow-dialog #bi-form #bi-previous{white-space:nowrap;font-size:11px;gap:3px}

/* Résumé documentaire : état clair, une carte et une action par document. */
.pd-body.pd-summary{padding:20px}
.pd-summary>h2{font-size:21px;line-height:1.25;margin:2px 0 12px}
.pd-summary .pd-dossier{font-size:13px;line-height:1.5;font-weight:500;margin-bottom:14px}
.pd-summary .pd-dossier span{font-size:11px;margin-top:3px;color:#64748b}
.pd-summary-success{color:#166534;background:#f0fdf4;border:1px solid #ccebd7;border-radius:10px;padding:10px 12px;font-size:13px;margin:0 0 18px;line-height:1.5}
.pd-summary .pd-document-section{margin:16px 0}
.pd-summary .pd-document-section>h3{font-size:12px;font-weight:600;color:#64748b;margin:0 0 8px}
.pd-summary .pd-document{padding:12px;border-radius:12px;background:#fff}
.pd-summary .pd-document.is-signed{display:grid;grid-template-columns:minmax(0,1fr) 40px;column-gap:12px;align-items:center;border-color:#dce6ee}
.pd-summary .pd-document-heading{display:block;grid-column:1;grid-row:1}
.pd-summary .pd-document-heading h3{font-size:14px;line-height:1.4;font-weight:600}
.pd-summary .pd-document-status{display:inline-flex;padding:3px 7px;font-size:10px;margin-top:6px}
.pd-summary .pd-document-detail{grid-column:1;font-size:11px;line-height:1.4;margin-top:5px;color:#64748b}
.pd-summary .pd-document.is-signed .pd-document-actions{grid-column:2;grid-row:1 / span 2;display:flex;flex-direction:column;margin:0;align-items:center}
.pd-summary .pd-document.is-signed:has([data-sync]){grid-template-columns:minmax(0,1fr) auto}
.pd-summary .pd-document-actions [data-sync]{font-size:11px;min-height:34px;padding:6px 8px}
.pd-summary .document-icon-button{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;min-height:40px;padding:9px;border:1px solid #dce6ee;border-radius:11px;background:#f8fbfd;color:#075985;text-decoration:none}
.pd-summary .document-icon-button:hover{background:#e0f2fe;border-color:#7dc7e9}
.pd-summary .document-icon-button svg{width:20px;height:20px}
.pd-summary .pd-before-history{margin:12px 0}
.pd-summary .pd-before-history>summary{font-size:12px;min-height:40px}
@media(max-width:360px){.pd-body.pd-summary{padding:14px}.pd-summary .pd-document{padding:10px}}
