/* French Path Canada · le calculateur de score TCF Canada, NCLC et points CRS
   (score-tcf-canada-nclc, tcf-canada-points-calculator), 21 novembre 2026.

   Jonathan : « plus vivant, mieux architecturé », et « que la page soit la
   moins longue possible ». L'outil MONTRE au lieu de dire :
     - chaque compétence a sa tuile de picto (teinte de son épreuve, option C),
       son score et son niveau NCLC en pastille ; le curseur se remplit et
       porte les seuils du NCLC 7 et du NCLC 9 (le rond s'allume en sauge
       quand il est franchi) ;
     - le point faible prend la teinte pleine de son épreuve, comme le
       prochain pas dans l'appli, et se nomme sous sa pastille ;
     - les points CRS du français en trois barres : tes scores, le NCLC 7
       dans chaque compétence, le NCLC 9 ; les points de base à l'encre, le
       bonus francophone en encre claire. Mêmes règles, mêmes chiffres
       qu'avant (le script de la page n'a pas changé ses calculs) ;
     - ton profil (anglais, place du français, conjoint) en une ligne qui
       s'ouvre, au lieu de trois listes toujours dépliées.
   À l'ordinateur, l'outil sort de la colonne de texte : les curseurs à
   gauche, le résultat à droite, à hauteur d'yeux pendant qu'on bouge.
   Les couleurs : jetons --fp-* de blocs.css (jour et nuit) ; la teinte d'une
   épreuve seulement dans la tuile de son picto ; la sauge pour l'acquis. */

/* ── Le bloc : son titre de section à 20 px, comme l'appli. ── */
.pg-main .cx-sec > h2 { font-size: 20px; line-height: 1.3; margin: 0 0 10px; }
.calc.cx {
  background: var(--fp-carte); border: 1px solid var(--fp-trait); border-radius: var(--fp-r-carte);
  box-shadow: none; padding: 14px; margin: 0;
}
.calc.cx p { margin: 0; }
@media (min-width: 1000px) {
  /* L'outil sort de la colonne de 720 px (la place à côté du rail). */
  .pg-main > .cx-sec { --cx-l: min(960px, calc(100vw - 48px)); width: var(--cx-l); margin-left: calc((100% - var(--cx-l)) / 2); }
  .calc.cx { padding: 20px 22px; }
}
@media (min-width: 1200px) {
  body:has(.barre-ep) .pg-main > .cx-sec { --cx-l: min(960px, calc(100vw - 232px - 48px)); }
}

/* ── Les deux onglets, en commande segmentée (l'action forte reste la suite). ── */
.calc.cx .calc-tabs {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px;
  padding: 4px; margin: 0 0 12px; background: var(--fp-creux); border-radius: 14px;
}
.calc.cx .calc-tab {
  min-height: 40px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent;
  color: var(--fp-encre-2); font: 700 14px/1.2 var(--fp-police); cursor: pointer;
}
.calc.cx .calc-tab:hover { color: var(--fp-encre); }
.calc.cx .calc-tab.active { background: var(--fp-carte); color: var(--fp-encre); box-shadow: 0 0 0 1.5px var(--fp-trait-fort); }
@media (min-width: 760px) { .calc.cx .calc-tabs { max-width: 460px; } }
.calc.cx .calc-tab:focus-visible { outline: 3px solid var(--fp-focus); outline-offset: 1px; }

