.section-projet {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 180px auto;
  font-family: "Avenir", sans-serif;
}

.projet-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 60px;
  margin-bottom: 40px;
}

.section-projet .title-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.section-projet .title-left h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #0b0b28;
}

.section-projet .title-right h3 {
  font-size: 2.8rem;
  font-weight: 500;
  color: #0b0b28;
  margin-bottom: 8px;
  font-family: "Futura Std", sans-serif;
  line-height: 1.2;
  margin-left: 100px;
  letter-spacing: -1px;
}

.section-projet .title-right p {
  font-size: 1rem;
  line-height: 1.5;
  color: #555;
  max-width: 500px;
}

.projet-image {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(46, 204, 113, 0.6); /* glow vert */
  height: 500px;
}

.projet-image img {
  width: 100%;
  border-radius: 15px;
  display: block;
  height: 100%;
  object-fit: cover;
}

.btn-arrow {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: #0e162c; /* bleu */
  border-top-left-radius: 70px; /* arrondi en haut à gauche */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn-arrow:hover {
  background: #1c3fcc; /* bleu foncé au hover */
}
.btn-arrow i {
  margin-top: 10px;
  display: inline-block;
}

.arrow-icon {
  transform: rotate(-100deg); /* tourne la flèche de 45° */
  transform-origin: center; /* centre la rotation */
}

.projet-stack {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 600px; /* laisse assez de place pour la pile */
  margin: 0 auto;
}

.projet-stack .projet-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 500px;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s ease, opacity 0.5s ease, z-index 0.5s ease;
  box-shadow: none;
  opacity: 0.6;
}

/* Carte du haut */
.projet-stack .projet-image:nth-child(1) {
  z-index: 3;
  transform: translateY(0);
  opacity: 1;
  box-shadow: 0 0 30px rgba(46, 204, 113, 0.6);
}

/* 2e carte (décalée vers le bas) */
.projet-stack .projet-image:nth-child(2) {
  z-index: 2;
  transform: translateY(30px) scale(0.98);
}

/* 3e carte (encore plus bas) */
.projet-stack .projet-image:nth-child(3) {
  z-index: 1;
  transform: translateY(60px) scale(0.96);
}

/* petit effet au hover */
.projet-stack .projet-image:hover {
  transform: translateY(20px) scale(1);
}

/* Par défaut, aucune carte derrière ne montre son détail */
.projet-stack .projet-image .projet-detail {
  display: none;
}

/* Seule la carte ouverte (au premier plan) montre le détail */
.projet-stack .projet-image.open .projet-detail {
  display: flex; /* ou block selon ta structure */
}

.projet-detail img {
  width: 250px;
  height: auto;
  border-radius: 12px;
  flex-shrink: 0;
}

.detail-top {
  display: flex;
  align-items: flex-start; /* aligne image + titre en haut */
  gap: 30px;
}

.detail-top img {
  width: 300px;
  height: auto;
  border-radius: 12px;
  flex-shrink: 0;
}

.detail-top h2 {
  margin-top: 100px;
  font-size: 3rem;
  font-weight: bold;
  color: white;
  line-height: 1;
}

.detail-top span {
  font-size: 2.2rem;
  font-weight: 400;
  color: white;
}

.detail-bottom p {
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
  color: white;
  font-family: "Avenir", sans-serif;
  font-weight: 100;
}
.projet-image.open .projet-img {
  display: none; /* cache l’image principale */
}

.projet-image.open .projet-detail {
  display: flex;
  flex-direction: column; /* image à gauche, texte à droite */
  align-items: flex-start;
  gap: 30px;
  width: 100%;
  height: 100%; /* occupe la même hauteur que l’image */
  background: #0e162c; /* fond bleu */
  color: white;
  padding: 40px;
  border-radius: 15px;
  box-sizing: border-box;
}

.projet-image.open .arrow-icon {
  transform: rotate(180deg); /* retourne la flèche quand c'est ouvert */
  transition: transform 0.3s ease;
}

.projet-image {
  perspective: 1000px; /* profondeur 3D */
}

.projet-img,
.projet-detail {
  transition: opacity 0.6s ease, filter 0.6s ease;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.projet-img {
  opacity: 1;
  filter: blur(0px);
}
/* projet ouvert → passe au-dessus des autres */
.projet-stack .projet-image.open {
  z-index: 10;
  transform: translateY(0) scale(1);
  box-shadow: 0 0 30px rgba(46, 204, 113, 0.6);
  opacity: 1;
}

.projet-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
  height: 100%;
  background: #2e5bff;
  color: white;
  padding: 40px;
  border-radius: 15px;
  box-sizing: border-box;

  /* Animation */
  position: absolute;
  inset: 0;
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.6s ease, filter 0.6s ease;
}

.projet-image.open .projet-detail {
  opacity: 1;
  filter: blur(0px);
}

