/**
 * @file
 * PDF Download Link Styles - Version Responsive
 * themes/custom/genie_ecologique/css/pdf-link.css
 */

.pdf-download-link-wrapper {
  position: absolute;
  right: 25px;
  top: 44px;
}

.pdf-download-link {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  background-color: #4CAF50 !important;
  color: white !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  cursor: pointer;
  white-space: nowrap;
}

.pdf-download-link:hover,
.pdf-download-link:focus {
  background-color: #45a049 !important;
  color: white !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  transform: translateY(-2px);
}

.pdf-download-link:active {
  transform: translateY(0);
}

.pdf-download-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Hide when printing */
@media print {
  .pdf-download-link-wrapper {
    display: none !important;
  }
}

/* Tablettes */
@media (max-width: 1024px) {
  .pdf-download-link-wrapper {
    right: 20px;
    top: 44px;
  }

  .pdf-download-link {
    font-size: 13px;
  }

  .pdf-download-link svg {
    width: 18px;
    height: 18px;
  }
}

/* Mobile - Position en bas sticky */
@media (max-width: 768px) {
  .pdf-download-link-wrapper {
    right: 50%;
    transform: translateX(50%);
    top: -10px;
    right: 128px;
  }

  .pdf-download-link {
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
  }
}

/* Très petits écrans - Bouton compact */
@media (max-width: 480px) {

  .pdf-download-link-wrapper {
    top: -8px;
  }

  .pdf-download-link {
    gap: 5px;
    font-size: 13px;
  }

  .pdf-download-link svg {
    width: 16px;
    height: 16px;
  }
}

/* Option alternative : bouton icon-only sur mobile */
@media (max-width: 380px) {
  .pdf-download-link {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    gap: 0;
  }

  .pdf-download-link svg {
    width: 24px;
    height: 24px;
  }

  /* Cache le texte sur très petits écrans */
  .pdf-download-link {
    font-size: 0;
  }

  /* Tooltip au survol */
  .pdf-download-link::after {
    content: "Télécharger PDF";
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 8px;
  }

  .pdf-download-link:hover::after {
    opacity: 1;
  }
}
