/* Annonces (annonces.js) : l'avis du Héraut d'Aubemont. Préfixe an-.
   Discret : un parchemin sombre bordé d'or, plus bas et plus calme que les cartes de mode. Aucune animation en boucle. */

.an {
  --an-or: #E9C066;
  position: relative; justify-self: center; width: min(100%, 560px); display: flex; align-items: stretch;
  color: var(--encre, #EDE3D1); isolation: isolate;
  background: radial-gradient(ellipse 60% 140% at 0% 50%, rgba(233, 192, 102, .1), transparent 70%), linear-gradient(180deg, #1D1517, #120C0E);
  border: 1px solid rgba(233, 192, 102, .32); border-left: 3px solid #9E1F2A;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .8);
}
.an-ouvrir {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 12px; min-height: 64px;
  border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.an-ouvrir:focus-visible, .an-fermer:focus-visible { outline: 2px solid var(--serment, #F0D9A0); outline-offset: -3px; }
.an-silhouettes { display: flex; align-items: flex-end; flex: none; color: #4A3C44; }
.an-silhouette { width: 30px; height: 42px; filter: drop-shadow(0 0 6px rgba(233, 192, 102, .22)); }
.an-silhouettes .an-silhouette + .an-silhouette { width: 26px; height: 36px; margin-left: -8px; opacity: .85; }
.an-texte { display: grid; gap: 3px; min-width: 0; }
.an-sur { font: 400 .72rem/1.1 var(--etiquette, serif); letter-spacing: .12em; text-transform: uppercase; color: var(--an-or); }
.an-titre { font: 600 1.12rem/1.15 var(--titre, serif); color: var(--serment, #F0D9A0); }
.an-accroche { font-size: .9rem; line-height: 1.35; color: var(--encre-att, #A8998A); }
.an-lire { font: italic 600 .92rem/1.2 var(--titre, serif); color: var(--an-or); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.an-fermer {
  flex: none; width: 44px; border: 0; border-left: 1px solid rgba(233, 192, 102, .14); background: none; cursor: pointer;
  color: var(--encre-att, #A8998A); font: 300 1.6rem/1 var(--titre, serif);
}
.an-fermer:hover { color: var(--serment, #F0D9A0); }
.an-ouvrir:hover .an-titre { text-decoration: underline; text-underline-offset: 3px; }

/* Ruban : une seule ligne (boutique, salon de la Table) */
.an--ruban { width: 100%; margin: 0 0 14px; }
.an--ruban .an-ouvrir { min-height: 52px; padding: 6px 6px 6px 10px; gap: 10px; }
.an--ruban .an-silhouette { width: 22px; height: 31px; }
.an--ruban .an-silhouettes .an-silhouette + .an-silhouette { width: 19px; height: 27px; margin-left: -6px; }
.an--ruban .an-texte { grid-template-columns: auto auto; justify-content: start; align-items: baseline; column-gap: 10px; }
.an--ruban .an-sur { grid-column: 1 / -1; }
.an--ruban .an-titre { font-size: 1rem; }
.an--ruban .an-lire { font-size: .85rem; }

/* Accueil : arrive après les modes, sans les concurrencer */
.portail-app > .an { opacity: 0; animation: an-apparait .9s ease-out 1.6s forwards; }
@keyframes an-apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ——— La proclamation : un parchemin scellé ——— */
.an-voile {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; overflow: auto;
  background: rgba(5, 3, 4, .82); animation: an-fondu .3s ease-out both;
}
@keyframes an-fondu { from { opacity: 0; } }
.an-parchemin {
  position: relative; width: min(100%, 520px); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 30px clamp(18px, 6vw, 38px) 24px; color: #2A1A10;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(255, 250, 235, .55), transparent 60%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(140, 100, 50, .28), transparent 70%),
    linear-gradient(180deg, #EFE2C0, #DCC79A);
  border: 1px solid #8A6A3A; box-shadow: 0 0 0 4px #1A1012, 0 0 0 5px rgba(233, 192, 102, .45), 0 30px 80px rgba(0, 0, 0, .7);
  animation: an-deroule .45s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes an-deroule { from { opacity: 0; transform: translateY(18px) scaleY(.94); } }
.an-p-sur { margin: 0; text-align: center; font: 400 .78rem/1.2 var(--etiquette, serif); letter-spacing: .16em; text-transform: uppercase; color: #7A1A1A; }
.an-parchemin h2 { margin: 6px 0 16px; text-align: center; font: 600 clamp(1.6rem, 6vw, 2rem)/1.1 var(--titre, serif); color: #3A1A10; }
.an-parchemin > p { margin: 0 0 12px; font-size: 1rem; line-height: 1.55; }
.an-parchemin > h2 + p::first-letter { float: left; font: 600 2.6em/.85 var(--titre, serif); color: #9E1F2A; margin: 4px 6px 0 0; }
.an-arrivants { list-style: none; margin: 16px 0; padding: 12px 0; display: grid; gap: 12px; border-top: 1px solid rgba(90, 60, 30, .35); border-bottom: 1px solid rgba(90, 60, 30, .35); }
.an-arrivants li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.an-arrivants .an-silhouette { width: 40px; height: 56px; color: #2A2024; filter: none; }
.an-arrivants b { display: block; font: 600 1.05rem/1.2 var(--titre, serif); color: #5A1A12; }
.an-arrivants span { display: block; font-size: .94rem; line-height: 1.5; }
.an-cloture { font-style: italic; text-align: center; }
.an-signature { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 16px !important; font: italic 600 .95rem/1.2 var(--titre, serif); color: #5A3A20; }
.an-sceau { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 2px rgba(60, 10, 10, .5)); }
.an-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.an-actions .bouton { min-height: 44px; }
.an-actions .bouton.second { color: #3A1A10; border-color: #8A6A3A; background: transparent; }
.an-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; color: #5A3A20; font: 300 1.8rem/1 var(--titre, serif); }
.an-x:focus-visible, .an-actions .bouton:focus-visible { outline: 2px solid #7A1A1A; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .portail-app > .an, .an-voile, .an-parchemin { animation: none; opacity: 1; transform: none; }
}
:root[data-anim-reduite="1"] :is(.portail-app > .an, .an-voile, .an-parchemin) { animation: none; opacity: 1; }
