/* Les guides (21 nov. 2026). Jonathan : « ça fait très plat… un peu moche… ils sont tous comme ça, l'un après
   l'autre, ça ne les différencie pas ». Direction : la couleur avec un sens, montrer plutôt que dire, la page la
   plus courte possible. Posée sur les quatorze guides par scripts/guides_chemin.py, après blocs.css.

   - Le visage : en tête, le picto du guide (teinté s'il appartient à une épreuve, option C : seulement dans la
     tuile du picto) et son étape du chemin de l'index (« Étape 3 sur 4 · Comment réussir chaque épreuve ? »).
   - La suite du chemin : en bas, le guide suivant en une tuile, comme celles de l'index (guides-index.css).
   - Montrer : les épreuves en pictos teintés là où elles se côtoient (barèmes, « en un coup d'œil »), les
     trois tâches en tuiles, les minutes en frise.
   - Plus court : l'échelle de texte de l'appli (titre 1,75 rem au téléphone, sections 1,25 rem, texte 1 rem) ;
     à l'ordinateur, une page de 1 000 px en grilles : le titre et « en un coup d'œil » côte à côte, la
     signature et le sommaire côte à côte, les sections deux par deux (les trois tâches par trois), la fin
     en deux colonnes. Rien n'est retiré : les replis de presentation.py restent ce qu'ils sont. */

/* ── Le picto : la tuile de l'index et des sujets (sujets.css), teinte d'épreuve de blocs.css ── */
.sj-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--fp-creux); color: var(--fp-encre); }
.sj-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ── Le visage : picto, « Guide · Étape n sur 4 », quatre points, la question de l'étape ── */
.pg-main .gd-eb { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; row-gap: 1px; align-items: center; margin: 0 0 0.55rem; line-height: 1.3; }
.gd-eb .sj-ic { grid-row: span 2; }
.gd-eb-l { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.gd-eb-q { font-size: 0.9375rem; font-weight: 700; color: var(--fp-titre); }
/* Les quatre étapes en points reliés, le point plein : ce guide (comme les numéros de l'index). */
.gd-pas { display: inline-flex; align-items: center; }
.gd-pas i { position: relative; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--fp-trait-fort); }
.gd-pas i + i { margin-left: 9px; }
.gd-pas i + i::before { content: ""; position: absolute; right: 100%; top: 50%; width: 9px; height: 1.5px; margin-top: -0.75px; background: var(--fp-trait); }
.gd-pas i.gd-ici { width: 9px; height: 9px; background: var(--fp-encre); box-shadow: none; }

/* ── L'échelle de texte de l'appli (jetons --fp-t-*) : plus court, et la même voix que la plateforme ── */
.pg-main:has(> .gd-haut) { font-size: 1rem; line-height: 1.6; }
.pg-main:has(> .gd-haut) h1 { font-size: var(--fp-t-1); line-height: 1.15; margin: 0.2rem 0 0.65rem; }
.pg-main:has(> .gd-haut) .lead { font-size: 1.0625rem; line-height: 1.55; margin-bottom: 1rem; }
.pg-main:has(> .gd-haut) .bl-chapo .lead { margin-bottom: 0; }
.pg-main .gd-blocs .bl-bloc > h2 { font-size: var(--fp-t-2); line-height: 1.3; margin: 0 0 0.6rem; }
.pg-main .gd-blocs h3 { font-size: 1.0625rem; line-height: 1.35; margin: 1.2rem 0 0.4rem; }
.pg-main .gd-blocs .reponse-courte { font-size: 1rem; line-height: 1.55; margin-bottom: 0.8rem; }
.pg-main .gd-blocs .bl-bloc > p:last-child, .pg-main .gd-blocs .bl-bloc > ul:last-child { margin-bottom: 0.2rem; }
.pg-main .gd-blocs .bl-repli-t h3 { font-size: 1rem; margin: 0; }
.pg-main .gd-blocs .bl-bloc { padding: 16px 18px 12px; margin-top: 12px; }

