/* ==========================================================================
   Famille « leçons » : fiche de leçon, hub /lecons/, hubs de famille (maquette 13 validée le 26/11/2026).
   Planches : Main (1 440 px), Mobile (390 px), Exercice-score, Hub-lecons, Mobile-hub-lecons.
   Chargée sur tout le site par le socle : tout est préfixé .tfm-lecons-.
   Couleurs du socle (--tf-*) + couleurs de la charte des leçons du LXP (cahier, rouge des pronoms),
   reprises de la maquette et déclarées une seule fois ci-dessous.
   ========================================================================== */

:root {
  --tf-lecons-rouge: #C8283F;        /* pronoms, encadré « Attention » */
  --tf-lecons-faux: #B5303D;         /* réponse fausse */
  --tf-lecons-faux-fond: #FBE5E8;
  --tf-lecons-filet: #D8DEEB;        /* bords du cahier et des tableaux */
  --tf-lecons-entete: #EEF1F8;       /* en-tête des tableaux */
  --tf-lecons-ligne: #DDE4F1;        /* lignes du cahier */
  --tf-lecons-ligne-fine: #EDF1F8;
  --tf-lecons-marge: #F3CDD2;        /* marge rouge du cahier */
  --tf-lecons-vert-clair: #A7F3D0;
  --tf-lecons-gris-bouton: #94A3B8;
  --tf-lecons-marge-x: 46px;         /* position de la marge (24px en mobile) */
}

/* Pleine largeur de la fiche : style.css (§ 15) ne la donne qu'aux pages (body.page-template). */
body.single-lecon .site.grid-container { max-width: 100% !important; padding: 0 !important; }
body.single-lecon .site-content { display: block !important; max-width: 100% !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }

