/* ══════════════════════════════════════════════════════════════════════════
   TFA NEWS — le journal de l'académie

   L'esprit d'un quotidien : une manchette, des filets, des rubriques en
   petites capitales, des titres en romain — mais les couleurs, les pastilles
   et les boutons restent ceux de Truly Fluent Academy. Le papier est chaud
   en clair, l'encre est navy ; en sombre, le papier devient nuit et l'encre
   devient ivoire.
   ══════════════════════════════════════════════════════════════════════════ */

.jr {
  --papier: #FCFAF6;
  --papier2: #F4F0E8;
  --encre: #0E1F38;
  --encre2: #4A5A72;
  --encre3: #8494A8;
  --filet: rgba(14,31,56,.16);
  --filet2: rgba(14,31,56,.08);
  --rouge: #C0093A;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
}
body.dark .jr {
  --papier: #0B111C;
  --papier2: #111A29;
  --encre: #F2F0EA;
  --encre2: #B9C6D8;
  --encre3: #7E8FA6;
  --filet: rgba(255,255,255,.18);
  --filet2: rgba(255,255,255,.09);
  --rouge: #FF6E92;
}

.jr {
  background: var(--papier);
  color: var(--encre);
  border-radius: 22px;
  padding: 26px clamp(16px, 3.4vw, 40px) 34px;
  box-shadow: 0 30px 80px -60px rgba(9,45,89,.9);
  border: 1px solid var(--filet2);
}

/* ── la manchette ───────────────────────────────────────────────────────── */
.jr-tete { border-bottom: 3px double var(--filet); padding-bottom: 14px; }
.jr-haut {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--encre3); font-weight: 700;
}
.jr-titre {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 12px 0 8px;
}
.jr-titre .bulles { height: clamp(30px, 4.4vw, 44px); width: auto; }
.jr-titre b {
  font-family: var(--serif);
  font-size: clamp(38px, 7.4vw, 76px); font-weight: 700;
  letter-spacing: -.02em; line-height: .92; color: var(--encre);
}
.jr-devise {
  text-align: center; font-size: 11.5px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--encre2); font-weight: 600;
}

/* la barre des rubriques */
.jr-rubs {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0 2px; margin-top: 14px; padding-bottom: 2px;
  scrollbar-width: none;
  border-bottom: 1px solid var(--filet);
}
.jr-rubs::-webkit-scrollbar { display: none; }
.jr-rub {
  flex: 0 0 auto; padding: 9px 10px; border: 0; background: transparent;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--encre2); cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.jr-rub:hover { color: var(--encre); }
.jr-rub.on { color: var(--rouge); border-bottom-color: var(--rouge); }

/* la ligne de tri : niveaux + recherche */
.jr-tri {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--filet2); margin-bottom: 18px;
}
.jr-niv {
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em;
  color: var(--encre2); background: transparent; border: 1px solid var(--filet);
}
.jr-niv:hover { border-color: var(--encre2); color: var(--encre); }
.jr-niv.on { background: var(--rouge); border-color: transparent; color: #fff; }
.jr-rech { position: relative; margin-left: auto; flex: 0 1 260px; min-width: 190px; }
.jr-rech input {
  width: 100%; box-sizing: border-box; padding: 8px 14px 8px 34px;
  border-radius: 999px; font: inherit; font-size: 13px;
  color: var(--encre); background: var(--papier2); border: 1px solid var(--filet);
}
.jr-rech input:focus { outline: none; border-color: var(--rouge); }
.jr-rech svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: .55; }
.jr-compte { font-size: 11.5px; color: var(--encre3); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }

/* ── la une ─────────────────────────────────────────────────────────────── */
.jr-une {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(18px, 3vw, 34px);
  align-items: start; padding-bottom: 22px; margin-bottom: 22px;
  border-bottom: 3px double var(--filet);
}
.jr-une .jr-ill { border-radius: 4px; max-height: 300px; }
.jr-une-txt { cursor: pointer; min-width: 0; }
.jr-une > * { min-width: 0; }
.jr-une h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(28px, 4.2vw, 46px); line-height: 1.06; letter-spacing: -.02em;
  margin: 8px 0 12px; color: var(--encre); text-wrap: balance;
}
.jr-une-txt:hover h2 { color: var(--rouge); }
.jr-une p { font-size: 16.5px; line-height: 1.6; color: var(--encre2); margin: 0 0 14px; max-width: 46ch; }
.jr-une .jr-meta { margin-top: 2px; }

/* le sommaire de la une : trois renvois, comme dans un vrai journal */
.jr-somm { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--filet); }
.jr-somm-l {
  display: flex; align-items: baseline; gap: 9px; width: 100%; text-align: left;
  padding: 9px 0; background: transparent; border: 0; border-bottom: 1px dotted var(--filet2);
  cursor: pointer; font: inherit;
}
.jr-somm-l:last-child { border-bottom: 0; }
/* le renvoi doit pouvoir passer à la ligne : sur un téléphone, un titre
   long ne doit jamais élargir la page. */
