/* ============================= */
/* RESET / STYLE DE BASE */
/* ============================= */
body {
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  color: white;
  text-align: center;
  background: black;
  overflow: auto;
  box-sizing: border-box;
}

/* ============================= */
/* TITRE FIXE EN HAUT DE PAGE */
/* ============================= */
header {
  position: sticky;
  top: 0;
  background: black;
  z-index: 100;
  padding: 20px 0;
}

header h1 {
  color: #1e90ff;
  font-size: 3em;
  margin: 0;
  text-shadow: 0 0 5px #1e90ff, 0 0 10px #1e90ff, 0 0 20px #1e90ff;
  animation: glow 2s ease-in-out infinite, floatTitle 3s ease-in-out infinite;
}

header p {
  margin: 0;
  padding: 0 10px;
  font-size: 1.2em;
  color: #add8e6;
}

/* ============================= */
/* SWITCH LANGUE (NOUVEAU) */
/* ============================= */
.lang-switch {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 22px;
  cursor: pointer;
}

.lang-switch span {
  margin-left: 8px;
  transition: transform 0.2s ease, text-shadow 0.3s ease;
}

.lang-switch span:hover {
  transform: scale(1.2);
  text-shadow: 0 0 8px #1e90ff, 0 0 15px #00ffff;
}

/* ============================= */
/* ANIMATIONS TITRE */
/* ============================= */
@keyframes glow {
  0%,100% { text-shadow:0 0 5px #1e90ff,0 0 10px #1e90ff,0 0 20px #1e90ff; }
  50% { text-shadow:0 0 20px #1e90ff,0 0 40px #1e90ff,0 0 60px #1e90ff; }
}

@keyframes floatTitle {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============================= */
/* FOND ÉTOILES COSMOS */
/* ============================= */
.stars {
  position: fixed;
  top:0; left:0;
  width:100%;
  height:100%;
  z-index: -1;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  animation: starTwinkle linear infinite alternate;
}

@keyframes starTwinkle {
  0% { opacity: 0.3; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.3; transform: scale(0.5); }
}

/* ============================= */
/* GALERIE VIGNETTES */
/* ============================= */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.photo {
  width: 400px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  border: 2px solid #1e90ff;
  box-shadow: 0 0 5px #1e90ff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.photo img:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 0 0 20px #1e90ff, 0 0 40px #00ffff;
}

.photo figcaption {
  margin-top: 5px;
  padding: 8px;
  font-size: 14px;
  color: #add8e6;
  text-align: left;
  background: rgba(0,0,50,0.6);
  border-radius: 8px;
  box-shadow: 0 0 10px #1e90ff;
  text-shadow: 0 0 3px #1e90ff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo:hover figcaption {
  transform: scale(1.05);
  box-shadow: 0 0 20px #1e90ff, 0 0 40px #00ffff;
}

.photo figcaption a {
  color: #00ffff;
  text-decoration: underline;
  text-shadow: 0 0 5px #00ffff;
}

.photo figcaption a:hover {
  text-shadow: 0 0 15px #00ffff, 0 0 25px #00ffff;
}

/* ============================= */
/* LIGHTBOX PREMIUM */
/* ============================= */
#lightbox-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top:0; left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  cursor: pointer;
  visibility: hidden;
  padding: 20px;
  box-sizing: border-box;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#lightbox-overlay img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 10px;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

#lightbox-overlay img.show {
  opacity: 1;
  transform: scale(1);
}

/* Flèches navigation */
.lb-arrows {
  position: absolute;
  top: 10px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 2em;
  color: #1e90ff;
  pointer-events: none;
}

.lb-arrows span {
  pointer-events: auto;
  cursor: pointer;
}

/* ============================= */
/* INFO LIGHTBOX */
/* ============================= */
.lightbox-info {
  text-align: left;
  max-width: 300px;
  background: rgba(0,0,50,0.6);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px #1e90ff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lightbox-info:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #1e90ff, 0 0 40px #00ffff;
}

.lightbox-info h2 {
  color: #1e90ff;
  text-shadow: 0 0 5px #1e90ff, 0 0 10px #1e90ff, 0 0 20px #1e90ff;
  animation: glow 2s ease-in-out infinite;
  margin-top: 0;
}

.lightbox-info p {
  color: #add8e6;
  text-shadow: 0 0 2px #1e90ff;
}

.lightbox-info a {
  color: #00ffff;
  text-decoration: underline;
  text-shadow: 0 0 5px #00ffff,0 0 10px #00ffff;
  transition: text-shadow 0.3s;
}

.lightbox-info a:hover {
  text-shadow: 0 0 10px #00ffff,0 0 20px #00ffff,0 0 30px #00ffff;
}

/* ============================= */
/* BARRE DE SATISFACTION */
/* ============================= */
.rating-bar {
  display: flex;
  height: 15px;
  width: 100%;
  margin-top: 5px;
  border-radius: 5px;
  overflow: hidden;
}

.rating-segment {
  flex: 1;
  margin-right: 1px;
}

.rating-segment:last-child {
  margin-right: 0;
}

/* ============================= */
/* COMPTEUR OPTISTATS */
/* ============================= */
#visitor-counter-container {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  background: rgba(0,0,0,0.5);
  padding: 5px 8px;
  border-radius: 5px;
}

#visitor-counter-container img {
  height: 25px;
}

/* ============================= */
/* LIGHTBOX MOBILE */
/* ============================= */
@media (max-width: 768px) {
  #lightbox-overlay {
    padding: 10px;
    align-items: flex-start;
  }

  #lightbox-overlay > div {
    flex-direction: column;
    gap: 20px;
    max-height: 100%;
    overflow-y: auto;
  }

  .lightbox-info {
    max-width: 100%;
    width: 100%;
  }

  #lightbox-overlay img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
  }
}