/* ============================================================
   OXI Share – bouton de partage avec menu réseaux sociaux
   Version homogène avec bouton LIKE (Elementor friendly)
   ============================================================ */

/* Conteneur global */
.oxi-share {
  position: relative;
  display: inline-block;
  font-size: var(--oxi-share-font, 14px);
}

/* Bouton principal ("Partager") */
.oxi-share-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .85rem;
  height: 38px; /* Hauteur proche d’un bouton Elementor */
  border: 1px solid var(--oxi-share-border, #ccc);
  background: #fff;
  color: var(--oxi-share-color, #000);
  border-radius: var(--oxi-share-radius, 8px);
  cursor: pointer;
  font-weight: 600;
  line-height: 1;
  transition: all .15s ease;
}

.oxi-share-btn:hover {
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

/* Icône intégrée OU SVG personnalisé */
.oxi-share-btn-ico {
  display: inline-flex;
  align-items: center;
}

.oxi-share-btn-ico svg {
  width: var(--oxi-share-ico-size, 18px);
  height: var(--oxi-share-ico-size, 18px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.oxi-share-btn-ico img.oxi-share-custom-icon {
  width: var(--oxi-share-ico-size, 18px);
  height: var(--oxi-share-ico-size, 18px);
  object-fit: contain;
  display: block;
}

/* Menu déroulant des réseaux */
.oxi-share-menu {
  position: absolute;
  min-width: 220px;
  z-index: 9999;
  border: 1px solid var(--oxi-share-border, #ddd);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
  opacity: 0;
  transform: translateY(6px);
  transition: .12s;
}

.oxi-share.pos-bottom .oxi-share-menu { top: calc(100% + 8px); left: 0; }
.oxi-share.pos-top    .oxi-share-menu { bottom: calc(100% + 8px); left: 0; }

.oxi-share-menu.open {
  opacity: 1;
  transform: translateY(0);
}

/* Éléments du menu (réseaux) */
.oxi-share-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .7rem;
  text-decoration: none;
  color: #222;
  border-bottom: 1px solid #f1f1f1;
  transition: background .15s ease;
}

.oxi-share-item:last-child { border-bottom: 0; }
.oxi-share-item:hover { background: #f9f9f9; }

/* Couleur des icônes selon réseau */
.oxi-share-item .ico svg { display: block; fill: none; stroke: var(--oxi-share-color, #000); }
.oxi-share-item.n-facebook  .ico svg { fill: #1877f2; stroke: #1877f2; }
.oxi-share-item.n-x         .ico svg { fill: #000; stroke: #000; }
.oxi-share-item.n-linkedin  .ico svg { fill: #0a66c2; stroke: #0a66c2; }
.oxi-share-item.n-whatsapp  .ico svg { fill: #25d366; stroke: #25d366; }
.oxi-share-item.n-telegram  .ico svg { fill: #229ed9; stroke: #229ed9; }
.oxi-share-item.n-pinterest .ico svg { fill: #e60023; stroke: #e60023; }
.oxi-share-item.n-email     .ico svg { stroke: #444; }

/* Feedback après copie du lien */
.oxi-share-item.n-copy.copied .lab::after {
  content: " • copié !";
  color: #0a0;
  font-weight: 600;
}

/* Focus clavier (accessibilité) */
.oxi-share-btn:focus-visible {
  outline: 2px solid var(--oxi-share-color, #000);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   Mobile : comportement "bottom sheet" plein écran partiel
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .oxi-share { position: static; }
  .oxi-share-btn {
    padding: .55rem 1rem;
    height: 38px;
    font-size: 16px;
  }
  .oxi-share-menu {
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    top: auto;
    max-height: 50vh;
    overflow: auto;
    border-radius: 16px;
    transform: translateY(12px);
  }
  .oxi-share-menu.open { transform: translateY(0); }
  .oxi-share-item { padding: 14px 16px; gap: .8rem; }
  .oxi-share-item .ico svg { width: 24px; height: 24px; }
}
