/* Blog (en complément de /cours/cours.css) : tableaux d'article et liste des articles. */

/* tableaux d'article : défilent horizontalement sur petit écran au lieu d'élargir la page */
.post-table-wrap { overflow-x: auto; margin: 18px 0 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 10px 28px -20px rgba(20,40,90,0.25); }
.post-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.post-table th, .post-table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.post-table thead th { background: var(--accent-soft); color: var(--ink); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.post-table tbody tr + tr td { border-top: 1px solid var(--line); }
.post-table td:first-child { font-weight: 600; }
@media (max-width: 560px) { .post-table th, .post-table td { padding: 10px 12px; font-size: 0.92rem; } }

.article code { background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

/* liste des articles */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; margin: 10px 0 20px; }
.post-card { display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; color: var(--ink); box-shadow: 0 14px 34px -24px rgba(20,40,90,0.35); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.post-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 20px 40px -24px rgba(20,40,90,0.45); }
.post-card h2 { font-size: 1.18rem; line-height: 1.3; margin: 0; padding: 0; }
.post-card h2::before { display: none; }
.post-card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.post-badge { align-self: flex-start; font-size: 0.78rem; font-weight: 800; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.post-meta { margin-top: auto; font-size: 0.82rem; font-weight: 600; color: var(--muted); }

/* ---- schémas ---- */
.fig { margin: 26px auto; text-align: center; }
.fig figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.fig svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }

/* fraction écrite en hauteur, au fil du texte */
.fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; margin: 0 2px; font-size: 0.92em; }
.fr > span:first-child { border-bottom: 2px solid currentColor; padding: 0 3px 1px; }
.fr > span:last-child { padding: 1px 3px 0; }

