diff --git a/biscuit/apps/chronos/templates/chronos/tt_lesson.html b/biscuit/apps/chronos/templates/chronos/tt_lesson.html
index 0d49af53f08669741f93eeba0991059cd9d5e990..86994d3a2a03b1d1fd31084e3a91a85daa824ee0 100644
--- a/biscuit/apps/chronos/templates/chronos/tt_lesson.html
+++ b/biscuit/apps/chronos/templates/chronos/tt_lesson.html
@@ -1,11 +1,10 @@
 {# -*- engine:django -*- #}
 
 <div class="card chronos-lesson
-  {% if lesson_period.get_substitution %}
-  border border-warning
-  {% endif %}
   {% if lesson_period.get_substitution.cancelled %}
   border border-danger chronos-lesson-cancelled
+  {% elif lesson_period.get_substitution %}
+   border border-warning
   {% endif %}
   "
   style="