/**
 * Agenda calendar card styles
 */

/* Grid layout for agenda items - 6 cards per row */
.agenda-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  padding: 1rem 0;
}

/* Agenda card base styles - square white cards */
.agenda-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  aspect-ratio: 1 / 1;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease-in-out;
  padding: 1.5rem 1rem 1rem;
}

.agenda-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  border-color: #A63D40;
  text-decoration: none;
  color: #A63D40;
}

/* Title at top */
.agenda-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Separator line */
.agenda-card__separator {
  width: 90%;
  height: 1px;
  background-color: #333;
  margin: 0.5rem 0;
}

/* Date block - centered on single line */
.agenda-card__date {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  flex-grow: 1;
}

.agenda-card__day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #A63D40;
}

.agenda-card__month {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: capitalize;
  color: #A63D40;
}

/* Evenement specific styles */
.agenda-card--evenement:hover {
  border-color: #A63D40;
  color: #A63D40;
}

/* Future seances - not clickable, faded */
.agenda-card--future {
  opacity: 0.5;
  cursor: default;
}

.agenda-card--future:hover {
  box-shadow: none;
  transform: none;
  border-color: #dee2e6;
  color: #333;
}

/* Header row */
.agenda-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 1.5rem;
}

.agenda-header .agenda-year-selector {
  grid-column: 2;
}

/* Notice text */
.agenda-notice {
  text-align: left;
  color: #A63D40;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
}

/* Year selector */
.agenda-year-selector {
  display: flex;
  justify-content: center;
}

.agenda-year-dropdown {
  position: relative;
  display: inline-block;
}

.agenda-year-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.agenda-year-button:hover {
  color: #A63D40;
}

.agenda-year-arrow {
  font-size: 1.5rem;
  color: #A63D40;
  transition: transform 0.2s;
}

.agenda-year-dropdown.open .agenda-year-arrow {
  transform: rotate(180deg);
}

.agenda-year-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0;
  min-width: 100px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.agenda-year-dropdown.open .agenda-year-list {
  display: block;
}

.agenda-year-list li {
  margin: 0;
}

.agenda-year-list a {
  display: block;
  padding: 0.5rem 1.5rem;
  color: #333;
  text-decoration: none;
  text-align: center;
}

.agenda-year-list a:hover {
  background-color: #f8f9fa;
  color: #A63D40;
}

.agenda-year-list a.active {
  color: #A63D40;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .agenda-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .agenda-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .agenda-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .agenda-grid {
    grid-template-columns: 1fr;
  }

  .agenda-card {
    aspect-ratio: auto;
    padding: 1.5rem;
  }

  .agenda-header {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .agenda-notice {
    grid-column: 1;
    width: 100%;
    order: 1;
  }

  .agenda-header .agenda-year-selector {
    grid-column: 1;
    order: 2;
    justify-content: center;
  }
}