/* ── La suite du chemin : une tuile de l'index, une flèche ── */
.gd-suite { margin: 1.8rem 0 0; }
.pg-main a.gd-suite-a { display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; column-gap: 12px; align-items: center; padding: 12px 14px;
  background: var(--fp-carte); border: 1px solid var(--fp-trait); border-radius: var(--fp-r-carte); color: var(--fp-encre); text-decoration: none; }
.pg-main a.gd-suite-a:hover { border-color: var(--fp-trait-fort); box-shadow: inset 0 0 0 1px var(--fp-trait-fort); }
.pg-main a.gd-suite-a:focus-visible { outline: 3px solid var(--fp-focus); outline-offset: 2px; }
.gd-suite-x { display: grid; gap: 1px; min-width: 0; }
.gd-suite-k { font-size: var(--fp-t-5); font-weight: 600; color: var(--fp-encre-2); line-height: 1.35; }
.gd-suite-t { font-size: 1.0625rem; font-weight: 700; color: var(--fp-titre); line-height: 1.3; }
.gd-suite-d { font-size: var(--fp-t-4); color: var(--fp-encre-2); line-height: 1.45; }
.gd-suite-fl { width: 20px; height: 20px; fill: none; stroke: var(--fp-encre-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-main a.gd-suite-a:hover .gd-suite-fl { stroke: var(--fp-encre); }

/* ── Montrer : les pictos d'épreuve, teintés, là où les quatre épreuves se côtoient (option C) ── */
.sj-ic.gd-mini { width: 22px; height: 22px; border-radius: 6px; }
.sj-ic.gd-mini svg { width: 14px; height: 14px; stroke-width: 2.1; }
/* Dans un tableau : devant le nom de l'épreuve (première cellule), au-dessus du nom (en-tête d'un barème). */
td.gd-ep > .gd-mini { display: inline-grid; vertical-align: -6px; margin-right: 8px; }
th.gd-ep > .gd-mini { margin: 0 0 5px; }
/* Dans « en un coup d'œil » : en haut à droite de la tuile, sans ligne de plus. */
.reponse-grille > div { position: relative; }
.reponse-grille > div > .gd-mini, .reponse-grille > div > .gd-rang { position: absolute; top: 9px; right: 9px; }
.gd-rang { display: inline-flex; gap: 3px; }

/* ── Montrer : un tableau de tâches ou d'épreuves en tuiles, une ligne par tuile (l'en-tête reste lu) ── */
.pg-main table.data.gd-tuiles { display: block; overflow: visible; table-layout: auto; margin: 0.8rem 0 0.7rem; font-size: var(--fp-t-4); }
.pg-main table.gd-tuiles thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pg-main table.gd-tuiles tbody { display: grid; gap: 8px; }
.pg-main table.gd-tuiles tr { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px 12px; background: var(--fp-creux); border-radius: 12px; }
.pg-main table.gd-tuiles td { display: block; width: auto; padding: 0; border: 0; white-space: normal; line-height: 1.4; color: var(--fp-encre); background: none; order: 3; }
.pg-main table.gd-tuiles td:first-child { order: 1; margin-bottom: 3px; font-size: 0.9375rem; font-weight: 700; line-height: 1.3; color: var(--fp-titre); }
.pg-main table.gd-tuiles td.gd-fort { order: 2; font-size: 1.1875rem; font-weight: 700; line-height: 1.3; color: var(--fp-titre); font-variant-numeric: tabular-nums; }
.pg-main table.gd-tuiles td[data-l]::before { content: attr(data-l) " "; font-weight: 600; color: var(--fp-encre-2); }
.pg-main table.gd-tuiles td.gd-ep { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 9px; align-items: center; }
.pg-main table.gd-tuiles td.gd-ep > .fr { grid-column: 2; }
.pg-main table.gd-tuiles td.gd-ep > .gd-mini { grid-row: span 2; width: 30px; height: 30px; margin: 0; border-radius: 8px; }
.pg-main table.gd-tuiles td.gd-ep > .gd-mini svg { width: 18px; height: 18px; stroke-width: 1.9; }
.pg-main table.gd-tuiles .fr { display: block; font-weight: 400; font-size: var(--fp-t-4); color: var(--fp-encre-2); }
.gd-tuiles-2 tbody, .gd-tuiles-4 tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .pg-main .gd-tuiles-3 tbody { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 880px) { .pg-main .gd-tuiles-4 tbody { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Au téléphone, une tuile par ligne : le nom à gauche, le chiffre fort à droite, le reste dessous. */
@media (max-width: 559px) {
  .pg-main table.gd-tuiles tbody { grid-template-columns: minmax(0, 1fr); }
  .pg-main table.gd-tuiles tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 10px 12px 11px; }
  .pg-main table.gd-tuiles td { grid-column: 1 / -1; }
  .pg-main table.gd-tuiles td:first-child { grid-column: 1; grid-row: 1; margin: 0 0 2px; }
  .pg-main table.gd-tuiles td.gd-fort { grid-column: 2; grid-row: 1; max-width: 10.5rem; font-size: 1rem; text-align: right; }
}

/* ── Montrer : les trois tâches de l'écrit en trois tuiles (la phrase de « en un coup d'œil », découpée) ── */
.pg-main p.gd-t3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0.9rem 0 0; font-size: var(--fp-t-4); line-height: 1.4; }
.gd-t3 > span { padding: 10px 12px 11px; background: var(--fp-creux); border-radius: 12px; color: var(--fp-encre-2); }
.gd-t3 > span > b:first-child { display: block; margin-bottom: 2px; font-weight: 700; color: var(--fp-titre); }
.gd-t3 > span > b:last-child { display: block; margin-top: 3px; font-size: 1rem; font-weight: 700; color: var(--fp-titre); font-variant-numeric: tabular-nums; }
.pg-main .gd-t3 > .gd-src { grid-column: 1 / -1; padding: 0; background: none; border-radius: 0; font-size: var(--fp-t-5); }
@media (max-width: 400px) { .gd-t3 > span { padding: 9px 9px 10px; } .gd-t3 > span > b:last-child { font-size: 0.9375rem; } }

/* ── Payer en quatre étapes : les numéros reliés par une ligne, comme le chemin de l'index (le style de la page
   les rangeait en cartes) ── */
.pg-main .pa-etapes li { position: relative; }
@media (max-width: 640px), (min-width: 1000px) {
  .pg-main .gd-haut .pa-etapes { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 0.7rem; }
  .pg-main .gd-haut .pa-etapes li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 0 0 12px; background: none; border: 0; border-radius: 0; }
  .pg-main .gd-haut .pa-etapes li:last-child { padding-bottom: 2px; }
  .pg-main .gd-haut .pa-etapes li::before { grid-row: 1 / span 2; width: 28px; height: 28px; margin: 0; font-size: 0.875rem; }
  .pg-main .gd-haut .pa-etapes li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--fp-trait); }
  .pg-main .gd-haut .pa-etapes b { padding-top: 3px; }
}

