Somewhere I have a book which I don't remember the title of, which was a very good biography of Humphrey Bogart. One chapter of it was devoted to the making of Casablanca and why it became so popular. It was indeed an ad hoc production, and often pages of the script were rushed to the players immediately before a scene was filmed so there was no time to do even a rudimentary rehearsal first. A big contributor to its box office success was that it was released about the same time as the Allied North Africa invasion occurred, so the name "Casablanca" was in the headlines, and people rushed to see it. All through the production it was never expected that it would be a blockbuster hit, just another low budget grade B potboiler romance.
Bogart was a couple of inches shorter than Ingrid Bergman, so most of the side-by-side scenes were made with Bogart standing on a box so he appeared taller than her.
Some might remember there was a Casablanca TV series back in the 1980s. I think I saw a few episodes, didn't think much of it. Another thing was that I remember that Ted Turner had it colorized for TCM, also back in the 1980s. It was highly criticized by many as sacrilege. I believe that the colorized version was aired only a few times.
One other thing I remember was that the set used for the on-screen scenes inside Rick's Cafe Americain was recycled from an earlier Warner Brothers movie which was shot several years earlier.
I also once read a book which was both a prequel and a sequel to the movie that explained how and why Rick got to Casablanca, and what happened to him and the other characters after the movie ended. I don't remember its title or the author, but it was really pretty good and would probably have made a good movie itself.
--------------------
This is that book
https://www.amazon.com/As-Time-Goes-Novel-Casablanca/dp/0446519006