/* =====================================================
   Extra Life Café — Floating Hub v1.0.0
   ===================================================== */

:root {
  --elc-accent:      #5865F2;
  --elc-accent-text: #ffffff;
}

/* ══════════════════════════════════════════════════════
   CONTENEUR PRINCIPAL — positionné sur le côté gauche
   ══════════════════════════════════════════════════════ */
.elc-hub {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  /* Nécessaire pour que la carte absolue se positionne par rapport au hub */
  position: fixed;
}

/* ══════════════════════════════════════════════════════
   BLOC SOCIAL (réseaux + bouton événements)
   ══════════════════════════════════════════════════════ */
.elc-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 14px 10px;
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Liens réseaux sociaux — dynamiques */
.elc-social a,
.elc-social-link {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  overflow: hidden;
  flex-shrink: 0;
}
.elc-social a:hover,
.elc-social-link:hover {
  transform: scale(1.15) translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
}
.elc-social-link svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
  flex-shrink: 0;
}
.elc-social-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ── Bouton Événements intégré dans le social ── */
.elc-evt-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  /* Dégradé Extra Life Café : rouge → orange → jaune */
  background: linear-gradient(160deg, #c41010 0%, #d94400 35%, #f09000 65%, #f5c200 100%);
  /* Liseré blanc entre dégradé et bordure noire */
  outline: 1.5px solid #000000;
  outline-offset: 1.5px;
  border: 1.5px solid rgba(255,255,255,0.7);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  padding: 6px;
  box-sizing: border-box;
  overflow: hidden;
}
.elc-evt-btn:hover {
  transform: scale(1.15) translateX(4px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.45);
}
/* Image mégaphone centrée, bien visible */
.elc-evt-btn-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
  pointer-events: none;
}
.elc-evt-btn-dot {
  display: none; /* notification désactivée */
}
@keyframes elc-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.6; transform:scale(1.4); }
}

/* ══════════════════════════════════════════════════════
   CARTE ÉVÉNEMENTS (s'affiche au-dessus du social)
   ══════════════════════════════════════════════════════ */
.elc-evt-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.20);
  width: 290px;
  overflow: hidden;
  /* Desktop : carte à DROITE du floating — transform-origin coin bas-gauche */
  position: absolute;
  left: calc(100% + 12px);  /* juste à droite du bloc social */
  bottom: 0;                 /* alignée sur le bas du hub */
  transform-origin: bottom left;
  transform: scale(0.05) translateX(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1),
              opacity   0.35s cubic-bezier(.4,0,.2,1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.elc-evt-card.elc-evt-open {
  transform: scale(1) translateX(0);
  opacity: 1;
  pointer-events: all;
}

.elc-evt-header {
  background: var(--elc-accent);
  color: var(--elc-accent-text);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.elc-evt-header-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.elc-dot-pulse {
  width: 8px;
  height: 8px;
  background: #f9a825;
  border-radius: 50%;
  flex-shrink: 0;
  animation: elc-pulse 2s ease-in-out infinite;
}
.elc-evt-close {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--elc-accent-text);
  padding: 0;
  transition: background 0.15s;
}
.elc-evt-close:hover { background: rgba(255,255,255,0.35); }

.elc-evt-list { max-height: 340px; overflow-y: auto; }
.elc-evt-list::-webkit-scrollbar { width: 3px; }
.elc-evt-list::-webkit-scrollbar-thumb { background: rgba(128,128,128,.3); border-radius: 3px; }

.elc-evt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 0.5px solid rgba(0,0,0,0.07);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.elc-evt-item:last-child { border-bottom: none; }
.elc-evt-item:hover { background: rgba(0,0,0,0.04); }

.elc-evt-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.08);
}
.elc-evt-avatar img { width:100%; height:100%; object-fit:cover; display:block; }

.elc-evt-info { flex: 1; min-width: 0; }
.elc-evt-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.elc-evt-subtitle {
  font-size: 11px;
  color: #888;
  margin: 1px 0 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.elc-evt-date {
  font-size: 11px;
  color: #666;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}
.elc-evt-badge {
  display: inline-block;
  background: #7b4ea0;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  margin-top: 3px;
}
.elc-evt-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--elc-accent);
  flex-shrink: 0;
}
.elc-evt-price .woocommerce-Price-amount { color: var(--elc-accent); }

.elc-evt-footer {
  padding: 10px 14px;
  border-top: 0.5px solid rgba(0,0,0,0.07);
  text-align: center;
}
.elc-evt-footer a {
  font-size: 12px;
  font-weight: 600;
  color: var(--elc-accent);
  text-decoration: none;
}
.elc-evt-footer a:hover { text-decoration: underline; }
.elc-evt-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #999;
}

/* ══════════════════════════════════════════════════════
   POPUP ÉVÉNEMENT SPÉCIAL (overlay centré)
   ══════════════════════════════════════════════════════ */
.elc-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.elc-popup-overlay.elc-popup-open {
  opacity: 1;
  visibility: visible;
}
.elc-popup-modal {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  transform: scale(0.92) translateY(14px);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
.elc-popup-overlay.elc-popup-open .elc-popup-modal {
  transform: scale(1) translateY(0);
}
.elc-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  padding: 0;
  transition: background 0.15s;
}
.elc-popup-close:hover { background: rgba(0,0,0,0.2); }

.elc-popup-img-wrap { width: 100%; }
.elc-popup-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.elc-popup-body { padding: 20px 24px 24px; text-align: center; }
.elc-popup-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px;
}
.elc-popup-text {
  font-size: 14px;
  color: #555;
  margin: 0 0 16px;
  line-height: 1.6;
}
.elc-popup-btn {
  display: inline-block;
  background: var(--elc-accent);
  color: var(--elc-accent-text) !important;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 28px;
  border-radius: 10px;
  transition: opacity 0.18s;
}
.elc-popup-btn:hover { opacity: 0.88; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .elc-hub { left: 10px; }
  .elc-social { gap: 8px; padding: 12px 8px; }
  .elc-social a { width: 40px; height: 40px; }
  .elc-social a svg { width: 19px; height: 19px; }
  .elc-evt-btn { width: 40px; height: 40px; }
  .elc-evt-btn svg { width: 18px; height: 18px; }
  .elc-evt-btn-label { font-size: 6px; }
}

@media (max-width: 767px) {
  /* Sur mobile : tout en bas, horizontal */
  .elc-hub {
    left: 50%;
    top: auto;
    bottom: 12px;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
  }
  .elc-social {
    flex-direction: row;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 40px;
  }
  .elc-social a        { width: 42px; height: 42px; }
  .elc-social a:hover  { transform: scale(1.12) translateX(0); }
  .elc-evt-btn         { width: 42px; height: 42px; }
  .elc-evt-btn:hover   { transform: scale(1.12) translateX(0); }

  /* Carte événements s'ouvre vers le HAUT sur mobile/tablette */
  .elc-evt-card {
    position: fixed;
    left: 50%;
    bottom: 80px;          /* au-dessus du floating horizontal */
    transform: translateX(-50%) scale(0.05) translateY(10px);
    transform-origin: bottom center;
    width: calc(100vw - 32px);
    max-width: 340px;
  }
  .elc-evt-card.elc-evt-open {
    transform: translateX(-50%) scale(1) translateY(0);
  }

  .elc-popup-modal { border-radius: 14px; }
  .elc-popup-img   { height: 160px; }
}