/* ── « Je ne sais pas encore » : cinq tuiles, un picto de niveau chacune. ── */
.calc.cx .selfcheck { margin: 0; }
.calc.cx .sc-lead { font-size: 14px; line-height: 1.45; color: var(--fp-encre-2); margin: 0 0 8px; }
.calc.cx .sc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.calc.cx .sc-opt {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; align-items: center;
  text-align: left; padding: 8px 12px 8px 8px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--fp-carte); box-shadow: inset 0 0 0 1px var(--fp-trait); font-family: var(--fp-police);
}
.calc.cx .sc-opt:hover { box-shadow: inset 0 0 0 1px var(--fp-trait-fort); }
.calc.cx .sc-opt.picked { background: var(--fp-repere-voile); box-shadow: inset 0 0 0 2px var(--fp-encre); }
.calc.cx .sc-opt:focus-visible { outline: 3px solid var(--fp-focus); outline-offset: 2px; }
.calc.cx .sc-opt .cx-niv { grid-row: span 2; align-self: start; }
.calc.cx .sc-t { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--fp-titre); }
.calc.cx .sc-d { font-size: 13px; line-height: 1.4; color: var(--fp-encre-2); }
/* Le picto de niveau : cinq barres, autant de pleines que de marches. */
.calc.cx .cx-niv {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--fp-creux); color: var(--fp-encre);
}
.calc.cx .cx-niv svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.calc.cx .cx-niv svg path:not(.on) { opacity: 0.25; }
.calc.cx .sc-opt.picked .cx-niv { background: var(--fp-encre); color: var(--fp-papier); }
@media (min-width: 760px) {
  .calc.cx .sc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  /* Une rangée de cinq tuiles : le picto au-dessus, comme les tuiles de l'appli. */
  .calc.cx .sc-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .calc.cx .sc-opt { grid-template-columns: minmax(0, 1fr); align-items: start; align-content: start; row-gap: 2px; padding: 10px 12px 12px; }
  .calc.cx .sc-opt .cx-niv { grid-row: auto; margin-bottom: 6px; }
}
.calc.cx .finetune-note { font-size: 13px; line-height: 1.45; font-style: normal; color: var(--fp-encre-2); margin: 10px 0 0; }
.calc.cx .selfcheck[hidden], .calc.cx .fields[hidden], .calc.cx .finetune-note[hidden],
.calc.cx .result[hidden], .calc.cx .sc-note[hidden] { display: none; }

/* ── Le corps : les curseurs, puis le résultat ; côte à côte à l'ordinateur. ── */
.calc.cx .cx-corps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.calc.cx .cx-corps:not(:has(> :not([hidden]))) { display: none; }
@media (min-width: 1000px) {
  .calc.cx .cx-corps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; align-items: start; margin-top: 16px; }
  .calc.cx .cx-entrees { grid-column: 1; }
  .calc.cx .result { grid-column: 2; grid-row: 1; }
}

/* ── Une compétence : la tuile, le nom, le score et sa pastille, puis le curseur. ── */
.calc.cx .cx-comp { margin: 0 0 6px; }
.calc.cx .cx-comp .top { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.calc.cx .cx-ic {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--fp-creux); color: var(--fp-encre);
  transition: background var(--fp-vite) var(--fp-courbe), color var(--fp-vite) var(--fp-courbe);
}
.calc.cx .cx-ic svg, .pg-main .cx-coin svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* Option C : la teinte de l'épreuve, voile en fond et trait pour le dessin. */
.pg-main .cx-ic.ep-ecoute, .pg-main .cx-coin.ep-ecoute { background: var(--fp-ep-ecoute-voile); color: var(--fp-ep-ecoute); }
.pg-main .cx-ic.ep-lecture, .pg-main .cx-coin.ep-lecture { background: var(--fp-ep-lecture-voile); color: var(--fp-ep-lecture); }
.pg-main .cx-ic.ep-ecrit, .pg-main .cx-coin.ep-ecrit { background: var(--fp-ep-ecrit-voile); color: var(--fp-ep-ecrit); }
.pg-main .cx-ic.ep-oral, .pg-main .cx-coin.ep-oral { background: var(--fp-ep-oral-voile); color: var(--fp-ep-oral); }
/* Le point faible, c'est le prochain pas : sa tuile prend la teinte en plein (comme .fp-repere.ici dans l'appli). */
.pg-main .cx-ic.cx-plein.ep-ecoute { background: var(--fp-ep-ecoute); color: var(--fp-carte); }
.pg-main .cx-ic.cx-plein.ep-lecture { background: var(--fp-ep-lecture); color: var(--fp-carte); }
.pg-main .cx-ic.cx-plein.ep-ecrit { background: var(--fp-ep-ecrit); color: var(--fp-carte); }
.pg-main .cx-ic.cx-plein.ep-oral { background: var(--fp-ep-oral); color: var(--fp-carte); }
.calc.cx .cx-nom { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.calc.cx .cx-nom label { font-size: 15px; font-weight: 700; color: var(--fp-titre); }
.calc.cx .cx-nom-2 { display: block; font-size: 12.5px; line-height: 1.3; color: var(--fp-encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Le score (sur 699 ou sur 20) et la pastille du niveau. */
.calc.cx .field .out {
  flex: none; display: inline-grid; grid-template-columns: auto auto; justify-content: end; align-items: baseline; gap: 2px 7px;
  padding: 0; border: 0; background: none; font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--fp-titre); white-space: nowrap;
}
/* Le point faible, dit sous sa pastille (dans la même ligne réservée : rien ne bouge pendant qu'on glisse). */
.calc.cx .field .out .cx-faible-t { grid-column: 1 / -1; justify-self: end; font-size: 11.5px; line-height: 1.2; font-weight: 700; color: var(--fp-encre); }
.calc.cx .field .out small { font-size: 12px; font-weight: 600; color: var(--fp-encre-2); margin-left: 1px; }
/* Au téléphone, « Compréhension orale » tient sur une ligne : le « /699 » s'efface (il reste dit au lecteur d'écran). */
@media (max-width: 420px) { .calc.cx:lang(fr) .field .out .cx-699 { display: none; } }
.calc.cx .field .out b {
  display: inline-block; min-width: 4.4em; padding: 3px 8px; border-radius: 999px; text-align: center;
  font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--fp-encre); background: var(--fp-creux);
  transition: background var(--fp-vite) var(--fp-courbe), color var(--fp-vite) var(--fp-courbe);
}
/* Le NCLC 7 atteint : la sauge, l'acquis. */
.calc.cx .cx-comp.cx-acquis .out b { color: var(--fp-juste); background: var(--fp-juste-voile); }
/* L'écart au NCLC visé, dans l'unité de l'épreuve (22 nov. 2026) : en français sous le nom (la place
   du sous-titre), en anglais sous la pastille (le nom français tient la place sous le nom). « Atteint »
   en sauge ; sur le point faible, à l'encre et en gras. Dans la ligne réservée : rien ne bouge. */
.calc.cx .cx-ecart { display: block; font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--fp-encre-2); }
.calc.cx .field .out .cx-ecart { grid-column: 1 / -1; justify-self: end; font-size: 11.5px; line-height: 1.2; }
.calc.cx .cx-comp.cx-faible .cx-ecart { font-weight: 700; color: var(--fp-encre); }
.calc.cx .cx-ecart.cx-ok { color: var(--fp-juste); }
/* Aux téléphones étroits (380 px et moins), en français, le nom et son écart tiennent chacun sur une
   ligne : le « /20 » s'efface comme le « /699 » (l'écart dit « sur 20 », le lecteur d'écran aussi). */
