/*
 * EARONTECH — REPÈRES DE MAINTENANCE
 * Écrans : Visionneuses communes : miniatures PDF, navigation et aperçu des images.
 * Chargement : private/salon-mode.php, private/view.php.
 * Interactions : public/pdf-thumbnails.js.
 * Les couleurs et tailles paramétrables utilisent les variables --app-* / --product-*.
 * Les blocs @media adaptent la même interface à la largeur de l’écran.
 * Conserver l’ordre des règles : les ajustements spécialisés suivent le socle commun.
 */

/* Toutes les visionneuses : miniatures à gauche, page lisible à droite.
   Chaque colonne défile indépendamment ; le zoom utilise la largeur de droite. */
.pdf-page-layout {
  display:grid;
  grid-template-columns:116px minmax(0,1fr);
  gap:10px;
  flex:1;
  min-height:0;
  height:65vh;
  max-height:750px;
  overflow:hidden;
  width:100%
}

.pdf-thumbnails {
  position:relative;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
  min-height:0;
  padding:6px;
  background:#edf1f5;
  border-radius:6px;
  overscroll-behavior:contain
}

.pdf-thumbnails .pdf-thumbnail {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  gap:5px;
  width:100%;
  min-height:100px;
  margin:0;
  padding:5px;
  border:2px solid transparent;
  border-radius:5px;
  background:#fff;
  color:#263746;
  font:inherit;
  cursor:pointer
}

.pdf-thumbnails .pdf-thumbnail[aria-current=page] {
  border-color:var(--app-primary-color, #1c75bc);
  background:var(--app-primary-soft, #edf5fb);
  color:var(--app-primary-color, #1c75bc)
}

.pdf-thumbnails .pdf-thumbnail:focus-visible {
  outline:2px solid var(--app-primary-color, #1c75bc);
  outline-offset:1px
}

.pdf-thumbnails .pdf-thumbnail canvas {
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  box-shadow:0 1px 3px #0002
}

.pdf-thumbnails .pdf-thumbnail span {
  font-size:calc(11px * var(--app-font-scale, 1));
  line-height:1.3
}

.pdf-page-layout>.pdf-sheet,.pdf-page-layout>.share-sheet {
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  max-height:none;
  box-sizing:border-box;
  overflow:auto
}

.synthesis-pdf-viewer .pdf-page-layout,.selection-live-viewer .pdf-page-layout {
  height:auto;
  max-height:none
}

/* Images : même barre de zoom, avec une surface de défilement indépendante. */
.technology-editor .document-image-sheet {
  height:65vh;
  max-height:750px;
  min-height:0;
  box-sizing:border-box;
  overflow:auto;
  padding:10px
}

.technology-editor [data-document-preview] .document-image-sheet img {
  display:block;
  max-width:none;
  max-height:none;
  flex:none;
  margin:0 auto;
  object-fit:contain
}

.technology-editor[data-preview-fit=height] .document-image-sheet {
  height:0;
  flex:1;
  max-height:none
}

@media(max-width:600px) {
  .pdf-page-layout {
    grid-template-columns:76px minmax(0,1fr);
    gap:6px
  }

  .pdf-thumbnails {
    padding:3px
  }

  .pdf-thumbnails .pdf-thumbnail {
    padding:3px;
    min-height:75px
  }

}

/* Fond neutre pour les PDF et les images, y compris les zones transparentes. */
body .pdf-sheet,body .share-sheet,body .pdf-page-layout,body .pdf-thumbnails, body .technology-editor [data-document-preview] {
  background:#fff!important
}
