/* General */

html {
  height: 100%; /* sticky footer */
}

body {
  min-height: 100%; /* sticky footer */
  position: relative; /* sticky footer */
  padding: 15px;
  padding-bottom: 50px; /* sticky footer */
}

body.page-picture {
  padding-bottom: 80px;
}

/* grid system */

.no-gutter > [class*='col-'] {
  padding-left: 0;
  padding-right: 0;
}

/* navbar */

.navbar-default,
.navbar-default .navbar-collapse {
  background-color: transparent;
  border-color: transparent;
}

.navbar {
  min-height: 65px;
}

.navbar > .container-fluid {
  padding: 0;
}

.navbar-brand {
  height: 65px;
  padding: 0px; /* Firefox */
}

/* menu */

#site-menu {
  padding: 0px;
}

#site-menu .nav > li > a {
  margin: 0 5px;
  padding: 5px 10px;
}

#site-menu .nav > li > a:focus,
#site-menu .nav > li > a:hover {
  text-decoration: underline;
  background: none;
}

/* footer */

.navbar-wrapper {
  position: inherit;
}

#site-footer {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  text-align: center;
  line-height: 30px;
}

#site-footer p {
  padding: 15px;
}

/* portfolio */

.portfolio_picture {
  margin-bottom: 15px;
}

/* picture */

#pictureCaption {
  margin: 10px 0;
}

#picNav a {
  font-size: 20px;
  margin: 0 6px;
  vertical-align: middle;
}

#picFrame img {
 /* border: 0.3vmin solid #BBB; */
}

/* portfolio thumbnails */

a.thumbnail:hover {
  border-color: #BBB;
}

.portfolio_picture .thumbnail {
  position: relative;
  padding-top: 100%;
}

.portfolio_picture .thumbnail > img {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  max-height: calc(100% - 8px);
  max-width: calc(100% - 8px);
}

.portfolio_picture .thumbnail:hover > img {
  /*visibility:hidden;*/
  /*position:absolute;
  left:0;
  top:0;
  width: 100%;
  height: 100%;*/
  filter:alpha(opacity=50);
  -moz-opacity:0.5;
  -khtml-opacity: 0.5;
  opacity: 0.5;
  background: white;
}

.portfolio_picture .thumbnail:hover > img {
  /*visibility:visible;*/
  /*filter:alpha(opacity=100);
  -moz-opacity:1;
  -khtml-opacity: 1;
  opacity: 1;*/
}

/* picture container & align */

.vAlign {
  position: relative;
}

#tail {
  position: absolute;
  float: left;
  cursor: none;
  visibility: collapse;
}
#tail, #tail a {
  cursor: none;
}

/* carousel */
/* inspired from http://codepen.io/Rowno/pen/Afykb */

.carousel-fade .carousel-inner .item {
  opacity: 0;
  transition-property: opacity;
  /*transition-duration: 3s;*/
}

.carousel-fade .carousel-inner .active {
  opacity: 1;
}

.carousel-fade .carousel-inner .active.left,
.carousel-fade .carousel-inner .active.right {
  left: 0;
  opacity: 0;
  z-index: 1;
}

.carousel-fade .carousel-inner .next.left,
.carousel-fade .carousel-inner .prev.right {
  opacity: 1;
}

.carousel-fade .carousel-control {
  z-index: 2;
  visibility: hidden;
}


/*
WHAT IS NEW IN 3.3: "Added transforms to improve carousel performance in modern browsers."
now override the 3.3 new styles for modern browsers & apply opacity
*/

@media all and (transform-3d), (-webkit-transform-3d) {
    .carousel-fade .carousel-inner > .item.next,
    .carousel-fade .carousel-inner > .item.active.right {
      opacity: 0;
      -webkit-transform: translate3d(0, 0, 0);
              transform: translate3d(0, 0, 0);
    }
    .carousel-fade .carousel-inner > .item.prev,
    .carousel-fade .carousel-inner > .item.active.left {
      opacity: 0;
      -webkit-transform: translate3d(0, 0, 0);
              transform: translate3d(0, 0, 0);
    }
    .carousel-fade .carousel-inner > .item.next.left,
    .carousel-fade .carousel-inner > .item.prev.right,
    .carousel-fade .carousel-inner > .item.active {
      opacity: 1;
      -webkit-transform: translate3d(0, 0, 0);
              transform: translate3d(0, 0, 0);
    }
}

