/* Bloc fixe (ouvert) */
.soi-teaser {
  position: fixed;
  top: 200px;
  right: 0;
  width: 400px;
  max-width: 90vw;
  z-index: 9999;
  background: #ffffffd1;
  color: #1a1a1a;
  border-radius: 12px 0 0 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.15);
  overflow: hidden;
  transform: translateX(0);
  transition: transform .25s ease, opacity .2s ease;
  opacity: 1;
}

/* Fermé */
.soi-teaser[aria-hidden="true"] {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

/* En-tête et badge */
.soi-teaser__head { padding: 10px 16px 0; }
.soi-teaser__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
}

/* Corps */
.soi-teaser__body { padding: 12px 16px 16px; }
.soi-teaser__title { margin: 8px 0 6px; font-size: 18px; line-height: 1.2; }
.soi-teaser__date { margin: 6px 0; }
.soi-teaser__address { margin: 0 0 8px; white-space: pre-line; }
.soi-teaser__message { margin: 8px 0 12px; }
.soi-teaser__cta .soi-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  background: #111827;
  color: #fff;
  font-weight: 600;
}
.soi-teaser__cta .soi-btn:hover { opacity: .9; }

/* Bouton croix */
.soi-teaser__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}
.soi-teaser__close:hover { color: #111827; }

/* Bouton rond réduit */
.soi-teaser-toggle {
  position: fixed;
  top: 200px;
  right: 16px;
  width: 63px;
  height: 52px;
  border-radius: 999px;
  border: none;
  background: #787971;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  z-index: 10000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* Cache le bouton quand aria-hidden="true" sur lui */
.soi-teaser-toggle[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

/* Petit effet hover */
.soi-teaser-toggle:hover { transform: translateY(-2px); }

.soi-teaser-toggle__icon,
.soi-teaser-toggle__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mapping couleurs (badge) */
#itinerance-teaser[data-color="bleu"] .soi-teaser__badge { background: #dbeafe; color: #1e40af; }
#itinerance-teaser[data-color="vert"] .soi-teaser__badge { background: #dcfce7; color: #166534; }
#itinerance-teaser[data-color="rouge"] .soi-teaser__badge { background: #fee2e2; color: #991b1b; }
#itinerance-teaser[data-color="orange"] .soi-teaser__badge { background: #ffedd5; color: #9a3412; }
#itinerance-teaser[data-color="jaune"] .soi-teaser__badge { background: #fef9c3; color: #854d0e; }
#itinerance-teaser[data-color="rose"] .soi-teaser__badge { background: #ffe4e6; color: #9f1239; }
#itinerance-teaser[data-color="violet"] .soi-teaser__badge { background: #ede9fe; color: #5b21b6; }

/* Responsive */
@media (max-width: 480px) {
  .soi-teaser { width: 92vw; border-radius: 12px; right: 4vw; }
  .soi-teaser-toggle { right: 12px; }
}
