@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --alafia-heading-font: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --alafia-heading-blue: #355087;
  --alafia-heading-white: #ffffff;
  --alafia-brand-green: #2a8758;
  --alafia-brand-gold: #fecb3e;
  --alafia-soft-border: rgba(53, 80, 135, 0.18);
  --alafia-soft-blue-bg: rgba(53, 80, 135, 0.06);
}

main :is(h1, h2, h3, h4, h5, h6, .section__title, .page-hero__title, .s4a-hero__title, .s4a-news-card__title, .s4a-action-panel__title, .s4a-map__panel-title) {
  font-family: var(--alafia-heading-font) !important;
  letter-spacing: 0 !important;
  text-wrap: balance;
}

body.home-page main .s4a-hero .s4a-hero__title,
body:not(.home-page) main#main-content > .page-hero.page-hero .container .page-hero__title,
body:not(.home-page) main .page-hero .page-hero__title {
  color: var(--alafia-heading-white) !important;
  font-weight: 600 !important;
}

body.home-page main .s4a-hero .s4a-hero__title {
  font-size: clamp(2.08rem, 5.35vw, 3.8rem) !important;
  line-height: 1.1 !important;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.32) !important;
}

body:not(.home-page) main#main-content > .page-hero.page-hero .container .page-hero__title,
body:not(.home-page) main .page-hero .page-hero__title {
  font-size: clamp(2.35rem, 4.2vw, 3.55rem) !important;
  line-height: 1.06 !important;
}

html body:not(.home-page) main#main-content > section.page-hero.page-hero,
html body:not(.home-page) main#main-content > .page-hero.page-hero,
html body:not(.home-page) main > section.page-hero.page-hero,
html body:not(.home-page) main > .page-hero.page-hero {
  display: grid !important;
  place-items: center !important;
  justify-content: center !important;
  align-content: center !important;
  text-align: center !important;
}

html body:not(.home-page) main#main-content > section.page-hero.page-hero > .container:not(.page-hero__breadcrumb-wrap),
html body:not(.home-page) main#main-content > .page-hero.page-hero > .container:not(.page-hero__breadcrumb-wrap),
html body:not(.home-page) main > section.page-hero.page-hero > .container:not(.page-hero__breadcrumb-wrap),
html body:not(.home-page) main > .page-hero.page-hero > .container:not(.page-hero__breadcrumb-wrap),
body.news-detail-page:not(.home-page) main#main-content > .page-hero.page-hero > .container:not(.page-hero__breadcrumb-wrap) {
  width: min(100%, 1120px) !important;
  max-width: 1120px !important;
  margin-inline: auto !important;
  padding-inline: clamp(1.25rem, 5vw, 4rem) !important;
  display: grid !important;
  place-items: center !important;
  justify-items: center !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__title,
html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__subtitle,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__title,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__subtitle,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__title,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__subtitle,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__title,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__subtitle,
body.news-detail-page:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__title,
body.news-detail-page:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__subtitle {
  width: min(100%, 900px) !important;
  margin-inline: auto !important;
  text-align: center !important;
  justify-self: center !important;
}

html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__subtitle,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__subtitle,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__subtitle,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__subtitle {
  max-width: min(100%, 780px) !important;
  margin-top: clamp(0.65rem, 1.4vw, 1rem) !important;
  line-height: 1.42 !important;
}

html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap {
  left: 50% !important;
  right: auto !important;
  width: min(calc(100% - 2rem), 1120px) !important;
  max-width: 1120px !important;
  margin-inline: auto !important;
  padding-inline: clamp(1rem, 3vw, 2rem) !important;
  transform: translateX(-50%) !important;
  text-align: center !important;
}

html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list {
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
}

body:not(.home-page) main h1:not(.page-hero__title),
body.actions-page main .actions-showcase__content h1,
body.contact-page main .contact-institutional-hero .section__title {
  color: var(--alafia-heading-blue) !important;
  font-size: clamp(2rem, 4vw, 3.2rem) !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
}