@media (max-width: 380px) {
  .calc.cx:lang(fr) .field .out small { display: none; }
  .calc.cx:lang(fr) .cx-nom label { font-size: 14.5px; }
  .calc.cx:lang(fr) .cx-ecart { font-size: 12px; }
}
@media (max-width: 370px) {
  .calc.cx:lang(fr) .cx-nom label { font-size: 14px; }
  .calc.cx:lang(fr) .cx-ecart { font-size: 11.5px; letter-spacing: -0.005em; }
}

/* Le curseur : la piste dessinée derrière (remplie jusqu'au pouce), les deux seuils
   en ronds numérotés posés dessus, le pouce par-dessus tout. */
.calc.cx .cx-piste { --cx-pouce: 26px; --p: 0; position: relative; height: 32px; margin: 2px 0 0; }
.calc.cx .cx-piste::before {
  content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 8px; border-radius: 4px;
  background: linear-gradient(to right, var(--fp-encre) 0 calc(var(--cx-pouce) / 2 + (100% - var(--cx-pouce)) * var(--p)), var(--fp-creux) 0);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fp-trait) 70%, transparent);
}
.calc.cx .cx-cran {
  position: absolute; z-index: 1; top: 16px; left: calc(var(--cx-pouce) / 2 + (100% - var(--cx-pouce)) * var(--x));
  width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fp-carte); box-shadow: inset 0 0 0 1.5px var(--fp-trait-fort);
  font: 700 11px/1 var(--fp-police); color: var(--fp-encre-2); pointer-events: none;
}
.calc.cx .cx-cran.cx-ok { color: var(--fp-juste); box-shadow: inset 0 0 0 1.5px var(--fp-juste); }
.calc.cx input[type=range] {
  position: relative; z-index: 2; display: block; width: 100%; height: 32px; margin: 0; padding: 0;
  background: transparent; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.calc.cx input[type=range]::-webkit-slider-runnable-track { height: 32px; background: transparent; border: 0; box-shadow: none; }
.calc.cx input[type=range]::-moz-range-track { height: 32px; background: transparent; border: 0; box-shadow: none; }
.calc.cx input[type=range]::-moz-range-progress { background: transparent; }
.calc.cx input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: 3px; border-radius: 50%;
  background: var(--fp-encre); border: 3px solid var(--fp-carte); box-shadow: 0 1px 5px rgba(20, 30, 45, 0.28);
}
.calc.cx input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--fp-encre); border: 3px solid var(--fp-carte); box-shadow: 0 1px 5px rgba(20, 30, 45, 0.28);
}
.calc.cx input[type=range]:active::-webkit-slider-thumb { background: var(--maple-light); }
.calc.cx input[type=range]:focus-visible { outline: none; }
.calc.cx input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--fp-focus); outline-offset: 2px; }
.calc.cx input[type=range]:focus-visible::-moz-range-thumb { outline: 3px solid var(--fp-focus); outline-offset: 2px; }
@media (pointer: coarse) {
  .calc.cx .cx-piste { --cx-pouce: 30px; height: 36px; }
  .calc.cx .cx-piste::before { top: 14px; }
  .calc.cx .cx-cran { top: 18px; }
  .calc.cx input[type=range] { height: 36px; }
  .calc.cx input[type=range]::-webkit-slider-runnable-track { height: 36px; }
  .calc.cx input[type=range]::-webkit-slider-thumb { width: 30px; height: 30px; margin-top: 3px; }
  .calc.cx input[type=range]::-moz-range-thumb { width: 24px; height: 24px; }
}

