/*
 * LeCatho Native 5.5.12.35 — correction du passage bureau/tablette/mobile.
 * La feuille historique place des articles et sidebars par grid-row / grid-column
 * explicites. Quand le parent devient monocolonne, cela crée une 2e colonne
 * implicite et déplace le contenu. Neutraliser ces placements à la source.
 */
@media (max-width:1199px) {
  /* Un seul rail pour TOUS les modèles éditoriaux. La spécificité supplémentaire
   * couvre les anciennes règles html body.single-post.lca-replace-astra. */
  html body.single-post.lca-replace-astra .lca-v209-article-page > .lca-shell.lca-v209-article-layout,
  html body.single-post.lca-replace-astra .lca-article-page > .lca-shell.lca-article-layout,
  html body.single-post .lca-v209-article-layout,
  html body:not(.wp-admin) .lca-article-page > .lca-shell.lca-article-layout,
  html body:not(.wp-admin) .lca-standard-page > .lca-shell.lca-article-layout,
  html body:not(.wp-admin) .lca-archive-page .lca-archive-layout,
  html body:not(.wp-admin) .lc2k-page .lc2k-layout,
  html body:not(.wp-admin) :is(.lc-resource-layout,.lc-route-layout,.lc-reader-layout) {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-columns:minmax(0,1fr)!important;
    gap:16px!important;
    justify-content:stretch!important;
    align-items:start!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  /* ARTICLE AVANT SIDEBAR : efface grid-column:2/grid-row:1 de lecatho.min.css. */
  html body.single-post.lca-replace-astra .lca-article-layout > article.lca-single-article,
  html body.single-post .lca-article-layout > article.lca-single-article,
  html body:not(.wp-admin) .lca-article-layout > :is(article.lca-single-article,.lca-single-page),
  html body:not(.wp-admin) .lca-archive-layout > .lca-archive-main,
  html body:not(.wp-admin) .lc2k-layout > .lc2k-main,
  html body:not(.wp-admin) :is(.lc-resource-layout,.lc-reader-layout,.lc-route-layout) > :first-child {
    grid-column:1 / -1!important;
    grid-row:auto!important;
    order:0!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    float:none!important;
  }
  html body.single-post.lca-replace-astra .lca-article-layout > aside.lca-article-sidebar,
  html body.single-post .lca-article-layout > aside.lca-article-sidebar,
  html body:not(.wp-admin) .lca-article-layout > .lca-article-sidebar,
  html body:not(.wp-admin) .lca-archive-layout > .lca-article-sidebar,
  html body:not(.wp-admin) .lc2k-layout > .lc2k-aside,
  html body:not(.wp-admin) :is(.lc-resource-layout,.lc-reader-layout,.lc-route-layout) > :is(aside,.lc-resource-sidebar,.lc-route-sidebar) {
    grid-column:1 / -1!important;
    grid-row:auto!important;
    order:1!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
    float:none!important;
    clear:none!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    max-height:none!important;
    height:auto!important;
    overflow:visible!important;
    align-self:stretch!important;
  }
  /* Les cartes latérales peuvent rester côte à côte sur tablette, mais ne
   * créent plus de colonnes implicites dans le parent. */
  html body:not(.wp-admin) :is(.lca-article-sidebar,.lca-v208-archive-sidebar,.lc2k-aside,.lc-resource-sidebar,.lc-route-sidebar) {
    box-sizing:border-box!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
  }
  html body:not(.wp-admin) :is(.lca-article-sidebar,.lca-v208-archive-sidebar,.lc2k-aside,.lc-resource-sidebar,.lc-route-sidebar) .lc-sidebar-stack {
    min-width:0!important;
    max-width:100%!important;
  }
}

/* Éviter les césures artificielles du type « ca-tholiques » quand le navigateur
 * se réduit : les titres se coupent entre les mots. */
html body:not(.wp-admin) :is(.lca-article-title,.lca-v209-article-title,.lca-archive-card h2,.lc2k-main-title,.lca-article-sidebar h3) {
  hyphens:none!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}

@media(max-width:760px) {
  html body:not(.wp-admin) :is(.lca-article-sidebar,.lca-v208-archive-sidebar,.lc2k-aside,.lc-resource-sidebar,.lc-route-sidebar) {
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    align-items:stretch!important;
  }
  html body:not(.wp-admin) :is(.lca-article-sidebar,.lca-v208-archive-sidebar,.lc2k-aside,.lc-resource-sidebar,.lc-route-sidebar) .lc-sidebar-stack {
    display:contents!important;
  }
  html body:not(.wp-admin) :is(.lca-article-sidebar,.lca-v208-archive-sidebar,.lc2k-aside,.lc-resource-sidebar,.lc-route-sidebar) > *,
  html body:not(.wp-admin) :is(.lca-article-sidebar,.lca-v208-archive-sidebar,.lc2k-aside,.lc-resource-sidebar,.lc-route-sidebar) .lca-v208-side-card {
    flex:0 0 auto!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  html body:not(.wp-admin) :is(.lca-article-page,.lca-archive-page) .lca-shell {
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
}
