/**
 * @file
 * The header components.
 *
 * It includes styles for the header itself and their
 * component as the logotype or the main menu.
 */

/**
 * Global header rules
 */
.gin--horizontal-toolbar .header{
  top: 53px;
}
.gin--horizontal-toolbar .header__menu.is-active{
  top: 155px;
}
@media all and (min-width: 1000px) {
  .gin--horizontal-toolbar .header__menu.is-active{
    top: 53px;
  }  
}

.header {
  background-color: #774C3F;
  position: fixed;
  width: 100%;
  z-index: 20;
  font-weight: bold;
  top: 0;
}
.header-inner {
  padding: 0.85rem 0;
}
.header-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}


/**
* Branding block
*/

.header__brand {
  position: relative;
  z-index: 4;
}
.header__brand a {
  width: 200px;
  height: 75px;
}


/**
* Main menu
*/

header .block-system-branding-block img {
  display: block;
  height: 75px;
}
.header__menu {
  background-color: #FFF4EA;
  width: 100%;
  position: fixed;
  transition: all ease .33s;
  z-index: 3;
  bottom: 0;
  left: 110%;
  top: 103px;
  overflow-y: hidden;
}
.header__menu.is-active {
  left: 0;
}
header  a.menu__link.is-active {
  color: #774C3F;
}
header .navigation ul.menu--level-0 {
  display: flex;
  flex-direction: column;
  margin: 0;
}
header ul.menu--level-1 {
  margin: 0;  
}
header a {
  display: block;
}
header .menu__item--level-0 a {
  font-size: 1.5rem;
  padding: 1.5rem 0;
  padding-left: 2rem;
}
header .menu__item--level-1 a {
  font-size: 1.1rem;
  padding: 0.5rem;
  padding-left: 4rem;
}
header .menu__item a.is-active {
  text-decoration: underline;
}
header .menu__link {
  color: #774C3F ;
}

@media all and (min-width: 1000px) {
  .header__menu {
    position: absolute;
    background-color: transparent;
    transform: translate(0%);
    width: 80%;
    top: 15px;
    left: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 76px;
    overflow-y: inherit;
  }
  .header__menu.is-active {
    left: 200px;
  }
  header  a.menu__link.is-active {
    color: #FFF4EA;
  }
  .region-primary-menu {
    display: flex;
    justify-content: space-between;
  }
  header nav.navigation {
    width: 85%;
  }
  header .navigation ul.menu--level-0 {
    flex-direction: row;
    align-items: center;  
    margin: 0;
    justify-content: flex-end;
  }
  header .menu__item--level-0 a {
    display: inline-block;
    position: relative;
  }
  header .menu__item--level-0 > .menu__link:after {
    content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #FFF4EA;
  transform-origin: bottom right;
  transition: transform 0.2s ease-out;
  }
  header .menu__item--level-0 > .menu__link:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
  }  
  header .menu__item--level-1 .menu__link {
    border: 1px solid transparent;
    transition: 0.25s;
  }
  header .menu__item--level-1 .menu__link:hover {
    border: 1px solid #774C3F;
    background-color: #FFF4EA;
    color: #774C3F;
  }
  header .menu__item--level-0 > a {
    font-size: 1rem;
    color: #FFF4EA;
    display: block;
    white-space: nowrap;
    padding: 1.4rem 1rem;
  }
  header .menu__item--level-1 .menu__link {
    font-size: 1rem;
    color: #FFF4EA;
    display: block;
    white-space: nowrap;
    padding: 10px 20px;
  }
  header .menu .menu__item:nth-child(5) a {
    background-color: white;
    border-radius: 8px;
    padding: 10px 20px;
    color: #774C3F;
  }
  header .menu .menu__item:nth-child(5) a:after {
    bottom: -12px;
  }
  header .menu__item--expanded {
    position: relative;
  }
  header .menu__item--expanded ul.menu {
    margin: 0;
  }
  header .menu__item--expanded:hover .menu--level-1 {
    display: block;
    position: absolute;
    background-color: #774C3F;
  }
  header .menu--level-1 {
    display: none;   
  }
  header .menu__item--level-1 {
    text-align: left;
  }
}
@media all and (max-width: 400px) {
  header .menu__item--level-0 a {
    font-size: 1.5rem;
    padding: 0.5rem 0;
    padding-left: 1rem;
  }
  header .menu__item--level-1 a {
    font-size: 1.1rem;
    padding: 0.2rem;
    padding-left: 2rem;
  }
}



