/* Tools Showcase Section - Interactive Illustration */

.tools-showcase {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--neutral-light) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

.tools-showcase .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.tools-showcase h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--neutral-dark);
  margin-bottom: 1rem;
}

.tools-showcase p.subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--neutral-medium);
  margin-bottom: 3rem;
}

/* Illustration Container */
.illustration-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  background: var(--white);
}

.illustration-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Interactive Points */
.tool-point {
  position: absolute;
  width: 15px;
  height: 15px;
  background: var(--primary-blue);
  border: 3px solid var(--white);
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
  animation: pointBounce 2s ease-in-out infinite;
}

/* Attention-grabbing bounce animation with color pulse */
@keyframes pointBounce {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    background: var(--primary-blue);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.8);
    background: #00a3ff;
  }
}

.tool-point:hover {
  transform: translate(-50%, -50%) scale(1.2);
  background: var(--primary-dark);
  animation: none;
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
}

.tool-point.active {
  background: var(--primary-dark);
  transform: translate(-50%, -50%) scale(1.3);
  animation: none;
}

.tool-point.hover {
  transform: translate(-50%, -50%) scale(1.15);
}

/* Hover Tooltip */
.tool-hover-tooltip {
  position: fixed;
  background: var(--white);
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-8px) scale(0.95);
  transition: all 0.2s ease;
  z-index: 9998;
  border: 2px solid var(--primary-blue);
}

.tool-hover-tooltip.show {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-8px) scale(1);
}

.tool-hover-tooltip img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Modal */
.tool-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.tool-modal.show {
  display: flex;
}

.tool-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.tool-modal-content {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--white);
  transition: all 0.2s ease;
  z-index: 100;
}

.tool-modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.tool-modal-video {
  width: 100%;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  position: relative;
  padding-bottom: 110%;
  /* Reduced portrait aspect ratio to prevent scroll */
}

.tool-modal-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video Thumbnail and Play Button */
.video-thumbnail-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: #000;
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.video-thumbnail-container:hover .video-thumbnail {
  opacity: 0.8;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  padding: 0;
  width: 68px;
  height: 68px;
}

.video-play-button:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.video-play-button svg {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.video-play-button:hover svg circle {
  fill: rgba(0, 123, 255, 0.9);
}

.tool-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--neutral-dark);
  text-align: center;
  margin-bottom: 1rem;
}

.tool-modal-link {
  display: block;
  text-align: center;
  color: var(--primary-blue);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.tool-modal-link:hover {
  background: rgba(0, 123, 255, 0.2);
  color: var(--primary-dark);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .tools-showcase h2 {
    font-size: 2rem;
  }

  .tools-showcase p.subtitle {
    font-size: 1rem;
  }

  .illustration-container {
    aspect-ratio: 4 / 3;
  }

  .tool-point {
    width: 15px;
    height: 15px;
    border-width: 2px;
    /* Add touch padding for better tap target */
    padding: 8px;
    margin: -8px;
    /* Compensate for padding to maintain position */
  }

  /* Hide tooltip on mobile/touch devices */
  .tool-hover-tooltip {
    display: none !important;
  }

  .tool-modal-content {
    max-width: 500px;
    padding: 1.5rem;
  }

  .tool-modal-title {
    font-size: 1.25rem;
  }

  .tool-modal-video {
    padding-bottom: 133%;
    /* Keep portrait ratio on mobile */
  }

  .tool-modal-close {
    width: 48px;
    height: 48px;
    font-size: 32px;
    /* Increase touch target */
    padding: 8px;
  }
}

/* Loading State */
.illustration-container.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-light);
}

.illustration-container.loading::after {
  content: 'Chargement...';
  color: var(--neutral-medium);
  font-size: 1.1rem;
}