#v29-document-preview{box-sizing:border-box;width:min(680px,calc(100vw - 32px));height:fit-content;min-height:0;max-width:none;max-height:calc(100dvh - 32px);padding:0;border:1px solid #acbdc7;border-radius:22px;background:#f3f7fa;color:#203744;box-shadow:0 30px 90px #061d3966;overflow:auto;z-index:5500}
#v29-document-preview::backdrop{background:#102a3a99;backdrop-filter:blur(6px)}
.v29-preview-shell{display:flex;flex-direction:column;min-height:0}
.v29-preview-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid #c8d4dd}
.v29-preview-header h2{margin:0;font-size:1.25rem;line-height:1.3;overflow-wrap:anywhere}.v29-preview-kicker{margin:0 0 5px;font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#47626f}
.v29-preview-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:4px 24px 0}.v29-preview-toolbar .button{white-space:normal;min-height:44px;font-size:.875rem;flex:1 1 auto;justify-content:center}
.v29-preview-status{margin:20px 24px;font-size:.95rem;line-height:1.5;overflow-wrap:anywhere}.v29-preview-body{max-height:320px;margin:0 24px 16px;background:#e5ebef;border:1px solid #bdcbd4;border-radius:8px;overflow:auto;display:flex;align-items:center;justify-content:center}.v29-preview-body[hidden]{display:none}.v29-preview-body[aria-busy=true]::after{content:'Ouverture de l’image…';color:#314e5c;font-weight:600;padding:24px;text-align:center}
.v29-preview-image{display:block;max-width:100%;max-height:320px;object-fit:contain}.v29-preview-note{margin:14px 24px 22px;color:#49606c;font-size:.85rem;line-height:1.5}.v29-preview-unavailable{padding:16px;text-align:center}
#v29-document-preview .v31-preview-open{background:linear-gradient(#237c60,#126348);color:#fff;border-color:#1b7759}#v29-document-preview .v31-preview-print{background:linear-gradient(#3b73ab,#28558b);color:#fff;border-color:#396ba0}#v29-document-preview .v31-preview-download{background:linear-gradient(#ad5e1c,#95501a);color:#fff;border-color:#a65a1f}#v29-document-preview .v31-preview-close{background:linear-gradient(#b73b60,#922443);color:#fff;border-color:#a62b50;white-space:nowrap;min-height:44px;flex-shrink:0}
#v29-document-preview .button:disabled{opacity:.48;cursor:wait}#v29-document-preview .button:focus-visible{outline:3px solid #2571c5;outline-offset:3px}
@media(max-width:540px){#v29-document-preview{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:16px}.v29-preview-header{padding:16px;gap:12px;align-items:flex-start}.v29-preview-header h2{font-size:1.05rem}.v29-preview-toolbar{padding:0 16px;gap:8px}.v29-preview-toolbar .button{flex:1 1 100%}.v29-preview-status{margin:16px}.v29-preview-body{margin:0 16px 16px}.v29-preview-note{margin:14px 16px 18px}}

/* V53: standalone preview controls retain solid contrasting colors. */
body[data-portal] #v29-document-preview .button{--v53-preview-color:#315f92;background-color:var(--v53-preview-color)!important;background-image:linear-gradient(#ffffff20,#00000016)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
body[data-portal] #v29-document-preview .v31-preview-close{--v53-preview-color:#a12949}
body[data-portal] #v29-document-preview .v31-preview-open{--v53-preview-color:#1c6f51}
body[data-portal] #v29-document-preview .v31-preview-print{--v53-preview-color:#315f92}
body[data-portal] #v29-document-preview .v31-preview-download{--v53-preview-color:#98521c}