/* ── Ton profil : une ligne qui dit ce que le calcul suppose, et s'ouvre. ── */
.calc.cx .cx-profil { margin: 4px 0 0; border-top: 1px solid var(--fp-trait); }
.calc.cx .cx-profil-t {
  width: 100%; display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 10px 0 2px;
  border: 0; background: none; text-align: left; cursor: pointer; font-family: var(--fp-police); color: var(--fp-encre);
}
.calc.cx .cx-profil-t:focus-visible { outline: 3px solid var(--fp-focus); outline-offset: 2px; border-radius: 10px; }
.calc.cx .cx-profil-q { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.4; color: var(--fp-encre-2); }
.calc.cx .cx-profil-q b { color: var(--fp-titre); font-weight: 700; }
.calc.cx .cx-profil-m { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; white-space: nowrap; font-size: 13.5px; font-weight: 700; color: var(--fp-encre); text-decoration: underline; text-decoration-color: var(--fp-trait-fort); text-underline-offset: 3px; }
.calc.cx .cx-profil-m::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--fp-vite) var(--fp-courbe); }
.calc.cx .cx-profil-t[aria-expanded="true"] .cx-profil-m::after { transform: translateY(1px) rotate(225deg); }
.calc.cx .cx-profil-d { display: grid; gap: 10px; padding: 8px 0 4px; }
.calc.cx .cx-profil-d[hidden] { display: none; }
.calc.cx .cx-profil-d .field { margin: 0; }
.calc.cx .cx-profil-d label { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--fp-titre); }
.calc.cx select {
  width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 10px; border: 0; border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px var(--fp-trait-fort); background: var(--fp-carte); color: var(--fp-encre);
  font: 15px/1.3 var(--fp-police);
}
.calc.cx select:focus-visible { outline: 3px solid var(--fp-focus); outline-offset: 1px; }
.calc.cx .cx-profil-d .sub { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--fp-encre-2); }