body main#main-content :is(h2, .section__title):not(.page-hero__title):not(.s4a-hero__title),
body.pillar-page main#main-content .section .section__title,
body.pillar-story-page main#main-content .section .section__title,
body.localite-page main#main-content .section h2,
body.impact-page main#main-content .section h2,
body.news-detail-page main#main-content .news-detail-section h2,
body.resources-page main#main-content .section__title,
body.reports-page main#main-content .section__title,
body.actions-page main#main-content .actions-rubriques__intro h2 {
  color: var(--alafia-heading-blue) !important;
  font-size: clamp(1.75rem, 2.8vw, 2.45rem) !important;
  font-weight: 700 !important;
  line-height: 1.14 !important;
}

body main#main-content :is(h3, .s4a-news-card__title, .s4a-action-panel__title, .s4a-map__panel-title):not(.page-hero__title):not(.s4a-hero__title),
body.sante-page main#main-content .section h3,
body.actions-page main#main-content .actions-rubrique__content h3 {
  color: var(--alafia-heading-blue) !important;
  font-size: clamp(1.12rem, 1.6vw, 1.45rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

body main#main-content :is(h4, h5, h6):not(.page-hero__title):not(.s4a-hero__title) {
  color: var(--alafia-heading-blue) !important;
  font-size: clamp(1rem, 1.2vw, 1.12rem) !important;
  font-weight: 700 !important;
  line-height: 1.22 !important;
}

body.about-page main#main-content .values-section .pillar-card__title {
  color: #ffffff !important;
}

body main#main-content :is(.section--dark, .site-wide-sleek-cta, .s4a-impact-stat) :is(h1, h2, h3, h4, h5, h6, .section__title) {
  color: var(--alafia-heading-white) !important;
}

/* Brand color lock: remove remaining violet accents from cards, filters and pagination. */
body.actualites-page .actualites-listing,
body.publications-page .section,
body.ressources-page .section {
  background: color-mix(in srgb, var(--alafia-brand-green) 2%, #ffffff) !important;
}

body.actualites-page .actualites-toolbar__label,
body.actualites-page .actualites-toolbar__search span,
body.actualites-page .actualites-grid .pub-card__type,
body.actualites-page .actualites-grid .pub-card__action {
  color: var(--alafia-brand-green) !important;
}

body.actualites-page .actualites-toolbar p,
body.actualites-page .actualites-grid .pub-card__date {
  color: rgba(53, 80, 135, 0.72) !important;
}

body.actualites-page .actualites-toolbar__search input,
body.actualites-page .actualites-filter-bar .filter-btn,
body.actualites-page .actualites-grid .pub-card,
.pagination__btn {
  border-color: var(--alafia-soft-border) !important;
}

body.actualites-page .actualites-toolbar__search input {
  color: var(--alafia-heading-blue) !important;
}

body.actualites-page .actualites-toolbar__search input:focus {
  border-color: rgba(42, 135, 88, 0.58) !important;
  box-shadow: 0 0 0 4px rgba(42, 135, 88, 0.12) !important;
}

body.actualites-page .actualites-grid .pub-card:hover {
  border-color: rgba(42, 135, 88, 0.42) !important;
  box-shadow: 0 18px 34px rgba(53, 80, 135, 0.10) !important;
}

body.actualites-page .actualites-filter-bar .filter-btn,
.pagination__btn {
  background: #ffffff !important;
  color: var(--alafia-heading-blue) !important;
}

body.actualites-page .actualites-filter-bar .filter-btn:hover,
body.actualites-page .actualites-filter-bar .filter-btn--active {
  background: var(--alafia-brand-green) !important;
  border-color: var(--alafia-brand-green) !important;
  color: #ffffff !important;
}

.pagination__btn:hover,
.pagination__btn--active,
body.actualites-page .pagination__btn:hover,
body.actualites-page .pagination__btn--active {
  background: var(--alafia-heading-blue) !important;
  border-color: var(--alafia-heading-blue) !important;
  color: #ffffff !important;
}

body.actualites-page .actualites-grid .pub-card__action:hover {
  color: var(--alafia-heading-blue) !important;
}

.reports-acted__button,
.reports-acted__item a {
  background: var(--alafia-heading-blue) !important;
  border-color: var(--alafia-heading-blue) !important;
}

.reports-acted__button:hover,
.reports-acted__button:focus-visible,
.reports-acted__item a:hover,
.reports-acted__item a:focus-visible {
  background: var(--alafia-brand-green) !important;
  border-color: var(--alafia-brand-green) !important;
}

@media (max-width: 760px) {
  body.home-page main .s4a-hero .s4a-hero__title {
    font-size: clamp(1.9rem, 8vw, 2.28rem) !important;
    line-height: 1.1 !important;
  }

  body:not(.home-page) main#main-content > .page-hero.page-hero .container .page-hero__title,
  body:not(.home-page) main .page-hero .page-hero__title {
    font-size: clamp(1.75rem, 7.2vw, 2.25rem) !important;
    line-height: 1.06 !important;
  }

  body:not(.home-page) main h1:not(.page-hero__title),
  body.actions-page main .actions-showcase__content h1,
  body.contact-page main .contact-institutional-hero .section__title {
    font-size: clamp(1.65rem, 7vw, 2.25rem) !important;
  }

  body main#main-content :is(h2, .section__title):not(.page-hero__title):not(.s4a-hero__title),
  body.pillar-page main#main-content .section .section__title,
  body.pillar-story-page main#main-content .section .section__title,
  body.localite-page main#main-content .section h2,
  body.impact-page main#main-content .section h2,
  body.news-detail-page main#main-content .news-detail-section h2,
  body.resources-page main#main-content .section__title,
  body.reports-page main#main-content .section__title {
    font-size: clamp(1.45rem, 6.4vw, 1.9rem) !important;
    line-height: 1.14 !important;
  }

  body main#main-content :is(h3, .s4a-news-card__title, .s4a-action-panel__title, .s4a-map__panel-title):not(.page-hero__title):not(.s4a-hero__title),
  body.sante-page main#main-content .section h3,
  body.actions-page main#main-content .actions-rubrique__content h3 {
    font-size: clamp(1.02rem, 4.6vw, 1.28rem) !important;
    line-height: 1.22 !important;
  }
}

