/* 🌳 Fond flouté */
.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.6);
  z-index: -1;
}

/* 🔝 Barre supérieure */
.top-bar {
  display: flex;
  justify-content: center; /* titre centré */
  align-items: center;
  position: relative;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.partition-title {
  margin: 0;
  font-size: 1.4rem;
  text-align: center;
  flex: 1;
}

.btn-retour {
  position: absolute;
  right: 20px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.btn-retour:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 📄 Visionneuse */
.viewer-wrap {
  width: 100%;
  height: calc(100vh - 70px); /* occupe tout l’espace sous la barre */
  display: flex;
  justify-content: center;    /* centre horizontalement */
  /* align-items: center; ← retiré pour ne pas bloquer le scroll */
  padding: 10px;
  overflow-y: auto;           /* autorise le défilement vertical */
  -webkit-overflow-scrolling: touch; /* scroll fluide sur iPad/iOS */
}

.iframe-viewer {
  width: 90%;                 /* centré avec marges */
  max-width: 1200px;          /* limite sur grands écrans */
  height: 100%;               /* occupe toute la hauteur disponible */
  border: none;
  background: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

/* 🛑 Fallback customizer */
.viewer-disabled {
  background: rgba(0, 0, 0, 0.5);
  padding: 40px;
  font-size: 1.2rem;
  color: #fff;
  text-align: center;
}

@media screen and (max-width: 600px) {
  .top-bar {
    flex-direction: column;       /* empile les éléments */
    align-items: center;          /* centre horizontalement */
    padding: 10px 15px;
  }

  .btn-retour {
    position: static;             /* enlève le positionnement absolu */
    order: -1;                    /* place le bouton AVANT le titre */
    margin-bottom: 10px;
    align-self: flex-start;       /* bouton aligné à gauche */
    background: rgba(255,255,255,0.2);
  }

  .partition-title {
    font-size: 1.2rem;
    text-align: center;
    order: 0;                     /* titre après le bouton */
  }
}