.legend-item.hidden {
  opacity: 0.5;
  text-decoration: line-through;
}

/* Toast notifications */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 10000;
  animation: slideIn 0.3s ease-out;
  font-weight: 500;
}

.toast-notification.error {
  background: #dc3545;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .toast-notification {
    right: 10px;
    left: 10px;
    padding: 12px 20px;
    font-size: 14px;
  }

  .card-body {
    font-size: 14px;
  }

  h3 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.2rem;
  }

  .btn-group.w-100 {
    flex-direction: row;
  }

  .btn-group.w-100 .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .row.text-center.align-items-center > div {
    margin-bottom: 15px;
  }

  h3 {
    font-size: 1.3rem;
  }

  .fs-5 {
    font-size: 1.1rem !important;
  }
}

/* Notifications responsive */
@media (max-width: 576px) {
  #notifFrequency, #notifTime {
    width: 100% !important;
  }

  .d-flex.gap-2.align-items-center.flex-wrap {
    width: 100%;
  }

  .d-flex.gap-2.align-items-center.flex-wrap > * {
    flex: 1 1 100%;
  }
}

/* Graphiques responsive - hauteur adaptative */
#chartContainer, #chartContainerBodyFat {
  height: 400px;
}

@media (min-width: 1400px) {
  #chartContainer, #chartContainerBodyFat {
    height: 500px;
  }
}

@media (max-width: 768px) {
  #chartContainer, #chartContainerBodyFat {
    height: 300px;
  }
}

@media (max-width: 576px) {
  #chartContainer, #chartContainerBodyFat {
    height: 250px;
  }
}

/* Photo fullscreen overlay */
#photoFullscreen {
    opacity: 0;
    transition: opacity .3s ease;
}

#photoFullscreen.show {
    opacity: 1;
}

/* Cropper.js container */
#photoCropContainer {
    max-height: 500px;
}

#photoCropContainer img {
    max-height: 400px;
}

/* Style pour les boutons de navigation des photos */
#prevPhoto, #nextPhoto {
    opacity: 0.7;
    transition: opacity 0.2s;
}

#prevPhoto:hover, #nextPhoto:hover {
    opacity: 1;
}

/* Style pour le bouton close */
#photoCloseBtn {
    opacity: 0.7;
    transition: opacity 0.2s;
}

#photoCloseBtn:hover {
    opacity: 1;
}

.photo-container {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Ratio 1:1 pour un carré */
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
}

.photo-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
/* Indicateur de pesée très ancienne : carte en veille */
.carte-inactive {
  opacity: 0.50;
}

.carte-inactive .photo-container img {
  filter: grayscale(100%);
}

.badge-inactif {
  z-index: 2;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}
