/* === Styles communs à toutes les barres de partage === */
.share-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.6);  /* Fond blanc transparent */
  backdrop-filter: blur(4px);            /* Flou doux en arrière-plan */
  border-radius: 10px;
  z-index: 1000;
  transition: background-color 0.3s ease, transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.5;                          /* Opacité initiale */
}

.share-bar a img {
  width: 64px;
  height: 64px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* Survol d’un lien individuel = icône pleine */
.share-bar a:hover img {
  opacity: 1;
}

/* Survol de la barre = fond opaque */
.share-bar:hover {
  background-color: rgba(255, 255, 255, 1);
}

.fixed-share .close-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* === Barre fixe desktop à gauche === */
.fixed-share {
  position: fixed;
  top: 20%;
  left: 5px;
  flex-direction: column;
  padding: 14px 10px 10px 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Cacher la barre desktop sur les écrans < 1380px */
@media screen and (max-width: 1365px) {
  .fixed-share {
    display: none;
  }
}

.mobile-share,
.mobile-top-share{
  position: fixed;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  padding: 6px 24px 6px 12px; /* réduire le padding horizontal */
  border-radius: 10px;
  z-index: 1000;
  transition: transform 0.4s ease, opacity 0.4s ease, background-color 0.3s ease;
  width: fit-content;
  max-width: calc(100vw - 30px); /* marge de sécurité sur les côtés */  
}
/* === Barre mobile en bas (glisse du bas vers le haut) === */
.mobile-share {
  bottom: 10px;
  transform: translateX(-50%) translateY(20px); /* Glisse du bas */
}
/* === Barre mobile en haut (glisse du haut vers le bas) === */
.mobile-top-share {
  top: 10px;
  transform: translateX(-50%) translateY(-20px); /* Glisse du haut */
}
/* fermeture des barres */
.close-share {
  position: absolute;
  background: transparent;
  border: none;
  top: 0px;
  right: 0px;
  font-size: 18px;
  color: #333;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.close-share:hover {
  opacity: 1;
}

/* Version visible (fondu + glissement) */
.mobile-share.show,
.mobile-top-share.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Pour les mobiles étroits : taille réduite des icônes */
@media screen and (max-width: 1280px) {
  .share-bar a img {
    width: 50px;
    height: 50px;
  }
}
/* Pour les mobiles étroits : taille réduite des icônes */
@media screen and (max-width: 767px) {
  .share-bar a img {
    width: 40px;
    height: 40px;
  }
}

/* Cacher totalement les barres mobiles sur desktop large */
@media screen and (min-width: 1366px) {
  .mobile-share,
  .mobile-top-share {
    display: none !important;
  }
}
