/* ============================================================
   RSL-X — Titan page V2  |  Dark Fantasy
   ============================================================ */

/* ── Titan Banner (top) ─────────────────────────────────── */
#fusion-banner {
  display: flex;
  gap: 20px;
  width: 92%;
  margin: 20px auto 24px;
  padding: 18px 24px;
  background: linear-gradient(180deg, rgba(22,18,16,0.96), rgba(8,7,7,0.94));
  border: 1px solid rgba(201,169,106,0.22);
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  align-items: center;
}

.banner-champion {
  display: flex;
  gap: 18px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.banner-champ-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

@font-face {
  font-family: "MiddAges";
  src: url('/style/MiddAges.ttf') format('truetype');
  font-display: swap;
}

#page-title {
  font-family: "MiddAges", "Transcend", "Cormorant Garamond", serif;
}

.banner-champ-name {
  font-family: "MiddAges", "Transcend", "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 600;
  color: #f1ddb1;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(201,169,106,0.3);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-champ-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.banner-type-pill {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #c9a96a;
  padding: 3px 10px;
  border: 1px solid rgba(201,169,106,0.35);
  background: rgba(201,169,106,0.06);
}

.banner-datespan {
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  font-weight: 600;
  color: rgba(232,224,210,0.75);
  letter-spacing: 0.5px;
}

.banner-progress {
  flex: 1 1 360px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.banner-progress-header {
  font-family: "Transcend", "Cormorant Garamond", serif;
  font-size: 16px;
  font-weight: 600;
  color: #c9a96a;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(201,169,106,0.2);
}

.banner-progress-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 900px) {
  #fusion-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .banner-champion { width: 100%; }
  .banner-progress {
    max-width: 100%;
    width: 100%;
    flex: 0 0 auto;
  }
}

/* ── Legend strip (below calendar) ────────────────────────── */
#legend-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  width: 92%;
  margin: 0 auto 20px;
  padding: 10px 20px;
  background: rgba(12,10,9,0.7);
  border: 1px solid rgba(201,169,106,0.18);
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #e8e0d2;
}

