/* ============================================================
   GAÉ Finance - Pages filles de la Méthode (série mt-)
   CSS partagé des 7 temps (01 Cadrage -> 07 Closing).
   Une seule famille visuelle : charte commune, aucune palette
   par page. La personnalité d'un temps vient de son contenu.
   ============================================================ */

.mt-breadcrumb {
  padding: 18px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.mt-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.mt-breadcrumb li { display: flex; align-items: center; }

.mt-breadcrumb li + li::before {
  content: "›";
  margin-right: 10px;
  color: rgba(22, 24, 29, 0.35);
}

.mt-breadcrumb a { text-decoration: none; }
.mt-breadcrumb a:hover { text-decoration: underline; }

.mt-breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Progression de série (01 / 07) ---------- */

.mt-progress {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px 10px;
  margin: 30px 0 0;
}

.mt-progress__step {
  border-top: 2px solid var(--line);
  padding-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.mt-progress__step .mt-num {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
}

.mt-progress__step--active {
  border-top-color: var(--gold);
  color: inherit;
  font-weight: 600;
}

.mt-progress__step--soon {
  opacity: 0.62;
}

/* ---------- Navigation précédent / suivant ---------- */

.mt-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 14px 22px;
  margin-top: 22px;
}

.mt-nav__card {
  min-width: 200px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.mt-nav__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.service-hero .mt-nav__label { color: var(--gold); }

.mt-nav__title {
  margin: 4px 0 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--accent);
}

.service-hero a.mt-nav__card .mt-nav__title,
.service-hero .mt-nav__title { color: #f4f7fb; }

a.mt-nav__card { text-decoration: none; }
a.mt-nav__card .mt-nav__title { color: var(--accent); }
a.mt-nav__card:hover .mt-nav__title { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }

.mt-nav__card--soon { opacity: 0.62; }
.mt-nav__card--soon .mt-nav__title::after {
  content: " - à paraître";
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

.mt-back {
  max-width: 66ch;
  margin: 0;
  font-size: 0.92rem;
}

.mt-back a { color: var(--accent); text-decoration: none; font-weight: 600; }
.mt-back a:hover { text-decoration: underline; }

/* ---------- Corps éditorial ---------- */

.mt-body { max-width: 880px; }

.mt-body h2 {
  /* 16C-2ter : hiérarchie H1 > H2 (44 px desktop max, 30 px mobile)
     et respiration avant chaque nouvelle section */
  font-size: clamp(1.875rem, 2.6vw + 12px, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: clamp(46px, 6.5vw + 8px, 80px);
  /* 16D-bis : H2 visuellement attaché à son introduction
     (12-16 px mobile, 14-18 tablette, 16-20 desktop) */
  margin-bottom: clamp(12px, 1vw + 8px, 18px);
}

/* Le premier H2 reste proche du hero (rythme 16C-2bis inchangé) */
.mt-body h2:first-child { margin-top: 8px; }

.mt-lede {
  /* 16D-bis : même rythme H2 -> intro que le corps (fusion avec
     le margin-bottom du h2, jamais au-delà de la cible) */
  margin: clamp(12px, 1vw + 8px, 18px) 0 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--accent);
}

.mt-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 16D-bis : rangées 16-20 px mobile, 18-22 tablette, 20-24 desktop */
  gap: clamp(16px, 1.2vw + 9px, 22px) 38px;
}

.mt-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.65;
}

.mt-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 2px;
  background: var(--gold);
}

.mt-list li strong { color: var(--text); }

/* ---------- Variations par type de mission ---------- */

.mt-vari {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 52px;
  margin-top: 18px;
}

.mt-vari__item {
  border-top: 1px solid var(--line);
  /* 16D-bis : blocs empilés d'une même grille à 36 px desktop
     (2 x 18), dans la cible 28-40 */
  padding: 18px 0;
}

.mt-vari__item h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  color: var(--ink);
}

.mt-vari__item h3 .mt-vari__tag {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}

.mt-vari__item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.68;
}

/* ---------- Notions à connaître ---------- */

.mt-body p {
  max-width: 68ch;
}

.mt-notions {
  max-width: 66ch;
  margin: 18px 0 0;
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.7;
}

.mt-notions a { color: var(--accent); }

/* ---------- Responsive ---------- */

@media (max-width: 899px) {
  .mt-breadcrumb { padding-top: 12px; }

  .mt-progress { gap: 8px; }
  .mt-progress__step { font-size: 0.74rem; }
  .mt-progress__step .mt-num { font-size: 0.64rem; }

  .mt-list { grid-template-columns: 1fr; }
  .mt-vari { grid-template-columns: 1fr; gap: 0; }
  /* 16D-bis : blocs empilés à 24 px mobile (2 x 12, cible 20-24) */
  .mt-vari__item { padding: 12px 0; }
}

