/* EB — Produits favoris */
.woocommerce-product-gallery { position: relative; }

.ebpf-favorite-button {
    --ebpf-button-size: 72px;
    position: absolute;
    top: 24px;
    right: 111px;
    z-index: 60;
    width: var(--ebpf-button-size) !important;
    height: var(--ebpf-button-size) !important;
    min-width: 0 !important;
    max-width: var(--ebpf-button-size) !important;
    min-height: 0 !important;
    max-height: var(--ebpf-button-size) !important;
    box-sizing: border-box;
    border: 0 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #000 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
    transform: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    line-height: 1 !important;
}

/* Empêche le gros cœur de se balader au chargement : il reste invisible jusqu'à son placement. */
.ebpf-single-product-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.ebpf-single-product-button.is-positioned {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ebpf-favorite-button:hover,
.ebpf-favorite-button:focus {
    background: #fff !important;
    color: #000 !important;
    transform: scale(1.03);
    outline: none;
}
.ebpf-favorite-button.is-loading,
.ebpf-list-heart-button.is-loading,
.ebpf-cart-button.is-loading,
.ebpf-add-all-favorites.is-loading,
.ebpf-add-routine-cart.is-loading,
.ebpf-create-routine.is-loading { opacity: .55; pointer-events: none; }

.ebpf-favorite-button .ebpf-icon { width: 46%; height: 46%; flex: 0 0 auto; }
.ebpf-favorite-button svg,
.ebpf-list-heart-button svg { width: 100%; height: 100%; display: block; }
.ebpf-favorite-button .ebpf-icon,
.ebpf-list-heart-button .ebpf-icon { display: block; }
.ebpf-favorite-button .ebpf-icon-full,
.ebpf-list-heart-button .ebpf-icon-full,
.ebpf-favorite-button.is-favorite .ebpf-icon-empty,
.ebpf-list-heart-button.is-favorite .ebpf-icon-empty { display: none !important; }
.ebpf-favorite-button.is-favorite .ebpf-icon-full,
.ebpf-list-heart-button.is-favorite .ebpf-icon-full { display: block !important; }

.ebpf-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    transform: translateY(10px);
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 42px 12px 16px;
    background: #252525;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
    transition: opacity .22s ease, transform .22s ease;
}
.ebpf-toast.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.ebpf-toast a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ebpf-toast-close {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 24px !important;
    height: 24px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: translateY(-50%);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    cursor: pointer;
    opacity: .86;
    box-shadow: none !important;
}
.ebpf-toast-close:hover,
.ebpf-toast-close:focus { opacity: 1; background: transparent !important; color: #fff !important; outline: none; }

.ebpf-account-page { width: 100%; }
.ebpf-empty-state { padding: 44px 60px; background: #f8f8f8; }
.ebpf-empty-state p { margin-top: 0; }
.ebpf-empty-state-hidden { display: none !important; }
.ebpf-duplicate-title-hidden { display: none !important; }

.ebpf-favorites-actions { margin: 0 0 22px; display: flex; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.ebpf-favorites-list { width: 100%; }
.ebpf-favorite-item {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) auto 54px;
    align-items: center;
    column-gap: 22px;
    padding: 24px 0;
    border-bottom: 1px solid #e8ded5;
}
.ebpf-favorite-item:first-child { padding-top: 0; }
.ebpf-favorite-item.is-out-of-stock { opacity: .52; background: #f7f7f7; padding-left: 12px; padding-right: 12px; }
.ebpf-favorite-item-image {
    display: block;
    width: 90px;
    height: 90px;
    border-radius: 9px;
    background: #faf3e9;
    overflow: hidden;
}
.ebpf-favorite-item-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ebpf-favorite-item-content { display: block; min-width: 0; color: inherit; text-decoration: none !important; }
.ebpf-favorite-item-title {
    display: block;
    margin: 0 0 7px;
    color: #333;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
}
.ebpf-favorite-item-title:hover,
.ebpf-favorite-item-title:focus { text-decoration: none !important; color: inherit; }
.ebpf-favorite-item-detail { display: block; color: #777; font-size: 15px; line-height: 1.25; margin: 0 0 5px; }
.ebpf-favorite-item-price { display: block; color: #777; font-size: 18px; line-height: 1.25; }
.ebpf-favorite-item-actions { justify-self: end; }
.ebpf-cart-button,
.ebpf-add-all-favorites,
.ebpf-add-routine-cart,
.ebpf-create-routine {
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 12px !important;
}
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled { cursor: not-allowed !important; opacity: .65 !important; background: #e2e2e2 !important; color: #777 !important; }
.ebpf-list-heart-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 46px !important;
    max-height: 46px !important;
    box-sizing: border-box;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #000 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    justify-self: end;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    transition: transform .18s ease, opacity .18s ease;
    line-height: 1 !important;
}
.ebpf-list-heart-button:hover,
.ebpf-list-heart-button:focus { background: transparent !important; color: #000 !important; transform: scale(1.06); outline: none; }
.ebpf-list-heart-button .ebpf-icon { width: 30px; height: 30px; }

.ebpf-routines { margin-top: 46px; padding-top: 34px; border-top: 1px solid #e8ded5; }
.ebpf-routines-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.ebpf-routines-header h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; }
.ebpf-routines-header p { margin: 0 0 9px; color: #666; max-width: 760px; }
.ebpf-routines-counter { display: inline-block; color: #8a7d70; font-size: 14px; }
.ebpf-routines-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ebpf-routine-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 420px;
    border: 1px solid #e8ded5;
    border-radius: 14px;
    background: #fffaf5;
    overflow: hidden;
}
.ebpf-routine-title {
    width: 100% !important;
    border: 0 !important;
    border-bottom: 1px solid #e8ded5 !important;
    border-radius: 0 !important;
    background: #fff !important;
    padding: 16px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #333 !important;
    box-shadow: none !important;
}
.ebpf-routine-dropzone {
    position: relative;
    flex: 1 1 auto;
    min-height: 250px;
    max-height: 440px;
    overflow-y: auto;
    padding: 12px;
}
.ebpf-routine-dropzone:empty::before {
    content: "Glissez vos produits favoris ici";
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    border: 1px dashed #d9cabd;
    border-radius: 10px;
    color: #a09184;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}
.ebpf-routine-dropzone.is-drag-over { background: #fff2e5; }
.ebpf-routine-product {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 28px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #eee2d7;
    border-radius: 10px;
    cursor: grab;
}
.ebpf-routine-product.is-out-of-stock { opacity: .52; background: #f4f4f4; }
.ebpf-routine-product-image { width: 56px; height: 56px; border-radius: 7px; overflow: hidden; background: #faf3e9; display: block; }
.ebpf-routine-product-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ebpf-routine-product-info { min-width: 0; }
.ebpf-routine-product-title { display: block; color: #333; font-weight: 700; line-height: 1.25; font-size: 14px; text-decoration: none !important; }
.ebpf-routine-product-detail,
.ebpf-routine-product-stock { display: block; color: #777; font-size: 12px; line-height: 1.25; margin-top: 3px; }
.ebpf-routine-product-stock { text-transform: uppercase; color: #777; font-weight: 700; }
.ebpf-routine-remove {
    width: 28px !important;
    height: 28px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #777 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    cursor: pointer;
}
.ebpf-routine-remove:hover,
.ebpf-routine-remove:focus { color: #000 !important; background: transparent !important; outline: none; }
.ebpf-add-routine-cart { margin: 12px !important; width: calc(100% - 24px); }

@media (max-width: 900px) {
    .ebpf-favorite-item { grid-template-columns: 74px minmax(0, 1fr) 44px; row-gap: 12px; column-gap: 16px; }
    .ebpf-favorite-item-image { width: 74px; height: 74px; }
    .ebpf-favorite-item-title { font-size: 17px; }
    .ebpf-favorite-item-detail { font-size: 13px; }
    .ebpf-favorite-item-price { font-size: 15px; }
    .ebpf-favorite-item-actions { grid-column: 2 / 4; justify-self: stretch; }
    .ebpf-cart-button { width: 100%; text-align: center; }
    .ebpf-routines-header { display: block; }
    .ebpf-create-routine { margin-top: 16px !important; }
    .ebpf-routines-grid { grid-template-columns: 1fr; }
    .ebpf-routine-dropzone { max-height: 360px; }
}

@media (max-width: 640px) {
    .ebpf-toast { right: 16px; bottom: 16px; }
    .ebpf-empty-state { padding: 30px 24px; }
    .ebpf-favorites-actions .button { width: 100%; text-align: center; }
    .ebpf-favorite-item { padding: 18px 0; }
}

/* V3.5 corrections */
body.ebpf-favorites-endpoint .woocommerce-MyAccount-content > h2#mes-produits-favoris,
body.ebpf-favorites-endpoint .woocommerce-MyAccount-content > h2#mes-produits-favoris + p,
body.ebpf-favorites-endpoint .woocommerce-MyAccount-content > h2.ebpf-duplicate-title-hidden,
body.ebpf-favorites-endpoint .woocommerce-MyAccount-content > h2.ebpf-duplicate-title-hidden + p,
.ebpf-duplicate-title-hidden {
    display: none !important;
}

.ebpf-favorites-actions {
    justify-content: flex-end !important;
    margin: 0 0 26px !important;
}

.ebpf-add-all-favorites,
.ebpf-cart-button,
.ebpf-add-routine-cart {
    background: #252525 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 56px;
    padding: 17px 34px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: .035em !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: normal !important;
}

.ebpf-add-all-favorites {
    min-width: min(520px, 100%);
}

.ebpf-cart-button {
    min-width: 300px;
}

.ebpf-add-all-favorites:hover,
.ebpf-add-all-favorites:focus,
.ebpf-cart-button:hover,
.ebpf-cart-button:focus,
.ebpf-add-routine-cart:hover,
.ebpf-add-routine-cart:focus {
    background: #111 !important;
    color: #fff !important;
    outline: none !important;
}

.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled,
.ebpf-add-routine-cart.is-disabled,
.ebpf-add-routine-cart:disabled,
.ebpf-create-routine:disabled {
    cursor: not-allowed !important;
    opacity: 1 !important;
    background: #f1f1f1 !important;
    color: #c8c8c8 !important;
}

.ebpf-favorite-item {
    grid-template-columns: 90px minmax(0, 1fr) auto 54px;
}

.ebpf-favorite-item-detail {
    color: #777;
    font-size: 18px;
    line-height: 1.3;
}

.ebpf-favorite-item-price {
    display: none !important;
}

.ebpf-routines {
    margin-top: 34px !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

.ebpf-routine-column-header {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid #e8ded5;
}

.ebpf-routine-title {
    flex: 1 1 auto;
    border-bottom: 0 !important;
    padding-right: 48px !important;
}

.ebpf-delete-routine {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #777 !important;
    font-size: 24px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.ebpf-delete-routine:hover,
.ebpf-delete-routine:focus {
    color: #000 !important;
    background: transparent !important;
    outline: none !important;
}

.ebpf-add-routine-cart {
    width: calc(100% - 24px) !important;
    min-width: 0 !important;
    margin: 12px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    font-size: 13px !important;
    overflow: visible !important;
}

.ebpf-routine-column {
    overflow: visible !important;
}

.ebpf-routine-dropzone {
    overflow-y: auto !important;
}

@media (max-width: 1100px) {
    .ebpf-add-routine-cart {
        font-size: 12px !important;
    }
}

@media (max-width: 900px) {
    .ebpf-favorite-item {
        grid-template-columns: 74px minmax(0, 1fr) 44px;
    }
    .ebpf-favorite-item-actions {
        grid-column: 1 / 4;
        justify-self: stretch;
    }
    .ebpf-cart-button {
        width: 100%;
        min-width: 0;
    }
    .ebpf-add-all-favorites {
        width: 100%;
        min-width: 0;
    }
}

/* V3.6 — harmonisation design + corrections UI */
.ebpf-account-page,
.ebpf-account-page *:not(.button):not(button),
.ebpf-favorite-item-title,
.ebpf-favorite-item-detail,
.ebpf-routines h2,
.ebpf-routines p,
.ebpf-routines-counter,
.ebpf-routine-title,
.ebpf-routine-product-title,
.ebpf-routine-product-detail,
.ebpf-routine-product-stock {
    font-family: "Anonymous Pro", monospace !important;
}

.ebpf-account-page .button,
.ebpf-account-page button,
.ebpf-toast,
.ebpf-toast * {
    font-family: "Montserrat", sans-serif !important;
}

/* Notification plus large, sur une seule ligne desktop */
.ebpf-toast {
    width: auto !important;
    max-width: min(760px, calc(100vw - 48px)) !important;
    min-width: min(520px, calc(100vw - 48px)) !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    padding: 15px 46px 15px 20px !important;
    background: #252525 !important;
    box-shadow: 0 14px 32px rgba(0,0,0,.18) !important;
}
.ebpf-toast-content { display: inline-block; white-space: nowrap !important; }

/* Forcer l'endpoint favoris propre, même si l'éditeur de page contenait un ancien titre */
body.ebpf-favorites-endpoint .woocommerce-MyAccount-content > .ebpf-account-page ~ h2,
body.ebpf-favorites-endpoint .woocommerce-MyAccount-content > .ebpf-account-page ~ p,
body.ebpf-favorites-endpoint .entry-content > h2#mes-produits-favoris,
body.ebpf-favorites-endpoint .entry-content > h2#mes-produits-favoris + p {
    display: none !important;
}

/* Liste favoris : hover subtil couleur officielle */
.ebpf-favorite-item {
    transition: background-color .2s ease, box-shadow .2s ease, transform .18s ease !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    border-radius: 10px !important;
    cursor: grab;
}
.ebpf-favorite-item:hover {
    background: rgba(193, 139, 89, .075) !important;
}
.ebpf-favorite-item.is-drag-source {
    opacity: .45;
}
.ebpf-drag-ghost {
    background: #fff !important;
    border: 1px solid rgba(193,139,89,.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 18px 45px rgba(0,0,0,.18) !important;
    opacity: .96 !important;
    pointer-events: none !important;
    z-index: 999999 !important;
}
.ebpf-routine-dropzone.is-drag-over {
    background: rgba(193, 139, 89, .12) !important;
    box-shadow: inset 0 0 0 2px rgba(193, 139, 89, .35) !important;
}
.ebpf-routine-product.is-dragging {
    opacity: .35 !important;
}

/* Bouton produit : look exact demandé */
.ebpf-cart-button {
    background: #242424 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    min-height: 66px !important;
    min-width: 390px !important;
    padding: 20px 42px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: .03em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    box-shadow: none !important;
}
.ebpf-cart-button:hover,
.ebpf-cart-button:focus {
    background: #111 !important;
    color: #fff !important;
}
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled {
    background: #efefef !important;
    color: #aaa !important;
}
.ebpf-favorite-item-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
}
.ebpf-view-cart-link,
.ebpf-favorite-item-actions .added_to_cart.wc-forward,
.ebpf-favorite-item-actions a.added_to_cart,
.ebpf-favorite-item-actions a.wc-forward {
    display: block !important;
    margin: 7px 0 0 !important;
    color: #9d9d9d !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-align: center !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Bouton global favoris : pilule comme la validation commande */
.ebpf-add-all-favorites {
    background: #242424 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 26px !important;
    min-height: 72px !important;
    min-width: min(760px, 100%) !important;
    padding: 22px 46px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
}
.ebpf-favorites-actions { justify-content: flex-end !important; }

/* Routines : coins propres + boutons en une ligne */
.ebpf-routine-column {
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #fffaf5 !important;
}
.ebpf-routine-column-header {
    border-radius: 14px 14px 0 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}
.ebpf-routine-title {
    border-radius: 14px 14px 0 0 !important;
    background: #fff !important;
}
.ebpf-add-routine-cart {
    background: #242424 !important;
    color: #fff !important;
    min-height: 54px !important;
    padding: 15px 8px !important;
    font-size: 10px !important;
    letter-spacing: .035em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    border-radius: 0 !important;
    width: calc(100% - 24px) !important;
}
.ebpf-add-routine-cart.is-disabled,
.ebpf-add-routine-cart:disabled {
    background: #efefef !important;
    color: #aaa !important;
}
.ebpf-create-routine {
    font-size: 12px !important;
    white-space: nowrap !important;
}

/* Pulse compteur panier navbar */
.ebpf-cart-count-pulse {
    animation: ebpfCartPulse .55s ease;
}
@keyframes ebpfCartPulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

@media (max-width: 1200px) {
    .ebpf-cart-button { min-width: 320px !important; font-size: 14px !important; padding-left: 28px !important; padding-right: 28px !important; }
    .ebpf-add-routine-cart { font-size: 9px !important; letter-spacing: .02em !important; }
}

@media (max-width: 900px) {
    .ebpf-toast {
        white-space: normal !important;
        min-width: 0 !important;
        max-width: calc(100vw - 32px) !important;
        width: auto !important;
    }
    .ebpf-toast-content { white-space: normal !important; }
    .ebpf-cart-button { width: 100% !important; min-width: 0 !important; }
    .ebpf-add-all-favorites { width: 100% !important; min-width: 0 !important; white-space: normal !important; }
    .ebpf-add-routine-cart { font-size: 11px !important; }
}

/* V4 — corrections finales design, panier dynamique et stock */
.ebpf-toast {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: calc(100vw - 48px) !important;
    white-space: nowrap !important;
    padding: 13px 42px 13px 18px !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 12px !important;
}
.ebpf-toast-content { white-space: nowrap !important; }

.ebpf-favorites-actions {
    justify-content: flex-end !important;
    margin: 0 0 18px !important;
}
.ebpf-add-all-favorites {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 56px !important;
    padding: 0 28px !important;
    border-radius: 16px !important;
    background: #1f1f1f !important;
    color: #fff !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .045em !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.ebpf-favorite-item {
    grid-template-columns: 90px minmax(380px, 1fr) minmax(220px, 255px) 42px !important;
    column-gap: 22px !important;
    padding: 18px 12px !important;
}
.ebpf-favorite-item-title {
    display: block !important;
    max-width: 100% !important;
    margin-bottom: 6px !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.ebpf-favorite-item-detail {
    font-size: 16px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.ebpf-cart-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 255px !important;
    min-height: 48px !important;
    padding: 0 18px !important;
    border-radius: 0 !important;
    background: #1f1f1f !important;
    color: #fff !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .025em !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: background-color .18s ease, transform .18s ease, opacity .18s ease !important;
}
.ebpf-cart-button.is-view-cart,
.ebpf-add-all-favorites.is-view-cart,
.ebpf-add-routine-cart.is-view-cart {
    cursor: pointer !important;
}
.ebpf-button-swap {
    display: inline-block;
    animation: ebpfSwapUp .22s ease both;
}
@keyframes ebpfSwapUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.ebpf-view-cart-link,
.ebpf-favorite-item-actions .added_to_cart.wc-forward,
.ebpf-favorite-item-actions a.added_to_cart,
.ebpf-favorite-item-actions a.wc-forward {
    display: none !important;
}
.ebpf-list-heart-button { width: 38px !important; height: 38px !important; max-width: 38px !important; max-height: 38px !important; }
.ebpf-list-heart-button .ebpf-icon { width: 28px !important; height: 28px !important; }

.ebpf-create-routine {
    min-height: 48px !important;
    padding: 0 26px !important;
    background: #1f1f1f !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: .035em !important;
    white-space: nowrap !important;
}
.ebpf-add-routine-cart {
    min-height: 44px !important;
    padding: 0 8px !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 9px !important;
    letter-spacing: .015em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
}
.ebpf-routine-column-header,
.ebpf-routine-title { border-radius: 13px 13px 0 0 !important; }

.ebpf-favorite-item.is-out-of-stock,
.ebpf-routine-product.is-out-of-stock {
    opacity: .55 !important;
    background: #f5f5f5 !important;
}
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled {
    background: #efefef !important;
    color: #9c9c9c !important;
    cursor: not-allowed !important;
}

@media (max-width: 1280px) {
    .ebpf-favorite-item { grid-template-columns: 82px minmax(260px, 1fr) minmax(205px, 235px) 38px !important; column-gap: 16px !important; }
    .ebpf-favorite-item-title { font-size: 18px !important; }
    .ebpf-cart-button { max-width: 235px !important; font-size: 12px !important; padding: 0 14px !important; }
}
@media (max-width: 900px) {
    .ebpf-toast { white-space: normal !important; max-width: calc(100vw - 32px) !important; }
    .ebpf-toast-content { white-space: normal !important; }
    .ebpf-favorite-item { grid-template-columns: 74px minmax(0, 1fr) 42px !important; }
    .ebpf-favorite-item-title { white-space: normal !important; overflow: visible !important; text-overflow: initial !important; }
    .ebpf-favorite-item-actions { grid-column: 1 / 4 !important; }
    .ebpf-cart-button { width: 100% !important; max-width: none !important; }
    .ebpf-add-all-favorites { width: 100% !important; white-space: normal !important; }
}

/* V4.1 — debug UI, stock panier, routines et harmonisation boutons */
body.ebpf-favorites-endpoint .ebpf-account-notice {
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 0 22px 0 !important;
    padding: 12px 16px !important;
    border: 1px solid #e6ded6 !important;
    background: #f9f3ea !important;
    color: #333 !important;
    font-family: "Anonymous Pro", monospace !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
body.ebpf-favorites-endpoint .woocommerce-error,
body.ebpf-favorites-endpoint .woocommerce-message,
body.ebpf-favorites-endpoint .woocommerce-info {
    margin-bottom: 18px !important;
}

.ebpf-toast {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: calc(100vw - 48px) !important;
    padding: 11px 34px 11px 14px !important;
    background: #2f2f2f !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.14) !important;
}
.ebpf-toast-content { white-space: nowrap !important; }
.ebpf-toast-close { right: 6px !important; }

.ebpf-favorites-actions {
    justify-content: flex-end !important;
    margin: 0 0 16px !important;
}

.ebpf-add-all-favorites,
.ebpf-cart-button,
.ebpf-add-routine-cart,
.ebpf-create-routine {
    background: #2b2b2b !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
    font-family: "Montserrat", sans-serif !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: .025em !important;
}
.ebpf-add-all-favorites:hover,
.ebpf-add-all-favorites:focus,
.ebpf-cart-button:hover,
.ebpf-cart-button:focus,
.ebpf-add-routine-cart:hover,
.ebpf-add-routine-cart:focus,
.ebpf-create-routine:hover,
.ebpf-create-routine:focus {
    background: #3a3a3a !important;
    color: #fff !important;
}

.ebpf-add-all-favorites {
    width: auto !important;
    min-width: 0 !important;
    min-height: 46px !important;
    padding: 0 22px !important;
    border-radius: 13px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.ebpf-favorite-item {
    grid-template-columns: 82px minmax(0, 1fr) minmax(170px, 205px) 58px !important;
    column-gap: 18px !important;
    padding: 16px 0 !important;
    border-bottom: 1px solid #eeeeee !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: grab;
}
.ebpf-favorite-item:first-child { padding-top: 0 !important; }
.ebpf-favorite-item:hover {
    background: rgba(193,139,89,.06) !important;
    border-radius: 0 !important;
}
.ebpf-favorite-item.is-out-of-stock {
    opacity: .58 !important;
    background: #f6f6f6 !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.ebpf-favorite-item-image {
    width: 82px !important;
    height: 82px !important;
    border-radius: 6px !important;
}
.ebpf-favorite-item-title {
    max-width: 100% !important;
    margin: 0 0 5px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.ebpf-favorite-item-detail {
    font-size: 14px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.ebpf-favorite-item-actions {
    justify-self: stretch !important;
    align-items: stretch !important;
}
.ebpf-cart-button {
    width: 100% !important;
    max-width: 205px !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    border-radius: 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled,
.ebpf-add-routine-cart.is-disabled,
.ebpf-add-routine-cart:disabled,
.ebpf-create-routine:disabled {
    background: #eeeeee !important;
    color: #a5a5a5 !important;
    cursor: not-allowed !important;
}
.ebpf-list-heart-button {
    justify-self: center !important;
    margin-right: 15px !important;
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
}
.ebpf-list-heart-button .ebpf-icon {
    width: 26px !important;
    height: 26px !important;
}

.ebpf-routines {
    margin-top: 30px !important;
}
.ebpf-routines-header {
    align-items: center !important;
}
.ebpf-routines-counter {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #777 !important;
    font-family: "Anonymous Pro", monospace !important;
    font-size: 14px !important;
    letter-spacing: .06em !important;
}
.ebpf-create-routine {
    min-height: 50px !important;
    padding: 0 28px !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
.ebpf-routine-column {
    min-height: 610px !important;
    border-radius: 13px !important;
    overflow: hidden !important;
}
.ebpf-routine-column-header {
    border-radius: 13px 13px 0 0 !important;
    overflow: hidden !important;
}
.ebpf-routine-title {
    padding-right: 82px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}
.ebpf-edit-routine,
.ebpf-delete-routine {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px !important;
    height: 28px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #777 !important;
    font-family: "Anonymous Pro", monospace !important;
    font-size: 18px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    cursor: pointer;
}
.ebpf-edit-routine { right: 42px !important; }
.ebpf-delete-routine { right: 10px !important; }
.ebpf-edit-routine:hover,
.ebpf-edit-routine:focus,
.ebpf-delete-routine:hover,
.ebpf-delete-routine:focus {
    color: #000 !important;
    background: transparent !important;
    outline: none !important;
}
.ebpf-routine-dropzone {
    min-height: 430px !important;
    max-height: 520px !important;
    overflow-y: auto !important;
}
.ebpf-add-routine-cart {
    width: calc(100% - 24px) !important;
    min-height: 42px !important;
    margin: 12px !important;
    padding: 0 8px !important;
    border-radius: 0 !important;
    font-size: 8.8px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
.ebpf-routine-product {
    border-radius: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #eeeeee !important;
    box-shadow: none !important;
}

@media (max-width: 1280px) {
    .ebpf-favorite-item {
        grid-template-columns: 74px minmax(0, 1fr) minmax(155px, 190px) 52px !important;
        column-gap: 14px !important;
    }
    .ebpf-favorite-item-title { font-size: 16px !important; }
    .ebpf-cart-button { max-width: 190px !important; font-size: 10px !important; padding: 0 8px !important; }
    .ebpf-add-routine-cart { font-size: 8px !important; }
}
@media (max-width: 900px) {
    body.ebpf-favorites-endpoint .ebpf-account-notice,
    .ebpf-toast,
    .ebpf-toast-content { white-space: normal !important; }
    .ebpf-favorite-item {
        grid-template-columns: 74px minmax(0, 1fr) 42px !important;
        padding: 16px 0 !important;
    }
    .ebpf-favorite-item-actions { grid-column: 1 / 4 !important; }
    .ebpf-cart-button { max-width: none !important; font-size: 12px !important; }
    .ebpf-add-all-favorites { width: 100% !important; white-space: normal !important; }
    .ebpf-routine-column { min-height: 520px !important; }
    .ebpf-routine-dropzone { min-height: 330px !important; max-height: 430px !important; }
    .ebpf-add-routine-cart { font-size: 11px !important; }
}

/* V4.2 — corrections routines et ruptures */
body.ebpf-favorites-endpoint .ebpf-account-notice {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 0 0 24px !important;
    padding: 12px 18px !important;
    display: block !important;
    font-family: "Anonymous Pro", monospace !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    letter-spacing: .02em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    background: #f7f7f7 !important;
    color: #666 !important;
    border: 0 !important;
    border-radius: 0 !important;
}
body.ebpf-favorites-endpoint .woocommerce > .woocommerce-error,
body.ebpf-favorites-endpoint .woocommerce > .woocommerce-message,
body.ebpf-favorites-endpoint .woocommerce > .woocommerce-info {
    display: none !important;
}

/* Colonne routine : hauteur automatique, pas de scroll interne, pas de limite de produits */
.ebpf-routines-grid {
    align-items: start !important;
}
.ebpf-routine-column {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
}
.ebpf-routine-dropzone {
    min-height: 74px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
.ebpf-add-routine-cart {
    margin-top: 14px !important;
}

/* Titre routine + crayon collé au nom */
.ebpf-routine-column-header {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    position: relative !important;
    padding-right: 44px !important;
}
.ebpf-routine-title {
    flex: 0 0 auto !important;
    min-width: 70px !important;
    max-width: 230px !important;
    padding-right: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.ebpf-edit-routine {
    position: static !important;
    transform: none !important;
    margin-left: 10px !important;
    width: 22px !important;
    height: 22px !important;
    font-size: 17px !important;
    flex: 0 0 auto !important;
}
.ebpf-routine-column-header.has-custom-name .ebpf-edit-routine,
.ebpf-routine-column-header.is-editing .ebpf-edit-routine {
    display: none !important;
}
.ebpf-delete-routine {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}
.ebpf-title-measure {
    position: fixed !important;
    left: -9999px !important;
    top: -9999px !important;
    visibility: hidden !important;
    white-space: nowrap !important;
    font-family: "Anonymous Pro", monospace !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

/* Ruptures : toujours sur une seule ligne */
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled,
.ebpf-routine-product-stock {
    white-space: nowrap !important;
}
.ebpf-routine-product-stock {
    display: block !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    letter-spacing: .02em !important;
}

/* Si une routine ne contient que des produits non ajoutables, le bouton reste bien désactivé */
.ebpf-add-routine-cart.is-disabled,
.ebpf-add-routine-cart:disabled {
    pointer-events: none !important;
}

@media (max-width: 900px) {
    body.ebpf-favorites-endpoint .ebpf-account-notice { white-space: normal !important; }
}

/* V4.2 — routines auto-hauteur + derniers correctifs UI */
.ebpf-routine-column {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    align-self: start !important;
}
.ebpf-routine-dropzone {
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
    padding: 12px !important;
}
.ebpf-routine-dropzone:empty::before {
    min-height: 120px !important;
}
.ebpf-add-routine-cart {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
}
.ebpf-routine-column-header {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 0 10px 0 16px !important;
    min-height: 58px !important;
    overflow: visible !important;
}
.ebpf-routine-title {
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: calc(100% - 80px) !important;
    min-width: 78px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
}
.ebpf-edit-routine {
    position: static !important;
    transform: none !important;
    flex: 0 0 auto !important;
    margin-left: 10px !important;
    right: auto !important;
    top: auto !important;
}
.ebpf-routine-column-header.has-hidden-edit .ebpf-edit-routine,
.ebpf-routine-column.has-custom-name .ebpf-edit-routine,
.ebpf-routine-column-header.has-custom-name .ebpf-edit-routine,
.ebpf-routine-column-header.is-editing .ebpf-edit-routine {
    display: none !important;
}
.ebpf-delete-routine {
    position: static !important;
    transform: none !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    right: auto !important;
    top: auto !important;
}
.ebpf-routine-product-stock,
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled {
    white-space: nowrap !important;
}
.ebpf-routine-product-stock {
    font-size: 11px !important;
    letter-spacing: .02em !important;
}
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled {
    font-size: 10px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}
.ebpf-routine-product {
    grid-template-columns: 56px minmax(0, 1fr) 24px !important;
}
.ebpf-routine-product-title {
    font-size: 13px !important;
    line-height: 1.22 !important;
}
.ebpf-routine-product-detail {
    font-size: 12px !important;
}
.ebpf-add-routine-cart.is-disabled,
.ebpf-add-routine-cart:disabled {
    background: #eeeeee !important;
    color: #a5a5a5 !important;
    cursor: not-allowed !important;
}
@media (max-width: 900px) {
    .ebpf-routine-column { min-height: 0 !important; }
    .ebpf-routine-dropzone { min-height: 0 !important; max-height: none !important; overflow: visible !important; }
}

/* V4.5 — sécurité favoris, navbar, routines et derniers ajustements */
.ebpf-variable-only-button.is-waiting-variation {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.ebpf-navbar-favorites {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    color: #000 !important;
    text-decoration: none !important;
    vertical-align: middle;
}
.ebpf-navbar-favorites .ebpf-icon {
    width: 24px;
    height: 24px;
    display: block;
}
.ebpf-navbar-favorites .ebpf-icon-full { display: none !important; }
.ebpf-navbar-favorites svg { width: 100%; height: 100%; display: block; }.ebpf-add-all-favorites {
    background: #1f1f1f !important;
    color: #fff !important;
    margin-bottom: 20px !important;
}

.ebpf-favorite-item {
    border-bottom: 1px solid #eeeeee !important;
    border-radius: 0 !important;
    background: transparent !important;
}
.ebpf-favorite-item.is-out-of-stock {
    background: #f7f7f7 !important;
    border-radius: 0 !important;
}
.ebpf-list-heart-button { margin-right: 24px !important; }

.ebpf-cart-button,
.ebpf-add-routine-cart,
.ebpf-create-routine,
.ebpf-add-all-favorites,
.ebpf-export-routine {
    font-weight: 500 !important;
}
.ebpf-cart-button::after,
.ebpf-add-routine-cart::after,
.ebpf-add-all-favorites::after { content: none !important; display: none !important; }
.ebpf-button-swap { white-space: nowrap !important; }

.ebpf-routine-column-header {
    overflow: visible !important;
    padding-left: 18px !important;
}
.ebpf-routine-title {
    border-radius: 0 !important;
    outline: none !important;
    padding: 6px 4px !important;
    border: 1px solid transparent !important;
}
.ebpf-routine-column-header.is-editing .ebpf-routine-title {
    border: 1px solid #d6d6d6 !important;
    background: #fff !important;
    border-radius: 0 !important;
}
.ebpf-edit-routine {
    margin-left: 10px !important;
}
.ebpf-routine-column-header.is-editing .ebpf-edit-routine,
.ebpf-routine-column.has-custom-name .ebpf-edit-routine,
.ebpf-routine-column-header.has-custom-name .ebpf-edit-routine {
    display: none !important;
}

.ebpf-routine-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 12px;
}
.ebpf-routine-actions .ebpf-add-routine-cart {
    width: 100% !important;
    margin: 0 !important;
}
.ebpf-export-routine {
    width: 100% !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    border: 1px solid #d6d6d6 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #333 !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 10px !important;
    letter-spacing: .02em !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
}
.ebpf-export-routine:hover,
.ebpf-export-routine:focus {
    background: #f9f3ea !important;
    color: #333 !important;
    outline: none !important;
}

.ebpf-routine-product-stock,
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled {
    white-space: nowrap !important;
}

.ebpf-routine-dropzone {
    overflow: visible !important;
    max-height: none !important;
}
.ebpf-routine-column {
    height: auto !important;
    min-height: 0 !important;
    align-self: start !important;
}

@media (max-width: 900px) {
    .ebpf-navbar-favorites { width: 32px; height: 32px; }
    .ebpf-navbar-favorites .ebpf-icon { width: 22px; height: 22px; }
}

/* V4.7 — derniers correctifs UI/UX */

/* 1) Boutons panier : prix plus visible, texte medium, restauration parfaite après "Voir le panier" */
.ebpf-cart-button,
.ebpf-add-all-favorites,
.ebpf-add-routine-cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    text-align: center !important;
}

.ebpf-cart-button .ebpf-cart-button-price {
    font-weight: 700 !important;
    font-size: 1.26em !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
}

.ebpf-cart-button .ebpf-cart-button-sep {
    font-weight: 400 !important;
    opacity: .9 !important;
}

.ebpf-cart-button .ebpf-cart-button-label,
.ebpf-add-all-favorites,
.ebpf-add-routine-cart,
.ebpf-create-routine,
.ebpf-export-routine {
    font-weight: 500 !important;
}

.ebpf-cart-button.is-view-cart,
.ebpf-add-all-favorites.is-view-cart,
.ebpf-add-routine-cart.is-view-cart {
    justify-content: center !important;
}

/* 2) Suppression visuelle des doublons WooCommerce "Voir le panier" */
.ebpf-account-page .added_to_cart.wc-forward,
.ebpf-favorite-item-actions .added_to_cart,
.ebpf-favorites-actions .added_to_cart,
.ebpf-routine-actions .added_to_cart {
    display: none !important;
}

/* 3) Navbar favoris : même logique visuelle que le panier */
a.header-cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.ebpf-navbar-favorites {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin-right: 14px !important;
    position: relative !important;
    top: 0 !important;
}

.ebpf-navbar-favorites .ebpf-icon {
    width: 24px !important;
    height: 24px !important;
}/* 4) Titres trop longs : une seule ligne, taille adaptative */
.ebpf-favorite-item-title,
.ebpf-routine-product-title {
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
}

.ebpf-favorite-item-title.ebpf-title-long,
.ebpf-routine-product-title.ebpf-title-long { font-size: 18px !important; }
.ebpf-favorite-item-title.ebpf-title-xlong,
.ebpf-routine-product-title.ebpf-title-xlong { font-size: 16px !important; }
.ebpf-favorite-item-title.ebpf-title-xxlong,
.ebpf-routine-product-title.ebpf-title-xxlong { font-size: 14px !important; }

/* 5) Header routines : input large en édition, crayon vraiment collé au titre générique */
.ebpf-routine-column-header {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 18px 22px !important;
}

.ebpf-routine-title {
    flex: 0 0 auto !important;
    max-width: none !important;
    min-width: 70px !important;
    margin: 0 !important;
    padding: 6px 2px !important;
    line-height: 1.2 !important;
}

.ebpf-routine-column-header.is-editing .ebpf-routine-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    margin-right: 10px !important;
    padding: 12px 14px !important;
    border: 1px solid #d6d6d6 !important;
    background: #fff !important;
}

.ebpf-edit-routine {
    position: static !important;
    margin-left: 10px !important;
    margin-right: 14px !important;
    flex: 0 0 auto !important;
}

.ebpf-delete-routine {
    margin-left: auto !important;
    flex: 0 0 auto !important;
}

/* 6) Routines : pas de PDF si vide, colonnes auto, pas de scroll interne forcé */
.ebpf-routine-dropzone {
    overflow: visible !important;
    max-height: none !important;
}

.ebpf-routine-column {
    height: auto !important;
    min-height: 0 !important;
    align-self: start !important;
}

.ebpf-export-routine.is-disabled,
.ebpf-export-routine:disabled,
.ebpf-add-routine-cart.is-disabled,
.ebpf-add-routine-cart:disabled {
    cursor: not-allowed !important;
    opacity: .5 !important;
}

/* 7) Cartes produits / PDF look */
.ebpf-routine-product-image,
.ebpf-routine-product-image img,
.ebpf-favorite-item-image,
.ebpf-favorite-item-image img {
    border-radius: 5px !important;
}

/* 8) Responsive cohérent */
@media (max-width: 900px) {
    .ebpf-navbar-favorites {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        margin-right: 12px !important;
    }
    .ebpf-navbar-favorites .ebpf-icon {
        width: 22px !important;
        height: 22px !important;
    }}@media (max-width: 900px) {}

/* Boutons panier : retour à un rendu stable, sans débordement */
.ebpf-cart-button,
.ebpf-add-all-favorites,
.ebpf-add-routine-cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    box-sizing: border-box !important;
}
.ebpf-cart-button {
    font-size: 13px !important;
    line-height: 1 !important;
    letter-spacing: .025em !important;
}
.ebpf-cart-button .ebpf-cart-button-price {
    font-size: 1.24em !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
}
.ebpf-cart-button .ebpf-cart-button-sep {
    flex: 0 0 auto !important;
    font-weight: 400 !important;
}
.ebpf-cart-button .ebpf-cart-button-label {
    font-size: 1em !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
}
@media (max-width: 1280px) {
    .ebpf-cart-button {
        font-size: 12px !important;
        gap: 7px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}
@media (max-width: 900px) {
    .ebpf-cart-button {
        font-size: 12px !important;
        gap: 8px !important;
    }
}

/* Titres de routine : crayon collé au titre */
.ebpf-routine-column-header {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
}
.ebpf-routine-title {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 58px) !important;
    margin: 0 !important;
}
.ebpf-edit-routine {
    position: static !important;
    transform: none !important;
    margin-left: 3px !important;
    margin-right: 8px !important;
    flex: 0 0 auto !important;
}
.ebpf-delete-routine {
    margin-left: auto !important;
    flex: 0 0 auto !important;
}

/* Input de modification : écrire directement sur l’écran, sans case ni hauteur ajoutée */
.ebpf-routine-title,
.ebpf-routine-column-header.is-editing .ebpf-routine-title {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
}
.ebpf-routine-column-header.is-editing .ebpf-routine-title {
    flex: 1 1 auto !important;
    width: auto !important;
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* Titres produits dans les routines : affichage complet sur deux lignes maximum */
.ebpf-routine-product-info {
    min-width: 0 !important;
}
.ebpf-routine-product-title,
.ebpf-routine-product-title.ebpf-title-long,
.ebpf-routine-product-title.ebpf-title-xlong,
.ebpf-routine-product-title.ebpf-title-xxlong {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: initial !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    font-size: 13px !important;
    line-height: 1.22 !important;
    max-height: calc(1.22em * 2) !important;
}


/* V8.5 — correctifs définitifs interface */

/* 1) Pastille favoris : même logique que le panier, sans chevauchement */
.ebpf-navbar-favorites {
    position: relative !important;
    margin-right: 34px !important;
}@media (max-width: 900px) {
    .ebpf-navbar-favorites {
        margin-right: 30px !important;
    }}

/* 2) Espace entre la liste de produits et le bloc Mes routines */
.ebpf-routines {
    margin-top: 64px !important;
}

/* 3) Boutons panier : texte complet, prix visible, aucun débordement coupé */
.ebpf-favorite-item {
    grid-template-columns: 82px minmax(0, 1fr) minmax(260px, 280px) 44px !important;
    column-gap: 18px !important;
}
.ebpf-cart-button {
    width: 100% !important;
    max-width: 280px !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    gap: 8px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    letter-spacing: .018em !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: initial !important;
}
.ebpf-cart-button .ebpf-cart-button-price {
    font-size: 1.18em !important;
    font-weight: 700 !important;
    flex: 0 0 auto !important;
}
.ebpf-cart-button .ebpf-cart-button-sep {
    flex: 0 0 auto !important;
}
.ebpf-cart-button .ebpf-cart-button-label {
    display: inline-block !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    overflow: visible !important;
    text-overflow: initial !important;
    white-space: nowrap !important;
    font-size: 1em !important;
    font-weight: 700 !important;
}
@media (max-width: 1280px) {
    .ebpf-favorite-item {
        grid-template-columns: 74px minmax(0, 1fr) minmax(250px, 265px) 42px !important;
        column-gap: 14px !important;
    }
    .ebpf-cart-button {
        max-width: 265px !important;
        font-size: 12.5px !important;
        padding: 0 12px !important;
        gap: 7px !important;
    }
    .ebpf-cart-button .ebpf-cart-button-price {
        font-size: 1.16em !important;
    }
}
@media (max-width: 900px) {
    .ebpf-favorite-item {
        grid-template-columns: 74px minmax(0, 1fr) 42px !important;
    }
    .ebpf-favorite-item-actions {
        grid-column: 1 / 4 !important;
    }
    .ebpf-cart-button {
        max-width: none !important;
        width: 100% !important;
        font-size: 12.5px !important;
    }
}

/* 4) Bouton Ajouter tous mes produits : largeur stable pendant Voir le panier */
.ebpf-add-all-favorites {
    box-sizing: border-box !important;
}
.ebpf-add-all-favorites.is-view-cart {
    white-space: nowrap !important;
}

/* 5) Titre routine + crayon : crayon vraiment collé au titre */
.ebpf-routine-column-header {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 18px 22px !important;
}
.ebpf-routine-title {
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: calc(100% - 58px) !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
}
.ebpf-edit-routine {
    position: static !important;
    transform: none !important;
    margin-left: 3px !important;
    margin-right: 8px !important;
    flex: 0 0 auto !important;
}
.ebpf-delete-routine {
    margin-left: auto !important;
    flex: 0 0 auto !important;
}
.ebpf-routine-column-header.is-editing .ebpf-routine-title {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    margin-right: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    min-height: 0 !important;
    height: auto !important;
}

/* 6) Produits dans les routines : deux lignes max, zone de texte élargie */
.ebpf-routine-product {
    grid-template-columns: 56px minmax(0, 1fr) 22px !important;
    gap: 10px !important;
    align-items: center !important;
}
.ebpf-routine-product-info {
    min-width: 0 !important;
    width: 100% !important;
}
.ebpf-routine-product-title,
.ebpf-routine-product-title.ebpf-title-long,
.ebpf-routine-product-title.ebpf-title-xlong,
.ebpf-routine-product-title.ebpf-title-xxlong {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: initial !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.18 !important;
    max-height: calc(1.18em * 2) !important;
}
.ebpf-routine-product-title { font-size: 14px !important; }
.ebpf-routine-product-title.ebpf-title-long { font-size: 13px !important; }
.ebpf-routine-product-title.ebpf-title-xlong { font-size: 12px !important; }
.ebpf-routine-product-title.ebpf-title-xxlong { font-size: 11px !important; }
.ebpf-routine-remove {
    width: 22px !important;
    height: 22px !important;
    font-size: 22px !important;
}


/* V8.5.2 — verrouillage strict du bouton global pendant le passage à "VOIR LE PANIER".
   Les règles précédentes en !important pouvaient écraser la largeur inline : on force ici
   le gabarit capturé en JS pour empêcher tout rétrécissement. */
.ebpf-add-all-favorites.is-view-cart,
.ebpf-add-all-favorites[data-ebpf-view-cart="1"] {
    width: var(--ebpf-fixed-button-width) !important;
    min-width: var(--ebpf-fixed-button-width) !important;
    max-width: var(--ebpf-fixed-button-width) !important;
    height: var(--ebpf-fixed-button-height) !important;
    min-height: var(--ebpf-fixed-button-height) !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    flex: 0 0 var(--ebpf-fixed-button-width) !important;
}@media (max-width: 900px) {}

/* Boutons principaux : texte en gras et gabarit stable. */
.ebpf-add-all-favorites,
.ebpf-add-routine-cart,
.ebpf-export-routine,
.ebpf-create-routine,
.ebpf-cart-button,
.ebpf-cart-button .ebpf-cart-button-label,
.ebpf-button-swap {
    font-weight: 700 !important;
}
.ebpf-add-all-favorites {
    min-width: var(--ebpf-fixed-button-width, 390px) !important;
    width: var(--ebpf-fixed-button-width, auto) !important;
    max-width: none !important;
    min-height: var(--ebpf-fixed-button-height, 44px) !important;
    box-sizing: border-box !important;
}
.ebpf-add-all-favorites.is-view-cart,
.ebpf-add-all-favorites[data-ebpf-view-cart="1"] {
    width: var(--ebpf-fixed-button-width, 390px) !important;
    min-width: var(--ebpf-fixed-button-width, 390px) !important;
    max-width: var(--ebpf-fixed-button-width, 390px) !important;
    height: var(--ebpf-fixed-button-height, 44px) !important;
    min-height: var(--ebpf-fixed-button-height, 44px) !important;
    flex: 0 0 var(--ebpf-fixed-button-width, 390px) !important;
}
@media (max-width: 900px) {
    .ebpf-add-all-favorites,
    .ebpf-add-all-favorites.is-view-cart,
    .ebpf-add-all-favorites[data-ebpf-view-cart="1"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex-basis: auto !important;
        white-space: normal !important;
    }
}

/* Bouton rupture : remplace prix + ajout panier par un libellé unique lisible. */
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: .025em !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
}

/* Titres produits : ne plus couper, ne plus réduire, laisser lire le titre complet. */
.ebpf-favorite-item {
    align-items: start !important;
}
.ebpf-favorite-item-content,
.ebpf-routine-product-info {
    min-width: 0 !important;
    overflow: visible !important;
}
.ebpf-favorite-item-title,
.ebpf-favorite-item-title.ebpf-title-long,
.ebpf-favorite-item-title.ebpf-title-xlong,
.ebpf-favorite-item-title.ebpf-title-xxlong {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    max-height: none !important;
    font-size: 21px !important;
    line-height: 1.25 !important;
}
.ebpf-routine-product {
    align-items: start !important;
    grid-template-columns: 56px minmax(0, 1fr) 22px !important;
}
.ebpf-routine-product-title,
.ebpf-routine-product-title.ebpf-title-long,
.ebpf-routine-product-title.ebpf-title-xlong,
.ebpf-routine-product-title.ebpf-title-xxlong {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    max-height: none !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
}
@media (max-width: 900px) {
    .ebpf-favorite-item-title,
    .ebpf-favorite-item-title.ebpf-title-long,
    .ebpf-favorite-item-title.ebpf-title-xlong,
    .ebpf-favorite-item-title.ebpf-title-xxlong {
        font-size: 17px !important;
    }
}

/* Titre générique de routine : écriture directe sur l'écran, sans bordure ni hauteur ajoutée. */
.ebpf-routine-title,
.ebpf-routine-column-header.is-editing .ebpf-routine-title {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
}
.ebpf-routine-title::placeholder {
    color: #a09184 !important;
    opacity: 1 !important;
}
.ebpf-edit-routine {
    margin-left: 3px !important;
}


/* V9 — correctifs finaux validés après retours client */

/* Navbar : retour à une pastille propre, sans chevauchement du cœur. */
.ebpf-navbar-favorites {
    position: relative !important;
    margin-right: 36px !important;
}@media (max-width: 900px) {
    .ebpf-navbar-favorites { margin-right: 32px !important; }}

/* Gros bouton : plus de gras trop marqué, mais gabarit verrouillé au passage Voir le panier. */
.ebpf-add-all-favorites,
.ebpf-add-all-favorites .ebpf-button-swap {
    font-weight: 500 !important;
    font-size: 15px !important;
    line-height: 1.15 !important;
}
.ebpf-add-all-favorites.is-view-cart,
.ebpf-add-all-favorites[data-ebpf-view-cart="1"] {
    width: var(--ebpf-fixed-button-width) !important;
    min-width: var(--ebpf-fixed-button-width) !important;
    max-width: var(--ebpf-fixed-button-width) !important;
    height: var(--ebpf-fixed-button-height) !important;
    min-height: var(--ebpf-fixed-button-height) !important;
    flex: 0 0 var(--ebpf-fixed-button-width) !important;
}
.ebpf-button-swap {
    font-weight: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Titres produits liste du haut : lisibles en entier, mais moins gros. */
.ebpf-favorite-item {
    align-items: center !important;
}
.ebpf-favorite-item-image,
.ebpf-favorite-item-content,
.ebpf-favorite-item-actions,
.ebpf-list-heart-button {
    align-self: center !important;
}
.ebpf-favorite-item-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    overflow: visible !important;
}
.ebpf-favorite-item-title,
.ebpf-favorite-item-title.ebpf-title-long,
.ebpf-favorite-item-title.ebpf-title-xlong,
.ebpf-favorite-item-title.ebpf-title-xxlong {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    -webkit-line-clamp: unset !important;
    max-height: none !important;
    font-size: 18px !important;
    line-height: 1.26 !important;
}
@media (max-width: 900px) {
    .ebpf-favorite-item-title,
    .ebpf-favorite-item-title.ebpf-title-long,
    .ebpf-favorite-item-title.ebpf-title-xlong,
    .ebpf-favorite-item-title.ebpf-title-xxlong {
        font-size: 16px !important;
    }
}

/* Produits dans les routines : ne plus couper les titres. */
.ebpf-routine-product {
    align-items: center !important;
    grid-template-columns: 56px minmax(0, 1fr) 22px !important;
}
.ebpf-routine-product-info {
    min-width: 0 !important;
    overflow: visible !important;
}
.ebpf-routine-product-title,
.ebpf-routine-product-title.ebpf-title-long,
.ebpf-routine-product-title.ebpf-title-xlong,
.ebpf-routine-product-title.ebpf-title-xxlong {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    -webkit-line-clamp: unset !important;
    max-height: none !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
}

/* Rupture de stock : libellé unique à la place du prix + ajout panier. */
.ebpf-cart-button.is-disabled,
.ebpf-cart-button:disabled {
    font-weight: 500 !important;
    font-size: 13px !important;
    justify-content: center !important;
    text-align: center !important;
}


/* V9.1 — micro-corrections finales */

/* 1) Bouton global : le texte initial et "VOIR LE PANIER" ont exactement le même style. */
.ebpf-add-all-favorites,
.ebpf-add-all-favorites .ebpf-button-swap,
.ebpf-add-all-favorites.is-view-cart,
.ebpf-add-all-favorites.is-view-cart .ebpf-button-swap,
.ebpf-add-all-favorites[data-ebpf-view-cart="1"],
.ebpf-add-all-favorites[data-ebpf-view-cart="1"] .ebpf-button-swap {
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    letter-spacing: .02em !important;
    text-transform: uppercase !important;
    text-align: center !important;
}
.ebpf-add-all-favorites .ebpf-button-swap {
    display: inline-block !important;
    font: inherit !important;
    letter-spacing: inherit !important;
    line-height: inherit !important;
    text-transform: inherit !important;
}

/* 2) Boutons routines : "VOIR LE PANIER" reprend exactement le style de "AJOUTER MA ROUTINE AU PANIER". */
.ebpf-add-routine-cart,
.ebpf-add-routine-cart .ebpf-button-swap,
.ebpf-add-routine-cart.is-view-cart,
.ebpf-add-routine-cart.is-view-cart .ebpf-button-swap,
.ebpf-add-routine-cart[data-ebpf-view-cart="1"],
.ebpf-add-routine-cart[data-ebpf-view-cart="1"] .ebpf-button-swap {
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;
    text-align: center !important;
}
.ebpf-add-routine-cart .ebpf-button-swap {
    display: inline-block !important;
}


/* V9.2 — derniers micro-correctifs */

/* Gros bouton global : un poil plus grand, identique avant/après clic. */
.ebpf-add-all-favorites,
.ebpf-add-all-favorites .ebpf-button-swap,
.ebpf-add-all-favorites.is-view-cart,
.ebpf-add-all-favorites.is-view-cart .ebpf-button-swap,
.ebpf-add-all-favorites[data-ebpf-view-cart="1"],
.ebpf-add-all-favorites[data-ebpf-view-cart="1"] .ebpf-button-swap {
    font-size: 13.6px !important;
}

/* Bouton routine : très légèrement agrandi pour rester net sans être tronqué. */
.ebpf-add-routine-cart,
.ebpf-add-routine-cart .ebpf-button-swap,
.ebpf-add-routine-cart.is-view-cart,
.ebpf-add-routine-cart.is-view-cart .ebpf-button-swap,
.ebpf-add-routine-cart[data-ebpf-view-cart="1"],
.ebpf-add-routine-cart[data-ebpf-view-cart="1"] .ebpf-button-swap {
    font-size: 10.8px !important;
    letter-spacing: .015em !important;
    line-height: 1.15 !important;
    font-weight: 500 !important;
}

/* Première ligne favoris : même hauteur et même centrage que les autres. */
.ebpf-favorite-item:first-child {
    padding-top: 24px !important;
}

/* Carte produit favoris : centrage vertical homogène. */
.ebpf-favorite-item {
    align-items: center !important;
    min-height: 138px;
}
.ebpf-favorite-item-content,
.ebpf-favorite-item-actions,
.ebpf-list-heart-button {
    align-self: center !important;
}

/* Nom de routine : ne plus le tronquer trop tôt. */
.ebpf-routine-title {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 62px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
}

/* V9.2.3 — cœur navbar : simple hover gris, sans infobulle */
.ebpf-navbar-favorites {
    border-radius: 0 !important;
    transition: color .18s ease !important;
}
.ebpf-navbar-favorites:hover,
.ebpf-navbar-favorites:focus-visible {
    color: #9a9a9a !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
}

/* V9.2.4 — titre routine personnalisé jamais resserré après édition */
.ebpf-routine-column-header .ebpf-routine-title {
    width: 100% !important;
    max-width: none !important;
}

/* V9.3.1 — miniatures plus aérées, hover gris */
.ebpf-favorite-item {
    padding-left: 18px !important;
    padding-right: 18px !important;
    align-items: center !important;
    background: transparent !important;
    transition: background-color .18s ease !important;
}
.ebpf-favorite-item:first-child {
    padding-top: 24px !important;
}
.ebpf-favorite-item:hover {
    background: #f6f6f6 !important;
}
.ebpf-favorite-item-image {
    align-self: center !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
}
.ebpf-favorite-item-image img {
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
}

/* V9.3.2 — hover plus discret + miniatures totalement stables */
.ebpf-favorite-item,
.ebpf-favorite-item:hover,
.ebpf-favorite-item:focus-within {
    transition: background-color .12s ease !important;
}
.ebpf-favorite-item:hover,
.ebpf-favorite-item:focus-within {
    background: #fbfbfb !important;
}

.ebpf-favorite-item-image,
.ebpf-favorite-item-image:hover,
.ebpf-favorite-item-image:focus,
.ebpf-favorite-item-image img,
.ebpf-favorite-item-image img:hover,
.ebpf-favorite-item-image img:focus {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    translate: none !important;
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
}

.ebpf-favorite-item-image {
    display: block !important;
    align-self: center !important;
    flex: 0 0 90px !important;
    width: 90px !important;
    height: 90px !important;
    min-width: 90px !important;
    min-height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
    margin: 0 !important;
    overflow: hidden !important;
}
.ebpf-favorite-item-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    vertical-align: top !important;
}

@media (max-width: 900px) {
    .ebpf-favorite-item-image {
        flex-basis: 74px !important;
        width: 74px !important;
        height: 74px !important;
        min-width: 74px !important;
        min-height: 74px !important;
        max-width: 74px !important;
        max-height: 74px !important;
    }
}

/* V9.3.3 — stabilisation définitive des lignes produits favoris */
.ebpf-favorite-item,
.ebpf-favorite-item *,
.ebpf-favorite-item:hover,
.ebpf-favorite-item:hover * {
    transition: none !important;
    animation: none !important;
}

.ebpf-favorite-item {
    display: grid !important;
    grid-template-columns: 90px minmax(0, 1fr) minmax(260px, 280px) 44px !important;
    column-gap: 18px !important;
    align-items: center !important;
    min-height: 138px !important;
    padding: 24px 18px !important;
    transform: none !important;
    background: transparent !important;
}
.ebpf-favorite-item:first-child {
    padding-top: 24px !important;
}
.ebpf-favorite-item:hover,
.ebpf-favorite-item:focus-within {
    background: #fdfdfd !important;
}

.ebpf-favorite-item > .ebpf-favorite-item-image,
.ebpf-favorite-item > .ebpf-favorite-item-content,
.ebpf-favorite-item > .ebpf-favorite-item-actions,
.ebpf-favorite-item > .ebpf-list-heart-button {
    align-self: center !important;
    transform: none !important;
    translate: none !important;
}

.ebpf-favorite-item > .ebpf-favorite-item-image {
    display: block !important;
    place-self: center start !important;
    width: 90px !important;
    height: 90px !important;
    min-width: 90px !important;
    min-height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    overflow: hidden !important;
    flex: none !important;
}

.ebpf-favorite-item > .ebpf-favorite-item-image img {
    display: block !important;
    width: 90px !important;
    height: 90px !important;
    min-width: 90px !important;
    min-height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: none !important;
    translate: none !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: top !important;
}

.ebpf-favorite-item > .ebpf-favorite-item-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 90px !important;
}

.ebpf-favorite-item > .ebpf-favorite-item-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 90px !important;
}

.ebpf-favorite-item > .ebpf-list-heart-button {
    place-self: center center !important;
    transform: none !important;
}
.ebpf-list-heart-button:hover,
.ebpf-list-heart-button:focus {
    transform: none !important;
}

@media (max-width: 900px) {
    .ebpf-favorite-item {
        grid-template-columns: 74px minmax(0, 1fr) 42px !important;
        min-height: 122px !important;
    }
    .ebpf-favorite-item > .ebpf-favorite-item-image,
    .ebpf-favorite-item > .ebpf-favorite-item-image img {
        width: 74px !important;
        height: 74px !important;
        min-width: 74px !important;
        min-height: 74px !important;
        max-width: 74px !important;
        max-height: 74px !important;
    }
    .ebpf-favorite-item > .ebpf-favorite-item-content,
    .ebpf-favorite-item > .ebpf-favorite-item-actions {
        min-height: 74px !important;
    }
}

/* V9.3.5 — hover gris légèrement plus visible */
.ebpf-favorite-item:hover,
.ebpf-favorite-item:focus-within {
    background: #f4f4f4 !important;
}

/* V9.3.8 — hover lignes un peu plus clair */
.ebpf-favorite-item:hover,
.ebpf-favorite-item:focus-within {
    background: #f7f7f7 !important;
}

/* V9.3.9 — hover très clair + drag ghost propre, sans bouton */
.ebpf-favorite-item:hover,
.ebpf-favorite-item:focus-within {
    background: #fafafa !important;
}

.ebpf-drag-ghost-favorite {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr) !important;
    column-gap: 16px !important;
    align-items: center !important;
    width: 430px !important;
    min-height: 104px !important;
    padding: 14px 16px !important;
    background: #fff !important;
    border: 1px solid #e8ded5 !important;
    border-radius: 10px !important;
    box-shadow: 0 18px 45px rgba(0,0,0,.18) !important;
    opacity: .98 !important;
    pointer-events: none !important;
    z-index: 999999 !important;
    box-sizing: border-box !important;
}
.ebpf-drag-ghost-favorite .ebpf-drag-ghost-image {
    width: 74px !important;
    height: 74px !important;
    border-radius: 7px !important;
    background: #faf3e9 !important;
    overflow: hidden !important;
    display: block !important;
}
.ebpf-drag-ghost-favorite .ebpf-drag-ghost-image img {
    width: 74px !important;
    height: 74px !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
}
.ebpf-drag-ghost-favorite .ebpf-drag-ghost-content {
    min-width: 0 !important;
    display: block !important;
}
.ebpf-drag-ghost-favorite .ebpf-drag-ghost-title {
    color: #333 !important;
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    overflow-wrap: anywhere !important;
}
.ebpf-drag-ghost-favorite .ebpf-drag-ghost-meta {
    margin-top: 6px !important;
    color: #777 !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* V9.4 — emplacement visible pendant le drag vers les routines */
.ebpf-routine-product-placeholder {
    opacity: .72 !important;
    border: 1px dashed #d8cabc !important;
    background: #fafafa !important;
    cursor: default !important;
    pointer-events: none !important;
}
.ebpf-routine-product-placeholder .ebpf-routine-product-image {
    background: #f2f2f2 !important;
}
.ebpf-routine-product-placeholder .ebpf-routine-product-title,
.ebpf-routine-product-placeholder .ebpf-routine-product-detail {
    color: #aaa !important;
}


/* V9.5 — correctif final ciblé encadré Mes routines : titre bloqué à 13px. */
.ebpf-favorites-endpoint .ebpf-routines .ebpf-routine-column-header input.ebpf-routine-title,
body .ebpf-routines .ebpf-routine-column-header input.ebpf-routine-title,
body .ebpf-routines .ebpf-routine-column-header.is-editing input.ebpf-routine-title,
body .ebpf-routines input.ebpf-routine-title:focus,
body .ebpf-routines input.ebpf-routine-title:active {
    font-size: 13px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    width: calc(100% - 70px) !important;
    max-width: calc(100% - 70px) !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
body .ebpf-routines .ebpf-routine-column-header {
    display: flex !important;
    align-items: center !important;
}


/* V9.5 — ajustement final titres routines : 15px, crayon juste après le titre, croix à droite. */
.ebpf-favorites-endpoint .ebpf-routines .ebpf-routine-column-header,
body .ebpf-routines .ebpf-routine-column-header {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
}
.ebpf-favorites-endpoint .ebpf-routines .ebpf-routine-column-header input.ebpf-routine-title,
body .ebpf-routines .ebpf-routine-column-header input.ebpf-routine-title,
body .ebpf-routines .ebpf-routine-column-header.is-editing input.ebpf-routine-title,
body .ebpf-routines input.ebpf-routine-title:focus,
body .ebpf-routines input.ebpf-routine-title:active {
    font-size: 15px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    width: auto !important;
    max-width: calc(100% - 70px) !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
body .ebpf-routines .ebpf-routine-column-header .ebpf-edit-routine {
    position: static !important;
    transform: none !important;
    margin-left: 3px !important;
    margin-right: 8px !important;
    flex: 0 0 auto !important;
}
body .ebpf-routines .ebpf-routine-column-header .ebpf-delete-routine {
    position: static !important;
    transform: none !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
}


/* V9.8 — titres routines : 15px, placeholder lisible, crayon collé au titre, croix à droite. */
.ebpf-routines .ebpf-routine-column-header {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    overflow: visible !important;
}
.ebpf-routines .ebpf-routine-column-header input.ebpf-routine-title,
.ebpf-routines .ebpf-routine-column-header.is-editing input.ebpf-routine-title,
.ebpf-routines input.ebpf-routine-title:focus,
.ebpf-routines input.ebpf-routine-title:active {
    font-size: 15px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    width: auto !important;
    max-width: calc(100% - 58px) !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
.ebpf-routines .ebpf-routine-column-header.is-editing input.ebpf-routine-title:placeholder-shown,
.ebpf-routines input.ebpf-routine-title:focus:placeholder-shown {
    width: 17ch !important;
    min-width: 17ch !important;
    max-width: calc(100% - 40px) !important;
    flex: 0 1 17ch !important;
}
.ebpf-routines .ebpf-routine-column-header .ebpf-edit-routine {
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    margin-left: 4px !important;
    margin-right: 8px !important;
    flex: 0 0 auto !important;
}
.ebpf-routines .ebpf-routine-column-header.is-editing .ebpf-edit-routine {
    display: none !important;
}
.ebpf-routines .ebpf-routine-column-header .ebpf-delete-routine {
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
}


/* V9.8.2 — en-tête favoris : alignement vertical optique précis titre/bouton. */
.ebpf-favorites-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 16px !important;
    row-gap: 14px !important;
    margin: 0 0 22px !important;
}
.ebpf-favorites-title {
    margin: 0 !important;
    font-size: 28px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    min-height: var(--ebpf-fixed-button-height, 44px) !important;
}
.ebpf-favorites-header .ebpf-add-all-favorites {
    justify-self: end !important;
    align-self: center !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}

@media (max-width: 640px) {
    .ebpf-favorites-header {
        display: block !important;
    }
    .ebpf-favorites-title {
        display: block !important;
        min-height: 0 !important;
        margin: 0 0 14px !important;
    }
    .ebpf-favorites-header .ebpf-add-all-favorites {
        width: 100% !important;
    }
}
