/* Page d'accueil du joueur connecté (home.html) : widgets Événements et Nouveautés */

.home-widgets {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);   /* l'événement un peu plus large que les news */
  gap: 24px;
  max-width: 1100px;
  margin: 32px auto 48px;
  padding: 0 16px;
}

/* Petite étiquette en haut de chaque widget ("Events", "News") */
.widget-label {
  margin: 0 0 16px;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9aa0ad;
}

/* ---------- Événement mis en avant ---------- */

.event-card {
  position: relative;
  overflow: hidden;
  padding: 24px 28px 20px;
  border: 1px solid rgba(234, 183, 17, 0.35);
  border-radius: 20px;
  /* lueur dorée qui part du bas, comme le côté "physique" du logo */
  background:
    radial-gradient(ellipse at 50% 110%, rgba(234, 183, 17, 0.28), transparent 60%),
    #14161f;
}

/* Les 3 cartes en éventail */
.event-fan {
  position: relative;
  height: 210px;
  margin-bottom: 20px;
}

.fan-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 120px;
  aspect-ratio: 269 / 385;
  margin-left: -60px;                       /* centrée */
  background: url("../images/card_back.png") center / 100% 100% no-repeat;
  border-radius: 10px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(234, 183, 17, 0.45));
  transform-origin: 50% 100%;
}

.fan-card:nth-child(1) { transform: translateX(-70px) rotate(-12deg); }
.fan-card:nth-child(2) { transform: translateY(-14px); z-index: 1; }
.fan-card:nth-child(3) { transform: translateX(70px) rotate(12deg); }

.event-meta {
  margin: 0 0 6px;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa0ad;
}

.event-tag {
  color: #eab711;
}

.event-title {
  margin: 0;
  text-align: left;                         /* les h2 du site sont centrés par défaut */
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.05;
  color: #f2f3f7;
}

.event-subtitle {
  margin: 8px 0 20px;
  color: #9aa0ad;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.event-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: bold;
  text-decoration: none;
}

.event-btn-primary {
  flex: 1 1 auto;
  justify-content: space-between;
  background: linear-gradient(to bottom, #f5c93a, #d9a40a);
  color: #0f1117;
}

.event-btn-primary:hover {
  background: linear-gradient(to bottom, #ffd75a, #e6b01a);
}

/* Pastille du nombre de tirages gratuits disponibles */
.event-count {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #0f1117;
  color: #eab711;
}

.event-btn-secondary {
  border: 1px solid #2a2e3a;
  color: #e7eaf4;
}

.event-btn-secondary:hover {
  border-color: #eab711;
}

/* Les liens du <main> sont bleus par défaut (style.css) : on garde les couleurs des boutons */
main .event-btn-primary { color: #0f1117; }
main .event-btn-secondary { color: #e7eaf4; }

/* Points du carrousel (un par événement) */
.event-dots {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.event-dots span {
  width: 24px;
  height: 5px;
  border-radius: 3px;
  background-color: #2a2e3a;
}

.event-dots .active {
  width: 40px;
  background-color: #eab711;
}

/* ---------- Nouveautés ---------- */

.news-card {
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
  border: 1px solid rgba(18, 181, 240, 0.3);
  border-radius: 20px;
  /* lueur bleue : le côté "numérique" du logo */
  background:
    radial-gradient(ellipse at 100% 0%, rgba(18, 181, 240, 0.16), transparent 55%),
    #14161f;
}

.news-list {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  padding: 14px 0;
  border-bottom: 1px solid #23273a;
}

.news-list li:first-child {
  padding-top: 0;
}

.news-list h3 {
  margin: 6px 0 4px;
  font-size: 1.1rem;
  color: #f2f3f7;
}

.news-list p {
  margin: 0;
  color: #9aa0ad;
  line-height: 1.5;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.news-tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: bold;
  color: #0f1117;
}

.news-tag-new  { background-color: #12b5f0; }
.news-tag-shop { background-color: #a66bff; }
.news-tag-soon { background-color: #eab711; }

.news-more {
  margin-top: 16px;
  font-weight: bold;
}

/* ---------- Onglets News / Patch notes ---------- */

.news-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid #23273a;
}

/* même look que l'étiquette "Events" ; l'onglet actif est souligné en bleu */
.news-tab {
  margin-bottom: -1px;               /* le soulignement recouvre la ligne grise */
  padding: 0 0 10px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b7180;
  cursor: pointer;
}

.news-tab:hover {
  background: none;                  /* pas le jaune des boutons du site */
  color: #c4c8d2;
}

.news-tab[aria-selected="true"] {
  border-bottom-color: #12b5f0;
  color: #f2f3f7;
}

/* le panneau prend la hauteur restante : "See all" reste en bas de la carte */
.news-panel:not([hidden]) {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- Patch notes ---------- */

.patch-list {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.patch-list > li {
  padding: 14px 0;
  border-bottom: 1px solid #23273a;
}

.patch-list > li:first-child {
  padding-top: 0;
}

.patch-version {
  font-family: ui-monospace, "Consolas", monospace;
  font-weight: bold;
  color: #f2f3f7;
}

.patch-changes {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.patch-changes li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 3px 0;
  color: #9aa0ad;
  line-height: 1.5;
}

/* petite étiquette de couleur devant chaque changement */
.patch-type {
  flex-shrink: 0;
  width: 64px;
  padding: 1px 0;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: bold;
  text-align: center;
}

.patch-type-add    { color: #2ecc71; }
.patch-type-change { color: #12b5f0; }
.patch-type-fix    { color: #eab711; }

/* ---------- Tablette et téléphone : les deux widgets l'un sous l'autre ---------- */
@media (max-width: 900px) {
  .home-widgets {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .event-card,
  .news-card {
    padding: 20px;
  }

  .fan-card {
    width: 96px;
    margin-left: -48px;
  }

  .fan-card:nth-child(1) { transform: translateX(-56px) rotate(-12deg); }
  .fan-card:nth-child(3) { transform: translateX(56px) rotate(12deg); }

  .event-fan {
    height: 170px;
  }
}
