/* ============================================================
   BrandForge Studio — blog.css
   CSS partagé pour tous les articles du blog
   ============================================================ */

/* ─── ARTICLE HERO ──────────────────────────────────────────── */
.article-hero {
  position: relative; padding: 160px 0 80px; overflow: hidden;
}
.article-hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 60% 30%, rgba(201,168,76,.1), transparent 60%);
}
.article-hero__inner {
  max-width: 900px; margin: 0 auto; padding: 0 40px;
}
.article-hero__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 40px; transition: color .3s; text-decoration: none;
}
.article-hero__back:hover { color: var(--gold-strong); }
.article-hero__meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.article-category {
  font-size: 9px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-strong); background: rgba(201,168,76,.1);
  border: 1px solid var(--border-gold); padding: 4px 14px; border-radius: 20px;
}
.article-date, .article-read-time {
  font-size: 11px; color: var(--muted-2); letter-spacing: .08em;
}
.article-hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 400; line-height: 1.03;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--white); margin-bottom: 24px;
}
.article-hero__title em { font-style: italic; color: var(--gold-strong); font-weight: 300; }
.article-hero__intro {
  font-family: var(--font-display); font-size: 20px; font-weight: 300;
  font-style: italic; color: var(--muted); line-height: 1.7; letter-spacing: .02em;
  margin-bottom: 40px; border-left: 2px solid var(--gold); padding-left: 24px;
}
.article-hero__author {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.article-author__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border-gold); overflow: hidden; flex-shrink: 0;
  background: radial-gradient(circle, rgba(201,168,76,.2), var(--black-card));
  display: flex; align-items: center; justify-content: center;
}
.article-author__avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-author__initials {
  font-family: var(--font-display); font-size: 16px; color: var(--gold);
}
.article-author__name { font-size: 14px; color: var(--white); font-weight: 400; }
.article-author__role { font-size: 11px; color: var(--muted-2); letter-spacing: .06em; margin-top: 2px; }
.article-share { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.article-share__label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); }
.article-share__btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; cursor: pointer;
  transition: all .3s; background: transparent; text-decoration: none;
}
.article-share__btn:hover { border-color: var(--border-gold); color: var(--gold-strong); }

/* ─── COVER IMAGE ───────────────────────────────────────────── */
.article-cover {
  max-width: 900px; margin: 48px auto; padding: 0 40px;
}
.article-cover__img {
  width: 100%; max-height: 640px; object-fit: contain;
  background: var(--black-card);
  border-radius: var(--r-lg); display: block; border: 1px solid var(--border);
}
.article-cover__placeholder {
  width: 100%; aspect-ratio: 16/7; border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: radial-gradient(ellipse at 40% 30%, rgba(201,168,76,.1), var(--black-card));
  display: flex; align-items: center; justify-content: center;
}
.article-cover__placeholder-num {
  font-family: var(--font-display); font-size: 120px; font-weight: 300;
  color: rgba(201,168,76,.12); letter-spacing: .1em; user-select: none;
}
.article-cover__caption {
  font-size: 12px; color: var(--muted-2); text-align: center;
  margin-top: 12px; font-style: italic; letter-spacing: .04em;
}

/* ─── LAYOUT ARTICLE + SIDEBAR ──────────────────────────────── */
.article-layout {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 60px; align-items: start;
}

/* ─── TABLE DES MATIÈRES ────────────────────────────────────── */
.article-sidebar { position: sticky; top: 96px; }
.article-toc {
  background: var(--black-card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 24px; margin-bottom: 24px;
}
.article-toc__title {
  font-size: 9px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px; display: block;
}
.article-toc__list { display: flex; flex-direction: column; gap: 2px; }
.article-toc__link {
  font-size: 12px; color: var(--muted); transition: all .3s; text-decoration: none;
  padding: 6px 10px 6px 14px;
  border-left: 2px solid transparent; line-height: 1.5; display: block;
  border-radius: 0 4px 4px 0;
}
.article-toc__link:hover { color: var(--gold-strong); border-left-color: var(--border-gold); background: rgba(201,168,76,.03); }
.article-toc__link.active { color: var(--gold-strong); border-left-color: var(--gold); background: rgba(201,168,76,.06); }

/* Sidebar CTA */
.article-sidebar-cta {
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,.07), transparent), var(--black-card);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 24px;
  text-align: center;
}
.article-sidebar-cta__title {
  font-family: var(--font-display); font-size: 16px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--white); margin-bottom: 8px; font-weight: 500;
}
.article-sidebar-cta__title em { font-style: italic; color: var(--gold-strong); }
.article-sidebar-cta p { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; }
.article-sidebar-cta .btn { width: 100%; justify-content: center; font-size: 10px; padding: 11px 16px; }

/* ─── CORPS ARTICLE ─────────────────────────────────────────── */
.article-body { max-width: 100%; }

.article-body h2 {
  font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 400; letter-spacing: .1em; text-transform: uppercase;
  color: var(--white); margin: 64px 0 20px; line-height: 1.15;
  padding-top: 24px; border-top: 1px solid var(--border);
  scroll-margin-top: 100px;
}
.article-body h2:first-child { border-top: none; margin-top: 0; }
.article-body h2 em { font-style: italic; color: var(--gold-strong); }

