/* =========================================================
   iA Nansy — Site produit G7 Design
   Dark mode Tailwind · Styles custom pour composants complexes
   ========================================================= */

/* ---------- 1. Variables & smooth scroll ---------- */
:root {
  --ease: cubic-bezier(.22,.61,.36,1);
  scroll-behavior: smooth;
}

/* ---------- 2. Section divider ---------- */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(91,140,184,0.2), transparent);
  margin: 0 auto;
  max-width: 1200px;
}

/* ---------- 3. Reveal animation (Intersection Observer) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 4. Hero animations (keyframes) ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- 5. Slider système (section scènes) ---------- */
.scenes-slider {
  margin-top: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.scene-context {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b8cb8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scene-counter {
  font-size: 14px;
  font-weight: 600;
  color: #718096;
}

.slider-viewport {
  overflow: hidden;
  position: relative;
  border-radius: 1rem;
  width: 100%;
}

.slider-track {
  display: flex;
  transition: transform 0.5s var(--ease);
  will-change: transform;
  cursor: grab;
  user-select: none;
}

.slider-track:active {
  cursor: grabbing;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.slide-inner {
  background: #1e222b;
  padding: 1.5rem;
  margin: 0 0.75rem;
  border-radius: 1rem;
  box-shadow: 0 10px 20px rgba(10,13,20,0.4), 0 4px 8px rgba(10,13,20,0.3);
  min-height: 400px;
  box-sizing: border-box;
}

/* Peek effect on desktop */
@media (min-width: 768px) {
  .slider-viewport {
    overflow: visible;
  }

  .slide {
    opacity: 0.3;
    transform: scale(0.92);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
    pointer-events: none;
  }

  .slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 10;
    position: relative;
  }

  .slide-inner {
    margin: 0 1rem;
  }
}

/* Slider controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.slider-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1e222b;
  border: 2px solid #2f3544;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b8cb8;
  transition: all 0.2s var(--ease);
  cursor: pointer;
}

.slider-arrow:hover:not(:disabled) {
  background: #5b8cb8;
  color: white;
  border-color: #5b8cb8;
  transform: scale(1.1);
}

.slider-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slider-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f3544;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  padding: 0;
}

.dot:hover {
  background: #5b8cb8;
  opacity: 0.6;
}

.dot.active {
  background: #5b8cb8;
  width: 28px;
  border-radius: 5px;
}

/* ---------- 6. Scene card chat styles ---------- */
.scene-card__context {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #718096;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.context-icon {
  color: #5b8cb8;
  opacity: 0.6;
}

.scene-card__chat {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  width: 100%;
}

.chat-message {
  display: flex;
  min-width: 0;
  width: 100%;
}

.chat-message--user {
  justify-content: flex-end;
}

.chat-message--agent {
  justify-content: flex-start;
}

.bubble {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  font-size: 16px;
  line-height: 1.6;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.bubble--user {
  background: #2f3544;
  color: white;
  font-weight: 500;
  max-width: 85%;
  margin-left: auto;
}

.bubble--agent {
  background: #5b8cb8;
  color: white;
  max-width: 90%;
}

.bubble--agent p {
  margin: 0;
  font-style: italic;
}

/* ---------- 7. Audio player custom ---------- */
.audio-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(91,140,184,0.1);
  border: 1px solid #5b8cb8;
  border-radius: 0.75rem;
  color: #7badd6;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  width: 100%;
  max-width: 300px;
}

.audio-player:hover {
  background: #5b8cb8;
  color: white;
}

.audio-player.is-playing {
  background: #5b8cb8;
  color: white;
}

.audio-icon {
  flex: 0 0 auto;
}

.audio-label {
  flex: 1;
}

.audio-progress {
  flex: 0 0 80px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.audio-progress-bar {
  height: 100%;
  background: white;
  width: 0%;
  transition: width 0.1s linear;
}

/* ---------- 8. Ecosystem card animations ---------- */
.ecosystem-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.ecosystem-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Délais d'animation échelonnés */
.ecosystem-card:nth-child(1) { transition-delay: 0s; }
.ecosystem-card:nth-child(2) { transition-delay: 0.1s; }
.ecosystem-card:nth-child(3) { transition-delay: 0.2s; }
.ecosystem-card:nth-child(4) { transition-delay: 0.3s; }
.ecosystem-card:nth-child(5) { transition-delay: 0.4s; }
.ecosystem-card:nth-child(6) { transition-delay: 0.5s; }

/* ---------- 9. Agent card animations ---------- */
.agent-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.agent-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 10. Timeline animations ---------- */
.timeline-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline-item:nth-child(3) { transition-delay: 0.2s; }

/* ---------- 11. Stats animations ---------- */
.stat {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.stat.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stat:nth-child(2) { transition-delay: 0.1s; }
.stat:nth-child(3) { transition-delay: 0.2s; }
.stat:nth-child(4) { transition-delay: 0.3s; }

/* ---------- 12. FAQ animations ---------- */
.faq-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.faq-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* ---------- 13. Scroll indicator (hero) ---------- */
.scroll-indicator {
  animation: float 2s ease-in-out infinite;
}

.scroll-dot {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- 14. Motion préférence ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .slider-track {
    transition: none !important;
  }

  .slide {
    transition: none !important;
  }
}
