
/* Badge view - s'affiche au-dessus du badge commentaire */
.view-badge {
    position: absolute;
    top: 11px; /* Positionné à l'ancienne position du badge commentaire */
    right: 11px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    font-size: 9px;
    font-weight: bold;
    border-radius: 10px;
    min-width: 26px;
    height: 18px;
    display: none; /* Caché par défaut */
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 5px rgba(139, 92, 246, 0.3);
    border: 0px solid white;
    z-index: 20; /* Même z-index que le badge commentaire */
    gap: 3px;
}

/* Afficher seulement si views > 5 */
.view-badge.active {
    display: flex;
}

/* Conteneur pour chaque indicateur */
.view-indicator {
    display: flex;
    align-items: center;
    gap: 1px;
}

/* Icônes */
.view-badge .fa-eye {
    font-size: 8px;
    color: #c7d2fe;
}

.view-badge .fa-phone {
    font-size: 8px;
    color: #a5b4fc;
    margin-left: 2px;
}

/* Compteurs */
.view-count, .phone-count {
    font-size: 8px;
    font-weight: 700;
    margin-left: 1px;
}

/* Séparateur */
.view-separator {
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 2px;
}

/* Effet au survol */
.view-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(139, 92, 246, 0.4);
}

/* Tooltip pour badge view */
.view-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    font-size: 10px;
    border-radius: 8px;
    padding: 6px 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 30;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    display: none;
}

.view-tooltip.active {
    display: block;
}

.view-tooltip .tooltip-arrow {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #1f2937;
}

/* CSS pour le badge commentaire - Maintenant en dessous du badge view */
.comments-badge {
    position: absolute;
    top: 35px; /* Positionné sous le badge view */
    right: 11px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 12px;
    min-width: 20px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    border: 0px solid white;
    z-index: 19; /* z-index légèrement inférieur */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Animation au survol */
.comments-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

/* Icône commentaire */
.comments-badge i {
    font-size: 9px;
    margin-right: 2px;
    transition: transform 0.2s ease;
}

.comments-badge:hover i {
    transform: scale(1.2);
}

/* Compteur */
.comments-count {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Tooltip amélioré */
.comments-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    font-size: 11px;
    border-radius: 8px;
    padding: 6px 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 30;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Flèche du tooltip */
.comments-tooltip .tooltip-arrow {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #1f2937;
}

/* Style pour les annonces avec beaucoup de commentaires */
.comments-badge.high-activity {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    animation: pulse 2s infinite;
}

.comments-badge.high-activity:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* Animation de pulse pour les annonces populaires */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Responsive design */
@media (max-width: 640px) {
    .view-badge {
        top: 8px;
        right: 8px;
        min-width: 24px;
        height: 16px;
        padding: 0 3px;
    }
    
    .view-badge .fa-eye,
    .view-badge .fa-phone {
        font-size: 7px;
    }
    
    .view-count, .phone-count {
        font-size: 7px;
    }
    
    .comments-badge {
        top: 32px;
        right: 8px;
        height: 20px;
        min-width: 18px;
        font-size: 9px;
    }
    
    .comments-badge i {
        font-size: 8px;
        margin-right: 1px;
    }
    
    .comments-count {
        font-size: 9px;
    }
}

/* Pour les vues liste et mosaïque */
.list-view .comments-badge,
.mosaic-view .comments-badge {
    top: 35px;
    right: 10px;
}

.list-view .view-badge,
.mosaic-view .view-badge {
    top: 10px;
    right: 10px;
}

/* Ajustement de la position du badge favoris pour faire de la place */
.favorite-btn {
    top: 10px;
    left: 10px;
    z-index: 25;
}

/* Ajustement pour les annonces sponsorisées */
.sponsored-card .comments-badge {
    top: 37px;
    right: 12px;
}

.sponsored-card .view-badge {
    top: 12px;
    right: 12px;
}

.sponsored-card .favorite-btn {
    top: 12px;
    left: 12px;
}


    /* Styles pour les badges de note */
.rating-badge-compact {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    color: white;
    transition: all 0.3s ease;
    cursor: help;
}

.rating-badge-compact:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.rating-badge-compact .rating-value {
    font-size: 9px;
    color: #000;
}

.rating-badge-compact .rating-emoji {
    font-size: 9px;
    line-height: 1;
}

/* Couleurs selon la note */
.rating-badge-compact.bg-gradient-to-r.from-yellow-500.to-yellow-600 {
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.rating-badge-compact.bg-gradient-to-r.from-blue-500.to-blue-600 {
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.rating-badge-compact.bg-gradient-to-r.from-green-500.to-green-600 {
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.rating-badge-compact.bg-gradient-to-r.from-teal-500.to-teal-600 {
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.rating-badge-compact.bg-gradient-to-r.from-gray-500.to-gray-600 {
    border: 1px solid rgba(107, 114, 128, 0.3);
}



.btn-geo-badge {
    background: #ffd600 !important;
    color: #0a1628 !important;
    font-size: .6rem;
    font-weight: 700; 
    padding: 0px 8px !important;
    border-radius: 20px;
    letter-spacing: .05em;
}

/* Solution ultra-simple - colle ça dans ton fichier CSS */
.category-section {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
    padding-left: 16px;
    padding-right: 16px;
}

/* Pour les très petits écrans, la carte prend plus de largeur */
@media (max-width: 480px) {
    .category-section {
        padding-left: 0px;
        padding-right: 0px;
    }
}

@media (max-width: 480px) {
  
}    
 
/* Animation pour le bouton favori */
.favorite-btn {
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn.active i {
    color: #ef4444;
}

.favorite-btn.scale-125 {
    transform: scale(1.25);
}

/* Notification simple */
.simple-notification {
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bg-orange-500 {
    background: #0f8f3e;
}