Michael weakened to a tropical storm early Thursday but only after wreaking a day of havoc along Florida’s Gulf Coast as it flooded homes and streets and toppled trees and power lines in the beachfront areas where it roared ashore as a raging Category 4 hurricane.