/* ============================================================
   1. CARTES PRODUITS EBOX
   ============================================================ */

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 30px !important;

    width: 100% !important;
    margin: 0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}


/* ===== Carte produit ===== */

.woocommerce ul.products li.product {
    width: auto !important;
    max-width: none !important;

    float: none !important;
    clear: none !important;

    margin: 0 !important;
    padding: 0 !important;

    background: #fff;

    border-radius: 14px;
    overflow: hidden;

    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-6px);

    box-shadow: 0 14px 34px rgba(0, 0, 0, .14);
}

.woocommerce ul.products li.product a {
    text-decoration: none !important;
}


/* ============================================================
   2. COUVERTURE
   ============================================================ */

.ebox-book-card__cover {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    background: #f8fafc;

    overflow: hidden;
    box-sizing: border-box;
}

.ebox-book-card__cover img {
    display: block;

    width: auto !important;
    max-width: 100% !important;

    height: auto !important;
    max-height: 360px !important;

    margin: 0 auto !important;

    object-fit: contain !important;
    object-position: center !important;
}


/* ============================================================
   3. CONTENU DE LA CARTE
   ============================================================ */

.ebox-book-card__body {
    padding: 8px 12px 10px;

    text-align: center;
}

.ebox-book-card__title {
    min-height: 0;

    margin: 0 0 6px;

    color: #111827;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.ebox-book-card__author {
    min-height: 0;

    margin: 3px 0 8px;

    color: #6b7280;

    font-size: 14px;
    font-style: italic;
    line-height: 1.4;

    text-align: center;

    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;

    word-break: break-word;
}


/* ===== Métadonnées ===== */

.ebox-book-card__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 14px;

    margin-bottom: 8px;

    color: #374151;

    font-size: 14px;
}

.ebox-book-card__meta span {
    display: inline-flex;
    align-items: center;

    gap: 5px;
}


/* ===== Prix ===== */

.ebox-book-card__price {
    font-size: 16px;
    font-weight: 700;
}

.ebox-book-card__price--free {
    color: #16a34a;
}

.ebox-book-card__price--paid {
    color: #1d4ed8;
}


/* ============================================================
   4. NEUTRALISATION DES ÉLÉMENTS WOOCOMMERCE STANDARDS
   ============================================================ */

.price,
.woocommerce-loop-product__title,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .ast-woo-product-category,
.ebox-card-meta {
    display: none !important;
}


/* ============================================================
   5. LAYOUT BOUTIQUE / CATÉGORIES
   ============================================================ */

.ebox-catalog-layout {
    display: grid;

    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;

    align-items: start;

    width: 100%;
}

.ebox-catalog-content {
    width: 100%;
    min-width: 0;
}

.ebox-catalog-content ul.products {
    display: grid !important;

    grid-template-columns:
        repeat(5, minmax(220px, 1fr)) !important;

    gap: 28px !important;

    width: 100% !important;
}

.ebox-catalog-content ul.products li.product {
    width: auto !important;

    float: none !important;
    clear: none !important;

    margin: 0 !important;
}


/* ============================================================
   6. SIDEBAR CATALOGUE
   ============================================================ */

.ebox-filters-sidebar {
    position: sticky;
    top: 20px;

    width: 100%;
    min-width: 0;

    background: #f7f2ea !important;

    border: 1px solid #e2d8ca;
    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);

    overflow: hidden !important;

    box-sizing: border-box;
}


/* ===== Neutralisation des listes du thème ===== */

.ebox-filters-sidebar ul,
.ebox-filters-sidebar li {
    list-style: none !important;
}

.ebox-filters-sidebar ul {
    margin: 0 !important;
}

.ebox-filters-sidebar li::marker {
    content: "" !important;
}


/* ============================================================
   7. TITRE CATALOGUE
   ============================================================ */

.ebox-filters-sidebar .ebox-filters-title {
    display: flex !important;
    align-items: center !important;

    gap: 12px !important;

    margin: 0 !important;
    padding: 20px 22px !important;

    background: #4a2a16 !important;
    color: #fff !important;

    border: 0 !important;

    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: .02em;
}

.ebox-filters-sidebar .ebox-filters-title__icon {
    flex: 0 0 auto;

    font-size: 25px !important;
    line-height: 1 !important;
}


/* ============================================================
   8. LISTE PRINCIPALE DES THÈMES
   ============================================================ */

.ebox-filters-sidebar .ebox-filters-list {
    display: block !important;

    margin: 0 !important;
    padding: 12px 18px 22px !important;
}


/* ===== Catégorie principale ===== */

.ebox-filters-sidebar .ebox-parent {
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    border-bottom: 1px solid #ded6cb !important;
}

.ebox-filters-sidebar .ebox-parent:last-child {
    border-bottom: 0 !important;
}


/* ============================================================
   9. BOUTON D’OUVERTURE D’UNE CATÉGORIE
   ============================================================ */

.ebox-filters-sidebar button.ebox-parent-toggle {
    appearance: none !important;
    -webkit-appearance: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 10px !important;

    width: 100% !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 15px 2px !important;

    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    color: #231b16 !important;

    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;

    text-align: left !important;
    text-transform: none !important;

    cursor: pointer !important;
}

.ebox-filters-sidebar button.ebox-parent-toggle:hover,
.ebox-filters-sidebar button.ebox-parent-toggle:focus {
    background: transparent !important;

    color: #4a2a16 !important;

    outline: none !important;
    box-shadow: none !important;
}


/* ===== Partie gauche du bouton ===== */

.ebox-filters-sidebar .ebox-parent-toggle__left {
    display: flex !important;
    align-items: center !important;

    gap: 10px !important;

    min-width: 0 !important;
}

