/**
 * Noov'Hub Calendar - React FullCalendar Styles
 * Design moderne avec thème Noov'Hub
 */

/* Variables */
:root {
  --nhc-fc-primary: #DC2626;
  --nhc-fc-primary-hover: #B91C1C;
  --nhc-fc-primary-light: #FEE2E2;
  --nhc-fc-bg: #FFFFFF;
  --nhc-fc-fg: #0F172A;
  --nhc-fc-muted: #F1F5F9;
  --nhc-fc-muted-fg: #64748B;
  --nhc-fc-border: #E2E8F0;
  --nhc-fc-radius: 8px;
  --nhc-fc-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* Wrapper principal */
.nhc-react-calendar-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Header du calendrier */
.nhc-fc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.nhc-fc-nav-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nhc-fc-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--nhc-fc-border);
  border-radius: var(--nhc-fc-radius);
  background: var(--nhc-fc-bg);
  color: var(--nhc-fc-fg);
  cursor: pointer;
  transition: all 0.2s;
}

.nhc-fc-nav-btn:hover {
  background: var(--nhc-fc-muted);
}

.nhc-fc-today-btn {
  width: auto;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Tabs de vue */
.nhc-fc-view-tabs {
  display: flex;
  background: var(--nhc-fc-muted);
  border-radius: var(--nhc-fc-radius);
  padding: 4px;
}

.nhc-fc-view-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--nhc-fc-muted-fg);
  cursor: pointer;
  border-radius: calc(var(--nhc-fc-radius) - 4px);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nhc-fc-view-tab:hover {
  color: var(--nhc-fc-fg);
}

.nhc-fc-view-tab.active {
  background: var(--nhc-fc-bg);
  color: var(--nhc-fc-fg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Bouton nouvel événement */
.nhc-fc-new-event-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--nhc-fc-primary);
  color: white;
  border: none;
  border-radius: var(--nhc-fc-radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.nhc-fc-new-event-btn:hover {
  background: var(--nhc-fc-primary-hover);
}

/* Container FullCalendar */
.nhc-fc-container {
  background: var(--nhc-fc-bg);
  border: 1px solid var(--nhc-fc-border);
  border-radius: var(--nhc-fc-radius);
  padding: 1rem;
  box-shadow: var(--nhc-fc-shadow);
}

/* Override FullCalendar styles */
.nhc-fc-container .fc {
  font-family: inherit;
}

.nhc-fc-container .fc-theme-standard td,
.nhc-fc-container .fc-theme-standard th {
  border-color: var(--nhc-fc-border);
}

.nhc-fc-container .fc-theme-standard .fc-scrollgrid {
  border-color: var(--nhc-fc-border);
  border-radius: var(--nhc-fc-radius);
  overflow: hidden;
}

/* Header des jours */
.nhc-fc-container .fc-col-header-cell {
  background: var(--nhc-fc-muted);
  padding: 0.75rem 0;
}

.nhc-fc-container .fc-col-header-cell-cushion {
  font-weight: 600;
  color: var(--nhc-fc-fg);
  text-decoration: none;
  font-size: 0.875rem;
}

/* Cellules de jour */
.nhc-fc-container .fc-daygrid-day {
  min-height: 120px;
  transition: background 0.15s;
}

.nhc-fc-container .fc-daygrid-day:hover {
  background: rgba(241, 245, 249, 0.5);
}

.nhc-fc-container .fc-daygrid-day.fc-day-today {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.06), rgba(220, 38, 38, 0.02)) !important;
}

.nhc-fc-container .fc-daygrid-day-number {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nhc-fc-fg);
  padding: 8px;
  text-decoration: none;
}

.nhc-fc-container .fc-day-today .fc-daygrid-day-number {
  background: var(--nhc-fc-primary);
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
}

/* Jours hors du mois courant */
.nhc-fc-container .fc-day-other {
  background: var(--nhc-fc-muted);
  opacity: 0.6;
}

.nhc-fc-container .fc-day-other .fc-daygrid-day-number {
  color: var(--nhc-fc-muted-fg);
}

