/* Correctif global anti-débordement horizontal sur mobile. */
html,
body {
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

@supports (overflow-x:clip) {
  html,
  body {
    overflow-x:clip;
  }
}

.tool-page,
.optimizer-shell,
.content-section,
.ad-space,
.summary,
.list,
.card {
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

.tool-page *,
.tool-page *::before,
.tool-page *::after {
  box-sizing:border-box;
}

.tool-page img,
.tool-page canvas,
.tool-page svg,
.tool-page video {
  max-width:100%;
}

@media (max-width:780px) {
  .tool-page {
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  @supports (overflow-x:clip) {
    .tool-page {
      overflow-x:clip;
    }
  }
}

/* Mise en page sûre sur mobile pour l'outil PDF vers images. */
body.pdf-mobile-safe { overflow-x: clip; }
body.pdf-mobile-safe .tool-page,
body.pdf-mobile-safe .optimizer-shell,
body.pdf-mobile-safe .pdfi-options,
body.pdf-mobile-safe .pdfi-option-card,
body.pdf-mobile-safe .pdfi-card-body,
body.pdf-mobile-safe .pdfi-preview-wrap,
body.pdf-mobile-safe .toolbar-actions,
body.pdf-mobile-safe .list,
body.pdf-mobile-safe .card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
body.pdf-mobile-safe .pdfi-preview {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  box-sizing: border-box;
}
body.pdf-mobile-safe .pdfi-card-actions {
  display:flex;
  justify-content:flex-end;
  width:100%;
}
body.pdf-mobile-safe .pdfi-card-actions .download-button {
  min-width: 180px;
}
body.pdf-mobile-safe .download-progress {
  display:none;
  margin-top:8px;
  color:var(--muted);
  font-size:.82rem;
}
body.pdf-mobile-safe .download-progress.visible { display:block; }

@media (max-width: 780px) {
  body.pdf-mobile-safe .pdfi-option-card .size-options {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: none;
    width: 100%;
    min-width: 0;
  }
  body.pdf-mobile-safe .pdfi-option-card .size-chip {
    flex: 1 1 95px;
    min-width: 0;
    max-width: 100%;
  }
  body.pdf-mobile-safe .pdfi-option-card .size-chip span {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
  }
  body.pdf-mobile-safe .pdfi-card-actions .download-button {
    width:100%;
    min-width:0;
    max-width:100%;
    white-space:normal;
  }
  body.pdf-mobile-safe .toolbar-actions button {
    min-width:0;
    max-width:100%;
    white-space:normal;
  }
}
