/* ============================================================
   HEADER EBOX ÉDITIONS
   ============================================================ */


/* ===== Masquer complètement le header Astra ===== */

#masthead,
.site-header,
.ast-primary-header-bar,
.ast-desktop-header,
.ast-mobile-header-wrap,
.ast-main-header-wrap,
.ast-below-header-wrap,
.ast-above-header-wrap,
.site-branding,
.ast-site-identity,
.site-logo-img {
    display: none !important;
}


/* ===== Header principal eBox ===== */

.ebox-header-v2 {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 32px 10px;
}


/* ===== Ligne supérieure ===== */


.ebox-header-v2__top {
    max-width: 1500px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
}


/* ============================================================
   MARQUE : LOGO + SOUS-TITRE
   ============================================================ */

.ebox-header-v2__brand {
    width: 300px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    min-width: 0;
}


/* ===== Logo ===== */

.ebox-header-v2__logo {
    flex: none;
    padding-left: 10px;
}

.ebox-header-v2__logo img {
    display: block;
    max-width: 170px;
    height: auto;
}


/* ===== Sous-titre sous le logo ===== */

.ebox-header-v2__tagline {
    width: auto;
    max-width: none;

    margin: 7px 0 0;
    padding: 0 0 0 10px;

    box-sizing: border-box;

    color: #2a211b;
    background: transparent;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
}


/* ============================================================
   BARRE DE RECHERCHE
   ============================================================ */

.ebox-header-v2__search {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.ebox-header-v2__search form {
    display: flex;
    width: 100%;
}

.ebox-header-v2__search input {
    width: 100%;
    min-width: 0;
    height: 50px;

    padding: 0 18px;

    font-size: 16px;

    border: 1px solid #d7dbe0;
    border-right: none;
    border-radius: 8px 0 0 8px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);

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

.ebox-header-v2__search input:focus {
    outline: none;
    border-color: #4A2A16;

    box-shadow:
        0 0 0 3px rgba(74, 42, 22, .15);
}


/* ===== Bouton de recherche ===== */

.ebox-header-v2__search button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 50px;
    flex: 0 0 64px;

    border: none;
    border-radius: 0 8px 8px 0;

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

    cursor: pointer;

    transition: background-color .2s ease;
}

.ebox-header-v2__search button:hover {
    background: #6B3518 !important;
}

.ebox-header-v2__search button i {
    font-size: 20px;
    line-height: 1;
}


/* ============================================================
   ACTIONS : ACCUEIL / MON COMPTE / PANIER 
   ============================================================ */

.ebox-header-v2__actions {
    display: flex;
    align-items: center;

    gap: 24px;

    white-space: nowrap;
}


/* ===== Liens du header ===== */

.ebox-header-v2 a {
    color: #1f2937;
    font-weight: 500;

    text-decoration: none !important;

    transition: color .2s ease;
}

.ebox-header-v2 a:hover {
    color: #6B3518;
}


/* ============================================================
   LIGNE INFÉRIEURE
   ============================================================ */


.ebox-header-v2__bottom {
    display: block;

    width: 100%;
    max-width: none;

    margin: 8px 0 0;
    padding: 0;

    background: #f3eadf;
}



/* ============================================================
   NAVIGATION HORIZONTALE
   ============================================================ */

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

    gap: 8px;

    min-height: 40px;
    padding: 8px 20px;

    color: #4a2a16;

    border-radius: 8px;

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

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

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




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

    gap: 8px;

    min-height: 58px;
    padding: 0 28px;

    color: #2a211b;

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

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

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



.ebox-document-nav__separator {
    width: 1px;
    height: 24px;

    flex: 0 0 auto;

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


.ebox-document-nav__icon {
    font-size: 18px;
    line-height: 1;
}

.ebox-document-nav__separator {
    width: 1px;
    height: 24px;

    flex: 0 0 auto;

    background: #e3ddd6;
}


/* ============================================================
   BADGE PANIER
   ============================================================ */

.ebox-cart-link {
    position: relative;

    display: inline-flex;
    align-items: center;

    gap: 6px;
}

.ebox-cart-count {
    display: inline-flex !important;

    align-items: center !important;
    justify-content: center !important;

    min-width: 20px !important;
    height: 20px !important;

    padding: 0 5px !important;
    margin-left: 4px !important;

    background: #dc2626 !important;
    color: #fff !important;

    border-radius: 50px !important;

    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}


/* ============================================================
   CARTES PRODUITS
   ============================================================ */

.woocommerce-loop-product__title {
    display: none !important;
}

.ebox-book-card__author {
    margin: 8px 0 12px;

    color: #6b7280;

    font-size: 14px;
    font-style: italic;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

    .ebox-header-v2 {
        padding: 20px;
    }

    .ebox-header-v2__top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

    .ebox-header-v2__brand {
        flex: none;

        width: 100%;

        align-items: center;
    }

    .ebox-header-v2__logo {
        padding-left: 0;
        text-align: center;
    }

    .ebox-header-v2__logo img {
        margin: 0 auto;
    }

    .ebox-header-v2__tagline {
        margin-top: 7px;
        padding-left: 0;

        text-align: center;
    }

    .ebox-header-v2__search {
        flex: none;

        width: 100%;
        max-width: none;
    }

    .ebox-header-v2__actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .ebox-header-v2__bottom {
        display: block;

        width: 100%;
    }

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

        overflow-x: auto;

        padding: 0 14px;

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

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

        padding: 0 16px;
    }
}


@media (max-width: 600px) {

    .ebox-header-v2 {
        padding: 16px;
    }

    .ebox-header-v2__actions {
        gap: 14px;

        font-size: 14px;
    }

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

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

/* ===== Correction définitive de la barre de recherche ===== */

.ebox-header-v2__search {
    width: 100%;
    min-width: 0;
}

.ebox-header-v2__search form {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;

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

.ebox-header-v2__search input[type="search"] {
    flex: 1 1 auto !important;

    width: auto !important;
    min-width: 0 !important;
    height: 50px !important;

    margin: 0 !important;

    border-radius: 8px 0 0 8px !important;
}

.ebox-header-v2__search input[type="hidden"] {
    display: none !important;
}

.ebox-header-v2__search button[type="submit"] {
    flex: 0 0 64px !important;

    width: 64px !important;
    min-width: 64px !important;
    height: 50px !important;

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

    border-radius: 0 8px 8px 0 !important;
}