/* Style pour la galerie responsive */
/* Styles de base pour mobile d'abord */
html {
  font-size: 16px;
}

body {
  overflow-x: hidden;
}

/* Conteneur principal */
.press-book-container {
  padding: 1.25rem; /* 20px */
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Titre principal */
.press-book-container h1 {
  text-align: center;
  color: #fff;
  margin: 0 0 1.25rem; /* 20px */
  font-size: 1.75rem; /* 28px */
  line-height: 1.2;
}

/* Conteneur de la galerie */
.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* 24px */
  align-items: center;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

/* Éléments de la galerie */
.gallery-item {
  width: 100%;
  max-width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
  border-radius: 0.5rem; /* 8px */
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

/* Images de la galerie */
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  margin: 0;
  padding: 0;
}

/* Numéro de page */
.page-number {
  position: absolute;
  bottom: 0.75rem; /* 12px */
  right: 0.75rem; /* 12px */
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.375rem 0.75rem; /* 6px 12px */
  border-radius: 1rem; /* 16px */
  font-size: 0.875rem; /* 14px */
  font-weight: 600;
  z-index: 2;
}

/* Effets au survol (uniquement sur desktop) */
@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
  }
}

/* Tablettes (à partir de 600px) */
@media (min-width: 37.5rem) { /* 600px */
  .press-book-container {
    padding: 1.5rem; /* 24px */
  }
  
  .press-book-container h1 {
    font-size: 2rem; /* 32px */
    margin-bottom: 1.5rem; /* 24px */
  }
  
  .gallery-container {
    gap: 1.75rem; /* 28px */
  }
  
  .gallery-item {
    border-radius: 0.625rem; /* 10px */
    max-width: 90%;
  }
}

/* Desktop (à partir de 1024px) */
@media (min-width: 64rem) { /* 1024px */
  .press-book-container {
    max-width: 75rem; /* 1200px */
    padding: 2rem; /* 32px */
  }
  
  .press-book-container h1 {
    font-size: 2.5rem; /* 40px */
    margin-bottom: 2rem; /* 32px */
  }
  
  .gallery-container {
    gap: 2rem; /* 32px */
  }
  
  .gallery-item {
    max-width: 56.25rem; /* 900px */
    border-radius: 0.75rem; /* 12px */
  }
  
  .page-number {
    font-size: 1rem; /* 16px */
    padding: 0.5rem 1rem; /* 8px 16px */
  }
}

/* Grands écrans (à partir de 1440px) */
@media (min-width: 90rem) { /* 1440px */
  html {
    font-size: 18px;
  }
}

/* Très grands écrans (à partir de 1920px) */
@media (min-width: 120rem) { /* 1920px */
  html {
    font-size: 20px;
  }
}

/* Correction pour les appareils mobiles en mode paysage */
@media (max-height: 480px) and (orientation: landscape) {
  .gallery-item {
    max-width: 80%;
    margin: 0 auto;
  }
}

/* Optimisation pour les appareils tactiles */
@media (pointer: coarse) {
  .gallery-item {
    -webkit-tap-highlight-color: transparent;
  }
  
  .gallery-item:active {
    transform: scale(0.98);
  }
}
.press-book-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.press-book-container h1 {
  text-align: center;
  color: #fff;
  margin-bottom: 30px;
  font-size: 2.5em;
}

.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
}

