/* =========================================================
   COMIXIO 9.3.9.140 - bibliotheque lisible et hierarchie CTA
   Scope UX/CSS uniquement.
========================================================= */

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-heading-copy h1 {
    color: #fff !important;
    letter-spacing: 0 !important;
    text-shadow: 0 3px 18px rgba(8, 13, 24, .34) !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-heading-copy p {
    color: rgba(255, 255, 255, .82) !important;
    font-weight: 750 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 2px 12px rgba(8, 13, 24, .30) !important;
}

/* Le solde devient un portefeuille sombre, distinct des cartes d'histoires. */
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-card {
    position: relative !important;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 190px) !important;
    gap: 18px !important;
    padding: 18px 18px 17px 22px !important;
    overflow: visible !important;
    border: 1px solid rgba(62, 219, 255, .50) !important;
    border-radius: 12px !important;
    background: #141c2c !important;
    box-shadow: 0 16px 38px rgba(8, 13, 24, .28) !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-card::before {
    content: "" !important;
    position: absolute !important;
    top: 12px !important;
    bottom: 12px !important;
    left: 0 !important;
    width: 4px !important;
    border-radius: 0 4px 4px 0 !important;
    background: #3edbff !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-summary {
    gap: 5px !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-eyebrow {
    color: #3edbff !important;
    font-size: 10px !important;
    letter-spacing: 0 !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-summary > strong {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 17px !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-summary > strong .storybd-credit-balance {
    display: inline !important;
    margin: 0 !important;
    color: #ffd84d !important;
    font-size: 31px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-summary > p,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-summary > em {
    display: block !important;
    max-width: none !important;
    color: #cbd5e1 !important;
    letter-spacing: 0 !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-summary > p b,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-summary > em b {
    color: #fff !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-actions .storybd-library-credit-add,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-actions a.storybd-library-credit-add {
    min-height: 44px !important;
    border: 1px solid #ff2d6f !important;
    border-radius: 8px !important;
    background: #ff2d6f !important;
    color: #fff !important;
    box-shadow: 0 9px 22px rgba(255, 45, 111, .24) !important;
    letter-spacing: 0 !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-actions .storybd-library-credit-add:hover,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-actions a.storybd-library-credit-add:hover {
    border-color: #e91f61 !important;
    background: #e91f61 !important;
    transform: translateY(-1px) !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-details > summary {
    color: #e2e8f0 !important;
    letter-spacing: 0 !important;
    text-decoration-color: rgba(62, 219, 255, .72) !important;
}

/* Les CTA de continuation partagent enfin la meme hierarchie rose. */
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-primary-continue,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-future-continue,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-next-card > a.storybd-library-future-continue.storybd-library-primary-continue {
    border: 1px solid #ff2d6f !important;
    background: #ff2d6f !important;
    background-image: none !important;
    background-size: auto !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(255, 45, 111, .24) !important;
    filter: none !important;
    animation: none !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-primary-continue::before,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-primary-continue::after,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-future-continue::before,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-future-continue::after {
    display: none !important;
    content: none !important;
    animation: none !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-primary-continue:hover,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-future-continue:hover {
    border-color: #e91f61 !important;
    background: #e91f61 !important;
    box-shadow: 0 13px 28px rgba(255, 45, 111, .28) !important;
    transform: translateY(-1px) !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-next-card > a.storybd-library-future-continue {
    min-height: 48px !important;
    padding: 11px 12px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-primary-continue b,
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] a.storybd-library-future-continue b {
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Le controle des planches devient un vrai controle visible et explicite. */
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-featured-toggle {
    min-height: 50px !important;
    padding: 10px 26px !important;
    border-top: 1px solid rgba(15, 23, 42, .08) !important;
    background: #f8fafc !important;
    color: #344054 !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-featured-toggle b {
    display: grid !important;
    place-items: center !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    background: #fff0f6 !important;
    color: #ff2d6f !important;
    font-size: 15px !important;
}

/* Cinq cartes sont visibles sur grand ecran; le defilement reste disponible au-dela. */
.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-planche-row {
    padding-bottom: 14px !important;
    overflow-y: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: #94a3b8 #e2e8f0 !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-planche-row::-webkit-scrollbar {
    height: 8px !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-planche-row::-webkit-scrollbar-track {
    border-radius: 4px !important;
    background: rgba(20, 28, 44, .08) !important;
}

.storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-planche-row::-webkit-scrollbar-thumb {
    border: 2px solid #fff !important;
    border-radius: 4px !important;
    background: #94a3b8 !important;
}

@media (min-width: 981px) {
    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-planche-row > .storybd-library-card.storybd-planche-card,
    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-planche-row > .storybd-library-future-card {
        flex: 0 0 calc((100% - 64px) / 5) !important;
        width: calc((100% - 64px) / 5) !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

@media (max-width: 760px) {
    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-dashboard-head {
        gap: 14px !important;
    }

    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-heading-copy h1 {
        font-size: clamp(30px, 10vw, 40px) !important;
        line-height: 1.05 !important;
    }

    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-heading-copy p {
        margin-top: 7px !important;
        font-size: 14px !important;
    }

    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-card {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        padding: 17px !important;
        border-radius: 10px !important;
    }

    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-actions,
    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-actions .storybd-library-credit-add {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-credit-details > ul {
        right: auto !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-featured-toggle {
        justify-content: space-between !important;
        padding: 10px 16px !important;
    }

    .storybd-v7.storybd-library[data-storybd-library-ux="9.3.9.140"] .storybd-library-planche-row::-webkit-scrollbar {
        height: 4px !important;
    }
}