.ebox-filters-sidebar .ebox-parent-name {
    display: inline-block !important;

    color: inherit !important;

    white-space: normal !important;
}


/* ============================================================
   10. FLÈCHES DE L’ACCORDÉON
   ============================================================ */

.ebox-filters-sidebar .ebox-arrow {
    display: inline-block !important;
    flex: 0 0 auto !important;

    color: #4a2a16 !important;

    font-size: 12px !important;
    line-height: 1 !important;

    transition: transform .22s ease !important;
}

.ebox-filters-sidebar .ebox-chevron {
    display: inline-block !important;
    flex: 0 0 auto !important;

    color: #4a2a16 !important;

    font-size: 18px !important;
    line-height: 1 !important;

    transition: transform .22s ease !important;
}

.ebox-filters-sidebar
.ebox-parent.is-open
> .ebox-parent-toggle
.ebox-arrow {
    transform: rotate(90deg) !important;
}

.ebox-filters-sidebar
.ebox-parent.is-open
> .ebox-parent-toggle
.ebox-chevron {
    transform: rotate(180deg) !important;
}


/* ============================================================
   11. SOUS-CATÉGORIES
   ============================================================ */

.ebox-filters-sidebar .ebox-children {
    display: none !important;

    margin: 0 !important;
    padding: 0 0 14px 30px !important;

    list-style: none !important;
}

.ebox-filters-sidebar
.ebox-parent.is-open
> .ebox-children {
    display: block !important;
}

.ebox-filters-sidebar .ebox-child {
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;
}

.ebox-filters-sidebar .ebox-child a {
    display: flex !important;
    align-items: flex-start !important;

    gap: 9px !important;

    margin: 0 !important;
    padding: 6px 0 !important;

    background: transparent !important;

    color: #3d342d !important;

    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;

    text-decoration: none !important;

    box-shadow: none !important;
}

.ebox-filters-sidebar .ebox-child a:hover,
.ebox-filters-sidebar .ebox-child.is-active a {
    color: #4a2a16 !important;
    font-weight: 600 !important;
}

.ebox-filters-sidebar .ebox-child-bullet {
    flex: 0 0 auto !important;

    color: #7a4b2d !important;

    font-size: 11px !important;
    line-height: 1.6 !important;
}


/* ============================================================
   12. CATÉGORIE SANS SOUS-CATÉGORIE
   ============================================================ */

.ebox-filters-sidebar .ebox-parent-link--single {
    display: flex !important;
    align-items: center !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 15px 2px !important;

    background: transparent !important;

    color: #231b16 !important;

    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;

    text-decoration: none !important;
}

.ebox-filters-sidebar .ebox-parent-link--single:hover,
.ebox-filters-sidebar .ebox-parent-link--single:focus-visible {
    color: #4a2a16 !important;

    outline: none !important;
}


/* ============================================================
   13. RESPONSIVE BOUTIQUE / SIDEBAR
   ============================================================ */

@media (max-width: 1100px) {

    .ebox-catalog-layout {
        grid-template-columns: 1fr;
    }

    .ebox-filters-sidebar {
        position: static;
    }

    .ebox-catalog-content ul.products {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {

    .ebox-catalog-content ul.products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 18px !important;
    }
}

@media (max-width: 480px) {

    .ebox-catalog-content ul.products {
        grid-template-columns: 1fr !important;
    }
}


/* ============================================================
   14. STRUCTURE GÉNÉRALE DE LA PAGE D’ACCUEIL
   ============================================================ */

.home .ast-container,
.home .site-content .ast-container {
    width: 100% !important;
    max-width: 1450px !important;
}

.home .entry-content {
    display: block !important;

    width: 100% !important;
    max-width: 1450px !important;

    margin: 0 auto !important;
    padding: 0 32px !important;

    background: transparent !important;

    box-sizing: border-box !important;
}


/* ============================================================
   15. SOUS-TITRE SOUS LE LOGO
   ============================================================ */

.ebox-header-v2__tagline {
    width: 100%;

    padding: 8px 20px 4px;

    background: #F8F4EE;

    color: #4A2A16;

    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;

    text-align: center;
}


/* ============================================================
   16. NAVIGATION HORIZONTALE
   ============================================================ */

.ebox-document-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    width: 100%;

    padding: 10px 20px 14px;

    background: #F8F4EE;

    border-bottom: 1px solid rgba(74, 42, 22, .14);

    box-sizing: border-box;
}


/* ===== Liens ===== */

.ebox-document-nav__item {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 8px 20px;

    color: #4A2A16;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;

    text-decoration: none !important;
    white-space: nowrap;

    border-radius: 6px;

    transition:
        background-color .2s ease,
        color .2s ease;
}

.ebox-document-nav__item:hover,
.ebox-document-nav__item:focus-visible {
    background: #EFE6DC;
    color: #321B0E;

    outline: none;
}


/* ===== Icône ===== */

.ebox-document-nav__icon {
    flex: 0 0 auto;

    font-size: 18px;
    line-height: 1;
}


/* ===== Séparateur ===== */

.ebox-document-nav__separator {
    flex: 0 0 auto;

    width: 1px;
    height: 22px;

    background: rgba(74, 42, 22, .18);
}


/* ============================================================
   17. ESPACEMENT DES PAGES CATALOGUE
   ============================================================ */

body.tax-product_cat #primary,
body.tax-document_type #primary,
body.post-type-archive-product #primary,
body.woocommerce-shop #primary {
    margin-top: 0 !important;
    margin-bottom: 40px !important;
}


/* ============================================================
   18. RESPONSIVE NAVIGATION
   ============================================================ */

