/* Styles pour le système de favoris généralisé */

/* Bouton de favori de base */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

/* Tailles disponibles */
.favorite-btn.small {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.favorite-btn.medium {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.favorite-btn.large {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

/* États du bouton */
.favorite-btn:not(.favorited) {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
}

.favorite-btn:not(.favorited):hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    transform: scale(1.05);
}

.favorite-btn.favorited {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
}

.favorite-btn.favorited:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.15);
    border-color: #dc2626;
    transform: scale(1.05);
}

/* Animation de pulsation pour les favoris */
.favorite-btn.favorited i {
    animation: heartBeat 0.3s ease-in-out;
}

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

/* Bouton désactivé */
.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.favorite-btn:disabled:hover {
    transform: none !important;
}

/* Variantes de style */

/* Style minimaliste (pour les cartes) */
.favorite-btn.minimal {
    background: none;
    border: none;
    color: #6b7280;
}

.favorite-btn.minimal:hover {
    color: #ef4444;
    background: none;
    border: none;
}

.favorite-btn.minimal.favorited {
    color: #ef4444;
    background: none;
    border: none;
}

/* Style flottant (pour les overlays) */
.favorite-btn.floating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    backdrop-filter: blur(4px);
}

.favorite-btn.floating:hover {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.favorite-btn.floating.favorited {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* Style avec texte */
.favorite-btn.with-text {
    border-radius: 20px;
    padding: 8px 16px;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

.favorite-btn.with-text i {
    font-size: 14px;
}

/* Style pour les listes */
.favorite-btn.list-item {
    width: auto;
    height: auto;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    gap: 4px;
}

.favorite-btn.list-item i {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .favorite-btn.medium {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    .favorite-btn.large {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }
    
    .favorite-btn.with-text {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .favorite-btn.list-item {
        padding: 5px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .favorite-btn.medium {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .favorite-btn.large {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Styles pour les notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: #10b981;
}

.notification-error {
    background-color: #ef4444;
}

.notification-warning {
    background-color: #f59e0b;
}

.notification-info {
    background-color: #3b82f6;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.notification-content i {
    font-size: 16px;
}

.notification-content span {
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.notification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.notification-close i {
    font-size: 12px;
}

/* Responsive pour les notifications */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Styles pour les indicateurs de favoris */
.favorite-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Styles pour les compteurs de favoris */
.favorite-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Animation de chargement */
.favorite-btn.loading {
    pointer-events: none;
}

.favorite-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Styles pour les groupes de boutons de favoris */
.favorite-buttons-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.favorite-buttons-group .favorite-btn {
    flex-shrink: 0;
}

/* Styles pour les tooltips personnalisés */
.favorite-btn[data-tooltip] {
    position: relative;
}

.favorite-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 4px;
}

.favorite-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    margin-bottom: 0;
}