/* Événements */
.nhc-fc-container .fc-event {
  border-radius: 4px;
  border-width: 0 0 0 3px;
  padding: 2px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  margin: 1px 2px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.nhc-fc-container .fc-event:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nhc-fc-container .fc-event-main {
  padding: 2px 0;
}

/* Contenu des événements personnalisé */
.nhc-fc-event-month {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.nhc-fc-event-time {
  font-weight: 600;
  flex-shrink: 0;
}

.nhc-fc-event-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nhc-fc-event-detail {
  padding: 4px 0;
}

.nhc-fc-event-detail .nhc-fc-event-title {
  font-weight: 500;
  margin-top: 2px;
}

.nhc-fc-event-location {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 2px;
}

/* Vue liste */
.nhc-fc-event-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* More events link */
.nhc-fc-container .fc-daygrid-more-link {
  font-size: 0.7rem;
  color: var(--nhc-fc-muted-fg);
  font-weight: 500;
  padding: 2px 6px;
}

/* Time grid (semaine/jour) */
.nhc-fc-container .fc-timegrid-slot {
  height: 48px;
}

.nhc-fc-container .fc-timegrid-slot-label {
  font-size: 0.75rem;
  color: var(--nhc-fc-muted-fg);
}

.nhc-fc-container .fc-timegrid-now-indicator-line {
  border-color: var(--nhc-fc-primary);
}

.nhc-fc-container .fc-timegrid-now-indicator-arrow {
  border-color: var(--nhc-fc-primary);
  border-top-color: transparent;
  border-bottom-color: transparent;
}

/* Liste view */
.nhc-fc-container .fc-list {
  border-radius: var(--nhc-fc-radius);
}

.nhc-fc-container .fc-list-day-cushion {
  background: var(--nhc-fc-muted);
}

.nhc-fc-container .fc-list-event:hover td {
  background: rgba(241, 245, 249, 0.5);
}

/* Légende */
.nhc-fc-legend {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--nhc-fc-muted);
  border-radius: var(--nhc-fc-radius);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nhc-fc-legend-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nhc-fc-fg);
}

.nhc-fc-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nhc-fc-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--nhc-fc-fg);
}

.nhc-fc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Modal */
.nhc-fc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nhc-fc-modal {
  background: var(--nhc-fc-bg);
  border-radius: var(--nhc-fc-radius);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

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

.nhc-fc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--nhc-fc-border);
}

.nhc-fc-modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--nhc-fc-fg);
}

.nhc-fc-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--nhc-fc-muted-fg);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.nhc-fc-modal-close:hover {
  background: var(--nhc-fc-muted);
  color: var(--nhc-fc-fg);
}

.nhc-fc-modal-body {
  padding: 1.5rem;
}

.nhc-fc-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--nhc-fc-border);
  background: var(--nhc-fc-muted);
}

.nhc-fc-modal-footer-right {
  display: flex;
  gap: 0.5rem;
}

/* Formulaire */
.nhc-fc-form-group {
  margin-bottom: 1rem;
}

.nhc-fc-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nhc-fc-fg);
  margin-bottom: 0.5rem;
}

.nhc-fc-form-group input[type="text"],
.nhc-fc-form-group input[type="datetime-local"],
.nhc-fc-form-group select,
.nhc-fc-form-group textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--nhc-fc-border);
  border-radius: var(--nhc-fc-radius);
  font-size: 0.875rem;
  background: var(--nhc-fc-bg);
  color: var(--nhc-fc-fg);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.nhc-fc-form-group input:focus,
.nhc-fc-form-group select:focus,
.nhc-fc-form-group textarea:focus {
  outline: none;
  border-color: var(--nhc-fc-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.nhc-fc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.nhc-fc-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
}

.nhc-fc-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* Boutons */
.nhc-fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--nhc-fc-radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.nhc-fc-btn-primary {
  background: var(--nhc-fc-primary);
  color: white;
}

.nhc-fc-btn-primary:hover {
  background: var(--nhc-fc-primary-hover);
}

.nhc-fc-btn-secondary {
  background: transparent;
  color: var(--nhc-fc-fg);
  border: 1px solid var(--nhc-fc-border);
}

.nhc-fc-btn-secondary:hover {
  background: var(--nhc-fc-muted);
}

.nhc-fc-btn-danger {
  background: #EF4444;
  color: white;
}

.nhc-fc-btn-danger:hover {
  background: #DC2626;
}

/* Responsive */
@media (max-width: 768px) {
  .nhc-fc-header {
    flex-direction: column;
    align-items: stretch;
  }

  .nhc-fc-nav-group {
    justify-content: center;
  }

  .nhc-fc-view-tabs {
    justify-content: center;
  }

  .nhc-fc-new-event-btn {
    justify-content: center;
  }

  .nhc-fc-form-row {
    grid-template-columns: 1fr;
  }

  .nhc-fc-legend {
    flex-direction: column;
    align-items: flex-start;
  }

  .nhc-fc-modal-footer {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nhc-fc-modal-footer-right {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .nhc-fc-view-tab {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  .nhc-fc-new-event-btn span {
    display: none;
  }

  .nhc-fc-new-event-btn {
    padding: 0.625rem;
  }
}