.projet-image.open .projet-img {
  opacity: 0;
  filter: blur(20px);
}

.projet-img {
  transition: opacity 0.6s ease, filter 0.6s ease;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 15px;
}

/* ========== RESPONSIVE ========== */
@media screen and (max-width: 1200px) {
  .section-projet {
    max-width: 90%;
    margin: 100px auto;
  }
  .projet-header {
    padding: 0 20px;
  }
  .section-projet .title-right h3 {
    margin-left: 50px;
    font-size: 2.4rem;
  }
  .projet-image {
    max-width: 100%;
    height: 550px;
  }
  .detail-top h2 {
    font-size: 2.5rem;
    margin-top: 80px;
  }
}

@media screen and (max-width: 992px) {
  .section-projet {
    margin: 80px auto;
  }
  .projet-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .section-projet .title-left {
    justify-content: center;
    min-width: auto;
  }
  .section-projet .title-right h3 {
    margin-top: 50px;
    margin-bottom: -170px;
    margin-left: 0;
    font-size: 2rem;
    padding-top: 8px;
  }
  .projet-image {
    height: 550px;
  }
  .projet-detail {
    padding: 30px;
    gap: 20px;
  }
  .detail-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .detail-top img {
    width: 200px;
    margin-top: 20px;
  }
  .detail-top h2 {
    margin-top: 0;
    font-size: 2rem;
  }
  .btn-arrow {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .section-projet {
    margin: 60px auto;
  }
  .section-projet .title-left h2 {
    font-size: 1.8rem;
  }
  .section-projet .title-right h3 {
    font-size: 1.8rem;
  }
  .projet-image {
    height: 550px;
  }
  .projet-detail {
    padding: 25px;
    gap: 15px;
  }
  .detail-top h2 {
    font-size: 1.8rem;
  }
  .detail-bottom p {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  .btn-arrow {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
  .swiper-pagination {
    bottom: -10px;
  }
}

@media screen and (max-width: 576px) {
  .section-projet {
    margin: 40px auto;
  }
  .section-projet .title-left h2 {
    font-size: 1.5rem;
  }
  .section-projet .title-right h3 {
    font-size: 1.5rem;
  }
  .section-projet .title-right p {
    font-size: 0.9rem;
  }
  .projet-image {
    height: 550px;
    border-radius: 10px;
  }
  .projet-detail {
    padding: 20px;
    border-radius: 10px;
  }
  .detail-top img {
    width: 150px;
  }
  .detail-top h2 {
    font-size: 1.5rem;
  }
  .detail-bottom p {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  .btn-arrow {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    border-top-left-radius: 50px;
  }
  .detail-bottom p br {
    display: none;
  }
  .detail-bottom p {
    overflow-wrap: break-word;
  }
}

@media screen and (max-width: 480px) {
  .projet-image {
    height: 550px;
  }
  .projet-detail {
    overflow-y: auto;
  }
  .detail-top {
    flex-direction: column;
    text-align: center;
  }
  .detail-top h2 {
    font-size: 1.3rem;
    line-height: 1.2;
  }
  .detail-bottom p {
    font-size: 0.8rem;
  }
  .btn-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 380px) {
  .section-projet .title-left h2 {
    font-size: 1.3rem;
  }
  .section-projet .title-right h3 {
    font-size: 1.3rem;
  }
  .projet-image {
    height: 550px;
  }
  .projet-detail {
    padding: 15px;
  }
  .detail-top h2 {
    font-size: 1.2rem;
  }
  .detail-bottom p {
    font-size: 0.75rem;
  }
}

@media screen and (max-height: 500px) and (orientation: landscape) {
  .projet-image {
    height: 350px;
  }
  .projet-detail {
    padding: 20px;
    overflow-y: auto;
    max-height: 320px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .btn-arrow {
    width: 55px;
    height: 55px;
    font-size: 1.6rem;
  }
  .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    margin: 0 6px;
  }
}

@media screen and (max-height: 600px) {
  .projet-image {
    height: 380px;
  }
  .projet-detail {
    padding: 25px;
  }
  .detail-top {
    gap: 15px;
  }
  .detail-top img {
    width: 120px;
  }
  .detail-top h2 {
    font-size: 1.4rem;
    margin-top: 0;
  }
}

@media screen and (max-width: 768px) {
  .section-projet {
    position: relative;
    padding-bottom: 60px; /* espace pour la pagination */
  }

  .section-projet .swiper-pagination {
    position: relative; /* plus absolute */
    margin-top: 20px; /* espace sous le slider */
    text-align: center;
  }

  .section-projet .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #0e162c;
    opacity: 0.7;
    margin: 0 6px;
    border-radius: 50%;
  }

  .section-projet .swiper-pagination-bullet-active {
    background: #2ecc71;
    opacity: 1;
  }
}
