/* physique-cours.css : socle visuel commun des cours de physique et d'astronomie
   (physique/*.html, astronomie/*.html). Préfixe ph-.
   Fonds et surfaces pastel (eau claire, papier), deux accents saturés : le pétrole de la matière
   (celui de la barre de navigation des fiches) et le framboise des points d'attention.
   Les schémas utilisent les mêmes pastels, avec des traits saturés pour ce qui compte. */

.ph-cours {
    --ph-fond: #f2f6f7;
    --ph-fond-2: #e7eff1;
    --ph-surface: #ffffff;
    --ph-bord: #d6e3e7;
    --ph-encre: #0f2a3a;
    --ph-texte: #33495a;
    --ph-doux: #5b6e7b;
    --ph-accent: #0e7490;
    --ph-accent-fonce: #0b5a70;
    --ph-aqua: #dcf1f4;
    --ph-aqua-2: #c3e7ec;
    --ph-framboise: #b8324a;
    --ph-framboise-fonce: #93243a;
    --ph-rose: #fbe8ea;
    --ph-menthe: #e1f3e8;
    --ph-vert: #1f7a4f;
    --ph-beurre: #fbf1d3;
    --ph-or: #b7791f;
    --ph-lilas: #eeeafb;
    --ph-violet: #5b3fa0;
    --ph-ciel: #e5eefc;
    --ph-bleu: #2956a8;
    --ph-peche: #fde9dc;
    --ph-orange: #b4541a;
    background: var(--ph-fond);
    color: var(--ph-texte);
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    overflow-x: clip;
}
.ph-astro {
    --ph-accent: #1f4f86;
    --ph-accent-fonce: #173d69;
    --ph-aqua: #e3ecfa;
    --ph-aqua-2: #cfdcf4;
    --ph-fond: #f3f4fa;
    --ph-fond-2: #e8eaf5;
    --ph-bord: #dadff0;
}

/* ---------- Mise en page ---------- */
.ph-col { max-width: 44rem; margin: 0 auto; padding: 0 16px; }
.ph-large { max-width: 62rem; margin: 0 auto; padding: 0 16px; }
.ph-section { padding: 3.6rem 0 .8rem; scroll-margin-top: 16px; }
.ph-section + .ph-section { padding-top: 2.4rem; }
.ph-cours main { display: block; padding-bottom: 2rem; }

/* ---------- Typographie ---------- */
.ph-kicker { display: flex; align-items: center; gap: .55rem; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--ph-accent) 88%, #000); /* 4,48:1 sur lilas avec l'accent pur (28 oct. 2026) */ margin: 0 0 .6rem; }
.ph-kicker::before { content: ''; flex: none; width: 22px; height: 2px; border-radius: 2px; background: currentColor; opacity: .55; }
.ph-hero .ph-kicker::before { display: none; }
.ph-h1 { font-size: clamp(2.3rem, 9.4vw, 4rem); line-height: 1.03; font-weight: 800; letter-spacing: -.025em; color: var(--ph-encre); margin: 0 0 .85rem; }
.ph-h2 { font-size: clamp(1.6rem, 5.9vw, 2.35rem); line-height: 1.12; font-weight: 800; letter-spacing: -.015em; color: var(--ph-encre); margin: 0 0 .8rem; }
.ph-h3 { font-size: 1.18rem; font-weight: 800; color: var(--ph-encre); margin: 0 0 .55rem; line-height: 1.28; }
.ph-lead { font-size: 1.08rem; line-height: 1.64; color: var(--ph-texte); margin: 0 0 1rem; }
.ph-p { line-height: 1.68; margin: 0 0 .9rem; }
.ph-cours b, .ph-cours strong { color: var(--ph-encre); font-weight: 700; }
.ph-cours sub, .ph-cours sup { line-height: 0; }
.ph-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-cours a.ph-lien { color: var(--ph-accent-fonce); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- En-tête ---------- */
.ph-hero { background: var(--ph-aqua); padding: 5.2rem 0 2.2rem; border-radius: 0 0 32px 32px; }
.ph-hero .ph-lead { font-size: 1.13rem; max-width: 36rem; }
.ph-marque { display: block; width: 150px; height: auto; margin: 0 0 1rem; overflow: visible; }
.ph-objectifs { background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 20px; padding: 1rem 1.1rem .7rem; margin-top: 1.1rem; }
.ph-objectifs-titre { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ph-accent); margin: 0 0 .45rem; }
.ph-objectifs ul { list-style: none; margin: 0; padding: 0; }
.ph-objectifs li { position: relative; padding-left: 1.35rem; margin: 0 0 .5rem; line-height: 1.5; font-size: .98rem; }
.ph-objectifs li::before { content: ''; position: absolute; left: .1rem; top: .5em; width: .52rem; height: .52rem; border-radius: 50%; border: 2px solid var(--ph-accent); }
.ph-niveau { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--ph-accent-fonce); background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 999px; padding: .28rem .7rem; margin: 0 0 .9rem; }
.ph-saut { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin-top: .8rem; padding: 0 .2rem; color: var(--ph-accent-fonce); font-weight: 800; font-size: .95rem; text-decoration: underline; text-underline-offset: 4px; }
.ph-saut svg { flex: none; }
.ph-saut:focus-visible { outline: 3px solid var(--ph-encre); outline-offset: 3px; border-radius: 6px; }

