In practice, unless you're a top manager or directly involved in the final stage of some key contract negotiation or some such, the actual legal and financial risk is small. To seek damages, a French employer has to establish that your leaving without permission directly caused them some specific harm and that's a high bar to meet for most employees. Large employers do not bother, it's not worth the effort (I guess a vindictive small business owner might still do it out of spite).
Regarding leave days, they have to be approved by the employer and it's therefore up to them whethey they allow you to take time off at the end of your contract or if they prefer to have you work through to your last day and pay a lump sum instead. However, in light of the employer's lack of leverage on a departing employee, it is typically possible to negotiate on that.