/* 🌄 Base - Mise en page générale */
body {
  background-image: url("../images/background2.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: "Georgia", serif;
  color: #fcca9b;
  text-align: center;
  font-size: 1.5rem;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* 🧱 Contenu principal */
.contenu-principal {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 🖼️ Logo centré avec animation */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  animation: slideIn 1s ease-out;
  max-width: 100%;
}

.logo {
  max-width: 90%;
  width: 1100px; /* taille originale */
  height: auto;
  transition: transform 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.texte-bandeau-haut p {
  padding: 0 2rem; /* espace à gauche et droite */
  margin-top: 1rem;  /* espace en haut, sous le logo */
  text-align: center; /* texte centré */
}

/* 📜 Texte centré sous logo ou onglets */
.texte-centre {
  text-align: center;
  color: #fcca9b;
  margin: 1rem 0;
  font-size: 1.5rem;
  animation: fadeInText 1s ease-out;
}

@keyframes fadeInText {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 🧭 Onglets avec animation */
.onglets-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.onglet {
  width: 200px;
  height: 200px;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s ease-out forwards;
  transition: transform 0.3s ease;
}

.onglet:hover {
  transform: translateY(0) scale(1.05);
}

.onglet:nth-child(1) { animation-delay: 0.5s; }
.onglet:nth-child(2) { animation-delay: 1s; }
.onglet:nth-child(3) { animation-delay: 1.5s; }

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.onglet-img-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.onglet-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.img-front { opacity: 1; z-index: 2; }
.img-back { opacity: 0; z-index: 1; }

.onglet:hover .img-front { opacity: 0; }
.onglet:hover .img-back { opacity: 1; }

/* 🖼️ Mosaïque de créations avec animation comme onglets */
.grille-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
}

.tuile {
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s ease-out forwards; /* même animation que les onglets */
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.tuile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.tuile img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* animation progressive pour chaque tuile */
.tuile:nth-child(1) { animation-delay: 0.2s; }
.tuile:nth-child(2) { animation-delay: 0.4s; }
.tuile:nth-child(3) { animation-delay: 0.6s; }
.tuile:nth-child(4) { animation-delay: 0.8s; }
.tuile:nth-child(5) { animation-delay: 1s; }
.tuile:nth-child(6) { animation-delay: 1.2s; }
.tuile:nth-child(7) { animation-delay: 1.4s; }
.tuile:nth-child(8) { animation-delay: 1.6s; }
.tuile:nth-child(9) { animation-delay: 1.8s; }
.tuile:nth-child(10) { animation-delay: 2s; }
.tuile:nth-child(11) { animation-delay: 2.2s; }
.tuile:nth-child(12) { animation-delay: 2.4s; }

/* 🔍 Modale image */
/* 🔍 Modale plein écran */
#image-modal {
  display: none;                /* cachée par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8); /* assombrissement */
  justify-content: center;
  align-items: center;
  z-index: 999;
  flex-direction: column;
}

#image-modal.active {
  display: flex;                /* visible quand active */
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;          /* garde les proportions */
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 1000;
}

/* 📞 Bandeau bas avec bouton retour */
.bandeau-bas {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;   /* centre tout le texte */
  background-color: #fcca9b;
  color: #682c00;
  font-size: 1.5rem;
  box-shadow: 0 8px 12px rgba(104, 44, 0, 0.3);
  padding: 0rem;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1000;
}

.bandeau-bas a.btn-retour {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 1rem ;
  background-color: #682c00;
  color: #fcca9b;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.bandeau-bas a.btn-retour:hover {
  background-color: #a04500;
  transform: scale(1.05);
}

.bandeau-bas a, .bandeau-bas p a {
  color: #682c00;
  font-weight: bold;
  text-decoration: underline;
  transition: all 0.3s ease;
}

.bandeau-bas a:hover, .bandeau-bas p a:hover {
  color: #a04500;
  text-shadow: 0 0 6px rgba(104,44,0,0.4);
}

/* 📱 Responsive */
@media screen and (max-width: 768px) {
  .onglets-container { gap: 1rem; }
  .bandeau-bas { font-size: 1rem; }
}

@media screen and (max-width: 600px) {
  .logo { max-width: 100%; width: 90%; }
  .onglets-container { grid-template-columns: repeat(2,1fr); gap: 0.5rem; }
  .grille-images { grid-template-columns: repeat(2,1fr); gap: 0.3rem; padding: 0.5rem; }
}
