import ctypes
from sys import platform

def enable_blur_behind(hwnd: int) -> None:
    """Force DWM à activer la composition derrière la fenêtre."""
    if not platform.startswith('win'):
        return
    try:
        margins = (ctypes.c_int * 4)(-1, -1, -1, -1)
        ctypes.windll.dwmapi.DwmExtendFrameIntoClientArea(hwnd, ctypes.byref(margins))
    except Exception:
        pass  # Silencieux si DWM indisponible
