* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
}

.bbl {
  position: fixed;
  background: #1a1a1a;
  border: 1.5px solid #F7931D;
  border-radius: 14px;
  z-index: 500;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.88), 0 0 44px rgba(200, 110, 20, 0.18);
  min-width: 300px;
  top: 12px;
  max-height: calc(100vh - 24px);
  display: none;
  flex-direction: column;
}

.bbl.vis {
  display: flex;
}

.bbl.lg {
  width: 500px;
}

.bbl.md {
  width: 540px;
}

.bbl.sm {
  width: 360px;
}

.bbl.xs {
  /* 30 % narrower than sm — used for Risques existentiels so the bubble
     does not overlap the "Optimiseur" node label when zoomed in. */
  width: 252px;
}

.bh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 12px 22px;
  background: #0d0d0d;
  border-bottom: 1px solid rgba(247, 147, 29, 0.45);
  cursor: grab;
  border-radius: 14px 14px 0 0;
  flex-shrink: 0;
}

.bh:active {
  cursor: grabbing;
}

.bh-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: #F7931D;
  flex: 1;
  margin-right: 10px;
  line-height: 1.3;
}

.bh-close {
  background: none;
  border: none;
  color: rgba(230, 150, 60, 0.60);
  font-size: 26px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color .18s;
  flex-shrink: 0;
}

.bh-close:hover {
  color: rgba(255, 235, 200, 0.97);
}

.bb {
  padding: 18px 22px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 147, 29, 0.45) transparent;
}

.bb::-webkit-scrollbar {
  width: 4px;
}

.bb::-webkit-scrollbar-track {
  background: transparent;
}

.bb::-webkit-scrollbar-thumb {
  background: rgba(247, 147, 29, 0.45);
  border-radius: 4px;
}

.bb::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 180, 80, 0.65);
}

.b-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin-bottom: 16px;
  border: 1px solid rgba(247, 147, 29, 0.20);
}

.b-text {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.94;
  color: #ffffff;
  white-space: pre-line;
}

#hint {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Raleway', sans-serif;
  font-size: 10.5px;
  font-weight: 300;
  color: rgba(255, 220, 160, 0.88);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  z-index: 20;
  pointer-events: none;
  white-space: nowrap;
  animation: breathe 4s ease-in-out infinite;
  transition: opacity .8s;
}

#hint.off {
  opacity: 0;
}

@keyframes breathe {
  0%, 100% { opacity: .52; }
  50% { opacity: 1; }
}
