/* Corrections communes, chargées après les extensions de présentation. */
body .er-featured {
  width: min(1240px, calc(100% - 32px)) !important;
  margin: 28px auto !important;
  padding: clamp(22px, 3vw, 38px) !important;
  border: 1px solid #315d7a !important;
  border-radius: 24px !important;
  background: radial-gradient(ellipse at top right, #146082, transparent 65%), #071f35 !important;
  box-shadow: 0 18px 42px #071f3518 !important;
  box-sizing: border-box !important;
}
body .er-featured .er-featured__head { align-items: start !important; }
body .er-featured .er-featured__head h2 {
  color: #fff !important; font-size: clamp(26px, 3vw, 38px) !important;
  line-height: 1.2 !important; overflow-wrap: break-word !important;
}
.er-featured__eyebrow { display: block; margin-bottom: 8px; color: #aadcf2; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
body .er-featured .er-featured__empty { color: #e2f1f8 !important; background: #ffffff0a !important; border-color: #8faebf !important; }
body .er-featured .er-featured__track { scroll-behavior: auto !important; }
body .er-featured .er-featured__track > .er-card { flex: 0 0 310px !important; min-width: 0 !important; }
body .er-featured .er-card__view { grid-column: 1 / -1 !important; }
body .er-featured .er-card__compare { display: none !important; }
.er-featured__scroll { display: block; color: #cbe3ef; font-size: 12px; margin-top: 16px; }
.er-featured__scroll input { display: block; width: 100%; height: 32px; margin: 6px 0 0; accent-color: #e1be63; cursor: pointer; }
.er-featured__scroll input:focus-visible { outline: 2px solid #a9ddf4; outline-offset: 4px; }
.er-featured__scroll input:disabled { opacity: .35; cursor: default; }
body .er-card .er-card__excerpt {
  display: -webkit-box !important; -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important; overflow: hidden !important;
  margin: 0 0 16px !important; color: #405467 !important;
  font-size: 15px !important; line-height: 1.6 !important;
}

/* Préserver le logo entier : aucune position absolue héritée des petites cartes. */
body.single-at_biz_dir #page #content #er-sl-premium .er-sl-logo img {
  position: static !important; inset: auto !important; transform: none !important;
  width: 100% !important; height: 100% !important; object-fit: contain !important;
  border-radius: 0 !important;
}
/* Logo de fiche : colonne élargie, image entière et titre toujours dégagé. */
body.single-at_biz_dir #page #content #er-sl-premium .er-sl-hero { grid-template-columns: minmax(220px,240px) minmax(0,1fr) !important; gap: 34px !important; }
body.single-at_biz_dir #page #content #er-sl-premium .er-sl-logo { width: 220px !important; height: 140px !important; min-width: 220px !important; padding: 10px !important; display:flex !important; align-items:center !important; justify-content:center !important; overflow:hidden !important; box-sizing:border-box !important; }
body.single-at_biz_dir #page #content #er-sl-premium .er-sl-logo img { width:100% !important; height:100% !important; max-width:100% !important; max-height:100% !important; object-fit:contain !important; object-position:center !important; }
body.single-at_biz_dir #page #content #er-sl-premium .er-sl-hero__copy { min-width:0 !important; }
body.single-at_biz_dir #page #content #er-sl-premium .er-sl-hero__copy h1 { margin-left:0 !important; }

/* Pages piliers : sous-catégories visibles avant la liste des fiches. */
.er-hub-subcategories { margin: 26px auto 8px; }
.er-hub-subcategories h2 { margin: 4px 0 18px; color:#10233f; font-size:clamp(24px,3vw,34px); }
.er-hub-subcategories__grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.er-hub-subcategories__grid a { display:flex; flex-direction:column; gap:8px; padding:18px; border:1px solid #d9e2eb; border-radius:14px; background:#fff; color:#10233f; text-decoration:none; box-shadow:0 5px 16px rgba(15,35,63,.06); }
.er-hub-subcategories__grid a:hover { border-color:#2a789b; transform:translateY(-2px); }
.er-hub-subcategories__grid span { color:#2a789b; font-size:13px; }
@media(max-width:900px){.er-hub-subcategories__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){body.single-at_biz_dir #page #content #er-sl-premium .er-sl-hero{grid-template-columns:1fr!important;gap:18px!important}.er-hub-subcategories__grid{grid-template-columns:1fr}}
body.single-at_biz_dir #page #content #er-sl-premium .er-sl-logo:not(:has(img)) {
  width: 110px !important; height: 110px !important; aspect-ratio: 1 !important;
}
body.single-at_biz_dir #page #content .er-sl-shell,
body.single-at_biz_dir #page #content #er-sl-premium {
  min-width: 0 !important; max-height: none !important; height: auto !important;
  transform: none !important;
}

@media (min-width: 922px) {
  #masthead .main-header-menu > .menu-item.er-menu-claim > .menu-link {
    height: 46px !important; min-height: 46px !important; max-height: 46px !important;
    margin-block: 23px !important; padding: 0 18px !important;
    font-size: 14px !important; line-height: 1.2 !important; border-radius: 10px !important;
  }
  /* Sur les pages de catégories, le menu se superpose au héros : aucune bande
   * bleue indépendante entre le haut de page et l'image. */
  body.er-premium-archive-page:not(.home):has(.er-category-hero) #masthead {
    position: absolute !important; inset: 0 0 auto !important; z-index: 9999 !important;
    width: 100% !important; background: transparent !important;
  }
  body.er-premium-archive-page:not(.home):has(.er-category-hero) #masthead .ast-primary-header-bar {
    background: linear-gradient(180deg, rgba(7,31,53,.88), rgba(7,31,53,.30), transparent) !important;
    box-shadow: none !important; border: 0 !important;
  }
  body.er-premium-archive-page:not(.home):has(.er-category-hero) .er-category-hero {
    margin-top: 0 !important; padding-top: 100px !important;
  }
}
@media (max-width: 700px) {
  body .er-featured { width: calc(100% - 24px) !important; padding: 22px 14px !important; border-radius: 20px !important; }
  body .er-featured .er-featured__track > .er-card { flex-basis: min(310px, 100%) !important; min-width: 0 !important; }
  body.single-at_biz_dir #page #content #er-sl-premium .er-sl-logo:not(:has(img)) { width: 84px !important; height: 84px !important; }
  body.er-premium-archive-page:not(.home):has(.er-category-hero) #masthead {
    position: absolute !important; inset: 0 0 auto !important; z-index: 9999 !important;
    width: 100% !important; background: transparent !important;
  }
  body.er-premium-archive-page:not(.home):has(.er-category-hero) #masthead .ast-primary-header-bar {
    background: linear-gradient(180deg, rgba(7,31,53,.94), rgba(7,31,53,.52), transparent) !important;
    box-shadow: none !important; border: 0 !important;
  }
  body.er-premium-archive-page:not(.home):has(.er-category-hero) .er-category-hero { padding-top: 82px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body .er-featured *, #masthead .menu-link { transition: none !important; scroll-behavior: auto !important; }
}
