* {
    font-family: 'Roboto', sans-serif;
}
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}
button {
    cursor: pointer;
}
.tooltip {
    border: 1px solid #ddd;
    box-shadow: 2px -4px 3px 0px rgba(27, 27, 27, 0.69);
    background: white;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    font-size: 1em;
    z-index: 1;
    min-height: fit-content;
    min-width: fit-content;
    white-space: nowrap;
    /* max-width: fit-content; */
}

/* basics */
.line-through {
    text-decoration: line-through;
}

/* slider */

.slider .sc-carousel__arrow-container:first-child {
    cursor: pointer;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    height: 100%;
    background: #ffffffdd;
}
.slider .sc-carousel__arrow-container:last-child {
    cursor: pointer;
    visibility: hidden;
    position: absolute;
    display: flex;
    top: 0;
    right: 0;
    height: 100%;
    background: #ffffffdd;
}

.slider:hover .sc-carousel__arrow-container {
    visibility: visible;
    z-index: 1;
}

.gadget .sc-carousel-dots__dot-container {
    display: none !important;
}

.arrow-long-right {
    box-sizing: border-box;
    position: relative;
    display: block;
    transform: scale(var(--ggs, 1));
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    box-shadow: inset 0 0 0 2px;
    height: 6px;
}
.arrow-long-right::after {
    content: '▲';
    display: block;
    box-sizing: border-box;
    position: absolute;
    transform: rotate(88deg);
    right: -3px;
    bottom: -7px;
    font-size: 13px;
}

/* table */
table {
    width: 100%;
}
tbody tr:nth-child(even) {
    background-color: #e9e9e9;
}
tbody tr:hover {
    background-color: #feffcb;
}
thead tr,
th {
    background-color: #cccccc;
}

thead.sortable-table th.sortable {
    cursor: pointer;
}
th.sort-ASC,
th.sort-DESC {
    background-color: #888888;
}
th.sort-ASC::before,
th.sort-DESC::before {
    border-style: solid;
    border-width: 0.15em 0.15em 0 0;
    content: '';
    display: inline-block;
    height: 0.2em;
    right: 0.2em;
    position: relative;
    top: 0.4em;
    transform: rotate(-45deg);
    vertical-align: top;
    width: 0.2em;
}
th.sort-DESC::before {
    top: 0.4em;
    transform: rotate(135deg);
}

/* cart button */
.add-to-cart-button.added .cart-icon {
    animation: drop 0.3s forwards;
    -webkit-animation: drop 0.3s forwards;
    animation-delay: 0.18s;
}

/* captcha  */

.grecaptcha-badge {
    position: fixed;
    z-index: 2000; /* Valeur supérieure à celle de la modal */
}

/* @media queries */

@media screen and (max-width: 1300px) {
    .arrow-long-right {
        width: 35px;
    }
}

@media screen and (min-width: 1301px) {
    .arrow-long-right {
        width: 75px;
    }
}

@media screen and (max-width: 768px) {
    .table-container {
        overflow-x: auto; /* Permet le défilement horizontal si la table est trop large */
    }

    table {
        width: 100%; /* Redimensionne la table pour s'adapter à la largeur de l'écran */
    }
}

/* media print */
@media print {
    button,
    .header-tools,
    .main-nav,
    .product-tools {
        visibility: hidden;
        display: none;
    }
}

/* TODO ENLEVER QUAND SOLUTION TROUVER POUR LE STYLE DU MENU */

