Electronic properties and phase transitions in calcium, strontium and barium at elevated temperatures