/* BLOG SHORTCODE */
.blog-posts {
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.blog-post {
  position: relative;
  width: 48%;
  height: 370px;
  max-height: 370px;
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s ease-in-out;
}

.blog-post:hover {
  transform: scale(1.05);
}

/* Lien sur toute la carte */
.full-link {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
}

/* Fond sombre dégradé */
.blog-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 40px 60px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
  color: white;
  z-index: 3;
  display: flex;
  text-align: left;
  height: 100%;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: flex-start;
}

.blog-overlay h3 {
  margin: 0;
  font-size: 22px;
  font-weight: bold;
  color: white;
}

.blog-overlay p {
  font-size: 16px;
  font-weight: lighter;
}

.header-row .col-text,
.offer-row .col-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
#custom-header #mobile_menu2 .openSubmenu .sub-menu {
  display: block !important;
  opacity: 1 !important;
  max-height: 500px !important;
}
.only-text a:not(.sub-menu a) {
  user-select: none !important;
  pointer-events: none !important;
}

#mobile_menu2 li.menu-item-has-children.openSubmenu > a::after {
  content: " ▼" !important;
}

/* ================================
   BLOG — Grille principale
================================ */

.blog-grid-container {
  padding: 40px 20px;
}

.custom-blog-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 60px 40px;
}

/* ================================
   Articles du blog
================================ */
.blog-post-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.blog-post-card {
  flex: 1 1 calc(33.333% - 40px);
}
@media (max-width: 768px) {
  .blog-post-card {
    flex: 1 1 100%;
  }
}

.blog-post-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.post-thumb img,
.blog-post-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
  height: 270px;
  max-height: 250px;
  object-fit: cover;
}

.post-content {
  padding: 15px;
}

.post-content .blog-title,
.post-content .blog-title a {
  color: #052249;
  font-weight: 600;
  font-size: 20px;
  line-height: 32px;
  margin-top: 10px;
  padding-bottom: 10px !important;
}

.post-date {
  font-size: 14px;
  color: #e93593;
}
.post-meta-line {
  font-size: 0.85em;
  color: #555;
  margin-bottom: 10px;
}

.separator {
  margin: 0 6px;
  color: #727171;
}

.post-category {
  color: #727171;
  font-weight: 400;
}

.post-reading-time {
  display: inline-flex;
  align-items: flex-end;
  color: #727171;
  line-height: 0.9;
  margin-left: 20px;
}

.post-reading-time .icon-clock {
  display: inline-block;
  margin-right: 6px;
  height: 14px;
  width: 14px;
  stroke: currentColor;
  vertical-align: middle;
}
.blog-post-card .post-category,
.blog-post-card .post-category a {
  color: #727171;
  font-size: 14px;
  font-weight: 400;
}
.blog-category-filter {
  display: flex;
  gap: 20px;
  padding: 5px;
  background: #fff;
  border-radius: 40px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  box-shadow: 2px 2px 8px -1px rgba(0, 0, 0, 0.1);
}

.blog-category-filter a {
  padding: 10px 18px;
  border-radius: 20px;
  text-decoration: none;
  color: #a7a7a7;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
}
.blog-category-filter a:hover {
  color: #333333;
}

.blog-category-filter a.active {
  color: #333333;
}
.blog-category-filter a.active::before {
  background: url("https://staging.topaze.com/wp-content/uploads/active-icon.svg")
    no-repeat center center;
  background-size: contain;
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  left: -10px;
  position: relative;
}

.featured-article {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 70px;
  margin-bottom: 40px;
}

.featured-article-thumb {
  flex: 0 0 550px;
  max-width: 550px;
  border-radius: 12px;
  overflow: hidden;
}

.featured-article-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.featured-article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
}

.featured-date {
  color: #e93593;
  font-weight: 400;
  font-size: 16px;
  display: block;
  margin-bottom: 15px;
}

.featured-title {
  font-size: 1.4em;
  font-weight: bold;
  margin: 0 0 10px;
  line-height: 1.3;
}

.featured-title a {
  font-size: 28px;
  font-weight: bold;
  margin: 0 0 10px;
  line-height: 32px;
}

.featured-title a:hover,
.blog-title a:hover {
  color: #e93593;
}

.featured-excerpt {
  font-size: 18px;
  color: #8b8e92;
  line-height: 32px;
}

