body {
  font-family: Georgia, serif;
  background: #f7f7f4;
  color: #2e2e2e;
  text-align: center;
}

h1 {
  font-weight: normal;
  margin-top: 2rem;
}

.intro {
  font-style: italic;
  margin-bottom: 2rem;
}

svg {
  margin: auto;
  display: block;
}

.node {
  fill: #2e2e2e;
  opacity: 0.85;
   transform-origin: center;
  animation: breathe 6s ease-in-out infinite;
}

.link {
  stroke: #999;
  stroke-width: 1;
  opacity: 0.4;
}

.label {
  font-size: 12px;
  fill: #444;
  transition: font-size 0.25s ease, font-weight 0.25s ease, opacity 0.25s ease;
  pointer-events: all;
}
/* légère respiration des points */

@keyframes breathe {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 0.95; }
}

/* infobulle */
.tooltip-bg {
  fill: #f7f7f4;
  stroke: #999;
  opacity: 0.95;
}

.tooltip-text {
  font-size: 12px;
  fill: #666;
  font-style: italic;
  opacity: 0.9;
}


.label.active {
  font-size: 15px;
  font-weight: bold;
  opacity: 1;
}

#toile-3d {
  background-color: #F2F5F7; /* Pour éviter le flash blanc au chargement */
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
  position: relative; /* Pour permettre le positionnement absolu du bouton */
  width: 100%;
  height: 600px; /* Hauteur fixe pour le graphe */
  min-height: 400px;
}
#toile-3d canvas {
  filter: contrast(1.1) brightness(1.05);
  /* Optionnel : un très léger mouvement de va-et-vient sur tout le bloc */
  animation: water-drift 10s ease-in-out infinite;
}

/* Bouton Home pour réinitialiser la vue */
.toile-home-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid #67768E;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #2B4495;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  user-select: none;
}

.toile-home-btn:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toile-home-btn:active {
  transform: scale(0.95);
}

@keyframes water-drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(5px) rotate(0.5deg); }
}

