/* ==================================================
   ENCART E-BOOK : BLOC COURT AFFICHE SUR PLUSIEURS PAGES
   ================================================== */
.insert {
  clear: both;
  width: 100%;
  max-width: none;
  background: #ffffff;
}

.insert-wrapper {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 672px);
  gap: clamp(35px, 4vw, 48px);
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 35px 0 70px;
  align-items: start;
}

.catalog {
  grid-column: 1;
  padding-top: 55px;
}

.catalog h2 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.2;
  letter-spacing: 1px;
}

.catalog h2 span {
  display: block;
  white-space: nowrap;
}

.catalog h2 a {
  display: block;
  color: #f1c50e;
  font: inherit;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

.catalog h2 a:hover,
.catalog h2 a:focus {
  color: #1d57b4;
}

.catalog .primary-button {
  margin: 35px 0 0;
  font-size: 1rem;
  letter-spacing: 1px;
  font-weight: bold;
}

.insert .ebook-items {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 672px;
  max-width: 100%;
  overflow: hidden;
}

.insert .ebook-items .grid {
  display: grid;
  width: 150%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  transition: transform 0.5s ease;
}

/* ==================================================
   BANDEAU TRADINGVIEW : CONSERVE SOUS L'ENCART E-BOOK
   ================================================== */
.tradingview-widget-container {
  width: 100%;
}

.tradingview-widget-container__widget,
.tradingview-widget-container iframe {
  width: 100%;
}

/* ==================================================
   CARTE E-BOOK : BASE COMMUNE ENCART + PAGE CATALOGUE
   ================================================== */
.ebook-item {
  cursor: pointer;
  min-width: 0;
  border-radius: 30px;
  background: #ffffff;
}

.insert .ebook-items .ebook-item {
  min-height: 900px;
}

.ebook-item h3 {
  display: flex;
  min-height: 128px;
  margin: 0 0 24px;
  align-items: flex-end;
  font-weight: normal;
  font-size: 1.8rem;
  line-height: 1.18;
}

.separator {
  height: 4px;
  margin: 0 0 36px;
  background: #f1c50e;
}

.ebook-item img {
  display: block;
  width: 100%;
  margin: 0;
}

.text {
  display: block;
  margin: 14px 0 0;
  line-height: 1.4;
}

.tagline,
.description,
.ebook-item ul {
  margin: 0;
}

.description,
.ebook-item ul {
  margin-top: 16px;
}

.tagline {
  font-weight: bold;
}

.ebook-item ul {
  padding-left: 0;
  list-style: none;
}

.ebook-item ul li + li {
  margin-top: 6px;
}

.ebook-item ul li::before {
  content: "✔️ ";
}

.ebook-item .secondary-button {
  display: flex;
  width: fit-content;
  margin: 24px auto 0;
  font-weight: bold;
  border-radius: 50px;
}

.ebook-item .secondary-button:hover,
.ebook-item .secondary-button:focus {
  color: #ffffff !important;
}

/* ==================================================
   NAVIGATION ENCART : FLECHES DU CARROUSEL E-BOOK
   ================================================== */
.navigation {
  position: absolute;
  top: 170px;
  z-index: 2;
  display: flex;
  width: 68px;
  height: 68px;
  padding: 0 0 6px;
  align-items: center;
  justify-content: center;
  color: #111111;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 56px;
  line-height: 1;
}

.navigation-hidden {
  display: none;
}

.navigation.previous {
  left: 10px;
}

.navigation.next {
  right: 10px;
}

/* ==================================================
   PAGE E-BOOK : CATALOGUE COMPLET
   ================================================== */
.page .ebook-items {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  overflow: visible;
}

.page .grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.page .ebook-item {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 10px;
  box-shadow: 3px 3px 17px 0 rgba(0, 0, 0, 0.2);
}

.page .ebook-item h3 {
  min-height: 86px;
  margin: 0;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}

.page .separator {
  width: 100%;
  margin: 16px 0 44px;
}

.page .ebook-item img {
  width: min(100%, 215px);
  margin: 0 auto;
  object-fit: contain;
  object-position: 50% 0%;
}

.page .text {
  margin-top: 18px;
}

.page .summary {
  margin: 0;
}

.page .read-more {
  display: inline-block;
  margin-top: 12px;
  padding: 0;
  color: #1d57b4;
  font: inherit;
  font-weight: bold;
  text-align: left;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.page .read-more:hover {
  text-decoration: underline;
}

.page .read-more-content {
  margin-top: 12px;
}

.page .ebook-item .secondary-button {
  box-sizing: border-box;
  width: calc(100% - 18px);
  min-width: 0;
  margin-top: 36px;
  letter-spacing: 1px;
}

/* ==================================================
   MEDIA
   ================================================== */

/* Tablette paysage / petit ordinateur */
@media (max-width: 991px) {
  .insert-wrapper {
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 40px));
    gap: 35px;
    padding: 45px 0 70px;
  }

  .catalog {
    grid-column: 1;
    padding-top: 0;
    text-align: center;
  }

  .catalog h2 {
    font-size: 3rem;
  }

  .catalog .primary-button {
    margin-right: auto;
    margin-left: auto;
  }

  .insert .ebook-items {
    grid-column: 1;
    grid-row: auto;
    width: min(100%, 672px);
    margin: 0 auto;
  }

  .insert .ebook-items .ebook-item {
    min-height: 0;
  }

  .page .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page .ebook-item img {
    width: min(100%, 260px);
  }
}

/* Tablette */
@media (max-width: 767px) {
  .page .grid {
    grid-template-columns: 1fr;
  }

  .page .ebook-item img {
    width: min(100%, 300px);
  }
}


/* ==================================================
   MEDIA
   ================================================== */
@media (max-width: 575px) {
  .insert-wrapper {
    width: 100%;
    padding-top: 34px;
    padding-bottom: 52px;
  }

  .catalog h2 {
    font-size: 1.8rem;
  }

  .insert .ebook-items {
    width: 100%;
  }

  .insert .ebook-items .grid {
    width: 300%;
  }

  .page .grid {
    gap: 22px;
  }

  .page .ebook-item {
    padding: 24px 18px;
  }

  .page .ebook-item img {
    width: min(100%, 250px);
  }
}

/* ==================================================
   MEDIA
   ================================================== */
/* Mobile : recentrage de l'encart e-book */
@media (max-width: 575px) {
  .insert {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .insert-wrapper {
    width: min(100%, calc(100% - 24px));
    margin-left: auto;
    margin-right: auto;
  }
}
