@import "../variables";

$sejour-card-padding: 20px;
$sejour-card-1-break: 900px;
$sejour-card-2-break: 720px;
$sejour-card-3-break: 670px;
$sejour-card-4-break: 480px;

.sejour-card {
  display: flex;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.2);

  &:not(:last-child) {
    margin-bottom: 30px;
  }

  @media screen and (max-width: $sejour-card-1-break) {
    flex-flow: column;
  }
}

.sejour-card__left {
  display: flex;

  .sejour-card__image {
    display: flex;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.2);

    @media screen and (max-width: $sejour-card-1-break) {
      border-radius: 10px 0 10px 0;
    }
    @media screen and (max-width: $sejour-card-2-break) {
      height: 100%;
      max-width: none;
      min-height: 200px;
      border-radius: 10px;
    }
  }

  .sejour-card__presentation {
    padding: $sejour-card-padding;


    .sejour-card__title,
    .sejour-card__subtitle{
      margin: 0;
      font-weight: 600;
      line-height: 1.1;
    }

    .sejour-card__title {
      color: esprit-sentiers(orange);
      font-size: 22px;
      margin-bottom: 10px;
    }

    .sejour-card__subtitle {
      font-family: fonts(default);
      font-size: 17px;
      margin-bottom: 5px;

      .arrow-icon::before,
      .arrow-icon::after {
        margin: 0 10px;
      }
    }

    @media screen and (max-width: $sejour-card-1-break) {
      padding-bottom: 0;
    }

    @media screen and (max-width: $sejour-card-3-break) {
      text-align: center;
    }
  }

  @media screen and (max-width: $sejour-card-2-break) {
    flex-flow: column;
  }
}

.sejour-card__right {
  flex-grow: 1;
  padding: $sejour-card-padding;
  min-width: 262px;
  display: flex;
  flex-flow: column;
  justify-content: space-around;

  .sejour-card__niveau-price {
    .sejour-card__price {
      margin: 0;
      line-height: 1.1;
      font-size: 17px;

      span {
        font-size: 1.3rem;
        font-weight: 600;
        color: esprit-sentiers(orange);
      }
    }
  }

  .sejour-card__picto-group {
    line-height: 1.1;
    min-height: 30px;
    display: flex;
    align-items: center;

    &:not(:last-child) {
      margin-bottom: 5px;
    }

    .picto-group__picto {
      padding-right: 10px;
      display: flex;
      align-items: center;

      img {
        width: 25px;
      }
    }

    .picto-group__important {
      font-weight: 600;
    }
  }

  @media screen and (min-width: $sejour-card-1-break) {
    padding-left: 0;
  }

  @media screen and (max-width: $sejour-card-1-break) {
    flex-flow: row;
    align-items: center;

    .sejour-card__niveau-price {
      padding-right: $sejour-card-padding;
      text-align: center;
    }

    .sejour-card__pictos {
      display: grid;
      grid-template-columns: 1fr 1fr;

      .sejour-card__picto-group:nth-child(odd) {
        padding-right: 10px;
      }
    }
  }

  @media screen and (max-width: $sejour-card-4-break) {
    flex-flow: column;
    align-items: center;

    .sejour-card__niveau-price {
      padding-right: 0;
      margin-bottom: 10px;
    }

    .sejour-card__pictos {
      .sejour-card__picto-group:nth-child(odd) {
        padding-right: 0;
      }

      .sejour-card__picto-group {
        flex-flow: column;
        justify-content: center;
        text-align: center;

        .picto-group__picto {
          padding: 0 0 5px 0;
        }
      }
    }
  }
}

.sejour-card__niveau {
  display: inline-flex;
  align-items: center;
}

