"""Compile styles/forge-theme.scss (tokens Forge + Bulma vendoré en local, voir regles/FORGE_ENGINE_TEMPLATE_BULMA.md) en static/style.css — le seul fichier CSS chargé par les templates (un seul , inchangé). Pas de build automatique : lancer `python build_css.py` après toute modification sous styles/.""" import os import sass _BASE_DIR = os.path.dirname(os.path.abspath(__file__)) _ENTRY = os.path.join(_BASE_DIR, "styles", "forge-theme.scss") _OUTPUT = os.path.join(_BASE_DIR, "static", "style.css") def build(): css = sass.compile( filename=_ENTRY, include_paths=[os.path.join(_BASE_DIR, "styles")], output_style="expanded", ) with open(_OUTPUT, "w", encoding="utf-8") as f: f.write(css) print(f"Compilé : {_ENTRY} -> {_OUTPUT} ({len(css)} octets)") if __name__ == "__main__": build()