@media (max-width: 640px) {
  .mt-progress__step { font-size: 0; }
  .mt-progress__step .mt-num {
    font-size: 0.88rem;
    display: block;
  }
}

/* ============================================================
   Correctif 16D-bis : rythme interne des sections du corps.
   Problème : le socle normalise les marges des h2 et p à 0,
   donc l'introduction collait au H2 (0 px) et les paragraphes
   successifs se suivaient sans air. On définit le rythme par
   relation (jamais par cumul) : H2 -> premier élément géré par
   le margin-bottom du H2 (tout élément collé est remis à 0),
   intro -> contenu par une marge dédiée sur les blocs qui
   suivent un paragraphe.
   Cibles : H2 -> intro 12-16 mobile / 14-18 tablette /
   16-20 desktop ; intro -> contenu 20-24 / 24-28 / 28-32.
   Échelle des H2 (16C-2ter) inchangée.
   ============================================================ */

/* Aucun élément direct après un H2 n'apporte sa propre marge :
   l'espacement vient du margin-bottom du H2, une seule fois. */
.mt-body h2 + p:not(.mt-lede),
.mt-body h2 + .mt-list,
.mt-body h2 + .mt-vari,
.mt-body h2 + .mt-notions { margin-top: 0; }

/* Respiration entre paragraphes d'un même bloc introductif
   (le socle les laisse collés à 0) */
.mt-body p + p { margin-top: 14px; }

/* Introduction -> premier bloc de contenu : liste, grille de
   variations, notions. Le .mt-lede et les H2 restent régis par
   les règles ci-dessus (16-20 px) */
.mt-body p + .mt-list,
.mt-body p + .mt-vari,
.mt-body p + .mt-notions { margin-top: clamp(20px, 1.6vw + 12px, 30px); }

/* ---------- Temps publié : pastille cliquable + signature de série ---------- */

.mt-progress__step--pub a {
  color: var(--accent);
  text-decoration: none;
}

.mt-progress__step--pub a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mt-signature {
  max-width: 60ch;
  margin: 16px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Progression et nav dans le hero sombre ---------- */
/* Les filles affichent la progression de serie et la nav dans le
   hero marine : filets et textes y passent en tons clairs, or
   pour le temps actif et les numeros. */

.service-hero .mt-progress__step {
  border-top-color: rgba(255, 255, 255, 0.25);
  color: rgba(244, 247, 251, 0.72);
}

.service-hero .mt-progress__step--active {
  border-top-color: var(--gold);
  color: #f4f7fb;
}

.service-hero .mt-progress__step--pub a {
  color: rgba(244, 247, 251, 0.92);
}

.service-hero .mt-nav__card { border-top-color: rgba(255, 255, 255, 0.25); }

/* ============================================================
   Correctif 16C-2 bis : hero allegre, progression clarifiee,
   navigation precedent/suivant deplacee en fin de contenu.
   ============================================================ */

/* Progression : supprimer la double numerotation (marqueurs de
   liste decimal de l'ol + num serif deja affiches) */
.mt-progress {
  list-style: none;
  padding: 0;
}

.mt-progress li { list-style: none; }

/* Filet de serie tres fin (2px -> 1px), temps actif en or */
.mt-progress__step { border-top-width: 1px; }
.mt-progress__step--active { border-top-width: 1px; }

/* Hero : plus compact, fond marine propre (halos decoratifs
   retires sur les filles uniquement - pages.css intact pour les
   autres pages) */
.service-hero { padding: 64px 0 52px; }
.service-hero::before,
.service-hero::after { display: none; }

.service-hero .mt-progress { margin-top: 26px; }

/* Signature de serie : lisible sur marine, secondaire face a
   l'introduction */
.service-hero .mt-signature {
  margin-top: 14px;
  color: rgba(244, 247, 251, 0.78);
}

/* Navigation precedent/suivant : uniquement en fin de contenu,
   deux zones ouvertes sur filets, sans carte */
.mt-back { display: block; }

.mt-nav--end,
main .mt-nav {
  align-items: stretch;
}

main .mt-nav .mt-nav__card { min-width: 0; }

.mt-nav__card--prev { flex: 1 1 0; }
.mt-nav__card--next {
  flex: 1 1 0;
  text-align: right;
}
.mt-nav__card--next .mt-nav__title { text-align: right; }

/* Cas limites : Cadrage (suivant seul) et Closing (precedent seul
   + retour parent) - la zone unique se cale a droite */
.mt-nav .mt-nav__card--next:first-child:last-child {
  margin-left: auto;
}

/* Largeur de lecture de l'introduction deja maîtrisee par
   .service-hero__lead (60ch) - on resserre legerement le hero
   copy pour le rythme de série */
@media (min-width: 900px) {
  .service-hero .service-hero__grid--solo { max-width: 880px; }
}
