/*
 * EARONTECH — REPÈRES DE MAINTENANCE
 * Écrans : Modales de consultation des synthèses PDF : commandes, zoom et contenu.
 * Chargement : private/salon-mode.php, private/view.php.
 * Interactions : public/synthesis-pdf-viewer.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.
 */

/* Lecture des synthèses : largeur réduite de 40 % (85vw × 0,6).
   La visionneuse PDF calcule son zoom initial sur la largeur disponible. */
.synthesis-pdf-viewer {
  width:51vw;
  max-width:95vw;
  height:85vh;
  max-height:85vh;
  padding:14px;
  border:0;
  border-radius:10px;
  box-sizing:border-box;
  overflow:hidden
}

@media(max-width:767px) {
  .synthesis-pdf-viewer {
    width:95vw
  }

}

.synthesis-pdf-viewer[open] {
  display:flex;
  flex-direction:column;
  gap:8px
}

.synthesis-pdf-viewer::backdrop {
  background:#0008
}

.synthesis-pdf-viewer header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-shrink:0
}

.synthesis-pdf-viewer [data-document-preview] {
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  width:100%;
  overflow:hidden
}

.synthesis-pdf-viewer .pdf-controls {
  flex-shrink:0;
  display:flex;
  gap:8px;
  align-items:center
}

.synthesis-pdf-viewer .pdf-sheet {
  flex:1;
  min-height:0;
  max-height:none;
  overflow:auto;
  width:100%;
  box-sizing:border-box
}

.selection-page-document[open] {
  display:block;
  position:static;
  width:100%;
  max-width:none;
  height:auto;
  max-height:none;
  margin:16px 0;
  padding:16px;
  border:1px solid #d3e0eb;
  box-sizing:border-box
}

.selection-page-document .selection-document-body {
  max-height:none;
  overflow:visible
}

/* Préparation : édition et aperçu PDF indépendants sur deux colonnes. */
.selection-live-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:18px;
  align-items:start
}

.selection-live-viewer {
  position:sticky;
  top:12px;
  height:85vh;
  display:flex;
  flex-direction:column;
  min-width:0;
  background:white;
  border:1px solid #d3e0eb;
  border-radius:10px;
  padding:12px;
  box-sizing:border-box;
  margin-top:16px;
  overflow:hidden
}

.selection-live-viewer h2 {
  font-size:calc(16px * var(--app-font-scale, 1));
  margin:0 0 8px
}

.selection-live-viewer p {
  font-size:calc(12px * var(--app-font-scale, 1));
  margin:5px 0
}

.selection-live-viewer [data-document-preview] {
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  width:100%;
  overflow:hidden
}

.selection-live-viewer .pdf-controls {
  display:flex;
  gap:5px;
  align-items:center;
  flex-wrap:wrap;
  flex-shrink:0
}

.selection-live-viewer .pdf-sheet {
  flex:1;
  min-height:0;
  max-height:none;
  overflow:auto;
  width:100%;
  box-sizing:border-box
}

.selection-live-layout .selection-public-cards {
  grid-template-columns:repeat(2,minmax(0,1fr))
}

.selection-live-layout .selection-page-document>nav.tabs {
  flex-wrap:wrap;
  overflow:visible;
  white-space:normal
}

@media(max-width:1000px) {
  .selection-live-layout {
    grid-template-columns:1fr
  }

  .selection-live-viewer {
    position:relative;
    top:0
  }

}
