/* Pages /exercices/ (toutes langues) : en plus de cours.css et blog.css. Exercices réels du moteur,
   correction dépliable, fiche PDF, encart appli, tables, vidéo. */
.exercices .hero .meta .pill { background: rgba(255,255,255,0.18); }

/* liste d'exercices */
.exos { margin: 34px 0; }
.exos-lede { color: var(--muted); margin: -6px 0 18px; }
.exos-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .exos-list { grid-template-columns: 1fr 1fr; } .exos-list .ex-card.wide { grid-column: 1 / -1; } }
.exos-list .ex-card { position: relative; padding: 20px 22px 16px 64px; margin: 0; }
.ex-num { position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft, #e8f0ff); color: var(--accent, var(--primary)); font-weight: 800; font-size: 0.95rem; }
.ex-body .ex-q { font-weight: 700; margin: 0 0 8px; }
.ex-body .ex-math, .ex-corr-in .ex-math { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; margin: 4px 0 8px; }
.blank { display: inline-block; vertical-align: middle; width: 2.3em; height: 1.35em; border: 2px dashed color-mix(in srgb, var(--accent, var(--primary)) 55%, transparent); border-radius: 8px; background: #fff; margin: 0 0.1em; }
.ex-choices { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.ex-choices li { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 8px 8px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ex-letter { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft, #e8f0ff); color: var(--accent, var(--primary)); font-weight: 800; font-size: 0.85rem; }
.ex-box { width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 6px; background: #fff; }
.ex-parts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 1.25rem; font-weight: 600; }
.ex-part { display: inline-flex; align-items: center; gap: 6px; }
.ex-part-label { font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.ex-lead { font-size: 1.35rem; }
.ex-body .fig, .ex-corr-in .fig { margin: 10px 0 6px; }
.ex-body .op-fig, .ex-corr-in .op-fig { text-align: left; margin: 6px 0 8px; }
.ex-objects { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 1.7rem; line-height: 1; }
.ex-obj.x { position: relative; opacity: 0.55; }
.ex-obj.x::after { content: ''; position: absolute; left: -4px; right: -4px; top: 50%; height: 3px; background: #d33; transform: rotate(-30deg); border-radius: 2px; }
/* opération posée dans un exercice : cases vides à remplir */
.ex-posed .pz-blank { display: inline-block; width: 0.95em; height: 1.15em; border: 2px dashed color-mix(in srgb, var(--accent, var(--primary)) 55%, transparent); border-radius: 6px; background: #fff; margin: 0.05em 0.1em; }
.ex-posed { font-size: 1.55rem; }
.pot .pot-q .blank { width: 2.6em; }
.pot.bracket .pot-r { border-left: 0; padding-left: 0; }
.pot.bracket .pot-q { border-top: 0; border-bottom: 2.5px solid var(--ink); padding: 2px 4px 6px 2.2em; }
.pot.bracket .pot-dr { padding-top: 6px; }
.pot-paren { margin: 0 0.15em; }
/* droite graduée : case vide */
.nl-blank { fill: #fff; stroke: var(--accent, var(--primary)); stroke-width: 2; stroke-dasharray: 5 4; }
.nline .lbl.acc { fill: var(--accent, var(--primary)); font-weight: 800; }
.arr .dot-off { fill: #fff; stroke: var(--line); stroke-width: 2; }
.disc .on { fill: var(--accent, var(--primary)); stroke: #fff; stroke-width: 2; }
.disc .off { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.chart .con.ans { fill: #ffd166; }
/* correction */
.ex-corr { margin: 10px 0 0; padding: 0; border: 0; }
.ex-corr summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 750; color: var(--accent, var(--primary)); padding: 6px 0; }
.ex-corr summary::-webkit-details-marker { display: none; }
.ex-corr summary::before { content: '▸'; font-size: 0.9em; transition: transform .15s; }
.ex-corr[open] summary::before { transform: rotate(90deg); }
.ex-corr-in { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.ex-ans { margin: 0 0 6px; font-size: 1.15rem; }
.ex-ans b { color: #1d9a5a; font-size: 1.25em; }
.ex-expl { margin: 0; color: var(--muted); }

/* table de multiplication seule, et Pythagore */
.ttable-wrap { display: flex; justify-content: center; }
.ttable { border-collapse: separate; border-spacing: 0 6px; font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ttable td { padding: 4px 10px; text-align: right; }
.ttable td.tt-op { color: var(--muted); font-weight: 500; }
.ttable td.tt-res { color: var(--accent, var(--primary)); font-weight: 800; text-align: left; }
.mtable-wrap { overflow-x: auto; }
.mtable { border-collapse: collapse; margin: 8px 0 6px; font-variant-numeric: tabular-nums; width: 100%; max-width: 560px; }
.mtable td, .mtable th { border: 1px solid var(--line); text-align: center; padding: 7px 4px; font-weight: 600; font-size: 0.95rem; }
.mtable thead th, .mtable tbody th, .mtable th { background: var(--blue-l, #eaf1ff); color: var(--blue-d, #1b4dc0); font-weight: 800; }
.mtable td.diag { background: #fff8ec; color: #b8730a; font-weight: 800; }
.mtable.pyth td.hl, .mtable.pyth th.hl { background: color-mix(in srgb, var(--accent, var(--primary)) 16%, #fff); color: var(--accent-d, var(--primary-d)); font-weight: 800; }
.mtable.pyth td.hl.diag { background: #ffe3a3; }

/* fiche PDF */
.pdf-box { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: linear-gradient(160deg, #fff, #f6f9ff); border: 1px solid var(--line); border-radius: 20px; padding: 24px 26px; margin: 34px 0; }
.pdf-box h2 { margin: 0 0 6px; padding: 0; font-size: 1.3rem; }
.pdf-box h2::before { display: none; }
.pdf-box p { margin: 0 0 14px; color: var(--muted); }
.pdf-ic { width: 72px; color: var(--accent, var(--primary)); }
.pdf-ic svg { width: 72px; height: 84px; }
.article .pdf-btn, .pdf-btn { display: inline-block; background: var(--accent, var(--primary)); color: #fff; font-weight: 800; padding: 12px 22px; border-radius: 999px; box-shadow: 0 10px 24px -12px rgba(6,18,48,0.45); }
.pdf-btn:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.pdf-meta { display: inline-block; margin-left: 14px; color: var(--muted); font-size: 0.9rem; font-weight: 600; }
@media (max-width: 560px) { .pdf-box { grid-template-columns: 1fr; } .pdf-ic { display: none; } .pdf-meta { display: block; margin: 10px 0 0; } }

/* appli */
.app-box { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; margin: 34px 0; }
.app-box h2 { margin: 0 0 6px; padding: 0; font-size: 1.3rem; }
.app-box h2::before { display: none; }
.app-box p { margin: 0; color: var(--muted); }
.app-btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.article .app-btn, .app-btn { display: block; text-align: center; background: var(--primary); color: #fff; font-weight: 800; padding: 13px 20px; border-radius: 999px; box-shadow: 0 10px 24px -12px rgba(6,18,48,0.45); }
.app-btn:hover { text-decoration: none; background: var(--primary-d); }
.app-free { text-align: center; font-weight: 700; color: var(--primary); }
@media (max-width: 640px) { .app-box { grid-template-columns: 1fr; } }

/* vidéo (chargée au clic) */
.video { margin: 26px 0; }
.video .yt { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 18px 40px -22px rgba(20,40,90,0.45); }
.video .yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.92; }
.video .yt-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); background: #ff0033; border-radius: 16px; }
.video .yt-play::after { content: ''; position: absolute; left: 30px; top: 16px; border-left: 22px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video .yt:hover .yt-play { background: #e6002e; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; }
.video figcaption { text-align: center; color: var(--muted); font-size: 0.92rem; margin-top: 8px; }

/* hub */
.hub .hub-h { margin-top: 30px; }
.hub-lv { display: inline-block; margin-top: 10px; font-size: 0.78rem; font-weight: 800; color: var(--accent, var(--primary)); background: var(--accent-soft, #e8f0ff); padding: 3px 9px; border-radius: 999px; }
.hub-links { line-height: 2; font-weight: 650; }

.ex-u { text-decoration: underline; text-decoration-color: var(--accent, var(--primary)); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.hub-classe { display: inline-block; font-weight: 800; background: var(--accent-soft, #e8f0ff); color: var(--accent, var(--primary)); padding: 2px 10px; border-radius: 999px; margin-right: 10px; }
