/* Style global du site */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #E0E0E0; /* Gris clair */
  color: #121212; /* Noir profond pour le texte */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-direction: column;
}

/* Header */
header {
  background-color: #121212; /* Noir profond */
  color: #FFFFFF; /* Blanc pur pour le contraste */
  text-align: center;
  padding: 20px 0;
  width: 100%;
  max-width: 1200px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

header strong, header em {
  font-size: 1.1rem;
  color: #E0E0E0; /* Gris clair pour une subtile mise en valeur */
}

/* Section principale */
main {
  width: 100%;
  max-width: 1200px;
  padding: 50px 20px;
  box-sizing: border-box;
}

/* Disposition de l'assemblée (les articles) */
.assembly {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  justify-items: center;
  margin-top: 30px;
  position: relative;
}

/* Style des articles */
article {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 15px;
  overflow: hidden;
  background-color: #FFFFFF; /* Blanc pur pour un fond neutre */
  box-shadow: 0 4px 10px rgba(18, 18, 18, 0.1); /* Ombre subtile avec du noir */
  transform: scale(0.8);
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s ease, opacity 0.5s ease, box-shadow 0.3s ease;
}

/* Animation visible au scroll */
article.visible {
  opacity: 1;
  transform: scale(1);
}

/* Effet au survol */
article:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(18, 18, 18, 0.2); /* Accentuation de l'ombre */
}

/* Ajuster l'image pour la rendre entièrement visible sans couper */
article figure {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

article img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Ne jamais couper l'image et garder son ratio */
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

article.visible img {
  opacity: 1;
}

figcaption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background-color: rgba(18, 18, 18, 0.8); /* Noir profond semi-transparent */
  color: #FFFFFF; /* Blanc pur pour le texte */
  padding: 10px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 5px;
}

figcaption a {
  color: #E0E0E0; /* Gris clair pour les liens */
  text-decoration: none;
}

figcaption a:hover {
  text-decoration: underline;
  color: #FFFFFF; /* Blanc pur pour le hover */
}

/* Pour les appareils mobiles */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .assembly {
    gap: 20px;
  }

  article {
    width: 90%;
    height: 250px;
  }

  figcaption {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  article {
    width: 100%;
    height: 220px;
  }
}

/* Transition des affiches */
.article-enlarged {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(18, 18, 18, 0.9); /* Noir profond avec opacité */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: zoom-out;
}

.article-enlarged img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.5s ease;
}
/* Conteneur pour le bouton d'accueil */
.cta-container {
  display: flex;
  justify-content: center;
  margin-top: 40px; /* Espacement avec le contenu précédent */
  padding: 10px;
}

/* Style pour le bouton */
.cta-button {
  background-color: #007bff; /* Couleur dynamique du bouton */
  color: #fff; /* Texte en blanc */
  padding: 12px 30px; /* Espacement interne */
  font-size: 1.2rem; /* Taille de texte plus grande */
  font-weight: bold;
  border: none;
  border-radius: 30px; /* Coins arrondis */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Effet au survol du bouton */
.cta-button:hover {
  background-color: #0056b3; /* Couleur plus foncée au survol */
  transform: scale(1.05); /* Légère augmentation de la taille */
}

/* Effet au focus */
.cta-button:focus {
  outline: none; /* Enlever le contour par défaut */
}

/* Réduction de la taille du bouton sur mobile */
@media (max-width: 768px) {
  .cta-button {
    padding: 10px 20px; /* Réduire l'espacement interne */
    font-size: 1rem; /* Réduire la taille du texte */
  }
}
