/* ---------------- BODY + BACKGROUND ---------------- */

body {
  margin: 0;
  padding: 40px;
  background: #0a0f24;

  /* Centrage du contenu */
  display: flex;
  justify-content: center;
  align-items: flex-start;

  min-height: 100vh;
  position: relative;

  /* Étoiles */
  background-image:
    radial-gradient(white 1px, transparent 1px),
    radial-gradient(white 1px, transparent 1px),
    radial-gradient(white 1.5px, transparent 1.5px),
    radial-gradient(white 1px, transparent 1px);
  background-size:
    150px 150px,
    200px 200px,
    250px 250px,
    300px 300px;
  background-position:
    0 0,
    50px 80px,
    120px 40px,
    200px 150px;
}

/* ---------------- SIDE TEXT ---------------- */

.side-text {
  position: fixed;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999999;

  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;

  color: #ffffff;
  opacity: 0.9;

  text-shadow:
    0 0 5px rgba(255,255,255,0.3),
    0 0 10px rgba(255,255,255,0.15);
}

/* ---------------- GALLERY 2×2 ---------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 images par ligne */
  gap: 25px;
  justify-items: center;
  max-width: 800px;
  width: 100%;
}

.gallery img {
  width: 300px;
  border-radius: 12px;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

/* Hover zoom */
.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* ---------------- ZOOM FULLSCREEN ---------------- */

#viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

#viewer.show {
  opacity: 1;
  pointer-events: all;
}

#viewerImg {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

#viewer.show #viewerImg {
  transform: scale(1);
}

#closeBtn {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 50px;
  color: white;
  cursor: pointer;
  transition: 0.2s;
}

#closeBtn:hover {
  transform: scale(1.2);
}

/* ---------------- RESPONSIVE ---------------- */

/* Écrans moyens (<1200px) */
@media (max-width: 1200px) {
  .gallery img {
    width: 250px;
  }
}

/* Tablettes et petites fenêtres (<900px) */
@media (max-width: 900px) {

  body {
    padding-top: 140px;
  }

  .gallery {
    grid-template-columns: 1fr; /* 1 image par ligne */
    max-width: 400px;
  }

  .side-text {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    text-align: center;
  }
}

/* Petits téléphones (<500px) */
@media (max-width: 500px) {
  .gallery img {
    width: 200px;
  }

  .side-text {
    font-size: 16px;
  }
}