/* ── Le résultat : le verdict, les trois barres, l'objectif, la suite. ── */
.calc.cx .result { margin: 0; padding: 0; border: 0; }
@media (max-width: 999px) { .calc.cx .result { padding-top: 12px; border-top: 1px solid var(--fp-trait); } }
.calc.cx .verdict {
  display: flex; align-items: flex-start; gap: 10px; margin: 0;
  font: 700 16.5px/1.4 var(--fp-police); color: var(--fp-titre); text-wrap: pretty;
}
.calc.cx .dot { width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; flex-shrink: 0; background: var(--fp-encre-2); }
.calc.cx .dot.ok { background: var(--fp-juste-plein); box-shadow: none; }
.calc.cx .dot.no { background: transparent; box-shadow: inset 0 0 0 2px var(--fp-encre-2); }
.calc.cx .cx-points { margin: 12px 0 0; }
.calc.cx .cx-points-t { margin: 0 0 6px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--fp-encre-2); }
.calc.cx .cx-barres { display: grid; gap: 8px; }
.calc.cx .cx-barre {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 4.2em; grid-template-areas: "l v g" "p p p";
  align-items: baseline; column-gap: 8px; row-gap: 5px;
}
.calc.cx .cx-barre-l { grid-area: l; }
.calc.cx .cx-barre-p { grid-area: p; }
.calc.cx .cx-barre-v { grid-area: v; }
.calc.cx .cx-barre-g { grid-area: g; text-align: left; }
@media (min-width: 760px) {
  .calc.cx .cx-barres { grid-template-columns: auto minmax(0, 1fr) auto 4.2em; align-items: center; column-gap: 10px; row-gap: 8px; }
  .calc.cx .cx-barre { display: contents; }
  .calc.cx .cx-barre > * { grid-area: auto; }
}
.calc.cx .cx-barre-l { font-size: 13px; line-height: 1.2; font-weight: 600; color: var(--fp-encre-2); }
.calc.cx .cx-barre-p { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--fp-creux); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fp-trait) 60%, transparent); }
.calc.cx .cx-barre-p i { display: block; height: 100%; width: 0; transition: width 260ms var(--fp-courbe); }
.calc.cx .cx-barre-p .cx-base { background: var(--fp-encre); }
.calc.cx .cx-barre-p .cx-bonus { background: color-mix(in srgb, var(--fp-encre) 42%, var(--fp-creux)); }
.calc.cx .cx-barre-v { font-size: 16px; font-weight: 700; line-height: 1; text-align: right; color: var(--fp-titre); font-variant-numeric: tabular-nums; }
.calc.cx .cx-barre-g { font-size: 12.5px; font-weight: 700; line-height: 1.2; color: var(--fp-encre-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc.cx .cx-barre-g.cx-ok { color: var(--fp-juste); }
/* Tes scores : la barre qui bouge, et son total en grand. */
.calc.cx .cx-toi .cx-barre-l { color: var(--fp-titre); font-weight: 700; }
.calc.cx .cx-toi .cx-barre-p { height: 16px; border-radius: 8px; }
.calc.cx .cx-toi .cx-barre-v { font-size: 26px; letter-spacing: -0.015em; }
.calc.cx .cx-legende { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 8px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--fp-encre-2); }
.calc.cx .cx-legende > span { white-space: nowrap; }
.calc.cx .cx-legende > span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; background: var(--fp-encre); }
.calc.cx .cx-legende > .cx-leg-bonus::before { background: color-mix(in srgb, var(--fp-encre) 42%, var(--fp-creux)); }
.calc.cx .cx-legende b { color: var(--fp-encre); font-weight: 700; }
.calc.cx .whatif { margin: 10px 0 0; padding: 0; border: 0; border-radius: 0; background: none; font-size: 14px; line-height: 1.45; color: var(--fp-encre); }
.calc.cx .whatif.hide { display: none; }
.calc.cx .whatif b { color: var(--fp-titre); }
/* La suite : la tuile du point faible, une phrase, le bouton (la seule action forte de l'écran). */
.calc.cx .suite {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; align-items: start;
  margin: 12px 0 0; padding: 12px; border: 0; border-radius: 14px; background: var(--fp-creux);
}
.calc.cx .suite[hidden] { display: none; }
.calc.cx .suite .cx-ic { grid-row: span 2; }
.calc.cx .suite-t { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--fp-titre); }
.calc.cx .suite-s { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--fp-encre-2); }
.calc.cx .suite .btn { grid-column: 1 / -1; width: 100%; margin-top: 10px; min-height: 48px; justify-content: center; text-align: center; white-space: normal; line-height: 1.25; }
/* Sous le bouton payant, le repli gratuit : une ligne, un lien (pas un second bouton). */
.calc.cx .suite-alt { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--fp-encre-2); text-align: center; }
.calc.cx .suite-alt[hidden] { display: none; }
.calc.cx .suite-alt a { color: var(--fp-encre); font-weight: 700; }

