.tooltip-parent {
  position: relative;
  display: inline-block;
}

.tooltip-parent::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px;
}

.tooltip-player {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 240px;
  text-align: center;

  background: #000;
  color: #fff;
  padding: 10px;
  border-radius: 10px;

  border: 1px solid rgba(0, 0, 0, 0.08);

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

  opacity: 0;
  pointer-events: none;

  transform: translateY(10px);
  transition: 0.2s ease;

  z-index: 1000;
}

.tooltip-player::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 5%;

  width: 12px;
  height: 12px;

  background: #000;

  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 1px solid rgba(0, 0, 0, 0.08);

  transform: rotate(45deg);
}

.tooltip-player h4 {
  padding: 8px;

  margin: 0;

  border-top-left-radius: 8px;
  border-top-right-radius: 8px;

  font-size: 14px;
}

.tooltip-player strong {
  margin: 0;
}

/* Affichage via JS uniquement */
.tooltip-player.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.28),
    0 4px 10px rgba(0, 0, 0, 0.18);
}

.audio-wrapper {
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
  background: #eaeaea;
  border-left: 3px solid #ffd140;
}

.tooltip-player audio {
  width: 100%;
  outline: none;
}

/* ❌ On ferme le tooltip */
.tooltip-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  color: #222;
  font-size: 14px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tooltip-close:hover {
  background: rgba(0, 0, 0, 0.25);
}