.blog-pagination {
  text-align: center;
  margin: 40px 0;
}

.blog-pagination .page-numbers {
  display: inline-block;
  margin: 0 5px;
padding: 12px 2px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
}
.next,
.prev {
  color: #a7a7a7 !important;
  padding: 3px 35px !important;
  border-radius: 30px !important;
  font-weight: 300;
  font-size: 16px;
  box-shadow: 1px 2px 8px -1px rgba(0, 0, 0, 0.15);
}

.blog-pagination .current {
  font-weight: bold;
  color: #e93593;
}

.blog-pagination .page-numbers:hover {
  border-color: #e93593;
  color: #e93593;
}
#preview-three-posts 

/* ================================
   Blocs publicitaires (HubSpot)
================================ */

.hubspot-ad-block {
  background: #f3f3ff;
  padding: 0px;
  border-radius: 24px;
  text-align: center;
  height: 270px;
  max-height: 270px;
}

.hubspot-ad-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin-bottom: 10px;
  border-radius: 24px;
}

.hubspot-ad-block.ad-span-1 {
  grid-column: span 1;
}

.hubspot-ad-block.ad-span-2 {
  grid-column: span 2;
  background: transparent;
  height: 250px;
}
.hubspot-ad-block.ad-span-2 img {
  max-height: 250px;
  object-fit: cover;
}
/* Desktop : bouton masqué */
.category-toggle {
  display: none;
}
.mobile-ads {
  display: none !important;
}


.archive .custom-blog-grid {
  margin-bottom: 70px !important;
}
.archive:has(.blog-pagination) .custom-blog-grid {
  margin-bottom: 0px !important;
}
/* ================================
   Responsive — Breakpoints
================================ */

/* Téléphones portrait (<480px) */
@media screen and (max-width: 479px) {
  .pc-ads {
    display: none !important;
  }
  .mobile-ads {
    display: block !important;
  }
  .custom-blog-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .hubspot-ad-block.ad-span-2 {
    grid-column: span 1;
  }
  .post-content {
    padding: 15px 0px;
    padding-bottom: 0px !important;
  }
  .post-meta-line {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .post-reading-time {
    margin-left: 15px !important;
    margin-top: 2px !important;
  }

  .featured-article-thumb,
  .featured-article-content {
    max-width: 100%;
    flex: 1 1 100%;
  }
  #custom-header-featured {
    width: 100% !important;
    max-width: 100% !important;
  }
  .featured-article-thumb img,
  .featured-article-thumb {
    border-radius: 0px !important;
  }
  .featured-article-content {
    padding: 0 40px !important;
  }
  .featured-article {
    flex-direction: column;
    gap: 20px;
  }

  .featured-article-thumb,
  .featured-article-content {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .featured-excerpt,
  .featured-date {
    font-size: 15px;
  }
  .featured-title a {
    font-size: 20px;
  }
  .hubspot-ad-block img {
    object-fit: contain !important;
    margin-bottom: 0px;
  }
  .hubspot-ad-block.ad-span-2 img {
    border-radius: 24px !important;
  }
  .hubspot-ad-block {
    height: 100% !important;
  }

  .blog-category-filter {
    position: relative;
    flex-direction: column;
    align-items: stretch;
  }

  .category-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
    font-size: 16px !important;
    background: white;
    border: 1px solid transparent;
    border-radius: 40px;
    color: #a7a7a7;
    font-weight: 500;
    cursor: pointer;
    position: relative;
  }

  .chevron-circle {
    width: 24px;
    height: 24px;
    background-color: #ff8d6710; /* cercle léger orange */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .chevron-icon {
    stroke: #e3775e;
    transition: transform 0.3s ease;
  }

  .blog-category-filter.open .chevron-icon {
    transform: rotate(180deg);
  }

  .blog-category-filter a {
    color: #a7a7a7;
    border: 1px solid transparent;
    font-size: 16px !important;
    padding: 10px 50px !important;
  }

  .blog-category-filter.open a {
    display: block;
  }
  .blog-category-filter.open::after {
    transform: translateY(-210px) rotate(180deg);
  }
  .blog-category-filter a {
    display: none;
    background-color: white;
    border-top: none;
    border-radius: 0;
  }

  .blog-category-filter.open a {
    display: block;
    padding: 10px 50px !important;
    background: transparent !important;
  }
  .hubspot-ad-block.ad-span-2 {
    width: 100%;
    height: auto !important;
    object-fit: cover;
    position: relative;
    left: 0px !important;
    margin-bottom: 15px !important;
  }
  .mobile-ads {
    display: block !important;
    width: 100%;
    position: relative;
    height: auto !important;
  }
  .mobile-ads img {
    object-fit: fill !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0px !important;
  }
  .blog-posts {
    flex-direction: column !important;
  }
  .blog-post {
    width: 100% !important;
  }

  /* First child blog-post margin */
  .blog-post:first-child {
    margin-bottom: 40px !important;
  }
  .blog-overlay {
    padding: 40px 30px !important;
  }
}