/* ---------- Cartes de cours ---------- */
.ph-carte { background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 22px; padding: 1.15rem 1.1rem 1rem; margin: 0 0 1rem; }
@media (min-width: 768px) { .ph-carte { padding: 1.5rem 1.65rem 1.3rem; } }
.ph-carte > :last-child { margin-bottom: 0; }
.ph-tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ph-accent-fonce); background: var(--ph-aqua); border-radius: .45rem; padding: .22rem .55rem; margin-bottom: .55rem; }

/* Définition : le mot, puis ce qu'il veut dire */
.ph-def { border-left: 0; background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 18px; padding: .9rem 1rem; margin: 0 0 .9rem; line-height: 1.6; }
.ph-def > b:first-child { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ph-accent); margin-bottom: .2rem; }

/* Formule : grande, centrée, puis la légende de chaque symbole */
.ph-formule { background: var(--ph-aqua); border-radius: 18px; padding: .95rem 1rem .8rem; margin: 1rem 0; text-align: center; }
.ph-formule-eq { display: block; font-size: 1.32rem; font-weight: 800; color: var(--ph-encre); letter-spacing: .01em; line-height: 1.5; font-variant-numeric: tabular-nums; }
.ph-formule-eq + .ph-formule-eq { margin-top: .2rem; }
.ph-formule dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; margin: .7rem auto 0; max-width: 30rem; text-align: left; font-size: .9rem; line-height: 1.45; }
.ph-formule dt { font-weight: 800; color: var(--ph-accent-fonce); white-space: nowrap; }
.ph-formule dd { margin: 0; color: var(--ph-texte); }
.ph-formule small { display: block; margin-top: .45rem; font-size: .86rem; color: var(--ph-doux); line-height: 1.5; }

/* Exemple chiffré */
.ph-exemple { background: var(--ph-surface); border: 1px dashed var(--ph-aqua-2); border-radius: 18px; padding: .9rem 1rem; margin: .9rem 0; line-height: 1.62; font-size: .98rem; }
.ph-exemple > b:first-child { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ph-accent); margin-bottom: .25rem; }
.ph-exemple ol { margin: .3rem 0 0; padding-left: 1.2rem; }
.ph-exemple li { margin: .15rem 0; }

