:root {
	--color: rgba(255, 255, 255, 0.92);
	--accent-color: rgba(255, 255, 255, 0.5);

    --card-filter-color: rgba(255, 255, 255, 0.4);
    --bubble-filter-color: rgba(255, 255, 255, 0.3);
    --bubble-radius: 999px;
    --bubble-content-height: 36px;

	--transition: 0.3s;

	--a: calc(100vw / 6); /* Largeur d'un bloc */
	--b: calc(100vh / 3); /* Hauteur d'un bloc */
}
* {
	scroll-behavior: smooth;
	/* scroll-padding-top: 60px; */
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	/* border: 1px solid black; */
}

@font-face {
    font-family: 'lulo-bold';
    src: url('../../assets/fonts/lulo-clean-one-bold.ttf');
}
@font-face {
    font-family: 'avenir-light';
    src: url('../../assets/fonts/avenir-light.ttf');
}
@font-face {
    font-family: 'avenir';
    src: url('../../assets/fonts/avenir.otf');
}

body {
    background: #5D0A2D;
    background: -webkit-linear-gradient(110deg, rgba(93, 10, 45, 1) 0%, rgba(128, 13, 56, 1) 25%, rgba(45, 23, 65, 1) 50%, rgba(61, 31, 82, 1) 75%, rgba(14, 13, 18, 1) 100%);
    background: -moz-linear-gradient(110deg, rgba(93, 10, 45, 1) 0%, rgba(128, 13, 56, 1) 25%, rgba(45, 23, 65, 1) 50%, rgba(61, 31, 82, 1) 75%, rgba(14, 13, 18, 1) 100%);
    background: linear-gradient(110deg, rgba(93, 10, 45, 1) 0%, rgba(128, 13, 56, 1) 25%, rgba(45, 23, 65, 1) 50%, rgba(61, 31, 82, 1) 75%, rgba(14, 13, 18, 1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#5D0A2D", endColorstr="#0E0D12", GradientType=0);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;

    /* position: relative; */
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
}




.item[item-position="center"] {
    top: calc(5vh - (100vw - 1920px) * 0.20);
    left: 50vw;
    z-index: 10;
}

.item[item-position="left"] {
    left: 27vw;
}

.item[item-position="right"] {
    left: calc(100vw - 27vw);
}
.item[item-position="right"] .bubble {
    margin-left: auto;
}

.item[item-order="1"] {
    top: calc(18vh - (100vw - 1920px) * 0.20);
    z-index: 7;
}

.item {
    position: absolute;
    transform: translateX(-50%);
    height: auto;
    width: 38vw;
    /* border: 1px solid red; */
}
.item:has(.card:hover) {
    z-index: 100;
}




.item .bubble {
    /* border: 1px solid red; */
    width: fit-content;
    background-color: var(--bubble-filter-color);
    border-radius: var(--bubble-radius);
    display: grid;
    grid-template-columns: auto 1fr;
    /* gap: 5px; */
    align-items: center;
    justify-content: start;
    backdrop-filter: blur(3px);
    transition: transform var(--transition) cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: rgba(122, 122, 122, 0.24) 0px 3px 8px;
}
.item:has(.card:hover) .bubble {
    transform: translate(-4%, -11%);
    transition: transform var(--transition) cubic-bezier(0.22, 1, 0.36, 1);
}
/* .item[item-position="left"]:has(.card:hover) .bubble {
    transform: translate(-3%, -11%);
    transition: transform var(--transition) cubic-bezier(0.22, 1, 0.36, 1);
} */
.item[item-position="right"]:has(.card:hover) .bubble {
    transform: translate(4%, -11%);
    transition: transform var(--transition) cubic-bezier(0.22, 1, 0.36, 1);
}

.item .bubble .icon {
    margin: 7px;
    border-radius: var(--bubble-radius);
    /* border: 1px solid red; */
    height: var(--bubble-content-height);
    width: var(--bubble-content-height);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.item .bubble .icon img {
    width: 100%;
    aspect-ratio: 1 / 1;
}
.item .bubble .title {
    width: fit-content;
    margin-right: 15px;
    line-height: var(--bubble-content-height);
    font-family: "Avenir";
    font-size: 1.22rem;
    color: var(--color);
    font-weight: 700;
    letter-spacing: 0.04rem;
}

.item .card {
    margin-top: 15px;
    border-radius: 25px;
    border: 2px solid var(--accent-color);
    background-color: var(--card-filter-color);
    backdrop-filter: blur(3px);
    width: 100%;
    height: 100%;
    padding: 18px;
    transition: transform var(--transition) cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: rgba(122, 122, 122, 0.24) 0px 3px 8px;
}
.item .card:hover {
    transform: scale(1.012);
    transition: transform var(--transition) cubic-bezier(0.22, 1, 0.36, 1);
}
.item .card .card-site-screen {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}
.item .card .card-site-screen img {
    width: 100%;
}





/* =========================
   TABLETTE
   ========================= */
@media (max-width: 1500px) {
    .item {
        width: 42vw;
    }

    .item[item-position="left"] {
        left: 23vw;
    }

    .item[item-position="right"] {
        left: calc(100vw - 23vw);
    }

    /* .item[item-position="center"] {
        top: 7vh;
    }

    .item[item-order="1"] {
        top: 24vh;
    } */

    .item .bubble .title {
        font-size: 1.05rem;
    }

    .item .card {
        padding: 14px;
        border-radius: 22px;
    }
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 1300px) {
    body {
        width: 100vw;
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;

        display: flex;
        flex-direction: column;
        padding-top: 10vh;
    }

    .item,
    .item[item-position="center"],
    .item[item-position="left"],
    .item[item-position="right"],
    .item[item-order="1"] {
        position: relative;
        top: auto;
        left: 50vw;
        transform: translateX(-50%);
        width: clamp(60vw, 400px, 70vw);
        z-index: auto;

        /* important pour le positionnement absolu de la bubble */
        overflow: visible;
    }

    .item:has(.card:hover) {
        z-index: auto;
    }

    .item:not(:first-child) {
        --mt-min: -50%;
        --mt-max: -20%;
        --vw-min: 330;
        --vw-range: 330; /* 660 - 330 */

        margin-top: clamp(
            var(--mt-min),
            calc(
                var(--mt-max) +
                (var(--mt-min) - var(--mt-max)) *
                ((100vw - (var(--vw-min) * 1px)) / (var(--vw-range) * 1px))
            ),
            var(--mt-max)
        );
    }

    /* réserve une marge à gauche pour la bubble verticale */
    .item .card {
        margin-top: 0;
        margin-left: 25px;
        padding: 10px;
        border-radius: 18px;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    .item .bubble,
    .item[item-position="right"] .bubble {
        position: absolute;
        top: 0;
        left: 15px; /* même référence que le début de la card */
        margin-left: 0;
        max-width: none;
        width: max-content;
        min-height: 46px;
        padding-right: 2px;
        background-color: rgba(255, 255, 255, 0.5);

        /* on place la bubble à gauche de la card puis on la tourne */
        transform-origin: top left;
        transform: rotate(90deg);
    }

    .item .bubble .icon {
        margin: 5px;
        width: 36px;
        height: 36px;
        transform: rotate(-90deg);
    }

    .item .bubble .title {
        font-size: 1rem;
        line-height: 1.2;
        margin-right: 14px;
        margin-left: 5px;
        white-space: nowrap;
        transform: rotate(180deg);
    }

    .item .card .card-site-screen {
        border-radius: 12px;
    }

    .item .card .card-site-screen img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* neutralisation des animations hover dans cette vue */
    .item:has(.card:hover) .bubble,
    .item[item-position="right"]:has(.card:hover) .bubble {
        transform: rotate(90deg);
    }

    .item .card:hover {
        transform: none;
    }
}

/* =========================
   PETITS MOBILES
   ========================= */
/* @media (max-width: 480px) {
    body {
        gap: 16px;
        padding: 14px 12px 20px;
    }

    .item .bubble {
        min-height: 42px;
    }

    .item .bubble .icon {
        width: 32px;
        height: 32px;
        margin: 5px;
    }

    .item .bubble .title {
        font-size: 0.95rem;
        margin-right: 12px;
    }

    .item .card {
        margin-top: 8px;
        padding: 8px;
        border-radius: 16px;
    }

    .item .card .card-site-screen {
        border-radius: 10px;
    }
} */

/* =========================
   APPAREILS SANS HOVER
   ========================= */
@media (hover: none) and (pointer: coarse) {
    .item .card:hover,
    .item:has(.card:hover) .bubble,
    .item[item-position="right"]:has(.card:hover) .bubble {
        transform: none;
    }
}