/* ---------- Commun ---------- */
.tfm .tfm-lecons-pile { display: flex; flex-direction: column; gap: 40px; }
.tfm .tfm-lecons-intro { display: flex; flex-direction: column; gap: 16px; }
.tfm .tfm-lecons-intro p { max-width: 820px; margin-top: 0; }
.tfm .tfm-lecons-intro .tfm-surtitre { margin: 0; }
.tfm .tfm-lecons-gris { color: var(--tf-encre-secondaire); font-weight: 700; }
.tfm .tfm-lecons-rel { color: var(--tf-lecons-rouge); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tfm .tfm-lecons-rond { flex: none; width: 56px; height: 56px; border-radius: var(--tf-rayon-pilule); background: var(--tf-emeraude); display: flex; align-items: center; justify-content: center; }
.tfm-lecons-fiche .screen-reader-text, .tfm .tfm-lecons-exo .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.tfm .tfm-lecons-sans-haut { padding-top: 0; }
.tfm .tfm-lecons-h2-moyen { font-size: 34px; line-height: 38px; }

/* Feuille de cahier (charte des leçons du LXP) */
.tfm .tfm-lecons-cahier {
  background-color: #FFFFFF;
  background-image:
    linear-gradient(90deg, transparent 0 var(--tf-lecons-marge-x), var(--tf-lecons-marge) var(--tf-lecons-marge-x) calc(var(--tf-lecons-marge-x) + 2px), transparent calc(var(--tf-lecons-marge-x) + 2px)),
    linear-gradient(var(--tf-lecons-ligne) 1px, transparent 1px),
    linear-gradient(var(--tf-lecons-ligne-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--tf-lecons-ligne-fine) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 8px 8px, 32px 32px;
  border-radius: 24px; overflow: hidden;
}

/* ---------- Héros (fiche et hubs) ---------- */
.tfm .tfm-lecons-hero { padding-top: 22px; }
.tfm .tfm-lecons-hero > .tfm-wrap, .tfm .tfm-lecons-hero .tfm-wrap { display: flex; flex-direction: column; gap: 32px; }
.tfm .tfm-lecons-barre { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 8px; }
.tfm .tfm-lecons-barre .tfm-fil a { color: var(--tf-emeraude-fonce); }
.tfm .tfm-lecons-maj { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--tf-encre-secondaire); white-space: nowrap; }
.tfm .tfm-lecons-etiquettes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: -8px; }
.tfm .tfm-lecons-pastille { background: var(--tf-emeraude-pale); color: var(--tf-emeraude-fonce); border-radius: var(--tf-rayon-pilule); padding: 6px 14px; font-size: 15px; line-height: 19px; font-weight: 800; }
.tfm .tfm-lecons-famille-nom { margin-left: 6px; font-size: 14px; line-height: 18px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-hero h1 { line-height: 68px; }
.tfm .tfm-lecons-h1-suite { color: var(--tf-emeraude); }
.tfm .tfm-lecons-hero-grille { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; align-items: start; }
.tfm .tfm-lecons-hero-grille--centre { align-items: center; }
.tfm .tfm-lecons-hero-texte { display: flex; flex-direction: column; gap: 32px; }
.tfm .tfm-lecons-enbref { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tfm .tfm-lecons-enbref .tfm-surtitre { margin: 0; }
.tfm p.tfm-lecons-enbref-texte { max-width: 660px; margin: 0; font-size: 21px; line-height: 32px; font-weight: 500; }
.tfm .tfm-lecons-hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.tfm .tfm-lecons-hero-actions .tfm-lien-fleche { font-size: 17px; }

/* Encadré « Cette fiche en bref » */
.tfm .tfm-lecons-resume { background: var(--tf-emeraude-pale); border-radius: 24px; padding: 36px 40px; display: flex; flex-direction: column; gap: 22px; }
.tfm .tfm-lecons-resume .tfm-surtitre { margin: 0; }
.tfm .tfm-lecons-resume dl { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.tfm .tfm-lecons-resume dl > div { display: flex; gap: 16px; align-items: flex-start; }
.tfm .tfm-lecons-resume-icone { flex: none; width: 40px; height: 40px; border-radius: var(--tf-rayon-pilule); background: var(--tf-emeraude); display: flex; align-items: center; justify-content: center; }
.tfm .tfm-lecons-resume dt { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-resume dd { margin: 2px 0 0; font-size: 20px; line-height: 26px; font-weight: 800; color: var(--tf-marine); }

/* Encadré « Quel est mon niveau ? » (hubs) */
.tfm .tfm-lecons-test { background: var(--tf-emeraude-pale); border-radius: 24px; padding: 40px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.tfm .tfm-lecons-test h2 { font-size: 30px; line-height: 34px; }
.tfm .tfm-lecons-test p { margin: 0; }
.tfm .tfm-lecons-test .tfm-lien-fleche { font-size: 17px; }

/* ---------- « Comment choisir ? » ---------- */
.tfm .tfm-lecons-quatre { background: var(--tf-emeraude); border-radius: 24px; padding: 40px 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; justify-items: center; text-align: center; }
.tfm .tfm-lecons-quatre > div { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.tfm .tfm-lecons-quatre span { font-size: 19px; line-height: 25px; font-weight: 700; color: #FFFFFF; }
.tfm .tfm-lecons-quatre .tfm-lecons-quatre-mot { font-size: 56px; line-height: 60px; font-weight: 900; letter-spacing: -0.05em; white-space: nowrap; }
.tfm .tfm-lecons-quatre em { color: #FFFFFF; }
.tfm .tfm-lecons-etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tfm .tfm-lecons-etape { border: 3px solid var(--tf-emeraude); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.tfm .tfm-lecons-etape p { margin: 0; font-size: 18px; line-height: 27px; }
.tfm .tfm-lecons-etape-num { width: 56px; height: 56px; border-radius: var(--tf-rayon-pilule); background: var(--tf-emeraude); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; }
.tfm .tfm-lecons-etape-mot { background: #FFFFFF; color: var(--tf-emeraude-fonce); border-radius: var(--tf-rayon-pilule); padding: 6px 14px; font-size: 14px; line-height: 18px; font-weight: 800; }
.tfm .tfm-lecons-citation { margin: 32px auto 0; max-width: 960px; padding: 0; border: 0; text-align: center; font-size: 38px; line-height: 46px; font-weight: 900; letter-spacing: -0.03em; color: var(--tf-emeraude-fonce); font-style: normal; background: none; }

/* ---------- Leçons sur la feuille de cahier ---------- */
.tfm .tfm-lecons-lecon { border: 1px solid var(--tf-lecons-filet); padding: 40px 56px 48px 88px; display: flex; flex-direction: column; gap: 28px; }
.tfm .tfm-lecons-lecon-tete { display: flex; flex-direction: column; gap: 6px; }
.tfm .tfm-lecons-source { font-size: 13px; line-height: 17px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-lecon h3 { font-size: 30px; line-height: 36px; }
.tfm .tfm-lecons-lecon-tete p { margin: 0; font-size: 19px; line-height: 30px; font-weight: 500; }
.tfm .tfm-lecons-table { border: 1px solid var(--tf-lecons-filet); border-radius: 16px; overflow: hidden; background: #FFFFFF; }
.tfm .tfm-lecons-table table { width: 100%; border-collapse: collapse; text-align: left; margin: 0; border: 0; }
.tfm .tfm-lecons-table thead tr { background: var(--tf-lecons-entete); }
.tfm .tfm-lecons-table thead th { padding: 12px 20px; font-size: 13px; line-height: 17px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tf-encre-secondaire); border: 0; background: none; }
.tfm .tfm-lecons-table tbody { font-size: 18px; line-height: 27px; color: var(--tf-encre); }
.tfm .tfm-lecons-table tbody tr { border-top: 1px solid var(--tf-lecons-filet); }
.tfm .tfm-lecons-table tbody th, .tfm .tfm-lecons-table tbody td { padding: 16px 20px; border: 0; vertical-align: top; font-weight: 400; background: none; }
.tfm .tfm-lecons-table tbody th { font-size: 20px; white-space: nowrap; }
.tfm .tfm-lecons-separation { border: 0; height: 1px; background: var(--tf-lecons-filet); margin: 12px 0; }
.tfm .tfm-lecons-methode { margin: 0; font-size: 18px; line-height: 28px; }
.tfm .tfm-lecons-exemples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.tfm .tfm-lecons-exemples > div, .tfm .tfm-lecons-attention, .tfm .tfm-lecons-retenir { display: flex; flex-direction: column; gap: 12px; }
.tfm .tfm-lecons-lecon h4 { font-size: 14px; line-height: 18px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-lecon ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.tfm .tfm-lecons-lecon li { font-size: 18px; line-height: 28px; }
.tfm .tfm-lecons-encadres { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tfm .tfm-lecons-attention { background: #FFFFFF; border: 1px solid var(--tf-lecons-filet); border-left: 4px solid var(--tf-lecons-rouge); border-radius: 12px; padding: 18px 22px; gap: 10px; }
.tfm .tfm-lecons-lecon .tfm-lecons-attention h4 { color: var(--tf-lecons-rouge); }
.tfm .tfm-lecons-retenir { background: var(--tf-emeraude-pale); border-radius: 12px; padding: 18px 22px; gap: 10px; }
.tfm .tfm-lecons-lecon .tfm-lecons-retenir h4 { color: var(--tf-emeraude-fonce); }
.tfm .tfm-lecons-encadres ul { gap: 8px; padding-left: 20px; }
.tfm .tfm-lecons-encadres li { font-size: 17px; line-height: 26px; }
.tfm .tfm-lecons-retenir li { font-weight: 600; color: var(--tf-marine); }

/* ---------- Erreurs fréquentes ---------- */
.tfm .tfm-lecons-erreurs { display: flex; flex-direction: column; border-top: 2px solid var(--tf-marine); }
.tfm .tfm-lecons-erreurs-tete, .tfm .tfm-lecons-erreur { display: grid; grid-template-columns: 380px 380px minmax(0, 1fr); gap: 32px; border-bottom: 1px solid var(--tf-bordure); }
.tfm .tfm-lecons-erreurs-tete { padding: 14px 0; }
.tfm .tfm-lecons-erreurs-tete span { font-size: 14px; line-height: 18px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-erreurs-tete .tfm-lecons-faux-titre { color: var(--tf-lecons-faux); }
.tfm .tfm-lecons-erreurs-tete .tfm-lecons-juste-titre { color: var(--tf-emeraude-fonce); }
.tfm .tfm-lecons-erreur { padding: 22px 0; align-items: baseline; font-size: 18px; line-height: 27px; }
.tfm .tfm-lecons-faux, .tfm .tfm-lecons-juste { display: flex; gap: 10px; align-items: baseline; font-size: 19px; line-height: 27px; }
.tfm .tfm-lecons-faux { font-weight: 600; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-faux > span { color: var(--tf-lecons-faux); font-weight: 900; }
.tfm .tfm-lecons-juste { font-weight: 800; color: var(--tf-marine); }
.tfm .tfm-lecons-juste > span { color: var(--tf-emeraude-fonce); font-weight: 900; }

/* ---------- Exercice (section marine, feuille de cahier) ---------- */
.tfm .tfm-lecons-exercice h2 { font-size: 52px; line-height: 54px; letter-spacing: -0.045em; }
.tfm .tfm-lecons-exercice .tfm-lecons-intro p { font-size: 20px; line-height: 30px; font-weight: 500; color: var(--tf-pied-texte); }
.tfm .tfm-lecons-exo { padding: 36px 48px 40px 88px; display: flex; flex-direction: column; gap: 24px; color: var(--tf-marine); }
/* Le socle met le texte des sections marine en blanc : la feuille est blanche, on remet l'encre. */
.tfm .tfm-section--marine .tfm-lecons-exo p, .tfm .tfm-section--marine .tfm-lecons-exo strong { color: var(--tf-marine); }
.tfm .tfm-lecons-exo-tete { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tfm .tfm-lecons-exo-titre { font-size: 13px; line-height: 17px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-exo-avance { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 20px; font-weight: 800; color: var(--tf-marine); }
.tfm .tfm-lecons-exo-barre { width: 160px; height: 8px; border-radius: var(--tf-rayon-pilule); background: var(--tf-bordure-claire); overflow: hidden; display: block; }
.tfm .tfm-lecons-exo-barre > span { display: block; width: 0; height: 8px; background: var(--tf-emeraude); transition: width .2s ease; }
.tfm .tfm-lecons-exo-liste { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--tf-marine); }
.tfm .tfm-lecons-exo-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 20px; row-gap: 10px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--tf-lecons-filet); margin: 0; }
.tfm .tfm-lecons-exo-num { width: 36px; height: 36px; border-radius: var(--tf-rayon-pilule); background: var(--tf-marine); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 900; }
.tfm .tfm-lecons-exo-item.est-repondu .tfm-lecons-exo-num { background: var(--tf-emeraude); }
.tfm p.tfm-lecons-exo-phrase { margin: 0; font-size: 19px; line-height: 29px; font-weight: 500; }
.tfm .tfm-lecons-exo-blanc { display: inline-block; min-width: 72px; padding: 0 4px; border-bottom: 2px solid var(--tf-marine); text-align: center; vertical-align: baseline; }
.tfm .tfm-lecons-exo-blanc:empty::after, .tfm .tfm-lecons-exo-blanc .screen-reader-text + span:empty { content: "\00a0"; }
.tfm .est-juste .tfm-lecons-exo-blanc { min-width: 0; border-bottom-color: var(--tf-emeraude-fonce); color: var(--tf-emeraude-fonce); font-weight: 800; }
.tfm .est-faux .tfm-lecons-exo-blanc { min-width: 0; border-bottom-color: var(--tf-lecons-faux); color: var(--tf-lecons-faux); font-weight: 800; }
.tfm .tfm-lecons-exo-choix { display: flex; gap: 8px; flex-wrap: wrap; }
.tfm .tfm-lecons-exo-choix button {
  width: 80px; height: 44px; padding: 0 6px; border-radius: 10px; font-family: inherit; font-size: 17px; font-weight: 800; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--tf-lecons-gris-bouton); background: #FFFFFF; color: var(--tf-marine); text-transform: none; letter-spacing: 0;
}
.tfm .tfm-lecons-exo-choix button:hover { border-color: var(--tf-emeraude-fonce); color: var(--tf-emeraude-fonce); background: #FFFFFF; }
.tfm .tfm-lecons-exo-choix button:focus-visible { outline: 3px solid var(--tf-emeraude); outline-offset: 2px; }
.tfm .tfm-lecons-exo-choix button[aria-disabled="true"] { cursor: default; border-color: var(--tf-bordure-claire); color: var(--tf-lecons-gris-bouton); }
.tfm .tfm-lecons-exo-choix button.est-bonne { border: 2px solid var(--tf-emeraude-fonce); background: var(--tf-emeraude-pale); color: var(--tf-emeraude-fonce); }
.tfm .tfm-lecons-exo-choix button.est-erreur { border: 2px solid var(--tf-lecons-faux); background: var(--tf-lecons-faux-fond); color: var(--tf-lecons-faux); }
.tfm .tfm-lecons-exo-choix button.est-bonne::before { content: "✓"; font-weight: 900; }
.tfm .tfm-lecons-exo-correction { grid-column: 2 / -1; }
.tfm .tfm-lecons-exo-correction p { margin: 0; font-size: 17px; line-height: 26px; color: var(--tf-encre); }
.tfm .tfm-section--marine .tfm-lecons-exo .tfm-lecons-exo-correction p { color: var(--tf-encre); }
.tfm .tfm-lecons-exo-fin { display: flex; flex-direction: column; gap: 20px; }
.tfm .tfm-section--marine .tfm-lecons-exo p.tfm-lecons-exo-attente { margin: 0; font-size: 17px; line-height: 25px; font-weight: 600; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-exo-score { display: flex; flex-direction: column; gap: 6px; background: var(--tf-emeraude-pale); border-radius: 16px; padding: 24px 28px; outline: none; }
.tfm .tfm-lecons-exo-score-titre { font-size: 14px; line-height: 18px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tf-emeraude-fonce); }
.tfm .tfm-lecons-exo-score-valeur { font-size: 44px; line-height: 48px; font-weight: 900; letter-spacing: -0.04em; color: var(--tf-marine); }
.tfm .tfm-lecons-exo-score p { margin: 0; font-size: 18px; line-height: 28px; }
.tfm .tfm-lecons-exo-suite { display: flex; flex-direction: column; gap: 14px; }
.tfm .tfm-lecons-exo-suite p { margin: 0; font-size: 18px; line-height: 28px; font-weight: 600; }
.tfm .tfm-lecons-exo-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.tfm .tfm-lecons-exo-refaire { height: 52px; padding: 0 24px; border-radius: var(--tf-rayon-pilule); border: 2px solid var(--tf-marine); background: #FFFFFF; color: var(--tf-marine); font-family: inherit; font-size: 17px; font-weight: 800; cursor: pointer; text-transform: none; letter-spacing: 0; }
.tfm .tfm-lecons-exo-refaire:hover { background: var(--tf-marine); color: #FFFFFF; }
.tfm .tfm-lecons-exo-refaire:focus-visible { outline: 3px solid var(--tf-emeraude); outline-offset: 2px; }
.tfm .tfm-lecons-exo [hidden] { display: none !important; }

/* ---------- Deux colonnes (FAQ, auteur) ---------- */
.tfm .tfm-lecons-deux-col { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 64px; align-items: start; }
.tfm .tfm-lecons-faq { display: flex; flex-direction: column; border-top: 2px solid var(--tf-marine); }
.tfm .tfm-lecons-auteur-section { padding-bottom: 0; }
/* Fiches liées cachées (aucune publiée) : l'espace du bas revient à la section auteur. */
.tfm .tfm-lecons-auteur-section + .tfm-lecons-final { margin-top: var(--tf-section); }
.tfm .tfm-lecons-auteur { display: flex; gap: 20px; align-items: flex-start; }
.tfm .tfm-lecons-auteur p { margin: 0; max-width: 760px; }
.tfm .tfm-lecons-auteur-icone { flex: none; width: 56px; height: 56px; border-radius: var(--tf-rayon-pilule); background: var(--tf-emeraude); display: flex; align-items: center; justify-content: center; }

/* ---------- Pour aller plus loin ---------- */
.tfm .tfm-lecons-parcours { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: stretch; }
.tfm .tfm-lecons-parcours-texte { display: flex; flex-direction: column; gap: 28px; }
.tfm .tfm-lecons-parcours-texte p { margin: 0; }
.tfm .tfm-lecons-sessions { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 2px solid var(--tf-marine); }
.tfm .tfm-lecons-sessions li { display: flex; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--tf-lecons-vert-clair); margin: 0; }
.tfm .tfm-lecons-sessions li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.tfm .tfm-lecons-sessions-niv { flex: none; width: 52px; font-size: 30px; line-height: 32px; font-weight: 900; letter-spacing: -0.04em; color: var(--tf-emeraude); }
.tfm .tfm-lecons-sessions-titre { font-size: 19px; line-height: 25px; font-weight: 800; color: var(--tf-marine); }
.tfm .tfm-lecons-sessions-lecon { font-size: 16px; line-height: 23px; font-weight: 500; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-liens { display: flex; gap: 12px 28px; flex-wrap: wrap; }

/* ---------- Fiches liées ---------- */
.tfm .tfm-lecons-liees-section { padding-top: 72px; }
.tfm .tfm-lecons-liees-section .tfm-lecons-pile { gap: 28px; }
.tfm .tfm-lecons-liees { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tfm .tfm-lecons-liee { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; border-top: 3px solid var(--tf-emeraude); text-decoration: none; }
.tfm .tfm-lecons-liee-niv { font-size: 13px; line-height: 17px; font-weight: 800; letter-spacing: 0.08em; color: var(--tf-emeraude-fonce); }
.tfm .tfm-lecons-liee-titre { font-size: 21px; line-height: 27px; font-weight: 900; color: var(--tf-marine); }
.tfm .tfm-lecons-liee-desc { font-size: 16px; line-height: 23px; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-liee:hover .tfm-lecons-liee-titre { color: var(--tf-emeraude-fonce); }

/* ---------- Bande finale (émeraude) ---------- */
.tfm .tfm-lecons-final { background: var(--tf-emeraude); }
.tfm .tfm-lecons-final-grille { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.tfm .tfm-lecons-final-grille .wp-block-group { display: flex; flex-direction: column; gap: 18px; }
.tfm .tfm-lecons-final h2 + p { margin-top: 0; }
.tfm .tfm-lecons-final h2 { font-size: 60px; line-height: 62px; letter-spacing: -0.045em; color: #FFFFFF; }
.tfm .tfm-lecons-final p { margin: 0; font-size: 22px; line-height: 29px; font-weight: 800; letter-spacing: -0.02em; color: #FFFFFF; }
.tfm .tfm-lecons-final a { color: #FFFFFF; }
.tfm .tfm-lecons-final a.tfm-btn { background: #FFFFFF; color: var(--tf-emeraude-fonce); min-height: 64px; padding: 0 38px; font-size: 20px; font-weight: 900; }
.tfm .tfm-lecons-final a.tfm-btn:hover { background: var(--tf-marine); color: #FFFFFF; }

/* ---------- Hub /lecons/ ---------- */
.tfm .tfm-lecons-hero--hub { padding-bottom: 80px; }
.tfm .tfm-lecons-hub-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.tfm .tfm-lecons-filtre { display: flex; gap: 8px; flex-wrap: wrap; }
.tfm .tfm-lecons-filtre[hidden] { display: none; }
.tfm .tfm-lecons-filtre button { height: 44px; padding: 0 18px; border-radius: var(--tf-rayon-pilule); border: 2px solid var(--tf-lecons-vert-clair); background: #FFFFFF; color: var(--tf-marine); font-family: inherit; font-size: 16px; font-weight: 800; cursor: pointer; text-transform: none; letter-spacing: 0; line-height: 1; }
.tfm .tfm-lecons-filtre button[aria-pressed="true"] { border-color: var(--tf-emeraude-fonce); background: var(--tf-emeraude-fonce); color: #FFFFFF; }
.tfm .tfm-lecons-filtre button:focus-visible { outline: 3px solid var(--tf-marine); outline-offset: 2px; }
.tfm .tfm-lecons-familles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tfm .tfm-lecons-famille { background: #FFFFFF; border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.tfm .tfm-lecons-famille[hidden] { display: none; }
.tfm .tfm-lecons-famille-tete { display: flex; gap: 16px; align-items: center; }
.tfm .tfm-lecons-famille-tete .tfm-lecons-rond { width: 52px; height: 52px; }
.tfm .tfm-lecons-famille-tete p { margin: 2px 0 0; font-size: 16px; line-height: 23px; font-weight: 500; color: var(--tf-encre-secondaire); }
.tfm .tfm-lecons-famille-liste, .tfm .tfm-lecons-liste ul { margin: 0; padding: 0; list-style: none; }
.tfm .tfm-lecons-famille-liste li, .tfm .tfm-lecons-liste li { border-top: 1px solid var(--tf-bordure-claire); margin: 0; }
.tfm .tfm-lecons-famille-liste li[hidden] { display: none; }
.tfm .tfm-lecons-famille-liste a { min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-decoration: none; }
.tfm .tfm-lecons-famille > p { margin: 0; }
.tfm .tfm-lecons-carte-titre { font-size: 19px; line-height: 25px; font-weight: 800; color: var(--tf-marine); }
.tfm a:hover .tfm-lecons-carte-titre { color: var(--tf-emeraude-fonce); }
.tfm .tfm-lecons-carte-niv { flex: none; background: var(--tf-emeraude-pale); color: var(--tf-emeraude-fonce); border-radius: var(--tf-rayon-pilule); padding: 4px 12px; font-size: 14px; line-height: 18px; font-weight: 800; white-space: nowrap; }
.tfm .tfm-lecons-famille .tfm-lien-fleche { font-size: 16px; }
.tfm .tfm-lecons-filtre-vide { margin: 0; font-weight: 600; color: var(--tf-encre-secondaire); }

/* Liste des fiches d'une famille ([tf_lecons_liste]) */
.tfm .tfm-lecons-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tfm .tfm-lecons-liste-niveau { background: #FFFFFF; border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.tfm .tfm-lecons-liste a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 0; text-decoration: none; }
.tfm .tfm-lecons-carte-desc { grid-column: 1 / -1; font-size: 16px; line-height: 23px; color: var(--tf-encre-secondaire); }

/* ==========================================================================
   Mobile (planches Mobile et Mobile-hub-lecons, 390 px)
   ========================================================================== */
@media (max-width: 767px) {
  :root { --tf-lecons-marge-x: 22px; }
  .tfm .tfm-lecons-pile { gap: 20px; }
  .tfm .tfm-lecons-hero .tfm-wrap { gap: 20px; }
  .tfm .tfm-lecons-barre { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 0; }
  .tfm .tfm-lecons-barre .tfm-fil li { font-size: 14px; }
  .tfm .tfm-lecons-maj { font-size: 14px; white-space: normal; }
  .tfm .tfm-lecons-etiquettes { margin-bottom: 0; gap: 8px; }
  .tfm .tfm-lecons-pastille { font-size: 14px; padding: 5px 12px; }
  .tfm .tfm-lecons-hero h1 { line-height: 37px; }
  .tfm .tfm-lecons-hero-grille { grid-template-columns: 1fr; gap: 20px; }
  .tfm .tfm-lecons-hero-texte { gap: 20px; }
  .tfm p.tfm-lecons-enbref-texte { font-size: 18px; line-height: 28px; }
  .tfm .tfm-lecons-hero-bouton { display: none; }   /* planche mobile : pas de bouton dans le héros de la fiche */
  .tfm .tfm-lecons-resume { padding: 22px 20px; border-radius: 20px; gap: 14px; }
  .tfm .tfm-lecons-resume dl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .tfm .tfm-lecons-resume-icone { display: none; }
  .tfm .tfm-lecons-resume dt { font-size: 13px; line-height: 17px; }
  .tfm .tfm-lecons-resume dd { font-size: 17px; line-height: 22px; }
  .tfm .tfm-lecons-test { padding: 24px 20px; border-radius: 20px; }
  .tfm .tfm-lecons-test h2 { font-size: 24px; line-height: 28px; }

  .tfm .tfm-lecons-quatre { padding: 26px 12px; border-radius: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 10px; }
  .tfm .tfm-lecons-quatre .tfm-lecons-quatre-mot { font-size: 36px; line-height: 40px; }
  .tfm .tfm-lecons-quatre span { font-size: 16px; line-height: 21px; }
  .tfm .tfm-lecons-etapes { grid-template-columns: 1fr; gap: 16px; }
  .tfm .tfm-lecons-etape { padding: 22px; border-radius: 20px; gap: 10px; }
  .tfm .tfm-lecons-etape-num { width: 44px; height: 44px; font-size: 22px; }
  .tfm .tfm-lecons-citation { margin-top: 16px; font-size: 26px; line-height: 32px; }

  .tfm .tfm-lecons-cahier { border-radius: 20px; }
  .tfm .tfm-lecons-lecon { padding: 22px 16px 26px 38px; gap: 20px; }
  .tfm .tfm-lecons-source { font-size: 12px; line-height: 16px; }
  .tfm .tfm-lecons-lecon h3 { font-size: 24px; line-height: 29px; }
  .tfm .tfm-lecons-lecon-tete p { font-size: 17px; line-height: 27px; }
  .tfm .tfm-lecons-table { border-radius: 12px; overflow-x: auto; }   /* le tableau défile seul, jamais la page */
  .tfm .tfm-lecons-table table { min-width: 560px; }
  .tfm .tfm-lecons-table thead th { padding: 10px 14px; font-size: 12px; }
  .tfm .tfm-lecons-table tbody { font-size: 16px; line-height: 24px; }
  .tfm .tfm-lecons-table tbody th, .tfm .tfm-lecons-table tbody td { padding: 12px 14px; }
  .tfm .tfm-lecons-exemples, .tfm .tfm-lecons-encadres { grid-template-columns: 1fr; gap: 16px; }
  .tfm .tfm-lecons-lecon li { font-size: 16px; line-height: 25px; }
  .tfm .tfm-lecons-attention, .tfm .tfm-lecons-retenir { padding: 16px; }

  .tfm .tfm-lecons-erreurs-tete { display: none; }
  .tfm .tfm-lecons-erreur { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
  .tfm .tfm-lecons-faux { font-size: 17px; line-height: 25px; }
  .tfm .tfm-lecons-juste { font-size: 18px; line-height: 26px; }
  .tfm .tfm-lecons-erreur > span:last-child { font-size: 16px; line-height: 24px; }

  .tfm .tfm-lecons-exercice h2 { font-size: 32px; line-height: 36px; }
  .tfm .tfm-lecons-exercice .tfm-lecons-intro p { font-size: 17px; line-height: 27px; }
  .tfm .tfm-lecons-exo { padding: 22px 16px 26px 34px; gap: 18px; border-radius: 20px; }
  .tfm .tfm-lecons-exo-barre { width: 96px; }
  .tfm .tfm-lecons-exo-item { grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; row-gap: 12px; align-items: start; }
  .tfm .tfm-lecons-exo-choix, .tfm .tfm-lecons-exo-correction { grid-column: 1 / -1; }
  .tfm .tfm-lecons-exo-choix button { width: 66px; }
  .tfm p.tfm-lecons-exo-phrase { font-size: 17px; line-height: 27px; }
  .tfm .tfm-lecons-exo-score-valeur { font-size: 36px; line-height: 40px; }
  .tfm .tfm-lecons-exo-refaire { width: 100%; }

  .tfm .tfm-lecons-deux-col { grid-template-columns: 1fr; gap: 20px; }
  .tfm .tfm-lecons-parcours { grid-template-columns: 1fr; gap: 24px; }
  .tfm .tfm-lecons-sessions-niv { width: 40px; font-size: 24px; line-height: 28px; }
  .tfm .tfm-lecons-sessions-titre { font-size: 17px; line-height: 23px; }
  .tfm .tfm-lecons-liees { grid-template-columns: 1fr; gap: 18px; }
  .tfm .tfm-lecons-liees-section { padding-top: 56px; }
  .tfm .tfm-lecons-h2-moyen { font-size: 26px; line-height: 30px; }

  .tfm .tfm-lecons-final-grille { flex-direction: column; align-items: stretch; gap: 28px; }
  .tfm .tfm-lecons-final h2 { font-size: 36px; line-height: 38px; }
  .tfm .tfm-lecons-final p { font-size: 18px; line-height: 26px; }
  .tfm .tfm-lecons-final a.tfm-btn { min-height: 60px; font-size: 18px; }

  .tfm .tfm-lecons-hero--hub { padding-bottom: 56px; }
  .tfm .tfm-lecons-familles, .tfm .tfm-lecons-liste { grid-template-columns: 1fr; gap: 16px; }
  .tfm .tfm-lecons-famille, .tfm .tfm-lecons-liste-niveau { padding: 22px; border-radius: 20px; }
  .tfm .tfm-lecons-carte-titre { font-size: 17px; line-height: 23px; }
  .tfm .tfm-lecons-filtre button { padding: 0 14px; }
}

/* Indication sous les tableaux (planche mobile seulement) et choix de l'exercice sur une ligne */
.tfm .tfm-lecons-glisser { display: none; }
@media (max-width: 767px) {
  .tfm p.tfm-lecons-glisser { display: block; margin: -10px 0 0; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--tf-encre-secondaire); }
  .tfm .tfm-lecons-exo-choix { flex-wrap: nowrap; gap: 6px; }
  .tfm .tfm-lecons-exo-choix button { width: auto; flex: 1 1 0; min-width: 0; max-width: 66px; }
}