#legend-strip > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.skipped     { background: #ff3333; }
.legend-dot.in-progress { background: #ffa500; }
.legend-dot.done        { background: #4caf50; }
.legend-dot.not-started { background: #e0e0e0; }

/* ── Progress stats (inside banner) ──────────────────────── */
.stat {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(201,169,106,0.15);
  border-radius: 0;
  padding: 8px 12px;
  transition: background .3s ease, border-color .3s ease;
}
.stat:hover {
  background: rgba(201,169,106,0.1);
  border-color: rgba(201,169,106,0.4);
}
.stat .label { font-size: 13px; opacity: 0.85; }
.stat .value { font-size: 18px; font-weight: 700; color: #e8e0d2; }
.stat img.stat-icon {
  width: 48px; height: 48px;
  object-fit: contain;
}

.frag-bar {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  margin: 6px 0 4px;
  overflow: hidden;
}
.frag-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  background: linear-gradient(90deg, #c9a96a, #f8e16c);
  box-shadow: 0 0 8px rgba(201,169,106,0.6);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ——— Event blocks V2 — inline (name + rewards on one line) ——— */
.event-block {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 4px 6px;
  gap: 8px;
  overflow: hidden;
  height: 40px;
}

.event-block.type-tournament {
  background: rgba(30, 60, 140, 0.18);
  border-color: rgba(90, 140, 220, 0.5);
}
.event-block.type-tournament .event-name { color: #8aaee0; }

.event-block.type-event {
  background: rgba(15, 90, 40, 0.18);
  border-color: rgba(60, 170, 100, 0.5);
}
.event-block.type-event .event-name { color: #72c497; }

/* Titres des blocs — flex left, ellipsis, centré vertical */
.event-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: left;
  font-family: "Cormorant Garamond", serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 32px;
  margin: 0;
}

/* Points — flex right, ne pas écraser */
.points-container {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.point-box {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 2px;
  overflow: hidden;
  border: none;
  border-radius: 0 !important;
  background: rgba(0,0,0,0.45);
  box-shadow: none;
}

.event-block .point-box img {
  width: 100%;
  height: 100% !important;
  min-width: unset;
  max-width: unset;
  min-height: unset !important;
  max-height: unset !important;
  object-fit: contain;
  flex: none;
  display: block;
}

.point-box span {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  padding: 0 2px;
  background: rgba(0,0,0,0.72);
  color: #e8e0d2;
  white-space: nowrap;
}

.point-box.state-validated { border: 1px solid rgba(76,175,80,0.7); }
.point-box.state-validated span { background: rgba(76,175,80,0.88); color: #fff; }
.point-box.state-ongoing { border: 1px solid rgba(255,165,0,0.7); }
.point-box.state-ongoing span   { background: rgba(255,165,0,0.88); color: #111; }
.point-box.state-passed { border: 1px solid rgba(220,40,40,0.7); }
.point-box.state-passed span    { background: rgba(220,40,40,0.88); color: #fff; }
.point-box.state-upcoming { border: 1px solid rgba(223,223,223,0.5); }
.point-box.state-upcoming span  { background: rgba(0,0,0,0.72); color: #e8e0d2; }

/* Event reset — inline flex item, à gauche */
.event-reset {
  flex: 0 0 auto;
  position: static;
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s ease;
  display: grid;
  place-items: center;
}
.event-reset:hover { opacity: 1; }
.event-reset svg {
  color: #c9a96a;
  width: 11px;
  height: 11px;
  stroke-width: 2;
  display: block;
}

/* ——— Section separators ——— */
.section-separator {
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.section-separator::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}
.section-separator[data-section="tournament"]::before { background: rgba(90,140,220,0.3); }
.section-separator[data-section="event"]::before      { background: rgba(60,170,100,0.3); }

.section-separator-label {
  position: relative;
  background: #090807;
  padding: 3px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: "Cormorant Garamond", serif;
}
.section-separator[data-section="tournament"] .section-separator-label {
  color: rgba(90,140,220,0.7);
  border: 1px solid rgba(90,140,220,0.25);
}
.section-separator[data-section="event"] .section-separator-label {
  color: rgba(60,170,100,0.7);
  border: 1px solid rgba(60,170,100,0.25);
}

/* Timeline horizontal line */
.timeline-line { top: 65px; }

/* Date columns */
.date-column .day {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 17px;
}
.date-column .date {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 15px;
}

/* Potion keep pills */
.keep-pill {
  display: block;
  width: 70%;
  height: 8px;
  border-radius: 4px;
  margin: 5px auto 8px;
  position: relative;
  z-index: 1;
  cursor: default;
}
.keep-spirit { background: rgba(76, 155, 80, 0.45); }
.keep-force  { background: rgba(180, 50, 50, 0.45); }
.keep-magic  { background: rgba(40, 120, 190, 0.45); }
.keep-void   { background: rgba(110, 55, 145, 0.45); }

/* ——— Events terminés — overrides ——— */
.event-block.event-ended,
.event-block.event-ended.type-tournament,
.event-block.event-ended.type-event {
  background: repeating-linear-gradient(
    135deg,
    rgba(245, 37, 37, 0.12) 0px,
    rgba(245, 37, 37, 0.12) 4px,
    rgba(75, 75, 75, 0.1) 4px,
    rgba(75, 75, 75, 0.1) 8px
  );
  border-color: rgba(255, 50, 50, 0.4);
  box-shadow: 0 0 10px rgba(255, 50, 50, 0.2);
}
.event-block.event-ended .event-name,
.event-block.event-ended.type-tournament .event-name,
.event-block.event-ended.type-event .event-name {
  color: rgba(255, 80, 80, 0.9);
  text-shadow: none;
}

.event-block.event-ended.validated,
.event-block.event-ended.validated.type-tournament,
.event-block.event-ended.validated.type-event {
  background: repeating-linear-gradient(
    135deg,
    rgba(37, 245, 37, 0.1) 0px,
    rgba(37, 245, 37, 0.1) 4px,
    rgba(75, 75, 75, 0.1) 4px,
    rgba(75, 75, 75, 0.1) 8px
  );
  border-color: rgba(0, 201, 27, 0.4);
  box-shadow: 0 0 10px rgba(0, 201, 27, 0.2);
}
.event-block.event-ended.validated .event-name,
.event-block.event-ended.validated.type-tournament .event-name,
.event-block.event-ended.validated.type-event .event-name {
  color: rgba(5, 136, 1, 0.85);
  text-shadow: 0 0 8px rgba(0, 255, 150, 0.4);
}

.event-block.event-ended.partial,
.event-block.event-ended.partial.type-tournament,
.event-block.event-ended.partial.type-event {
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 140, 0, 0.12) 0px,
    rgba(255, 140, 0, 0.12) 4px,
    rgba(75, 75, 75, 0.1) 4px,
    rgba(75, 75, 75, 0.1) 8px
  );
  border-color: rgba(255, 140, 0, 0.45);
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.2);
}
.event-block.event-ended.partial .event-name,
.event-block.event-ended.partial.type-tournament .event-name,
.event-block.event-ended.partial.type-event .event-name {
  color: rgba(255, 160, 0, 0.9);
  text-shadow: none;
}