@media (max-width: 1000px) {

    .ebox-document-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;

        overflow-x: auto;

        padding: 10px 14px;

        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .ebox-document-nav__item {
        flex: 0 0 auto;

        padding: 8px 14px;
    }
}


/* ============================================================
   19. RESPONSIVE MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .home .entry-content {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .ebox-header-v2__tagline {
        font-size: 14px;
    }

    .ebox-document-nav__separator {
        display: none;
    }
}



/* ============================================================
   20. PAGES ARCHIVES + LIVRES / ARTICLES
   ============================================================ */

.ebox-archives-page {
    width: 100% !important;
}


/* ============================================================
   21. EN-TÊTE DE PAGE
   ============================================================ */

.ebox-archives-page__header {
    width: 100% !important;

    margin: 0 0 30px !important;
}

.ebox-archives-page__header h1 {
    margin: 0 0 8px !important;

    color: #1f2937 !important;

    font-size: 34px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
}

.ebox-archives-page__header p {
    margin: 0 !important;

    color: #64748b !important;

    font-size: 15px !important;
    line-height: 1.6 !important;
}


/* ============================================================
   22. LAYOUT : SIDEBAR + CONTENU
   ============================================================ */

.ebox-archives-layout {
    display: grid !important;

    grid-template-columns: 330px minmax(0, 1fr) !important;
    gap: 42px !important;

    align-items: start !important;

    width: 100% !important;
    margin: 0 !important;
}

.ebox-archives-layout__sidebar,
.ebox-archives-layout__content {
    min-width: 0 !important;
}

.ebox-archives-layout__sidebar .ebox-filters-sidebar {
    width: 100% !important;
    margin: 0 !important;
}


/* ============================================================
   23. SECTIONS
   ============================================================ */

.ebox-archives-section {
    width: 100% !important;

    margin: 0 0 52px !important;
}

.ebox-archives-section:last-child {
    margin-bottom: 0 !important;
}


/* ============================================================
   24. BANDEAU DE SECTION
   ============================================================ */

.ebox-archives-section__header {
    display: grid !important;

    grid-template-columns: auto 1fr auto !important;

    align-items: end !important;

    gap: 20px !important;

    width: 100% !important;

    margin: 0 0 24px !important;
    padding: 0 0 14px !important;

    border-bottom: 4px solid #b97a2f !important;
}


/* ===== Titre ===== */

.ebox-archives-section__title {
    display: inline-flex !important;
    align-items: center !important;

    gap: 12px !important;

    min-width: 390px !important;

    margin: 0 !important;
    padding: 16px 32px !important;

    background:
        linear-gradient(
            180deg,
            #ead8bf 0%,
            #dfc8aa 100%
        ) !important;

    color: #4a2a16 !important;

    border: 1px solid #cfa976 !important;
    border-radius: 18px 72px 18px 18px !important;

    font-size: 30px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;

    text-transform: uppercase !important;

    box-shadow:
        0 8px 20px
        rgba(74, 42, 22, .08) !important;
}


/* ===== Icône devant le titre ===== */

.ebox-archives-section__title::before {
    display: inline-block;

    flex: 0 0 auto;

    color: #4a2a16;

    font-size: 34px;
    line-height: 1;
}


/* ============================================================
   25. ICÔNES ARCHIVES
   ============================================================ */

#ebox-archives-manuscrits-279
.ebox-archives-section__title::before {
    content: "☆";
}

#ebox-archives-dossiers-279
.ebox-archives-section__title::before {
    content: "▣";
}

#ebox-archives-affaires-279
.ebox-archives-section__title::before {
    content: "▰";
}

#ebox-archives-rapports-279
.ebox-archives-section__title::before {
    content: "▤";
}

#ebox-archives-inedits-279
.ebox-archives-section__title::before {
    content: "★";
}


/* ============================================================
   26. ICÔNES LIVRES / ARTICLES
   ============================================================ */

#ebox-livres-articles-livres-273
.ebox-archives-section__title::before {
    content: "▤";
}

#ebox-livres-articles-articles-273
.ebox-archives-section__title::before {
    content: "▣";
}

#ebox-livres-articles-theses-273
.ebox-archives-section__title::before {
    content: "◆";
}

#ebox-livres-articles-memoires-273
.ebox-archives-section__title::before {
    content: "◇";
}

#ebox-livres-articles-periodiques-273
.ebox-archives-section__title::before {
    content: "▥";
}


/* ============================================================
   27. LIEN "VOIR TOUS LES OUVRAGES"
   ============================================================ */

.ebox-archives-section__more {
    display: inline-flex !important;
    align-items: center !important;

    gap: 10px !important;

    align-self: center !important;
    justify-self: end !important;

    margin: 0 18px 0 0 !important;

    color: #4a2a16 !important;

    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;

    text-decoration: none !important;
    white-space: nowrap !important;

    transition:
        color .2s ease,
        transform .2s ease;
}

.ebox-archives-section__more:hover,
.ebox-archives-section__more:focus-visible {
    color: #7a4828 !important;

    transform: translateX(3px);

    outline: none !important;
}


/* ============================================================
   28. PRODUITS — 5 COUVERTURES PAR LIGNE
   ============================================================ */

.ebox-archives-section__products {
    width: 100% !important;
    min-width: 0 !important;
}

.ebox-archives-section__products .woocommerce {
    width: 100% !important;
    margin: 0 !important;
}

.ebox-archives-section__products ul.products {
    display: grid !important;

    grid-template-columns:
        repeat(5, minmax(0, 1fr)) !important;

    gap: 22px !important;

    width: 100% !important;
    margin: 0 !important;

    align-items: stretch !important;
}

