.announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.announcement-modal.is-hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.announcement-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.58);
}

.announcement-modal__dialog {
  position: relative;
  z-index: 1;
  width: calc(100vw - 48px);
  height: calc(100vh - 48px);
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.announcement-modal__layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  height: 100%;
}

.announcement-modal__left {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-right: 1px solid #e5e7eb;
  min-height: 0;
  overflow: hidden;
}

.announcement-modal__school-hero {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
}

.announcement-modal__school-hero-image {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.announcement-modal__school-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(22, 16, 12, 0.7) 0%,
    rgba(22, 16, 12, 0.4) 35%,
    rgba(22, 16, 12, 0.15) 60%,
    rgba(22, 16, 12, 0) 100%
  );
  z-index: 1;
}

.announcement-modal__school-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
}

.announcement-modal__school-hero-content {
  position: absolute;
  inset: 0;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 4px;
  background: linear-gradient(
    180deg,
    rgba(22, 16, 12, 0.55) 0%,
    rgba(22, 16, 12, 0.3) 45%,
    rgba(22, 16, 12, 0.45) 100%
  );
  color: #ffffff;
  z-index: 2;
}

.announcement-modal__school-hero-title {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.announcement-modal__school-hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 1.05rem + 0.5vw, 1.65rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.announcement-modal__school-hero-title .colibris-hero__logo {
  width: 100%;
  max-width: 600px;
}

.announcement-modal__school-hero-title .colibris-hero__logo img {
  width: 100%;
  height: auto;
}

.announcement-modal__school-hero-subtitle {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: #f3f4f6;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.announcement-modal__school-hero-description {
  margin: 0 0 16px;
  font-size: 1.3rem;
  color: #e5e7eb;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.announcement-modal__school-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: auto 0 22px;
  flex-wrap: wrap;
}

.announcement-modal__school-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 248, 235, 0.85);
  font-family: "Montserrat", sans-serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.announcement-modal__school-tag:hover {
  color: rgba(255, 248, 235, 1);
  transform: translateY(-1px);
  text-decoration: none;
}

.announcement-modal__school-tag em {
  font-family:
    "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", sans-serif;
  font-style: normal;
  font-weight: 600;
}

.announcement-modal__school-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

.announcement-modal__school-hero-content .announcement-modal__cta {
  align-self: center;
  margin-top: 20px;
  margin-bottom: auto;
}

.announcement-modal__right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px;
  height: 100%;
}

.announcement-modal__flyer-wrap {
  flex: 1;
  width: 100%;
  min-height: 120px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcement-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.announcement-modal__close:hover {
  background: rgba(0, 0, 0, 0.15);
}

.announcement-modal__file-link {
  display: inline-flex;
  margin: 0;
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.announcement-modal__file-link:hover {
  text-decoration: underline;
}

.announcement-modal__flyer-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
}

.announcement-modal__text {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  line-height: 1.6;
  margin-top: 10px;
}

.announcement-modal__cta {
  display: inline-flex;
  padding: 11px 18px;
  border-radius: 10px;
  background: #487bff;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.announcement-modal__cta:hover {
  background: #2f63ea;
  color: #ffffff;
}

body.announcement-modal-open {
  overflow: hidden;
}

/* Tablette + mobile : on empile hero + flyer, et le contenu dicte la hauteur */
@media (max-width: 900px) {
  .announcement-modal {
    padding: 16px;
  }

  .announcement-modal__dialog {
    width: calc(100vw - 32px);
    height: auto;
    max-height: calc(100dvh - 32px);
    overflow: auto;
  }

  .announcement-modal__layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
  }

  .announcement-modal__left {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  /* Le contenu dicte la hauteur du hero, l'image passe en fond absolu */
  .announcement-modal__school-hero {
    position: relative;
    height: auto;
    min-height: 0;
  }

  .announcement-modal__school-hero-image {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .announcement-modal__school-hero-content {
    position: relative;
    inset: auto;
    min-height: 240px;
    padding: 24px 20px;
    justify-content: center;
  }

  /* Bloc compact centré : on annule les marges auto du desktop */
  .announcement-modal__school-tags {
    margin: 12px 0 14px;
  }

  .announcement-modal__school-hero-content .announcement-modal__cta {
    margin-bottom: 0;
  }

  /* Logo dans le flux (pas en absolu) pour ne pas chevaucher le texte */
  .announcement-modal__school-hero-title {
    position: static;
    left: auto;
    right: auto;
    top: auto;
  }

  .announcement-modal__flyer-wrap {
    min-height: 300px;
    flex: none;
  }
}

@media (max-width: 640px) {
  .announcement-modal {
    padding: 12px;
  }

  .announcement-modal__dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }

  .announcement-modal__school-hero-content {
    padding: 20px 16px;
  }

  .announcement-modal__school-hero-title .colibris-hero__logo {
    max-width: 200px;
  }

  .announcement-modal__school-tags {
    gap: 14px;
    margin: 10px 0 12px;
  }

  .announcement-modal__school-tag {
    font-size: 17px;
    gap: 8px;
  }

  /* Description longue masquée sur petit écran */
  .announcement-modal__school-hero-description {
    display: none;
  }

  .announcement-modal__right {
    padding: 10px;
  }

  .announcement-modal__flyer-wrap {
    min-height: 240px;
  }
}