.bareme__marche {
  display: flex;
  flex-flow: row;
  align-items: center;

  .difficulte {
    max-width: 22px;
    overflow: hidden;
    margin-right: 5px;
    display: flex;
    align-items: center;

    svg {
      height: 13px;
        path {
            fill: #a7a8a9;
        }
    }
  }

  &[data-difficulte="1"] .difficulte:nth-child(-n + 1),
  &[data-difficulte="2"] .difficulte:nth-child(-n + 2),
  &[data-difficulte="3"] .difficulte:nth-child(-n + 3),
  &[data-difficulte="4"] .difficulte:nth-child(-n + 4),
  &[data-difficulte="5"] .difficulte:nth-child(-n + 5) {
    svg path {
      fill: esprit-sentiers(green);
    }
  }

  &.contrast {
    &[data-difficulte="1"] .difficulte:nth-child(-n + 1),
    &[data-difficulte="2"] .difficulte:nth-child(-n + 2),
    &[data-difficulte="3"] .difficulte:nth-child(-n + 3),
    &[data-difficulte="4"] .difficulte:nth-child(-n + 4),
    &[data-difficulte="5"] .difficulte:nth-child(-n + 5) {
      svg path {
        fill: esprit-sentiers(light-maroon);
      }
    }

    .difficulte svg path {
      fill: #ffffff;
    }
  }
}

$temoignages-section-1-break: 910px;
$side-max-width: 500px;

.temoignages-section {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  min-height: 300px;
  width: 100%;

  @media screen and (max-width: $temoignages-section-1-break) {
    flex-flow: column;
    justify-content: center;
    max-width: $side-max-width;
    margin: auto;
  }
}

.temoignages-section__carousel {
  display: flex;
  align-items: start;
  flex: 1 1 0;
  min-width: 0;
}

.temoignages-section__video {
  display: flex;
  padding-top: 10px;
  padding-bottom: 10px;
  flex: 1 1 0;
  min-width: 0;
  max-width: $side-max-width;

  .container-youtube {
    flex-grow: 1;
    width: 100%;
    height: 290px;
  }
}

.temoignage {
  padding: 20px;
  line-height: 1.4;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  margin: 10px auto 20px auto;
  width: 100%;
  max-width: 800px;

  &.only {
    margin-bottom: auto;
  }

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

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

  .temoignage-content {
    margin: 0 0 10px 0;
    font-family: fonts(default);
    font-size: 17px;
  }

  .temoignage-author {
    text-align: right;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: esprit-sentiers(orange);
  }
}

.temoignages-group {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  margin: 0 15px 0 0;
  padding: 10px 15px;
  height: 100%;
}

.temoignages-carousel {
  .slick-dots {
    margin: 0;
    margin-bottom: 20px;
    bottom: -20px;
  }
}


.carousel-container {
  max-width: 100%;
  position: relative;
}

.carousel__photos {
  width: auto !important;

  .slick-slider,
  .slick-list {
    width: 610px;
  }

  .slick-dots {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 0;
    line-height: 1;
    height: 35px;
    width: auto;
    background-color: #ffffff;
    display: flex;
    align-items: center;

    li:not(.slick-active) button {
      background-color: #d4d4d4 !important;
    }
  }

  .carousel__item {
    .carousel__item__image {
      position: relative;
      overflow: hidden;
    }

    .carousel__item__image img {
      height: 100%;
      width: 100%;
    }
  }

  .carousel__item__image-author {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 35px;
    margin: 0;

    p {
      margin: 0;
    }
  }

  .slick-slider,
  .slick-list {
    @media screen and (max-width: 1090px) {
      width: 520px;
      max-width: 520px;
    }

    @media screen and (max-width: 1030px) {
      width: 450px;
      max-width: 450px;
    }

    @media screen and (max-width: 900px) {
      width: 350px;
      max-width: 350px;
    }

    @media screen and (max-width: 820px) {
      width: 400px;
      max-width: 400px;
      margin: auto;
    }

    @media screen and (max-width: 500px) {
      width: 300px;
      max-width: 300px;

      .slick-dots {
        height: 20px;
        left: 50%;
        transform: translate(-50%, 20px);
      }
    }
  }

  .slick-slider {
    @media screen and (max-width: 500px) {
      margin-bottom: 20px;
    }
  }
}