.ph-note { background: var(--ph-ciel); border-radius: 16px; padding: .9rem 1rem; line-height: 1.6; font-size: .97rem; margin: .9rem 0; }
.ph-note > b:first-child { display: block; color: var(--ph-bleu); margin-bottom: .2rem; }
.ph-piege { background: var(--ph-rose); border-radius: 16px; padding: .85rem 1rem; line-height: 1.6; font-size: .97rem; margin: 0 0 .7rem; }
.ph-piege > b:first-child { display: block; color: var(--ph-framboise-fonce); margin-bottom: .2rem; }
.ph-limite { background: var(--ph-beurre); border-radius: 16px; padding: .9rem 1rem; line-height: 1.6; font-size: .97rem; margin: .9rem 0; }
.ph-limite > b:first-child { display: block; color: #7a5212; margin-bottom: .2rem; }

.ph-liste { list-style: none; margin: 0 0 .9rem; padding: 0; }
.ph-liste li { position: relative; padding-left: 1.25rem; margin: 0 0 .55rem; line-height: 1.6; }
.ph-liste li::before { content: ''; position: absolute; left: .1rem; top: .62em; width: .42rem; height: .42rem; border-radius: 50%; background: var(--ph-accent); opacity: .75; }

.ph-duo { display: grid; gap: .7rem; margin: .5rem 0 1rem; }
@media (min-width: 640px) { .ph-duo { grid-template-columns: 1fr 1fr; } }
.ph-duo > div { background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 16px; padding: .85rem .95rem; }
.ph-duo b { display: block; margin-bottom: .2rem; }
.ph-duo p { margin: 0; line-height: 1.55; font-size: .96rem; }

.ph-tableau-wrap { border: 1px solid var(--ph-bord); border-radius: 16px; overflow-x: auto; margin: .6rem 0 1rem; background: #fff; }
.ph-tableau { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ph-tableau th { text-align: left; background: var(--ph-fond); color: var(--ph-doux); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: .55rem .65rem; }
.ph-tableau td { padding: .55rem .65rem; border-top: 1px solid var(--ph-bord); vertical-align: top; line-height: 1.45; }

/* Figure statique */
.ph-figure { background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 20px; padding: .8rem; margin: 1rem 0; }
.ph-figure svg { display: block; width: 100%; height: auto; }
.ph-figure figcaption { font-size: .9rem; color: var(--ph-doux); text-align: center; margin-top: .45rem; line-height: 1.45; }

/* ---------- Scènes collées (mk-pin) ---------- */
.ph-pin { --mk-pin-couleur: var(--ph-accent); margin-top: .6rem; }
.ph-pin .mk-pin-scene { padding: 0 12px; }
.ph-scene { position: relative; background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 22px; padding: .8rem .8rem .85rem; max-width: 38rem; margin: 0 auto; box-shadow: 0 18px 40px -32px rgba(15, 42, 58, .55); }
.ph-scene-tete { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0 .15rem .4rem; }
.ph-scene-titre { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ph-doux); margin: 0; }
.ph-scene-titre.ph-h-scene { font-size: .8rem; letter-spacing: .08em; }
.ph-scene-etat { font-size: .8rem; font-weight: 800; color: var(--ph-accent-fonce); background: var(--ph-aqua); border-radius: 999px; padding: .22rem .62rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ph-scene-etat.is-alerte { color: var(--ph-framboise-fonce); background: var(--ph-rose); }
.ph-scene svg { display: block; width: 100%; height: auto; overflow: visible; }
@media (min-width: 900px) { .ph-scene svg { max-height: 44vh; } }
.ph-scene .ph-svg-clip { overflow: hidden; }
.ph-lecture { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .9rem; margin: .45rem 0 0; font-size: .92rem; color: var(--ph-doux); font-variant-numeric: tabular-nums; }
.ph-lecture span { white-space: nowrap; }
.ph-lecture b { color: var(--ph-encre); font-weight: 800; }
.ph-legende { min-height: 4.5em; text-align: center; margin: .45rem .15rem 0; line-height: 1.45; font-size: .95rem; color: var(--ph-texte); }
.ph-legende b { color: var(--ph-encre); }
.ph-pin .mk-pin-indice { color: var(--ph-doux); }
.ph-pastilles { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: .55rem; }
.ph-pastille { min-height: 40px; padding: .4rem .8rem; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--c, #0e7490) 38%, transparent); background: #fff; color: var(--c, #0b5a70); font: 700 .82rem/1.1 'Outfit', system-ui, sans-serif; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.ph-pastille[aria-pressed="true"] { background: var(--c, #0e7490); border-color: var(--c, #0e7490); color: #fff; }
.ph-pastille:disabled { opacity: .45; cursor: default; }
.ph-pastille:focus-visible { outline: 3px solid var(--ph-encre); outline-offset: 2px; }
/* Texte SVG commun des scènes : lisible, avec un halo pour passer sur les traits */
.ph-t { font-family: 'Outfit', system-ui, sans-serif; font-weight: 700; font-size: 14px; fill: var(--ph-encre); }
.ph-t-doux { fill: var(--ph-doux); }
.ph-halo { paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.ph-trans { transition: opacity .35s ease, transform .55s cubic-bezier(.2, .8, .2, 1); }
html.mk-reduced .ph-trans { transition: none; }

/* ---------- Séquences défilées (mk-scrolly) ---------- */
.ph-cours .mk-scrolly { --mk-scrolly-top: 12px; --mk-pin-couleur: var(--ph-accent); margin: 1rem auto 0; }
.ph-cours .mk-scrolly-texte .mk-step-card { font-size: .98rem; }
.ph-cours .mk-scrolly-graphic { background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 22px; padding: 6px; }
.ph-cours .mk-scrolly-graphic > svg { max-height: 100%; }
.ph-cours .mk-step-card { border-color: var(--ph-bord); border-radius: 18px; box-shadow: 0 12px 30px -22px rgba(15, 42, 58, .5); color: var(--ph-texte); }
.ph-cours .mk-step-card b, .ph-cours .mk-step-card strong { color: var(--ph-encre); }
.ph-cours .mk-step-card p { margin: 0 0 .4rem; }
.ph-cours .mk-step-card p:last-child { margin-bottom: 0; }
.ph-etape { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ph-accent); margin-bottom: .25rem; }
@media (min-width: 900px) { .ph-cours .mk-scrolly { --mk-scrolly-top: 12vh; } }

/* ---------- Exercices ---------- */
.ph-exo { background: var(--ph-lilas); border-radius: 24px; padding: 1.15rem 1rem 1rem; margin: 1.6rem 0 1rem; }
@media (min-width: 768px) { .ph-exo { padding: 1.5rem 1.5rem 1.2rem; } }
.ph-exo .ph-kicker { color: var(--ph-violet); }
.ph-exo .ph-h3 { margin-bottom: .35rem; }
.ph-exo-consigne { font-size: .96rem; line-height: 1.5; margin: 0 0 .8rem; color: var(--ph-texte); }
.ph-q { background: #fff; border-radius: 16px; padding: .85rem .9rem; margin: .6rem 0; }
.ph-q-texte { font-size: 1.02rem; font-weight: 600; color: var(--ph-encre); margin: 0 0 .65rem; line-height: 1.5; }
.ph-q-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.ph-option { min-height: 44px; padding: .5rem .95rem; border-radius: 12px; border: 1.5px solid #d7d0ec; background: #fff; font: 700 .96rem/1.25 'Outfit', system-ui, sans-serif; color: var(--ph-encre); cursor: pointer; text-align: left; }
.ph-option:hover:not(:disabled) { border-color: #9d8bd0; background: #fcfaff; }
.ph-option:focus-visible, .ph-jeton:focus-visible, .ph-bac:focus-visible, .ph-bouton:focus-visible, .ph-saisie input:focus-visible { outline: 3px solid var(--ph-encre); outline-offset: 2px; }
.ph-option:disabled { cursor: default; }
.ph-option.is-juste { background: var(--ph-menthe); border-color: var(--ph-vert); color: #14532d; }
.ph-option.is-faux { background: var(--ph-rose); border-color: var(--ph-framboise); color: #7f1d1d; }
.ph-q-retour { margin: .6rem 0 0; font-size: .94rem; line-height: 1.5; }
.ph-q-retour:empty { display: none; }
.ph-q-retour.is-juste { color: #14532d; }
.ph-q-retour.is-faux { color: #7f1d1d; }
/* Réponse chiffrée */
.ph-saisie { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ph-saisie input { width: 7.5rem; min-height: 44px; padding: .45rem .7rem; border-radius: 12px; border: 1.5px solid #cfc6e8; font: 700 1rem/1.2 'Outfit', system-ui, sans-serif; color: var(--ph-encre); background: #fff; font-variant-numeric: tabular-nums; }
.ph-saisie .ph-unite { font-weight: 700; color: var(--ph-doux); }
.ph-q.is-juste .ph-saisie input { border-color: var(--ph-vert); background: var(--ph-menthe); }
/* Tri dans des bacs */
.ph-bacs { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.ph-bac { background: #fff; border: 2px dashed #cdc3e6; border-radius: 16px; padding: .55rem .6rem .6rem; min-height: 6rem; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ph-bac.is-survol, .ph-bac.is-pret { border-color: var(--ph-violet); background: #fbf9ff; }
.ph-bac-titre { display: block; font-weight: 800; font-size: .88rem; color: var(--ph-encre); margin-bottom: .1rem; line-height: 1.3; }
.ph-bac-aide { display: block; font-size: .78rem; color: var(--ph-doux); margin-bottom: .4rem; line-height: 1.3; }
.ph-bac-zone { display: flex; flex-wrap: wrap; gap: .3rem; }
.ph-reserve { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin-top: .85rem; min-height: 46px; }
.ph-jeton { min-height: 44px; padding: .45rem .85rem; border-radius: 12px; background: #fff; border: 1.5px solid #cdc3e6; font: 700 .93rem/1.25 'Outfit', system-ui, sans-serif; color: var(--ph-encre); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; text-align: left; }
.ph-jeton[aria-pressed="true"] { border-color: var(--ph-violet); box-shadow: 0 0 0 3px rgba(91, 63, 160, .2); }
.ph-jeton.is-tire { opacity: .35; }
.ph-jeton.is-place { background: var(--ph-menthe); border-color: var(--ph-vert); color: #14532d; cursor: default; min-height: 34px; padding: .3rem .6rem; font-size: .86rem; }
.ph-jeton.is-secoue { animation: ph-secoue .38s ease; border-color: var(--ph-framboise); }
.ph-fantome { position: fixed; z-index: 99999; pointer-events: none; margin: 0; box-shadow: 0 14px 30px -12px rgba(15, 42, 58, .45); cursor: grabbing; }
@keyframes ph-secoue { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
/* Remettre dans l'ordre */
.ph-ordre-liste { list-style: none; margin: 0; padding: 0; counter-reset: pho; }
.ph-ordre-liste li { counter-increment: pho; display: flex; align-items: center; gap: .5rem; background: #fff; border: 1.5px solid #ddd6ef; border-radius: 14px; padding: .45rem .5rem .45rem .7rem; margin: 0 0 .45rem; line-height: 1.4; font-weight: 600; color: var(--ph-encre); }
.ph-ordre-liste li::before { content: counter(pho); flex: none; width: 1.6rem; height: 1.6rem; border-radius: .5rem; background: var(--ph-lilas); color: var(--ph-violet); font-weight: 800; font-size: .84rem; display: flex; align-items: center; justify-content: center; }
.ph-ordre-liste li span { flex: 1; }
.ph-ordre-fleches { flex: none; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 640px) { .ph-ordre-fleches { flex-direction: row; } }
.ph-ordre-liste li button { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid #d7d0ec; background: #fff; color: var(--ph-violet); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ph-ordre-liste li button:disabled { opacity: .3; cursor: default; }
.ph-ordre-liste li button:focus-visible { outline: 3px solid var(--ph-encre); outline-offset: 1px; }
.ph-ordre.is-juste .ph-ordre-liste li { border-color: var(--ph-vert); background: var(--ph-menthe); }
.ph-ordre-liste li.is-mal { border-color: var(--ph-framboise); }
.ph-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; align-items: center; }
.ph-bouton { min-height: 44px; padding: .55rem 1.05rem; border-radius: 12px; border: 0; background: var(--ph-encre); color: #fff; font: 800 .92rem/1.1 'Outfit', system-ui, sans-serif; cursor: pointer; }
.ph-bouton:hover { background: #1b4058; }
.ph-bouton-doux { background: transparent; color: var(--ph-encre); border: 1.5px solid #cdc3e6; }
.ph-bouton-doux:hover { background: #fff; }
.ph-exo-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .8rem; }
.ph-exo-bilan { font-weight: 800; color: var(--ph-violet); font-size: .95rem; margin: 0; }
.ph-exo-chat .mk-chat { margin: .8rem 0 0; }
.ph-exo-chat:empty { display: none; }

/* Corrigés à déplier */
.ph-corrige { background: #fff; border-radius: 16px; padding: .8rem .95rem; margin: .6rem 0; }
.ph-corrige > p { margin: 0 0 .45rem; line-height: 1.55; font-weight: 600; color: var(--ph-encre); }
.ph-corrige summary { cursor: pointer; color: var(--ph-violet); font-weight: 800; font-size: .9rem; list-style: none; min-height: 40px; display: flex; align-items: center; gap: .35rem; }
.ph-corrige summary::-webkit-details-marker { display: none; }
.ph-corrige summary::before { content: '+'; display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: .45rem; background: var(--ph-lilas); font-weight: 900; }
.ph-corrige details[open] summary::before { content: '−'; }
.ph-corrige summary:focus-visible { outline: 3px solid var(--ph-encre); outline-offset: 2px; border-radius: 6px; }
.ph-corrige details > div { margin-top: .35rem; line-height: 1.6; font-size: .95rem; background: var(--ph-fond); border-radius: 12px; padding: .65rem .8rem; }

/* ---------- Récapitulatif ---------- */
.ph-recap { list-style: none; counter-reset: phr; margin: 0; padding: 0; }
.ph-recap li { counter-increment: phr; position: relative; padding-left: 2.4rem; margin: 0 0 .8rem; line-height: 1.55; }
.ph-recap li::before { content: counter(phr); position: absolute; left: 0; top: .02rem; width: 1.7rem; height: 1.7rem; border-radius: .55rem; background: var(--ph-aqua); color: var(--ph-accent-fonce); font-weight: 800; font-size: .84rem; display: flex; align-items: center; justify-content: center; }
.ph-recap code, .ph-cours code.ph-code { font-family: 'Outfit', system-ui, sans-serif; font-weight: 800; color: var(--ph-encre); background: var(--ph-fond-2); border-radius: .4rem; padding: .05rem .35rem; white-space: nowrap; }

/* ---------- Quiz (moteur de la fiche, habillage commun) ---------- */
.ph-quiz { background: var(--ph-surface); border: 1px solid var(--ph-bord); border-radius: 24px; padding: 1rem; }
@media (min-width: 768px) { .ph-quiz { padding: 1.6rem; } }
.ph-quiz-tete { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .9rem; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ph-doux); }
.ph-quiz-tete b { color: var(--ph-accent-fonce); background: var(--ph-aqua); border-radius: 999px; padding: .2rem .6rem; letter-spacing: 0; text-transform: none; font-size: .82rem; }
.ph-quiz-q { font-size: 1.14rem; font-weight: 800; color: var(--ph-encre); line-height: 1.4; margin: 0 0 1rem; }
.ph-quiz-opts { display: grid; gap: .55rem; }
.ph-quiz-opt { display: flex; gap: .6rem; align-items: flex-start; width: 100%; min-height: 48px; text-align: left; padding: .75rem .9rem; border-radius: 14px; border: 1.5px solid var(--ph-bord); background: #fff; color: var(--ph-encre); font: 600 .98rem/1.4 'Outfit', system-ui, sans-serif; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.ph-quiz-opt:hover:not(:disabled) { border-color: var(--ph-accent); background: #f7fcfd; }
.ph-quiz-opt:focus-visible { outline: 3px solid var(--ph-encre); outline-offset: 2px; }
.ph-quiz-opt .ph-quiz-n { flex: none; width: 1.6rem; height: 1.6rem; border-radius: .5rem; background: var(--ph-fond-2); color: var(--ph-doux); font-weight: 800; font-size: .82rem; display: inline-flex; align-items: center; justify-content: center; }
.ph-quiz-opt.is-juste { background: var(--ph-menthe); border-color: var(--ph-vert); }
.ph-quiz-opt.is-faux { background: var(--ph-rose); border-color: var(--ph-framboise); }
.ph-quiz-retour { margin-top: .9rem; padding: .75rem .9rem; border-radius: 14px; font-size: .95rem; line-height: 1.55; }
.ph-quiz-retour.is-juste { background: var(--ph-menthe); color: #14532d; }
.ph-quiz-retour.is-faux { background: var(--ph-rose); color: #7f1d1d; }
.ph-quiz-fin { text-align: center; padding: .6rem 0 .2rem; }
.ph-quiz-fin .ph-quiz-score { font-size: 2.2rem; font-weight: 800; color: var(--ph-encre); margin: .2rem 0; font-variant-numeric: tabular-nums; }
.ph-quiz-fin p { margin: .25rem 0; color: var(--ph-texte); line-height: 1.5; }
.ph-quiz-fin .ph-actions { justify-content: center; margin-top: 1rem; }
.ph-quiz-fin a.ph-bouton { display: inline-flex; align-items: center; text-decoration: none; }

/* ---------- Divers ---------- */
.ph-cours .mk-chat { --mk-chat-bord: #d6e3e7; }
.ph-cours .mk-sources { color: var(--ph-texte); }
.ph-cours .mk-sources-liste { list-style: decimal; }
.ph-cours .capsule-arrow { animation: none; line-height: 0; }
.ph-cours .capsule-arrow svg { display: inline-block; }
.ph-cours .term { text-decoration-color: var(--ph-accent); }
.ph-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ph-pied { text-align: center; color: var(--ph-doux); font-size: .85rem; padding: 2rem 16px 1rem; }

@media (prefers-reduced-motion: reduce) {
    .ph-jeton.is-secoue { animation: none; }
    .ph-pastille, .ph-bac, .ph-quiz-opt { transition: none; }
}

/* ===================== Passe couleur (oct. 2026) =====================
   Couleurs communes du site (css/couleurs.css, chargé après ce fichier) : chaque partie du cours est
   une bande pastel pleine largeur, menthe et ciel en alternance (lilas et ciel pour l'astronomie).
   Scènes, cartes et questions restent blanches par-dessus ; les encarts suivent le code commun :
   définition ciel, exemple et exercice citron, piège rose, à retenir menthe, repère lilas.
   Un encart de la même famille que sa bande passe en blanc. Texte toujours foncé sur pastel (AA). */
.ph-cours {
    --ph-doux: #4f6270;              /* un cran plus foncé : 4,5:1 au moins sur toutes les bandes */
    --mk-txt-citron: #854d0e;        /* textes sur citron et menthe (les tons -f y restent sous 4,5:1) */
    --mk-txt-menthe: #166534;
}
.ph-cours main { padding-top: 18px; }
.ph-cours main > section.ph-section { padding-bottom: 2.6rem; --ph-bande: var(--mk-menthe); --ph-bord: var(--mk-menthe-m); background: var(--ph-bande); }
.ph-cours main > section.ph-section:nth-of-type(even) { --ph-bande: var(--mk-ciel); --ph-bord: var(--mk-ciel-m); }
.ph-astro main > section.ph-section { --ph-bande: var(--mk-lilas); --ph-bord: var(--mk-lilas-m); }
.ph-astro main > section.ph-section:nth-of-type(even) { --ph-bande: var(--mk-ciel); --ph-bord: var(--mk-ciel-m); }
.ph-cours main > section.ph-section + section.ph-section { padding-top: 3rem; }

/* Cartes et scènes : blanches, bord dans le ton de la bande, plus d'ombre décorative */
.ph-scene { border-width: 1.5px; box-shadow: none; }
.ph-cours .mk-step-card { border-width: 1.5px; box-shadow: none; }
.ph-cours .mk-scrolly-graphic { border-width: 1.5px; }
.ph-carte, .ph-duo > div, .ph-figure, .ph-quiz, .ph-tableau-wrap { border-width: 1.5px; }

/* Encarts au code commun */
.ph-def { background: var(--mk-ciel); border: 1.5px solid var(--mk-ciel-m); }
.ph-def > b:first-child { color: var(--mk-ciel-f); }
.ph-exemple { background: var(--mk-citron); border: 1.5px solid var(--mk-citron-m); }
.ph-exemple > b:first-child { color: var(--mk-txt-citron); }
.ph-piege { background: var(--mk-rose); border: 1.5px solid var(--mk-rose-m); }
.ph-piege > b:first-child { color: var(--mk-rose-f); }
.ph-note, .ph-limite { background: var(--mk-lilas); border: 1.5px solid var(--mk-lilas-m); }
.ph-note > b:first-child, .ph-limite > b:first-child { color: var(--mk-lilas-f); }
.ph-formule { background: var(--mk-menthe); border: 1.5px solid var(--mk-menthe-m); }
.ph-formule dt { color: var(--mk-txt-menthe); }
.ph-carte { background: var(--mk-menthe); border-color: var(--mk-menthe-m); }
.ph-recap li::before { background: #fff; color: var(--mk-txt-menthe); border: 1.5px solid var(--mk-menthe-m); }
.ph-liste li::before { background: var(--ph-accent); opacity: 1; }
/* Même famille que la bande : l'encart passe en blanc (il garde son bord et son titre colorés) */
.ph-cours main > section.ph-section:nth-of-type(odd) .ph-formule,
.ph-cours main > section.ph-section:nth-of-type(odd) .ph-carte,
.ph-cours main > section.ph-section:nth-of-type(even) .ph-def,
.ph-astro main > section.ph-section:nth-of-type(odd) .ph-note,
.ph-astro main > section.ph-section:nth-of-type(odd) .ph-limite { background: #fff; }
.ph-astro main > section.ph-section:nth-of-type(odd) .ph-formule,
.ph-astro main > section.ph-section:nth-of-type(odd) .ph-carte { background: var(--mk-menthe); }

/* Scènes : la phrase qui explique sur un panneau pastel (couleur de la bande), boutons d'état teintés */
.ph-scene .ph-legende { background: var(--ph-bande, var(--mk-ciel)); border-radius: 14px; padding: .35rem .65rem; margin-left: 0; margin-right: 0; }
.ph-pastille { background: color-mix(in srgb, var(--c, #0e7490) 9%, #fff); color: color-mix(in srgb, var(--c, #0b5a70) 62%, #000); }
.ph-pastille[aria-pressed="true"] { background: color-mix(in srgb, var(--c, #0e7490) 72%, #000); border-color: color-mix(in srgb, var(--c, #0e7490) 72%, #000); color: #fff; }
.ph-scene-etat { background: var(--mk-ciel); color: var(--mk-ciel-f); }
.ph-scene-etat.is-alerte { background: var(--mk-rose); color: var(--mk-rose-f); }

/* Exercices : conteneur citron (code « exercice »), options ciel, juste menthe, faux rose */
.ph-exo { background: var(--mk-citron); border: 1.5px solid var(--mk-citron-m); }
.ph-exo .ph-kicker { color: var(--mk-txt-citron); }
.ph-exo-bilan { color: var(--mk-txt-citron); }
.ph-option { background: var(--mk-ciel); border-color: var(--mk-ciel-m); }
.ph-option:hover:not(:disabled) { background: var(--mk-ciel-m); border-color: #8fb8e8; }
.ph-option.is-juste { background: var(--mk-menthe); border-color: var(--mk-menthe-f); color: var(--mk-txt-menthe); }
.ph-option.is-faux { background: var(--mk-rose); border-color: var(--mk-rose-f); color: #9d174d; }
.ph-q-retour.is-juste { color: var(--mk-txt-menthe); }
.ph-q-retour.is-faux { color: #9d174d; }
.ph-saisie input { background: var(--mk-ciel); border-color: var(--mk-ciel-m); }
.ph-q.is-juste .ph-saisie input { border-color: var(--mk-menthe-f); background: var(--mk-menthe); }
.ph-bac { background: var(--mk-ciel); border-color: #9cc3ee; }
.ph-bac.is-survol, .ph-bac.is-pret { border-color: var(--mk-ciel-f); background: var(--mk-ciel-m); }
.ph-jeton { border-color: var(--mk-ciel-m); }
.ph-jeton[aria-pressed="true"] { border-color: var(--mk-ciel-f); box-shadow: 0 0 0 3px rgba(29, 78, 216, .2); }
.ph-jeton.is-place { background: var(--mk-menthe); border-color: var(--mk-menthe-f); color: var(--mk-txt-menthe); }
.ph-ordre-liste li { border-color: var(--mk-ciel-m); }
.ph-ordre-liste li::before { background: var(--mk-ciel); color: var(--mk-ciel-f); }
.ph-ordre-liste li button { border-color: var(--mk-ciel-m); color: var(--mk-ciel-f); }
.ph-ordre.is-juste .ph-ordre-liste li { border-color: var(--mk-menthe-f); background: var(--mk-menthe); }
.ph-ordre-liste li.is-mal { border-color: var(--mk-rose-f); background: var(--mk-rose); }
.ph-bouton-doux { border-color: var(--mk-citron-m); }
.ph-corrige summary { color: var(--mk-txt-citron); }
.ph-corrige summary::before { background: var(--mk-citron-m); }
.ph-corrige details > div { background: var(--mk-menthe); }

/* Quiz : options ciel, juste menthe, faux rose */
.ph-quiz-opt { background: var(--mk-ciel); border-color: var(--mk-ciel-m); }
.ph-quiz-opt:hover:not(:disabled) { background: var(--mk-ciel-m); border-color: #8fb8e8; }
.ph-quiz-opt .ph-quiz-n { background: #fff; color: var(--mk-ciel-f); }
.ph-quiz-opt.is-juste { background: var(--mk-menthe); border-color: var(--mk-menthe-f); }
.ph-quiz-opt.is-faux { background: var(--mk-rose); border-color: var(--mk-rose-f); }
.ph-quiz-retour.is-juste { background: var(--mk-menthe); color: #14532d; }
.ph-quiz-retour.is-faux { background: var(--mk-rose); color: #831843; }

@media print {
    .ph-cours main > section.ph-section { background: none; }
}
