/* ============================================================
   VALHALLA OTAKU — Styles page calendrier
   ============================================================ */

/* HEADER PAGE */
.page-header {
  background: var(--ink);
  border-bottom: 1px solid var(--gold-dim);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.page-header-title {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin: 0.4rem 0 0.75rem;
}

.page-header-sub {
  font-style: italic;
  color: var(--dust);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* MAIN */
.cal-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* BANNER AUJOURD'HUI */
.today-banner {
  background: var(--ink);
  border: 1px solid var(--gold-dim);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.today-label {
  font-family: var(--font-title);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.today-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.today-hero {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.today-candle { font-size: 1.1rem; }

.today-name {
  font-family: var(--font-title);
  font-size: 0.88rem;
  color: var(--parchment);
}

.today-anime {
  font-style: italic;
  font-size: 0.82rem;
  color: var(--dust);
}

.today-link {
  font-family: var(--font-title);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  margin-left: auto;
  transition: color var(--transition);
}

/* CONTROLES CALENDRIER */
.cal-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
}

.filter-box {
  min-width: 200px;
}

.cal-input, .cal-select {
  width: 100%;
  background: var(--ash);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--parchment);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

/* GRILLE DES MOIS */
.months-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* LIGNE DE MOIS */
.cal-month-row {
  background: var(--ash);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.cal-month-row--today {
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: 0 0 15px rgba(201, 168, 76, 0.05);
}

.cal-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: rgba(255,255,255,0.02);
  transition: background var(--transition);
}

.cal-month-header.active {
  background: rgba(201, 168, 76, 0.08);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cal-month-label {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.cal-month-name {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
  line-height: 1.2;
  transition: color var(--transition);
}

.cal-month-header.active .cal-month-name {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(201, 168, 76, 0.3);
}

.cal-today-pill {
  font-size: 0.62rem;
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  padding: 2px 10px;
  border-radius: 20px;
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cal-month-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cal-month-count {
  font-size: 0.85rem;
  color: var(--dust);
  font-style: italic;
}

/* BOUTON TOGGLE ÉLÉGANT (STYLE TITRE) */
.cal-toggle-btn {
  background: transparent;
  border: none;
  color: var(--gold);
  padding: 0.4rem 0.8rem;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cal-toggle-btn:hover {
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.5);
  transform: translateY(-1px);
}

.cal-month-header.active .cal-toggle-btn {
  background: transparent;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(201, 168, 76, 0.3);
}

.cal-toggle-btn.open {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.cal-toggle-icon {
  font-size: 0.6rem;
  transition: transform 0.3s;
}

/* LISTE DES HÉROS */
.cal-month-list {
  background: rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* ITEM HÉROS CALENDRIER */
.cal-item {
  background: var(--ash);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

.cal-item:hover {
  background: var(--stone);
  padding-left: 1.75rem;
}

.cal-item.today {
  border-left: 4px solid var(--gold);
}

.cal-avatar-wrapper {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  position: relative;
}

.cal-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-dim);
  background: var(--ink);
}

.cal-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--stone);
  border: 2px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--dust);
}

.cal-info { flex: 1; }

.cal-name-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.15rem;
}

.cal-day {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.15);
  padding: 2px 10px;
  border-radius: 20px;
  min-width: 38px;
  text-align: center;
}

.cal-name {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--parchment);
  font-weight: 600;
}

.cal-item.today .cal-name { color: var(--gold); }

.cal-anime {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--dust);
  margin-left: 3rem; /* Alignement avec le nom après le jour */
}

/* BOUTON RETOUR EN HAUT */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 55px;
  height: 55px;
  background: var(--ink);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 10000; /* Toujours au-dessus */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  padding-bottom: 4px; /* Centrage visuel de la flèche */
}

.scroll-top-btn:hover {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-5px);
  border-color: var(--gold);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .cal-month-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .cal-month-meta {
    width: 100%;
    justify-content: space-between;
  }
  .cal-month-name {
    font-size: 1.1rem;
  }
  .cal-anime {
    margin-left: 0;
  }
}