/* ============================================================
   SAPERE — CSS PERSONNALISÉ GLOBAL
   Astra + Elementor Pro + Jetpack
   Version consolidée et corrigée
   ============================================================ */


/* ============================================================
   1. RESET
   ============================================================ */

h1::before,
h1::after,
h2::before,
h2::after,
h3::before,
h3::after {
    content: none !important;
    display: none !important;
}


/* ============================================================
   2. BASE TYPOGRAPHIQUE
   ============================================================ */

html,
body {
    font-family: 'Inter', sans-serif !important;
    font-size: 20px;
    color: #1f2937;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}


/* Force Inter dans Elementor */

.elementor *,
.elementor-widget-heading *,
.elementor-widget-text-editor * {
    font-family: 'Inter', sans-serif !important;
}


/* ============================================================
   3. TEXTE COURANT
   ============================================================ */

p,
.elementor-widget-text-editor,
.elementor-widget-text-editor p,
li {
    font-size: 20px;
    line-height: 1.7;
    margin-bottom: 16px;
}


/* ============================================================
   4. TITRES
   ============================================================ */

h1.entry-title,
.elementor-widget-heading h1.elementor-heading-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
}

h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 40px;
}

h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}


/* Pas de majuscules forcées */

h1,
h1.entry-title,
.entry-title,
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title,
.elementor h1,
.elementor-post__title {
    text-transform: none !important;
}


/* ============================================================
   5. MÉTADONNÉES
   ============================================================ */

.entry-meta {
    font-size: 16px;
    color: #6b7280;
}


/* ============================================================
   6. TABLEAUX ET TIMELINES
   ============================================================ */

td,
th,
.timeline-content {
    font-size: 20px;
}


/* ============================================================
/* ============================================================
   7. ARCHIVES / CATÉGORIES ASTRA
   SAPERE — VIGNETTE HOMOGÈNE SANS ROGNAGE
   ============================================================ */

/*
 * Objectif :
 * - vraie colonne image à gauche
 * - zone visuelle homogène de 220 × 220 px
 * - image toujours visible intégralement
 * - aucune déformation
 * - aucun zoom
 */


/* ------------------------------------------------------------
   CONTENEUR DE L'ARTICLE
   ------------------------------------------------------------ */

body.category .ast-article-post,
body.archive .ast-article-post {
    overflow: visible !important;
}


/* ------------------------------------------------------------
   ZONE IMAGE ASTRA
   ------------------------------------------------------------ */

body.category .ast-blog-featured-section,
body.category .post-thumb,
body.category .post-thumb-img-content,
body.archive .ast-blog-featured-section,
body.archive .post-thumb,
body.archive .post-thumb-img-content {

    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;

    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;

    aspect-ratio: 1 / 1 !important;

    margin: 0 !important;
    padding: 0 !important;

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

    overflow: hidden !important;

    background: #ffffff !important;

    box-sizing: border-box !important;
}


/* ------------------------------------------------------------
   LIEN AUTOUR DE L'IMAGE
   ------------------------------------------------------------ */

body.category .post-thumb a,
body.category .post-thumb-img-content a,
body.archive .post-thumb a,
body.archive .post-thumb-img-content a {

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;

    background: #ffffff !important;
}


/* ------------------------------------------------------------
   IMAGE ELLE-MÊME
   ------------------------------------------------------------ */

body.category .ast-blog-featured-section img,
body.category .post-thumb img,
body.category .post-thumb-img-content img,
body.archive .ast-blog-featured-section img,
body.archive .post-thumb img,
body.archive .post-thumb-img-content img {

    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    aspect-ratio: auto !important;

    object-fit: contain !important;
    object-position: center center !important;

    background: #ffffff !important;

    transform: none !important;
    scale: none !important;
    clip-path: none !important;

    box-sizing: border-box !important;
}


/* ------------------------------------------------------------
   ASTRA BLOG LAYOUT 5
   ------------------------------------------------------------ */

body.category
.ast-blog-layout-5-grid
.ast-blog-featured-section,

body.category
.ast-blog-layout-5-grid
.post-thumb,

body.category
.ast-blog-layout-5-grid
.post-thumb-img-content,

body.archive
.ast-blog-layout-5-grid
.ast-blog-featured-section,

body.archive
.ast-blog-layout-5-grid
.post-thumb,

body.archive
.ast-blog-layout-5-grid
.post-thumb-img-content {

    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;

    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;

    aspect-ratio: 1 / 1 !important;

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

    overflow: hidden !important;

    background: #ffffff !important;
}


/* ------------------------------------------------------------
   SUPPRESSION DU ZOOM / RECADRAGE AU SURVOL
   ------------------------------------------------------------ */

