/* Advanced tools share Folio's existing document, history and engines. */
.folio-suite {
  border: 1px solid var(--pesev-line, #e6ebf4);
  border-radius: 16px;
  background: var(--pesev-surface, #fff);
  margin: 0 0 18px;
  overflow: hidden;
  color: var(--pesev-ink, #142542);
}
.suite-categories {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px;
  border-bottom: 1px solid var(--pesev-line, #e6ebf4);
}
.folio-suite button,
.suite-pane input,
.suite-pane select,
.suite-pane textarea,
#suitePasswordForm input,
#suiteFormsForm input,
#suiteFormsForm select {
  font: inherit;
  font-size: 13px;
  box-sizing: border-box;
  border: 1px solid var(--pesev-line, #dbe4f2);
  border-radius: 9px;
  background: var(--pesev-surface, #fff);
  color: var(--pesev-ink, #172741);
  min-height: 44px;
  padding: 8px 11px;
  max-width: 100%;
}
.folio-suite button {
  font-weight: 650;
}
.folio-suite button:disabled {
  opacity: 0.5;
}
.folio-suite button[aria-pressed="true"] {
  background: var(--pesev-soft, #eef3ff);
  color: var(--pesev-link, #345ae8);
  border-color: var(--pesev-link, #345ae8);
}
.folio-suite :focus-visible,
#suitePasswordForm :focus-visible,
#suiteFormsForm :focus-visible {
  outline: 3px solid var(--pesev-link, #345ae8);
  outline-offset: 2px;
}
.suite-pane {
  padding: 14px;
}
.suite-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
}
.suite-row label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  flex: 1 1 140px;
  min-width: 0;
  max-width: 280px;
}
.suite-row input {
  width: 100%;
}
.suite-row input[type="number"] {
  max-width: 140px;
}
.suite-row .suite-check {
  flex-direction: row;
  align-items: center;
  min-height: 44px;
}
.suite-check input {
  width: 20px;
  min-height: 20px;
  flex: none;
}
.suite-help {
  font-size: 12px;
  line-height: 1.65;
  color: var(--pesev-muted, #64738e);
  margin: 6px 0 0;
}
.suite-output-label {
  display: block;
  font-size: 12px;
}
.suite-output-label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  resize: vertical;
  line-height: 1.5;
}
.suite-operation {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--pesev-line, #e6ebf4);
  font-size: 13px;
}
.suite-operation progress {
  max-width: 100%;
  flex: 1;
}
#suiteSearchStatus {
  font-size: 12px;
  align-self: center;
}
#suiteFormFields {
  max-height: 50vh;
  overflow: auto;
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
#suiteFormFields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
}
#suiteFormFields label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}
#suiteFormsModal .utility-dialog,
#suitePasswordModal .utility-dialog {
  background: var(--pesev-surface, #fff);
  color: var(--pesev-ink, #142542);
  max-height: 90vh;
  overflow: auto;
}
#suitePasswordMessage {
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
.folio-text-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  line-height: 1;
  text-align: initial;
  overflow: hidden;
  opacity: 1;
  transform-origin: 0 0;
  user-select: text;
}
.folio-text-layer :is(span, br) {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0 0;
}
.folio-text-layer span::selection {
  background: #4784ff66;
  color: transparent;
}
.folio-text-layer .search-match {
  background: #ffe58a99;
  color: transparent;
}
.folio-text-layer .search-current {
  background: #ffa833aa;
}
.annotation-layer[data-drawing] {
  pointer-events: auto;
  touch-action: none;
  cursor: crosshair;
}
.pdf-mark .mark-content svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.pdf-mark .note-mark {
  background: #fff4b8;
  color: #172b4b;
  border: 1px solid #ceb850;
  white-space: pre-wrap;
  font:
    14px/1.3 Arial,
    sans-serif;
  padding: 5px;
}
.suite-draft {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.suite-compare-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.suite-compare-images canvas {
  max-width: 100%;
  height: auto;
}
@media (max-width: 650px) {
  .suite-pane {
    padding: 10px;
  }
  .suite-row {
    align-items: stretch;
  }
  .suite-row label {
    max-width: none;
    flex-basis: 100%;
  }
  .suite-row button {
    flex: 1 1 120px;
  }
  .suite-categories button {
    flex: 1 1 28%;
    font-size: 12px;
  }
  .suite-operation {
    padding: 10px;
  }
  .folio-suite {
    border-radius: 12px;
  }
}
@media print {
  .folio-suite {
    display: none;
  }
}
.folio-decorations {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  color: #4d5766;
  font-family: Arial, sans-serif;
  line-height: 1.2;
}
.folio-decorations span {
  position: absolute;
  white-space: nowrap;
}
.folio-decorations .watermark {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  opacity: 0.2;
}
.folio-decorations .header {
  left: 4%;
  top: 3%;
  font-size: 10px;
}
.folio-decorations .footer {
  left: 4%;
  bottom: 2%;
  font-size: 10px;
}
.folio-decorations .page-number {
  right: 4%;
  bottom: 2%;
  font-size: 10px;
}
.pdf-mark:is(
  [data-mark-kind="line"],
  [data-mark-kind="arrow"],
  [data-mark-kind="underline"],
  [data-mark-kind="strike"],
  [data-mark-kind="freehand"]
) {
  min-width: 2px;
  min-height: 2px;
}
.annotation-layer[data-drawing] .pdf-mark {
  pointer-events: none;
}
.suite-security-warning {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--pesev-line, #dbe4f2);
  background: var(--pesev-soft, #fff4d6);
  color: var(--pesev-ink, #172741);
  font-size: 12px;
  line-height: 1.6;
}

/* Cibles tactiles de 44 px et champs à 16 px (évite le zoom iOS) sur écran tactile et mobile */
@media (pointer: coarse), (max-width: 650px) {
  .top-actions .btn-primary, .export-name-wrapper,
  .btn, .square-btn, .mini-btn, .clear-workspace-btn,
  .zoom-controls button, .move-row button, .history-buttons button, .thumb-toolbar button {
    min-height: 44px;
  }
  .square-btn, .zoom-controls button, .btn-soft {
    min-width: 44px;
  }
  .suite-pane input, .suite-pane select, .suite-pane textarea,
  #suitePasswordForm input, #suiteFormsForm input, #suiteFormsForm select,
  .dialog-options select, .dialog-options input,
  .export-name-wrapper input {
    font-size: 16px;
    min-height: 44px;
  }
}