.sejour__tabs-temoignages {
  display: grid;
  position: relative;
  grid-template-columns: 3fr 1fr;

  @media screen and (max-width: 830px) {
    grid-template-columns: 1fr;

    .sejour__tabs__handler,
    .sejour__tabs__container,
    .sejour__temoignages {
      grid-column-start: 1;
      grid-row-start: auto;
    }

    .sejour__temoignages {
      margin-top: 50px;
      margin-left: 0;
    }
  }
}

.sejour__temoignages {
  margin: 20px 0 0 20px;
  grid-column-start: 2;
  grid-row-start: 2;
  min-width: 220px;

  .temoignages__title {
    font-family: fonts(default);
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    padding: 10px 20px;
    background-color: esprit-sentiers(light-maroon);
    border-radius: 10px;
    box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.2);
  }
}

.sejour__tabs__handler {
  list-style-type: none;
  padding: 0;
  margin: 0 0 0 -6px;
  display: flex;
  flex-flow: wrap;
  grid-column-start: 1;
  grid-row-start: 1;
  width: 100%;

  @media screen and (max-width: 1040px) {
    justify-content: center;
    margin: 0;
  }

  .tabs__item {
    padding: 6px;

    button {
      padding: 8px 16px;
      background: #ededed;
      border-radius: 10px;
      border: none;
      cursor: pointer;
      transition: background-color 0.2s, color 0.2s ease-in-out;
      box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.2);
    }

    &.active {
      button {
        color: #ffffff;
        background: esprit-sentiers(orange);
      }
    }
  }


}

.sejour__tabs__container {
  position: relative;
  display: flex;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.2);
  margin: 20px 0 auto 0;
  padding: 18px 22px;
  grid-column-start: 1;
  grid-row-start: 2;
}

.sejour__tabs__tab {
  margin: 0;
  line-height: 1.7;

  h3, h4, h5, h6 {
    color: esprit-sentiers(orange);
    margin: 0 0 10px 0;
  }

  h3 {
    font-size: 25px;
  }

  h4, h5, h6 {
    font-weight: 400;
    font-family: fonts(default);
  }

  p {
    margin: 0 0 10px 0;
  }

  .min-text {
    font-size: 0.7rem;
  }
}

.tab__summary {
  .summary__section {
    &:not(:last-child) {
      margin: 0 0 40px 0;
    }

    p {
      text-align: justify;
    }
  }

  .summary__schedule {
    margin: 20px auto 0 auto;
    max-width: 600px;
    padding: 18px 22px;
    border-radius: 10px;
    background-color: #eeeeee;

    td {
      padding: 4px 8px;
      border: none;
      line-height: 1.1;
    }
  }

  .steps_map {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
      width: 90%;
    }
  }

  .steps__step {
    margin-bottom: 35px;

    .step__header {
      margin-bottom: 10px;
      position: relative;
      line-height: 1.2;
      padding: 0 0 0 40px;

      &::before {
        content: '';
        top: 50%;
        left: 5px;
        position: absolute;
        transform: translateY(-50%);
        width: 23px;
        height: 23px;
        background: url('/static/assets/images/programme/sejours/step-leaf.svg') no-repeat center / contain;
      }

      :not(:last-child) {
        margin-bottom: 5px;
      }

      .step__title {
        color: esprit-sentiers(orange);
        font-weight: 600;

        .day {
          color: esprit-sentiers(orange);
          &::after {
            content: ' - ';
          }
        }

        .details {
          font-size: 0.8em;
        }
      }

      .description-1,
      .description-2 {
        line-height: 1.2;
        font-size: 13px;
      }

      .description-1 {
        font-weight: 600;
      }
    }

    .step__content {
      text-align: justify;
      line-height: 1.4;

      p {
        margin-bottom: 3px;
      }
    }
  }

  .steps__precision {
    text-align: right;
    font-size: 12px;
  }
}