/* barres de fraction */
.fig-bars { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 14px; max-width: 100%; }
.bar-lbl { flex: none; min-width: 34px; font-size: 1.15rem; color: var(--ink); }
.fbar { flex: 1 1 auto; min-width: 0; }
.fbar rect.on { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.fbar rect.off { fill: var(--accent-soft); stroke: #fff; stroke-width: 2; }
.fbar rect.frame { fill: none; stroke: var(--accent); stroke-width: 2; rx: 6; }

/* droite graduée */
.nline { width: 100%; max-width: 520px; }
.nline .axis { stroke: var(--ink); stroke-width: 2.4; }
.nline .tick { stroke: var(--muted); stroke-width: 1.6; }
.nline .tick.big { stroke: var(--ink); stroke-width: 2.4; }
.nline .lbl { font: 700 20px system-ui, sans-serif; fill: var(--ink); text-anchor: middle; }
.nline .dot { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.nline .mk { font: 800 20px system-ui, sans-serif; fill: var(--accent); text-anchor: middle; }

/* rectangle quadrillé */
.grid { width: 100%; }
.grid .sq { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; stroke-opacity: 0.45; }
.grid .frame { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.grid .lbl { font: 700 15px system-ui, sans-serif; fill: var(--ink); } /* alignement : attribut text-anchor de chaque étiquette */

/* tableau de conversion */
.conv-wrap { overflow-x: auto; display: flex; justify-content: center; }
.conv { border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 12px 30px -22px rgba(20,40,90,0.3); font-variant-numeric: tabular-nums; }
.conv th, .conv td { min-width: 46px; padding: 9px 8px; text-align: center; border-right: 1px solid var(--line); }
.conv th:last-child, .conv td:last-child { border-right: 0; }
.conv thead th { font-size: 0.85rem; font-weight: 800; color: var(--muted); background: #f6f8fc; }
.conv tbody td { font-size: 1.35rem; font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); height: 1.6em; }
.conv .hl { background: var(--accent-soft); color: var(--accent); }
.conv thead th.hl { color: var(--accent); }
.conv .cm { color: var(--accent); }
@media (max-width: 560px) { .conv th, .conv td { min-width: 34px; padding: 7px 4px; } .conv tbody td { font-size: 1.1rem; } }

/* opération posée */
.posed-fig { display: inline-grid; grid-template-columns: repeat(var(--cols), 1.15em); justify-content: center; font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 24px 16px; box-shadow: 0 12px 30px -22px rgba(20,40,90,0.3); }
.pz-row { display: contents; }
.pz-row > span { text-align: center; line-height: 1.35; }
.pz-carry > span { font-size: 0.55em; font-weight: 800; color: var(--accent); line-height: 1.2; align-self: end; }
.pz-rule { grid-column: 1 / -1; height: 0; border-top: 3px solid var(--ink); margin: 2px 0 4px; }
.pz-part > span { height: 0; line-height: 0; margin: 1px 0 3px; }
.pz-part > .pz-u { border-top: 3px solid var(--ink); }

/* capture d'exercice */
.shot img { display: block; margin: 0 auto; width: 100%; max-width: 420px; height: auto; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 22px 46px -26px rgba(20,40,90,0.45); background: #fff; }
.shot-src { display: block; margin-top: 3px; font-size: 0.78rem; font-weight: 700; color: var(--accent); }

/* boîte de dix */
.tenf { width: 100%; }
.tenf .cell { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.tenf .tok { fill: var(--accent); }
.tenf .tok2 { fill: #f2a33a; }

/* matériel base dix */
.blocks { width: 100%; }
.blocks rect { stroke: #fff; stroke-width: 1.2; }
.blocks .b100 { fill: var(--accent); opacity: 0.55; }
.blocks .b10 { fill: var(--accent); }
.blocks .b1 { fill: #f2a33a; }

/* ===================== page d'index du blog (sobre) ===================== */
.blog-wrap { max-width: 1140px; margin: 0 auto; padding: 8px 24px 40px; }

/* article à la une : grande carte, image à gauche */
.feat { display: grid; grid-template-columns: 1.25fr 1fr; align-items: stretch; margin: 8px 0 48px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.feat:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 18%, transparent); box-shadow: 0 18px 40px -26px rgba(20, 40, 90, 0.35); }
.feat-img, .pc-img { display: block; overflow: hidden; background: var(--accent-soft); }
.feat-img img, .pc-img img { display: block; width: 100%; height: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.feat-body { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 32px 36px; }
.feat-kicker { font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.feat-title { font-size: clamp(1.45rem, 2.3vw, 1.95rem); font-weight: 750; line-height: 1.2; letter-spacing: -0.015em; }
.feat-ex { font-size: 1rem; line-height: 1.6; color: var(--muted); }
.feat-cta { display: none; }

/* filtres par thème : simple texte, thème actif souligné */
.cat-bar { display: flex; gap: 26px; flex-wrap: wrap; margin: 0 0 36px; border-bottom: 1px solid var(--line); }
.cat { font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 0 0 12px; margin-bottom: -1px; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.cat:hover { color: var(--ink); }
.cat.on { color: var(--ink); border-bottom-color: var(--ink); }

/* grille d'articles : une carte blanche bordée par article, image en haut sur toute la largeur */
.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-bottom: 44px; }
.pc { display: flex; flex-direction: column; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.pc:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 18%, transparent); box-shadow: 0 18px 40px -26px rgba(20, 40, 90, 0.35); transform: translateY(-2px); }
.pc[hidden], .feat[hidden] { display: none; }
.pc-img { border-bottom: 1px solid var(--line); }
.pc-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.pc-cat { font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.pc-title { font-size: 1.1rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.005em; }
.pc-ex { font-size: 0.93rem; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8rem; color: var(--muted); margin-top: auto; padding-top: 8px; }
.pc-dot { opacity: 0.6; }

@media (max-width: 980px) {
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat { grid-template-columns: 1fr; }
  .feat-body { padding: 22px 22px 24px; }
}
@media (max-width: 620px) {
  .blog-wrap { padding: 4px 16px 32px; }
  .pc-grid { grid-template-columns: 1fr; gap: 20px; }
  .feat { margin-bottom: 40px; }
  .cat-bar { flex-wrap: nowrap; overflow-x: auto; gap: 22px; margin: 0 -16px 28px; padding: 0 16px; scrollbar-width: none; }
  .cat-bar::-webkit-scrollbar { display: none; }
  .cat { flex: none; }
}

/* « À lire aussi » en bas d'article : cartes avec image */
.article .pc-rel { gap: 18px; margin-top: 18px; }
.article .pc-rel .pc-title { font-size: 1.02rem; }
.article .pc-rel .pc-ex { display: none; }
.article .pc-rel .pc-body { padding: 14px 16px 16px; }
.article .pc-rel a:hover { text-decoration: none; }
.rel-all { margin: 22px 0 0; font-weight: 800; }
@media (max-width: 760px) { .article .pc-rel { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .article .pc-rel { grid-template-columns: 1fr; } }
.article .pc, .article .pc .pc-title { color: var(--ink); }
.article .pc:hover .pc-title { color: var(--accent); }
.article .pc .pc-meta { color: var(--muted); }

/* ---- schémas de géométrie, mesures, nombres ---- */
.gfig { width: 100%; }
.gfig .ray { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.gfig .ray.acc { stroke: var(--accent); }
.gfig .arc { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.gfig .rmark { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.gfig .vx { fill: var(--ink); }
.gfig .glbl { font: 700 16px system-ui, sans-serif; fill: var(--ink); text-anchor: middle; }
.gfig .glbl.acc { fill: var(--accent); font-size: 18px; }
.gfig .prot { fill: color-mix(in srgb, var(--accent) 8%, #fff); stroke: var(--accent); stroke-width: 2; }
.gfig .ptick { stroke: var(--accent); stroke-width: 1.6; }
.gfig .plbl { font: 700 13px system-ui, sans-serif; fill: var(--muted); text-anchor: middle; }
.gfig .arrow { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.gfig .symf { fill: color-mix(in srgb, var(--accent) 22%, #fff); stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
.gfig .axis-d { stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 9 7; }
.gfig .face1 { fill: color-mix(in srgb, var(--accent) 18%, #fff); }
.gfig .face2 { fill: color-mix(in srgb, var(--accent) 10%, #fff); }
.gfig .face3 { fill: color-mix(in srgb, var(--accent) 28%, #fff); }
.gfig .edge { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.gfig .hid { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 6; opacity: 0.55; }
.gfig .vtx { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.gfig .netsq { fill: color-mix(in srgb, var(--accent) 18%, #fff); stroke: var(--accent); stroke-width: 2.5; }
.gfig .tri { fill: color-mix(in srgb, var(--accent) 14%, #fff); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.gfig .tk { stroke: var(--accent); stroke-width: 2.5; }
.gfig .clk { fill: #fff; stroke: var(--ink); stroke-width: 4; }
.gfig .ctk { stroke: var(--muted); stroke-width: 1.4; }
.gfig .ctk.big { stroke: var(--ink); stroke-width: 3; }
.gfig .cnum { font: 700 17px system-ui, sans-serif; fill: var(--ink); text-anchor: middle; }
.gfig .hh { stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.gfig .mh { stroke: var(--accent); stroke-width: 4.5; stroke-linecap: round; }
.gfig .tube { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.gfig .bulb { fill: #e5484d; stroke: var(--ink); stroke-width: 2.5; }
.gfig .merc { fill: #e5484d; }
.gfig .ttk { stroke: var(--ink); stroke-width: 1.6; }
.gfig .tlbl { font: 700 14px system-ui, sans-serif; fill: var(--ink); }
.gfig .hon { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.gfig .hoff { fill: color-mix(in srgb, var(--accent) 10%, #fff); stroke: #fff; stroke-width: 1.5; }
.gfig .con { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.gfig .coff { fill: #f4f6fa; stroke: #fff; stroke-width: 1.5; }
.gfig .cnt { font: 600 12px system-ui, sans-serif; fill: var(--muted); text-anchor: middle; }
.gfig .cnt.on { fill: #fff; font-weight: 800; }
.gfig .dot1 { fill: var(--accent); }
.gfig .dot2 { fill: color-mix(in srgb, var(--accent) 55%, #fff); }
.gfig .grp { fill: #fff; stroke: color-mix(in srgb, var(--ink) 25%, transparent); stroke-width: 2; }
.gfig .grp.on { fill: color-mix(in srgb, var(--accent) 12%, #fff); stroke: var(--accent); }
.gfig .gdot { fill: color-mix(in srgb, var(--ink) 25%, #fff); }
.gfig .gdot.on { fill: var(--accent); }

/* division « bus stop » (Royaume-Uni) : quotient au-dessus, diviseur à gauche du crochet */
.busstop { display: inline-grid; justify-items: end; font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 26px 18px; box-shadow: 0 12px 30px -22px rgba(20,40,90,0.3); }
.busstop span { display: inline-block; width: 1.15em; text-align: center; }
.bs-q { color: var(--accent); padding-right: 0.15em; }
.bs-q em { font-style: normal; font-size: 0.7em; margin-left: 0.3em; }
.bs-row { display: flex; align-items: stretch; }
.bs-dvs { width: auto !important; padding-right: 0.35em; }
.bs-dvd { width: auto !important; white-space: nowrap; border-top: 3px solid var(--ink); border-left: 3px solid var(--ink); border-top-left-radius: 10px; padding: 2px 0.15em 0 0.25em; }
.bs-dvd span { width: 1.15em; }

/* logo EasyMaths : tuile penchée + « easymaths » en Inter Tight Extra Bold (src/components/Brand.tsx) */
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/inter-tight-800.woff2) format('woff2'); }
a.brand .bw { font-family: 'Inter Tight', system-ui, sans-serif; font-weight: 800; letter-spacing: -0.045em; }
a.brand .bm { color: #2f6fe4; }
