/* ==========================================
   SERVICES-NAV.CSS - Sommaire interactif
   Sidebar navigation qui apparaît au hover
   ========================================== */

/* ===== SOMMAIRE LATÉRAL - Desktop only ===== */
.services-nav {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  transition: all var(--transition-base);
  display: none; /* Caché par défaut, visible après le hero */
}

.services-nav.visible {
  display: block;
}

.services-nav-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* Tab visible sur le côté */
.services-nav-tab {
  position: absolute;
  left: 0;
  width: 3px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.services-nav-tab::after {
  content: '›';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 40px;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all var(--transition-base);
}

/* Panel du sommaire */
.services-nav-panel {
  position: absolute;
  left: 0;
  background: white;
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--color-border-light);
  border-left: none;
  min-width: 280px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
  transition: all var(--transition-base);
}

/* Hover state - Panel apparaît */
.services-nav-container:hover .services-nav-panel {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.services-nav-container:hover .services-nav-tab {
  width: 5px;
}

.services-nav-container:hover .services-nav-tab::after {
  content: '‹';
}

/* Titre du sommaire */
.services-nav-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border-light);
}

/* Liste de navigation */
.services-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.services-nav-item {
  margin-bottom: 0.5rem;
}

.services-nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  border-left: 3px solid transparent;
}

.services-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--gradient-primary);
  transition: height var(--transition-fast);
}

.services-nav-link:hover {
  background: var(--color-bg-light);
  color: var(--color-primary);
  padding-left: 1.25rem;
}

.services-nav-link:hover::before {
  height: 100%;
}

/* Active state */
.services-nav-link.active {
  background: linear-gradient(135deg, rgba(43, 127, 217, 0.1) 0%, rgba(91, 79, 184, 0.1) 100%);
  color: var(--color-primary);
  font-weight: 600;
  border-left-color: var(--color-primary);
}

/* CTA dans le sommaire */
.services-nav-cta {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--color-border-light);
}

.services-nav-cta .btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-sm);
}

/* Progress indicator */
.services-nav-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0%;
  background: var(--color-accent);
  transition: height 0.1s ease-out;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ===== MOBILE - Options ===== */

/* Option 1 : Floating button (recommandé) */
@media (max-width: 1024px) {
  .services-nav {
    left: auto;
    right: 1rem;
    top: auto;
    bottom: 1rem;
    transform: none;
    z-index: 1000; /* Plus élevé pour éviter les conflits */
  }

  .services-nav-tab {
    position: static;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: var(--shadow-xl);
    background: var(--gradient-primary);
    cursor: pointer;
  }

  .services-nav-tab::after {
    content: '☰';
    position: static;
    width: 100%;
    height: 100%;
    background: none;
    border-radius: 0;
    font-size: 1.5rem;
    transform: none;
  }

  .services-nav-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border: 2px solid var(--color-border-light);
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(100%);
    z-index: 999; /* Juste en dessous du bouton */
  }

  /* Désactiver le hover sur mobile */
  .services-nav-container:hover .services-nav-panel {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }

  /* Click to toggle sur mobile */
  .services-nav-container.open .services-nav-panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .services-nav-container.open .services-nav-tab::after {
    content: '✕';
  }

  .services-nav-tab {
    width: 56px;
    height: 56px;
  }
}

/* Option 2 : Cacher complètement sur mobile (désactivé par défaut) */
/* 
   ⚠️ Si tu veux complètement cacher le sommaire sur mobile,
   décommente les lignes ci-dessous :
   
@media (max-width: 768px) {
  .services-nav {
    display: none !important;
  }
}
*/

/* ===== ANIMATIONS ===== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.services-nav-item {
  animation: slideInLeft 0.3s ease-out forwards;
  animation-play-state: paused;
}

.services-nav-container:hover .services-nav-item {
  animation-play-state: running;
}

.services-nav-item:nth-child(1) { animation-delay: 0.05s; }
.services-nav-item:nth-child(2) { animation-delay: 0.1s; }
.services-nav-item:nth-child(3) { animation-delay: 0.15s; }
.services-nav-item:nth-child(4) { animation-delay: 0.2s; }
.services-nav-item:nth-child(5) { animation-delay: 0.25s; }
.services-nav-item:nth-child(6) { animation-delay: 0.3s; }
.services-nav-item:nth-child(7) { animation-delay: 0.35s; }
.services-nav-item:nth-child(8) { animation-delay: 0.4s; }

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Offset pour les sections avec navbar fixed */
.services-section {
  scroll-margin-top: 5rem;
}