@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes flash {
    from, 50%, to { opacity: 0.1; }
    25%, 75% { opacity: 0.6; }
}

@keyframes bounceInLeft {
    from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); }
    0% {
        opacity: 0;
        transform: translate3d(-3000px, 0, 0);
    }
    60% {
        opacity: 1;
        transform: translate3d(25px, 0, 0);
    }
    75% { transform: translate3d(-10px, 0, 0); }
    90% { transform: translate3d(5px, 0, 0); }
    to { transform: none; }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(.8, .8, .8);
    }

    50% {
        opacity: 1;
    }
}

@keyframes bounceInDown {
    from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); }
    0% {
        opacity: 0;
        transform: translate3d(0, -3000px, 0);
    }
    60% {
        opacity: 1;
        transform: translate3d(0, 25px, 0);
    }
    75% { transform: translate3d(0, -10px, 0); }
    90% { transform: translate3d(0, 5px, 0); }
    to { transform: none; }
}

@keyframes bounceInRight {
    from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); }
    from {
        opacity: 0;
        transform: translate3d(3000px, 0, 0);
    }
    60% {
        opacity: 1;
        transform: translate3d(-25px, 0, 0);
    }
    75% { transform: translate3d(10px, 0, 0); }
    90% { transform: translate3d(-5px, 0, 0); }
    to { transform: none; }
}

@keyframes fadeOutRight {
    from { opacity: 1; }
    to {
        opacity: 0;
        transform: translate3d(100%, 0, 0);
    }
}

@keyframes shake {
    from, to {
        transform: translate3d(0, 0, 0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translate3d(-5px, 0, 5px);
    }
    20%, 40%, 60%, 80% {
        transform: translate3d(5px, 0, -5px);
    }
}

@font-face {
    font-family: Biko;
    src: url('//lpfcdn.net/fonts/biko_regular-webfont.eot');
    src: url('//lpfcdn.net/fonts/biko_regular-webfont.eot?#iefix') format('embedded-opentype'),
    url('//lpfcdn.net/fonts/biko_regular-webfont.woff') format('woff'),
    url('//lpfcdn.net/fonts/biko_regular-webfont.ttf') format('truetype'),
    url('//lpfcdn.net/fonts/biko_regular-webfont.svg#bikoregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: BikoLight;
    src:url("//lpfcdn.net/fonts/biko_light-webfont.eot") format("eot"),
    url("//lpfcdn.net/fonts/biko_light-webfont.woff") format("woff"),
    url("//lpfcdn.net/fonts/biko_light-webfont.ttf") format("truetype"),
    url("//lpfcdn.net/fonts/biko_light-webfont.svg#Biko-Light") format("svg");
    font-weight:normal;
    font-style:normal;
}

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
    padding: 0;
    margin: 0;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: Biko;
}

body {
    padding-top: 65px;
    background-color: white;
    overflow: auto;
    z-index: 42;
}

header {
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    height: 65px;
    width: 100%;
    left: 0;
    top: 0;
    color: white;
    padding: 4px 13px;
    z-index: 2;
    overflow: hidden;
}

header h1 span {
    right: 16px;
    font-size: 15px;
    text-transform: uppercase;
    font-family: BikoLight;
    letter-spacing: 3px;
    white-space: nowrap;
    display: block;
    position: absolute;
    top: 0;
    line-height: 65px;
}

header .insta-link {
    display: inline-block;
    text-decoration: none;
    color: #FFF;
    letter-spacing: normal;
    margin-right: 6px;
    font-size: 14px;
}

.posts-wrapper {
    height: 100%;
    width: 100%;
}

.media-load.loading {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    color: #212121;
}

.media-load.loading:before {
    content: url("/img/loading.gif");
    display: block;
    font-size: 42px;
    width: 10%;
    text-align: right;
    padding-right: 10px;
}

.media {
    position: relative;
    width: 20%;
    padding-bottom: 20%;
    float: left;
    cursor: pointer;
    overflow: hidden;
    transform: scale(1);
}

.media .picture {
    position: absolute;
    top: 3%;
    left: 3%;
    width: 94%;
    height: 94%;
    background-size: cover;
    transition: all 0.333s ease;
    transform: scale(1);
}

.media .caption {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    opacity: 0;
    background: rgba(255, 255, 255, 0.76);
    transition: opacity 0.33s ease;
    padding: 30px;
    transform: scale(1);
    pointer-events: none;
}

.caption a {
    text-decoration: none;
    color: #212121;
    font-family: Biko;
}

.caption a:hover {
    text-decoration: underline;
}

.media:hover .caption {
    opacity: 1;
}

.media:hover .picture {
    transform: scale(1.1);
}

.product-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation-name: fadeIn;
    animation-duration: 0.333s;
    opacity: 0;
    background: rgba(255, 255, 255, 0.8);
    transition: opacity 0.333s ease;
    transform: scale(1);
    display: table;
    table-layout: fixed;
}

