/* Cubner blog Cub’mag — Figma 720:384, desktop 1920 × 3534
 * Contenu à left 260 / width 1400. Header 153 px → fil d’Ariane y=185 (gap 32).
 */
body.cubner-blog-page {
  margin: 0;
  overflow-x: hidden;
  background: var(--cubner-bg-page);
  font-family: var(--cubner-font-family);
  color: var(--cubner-text-primary);
}

body.cubner-blog-page .site,
body.cubner-blog-page #page,
body.cubner-blog-page .site-main,
body.cubner-blog-page #content,
body.cubner-blog-page .page-content,
body.cubner-blog-page .page-header,
body.cubner-blog-page .elementor-location-header,
body.cubner-blog-page .elementor-location-footer {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

body.cubner-blog-page .post .wp-post-image {
  max-height: none !important;
}

.cubner-blog,
.cubner-blog * {
  box-sizing: border-box;
}

.cubner-blog {
  width: 100%;
  background: var(--cubner-bg-page);
}

/* Même gouttière que le header Cubner : min(100% - 48px, 1400px). */
.cubner-blog__inner.cubner-container {
  width: min(100% - 48px, var(--cubner-container-max, 1400px));
  max-width: 1400px;
  margin-inline: auto;
  padding-top: 32px;
  padding-bottom: 183px;
  padding-inline: 0;
}

/* :where() = spécificité 0 : Hello est neutralisé, les classes BEM restent prioritaires.
 * Longhands explicites — pas de margin-block: revert-layer (Hello réinjecterait ~15px). */
.cubner-blog :where(p, h1, h2, h3) {
  margin: 0 0 15px 0;
}

.cubner-blog :where(a) {
  text-decoration: none;
  color: inherit;
}

.cubner-blog__breadcrumb {
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  color: var(--cubner-text-secondary);
  margin-bottom: 32px;
}

.cubner-blog__breadcrumb a:hover {
  color: var(--cubner-heading-accent);
}

.cubner-blog__breadcrumb-current {
  word-break: break-word;
}

body.cubner-blog-single .cubner-blog__inner--single {
  padding-bottom: 80px;
}

body.cubner-blog-single .page-header,
body.cubner-blog-single .entry-title {
  margin: 0 0 24px;
}

body.cubner-blog-single .page-content {
  margin: 0;
}

/* Figma 800:302 — y=235, centré 1400, collé à « À la une » (y=278). */
.cubner-blog h1.cubner-blog__title {
  font-size: 38px;
  font-weight: 600;
  line-height: 1.132;
  text-align: center;
  color: var(--cubner-color-black);
  margin: 0;
}

.cubner-blog__title span {
  color: var(--cubner-heading-accent);
}

.cubner-blog-featured {
  margin-top: 0;
}

.cubner-blog h2.cubner-blog-featured__heading {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 36px;
  font-weight: 700;
  line-height: 44px;
  color: var(--cubner-heading-accent);
}

.cubner-blog-featured__card {
  display: flex;
  width: 100%;
  max-width: 1400px;
  height: 430px;
  overflow: hidden;
  background: var(--cubner-bg-surface);
  border: 1px solid var(--cubner-border-blog);
  border-radius: var(--cubner-radius-blog-featured);
  box-shadow: var(--cubner-shadow-blog-featured);
}

.cubner-blog-featured__media {
  display: block;
  flex: 0 1 790px;
  width: 790px;
  max-width: 56.428571%;
  min-width: 0;
  height: 430px;
  overflow: hidden;
  background: var(--cubner-bg-info);
  border-radius: var(--cubner-radius-blog-media) 0 0 var(--cubner-radius-blog-media);
}

.cubner-blog-featured__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cubner-blog-featured__content {
  flex: 1 1 610px;
  width: 610px;
  min-width: 0;
  padding: 59px 48px 79px 42px;
}

.cubner-blog-featured__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 30px;
  padding: 7px 26px;
  border-radius: var(--cubner-radius-blog-media);
  background: var(--cubner-bg-warm);
  color: var(--cubner-action-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 16px;
}

.cubner-blog h3.cubner-blog-featured__title {
  margin-top: 20px;
  width: 520px;
  max-width: 100%;
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  color: var(--cubner-heading-accent);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cubner-blog-featured__title a:hover {
  text-decoration: underline;
}

.cubner-blog p.cubner-blog-featured__excerpt {
  margin-top: 13px;
  width: 520px;
  max-width: 100%;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  color: var(--cubner-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Figma 720:585 — Méta 360 × 20, Switzer Regular 14/20, #616161. */
.cubner-blog p.cubner-blog-featured__meta {
  width: 360px;
  max-width: 100%;
  height: 20px;
  margin-top: 13px;
  overflow: hidden;
  font-family: var(--cubner-font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--cubner-text-secondary);
  white-space: pre;
}

/* Figma 800:299 — CTA 191 × 44, padding 10 × 20, rayon 4, Switzer Semibold 18/24. */
.cubner-blog a.cubner-blog-featured__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 191px;
  height: 44px;
  min-width: 191px;
  min-height: 44px;
  margin-top: 20px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--cubner-radius-button);
  background: var(--cubner-action-primary);
  color: var(--cubner-text-inverse);
  font-family: var(--cubner-font-family);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
}

.cubner-blog a.cubner-blog-featured__cta:hover {
  filter: brightness(0.9);
  color: var(--cubner-text-inverse);
}

.cubner-blog-toolbar {
  height: 220px;
  margin-top: 50px;
  margin-bottom: 66px;
}

.cubner-blog-toolbar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 46px;
}

.cubner-blog h2.cubner-blog-toolbar__title {
  font-size: 36px;
  font-weight: 700;
  line-height: 44px;
  color: var(--cubner-heading-accent);
}

.cubner-blog-toolbar__count {
  padding-top: 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--cubner-text-secondary);
  text-align: right;
}

