/* ==========================================================================
   Mage Studio · Blog
   Même DA que l'accueil : largeur 1280, blocs gris arrondis, visuels entiers
   arrondis à 4px, séparateurs carrés comme EN · FR.
   ========================================================================== */

.blog-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 160px 20px 120px;
}

/* Méta (catégorie ▪ date ▪ durée) */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #ffffff73;
}
.post-meta a { color: #ffffffb3 !important; text-decoration: none; transition: color .2s; }
.post-meta a:hover { color: var(--white) !important; }
.post-dot {
  width: 3px;
  height: 3px;
  border-radius: 1px;
  background: #ffffff59;
}

/* Visuel dans un bloc gris, image entière arrondie */
.post-media {
  position: relative;
  margin: 0;
  border-radius: var(--block-roundness, 18px);
  overflow: hidden;
  background: var(--dark-grey);
  corner-shape: squircle;
}
.post-media img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 40px);
  transform: translate(-50%, -50%);
  border-radius: 4px;
  corner-shape: squircle;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Page liste ---------- */
/* En-tête : centré, même construction que le hero de Mage Fast */
.blog-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 880px;
  margin: 20px auto 96px;
  text-align: center;
}
.blog-title {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 72px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.06em;
}
.blog-lead {
  max-width: 460px;
  margin: 28px 0 40px;
}
/* Filtres : pastille qui glisse sous la catégorie active */
.blog-filters {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  background: var(--low-opacity-white);
}
.blog-filters-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: #ffffff26;
  transition: transform .5s cubic-bezier(.65, 0, .35, 1), width .5s cubic-bezier(.65, 0, .35, 1);
}
.blog-filters button {
  position: relative;
  z-index: 1;
  padding: 6px 14px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--white);
  opacity: .6;
  cursor: pointer;
  transition: opacity .3s;
}
.blog-filters button:hover,
.blog-filters button.is-active { opacity: 1; }

.post-feature,
.post-card {
  color: var(--white) !important;
  text-decoration: none;
}
.post-feature[hidden],
.post-card[hidden] { display: none; }

.post-feature {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 72px;
}
.post-feature .post-media { aspect-ratio: 16 / 10; }
.post-feature-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.post-feature-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.post-feature .btn { margin-top: 8px; padding: 10px 16px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px 20px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post-card .post-media { aspect-ratio: 4 / 3; margin-bottom: 4px; }
.post-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.04em;
}
.post-card-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #ffffff80;
}
.post-card:hover .post-media img,
.post-feature:hover .post-media img { transform: translate(-50%, -50%) scale(1.02); }

/* ---------- Page article ---------- */
.post-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 920px;
  margin: 76px auto 110px;
  text-align: center;
}
.post-head .post-meta { justify-content: center; }
.post-title {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.06em;
}
.post-lead {
  margin: 0 auto;
  max-width: 680px;
  font-size: 20px;
  line-height: 1.5;
  color: #ffffff99;
}
.post-cover { height: clamp(280px, 48vw, 640px); margin-bottom: 80px; }
.post-cover img { max-width: calc(100% - 64px); max-height: calc(100% - 160px); }

.post-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 680px);
  justify-content: space-between;
  gap: 64px;
}
.post-aside { position: relative; }
.post-toc {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-toc-label {
  margin-bottom: 4px;
  font-size: 13px;
  color: #ffffff59;
}
.post-toc a {
  font-size: 14px;
  line-height: 1.4;
  color: #ffffff73 !important;
  text-decoration: none;
  transition: color .2s;
}
.post-toc a:hover,
.post-toc a.is-active { color: var(--white) !important; }

/* Contenu */
.blog-content { width: 100%; }
.blog-content > *:first-child { margin-top: 0; }
.blog-content h2 { margin: 64px 0 16px; font-size: 28px; font-weight: 500; line-height: 1.2; letter-spacing: -0.04em; scroll-margin-top: 110px; }
.blog-content h3 { margin: 40px 0 12px; font-size: 20px; font-weight: 500; line-height: 1.35; }
.blog-content h4 { margin: 32px 0 8px; font-size: 17px; font-weight: 500; }
.blog-content p { margin: 0 0 20px; font-size: 17px; line-height: 1.8; color: #ffffffa6; }
.blog-content ul, .blog-content ol { margin: 0 0 24px; padding-left: 20px; }
.blog-content li { margin: 6px 0; padding-left: 4px; font-size: 17px; line-height: 1.7; color: #ffffffa6; }
.blog-content strong { color: var(--white); font-weight: 500; }
.blog-content a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #ffffff59; }
.blog-content a:hover { text-decoration-color: var(--white); }
.blog-content code { padding: 2px 6px; border-radius: 6px; background: var(--low-opacity-white); font-size: .9em; }
.blog-content blockquote {
  margin: 40px 0;
  padding: 28px;
  border: 0;
  border-radius: var(--small-roundness);
  background: var(--dark-grey);
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: var(--white);
  corner-shape: squircle;
}
.blog-content figure { margin: 40px 0; }
.blog-content img { width: 100%; border-radius: 4px; }
.blog-content figcaption { margin-top: 10px; text-align: left; font-size: 13px; color: #ffffff80; }
.blog-content hr { margin: 48px 0; border: 0; border-top: 1px solid var(--low-opacity-white); }

.post-more { margin-top: 160px; }
.post-more-title { margin: 0 0 32px; font-weight: 400; }

/* Bloc d'appel à l'action */
.blog-cta { padding: 0 20px 20px; }
.blog-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 128px 20px;
}

@media screen and (max-width: 991px) {
  .post-feature { grid-template-columns: 1fr; gap: 24px; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .post-aside { display: none; }
}

@media screen and (max-width: 767px) {
  .blog-page { padding: 120px 20px 96px; }
  .blog-head { margin: 0 auto 56px; }
  .blog-title br { display: none; }
  .post-grid { grid-template-columns: 1fr; gap: 40px; }
  .post-lead { font-size: 17px; }
  .post-cover { margin-bottom: 48px; }
  .post-head { margin: 0 auto 72px; }
  .post-cover img { max-width: calc(100% - 28px); max-height: calc(100% - 80px); }
  .blog-content p, .blog-content li { font-size: 16px; }
  .blog-content h2 { font-size: 24px; }
  .blog-cta-inner { padding: 96px 16px; }
}
