/* BYLBY V3 — Actions directes sur les créations */

.by3-duels .by3-actions {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
}

.by3-duels .by3-actions .by3-action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 43px;
  height: 43px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  color: #171717;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.by3-duels .by3-actions .by3-action:hover {
  transform: scale(1.07);
  background: #b5ff4d;
}

.by3-duels .by3-actions .by3-action svg {
  width: 21px;
  height: 21px;
}

.by3-duels .by3-actions .by3-action.is-active {
  color: #477800;
  background: #b5ff4d;
}

.by3-duels .by3-actions .by3-action[data-action="like"] {
  gap: 3px;
  width: auto;
  min-width: 43px;
  padding: 0 9px;
}

.by3-duels .by3-actions .by3-action span {
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .by3-duels .by3-actions {
    gap: 5px;
  }

  .by3-duels .by3-actions .by3-action {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .by3-duels .by3-actions .by3-action svg {
    width: 18px;
    height: 18px;
  }

  .by3-duels .by3-actions .by3-action[data-action="like"] {
    min-width: 34px;
    padding: 0 5px;
  }
}

/* Correction : positionnement dans l'angle supérieur droit */
.by3-duels .by3-creation .by3-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  left: auto;
  bottom: auto;
  width: auto;
  height: auto;
  margin: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

@media (max-width: 600px) {
  .by3-duels .by3-creation .by3-actions {
    top: 8px;
    right: 8px;
  }
}

/* BYLBY V3 — Rendre toutes les actions cliquables */
.by3-duels .by3-creation .by3-overlay {
  pointer-events: none;
}

.by3-duels .by3-creation .by3-actions {
  pointer-events: auto;
  z-index: 30;
}

.by3-duels .by3-creation .by3-actions .by3-action {
  position: relative;
  z-index: 31;
  pointer-events: auto;
}

/* Éloigner les actions de gauche du VS */
.by3-arena > .by3-creation:first-child .by3-actions {
  right: 27px;
}

@media (max-width: 600px) {
  .by3-arena > .by3-creation:first-child .by3-actions {
    right: 14px;
  }
}

/* Décalage ciblé des actions de gauche */
.by3-actions[data-side="a"] {
  right: 34px !important;
}

@media (max-width: 600px) {
  .by3-actions[data-side="a"] {
    right: 18px !important;
  }
}

/* =====================================================
   BYLBY V3 — TEST BARRE D'ACTIONS HORIZONTALE MOBILE
   ===================================================== */

@media (max-width: 700px) {

  /* Les actions quittent leur colonne verticale */
  .by3-duels .by3-creation .by3-actions {
    position: absolute !important;
    top: auto !important;
    bottom: 76px !important;
    left: 7px !important;
    right: 7px !important;

    width: auto !important;
    height: 38px !important;

    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;

    padding: 3px 5px !important;
    margin: 0 !important;

    background: rgba(15, 15, 17, .88) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 12px !important;
    box-shadow: none !important;

    transform: none !important;
    z-index: 35 !important;
    pointer-events: auto !important;
  }

  /* Même position sur les deux créations */
  .by3-duels .by3-actions[data-side="a"],
  .by3-duels .by3-actions[data-side="b"] {
    left: 7px !important;
    right: 7px !important;
  }

  /* Cinq icônes compactes */
  .by3-duels .by3-actions .by3-action,
  .by3-duels .by3-actions button {
    position: relative !important;

    flex: 0 1 30px !important;
    width: 30px !important;
    min-width: 0 !important;
    height: 32px !important;
    min-height: 32px !important;

    padding: 5px !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;

    color: #fff !important;
    transform: none !important;

    pointer-events: auto !important;
    cursor: pointer;
  }

  /* Taille des pictogrammes */
  .by3-duels .by3-actions button svg {
    width: 19px !important;
    height: 19px !important;
    flex-shrink: 0;
    stroke: currentColor;
  }

  /* État actif : vert BYLBY */
  .by3-duels .by3-actions button.is-active,
  .by3-duels .by3-actions button.is-liked,
  .by3-duels .by3-actions button.is-saved,
  .by3-duels .by3-actions button[aria-pressed="true"] {
    color: #b5ff4d !important;
  }

  /* Les titres restent devant le fond de la photo */
  .by3-duels .by3-info {
    z-index: 12;
  }

  /* Les liens restent cliquables */
  .by3-duels .by3-info a {
    pointer-events: auto;
  }
}


/* BYLBY V3 — TEST : actions sur les bords extérieurs */
@media (max-width: 700px) {

  .by3-duels .by3-creation .by3-actions {
    position: absolute !important;
    top: 12px !important;
    bottom: auto !important;
    width: 34px !important;
    height: auto !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 9px !important;

    padding: 5px 2px !important;
    margin: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;

    z-index: 35 !important;
    pointer-events: auto !important;
  }

  /* Bord gauche de la première création */
  .by3-duels .by3-actions[data-side="a"] {
    left: 7px !important;
    right: auto !important;
  }

  /* Bord droit de la seconde création */
  .by3-duels .by3-actions[data-side="b"] {
    right: 7px !important;
    left: auto !important;
  }

  .by3-duels .by3-actions .by3-action,
  .by3-duels .by3-actions button {
    position: relative !important;
    flex: 0 0 34px !important;

    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 6px !important;
    margin: 0 !important;

    color: #fff !important;
    background: rgba(0, 0, 0, .38) !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    transform: none !important;

    pointer-events: auto !important;
  }

  .by3-duels .by3-actions button svg {
    width: 19px !important;
    height: 19px !important;
    flex-shrink: 0;
  }

  .by3-duels .by3-actions button.is-active,
  .by3-duels .by3-actions button.is-liked,
  .by3-duels .by3-actions button.is-saved,
  .by3-duels .by3-actions button[aria-pressed="true"] {
    color: #b5ff4d !important;
  }
}

/* ==================================================
   BYLBY V3 — ACTIONS DANS LE PIED DE CARTE MOBILE
   ================================================== */

@media (max-width: 700px) {

  /* Réserver une zone sous l'image */
  .by3-duels .by3-creation {
    position: relative !important;
    padding-bottom: 48px !important;
  }

  /* Placer les cinq actions au pied de chaque carte */
  .by3-duels .by3-creation .by3-actions {
    position: absolute !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;
    height: 46px !important;
    box-sizing: border-box !important;

    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 0 !important;

    padding: 4px 2px !important;
    margin: 0 !important;

    background: #242426 !important;
    border: 0 !important;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;

    z-index: 40 !important;
    pointer-events: auto !important;
  }

  .by3-duels .by3-actions[data-side="a"],
  .by3-duels .by3-actions[data-side="b"] {
    left: 0 !important;
    right: 0 !important;
  }

  /* Icônes sobres, sans pastilles */
  .by3-duels .by3-actions .by3-action,
  .by3-duels .by3-actions button {
    position: relative !important;
    flex: 1 1 0 !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 5px 0 !important;
    margin: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;

    color: #fff !important;
    pointer-events: auto !important;
  }

  .by3-duels .by3-actions button svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
  }

  .by3-duels .by3-actions button.is-active,
  .by3-duels .by3-actions button.is-liked,
  .by3-duels .by3-actions button.is-saved,
  .by3-duels .by3-actions button[aria-pressed="true"] {
    color: #b5ff4d !important;
  }

  /* Garder les titres au-dessus des actions */
  .by3-duels .by3-info {
    bottom: 48px !important;
    z-index: 12 !important;
  }

  .by3-duels .by3-info a {
    pointer-events: auto !important;
  }
}

