.card-box {
  background: var(--primary);
  padding: var(--space-l);
  position: relative;
  z-index: 1;
}

@media (min-width: 769px) {
  .overlap-box {
    margin-right: -60px;
  }

  .card-box {
    padding-left: 80px;
  }
}

@media (max-width: 768px) {
  .overlap-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .overlap-box {
    margin-right: 0;
    margin-bottom: var(--space-m);
  }

  .card-box {
    padding-left: var(--space-m);
  }
}

/* Les 4 card de la page A propos */
@media (min-width: 769px) {
  .card-about {
    position: relative;
    transition: all 0.3s ease;
  }

  .card-about:nth-child(2) {
    z-index: 1;
  }

  .card-about:nth-child(3) {
    margin-left: -60px;
    margin-bottom: 30px;
    z-index: 2;
  }

  .card-about:nth-child(1) {
    margin-top: -80px;
    margin-right: -60px;
    z-index: 2;
  }

  .card-about:nth-child(4) {
    margin-top: -120px;
    z-index: 1;
  }
}

/* Les 9 card de la page Services */
.card-service {
  position: relative;
}

.card-service__content {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  z-index: 10;
  background-color: inherit;
  transition:
    max-height 0.5s ease,
    opacity 0.3s ease;
}

.card-service.is-open > .card-service__content {
  height: auto !important;
  max-height: 500px !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding: var(--space-m);
}

.card-service__toggle {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.card-service.is-open .card-service__toggle {
  transform: rotate(90deg);
}

/* Cards de la page Technologies */
.cards-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  background: transparent;
  gap: 0;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.card-content {
  color: white;
  padding: 16px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

@media (min-width: 767px) {
  .cards-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
  }

  .card {
    flex: 1;
  }

  .card img {
    height: 280px;
  }
}

/* Cards de la page Documentation (pour qu'elles aient la même taille */
.same-width {
  display: flex;
  gap: 20px;
}

.same-width > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.same-width > div .button-wrapper {
  margin-top: auto;
}
