/* Styles pour le calendrier basés exactement sur Stisla */

.calendrier-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-top: -500px;
}

.calendrier-container .card {
    border: none;
    box-shadow: none;
}

.calendrier-container .card-header {
  background: var(--white);
  color: white;
  border: 1px solid var(--logistiq-base);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 15px 15px 0 0;
}

.calendrier-container .card-header h4 {
    margin: 0;
    font-weight: 600;
}

.calendrier-container .card-header p {
    margin: 5px 0 15px 0;
    opacity: 0.9;
}

/* Styles pour la légende des statuts */
.calendrier-container .card-header ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center !important;
    gap: 15px;
    flex-wrap: wrap;
}

.calendrier-container .card-header ul li {
    margin: 0;
}

.calendrier-container .card-header ul li button {
    padding: 6px 14px;
    border: none;
    border-radius: 5px;
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.54);
}

/* Bouton Prévu - Rouge */
.calendrier-container .card-header ul li:nth-child(1) button {
    background-color: #dc3545;
    color: white;
}

.calendrier-container .card-header ul li:nth-child(1) button:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Bouton En cours - Orange */
.calendrier-container .card-header ul li:nth-child(2) button {
    background-color: #fd7e14;
    color: white;
}

.calendrier-container .card-header ul li:nth-child(2) button:hover {
    background-color: #e8650e;
    transform: translateY(-1px);
}

/* Bouton Terminé - Vert */
.calendrier-container .card-header ul li:nth-child(3) button {
    background-color: #28a745;
    color: white;
}

.calendrier-container .card-header ul li:nth-child(3) button:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.calendrier-container .card-body {
    padding: 10px;
}

/* Styles FullCalendar exactement comme dans Stisla */
.fc-toolbar h2 {
  font-size: 18px !important;
  margin-top: 10px !important;
  font-weight: 900 !important;
}

.fc-view {
  border-color: #f2f2f2;
  color: #34395e !important;
  font-weight: 500;
  padding: 10px;
}

.fc-view > table {
  border-color: #f2f2f2;
}

.fc-view > table tr, 
.fc-view > table td {
  border-color: #f2f2f2;
}

.fc-view > table th {
  border-color: #f2f2f2;
  color: #34395e !important;
  font-weight: 500;
  padding: 10px;
}

.fc-view-container > .fc-view {
  padding: 0;
}

.fc-view {
  color: #666;
  text-align: right;
}

.fc-view > table td {
  color: #666;
  text-align: right;
}

.fc-unthemed td.fc-today {
  background-color: #f2f2f2;
}

.fc button .fc-icon {
  top: -0.09em;
}

.fc-basic-view .fc-day-number, 
.fc-basic-view .fc-week-number {
  padding: 10px;
}

.fc-day-grid-event .fc-content {
  padding: 5px 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}

tr:first-child > td > .fc-day-grid-event {
  margin-bottom: 10px;
}

.fc-state-default {
  border-radius: 3px;
  background-color: #f2f2f2;
  background-image: none;
  border: none;
  box-shadow: none;
  text-transform: capitalize;
  font-weight: 500;
}

.fc button {
  height: auto;
  padding: 10px 15px;
  text-shadow: none;
  border-radius: 0;
}

.fc button.fc-state-active {
  background-color: #6777ef;
  color: #fff;
}

/* Styles spécifiques pour les boutons de navigation Stisla */
.fc-prev-button, .fc-next-button {
  background-color: #f2f2f2 !important;
  border: none !important;
  color: #34395e !important;
  border-radius: 3px !important;
  padding: 10px 15px !important;
  font-weight: 500 !important;
  text-transform: capitalize !important;
  box-shadow: none !important;
  background-image: none !important;
  margin: 0 10px !important;
}

.fc-prev-button:hover, .fc-next-button:hover {
  background-color: #6777ef !important;
  color: #fff !important;
}

.fc-today-button {
  background-color: #f2f2f2 !important;
  border: none !important;
  color: #34395e !important;
  border-radius: 5px !important;
  padding: 5px 15px !important;
  font-weight: 900 !important;
  text-transform: capitalize !important;
  box-shadow: none !important;
  background-image: none !important;
}

.fc-today-button:hover {
  background-color: #6777ef !important;
  color: #fff !important;
}

.fc-today-button.fc-state-active {
  background-color: #6777ef !important;
  color: #fff !important;
}

