* {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}

body {
   font-family: Arial, Helvetica, sans-serif;
   background: radial-gradient(circle at top, #183b70, #050b18 70%);
   color: white;
   min-height: 100vh;
}

/* ============================= */
/* TITRE */
/* ============================= */
.galerie {
   width: 95%;
   max-width: 1200px;
   margin: auto;
   padding: 50px 20px;
}

h1 {
   text-align: center;
   font-size: 45px;
   margin-bottom: 10px;
   color: #ffffff;
   text-shadow: 0 0 10px #4da6ff, 0 0 20px #0066ff;
}

.description {
   text-align: center;
   color: #b9d8ff;
   margin-bottom: 35px;
   font-size: 18px;
}

/* ============================= */
/* DIAPOSITIVE */
/* ============================= */
.diapositive {
   position: relative;
   width: 100%;
   max-width: 1000px;
   height: 560px;
   margin: auto;
   overflow: hidden;
   border-radius: 20px;
   background: #000;
   box-shadow: 0 0 30px rgba(0, 140, 255, 0.5);
}

.diapositive img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
   transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ============================= */
/* BOUTONS */
/* ============================= */
.bouton {
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   width: 60px;
   height: 60px;
   border: none;
   border-radius: 50%;
   background: rgba(0, 0, 0, 0.65);
   color: white;
   font-size: 30px;
   cursor: pointer;
   z-index: 5;
   transition: 0.3s;
}

.bouton:hover {
   background: #007bff;
   transform: translateY(-50%) scale(1.15);
}

.precedent {
   left: 20px;
}

.suivant {
   right: 20px;
}

/* ============================= */
/* COMPTEUR */
/* ============================= */
.compteur {
   position: absolute;
   top: 20px;
   right: 20px;
   background: rgba(0, 0, 0, 0.7);
   padding: 10px 18px;
   border-radius: 20px;
   font-weight: bold;
}

/* ============================= */
/* LEGENDE */
/* ============================= */
.legende {
   position: absolute;
   bottom: 0;
   left: 0;
   width: 100%;
   padding: 20px;
   text-align: center;
   font-size: 20px;
   font-weight: bold;
   background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

/* ============================= */
/* MINIATURES */
/* ============================= */
.miniatures {
   display: flex;
   justify-content: center;
   gap: 10px;
   flex-wrap: wrap;
   margin-top: 20px;
}

.miniature {
   width: 110px;
   height: 75px;
   object-fit: cover;
   border-radius: 8px;
   cursor: pointer;
   opacity: 0.5;
   border: 3px solid transparent;
   transition: 0.3s;
}

.miniature:hover {
   opacity: 1;
   transform: scale(1.05);
}

.miniature.active {
   opacity: 1;
   border-color: #00aaff;
   box-shadow: 0 0 15px #008cff;
}

/* ============================= */
/* PLEIN ECRAN */
/* ============================= */
.plein-ecran {
   display: none;
   position: fixed;
   z-index: 9999;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.97);
   justify-content: center;
   align-items: center;
}

.plein-ecran.active {
   display: flex;
}

#imagePleinEcran {
   max-width: 90%;
   max-height: 90%;
   object-fit: contain;
   border-radius: 10px;
   box-shadow: 0 0 40px rgba(0, 150, 255, 0.4);
}

/* ============================= */
/* FERMER */
/* ============================= */
.fermer {
   position: absolute;
   top: 20px;
   right: 30px;
   background: none;
   border: none;
   color: white;
   font-size: 55px;
   cursor: pointer;
   z-index: 10000;
}

.fermer:hover {
   color: #00aaff;
}

/* ============================= */
/* NAVIGATION PLEIN ECRAN */
/* ============================= */
.plein-precedent,
.plein-suivant {
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   width: 65px;
   height: 65px;
   border: none;
   border-radius: 50%;
   background: rgba(20, 20, 20, 0.8);
   color: white;
   font-size: 30px;
   cursor: pointer;
   z-index: 10000;
}

.plein-precedent {
   left: 30px;
}

.plein-suivant {
   right: 30px;
}

.plein-precedent:hover,
.plein-suivant:hover {
   background: #007bff;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */
@media (max-width: 768px) {
   h1 {
      font-size: 32px;
   }

   .diapositive {
      height: 400px;
   }

   .miniature {
      width: 80px;
      height: 55px;
   }

   .bouton {
      width: 45px;
      height: 45px;
      font-size: 22px;
   }

   .plein-precedent,
   .plein-suivant {
      width: 45px;
      height: 45px;
      font-size: 22px;
   }
}

@media (max-width: 480px) {
   .galerie {
      padding: 30px 10px;
   }

   h1 {
      font-size: 27px;
   }

   .diapositive {
      height: 300px;
   }

   .description {
      font-size: 15px;
   }

   .miniature {
      width: 65px;
      height: 45px;
   }
}