/* ==================================================
   BYLBY V3 — PIED DE CARTE SUR ORDINATEUR
   4 actions : aimer, commenter, partager, enregistrer
   ================================================== */

@media (min-width: 701px) {

  .by3-duels .by3-creation {
    position: relative !important;
    padding-bottom: 58px !important;
  }

  .by3-duels .by3-creation .by3-actions {
    position: absolute !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;
    height: 56px !important;
    box-sizing: border-box !important;

    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-evenly !important;
    gap: 8px !important;

    padding: 6px 20px !important;
    margin: 0 !important;

    background: #242426 !important;
    border: 0 !important;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;

    z-index: 40 !important;
    pointer-events: auto !important;
  }

  .by3-duels .by3-actions[data-side="a"],
  .by3-duels .by3-actions[data-side="b"] {
    left: 0 !important;
    right: 0 !important;
  }

  .by3-duels .by3-actions .by3-action,
  .by3-duels .by3-actions button {
    position: relative !important;
    flex: 1 1 0 !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
    min-height: 42px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 8px !important;
    margin: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transform: none !important;

    color: #fff !important;
    pointer-events: auto !important;
    cursor: pointer;
  }

  .by3-duels .by3-actions button:hover {
    background: rgba(255,255,255,.10) !important;
  }

  .by3-duels .by3-actions button svg {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0;
  }

  .by3-duels .by3-actions button.is-active,
  .by3-duels .by3-actions button.is-liked,
  .by3-duels .by3-actions button.is-saved,
  .by3-duels .by3-actions button[aria-pressed="true"] {
    color: #b5ff4d !important;
  }

  .by3-duels .by3-info {
    bottom: 58px !important;
    z-index: 12 !important;
  }

  .by3-duels .by3-info a {
    pointer-events: auto !important;
  }
}
