Le pattern Décorateur ajoute dynamiquement du comportement ou des responsabilités aux objets en les enveloppant — sans modifier la classe originale. Il fournit une alternative flexible à l'héritage pour étendre les fonctionnalités, en vous permettant de composer des comportements.
Ce que fait le pattern Décorateur
DECORATOR → WRAP an object to add behavior, keeping the same interface:
→ the decorator wraps the original, adds its behavior, and delegates to the original
→ you can STACK decorators (wrap a wrapped object) → compose multiple behaviors
→ adds functionality WITHOUT modifying the original class or using subclassing
→ "wrap to extend" — flexible, composable behavior addition
