/* ===================================
   ARTICLE DETAIL
=================================== */

.article-detail-page {
    background: var(--white);
}


/* ===================================
   HERO / TITLE
=================================== */

.article-detail-hero {
    position: relative;
    overflow: hidden;

    padding:
        20px
        0
        38px;

    background:
        linear-gradient(
            180deg,
            #f5fafc 0%,
            #edf6fa 100%
        );
}


.article-detail-hero::after {
    content: "";

    position: absolute;

    left: -6%;
    right: -6%;
    bottom: -52px;

    height: 86px;

    border-radius:
        50%
        50%
        0
        0
        /
        100%
        100%
        0
        0;

    background: rgba(255, 255, 255, 0.72);

    pointer-events: none;
}


.article-detail-hero-inner {
    position: relative;
    z-index: 1;
}


.article-detail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin:
        0
        0
        12px;

    color: var(--text-light);

    font-size: 0.75rem;
    line-height: 1.35;
}


.article-detail-breadcrumb a {
    color: inherit;
    text-decoration: none;
}


.article-detail-breadcrumb a:hover {
    color: var(--blue);
}


.article-detail-breadcrumb span[aria-current="page"] {
    max-width: 44ch;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.article-detail-hero h1 {
    max-width: 900px;

    margin:
        0
        0
        7px;

    color: var(--title);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            2rem,
            3vw,
            3rem
        );

    font-weight: 400;
    line-height: 1.08;

    text-wrap: balance;
}


.article-detail-date {
    margin: 0;

    color: #7b929f;

    font-size: 0.78rem;
    line-height: 1.4;
}


/* ===================================
   READING COLUMN
=================================== */

.article-detail-shell {
    padding:
        18px
        0
        34px;
}


/*
   Image, texte et bouton retour sont tous
   dans la même colonne de 820px.
*/
.article-detail-article {
    width: min(100%, 820px);

    margin:
        0
        auto;
}


/* ===================================
   COVER IMAGE
=================================== */

.article-detail-cover {
    width: 100%;

    margin:
        0
        0
        24px;

    overflow: hidden;

    border:
        1px solid
        var(--border);

    border-radius: 12px;

    background: #eef7fb;

    box-shadow:
        0 4px 18px
        rgba(
            38,
            81,
            104,
            0.05
        );
}


.article-detail-cover img {
    width: 100%;
    height:
        clamp(
            250px,
            36vw,
            390px
        );

    display: block;

    object-fit: cover;
}


/* ===================================
   ARTICLE TYPOGRAPHY
=================================== */

.article-detail-content {
    width: 100%;

    color: var(--text);

    font-size: 0.98rem;
    line-height: 1.7;
}


.article-detail-content > :first-child {
    margin-top: 0;
}


.article-detail-content > :last-child {
    margin-bottom: 0;
}


.article-detail-content p {
    margin:
        0
        0
        1.1em;
}


.article-detail-content h2,
.article-detail-content h3,
.article-detail-content h4 {
    color: var(--title);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-weight: 400;
    line-height: 1.22;
}


.article-detail-content h2 {
    margin:
        1.65em
        0
        0.62em;

    font-size:
        clamp(
            1.45rem,
            2vw,
            1.82rem
        );
}


.article-detail-content h3 {
    margin:
        1.45em
        0
        0.55em;

    font-size: 1.28rem;
}


.article-detail-content h4 {
    margin:
        1.35em
        0
        0.5em;

    font-size: 1.08rem;
}


.article-detail-content strong {
    color: #314d5c;

    font-weight: 700;
}


.article-detail-content em {
    font-style: italic;
}


.article-detail-content u {
    text-underline-offset: 2px;
}


.article-detail-content a {
    color: #347fa9;

    text-decoration:
        underline
        rgba(
            52,
            127,
            169,
            0.35
        );

    text-underline-offset: 3px;
}


.article-detail-content a:hover {
    color: #24698f;

    text-decoration-color: currentColor;
}


/* ===================================
   LISTS
=================================== */

.article-detail-content ul,
.article-detail-content ol {
    margin:
        0.9em
        0
        1.25em;

    padding-left: 1.5em;
}


