/* Global */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Georgia, serif;
  background: radial-gradient(ellipse at bottom, #0d1b2a 0%, #000 100%);
  color: #fff;
  overflow-x: hidden;
}

/* Header & Nav */
header {
  text-align: center;
  padding: 20px;
}
.logo { height: 60px; }
nav a {
  color: #ccc;
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.9rem;
}

/* Main */
main {
  padding: 40px 20px;
  max-width: 900px;
  margin: auto;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-block;
  background: #7c4dff;
  color: #fff;
  padding: 12px 24px;
  margin: 10px 5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
}

/* Galerie Livres */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}
.gallery article {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  overflow: hidden;
  width: 220px;
  text-align: center;
  padding-bottom: 10px;
}
.gallery img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

/* Chat Oracle */
.chat-box {
  height: 240px;
  overflow-y: auto;
  background: rgba(255,255,255,0.1);
  padding: 10px;
  margin: 20px 0;
  border-radius: 8px;
}
.chat-form {
  display: flex;
  gap: 10px;
}
.chat-form input {
  flex: 1;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}
.chat-form button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background: #6b4ce5;
  color: #fff;
}

.portrait {
  display: block;
  margin: 40px auto 20px auto;   /* haut auto bas auto */
  max-width: 450px;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(0,0,0,0.25);
}

/* Contact */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 70vh;
}

.contact-title {
  margin-bottom: 18px;
}

.btn.blog-btn {
  margin-bottom: 20px;
  align-self: center;
}

.contact-form {
  background: rgba(255,255,255,0.06);
  padding: 24px 28px 18px 28px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 350px;
  max-width: 95vw;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 6px;
}

.input-group label {
  font-size: 1rem;
  color: #bdbdbd;
}

.input-group input, .input-group textarea {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
}

.input-group textarea {
  min-height: 90px;
  max-height: 220px;
  resize: vertical;
}

.social {
  text-align: center;
  margin: 20px 0 0 0;
  font-size: 1.07rem;
  width: 100%;
}

.social a {
  color: #7c4dff;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.2s;
}
.social a:hover {
  color: #b39ddb;
}

@media (max-width: 600px) {
  .contact-form {
    padding: 15px 6px;
    width: 97vw;
  }
}

/* Explorer */

/* Rend la mini‑map visible */
.explorer-elements .map {
  width: 100%;      /* prend toute la largeur de son conteneur */
  max-width: 800px; /* limite sa largeur si besoin */
  height: 400px;    /* hauteur fixe pour qu’elle soit bien visible */
  margin: 0 auto;   /* la centre horizontalement */
  display: block;   /* assure qu’elle se comporte comme un bloc */
}
.explorer-elements {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.explorer-elements .map {
  width: 100%;
  height: auto;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  overflow: hidden;
}
.explorer-elements details {
  background: rgba(255,255,255,0.05);
  border-radius: 5px;
  padding: 10px;
}
.explorer-elements summary {
  cursor: pointer;
  font-weight: bold;
}
.travelling-star {
  position: absolute;
  width: 20px;
  height: 20px;
  background: url('../images/star.svg') no-repeat center/contain;
  pointer-events: none;
  opacity: 0.8;
}

/* Explorer l’univers – cacher les fragments avant clic */
.explorer-elements details {
  display: none;
}

/* Quand on active un fragment via JS */
.explorer-elements details.active {
  display: block;
}

/* Rend la mini‑map visible */
.explorer-elements .map {
  width: 100%;      /* ou une valeur fixe, ex. 600px */
  max-width: 800px; /* optionnel, limite sur grand écran */
  height: 300px;    /* hauteur fixe pour qu’elle s’affiche */
  margin: 0 auto;   /* centrer */
  display: block;   /* s’assurer que l’object SVG s’affiche */
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  overflow: hidden;
}

/* Constellations */
#constellation-map {
  width: 100%;
  height: 400px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-top: 20px;
}

/* dimensions et style du canvas constellation */
#constellation-map {
  display: block;
  width: 100%;
  height: 400px;
  background: rgba(0,0,0,0.2);  /* légère zone sombre pour bien voir */
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}


/* Footer credit musique */
footer {
  margin-top: 60px;
  font-size: 0.8rem;
  color: #aaa;
  text-align: center;
}

/* Masquer les fragments narratifs par défaut */
.explorer-elements details {
  display: none;
}

/* Afficher uniquement ceux qui ont la classe “active” */
.explorer-elements details.active {
  display: block;
}

