/* Dans votre fichier d'exclusion */
.newspack-hero .entry-featured-image img,
.newspack-homepage-articles article:first-child .post-thumbnail img,
.newspack-homepage-articles article:first-child .post-thumbnail a img,
.wp-block-newspack-blocks-homepage-articles article:nth-child(-n+3) img,
.newspack-blocks .wp-block-image:first-of-type img {
    width: 100%;
    height: auto;
}

/* Image Hero - Format landscape (16:9) */
.hero-image, 
.attachment-newspack-article-block-landscape-medium {
    aspect-ratio: 16/9 !important;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Images articles - Format carré (1:1) */
.article-image,
.attachment-newspack-article-block-square-intermediate {
    aspect-ratio: 1/1 !important;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Correction spécifique pour les images déformées */
img[src*="600x600"] {
    aspect-ratio: 1/1 !important;
}

img[src*="800x600"], 
img[src*="600x450"] {
    aspect-ratio: 16/9 !important;
}

/* Fix immédiat pour les ratios incorrects */
img[width="1200"][height="675"] {
    aspect-ratio: var(--expected-ratio, 16/9) !important;
}

/* Images carrées forcées en carré */
.newspack-article-block-square-intermediate img {
    aspect-ratio: 1/1 !important;
}

/* Image hero forcée en paysage */
.newspack-article-block-landscape-medium img {
    aspect-ratio: 16/9 !important;
}


/* Remplacer les transitions color par des animations composées */
.url.fn.n,
a[href*="/author/"] {
    /* SUPPRIMER */
    /* transition: color 0.3s ease; */
    
    /* REMPLACER PAR */
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
}

.url.fn.n:hover,
a[href*="/author/"]:hover {
    /* Au lieu de changer la couleur en transition */
    /* color: #new-color; */
    
    /* Utiliser des effets composés */
    transform: translateY(-1px);
    opacity: 0.8;
}

/* Réserver l'espace pour éviter les décalages */
#content.site-content {
    min-height: 100vh; /* Hauteur minimale */
    contain: layout; /* Isolation du layout */
}

.entry-wrapper {
    min-height: 400px; /* Hauteur estimée du contenu */
    display: flex;
    flex-direction: column;
}

/* Préloader pour le contenu dynamique */
.entry-wrapper::before {
    content: "";
    display: block;
    height: 200px; /* Espace réservé */
    background: transparent;
}

.entry-wrapper.loaded::before {
    display: none;
}

    /* Stabiliser la structure principale */
.site-content {
        display: grid;
        grid-template-rows: auto 1fr auto;
        min-height: 100vh;
    }
    
    /* Éviter les reflows sur les métadonnées d'auteur */
.entry-meta,
.author-bio {
        contain: layout style;
        height: auto;
        min-height: 2em; /* Réserver l'espace minimum */
    }
    
    /* Stabiliser les liens d'auteur */
.author-link,
.url.fn.n {
        display: inline-block;
        line-height: 1.5;
        contain: layout;
    }
/* Stabiliser le container principal */
#content.site-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    contain: layout; /* Éviter les reflows */
}

/* Réserver l'espace pour l'image hero avant chargement */
.article-image[data-hero-candidate="1"] {
    min-height: 400px; /* Espace réservé */
    background: #f0f0f0; /* Placeholder visible */
    display: block;
    aspect-ratio: 16/9;
}

/* Container hero avec espace réservé */
.hero-container {
    width: 100%;
    height: 400px; /* Hauteur fixe */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.hero-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}