body.category .ast-article-post:hover img,
body.archive .ast-article-post:hover img,
body.category .post-thumb:hover img,
body.archive .post-thumb:hover img,
body.category .post-thumb-img-content:hover img,
body.archive .post-thumb-img-content:hover img {

    transform: none !important;
    scale: none !important;
}


/* ============================================================
   TABLETTE
   ============================================================ */

@media (max-width: 921px) {

    body.category .ast-blog-featured-section,
    body.category .post-thumb,
    body.category .post-thumb-img-content,
    body.archive .ast-blog-featured-section,
    body.archive .post-thumb,
    body.archive .post-thumb-img-content {

        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;

        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
}


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

@media (max-width: 640px) {

    body.category .ast-blog-featured-section,
    body.category .post-thumb,
    body.category .post-thumb-img-content,
    body.archive .ast-blog-featured-section,
    body.archive .post-thumb,
    body.archive .post-thumb-img-content {

        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;

        height: 130px !important;
        min-height: 130px !important;
        max-height: 130px !important;
    }
}============================================================
   8. ARTICLES SIMILAIRES JETPACK — BLOC GÉNÉRAL
   ============================================================ */

.single-post #jp-relatedposts {
    width: calc(100% - 48px);
    max-width: 1120px;

    margin: 48px auto 40px !important;
    padding: 28px 0 0 !important;

    border-top: 1px solid #d8dde3;

    box-sizing: border-box;
}


/* ============================================================
   9. TITRE "SIMILAIRE"
   ============================================================ */

.single-post
#jp-relatedposts
h3.jp-relatedposts-headline {
    display: block !important;
    float: none !important;

    width: 100% !important;

    margin: 0 0 24px !important;

    font-family: 'Inter', sans-serif !important;
    font-size: 20px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;

    color: #1f2937 !important;
}


.single-post
#jp-relatedposts
h3.jp-relatedposts-headline em {
    font-style: normal !important;
    font-weight: 700 !important;
}


.single-post
#jp-relatedposts
h3.jp-relatedposts-headline em::before {
    width: 48px !important;
    min-width: 48px !important;

    margin-bottom: 12px !important;

    border-color: #d8dde3 !important;
}


/* ============================================================
   10. GRILLE DES ARTICLES SIMILAIRES
   ============================================================ */

.single-post
#jp-relatedposts
.jp-relatedposts-items {
    display: grid !important;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 28px !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;
}


.single-post
#jp-relatedposts
.jp-relatedposts-items-visual {
    margin-right: 0 !important;
}


/* ============================================================
   11. CARTE ARTICLE SIMILAIRE
   ============================================================ */

.single-post
#jp-relatedposts
.jp-relatedposts-items
.jp-relatedposts-post {
    float: none !important;
    clear: none !important;

    display: block !important;

    width: auto !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    opacity: 1 !important;

    overflow: visible !important;
}


/* ============================================================
   12. VIGNETTES JETPACK
   CADRE CARRÉ + IMAGE INTÉGRALE
   ============================================================ */

/*
 * Cette partie est volontairement distincte des archives Astra.
 * Jetpack utilise ici un cadre carré.
 */

.single-post
#jp-relatedposts
.jp-relatedposts-post
> a.jp-relatedposts-post-a {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: auto !important;

    aspect-ratio: 1 / 1 !important;

    margin: 0 0 14px !important;
    padding: 0 !important;

    overflow: hidden !important;

    background-color: #ffffff !important;

    box-sizing: border-box !important;
}


/* Image réelle Jetpack */

.single-post
#jp-relatedposts
.jp-relatedposts-post
> a.jp-relatedposts-post-a
img.jp-relatedposts-post-img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    aspect-ratio: auto !important;

    object-fit: contain !important;
    object-position: center center !important;

    background-color: #ffffff !important;

    transform: none !important;
    clip-path: none !important;

    box-sizing: border-box !important;
}


/* Neutralise zoom Jetpack */

.single-post
#jp-relatedposts
.jp-relatedposts-post:hover
img.jp-relatedposts-post-img {
    transform: none !important;
}


/* ============================================================
   13. TITRES DES ARTICLES SIMILAIRES
   ============================================================ */

.single-post
#jp-relatedposts
h4.jp-relatedposts-post-title {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 0 6px !important;

    font-family: 'Inter', sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;

    text-transform: none !important;

    overflow-wrap: anywhere !important;
}


.single-post
#jp-relatedposts
h4.jp-relatedposts-post-title a {
    color: #374151 !important;

    font-size: inherit !important;
    font-weight: 600 !important;

    text-decoration: none !important;
}