@media screen and (min-width: 975px) {
    .main-nav {
        padding: 0.2em 0;
        justify-content: space-evenly;
    }
}
@media screen and (min-width: 750px) and (max-width: 975px) {
    .main-nav {
        padding: 0.2em 0;
        justify-content: center;
        font-size: 12px;
    }
}
@media screen and (min-width: 768px) {
    @keyframes growDown {
        0% {
            transform: scaleY(0);
        }
        80% {
            transform: scaleY(1.1);
        }
        100% {
            transform: scaleY(1);
        }
    }

    @keyframes translateToRight {
        0% {
            opacity: 0;
            transform: translateX(0);
        }
        40% {
            opacity: 0;
            transform: translateX(3em);
        }

        80% {
            transform: translateX(10em);
        }

        100% {
            opacity: 1;
            transform: translateX(14.7em);
        }
    }

    @keyframes translateToLeft {
        0% {
            opacity: 0;
            transform: translateX(0);
        }
        40% {
            opacity: 0;
            transform: translateX(-3em);
        }

        80% {
            transform: translateX(-10em);
        }

        100% {
            opacity: 1;
            transform: translateX(-14.9em);
        }
    }
    .main-nav .dropdown_menu_parent {
        min-width: 210px;
    }
}
@media screen and (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        padding: 0;
    }
    .main-nav .dropdown_parent {
        min-width: 100%;
    }
}

.main-nav .no-css {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 18px;
    color: #fff;
    text-decoration: none;
}
.main-nav {
    background-color: var(--main-color);
    -webkit-box-shadow: 0px 5px 10px 0px #fff inset;
    -moz-box-shadow: 0px 5px 10px 0px #fff inset;
    box-shadow: 0px 5px 10px 0px #fff inset;
    display: flex;
    margin-top: 0;
    flex-grow: 1;
    width: 100%;
    padding: 5px 0;
}
.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5em;
    display: block;
    width: 100%;
}
.main-nav .dropdown_parent {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;
    perspective: 1000px;
    width: fit-content;
    &:hover {
        cursor: pointer;
    }
    & .dropdown_menu_parent li:hover {
        background-color: #2b2b2b;
    }
}

.main-nav .dropdown_child {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;
    perspective: 2000px;
    width: -webkit-fill-available;
    padding: 0.5em;
    &:hover {
        cursor: pointer;
    }
}
.main-nav .dropdown_menu_parent,
.main-nav .dropdown_menu_child {
    border: 1px solid #fff;
    padding: 0;
    background-color: #575757;
    position: absolute;
    left: -10px;
    width: 100%;
    perspective: 1000px;
    li {
        display: none;
        color: white;
        font-size: 0.75em;
        opacity: 0;
    }
}
.main-nav .dropdown_menu-3 {
    left: -30px;
}
.main-nav .dropdown_menu_parent {
    top: 100%;
    animation: growDown 400ms ease-in-out forwards;
    transform-origin: top center;
    z-index: 49;
}

.main-nav .dropdown_menu_parent li {
    font-size: 0.75em;
}
.main-nav .dropdown_menu_child li {
    font-size: 0.9em;
}
.main-nav .dropdown_menu_child {
    border-left: none !important;
    top: 0;
    z-index: 2;
    transform-origin: top center;
    animation: translateToRight 300ms ease-in-out forwards;
}

.main-nav .dropdown_menu_parent:nth-last-child(-n + 2) .dropdown_menu_child {
    animation: translateToLeft 300ms ease-in-out forwards;
}

.open .dropdown_parent:hover > .dropdown_menu--animated,
.open .dropdown_child:hover > .dropdown_menu--animated {
    display: block;
}
.dropdown_parent > .dropdown_menu--animated,
.dropdown_child > .dropdown_menu--animated {
    display: none;
    li {
        text-align: left;
        display: block;
        opacity: 1;
    }
}
.main-nav .chevron {
    float: right;
}

.tooltip {
    --tooltip-background-color: #f8f8f8;
    --tooltip-border-radius: 0.5rem;
    --tooltip-box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
    --tooltip-font-family: inherit;
    --tooltip-font-size: 14px;
    --tooltip-font-weight: 500;
    --tooltip-line-height: 1rem;
    --tooltip-color: black;
    --tooltip-offset-x: 12px;
    --tooltip-offset-y: 12px;
    --tooltip-padding: 8px;
    --tooltip-white-space-hidden: nowrap;
    --tooltip-white-space-shown: normal;
    --tooltip-z-index: 9999;
}
