/* ══════════════════════════════════════════
   MG BLOG 2026 — Styles composants
   Traduction PHP/CSS du design system du repo
   monsieur-guiz-site (voir docs/design.md).
   ══════════════════════════════════════════ */

/* ── Reset / base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--color-surface-off-white);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 76px; /* hauteur du header fixe */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul.mg-reset, ol.mg-reset { margin: 0; padding: 0; list-style: none; }

::selection {
  background: var(--color-brand-purple-light);
  color: var(--color-brand-purple);
}

.mg-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) {
  .mg-container { padding: 3rem 2rem; }
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  width: auto;
  height: auto;
  padding: 0.625rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border-radius: var(--radius-button);
  background: var(--color-brand-purple);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 300;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--color-brand-purple);
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Header ───────────────────────────────── */
.mg-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.mg-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

/* Barre de progression de lecture — se colle au bas du header (comme sa
   bordure) et se remplit au fur et à mesure du scroll dans l'article. */
.mg-reading-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0%;
  background: var(--color-brand-teal);
}
@media (prefers-reduced-motion: no-preference) {
  .mg-reading-progress { transition: width 0.1s linear; }
}
.mg-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
}
@media (min-width: 1024px) {
  .mg-header__inner { padding: 0.9rem 2rem; }
}
.mg-header__left {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-width: 0;
}
.mg-header__logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target-min);
  flex-shrink: 0;
}
.mg-header__logo img { height: 30px; width: auto; }

.mg-header__nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 900px) {
  .mg-header__nav { display: flex; }
}
.mg-header__nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mg-header__nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  min-height: var(--tap-target-min);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-primary);
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.mg-header__nav a:hover,
.mg-header__nav a.is-active {
  color: var(--color-brand-purple);
  background: rgba(94, 0, 213, 0.06);
}

.mg-header__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mg-header__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target-min);
  height: var(--tap-target-min);
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.mg-header__icon-btn:hover {
  color: var(--color-brand-purple);
  background: var(--color-brand-purple-light);
}
.mg-header__burger { display: inline-flex; }
@media (min-width: 900px) {
  .mg-header__burger { display: none; }
}

/* Recherche déroulante */
.mg-header__search {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  padding: 1.25rem 1.5rem;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease-out-quart), opacity 0.25s ease;
}
.mg-header__search.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mg-header__search form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

/* Drawer mobile */
.mg-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mg-drawer.is-open { opacity: 1; pointer-events: auto; }
.mg-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(57, 57, 56, 0.6);
  backdrop-filter: blur(2px);
}
.mg-drawer__panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 85%;
  max-width: 360px;
  background: #fff;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out-expo);
}
.mg-drawer.is-open .mg-drawer__panel { transform: translateX(0); }
.mg-drawer__close {
  align-self: flex-end;
  margin: 1rem 1.25rem 0;
}
.mg-drawer__nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
}
.mg-drawer__nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mg-drawer__nav a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.mg-drawer__nav a:hover { color: var(--color-brand-purple); }

/* ── Boutons ──────────────────────────────── */
.mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-button);
  padding: 0.65rem 1.4rem;
  min-height: var(--tap-target-min);
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out-quart), box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.mg-btn--primary {
  background: var(--color-brand-purple);
  color: #fff;
}
.mg-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(94, 0, 213, 0.18);
}
.mg-btn--outline {
  background: transparent;
  border: 2px solid var(--color-brand-purple);
  color: var(--color-brand-purple);
}
.mg-btn--outline:hover { background: var(--color-brand-purple); color: #fff; }

.mg-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-brand-purple);
  transition: gap 0.2s ease;
}
.mg-cta-link svg { transition: transform 0.3s var(--ease-out-expo); }
.mg-card:hover .mg-cta-link,
.mg-cta-link:hover { gap: 10px; }

/* ── Badges ───────────────────────────────── */
.mg-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-badge);
  line-height: 1;
  text-transform: none;
}
.mg-badge--violet { background: var(--color-brand-purple-light); color: var(--color-brand-purple); }
.mg-badge--vert   { background: var(--color-badge-vert-bg); color: var(--color-brand-teal-dark); }
.mg-badge--orange { background: var(--color-badge-orange-bg); color: var(--color-accent-coral); }
.mg-badge--indigo { background: var(--color-badge-indigo-bg); color: var(--color-brand-indigo); }
.mg-badge--gris   { background: var(--color-badge-gris-bg); color: var(--color-text-secondary); }

