/* AFH – Programme scientifique / frontend UI v0.3.0
   Scoped components designed to remain stable inside Salient + WPBakery. */
.afh-programme,
.afh-event-single {
  --afh-accent: #4f20df;
  --afh-ink: #10116f;
  --afh-muted: #656780;
  --afh-border: #e2e3ee;
  --afh-panel: #f7f7fb;
  --afh-panel-strong: #f0f0fa;
  --afh-white: #fff;
  color: var(--afh-ink);
  font-family: inherit;
  line-height: 1.55;
}
.afh-programme *,
.afh-event-single * { box-sizing: border-box; }
.afh-programme [hidden] { display: none !important; }

/* Programme header */
.afh-programme .afh-programme__header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding: 0 0 28px; margin: 0 0 25px; border-bottom: 1px solid var(--afh-border);
}
.afh-programme .afh-programme__eyebrow,
.afh-programme .afh-programme-archives__label {
  margin: 0 0 8px !important; color: var(--afh-accent) !important;
  font-size:  .76rem !important; line-height: 1.4 !important; font-weight: 700 !important;
  letter-spacing: .1em; text-transform: uppercase;
}
.afh-programme .afh-programme__header h2 {
  margin: 0 0 9px !important; color: var(--afh-ink) !important;
  font-size: clamp(2rem, 3.1vw, 2.8rem) !important; line-height: 1.12 !important;
  letter-spacing: -.035em !important; font-weight: 500 !important;
}
.afh-programme .afh-programme__intro {
  max-width: 660px; margin: 0 !important; color: var(--afh-muted) !important;
  font-size: 1rem !important; line-height: 1.6 !important;
}
.afh-programme a.afh-button {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 12px 17px !important; border: 1px solid var(--afh-accent) !important;
  border-radius: 6px !important; background: var(--afh-accent) !important; color: #fff !important;
  font-family: inherit; font-size: .9rem !important; font-weight: 650 !important; line-height: 1.3;
  text-decoration: none !important; white-space: nowrap; box-shadow: none !important;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.afh-programme a.afh-button:hover,
.afh-programme a.afh-button:focus-visible { background: var(--afh-ink) !important; border-color: var(--afh-ink) !important; color: #fff !important; transform: translateY(-1px); }

/* Day navigation */
.afh-programme .afh-programme__days {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 0 4px; margin: 0 0 21px;
  border: 0; scrollbar-width: thin;
}
.afh-programme button.afh-day-button {
  appearance: none; flex: 0 0 auto; min-height: 43px; padding: 10px 16px !important;
  border: 1px solid var(--afh-border) !important; border-radius: 7px !important;
  background: #fff !important; color: var(--afh-ink) !important;
  font: inherit !important; font-size: .9rem !important; font-weight: 600 !important;
  line-height: 1.25 !important; cursor: pointer; box-shadow: none !important;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.afh-programme button.afh-day-button:hover,
.afh-programme button.afh-day-button:focus-visible { border-color: var(--afh-accent) !important; color: var(--afh-accent) !important; }
.afh-programme button.afh-day-button.is-active { border-color: var(--afh-ink) !important; background: var(--afh-ink) !important; color: #fff !important; }

/* Search and filters */
.afh-programme .afh-programme__filters {
  display: grid; grid-template-columns: minmax(220px, 1.45fr) repeat(3, minmax(145px, 1fr)) auto;
  gap: 13px; align-items: end; padding: 19px; margin: 0 0 15px;
  border: 1px solid var(--afh-border); border-radius: 10px; background: var(--afh-panel);
}
.afh-programme label.afh-filter { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; }
.afh-programme .afh-filter > span {
  color: var(--afh-ink) !important; font-size: .78rem !important; line-height: 1.3 !important;
  font-weight: 650 !important; letter-spacing: .015em;
}
.afh-programme .afh-filter input,
.afh-programme .afh-filter select {
  width: 100% !important; min-width: 0; min-height: 45px !important; margin: 0 !important;
  padding: 10px 12px !important; border: 1px solid #d9daea !important; border-radius: 6px !important;
  background-color: #fff !important; color: var(--afh-ink) !important;
  font-family: inherit !important; font-size: .9rem !important; line-height: 1.35 !important;
  box-shadow: none !important; outline-offset: 2px;
}
.afh-programme .afh-filter input::placeholder { color: #898aa1 !important; opacity: 1; }
.afh-programme .afh-filter input:focus,
.afh-programme .afh-filter select:focus { border-color: var(--afh-accent) !important; outline: 2px solid rgba(79,32,223,.12); }
.afh-programme button.afh-reset {
  display: inline-flex; align-items: center; justify-content: center; min-height: 43px;
  padding: 8px 10px !important; border: 0 !important; border-radius: 5px !important;
  background: transparent !important; color: var(--afh-accent) !important;
  font: inherit !important; font-size: .84rem !important; font-weight: 650 !important;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; box-shadow: none !important;
}
.afh-programme button.afh-reset:hover { color: var(--afh-ink) !important; }
.afh-programme .afh-programme__result-count {
  margin: 0 0 17px !important; color: var(--afh-muted) !important; font-size: .82rem !important;
}

/* Chronological list */
.afh-programme .afh-day-group { margin: 30px 0 37px; }
.afh-programme .afh-day-group__heading {
  display: flex; align-items: center; gap: 16px; margin: 0 0 14px !important;
  padding: 0 0 12px !important; border-bottom: 3px solid var(--afh-ink);
  color: var(--afh-ink) !important; font-size: clamp(1.25rem, 2vw, 1.55rem) !important;
  line-height: 1.25 !important; font-weight: 500 !important; letter-spacing: -.02em;
}
.afh-programme .afh-day-group__events { display: flex; flex-direction: column; }
.afh-programme article.afh-event-card {
  display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 23px;
  padding: 22px 19px !important; margin: 0 !important; border: 0 !important;
  border-bottom: 1px solid var(--afh-border) !important; border-radius: 0 !important;
  background: #fff !important; box-shadow: none !important;
}
.afh-programme article.afh-event-card:first-child { border-top: 1px solid var(--afh-border) !important; }
.afh-programme article.afh-event-card:hover { background: #fcfcff !important; }
.afh-programme .afh-event-card__time {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 2px;
  color: var(--afh-ink) !important; font-size: .93rem !important; line-height: 1.35 !important;
  font-weight: 700 !important; font-variant-numeric: tabular-nums;
}
.afh-programme .afh-event-card__meta,
.afh-event-single .afh-event-detail__labels { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px !important; }
.afh-programme .afh-event-type,
.afh-event-single .afh-event-type {
  display: inline-flex; align-items: center; padding: 4px 8px !important;
  border: 1px solid #e4e1fa; border-radius: 4px !important; background: #f4f1ff !important;
  color: #4b24b7 !important; font-size: .72rem !important; line-height: 1.3 !important;
  font-weight: 700 !important; letter-spacing: .01em;
}
.afh-programme .afh-event-card__main h4 {
  margin: 0 0 7px !important; color: var(--afh-ink) !important;
  font-size: clamp(1.06rem, 1.5vw, 1.22rem) !important; line-height: 1.38 !important;
  font-weight: 600 !important; letter-spacing: -.012em;
}
.afh-programme .afh-event-card__main h4 a {
  color: var(--afh-ink) !important; text-decoration: none !important; font-weight: inherit !important;
}
.afh-programme .afh-event-card__main h4 a:hover,
.afh-programme .afh-event-card__main h4 a:focus-visible { color: var(--afh-accent) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.afh-programme .afh-event-card__people {
  margin: 0 0 5px !important; color: #34355f !important; font-size: .91rem !important; line-height: 1.5 !important; font-weight: 600 !important;
}
.afh-programme .afh-event-card__session,
.afh-programme .afh-event-card__location {
  margin: 0 0 4px !important; color: var(--afh-muted) !important; font-size: .86rem !important; line-height: 1.5 !important;
}
.afh-programme a.afh-event-card__link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  color: var(--afh-accent) !important; font-size: .85rem !important; line-height: 1.4 !important;
  font-weight: 650 !important; text-decoration: none !important;
}
.afh-programme a.afh-event-card__link:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.afh-programme .afh-event-status {
  display: inline-flex; align-items: center; padding: 4px 7px !important;
  border-radius: 4px !important; background: #f0f1f5 !important; color: #656878 !important;
  font-size: .7rem !important; line-height: 1.2 !important; font-weight: 650 !important;
}
.afh-programme .afh-event-status--live { background: #e9f7ef !important; color: #176b40 !important; }
.afh-programme .afh-programme__no-results,
.afh-programme .afh-programme__empty {
  padding: 25px !important; border: 1px solid var(--afh-border); border-radius: 8px;
  background: var(--afh-panel) !important; color: var(--afh-ink) !important;
}
.afh-programme .afh-programme__empty h3 { margin: 0 0 8px !important; color: var(--afh-ink) !important; font-size: 1.25rem !important; }
.afh-programme .afh-programme__empty p { color: var(--afh-muted) !important; }

/* Discreet archive */
.afh-programme aside.afh-programme-archives {
  margin: 45px 0 0; padding: 22px 0 0; border-top: 1px solid var(--afh-border);
}
.afh-programme .afh-programme-archives h3 {
  margin: 0 0 12px !important; color: var(--afh-ink) !important;
  font-size: 1.08rem !important; line-height: 1.4 !important; font-weight: 600 !important;
}
.afh-programme .afh-programme-archives ul {
  display: flex; flex-wrap: wrap; gap: 9px; padding: 0 !important; margin: 0 !important; list-style: none !important;
}
.afh-programme .afh-programme-archives li { margin: 0 !important; padding: 0 !important; }
.afh-programme .afh-programme-archives a {
  display: inline-flex; padding: 8px 11px; border: 1px solid var(--afh-border); border-radius: 5px;
  background: #fff; color: var(--afh-ink) !important; font-size: .85rem !important;
  font-weight: 550 !important; text-decoration: none !important;
}
.afh-programme .afh-programme-archives a:hover { border-color: var(--afh-accent); color: var(--afh-accent) !important; }

/* Individual event pages */
.afh-event-single .container { max-width: 1180px; }
.afh-event-single nav.afh-event-single__breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 25px 0 28px;
  color: var(--afh-muted) !important; font-size: .84rem !important; line-height: 1.5 !important;
}
.afh-event-single .afh-event-single__breadcrumb a { color: var(--afh-accent) !important; text-decoration: none !important; }
.afh-event-single .afh-event-single__breadcrumb a:hover { text-decoration: underline !important; }
.afh-event-single article.afh-event-detail { max-width: 980px; margin: 0 auto 70px; }
.afh-event-single .afh-event-detail__image { max-width: 780px; margin: 0 0 28px; }
.afh-event-single .afh-event-detail__image img {
  display: block; width: auto; max-width: 100%; max-height: 590px; height: auto;
  border-radius: 7px; object-fit: contain; object-position: left top;
}
.afh-event-single .afh-event-detail__header {
  padding: 0 0 24px; margin: 0 0 26px; border-bottom: 1px solid var(--afh-border);
}
.afh-event-single .afh-event-detail__header h1 {
  margin: 0 0 19px !important; color: var(--afh-ink) !important;
  font-size: clamp(2rem, 2.3vw, 3.35rem) !important; line-height: 1.1 !important;
  letter-spacing: -.04em !important; font-weight: 500 !important;
}
.afh-event-single .afh-event-detail__when {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px 17px;
  color: var(--afh-muted) !important; font-size: .9rem !important; line-height: 1.5 !important;
}
.afh-event-single .afh-event-detail__when strong { color: var(--afh-ink) !important; font-weight: 650 !important; }
.afh-event-single .afh-event-status { margin-bottom: 10px; }
.afh-event-single .afh-event-detail__speakers {
  max-width: 760px; margin: 0 0 30px !important; padding: 20px 23px !important;
  border: 1px solid #e7e5f6 !important; border-left: 3px solid var(--afh-accent) !important;
  border-radius: 0 7px 7px 0 !important; background: var(--afh-panel) !important;
}
.afh-event-single .afh-event-detail__speakers h2,
.afh-event-single .afh-event-detail__actions h2 {
  margin: 0 0 12px !important; color: var(--afh-muted) !important;
  font-size: .77rem !important; line-height: 1.35 !important; letter-spacing: .08em !important;
  text-transform: uppercase; font-weight: 700 !important;
}
.afh-event-single .afh-event-detail__speakers ul {
  display: flex; flex-direction: column; gap: 10px; padding: 0 !important; margin: 0 !important; list-style: none !important;
}
.afh-event-single .afh-event-detail__speakers li { display: flex; flex-direction: column; gap: 2px; margin: 0 !important; }
.afh-event-single .afh-event-detail__speakers li strong { color: var(--afh-ink) !important; font-size: 1rem !important; font-weight: 650 !important; }
.afh-event-single .afh-event-detail__speakers li span { color: var(--afh-muted) !important; font-size: .88rem !important; }
.afh-event-single .afh-event-detail__content {
  max-width: 860px; color: #292a5c !important; font-size: 1rem !important; line-height: 1.8 !important;
}
.afh-event-single .afh-event-detail__content p { margin: 0 0 1.2em !important; color: inherit !important; font-size: inherit !important; line-height: inherit !important; padding-bottom:0px;}
.afh-event-single .afh-event-detail__content h2,
.afh-event-single .afh-event-detail__content h3 { color: var(--afh-ink) !important; line-height: 1.25 !important; }
.afh-event-single .afh-event-detail__sessions {
  max-width: 860px; margin: 27px 0 0; padding: 15px 0; border-top: 1px solid var(--afh-border);
  color: var(--afh-muted) !important; font-size: .9rem !important; line-height: 1.5 !important;
}
.afh-event-single .afh-event-detail__sessions span { color: var(--afh-ink) !important; font-weight: 650 !important; }
.afh-event-single .afh-event-detail__actions {
  max-width: 980px; margin: 35px 0 0 !important; padding: 22px !important;
  border: 1px solid var(--afh-border) !important; border-radius: 9px !important;
  background: var(--afh-panel) !important;
}
.afh-event-single .afh-event-detail__actions h2 { margin-bottom: 15px !important; }
.afh-event-single .afh-event-detail__action-links { display: flex; flex-wrap: wrap; gap: 9px; }
.afh-event-single .afh-event-detail__action-links a,
.afh-event-single button.afh-share-button {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 7px;
  min-height: 41px; padding: 10px 13px !important; border: 1px solid #d9daea !important;
  border-radius: 5px !important; background: #fff !important; color: var(--afh-ink) !important;
  font-family: inherit !important; font-size: .83rem !important; line-height: 1.35 !important;
  font-weight: 650 !important; text-decoration: none !important; cursor: pointer; box-shadow: none !important;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.afh-event-single .afh-event-detail__action-links a:hover,
.afh-event-single button.afh-share-button:hover { border-color: var(--afh-accent) !important; color: var(--afh-accent) !important; }
.afh-event-single .afh-share-feedback { margin: 10px 0 0 !important; color: var(--afh-muted) !important; font-size: .84rem !important; }
.afh-event-single footer.afh-event-detail__footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--afh-border); }
.afh-event-single .afh-event-detail__footer a {
  display: inline-flex; color: var(--afh-accent) !important; font-size: .92rem !important;
  line-height: 1.4 !important; font-weight: 650 !important; text-decoration: none !important;
}
.afh-event-single .afh-event-detail__footer a:hover { text-decoration: underline !important; text-underline-offset: 3px; }

@media (max-width: 1100px) {
  .afh-programme .afh-programme__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .afh-programme .afh-filter--search { grid-column: span 2; }
  .afh-programme button.afh-reset { justify-self: start; }
  .afh-programme .afh-programme__header { align-items: flex-start; flex-direction: column; }
  .afh-programme a.afh-button { white-space: normal; }
}
@media (max-width: 640px) {
  .afh-programme .afh-programme__header { gap: 18px; padding-bottom: 22px; }
  .afh-programme .afh-programme__filters { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; }
  .afh-programme .afh-filter--search { grid-column: auto; }
  .afh-programme .afh-day-group { margin: 25px 0 30px; }
  .afh-programme article.afh-event-card { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 18px 13px !important; }
  .afh-programme .afh-event-card__time { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .afh-programme .afh-event-card__main h4 { font-size: 1.08rem !important; }
  .afh-event-single .afh-event-single__breadcrumb { margin: 18px 0 22px; }
  .afh-event-single article.afh-event-detail { margin-bottom: 45px; }
  .afh-event-single .afh-event-detail__image { margin-bottom: 21px; }
  .afh-event-single .afh-event-detail__image img { max-height: 440px; }
  .afh-event-single .afh-event-detail__header { padding-bottom: 21px; margin-bottom: 22px; }
  .afh-event-single .afh-event-detail__when { align-items: flex-start; flex-direction: column; gap: 4px; }
  .afh-event-single .afh-event-detail__speakers { padding: 17px !important; }
  .afh-event-single .afh-event-detail__actions { padding: 16px !important; }
  .afh-event-single .afh-event-detail__action-links { flex-direction: column; align-items: stretch; }
  .afh-event-single .afh-event-detail__action-links a,
  .afh-event-single button.afh-share-button { justify-content: center; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .afh-programme *, .afh-event-single * { transition: none !important; scroll-behavior: auto !important; }
}

/* v0.3.0 — compact illustration and optional speaker portraits */
.afh-event-single article.afh-event-detail .afh-event-detail__hero {
  display: block;
  margin: 0 0 27px;
  padding: 0 0 25px;
  border-bottom: 1px solid var(--afh-border);
}
.afh-event-single article.afh-event-detail .afh-event-detail__hero--with-image {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 310px);
  gap: clamp(24px, 4vw, 42px);
  align-items: start;
}
.afh-event-single article.afh-event-detail .afh-event-detail__header {
  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
.afh-event-single article.afh-event-detail .afh-event-detail__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 310px;
  min-height: 190px;
  max-height: 250px;
  margin: 0 !important;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--afh-border);
  border-radius: 9px;
  background: linear-gradient(145deg, #f7f8fb 0%, #eceef4 100%);
}
.afh-event-single article.afh-event-detail .afh-event-detail__image img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 220px !important;
  margin: 0 auto !important;
  border-radius: 4px;
  object-fit: contain !important;
  object-position: center !important;
}
.afh-event-single .afh-event-detail__speakers li { display: block; }
.afh-event-single .afh-speaker-person { display: flex; align-items: center; gap: 13px; min-width: 0; }
.afh-event-single .afh-speaker-person__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.afh-event-single img.afh-speaker-avatar {
  display: block;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  flex: 0 0 56px;
  margin: 0 !important;
  border: 1px solid rgba(16, 17, 111, .09);
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center;
}
@media (max-width: 760px) {
  .afh-event-single article.afh-event-detail .afh-event-detail__hero--with-image {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .afh-event-single article.afh-event-detail .afh-event-detail__image {
    width: 100%;
    max-width: 100%;
    min-height: 130px;
    max-height: 200px;
    padding: 10px;
  }
  .afh-event-single article.afh-event-detail .afh-event-detail__image img { max-height: 178px !important; }
}
