/* =========================
   MOBILE VERSION
========================= */

.tarifs {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    line-height: 2rem;
    margin-bottom:4rem;
}

.tarifs .explanations {
    width: 90%;
    background-color: rgba(241,90,34, 0.3);
    border-radius: 6px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.tarifs h2 {
    align-self: flex-start;
}

.tarifs > h3 {
    align-self: flex-start;
    margin: 1rem 0;
}

.tarifs h4 {
    margin: 1.5rem 0;
}

.tarifs section {
    border-radius: 6px;
    padding: 0 1.5rem 2rem 1.5rem;
    margin: 2rem 0;
}

.tarifs div table {
    border-collapse: separate; 
    border-spacing: 0;
    border-radius: 6px;
    overflow: visible; 
    padding: 0.5rem 0.8rem;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    background-color: #FFF;
    margin-bottom: 1.5rem;
}

.tarifs div table tr td:last-of-type {
    text-align:end;
}

.tarifs section {
    border-radius:6px;
    border: 1px solid #E9E9E9;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    background-color: #F8F8F8;
}

.tarifs .poudre div .orange-table {
    background-color:rgba(241,90,34, 0.3);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    width:55%;
}

.tarifs .poudre table .bold {
    font-weight: 600;
    font-size:2rem;
    text-align: center;
}

.tarifs .gel div .orange-table {
    background-color:rgba(241,90,34, 0.3);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.tarifs div .colis-supp {
    background-color: white;
    border: 1px solid #F5F5F5;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.tarifs section div table thead tr th {
    padding: 0.5rem 0;
    text-align: center;
}

.tarifs .gel div .orange-table {
    background-color:rgba(241,90,34, 0.3);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.tarifs .gel table .bold {
    font-weight: 600;
    font-size:1.8rem;
    text-align: center;
}

.tooltip-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    background-color: #fff;
    color: #F15A22;
    font-size: 1.4rem;
    font-style: normal;
    font-weight: bold;
    cursor: default;
    vertical-align: middle;
}

.tooltip-icon:hover {
    cursor: pointer;
}

.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 1.4rem;
    font-weight: normal;
    white-space: wrap;
    width: 18rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

/* Petite flèche sous le tooltip */
.tooltip-icon::before {
    content: '';
    position: absolute;
    bottom: calc(100% - .2rem);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.tooltip-icon:hover::after,
.tooltip-icon:hover::before {
    opacity: 1;
}

.tarifs > a {
    font-size: 1.6rem;
    text-decoration: none;
    color: #0b8293;
    font-weight: 600;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 4px;
    border: 2px solid rgba(11, 130, 147, 0);
    background-color: rgba(11, 130, 147, 0.25);
}

.tarifs > a:hover {
    border: 2px solid rgba(11, 130, 147, 0.25);
    background-color: #FFFFFF;
}


/* =========================
   TABLET VERSION
========================= */

@media(min-width:768px) {
    .tarifs div table {
        width: 70%;
    }

    .tarifs h4 {
        margin-top: 3rem;
    }

    .tarifs .poudre div .orange-table {
        width:45%;
    }

    .tarifs .poudre table .bold {
        text-align: center;
    }
}


/* =========================
   DESKTOP VERSION
========================= */

@media(min-width:1024px) {
    .tarifs {
        width: 60%;
    }

    .tarifs section {
        width: 90%;
    }

    .tarifs div table {
        width: fit-content;
        margin-bottom: 0;
    }

    /* POUDRE */
    .tarifs .poudre div {
        display:grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, auto);
        gap: 2rem;
        margin-bottom:2rem;
        align-items:center;
    }

    .tarifs .poudre div .orange-table {
        grid-column-start: 1;
        grid-row-start: 3;
        width: 65%;
    }

    .tarifs .poudre .orange-table .bold {
        text-align: start;
        padding-left: 3.5rem;
    }

    .tarifs .poudre table tr:nth-of-type(4) .bold {
        text-align: center;
        padding-left: 0;
    }

    .tarifs div .colis-supp {
        width: 40rem;
    }

    .tarifs div table td {
        padding:0.5rem 0.5rem;
    }

    .tarifs .poudre div .table-1 {
        grid-column-start: 2;
        grid-row-start: 2;
    }

    .tarifs .poudre div .table-2 {
        grid-row-start: 3;
    }

    .tarifs .poudre div .table-3 {
        grid-column-start: 2;
        grid-row-start: 4;
    }

    .tarifs div h4 {
        text-align: center;
    }

    .tarifs .poudre div h4:first-of-type {
        grid-column-start:1;
        grid-row-start:2;
    }

    .tarifs .poudre div h4:last-of-type {
        grid-column-start:2;
        grid-row-start:1;
    }

    /* GEL */
    .tarifs .gel div {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, auto);
        gap: 2rem;
        justify-content: center;
        align-items: center;
        margin-bottom:2rem;
    }

    .tarifs .gel .table1 {
        grid-row: span 2 / span 2;
    }

    .tarifs .gel .table2 {
        grid-row: span 2 / span 2;
        grid-column-start: 1;
        grid-row-start: 5;
    }

    .tarifs .gel div .table-1 {
        grid-column-start: 2;
        grid-row-start: 2;
    }

    .tarifs .gel div .table-2 {
        grid-column-start: 2;
        grid-row-start: 3;
    }

    .tarifs .gel div .table-3 {
        grid-column-start: 2;
        grid-row-start: 4;
    }

    .tarifs .gel div > h4:last-of-type {
        grid-column-start: 2;
        grid-row-start: 1;
    }
}