:root {
  --primary-color: #3b82f6;
  --holiday-color: #ef4444;
  --recommended-color: #22c55e;
  --hover-color: #f1f5f9;
  --weekend-color: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  color: var(--text-primary);
  background: #f8fafc;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.calendar-container {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
}

.legend {
  display: flex;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.legend-color {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
}

.legend-color.holiday {
  background: var(--holiday-color);
}

.legend-color.recommended {
  background: var(--recommended-color);
}

.month-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.month-nav button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.month-nav button:hover {
  background: var(--hover-color);
}

.month-select {
  padding: 0.5rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.weekday {
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem;
  font-size: 0.875rem;
}

.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  user-select: none;
}

.day:not(.empty):hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.day.holiday {
  background: var(--holiday-color);
  color: white;
}

.day.recommended {
  background: var(--recommended-color);
  color: white;
}

.day.weekend {
  background: var(--weekend-color);
}

.day.selected {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.info-panel {
  margin-top: 2rem;
  padding: 1rem;
  background: #eff6ff;
  border-radius: 0.5rem;
  display: none;
  animation: slideDown 0.3s ease-out;
}

.info-panel.visible {
  display: block;
}

.summary-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-item {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.timeline {
  margin-top: 2rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.5rem;
}

.timeline-date {
  font-weight: 600;
}

.timeline-info {
  color: var(--text-secondary);
}

.month-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /*background: rgba(241, 245, 249, 0.9);*/
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  border-radius: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.month-overlay.visible {
  opacity: 1;
}

.month-overlay-message {
  background: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 80%;
  line-height: 1.4;
}

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

@media (max-width: 768px) {
  .calendar-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.9rem;
  bottom: 0;
  width: 100%;
  height: 50px; /* Hauteur fixe */
  box-sizing: border-box;
  z-index: 1000; /* Pour s'assurer qu'il reste au-dessus du contenu */
}

.footer a {
  color: var(--text-secondary);
  text-decoration: underline;
}