.ebox-archives-section__products ul.products::before,
.ebox-archives-section__products ul.products::after {
    display: none !important;
}


/* ============================================================
   29. CARTES PRODUITS
   ============================================================ */

.ebox-archives-section__products
ul.products
li.product {
    display: flex !important;
    flex-direction: column !important;

    width: auto !important;
    max-width: none !important;

    float: none !important;
    clear: none !important;

    margin: 0 !important;
    padding: 0 !important;

    text-align: center !important;
}


/* ===== Structure interne ===== */

.ebox-archives-section__products
.ebox-book-card {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: center !important;

    width: 100% !important;
    height: 100% !important;

    text-align: center !important;
}


/* ============================================================
   30. COUVERTURES ALIGNÉES
   ============================================================ */

.ebox-archives-section__products
.ebox-book-card__cover {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;

    /*
     * Même zone pour toutes les couvertures.
     * Cela évite les gros décalages verticaux.
     */
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;

    padding: 10px !important;

    background: #f8fafc !important;

    overflow: hidden !important;

    box-sizing: border-box !important;
}

.ebox-archives-section__products
.ebox-book-card__cover img {
    display: block !important;

    width: auto !important;
    max-width: 100% !important;

    height: auto !important;
    max-height: 280px !important;

    margin: 0 auto !important;

    object-fit: contain !important;
    object-position: center center !important;
}


/* ============================================================
   31. CORPS DES CARTES
   ============================================================ */

.ebox-archives-section__products
.ebox-book-card__body {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: center !important;

    width: 100% !important;

    padding: 10px 10px 14px !important;

    text-align: center !important;

    box-sizing: border-box !important;
}


/* ===== Titre ===== */

.ebox-archives-section__products
.ebox-book-card__title {
    width: 100% !important;

    margin:
        0 auto
        6px !important;

    color: #111827 !important;

    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;

    text-align: center !important;
}


/* ===== Auteur ===== */

.ebox-archives-section__products
.ebox-book-card__author {
    width: 100% !important;

    margin:
        3px auto
        8px !important;

    color: #6b7280 !important;

    font-size: 13px !important;
    font-style: italic !important;
    line-height: 1.4 !important;

    text-align: center !important;
}


/* ===== Métadonnées ===== */

.ebox-archives-section__products
.ebox-book-card__meta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;

    gap: 10px !important;

    width: 100% !important;

    margin:
        0 auto
        8px !important;

    color: #374151 !important;

    font-size: 13px !important;

    text-align: center !important;
}


/* ===== Prix ===== */

.ebox-archives-section__products
.ebox-book-card__price {
    width: 100% !important;

    margin:
        auto auto
        0 !important;

    font-size: 15px !important;
    font-weight: 700 !important;

    text-align: center !important;
}


/* ============================================================
   32. SUPPRESSION DU BOUTON AJOUTER AU PANIER
   ============================================================ */

.ebox-archives-page
.products
li.product
.button,

.ebox-archives-page
.products
li.product
.add_to_cart_button,

.ebox-archives-page
.products
li.product
.added_to_cart {
    display: none !important;
}


/* ============================================================
   33. RESPONSIVE — TABLETTE
   ============================================================ */

@media (max-width: 1100px) {

    .ebox-archives-layout {
        grid-template-columns: 1fr !important;
    }

    .ebox-archives-layout__sidebar {
        margin-bottom: 25px !important;
    }

    .ebox-archives-layout__sidebar
    .ebox-filters-sidebar {
        position: static !important;
    }

    .ebox-archives-section__products
    ul.products {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
    }
}


/* ============================================================
   34. RESPONSIVE — PETITE TABLETTE
   ============================================================ */

@media (max-width: 900px) {

    .ebox-archives-section__header {
        grid-template-columns: 1fr !important;

        row-gap: 10px !important;
    }

    .ebox-archives-section__title {
        width: fit-content !important;
        min-width: 0 !important;

        padding: 13px 22px !important;

        font-size: 24px !important;
    }

    .ebox-archives-section__more {
        justify-self: end !important;

        margin-right: 0 !important;
    }
}


/* ============================================================
   35. RESPONSIVE — MOBILE
   ============================================================ */

@media (max-width: 768px) {

    .ebox-archives-section__products
    ul.products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 18px !important;
    }

    .ebox-archives-section__products
    .ebox-book-card__cover {
        height: 280px !important;
        min-height: 280px !important;
        max-height: 280px !important;
    }

    .ebox-archives-section__products
    .ebox-book-card__cover img {
        max-height: 260px !important;
    }
}


/* ============================================================
   36. RESPONSIVE — PETIT MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .ebox-archives-page__header h1 {
        font-size: 29px !important;
    }

    .ebox-archives-section__title {
        width: 100% !important;

        border-radius:
            14px 42px 14px 14px !important;

        font-size: 21px !important;
    }

    .ebox-archives-section__more {
        justify-self: start !important;
    }
}

@media (max-width: 480px) {

    .ebox-archives-section__products
    ul.products {
        grid-template-columns: 1fr !important;
    }

    .ebox-archives-section__products
    .ebox-book-card__cover {
        height: 330px !important;
        min-height: 330px !important;
        max-height: 330px !important;
    }

    .ebox-archives-section__products
    .ebox-book-card__cover img {
        max-height: 310px !important;
    }
}


/* ============================================================
   37. RÉSEAUX SOCIAUX SOUS LE CATALOGUE
   ============================================================ */

.ebox-social-sidebar {
    width: 100%;

    margin-top: 18px;
    padding: 22px 18px;

    background: #fcfaf7;

    border: 1px solid rgba(91, 45, 20, .14);
    border-radius: 14px;

    box-shadow:
        0 6px 18px
        rgba(61, 39, 24, .07);

    box-sizing: border-box;
}


