/*
 * Styles pour les boutons d'interaction produit
 * Theme StephaneNikel
 */

/* ========================================
   SECTION D'INTERACTION PRODUIT
======================================== */

.product-interaction-section {
    margin: 30px 0;
}

.interaction-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* ========================================
   BOÎTE D'ACTIONS À DROITE
======================================== */

.action-box {
    display: flex;
    gap: 16px;
    padding: 8px;
    font-size:14px;
}

.action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 40px;
    border-radius: 6px;
    text-decoration: none;
    background-color:#FFF;
}

.action-link:hover {background-color:#FFF;}

/* .action-link:hover {
    background: #007cba;
    color: white;
    transform: scale(1.1);
} */

.action-link:active {
    transform: scale(0.95);
}

/* .action-icon {
    font-size: 1.2em;
    display: block;
} */

/* ========================================
   ICÔNES DES ACTIONS
======================================== */

.favorite-link {
    background-image: url("../assets/icons/black-heart-outline-icon.svg");
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 26px;
}

.likes-count{font-size:16px;font-weight:bold;}

.comments-link {
    background-image: url("../assets/icons/black-comments-icon.svg");
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 26px;
    position: relative;
    padding-right: 25px;
    transition: all 0.3s ease;
    font-size:16px;
    font-weight:bold;
}

.action-link.comments-link::after{font-size:14px;font-weight:bold;}

.comments-link:hover {
    transform: scale(1.1);
}

.comments-link::after {
    content: attr(data-count);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.comments-link[data-count="0"]::after {
    display: none;
}

.share-link {
    background-image: url("../assets/icons/black-share-icon.svg");
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 26px;
    transition: all 0.3s ease;
}

.share-link:hover {
    transform: scale(1.1);
}

/* ========================================
   SYSTÈME DE LIKES
======================================== */

.favorite-link {
    position: relative;
    transition: all 0.3s ease;
}

.favorite-link:hover {
    transform: scale(1.1);
}

.favorite-link.liked {
    background-color: #FFF;
    opacity: 0.8;
    background-image: url("../assets/icons/black-heart-full-icon.svg");
}

/* ========================================
   COMPTEUR DE LIKES (span avec styles inline)
======================================== */

/* Le compteur utilise un span avec styles inline identiques aux commentaires */
/* Permet une mise à jour fiable du DOM */


/* Animation de feedback lors du like/unlike */
.like-feedback {
    animation: likePulse 0.3s ease;
}

@keyframes likePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {

    .interaction-container {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        margin-bottom: 30px;
    }

    .more-info-section {
        text-align: center;
    }

    .more-info-link{
        display: flex;
        width: fit-content;
        margin: 0 auto;
        padding-right: 10px;
    }

    .action-box {
        width: 75%;
        margin:0 auto;
        display: flex;
        justify-content: space-around;
        padding: 0px;
        margin-top:20px;
        padding-left: 18px;
    }
}

@media (max-width: 480px) {
    .action-box {
        gap: 12px;
    }

    .action-link {
        width: 60px;
        height: 40px;
    }
}