.tab__budget {
  width: 100%;

  .budget__section {
    &:not(:last-child) {
      margin-bottom: 40px;
    }

    h4, h5 {
      color: inherit;
    }

    &.budget {
      .budget__fees {
        display: flex;
        flex-flow: column;
      }

      .budget__fees__optional,
      .budget__fees__required {
        padding: 18px 22px;
      }

      .budget__fees__required {
        border-radius: 10px;
        background-color: #eeeeee;
      }

      .association__fees,
      .place__fees {
        h4 {
          font-size: 15px;
          font-weight: 600;
        }
      }

      .total__fees {
        padding-top: 10px;

        .fees-list {
          padding-top: 10px;
          border-top: 1px solid esprit-sentiers(orange);
          list-style: none;
          padding-inline-start: 0;
          margin-inline-start: 40px;
        }
      }

      .budget__fees__optional {
        h5 {
          font-size: 16px;
          font-weight: 600;
          text-decoration: underline;
          margin: 0 0 5px 0;
        }

        .options__descriptions {
          margin: 5px 0 10px 0;
          line-height: 1.1;
          font-style: italic;
        }
      }

      .fees-list {
        margin-top: 0;
        padding-inline-start: 40px;

        li > div {
          line-height: 1.4;
          display: grid;

          &:not(.sub-amounts) {
            grid-template-columns: 3fr 1fr;
          }

          &.sub-amounts {
            grid-template-columns: 1fr;
          }

          .sub-amount {
            display: grid;
            grid-template-columns: 3fr 1fr;
            align-items: center;

            > div:first-child {
              padding-left: 20px;
            }
          }
        }

        .fee {
          > div {
            padding: 2px 3px;
          }

          > div:nth-child(2) {
            word-spacing: 10px;
          }
        }

        .details {
          &.min {
            word-spacing: initial;
            font-size: 13px;
          }

          &.colored {
            color: esprit-sentiers(green);
          }
        }
      }

      .association__fees {
        margin-bottom: 40px;
      }

      .optional-fees {
        margin-top: 20px;

        h5 {
          padding-inline-start: 20px;
          text-decoration: underline;
          font-size: 16px;
          margin-bottom: 5px;
        }
      }

    }

    &.particularities {
      .particularity {
        text-align: justify;

        &:not(:last-child) {
          margin-bottom: 20px;
        }

        .particularity__label {
          font-weight: 600;
          margin: 0 0 5px 0;
        }
      }
    }
  }
}

.tab__accomodations,
.tab__infos {
  .item {
    text-align: justify;

    &:not(:last-child) {
      margin-bottom: 20px;
    }

    .item__label {
      color: inherit;
      font-weight: 600;
      margin: 0 0 5px 0;
    }

    .with-details {
      margin-bottom: 10px;
    }

    .sub-item {
      margin-bottom: 10px;

      p {
        margin-left: 15px;
        line-height: 1.5;
      }
    }

    .details {
      font-size: 13px;
      margin-top: 0;
      line-height: 1.1;
      margin-bottom: 0;
    }
  }
}