/* Téléphones paysage (480px–767px) */
@media screen and (min-width: 480px) and (max-width: 767px) {
  .custom-blog-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .hubspot-ad-block.ad-span-2 {
    grid-column: span 1;
  }
  .post-content {
    padding: 15px 0px;
    padding-bottom: 0px !important;
  }
  .post-meta-line {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .post-reading-time {
    margin-left: 15px !important;
    margin-top: 2px !important;
  }
  #custom-header-featured {
    width: 100% !important;
    max-width: 100% !important;
  }
  .featured-article-thumb img,
  .featured-article-thumb {
    border-radius: 0px !important;
  }
  .featured-article-content {
    padding: 0 40px !important;
  }
  .featured-article {
    flex-direction: column;
    gap: 20px;
  }

  .featured-article-thumb,
  .featured-article-content {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .featured-excerpt,
  .featured-date {
    font-size: 15px;
  }
  .featured-title a {
    font-size: 20px;
  }
  .hubspot-ad-block img {
    object-fit: contain !important;
    margin-bottom: 0px;
  }
  .hubspot-ad-block {
    height: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
  }
  .blog-category-filter {
    position: relative;
    flex-direction: column;
    align-items: stretch;
  }

  .category-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
    font-size: 16px !important;
    background: white;
    border: 1px solid transparent;
    border-radius: 40px;
    color: #a7a7a7;
    font-weight: 500;
    cursor: pointer;
    position: relative;
  }

  .chevron-circle {
    width: 24px;
    height: 24px;
    background-color: #ff8d6710; /* cercle léger orange */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .chevron-icon {
    stroke: #e3775e;
    transition: transform 0.3s ease;
  }

  .blog-category-filter.open .chevron-icon {
    transform: rotate(180deg);
  }

  .blog-category-filter a {
    color: #a7a7a7;
    border: 1px solid transparent;
    font-size: 16px !important;
    padding: 10px 50px !important;
  }

  .blog-category-filter.open a {
    display: block;
  }
  .blog-category-filter.open::after {
    transform: translateY(-210px) rotate(180deg);
  }
  .blog-category-filter a {
    display: none;
    background-color: white;
    border-top: none;
    border-radius: 0;
  }

  .blog-category-filter.open a {
    display: block;
    padding: 10px 50px !important;
    background: transparent !important;
  }
  .pc-ads {
    display: none !important;
  }
  .mobile-ads {
    display: block !important;
    width: 100%;
    position: relative;
    height: auto !important;
  }
  .mobile-ads img {
    object-fit: fill !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0px !important;
  }
  .blog-posts {
    flex-direction: column !important;
  }
  .blog-post {
    width: 100% !important;
  }

  /* First child blog-post margin */
  .blog-post:first-child {
    margin-bottom: 40px !important;
  }
  .blog-overlay {
    padding: 40px 30px !important;
  }
}