html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap {
  left: 50% !important;
  width: min(calc(100% - clamp(2rem, 8vw, 8rem)), 1120px) !important;
  max-width: 1120px !important;
  padding-inline: 0 !important;
  transform: translateX(-50%) !important;
  text-align: left !important;
}

html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list {
  justify-content: flex-start !important;
  width: auto !important;
  max-width: min(100%, 34rem) !important;
  font-size: clamp(0.78rem, 0.82vw, 0.9rem) !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  justify-self: start !important;
  margin-inline: 0 auto !important;
  opacity: 0.78 !important;
  text-align: left !important;
}

html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb a,
html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__sep,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb a,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__sep {
  color: rgba(255, 255, 255, 0.78) !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28) !important;
}

html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb:hover,
html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb:hover {
  opacity: 1 !important;
}

@media (max-width: 760px) {
  html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap,
  html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap,
  html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap,
  html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap {
    width: min(calc(100% - 1.25rem), 1120px) !important;
  }

  html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
  html body:not(.home-page) main#main-content > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
  html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
  html body:not(.home-page) main#main-content > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
  html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
  html body:not(.home-page) main > section.page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list,
  html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb,
  html body:not(.home-page) main > .page-hero.page-hero .page-hero__breadcrumb-wrap .breadcrumb__list {
    max-width: 100% !important;
    font-size: 0.68rem !important;
  }
}

html body.news-detail-page main#main-content .news-detail-section .feature-row__image .news-detail-sidebar__note--under-media h2 {
  color: #ffffff !important;
}

/* Home impact keeps the legacy oversized wordmark treatment. */
html body.home-page main#main-content .s4a-impact .s4a-impact__title {
  color: var(--alafia-brand-green, #2a8758) !important;
  font-family: var(--font-body) !important;
  font-size: clamp(3.25rem, 6.6vw, 5.6rem) !important;
  font-weight: 700 !important;
  line-height: 0.86 !important;
  letter-spacing: 0 !important;
  padding-bottom: 0 !important;
}

html body.home-page main#main-content .s4a-impact .s4a-impact__title::before,
html body.home-page main#main-content .s4a-impact .s4a-impact__title::after {
  content: none !important;
  display: none !important;
}
