The listed range in the weapon table is the range per increment. You get 5 increments for thrown weapons and 10 for projectile weapons:
Range: Any attack at more than this distance is penalized for range... A thrown weapon has a maximum range of five range increments. A projectile weapon can shoot to 10 range increments.
Firearms, however, work different:
Range and Penetration: Armor, whether manufactured or natural, provides little protection against the force of a bullet at short range.
Early Firearms: When firing an early firearm, the attack resolves against the target’s touch AC when the target is within the first range increment of the weapon, but this type of attack is not considered a touch attack for the purposes of feats and abilities such as Deadly Aim. At higher range increments, the attack resolves normally, including taking the normal cumulative –2 penalty for each full range increment. Unlike other projectile weapons, early firearms have a maximum range of five range increments. [emphasis added]
Advanced Firearms: Advanced firearms resolve their attacks against touch AC when the target is within the first five range increments, but this type of attack is not considered a touch attack for the purposes of feats such as Deadly Aim. At higher range increments, the attack resolves normally, including taking the normal cumulative –2 penalty for each full-range increment. Advanced firearms have a maximum range of 10 range increments.
In addition, Modern and Technological firearms have their own rules sections.
Modern firearms don't clearly state whether they are Early or Advanced firearms for the purpose of range increments (except the Nagant M1895 Revolver), but are obviously supposed to follow the rules for Advanced Firearms since they are advanced firearms in the colloquial sense.
Technological Firearms benefit from the following rule:
Range: This lists the weapon’s range increment; no listing is given for melee weapons that cannot be thrown. Unless otherwise noted, all firearms in this chapter are treated as projectile weapons for the purpose of determining their maximum range.
Notable when discussing firearms, range increments, and Deadeye are the scope (25 gp, 1 lb), which reduces the range penalty by 1 per range increment, and the 'touch' weapon property found on several technological firearms like the laser rifle or gravity pistol, which lets the firearm target touch AC up to its maximum range instead of just within the first 1-or-5 increments.
You can't take the Attack action if your target isn't in range
When you take the Attack action you must immediately make an attack
When you take the Attack action you must immediately make an attack against a valid target.
As Jeremy Crawford has said, there is no gap between taking the Attack action and the attack that results from said action.
When you take an action, the action happens. There is no abstract "take an action" step that takes place before the action itself.
If you "take" the Attack action and don't attack, then you have not taken the action. The action and the resulting attack are one and the same.
You must pick a target as soon as you take the Attack action
Under the rules in the PHB under "Making an Attack" it lists the steps one must go through in order to perform an attack.
1. Choose a target. Pick a target within your attack's range: a creature, an object, or a location.
So, since the enemy is too far away to hit with your melee weapon you cannot choose them as a target for your Attack. However, if you didn't care about being able to attack the enemy, you could attack an object or a location that is within range and that would still be considered an attack for the purposes of Blade Flourish.
After you have completed your Attack, you can move (with extra movement)
No matter what you choose to attack, you can now move with whatever movement you have left plus 10 feet of bonus movement from Blade Flourish.
It is important to note that also that rules only allow you to move during an Attack action if you have multiple attacks. In that specific case, it only allows you to move between the attacks, but not before the first attack. No rule allows someone to move during an Attack action before the first attack.
However, if you are only able to make one attack per turn, then you just used your only attack on an object (for example) which gives you enough movement to reach them, but you have no attacks left to attack them with.
Scenario 1
The Bard can take the attack action to attack a rock nearby. After the attack completes, they can move 40 feet and be within melee range of the enemy. However, since they have already spent their Attack, they cannot attack the enemy this turn.
Scenario 2 & 3
As far as I can tell both of these are exactly the same for the rules that are relevant to Blade Flourish.
The Bard does not get extra movement unless they take the Attack action first. Since the enemy has total cover against the Bard, the Bard cannot attack them from their current position. They can attack an object or something and that will give them extra movement just like Scenario 1.
However, why not just use the Bard's normal movement to go around the corner? Once you see the enemy you can attack them if you are within range. If you attack the enemy (instead of an object/location) then you get the benefits of the extra movement and the extra flourishes the result when you hit a creature.
If the enemy more than 30 feet away however, then the Bard will have to choose between using their Attack to get the bonus movement (and not be able to attack the enemy) or if they want to take another action.
If all you want is extra movement, just use Dash
If you are already spending an action to gain movement and already losing your attack, then you should just take the Dash action and get a lot more movement from that spent action.
Really the true benefit from Blade Flourish comes from when you actually have something within your movement/range that you want to Attack and you get the movement as a bonus to that Attack. It doesn't seem to have much use as an ends to gain more movement when there is already an mechanic made for that very purpose.
Best Answer
Let's get one thing out of the way first: Playing on a grid is a variant to the normal rules. These variant rules can be found in the green insert/sidebar on page 192 of the Player's Handbook. To calculate range using these rules you count squares as though you were moving:
In these rules diagonal squares are treated as 5 ft. apart.
This rule "sacrifices realism for the sake of smooth play." The Dungeon Master's Guide (p. 252) includes the additional variant rule1 that every second diagonal counts as 5 additional feet.
1: Yo dawg, I heard you liked variant rules...