/* IFE homepage + archive: event carousel + matching calendar */

.ife-home-events .ife-home-events__layout.ife-home-events__layout--plugin {
  display: grid !important;
  gap: 3.5rem;
  align-items: stretch;
}

@media (min-width: 1100px) {
  .ife-home-events .ife-home-events__layout.ife-home-events__layout--plugin {
    grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 19.5rem) !important;
    gap: 3.5rem;
  }
}

.ife-home-events__cards,
.ife-home-events__cal {
  min-width: 0;
}

.ife-home-events .institut-events-home__calendar {
  position: relative;
}

.ife-home-events__cal,
.ife-home-events .institut-events--home,
.ife-home-events .institut-events-home,
.ife-home-events .institut-events-home__calendar {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.ife-home-events .institut-events-home {
  grid-template-columns: 1fr;
}

.ife-home-events .institut-calendar {
  flex: 1;
  width: 100%;
  grid-auto-rows: minmax(3.35rem, 1fr);
}

.ife-home-events__cards,
.ife-home-events__cards .institut-events,
.ife-home-events__cards .institut-events__items {
  width: 100%;
}

.ife-home-events__cards .institut-events--grid .institut-events__items {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 1.8vw, 1.5rem);
  padding-top: 0;
}

.ife-home-events .ife-rail .institut-events--grid .institut-events__items {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 20px;
}

.ife-home-events__cards .institut-event__media {
  min-height: clamp(12.5rem, 16vw, 16.5rem);
}

.ife-home-events__cards .institut-event__body {
  margin-top: -2rem;
  padding: 0 1rem 1.1rem;
}

.ife-home-events__cards .institut-event__tag {
  margin-bottom: 0.7rem;
}

.ife-home-events__cards .institut-event__title {
  margin-bottom: 0.85rem;
  font-size: clamp(1.05rem, 1.25vw, 1.3rem);
}

.ife-home-events__cards .institut-event__date {
  padding: .5rem .8rem;
  font-size: clamp(.9rem, 1.05vw, 1.05rem);
}

.ife-home-events .institut-calendar__weekday {
  padding: .45rem .15rem;
  font-size: .8rem;
}

.ife-home-events .institut-events--home-solo .institut-events-home {
  grid-template-columns: 1fr;
}

.ife-home-events .institut-calendar__nav {
  margin-bottom: .65rem;
  gap: .4rem;
}

.ife-home-events .institut-calendar__nav h2 {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 700;
  text-transform: capitalize;
  text-align: center;
  line-height: 1.15;
}

