html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

html, body {
    /* background-color: #141414; */
    background-color: #000;
    color: #FFF;
    font-family: "Open Sans", sans-serif;
}

.container {
    width: 90%;
    margin: 0 auto;
}

body {
    height: 100vh;
}

header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    padding-top: 20px;
    padding-bottom: 10px;
    z-index: 20;
    /* background-color: #141414; */
    background-color: #000;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

header .container .hlogo {
    width: 60px;
    height: 45px;
    z-index: 111;
    position: relative;
}

header .container .hlogo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

header .container nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

header .container nav li {
    list-style: none;
    position: relative;
}
header .container nav li.active {
    cursor: pointer;
}
header .container nav li.active a {
    pointer-events: none;
    cursor: pointer;
}
header .container nav li.active::after {
    content: '';
    position: absolute;
    height: 1px;
    width: 100%;
    left: 0;
    right: 0;
    bottom: -5px;
    border-bottom: 2px solid #fff;
}

header .container nav li a {
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    transition: 0.4s;
    text-transform: uppercase;
    cursor: pointer;
}
header .container nav li a:hover {
    color: #FFF;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 34px;
    height: 34px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 120;
}

.burger span {
    display: block;
    width: 26px;
    height: 2px;
    background-color: #FFF;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* burger -> X (close animates from right to left via reversed transition on close) */
header.menu-open .burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

header.menu-open .burger span:nth-child(2) {
    opacity: 0;
    transform: translateX(-12px);
}

header.menu-open .burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

section {
    display: flex;
    align-items: center;
    height: 100vh;
    position: relative;
    z-index: 10;
    overflow: hidden;
}
section .container {
    height: 100vh;
    display: flex;
    align-items: center;
}

.media-wrapper {
    height: calc(100% - 120px);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* max-width: 1728px;
    max-height: 791px; */
    margin: 0 auto;
    /* gap: 15px; */
}

.media-wrapper:has(.item:not(.video):hover) .item.video {
    flex-grow: 7;
    /* height: 400px; */
    height: 60%;
    transition: flex-grow 0.3s ease 0.15s, height 0.3s ease 0.15s;
}

.media-wrapper:has(.item:not(.video):hover) .item.video .text {
    opacity: 0;
    transition: opacity 0s 0s !important;
}

.media-wrapper .item {
    position: relative;
    flex: 7 1 0;
    transition: flex-grow 0.3s ease 0.15s, height 0.3s ease 0.15s, filter 0.3s ease;
    /* height: 420px; */
    height: 60%;
    /* height: 60vh; */
    background-size: 27vw auto;
    background-position: center top;
    background-repeat: no-repeat;
    /* background-size: cover; */
    filter: grayscale(100%);
    cursor: pointer;
    color: #FFF;
    /* keep each panel on its own GPU layer so the grayscale repaint stays cheap */
    transform: translateZ(0);
    backface-visibility: hidden;
    /* border-right: 5px solid #141414;
    border-left: 5px solid #141414; */
    border-right: 5px solid #000;
    border-left: 5px solid #000;
}

.media-wrapper:hover .item {
    will-change: filter;
}

.media-wrapper .item:hover {
    flex-grow: 12 !important;
    /* height: 550px; */
    height: 100%;
    /* height: 80vh; */
    filter: grayscale(0%) !important;
    transition: filter 0.15s ease 0s, flex-grow 0.3s ease 0.15s, height 0.3s ease 0.15s !important;
    background-position: center top;
}

.media-wrapper .item:before {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    left: 0;
    height: 200px;
    /* background: linear-gradient(to bottom, rgba(20, 20, 20, 0) 0%, #141414 100%); */
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0) 0%, #000 100%);
}
/* .media-wrapper .item:hover:before {
    display: none;
} */

.media-wrapper .item.video {
    /* featured size == a hovered tile (grow 12 vs the normal 7) */
    flex-grow: 12;
    filter: grayscale(0%);
    /* height: 550px; */
    height: 100%;
    /* height: 80vh; */
    overflow: hidden;
    position: relative;
}
.media-wrapper .item.video iframe {
    filter: grayscale(100%);
}
.media-wrapper .item.video:hover iframe {
    filter: grayscale(0%);
}

.media-wrapper .item.video:before {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;
    z-index: 7;
    bottom: -1px !important;
}

.media-wrapper .item.video .text {
    opacity: 1;
    transition: opacity 0.3s ease 0.4s;
    z-index: 8;
}

.media-wrapper .item:hover .text {
    opacity: 1 !important;
    transition: opacity 0.3s ease 0.3s !important;
}

.media-wrapper .item.nutrition {
    background-image: url('/images/Photo_Inshape_Nutrition.webp');
}

.media-wrapper .item.shapeyou {
    background-image: url('/images/PHOTO_SHAPEYOU.webp');
}

.media-wrapper .item.equipment {
    /* cursor: none; */
    background-image: url('/images/Photo_materiel_de_sport.webp');
}
/* .media-wrapper .item.equipment:after {
    content: "";
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background-image: url('/images/Photo_materiel_de_sport.webp');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    transform: scale(1.1);
    z-index: -1;
} */

.media-wrapper .item.contact {
    background-image: url('/images/TIBO_INSHAPE_MARS250012_2_FIFOU-1.webp');
    background-position: left;
}

