.post__list{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: clamp(1.125rem, 2vw, 1.75rem);
    margin-bottom: 1rem;
    > .post__item:first-child{
        grid-column: span 2;
        border-radius: 20px;
        box-shadow: 0 8px 36px rgba(17, 24, 39, 0.08);
        border-color: rgba(17, 24, 39, 0.1);

        .blog-lead{
            margin-top: 0;
        }

        @media (min-width: 993px){
            flex-direction: row;
            align-items: stretch;
            min-height: 280px;

            .post__visual{
                flex: 0 0 50%;
                max-width: 50%;
                aspect-ratio: auto;
                min-height: 260px;
                align-self: stretch;

                a{
                    height: 100%;
                    min-height: 100%;
                }
                img{
                    min-height: 100%;
                }
            }

            .post__content{
                flex: 1;
                min-width: 0;
                padding: 2rem 2.25rem 2.25rem;
                justify-content: center;
            }

            .blog-date{
                font-size: 0.875rem;
                margin-bottom: 0.625rem;
            }

            h3{
                font-size: clamp(1.35rem, 1.5vw + 1rem, 1.85rem);
                line-height: 1.22;
                margin-bottom: 1rem;
            }

            .post__content p{
                font-size: 1rem;
                line-height: 1.55;
                color: #374151;
            }

            .blog-lead a[href]{
                font-size: 1rem;
            }
        }

        &:hover{
            box-shadow: 0 22px 48px rgba(17, 24, 39, 0.14);
        }
    }
}
.post__item{
    --post-card-radius: 20px;
    --post-card-ease: cubic-bezier(0.22, 1, 0.36, 1);

    background: #fff;
    border-radius: var(--post-card-radius);
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow:
    0 1px 2px rgba(17, 24, 39, 0.04),
    0 12px 32px rgba(17, 24, 39, 0.07);
    transition:
    transform 0.38s var(--post-card-ease),
    box-shadow 0.38s var(--post-card-ease),
    border-color 0.28s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;

    .post__visual{
        position: relative;
        overflow: hidden;
        aspect-ratio: 16 / 10;
        background: linear-gradient(145deg, #f0f1f6 0%, #e8eaef 100%);
        isolation: isolate;

        a{
            display: block;
            height: 100%;
            &:focus-visible{
                outline: none;
            }
            &:focus-visible img{
                outline: 2px solid var(--bs-primary);
                outline-offset: -2px;
            }
        }
        img{
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.55s var(--post-card-ease);
        }
    }

    .post__content{
        padding: 1.625rem 1.75rem 1.875rem;
        display: flex;
        flex-direction: column;
        flex: 1;
        p{
            line-height: 1.58;
            color: #4b5563;
            font-size: 0.9375rem;
            margin: 0 0 0.875rem;
            &:last-child{
                margin-bottom: 0;
            }
        }
        a{
            text-decoration: none;
            color: inherit;
        }
    }

    .blog-date{
        display: inline-flex;
        align-self: flex-start;
        font-size: 0.8125rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        color: rgba(var(--bs-primary-rgb), 0.92);
        background: rgba(var(--bs-primary-rgb), 0.09);
        padding: 0.35rem 0.65rem;
        border-radius: 999px;
        margin-bottom: 0.65rem;
        font-variant-numeric: tabular-nums;
    }

    h3{
        font-family: var(--police-title);
        font-weight: 700;
        font-size: 1.2rem;
        line-height: 1.28;
        margin: 0 0 0.75rem;
        letter-spacing: -0.02em;
        a{
            text-decoration: none;
            color: #111827;
            transition: color 0.22s ease;
            display: block;
            border-radius: 6px;
            &:focus-visible{
                outline: 2px solid var(--bs-primary);
                outline-offset: 3px;
            }
        }
    }

    .blog-lead{
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        a[href]{
            font-weight: 600;
            font-size: 0.8125rem;
            color: var(--bs-primary);
            align-self: flex-start;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 1rem;
            border-radius: 999px;
            background: rgba(var(--bs-primary-rgb), 0.1);
            transition:
            gap 0.3s var(--post-card-ease),
            color 0.22s ease,
            background 0.22s ease,
            box-shadow 0.22s ease;
            &:focus-visible{
                outline: 2px solid var(--bs-primary);
                outline-offset: 2px;
            }
        }
        a[href]:hover{
            color: #fff;
            background: var(--bs-primary);
            gap: 0.55rem;
            box-shadow: 0 6px 18px rgba(var(--bs-primary-rgb), 0.35);
        }
    }

    &:hover{
        transform: translateY(-5px);
        box-shadow:
        0 2px 4px rgba(17, 24, 39, 0.04),
        0 24px 48px rgba(17, 24, 39, 0.11);
        border-color: rgba(var(--bs-primary-rgb), 0.18);
        .post__visual img{
            transform: scale(1.035);
        }
        h3 a{
            color: var(--bs-primary);
        }
    }
}
.intro__blog-visual{
    @media (max-width: 786px) {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce){
    .post__item{
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
        &:hover{
            transform: none;
        }
        .post__visual img{
            transition: opacity 0.2s ease;
        }
        &:hover .post__visual img{
            transform: none;
        }
        .blog-lead a[href]{
            transition: color 0.2s ease, background 0.2s ease;
        }
    }
}


.app__stories{
    .pagination{
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 30px;
        margin-bottom: 3rem;
        a{
            text-decoration: none;
            color: var(--bs-primary);
            font-weight: 700;
            font-size: 18px;
        }
    }

    /* H2 "structurants" (listing / sections) */
    .blog-list header h2,
    h2.blog__h2{
        font-weight: 900;
        font-size: clamp(1.6rem, 1.2vw + 1.2rem, 2.6rem);
        line-height: 1.15;
        color: #111827;
        margin: 0 0 1.75rem;
        padding-bottom: .65rem;
        position: relative;
        display: inline-block;

        &::after{
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 88px;
            height: 5px;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
            opacity: .95;
        }
    }
    .post-detail-list-title{
        font-family: var(--police-title);
        font-weight: 900;
        font-size: clamp(1.4rem, 1vw + 1.1rem, 2.1rem);
        line-height: 1.2;
        color: #111827;
        margin: 3rem 0 1.25rem;
        padding-bottom: .6rem;
        position: relative;
        display: inline-block;

        &::after{
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 72px;
            height: 4px;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
            opacity: .95;
        }
    }
}

.story__detail__header{
    padding: 10rem 0;
    text-align: center;
    position: relative;
    h1{
        font-size: 4rem;
        font-weight: 700;
        margin-bottom: 2rem;
    }
    .breadcrumb{
        justify-content: center;
    }
    &::before{
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 80vw;
        height: 80%;
        background-color: #f4f5f8;
        z-index: -1;

    }
}

.story__aside{
    /* Un aside "card" plus moderne, sans impacter les cartes du listing principal */
    @media (min-width: 992px){
        position: sticky;
        top: 2rem;
        align-self: start;
    }

    h2{
        font-size: 1.05rem !important;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        margin-bottom: 1rem;
        padding-bottom: .75rem;
        position: relative;
        color: #111827;
    }
    h2::after{
        position: absolute;
        left: 0;
        bottom: 0;
        content: "";
        height: 3px;
        width: 56px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
        opacity: .95;
    }

    .plugin-blog{
        background: #fff;
        border: 1px solid rgba(17, 24, 39, 0.08);
        box-shadow: 0 14px 40px rgba(17, 24, 39, 0.08);
        padding: 1.25rem;
        border-radius: 16px;
        margin-bottom: 1.75rem;

        .blog-latest-entries{
            display: flex;
            flex-direction: column;
            gap: .25rem;
        }

        .blog-empty{
            p{
                font-size: 14px;
                margin: 0;
            }
        }

        .post__item{
            grid-template-columns: 1fr;
            gap: .5rem;
            align-items: start;
            padding: .75rem;
            border-radius: 12px;
            transform: none;
            background: transparent;
            transition: background-color .2s ease, transform .2s ease;
            box-shadow: none;
            border: none;
            &:not(:last-child){
                border-bottom: none;
            }

            &:hover{
                transform: translateY(-2px);
                background: rgba(17, 24, 39, 0.04);
            }

            .post__content{
                padding: 0;
                p{
                    line-height: 1.3;
                }
            }

            .blog-date{
                font-size: .875rem;
                color: #6b7280;
                margin-bottom: .25rem;
                i{
                    color: var(--bs-primary);
                }
            }

            h3{
                font-size: 1rem;
                line-height: 1.3;
                margin: 0;
                a{
                    color: #111827;
                }
            }

            .blog-lead{
                display: none;
            }
        }

        ul.blog-categories,
        ul.blog-tags{
            list-style: none;
            padding: 0;
            margin: 0;
        }

        /* Catégories : liste "clickable" avec hover */
        ul.blog-categories{
            display: flex;
            flex-direction: column;
            gap: .25rem;
            a{
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 10px;
                text-decoration: none;
                color: #111827;
                font-weight: 600;
                font-size: 1rem;
                padding: .65rem .75rem;
                border-radius: 12px;
                border: 1px solid rgba(17, 24, 39, 0.06);
                background: rgba(17, 24, 39, 0.02);
                transition: background-color .2s ease, border-color .2s ease, transform .2s ease;

                &:hover{
                    background: rgba(var(--bs-primary-rgb), 0.06);
                    border-color: rgba(var(--bs-primary-rgb), 0.18);
                    transform: translateY(-1px);
                    color: var(--bs-primary);
                }
                span{
                    font-size: 85%;
                    font-weight: 600;
                    opacity: .7;
                }
            }
        }

        /* Tags : "chips" */
        ul.blog-tags{
            display: flex;
            flex-wrap: wrap;
            gap: .5rem;
            li{
                margin: 0;
                padding: 0;
            }
            a{
                display: inline-flex;
                align-items: center;
                gap: .4rem;
                text-decoration: none;
                color: #111827;
                font-weight: 700;
                font-size: .9rem;
                padding: .45rem .7rem;
                border-radius: 999px;
                background: rgba(var(--bs-primary-rgb), 0.08);
                border: 1px solid rgba(var(--bs-primary-rgb), 0.14);
                transition: background-color .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;

                &:hover{
                    background: rgba(var(--bs-primary-rgb), 0.14);
                    border-color: rgba(var(--bs-primary-rgb), 0.22);
                    transform: translateY(-1px);
                    color: var(--bs-primary);
                }
                span{
                    font-size: 85%;
                    font-weight: 600;
                    opacity: .65;
                }
            }
        }
    }
}

.story__detail{
    display: grid;
    grid-template-columns: 70% 1fr;
    gap: 30px;
    h2, h3{
        font-weight: 700;
    }
    h2{
        font-size: 2rem;
        font-family: var(--police-title);
        font-weight: 700;
    }
    h3{
        font-size: 1.56rem;
    }
    h4{
        font-size: 1.2rem;
        font-weight: 700;
    }
    h5{
        font-size: 1.1rem;
        font-weight: 700;
    }
    h6{
        font-size: 1.2rem;
        font-weight: 700;
    }
}

.post__detail{
    .blog-visual{
        margin-bottom: 3rem;
        img{
            border-radius: 6px;
            width: 100%;
            height: 100%;
            object-fit: cover;
            aspect-ratio: 16 / 9;
        }
    }
}

.post__detail{
    /* Titres dans le contenu (texte CMS) */
    .blog-content{
        h2{
            font-family: var(--police-title);
            font-weight: 800;
            font-size: clamp(1.35rem, 1.1vw + 1.1rem, 2rem);
            line-height: 1.25;
            color: #111827;
            margin: 2.25rem 0 1rem;
            padding: 0 0 .6rem;
            position: relative;
            scroll-margin-top: 110px;
        }
        img{
            max-width: 100%;
        }

        /* Premier H2 moins “lourd” en haut de contenu */
        h2:first-child{
            margin-top: 0;
        }
        p, ul, ol{
            font-size: 1.1rem;
            line-height: 1.5;
            color: #333;
            margin-bottom: 1rem;
        }
        p{
            padding: 0 0 .6rem;
        }
    }
}

.blog-meta{
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    i{
        color: var(--bs-primary);
    }
}
.post__detail{
    .blog-tags-title  {
        font-weight: 700;
        font-size: 18px;
        color: var(--bs-primary);
        display: inline-block;
        margin-right: 10px;
    }
    .blog-tags{
        margin-bottom: 2rem;
        margin-top: 2rem;
        a{
            display: inline-block;
            background: #f4f4f4;
            padding: 7px 23px;
            margin-right: 5px;
            margin-top: 8px;
            font-weight: 700;
            border-radius: 5px;
            text-transform: capitalize;
            font-size: 80%;
            color: inherit;
            text-decoration: none;
            &:hover{
                background: var(--bs-primary);
                color: #fff;
            }
        }
    }
}

.post-detail-list{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 3rem;
    margin-top: 1rem;
    .post__item{
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: center;
        transition: all 0.3s ease;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 2rem;
        &:hover{
            transform: translateY(0px);
        }
    }
}

/* -----------------------------
   Responsive (blog)
------------------------------*/



@media (max-width: 992px){
    .post__list{
        grid-template-columns: 1fr;
        gap: 28px;

        > .post__item:first-child{
            grid-column: auto;
        }
    }
    .story__detail{
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .post-detail-list{
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .story__detail__header{
        padding: 6rem 0 4.5rem;
        margin-bottom: 2rem;
        h1{
            font-size: 2.75rem;
        }
        &::before{
            width: 100%;
            height: 100%;
        }
    }
}

@media (max-width: 768px){
    .story__detail__header{
        padding: 4.5rem 0 3.5rem;
        h1{
            font-size: 2.1rem;
            margin-bottom: 1.25rem;
        }
    }

    .post__list .post__item{
        grid-template-columns: 1fr;
        gap: 0;
        &:hover{
            transform: translateY(-4px);
        }
        .post__content{
            padding: 1rem 1.25rem 1.25rem;
            p{
                line-height: 1.45;
            }
        }
        h3{
            font-size: 1.125rem;
        }
    }

    .post__list .post__visual{
        aspect-ratio: auto;
        height: 220px;
        img{
            height: 100%;
        }
    }

    .app__stories{
        .pagination{
            gap: 18px;
            a{
                font-size: 16px;
            }
        }
    }
}

@media (max-width: 576px){
    .post__list{
        gap: 22px;
    }

    .story__detail{
        gap: 28px;
    }

    .story__aside{
        h2{
            font-size: 1rem !important;
        }
        .plugin-blog{
            padding: 1rem;
            border-radius: 14px;
            .post__item{
                padding: .6rem;
            }
        }
    }

    .post-detail-list{
        gap: 18px;
        .post__item{
            padding: 1.25rem;
        }
    }
}
