/*============================================
 5. CSS pour les indicateurs de statut en ligne
 ============================================
*/

.contact-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    flex-shrink: 0;
    position: relative;
}

.contact-status.online {
    background-color: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.6);
}

.contact-status.online::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-online 2s infinite;
}

.contact-status.offline {
    background-color: #6c757d;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-indicator.online {
    background-color: #28a745;
    animation: pulse-online 2s infinite;
}

.status-indicator.offline {
    background-color: #6c757d;
}

@keyframes pulse-online {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Amélioration de la visibilité dans les listes de contacts */
.contact-item {
    position: relative;
}

.contact-item .contact-status {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
}

/* Indicateur dans le header du chat */
.chat-user-status {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

    .chat-user-status .status-indicator {
        margin-right: 5px;
    }
