Tiles Alert

by piiantom

HTML

<div>
  <div class="tile"><p><span>Tâche <br/>en retard</span><b>0</b></p></div>
  <div class="tile"><p><span>Tâche <br/>à traiter</span><b>0</b></p></div>
  <div class="tile"><p><span>Tâche <br/>traitée <br/>aujourd'hui</span><b>0</b></p></div>
</div>
<div>
  <div class="tile danger"><p><span>Tâche <br/>en retard</span><b>1</b></p></div>
  <div class="tile warning"><p><span>Tâche <br/>à traiter</span><b>1</b></p></div>
  <div class="tile success"><p><span>Tâche <br/>traitée <br/>aujourd'hui</span><b>1</b></p></div>
</div>

CSS

.tile{
  display: inline-block;
  vertical-align: middle;
  background-color: red;
  font-size: 15px;
  height: 88px;
  line-height: 86px;
  width: 206px;
  margin: 10px 10px;
  position: relative;
  -moz-box-shadow: 0px 0px 21px rgba(15,5,53,.1);
  -webkit-box-shadow: 0px 0px 21px rgba(15,5,53,.1);
  -o-box-shadow: 0px 0px 21px rgba(15,5,53,.1);
  box-shadow: 0px 0px 21px rgba(15,5,53,.1);
}
.tile:after{
   content: '';
   width: 80%;
   height: 6px;
   background-color: red;
   position: absolute;
   left: 0;
   right: 0;
   margin: 0 auto;
   -moz-box-shadow: 0px 7px 31px rgba(15,5,53,.3);
   -webkit-box-shadow: 0px 7px 31px rgba(15,5,53,.3);
   -o-box-shadow: 0px 7px 31px rgba(15,5,53,.3);
   box-shadow: 0px 7px 31px rgba(15,5,53,.3);
   bottom: 0px;
   z-index: 0;
}
.tile p{
  margin: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  position: relative;
  z-index: 1;
}
.tile p>*{
  display: inline-block;
  vertical-align: middle;
}

.tile span{
  width: calc(100% - 88px);
  line-height: initial;
  padding: 0 0 0 30px;
  box-sizing: border-box;
  color: #434343;
}
.tile b{
  width: 88px;
  height: 100%;
  text-align: center;
  color: #d0d3e0;
  font-size: 30px;
}

.tile.danger span, .tile.warning span, .tile.success span{
  color: rgba(255,255,255,.75);
}
.tile.danger b, .tile.warning b, .tile.success b{
  color: #fff;
  background-color: rgba(29,43,62,.08);
}
.tile.danger p{
  background-color: #ee073e;
}
.tile.warning p{
  background-color: #f59343;  
}
.tile.success p{
  background-color: #05c3c5;  
}