/* ==========================================================
   eBox fiche produit 
   Structure, grille, couverture, titre, tableau
   ========================================================== */

.single-product .ast-container,
.single-product .site-content .ast-container {
    max-width: 1380px !important;
    width: 100% !important;
    display: block !important;
}

.single-product #primary,
.single-product .content-area {
    width: 100% !important;
    max-width: 100% !important;
}

.single-product .ebox-product-page {
    max-width: 1320px;
    margin: 35px auto;
    padding: 0 20px;
}

.ebox-product-grid {
    display: grid;
    grid-template-columns: 270px 400px 380px;
    gap: 28px;
    justify-content: center;
    align-items: start;
}

.ebox-product-cover,
.ebox-product-info,
.ebox-product-buy,
.ebox-product-description-full {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
}

.ebox-product-cover,
.ebox-product-info,
.ebox-product-buy {
    align-self: start;
}


/* ==========================================================
   Couverture produit + badges PDF / ePub
   ========================================================== */

.ebox-product-cover {
    text-align: center;
}

.ebox-cover-media {
    width: 100%;
    text-align: center;
}

.ebox-cover-gallery {
    position: relative;
    display: inline-block;
    width: auto;
    max-width: 260px;
}

.ebox-product-cover .woocommerce-product-gallery {
    display: block !important;
    width: 100% !important;
    max-width: 260px !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ebox-product-cover
.woocommerce-product-gallery__wrapper {
    margin: 0 !important;
}

.ebox-product-cover
.woocommerce-product-gallery__image img,
.ebox-product-cover
.woocommerce-product-gallery img {
    display: block !important;
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 6px;
}



/* ===== Badge PDF / ePub ===== */

.ebox-format-badges {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;

    transform: translate(-8px, -12px);

    display: flex;
    align-items: center;
    gap: 4px;

    pointer-events: none;
}

.ebox-format-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 30px !important;
    height: 18px !important;
    padding: 0 5px !important;

    color: #fff !important;

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

    border: 1px solid rgba(255,255,255,.22) !important;
    border-radius: 4px !important;

    box-shadow:
        0 2px 4px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.15) !important;

    text-shadow: 0 1px 1px rgba(0,0,0,.15);
}

.ebox-format-badge--pdf {
    min-width: 30px !important;
    background: linear-gradient(
        180deg,
        #ef3b2d 0%,
        #d93025 100%
    ) !important;
}

.ebox-format-badge--epub {
    min-width: 34px !important;
    background: linear-gradient(
        180deg,
        #42b95c 0%,
        #2f9e44 100%
    ) !important;
}







/* ===== Notation ===== */

.ebox-cover-rating {
    margin-top: 18px;
}






/* Titre et auteur */

.ebox-product-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    color: #111827;
}

.ebox-product-author {
    margin: 0 0 8px;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
}

/* Tableau informations ouvrage */

.ebox-product-details-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
    color: #8c3f00;
}

.ebox-product-details-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.ebox-product-details-card th,
.ebox-product-details-card td {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    text-align: left;
}

.ebox-product-details-card th {
    width: 38%;
    background: #f5f5f5;
    font-weight: 700;
    color: #374151;
}

/* Valeur du format */

.ebox-product-format {
    color: #8c3f00;
    font-weight: 700;
}


/* ==========================================================
   eBox fiche produit
   Colonne d'achat, PayPal, description, responsive
   ========================================================== */

/* ===== Colonne achat ===== */

.ebox-buy-card {
    text-align: center;
}

.ebox-buy-price {
    font-size: 24px;
    font-weight: 800;
    color: #1d4ed8;
    margin-bottom: 28px;
}