/* ============================================================
   38. TITRE
   ============================================================ */

.ebox-social-sidebar__title {
    margin: 0 0 12px;

    color: #542d18;

    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}


/* ============================================================
   39. DESCRIPTION
   ============================================================ */

.ebox-social-sidebar__description {
    margin: 0 0 12px;

    color: #5d6470;

    font-size: 14px;
    line-height: 1.55;

    text-align: center;
}


/* ============================================================
   40. LISTE DES RÉSEAUX
   ============================================================ */

.ebox-social-sidebar__links {
    display: flex;
    flex-direction: column;

    gap: 10px;

    width: 100%;
}


/* ============================================================
   41. LIEN SOCIAL
   ============================================================ */

.ebox-social-sidebar__link {
    display: flex;
    align-items: center;

    gap: 12px;

    width: 100%;
    min-height: 52px;

    padding: 8px 12px;

    background: #fbfaf8;

    border: 1px solid #e4ddd6;
    border-radius: 10px;

    color: #283548;

    text-decoration: none !important;

    box-sizing: border-box;

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease,
        color .2s ease;
}

.ebox-social-sidebar__link:hover,
.ebox-social-sidebar__link:focus-visible {
    transform: translateY(-1px);

    background: #fcfaf7;

    border-color: #b98b65;

    box-shadow:
        0 5px 13px
        rgba(61, 39, 24, .10);

    color: #542d18;

    text-decoration: none !important;
    outline: none;
}


/* ============================================================
   42. ICÔNE
   ============================================================ */

.ebox-social-sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    border-radius: 8px;
}

.ebox-social-sidebar__icon svg {
    display: block;

    width: 20px;
    height: 20px;

    fill: currentColor;
}


/* ============================================================
   43. LABEL
   ============================================================ */

.ebox-social-sidebar__label {
    flex: 1;

    min-width: 0;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    text-align: left;
}


/* ============================================================
   44. FLÈCHE
   ============================================================ */

.ebox-social-sidebar__arrow {
    flex: 0 0 auto;

    margin-left: auto;

    color: #815437;

    font-size: 23px;
    line-height: 1;
}


/* ============================================================
   45. FACEBOOK
   ============================================================ */

.ebox-social-sidebar__link--facebook
.ebox-social-sidebar__icon {
    color: #1877f2;

    background:
        rgba(24, 119, 242, .10);
}


/* ============================================================
   46. TIKTOK
   ============================================================ */

.ebox-social-sidebar__link--tiktok
.ebox-social-sidebar__icon {
    color: #111;

    background:
        rgba(0, 0, 0, .07);
}


/* ============================================================
   47. YOUTUBE
   ============================================================ */

.ebox-social-sidebar__link--youtube
.ebox-social-sidebar__icon {
    color: #ff0000;

    background:
        rgba(255, 0, 0, .09);
}


/* ============================================================
   48. RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {

    .ebox-social-sidebar {
        padding: 18px 14px;
    }

    .ebox-social-sidebar__title {
        font-size: 20px;
    }

    .ebox-social-sidebar__description {
        font-size: 13px;
    }

    .ebox-social-sidebar__link {
        min-height: 48px;

        padding: 7px 10px;
    }

    .ebox-social-sidebar__icon {
        flex-basis: 34px;

        width: 34px;
        height: 34px;
    }

    .ebox-social-sidebar__icon svg {
        width: 18px;
        height: 18px;
    }

    .ebox-social-sidebar__label {
        font-size: 13px;
    }

    .ebox-social-sidebar__arrow {
        font-size: 20px;
    }
}


/* ============================================================
   NEWSLETTER SIDEBAR
   ============================================================ */

.ebox-newsletter-sidebar {
    width: 100%;
    margin-top: 18px;
    padding: 22px 18px;

    background: #fcfaf7;
    border: 1px solid rgba(91, 45, 20, 0.14);
    border-radius: 14px;

    box-shadow: 0 6px 18px rgba(61, 39, 24, 0.07);

    box-sizing: border-box;
}


/* Même style que "Suivez-nous" */

.ebox-newsletter-sidebar__title {
    margin: 0 0 12px;

    color: #542d18;

    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
}


/* Description */

.ebox-newsletter-sidebar__description {
    margin: 0 0 16px;

    color: #5d6470;

    font-size: 14px;
    line-height: 1.55;
}


/* Formulaire */

.ebox-newsletter-sidebar__form {
    display: flex;
    flex-direction: column;

    gap: 10px;

    width: 100%;
}


/* Champ email */

.ebox-newsletter-sidebar__email {
    display: block;

    width: 100%;
    min-height: 46px;

    margin: 0;
    padding: 10px 13px;

    background: #fff;

    border: 1px solid #ded6ce;
    border-radius: 9px;

    color: #283548;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.3;

    box-sizing: border-box;

    box-shadow: none;
}

.ebox-newsletter-sidebar__email::placeholder {
    color: #9298a2;
}

.ebox-newsletter-sidebar__email:focus {
    border-color: #9a6846;

    outline: none;

    box-shadow:
        0 0 0 3px
        rgba(154, 104, 70, 0.12);
}


/* Bouton */

.ebox-newsletter-sidebar__submit {
    appearance: none;
    -webkit-appearance: none;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 46px;

    margin: 0;
    padding: 10px 14px;

    background: #4a2a16 !important;
    color: #fff !important;

    border: 0 !important;
    border-radius: 9px !important;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;

    text-transform: none;

    cursor: pointer;

    box-shadow: none !important;

    transition:
        background-color .2s ease,
        transform .2s ease;
}

