.tech-experiences {
  --tech-card-width: clamp(150px, 14vw, 174px);
  --tech-card-height: 74px;
  --tech-token-size: 66px;
  --tech-home-x: clamp(170px, 16vw, 210px);
  --tech-home-y: 136px;
  --tech-logo-offset: calc(var(--tech-token-size) / 2 + 3px);
  --tech-snap: cubic-bezier(0.2, 0.86, 0.24, 1);
  position: relative;
  isolation: isolate;
  min-height: 580px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(18, 148, 185, 0.1), transparent 26%),
    rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.tech-experiences::before,
.tech-experiences::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(18, 148, 185, 0.1);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 600ms ease, transform 1200ms var(--tech-snap);
}

.tech-experiences::after {
  width: 340px;
  height: 340px;
  border-color: rgba(18, 148, 185, 0.055);
}

.tech-experiences__grid {
  position: absolute;
  inset: 0;
  opacity: 0.64;
  background-image:
    linear-gradient(rgba(12, 59, 84, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 59, 84, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 50%, black 2%, transparent 73%);
  pointer-events: none;
}

.tech-experiences__eyebrow {
  position: absolute;
  z-index: 10;
  top: 27px;
  left: 50%;
  margin: 0;
  color: var(--blue-700);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.tech-experience {
  --tech-x: calc(var(--tech-home-x) * -1);
  --tech-y: calc(var(--tech-home-y) * -1);
  --tech-out-x: -45px;
  --tech-out-y: -30px;
  --tech-fragment: var(--navy-800);
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: var(--tech-card-width);
  height: var(--tech-card-height);
  grid-template-columns: 44% 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(12, 59, 84, 0.15);
  border-radius: 14px;
  box-shadow:
    0 14px 34px rgba(6, 41, 59, 0.13),
    inset 0 1px rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform:
    translate(-50%, -50%)
    translate(var(--tech-x), var(--tech-y))
    translate(var(--tech-out-x), var(--tech-out-y))
    scale(0.8);
  transition:
    width 680ms var(--tech-snap),
    height 680ms var(--tech-snap),
    padding 680ms var(--tech-snap),
    gap 450ms ease,
    border-radius 680ms var(--tech-snap),
    border-color 420ms ease,
    background-color 470ms ease,
    box-shadow 560ms ease,
    opacity 480ms ease,
    transform 900ms var(--tech-snap);
  transition-delay: calc(var(--order) * 90ms);
  will-change: width, height, opacity, transform;
}

.tech-experience--web {
  --tech-x: var(--tech-home-x);
  --tech-out-x: 45px;
  --tech-fragment: var(--blue-600);
}

.tech-experience--mobile {
  --tech-y: var(--tech-home-y);
  --tech-out-y: 30px;
  --tech-fragment: var(--blue-600);
}

.tech-experience--portal {
  --tech-x: var(--tech-home-x);
  --tech-y: var(--tech-home-y);
  --tech-out-x: 45px;
  --tech-out-y: 30px;
  --tech-fragment: var(--navy-800);
}

.tech-experience__screen {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 52px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 2px solid var(--navy-950);
  border-radius: 5px;
  opacity: 1;
  transform: scale(1);
  transition: opacity 260ms ease, transform 500ms var(--tech-snap);
}

.tech-experience__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tech-experience__screen--desktop {
  border-width: 3px 3px 6px;
}

.tech-experience__screen--web {
  border-width: 3px 3px 5px;
  background: var(--white);
}

.tech-experience__screen--web::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 12px;
  align-items: center;
  padding-left: 5px;
  content: "TABLEAU DE BORD";
  color: var(--white);
  background: var(--navy-900);
  font-size: 4px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tech-experience__screen--web img {
  object-position: 50% 29%;
  transform: scale(1.42);
  transform-origin: 50% 29%;
}

.tech-experience__screen--mobile,
.tech-experience__screen--portal {
  justify-self: center;
  width: 62%;
  border-width: 3px;
  border-radius: 8px;
}

.tech-experience__screen--portal {
  width: 53%;
}

.tech-experience__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 240ms ease, transform 460ms var(--tech-snap);
}

.tech-experience__copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tech-experience__copy strong {
  color: var(--navy-950);
  font-size: 15px;
  line-height: 1;
}

.tech-experiences__builder {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 126px;
  height: 84px;
  transform: translate(-50%, -50%);
}

.tech-experiences__builder::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: calc(var(--tech-token-size) + 2px);
  height: calc(var(--tech-token-size) + 2px);
  background: var(--white);
  border-radius: 16px;
  content: "";
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: opacity 360ms ease, transform 650ms var(--tech-snap);
}

