/* Bandeau « Annonce » — onglet vertical fixe placé AU-DESSUS de
   « Nous contacter » (.inmail). Fichier dédié : aucune règle de
   public-site.css n'est modifiée ni surchargée, classes toutes préfixées
   .annonce. L'apparence de l'onglet reprend celle de .inmail-toggle (même
   format) ; --annonce-offset (demi-hauteur de l'onglet contact + écart) et
   --annonce-toggle-w sont posées par js/announce.js, la hauteur de l'onglet
   contact variant selon la langue. */

.annonce {
  position: fixed;
  right: 0;
  /* Bas de l'onglet = 50% (centre de l'onglet contact) - demi-hauteur de
     l'onglet contact - écart. Pas de transform sur ce conteneur : le panneau
     est en position: fixed et un transform en ferait son bloc conteneur. */
  bottom: calc(50% + var(--annonce-offset, 92px));
  z-index: 90;
}

.annonce-toggle {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 16px 10px;
  border-radius: 10px 0 0 10px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: -4px 0 16px rgba(16, 33, 58, 0.15);
}

.annonce-toggle:hover {
  background: var(--primary-deep);
}

.annonce-panel {
  position: fixed;
  top: 50%;
  right: calc(var(--annonce-toggle-w, 36px) + 10px);
  transform: translateY(-50%);
  width: min(380px, calc(100vw - 70px));
  max-height: 80vh;
  overflow-y: auto;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(16, 33, 58, 0.2);
  padding: 20px;
}

.annonce-panel[hidden] {
  display: none;
}

.annonce-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.annonce-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.annonce-close {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.annonce-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.annonce-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.annonce-nav-btn:hover {
  background: var(--primary);
  color: #fff;
}

.annonce-counter {
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 70px;
  text-align: center;
}

.annonce-slide[hidden] {
  display: none;
}

.annonce-date {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.annonce-body {
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.annonce-body h3,
.annonce-body h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.annonce-body p {
  margin: 0 0 8px;
}

.annonce-body ul,
.annonce-body ol {
  margin: 0 0 8px 20px;
  padding: 0;
}

.annonce-body a {
  color: var(--primary);
  text-decoration: underline;
}

.annonce-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.annonce-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.annonce-all {
  font-size: 0.82rem;
  color: var(--primary);
}

@media (max-width: 640px) {
  .annonce-toggle {
    padding: 12px 8px;
    font-size: 0.75rem;
  }
}

/* Page publique /{lang}/annonces */
.announce-entry {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px 20px;
  margin: 16px 0;
  text-align: left;
}

.announce-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.announce-status {
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.announce-status.is-open { color: #067647; }
.announce-status.is-closed { color: #b42318; }

.announce-entry-body { line-height: 1.6; overflow-wrap: anywhere; }
.announce-entry-body h3, .announce-entry-body h4 { margin: 0 0 6px; }
.announce-entry-body p { margin: 0 0 8px; }
.announce-entry-body ul, .announce-entry-body ol { margin: 0 0 8px 22px; padding: 0; }
.announce-entry-body a { color: var(--primary); text-decoration: underline; }
