/* Signature UI only: neither the PDF engine nor the remote exchange changes. */
body.pph-support-ready #bandeauSignature,
#bandeauSignature{
  position:static;top:auto;z-index:auto;background:#f7f8f5;color:var(--ink);
  border-bottom:1px solid #d8ddd4;padding:16px 24px;gap:16px;flex-wrap:nowrap;
}
#bandeauSignature>div:first-child{flex:1;min-width:0}
#bandeauSignature h2{color:inherit;font-size:14px;line-height:1.45;letter-spacing:0;overflow-wrap:anywhere}
#bandeauSignature .d{color:inherit;opacity:1;max-width:none;font-size:13px;line-height:1.55;overflow-wrap:anywhere}
#bandeauSignature .d a{color:inherit}
#bandeauSignature code{background:rgba(10,10,10,.07)}
#bandeauSignature.ok{background:#f0faf3;color:#155d35;border-color:#bad8c3}
#bandeauSignature.ko{background:#fff4f0;color:#7a2b12;border-color:#e6c5b8}
#signatureActions{max-width:100%}
#signatureActions .b,#signatureActions .b.creux{
  min-height:44px;white-space:normal;overflow-wrap:anywhere;background:#fff;
  border-color:#a6afa0;color:var(--ink);letter-spacing:.08em;
}
#signatureActions .b:hover{background:var(--ink);color:#fff;border-color:var(--ink)}
#signatureActions .b:focus-visible{outline:3px solid #315eea;outline-offset:3px}

/* A transient instruction belongs with the actions, not across the PDF. */
.toast{
  bottom:20px;background:#fff;color:var(--ink);border:1px solid #d8ddd4;
  border-radius:6px;box-shadow:0 4px 20px rgba(10,10,10,.12);
  width:max-content;max-width:min(520px,calc(100vw - 32px));box-sizing:border-box;
  padding:12px 16px;font-size:13px;line-height:1.5;font-weight:500;
  text-transform:none;letter-spacing:0;overflow-wrap:anywhere;
}
.toolbar{flex-wrap:wrap;gap:8px 12px;padding:10px 22px}
.toolbar .toast,.toolbar .toast.on{
  position:static;inset:auto;transform:none;flex:0 0 100%;order:-1;
  width:auto;max-width:100%;min-height:20px;padding:0;border:0;border-radius:0;
  background:transparent;color:#394335;box-shadow:none;text-align:left;
  font-size:13px;line-height:1.45;transition:opacity .15s;
}
.toolbar .info{flex:1 1 180px;min-width:0;overflow-wrap:anywhere;line-height:1.5}
.toolbar .acts{min-width:0;max-width:100%;flex-wrap:wrap}
.toolbar .b{min-height:44px}
/* On short screens, finish reading the context before showing the action dock. */
body.pph-sign-context-priority #toolbar{visibility:hidden;pointer-events:none}
body.pph-sign-context-priority .pph-feedback,
body.pph-sign-context-priority .pph-consent-manage{visibility:hidden;pointer-events:none}
.viewer{padding-bottom:calc(var(--pph-sign-actions-height,130px) + 32px)}
@media(max-width:900px){
  .toolbar{padding:10px 14px;gap:8px}
  .toolbar .acts{width:100%}
}
@media(max-width:640px){
  #bandeauSignature{padding:14px 16px;flex-direction:column;align-items:stretch;gap:12px}
  #signatureActions,#signatureActions .b{width:100%}
  .toolbar{padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px))}
  .toolbar .toast{font-size:12.5px;line-height:1.45}
  .viewer{padding-bottom:calc(var(--pph-sign-actions-height,165px) + 24px)}
}
@media(prefers-reduced-motion:reduce){.toast,.toolbar .toast{transition:none}}