.product-overlay .previous, .product-overlay .next {
    top: 50%;
    border: solid rgba(0, 0, 0, 0);
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    border-color: rgba(0, 0, 0, 0);
    border-width: 20px;
    margin-top: -20px;
    text-indent: 999px;
    overflow: hidden;
    opacity: 0.5;
    transition: opacity 0.333s ease;
    cursor: pointer;
    z-index: 69;
}

.product-overlay .previous:hover, .product-overlay .next:hover {
    opacity: 1;
}

.product-overlay-group {
    position: relative;
    vertical-align: middle;
    overflow-y: scroll;
    height: 100%;
}


.product-overlay .previous {
    left: 0;
    border-right-color: rgba(0, 0, 0, 0.85);
}

.product-overlay .next {
    right: 0;
    border-left-color: rgba(0, 0, 0, 0.85);
}

.product-overlay.active {
    opacity: 1;
}

.embed-media {
    position: relative;
    animation-name: zoomIn;
    animation-duration: 0.333s;
    margin: 82px auto;
    display: block;
    width: 600px;
    max-width: 90%;
    background: #FFF;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.66);
    border: 1px solid #808080;
    border-radius: 4px;
}

.embed-media.nope {
    animation-name: shake;
    animation-duration: 0.333s;
}

.embed-media img {
    width: 100%;
    border-radius: 4px 4px 0 0;
}

.embed-media .caption {
    padding: 8px 16px 13px;
    font-family: BikoLight;
    font-size: 15px;
    line-height: 21px;
    color: #212121;
}

.embed-media.swipe-right {
    animation-name: fadeOutRight;
    animation-duration: 0.333s;
}

.embed-media .picture-wrapper {
    position: relative;
    overflow: hidden;
}

.embed-media .product-link {
    position: absolute;
}

.embed-media .product-link a {
    position: absolute;
    height: 28px;
    font-size: 15px;
    font-family: Biko;
    line-height: 27px;
    text-align: center;
    text-shadow: 0 1px rgba( 0, 0, 0, .25 );
    color: #fff;
    background: #f34c4f;
    border-radius: 50%;
    cursor: pointer;
    display: block;
    width: 28px;
    margin-left: -14px;
    margin-top: -14px;
    padding-right: 1px;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.58);
    opacity: 0.1;
    transition: all 0.333s ease;
    border: 2px solid #FFF;
    animation-name: flash;
    animation-duration: 2s;
    transform: scale(1);
}

.embed-media:hover .product-link a {
    opacity: 0.6;
}

.embed-media .product-link a .title {
    display: none;
}

.embed-media .product-link:hover a, .embed-media .product-link.active a {
    opacity: 1;
    transform: scale(1.2);
}

.embed-media .products-list {
    display: inline;
    margin-left: 6px;
}

.embed-media .products-list li {
    list-style: none;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}

.embed-media .products-list a {
    padding: 2px 10px 0;
    background: #ebebeb;
    color: #212121;
    border-radius: 7px;
    display: inline-block;
    text-decoration: none;
    font-family: Biko;
    transition: all 0.333s ease;
}

.embed-media .products-list li.active a, .embed-media .products-list a:hover {
    background: #f34c4f;
    color: white;
}

.embed-media .close-btn {
    position: absolute;
    top: -13px;
    right: -13px;
    cursor: pointer;
    background: #FFF;
    border: 2px solid #fff;
    border-radius: 50%;
    display: block;
    width: 28px;
    height: 28px;
    overflow: hidden;
    text-indent: 9999px;
    white-space: nowrap;
    opacity: 0.4;
    transition: all 0.333s ease;
    z-index: 123;
}

.embed-media .close-btn:hover {
    opacity: 1;
    border-color: #212121;
}

.embed-media .close-btn:before {
    content: 'x';
    position: absolute;
    top: 0;
    left: 0;
    width: 103%;
    line-height: 22px;
    text-align: center;
    text-indent: 0;
    font-size: 24px;
    font-family: BikoLight;
}

.media-load.load {
    width: 25%;
    padding-bottom: 25%;
    background: none;
    float: left;
    display: block;
    position: relative;
}

.media-load.load:before {
    content: "Suite";
    width: 100px;
    height: 100px;
    background: #000;
    border-radius: 50%;
    display: block;
    color: #FFF;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -50px;
    margin-top: -50px;
    line-height: 101px;
    text-align: center;
    text-transform: uppercase;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.333s ease;
}

.media-load.load:hover:before {
    opacity: 1;
}

.product-infos {
    position: absolute;
    background: #FFF;
    color: #212121;
    border-radius: 4px;
    padding: 55px 30px 30px 30px;
    left: 100%;
    z-index: 42;
    top: 0;
    width: 100%;
    bottom: 0;
    transition: left 0.333s ease;
}

.product-infos.active {
    left: 0;
}

.product-infos p {
    font-family: BikoLight;
    pointer-events: none;
}

.product-infos .title {
    font-family: Biko;
    padding-right: 100px;
    font-size: 30px;
    margin-bottom: 20px;
}

.product-infos .description {
    font-size: 22px;
    padding-right: 10px;
    align-items: center;
    justify-content: center;
    height: 50%;
    line-height: 34px;
}

