/* Example: tells browser to use UTF-8 character set */
@charset "utf-8";

:root {
    --fs-hero-title: 4rem;
    --f-hero-title-color: rgb(37, 36, 36);
    --fs-carousel-title: 2.75rem;
    --fs-title: 2rem;
    --fs-description: 1.35rem;
    --f-title-color: #232323;
    --f-color: #585858;
    font-size: 62.5%;
    font-family: system-ui, sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    background: linear-gradient(95deg, rgba(249,249,249,1) 0%, rgba(251,174,17,1) 43%, rgba(251,233,206,1) 100%) center center no-repeat;
    padding: 50px;
    margin: auto;
    line-height: 1.8;
}

.hero-title {
    display: flex;
    justify-content: center;
    color: var(--f-hero-title-color);
    font-size: var(--fs-hero-title);
    font-weight: 700;
    margin-bottom: 25px;
}

.title {
    font-size: var(--fs-carousel-title);
    font-weight: 600;
    margin-bottom: 25px;
}

.item_container {
    margin: 40px 5px;
    background-color: white;
    box-shadow: -5px 4px 50px -1px rgba(0,0,0,0.35);
    transition: transform .3s;
    transform: translate3d(0, -1px, 0);
}

.item_container:hover {
    transform: translate3d(0, -10px, 0);
}

.item_container:hover:has(iframe) {
    iframe {
        display: block;
    }
    img {
        display: none;
    }
}

.item_container img{
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}

.item_container iframe {
    display: none;
    border: none;
    overflow: none;
    width: 100%;
    object-fit: contain;
    background-size: contain;
    aspect-ratio: 16 / 9;
}

.item__body {
    padding: 25px;
}

.item__title {
    color: #232323;
    font-size: var(--fs-title);
    font-weight: 400;
    margin-bottom: 15px;
}

.item__description {
    color: var(--f-color);
    font-size: var(--fs-description);
    margin: 5px;
}

/* CAROUSEL */

.item_container {
    position: relative;
}
.carousel {
    position: relative;
}

.carousel__container {
    transition: transform .3s;
    transform: translate3d(0, 0, 0);
}
.carousel__container::after {
    content: '';
    clear: both;
    display: block;
}

.carousel__item {
    float: left!important;
}

.carousel__next, .carousel__prev {
    position: absolute;
    background: white url(../img/rightsmall.svg) center center no-repeat;
    background-size: 70% 70%;
    border-radius: 100vh;
    top: 50%;
    margin-top: -20px;
    right: -20px;
    box-shadow: -5px 4px 50px -1px rgba(0,0,0,0.35);
    cursor: pointer;
    transition: transform .3s, opacity .3s;
    width: 40px;
    height: 40px;
    animation: backgroundIMGLeft .8s alternate infinite;
    animation-delay: 2s;
}

.carousel__next {
    animation: backgroundIMGRight .8s alternate infinite;
    animation-delay: 2s;
}

@keyframes backgroundIMGRight {
    100% { 
        background-position: 15px;
    }
    50%{
        background-position: 5px;
    }
    0% {
        background-position: 5px;
    }
}

@keyframes backgroundIMGLeft {
    100% { 
        background-position: -3px;
    }
    50% {
        background-position: 6px;
    }
    0% {
        background-position: 6px;
    }
}

.carousel__next:hover, .carousel__prev:hover {
    transform: scale(1.2);
    animation-play-state: paused;
}

.carousel__next:active, .carousel__prev:active {
    transform: scale(0.8);
}

.carousel__prev {
    background-image: url(../img/leftsmall.svg);
    left: -20px;
}

.carousel__prev--hidden, .carousel__next--hidden {
    opacity: 0;
}

.carousel__pagination {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    text-align: center;
    display: none;
}

.carousel__pagination__button {
    background-color: white;
    width: 10px; /* j'ai mis 15px au début */
    height: 6px; /* j'ai mis 7px au début */
    border-radius: 100vh;
    display: inline-block;
    margin: 0 3px;
    box-shadow: -5px 4px 50px -1px rgba(0,0,0,0.35);
    transition: transform .1s, height .7s cubic-bezier(1, 0, 0, 1), width .5s cubic-bezier(0.755, 0.05, 0.855, 2.06); /* j'ai mis une width de .4s au début */
    cursor: pointer;
    transform: scale(0.5);
}

.carousel__pagination__button--active, .carousel__pagination__button:hover {
    transform: scale(1.4);
    width: 25px;
    margin: 0 8px;
    animation: slideRight .2s ease-out;
}

.carousel__pagination__button::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -50%;
    right: 0%;
    bottom: 50%;
    margin-left: -15px;
    border: 12px solid transparent;
}

.carousel__pagination__button::after {
    content: '';
    position: relative;
}
.carousel__pagination__loadingBar {
    animation: loading 3000ms linear;
    width: 100%;
    height: 100%;
    border-radius: 100vh;
}

@keyframes slideRight {
    from {
        height: 10px;
        width: 28px;
    }
    to {
        height: 5px;
        width: 20px;
    }
}
@keyframes defaultslideRight {
    from {
        height: 12px;
        width: 10px;
    }
    to {
        height: 8px;
        width: 30px;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
        width: 150px;
    }
}

@keyframes loading {
    0% {
        background-color: white;
        width: 0%;
        opacity: 0;
        border-right: 0px rgb(237, 243, 237) solid;
    }
    50% {
        opacity: 0.85;
    }
    100% {
        background-color: rgb(255, 72, 50);
        width: 100%;
        opacity: 0.2;
        border-right: 4px rgb(237, 243, 237) solid;
    }
}

button {
    text-decoration: none;
    border: 1px solid burlywood;
}

@media screen and (min-width: 800px) {
    .carousel__pagination {
        display: block;
    }
}