/**
 * Pagefind Highlight - Styles pour le surlignage des résultats de recherche
 */

/* Surlignage des occurrences */
mark.pagefind-highlight {
  background-color: #ffeb3b;
  color: #000;
  padding: 2px 0;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

/* Occurrence active (celle sur laquelle on est positionné) */
mark.pagefind-highlight-active {
  background-color: #ff9800;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.3);
}

/* Interface de navigation */
#pagefind-navigation {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 12px 16px;
  animation: slideIn 0.3s ease-out;
}

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

.pagefind-nav-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

#pagefind-navigation button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

#pagefind-navigation button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#pagefind-navigation button:active {
  transform: translateY(0);
}

#pagefind-counter {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  min-width: 60px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#pagefind-close {
  margin-left: 8px;
  padding: 6px 10px !important;
  font-size: 16px !important;
}

/* Responsive - mobile */
@media (max-width: 768px) {
  #pagefind-navigation {
    top: 10px;
    right: 10px;
    left: 10px;
    padding: 10px 12px;
  }

  .pagefind-nav-content {
    justify-content: space-between;
    gap: 8px;
  }

  #pagefind-navigation button {
    padding: 8px 10px;
    font-size: 13px;
  }

  #pagefind-counter {
    font-size: 13px;
    min-width: 50px;
  }
}

/* Animation au survol des occurrences */
mark.pagefind-highlight:hover {
  background-color: #ffd54f;
  cursor: pointer;
}

/* Accessibilité - focus visible */
#pagefind-navigation button:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Impression - masquer la navigation et garder les surlignages visibles */
@media print {
  #pagefind-navigation {
    display: none;
  }
  
  mark.pagefind-highlight {
    background-color: #ffeb3b !important;
    color: #000 !important;
  }
  
  mark.pagefind-highlight-active {
    background-color: #ff9800 !important;
    font-weight: bold !important;
  }
}