/* ── Le pied de l'outil : l'avertissement, la note d'auto-évaluation, la lettre. ── */
.calc.cx .cx-pied { display: grid; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--fp-trait); }
.calc.cx .disclaimer { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--fp-encre-2); }
.calc.cx .sc-note {
  margin: 0; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--fp-repere-voile);
  font-size: 13px; line-height: 1.45; color: var(--fp-encre);
}
.calc.cx .email-capture { margin: 0; padding: 0; border: 0; }
.calc.cx .email-capture-hp { position: absolute; left: -9999px; }
.calc.cx .email-capture-label { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--fp-encre-2); }
.calc.cx .email-capture-langchoice { display: flex; gap: 6px; margin: 0 0 8px; }
.calc.cx .email-capture-lang-btn {
  appearance: none; -webkit-appearance: none; min-height: 32px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--fp-encre); border: 0; box-shadow: inset 0 0 0 1px var(--fp-trait-fort);
  font: 600 13px/1 var(--fp-police);
}
.calc.cx .email-capture-lang-btn.active { background: var(--fp-encre); color: var(--fp-papier); box-shadow: none; }
.calc.cx .email-capture-row { display: flex; flex-direction: row; gap: 8px; }
.calc.cx .email-capture-input {
  flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px var(--fp-trait-fort); background: var(--fp-carte); color: var(--fp-encre); font: 15px var(--fp-police);
}
.calc.cx .email-capture-btn {
  appearance: none; -webkit-appearance: none; flex: none; min-height: 44px; padding: 8px 14px; border: 0; cursor: pointer;
  border-radius: var(--fp-r-action); background: transparent; color: var(--fp-encre); box-shadow: inset 0 0 0 1.5px var(--fp-trait-fort);
  font: 700 14px/1.1 var(--fp-police); white-space: nowrap;
}
.calc.cx .email-capture-btn:hover { background: var(--fp-creux); }
.calc.cx .email-capture-status { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--fp-encre); }
@media (pointer: coarse) {
  .calc.cx .email-capture-lang-btn { min-height: 40px; padding: 6px 14px; }
  .calc.cx .calc-tab { min-height: 44px; }
}
@media (min-width: 760px) {
  .calc.cx .cx-pied { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .calc.cx .cx-pied > .sc-note { grid-column: 1 / -1; }
  .calc.cx .cx-pied > .email-capture { grid-column: 2; grid-row: 1 / span 2; }
  .calc.cx .cx-pied > .disclaimer { grid-column: 1; grid-row: 1; }
  .calc.cx .cx-pied:has(> .sc-note:not([hidden])) > .disclaimer { grid-row: 1; }
  .calc.cx .cx-pied:has(> .sc-note:not([hidden])) > .sc-note { grid-column: 1; grid-row: 2; }
}
@media (min-width: 1000px) { .calc.cx .cx-pied { column-gap: 36px; margin-top: 18px; padding-top: 14px; } }

/* ── Autour de l'outil ── */
/* Les quatre seuils du NCLC 7, en tête : la tuile de chaque épreuve dans le coin. */
.pg-main .reponse-grille > div:has(> .cx-coin) { position: relative; }
.pg-main .cx-coin {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; background: var(--fp-creux); color: var(--fp-encre);
}
.pg-main .cx-coin svg { width: 17px; height: 17px; }
/* Le tableau officiel : les quatre cases qui correspondent à tes scores, encadrées. */
.pg-main table.data td.cx-toi { box-shadow: inset 0 0 0 2px var(--fp-encre); border-radius: 8px; font-weight: 700; color: var(--fp-titre); }
.pg-main .cx-bareme-note { font-size: 13px; color: var(--fp-encre-2); margin: 0.5rem 0 0; }
.pg-main .cx-bareme-note[hidden] { display: none; }
/* La page la plus courte : les titres de section à 20 px (comme l'appli), le tableau plus serré au téléphone,
   les liens « pour aller plus loin » sur deux colonnes à l'ordinateur. */
.pg-main:has(.calc.cx) > .bl-bloc > h2 { font-size: 20px; line-height: 1.3; margin-bottom: 0.6rem; }
@media (max-width: 719px) {
  .pg-main:has(.calc.cx) table.data th, .pg-main:has(.calc.cx) table.data td { padding: 0.42rem 0.5rem; }
  .pg-main:has(.calc.cx) .related li { margin-bottom: 0.3rem; line-height: 1.45; }
}
@media (min-width: 760px) {
  .pg-main:has(.calc.cx) .related ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 1.6rem; }
  .pg-main:has(.calc.cx) .related li { margin: 0; line-height: 1.45; padding: 0.25rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .calc.cx .cx-barre-p i, .calc.cx .cx-ic, .calc.cx .field .out b, .calc.cx .cx-profil-m::after { transition: none; }
}
@media (forced-colors: active) {
  .calc.cx .cx-barre-p { border: 1px solid CanvasText; }
  .calc.cx .cx-barre-p .cx-base { background: CanvasText; }
  .calc.cx .cx-barre-p .cx-bonus { background: GrayText; }
  .calc.cx .cx-piste::before { border: 1px solid CanvasText; }
}
