/* Fenêtre d'annonce du discours du Maire (accueil). Rectangle aux coins légèrement arrondis : le portrait entier du Maire, puis le libellé, le titre, la description et le bouton.
   Sa taille suit la hauteur de l'écran : elle tient toujours entière, sans défilement. Voir discours-annonce.js (qui l'ouvre et l'arrête à l'échéance). */
.mdis {
  margin: auto;
  width: min(50rem, calc(100vw - 1.25rem), calc((100dvh - 3rem - 15rem) * 1.7768));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.5);
}
.mdis::backdrop {
  background: rgba(0, 0, 0, 0.75);
}
@media (min-width: 40rem) {
  .mdis {
    width: min(50rem, calc(100vw - 1.25rem), calc((100dvh - 3rem - 11.5rem) * 1.7768));
  }
}
.mdis__box {
  position: relative;
}
.mdis__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 3px;
  background: var(--brand);
  color: var(--white);
  cursor: pointer;
}
.mdis__close:hover {
  background: #b81c11;
}
.mdis__close svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.mdis__photo {
  display: block;
  width: 100%;
  height: auto;
}
.mdis__body {
  display: grid;
  gap: 1rem;
  align-items: end;
  padding: 1rem 1.25rem 1.1rem;
  border-top: 4px solid var(--brand);
}
.mdis__tag {
  margin: 0;
  font: 700 0.75rem/1 var(--body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}
.mdis__title {
  margin: 0.4rem 0 0;
  font: 400 1.125rem/1.2 var(--title);
  text-transform: uppercase;
  text-wrap: balance;
}
.mdis__text {
  margin: 0.4rem 0 0;
  font: 400 0.875rem/1.5 var(--body);
  color: var(--steel);
}
.mdis__btn {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
  border-radius: 3px;
  background: var(--brand);
  color: var(--white);
  font: 700 0.875rem/1 var(--body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}
.mdis__btn:hover {
  background: #b81c11;
}
.mdis__btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (min-width: 40rem) {
  .mdis__body {
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
  }
  .mdis__title {
    font-size: 1.25rem;
  }
}

/* ---- Mise en avant du discours dans le hero de l'accueil : pastille avec la photo du Maire, le libellé et « Voir le discours ». ---- */
.hero-speech {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: clamp(1rem, 3vh, 1.75rem);
  padding: 0.4rem 1.2rem 0.4rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.hero-speech:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--white);
}
.hero-speech:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 3px;
}
.hero-speech__photo {
  flex: none;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid var(--brand);
}
/* Portrait carré (tête et épaules) déjà recadré : assets/maire-avatar.webp. */
.hero-speech__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-speech__text {
  display: grid;
  gap: 0.35rem;
}
.hero-speech__label {
  font: 700 0.6875rem/1 var(--body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-light);
}
.hero-speech__go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 700 0.9375rem/1.1 var(--body);
}
.hero-speech__go svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}
.hero-speech:hover .hero-speech__go svg {
  transform: translateX(0.25rem);
}

/* Ordinateur : en bas à droite du hero, au niveau du bas du compte à rebours. Téléphone et tablette en hauteur (moins de 52 rem) : elle reste sous le texte, centrée. */
@media (min-width: 52.01rem) {
  .hero-speech {
    position: absolute;
    right: clamp(1rem, 3vw, 2.75rem);
    bottom: clamp(3.5rem, 9vh, 5.8rem);
    z-index: 2;
    margin-top: 0;
  }
}
@media (max-width: 52rem) {
  .hero-speech {
    margin-inline: auto;
  }
}