.product-infos .price {
    position: absolute;
    top: 55px;
    right: 30px;
    font-size: 25px;
    font-family: Biko;
    font-weight: bold;
    color: #F00;
}

.product-infos .shop-link {
    position: absolute;
    left: 30px;
    bottom: 20px;
    right: 30px;
    text-transform: uppercase;
    color: #FFF;
    background: #f34c4f;
    padding: 9px 12px 8px;
    font-size: 16px;
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.44);
    opacity: 0.8;
    transition: opacity 0.333s ease;
    text-align: center;
    text-decoration: none;
}

.product-infos .shop-link:hover {
    opacity: 1;
}

.product-infos .back-link {
    position: absolute;
    top: 20px;
    font-size: 14px;
    text-transform: uppercase;
    padding-left: 30px;
    font-family: BikoLight;
    color: #aaa;
    cursor: pointer;
    left: 15px;
    padding-top: 2px;
}

.product-infos .back-link:before {
    content: '⟨';
    position: absolute;
    top: 0;
    font-size: 17px;
    left: 9px;
}

.squareshop-ad {
    position: fixed;
    right: 19px;
    bottom: 2px;
    display: block;
    opacity: 0.3;
    width: 150px;
    height: 40px;
    background: transparent url("/img/squareshop.png") no-repeat 0 0;
    background-size: 100% auto;
    text-indent: 99999px;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.333s ease;
}

.squareshop-ad:hover {
    opacity: 0.6;
}

@media screen and (max-height: 800px) {
    .embed-media {
        width: 500px;
    }
}

@media screen and (max-height: 700px) {
    .embed-media {
        width: 450px;
    }
}

@media screen and (max-height: 650px) {
    .embed-media {
        width: 300px;
    }
}

@media screen and (max-width: 1500px) {
    .media, .media-load.load {
        width: 25%;
        padding-bottom: 25%;
    }
}

@media screen and (max-width: 1000px) {
    header h1 span {
        font-size: 10px;
    }
    .media, .media-load.load {
        width: 33.333%;
        padding-bottom: 33.333%
    }
    .media-load.load:before {
        width: 50px;
        height: 50px;
        margin-top: -25px;
        margin-left: -25px;
        font-size: 10px;
        line-height: 52px;
    }
    .media .caption {
        display: none;
    }
}

@media screen and (max-width: 900px) {
    header h1 span {
        text-indent: 9999px;
        overflow: hidden;
        width: 182px;
    }
    header .insta-link {
        position: absolute;
        text-indent: 0;
        left: 0;
        top: 0;
    }
    .product-infos .description {
        font-size: 18px;
        line-height: normal;
    }
    .product-infos .title {
        font-size: 21px;
        margin-bottom: 11px;
    }
    .product-infos .price {
        font-size: 21px;
    }
}

@media screen and (max-width: 500px) {
    .media-load.loading {
        font-size: 18px;
        text-align: center;
        padding: 10px;
        display: block;
    }
    .media-load.loading:before {
        margin: 39% auto 10px;
    }
    .embed-media .close-btn {
        opacity: 0.8;
    }
    .media .picture {
        position: absolute;
        top: 2%;
        left: 2%;
        width: 96%;
        height: 96%;
    }
    .embed-media:after {
        content: "Cliquez sur les produits identifiés pour accéder à l'e-boutique.";
        padding: 5px 10px 10px 10px;
        display: block;
        text-align: center;
        color: #aaa;
        font-size: 13px;
    }
    .embed-media .caption {
        display: none;
    }
    .product-infos .description {
        font-size: 14px;
    }
    .product-infos .shop-link {
        font-size: 14px;
        bottom: 14px;
    }
    header h1 span {
        width: 32px;
        height: 32px;
        margin-top: 14px;
        right: 18px;
    }
    header .insta-link {
        text-indent: 9999px;
        background: transparent url("/img/instagram-icon.png") no-repeat 0 0;
        width: 32px;
        height: 32px;
        background-size: 32px 32px;
        opacity: 0.8;
        transition: opacity 0.333s ease;
    }
    header .insta-link:hover {
        opacity: 1;
    }
    .squareshop-ad {
        width: 100px;
        height: 25px;
    }
}

@media screen and (max-width: 320px) {
    .product-infos {
        padding: 40px 10px 10px 10px;
    }
    .product-infos .description {
        font-size: 14px;
        line-height: normal;
    }
    .product-infos .title {
        font-size: 18px;
        margin-bottom: 11px;
    }
    .product-infos .price {
        top: 41px;
        font-size: 18px;
        right: 13px;
    }
    .product-infos .shop-link {
        font-size: 12px;
        bottom: 4px;
        padding: 7px 0 6px;
        left: 10px;
        right: 10px;
    }
    .product-infos .back-link {
        top: 15px;
        font-size: 12px;
        left: 3px;
        padding-top: 1px;
        padding-left: 24px;
    }
    .product-infos .back-link:before {
        top: -5px;
        font-size: 20px;
    }
}