/* Tablettes portrait (768px–991px) */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .custom-blog-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-content {
    padding: 15px 0px;
  }
  .post-meta-line {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .post-reading-time {
    margin-left: 15px !important;
    margin-top: 2px !important;
  }
  .featured-article {
    flex-direction: column;
    gap: 20px;
  }

  .featured-article-thumb,
  .featured-article-content {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .blog-category-filter {
    position: relative;
    flex-direction: column;
    align-items: stretch;
  }

  .category-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
    font-size: 16px !important;
    background: white;
    border: 1px solid transparent;
    border-radius: 40px;
    color: #a7a7a7;
    font-weight: 500;
    cursor: pointer;
    position: relative;
  }

  .chevron-circle {
    width: 24px;
    height: 24px;
    background-color: #ff8d6710; /* cercle léger orange */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .chevron-icon {
    stroke: #e3775e;
    transition: transform 0.3s ease;
  }

  .blog-category-filter.open .chevron-icon {
    transform: rotate(180deg);
  }

  .blog-category-filter a {
    color: #a7a7a7;
    border: 1px solid transparent;
    font-size: 16px !important;
    padding: 10px 50px !important;
  }

  .blog-category-filter.open a {
    display: block;
  }
  .blog-category-filter.open::after {
    transform: translateY(-210px) rotate(180deg);
  }
  .blog-category-filter a {
    display: none;
    background-color: white;
    border-top: none;
    border-radius: 0;
  }

  .blog-category-filter.open a {
    display: block;
    padding: 10px 50px !important;
    background: transparent !important;
  }

  .hubspot-ad-block {
    height: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
  }
  .hubspot-ad-block.ad-span-2 {
    width: 100%;
    height: auto !important;
    object-fit: cover;
    position: relative;
    left: 0px !important;
    margin-bottom: 15px !important;
  }
  .hubspot-ad-block.ad-span-2 {
    grid-column: span 1 !important;
  }
  .pc-ads {
    display: none !important;
  }
  .mobile-ads {
    display: block !important;
    width: 100%;
    position: relative;
    height: auto !important;
  }
  .mobile-ads img {
    object-fit: fill !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0px !important;
  }
}

/* Tablettes paysage et petits laptops (981px–1279px) */
@media screen and (min-width: 981px) and (max-width: 1279px) {
  .custom-blog-grid,
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .post-content .blog-title,
  .post-content .blog-title a {
    font-size: 16px !important;
  }
  .post-thumb img,
  .blog-post-card img {
    height: 220px !important;
    max-height: 220px !important;
  }
  .post-date,
  .post-category,
  .post-reading-time {
    font-size: 14px !important;
  }
  .post-meta-line {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .post-reading-time {
    margin-left: 20px !important;
    margin-top: 4px !important;
  }

  .featured-article-thumb {
    max-width: 400px;
    flex: 0 0 400px;
  }
  .featured-excerpt,
  .featured-date {
    font-size: 16px;
  }
  .featured-title a {
    font-size: 24px;
  }
  .blog-category-filter {
    position: relative;
    flex-direction: column;
    align-items: stretch;
  }

  .category-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
    font-size: 16px !important;
    background: white;
    border: 1px solid transparent;
    border-radius: 40px;
    color: #a7a7a7;
    font-weight: 500;
    cursor: pointer;
    position: relative;
  }

  .chevron-circle {
    width: 24px;
    height: 24px;
    background-color: #ff8d6710; /* cercle léger orange */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .chevron-icon {
    stroke: #e3775e;
    transition: transform 0.3s ease;
  }

  .blog-category-filter.open .chevron-icon {
    transform: rotate(180deg);
  }

  .blog-category-filter a {
    color: #a7a7a7;
    border: 1px solid transparent;
    font-size: 16px !important;
    padding: 10px 50px !important;
  }

  .blog-category-filter.open a {
    display: block;
  }
  .blog-category-filter.open::after {
    transform: translateY(-210px) rotate(180deg);
  }
  .blog-category-filter a {
    display: none;
    background-color: white;
    border-top: none;
    border-radius: 0;
  }

  .blog-category-filter.open a {
    display: block;
    padding: 10px 50px !important;
    background: transparent !important;
  }
  #ads-col {
    width: 37% !important;
  }
  #content-col {
    max-width: 60% !important;
  }
}

/* Laptops 13–16 pouces (1280px–1600px) */
@media screen and (min-width: 1280px) and (max-width: 1600px) {
  .custom-blog-grid,
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  #ads-col {
    width: 30% !important;
  }
  #content-col {
    max-width: 67% !important;
  }
  #summary-desktop {
    margin-bottom: 50px !important;
  }
  #newsletter-grp {
    margin-top: 20px !important;
  }
}

/* Grands écrans de bureau (1601px+) */
@media screen and (min-width: 1601px) {
  .custom-blog-grid,
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Écrans 4K et plus (2560px+) */
@media screen and (min-width: 2560px) {
  .custom-blog-grid,
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
