/* Images en PDF : styles propres à l'outil. */
.o-image-pdf-depot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px; border: 2px dashed var(--bord); border-radius: var(--rayon); background: var(--surface-2); text-align: center; transition: border-color .15s, background-color .15s; }
.o-image-pdf-depot.o-image-pdf-survol { border-color: var(--marque); background: var(--surface); }
.o-image-pdf-depot p { margin: 0; }
.o-image-pdf-depot-titre { font-size: 1.15rem; font-weight: 700; }
.o-image-pdf-depot-formats { color: var(--texte-2); font-size: .88rem; line-height: 1.45; max-width: 60ch; }
.o-image-pdf-local { color: var(--ok-texte); background: var(--ok-fond); padding: 6px 12px; border-radius: var(--rayon-petit); font-size: .9rem; }
.o-image-pdf-choisir { position: relative; min-height: 46px; padding-inline: 22px; cursor: pointer; }
.o-image-pdf-choisir input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.o-image-pdf-choisir:focus-within { outline: 3px solid var(--marque-fort); outline-offset: 2px; }
.o-image-pdf-message { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--erreur-fond); color: var(--erreur-texte); }

.o-image-pdf-bloc { margin: 18px 0; }
.o-image-pdf-bloc h2 { margin: 6px 0 10px; font-size: 1.2rem; }
.o-image-pdf-compte { color: var(--texte-2); font-weight: 400; font-size: 1rem; }
.o-image-pdf-astuce { margin: 0 0 10px; color: var(--texte-2); font-size: .88rem; }
.o-image-pdf-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; align-items: end; }
.o-image-pdf-pages li { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface); min-width: 0; }
.o-image-pdf-pages li.o-image-pdf-tenue { border-color: var(--marque); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.o-image-pdf-pages li.o-image-pdf-ko { border-color: var(--erreur-texte); }
/* aperçu de la feuille : volontairement blanche, comme le papier */
.o-image-pdf-feuille { position: relative; width: 100%; margin: 0 auto; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 2px 6px rgba(0, 0, 0, .12); overflow: hidden; aspect-ratio: 1 / 1.414; }
.o-image-pdf-boite { position: absolute; inset: 0; overflow: hidden; }
.o-image-pdf-boite img { position: absolute; left: 50%; top: 50%; max-width: none; transform: translate(-50%, -50%); user-select: none; -webkit-user-drag: none; }
.o-image-pdf-legende { margin: 0; font-size: .82rem; line-height: 1.3; display: flex; gap: 4px; min-width: 0; }
.o-image-pdf-num { font-weight: 700; white-space: nowrap; }
.o-image-pdf-nom { color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-image-pdf-erreur { margin: 0; font-size: .8rem; color: var(--erreur-texte); }
.o-image-pdf-outils { display: flex; gap: 6px; }
.o-image-pdf-outils .btn { flex: 1 1 0; min-height: 40px; min-width: 40px; padding: 0; font-size: 1.15rem; line-height: 1; }
.o-image-pdf-poignee { cursor: grab; touch-action: none; }
.o-image-pdf-tenue .o-image-pdf-poignee { cursor: grabbing; }

.o-image-pdf .reglages select, .o-image-pdf .reglages input[type="text"] { min-height: 44px; }
.o-image-pdf .reglages select:disabled { opacity: .5; }
.o-image-pdf-note { margin-top: 10px; }
.o-image-pdf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.o-image-pdf-resume { display: block; margin-top: 10px; font-weight: 600; }
.o-image-pdf-resume:empty { display: none; }
.o-image-pdf-lien { margin: 10px 0 0; }
.o-image-pdf-lien .btn { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .o-image-pdf-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .o-image-pdf-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .o-image-pdf-depot { transition: none; } }