.ebox-newsletter-sidebar__submit:hover,
.ebox-newsletter-sidebar__submit:focus-visible {
    background: #63391f !important;

    transform: translateY(-1px);

    outline: none;
}


/* Accessibilité */

.ebox-newsletter-sidebar .screen-reader-text {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;

    border: 0 !important;
}


/* Responsive */

@media (max-width: 600px) {

    .ebox-newsletter-sidebar {
        padding: 18px 14px;
    }

    .ebox-newsletter-sidebar__title {
        font-size: 20px;
    }

    .ebox-newsletter-sidebar__description {
        font-size: 13px;
    }
}

/* ============================================================
   NEWSLETTER — MESSAGE DE CONFIRMATION
   ============================================================ */

.ebox-newsletter-sidebar__message {
    width: 100%;
    margin: 0 0 12px;
    padding: 10px 12px;

    box-sizing: border-box;
    border-radius: 8px;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.ebox-newsletter-sidebar__message--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}


/* ============================================================
   ARCHIVES — BOUTON RÉDUIRE / AFFICHER TOUS
   ============================================================ */

.ebox-archives-section__toggle {
    appearance: none;
    -webkit-appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin: 20px auto 0;
    padding: 10px 16px;

    background: transparent !important;
    color: #4a2a16 !important;

    border: 1px solid #cfa976 !important;
    border-radius: 8px !important;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;

    cursor: pointer;

    box-shadow: none !important;

    transition:
        background-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.ebox-archives-section__toggle:hover,
.ebox-archives-section__toggle:focus-visible {
    background: #ead8bf !important;
    color: #4a2a16 !important;

    transform: translateY(-1px);

    outline: none !important;
}

.ebox-archives-section__toggle-icon {
    font-size: 16px;
    line-height: 1;
}

/* ============================================================
   PRODUITS MASQUÉS PAR LE BOUTON AFFICHER / RÉDUIRE
   ============================================================ */

.ebox-archives-section__products
ul.products
li.product[hidden] {
    display: none !important;
}

/* Masquer les catégories produit affichées en bas des cartes */
.ebox-book-card__category,
.ebox-book-card__categories,
.ast-woo-product-category {
    display: none !important;
}


/* ============================================================
   CATÉGORIES / TAXONOMIES — FORCER 5 PRODUITS PAR LIGNE
   ============================================================ */

body.tax-product_cat .ebox-catalog-content ul.products,
body.tax-document_type .ebox-catalog-content ul.products,
body.post-type-archive-product .ebox-catalog-content ul.products,
body.woocommerce-shop .ebox-catalog-content ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 22px !important;
}

body.tax-product_cat .ebox-catalog-content ul.products li.product,
body.tax-document_type .ebox-catalog-content ul.products li.product,
body.post-type-archive-product .ebox-catalog-content ul.products li.product,
body.woocommerce-shop .ebox-catalog-content ul.products li.product {
    width: auto !important;
    max-width: none !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}



/* ============================================================

   CATALOGUE / CATÉGORIES — RESPONSIVE CORRIGÉ

   ============================================================ */

body.tax-product_cat .ebox-catalog-content ul.products,

body.tax-document_type .ebox-catalog-content ul.products,

body.post-type-archive-product .ebox-catalog-content ul.products,

body.woocommerce-shop .ebox-catalog-content ul.products,

body.search-results .ebox-catalog-content ul.products {

    display: grid !important;

    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;

    gap: 22px !important;

    width: 100% !important;

    min-width: 0 !important;

    margin: 0 !important;

    padding: 0 !important;

}

body.tax-product_cat .ebox-catalog-content ul.products li.product,

body.tax-document_type .ebox-catalog-content ul.products li.product,

body.post-type-archive-product .ebox-catalog-content ul.products li.product,

body.woocommerce-shop .ebox-catalog-content ul.products li.product,

body.search-results .ebox-catalog-content ul.products li.product {

    width: auto !important;

    min-width: 0 !important;

    max-width: none !important;

    margin: 0 !important;

    float: none !important;

    clear: none !important;

}

body.tax-product_cat .ebox-book-card,

body.tax-document_type .ebox-book-card,

body.post-type-archive-product .ebox-book-card,

body.woocommerce-shop .ebox-book-card,

body.search-results .ebox-book-card,

body.tax-product_cat .ebox-book-card__body,

body.tax-document_type .ebox-book-card__body,

body.post-type-archive-product .ebox-book-card__body,

body.woocommerce-shop .ebox-book-card__body,

body.search-results .ebox-book-card__body {

    width: 100% !important;

    min-width: 0 !important;

}

body.tax-product_cat .ebox-book-card__title,

body.tax-document_type .ebox-book-card__title,

body.post-type-archive-product .ebox-book-card__title,

body.woocommerce-shop .ebox-book-card__title,

body.search-results .ebox-book-card__title,

body.tax-product_cat .ebox-book-card__author,

body.tax-document_type .ebox-book-card__author,

body.post-type-archive-product .ebox-book-card__author,

body.woocommerce-shop .ebox-book-card__author,

body.search-results .ebox-book-card__author,

body.tax-product_cat .ebox-book-card__price,

body.tax-document_type .ebox-book-card__price,

body.post-type-archive-product .ebox-book-card__price,

body.woocommerce-shop .ebox-book-card__price,

body.search-results .ebox-book-card__price {

    width: 100% !important;

    min-width: 0 !important;

    white-space: normal !important;

    word-break: normal !important;

    overflow-wrap: normal !important;

    hyphens: auto;

}

/* Tablette */

