.elementor-gallery-item { 
    position: relative; 
    overflow: hidden;
}

.pm-like {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 5px 10px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.2s ease, transform 0.15s ease;
    backdrop-filter: blur(4px);
    user-select: none;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    pointer-events: auto;
    line-height: 1;
    box-sizing: border-box;
}

/* Visible au hover de l'item */
.elementor-gallery-item:hover .pm-like {
    opacity: 1;
}

/* Toujours visible si déjà liké */
.pm-like.liked {
    opacity: 1;
    background: rgba(230, 57, 70, 0.85);
}

.pm-like .heart {
    display: inline-block;
    font-style: normal;
    line-height: 1;
    font-size: 14px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.pm-like.liked .heart {
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.pm-like:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.pm-like.liked:hover {
    background: rgba(230, 57, 70, 0.95);
}

.pm-like.animate .heart {
    transform: scale(1.4);
    animation: pm-heart-pop 0.3s ease;
}

@keyframes pm-heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.pm-like .count {
    opacity: 0.9;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    font-size: 12px;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
}

.pm-like.error {
    opacity: 1;
    background: rgba(220, 53, 69, 0.9);
}

.pm-like.processing {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.pm-like.processing .heart {
    animation: pm-heart-pulse 0.5s ease infinite;
}

@keyframes pm-heart-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Empêcher les interactions sur le lien parent quand on clique sur le like */
.elementor-gallery-item a {
    position: relative;
    z-index: 1;
}

.pm-like {
    z-index: 100;
}

/* Option pour toujours afficher le compteur */
.pm-always-show .pm-like {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .pm-like {
        padding: 4px 8px;
        font-size: 11px;
        bottom: 8px;
        right: 8px;
        gap: 3px;
    }
    
    .pm-like .heart {
        font-size: 11px;
    }
    
    .pm-like .count {
        font-size: 10px;
        min-width: 18px;
    }
}