.single-post
#jp-relatedposts
h4.jp-relatedposts-post-title a:hover {
    color: #8b1a1a !important;

    text-decoration: none !important;
}


/* ============================================================
   14. DATE DES ARTICLES SIMILAIRES
   ============================================================ */

.single-post
#jp-relatedposts
.jp-relatedposts-post-date {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;

    font-size: 14px !important;
    line-height: 1.4 !important;

    color: #8a8f98 !important;
}


/* Masque les extraits Jetpack */

.single-post
#jp-relatedposts
.jp-relatedposts-post-excerpt {
    display: none !important;
}


/* ============================================================
   15. NAVIGATION ARTICLE — PRÉCÉDENT / SUIVANT
   ============================================================ */

.single-post .post-navigation {
    width: calc(100% - 48px);
    max-width: 1120px;

    margin: 36px auto 28px !important;
    padding: 28px 0 20px !important;

    box-sizing: border-box;
}


/* Deux colonnes */

.single-post
.post-navigation
.nav-links {
    display: grid !important;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 56px;

    width: 100%;
}


.single-post
.post-navigation
.nav-previous,
.single-post
.post-navigation
.nav-next {
    width: 100%;
    min-width: 0;
}


/* Liens */

.single-post
.post-navigation
a {
    display: block;

    width: 100% !important;
    max-width: 100% !important;

    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
}


/* Libellés précédent / suivant */

.single-post
.post-navigation
a
.ast-post-nav {
    font-family: 'Inter', sans-serif !important;

    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;

    letter-spacing: 0.08em !important;
}


/* Titres précédent / suivant */

.single-post
.post-navigation
a p {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 8px 0 0 !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;

    white-space: normal !important;

    overflow: visible !important;
    text-overflow: clip !important;

    overflow-wrap: anywhere !important;
    word-break: normal !important;

    text-transform: none !important;
}


/* ============================================================
   16. ENCART ABONNEMENT SAPERE
   ============================================================ */

.single-post
.entry-content
> .wp-block-group:has(.wp-block-jetpack-subscriptions) {
    width: calc(100% - 48px);
    max-width: 760px !important;

    margin: 38px auto 42px !important;
    padding: 0 !important;

    text-align: center !important;

    box-sizing: border-box;
}


/* Trait supérieur */

.single-post
.entry-content
> .wp-block-group:has(.wp-block-jetpack-subscriptions)
> .wp-block-separator {
    width: 100%;

    margin: 0 auto 24px !important;

    border-color: #d8dde3;
}


/* Titre abonnement */

.single-post
.entry-content
> .wp-block-group:has(.wp-block-jetpack-subscriptions)
> h3.wp-block-heading {
    margin: 0 auto 8px !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;

    text-align: center !important;
    text-transform: none !important;
}


/* Texte explicatif */

.single-post
.entry-content
> .wp-block-group:has(.wp-block-jetpack-subscriptions)
> p.has-text-align-center {
    max-width: 620px;

    margin: 0 auto 18px !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;

    text-align: center !important;
}


/* Formulaire */

.single-post
.entry-content
.wp-block-jetpack-subscriptions {
    width: 100%;
    max-width: 620px;

    margin: 0 auto !important;
}


.single-post
.entry-content
.wp-block-jetpack-subscriptions__form-elements {
    display: grid !important;

    grid-template-columns: minmax(0, 1fr) auto;

    gap: 12px;

    align-items: stretch;

    width: 100%;
}


/* Supprime les marges parasites */

.single-post
.entry-content
.wp-block-jetpack-subscriptions__form-elements p {
    width: auto !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* Champ e-mail */

.single-post
.entry-content
.wp-block-jetpack-subscriptions
input[type="email"] {
    width: 100% !important;
    height: 48px !important;

    padding: 10px 16px !important;

    border: 1px solid #d8dde3 !important;
    border-radius: 0 !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 15px !important;
    line-height: 1.2 !important;

    box-shadow: none !important;
}


/* Bouton abonnement */

.single-post
.entry-content
.wp-block-jetpack-subscriptions
button[type="submit"] {
    width: auto !important;
    min-width: 150px;

    height: 48px !important;

    margin: 0 !important;
    padding: 0 22px !important;

    border-radius: 0 !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1 !important;

    white-space: nowrap;
}


/* ============================================================
   17. MENU D'EN-TÊTE ASTRA
   ============================================================ */

/* Neutralise les marges héritées des listes */

.site-header li,
.ast-desktop-header li,
.ast-mobile-header-wrap li {
    margin-bottom: 0 !important;
}


/* Liens principaux */

.site-header
.main-header-menu
.menu-item
> .menu-link,
.site-header
.ast-builder-menu
.menu-item
> .menu