.tech-experiences__wave {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(240, 107, 31, 0.17));
  transition: opacity 450ms ease, transform 760ms var(--tech-snap), filter 650ms ease;
}

.tech-experiences__wave path {
  fill: none;
  stroke: var(--orange-600);
  stroke-width: 17;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-experiences__pulse {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(240, 107, 31, 0.22);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
}

.tech-experiences__complete {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: flex;
  width: 180px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--navy-950);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.035em;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 560ms ease, transform 820ms var(--tech-snap);
}

.tech-experiences__complete img {
  width: 160px;
  height: 160px;
}

.tech-experiences__status {
  position: absolute;
  z-index: 9;
  bottom: 28px;
  left: 50%;
  width: min(75%, 360px);
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-align: center;
  transform: translateX(-50%);
}

.tech-experiences__replay {
  position: absolute;
  z-index: 12;
  right: 20px;
  bottom: 19px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  color: var(--navy-800);
  background: var(--blue-50);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms ease, transform 440ms var(--tech-snap), background-color 180ms ease;
  pointer-events: none;
}

.tech-experiences__replay:hover {
  background: var(--blue-100);
}

.tech-experiences__replay:focus-visible {
  outline: 3px solid rgba(240, 107, 31, 0.4);
  outline-offset: 3px;
}

.tech-experiences__replay svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-experiences[data-phase="waiting"] .tech-experiences__pulse {
  animation: tech-experiences-pulse 1.65s ease-out infinite;
}

.tech-experiences[data-phase="arriving"] .tech-experience,
.tech-experiences[data-phase="compacting"] .tech-experience {
  opacity: 1;
  transform:
    translate(-50%, -50%)
    translate(var(--tech-x), var(--tech-y))
    scale(1);
}

.tech-experiences[data-phase="compacting"] .tech-experience,
.tech-experiences[data-phase="assembling"] .tech-experience,
.tech-experiences[data-phase="complete"] .tech-experience {
  width: var(--tech-token-size);
  height: var(--tech-token-size);
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  background: var(--tech-fragment);
  border-color: transparent;
  border-radius: 16px;
  box-shadow:
    0 15px 28px rgba(6, 41, 59, 0.17),
    inset 0 1px rgba(255, 255, 255, 0.14);
}

.tech-experiences[data-phase="compacting"] .tech-experience {
  opacity: 1;
  transform:
    translate(-50%, -50%)
    translate(var(--tech-x), var(--tech-y))
    scale(1);
}

.tech-experiences[data-phase="compacting"] .tech-experience__screen,
.tech-experiences[data-phase="compacting"] .tech-experience__copy,
.tech-experiences[data-phase="assembling"] .tech-experience__screen,
.tech-experiences[data-phase="assembling"] .tech-experience__copy,
.tech-experiences[data-phase="complete"] .tech-experience__screen,
.tech-experiences[data-phase="complete"] .tech-experience__copy {
  opacity: 0;
  transform: scale(0.55);
}

.tech-experiences[data-phase="compacting"] .tech-experience__copy,
.tech-experiences[data-phase="assembling"] .tech-experience__copy,
.tech-experiences[data-phase="complete"] .tech-experience__copy {
  transform: translateX(10px) scale(0.55);
}

.tech-experiences[data-phase="assembling"] .tech-experience,
.tech-experiences[data-phase="complete"] .tech-experience {
  opacity: 1;
  transition-delay: calc((3 - var(--order)) * 65ms);
}

.tech-experiences[data-phase="assembling"] .tech-experience--desktop,
.tech-experiences[data-phase="complete"] .tech-experience--desktop {
  transform:
    translate(-50%, -50%)
    translate(calc(var(--tech-logo-offset) * -1), calc(var(--tech-logo-offset) * -1));
}

.tech-experiences[data-phase="assembling"] .tech-experience--web,
.tech-experiences[data-phase="complete"] .tech-experience--web {
  transform:
    translate(-50%, -50%)
    translate(var(--tech-logo-offset), calc(var(--tech-logo-offset) * -1));
}

.tech-experiences[data-phase="assembling"] .tech-experience--mobile,
.tech-experiences[data-phase="complete"] .tech-experience--mobile {
  transform:
    translate(-50%, -50%)
    translate(calc(var(--tech-logo-offset) * -1), var(--tech-logo-offset));
}

.tech-experiences[data-phase="assembling"] .tech-experience--portal,
.tech-experiences[data-phase="complete"] .tech-experience--portal {
  transform:
    translate(-50%, -50%)
    translate(var(--tech-logo-offset), var(--tech-logo-offset));
}