/* ── Grille & Card article ────────────────── */
.mg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) {
  .mg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .mg-grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

.mg-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 150ms var(--ease-out-quart), box-shadow 200ms var(--ease-out-quart);
}
.mg-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.mg-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(135deg, rgba(94, 0, 213, 0.15), rgba(94, 0, 213, 0.05));
}
.mg-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}
.mg-card:hover .mg-card__media img { transform: scale(1.05); }
.mg-card__media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-purple);
  opacity: 0.4;
}
.mg-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.5rem 1.25rem;
}
.mg-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.mg-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text-primary);
  margin: 0 0 0.5rem;
}
.mg-card__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mg-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(118, 118, 117, 0.12);
}
.mg-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  min-width: 0;
  flex-wrap: wrap;
}
.mg-card__meta span:not(:last-child)::after { content: "·"; margin-left: 0.5rem; }

/* ── Page header / breadcrumb ─────────────── */
.mg-page-header {
  padding: 3rem 0 2.5rem;
  text-align: center;
}
.mg-page-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-brand-purple);
  margin-bottom: 0.75rem;
}
.mg-page-header__title {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
  color: #1C1C1C;
  margin: 0;
}
.mg-page-header--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mg-breadcrumb {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.mg-breadcrumb a { color: var(--color-text-muted); }
.mg-breadcrumb a:hover { color: var(--color-brand-purple); }

/* ── Article (single) ─────────────────────── */
.mg-article-hero { padding: 2rem 0 1.5rem; }
.mg-article-hero__title {
  /* Volontairement plus petit que le H1 hero de la homepage (--text-h1) :
     un titre d'article n'est pas un hero marketing, on veut arriver au
     contenu vite. */
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--tracking-display);
  color: #1C1C1C;
  margin: 0.6rem 0 1rem;
  max-width: 42rem;
}
.mg-article-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.mg-article-hero__meta img.avatar {
  border-radius: 50%;
  width: 32px;
  height: 32px;
}
.mg-article-hero__meta .author-name {
  color: var(--color-text-primary);
  font-weight: 600;
}
.mg-article-hero__thumb {
  margin-top: 1.5rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 21 / 8;
  max-height: 380px;
}
.mg-article-hero__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Article hero — pattern "niveau 3" : carte flottante sur image
   pleine largeur, avec cercle teal / rectangle orange en gimmick.
   Reprend le hero des pages les plus profondes du site principal. ─── */
.mg-page-hero--card { position: relative; }

.mg-page-hero { margin-bottom: 40px; }

.mg-page-hero__bg {
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: var(--color-brand-purple-light);
}
.mg-page-hero__bg img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mg-page-hero__container { position: relative; }
.mg-page-hero__container--flat { padding: 3rem 0; background: var(--color-brand-purple-light); }
@media (min-width: 768px) {
  /* .mg-container garde son comportement normal (margin:0 auto), donc reste
     centré/aligné exactement comme le header et le fil d'Ariane. Seule la
     carte est extraite du flux et recentrée verticalement, en restant
     collée au bord gauche du padding de .mg-container (left:0 = bord
     intérieur, après padding). */
  .mg-page-hero__container:not(.mg-page-hero__container--flat) {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .mg-page-hero__container:not(.mg-page-hero__container--flat) .mg-container {
    position: relative;
    height: 100%;
    pointer-events: none;
  }
  .mg-page-hero__container:not(.mg-page-hero__container--flat) .mg-page-hero__card-wrap {
    /* left correspond au padding de .mg-container à cette largeur : le
       "left" d'un absolument positionné s'aligne sur le bord EXTÉRIEUR du
       padding de l'ancêtre positionné, pas sur son contenu déjà indenté —
       il faut donc rajouter explicitement ce padding ici. */
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
  }
}
@media (min-width: 1024px) {
  .mg-page-hero__container:not(.mg-page-hero__container--flat) .mg-page-hero__card-wrap {
    left: 2rem;
  }
}

/* La carte, le cercle et le rectangle sont des FRÈRES à l'intérieur de
   __card-wrap (pas des enfants de la carte) : un enfant en z-index négatif
   passe devant le fond de son propre parent positionné, pas derrière. Pour
   que les gimmicks passent vraiment SOUS la carte, ils doivent être à son
   niveau, avec un z-index plus faible qu'elle. */
.mg-page-hero__card-wrap {
  position: relative;
  max-width: 30rem;
}
@media (min-width: 768px) {
  .mg-page-hero__card-wrap { max-width: 27rem; }
}

.mg-page-hero__card {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-hover);
  padding: 2rem;
  margin-top: -3rem;
}
@media (min-width: 768px) {
  .mg-page-hero__card { margin-top: 0; padding: 2.5rem; }
}

