ADC STM32L476RG : Why do I have an offset when connected to 0V?
Actually everything is working perfectly. You have just configured the ADC in differential mode so that it measures the difference between PC0 and PC1. This difference can be positive or negative depending on whether PC0 is greater than PC1 or PC1 is greater than PC0. When they are equal to each other, the ADC reading is in the middle, which is what you are observing with the 1981 value (approximately half full scale of 4096).

Change the ADC_DIFFERENTIAL_ENDED constant to put the ADC into single ended mode (measurements relative to VREF) if you don't want this behaviour.