.resource-view {
    min-height: 100vh;
    background: #fff;
}

.resource-view__hero {
    padding: 3.5rem 0 4rem;
    background:
        radial-gradient(
            circle at top left,
            rgba(14, 165, 233, 0.14),
            transparent 34rem
        ),
        radial-gradient(
            circle at bottom right,
            rgba(249, 115, 22, 0.08),
            transparent 30rem
        ),
        #f8fafc;
}

.resource-view__hero-container {
    max-width: 960px;
}

.resource-view__intro .container{
    max-width:960px;
}

.resource-view__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    color: #64748b;
    font-size: 0.82rem;
}

.resource-view__breadcrumb a {
    color: #0369a1;
    text-decoration: none;
}

.resource-view__breadcrumb a:hover {
    text-decoration: underline;
}

.resource-view__breadcrumb span:last-child {
    overflow: hidden;
    max-width: 420px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-view__labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.resource-view__label {
    --resource-label-color: #0ea5e9;

    display: inline-flex;
    align-items: center;
    padding: 0.36rem 0.7rem;
    border-radius: 999px;
    background: color-mix(
        in srgb,
        var(--resource-label-color) 12%,
        transparent
    );
    color: #075985;
    font-size: 0.75rem;
    font-weight: 800;
}

.resource-view__label--collection {
    --resource-label-color: #7c5cff;

    background: linear-gradient(
        135deg,
        rgba(14, 165, 233, 0.12),
        rgba(124, 92, 255, 0.14)
    );

    border: 1px solid rgba(124, 92, 255, 0.18);
    color: #4338ca;
}

.resource-view__hero h1 {
    max-width: 940px;
    margin: 0;
    color: #061326;
    font-size: clamp(2rem, 3.8vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.resource-view__subtitle {
    max-width: 800px;
    margin: 1.35rem 0 0;
    color: #475569;
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    line-height: 1.65;
}

.resource-view__details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.35rem;
    margin-top: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

/* ==========================================================
   Introduction : couverture + résumé
   ========================================================== */

.resource-view__intro {
    position: relative;
    z-index: 2;
    padding: 0 0 3.5rem;
    margin-top: -1.7rem;
}

.resource-view__intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 450px) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.resource-view__cover {
    width: 100%;
    max-width: 450px;
    margin: 0;
}

.resource-view__cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 26px;
    box-shadow: 0 24px 70px rgba(6, 19, 38, 0.13);
}

.resource-view__summary {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 450px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 26px;
    background:
        radial-gradient(
            circle at top right,
            rgba(14, 165, 233, 0.09),
            transparent 22rem
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(248, 250, 252, 0.96)
        );
    box-shadow: 0 20px 55px rgba(6, 19, 38, 0.08);
}

.resource-view__summary-inner {
    width: 100%;
}

.resource-view__summary .kicker {
    margin-bottom: 1rem;
}

.resource-view__summary p {
    margin: 0;
    color: #334155;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    font-weight: 600;
    line-height: 1.85;
}

/* Cas où l’image ou le résumé est absent */

.resource-view__intro-grid--cover-only {
    grid-template-columns: minmax(0, 450px);
}

.resource-view__intro-grid--summary-only {
    grid-template-columns: minmax(0, 1fr);
}

.resource-view__intro-grid--summary-only .resource-view__summary {
    min-height: auto;
}

/* ==========================================================
   Corps de la ressource
   ========================================================== */

.resource-view__body {
    padding-top: 1.5rem;
}

.resource-view__layout {
    max-width: 920px;
}

.resource-view__article {
    color: #334155;
    font-size: 1.08rem;
    line-height: 1.82;
}

.resource-view__content > :first-child {
    margin-top: 0;
}

.resource-view__content h2 {
    margin: 2.7rem 0 1rem;
    color: #061326;
    font-size: 1.85rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.resource-view__content h3 {
    margin: 2.15rem 0 0.85rem;
    color: #061326;
    font-size: 1.42rem;
    line-height: 1.3;
}

.resource-view__content h4 {
    margin: 1.75rem 0 0.7rem;
    color: #061326;
    font-size: 1.16rem;
}

.resource-view__content p {
    margin: 0 0 1.3rem;
    color: #556497;
}

.resource-view__content strong,
.resource-view__content strong * {
    color: #061326;
}

.resource-view__content p strong,
.resource-view__content li strong,
.resource-view__content blockquote strong,
.resource-view__content td strong,
.resource-view__content th strong {
    color: #061326 !important;
}

.resource-view__content ul,
.resource-view__content ol {
    margin: 0 0 1.5rem;
    padding-left: 1.6rem;
}

.resource-view__content li {
    margin-bottom: 0.5rem;
}

.resource-view__content blockquote {
    margin: 2rem 0;
    padding: 1.2rem 1.5rem;
    border-left: 4px solid #0ea5e9;
    border-radius: 0 14px 14px 0;
    background: #f8fafc;
    color: #334155;
    font-style: italic;
}

.resource-view__content a {
    color: #0284c7;
    font-weight: 700;
    text-underline-offset: 3px;
}

.resource-view__content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.8rem auto;
    border-radius: 16px;
}

.resource-view__content figure {
    margin: 2rem 0;
}

.resource-view__content figcaption {
    margin-top: 0.55rem;
    color: #64748b;
    font-size: 0.82rem;
    text-align: center;
}

.resource-view__content table {
    width: 100%;
    margin: 1.8rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.resource-view__content th,
.resource-view__content td {
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    text-align: left;
    vertical-align: top;
}

.resource-view__content th {
    background: #f1f5f9;
    color: #061326;
}

.resource-view__content pre {
    overflow-x: auto;
    margin: 1.8rem 0;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    background: #061326;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.resource-view__content code {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}

.resource-view__download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    padding: 1.5rem;
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at top right,
            rgba(14, 165, 233, 0.12),
            transparent 18rem
        ),
        #f8fafc;
}

.resource-view__download h2 {
    margin: 0.25rem 0 0.4rem;
    color: #061326;
    font-size: 1.35rem;
}

.resource-view__download p {
    max-width: 600px;
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* ==========================================================
   Ressources associées
   ========================================================== */

.resource-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    margin-top: 1.5rem;
}

.resource-related-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.resource-related-card__image {
    overflow: hidden;
    aspect-ratio: 1 / 1;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: rgba(14, 165, 233, 0.08);
}

.resource-related-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.resource-related-card:hover .resource-related-card__image img {
    transform: scale(1.025);
}

.resource-related-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.resource-related-card__meta {
    margin-bottom: 0.55rem;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
}

.resource-related-card h3 {
    margin: 0;
    color: white;
    font-size: 1.08rem;
    line-height: 1.3;
}

.resource-related-card p {
    margin: 0.7rem 0 1rem;
    color: #64748b;
    font-size: 0.9rem;
}

.resource-related-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: auto;
    color: #64748b;
    font-size: 0.78rem;
}