.tech-experiences[data-phase="assembling"] .tech-experience--desktop {
  border-radius: 23px 4px 4px;
}

.tech-experiences[data-phase="assembling"] .tech-experience--web {
  border-radius: 4px 23px 4px 4px;
}

.tech-experiences[data-phase="assembling"] .tech-experience--mobile {
  border-radius: 4px 4px 4px 23px;
}

.tech-experiences[data-phase="assembling"] .tech-experience--portal {
  border-radius: 4px 4px 23px;
}

.tech-experiences[data-phase="assembling"] .tech-experiences__builder::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 520ms;
}

.tech-experiences[data-phase="assembling"] .tech-experiences__wave {
  filter: drop-shadow(0 8px 18px rgba(240, 107, 31, 0.32));
  transform: scale(1.06);
}

.tech-experiences[data-phase="assembling"]::before {
  transform: translate(-50%, -50%) scale(1.05);
}

.tech-experiences[data-phase="complete"] .tech-experience {
  opacity: 0;
  transform:
    translate(-50%, -50%)
    translate(var(--tech-final-x, 0), var(--tech-final-y, 0))
    scale(0.96);
}

.tech-experiences[data-phase="complete"] .tech-experience--desktop {
  --tech-final-x: calc(var(--tech-logo-offset) * -1);
  --tech-final-y: calc(var(--tech-logo-offset) * -1);
}

.tech-experiences[data-phase="complete"] .tech-experience--web {
  --tech-final-x: var(--tech-logo-offset);
  --tech-final-y: calc(var(--tech-logo-offset) * -1);
}

.tech-experiences[data-phase="complete"] .tech-experience--mobile {
  --tech-final-x: calc(var(--tech-logo-offset) * -1);
  --tech-final-y: var(--tech-logo-offset);
}

.tech-experiences[data-phase="complete"] .tech-experience--portal {
  --tech-final-x: var(--tech-logo-offset);
  --tech-final-y: var(--tech-logo-offset);
}

.tech-experiences[data-phase="complete"] .tech-experiences__wave {
  opacity: 0;
  transform: scale(0.96);
}

.tech-experiences[data-phase="complete"] .tech-experiences__complete {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 190ms;
}

.tech-experiences[data-phase="complete"]::before,
.tech-experiences[data-phase="complete"]::after {
  opacity: 0.45;
  transform: translate(-50%, -50%) scale(1.06);
}

.tech-experiences[data-phase="complete"] .tech-experiences__replay {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 600ms;
  pointer-events: auto;
}

.no-js .tech-experience,
.no-js .tech-experiences__wave,
.no-js .tech-experiences__status {
  opacity: 0;
}

.no-js .tech-experiences__complete {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@keyframes tech-experiences-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.68);
  }

  26% {
    opacity: 0.52;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@media (max-width: 1180px) {
  .tech-experiences {
    --tech-home-x: 190px;
  }
}

@media (max-width: 980px) {
  .tech-experiences {
    width: min(100%, 760px);
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .tech-experiences {
    --tech-card-width: clamp(130px, 40vw, 148px);
    --tech-card-height: 66px;
    --tech-token-size: 58px;
    --tech-home-x: min(27vw, 96px);
    --tech-home-y: 125px;
    min-height: 490px;
    border-radius: 20px;
  }

  .tech-experiences::before {
    width: 220px;
    height: 220px;
  }

  .tech-experiences::after {
    width: 285px;
    height: 285px;
  }

  .tech-experiences__eyebrow {
    top: 22px;
    font-size: 8px;
  }

  .tech-experience {
    grid-template-columns: 41% 1fr;
    gap: 7px;
    padding: 7px;
    border-radius: 12px;
  }

  .tech-experience__screen {
    min-height: 47px;
  }

  .tech-experience__copy small {
    font-size: 6px;
  }

  .tech-experience__copy strong {
    font-size: 13px;
  }

  .tech-experiences__builder {
    width: 112px;
    height: 76px;
  }

  .tech-experiences__complete img {
    width: 128px;
    height: 128px;
  }

  .tech-experiences__complete span {
    font-size: 16px;
  }

  .tech-experiences__status {
    bottom: 22px;
    font-size: 9px;
  }

  .tech-experiences__replay {
    right: 13px;
    bottom: 13px;
    padding: 6px;
  }

  .tech-experiences__replay span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tech-experiences *,
  .tech-experiences *::before,
  .tech-experiences *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .tech-experiences__replay {
    display: none;
  }
}
