/* Widget utilisateurs en ligne */
.online-users-widget {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.online-users-btn {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%) !important;
    color: #1f2937 !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 50px !important;
    padding: 7px 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    white-space: nowrap !important;
    position: relative !important;
}

.online-users-btn:hover {
    background: linear-gradient(180deg, #f3f4f6 0%, #eff0f3 100%) !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 6px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-2px) !important;
    border-color: #d1d5db !important;
}

.online-users-btn:active {
    transform: translateY(0) !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.online-users-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.online-users-dot {
    width: 10px !important;
    height: 10px !important;
    background: #10b981 !important;
    border-radius: 50% !important;
    animation: pulse 2s infinite !important;
    box-shadow: 
        0 0 0 3px rgba(16, 185, 129, 0.2),
        0 0 8px rgba(16, 185, 129, 0.6) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
}

.online-users-count {
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.6) 0%, rgba(229, 231, 235, 0.6) 100%) !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    min-width: 24px !important;
    text-align: center !important;
    border: 1px solid rgba(209, 213, 219, 0.5) !important;
    color: #1f2937 !important;
}

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

/* Modal/Popup */
.online-users-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.online-users-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.online-users-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.online-users-header {
    background: linear-gradient(90deg, #1a1a1a 0%, #2d1415 50%, #8b0000 100%) !important;
    color: white !important;
    padding: 20px !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.online-users-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-users-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.online-users-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.online-users-list {
    padding: 20px;
    list-style: none;
    margin: 0;
}

.online-users-item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px !important;
    margin-bottom: 10px !important;
    background: #f9fafb !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    border: 1px solid #e5e7eb !important;
}

/* Lien qui englobe l'avatar et les infos */
.online-users-link {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    text-decoration: none !important;
    color: inherit !important;
    width: 100% !important;
}

.online-users-item:hover {
    background: #f3f4f6 !important;
    transform: translateX(4px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.online-users-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    font-size: 18px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    border: 2px solid #fff !important;
}

/* Image d'avatar à l'intérieur du conteneur circulaire */
.online-users-avatar img,
.online-users-avatar .online-users-avatar-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.online-users-info {
    flex: 1;
}

.online-users-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin: 0;
}

.online-users-status {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.online-users-status-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
}

.online-users-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.online-users-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .online-users-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .online-users-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .online-users-header h2 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .online-users-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .online-users-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}
