/* ==========================================================================
   Blog Jestion : compléments au thème (style.css n'est pas modifié)
   ========================================================================== */

/* ---- Filtres de catégories ---------------------------------------------- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2.5rem;
}
.blog-filter {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem 1rem;
  border-radius: 50rem;
  background: var(--cb);
  border: 1px solid var(--cd);
  color: var(--ce);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s ease;
}
.blog-filter:hover { border-color: var(--ch); color: var(--ch); }
.blog-filter.active,
.blog-filter.active:hover { background: var(--ch); border-color: var(--ch); color: #fff; }
.blog-filter .count { font-size: .75rem; opacity: .7; }

/* ---- Images : lien plein cadre + visuel de remplacement ----------------- */
.blog-page .blog-card-image a,
.blog-page .blog-featured-image a { display: block; width: 100%; height: 100%; }

.blog-page .blog-card-image.is-placeholder a,
.blog-page .blog-featured-image.is-placeholder a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, darkslateblue 0%, #a997ff 100%);
  color: rgba(255, 255, 255, .85);
  font-size: 3.5rem;
}

/* ---- Article à la une : mêmes styles de méta que les cartes -------------- */
.blog-page .blog-featured .blog-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: .75rem;
  color: var(--cf);
}
.blog-page .blog-featured .blog-card-category {
  display: inline-block;
  padding: .125rem .625rem;
  border-radius: 50rem;
  background: rgba(99, 102, 241, .1);
  color: #818cf8;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.blog-page .blog-featured .blog-featured-excerpt { line-height: 1.7; }

/* ---- Page d'un article --------------------------------------------------- */
.blog-single-page .article-nav { max-width: 780px; margin: 0 auto 1.5rem; }
.blog-single-page .article-back {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  color: var(--cf);
  font-size: .875rem;
  font-weight: 500;
}
.blog-single-page .article-back:hover { color: var(--ch); }

.blog-single-page .article-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.blog-single-page a.article-category:hover { background: rgba(99, 102, 241, .2); }

/* Contenu rédactionnel : le thème remet les listes à zéro, on les rétablit */
.blog-single-page .article-content ul { list-style: disc; }
.blog-single-page .article-content ol { list-style: decimal; }
.blog-single-page .article-content a { text-decoration: underline; text-underline-offset: 2px; }
.blog-single-page .article-content strong,
.blog-single-page .article-content b { color: var(--cg); font-weight: 600; }
/* Liens internes (adresses relatives, sans http) */
.blog-single-page .article-content a:not([href^="http"]) { font-weight: 600; }
/* Liens externes d'action (connexion, paiement) : classe lien-fort */
.blog-single-page .article-content a.lien-fort { font-weight: 600; }
.blog-single-page .article-content hr { border: 0; border-top: 1px solid var(--cd); margin: 2.5rem 0; }
.blog-single-page .article-content table { width: 100%; margin: 2rem 0; border-collapse: collapse; font-size: .9375rem; }
.blog-single-page .article-content th,
.blog-single-page .article-content td { padding: .75rem 1rem; border-bottom: 1px solid var(--cd); text-align: left; color: var(--cf); }
.blog-single-page .article-content th { color: var(--cg); font-weight: 600; }

/* Encadré « astuce » : <div class="callout"><p>…</p></div> */
.blog-single-page .article-content .callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: .75rem;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .25);
}
.blog-single-page .article-content .callout p { margin-bottom: 0; color: var(--ce); }


/* ---- Partage social des articles ---------------------------------------- */
.article-share {
  max-width: 900px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--cd);
  border-radius: 1rem;
  background: var(--cb);
}
.article-share-label { display: block; margin-bottom: .65rem; color: var(--cg); font-size: .875rem; font-weight: 700; }
.article-share-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.article-share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 42px; padding: .55rem .85rem; border: 1px solid var(--cd);
  border-radius: .7rem; background: var(--converta-surface, #fff); color: var(--ce);
  font: inherit; font-size: .85rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.article-share-btn:hover { color: #fff; filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 5px 14px rgba(20,30,60,.18); }
.article-share-btn i { font-size: 1rem; }
.share-facebook { background: #1877F2; border-color: #1877F2; color: #fff; }
.share-linkedin { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.share-x { background: #111; border-color: #111; color: #fff; }
.share-whatsapp { background: #25D366; border-color: #25D366; color: #fff; }
.share-copy { background: #596273; border-color: #596273; color: #fff; }
.share-native { background: linear-gradient(135deg, darkslateblue, #a997ff); border-color: #8271d6; color: #fff; }
.article-share-feedback { margin: .65rem 0 0; color: var(--ch); font-size: .85rem; }

/* Barre verticale flottante sur ordinateur */
.article-share-floating {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  z-index: 1010;
  width: auto;
  max-width: none;
  margin: 0;
  padding: .85rem .6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  transform: translateY(-50%);
  border: 1px solid var(--cd);
  border-radius: 1rem;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 28px rgba(20,30,60,.14);
  backdrop-filter: blur(12px);
}
.article-share-floating .article-share-label {
  margin: 0 0 .15rem;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.article-share-floating .article-share-actions { flex-direction: column; flex-wrap: nowrap; gap: .5rem; }
.article-share-floating .article-share-btn {
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border-radius: .7rem;
  font-size: 1.1rem;
}
.article-share-floating .article-share-btn span { display: none; }
.article-share-floating .article-share-feedback {
  position: absolute;
  right: calc(100% + .65rem);
  top: calc(50% + (3.4 * 2.75rem));
  width: max-content;
  max-width: 270px;
  margin: 0;
  padding: .6rem .8rem;
  transform: translateY(-50%);
  border-radius: .6rem;
  background: #172033;
  color: #fff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .16);
}

/* Tablettes et mobiles : barre intégrée au flux de lecture */
@media (max-width: 1199.98px) {
  .article-share-floating {
    position: static;
    width: fit-content;
    max-width: 100%;
    margin: 1.5rem auto 0;
    padding: 1rem;
    transform: none;
    flex-direction: column;
    backdrop-filter: none;
  }
  .article-share-floating .article-share-label {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: .875rem;
    letter-spacing: normal;
  }
  .article-share-floating .article-share-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .article-share-floating .article-share-btn {
    width: auto;
    min-width: 42px;
    min-height: 42px;
    height: auto;
    padding: .55rem .75rem;
  }
  .article-share-floating .article-share-btn span { display: inline; font-size: .78rem; }
  .article-share-floating .article-share-feedback {
    position: static;
    width: auto;
    max-width: 100%;
    transform: none;
    background: transparent;
    color: var(--ch);
    box-shadow: none;
    padding: 0;
  }
}
.article-share-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.25rem;
}
.article-share-bottom > div:first-child { display: grid; gap: .2rem; color: var(--cg); }
.article-share-bottom > div:first-child span { color: var(--cf); font-size: .875rem; }
@media (max-width: 575.98px) {
  .article-share-bottom { align-items: flex-start; flex-direction: column; }
  .article-share-bottom .article-share-btn { flex: 1 1 auto; }
}

/* Barre de progression de lecture */
.navbar-converta {
    position: fixed;
}

.navbar-scroll-progress-bar {
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left;
    border-radius: 0 3px 3px 0;

    background: linear-gradient(
        135deg,
        darkslateblue 0%,
        rgb(169, 151, 255) 100%
    );

    transition: transform .12s linear;
    will-change: transform;
}

.navbar-scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,.08);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
    z-index: 10;
}

.navbar-scrolled .navbar-scroll-progress {
    opacity: 1;
}