.mg-page-hero__card-circle {
  position: absolute;
  z-index: 0;
  top: -18%;
  left: -18%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #D7F4F0;
}
.mg-page-hero__card-rect {
  position: absolute;
  z-index: 0;
  bottom: -14px;
  left: 2rem;
  width: 110px;
  height: 26px;
  background: var(--color-accent-salmon);
}

.mg-page-hero__back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-brand-purple);
  margin-bottom: 1.25rem;
}
.mg-page-hero__back:hover { gap: 0.6rem; }

.mg-page-hero__eyebrow {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-brand-purple);
  margin-bottom: 0.9rem;
}
.mg-page-hero__eyebrow-line {
  width: 28px;
  height: 2px;
  background: var(--color-brand-purple);
  flex-shrink: 0;
}
.mg-page-hero__title {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
  color: #1C1C1C;
  margin: 0 0 1.1rem;
}
.mg-page-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.mg-page-hero__meta img.avatar { border-radius: 50%; width: 28px; height: 28px; }
.mg-page-hero__meta .author-name { color: var(--color-text-primary); font-weight: 600; }

.mg-entry-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
  max-width: 46rem;
  margin: 0 auto;
}
.mg-entry-content > *:first-child { margin-top: 0; }
.mg-entry-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin: 2.5rem 0 1rem;
}
.mg-entry-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text-primary);
  margin: 2rem 0 0.85rem;
}
.mg-entry-content p { margin: 0 0 1.4rem; }
.mg-entry-content a { color: var(--color-brand-purple); text-decoration: underline; text-decoration-color: rgba(94,0,213,0.35); }
.mg-entry-content a:hover { text-decoration-color: var(--color-brand-purple); }
.mg-entry-content ul, .mg-entry-content ol {
  margin: 0 0 1.4rem;
  padding-left: 1.4rem;
}
.mg-entry-content li { margin-bottom: 0.5rem; }
.mg-entry-content blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--color-brand-teal);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text-primary);
}
.mg-entry-content img,
.mg-entry-content figure {
  border-radius: var(--radius-card);
  margin: 1.75rem 0;
}
.mg-entry-content figcaption {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.5rem;
}
.mg-entry-content pre {
  background: #1C1C1C;
  color: #f1f1f1;
  border-radius: var(--radius-card);
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
}
.mg-entry-content code {
  background: rgba(94, 0, 213, 0.08);
  color: var(--color-brand-purple);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}
.mg-entry-content pre code { background: none; color: inherit; padding: 0; }
.mg-entry-content hr { border: none; border-top: 1px solid rgba(0,0,0,0.08); margin: 2.5rem 0; }
.mg-entry-content table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.95rem; }
.mg-entry-content th, .mg-entry-content td { padding: 0.6rem 0.9rem; border: 1px solid rgba(0,0,0,0.08); text-align: left; }
.mg-entry-content th { background: var(--color-surface-near-white); font-weight: 700; color: var(--color-text-primary); }

.mg-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 46rem; margin: 2.5rem auto 0; }

/* Bloc auteur */
.mg-author-box {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: 46rem;
  margin: 2rem auto 0;
  padding: 1.25rem;
  background: var(--color-surface-near-white);
  border-radius: var(--radius-card);
}
.mg-author-box__avatar { border-radius: 50%; }
.mg-author-box__meta { display: flex; flex-direction: column; }
.mg-author-box__name { font-weight: 700; color: var(--color-text-primary); }
.mg-author-box__job { font-size: 0.85rem; color: var(--color-text-muted); }