.article-body h3 {
  font-family: var(--font-display); font-size: 20px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gold-strong);
  margin: 36px 0 14px; scroll-margin-top: 100px;
}

.article-body p {
  font-size: 16px; color: var(--muted); line-height: 1.95;
  font-weight: 300; margin-bottom: 20px;
}
.article-body p strong { color: var(--white); font-weight: 500; }
.article-body p em { font-style: italic; }
.article-body a {
  color: var(--gold-strong); border-bottom: 1px solid rgba(201,168,76,.3);
  transition: color .3s, border-color .3s;
}
.article-body a:hover { color: var(--white); border-color: var(--white); }

/* Listes */
.article-body ul, .article-body ol { padding-left: 0; margin-bottom: 24px; }
.article-body li {
  font-size: 15px; color: var(--muted); line-height: 1.85; font-weight: 300;
  display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.03);
}
.article-body li:last-child { border-bottom: none; }
.article-body li::before {
  content: '—'; color: var(--gold); flex-shrink: 0;
  font-family: var(--font-display); font-size: 16px; margin-top: 1px;
}
.article-body ol { counter-reset: art-counter; }
.article-body ol li { counter-increment: art-counter; }
.article-body ol li::before {
  content: counter(art-counter, decimal-leading-zero);
  color: var(--gold); font-family: var(--font-display);
  font-size: 14px; font-weight: 500; min-width: 28px; margin-top: 2px;
}

/* Citation */
.article-quote {
  margin: 48px 0; padding: 32px 40px;
  border-left: 3px solid var(--gold);
  background: radial-gradient(ellipse at 0% 50%, rgba(201,168,76,.06), transparent), var(--black-card);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.article-quote blockquote {
  font-family: var(--font-display); font-size: 22px; font-weight: 300;
  font-style: italic; color: var(--white); line-height: 1.55; letter-spacing: .02em;
}
.article-quote cite {
  display: block; margin-top: 14px; font-size: 11px;
  color: var(--muted-2); letter-spacing: .12em; text-transform: uppercase; font-style: normal;
}

/* Encadré insight */
.article-insight {
  margin: 40px 0; padding: 28px 32px;
  background: var(--black-card); border: 1px solid var(--border);
  border-top: 2px solid var(--gold); border-radius: var(--r-md);
}
.article-insight__label {
  font-size: 9px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px; display: block;
}
.article-insight p { font-size: 14px; color: var(--muted); line-height: 1.85; margin-bottom: 0; }
.article-insight p strong { color: var(--white); }

/* Warning / Attention */
.article-warning {
  margin: 40px 0; padding: 24px 28px;
  background: rgba(192,57,43,.06); border: 1px solid rgba(192,57,43,.25);
  border-left: 3px solid #c0392b; border-radius: var(--r-md);
}
.article-warning__label {
  font-size: 9px; letter-spacing: .26em; text-transform: uppercase;
  color: #e8534a; margin-bottom: 10px; display: block;
}
.article-warning p { font-size: 14px; color: var(--muted); line-height: 1.85; margin-bottom: 0; }

/* Séparateur décoratif */
.article-sep {
  display: flex; align-items: center; gap: 16px; margin: 52px 0;
}
.article-sep-line { flex: 1; height: 1px; background: var(--border); }
.article-sep-diamond { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); flex-shrink: 0; }

/* Tableau comparatif */
.article-table-wrap { overflow-x: auto; margin: 32px 0; }
.article-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.article-table th {
  background: var(--black-card); border: 1px solid var(--border);
  padding: 12px 16px; text-align: left;
  font-family: var(--font-display); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); font-weight: 500;
}
.article-table td {
  border: 1px solid var(--border); padding: 12px 16px;
  color: var(--muted); line-height: 1.7; vertical-align: top;
}
.article-table tr:nth-child(even) td { background: rgba(255,255,255,.015); }
.article-table td strong { color: var(--white); }

/* Numérotation visuelle */
.article-steps { display: flex; flex-direction: column; gap: 0; margin: 32px 0; }
.article-step {
  display: flex; gap: 24px; padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.article-step:last-child { border-bottom: none; }
.article-step__num {
  font-family: var(--font-display); font-size: 40px; font-weight: 300;
  color: rgba(201,168,76,.25); line-height: 1; flex-shrink: 0; width: 48px;
}
.article-step__content {}
.article-step__title {
  font-family: var(--font-display); font-size: 16px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--white); margin-bottom: 8px; font-weight: 500;
}
.article-step__text { font-size: 14px; color: var(--muted); line-height: 1.8; }

/* CTA de fin d'article */
.article-cta {
  margin: 64px 0 0; padding: 44px;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,.08), transparent), var(--black-card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  text-align: center; position: relative; overflow: hidden;
}
.article-cta::before {
  content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}
