.book-promo {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    max-width: 100%;
    padding: 0;
    margin: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    text-align: left;
}

.book-promo:hover {
    box-shadow: none;
    transform: none;
}

.book-promo__cover {
    display: block;
    flex: 0 0 110px;
    width: 110px;
    max-width: 110px;
    margin-bottom: 8px;
}

.book-promo__cover img {
    display: block !important;
    width: 110px !important;
    max-width: 110px !important;
    height: auto !important;
    border-radius: 8px;
    box-shadow: none;
    transition: transform .25s ease;
}

.book-promo:hover .book-promo__cover img {
    transform: scale(1.03);
}

.book-promo__content {
    flex: 1 1 auto;
    min-width: 0;
}

.book-promo__label {
    display: inline-block;
    margin-bottom: 8px;
    color: #777;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.book-promo__title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    line-height: 1.2;
}

.book-promo__description {
    margin: 0 0 16px;
    color: #555;
    font-size: .95rem;
    line-height: 1.55;
}

.book-promo__button {
    display: inline-block;
    padding: 10px 16px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: #0025ff;
    color: #fff !important;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background .2s ease;
}

.book-promo__button:hover {
    background: #001dcc;
    color: #fff !important;
    text-decoration: none !important;
}

.book-promo__button:focus,
.book-promo__button:active {
    text-decoration: none !important;
}

/*
 * Adapte le composant lorsque sa sidebar devient étroite.
 * Le seuil dépend de la largeur réelle du widget, pas du viewport.
 */
#custom_html-4 {
    container-type: inline-size;
}

@container (max-width: 300px) {
    .book-promo {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .book-promo__cover {
        flex-basis: auto;
        width: 130px;
        max-width: 130px;
        margin-right: auto;
        margin-bottom: 0;
        margin-left: auto;
    }

    .book-promo__cover img {
        width: 130px !important;
        max-width: 130px !important;
    }

    .book-promo__content {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 991px) {
    .book-promo__cover {
        flex-basis: 130px;
        width: 130px;
        max-width: 130px;
    }

    .book-promo__cover img {
        width: 130px !important;
        max-width: 130px !important;
    }
}

@media (max-width: 480px) {
    .book-promo {
        flex-direction: column;
        text-align: center;
    }

    .book-promo__cover {
        flex-basis: auto;
        margin-right: auto;
        margin-bottom: 0;
        margin-left: auto;
    }
}

/* Promotion compacte placée haut dans l'accueil, visible uniquement sur mobile. */
.book-promo-mobile {
    display: none;
}

@media (max-width: 640px), (max-width: 900px) and (orientation: landscape) {
    .book-promo-mobile {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        margin: 0 0 2rem;
        padding: 14px;
        background: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 12px;
    }

    .book-promo-mobile__cover {
        display: block;
        flex: 0 0 86px;
        width: 86px;
        max-width: 86px;
    }

    .book-promo-mobile__cover img {
        display: block !important;
        width: 86px !important;
        max-width: 86px !important;
        height: auto !important;
        border-radius: 6px;
        box-shadow: none;
    }

    .book-promo-mobile__content {
        display: flex;
        flex: 1 1 auto;
        align-self: stretch;
        flex-direction: column;
        min-width: 0;
        text-align: left;
    }

    .book-promo-mobile__label {
        display: block;
        margin: 0 0 4px;
        color: #777;
        font-size: .7rem;
        font-weight: 600;
        letter-spacing: .08em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .book-promo-mobile__title {
        margin: 0 0 6px;
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .book-promo-mobile__description {
        margin: 0 0 10px;
        color: #555;
        font-size: .88rem;
        line-height: 1.4;
    }

    .book-promo-mobile__button {
        align-self: flex-start;
        display: inline-block;
        padding: 9px 12px;
        margin-top: auto;
        border-radius: 999px;
        background: #0025ff;
        color: #fff !important;
        font-size: .82rem;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
        text-decoration: none !important;
    }

    .book-promo-mobile__button:hover,
    .book-promo-mobile__button:focus,
    .book-promo-mobile__button:active {
        background: #001dcc;
        color: #fff !important;
        text-decoration: none !important;
    }
}

/* Encadré Gutenberg en fin de Pause autisteries. */
.book-inline-promo {
    display: flow-root;
    margin: 2.25rem 0;
    padding: 20px 22px;
    background: rgba(0, 37, 255, .045);
    border-left: 4px solid #0025ff;
    border-radius: 0 10px 10px 0;
}

.book-inline-promo__cover {
    float: left;
    width: 100px;
    max-width: 100px;
    margin: 0 20px 0 0 !important;
}

.book-inline-promo__cover img {
    display: block !important;
    width: 100px !important;
    max-width: 100px !important;
    height: auto !important;
    border-radius: 6px;
    box-shadow: none;
}

.book-inline-promo__title {
    margin: 0 0 8px !important;
    color: var(--head-color, #1e293b);
    font-size: 1.35rem;
    line-height: 1.25;
}

.book-inline-promo__text {
    margin: 0 0 14px !important;
    color: var(--text-color, #374151);
    line-height: 1.65;
}

.book-inline-promo__actions.wp-block-buttons {
    gap: 0;
    margin: 0;
}

.book-inline-promo__actions .wp-block-button {
    margin: 0;
}

.book-inline-promo__actions .wp-block-button__link,
.book-inline-promo__link {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    background: #0025ff;
    color: #fff !important;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background .2s ease;
}

.book-inline-promo__actions .wp-block-button__link:hover,
.book-inline-promo__actions .wp-block-button__link:focus,
.book-inline-promo__actions .wp-block-button__link:active,
.book-inline-promo__link:hover,
.book-inline-promo__link:focus,
.book-inline-promo__link:active {
    background: #001dcc;
    color: #fff !important;
    text-decoration: none !important;
}

.book-inline-promo__actions .wp-block-button__link:focus-visible,
.book-inline-promo__link:focus-visible {
    outline: 3px solid rgba(0, 37, 255, .3);
    outline-offset: 3px;
}

body.dark .book-inline-promo {
    background: rgba(255, 255, 255, .045);
    border-left-color: #5268ff;
}

@media (max-width: 640px) {
    .book-inline-promo {
        margin: 1.75rem 0;
        padding: 17px 18px;
    }

    .book-inline-promo__cover {
        width: 78px;
        max-width: 78px;
        margin-right: 14px !important;
        margin-bottom: 4px !important;
    }

    .book-inline-promo__cover img {
        width: 78px !important;
        max-width: 78px !important;
    }

    .book-inline-promo__title {
        font-size: 1.2rem;
    }
}
