/* =========================
   GITHUB BUTTON - MODERN UI/UX DESIGN
   ========================= */

/* Supprimer les outlines indésirables */
.btn--github-modern,
.btn--github-modern *,
button,
a {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

.btn--github-modern {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 2rem 0;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  min-height: 64px;
}

.btn--github-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.15) 0%, 
    rgba(255, 255, 255, 0.05) 50%,
    rgba(0, 0, 0, 0.05) 100%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.btn__content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  position: relative;
  z-index: 2;
}

.btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.github-logo {
  width: 20px;
  height: 20px;
  fill: currentColor;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.btn__text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-light, #f9fafb);
  transition: all 0.3s ease;
}

.btn__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transform: translateX(0);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.7;
}

.arrow-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: all 0.3s ease;
}

/* Effet de brillance animé */
.btn__shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
  pointer-events: none;
}

/* États d'interaction */
.btn--github-modern:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--github-modern:hover::before {
  opacity: 1;
}

.btn--github-modern:hover .btn__icon {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.btn--github-modern:hover .github-logo {
  transform: scale(1.1) rotate(-5deg);
  opacity: 1;
}

.btn--github-modern:hover .btn__arrow {
  transform: translateX(4px);
  opacity: 1;
}

.btn--github-modern:hover .arrow-icon {
  transform: scale(1.1);
}

.btn--github-modern:hover .btn__shine {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}

.btn--github-modern:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn--github-modern:focus,
.btn--github-modern:focus-visible {
  outline: none;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Animation d'entrée avec intersection observer */
.btn--github-modern {
  opacity: 1; /* Visible par défaut */
  transform: translateY(0) scale(1);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animation quand révélé par l'observer (optionnel) */
.btn--github-modern.reveal-animate {
  animation: modernButtonReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modernButtonReveal {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .btn--github-modern {
    min-height: 56px;
  }
  
  .btn__content {
    padding: 14px 24px;
    gap: 12px;
  }
  
  .btn__icon {
    width: 28px;
    height: 28px;
  }
  
  .github-logo {
    width: 18px;
    height: 18px;
  }
  
  .btn__text {
    font-size: 15px;
  }
  
  .arrow-icon {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .btn__text {
    display: none;
  }
  
  .btn__content {
    gap: 16px;
    padding: 16px;
  }
  
  .btn__arrow {
    opacity: 1;
  }
}

/* Mode sombre - ajustements fins */
@media (prefers-color-scheme: dark) {
  .btn--github-modern {
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.12) 0%, 
      rgba(255, 255, 255, 0.06) 100%);
  }
  
  .btn__icon {
    background: rgba(255, 255, 255, 0.15);
  }
  
  .btn--github-modern:hover .btn__icon {
    background: rgba(255, 255, 255, 0.25);
  }
}