.ebox-buy-cart form.cart {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.ebox-buy-cart .quantity input {
    min-height: 40px;
}

.ebox-buy-cart .single_add_to_cart_button {
    flex: 1;
    min-width: 170px;
    min-height: 40px;
    border-radius: 6px;
    padding: 0 18px !important;
    white-space: nowrap;
}

.ebox-buy-secure {
    margin: 18px 0;
    text-align: left;
    color: #374151;
    font-size: 14px;
}

.ebox-buy-secure p {
    margin: 8px 0;
}

/* ===== Bouton PayPal ===== */

.ebox-paypal-referral {
    margin-top: 24px;
    padding: 16px;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 12px;
}

.ebox-paypal-referral a {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #7e22ce;
    border-radius: 10px;
    color: #6b21a8;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    transition: all .25s ease;
    box-sizing: border-box;
}

.ebox-paypal-referral a:hover {
    background: #7e22ce;
    color: #fff;
}



/* ===== Description ===== */

.ebox-product-description-full {
    max-width: 1100px;
    margin: 32px auto 0;
}

.ebox-product-description-full h2 {
    margin-top: 0;
    font-size: 32px;
    color: #8c3f00;
}

/* ===== Blocs WooCommerce inutiles ===== */

.single-product .product_meta,
.single-product .woocommerce-tabs {
    display: none !important;
}

/* ===== Responsive ===== */

@media (max-width: 1100px) {

    .ebox-product-grid {
        grid-template-columns: 270px 360px;
    }

    .ebox-product-buy {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 760px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {

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

    .single-product .ebox-product-page {
        margin-top: 20px;
        padding: 0 14px;
    }

    .ebox-product-buy {
        max-width: 100%;
    }
}


/* ==========================================================
   eBox fiche produit
   Loupe WooCommerce, partage réseaux sociaux, finitions
   ========================================================== */

/* ===== Suppression zoom / loupe WooCommerce ===== */

.ebox-product-cover .woocommerce-product-gallery__trigger,
.single-product .woocommerce-product-gallery__trigger,
.single-product .ast-product-gallery-layout-vertical-slider,
.single-product .flex-control-thumbs,
.ebox-product-cover a.woocommerce-product-gallery__trigger,
.ebox-product-cover .woocommerce-product-gallery > a:first-child,
.ebox-product-cover .woocommerce-product-gallery a[href*="full"],
.ebox-product-cover .woocommerce-product-gallery a[aria-label*="View"],
.ebox-product-cover .woocommerce-product-gallery a[aria-label*="vue"],
.ebox-product-cover .woocommerce-product-gallery .zoomImg {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== Partage réseaux sociaux ===== */

.ebox-share-box {
    margin-top: 22px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.ebox-share-box h3 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
    color: #8c3f00;
}

.ebox-share-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.ebox-share-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none;
    font-size: 20px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.ebox-share-icons a:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
}



.ebox-share-icons .facebook {
    background: #1877F2;
}

.ebox-share-icons .x {
    background: #000;
}

.ebox-share-icons .linkedin {
    background: #0A66C2;
}

.ebox-share-icons .whatsapp {
    background: #25D366;
}

.ebox-share-icons .email {
    background: #6B7280;
}

/* ===== Responsive partage ===== */

@media (max-width: 480px) {
    .ebox-share-icons {
        gap: 10px;
    }

    .ebox-share-icons a {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}


/* ===== Bouton extrait ===== */

.ebox-preview-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 12px 18px;
    background: #fff;
    color: #0d6efd;
    border: 2px solid #0d6efd;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all .25s ease;
}

.ebox-preview-button:hover {
    background: #0d6efd;
    color: #fff;
}

.ebox-preview-disabled {
    opacity: .75;
}

/* ===== Prix sous la couverture ===== */

.ebox-cover-price {
    margin-top: 14px;
    padding: 10px 12px;
    text-align: center;
    font-size: 18px;
}

.ebox-cover-price-label {
    font-weight: 800 !important;
    color: #8c3f00 !important;
}

.ebox-cover-price-value {
    margin-left: 4px;
}

.ebox-cover-price-value,
.ebox-cover-price-value span,
.ebox-cover-price-value bdi,
.ebox-cover-price-value .woocommerce-Price-amount,
.ebox-cover-price-value .woocommerce-Price-currencySymbol {
    font-weight: 800 !important;
    color: #1d4ed8 !important;
}

/* ===== Titres ===== */

.ebox-product-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    color: #111827;
}

.ebox-product-title-ar {
    margin: 4px 0 14px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}


.ebox-product-author {
    margin: 0 0 24px;
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

/* ===== Description bilingue ===== */

.ebox-product-description-full p {
    line-height: 1.7;
}

.ebox-product-description-full [align="right"],
.ebox-product-description-full p[style*="right"] {
    direction: rtl;
    text-align: right;
}

.ebox-product-cover .ebox-cover-price,
.ebox-product-cover .ebox-cover-price * {
    font-weight: 800 !important;
}

.ebox-product-cover .ebox-cover-price-label {
    color: #8c3f00 !important;
}

.ebox-product-cover .ebox-cover-price-value,
.ebox-product-cover .ebox-cover-price-value * {
    color: #1d4ed8 !important;
}

/* ===== Bouton PayPal direct ===== */

.ebox-product-paypal-button {
    margin-top: 14px;
}

.ebox-direct-paypal-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;

    margin-top: 14px;
    padding: 13px 18px;

    background: #ffc439 !important;
    color: #111 !important;

    border: none;
    border-radius: 6px;

    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;

    text-align: center;
    text-decoration: none !important;
    box-sizing: border-box;

    transition: background .2s ease;
}

.ebox-direct-paypal-button:hover {
    background: #f2ba36 !important;
    color: #111 !important;
}


/* ===== Panier simplifié eBox ===== */

.woocommerce-cart-form table.cart th.product-name,
.woocommerce-cart-form table.cart td.product-name {
    width: 60% !important;
    text-align: left !important;
}

.woocommerce-cart-form table.cart th.product-price,
.woocommerce-cart-form table.cart td.product-price {
    width: 15% !important;
    text-align: center !important;
}

.woocommerce-cart-form table.cart th.product-remove,
.woocommerce-cart-form table.cart td.product-remove {
    width: 25% !important;
    text-align: center !important;
}

.woocommerce-cart-form .ebox-cart-product {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
}

.woocommerce-cart-form .ebox-cart-product-cover {
    flex: 0 0 80px !important;
}

.woocommerce-cart-form .ebox-cart-product-image {
    width: 80px !important;
    height: 110px !important;
    object-fit: contain !important;
    display: block !important;
}

.woocommerce-cart-form .ebox-cart-product-title {
    text-align: left !important;
    font-weight: 700 !important;
}

.ebox-cart-remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 9px 14px !important;
    background: #fff5f5 !important;
    color: #b42318 !important;
    border: 1px solid #f0b8b3 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.ebox-cart-remove:hover {
    background: #fee2e2 !important;
    border-color: #dc2626 !important;
    color: #991b1b !important;
}

/* ===== Correction définitive en-tête panier ===== */

.woocommerce-cart-form table.cart thead tr::before,
.woocommerce-cart-form table.cart thead tr::after {
    content: none !important;
    display: none !important;
}


/* ============================================================
   PANIER - MASQUER LE SOUS-TOTAL
   ============================================================ */

.woocommerce-cart .cart_totals .cart-subtotal {
    display: none !important;
}

/* ============================================================
   MASQUER LE FOOTER ASTRA NATIF
   ============================================================ */

.site-below-footer-wrap {
    display: none !important;
}

/* ============================================================
   SUPPRESSION DU FOOTER ASTRA NATIF
   ============================================================ */

.site-footer .site-primary-footer-wrap,
.site-footer .site-above-footer-wrap,
.site-footer .site-below-footer-wrap,
.site-footer .ast-builder-grid-row-container {
    display: none !important;
}

/* ============================================================
   FOOTER EBOX
   ============================================================ */

.ebox-footer {
    font-size: 14px !important;
}

.ebox-footer a,
.ebox-footer span,
.ebox-footer-copyright {
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.ebox-footer a {
    font-weight: 500 !important;
}


/* ============================================================
   FOOTER EBOX
   ============================================================ */

.ebox-footer-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 30px !important;

    width: 100% !important;
    padding: 16px 26px !important;
    box-sizing: border-box !important;

    font-size: 14px !important;
    background: #fff !important;
}

.ebox-footer-copyright {
    flex-shrink: 0 !important;
    font-size: 14px !important;
}

.ebox-footer-links {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.ebox-footer-links a,
.ebox-footer-links span {
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.ebox-footer-links a {
    text-decoration: none !important;
}

@media (max-width: 900px) {
    .ebox-footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px !important;
    }

    .ebox-footer-links {
        justify-content: center !important;
    }
}


/* ============================================================
   FOOTER EBOX - TAILLE FORCÉE
   ============================================================ */

body .ebox-footer-bottom,
body .ebox-footer-bottom *,
body .ebox-footer-copyright,
body .ebox-footer-links,
body .ebox-footer-links a,
body .ebox-footer-links span {
    font-size: 16px !important;
    line-height: 1.7 !important;
}

body .ebox-footer-bottom {
    padding: 18px 30px !important;
}


/* ============================================================
   FOOTER EBOX - AGRANDISSEMENT DÉFINITIF
   ============================================================ */

footer,
footer *,
.ebox-footer,
.ebox-footer *,
.ebox-footer-bottom,
.ebox-footer-bottom * {
    font-size: 16px !important;
}

.ebox-footer-bottom {
    min-height: 65px !important;
    padding: 18px 26px !important;
}

.ebox-footer-copyright,
.ebox-footer-links,
.ebox-footer-links a,
.ebox-footer-links span {
    font-size: 16px !important;
    line-height: 1.6 !important;
}


/* ============================================================
   PAGE NOUS CONTACTER
   ============================================================ */

.ebox-contact-page {
    max-width: 850px;
    margin: 40px auto 60px;
    padding: 32px 36px;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;

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

.ebox-contact-form {
    width: 100%;
}

.ebox-contact-field {
    margin-bottom: 18px;
}

.ebox-contact-field label {
    display: block;
    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.ebox-contact-field label span {
    color: #b42318;
}

.ebox-contact-field input,
.ebox-contact-field select,
.ebox-contact-field textarea {
    width: 100%;
    padding: 11px 13px;

    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;

    font-size: 15px;
    color: #111827;

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

.ebox-contact-field input:focus,
.ebox-contact-field select:focus,
.ebox-contact-field textarea:focus {
    outline: none;
    border-color: #8c3f00;
    box-shadow: 0 0 0 3px rgba(140, 63, 0, .10);
}

.ebox-contact-field textarea {
    min-height: 160px;
    resize: vertical;
}

.ebox-contact-submit {
    margin-top: 24px;
    text-align: center;
}

.ebox-contact-submit button {
    min-width: 180px;
    padding: 12px 28px;

    background: #5b2a12;
    color: #fff;

    border: none;
    border-radius: 6px;

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

    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.ebox-contact-submit button:hover {
    background: #8c3f00;
    transform: translateY(-1px);
}

.ebox-contact-legal {
    margin-top: 26px;
    padding-top: 18px;

    border-top: 1px solid #e5e7eb;

    font-size: 12px;
    line-height: 1.6;
    color: #6b7280;

    text-align: center;
}

/* Messages */

.ebox-contact-message {
    margin-bottom: 22px;
    padding: 14px 16px;

    border-radius: 6px;

    font-size: 14px;
    font-weight: 600;
}

.ebox-contact-success {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
}

.ebox-contact-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Responsive */

@media (max-width: 768px) {

    .ebox-contact-page {
        margin: 20px 14px 40px;
        padding: 24px 18px;
    }

    .ebox-contact-submit button {
        width: 100%;
    }
}


/* ==========================================================
   BIOGRAPHIE DE L’AUTEUR
   ========================================================== */

.ebox-author-biography {
    max-width: 960px;
    margin: 28px auto 0;
    padding: 22px;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.ebox-author-biography h2 {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0 0 20px;
    color: #17243a;
    font-size: 25px;
    line-height: 1.3;
}

.ebox-author-biography h2 i {
    color: #8c3f00;
    font-size: 20px;
}

.ebox-author-biography__content {
    margin-top: 0;
}

.ebox-author-biography__content + .ebox-author-biography__content {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.ebox-author-biography__content h3 {
    margin: 0 0 12px;
    color: #17243a;
    font-size: 20px;
}

.ebox-author-biography__text {
    color: #374151;
    font-size: 15px;
    line-height: 1.75;
}

.ebox-author-biography__text p {
    margin: 0 0 12px;
}

.ebox-author-biography__text p:last-child {
    margin-bottom: 0;
}

.ebox-author-biography__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: 14px;

    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.ebox-author-biography__link:hover {
    color: #8c3f00;
}


/* ==========================================================
   DU MÊME AUTEUR
   ========================================================== */

.ebox-same-author {
    max-width: 1200px;
    margin: 28px auto 0;
    padding: 24px;

    box-sizing: border-box;
}

.ebox-same-author__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 22px;
}

.ebox-same-author__header > a {
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ebox-same-author__header > a:hover {
    color: #8c3f00;
}

.ebox-same-author__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.ebox-same-author-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    height: 100%;

    overflow: hidden;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(74, 42, 22, .09);
}

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

    width: 100%;
    height: 330px;
    min-height: 330px;
    max-height: 330px;

    padding: 10px;

    background: #f8fafc;
    overflow: hidden;
    box-sizing: border-box;
}

.ebox-same-author-card__cover img {
    display: block;

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

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

    margin: 0 auto !important;

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

.ebox-same-author-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    width: 100%;
    padding: 12px 14px 16px;

    background: #fff;
    text-align: center;
    box-sizing: border-box;
}

.ebox-same-author-card__title {
    margin: 0 0 8px;

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

.ebox-same-author-card__title a {
    color: #17243a;
    text-decoration: none;
}

.ebox-same-author-card__title a:hover {
    color: #8c3f00;
}

.ebox-same-author-card__format {
    margin-bottom: 8px;

    color: #374151;
    font-size: 13px;
}

.ebox-same-author-card__price,
.ebox-same-author-card__price * {
    margin-top: auto;

    color: #ea580c !important;
    font-size: 16px;
    font-weight: 700 !important;
}


/* ==========================================================
   RESPONSIVE — DU MÊME AUTEUR
   ========================================================== */

@media (max-width: 1100px) {

    .ebox-same-author__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {

    .ebox-author-biography,
    .ebox-same-author {
        padding: 18px;
    }

    .ebox-author-biography h2,
    .ebox-same-author h2 {
        font-size: 21px;
    }

    .ebox-same-author__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .ebox-same-author__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .ebox-same-author-card__cover {
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }

    .ebox-same-author-card__cover img {
        max-height: 260px !important;
    }
}

@media (max-width: 480px) {

    .ebox-same-author__grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   NOTATION DE L'OUVRAGE
   ========================================================== */


.ebox-product-rating {
    max-width: 1100px;
    margin: 32px auto 0;
    padding: 22px;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-sizing: border-box;
}

.ebox-product-rating__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ebox-product-rating__stars-display {
    font-size: 25px;
    line-height: 1;
    color: #d97706;
    letter-spacing: 2px;
}

.ebox-product-rating__average {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
}

.ebox-product-rating__vote {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.ebox-product-rating__label {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.ebox-product-rating__stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Neutraliser le style global des boutons */
button.ebox-rating-star {
    appearance: none !important;

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

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

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    color: #d1d5db !important;

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

    cursor: pointer;
}

button.ebox-rating-star:hover {
    background: transparent !important;
    color: #d97706 !important;
    transform: scale(1.1);
}

button.ebox-rating-star.is-active {
    background: transparent !important;
    color: #d97706 !important;
}

.ebox-product-rating__message {
    font-size: 13px;
    font-weight: 600;
    color: #166534;
}

.ebox-product-rating__login {
    margin-top: 12px;
}

.ebox-product-rating__login a {
    font-size: 14px;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
}

.ebox-product-rating__login a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {

    .ebox-product-rating {
        width: calc(100% - 32px);
        padding: 18px;
    }

    .ebox-product-rating__vote {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ==========================================================
   ALIGNEMENT UNIFORME — DESCRIPTION / NOTATION / BIOGRAPHIE
   ========================================================== */

.ebox-product-description-full,
.ebox-product-rating,
.ebox-author-biography {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Espacement vertical uniforme */
.ebox-product-description-full {
    margin-top: 32px;
}

.ebox-product-rating,
.ebox-author-biography {
    margin-top: 28px;
}

/* ==========================================================
   DESCRIPTION REPLIABLE
   ========================================================== */

.ebox-product-description-content {
    position: relative;

    max-height: 420px;
    overflow: hidden;

    transition: max-height .35s ease;
}

.ebox-product-description-content::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 90px;

    pointer-events: none;

    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        #fff
    );
}

.ebox-product-description-content.is-expanded {
    max-height: none;
}

.ebox-product-description-content.is-expanded::after {
    display: none;
}

.ebox-description-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

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

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #fff;
    color: #1d4ed8;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.ebox-description-toggle:hover {
    background: #f8fafc;
}

/* Masquer "Voir le panier" quand on est déjà sur la page Panier */
.woocommerce-cart .woocommerce-message a.wc-forward {
    display: none !important;
}

/* ============================================================
   NAVIGATION PANIER — FICHE PRODUIT
   ============================================================ */

.ebox-product-navigation {
    margin: 22px 0;

    padding: 18px;

    background: #f7fbff;

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

    box-sizing: border-box;
}


.ebox-product-navigation__header {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    margin-bottom: 18px;
}


.ebox-product-navigation__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 46px;
    width: 46px;
    height: 46px;

    border-radius: 50%;

    background: #e6f0ff;

    font-size: 22px;
}


.ebox-product-navigation__text {
    display: flex;
    flex-direction: column;

    gap: 4px;
}


.ebox-product-navigation__text strong {
    color: #1455b8;

    font-size: 17px;
    font-weight: 700;
}


.ebox-product-navigation__text span {
    color: #4b5563;

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


.ebox-product-navigation__actions {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;
}


.ebox-product-navigation__continue,
.ebox-product-navigation__cart {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 11px 14px;

    border-radius: 8px;

    box-sizing: border-box;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;
}


.ebox-product-navigation__continue {
    background: #fff;

    color: #1455b8;

    border: 1px solid #1455b8;
}


.ebox-product-navigation__continue:hover {
    background: #f4f8ff;
}


.ebox-product-navigation__cart {
    justify-content: space-between;

    background: #0d6efd;

    color: #fff !important;

    border: 1px solid #0d6efd;
}


.ebox-product-navigation__cart:hover {
    background: #0b5ed7;
}


@media (max-width: 600px) {

    .ebox-product-navigation__actions {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   CORRECTION CHAMP SUJET — SAFARI / ASTRA
   ============================================================ */

body #ebox_subject {
    display: block !important;

    width: 100% !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: none !important;

    padding: 14px 48px 14px 16px !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 24px !important;

    color: #111827 !important;
    background-color: #fff !important;

    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;

    box-sizing: border-box !important;

    -webkit-appearance: none !important;
    appearance: none !important;

    background-image:
        linear-gradient(45deg, transparent 50%, #374151 50%),
        linear-gradient(135deg, #374151 50%, transparent 50%) !important;

    background-position:
        calc(100% - 21px) 25px,
        calc(100% - 15px) 25px !important;

    background-size: 6px 6px, 6px 6px !important;
    background-repeat: no-repeat !important;
}

body #ebox_subject option {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    line-height: 24px !important;
}
