/**
 * ═══════════════════════════════════════════════════════════════
 * STYLES CALENDRIER & DASHBOARD ASSOCIATIONS
 * ═══════════════════════════════════════════════════════════════
 */

/* ── SECTION CALENDRIER & DASHBOARD ── */
.calendar-dashboard-section {
  padding: 120px 5vw;
  background: var(--dark);
  position: relative;
}

.calendar-dashboard-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(245,200,0,0.04) 0%, transparent 70%);
}

.calendar-dashboard-inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  color: var(--white);
}
.dashboard-title em {
  font-style: normal;
  color: var(--yellow);
}

.dashboard-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 48px;
  max-width: 500px;
}

/* ── STATISTIQUES ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.stat-block {
  background: var(--dark2);
  border: 1px solid rgba(245,200,0,0.12);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  transition: all .3s;
}
.stat-block:hover {
  border-color: rgba(245,200,0,0.3);
  transform: translateY(-4px);
  background: var(--dark3);
}

.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--yellow);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .5px;
}

/* ── SECTION 2 COLONNES: CALENDRIER + ÉVÉNEMENTS ── */
.calendar-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 80px;
}

/* ── CALENDRIER ── */
.calendar-container {
  background: var(--dark2);
  border: 1px solid rgba(245,200,0,0.12);
  border-radius: 20px;
  padding: 32px;
  overflow: hidden;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.calendar-nav-btn {
  width: 40px;
  height: 40px;
  background: var(--dark3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--white);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}
.calendar-nav-btn:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}

#currentMonth {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
}

#calendarGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-name {
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--dark3);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}

.calendar-day:hover {
  border-color: rgba(245,200,0,0.3);
  background: var(--dark);
  transform: translateY(-2px);
}

.calendar-day.other-month {
  color: var(--muted2);
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.calendar-day.other-month:hover {
  border-color: transparent;
  background: transparent;
  transform: none;
}

.calendar-day.today {
  background: rgba(245,200,0,0.15);
  border-color: var(--yellow);
  color: var(--yellow);
  font-weight: 700;
}

.calendar-day.has-event {
  border-color: rgba(245,200,0,0.25);
  background: rgba(245,200,0,0.08);
}

.event-dots {
  display: flex;
  gap: 4px;
  position: absolute;
  bottom: 4px;
  justify-content: center;
  width: 100%;
}

.event-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0.8;
}

/* ── ÉVÉNEMENTS À VENIR ── */
.upcoming-events {
  background: var(--dark2);
  border: 1px solid rgba(245,200,0,0.12);
  border-radius: 20px;
  padding: 32px;
  height: fit-content;
}

.upcoming-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--white);
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(245,200,0,0.12);
}

#upcomingEvents {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
}
#upcomingEvents::-webkit-scrollbar {
  width: 6px;
}
#upcomingEvents::-webkit-scrollbar-thumb {
  background: rgba(245,200,0,0.3);
  border-radius: 3px;
}

.event-card {
  background: var(--dark3);
  border-radius: 12px;
  padding: 14px;
  transition: all .2s;
}
.event-card:hover {
  background: var(--dark);
  transform: translateX(4px);
}

.event-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: .3px;
}

.assoc-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.event-date {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.event-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}

/* ── MODAL ÉVÉNEMENTS DU JOUR ── */
#dayEventsModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
#dayEventsModal.active {
  display: flex;
}

.day-events-content {
  background: var(--dark2);
  border: 1px solid rgba(245,200,0,0.15);
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  animation: slideIn .3s ease;
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.day-events-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--white);
}

.day-events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-event-item {
  background: var(--dark3);
  border-radius: 12px;
  padding: 14px;
}

.day-event-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.day-event-item h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}

/* ── FILTRE CATÉGORIES ── */
.category-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(245,200,0,0.12);
}

.category-btn {
  background: var(--dark2);
  border: 1px solid rgba(245,200,0,0.12);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: 'Syne', sans-serif;
  letter-spacing: .3px;
}
.category-btn:hover {
  border-color: rgba(245,200,0,0.3);
  color: var(--white);
}
.category-btn.active {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

/* ── GRILLE ASSOCIATIONS DASHBOARD ── */
#associationsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.dashboard-assoc-card {
  background: var(--dark2);
  border: 1px solid rgba(245,200,0,0.12);
  border-radius: 16px;
  overflow: hidden;
  transition: all .3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.dashboard-assoc-card:hover {
  border-color: rgba(245,200,0,0.3);
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(245,200,0,0.1);
}

.assoc-header {
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.assoc-icon-large {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.assoc-quick-info {
  flex: 1;
}

.assoc-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.assoc-members {
  font-size: 13px;
  color: var(--muted);
}

.assoc-content {
  padding: 0 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assoc-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.assoc-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.assoc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assoc-badge-dashboard {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid currentColor;
  opacity: 0.8;
}

.assoc-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 11px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

.meta-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  font-family: 'Syne', sans-serif;
}

.assoc-events-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.events-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.event-preview {
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-preview-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.event-preview-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
}

.event-preview-date {
  font-size: 10px;
  color: var(--muted);
}

.assoc-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  border: 1px solid rgba(255,255,255,0.1);
}

.website-btn {
  background: rgba(245,200,0,0.12);
  color: var(--yellow);
  border-color: rgba(245,200,0,0.25);
}
.website-btn:hover {
  background: rgba(245,200,0,0.2);
  border-color: var(--yellow);
}

.discord-btn {
  background: rgba(88,101,242,0.12);
  color: #5865F2;
  border-color: rgba(88,101,242,0.25);
}
.discord-btn:hover {
  background: rgba(88,101,242,0.2);
  border-color: #5865F2;
}

.assoc-footer {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .calendar-section {
    grid-template-columns: 1fr;
  }

  #associationsGrid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .calendar-dashboard-section {
    padding: 80px 5vw;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #associationsGrid {
    grid-template-columns: 1fr;
  }

  .category-filters {
    flex-direction: column;
  }
  .category-btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .calendar-dashboard-section {
    padding: 60px 4vw;
  }

  .dashboard-title {
    font-size: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-block {
    padding: 18px;
  }

  .stat-number {
    font-size: 28px;
  }

  .calendar-container,
  .upcoming-events {
    padding: 20px;
  }

  #calendarGrid {
    gap: 4px;
  }

  .calendar-day {
    font-size: 12px;
    aspect-ratio: auto;
    padding: 8px;
  }

  .assoc-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .assoc-meta {
    grid-template-columns: 1fr;
  }

  .assoc-actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
  }
}