@media (max-width: 1100px) {

    body.tax-product_cat .ebox-catalog-content ul.products,

    body.tax-document_type .ebox-catalog-content ul.products,

    body.post-type-archive-product .ebox-catalog-content ul.products,

    body.woocommerce-shop .ebox-catalog-content ul.products,

    body.search-results .ebox-catalog-content ul.products {

        grid-template-columns:

            repeat(3, minmax(0, 1fr)) !important;

    }

}

/* Mobile */

@media (max-width: 768px) {

    body.tax-product_cat .ebox-catalog-content ul.products,

    body.tax-document_type .ebox-catalog-content ul.products,

    body.post-type-archive-product .ebox-catalog-content ul.products,

    body.woocommerce-shop .ebox-catalog-content ul.products,

    body.search-results .ebox-catalog-content ul.products {

        grid-template-columns:

            repeat(2, minmax(0, 1fr)) !important;

        gap: 16px !important;

    }

    body.tax-product_cat .ebox-book-card__cover,

    body.tax-document_type .ebox-book-card__cover,

    body.post-type-archive-product .ebox-book-card__cover,

    body.woocommerce-shop .ebox-book-card__cover,

    body.search-results .ebox-book-card__cover {

        height: 240px !important;

        min-height: 240px !important;

        max-height: 240px !important;

    }

    body.tax-product_cat .ebox-book-card__cover img,

    body.tax-document_type .ebox-book-card__cover img,

    body.post-type-archive-product .ebox-book-card__cover img,

    body.woocommerce-shop .ebox-book-card__cover img,

    body.search-results .ebox-book-card__cover img {

        max-height: 220px !important;

    }

    body.tax-product_cat .ebox-book-card__title,

    body.tax-document_type .ebox-book-card__title,

    body.post-type-archive-product .ebox-book-card__title,

    body.woocommerce-shop .ebox-book-card__title,

    body.search-results .ebox-book-card__title {

        font-size: 15px !important;

        line-height: 1.35 !important;

    }

}

/* Petit mobile */

@media (max-width: 480px) {

    body.tax-product_cat .ebox-catalog-content ul.products,

    body.tax-document_type .ebox-catalog-content ul.products,

    body.post-type-archive-product .ebox-catalog-content ul.products,

    body.woocommerce-shop .ebox-catalog-content ul.products,

    body.search-results .ebox-catalog-content ul.products {

        grid-template-columns: 1fr !important;

    }

    body.tax-product_cat .ebox-book-card__cover,

    body.tax-document_type .ebox-book-card__cover,

    body.post-type-archive-product .ebox-book-card__cover,

    body.woocommerce-shop .ebox-book-card__cover,

    body.search-results .ebox-book-card__cover {

        height: 320px !important;

        min-height: 320px !important;

        max-height: 320px !important;

    }

    body.tax-product_cat .ebox-book-card__cover img,

    body.tax-document_type .ebox-book-card__cover img,

    body.post-type-archive-product .ebox-book-card__cover img,

    body.woocommerce-shop .ebox-book-card__cover img,

    body.search-results .ebox-book-card__cover img {

        max-height: 300px !important;

    }

}


/* ============================================================
   TOP GRATUITS / ARCHIVES — RESPONSIVE CORRIGÉ
   ============================================================ */

.ebox-top-gratuits-page
.ebox-archives-section__products
ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 22px !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
}

.ebox-top-gratuits-page
.ebox-archives-section__products
ul.products
li.product {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;

    float: none !important;
    clear: none !important;
}

.ebox-top-gratuits-page .ebox-book-card,
.ebox-top-gratuits-page .ebox-book-card__body,
.ebox-top-gratuits-page .ebox-book-card__title,
.ebox-top-gratuits-page .ebox-book-card__author,
.ebox-top-gratuits-page .ebox-book-card__meta,
.ebox-top-gratuits-page .ebox-book-card__price {
    width: 100% !important;
    min-width: 0 !important;
}

.ebox-top-gratuits-page .ebox-book-card__title,
.ebox-top-gratuits-page .ebox-book-card__author,
.ebox-top-gratuits-page .ebox-book-card__price {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    hyphens: auto;
}


/* Tablette */

@media (max-width: 1100px) {

    .ebox-top-gratuits-page
    .ebox-archives-section__products
    ul.products {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
    }
}


/* Mobile */

@media (max-width: 768px) {

    .ebox-top-gratuits-page
    .ebox-archives-section__products
    ul.products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 16px !important;
    }

    .ebox-top-gratuits-page .ebox-book-card__cover {
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
    }

    .ebox-top-gratuits-page .ebox-book-card__cover img {
        max-height: 220px !important;
    }

    .ebox-top-gratuits-page .ebox-book-card__title {
        font-size: 15px !important;
        line-height: 1.35 !important;
    }
}


/* Petit mobile */

@media (max-width: 480px) {

    .ebox-top-gratuits-page
    .ebox-archives-section__products
    ul.products {
        grid-template-columns: 1fr !important;
    }

    .ebox-top-gratuits-page .ebox-book-card__cover {
        height: 320px !important;
        min-height: 320px !important;
        max-height: 320px !important;
    }

    .ebox-top-gratuits-page .ebox-book-card__cover img {
        max-height: 300px !important;
    }
}


/* ============================================================
   ARCHIVES AUTEURS — RÉDUIRE L’ESPACE EN HAUT
   ============================================================ */