.ife-home-events .institut-calendar__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-height: 2.1rem;
  padding: .3rem .5rem;
  border: 2px solid var(--ie-color-border, #0b2455);
  background: #fff;
  color: var(--ie-color-accent, #3558a2);
  font-weight: 700;
  font-size: .72rem;
  line-height: 1;
  text-decoration: none;
  text-transform: capitalize;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ife-home-events .institut-calendar__nav-label {
  text-transform: capitalize;
}

.ife-home-events .institut-calendar__nav-btn:hover {
  background: var(--ie-color-tint, #eff4ff);
  box-shadow: .35rem .35rem 0 var(--ie-color-shadow, #dbe6ff);
  transform: translate(-.1rem, -.1rem);
}

.ife-home-events .institut-calendar {
  border: 2px solid var(--ie-color-border, #0b2455);
  background: #fff;
}

.ife-home-events .institut-events--home .institut-calendar__day {
  min-height: 3.45rem;
  height: auto;
  padding: .45rem .15rem .4rem;
  font-size: 1rem;
  transition: background-color 160ms ease, transform 160ms ease;
}

.ife-home-events .institut-events--home .institut-calendar__day time {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.ife-home-events .institut-events--home .institut-calendar__day.is-today time {
  min-width: 2rem;
  min-height: 2rem;
  font-size: .95rem;
}

.ife-home-events .institut-events--home .institut-calendar__day.has-events:hover {
  background: var(--ie-color-tint, #eff4ff);
  transform: translateY(-2px);
}

.ife-home-events .institut-events--home .institut-calendar__day.has-events time {
  font-weight: 800;
}

.ife-home-events .institut-calendar__dot {
  width: .55rem;
  height: .55rem;
  background: #ff816e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #ff816e, transparent 70%);
}

.ife-home-events .institut-events-home__day-panel[hidden] {
  display: none !important;
}

.ife-home-events .institut-events-home__day-panel {
  position: absolute;
  left: 50%;
  bottom: .7rem;
  z-index: 6;
  width: calc(100% - 1.2rem);
  max-width: 22rem;
  max-height: 62%;
  margin: 0;
  overflow: auto;
  background: rgb(255 255 255 / 96%);
  border: 2px solid var(--ie-color-border, #0b2455);
  box-shadow: .45rem .45rem 0 var(--ie-color-shadow, #dbe6ff);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  transform: translateX(-50%);
}

/* Courses section: brand blue band */
.ife-home-courses--brand {
  background: var(--palette-blue-main, #3558a2) !important;
}

.ife-home-courses--brand .ife-section__head h2,
.ife-home-courses--brand .ife-home-courses__title,
.ife-home-courses--brand .ife-home-courses__cta {
  color: #fff;
}

.ife-home-courses--brand .ife-section__head h2 {
  color: #fff !important;
}

.ife-home-courses--brand .ife-btn--ghost {
  color: #fff !important;
  border-color: #fff !important;
  background: transparent !important;
}

.ife-home-courses--brand .ife-btn--ghost:hover {
  color: var(--palette-blue-dark, #0b2455) !important;
  background: #fff !important;
}

.ife-home-courses--brand .ife-home-courses__card {
  background: #fff;
}

.ife-home-courses--brand .ife-home-courses__title {
  color: var(--palette-blue-dark, #0b2455) !important;
}

.ife-home-courses--brand .ife-home-courses__cta {
  color: var(--palette-blue-main, #3558a2) !important;
}

/* Archive /events/ — ifsuede.com/evenements structure, IFE chrome */
body.post-type-archive-institut_event .ife-page--events .institut-events-page__inner {
  padding-top: 0;
  padding-bottom: 0;
}

.institut-events-archive__hero {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.institut-events-archive__hero h1 {
  margin: 0 0 .85rem;
  color: var(--ie-color-text, #0b2455);
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: .95;
}

.institut-events-archive__lead {
  margin: 0;
  color: var(--ie-color-body, #263f6d);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.6;
}

.institut-events-archive__scopes {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  margin: 0 0 1.25rem;
  border-bottom: 2px solid var(--ie-color-border, #0b2455);
}

.institut-events-archive__scopes a {
  margin-bottom: -2px;
  padding: .7rem 0;
  color: var(--ie-color-muted, #5e6a7f);
  border-bottom: 3px solid transparent;
  font-weight: 700;
  text-decoration: none;
}

.institut-events-archive__scopes a.is-active {
  color: var(--ie-color-text, #0b2455);
  border-bottom-color: var(--ie-color-accent, #3558a2);
}

.institut-events-archive__themes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
}

.institut-events-archive__themes a {
  padding: .4rem .85rem;
  color: var(--ie-color-text, #0b2455);
  background: #fff;
  border: 2px solid var(--ie-color-border, #0b2455);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.institut-events-archive__themes a.is-active,
.institut-events-archive__themes a:hover {
  color: #fff;
  background: var(--ie-color-text, #0b2455);
}

.ife-page--events .institut-events--grid .institut-events__items {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1099px) {
  .ife-page--home .ife-home-events .ife-home-events__layout.ife-home-events__layout--plugin,
  .ife-home-events .ife-home-events__layout.ife-home-events__layout--plugin {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .ife-home-events .institut-events--home .institut-calendar__day {
    min-height: 3.1rem;
  }

  .ife-home-events .institut-calendar__nav h2 {
    font-size: clamp(1.1rem, 4.2vw, 1.25rem);
  }
}

@media (min-width: 1100px) and (max-width: 1360px) {
  .ife-home-events .institut-calendar__nav-label {
    display: none;
  }
}

@media (max-width: 800px) {
  .ife-home-events__cards .institut-events--grid .institut-events__items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ife-home-events .ife-rail .institut-events--grid .institut-events__items {
    display: flex !important;
    grid-template-columns: none !important;
  }

  .ife-page--events .institut-events--grid .institut-events__items {
    grid-template-columns: 1fr !important;
  }

  .ife-home-events .institut-events--home .institut-calendar__day {
    min-height: 3.1rem;
  }

  .ife-home-events__cards .institut-event__media {
    min-height: 13rem;
  }

  .ife-home-events .institut-calendar__nav {
    gap: .35rem;
  }

  .ife-home-events .institut-calendar__nav h2 {
    font-size: 1.15rem;
  }
}

@media (max-width: 560px) {
  .ife-home-events__cards .institut-events--grid .institut-events__items {
    grid-template-columns: 1fr !important;
  }

  .ife-home-events .ife-rail .institut-events--grid .institut-events__items {
    display: flex !important;
    grid-template-columns: none !important;
  }

  .ife-home-events__cards .institut-event__media {
    min-height: 12.5rem;
  }
}

@media (max-width: 479px) {
  .ife-home-events .institut-calendar__nav-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ife-home-events .institut-calendar__nav-btn,
  .ife-home-events .institut-events--home .institut-calendar__day {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: none;
  }
}
