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

/**
 * Global header rules
 */
.main-header{
  position: relative;
  background-color:#fff;
}
.main-header__pre-nav{
  padding-left:1rem;
}
.region-header{
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
}
@media screen and (min-width:1000px) {
  .main-header__pre-nav{
    padding-left:3rem;
  }
}
@media screen and (min-width:1250px) {
  .main-header__pre-nav{
    padding-left:6rem;
  }
}

/**
 * Branding block
 */
.brand-logo{
  display: inline-block;
  position: relative;
  padding: 1rem 2rem 1rem 1.25rem;
}
.brand-logo img{
  width:115px;
  height:19px;
}
.brand-logo a:before,
.brand-logo a:after{
  content:'';
  position: absolute;
  top:0;
  background-position: top center;
  background-repeat: no-repeat;
  background-size: contain;
}
.brand-logo a:before{
  width:41px;
  height:91px;
  background-image:url('../images/prev-logo.svg');
  left:0px;
}
.brand-logo a:after{
  width:40px;
  height:23px;
  background-image:url('../images/after-logo.svg');
  right:0px;
}
@media screen and (min-width:1000px) {
  .brand-logo img{
    width:253px;
    height:42px;
  }
  .brand-logo{
    padding:2.5rem 4rem;
  }
  .brand-logo a:before{
    width:71px;
    height:182px;
  }
  .brand-logo a:after{
    width:58px;
    height:55px;
    background-image:url('../images/after-logo-desktop.svg');
  }
}


/**
 * Search widget
 */
