.hidden {
  display: none;
}

/* Wrapper */
.share_wrapper {
  position: relative;
}

/* Bouton principal */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  border: none;
  border-radius: 50%;
  background: #f5f5f5;
  cursor: pointer;

  transition: all 0.2s ease;
}

.share-btn:hover {
  background: #e0e0e0;
  transform: scale(1.05);
}

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: #333;
}

/* Tooltip */
.share-btn::after {
  content: "Partager";
  position: absolute;
  bottom: -30px;

  background: black;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;

  opacity: 0;
  transition: opacity 0.2s;
}

.share-btn:hover::after {
  opacity: 1;
}

/* Popup */
.share-popup {
  position: absolute;
  top: 50px;
  left: auto;
  right: 0;  

  background: white;
  border-radius: 12px;
  padding: 8px;

  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 180px;

  display: flex;
  flex-direction: column;
  gap: 4px;

  z-index: 1000;

  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;

  pointer-events: none; /* 👈 IMPORTANT */
}

.share-popup:not(.hidden) {
  opacity: 1;
  transform: translateY(0);

  pointer-events: auto; /* 👈 IMPORTANT */
}

/* Items */
.share-item {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 8px;

  font-size: 14px;
  color: #333;
  text-decoration: none;

  background: none;
  border: none;
  cursor: pointer;

  transition: background 0.2s;
}

.share-item:hover {
  background: #f5f5f5;
}

/* Icônes */
.share-icon {
  width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.share-icon svg {
  width: 18px;
  height: 18px;
  fill: #555;
  transition: fill 0.2s;
}

/* Hover icônes */
.share-item:hover .share-icon svg {
  fill: #000;
}

/* Couleurs réseaux */
#facebookShare:hover .share-icon svg {
  fill: #1877f2;
}

#whatsappShare:hover .share-icon svg {
  fill: #25D366;
}

.share-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);

  background: rgba(0, 0, 0, 0.9); /* plus visible */
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;

  font-size: 14px;
  font-weight: 500;

  box-shadow: 0 4px 12px rgba(0,0,0,0.3);

  opacity: 0;
  pointer-events: none;

  transition: all 0.3s ease;

  z-index: 9999; /* IMPORTANT */
}

.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
