/* Fractions : du partage au nombre — rose « crayon », parts aux couleurs des crayons */
#features.pa-section { padding-top: 1em; }
.pa-outil { max-width: 72em; margin: 0 auto; text-align: left; --c: #c23b5c; --cl: #fbeaef; }
.pa-outil *:focus-visible { outline: 3px solid #f2b01e; outline-offset: 2px; }
.pa-outil:fullscreen { background: #fff; padding: 1em 2em; overflow: auto; max-width: none; }
.pa-outil:-webkit-full-screen { background: #fff; padding: 1em 2em; overflow: auto; max-width: none; }
.pa-carte { background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1em 1.2em 1.2em; }

/* Onglets */
.pa-onglets { display: flex; flex-wrap: wrap; gap: .5em; justify-content: center; margin-bottom: .6em; }
.pa-onglet { padding: .45em 1.1em; border: 2px solid #e5e5e5; border-radius: .8em; background: #fff; color: #666; cursor: pointer; font: 600 1em/1.3 'Fredoka', 'Nunito', sans-serif; -webkit-user-select: none; user-select: none; }
.pa-onglet:hover { border-color: var(--c); }
.pa-onglet.actif { background: var(--c); border-color: var(--c); color: #fff; }

/* La vue */
/* Hauteur fixe : la figure grandit ou rétrécit dedans, les boutons dessous ne bougent jamais */
.pa-vue { display: flex; justify-content: center; align-items: center; height: min(44vh, 24em); box-sizing: border-box; padding: .6em; background: radial-gradient(ellipse at 50% 40%, #fff 40%, #fbf5f7); border-radius: .8em; }
.pa-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pa-outil:fullscreen .pa-vue { height: 58vh; }
.pa-outil:-webkit-full-screen .pa-vue { height: 58vh; }
/* Plein écran : plein-ecran.js réduit tout si ça dépasse ; hauteur réservée (plus haute zone mesurée : 23em) pour que la réduction ne change pas à chaque clic */
.pa-outil:fullscreen.pa-m-partager .pa-zone, .pa-outil:fullscreen.pa-m-nombre .pa-zone { min-height: 24em; }
.pa-outil:-webkit-full-screen.pa-m-partager .pa-zone, .pa-outil:-webkit-full-screen.pa-m-nombre .pa-zone { min-height: 24em; }
/* Activité en plein écran (l'élève ne quitte pas l'outil, réglages compris) : réglages tassés en haut, la figure prend la hauteur qui reste :
   tout tient sans réduction ; pendant un défi la hauteur ne change pas (place du message réservée, « Défi suivant » à la place de « Valider ») */
.pa-outil:fullscreen.pa-m-activite { display: flex; flex-direction: column; }
.pa-outil:fullscreen.pa-m-activite .pa-reglages:not([hidden]) { order: -1; margin: 0 0 .6em; padding: .5em 1em; display: flex; flex-wrap: wrap; justify-content: center; gap: .4em 2em; font-size: .9em; }
.pa-outil:fullscreen.pa-m-activite .pa-groupe .pa-titre { flex: none; }
.pa-outil:fullscreen.pa-m-activite .pa-carte { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.pa-outil:fullscreen.pa-m-activite .pa-vue { flex: 1 1 0; height: auto; min-height: 8em; }
/* Plein écran de l'activité : la place réservée sert à agrandir la question */
.pa-outil:fullscreen .pa-consigne { font-size: 1.7em; }
.pa-outil:fullscreen .pa-etape, .pa-outil:fullscreen .pa-retour { font-size: 1.3em; }
.pa-outil:fullscreen .pa-moyen { font-size: 2.4em; }
.pa-outil:fullscreen .pa-nb, .pa-outil:fullscreen .pa-den { font-size: 2em; }
.pa-outil:fullscreen .pa-op { font-size: 2.3em; }
.pa-outil:fullscreen .pa-cache .pa-grand { font-size: 7em; }
.pa-part { fill: #fff; stroke: #3a3f47; stroke-width: .025; transition: fill .15s; }
.pa-on { fill: var(--pc); }
.pa-clic .pa-part { cursor: pointer; }
.pa-clic .pa-part:not(.pa-on):hover { fill: #f4eee4; }
.pa-bord { fill: none; stroke: #33373d; stroke-width: .05; pointer-events: none; }
.pa-axe, .pa-grad { stroke: #333; stroke-width: .035; }
.pa-grad-g { stroke-width: .055; }
.pa-fleche { fill: #333; }
.pa-t { font: 600 .3px 'Fredoka', 'Nunito', sans-serif; text-anchor: middle; fill: #333; stroke: #fff; stroke-width: .08; paint-order: stroke; }
.pa-gauche { text-anchor: start; }
.pa-fs line { stroke: #333; stroke-width: .03; }
.pa-arc { fill: none; stroke: var(--c); stroke-width: .035; }
.pa-qpart { fill: #fff; stroke: #3a3f47; stroke-width: .025; }
.pa-qpart.pa-on { fill: var(--pc); }
.pa-unite { stroke: #33373d; stroke-width: .05; }
.pa-tir { stroke: #888; stroke-width: .03; stroke-dasharray: .1 .07; }
.pa-zone { fill: transparent; cursor: pointer; }
.pa-zone:hover { fill: rgba(194, 59, 92, .1); }
.pa-pt { fill: var(--c); stroke: #fff; stroke-width: .04; }
.pa-pok { fill: #2e9e4f; } .pa-pko { fill: #d62828; }
.pa-score { font: 700 2.6em/1.2 'Fredoka', 'Nunito', sans-serif; color: var(--c); text-align: center; margin: 0; }
.pa-score small { display: block; font-size: .45em; color: #555; }
.pa-cache { margin: 0; }

/* Fractions écrites */
.pa-f { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.15; font-weight: 700; margin: 0 .12em; }
.pa-f > span:first-child { border-bottom: 2px solid currentColor; padding: 0 .25em; }
.pa-grand { font: 700 2.6em/1.1 'Fredoka', 'Nunito', sans-serif; color: var(--c); }
.pa-grand > span:first-child { border-bottom-width: .07em; }
.pa-moyen { font: 700 1.6em/1.1 'Fredoka', 'Nunito', sans-serif; }
.pa-mystere { justify-content: center; }
.pa-resultat { text-align: center; margin: .6em 0 .2em; }
.pa-lettres { margin: .2em 0 0; color: #666; font-style: italic; }
.pa-calc { margin: .3em 0 0; color: #444; }
.pa-egal { color: #2f63b3; }
.pa-calculs { margin: .6em auto 0; max-width: 44em; background: var(--cl); border-radius: 1em; padding: .6em 1.2em; color: #333; }
.pa-calculs p { margin: .35em 0; }

/* Boutons, puces */
.pa-ligne { display: flex; flex-wrap: wrap; gap: .45em; justify-content: center; align-items: center; margin: .6em 0; }
.pa-haut { margin: .5em 0 0; }
.pa-titre { font-weight: 700; color: var(--c); margin-right: .2em; }
.pa-puce, .pa-bt-p { padding: .4em .95em; border: 2px solid #e5e5e5; border-radius: .8em; background: #fff; color: #555; cursor: pointer; font: 600 .95em/1.3 'Fredoka', 'Nunito', sans-serif; -webkit-user-select: none; user-select: none; }
.pa-puce:hover { border-color: var(--c); }
.pa-puce.actif { background: var(--cl); border-color: var(--c); color: var(--c); }
.pa-puce .icon, .pa-lien .icon, .pa-bt-p .icon { margin-right: .2em; }
.pa-bt-p { background: var(--c); border-color: var(--c); color: #fff; }
.pa-bt-p:hover { filter: brightness(1.1); }
.pa-lien { cursor: pointer; color: #666; font-weight: 600; margin: 0 .4em; -webkit-user-select: none; user-select: none; }
.pa-lien .icon { color: var(--c); }
.pa-bt.off { opacity: .4; cursor: default; pointer-events: none; }
.pa-sep { width: 1.2em; }
.pa-pm { display: inline-flex; align-items: center; gap: .35em; }
.pa-pm b { font: 700 1.3em 'Fredoka', 'Nunito', sans-serif; min-width: 1.6em; text-align: center; color: #333; }
.pa-aide { text-align: center; color: #888; font-size: .9em; margin: .2em 0; }

/* Activité élève */
.pa-progres { display: flex; justify-content: center; gap: .35em; margin: .5em 0 .2em; }
.pa-pt-p { width: .9em; height: .9em; border-radius: 50%; background: #e5e5e5; }
.pa-pt-p.cur { box-shadow: 0 0 0 3px var(--c); }
.pa-pt-p.r2 { background: #3fa45b; } .pa-pt-p.r1 { background: #f2b01e; } .pa-pt-p.r0 { background: #e05656; }
.pa-etape { text-align: center; color: var(--c); font-weight: 700; margin: .3em 0 0; }
.pa-consigne { text-align: center; font-size: 1.1em; color: #333; margin: .3em 0; }
.pa-nb { font: 700 1.4em 'Fredoka', 'Nunito', sans-serif; width: 3.4em !important; text-align: center; padding: .15em; border: 2px solid #ccd; border-radius: .6em; height: auto !important; }
.pa-saisie { display: inline-flex; flex-direction: column; align-items: center; gap: .25em; vertical-align: middle; margin: 0 .3em; }
.pa-barre { width: 100%; border-top: 3px solid #333; }
.pa-den { font: 700 1.4em 'Fredoka', 'Nunito', sans-serif; }
.pa-op { font: 700 1.6em 'Fredoka', 'Nunito', sans-serif; color: #555; margin: 0 .2em; }
.pa-retour { text-align: center; margin: .4em 0; color: #444; min-height: 3.2em; }   /* place réservée : le message n'écarte rien */
.pa-bien { color: #2e8b4a; } .pa-mal { color: #c0392b; }

/* Réglages de l'activité et code */
.pa-reglages { margin: 1em auto 0; display: grid; gap: .6em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1em 1.2em; }
.pa-reglages[hidden] { display: none; }
.pa-groupe { display: flex; flex-wrap: wrap; gap: .45em; justify-content: center; align-items: center; }
.pa-groupe .pa-titre { flex: 1 1 100%; text-align: center; }
.pa-code-zone { margin: 1.2em auto 0; display: grid; gap: .8em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1em 1.2em; text-align: left; }
.pa-code-zone .cc-bloc > span:first-child { display: block; font-weight: 600; color: #555; margin-bottom: .4em; }
.pa-code-zone:empty, .pa-outil:fullscreen .pa-code-zone { display: none; }
@media (prefers-reduced-motion: reduce) { .pa-part { transition: none; } }
/* Dans les figures, le contour de focus du navigateur serait agrandi par le viewBox (énorme disque noir) : liseré dessiné à la place */
.pa-svg *, .pa-svg *:focus, .pa-svg *:focus-visible { outline: none !important; }
.pa-svg .pa-part:focus-visible, .pa-svg .pa-zone:focus-visible { stroke: #f2b01e; stroke-width: .07; }
