 html, body {
  margin:0;
  font-family: Inter, system-ui, sans-serif;
  background:#ffffff;
  color:#111827;  
}


.service-ai {
  min-height: 180vh;
  position: relative;
}


/* Container layout */
.container {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 60px;
  height: 100vh;
  padding: 0 20px;
}


/* FLOW */
.flow {
  width: 700px;
  position: relative;
}

/* Base line */
.line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #e5e7eb;
}

/* Progress bar */
/* --- Progress bar desktop --- */
.progress {
  position: absolute;
  top: 50%;
  left: 10px;
  max-width: 98%;
  height: 2px;
  background: linear-gradient(90deg, #111827, #4b5563);
  width: var(--progress, 0%); /* on contrôle via JS */
  transition: width 0.2s linear, height 0.2s linear;
}

/* --- Progress bar mobile --- */
@media (max-width: 900px) {
  .progress {
    width: 4px;               /* barre verticale */
    height: var(--progress, 0%); /* contrôle via JS */
    max-height: 90%;
    top: 0;
    left: 50%;
    margin-left: 0;
  }
}

/* Nodes */
.nodes {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0.3;
  transform: scale(0.9);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.node.active {
  opacity: 1;
  transform: scale(1);
}

.node.focus {
  transform: scale(1.15);
}

/* Icon */
.icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all 0.3s ease;
}

.node.active .icon {
  border-color: #111827;
}

.node.focus .icon {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  animation: pulse 2.5s infinite ease-in-out;
}

.icon svg {
  width: 26px;
  stroke: #111827;
  transition: transform 0.4s ease;
}

.node.focus svg {
  transform: scale(1.1);
}

/* Node label */
.label {
  font-size: 13px;
  color: #374151;
  text-align: center;
}

/* Story panel */
.panel {
  width: 360px;
}

.panel .step { display: none; transition: opacity 0.3s; opacity: 0; }
.panel .step.active { display: block; opacity: 1; }

.panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.2px;
}

.panel p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
  font-size: 15px;
}

.fade {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pulse animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Responsive Mobile */
@media (max-width: 900px) {


  /* Container vertical */
  .container {
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    padding: 60px 16px 20px;
    box-sizing: border-box;
  }

  /* Flow vertical */
  .flow {
    position: relative;
    width: 64px;
    height: 68dvh;
    flex: 0 0 auto;
  }

  /* Ligne verticale */
  .line {
    position: absolute;
    width: 2px;
    top: 25px;    /* demi-hauteur icône */
    bottom: 25px; /* demi-hauteur icône */
    left: 50%;
    transform: translateX(-50%);
    background: #e5e7eb;
  }

  /* Progress bar verticale */
  .progress {
    position: absolute;
    width: 4px;
    top: 25px;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    transform-origin: top center;
    height: var(--progress, 0%);
    background: linear-gradient(180deg, #111827, #4b5563);
    transition: height 0.2s linear;
    will-change: height;
  }

  /* Nodes container */
  .nodes {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start; /* labels à droite */
    height: 100%;
    gap: 25px;
  }

  /* Node horizontal icône + label */
  .node {
    display: flex;
    flex-direction: row; /* icône à gauche, label à droite */
    align-items: center;
    gap: 12px;
    opacity: 0.3;
    transform: scale(0.9);
    transition: transform 0.35s ease, opacity 0.35s ease;
    position: relative;
    left: calc(50% - 25px); /* aligne l'icône sur la ligne */
  }

  .node.active {
    opacity: 1;
    transform: scale(1);
  }

  .node.focus .icon{
    transform: scale(1.15);
    transform-origin: center center;
  }

    .node.focus .label{
    transform: scale(1.15);
    transform-origin: center center;
  }

  /* Icônes */
  .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.3s ease;
  }

  .node.active .icon {
    border-color: #111827;
  }

  .node.focus .icon {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    animation: pulse 2.5s infinite ease-in-out;
  }

  .icon svg {
    width: 24px;
    stroke: #111827;
    transition: transform 0.4s ease;
  }

  .node.focus svg {
    transform: scale(1.1);
  }

  /* Labels à droite */
  .node .label {
    font-size: 12px;
    color: #374151;
    text-align: left;
    white-space: nowrap;
    margin: 0;

  }

  /* Story panels */
  .panel {
    width: min(100%, 420px);
    padding: 0 8px calc(env(safe-area-inset-bottom, 0px) + 40px);
    box-sizing: border-box;
  }

  .panel .step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .panel .step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  .panel h2 {
    margin: 0 0 10px;
    font-size: 20px;
    letter-spacing: -0.2px;
  }

  .panel p {
    margin: 0;
    color: #4b5563;
    line-height: 1.55;
    font-size: 15px;
  }

  /* Fade animation */
  .fade {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .fade.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Pulse animation */
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
  }
}

.icon svg {
  opacity: 0.15;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.label {
  opacity: 0.1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.node.active svg,
.node.focus svg {
  opacity: 1;
}

.node.active .label,
.node.focus .label {
  opacity: 1;
}

.line {
   opacity: 0.1;
}
.fade {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.menu-toggle .burger-icon line {
  stroke: #314C40;
  stroke-width: 2;
  opacity: 1;
}