.jr-somm-l { white-space: normal; flex-wrap: wrap; }
.jr-somm-l b {
  font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1.25;
  color: var(--encre); flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere;
}
.jr-somm-l:hover b { color: var(--rouge); }
.jr-somm-l i {
  font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--encre3); white-space: nowrap;
}

/* ── la grille des articles ─────────────────────────────────────────────── */
.jr-grille {
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.jr-art {
  display: flex; flex-direction: column; gap: 7px; text-align: left; cursor: pointer;
  padding: 18px clamp(12px, 1.6vw, 20px) 20px; font: inherit;
  background: transparent; border: 0;
  border-top: 1px solid var(--filet2); border-right: 1px solid var(--filet2);
  transition: background-color .18s ease;
}
.jr-art:hover { background: var(--papier2); }
.jr-art h3 {
  font-family: var(--serif); font-weight: 700;
  font-size: 19px; line-height: 1.18; letter-spacing: -.01em;
  margin: 0; color: var(--encre); text-wrap: balance;
}
.jr-art:hover h3 { color: var(--rouge); }
.jr-art p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--encre2); }
.jr-kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rouge);
}
.jr-meta {
  margin-top: auto; padding-top: 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--encre3); letter-spacing: .04em;
}
.jr-niveau {
  font-weight: 800; letter-spacing: .06em; color: var(--encre2);
  border: 1px solid var(--filet); border-radius: 3px; padding: 1px 6px;
}
.jr-lu { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.jr-lu.ok { color: #2E7D50; }
.jr-lu.moyen { color: #A9591B; }
body.dark .jr-lu.ok { color: #7EE2A2; }
body.dark .jr-lu.moyen { color: #FFC98A; }

/* l'illustration : dessinée, jamais photographiée — rien à devoir à personne */
.jr-ill { display: block; width: 100%; height: auto; border-radius: 3px; background: var(--papier2); }
.jr-art .jr-ill { margin-bottom: 3px; }

.jr-vide { padding: 40px 6px; text-align: center; color: var(--encre2); }
.jr-plus { display: flex; justify-content: center; padding: 22px 0 4px; }

/* ── la page d'un article ───────────────────────────────────────────────── */
.jr-retour {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px;
  padding: 7px 15px; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--encre2); background: transparent; border: 1px solid var(--filet);
}
.jr-retour:hover { border-color: var(--rouge); color: var(--rouge); }

.jr-page { max-width: 680px; margin: 0 auto; }
.jr-page .jr-kicker { font-size: 11.5px; }
.jr-page h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(30px, 4.6vw, 50px); line-height: 1.06; letter-spacing: -.022em;
  margin: 8px 0 14px; color: var(--encre); text-wrap: balance;
}
.jr-chapo {
  font-family: var(--serif); font-size: clamp(17px, 2vw, 20px); font-style: italic;
  line-height: 1.5; color: var(--encre2); margin: 0 0 16px;
}
.jr-signature {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; margin-bottom: 18px;
  border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet);
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--encre3); font-weight: 700;
}
.jr-signature b { color: var(--encre2); }
.jr-ecouter {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; border: 0; font: inherit;
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--rouge);
}
.jr-ecouter:hover { filter: brightness(1.08); }
.jr-ecouter.parle { background: var(--encre); }

.jr-page .jr-ill { margin-bottom: 6px; }
.jr-credit { font-size: 11px; color: var(--encre3); margin: 0 0 20px; font-style: italic; }