.cubner-blog-toolbar__row {
  display: flex;
  align-items: center;
  gap: 29px;
  margin-top: 24px;
}

/* Figma 720:591 — Recherche Blog 430 × 48, rayon 8, bord #E0E8ED. */
.cubner-blog .cubner-blog-search {
  position: relative;
  flex: 0 0 430px;
  width: 430px;
  height: 48px;
}

.cubner-blog .cubner-blog-search__icon {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 1;
  display: block;
  width: 26px;
  height: 24px;
  overflow: hidden;
  margin: 0;
  pointer-events: none;
}

.cubner-blog .cubner-blog-search__icon img {
  display: block;
  width: 26px;
  height: 24px;
}

.cubner-blog .cubner-blog-search__icon::after {
  content: none;
}

.cubner-blog input.cubner-blog-search__input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 13px 16px 13px 52px;
  border: 1px solid var(--cubner-border-blog);
  border-radius: var(--cubner-radius-blog-media);
  background: var(--cubner-bg-surface);
  color: var(--cubner-text-primary);
  font-family: var(--cubner-font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  appearance: none;
}

.cubner-blog input.cubner-blog-search__input::placeholder {
  color: var(--cubner-text-secondary);
  font-family: var(--cubner-font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  opacity: 1;
}

.cubner-blog-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 46px;
}

.cubner-blog-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid var(--cubner-border-blog);
  border-radius: var(--cubner-radius-blog-media);
  background: var(--cubner-bg-surface);
  color: var(--cubner-heading-accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}

.cubner-blog-pill:first-child {
  width: 78px;
  padding: 12px 16px;
  font-size: 14px;
}

.cubner-blog-pill.is-active,
.cubner-blog-pill[aria-current="page"] {
  background: var(--cubner-heading-accent);
  border-color: var(--cubner-heading-accent);
  color: var(--cubner-text-inverse);
}

.cubner-blog-toolbar__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 31px;
  padding-top: 21px;
  border-top: 1px solid var(--cubner-border-blog);
}

.cubner-blog-toolbar__help {
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  color: var(--cubner-text-secondary);
}

.cubner-blog-sort__select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cubner-heading-accent);
  font-family: var(--cubner-font-family);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-align: right;
  padding: 0 18px 0 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2300518C' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.cubner-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 33px;
  width: 100%;
}

.cubner-blog-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 445px;
  height: 472px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--cubner-bg-surface);
  border: 1px solid var(--cubner-border-blog);
  border-radius: var(--cubner-radius-blog-card);
  box-shadow: var(--cubner-shadow-blog-card);
}

body.cubner-blog-page .cubner-blog-card.post,
body.cubner-blog-page .cubner-blog-card.hentry {
  margin: 0;
  padding: 0;
}

.cubner-blog-card__media {
  display: block;
  width: 100%;
  height: 250px;
  flex: 0 0 250px;
  margin: 0;
  overflow: hidden;
  background: var(--cubner-bg-info);
  border-radius: var(--cubner-radius-blog-media);
}

.cubner-blog-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cubner-blog-card__body {
  display: flex;
  flex-direction: column;
  width: 377px;
  max-width: calc(100% - 68px);
  padding: 0 0 27px;
  min-height: 0;
  flex: 1 1 auto;
}

.cubner-blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  font-size: 14px;
  line-height: 18px;
}

.cubner-blog-card__category {
  width: 190px;
  font-weight: 600;
  color: var(--cubner-action-primary);
}

.cubner-blog-card__date {
  flex: 1;
  font-weight: 400;
  color: var(--cubner-text-secondary);
  text-align: right;
}

