/* =====================================================================
   EVENT-CARDS.CSS — Cartes d'événements (haut à droite)
   3 types : Événement (violet), Tirage (or), Bonus (rouge/premium).
   Panneau à coins coupés + liseré coloré selon le type + icône dans un
   médaillon, dans le même langage que le reste du jeu.

   Structure HTML attendue (dans index.html) :
     <aside class="event-stack">
       <button class="event-card purple">
         <div class="event-art"><svg class="event-icon">…</svg></div>
         <div class="event-content">
           <small>ÉVÉNEMENT</small>
           <strong>L'Appel de Sithis</strong>
           <span class="event-timer"><svg class="event-clock">…</svg> 3 j 12 h</span>
         </div>
         <b class="event-chevron"><svg>…</svg></b>
       </button>
       …
     </aside>
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. CONTENEUR
   --------------------------------------------------------------------- */
.event-stack {
  position: absolute;
  z-index: 10;
  right: 28px;
  top: 124px;
  width: 300px;
  display: grid;
  gap: 12px;
}


/* ---------------------------------------------------------------------
   2. LA CARTE
   --------------------------------------------------------------------- */
.event-card {
  /* Couleur par défaut (surchargée par .purple / .gold / .dark plus bas) */
  --card-accent: var(--gold-light, #ffe18a);
  --card-glow: rgba(216, 168, 62, 0.35);

  min-height: 82px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  text-align: left;
  padding: 10px 14px 10px 18px;   /* marge gauche en plus pour le liseré coloré */
  background: linear-gradient(90deg, rgba(20, 13, 38, 0.92) 0%, rgba(11, 8, 19, 0.9) 100%);
  border: 1px solid rgba(216, 168, 62, 0.35);
  /* Coins coupés (même langage que le menu de gauche) */
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Liseré coloré sur le bord gauche (identifie le type de carte au premier coup d'œil) */
.event-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--card-accent), transparent 130%);
  box-shadow: 0 0 10px var(--card-glow);
}

/* Lueur diffuse de la couleur du type, dans le coin supérieur droit */
.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 140px 70px at 100% -10%, var(--card-glow), transparent 70%);
  pointer-events: none;
}

.event-card:hover {
  transform: translateX(-5px);
  border-color: var(--card-accent);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 0 18px var(--card-glow);
}


/* ---------------------------------------------------------------------
   3. LE MÉDAILLON D'ICÔNE
   --------------------------------------------------------------------- */
.event-art {
  position: relative;
  z-index: 1;
  flex: 0 0 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #3a2a72 0%, #180f3c 60%, #0a0620 100%);
  box-shadow: 0 0 0 2px var(--card-accent), 0 0 0 4px rgba(9, 8, 17, 0.9), 0 0 12px 2px var(--card-glow);
}

.event-icon {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.event-icon .ol {
  stroke: var(--void, #090811);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}


/* ---------------------------------------------------------------------
   4. LE TEXTE
   --------------------------------------------------------------------- */
.event-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.event-content small {
  color: var(--card-accent);
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.event-content strong {
  font-family: "Cinzel", serif;
  font-size: 13px;
  color: var(--cream, #f5ead5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-content span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted, #b8aabf);
  font-size: 10px;
}

/* Petite horloge devant le texte du minuteur */
.event-clock {
  width: 11px;
  height: 11px;
  flex: none;
  color: var(--muted, #b8aabf);
}


/* ---------------------------------------------------------------------
   5. LE CHEVRON (">") — glisse légèrement au survol
   --------------------------------------------------------------------- */
.event-card > .event-chevron {
  position: relative;
  z-index: 1;
  margin-left: auto;
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--card-accent);
  transition: transform 0.2s ease;
}

.event-card > .event-chevron svg {
  width: 100%;
  height: 100%;
}

.event-card:hover > .event-chevron {
  transform: translateX(3px);
}


/* ---------------------------------------------------------------------
   6. COULEURS PAR TYPE
   --------------------------------------------------------------------- */
.event-card.purple {           /* Événement : violet magique */
  --card-accent: var(--purple-bright, #9c5ac5);
  --card-glow: rgba(156, 90, 197, 0.45);
}

.event-card.gold {             /* Tirage : or / banane */
  --card-accent: var(--gold-light, #ffe18a);
  --card-glow: rgba(216, 168, 62, 0.45);
}

.event-card.dark {              /* Bonus : rouge premium */
  --card-accent: #ff7a90;
  --card-glow: rgba(194, 60, 80, 0.5);
}

/* La carte Bonus respire doucement pour attirer l'œil (offre du jour) */
.event-card.dark .event-art {
  animation: event-bonus-pulse 2.6s ease-in-out infinite;
}

@keyframes event-bonus-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--card-accent), 0 0 0 4px rgba(9, 8, 17, 0.9), 0 0 10px 1px var(--card-glow); }
  50%      { box-shadow: 0 0 0 2px var(--card-accent), 0 0 0 4px rgba(9, 8, 17, 0.9), 0 0 18px 4px var(--card-glow); }
}


/* ---------------------------------------------------------------------
   7. ACCESSIBILITÉ
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .event-card,
  .event-card > .event-chevron,
  .event-card.dark .event-art {
    transition: none;
    animation: none;
  }
}