/* Search widget -- Button -- Search widget */
.search-btn{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding:0 1.125rem;
  cursor: pointer;
  font-size: 1.125em;
}
.search-btn .field--name-field-texte-brut{
  display: none;
}
.search-input{
  position: absolute;
  left:0;
  background-color:#FC0019;
  padding:1em;
  top:-100%;
  width: 100%;
  transition:all 0.5s;
  z-index:2;
}
.search-input.is-active{
  top:100%;
}
.search-input .form-item,
.search-input .form-actions{
  padding:0;
  margin:0;
}
.search-input .form-item{
  display: inline-block;
  width: 100%;
  vertical-align: bottom;
  float: none;
}
.search-input .form-text{
  padding:0;
  border:none;
  background-color: transparent;
  color:#fff;
  font-size: 1em;
  width: 100%;
  max-width: 100%;
}
.search-input .form-text::placeholder{
  color: #fff;
  opacity: 1;
}
.search-input .form-actions{
  position: absolute;
  right:0.5rem;
  top:50%;
  transform:translateY(-50%);
}
.search-input .form-submit{
  padding:0;
  border:none;
  background:none;
  text-indent: -999rem;
  width:26px;
  height:26px;
  background-image: url('../images/icon-search-white.svg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}
.search-input form{
  max-width: 500px;
  margin:0 auto;
  border:1px solid #fff;
  position: relative;
  padding:0.75rem 2rem 0.75rem 0.75rem;
}
@media screen and (min-width:1000px) {
  .search-btn{
    padding:0 3rem;
  }
  .search-btn .field--type-image{
    padding-bottom:1rem;
    padding-left:0.75rem;
  }
  .search-btn .field--name-field-texte-brut{
    display: block;
  }
}
@media screen and (min-width:1200px) {
  .search-input .form-text{
    font-size: 1.125em;
  }
}


/**
 * Secondary menu
 */
/* Secondary menu -- button -- Secondary menu */
.secondary-menu{
  display: block;
}
.secondary-menu .menu{
  margin:0;
  height:100%;
}
.secondary-menu li{
  padding:0;
  height:100%;
}
.secondary-menu a{
  height:100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-indent: -999rem;
  overflow: hidden;
  width: 62px;
  background-color:#111111;
  background-image:url('../images/icon-map-white.svg');
  background-position: center;
  background-size: 20px 30px;
  background-repeat: no-repeat;
  transition:all 0.25s;
  color:#fff;
}
.secondary-menu ul li a.is-active{
  color:#fff;
}
.secondary-menu a br{
  display: none;
}
.secondary-menu a:hover,
.secondary-menu ul li a.is-active{
  background-color:#0A8751;
}
.secondary-menu a:visited, .secondary-menu a:focus{
  color:#fff;
}
@media screen and (min-width:1000px) {
  .secondary-menu a{
    text-align: center;
    padding: 1rem 2.5rem;
    font-size: 1.25em;
    width: inherit;
    text-indent: 0rem;
    background-image: none;
  }
  .secondary-menu a br{
    display: block;
  }
}

/**
 * Main menu
 */
.region-primary-menu{
  display: none;
}
.region-primary-menu.is-active{
  display: block;
}
.main-header__nav{
  background-color:#FC0019;
}
.menu--main .menu{
  margin:0;
  padding:0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.menu--main .menu-item{
  padding:0;
  width: 100%;
}
.menu--main a{
  color:#fff;
  text-transform:uppercase;
  position: relative;
  padding:0.5rem;
  font-size: 1em;
  display: inline-block;
  text-align: center;
}
.menu--main li a.is-active{
  color:#fff;
}
.menu--main li a.is-active:after{
  opacity: 1;
  bottom:-3px;
}
.menu--main .menu-item--expanded .menu {
  background-color: #111111;
}
@media screen and (min-width:1000px) {
  .region-primary-menu{
    display: block;
  }
  .menu--main .menu{
    flex-direction: row;
    align-items: center;
    padding: 0 0 0 6.25rem;
  }
  .menu--main .menu-item{
    width: inherit;
  }
  .menu--main a{
    padding:1.25rem 1.5rem 1.25rem 1.5rem;
    font-size: 0.85em;
  }
  .menu--main li:hover{
    background-color: #111111;
  }
  .menu--main .menu-item--expanded {
    position: relative;
  }
  .menu-item--expanded {
    list-style: none;
  }
  .menu--main .menu-item--expanded .menu-item {
    padding: 0.5rem 0;
  }
  .menu--main .menu-item--expanded .menu {
    position: absolute;
    top:  100%;
    flex-direction: column;
    z-index: 1;
    padding: 1.25rem;
    left: 0;
    right: 0;
    align-items: flex-start;
    display: none;
  }
  .menu--main .menu-item--expanded .menu a{
    padding: 0;
  }
  .menu--main .menu-item--expanded .menu a:after{
    content:'';
    display: block;
    width: 100%;
    height:1px;
    background-color:#fff;
    bottom:-10px;
    position: absolute;
    left: 0;
    opacity: 0;
    transition: 0.1s;
  }
  .menu--main .menu-item--expanded .menu a:hover:after{
    bottom:-3px;
    opacity: 1;
  }
  .menu--main .menu-item--expanded:hover .menu {
    display: block;
  }
}
@media screen and (min-width:1200px) {
  .menu--main a{
    font-size: 1em;
  }
}
@media screen and (min-width:1250px) {
  .menu--main .menu{
    padding-left: 10.25rem;
  }
}
@media screen and (min-width:1300px) {
  .menu--main .menu{
    flex-direction: row;
    align-items: center;
  }
  .menu--main a{
    font-size: 1.125em;
  }
}

/* Main menu -- Burger Menu -- Main menu */
.menu-toggle{
  line-height: 0;
  margin: 0;
  display: inline-block;
  text-align: right;
  padding:0.75rem 1.75rem;
  width: 100%;
}
.menu-toggle__button{
  height:23px;
  width:25px;
  padding: 0;
  line-height:0;
  text-indent: -999em;
  background-color: transparent;
  border: none;
  text-align: center;
  position: relative;
}
.menu-toggle__bar{
  position: absolute;
  width:25px;
  height:2px;
  border-radius:9999em;
  background-color:#fff;
  top: calc(50% - 2.5px);
  display: block;
  -webkit-transition: all ease .25s;
  -o-transition: all ease .25s;
  transition: all ease .25s;
}
.menu-toggle__bar:first-child {
  top: 0%;
}
.menu-toggle__bar:last-child {
  top: calc(100% - 5px);
}
.is-active .menu-toggle__bar {
  opacity: 0;
}
.is-active .menu-toggle__bar:first-child,
.is-active .menu-toggle__bar:last-child {
  top: 45%;
  opacity: 1;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}
.is-active .menu-toggle__bar:last-child {
  -webkit-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}
@media screen and (min-width: 1000px) {
  .menu-toggle{
    display: none;
  }
}