/* Partage */
.mg-share {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 46rem;
  margin: 2rem auto 0;
}
.mg-share__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-right: 0.4rem;
}
.mg-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-surface-near-white);
  color: var(--color-text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.mg-share__btn:hover {
  background: var(--color-brand-purple);
  color: #fff;
  transform: translateY(-2px);
}

/* Articles similaires */
.mg-related {
  margin-top: var(--spacing-section);
  padding-top: var(--spacing-section);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.mg-related__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 2rem;
  text-align: center;
}

/* ── Commentaires ─────────────────────────── */
.mg-comments { max-width: 46rem; margin: var(--spacing-section) auto 0; }
.mg-comments__title { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.5rem; }
.mg-comments ol.comment-list { list-style: none; margin: 0; padding: 0; }
.mg-comments .comment {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.mg-comments .comment-author { font-weight: 700; color: var(--color-text-primary); margin-right: 0.5rem; }
.mg-comments .comment-content { color: var(--color-text-secondary); margin-top: 0.4rem; }
.mg-comments .children { list-style: none; margin: 0; padding-left: 1.5rem; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-button);
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  background: #fff;
  color: var(--color-text-primary);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: 2px solid var(--color-brand-purple);
  outline-offset: 1px;
  border-color: var(--color-brand-purple);
}
.comment-form label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.comment-form .form-submit input {
  width: auto;
  cursor: pointer;
  background: var(--color-brand-purple);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.65rem 1.6rem;
}

/* ── Recherche ─────────────────────────────── */
.mg-search-form { display: flex; gap: 0.5rem; width: 100%; }
.mg-search-form input[type="search"] {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-button);
  font-family: inherit;
  font-size: 0.95rem;
}
.mg-search-form input[type="search"]:focus {
  outline: 2px solid var(--color-brand-purple);
  outline-offset: 1px;
}
.mg-search-form button {
  background: var(--color-brand-purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-button);
  padding: 0 1.2rem;
  cursor: pointer;
}

/* ── Pagination ───────────────────────────── */
.mg-pagination,
.pagination.mg-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: var(--spacing-section) 0 2rem;
}
.mg-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  border-radius: var(--radius-button);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.mg-pagination .page-numbers.current {
  background: var(--color-brand-purple);
  color: #fff;
  border-color: var(--color-brand-purple);
}
.mg-pagination .page-numbers:hover:not(.current) { border-color: var(--color-brand-purple); color: var(--color-brand-purple); }

/* ── "Voir la suite" (accueil) ─────────────── */
.mg-load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: var(--spacing-section) 0 2rem;
}
.mg-load-more__count {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}
.mg-load-more__btn {
  min-width: 12rem;
}
.mg-load-more__btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Empty state / 404 ────────────────────── */
.mg-empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
}
.mg-empty-state__code {
  font-size: 4rem;
  font-weight: 800;
  color: var(--color-brand-purple);
  line-height: 1;
  margin-bottom: 1rem;
}
.mg-empty-state__text { color: var(--color-text-secondary); margin-bottom: 2rem; }
.mg-empty-state form.mg-search-form { max-width: 420px; margin: 0 auto 2rem; }

/* ── Footer ───────────────────────────────── */
.mg-footer {
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark-muted);
  margin-top: var(--spacing-section);
}
.mg-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (min-width: 640px) {
  .mg-footer__grid { grid-template-columns: repeat(3, 1fr); }
}
.mg-footer__col h3 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-brand-teal);
  margin: 0 0 1.1rem;
}
.mg-footer__col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.mg-footer__col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 0.875rem;
  color: var(--color-text-on-dark-muted);
  transition: color 0.2s ease;
}
.mg-footer__col a:hover { color: #fff; }

.mg-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 0;
  text-align: center;
}
@media (min-width: 768px) {
  .mg-footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
.mg-footer__brand { display: flex; align-items: center; gap: 1rem; }
.mg-footer__brand img { height: 24px; }
.mg-footer__legal { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.mg-footer__legal a { font-size: 0.75rem; color: var(--color-text-on-dark-muted); }
.mg-footer__legal a:hover { color: #fff; }
.mg-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text-on-dark-muted);
}
.mg-footer__social a:hover { color: var(--color-brand-teal); }

/* ── Plugins : PDF / podcast ──────────────── */
.wp-block-pdf-embedder-embedder,
.pdfemb-viewer,
.mg-entry-content .pdf-embedder-wrapper {
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin: 1.75rem 0;
}
/* ── Reveal on scroll ─────────────────────── */
.mg-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.mg-reveal.is-visible { opacity: 1; transform: translateY(0); }