body.tax-book_author .site-content,
body.tax-book_author .ast-container,
body.tax-book_author #primary,
body.tax-book_author .content-area {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.tax-book_author .woocommerce-breadcrumb {
    margin-top: 20px !important;
}

body.tax-book_author .woocommerce-products-header,
body.tax-book_author .page-title {
    margin-top: 0 !important;
}

body.tax-book_author .ebox-catalog-layout {
    margin-top: 24px !important;
}

/* Archives auteurs — rapprochement du contenu du header */

body.tax-book_author .site-content {
    padding-top: 20px !important;
}

body.tax-book_author .ast-container {
    padding-top: 0 !important;
}

body.tax-book_author .woocommerce-breadcrumb {
    margin-top: 0 !important;
    margin-bottom: 22px !important;
}

body.tax-book_author .woocommerce-products-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ============================================================
   ARCHIVES AUTEURS — RECENTRAGE HORIZONTAL
   ============================================================ */

body.tax-book_author .site-content .ast-container {
    width: 100% !important;
    max-width: 1450px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding-left: 24px !important;
    padding-right: 24px !important;

    box-sizing: border-box !important;
}

body.tax-book_author #primary,
body.tax-book_author .content-area {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}

body.tax-book_author .ebox-catalog-layout {
    width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 36px !important;
}


/* ==========================================================
   ARCHIVES AUTEURS — RESPONSIVE MOBILE
   ========================================================== */

@media (max-width: 900px) {

    .tax-book_author .ebox-catalog-layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px !important;
        width: 100% !important;
    }

    .tax-book_author .ebox-home-showcase__sidebar,
    .tax-book_author .ebox-catalog-layout > aside {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .tax-book_author .ebox-filters-sidebar {
        position: static !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .tax-book_author .ebox-catalog-content {
        width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .tax-book_author .ebox-catalog-content ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .tax-book_author .ebox-catalog-content ul.products li.product {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
}

@media (max-width: 520px) {

    .tax-book_author .ebox-catalog-content ul.products {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}



/* ==========================================================
   TITRE — RÉSULTATS DE RECHERCHE
   ========================================================== */

body.search-results .woocommerce-products-header__title,
body.search-results h1.page-title,
body.search-results .page-title {
    margin: 0 0 28px !important;

    font-size: 38px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

@media (max-width: 768px) {
    body.search-results .woocommerce-products-header__title,
    body.search-results h1.page-title,
    body.search-results .page-title {
        font-size: 28px !important;
        margin-bottom: 20px !important;
    }
}

/* ===== Titre page recherche ===== */

body.search-results h1,
body.search-results h1.page-title,
body.search-results .woocommerce-products-header h1.page-title,
body.search-results .woocommerce-products-header__title.page-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin-bottom: 20px !important;
}


/*
|--------------------------------------------------------------------------
| Recherche catalogue — inclure les auteurs
|--------------------------------------------------------------------------
*/

add_action('pre_get_posts', function ($query) {

    if (
        is_admin()
        || !$query->is_main_query()
        || !$query->is_search()
    ) {
        return;
    }

    /*
     * La recherche publique du site concerne uniquement les produits.
     */
    $query->set('post_type', 'product');
    $query->set('post_status', 'publish');

    $search_term = trim((string) $query->get('s'));

    if ($search_term === '') {
        return;
    }

    /*
     * Chercher les auteurs correspondant au texte saisi.
     */
    $author_terms = get_terms([
        'taxonomy'   => 'book_author',
        'hide_empty' => false,
        'search'     => $search_term,
        'fields'     => 'ids',
    ]);

    if (
        is_wp_error($author_terms)
        || empty($author_terms)
    ) {
        return;
    }

    /*
     * Produits rattachés aux auteurs trouvés.
     */
    $author_product_ids = get_posts([
        'post_type'      => 'product',
        'post_status'    => 'publish',
        'posts_per_page' => -1,
        'fields'         => 'ids',
        'tax_query'      => [
            [
                'taxonomy' => 'book_author',
                'field'    => 'term_id',
                'terms'    => array_map('absint', $author_terms),
            ],
        ],
    ]);

    if (empty($author_product_ids)) {
        return;
    }

    /*
     * Produits trouvés normalement dans le titre ou le contenu.
     */
    $text_product_ids = get_posts([
        'post_type'      => 'product',
        'post_status'    => 'publish',
        'posts_per_page' => -1,
        'fields'         => 'ids',
        's'              => $search_term,
    ]);

    $product_ids = array_values(array_unique(array_merge(
        array_map('absint', $author_product_ids),
        array_map('absint', $text_product_ids)
    )));

    /*
     * Désactiver la recherche textuelle native, puis utiliser la liste
     * complète des produits trouvés.
     */
    $query->set('s', '');
    $query->set('post__in', $product_ids);
    $query->set('orderby', 'post__in');

}, 20);

/* ============================================================
   ARCHIVE AUTEUR — ESPACEMENT ET TITRE
   ============================================================ */

body.tax-book_author .ast-container,
body.tax-book_author .site-content > .ast-container {
    padding-top: 24px !important;
}

body.tax-book_author .woocommerce-products-header,
body.tax-book_author .term-description {
    margin-top: 0 !important;
}

body.tax-book_author .woocommerce-products-header__title,
body.tax-book_author .page-title,
body.tax-book_author h1 {
    margin-top: 0 !important;
    margin-bottom: 24px !important;

    font-size: 24px !important;
    line-height: 1.2 !important;
}

body.tax-book_author .term-description {
    margin-bottom: 28px !important;
}

body.tax-book_author .term-description p:first-child {
    margin-top: 0 !important;
}

body.tax-book_author .site-main {
    padding-top: 0 !important;
}

body.tax-book_author .ast-woocommerce-container {
    padding-top: 0 !important;
}





/* ============================================================
   MASQUER LE TRI WOOCOMMERCE
   ============================================================ */

.woocommerce-ordering,
form.woocommerce-ordering,
select.orderby {
    display: none !important;
}

