:root {
    --green:var(--theme-main-01); /* #3f8a3f; */
    --green-dark: #2e6b2e;
    --bg: #f7f8f5;
    --text: #2c2c2c;
    --border: #e0e0e0;
}

.faq-header {
    margin: -30px 0 40px 0;
    text-align: right;
    margin-right: 238px;
}

.faq-header p {
    color: #666;
    margin-top: 8px;
}

/* --- Search bar --- */

.faq-search {
    max-width: 520px;
    margin: 24px auto 0;
    padding: 0 20px;margin-bottom: 20px;
}

.faq-search-input-wrap {
    position: relative;
}

.faq-search-input-wrap svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

#searchInput {
    width: 100%;
    padding: 13px 40px 13px 44px;
    border-radius: 30px;
    border: 1px solid var(--border);
    font-size: 1.5rem;
    outline: none;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#searchInput:focus {
    border-color: var(--green);
}

#clearSearch {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 2rem;
    display: none;
    line-height: 1;
}

.faq-search-info {
    text-align: center;
    color: var(--theme-main-01);
    font-size: 1.2rem;
    margin-top: 8px;
    min-height: 1.2em;
}

.faq-no-results {
    padding: 40px 180px;
    text-align: center;
    background: var(--theme-fond-clair);
    border-radius: 8px;
    font-weight: 500;
}

.faq-wrapper {
    display: flex;
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 20px;
    gap: 30px;
    align-items: flex-start;
    overflow-anchor: none;
}

/* --- Menu categories --- */
.faq-menu {
    flex: 0 0 260px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: sticky;
    top: 20px;
   /* margin-top: 63px;*/
   overflow-anchor: none;
}

.faq-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#infopage ul li {
    list-style: none;
    margin-left: unset;
    padding: unset;
}

.faq-menu li {
    border-bottom: 1px solid var(--border);
    
}

.faq-menu li:last-child {
    border-bottom: none;
}

.faq-menu button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px 18px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .2s, color .2s;
}

.faq-menu button span:first-of-type {
    font-family: 'fontsja';
    scale: 1.25;background: var(--theme-tres-tres-clair);
    padding: 6px;
    border-radius: 30px;
    margin-right: 5px;
    color: #000;
}

.faq-menu button:hover {
    background: var(--theme-tres-tres-clair);
}

.faq-menu button[aria-pressed="true"] {
    background: var(--theme-tres-tres-clair);
    color: #000000;
    font-weight: 600;
}

.faq-menu button[aria-pressed="true"] span:first-of-type {
    background: white;
    scale: 1.6;font-weight: normal;
}

/* --- Content / questions --- */
.faq-content {
    flex: 1;
    min-width: 0;
}

.faq-category {
    display: none;
}

.faq-category.active {
    display: block;
}

/* pendant une recherche, on affiche toutes les catégories en même temps */
.faq-category.searching-hidden {
    display: none!important;
}

.faq-content.searching .faq-category {
    display: block;
}

.faq-category-title {
   color: var(--theme-main-01);
    margin: 0 0 18px;
    font-weight: 500;
    font-size: 3rem;
    letter-spacing: 0.05em;
}

details {
    background: #fff;
    background: #fefdfc;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

details.filtered-out {
    display: none;
}

details summary {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px 20px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    gap: 12px;text-wrap-style: balance;
}

details summary::after {
    content: '+';
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: transform .25s ease;
}

details[open]  {
    background: #fff;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details::details-content {
    overflow: hidden;
    padding: 0 20px;
    transform: scaleY(0);    
    transform-origin: top;
    transition: transform 0.3s ease;
}

details[open]::details-content {
    height: 100%;
    padding-bottom: 18px;
    color: #444;
    line-height: 1.55;
    transform: scaleY(1);
}

details[open]::details-content a {
    color: var(--green);
}

#livraison {
    margin: unset;
}

/* --- Mobile --- */
@media (max-width:600px) {

    .faq-wrapper {
        flex-direction: column;
    }

    .faq-header {
       text-align: center;
    margin: 0 5px;
    text-wrap-style: balance;
    font-size: 90%;
    margin-top: -7px;
    }

    .faq-menu {
        flex: 1 1 auto;
        position: static;
        width: 108%;
        margin-top: unset;
        margin-left: -15px;
    }

    .faq-menu ul {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /*flex-direction: column;*/
        flex-wrap: nowrap;
    }

    .faq-menu li {
        border-bottom: none;
        border-right: 1px solid var(--border);
        flex: 0 0 auto;
    }

    .faq-menu li:last-child {
        border-right: none;
    }

    .faq-menu button {
        /* white-space: nowrap;*/
        padding: 12px 8px;
        font-size: 83%;
        gap: 5px;
        flex-wrap: wrap;
    max-width: 124px;
    flex-direction: column;
    align-content: flex-start;height: 100%;
    }

    .faq-menu button span:first-of-type {
    align-self: center;margin: 0;
}
    .faq-menu button span:nth-child(2) {
    text-align: center;align-self: center;
}
.faq-category-title {text-wrap-style: balance;
    letter-spacing: unset;
    line-height: 3rem;}

    .faq-no-results {
    padding: 40px 20px;}
}