/* PORTFOLIO STICKY*/
.yp-demo-section {
  position: relative;
  height: 220vh;
}

.yp-demo-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;

  display: grid;
  grid-template-columns: 35% 65%;
  gap: 50px;
  align-items: flex-start;

  padding: 90px 7vw;
}

.yp-demo-left {
  padding-top: 80px;
}

.yp-demo-left span {
  color: #fab31c;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.yp-demo-right {
  height: 100vh;
  overflow: hidden;
}

.yp-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;

  transform: translateY(0);
  will-change: transform;
}

.yp-demo-grid a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 5px 5px rgba(0,0,0,0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
   width: 75%;
  max-width: 480px;
}

/* images */
.yp-demo-grid img {
  width: 100%;
  height: auto;
  display: block;
}

/* effet hover premium */
.yp-demo-grid a:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 8px 8px rgba(0,0,0,0.35);
}

/* décalage colonne droite (effet design comme ton exemple) */
.yp-demo-grid a:nth-child(odd) {
  transform: translateY(0);
}

.yp-demo-grid a:nth-child(even) {
  transform: translateY(80px);
}
/* RESPONSIVE SMARTPHONE */
@media (max-width: 640px) {

  .yp-demo-section {
    height: auto;
    overflow: visible;
    padding: 56px 18px;
  }

  .yp-demo-sticky {
    position: relative;
    top: auto;
    height: auto;
    overflow: visible;
    display: block;
    padding: 0;
  }

  .yp-demo-left {
    padding-top: 0;
    margin-bottom: 36px;
  }

  .yp-demo-left h2 {
    font-size: 44px;
    line-height: 1;
  }

  .yp-demo-left h4 {
    font-size: 22px;
    line-height: 1.3;
  }

  .yp-demo-left p {
    font-size: 16px;
    line-height: 1.65;
  }

  .yp-demo-right {
    height: auto;
    overflow: visible;
  }

  .yp-demo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    transform: none !important;
  }

  .yp-demo-grid a {
    width: 100%;
    max-width: none;
    border-radius: 16px;
    transform: none !important;
  }

  .yp-demo-grid a:nth-child(odd),
  .yp-demo-grid a:nth-child(even) {
    transform: none !important;
  }

  .yp-demo-grid img {
    width: 100%;
    height: auto;
    display: block;
  }

  .yp-demo-grid a:hover {
    transform: none !important;
  }
}
/*FIN*/