/**
* Language block
*/

.block-language {
  position: relative;
  display: flex;
  align-items: center;
  margin: 2rem;
}
.block-language .language-dropdown-btn{
  width: 30px;
  height:30px;
  position: absolute;
  background-color: #774C3F;
  background-image: url('../images/Chevron.png');
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  cursor: pointer;
  border-radius: 0.2rem;
  left: 45%;
  border: none;
}
.block-language .language-dropdown-btn.is-active{
  z-index: 0;
}
.block-language .links{
  position: relative;
  height: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}
.block-language .links.is-active{
  overflow: visible;
}
.block-language li {
  display: flex;
  align-items: center;
  list-style-type: none;
}
.block-language .links li{
  order: 2;
}
.block-language .links li.is-active{
  order: 1;
}
.block-language li.fr::before {
  content:"";
  display:inline-block;
  width:30px;
  height:30px;
  background:url(../images/icons8-france-96.png) no-repeat;
  background-size:100%;
}
.block-language li.en::before {
  content:"";
  display:inline-block;
  width:30px;
  height:30px;
  background:url(../images/icons8-united-kingdom-96.png) no-repeat;
  background-size:100%;
}
.block-language li .language-link {
  color: #774C3F;
  margin-left: 5px;
}
.block-language .links a{
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  vertical-align: middle;
  align-items: center;
  flex-direction: column;
}

@media all and (min-width: 1000px) {
  .block-language {
    transform: none;
    margin: 0;
  }
  .block-language .language-dropdown-btn{
    background-color: transparent;
    left: 100%;
    border: none;
  }
  .block-language .links {
    height: 25px;
  }
  .block-language .links a {
    font-size: 1rem;
  }
  .block-language li .language-link {
    color: white;
  }
  .block-language li.fr::before {
    width:19px;
    height:19px;
  }
  .block-language li.en::before {
    width:19px;
    height:19px;
  }
}
@media all and (max-width: 400px) {
  .block-language {
    margin: 0;
  }
  .block-language .language-dropdown-btn{
    left: 80%;
  }
}

/**
 * Mobile menu button
 */

.menu-toggle{
  position: absolute;
  right: 10%;
  top: 50%;
  width: 22px;
  height: 16px;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
}
.menu-toggle__button{
  border: none;
  width: 22px;
  height: 16px;
  padding: 0;
  text-indent: 100px;
  background-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  z-index:1;
  position: absolute;
  left:0;
  top:0;
}
.menu-toggle span {
  position: absolute;
  left: 1px;
  display: block;
  width: 20px;
  height: 3px;
  background-color:#FFF4EA;
  transition: all ease .25s;
  -webkit-transition: all ease .25s;
  -moz-transition: all ease .25s;
  -ms-transition: all ease .25s;
  -o-transition: all ease .25s;
  border-radius: 0.1rem;
  -webkit-border-radius: 0.1rem;
  -moz-border-radius: 0.1rem;
  -ms-border-radius: 0.1rem;
  -o-border-radius: 0.1rem;
}
.menu-toggle span:nth-child(1) {
  top: 1px;
}
.menu-toggle span:nth-child(2) {
  top: 7px;
  left: 6px;
  width: 15px;
}
.menu-toggle span:nth-child(3) {
  top: 13px;
}
.menu-toggle:hover span:nth-child(1),
.menu-toggle.is-active span:nth-child(1),
.menu-toggle:hover span:nth-child(3),
.menu-toggle.is-active span:nth-child(3){
  width: 20px;
}
.menu-toggle.is-active span:nth-child(1) {
  top: 7px;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}
.menu-toggle.is-active span:nth-child(2) {
  width: 0;
  left: 22px;
}
.menu-toggle.is-active span:nth-child(3) {
  top: 7px;
  -webkit-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
}
@media all and (min-width: 1000px) {
  .menu-toggle{
    display: none;
  }
}
@media all and (max-width: 300px) {
  .menu-toggle__button {
    top: -16px;
  }
}