.article-cta h3 {
  font-family: var(--font-display); font-size: 26px; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase; color: var(--white); margin-bottom: 12px;
}
.article-cta h3 em { font-style: italic; color: var(--gold-strong); }
.article-cta p { font-size: 14px; color: var(--muted); margin-bottom: 28px; line-height: 1.75; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ─── ARTICLES LIÉS ─────────────────────────────────────────── */
.related-articles {
  max-width: 1200px; margin: 0 auto; padding: 60px 40px 80px;
  border-top: 1px solid var(--border);
}
.related-articles__title {
  font-family: var(--font-display); font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 32px;
  display: flex; align-items: center; gap: 16px;
}
.related-articles__title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.related-card {
  border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
  background: var(--black-card); transition: border-color .4s, transform .4s;
  text-decoration: none; color: inherit;
}
.related-card:hover { border-color: var(--border-gold); transform: translateY(-3px); }
.related-card__img {
  aspect-ratio: 16/9; overflow: hidden; position: relative;
  background: radial-gradient(ellipse at 40% 30%, rgba(201,168,76,.07), var(--black-card));
  display: flex; align-items: center; justify-content: center;
}
.related-card__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%); transition: transform .6s var(--ease); }
.related-card:hover .related-card__img img { transform: scale(1.04); }
.related-card__img-num {
  font-family: var(--font-display); font-size: 48px; color: rgba(201,168,76,.15); font-weight: 300;
}
.related-card__body { padding: 18px; }
.related-card__cat { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; display: block; }
.related-card__title {
  font-family: var(--font-display); font-size: 15px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--white); line-height: 1.25; font-weight: 500;
}

/* ─── PROGRESS BAR LECTURE ──────────────────────────────────── */
#reading-progress {
  position: fixed; top: 0; left: 0; width: 0%; height: 2px; z-index: 10001;
  background: linear-gradient(90deg, var(--gold), var(--gold-strong));
  box-shadow: 0 0 8px rgba(201,168,76,.4);
  transition: width .1s linear;
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-sidebar { position: static; }
  .related-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .article-hero__inner, .article-cover, .article-layout,
  .related-articles { padding-left: 24px; padding-right: 24px; }
  .article-hero { padding-top: 120px; }
  .article-quote { padding: 24px; }
}
@media (max-width: 600px) {
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .article-share { display: none; }
  .article-cta { padding: 28px 20px; }
  .article-step { gap: 16px; }
  .article-step__num { font-size: 28px; width: 36px; }
}

/* ─── ROBUSTESSE MOBILE : aucune colonne ne doit élargir la page ───────────── */
.article-layout > * { min-width: 0; }
.article-body { min-width: 0; overflow-wrap: break-word; }
.article-step__content { min-width: 0; }
.article-table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
.article-body img, .article-body video, .article-body iframe { max-width: 100%; height: auto; }

/* Tableaux : plus compacts sur mobile, ils défilent latéralement dans leur cadre sans élargir la page */
@media (max-width: 600px) {
  .article-table { font-size: 12px; }
  .article-table th, .article-table td { padding: 10px 10px; }
  .article-table th { font-size: 10px; letter-spacing: .08em; }
}

/* Titres d'articles : dimensionnés pour que le mot le plus long tienne dans la largeur de l'écran */
@media (max-width: 600px) {
  .article-hero__title { font-size: clamp(23px, 7.3vw, 36px); letter-spacing: .04em; }
}

/* ─── TABLEAUX SUR MOBILE : chaque ligne devient une fiche, plus aucun défilement latéral ─── */
@media (max-width: 700px) {
  .article-table-wrap, .cookie-table-wrap { overflow-x: visible; }
  .article-table, .cookie-table,
  .article-table tbody, .cookie-table tbody,
  .article-table tr, .cookie-table tr,
  .article-table td, .cookie-table td { display: block; width: 100%; box-sizing: border-box; }
  .article-table thead, .cookie-table thead { display: none; }
  .article-table tr, .cookie-table tr {
    margin: 0 0 16px; border: 1px solid var(--border); border-radius: 14px;
    background: var(--black-card); overflow: hidden;
  }
  .article-table td, .cookie-table td {
    border: 0; border-bottom: 1px solid var(--border); padding: 12px 16px; background: transparent;
    overflow-wrap: anywhere; font-size: 13px; line-height: 1.7;
  }
  .article-table tr:nth-child(even) td { background: transparent; }
  .article-table td:last-child, .cookie-table td:last-child { border-bottom: 0; }
  .article-table td::before, .cookie-table td::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  }
  .article-table td:first-child, .cookie-table td:first-child { background: rgba(201,168,76,.06); font-size: 15px; }
  .article-table td:first-child::before, .cookie-table td:first-child::before { display: none; }
}

/* ─── LISTES : le mot en gras et la suite de la phrase restent sur la même ligne de texte ─── */
.article-body li { display: block; position: relative; padding: 8px 0 8px 32px; }
.article-body li::before { position: absolute; left: 0; top: 9px; margin-top: 0; }
.article-body ol li { padding-left: 44px; }
.article-body ol li::before { top: 11px; }

/* Quand le contenu de l'article est la dernière zone de la page (page de référence), on garde de l'air avant le pied de page */
main > .article-layout:last-child { margin-bottom: 96px; }