/* Styles pour les boutons de vue Stisla */
.fc-button-group {
  display: flex;
  border-radius: 3px;
  overflow: hidden;
}

.fc-button-group .fc-button {
  background-color: #f2f2f2 !important;
  border: none !important;
  color: #34395e !important;
  border-radius: 0 !important;
  padding: 5px 15px !important;
  font-weight: 900 !important;
  margin: 0 !important;
  text-transform: capitalize !important;
  box-shadow: none !important;
  background-image: none !important;
}

.fc-button-group .fc-button:first-child {
  border-top-left-radius: 3px !important;
  border-bottom-left-radius: 3px !important;
}

.fc-button-group .fc-button:last-child {
  border-top-right-radius: 3px !important;
  border-bottom-right-radius: 3px !important;
}

.fc-button-group .fc-button.fc-state-active {
  background-color: #6777ef !important;
  color: #fff !important;
}

.fc-button-group .fc-button:hover:not(.fc-state-active) {
  background-color: #6777ef !important;
  color: #fff !important;
}

/* Styles personnalisés pour les événements */
.fc-event {
  border-radius: 3px;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent !important;
  margin: 2px 0;
}

.fc-event:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Styles pour les événements personnalisés avec les trois éléments sur la même ligne */
.depart-event-custom {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 5px 0 2px 0 !important;
  min-height: auto !important;
}

.depart-event-content {
  width: 100%;
  padding: 0;
}

.depart-event-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-top: 4px !important;
}

.depart-event-row:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}


/* Style pour l'icône de fret */
.fret-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.fret-icon svg {
  width: 100%;
  height: 100%;
}

/* Style pour le texte de la zone */
.zone-text {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: #34395e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding-left: 1px;
}

/* Style pour le point de statut */
.statut-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.statut-dot:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Styles pour les événements avec statuts (pour compatibilité) */
.fc-event.status-prevu .statut-dot {
  background-color: #dc3545 !important;
}

.fc-event.status-en-cours .statut-dot {
  background-color: #fd7e14 !important;
}

.fc-event.status-termine .statut-dot {
  background-color: #28a745 !important;
}

/* Styles pour les cellules du calendrier */
.fc-day-grid .fc-day {
  border-color: #f2f2f2;
  min-height: 100px;
}

.fc-day-header {
  background: #f8f9fa;
  color: #34395e;
  font-weight: 600;
  padding: 12px 0;
  border-color: #f2f2f2;
  text-align: center;
}

.fc-day-number {
  color: #34395e;
  font-weight: 500;
  padding: 8px;
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.fc-day-number:hover {
  background: #e9ecef;
  transform: scale(1.1);
}

.fc-today {
  background: rgba(103, 119, 239, 0.05);
}

.fc-today .fc-day-number {
  background: #6777ef;
  color: white;
  font-weight: 600;
  transform: scale(1.1);
}

.fc-other-month .fc-day-number {
  color: #adb5bd;
}

.fc-day:hover {
  background: rgba(103, 119, 239, 0.02);
}

/* Styles pour la vue liste */
.fc-list-view {
  border: none;
}

.fc-list-heading {
  background: #f8f9fa;
  border-color: #f2f2f2;
  color: #34395e;
  font-weight: 600;
}

.fc-list-item {
  border-color: #f2f2f2;
  transition: background-color 0.3s ease;
}

.fc-list-item:hover {
  background: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
  .fc-toolbar {
    flex-direction: column;
    gap: 10px;
  }
  
  .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  
  .fc button {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .fc-toolbar h2 {
    font-size: 1.2rem;
  }
  
  /* Ajustements pour les événements sur mobile */
  .depart-event-row {
    gap: 4px;
    padding: 3px 4px;
  }
  
  .fret-icon {
    width: 14px;
    height: 14px;
  }
  
  .zone-text {
    font-size: 10px;
  }
  
  .statut-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 480px) {
  .depart-event-row {
    gap: 3px;
    padding: 2px 3px;
  }
  
  .fret-icon {
    width: 12px;
    height: 12px;
  }
  
  .zone-text {
    font-size: 9px;
  }
  
  .statut-dot {
    width: 5px;
    height: 5px;
  }
}

/* Animation pour le chargement */
.fc-overflow {
  animation: fadeIn 0.5s ease-in;
}

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