.gallery-item {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  -webkit-transform: translateY(-5px);
  -ms-transform: translateY(-5px);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.gallery-item {
  position: relative;
  margin-bottom: 30px;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-number {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.9em;
  font-weight: bold;
}

/* Styles pour la version desktop (visible par défaut) */
.desktop-version {
  display: block;
}

/* Styles pour la version mobile (masquée par défaut) */
.mobile-version {
  display: none;
}

/* Styles pour la galerie mobile */
.press-book-mobile {
  padding: 1rem;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.press-book-mobile h1 {
  text-align: center;
  color: #fff;
  margin: 0 0 1rem;
  font-size: 1.75rem;
}

.welcome-text {
  text-align: center;
  color: #fff;
  margin: 0 auto 1.5rem;
  max-width: 800px;
  font-size: 1.1rem;
  line-height: 1.5;
  padding: 0 1rem;
}

.mobile-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
}

.mobile-gallery-item {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.mobile-page-number {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Styles pour la lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Défilement fluide sur iOS */
}

.lightbox-content {
  width: 100%;
  max-width: 100%;
  padding: 60px 0;
}

.lightbox-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

.lightbox-image-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
}

.lightbox-page-number {
  display: block;
  color: #fff;
  margin-top: 10px;
  font-size: 1.1em;
  text-align: center;
}

.close-lightbox {
  position: fixed;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 5px;
  box-sizing: border-box;
}

/* Style pour les images cliquables */
.mobile-gallery-item {
  cursor: pointer;
  transition: transform 0.2s;
}

.mobile-gallery-item:active {
  transform: scale(0.98);
}

/* Media query pour les écrans mobiles (max-width: 768px) */
@media (max-width: 768px) {
  .desktop-version {
    display: none;
  }
  
  .mobile-version {
    display: block;
  }
}

/* Style général */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 18px;
  font-family: Arial, sans-serif;
  background-color: #000000;
  color: #ffffff;
  min-height: 100vh;
  text-align: center;
}

.title {
  font-size: 35px;
  padding: 20px;
  margin: 0;
}

.press-book {
  display: block;
  font-size: 20px;
  margin: 1em auto;
  font-weight: bold;
  max-width: 800px;
  padding: 0 20px;
}

/* Conteneur et iframe pour le PDF */
/* Ancien conteneur PDF - masqué */
#pdf-container {
  display: none;
}

#pdf-frame, #pdf-viewer {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: none;
  background: #fff;
  display: block;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch; /* Défilement fluide sur iOS */
  overflow: auto; /* Permet le défilement sur iOS */
}

/* Correction spécifique pour Safari iOS */
@supports (-webkit-touch-callout: none) {
  #pdf-container {
    height: -webkit-fill-available;
    min-height: -webkit-fill-available;
  }
  
  #pdf-frame, #pdf-viewer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
  }
}

/* Lien de secours */
#pdf-fallback-link {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  display: none;
}

#pdf-fallback-link a {
  color: #ffd700;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #ffd700;
  border-radius: 4px;
  transition: all 0.3s ease;
}

#pdf-fallback-link a:hover {
  background: rgba(255, 215, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
  #pdf-container {
    max-width: 95%;
    height: 65vh;
  }
}

@media (max-width: 900px) {
  .title {
    font-size: 24px;
    padding: 15px 10px;
  }
  
  .press-book {
    font-size: 18px;
    padding: 0 15px;
  }
  
  #pdf-container {
    height: 60vh;
    min-height: 350px;
  }
}

@media (max-width: 768px) {
  .title {
    font-size: 22px;
  }
  
  #pdf-container {
    height: 55vh;
    min-height: 300px;
    padding: 10px 5px;
    border-radius: 0;
  }
  
  #pdf-fallback-link {
    width: 90%;
    padding: 15px 10px;
  }
  
  #pdf-fallback-link a {
    padding: 8px 15px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .title {
    font-size: 20px;
    padding: 10px 5px;
  }
  
  .press-book {
    font-size: 16px;
    padding: 0 10px;
  }
  
  #pdf-container {
    height: 50vh;
    min-height: 250px;
    padding: 5px 0;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 18px;
  }
  
  .press-book {
    font-size: 14px;
  }
  
  #pdf-container {
    height: 45vh;
    min-height: 200px;
    padding: 0;
  }
  
  .press-book-mobile h1 {
    font-size: 35px;
  }
}

/* Responsive menu hamburger déjà présent, inchangé */
@media (max-width: 768px) {
  header {
    position: relative;
    z-index: 1000;
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 1001;
  }
  .hamburger span {
    height: 4px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
  }
  nav ul {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    z-index: 999;
  }
  nav ul.show {
    display: flex;
  }
  nav ul li {
    margin: 20px 0;
  }
  nav ul li a {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
  }
}

/* Conteneur et iframe pour le PDF */
#pdf-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
  min-height: 320px;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  margin-top: 10px;
  overflow: auto;
}

#pdf-frame, #pdf-viewer {
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-width: 1200px;
  max-height: 1000px;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  display: block;
}

@media (max-width: 900px) {
  #pdf-viewer {
    max-width: 100vw;
    max-height: 80vh;
    min-height: 200px;
  }
}
@media (max-width: 600px) {
  #pdf-viewer {
    max-width: 100vw;
    max-height: 60vh;
    min-height: 120px;
  }
}
