/* Expert+ tidy layer: optional (plugin setting "Tidy layout"), loaded after the site's own eplus.css and config.css.
   It fixes spacing and legibility only; colours and fonts stay the site's. --eplus-accent comes from the plugin. */
#eplus-container, .module-eplus { --eplus-gap: 24px; }

/* Columns keep the site's own layout (some sites show one column, some two); they stack on phones */
#eplus-container .colgauche, #eplus-container .coldroite { box-sizing: border-box; }
/* below desktop the two columns get too narrow (220-350px): stack them */
@media (max-width: 991.98px) {
  #eplus-container .colgauche, #eplus-container .coldroite { float: none; width: 100%; margin-right: 0; }
}
@media (max-width: 767.98px) {
  #eplus-container .article-teaser img, #eplus-container .artY > img { float: none; display: block; width: 100%; max-width: 100%; height: auto; margin: 0 0 12px; }
}

/* Teasers: the floated image stays inside its card, even spacing between cards */
#eplus-container .article-teaser, .module-eplus .article-teaser { display: flow-root; padding-bottom: 16px; margin-bottom: 16px; }
#eplus-container .article-teaser h3, .module-eplus .article-teaser h3 { line-height: 1.3; margin: 0 0 8px; }
#eplus-container .article-teaser p, .module-eplus .article-teaser p { margin: 0 0 10px; line-height: 1.5; }
#eplus-container .article-teaser img { border-radius: 4px; }

/* Date / category / read-more line: no stray bullets, one line with gaps */
#eplus-container ul.article-links, .module-eplus ul.article-links { list-style: none; padding-left: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
/* !important: some site stylesheets force bullets with !important */
#eplus-container ul.article-links li, .module-eplus ul.article-links li { list-style: none !important; margin: 0; }
#eplus-container ul.article-links li:empty { display: none; }
/* The share links sidebar (.eplus-social) keeps the site's own layout: most sites place it as an absolute vertical
   bar beside the article, which a flex row would lay across the title. */
#eplus-container div.eplus-social ul.article-links { display: block; }

/* "Lire la suite" and "Voir tous" readable on any background */
#eplus-container .article-teaser ul.article-links li:last-child a, .module-eplus .article-teaser ul.article-links li:last-child a {
  color: var(--eplus-accent-text, #fff); background: var(--eplus-accent, #555); padding: 3px 10px; border-radius: 3px; text-decoration: none; }
#eplus-container .article-teaser ul.article-links li:last-child a i { color: inherit; }
#eplus-container .chiffreutile-fond a, .module-eplus .chiffreutile-fond a { color: var(--eplus-accent, inherit); opacity: 1; }

/* Figures box and lists breathe */
#eplus-container .chiffreutile-fond, .module-eplus .chiffreutile-fond { padding: 16px 20px; margin-bottom: var(--eplus-gap); }
#eplus-container .chiffreutile-fond li, #eplus-container ul.chiffre-liste li { margin-bottom: 6px; line-height: 1.4; }

/* Article view */
#eplus-container .article-full h1 { line-height: 1.25; }
#eplus-container .article-full p, #eplus-container .article-full li { line-height: 1.6; }
#eplus-container .article-full img { max-width: 100%; height: auto; }

/* Article pages holding Expert+ content whose template container has no side padding below desktop width
   (Helix sites). Every Expert+ block and the reader carry ng-non-bindable. */
@media (max-width: 1199.98px) {
  .view-article .article-details:is(.eplus, :has([ng-non-bindable])) { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* Topic cards (old bloc-base-full-newversion layout in a Bootstrap .row): fixed 439px cards become fluid; two per row on
   tablets, one on phones. Lists in other grids (uk-grid) keep the site's own responsive rules. */
@media (max-width: 991.98px) {
  .liste-dossiers.row { margin: 0; row-gap: 32px; justify-content: flex-start; }
  .liste-dossiers.row > [class*="col-"] { padding: 0; }
  .liste-dossiers.row .file-wrap { width: 100%; margin: 0; padding-right: 0; }
  .liste-dossiers.row .image img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .liste-dossiers.row .file-wrap .wrap { width: 100%; margin: 12px 0 0; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .liste-dossiers.row { column-gap: 24px; }
  /* side by side: each card fills its row height, so the bars under the text line up */
  .liste-dossiers.row > [class*="col-"] { flex: 0 0 calc(50% - 12px); max-width: calc(50% - 12px); display: flex; flex-direction: column; }
  .liste-dossiers.row > [class*="col-"] > a { display: flex; flex: 1; }
  .liste-dossiers.row > [class*="col-"] > a > .file-wrap { flex: 1; }
  .liste-dossiers.row .file-wrap .wrap { flex: 1; }
}

/* Category tiles whose link is stretched to the item's full height (height: 100%) hide the short description under
   them (some sites also fix the item at 24px); let the item and tile take their natural height so the description shows below it. !important: site rules use two ids. */
#eplus-container ul.article-liste li:has(> .description_courte),
#eplus-container ul.article-liste li:has(> .description_courte) > a { height: auto !important; }
#eplus-container ul.article-liste li > .description_courte { margin: 8px 0 4px; line-height: 1.45; font-size: max(14px, 0.85em); }
/* the figures box text is 10-12px on some sites */
#eplus-container .chiffreutile-fond, #eplus-container .chiffreutile-fond li, #eplus-container .chiffreutile-fond a { font-size: max(14px, 1em); }

/* Some templates pull the footer band up over the page end on phones (manigest.fr: -143px); keep Expert+ content clear */
@media (max-width: 767.98px) {
  .view-article .article-details:is(.eplus, :has([ng-non-bindable])) { padding-bottom: 64px; }
}

/* "Filtrer :" bar: links in the accent colour (some sites' link colour is near-white), a wrapping row, finger-sized */
#eplus-container ul.filtre-links { float: none; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 14px; padding: 4px 16px; margin: 10px 0 16px; }
#eplus-container ul.filtre-links li { float: none; margin: 0; padding: 0; }
#eplus-container ul.filtre-links li a { color: var(--eplus-accent, inherit); display: inline-block; padding: 8px 0; }
@media (max-width: 767.98px) { #eplus-container ul.filtre-links { justify-content: flex-start; } }

/* News cards of the old actus-zoom-1-3 block (.zoom .wrap-resume). Pictures share one shape so the cards line up;
   below 1200px three cards side by side leave ~110-250px for the text, so they stack at a readable width. */
body .zoom .row .wrap-resume .artZoom img { aspect-ratio: 4 / 3; object-fit: cover; height: auto; }
/* text panel fills the card and the button sits at its bottom, so buttons line up across a row */
body.homepage .zoom .row .artZoom:nth-child(2) { display: flex; flex-direction: column; }
body.homepage .zoom .row .artZoom:nth-child(2) > p:last-child { margin-top: auto !important; padding-top: 16px; }
@media (max-width: 991.98px) {
  body.actu #mainwrap .whiteBG .zoom > .container-fluid > .row:not(.premier-article) { grid-template-columns: minmax(0, 560px); justify-content: center; }
}
@media (max-width: 1199.98px) {
  body.homepage .zoom .row { flex-direction: column; align-items: center; gap: 24px; }
  body.homepage .zoom .row .wrap-resume { max-width: 560px; width: 100%; }
  body.homepage .zoom .row .artZoom:nth-child(2) { padding: 24px; }
}

/* A long word in a heading (e.g. RECODIFICATION) must not widen the page on phones. */
#eplus-container :is(h1, h2, h3) { overflow-wrap: break-word; }
