/* Prototype local partageable entre les deux thèmes ; aucun style global. */
:is(.entry-content,.post-entry,.editor-styles-wrapper) .wp-block-group.mbp-photo-credits {
  --credits-bg:#f4f6f3; --credits-border:#dce3dd; --credits-title:#263f33; --credits-text:#526057;
  display:block!important; box-sizing:border-box; clear:both; width:100%; max-width:100%;
  margin:32px 0 24px!important; padding:22px 24px!important;
  background:var(--credits-bg)!important; border:1px solid var(--credits-border)!important;
  border-radius:10px; box-shadow:none; text-align:left;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-photo-credits p {
  font-family:inherit!important; text-align:left!important; letter-spacing:normal!important;
  text-transform:none!important; white-space:normal; overflow-wrap:break-word; word-break:normal;
  padding:0!important; max-width:none!important;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-photo-credits .mbp-photo-credits__byline {
  margin:0 0 8px!important; font-size:15px!important; line-height:1.5!important; color:var(--credits-title)!important;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-photo-credits .mbp-photo-credits__rights {
  margin:0!important; font-size:14px!important; line-height:1.65!important; color:var(--credits-text)!important;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-photo-credits a {color:inherit!important;text-decoration:underline;text-underline-offset:3px}
html[data-theme="dark"] :is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-photo-credits,
body:is(.penci-dark-mode,.dark-mode,.pcdark-mode,.pcdm-enable) :is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-photo-credits {
  --credits-bg:#202c26; --credits-border:#3e5044; --credits-title:#eef4ef; --credits-text:#c6d2c9;
}
@media(max-width:480px){:is(.entry-content,.post-entry,.editor-styles-wrapper) .wp-block-group.mbp-photo-credits{padding:18px!important;margin-top:24px!important}}

/* Navigation éditoriale reconnue : listes natives, sans photo décorative. */
:is(.entry-content,.post-entry,.editor-styles-wrapper) .wp-block-group.mbp-related-links {
 display:block!important; clear:both; max-width:100%; box-sizing:border-box;
 margin:28px 0!important; padding:20px 0 0!important; border-top:1px solid #dce3dd;
 background:none; text-align:left;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-related-links .mbp-related-links__title {
 margin:0 0 12px!important; padding:0!important; text-align:left!important;
 font-family:inherit; font-weight:600; line-height:1.55;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-related-links ul {
 margin:0!important; padding:0 0 0 1.3em!important; text-align:left; list-style:disc outside;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-related-links li {
 margin:0 0 .55em!important; padding:0!important; line-height:1.6;
 overflow-wrap:anywhere; text-align:left!important;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-related-links li:last-child {margin-bottom:0!important}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-migrated-gallery img,
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-migrated-image img {
 height:auto!important; max-width:100%; object-fit:contain;
}
html[data-theme="dark"] :is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-related-links,
body:is(.penci-dark-mode,.dark-mode,.pcdark-mode,.pcdm-enable) :is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-related-links {border-color:#3e5044}

:is(.entry-content,.post-entry,.editor-styles-wrapper) .wp-block-separator + .wp-block-group.mbp-related-links {border-top:0;padding-top:0!important}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-photo-credits__byline {font-weight:600}

/* Explicit class preserves legacy justified alignment across themes and editor. */
:is(.entry-content,.post-entry,.editor-styles-wrapper) .has-text-align-justify {text-align:justify}

/* Small archival raster: full mobile width, centered and capped at twice its 248 px source. */
:is(.entry-content,.post-entry,.editor-styles-wrapper) figure.wp-block-image.mbp-migrated-small-image {
 display:block!important; float:none!important; clear:both; width:100%!important; max-width:496px!important; margin-left:auto!important; margin-right:auto!important;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) figure.wp-block-image.mbp-migrated-small-image > a {display:block;width:100%}
:is(.entry-content,.post-entry,.editor-styles-wrapper) figure.wp-block-image.mbp-migrated-small-image img {display:block;width:100%!important;height:auto!important;max-width:100%;object-fit:contain}

/* Pair of archival visuals: image source 248 px, logo reduced to the same column. */
:is(.entry-content,.post-entry,.editor-styles-wrapper) .wp-block-group.mbp-migrated-compact-media {
 position:relative; display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:16px!important; align-items:center;
 width:100%!important; max-width:512px!important; margin:28px auto!important; padding:0!important;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-migrated-compact-media > figure.wp-block-image {
 float:none!important; width:100%!important; max-width:248px!important; min-width:0; margin:0!important; padding:0!important;
}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-migrated-compact-media > span[id^="more-"] {position:absolute;width:0;height:0}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-migrated-compact-media figure > a {display:block;width:100%}
:is(.entry-content,.post-entry,.editor-styles-wrapper) .mbp-migrated-compact-media img {display:block;width:100%!important;height:auto!important;max-width:100%;object-fit:contain}
/* Keep the compact pair below the theme's normal 720 px prose-group width. */
body.mbp-wide-galleries .mbp-single-article .mbp-entry-content > .wp-block-group.mbp-migrated-compact-media {max-width:512px!important}

/* Fixed-size legacy players: keep their original ratio inside narrow article columns. */
:is(.entry-content,.post-entry) iframe.mbp-legacy-video {
 display:block; width:100%!important; max-width:100%!important; height:auto!important;
 aspect-ratio:var(--mbp-legacy-video-ratio);
}

/* Gutenberg shows the excerpt marker as a real grid item. Keep both images
   together, with the selectable marker on its own editor-only row.
   Stored block order and the public excerpt boundary remain unchanged. */
.editor-styles-wrapper .mbp-migrated-compact-media > [data-type="core/more"] {
 grid-column:1 / -1!important; grid-row:2!important; width:100%;
}

/* Side images of migrated classic articles: floated as before on wide screens, stacked and centered below 768 px
   (Soledad already does this for its legacy linked images). Image blocks: block-theme figure and classic-theme wrapper;
   inline legacy images carry the explicit class mbp-migrated-side-image (map pins and icons of 60 px or less excluded). */
@media (max-width:767px){
 :is(.entry-content,.post-entry) figure.wp-block-image.mbp-migrated-image:is(.alignleft,.alignright),
 :is(.entry-content,.post-entry) .wp-block-image.mbp-migrated-image > figure:is(.alignleft,.alignright) {
  float:none!important; display:table; clear:both; max-width:100%; margin:0 auto 24px!important;
 }
 :is(.entry-content,.post-entry) img.mbp-migrated-side-image {
  float:none!important; display:block; clear:both; max-width:100%; height:auto; margin:0 auto 24px!important;
 }
}
