.resources-page {
    background: var(--background, #211724);
    color: #ffffff;
}

.resources-main {
    position: relative;
    isolation: isolate;
    padding: 150px 24px 70px;
}

.resources-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(
            ellipse at 80% 15%,
            rgba(143, 82, 195, 0.2),
            transparent 40%
        ),
        radial-gradient(
            ellipse at 15% 70%,
            rgba(113, 66, 155, 0.12),
            transparent 45%
        );
    pointer-events: none;
}

.resources-container {
    width: min(100%, 1200px);
    margin-inline: auto;
}

/* GRANDE PLAQUE D’INTRODUCTION */

.resources-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
    gap: 30px;
    padding: clamp(25px, 5vw, 60px);
    margin-bottom: 75px;
    overflow: hidden;
    border: 1px solid rgba(230, 199, 250, 0.22);
    border-radius: 30px;
    background: linear-gradient(
        130deg,
        rgba(255, 255, 255, 0.09),
        rgba(230, 199, 250, 0.025)
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.resources-eyebrow {
    margin: 0 0 22px;
    color: var(--lilac, #e6c7fa);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    line-height: 1.8;
    text-transform: uppercase;
}

.resources-hero h1 {
    margin: 0 0 25px;
    font-size: clamp(30px, 4.3vw, 58px);
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.resources-hero h1 span,
.resources-library-heading h2 span {
    color: var(--lilac, #e6c7fa);
}

.resources-hero-text > p:not(.resources-eyebrow) {
    max-width: 560px;
    margin: 0 0 30px;
    color: #cfc3d6;
    font-size: 14px;
    line-height: 1.9;
}

.resource-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 22px;
    border-radius: 999px;
    background: var(--lilac, #e6c7fa);
    color: #211724;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.resource-button:hover {
    background: #f0ddff;
}

/* ILLUSTRATION DE LIVRES EN VERRE */

.resources-art {
    position: relative;
    height: 280px;
}

.resource-book {
    position: absolute;
    top: 25px;
    left: 50%;
    width: 180px;
    height: 235px;
    border: 1px solid rgba(230, 199, 250, 0.5);
    border-radius: 12px 22px 22px 12px;
    box-shadow: 15px 20px 45px rgba(0, 0, 0, 0.2);
}

.resource-book-back {
    background: rgba(143, 90, 183, 0.22);
    transform: translateX(-30%) rotate(13deg);
}

.resource-book-front {
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #725086, #372640);
    transform: translateX(-65%) rotate(-9deg);
}

.resource-book-front::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 12px;
    width: 1px;
    background: rgba(230, 199, 250, 0.35);
}

.resource-book svg {
    width: 80px;
    height: 80px;
    color: var(--lilac, #e6c7fa);
}

/* BIBLIOTHÈQUE ET FILTRES */

#bibliotheque {
    scroll-margin-top: 25px;
}

.resources-library-heading h2 {
    margin: 0 0 15px;
    font-size: clamp(28px, 3.5vw, 43px);
    font-style: italic;
    font-weight: 800;
}

.resources-library-heading > p {
    margin: 0 0 25px;
    color: #cfc3d6;
    font-size: 13px;
    line-height: 1.8;
}

.resource-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 3px 12px;
    scrollbar-width: thin;
    scrollbar-color: #e6c7fa transparent;
}

.resource-filters button {
    flex-shrink: 0;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid rgba(230, 199, 250, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #ddd2e5;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.resource-filters button[aria-pressed="true"] {
    background: var(--lilac, #e6c7fa);
    color: #211724;
}

.resource-count {
    margin: 18px 0 25px;
    color: #bcaac8;
    font-size: 12px;
}

/* FICHES */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
}

.resource-card {
    min-width: 0;
    padding: 26px;
    border: 1px solid rgba(230, 199, 250, 0.2);
    border-radius: 22px;
    background: linear-gradient(
        140deg,
        rgba(255, 255, 255, 0.08),
        rgba(230, 199, 250, 0.025)
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.resource-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 30px;
}

.resource-number {
    color: rgba(230, 199, 250, 0.55);
    font-size: 35px;
    font-style: italic;
    font-weight: 800;
}

.resource-duration {
    color: #cfc3d6;
    font-size: 11px;
}

.resource-type {
    margin: 0 0 12px;
    color: var(--lilac, #e6c7fa);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.resource-card h3 {
    margin: 0 0 18px;
    font-size: 23px;
    font-style: italic;
    font-weight: 800;
    line-height: 1.35;
}

.resource-description {
    margin: 0 0 23px;
    color: #cfc3d6;
    font-size: 13px;
    line-height: 1.9;
}

.resource-details summary {
    padding: 10px 0;
    color: var(--lilac, #e6c7fa);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.resource-details ol {
    display: grid;
    gap: 14px;
    margin: 15px 0 0;
    padding-left: 20px;
    color: #d7cadf;
    font-size: 13px;
    line-height: 1.85;
}

.resource-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding: 11px 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.resource-download svg {
    flex-shrink: 0;
}

.resource-download:hover {
    color: var(--lilac, #e6c7fa);
}

/* LIEN VERS LES PRÉDICATIONS */

.resources-messages {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
    padding: 35px;
    margin-top: 65px;
    border-radius: 24px;
    background: rgba(230, 199, 250, 0.05);
}

.resources-messages h2 {
    margin: 0 0 15px;
    font-size: 25px;
    font-style: italic;
    line-height: 1.3;
}

.resources-messages p:not(.resources-eyebrow) {
    margin: 0;
    color: #cfc3d6;
    font-size: 13px;
    line-height: 1.8;
}

.resource-filters[hidden],
.resource-card[hidden],
.resource-download[hidden] {
    display: none;
}

.resources-main button:focus-visible,
.resources-main summary:focus-visible {
    outline: 2px solid var(--lilac, #e6c7fa);
    outline-offset: 5px;
}

@media (max-width: 950px) {
    .resources-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resources-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .resources-art {
        display: none;
    }
}

@media (max-width: 600px) {
    .resources-main {
        padding: 135px 20px 55px;
    }

    .resources-hero {
        padding: 28px 22px;
        margin-bottom: 50px;
    }

    .resources-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .resources-messages {
        padding: 25px;
    }
}

/* LIVRES DU PASTEUR MARCELLO */

.books-section {
    padding: 10px 0 80px;
}

.books-heading {
    max-width: 750px;
    margin-bottom: 35px;
}

.books-heading h2 {
    margin: 0 0 18px;
    font-size: clamp(29px, 4vw, 48px);
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.books-heading h2 span {
    color: var(--lilac, #e6c7fa);
}

.books-heading > p:last-child {
    margin: 0;
    color: #cfc3d6;
    font-size: 14px;
    line-height: 1.9;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.book-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(230, 199, 250, 0.22);
    border-radius: 22px;
    background: linear-gradient(
        140deg,
        rgba(255, 255, 255, 0.09),
        rgba(230, 199, 250, 0.025)
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition:
        transform 300ms ease,
        border-color 300ms ease;
}

/* Couverture entière : aucun recadrage du livre. */

.book-cover {
    display: grid;
    place-items: center;
    height: 290px;
    padding: 25px 20px;
    background: radial-gradient(
        ellipse at center,
        rgba(230, 199, 250, 0.1),
        transparent 75%
    );
}

.book-cover img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(7px 12px 10px rgba(0, 0, 0, 0.3));
    transition: transform 400ms ease;
}

.book-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 22px 25px;
}

.book-author {
    margin: 0 0 12px;
    color: var(--lilac, #e6c7fa);
    font-size: 10px;
    line-height: 1.8;
}

.book-content h3 {
    margin: 0 0 25px;
    font-size: 19px;
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.4;
}

.book-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    margin-top: auto;
    padding: 11px 15px;
    border-radius: 999px;
    background: var(--lilac, #e6c7fa);
    color: #211724;
    font-size: 11px;
    font-weight: 600;
}

.book-link svg {
    display: block;
    flex-shrink: 0;
}

.book-link:hover {
    background: #f0ddff;
}

@media (hover: hover) {
    .book-card:hover {
        transform: translateY(-5px);
        border-color: rgba(230, 199, 250, 0.5);
    }

    .book-card:hover .book-cover img {
        transform: translateY(-4px) rotate(-2deg);
    }
}

@media (max-width: 1100px) {
    .books-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .book-cover {
        height: 260px;
        padding: 20px 15px;
    }
}

@media (max-width: 500px) {
    .books-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .book-cover {
        height: 310px;
    }

    .books-section {
        padding-bottom: 55px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .book-card,
    .book-cover img {
        transition: none;
    }
}