.jr-corps { font-family: var(--serif); font-size: 19px; line-height: 1.72; color: var(--encre); }
.jr-corps p { margin: 0 0 18px; }
/* la lettrine n'ouvre que l'article, comme dans un vrai journal */
.jr-corps .jr-para-1 p::first-letter {
  float: left; font-size: 3.4em; line-height: .84; padding: 4px 9px 0 0;
  font-weight: 700; color: var(--rouge);
}
.jr-para { display: flex; gap: 10px; align-items: flex-start; }
.jr-dire {
  flex: 0 0 auto; margin-top: 7px; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--filet); background: transparent; color: var(--encre3);
  cursor: pointer; display: grid; place-items: center;
}
.jr-dire:hover { border-color: var(--rouge); color: var(--rouge); }
.jr-dire.on { background: var(--rouge); border-color: transparent; color: #fff; }

/* le mot qu'on touche pour le comprendre */
.jr-mot { cursor: help; border-radius: 3px; padding: 0 1px; }
.jr-mot:hover { background: rgba(192,9,58,.12); }
.jr-mot.ouvert { background: var(--rouge); color: #fff; }

/* ══ LA BULLE DE TRADUCTION ══
   Elle est posée sur <body>, donc HORS de .jr : les variables du journal
   n'y arrivent pas. Toutes ses couleurs sont écrites en clair, sinon le fond
   reste transparent et le texte de l'article se lit à travers.
   (Bug vu le 23/09 : c'était exactement ça.) */
.jr-bulle {
  position: absolute; z-index: 9999; max-width: min(340px, 88vw);
  background: #0E1F38; color: #FFFFFF;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px; padding: 13px 15px;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(0,0,0,.25);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  animation: jr-pop .16s ease-out both;
}
body:not(.dark) .jr-bulle { background: #0E1F38; color: #FFFFFF; }
@keyframes jr-pop { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .jr-bulle { animation: none; } }
.jr-bulle b {
  display: block; font-size: 17px; font-weight: 800; color: #FFFFFF;
  margin-bottom: 3px; letter-spacing: -.01em;
}
.jr-bulle i {
  font-style: normal; display: block; font-size: 15.5px; line-height: 1.45;
  color: #9BE7C4; font-weight: 600;
}
.jr-bulle .jr-b-non { color: #FFB8C9; font-weight: 500; font-size: 14px; }
.jr-bulle .jr-b-act { display: flex; gap: 8px; margin-top: 11px; }
.jr-bulle button {
  flex: 1; padding: 7px 10px; border-radius: 9px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 700; color: #FFFFFF;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
}
.jr-bulle button:hover { background: rgba(255,255,255,.26); }
.jr-bulle .jr-b-vu { font-size: 11px; color: #9FB6D2; margin-top: 8px; display: block; }

/* ── la fiche de révision : les mots que l'élève a demandés ── */
.jr-carnet {
  margin-top: 26px; padding: 16px 18px 14px; border-radius: 4px;
  background: rgba(46,125,80,.07); border: 1px solid rgba(46,125,80,.30);
  border-left: 4px solid #2E7D50;
}
body.dark .jr-carnet { background: rgba(79,190,123,.08); border-color: rgba(79,190,123,.32); border-left-color: #4FBE7B; }
.jr-carnet .jr-lb { color: #2E7D50; }
body.dark .jr-carnet .jr-lb { color: #7EE2A2; }
.jr-tab { width: 100%; border-collapse: collapse; }
.jr-tab td { padding: 7px 8px 7px 0; border-bottom: 1px dotted rgba(46,125,80,.28); font-size: 15px; vertical-align: baseline; }
.jr-tab tr:last-child td { border-bottom: 0; }
.jr-tab td:first-child { width: 38%; }
.jr-tab td:last-child { width: 30px; text-align: right; }
.jr-tab b { font-weight: 700; color: #1E6B42; cursor: pointer; }
body.dark .jr-tab b { color: #9BE7C4; }
.jr-tab b:hover { text-decoration: underline; }
.jr-tab td:nth-child(2) { color: var(--encre2); }
.jr-x {
  border: 0; background: transparent; color: var(--encre3); cursor: pointer;
  font-size: 13px; line-height: 1; padding: 4px;
}
.jr-x:hover { color: var(--rouge); }
.jr-carnet-p { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--encre2); }
.jr-carnet-p a { color: #2E7D50; font-weight: 700; text-decoration: none; }
body.dark .jr-carnet-p a { color: #7EE2A2; }
.jr-carnet-p a:hover { text-decoration: underline; }

/* les mots utiles */
/* ══ LA CHRONIQUE DE LANGUE — l'équivalent français, en clair ══
   Pour les rubriques Slang, Expressions, Proverbes et Politesse : ce que
   l'élève cherchait vraiment en lisant, dit dans sa langue. */
.jr-equiv {
  margin-top: 24px; padding: 16px 18px; border-radius: 4px;
  background: var(--papier2); border-left: 3px solid var(--encre3);
}
.jr-equiv p {
  margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.45;
  color: var(--encre); font-style: italic;
}

.jr-glossaire {
  margin-top: 24px; padding: 16px 18px; border-radius: 4px;
  background: var(--papier2); border-top: 3px solid var(--rouge);
}
.jr-lb {
  font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--encre3); margin-bottom: 10px;
}
.jr-gl { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; }
.jr-gl div { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dotted var(--filet2); font-size: 14px; }
.jr-gl b { color: var(--encre); cursor: pointer; font-weight: 700; }
.jr-gl b:hover { color: var(--rouge); }
.jr-gl span { color: var(--encre2); }

.jr-go { display: flex; justify-content: center; margin: 26px 0 6px; }
.jr-go .btn { font-size: 15px; }

/* ── les questions ──────────────────────────────────────────────────────── */
.jr-q { max-width: 680px; margin: 26px auto 0; }
.jr-repere {
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--encre3); text-align: center; margin-bottom: 8px;
}
.jr-jauge { height: 2px; background: var(--filet2); margin-bottom: 20px; }
.jr-jauge i { display: block; height: 100%; background: var(--rouge); transition: width .3s ease; }
.jr-consigne {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(20px, 2.5vw, 25px); line-height: 1.3; text-align: center;
  margin: 0 0 16px; color: var(--encre);
}
.jr-enonce { font-family: var(--serif); font-size: 19px; line-height: 1.6; text-align: center; margin: 0 0 16px; }
.jr-trou { font-family: var(--serif); font-size: 19px; line-height: 1.9; text-align: center; margin: 0 0 14px; }
.jr-trou u { text-decoration: none; border-bottom: 2px solid var(--rouge); padding: 0 24px; }

.jr-opts { display: flex; flex-direction: column; gap: 8px; }
.jr-opt {
  padding: 13px 18px; border-radius: 4px; cursor: pointer; text-align: left; font: inherit;
  font-size: 16px; color: var(--encre); background: var(--papier2);
  border: 1px solid var(--filet2); border-left: 3px solid transparent;
  transition: border-color .16s ease, background-color .16s ease;
}
.jr-opt:hover { border-left-color: var(--rouge); }
.jr-opt.on { border-left-color: var(--rouge); }
.jr-opt.bon { border-left-color: #2E7D50; background: rgba(79,190,123,.14); }
.jr-opt.faux { border-left-color: var(--rouge); background: rgba(192,9,58,.10); }
.jr-opt:disabled { cursor: default; }

.jr-champ {
  width: 100%; box-sizing: border-box; padding: 13px 16px; border-radius: 4px;
  font: inherit; font-size: 17px; font-weight: 600; text-align: center;
  color: var(--encre); background: var(--papier2); border: 1px solid var(--filet);
  border-bottom: 2px solid var(--rouge);
}
.jr-champ:focus { outline: none; background: var(--papier); }

.jr-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.jr-passer {
  margin-left: auto; font-size: 12.5px; color: var(--encre3);
  background: none; border: 0; cursor: pointer; font: inherit; text-decoration: underline;
}
.jr-volet { margin-top: 16px; padding: 16px 18px; border-radius: 4px; border-left: 3px solid; }
.jr-volet.ok { background: rgba(79,190,123,.10); border-color: #2E7D50; }
.jr-volet.ko { background: rgba(192,9,58,.08); border-color: var(--rouge); }
.jr-verdict { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.jr-volet.ok .jr-verdict { color: #2E7D50; }
.jr-volet.ko .jr-verdict { color: var(--rouge); }
body.dark .jr-volet.ok .jr-verdict { color: #7EE2A2; }
.jr-bonne {
  display: block; font-family: var(--serif); font-size: clamp(19px, 2.3vw, 24px);
  font-weight: 700; color: #2E7D50; cursor: pointer; margin-bottom: 10px;
}
body.dark .jr-bonne { color: #7EE2A2; }
.jr-regle { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--encre2); }
.jr-regle + .jr-regle { margin-top: 7px; }
.jr-regle b { color: var(--encre); }

.jr-bilan { max-width: 680px; margin: 26px auto 0; text-align: center; }
.jr-note { font-family: var(--serif); font-size: clamp(40px, 6vw, 58px); font-weight: 700; color: var(--encre); }
.jr-note span { color: var(--encre3); font-size: .55em; }
.jr-bilan p { margin: 6px 0 18px; color: var(--encre2); }
.jr-bilan .jr-actions { justify-content: center; }
.jr-bilan .jr-passer { margin-left: 0; }

/* la suite : trois articles proposés après le quiz */
.jr-suite { max-width: 680px; margin: 30px auto 0; padding-top: 18px; border-top: 3px double var(--filet); }
.jr-suite .jr-grille { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* le rendez-vous vidéo à venir */
.jr-tv {
  margin-top: 26px; padding: 16px 18px; border: 1px dashed var(--filet);
  border-radius: 4px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.jr-tv b { font-family: var(--serif); font-size: 18px; }
.jr-tv span { font-size: 13.5px; color: var(--encre2); flex: 1; min-width: 220px; }
.jr-tv em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--rouge); border: 1px solid var(--rouge);
  border-radius: 999px; padding: 3px 9px; }

@media (max-width: 860px) {
  .jr-une { grid-template-columns: 1fr; }
  .jr-une .jr-ill { order: -1; }
}
@media (max-width: 760px) {
  .jr { padding: 18px 14px 26px; border-radius: 16px; }
  .jr-corps { font-size: 17.5px; }
  .jr-grille { grid-template-columns: 1fr; }
  .jr-art { border-right: 0; }
  .jr-rech { margin-left: 0; flex-basis: 100%; }
  /* sur un téléphone, les rubriques défilent au doigt plutôt que de
     remplir l'écran sur cinq lignes */
  .jr-rubs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
}