/* mobile */

@media(max-width:767px) {
  .navbar-brand > img {
    height: 100%; /* Firefox */
    padding: 15px; /* Firefox */
    width: auto; /* Firefox */
  }

  .navbar-toggle {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 11px 10px;
  }

  .navbar-toggle .icon-bar + .icon-bar {
    margin-top: 5px;
  }

  .navbar-default .navbar-toggle {
    border: 0px;
    -webkit-box-shadow: 0px 0px 1px #1a171b;
    -moz-box-shadow: 0px 0px 1px #1a171b;
    -o-box-shadow: 0px 0px 1px #1a171b;
    box-shadow: 0px 0px 1px #1a171b;
  }

  .navbar-default .navbar-toggle .icon-bar {
    background-color: #1a171b;
  }
}

/* tablet */

@media(min-width:768px){
  .container-fluid > .navbar-collapse {
    margin-left: -15px;
    margin-right: -15px;
  }

  .navbar-header {
    float: none;
  }

  .navbar-brand {
    display: block;
    float: none;
  }

  .navbar-brand > img {
    padding: 15px; /* Firefox */
    width: 100%; /* Firefox */
    width: 100% \9; /* Internet Explorer 8-10 */
    height: auto; /* Internet Explorer 8-10 */
    max-width: 220px;
  }

  #site-menu > ul {
    margin: 20px 0;
  }
}

@media(max-width:991px) {
  .pictureWrapper {
    max-height: none !important; /* sticky footer */
  }
}

/* desktop */

@media(min-width:992px){
  body {
    padding: 50px;
  }

  .navbar-header {
    margin-top: 20px;
  }

  #site-menu > ul {
    margin: 80px 0 0;
  }

  #site-menu > ul:first-child {
    margin-top: 40px;
  }

  .navbar-wrapper {
    min-height: 100%; /* sticky footer */
    position: fixed; /* sticky footer */
    padding-bottom: 160px;
  }

  .content-wrapper {
    margin-left: 25%; /* sticky footer */
  }

  #site-footer {
    bottom: 95px; /* sticky footer */
    text-align: left;
  }

  #site-footer a:after {
    content: ' ';
    display: block;
  }

  /* picture (full height) */

  body.page-picture { /* full height */
    height: 100%;
  }

  .page-wrapper,
  .columns-wrapper,
  .content-wrapper,
  .vAlign,
  #containingBlock,
  .pictureWrapper,
  #picFrame,
  .pictureWrapper .carousel,
  .pictureWrapper .carousel-inner,
  .pictureWrapper .item {
    height: 100%; /* full height */
  }

  #containingBlock {
    white-space: nowrap;
    text-align: center; /* vertical align middle */
  }

  .pictureWrapperHelper {
    display: inline-block; /* vertical align middle */
    height: 100%; /* vertical align middle */
    vertical-align: middle;
  }

  .pictureWrapper {
    vertical-align: middle;
    display: inline-block; /* vertical align middle */
    max-height: inherit; /* définie dans picture.twig.html *//* vertical align middle */
    max-width: 100%; /* vertical align middle */
  }

  #picFrame img,
  .pictureWrapper .carousel img { /* full height test */
    max-height: 100%; /* full height */
    height: auto; /* full height */
    width: auto; /* full height */
    width: auto \9; /* Internet Explorer 8-10 */
  }
}

/* large desktop */

@media(min-width:1200px){
  .content-wrapper {
    margin-left: 16.66666667%; /* sticky footer */
  }
}

/* IE10+ SVG */

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .navbar-brand > img.img-responsive[src$=".svg"] {
    width: 100%; /* Internet Explorer 8-10 */
    width: 100% \9; /* Internet Explorer 8-10 */
    height: auto; /* Internet Explorer 8-10 */
  }
}