.media-wrapper .item .text {
    position: absolute;
    text-align: left;
    left: 0;
    right: 0;
    opacity: 0;
    bottom: -1px;
    /* instant hide on mouse-leave; the show animation/delay lives on :hover .text */
    transition: opacity 0s;
    padding: 70px 40px 30px 40px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    /* background: linear-gradient(to bottom, rgba(20, 20, 20, 0) 0%, #141414 100%); */
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0) 0%, #000 100%);
}

.media-wrapper .item .text h5 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}
.media-wrapper .item .text h5 strong {
    font-weight: 700;
}

.media-wrapper .item .text p {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
}

form .input {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

form .input label {
    font-size: 14px;
}

form .input input {
    height: 40px;
    padding: 0 10px;
    border-radius: 5px;
    outline: none;
    border: 1px solid #ccc;
}

form .input textarea {
    height: 120px;
    padding: 10px;
    border-radius: 5px;
    outline: none;
    border: 1px solid #ccc;
    font-family: inherit;
    resize: vertical;
}

form button[type="submit"] {
    width: 100%;
    height: 50px;
    background-color: #FFF;
    color: #141414;
    border-radius: 10px;
    outline: none;
    border: none;
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
}

form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* background-color: rgba(20, 20, 20, 0.85); */
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.popup-overlay h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-content {
    background-color: #000;
    border: 1px solid #333;
    padding: 40px;
    border-radius: 8px;
    position: relative;
    max-width: 500px;
    width: 90%;
    color: #fff;
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.popup-close:hover {
    color: #fff;
}

.upload-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.upload-label {
    font-size: 14px;
    margin-bottom: 10px;
}

.upload-field-group {
    display: inline-flex;
    align-items: stretch;
    cursor: pointer;
    width: 100%;
}

.file-name-display {
    height: 40px;
    flex-grow: 1;
    border: 1px solid #ccc;
    border-right: none;
    padding: 0 10px;
    font-size: 13px;
    color: #888888;
    background-color: #fff;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-select-btn {
    background-color: #666666;
    color: #ffffff;
    border: 1px solid #666666;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.file-select-btn:hover {
    background-color: #555555;
    border-color: #555555;
}

.hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

p.error {
    color: red;
    margin: 10px 0;
    font-size: 11px;
}
p.success {
    color: #22bb33;
    margin: 10px 0;
}

.grecaptcha-badge {
    visibility: hidden;
}

/* responsive */
@media (max-width: 5120px) {
    .media-wrapper .item {
        background-size: 34vw auto;
    }
}
@media (max-width: 3500px) {
    .media-wrapper .item {
        background-size: 27vw auto;
    }
}
@media (max-width: 3000px) {
    .media-wrapper .item {
        background-size: 31vw auto;
    }
}
@media (min-width: 2500px) {
    .media-wrapper {
        height: calc(100% - 250px);
    }
}



@media (min-width: 1921px) {
    .media-wrapper .item,
    .media-wrapper:has(.item:not(.video):hover) .item.video {
        height: 75%;
    }
}

@media (max-width: 1920px) {
    .media-wrapper .item,
    .media-wrapper:has(.item:not(.video):hover) .item.video {
        height: 70%;
    }
}
@media (max-width: 768px) {
    /* iOS: match the dynamic viewport (excludes the address bar) so the page isn't
       taller than the screen, and stop the page from rubber-banding vertically. */
    html, body {
        overscroll-behavior-y: none;
    }
    body {
        height: 100dvh;
    }
    section {
        height: 100dvh;
    }

    .burger {
        display: flex;
    }

    header .container nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 101%;
        height: 100vh;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 40px;
        background-color: #141414;
        transform: translateX(-100%);
        transition: transform 0.4s ease;
        z-index: 110;
        padding: 150px 40px 0 40px;
    }

    header.menu-open .container nav {
        transform: translateX(0);
    }

    header .container nav li {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        position: relative;
    }

    header.menu-open .container nav li {
        opacity: 1;
        transform: translateX(0);
    }

    header.menu-open .container nav li:nth-child(1) {
        transition-delay: 0.35s;
    }
    header.menu-open .container nav li:nth-child(2) {
        transition-delay: 0.5s;
    }
    header.menu-open .container nav li:nth-child(3) {
        transition-delay: 0.65s;
    }
    header.menu-open .container nav li:nth-child(4) {
        transition-delay: 0.8s;
    }

    header .container nav li a {
        font-size: 24px;
        color: #FFF;
    }

    .media-wrapper {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding-left: 10vw !important;
        padding-right: 10vw !important;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* keep the horizontal swipe from scrolling the page vertically */
        overscroll-behavior: contain;
        touch-action: pan-x;
    }

    .media-wrapper::-webkit-scrollbar {
        display: none;
    }

    .media-wrapper .item,
    .media-wrapper .item.video,
    .media-wrapper .item:hover,
    .media-wrapper:has(.item:not(.video):hover) .item.video {
        flex: 0 0 80vw !important;
        width: 80vw !important;
        height: calc(100vh - 210px) !important;
        height: calc(100dvh - 210px) !important;
        filter: grayscale(0%) !important;
        background-size: cover !important;
        scroll-snap-align: center;
        background-position: center top;
    }

    .media-wrapper .item .text {
        opacity: 1 !important;
        transition: none !important;
    }

    section .container {
        width: 100%;
    }
}