/*------------------------------------------------------------
TITLES
====================================*/

// Titles
.h1 {
  @extend %h1;
  &.decorate {
    display: inline-block;
    position: relative;
    padding-left: 1rem;
    &:first-letter {
      font-size: ($h1-font-size - 0.2rem);
      color: $primary;
      font-weight: $font-weight-light;
    }
    &:before {
      content: '';
      display: inline-block;
      width: 4rem;
      height: 4rem;
      position: absolute;
      top: -0.2rem;
      margin-left: -1rem;
      z-index: -1;
      background: url('~media/icons/bg-title.svg');
      background-size: contain;
    }
  }
}
.h2 {
  @extend %h2;
  font-family: $font-family-serif;
  font-weight: $font-weight-bold;
}
.h3 {
  @extend %h3;
  text-transform: uppercase;
  font-family: $font-family-serif;
  font-weight: $font-weight-medium;
  color: $primary;
}
.h4 {
  @extend %h4;
  font-weight: $font-weight-sbold;
}
.h5 {
  @extend %h5;
}
.h6 {
  @extend %h6;
  font-weight: $font-weight-sbold;
}

.display-1,
.display-2,
.display-3,
.display-4 {
  font-family: $display-font-family;
}
.display-1 {
  @extend %display-1;
}
.display-2{
  @extend %display-2;
}
.display-3{
  @extend %display-3;
}
.display-4 {
  @extend %display-4;
}

// Titre header
.title-header-wrapper {
  display: flex;
  margin-bottom: 2.5rem;
  color: $title-header-text;
  align-items: flex-start;

  .icon-pattern-wrapper {
    margin-right: 2.5rem;
  }

  .header-title {
    font-size: $title-header-size;
    line-height: normal;
  }
  .header-subtitle {
    margin-bottom: 0;
  }
}

/* RESPONSIVE */
/***************************************/
@include media-breakpoint-down(md) {
  // Titre H1 avec décoration
  .h1.decorate {
    &:first-letter {
      font-size: inherit;
    }
    &:before {
      width: 3.5rem;
      height: 3.5rem;
    }
  }
}

@include media-breakpoint-down(sm) {
  // Titre H1 avec décoration
  .h1.decorate {
    padding-left: 0.7rem;
    &:before {
      width: 3rem;
      height: 3rem;
      top: -0.1rem;
      margin-left: -0.7rem;
    }
  }
}

@include media-breakpoint-up(md) {
  .title-header-wrapper {
    margin-bottom: 4rem;
  }
}