/* ==========================================================
   CTA et erreur 404
   ========================================================== */

.resource-view__cta {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.resource-not-found {
    display: grid;
    align-items: center;
    min-height: 70vh;
}

.resource-not-found__card {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem;
    text-align: center;
}

.resource-not-found__card .btn-row {
    justify-content: center;
}

/* ==========================================================
   Responsive tablette
   ========================================================== */

@media (max-width: 960px) {
    .resource-view__intro-grid {
        grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
        gap: 2rem;
    }

    .resource-view__cover {
        max-width: 380px;
    }

    .resource-view__summary {
        min-height: 380px;
        padding: 1.9rem;
    }
}

@media (max-width: 900px) {
    .resource-related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================
   Responsive mobile
   ========================================================== */

@media (max-width: 760px) {
    .resource-view__intro {
        padding-bottom: 2.5rem;
        margin-top: -1rem;
    }

    .resource-view__intro-grid,
    .resource-view__intro-grid--cover-only,
    .resource-view__intro-grid--summary-only {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .resource-view__cover {
        max-width: 450px;
        margin-inline: auto;
    }

    .resource-view__summary {
        min-height: auto;
        padding: 1.75rem;
    }

    .resource-view__summary p {
        font-size: 1rem;
        line-height: 1.75;
    }

    .resource-view__body {
        padding-top: 0.5rem;
    }
}

@media (max-width: 680px) {
    .resource-view__hero {
        padding: 2.8rem 0 3.2rem;
    }

    .resource-view__hero h1 {
        font-size: 1.9rem;
    }

    .resource-view__breadcrumb span:last-child {
        display: none;
    }

    .resource-view__cover img,
    .resource-view__summary {
        border-radius: 18px;
    }

    .resource-view__article {
        font-size: 1rem;
    }

    .resource-view__content h2 {
        font-size: 1.55rem;
    }

    .resource-view__content h3 {
        font-size: 1.28rem;
    }

    .resource-view__download {
        align-items: stretch;
        flex-direction: column;
    }

    .resource-view__download .btn {
        width: 100%;
        justify-content: center;
    }

    .resource-related-grid {
        grid-template-columns: 1fr;
    }
}