.article-detail-content li {
    margin-bottom: 0.62em;

    padding-left: 0.25em;
}


.article-detail-content ul li::marker {
    color: #78aac7;
}


/* ===================================
   NUMBERED LISTS
=================================== */

.article-detail-content ol {
    padding-left: 0;

    list-style: none;

    counter-reset: article-step;
}


.article-detail-content ol > li {
    position: relative;

    min-height: 34px;

    margin:
        0
        0
        13px;

    padding:
        5px
        0
        0
        46px;

    counter-increment: article-step;
}


.article-detail-content ol > li::before {
    content: counter(article-step);

    position: absolute;

    top: 0;
    left: 0;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #7fb4d2;

    color: var(--white);

    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}


/* ===================================
   QUOTES / INLINE IMAGES
=================================== */

.article-detail-content blockquote {
    margin:
        1.4em
        0;

    padding:
        14px
        18px;

    border-left:
        3px solid
        #9bc6dc;

    border-radius:
        0
        8px
        8px
        0;

    background: #f4f9fb;

    color: var(--text-light);
}


.article-detail-content blockquote p:last-child {
    margin-bottom: 0;
}


.article-detail-content img {
    max-width: 100%;
    height: auto;

    display: block;

    margin:
        1.4em
        auto;

    border-radius: 10px;
}


/* ===================================
   TABLES FROM RICH TEXT
=================================== */

.article-detail-content table {
    width: 100%;

    margin:
        1.4em
        0;

    border-collapse: collapse;

    font-size: 0.94rem;
}


.article-detail-content th,
.article-detail-content td {
    padding:
        9px
        11px;

    border:
        1px solid
        var(--border);

    text-align: left;
    vertical-align: top;
}


.article-detail-content th {
    background: #f3f8fb;

    color: var(--title);

    font-weight: 700;
}


/* ===================================
   RETURN
=================================== */

.article-detail-return {
    width: 100%;

    margin-top: 28px;
}


.article-detail-back {
    width: fit-content;

    display: inline-flex;
    align-items: center;

    gap: 9px;

    padding:
        9px
        15px;

    border:
        1px solid
        #d4e7ef;

    border-radius: 22px;

    background: #edf7fb;

    color: #3b82a8;

    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;

    text-decoration: none;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}


.article-detail-back:hover {
    background: #e4f2f8;

    border-color: #c2dce8;

    transform: translateY(-1px);
}


/* ===================================
   TABLET
=================================== */

@media (max-width: 900px) {

    .article-detail-hero {
        padding:
            18px
            0
            32px;
    }

    .article-detail-article {
        width: min(100%, 760px);
    }

    .article-detail-cover img {
        height:
            clamp(
                230px,
                44vw,
                350px
            );
    }

}


/* ===================================
   MOBILE
=================================== */

@media (max-width: 620px) {

    .article-detail-hero {
        padding:
            16px
            0
            27px;
    }


    .article-detail-hero::after {
        bottom: -60px;

        height: 82px;
    }


    .article-detail-breadcrumb {
        gap: 6px;

        margin-bottom: 9px;

        font-size: 0.69rem;
    }


    .article-detail-breadcrumb span[aria-current="page"] {
        max-width: 24ch;
    }


    .article-detail-hero h1 {
        margin-bottom: 5px;

        font-size: 1.82rem;
        line-height: 1.1;
    }


    .article-detail-date {
        font-size: 0.72rem;
    }


    .article-detail-shell {
        padding:
            14px
            0
            28px;
    }


    .article-detail-cover {
        margin-bottom: 18px;

        border-radius: 10px;
    }


    .article-detail-cover img {
        height:
            clamp(
                190px,
                57vw,
                290px
            );
    }


    .article-detail-content {
        font-size: 0.93rem;
        line-height: 1.66;
    }


    .article-detail-content h2 {
        margin-top: 1.45em;

        font-size: 1.4rem;
    }


    .article-detail-content h3 {
        font-size: 1.18rem;
    }


    .article-detail-content ol > li {
        padding-left: 43px;
    }


    .article-detail-content ol > li::before {
        width: 30px;
        height: 30px;
    }


    .article-detail-return {
        margin-top: 23px;
    }

}