.intern {
  margin-bottom: 50px;
  min-height: 40vh;
  margin: 0 auto 50px;

  .row:not([data-lt-tmp-id]) {
    display: flex;
    margin: 50px auto;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: none;
    padding: 20px 20px;

    &.bloc-CENTER {
      flex-direction: column;
      align-items: center;

      .bloc-intern {
        margin-left: 0;
        margin-bottom: 25px;
      }
    }

    &.bloc-FULLWIDTH {
      flex-direction: column;
      align-items: center;

      .bloc-intern {
        margin-left: 0;
        max-width: none;

        &.image {
          flex-direction: column;

          .image-intern {
            max-width: none;
            width: 100%
          }
        }
      }
    }

    &.bloc-LEFT {
      @media screen and (max-width: 670px) {
        flex-direction: column-reverse;
      }
    }

    &.bloc-single {

      .bloc-intern {
        max-width: 1075px; 
        padding: 0;
        margin-right: 0;
        width: 100%;

        h2,
        h3,
        p {
          max-width: 800px;
        }

        h2 {
          font-size: 24px;
          font-weight: 500;
        }

        h3 {
          font-weight: normal;
        }
      }

    }

    &:first-child {
      margin-top: 0;
    }

    &:has(.full-bg) {
      padding: 50px 0 0px;
      width: 100%;
      margin-bottom: 100px;
      max-width: none;
      position: relative;

      &>.bloc-intern {
        max-width: 950px;
        width: 100%;
      }

      &>.bloc-intern {
        margin: auto;
      }

      .row:has(.bloc-project) {
        gap: 20px;
      }

      #projets {
        margin-top: -180px;
        padding-top: 180px;
      }

      .bloc-project {
        background: rgb(251 190 108 / 50%);
        border: 2px solid white;
        border-radius: 5px;
        padding: 10px;
      }

      &:after {
        content: "";
        width: 100%;
        height: 150%;
        background: linear-gradient(165deg, #fba83c -21%, transparent 54%);
        position: absolute;
        z-index: -1;
        top: 0;
        left: 0;
      }

      @media (max-width: 768px) {
        padding: 50px 10px 0px;
      }
    }

    &:nth-child(3n) {
      background-color: var(--front-secondary);
    }

    &:nth-child(6n) {
      background-color: var(--front-primary);
    }

    @media (max-width: 768px) {
      flex-direction: column-reverse;
      flex-wrap: wrap;
      padding: 40px 10px;

      &.bloc-RIGHT {
        flex-direction: column;
      }

      &>div {
        width: 100%;
      }
    }

    @media screen and (max-width: 670px) {
      flex-direction: column;
    }
  }
}

.bloc-intern {
  width: auto;
  max-width: 500px;

  &:first-child {
    margin-right: 75px;
  }

  h2:first-child,
  h3:first-child {
    margin-top: 0;
  }

  .content-intern {
    .container {
      width: 100%;

      .row {
        gap: 1rem;
        align-items: flex-start;
        justify-content: flex-start;
        margin: 0;
        padding: 0;
      }
    }
  }

  &.image {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 500px;

    .image-intern {
      margin: 0;
      margin-right: 10px;
      max-width: 500px;

      img {
        width: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        width: 100%;
        height: 100%;
      }

      &:last-child {
        margin-right: 0;
      }
    }

    @media screen and (max-width: 768px) {
      flex-wrap: wrap;
      flex-direction: column;
    }
  }
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-left: 1.6666666667%;
  padding-right: 1.6666666667%;

  &>figure {
    width: 200px;
    height: 200px;
    overflow: hidden;
    margin: 0;
    margin-bottom: 20px;

    img {
      width: auto;
      height: 100%;
    }
  }

  @media (max-width: 768px) {
    &>figure {
      width: 100%;
      height: 300px;
    }
  }
}

.team {
  padding: 40px 0;

  .row {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;

    @media (max-width: 768px) {
      flex-direction: column;
      gap: 40px;
    }
  }

  .col-md-4 {
    flex: 1;
    max-width: 400px;
    position: relative;

    @media (max-width: 768px) {
      max-width: 100%;
    }

    .photo {
      margin: 0;
      position: relative;
      overflow: hidden;
      border-radius: 8px;

      img {
        display: block;
        width: 100%;
        height: auto;
        transition: transform 0.3s ease;
      }

      &:hover img {
        transform: scale(1.05);
      }

      &:after {
        content: "+";
        position: absolute;
        bottom: 15px;
        right: 15px;
        background: rgba(255, 255, 255, 0.95);
        color: #333;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        opacity: 1;
        transform: translateY(0);
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 2;
      }
    }

    .name {
      font-size: 24px;
      font-weight: 600;
      margin: 20px 0 10px;
      color: #333;
    }

    p {
      font-size: 16px;
      color: #666;
      margin: 0 0 15px;
    }

    .team-bio {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
      background: #f8f8f8;
      border-radius: 8px;
      padding: 0 20px;
      margin: 0;

      &.active {
        max-height: 5000px;
        padding: 20px;
        margin-top: 15px;
        border: 1px solid #e0e0e0;
      }

      p {
        margin: 0;
        line-height: 1.6;
        color: #444;
      }
    }
  }
}