Because this project uses ES Modules (<script type="module">) and Dynamic Content Loading (fetch()), for security reasons, it CANNOT be run by simply double-clicking index.html. Browsers block these features when using the file:// protocol.
You MUST run a local web server.
- Install the "Live Server" extension in VS Code.
- Right-click
index.html. - Select "Open with Live Server".
- Open a terminal in this folder.
- Run:
python -m http.server - Open
http://localhost:8000in your browser.
- Open a terminal in this folder.
- Run:
npx http-server - Open the address shown (usually
http://127.0.0.1:8080).
- No Styles: If the CSS isn't loading, ensure the
cssfolder is in the same directory asindex.html. - No Content / "Paiement confirmé": The content is loaded dynamically via JavaScript. If the server isn't running, the browser blocks the script, so the content never loads.