/**
 * Card Block Styles
 * Inspiré du style des cartes métriques
 */

.card-block {
  margin: 0  auto;
  max-width: 100%;
  height: 100%;
}

.card-wrapper {
  border-radius: 1rem;
  box-shadow: 0 6px 16px 0 color-mix(in srgb, rgb(44 93 133) 15%, transparent);
  display: flex;
  height: 100%;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: #fff;
  position: relative;
}

.card-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px 0 color-mix(in srgb, rgb(44 93 133) 20%, transparent);
}

.card-header {
	padding: 1.5rem;
	position: relative;

		&.has-image {
			height: 150px;
		}
}

.card-wrapper:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  background-color: #eef7fe;
}

.card-image {
	width: 24px;
	margin-bottom: 1rem;
}

.card-title {
  line-height: 120%;
  margin: 0;
}

.card-description {
  margin: 0;
  flex: 1;
}

.card-description p {
  margin: 0 0 0.5rem;
}

.card-description p:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (width <= 768px) {
.card-block {
	  margin: 0 auto ;
}

.card-wrapper {
	min-height: auto;
	height: 100%;
  }

  .card-header {
	height: auto;
  }

  .card-content {
    padding: 1rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card-description {
    font-size: 0.9rem;
  }
}

@media (width <= 480px) {
  .card-content {
    padding: 1rem;
    gap: 0.75rem;
  }

  .card-title {
    font-size: 1.125rem;
  }



}

.card-button {
	position: absolute;
	bottom: 1rem;
	right: 1rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  transition: transform 0.3s ease;

  i {
    color: #FF8E38;
    font-size: 2rem;
    transition: transform 0.3s ease;
  }

  &:hover i {
    transform: scale(1.1);
  }
}

  .card-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: visibility 0.3s ease;

	&.active {
	opacity: 1;
  visibility: visible;
	}
  }

  .card-modal-content {
  background: white;
  border-radius: 1rem;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.card-modal.active .card-modal-content {
  transform: scale(1);
}


.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease, color 0.3s ease;
}


.modal-close:hover {
  background-color: #f5f5f5;
  color: #333;
}
