/* Carte événement compacte pour la page d’accueil. */

.event-teaser[hidden] {
  display: none;
}

.event-teaser {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  width: min(540px, calc(100vw - 36px));
  padding: 12px;
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(18, 93, 168, .14);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 54px rgba(11, 55, 98, .2);
  animation: eventTeaserIn 320ms ease both;
}

.event-teaser__image {
  width: 104px;
  height: auto;
  aspect-ratio: 2 / 3;
  display: block;
  border-radius: 10px;
  object-fit: contain;
  background: #f4f7fa;
}

.event-teaser__content {
  min-width: 0;
}

.event-teaser__eyebrow {
  margin: 0 0 5px;
  color: #158447;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.event-teaser h2 {
  margin: 0;
  color: #0b3762;
  font-size: clamp(18px, 2.5vw, 22px);
  line-height: 1.15;
}

.event-teaser__meta {
  margin: 7px 0 10px;
  color: #536779;
  font-size: 13px;
  line-height: 1.45;
}

.event-teaser__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: #125da8;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.event-teaser__link:hover,
.event-teaser__link:focus-visible {
  background: #0b477f;
}

.event-teaser__close {
  align-self: start;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #edf3f7;
  color: #29465f;
  font-size: 21px;
  cursor: pointer;
}

.event-teaser__close:hover,
.event-teaser__close:focus-visible {
  background: #dfeaf1;
  outline: 2px solid #125da8;
  outline-offset: 2px;
}

@keyframes eventTeaserIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .event-teaser-visible .cat-assistant-launcher,
  .event-teaser-visible .cat-assistant,
  .event-teaser-visible .wa-widget {
    display: none !important;
  }

  .event-teaser {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    grid-template-columns: 76px 1fr auto;
    gap: 10px;
    border-radius: 14px;
  }

  .event-teaser__image {
    width: 76px;
    height: auto;
    aspect-ratio: 2 / 3;
  }

  .event-teaser__meta {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .event-teaser__link {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-teaser { animation: none; }
}