/* ── L'outil NCLC déplié (presentation.py l'avait plié par mégarde) : les champs deux par deux, même au téléphone ── */
@media (min-width: 360px) {
  .gd-haut .nclc-champs, .gd-blocs .nclc-champs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.8rem; }
}
.gd-haut .nclc-champ label, .gd-blocs .nclc-champ label { line-height: 1.3; }

/* ── « En un coup d'œil » : un peu d'air entre les chiffres et la phrase ── */
.pg-main .reponse-grille + p { margin-top: 0.9rem; }

/* ── TCF ou TEF : les cinq questions deux par deux à l'ordinateur, la réponse à côté de la dernière ── */
@media (min-width: 1000px) {
  .gd-blocs .choix form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
  .gd-blocs .choix .choix-resultat { margin-top: 1.6rem; }
  .gd-blocs .choix .choix-reset { grid-column: 1 / -1; justify-self: start; }
}

/* ── La fin : « Demander à une IA » et « Pour aller plus loin », plus serrés ── */

/* ── Montrer : les quatre résultats du TCF Canada en quatre tuiles ── */
.pg-main ul.gd-quatre { list-style: none; margin: 0.7rem 0 0.6rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pg-main ul.gd-quatre li { margin: 0; padding: 11px 13px 12px; background: var(--fp-creux); border-radius: 12px; font-size: var(--fp-t-4); line-height: 1.4; }
.pg-main ul.gd-quatre li > .gd-mini { display: grid; width: 30px; height: 30px; margin: 0 0 7px; border-radius: 8px; }
.pg-main ul.gd-quatre li > .gd-mini svg { width: 18px; height: 18px; stroke-width: 1.9; }
.pg-main ul.gd-quatre strong { display: block; font-size: 0.9375rem; font-weight: 700; }
@media (min-width: 720px) { .pg-main ul.gd-quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── Montrer : les 60 minutes de l'écrit en frise, dans l'ordre (le découpage conseillé : 10, 20, 25, et 5 pour
   relire), à l'encre comme toutes les données du site ── */
.pg-main ol.gd-frise { list-style: none; display: flex; gap: 4px; margin: 0.1rem 0 0.9rem; padding: 0; }
.pg-main ol.gd-frise li { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
.gd-frise li:nth-child(1) { flex: 10 1 0; }
.gd-frise li:nth-child(2) { flex: 20 1 0; }
.gd-frise li:nth-child(3) { flex: 25 1 0; }
.gd-frise li:nth-child(4) { flex: 5 1 0; align-items: flex-end; }
.gd-frise li::after { content: ""; order: 2; align-self: stretch; height: 10px; border-radius: 3px; background: var(--fp-encre); }
.gd-frise li:nth-child(4)::after { background: var(--fp-trait-fort); }
.gd-frise-m { order: 1; font-size: 0.9375rem; font-weight: 700; line-height: 1.2; color: var(--fp-titre); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gd-frise-t { order: 3; font-size: var(--fp-t-5); line-height: 1.2; color: var(--fp-encre-2); white-space: nowrap; }

/* ── La fin : « Demander à une IA » et « Pour aller plus loin », plus serrés ── */
.gd-fin .ask-ai { margin-top: 1rem; }
.gd-fin .related { margin-top: 1.6rem; padding-top: 1.1rem; }
.gd-fin .related li { margin-bottom: 0.3rem; line-height: 1.45; }

/* ── Le téléphone : moins d'air entre les blocs, rien de moins à lire ── */
@media (max-width: 719px) {
  .pg-main:has(> .gd-haut) { padding-top: 1.4rem; }
  .pg-main:has(> .gd-haut) .crumbs { margin-bottom: 0.9rem; }
  .sj-ic { width: 32px; height: 32px; }
  .pg-main .gd-eb { grid-template-columns: 32px minmax(0, 1fr); }
  .gd-haut .bl-haut-action { margin: 14px 0 4px; }
  .gd-haut .reponse { margin-top: 14px; margin-bottom: 1.4rem; padding: 0.95rem 1rem 0.9rem; }
  .gd-qui .byline { margin-bottom: 1rem; padding: 0.75rem 0; }
  .gd-qui .toc { margin-bottom: 0.4rem; padding: 0.85rem 1rem; }
  .pg-main .gd-blocs .bl-bloc { padding: 14px 15px 10px; margin-top: 10px; }
  .gd-blocs .cta-block { margin-top: 1.6rem; padding: 1.3rem 1.15rem; }
  .gd-blocs .bl-q { margin-top: 8px; }
  .gd-blocs .bl-q > summary { padding: 12px 14px; gap: 10px; }
  .gd-blocs .bl-q .bl-rond { width: 30px; height: 30px; }
  .gd-blocs .bl-q .bl-repli-d { padding: 0 14px 14px; }
  .gd-suite { margin-top: 1.4rem; }
  .pg-main a.gd-suite-a { grid-template-columns: 32px minmax(0, 1fr) 18px; padding: 11px 12px; column-gap: 11px; }
  .gd-fin .ask-ai { padding: 0.85rem 0.95rem; }
  .gd-fin .related { margin-top: 1.3rem; padding-top: 0.9rem; }
  .gd-fin .related a { font-size: 0.9375rem; }
}

/* ── L'ordinateur : une page de 1 000 px, en grilles ── */
@media (min-width: 720px) {
  .pg-main:has(> .gd-haut) h1 { font-size: 2.125rem; }
}
@media (min-width: 1000px) {
  .pg-main:has(> .gd-haut) { max-width: 1000px; padding-top: 2rem; }
  .pg-main:has(> .gd-haut) .crumbs { margin-bottom: 1.1rem; }
  /* Le haut : le titre, le chapô et l'action à gauche ; « en un coup d'œil » à droite. */
  .gd-haut:has(> .reponse) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 36px; align-items: start; margin-bottom: 1.6rem; }
  .gd-haut:has(> .reponse) h1 { font-size: 2rem; }
  .gd-haut > .reponse { margin: 4px 0 0; }
  .gd-haut .reponse-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-haut .bl-haut-action { margin: 16px 0 0; }
  /* L'outil NCLC (l'action des guides NCLC) sur toute la largeur, sous le titre et le barème : ses quatre champs
     sur une ligne. */
  .gd-haut > .nclc-outil { grid-column: 1 / -1; margin: 18px 0 0; }
  .gd-haut .nclc-champs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* Le barème NCLC 7 et 9 dans sa colonne : les en-têtes reviennent à la ligne. */
  .gd-haut table.data.bareme { font-size: 0.875rem; }
  .gd-haut table.data.bareme th, .gd-haut table.data.bareme td { padding: 0.5rem 0.4rem; }
  .gd-haut table.data.bareme th { white-space: normal; line-height: 1.25; }
  /* La signature et le sommaire sur une ligne. */
  .gd-qui { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 36px; align-items: center; margin: 0 0 0.6rem; }
  .gd-qui > .byline, .gd-qui > .toc { margin: 0; }
  /* Les sections : deux par deux, les trois tâches par trois ; la FAQ et les tableaux larges sur toute la ligne. */
  .gd-blocs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .gd-blocs > * { grid-column: 1 / -1; }
  .pg-main .gd-blocs > .bl-bloc, .gd-blocs > .nclc-outil, .gd-blocs > .choix, .gd-blocs > .note, .gd-blocs > .cta-block { margin: 0; }
  .gd-blocs > .bl-bloc { grid-column: span 3; }
  .gd-blocs > .bl-bloc.gd-t { grid-column: span 2; }
  .gd-blocs > .bl-bloc.gd-l, .gd-blocs > .bl-bloc:has(> details.bl-q) { grid-column: 1 / -1; }
  /* L'appel : sur une ligne, le bouton à droite. */
  .gd-blocs > .cta-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: center; padding: 1.4rem 1.6rem; }
  .gd-blocs > .cta-block > :not(.btn) { grid-column: 1; }
  .gd-blocs > .cta-block > p { margin-bottom: 0; }
  .gd-blocs > .cta-block > .btn { grid-column: 2; grid-row: 1 / span 2; }
  /* La fin : la suite du chemin et « Demander à une IA » à gauche, « Pour aller plus loin » à droite. */
  .gd-fin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "suite liens" "ia liens"; column-gap: 36px; row-gap: 14px; align-items: start; margin-top: 2rem; }
  .gd-fin > .gd-suite { grid-area: suite; margin: 0; }
  .gd-fin > .ask-ai { grid-area: ia; margin: 0; }
  .gd-fin > .related { grid-area: liens; margin: 0; padding-top: 0; border-top: 0; }
}