.tab__dates {
  width: 100%;

  .dates__month {
    &:not(:last-child) {
      padding-bottom: 30px;
    }

    .month__name {
      font-weight: 600;
      color: inherit;
      font-size: 22px;
      margin-bottom: 15px;
    }

    .month__events {
      padding-left: 25px;
      position: relative;

      &::before {
        content: '';
        height: 100%;
        width: 1px;
        border-right: 6px dotted esprit-sentiers(light-maroon);
        position: absolute;
        top: 0;
        left: 2px;
      }

    }

    .month__event {
      display: flex;
      padding: 15px 20px;
      background-color: #fbfbfb;
      box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.2);
      border-radius: 10px;
      justify-content: space-between;

      &:not(:last-child) {
        margin-bottom: 15px;
      }


      &:not(.has-past) .event__presentation {
        padding: 0 15px 0 0;
        flex-grow: 2;
      }

      .event__presentation {
        display: flex;
        flex-flow: column;
      }

      &:not(.has-past) {
        .event__presentation {
          max-width: 380px;
        }
      }

      .event__reserve {
        display: flex;
        flex-flow: column;
        max-width: 230px;
        justify-content: space-evenly;

        &:not(.is-open) {
          align-items: end;
        }
      }

      .event__guide-profil {
        margin: auto 20px auto 0;
        height: 100%;
        display: inline-block;
        vertical-align: middle;

        img {
          width: 100px;
          height: 100px;
          border-radius: 50px;
          vertical-align: middle;
          box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
        }

      }

      .event__carpool,
      .event__recontact {
        margin: 5px 0 0 0;
        font-size: 13.5px;
      }

      .event__dates {
        font-size: 19px;
        font-weight: 600;
      }

      .event__details {
        display: flex;
        flex-flow: column;
        flex-grow: 1;
        justify-content: center;

        > * {
          line-height: 1.1;
          margin-bottom: 5px;

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

      .event__availabilities {
        line-height: 1.1;
        margin-bottom: 5px;
      }

      &:not(.is-complete) .event__guide {
        margin-bottom: 5px;
      }


      @media screen and (max-width: 570px) {
        flex-flow: column;
        align-items: center;

        .event__recontact,
        .event__carpool,
        .event__presentation {
          text-align: center;
        }

        .btn {
          width: 100%;
        }

        &:not(.has-past) .event__presentation {
          padding: 0 0 15px 0;
        }

        .event__reserve {
          align-items: center;
        }

        .event__guide-profil {
          margin: 0 auto 20px auto;
        }
      }
    }
  }

  .dates__display_mode_btn {
    border-top: 1px solid #cecece;
    padding-top: 15px;
    margin-top: 55px;
    display: flex;
    flex-flow: row;
    justify-content: center;
    align-items: center;

    button {
      max-width: 300px;
      min-width: 300px;
    }
  }

  .dates__filter_note_display {
    border: none;
    padding: 10px 14px;
    background: #efefef;
    border-radius: 10px;
    margin-top: 15px;

    p {
      margin: 0;

      &:not(:last-child) {
        margin-bottom: 5px;
      }

      text-align: justify;
      font-size: 14px;
      font-weight: 400;
    }
  }

  .dates__all_complete,
  .dates__no-events {
    padding: 20px 40px;
    text-align: center;

    .icon {
      font-size: 40px;
      color: esprit-sentiers(green)
    }

    h3 {
      margin: 0;
      color: inherit;
      font-family: fonts(default);
      font-weight: 400;
    }

    p {
      margin: 20px auto 0 auto;
      max-width: 70%;
      line-height: 1.2;
    }
  }
}


$sejour-common-break-1: 820px;

.sejour__common {
  line-height: 1.1;
  margin-bottom: 20px !important;

  .common__header {
    display: flex;
    flex-flow: column;
    width: 100%;
    align-items: center;
    margin-bottom: 20px;

    .header__title {
      margin: 0;
      color: esprit-sentiers(orange);
      margin-right: 10px;
      text-align: center;
    }

    .header__subtitle {
      font-size: 23px;
      margin: 10px 0;
      text-align: center;
      font-family: fonts(default);
      font-weight: normal;
    }
  }

    @media screen and (max-width: $sejour-common-break-1) {
        .common__details-banner {
        flex-flow: column;
        align-items: center;
        }
    }

  .common__details-banner {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    background-color: #7E9629;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    margin: 10px 0 30px 0;
    font-size: medium;
    width: 100%;

    .common__niveau {
      display: flex;
      gap: 10px;
      align-items: center;
      margin:0 0 0 10px;
    }

    .common__duration {
      text-align: center;
      font-weight: 600;
      font-size: 18px;
      margin: 0;
    }
  }

  .common__content {
    display: grid;
    grid-template-columns: 1fr 1fr;

    .common__prices {
      width: 100%;
      margin-bottom: 20px;

      .prices {
        color: esprit-sentiers(green);
        font-weight: 700;
        font-size: 18px;
      }
    }

    .sejour__common__right {
      margin-left: 30px;
    }

    .header__price {
      margin: 0;
      flex-grow: 1;
      text-align: right;

      .price {
        font-size: 23px;
        color: esprit-sentiers(orange);
        font-weight: 600;
      }
    }

    .common__header,
    .common__places {
      margin-bottom: 10px;
    }

    .common__details {
      display: flex;
      flex-flow: column;
    }

    .common__places {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 8px 0;
      flex-grow: 1;
      color: esprit-sentiers(orange);

      h4 {
        font-family: fonts(default);
        font-weight: 600;
        margin: 0;
        font-size: 20px;
      }
    }

    .common__accompagnement {
      margin: 0 0 25px 0;

      b {
        font-weight: 600;
      }

      justify-self: left;
      text-align: right;
    }

    .common__pictos {
      display: flex;
      gap: 15px;
      margin: 0 0 20px 0;

      .picto-group {
        display: flex;
        align-items: center;
      }

      .picto-group__picto {
        padding-right: 10px;
        display: flex;
        align-items: center;

        img {
          width: 25px;
        }
      }
    }

    .common__advantages {
      margin: 0 auto 10px 0;

      h4 {
        margin: 0 0 5px 0;
        font-family: fonts(default);
        font-weight: 700;
        width: fit-content;
        padding: 8px 10px 8px 0;
        color: esprit-sentiers(orange);
      }

      ul {
        margin: 0;
        list-style: none;
        padding: 0;
      }

      li {
        position: relative;
        line-height: 1.2;
        padding: 0 0 0 30px;
        margin: 0 0 8px 0;

        &::before {
          content: '';
          top: 50%;
          left: 8px;
          position: absolute;
          transform: translateY(-50%);
          width: 15px;
          height: 15px;
          background: url('/static/assets/images/programme/sejours/list-plus.svg') no-repeat center / contain;
        }
      }
    }

    .common__buttons {
      .btn {
        width: 100%;
        font-size: 16px;

        &.reserve-button {
          font-weight: 600;
        }

        &:not(:last-child) {
          margin-bottom: 10px;
        }
      }
    }

    @media screen and (max-width: $sejour-common-break-1) {
      grid-template-columns: 1fr;

      .common__places {
        grid-row-start: 3;
        padding: 0;
        justify-content: center;
      }
      .common__places,
      .common__niveau {
        margin-bottom: 10px;
      }

      .common__accompagnement {
        text-align: center;
      }

      .sejour__common__right {
        margin-left: 0;
      }

      .sejour__common__left.carousel__photos {
        margin-bottom: 20px;
      }
    }
  }
}

.season-complete-banner {
  display: grid;
  grid-template-columns: 20px 4fr 1fr;
  gap: 10px;
  align-items: center;
  justify-content: left;
  background-color: esprit-sentiers(orange);
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 10px;
  margin: 30px auto;
  font-size: medium;

  .season-complete-banner__info,
  .season-complete-banner__icon,
  .season-complete-banner__action {
    display: flex;
  }

  .season-complete-banner__icon,
  .season-complete-banner__info {
    justify-content: left;
  }

  .season-complete-banner__action {
    justify-content: right;
  }

  p {
    margin: 0 !important;
    padding: 0 !important;
  }

  @media screen and (max-width: 500px) {
    grid-template-columns: 4fr;
    grid-template-rows: auto auto;
    gap: 10px;
    text-align: center;
    padding: 10px;

    .season-complete-banner__action {
      justify-content: center;
    }

    .season-complete-banner__icon {
      display: none;
    }
  }
}