.cubner-blog h2.cubner-blog-card__title {
  margin-top: 16px;
  min-height: 48px;
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
  color: var(--cubner-heading-accent);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cubner-blog p.cubner-blog-card__excerpt {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--cubner-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cubner-blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  width: 100%;
  min-height: 20px;
  margin-top: auto;
  padding-top: 16px;
}

/* Figma 800:327 — Lien à x=0, Switzer Semibold 16/20, #F49B27. */
.cubner-blog a.cubner-blog-card__link {
  display: block;
  flex: 0 1 auto;
  width: auto;
  max-width: calc(100% - 106px);
  height: 20px;
  font-family: var(--cubner-font-family);
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  color: var(--cubner-action-primary);
  text-decoration: none;
  white-space: nowrap;
}

/* Figma 800:328 — Temps de lecture à x=287, 90 × 20, Regular 14/20. */
.cubner-blog p.cubner-blog-card__time {
  flex: 0 0 90px;
  width: 90px;
  height: 20px;
  margin: 0 0 0 auto;
  font-family: var(--cubner-font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--cubner-text-secondary);
  text-align: right;
  white-space: nowrap;
}

.cubner-blog-pagination {
  display: flex;
  align-items: center;
  gap: 222px;
  margin-top: 59px;
}

.cubner-blog-pagination__status {
  width: 220px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--cubner-text-secondary);
}

.cubner-blog-pagination__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cubner-blog-pagination__btn,
.cubner-blog-pagination__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1px solid var(--cubner-border-blog);
  border-radius: var(--cubner-radius-button);
  background: var(--cubner-bg-surface);
  color: var(--cubner-heading-accent);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.cubner-blog-pagination__btn--prev {
  width: 132px;
  font-size: 13px;
}

.cubner-blog-pagination__btn--next {
  width: 116px;
}

.cubner-blog-pagination__num {
  width: 44px;
}

.cubner-blog-pagination__num.is-current {
  background: var(--cubner-heading-accent);
  border-color: var(--cubner-heading-accent);
  color: var(--cubner-text-inverse);
}

.cubner-blog-pagination__btn.is-disabled,
.cubner-blog-pagination__num.is-ellipsis {
  opacity: 0.65;
  color: var(--cubner-text-disabled);
  pointer-events: none;
}

.cubner-blog p.cubner-blog__empty {
  margin-top: 40px;
  font-size: 16px;
  color: var(--cubner-text-secondary);
}

@media (max-width: 1439px) {
  .cubner-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cubner-blog-card,
  .cubner-blog-card__media {
    width: 100%;
    max-width: none;
  }

  .cubner-blog a.cubner-blog-card__link {
    max-width: calc(100% - 80px);
  }

  .cubner-blog p.cubner-blog-card__time {
    flex-basis: auto;
    width: auto;
  }

  .cubner-blog-toolbar,
  .cubner-blog-featured__card {
    height: auto;
  }

  .cubner-blog-featured__media,
  .cubner-blog-featured__content {
    width: auto;
    max-width: none;
    flex: 1 1 auto;
  }
}

@media (max-width: 1199px) {
  .cubner-blog__inner.cubner-container {
    width: min(100% - 40px, var(--cubner-container-max, 1400px));
  }

  .cubner-blog-featured__card {
    flex-direction: column;
    height: auto;
  }

  .cubner-blog-featured__media {
    width: 100%;
    max-width: none;
    height: 280px;
    border-radius: var(--cubner-radius-blog-media) var(--cubner-radius-blog-media) 0 0;
  }

  .cubner-blog-toolbar__row {
    flex-direction: column;
    align-items: stretch;
  }

  .cubner-blog-search,
  .cubner-blog-search__input {
    width: 100%;
    flex-basis: auto;
  }

  .cubner-blog-pagination {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .cubner-blog__inner.cubner-container {
    width: min(100% - 32px, var(--cubner-container-max, 1400px));
    padding-top: 24px;
    padding-bottom: 64px;
  }

  .cubner-blog h1.cubner-blog__title {
    font-size: 30px;
    text-align: left;
  }

  .cubner-blog h2.cubner-blog-featured__heading,
  .cubner-blog h2.cubner-blog-toolbar__title {
    font-size: 28px;
    line-height: 34px;
  }

  .cubner-blog__grid {
    grid-template-columns: 1fr;
  }

  .cubner-blog-card {
    height: auto;
  }

  .cubner-blog-toolbar {
    margin-bottom: 32px;
  }

  .cubner-blog-toolbar__head,
  .cubner-blog-toolbar__foot {
    flex-direction: column;
    gap: 8px;
  }

  .cubner-blog-pagination__nav {
    flex-wrap: wrap;
  }
}
