/* share-menu.css — bouton de partage unique + popover (6 options) + share-bar inline */

/* ========================================================
   SHARE BAR (style Figaro) — rangée de 6 icônes circulaires
   ======================================================== */
.ir-share-bar {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: nowrap;
}

.ir-share-bar-item {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #4b5563;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
  line-height: 0;
}

.ir-share-bar-item svg {
  width: 16px;
  height: 16px;
  display: block;
}

.ir-share-bar-item:hover,
.ir-share-bar-item:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
  outline: none;
  color: #fff;
}

.ir-share-bar-item--sms:hover,
.ir-share-bar-item--sms:focus-visible      { background: #34c759; color: #fff; }
.ir-share-bar-item--whatsapp:hover,
.ir-share-bar-item--whatsapp:focus-visible { background: #25D366; color: #fff; }
.ir-share-bar-item--telegram:hover,
.ir-share-bar-item--telegram:focus-visible { background: #229ED9; color: #fff; }
.ir-share-bar-item--facebook:hover,
.ir-share-bar-item--facebook:focus-visible { background: #1877F2; color: #fff; }
.ir-share-bar-item--linkedin:hover,
.ir-share-bar-item--linkedin:focus-visible { background: #0A66C2; color: #fff; }
.ir-share-bar-item--copy:hover,
.ir-share-bar-item--copy:focus-visible     { background: #475569; color: #fff; }

.ir-share-bar-item--ok {
  background: #16a34a !important;
  color: #fff !important;
}

/* Mobile : icônes un peu plus petites pour tenir sur la même ligne que le calendrier */
@media (max-width: 600px) {
  .ir-share-bar { gap: .3rem; }
  .ir-share-bar-item { width: 30px; height: 30px; }
  .ir-share-bar-item svg { width: 14px; height: 14px; }
}

/* ========================================================
   BOUTON UNIQUE "PARTAGER" — attractif, responsive
   Au clic : ouvre le popover (.ir-share-pop) avec les 6 options.
   ======================================================== */
.ir-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.25rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--font-display, inherit);
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark, #1e3a8a) 0%, var(--navy, #1B2A4A) 100%);
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(27, 42, 74, .18);
  line-height: 1;
}

.ir-share-btn:hover,
.ir-share-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 42, 74, .28);
  filter: brightness(1.08);
  outline: none;
  color: #fff;
}

.ir-share-btn:focus-visible {
  outline: 3px solid rgba(45, 91, 215, .35);
  outline-offset: 2px;
}

.ir-share-btn:active {
  transform: translateY(0) scale(.97);
  box-shadow: 0 2px 6px rgba(27, 42, 74, .15);
}

.ir-share-btn[aria-expanded="true"] {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(27, 42, 74, .12);
  filter: brightness(.95);
}

.ir-share-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
}

.ir-share-btn-icon { display: contents; }
.ir-share-btn-label { white-space: nowrap; }

/* Mobile : pleine largeur dans une zone d'actions (ev-actions, article-share, etc.) */
@media (max-width: 600px) {
  .ev-actions .ir-share-btn,
  .article-share .ir-share-btn {
    width: 100%;
    justify-content: center;
    padding: .75rem 1.25rem;
    font-size: .92rem;
  }
}

/* ---- Popover ---- */
.ir-share-pop {
  position: absolute;
  z-index: 9999;
  min-width: 240px;
  max-width: calc(100vw - 16px);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
  padding: .75rem;
  animation: ir-share-pop-in .12s ease-out;
  font-family: var(--font-display, inherit);
}

@keyframes ir-share-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ir-share-pop--above {
  animation-name: ir-share-pop-in-above;
}

@keyframes ir-share-pop-in-above {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ir-share-pop-header {
  padding: 0 .25rem .5rem .25rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.ir-share-pop-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--steel, #475569);
}

.ir-share-pop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
}

.ir-share-pop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .65rem .35rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink, #0f172a);
  font-family: inherit;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, transform .1s ease;
}

.ir-share-pop-item:hover,
.ir-share-pop-item:focus-visible {
  background: var(--ice, #eef3f8);
  outline: none;
}

.ir-share-pop-item:active {
  transform: scale(.96);
}

.ir-share-pop-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ice, #eef3f8);
  color: var(--ink, #0f172a);
  transition: background .12s ease, color .12s ease;
}

.ir-share-pop-item:hover .ir-share-pop-icon,
.ir-share-pop-item:focus-visible .ir-share-pop-icon {
  background: var(--ink, #0f172a);
  color: #fff;
}

/* Couleurs de marque (au hover seulement) */
.ir-share-pop-item--whatsapp:hover .ir-share-pop-icon,
.ir-share-pop-item--whatsapp:focus-visible .ir-share-pop-icon { background: #25D366; color: #fff; }
.ir-share-pop-item--telegram:hover .ir-share-pop-icon,
.ir-share-pop-item--telegram:focus-visible .ir-share-pop-icon { background: #229ED9; color: #fff; }
.ir-share-pop-item--facebook:hover .ir-share-pop-icon,
.ir-share-pop-item--facebook:focus-visible .ir-share-pop-icon { background: #1877F2; color: #fff; }
.ir-share-pop-item--linkedin:hover .ir-share-pop-icon,
.ir-share-pop-item--linkedin:focus-visible .ir-share-pop-icon { background: #0A66C2; color: #fff; }
.ir-share-pop-item--sms:hover .ir-share-pop-icon,
.ir-share-pop-item--sms:focus-visible .ir-share-pop-icon { background: #34c759; color: #fff; }
.ir-share-pop-item--copy:hover .ir-share-pop-icon,
.ir-share-pop-item--copy:focus-visible .ir-share-pop-icon { background: var(--steel, #475569); color: #fff; }

.ir-share-pop-item--ok .ir-share-pop-icon {
  background: #16a34a;
  color: #fff;
}

.ir-share-pop-label {
  font-size: .72rem;
  line-height: 1.2;
}

/* Mobile : agrandir un peu */
@media (max-width: 480px) {
  .ir-share-pop {
    min-width: 280px;
    padding: 1rem;
  }
  .ir-share-pop-grid {
    gap: .5rem;
  }
  .ir-share-pop-icon {
    width: 44px;
    height: 44px;
  }
  .ir-share-pop-label {
    font-size: .78rem;
  }
}
