/* Signature électronique partagée (BIMTRAZA) */
.bimtraza-esign-modal {
  position: fixed;
  inset: 0;
  /* Au-dessus de l'éditeur GF (22050), ISO, WPS, etc. */
  z-index: 24000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  box-sizing: border-box;
}
.bimtraza-esign-modal.hidden {
  display: none !important;
}
.bimtraza-esign-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}
.bimtraza-esign-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 24px));
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.bimtraza-esign-head {
  padding: 14px 16px 8px;
  border-bottom: 1px solid #e2e8f0;
}
.bimtraza-esign-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}
.bimtraza-esign-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
.bimtraza-esign-canvas-wrap {
  margin: 12px 16px;
  height: min(42vh, 280px);
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #f8fafc 0%, #fff 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 23px,
      rgba(148, 163, 184, 0.18) 24px
    );
  touch-action: none;
  overflow: hidden;
}
.bimtraza-esign-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.bimtraza-esign-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 16px 14px;
  border-top: 1px solid #e2e8f0;
}
.bimtraza-esign-slot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 6px;
}
.bimtraza-esign-preview {
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.bimtraza-esign-preview.hidden {
  display: none;
}
.bimtraza-esign-preview-img,
img.bimtraza-esign-preview-img {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}
.bimtraza-esign-open {
  align-self: flex-start;
}
.gf-sign-esign-btn,
button.gf-sign-esign-btn {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
}
.gf-sign-esign-btn:hover,
button.gf-sign-esign-btn:hover {
  background: #fecaca !important;
}
.gf-sign-esign-btn.is-signed,
button.gf-sign-esign-btn.is-signed {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #86efac !important;
}
.gf-sign-esign-btn.is-signed:hover,
button.gf-sign-esign-btn.is-signed:hover {
  background: #bbf7d0 !important;
}
.gf-sign-line--esign,
.traza-iso-signature-line--esign,
.iso9001-form-signature-esign {
  margin-top: 8px;
}
.wps-pp-sign-cell--esign {
  cursor: pointer;
  min-height: 36px;
  vertical-align: middle !important;
}
.wps-pp-sign-cell--esign img {
  max-height: 34px;
  max-width: 100%;
  object-fit: contain;
}
.wps-pp-sign-cell--esign:hover {
  outline: 1px dashed #64748b;
}
