/* Page and article testimonials share the visual language of the home quotes. */
:root {
    --lpd-testimonial-ink: var(--wp--preset--color--black, #111);
    --lpd-testimonial-paper: #eff1f2;
    --lpd-testimonial-text: #555;
    --lpd-testimonial-author: var(--wp--preset--color--purple, #43358b);
    --lpd-testimonial-size: 20px;
    --lpd-testimonial-padding: clamp(20px, 2.2vw, 32px);
}

/* The last selector replaces the former, larger volunteer callout variant. */
:is(.wp-site-blocks, .editor-styles-wrapper) :is(
    .wp-block-quote.ip-quote,
    .creer-page .creer-testimonial,
    .article-page .article-quote,
    .article-page .article-content .wp-block-quote,
    .volunteer-page .en-testimony-body > .wp-block-quote,
    .volunteer-page .en-testimony--volunteer .en-testimony-body > .wp-block-quote:last-child
) {
    box-sizing: border-box;
    width: calc(100% - 24px);
    min-width: 0;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    padding: var(--lpd-testimonial-padding);
    border: 3px solid var(--lpd-testimonial-ink);
    border-radius: 0;
    background: var(--lpd-testimonial-paper);
    box-shadow: 8px 9px 0 0 var(--lpd-testimonial-ink);
    color: var(--lpd-testimonial-text);
    font-family: var(--wp--preset--font-family--roboto-condensed, "Roboto Condensed", sans-serif);
    font-size: var(--lpd-testimonial-size);
    font-weight: 300;
    font-style: normal;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
    transform: rotate(-1.25deg);
}

:is(.wp-site-blocks, .editor-styles-wrapper) :is(
    .wp-block-quote.ip-quote,
    .creer-page .creer-testimonial,
    .article-page .article-quote,
    .article-page .article-content .wp-block-quote,
    .volunteer-page .en-testimony-body > .wp-block-quote,
    .volunteer-page .en-testimony--volunteer .en-testimony-body > .wp-block-quote:last-child
) :is(p, .wp-block-quote) {
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    font-style: italic;
    line-height: inherit;
}

:is(.wp-site-blocks, .editor-styles-wrapper) :is(
    .wp-block-quote.ip-quote,
    .creer-page .creer-testimonial,
    .article-page .article-quote,
    .article-page .article-content .wp-block-quote,
    .volunteer-page .en-testimony-body > .wp-block-quote,
    .volunteer-page .en-testimony--volunteer .en-testimony-body > .wp-block-quote:last-child
) p {
    margin-block: 0 clamp(10px, 1.5vw, 22px);
    text-align: center;
}

:is(.wp-site-blocks, .editor-styles-wrapper) :is(
    .wp-block-quote.ip-quote,
    .creer-page .creer-testimonial,
    .article-page .article-quote,
    .article-page .article-content .wp-block-quote,
    .volunteer-page .en-testimony-body > .wp-block-quote,
    .volunteer-page .en-testimony--volunteer .en-testimony-body > .wp-block-quote:last-child
) > :last-child {
    margin-block-end: 0;
}

:is(.wp-site-blocks, .editor-styles-wrapper) .volunteer-page .en-testimony-body > .wp-block-quote strong {
    font-weight: inherit;
    font-style: inherit;
}

:is(.wp-site-blocks, .editor-styles-wrapper) :is(
    .wp-block-quote.ip-quote,
    .creer-page .creer-testimonial,
    .article-page .article-quote,
    .article-page .article-content .wp-block-quote,
    .volunteer-page .en-testimony-body > .wp-block-quote
) cite {
    display: block;
    color: var(--lpd-testimonial-author);
    font-size: 22px;
    font-weight: 300;
    font-style: normal;
    line-height: inherit;
    text-align: left;
}

/* The same small label used above the quotations on the home page. */
:is(.wp-site-blocks, .editor-styles-wrapper) :is(
    .wp-block-quote.ip-quote,
    .creer-page .creer-testimonial,
    .article-page .article-quote,
    .article-page .article-content .wp-block-quote,
    .volunteer-page .en-testimony-body > .wp-block-quote
)::before {
    content: "Témoignage";
    display: table;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 18px;
    padding: 6px 12px;
    border: 2px solid var(--lpd-testimonial-ink);
    background: var(--tt-cartouche-color, var(--lpd-testimonial-author));
    box-shadow: 3px 3px 0 var(--lpd-testimonial-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: .04em;
    text-transform: uppercase;
    transform: rotate(2deg);
    transform-origin: left center;
}

:is(.wp-site-blocks, .editor-styles-wrapper) :is(
    .wp-block-quote.ip-quote,
    .creer-page .creer-testimonial,
    .article-page .article-quote,
    .article-page .article-content .wp-block-quote,
    .volunteer-page .en-testimony-body > .wp-block-quote
) cite strong,
:is(.wp-site-blocks, .editor-styles-wrapper) .creer-page .creer-testimonial > p:first-child strong {
    color: var(--lpd-testimonial-author);
    font-weight: 700;
}

/* The quote inside the Create card belongs to its single outer frame. */
:is(.wp-site-blocks, .editor-styles-wrapper) .creer-page .creer-testimonial > .wp-block-quote {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* Long quotes keep their natural height and fit narrow screens. */
@media (max-width: 781px) {
    :is(.wp-site-blocks, .editor-styles-wrapper) :is(
        .wp-block-quote.ip-quote,
        .creer-page .creer-testimonial,
        .article-page .article-quote,
        .article-page .article-content .wp-block-quote,
        .volunteer-page .en-testimony-body > .wp-block-quote,
        .volunteer-page .en-testimony--volunteer .en-testimony-body > .wp-block-quote:last-child
    ) {
        transform: none;
    }
}
