/* Les Blocs de Pi : même vert que le reste du site (#16855a, #5cc79a) */
#features.bp-section { padding-top: 1em; }
.bp-outil { max-width: 76em; width: 100%; box-sizing: border-box; margin: 0 auto; text-align: left; }
.bp { position: relative; font-family: 'Nunito', 'Segoe UI', Arial, sans-serif; color: #444; -webkit-user-select: none; user-select: none; }
.bp [hidden] { display: none !important; }
.bp h2, .bp h3, .bp b, .bp-go, .bp-btn, .bp-rep { font-family: 'Fredoka', 'Nunito', sans-serif; }
.bp h2 { margin: 0 0 .4em; color: #16855a; font-size: 1.6em; line-height: 1.2; }
.bp h3 { margin: 1.3em 0 .6em; color: #16855a; font-size: 1.05em; text-align: center; letter-spacing: .04em; }
.bp [role="button"] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bp [role="button"]:focus-visible { outline: 3px solid #f2b01e; outline-offset: 2px; }
.bp-rgpd { text-align: center; color: #999; font-size: .85em; margin: 1em 0 0; }
.bp-ecran { background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1em 1.2em 1.4em; }
.bp-info { color: #888; text-align: center; font-size: .95em; }
.bp-bts { display: flex; flex-wrap: wrap; gap: .8em; justify-content: center; margin-top: 1.2em; }
.bp-go { display: inline-flex; align-items: center; gap: .4em; padding: .7em 1.4em; border-radius: .8em; background: #16855a; color: #fff; font-weight: 600; font-size: 1.02em; box-shadow: 0 .2em 0 #0e5c3d; }
.bp-go:hover { background: #127048; }
.bp-go:active { transform: translateY(.15em); box-shadow: 0 .05em 0 #0e5c3d; }
.bp-go2 { background: #fff; color: #16855a; border: 2px solid #16855a; box-shadow: none; }
.bp-go2:hover { background: #eaf7f1; }
.bp-mini { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4em; height: 2.4em; padding: 0 .7em; border-radius: 1.2em; background: #f3f5f4; color: #555; font-weight: 700; }
.bp-mini:hover { background: #eaf7f1; color: #16855a; }

/* Accueil */
.bp-intro { display: flex; align-items: center; gap: 1.2em; max-width: 52em; margin: 0 auto; }
.bp-intro p { line-height: 1.6; margin: 0; }
.bp-portrait { width: 160px; height: 120px; flex: none; border-radius: 1em; background: #1d2b3f; }
.bp-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14em, 1fr)); gap: .8em; }
.bp-tuile { display: flex; flex-direction: column; gap: .2em; padding: .85em 1em; border: 2px solid #e5e5e5; border-radius: 1em; color: #777; line-height: 1.4; text-align: center; transition: border-color .2s, transform .15s; }
.bp-tuile b { color: #16855a; font-size: 1.12em; font-weight: 600; }
.bp-tuile span { font-size: .88em; }
.bp-tuile:hover { border-color: #5cc79a; transform: translateY(-2px); }
.bp-tuile.actif { border-color: #16855a; box-shadow: 0 0 0 3px #d4efe3; background: #f6fcf9; }
.bp-classes, .bp-chronos { grid-template-columns: repeat(4, 1fr); }
.bp-classe b { font-size: 1.5em !important; }
.bp-joueurs { grid-template-columns: repeat(2, 1fr); max-width: 36em; margin: 0 auto; }
.bp-mondes { grid-template-columns: repeat(2, 1fr); }
.bp-monde-t { border-left: .6em solid var(--c); gap: .3em; }
.bp-themes { font-size: .8em; color: #888; line-height: 1.4; }
.bp-et { color: #f2b01e; letter-spacing: .1em; font-size: 1.15em !important; }
.bp-et i { color: #ddd; font-style: normal; }
.bp-regles { max-width: 52em; margin: 0 auto; }
.bp-regles ul { margin: 0; padding-left: 1.2em; line-height: 1.6; }
.bp-regles li { margin-bottom: .35em; list-style: disc; }

/* Le jeu */
.bp-hud { display: flex; flex-wrap: wrap; align-items: center; gap: .4em 1.1em; padding: .5em .8em; margin-bottom: .6em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1em; font-weight: 700; color: #333; }
.bp-titre { color: #16855a; font-family: 'Fredoka', 'Nunito', sans-serif; }
.bp-droite { margin-left: auto; display: flex; gap: .4em; }
.bp-aire { position: relative; display: flex; flex-wrap: nowrap; justify-content: center; gap: 1em 2em; }
.bp-duo .bp-aire { gap: 1em; }
.bp-joueur { display: flex; flex-wrap: nowrap; gap: .8em; align-items: flex-start; min-width: 0; }
.bp-gauche { display: flex; flex-direction: column; align-items: center; }
.bp-cadre { position: relative; border-radius: .8em; overflow: hidden; border: 3px solid var(--c, #16855a); background: #1d2b3f; line-height: 0; }
.bp-toile { display: block; height: min(calc(100vh - 11em), 40em); aspect-ratio: 1 / 2; }
.tactile .bp-toile { height: min(calc(100vh - 17em), 36em); }
.bp-duo .bp-toile { height: min(calc(100vh - 11em), 34em); }
.tactile.bp-duo .bp-toile { height: min(calc(100vh - 17em), 30em); }
.bp-panneau { width: clamp(11em, 28vw, 17em); flex: none; display: flex; flex-direction: column; gap: .6em; }
.bp-duo .bp-panneau { width: clamp(9.5em, 16vw, 14.5em); }
.bp-boite { background: #fff; border: 2px solid #e5e5e5; border-radius: 1em; padding: .5em .7em; }
.bp-nom { font: 700 1.05em 'Fredoka', 'Nunito', sans-serif; color: var(--c, #16855a); text-align: center; }
.bp-suiv { display: flex; align-items: center; gap: .6em; }
.bp-suiv canvas { width: 72px; height: 72px; flex: none; border-radius: .6em; background: #1d2b3f; }
.bp-suiv div { font-size: .85em; line-height: 1.3; color: #666; }
.bp-suiv b { display: block; color: #333; font-size: 1.05em; }
.bp-effet.reset b { color: #16855a; } .bp-effet.crit b { color: #d48c00; } .bp-effet.ko b { color: #c0392b; }
.bp-bonus { display: grid; gap: .3em; font-size: .85em; }
.bp-jauge { display: grid; grid-template-columns: 4.6em 1fr auto; align-items: center; gap: .5em; }
.bp-jauge span { font-weight: 700; color: #555; white-space: nowrap; }
.bp-jauge > div { height: .7em; border-radius: 1em; background: #eef1ef; overflow: hidden; }
.bp-jauge > div > div { height: 100%; border-radius: 1em; background: linear-gradient(90deg, #f2b01e, #ffd95e); transition: width .3s; }
.bp-serie > div > div { background: linear-gradient(90deg, #e0524d, #ff9a5e); }
.bp-jauge b { color: #333; font-size: .95em; }
.bp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .1em .6em; font-size: .9em; }
.bp-stats b { color: #16855a; }
.bp-q { border-top: .35em solid #f2b01e; }
.bp-q-haut { display: flex; flex-wrap: wrap; gap: .2em .6em; align-items: center; font-size: .8em; font-weight: 700; color: #777; }
.bp-etoiles { color: #f2b01e; letter-spacing: .1em; }
.bp-th { margin-left: auto; padding: .05em .6em; border-radius: 1em; background: #eaf7f1; color: #16855a; }
.bp-enonce { font: 600 1.3em/1.35 'Fredoka', 'Nunito', sans-serif; color: #222; text-align: center; margin: .4em 0; }
.bp-duo .bp-enonce { font-size: 1.15em; }
.bp-enonce small { display: block; font: 400 .6em/1.4 'Nunito', sans-serif; color: #888; margin-top: .3em; }
.bp-reps { display: grid; gap: .4em; }
.bp-rep { position: relative; display: flex; align-items: center; justify-content: center; min-height: 2.3em; padding: .2em .5em .2em 2em; border: 2px solid #16855a; border-radius: .7em; background: #f6fcf9; color: #16855a; font-weight: 600; font-size: 1.1em; box-shadow: 0 .15em 0 #16855a; }
.bp-rep:hover { background: #eaf7f1; }
.bp-rep:active { transform: translateY(.12em); box-shadow: none; }
.bp-rep i { position: absolute; left: .45em; top: 50%; transform: translateY(-50%); min-width: 1.35em; height: 1.35em; border-radius: .4em; background: #16855a; color: #fff; font: 700 .7em/1.35em 'Nunito', sans-serif; font-style: normal; text-align: center; }
.bp-rep.bon { background: #16855a; color: #fff; }
.bp-rep.faux { border-color: #c0392b; color: #c0392b; background: #fdeeee; box-shadow: none; }
.bp-chrono { position: relative; height: 1.4em; margin: .2em 0 .4em; border-radius: 1em; background: #eef1ef; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06); }
.bp-chrono > div { height: 100%; width: 100%; background: #16855a; border-radius: 1em; }
.bp-chrono.crit > div { background: linear-gradient(90deg, #f2b01e, #ffd95e); }
.bp-chrono.urgent > div { background: #e0524d; }
.bp-chrono span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8em; color: #222; }
.bp-verdict { text-align: center; font: 700 1.2em 'Fredoka', sans-serif; margin: .3em 0; }
.bp-verdict.ok { color: #16855a; } .bp-verdict.ko { color: #c0392b; } .bp-verdict.crit { color: #d48c00; }
.bp-correction { background: #f6fcf9; border-left: 4px solid #5cc79a; border-radius: .5em; padding: .4em .7em; line-height: 1.5; color: #333; font-size: .9em; }
.bp-attente { text-align: center; color: #999; font-size: .85em; margin: .3em 0 0; }
.bp-voile { position: absolute; inset: 0; z-index: 5; background: rgba(30, 50, 40, .45); display: flex; align-items: center; justify-content: center; line-height: 1.4; border-radius: 1em; }
.bp-voile > div { background: #fff; border-radius: 1em; padding: 1em 1.6em; display: flex; flex-direction: column; gap: .7em; align-items: center; font-size: 1.2em; }
.bp-aide { text-align: center; color: #999; font-size: .85em; margin: .6em 0 0; }
.tactile .bp-aide { display: none; }
.bp-pad { display: none; justify-content: center; gap: .4em; margin-top: .5em; touch-action: none; }
.tactile .bp-pad { display: flex; }
.bp-btn { flex: 1 1 0; min-width: 0; max-width: 3.2em; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f3f5f4; border: 2px solid #d5dad7; color: #16855a; font-size: 1.3em; box-shadow: 0 .2em 0 #d5dad7; touch-action: none; cursor: pointer; }
.bp-btn.on { background: #d4efe3; transform: translateY(.12em); box-shadow: none; }
.bp-btn.fort { background: #16855a; border-color: #0e5c3d; color: #fff; box-shadow: 0 .2em 0 #0e5c3d; }
.bp-duo .bp-btn { max-width: 2.7em; font-size: 1.1em; }

/* Fin de partie */
.bp-fin { text-align: center; padding: 2em 1em; }
.bp-grand-et { font-size: 2.6em; }
.bp-bilans { display: flex; flex-wrap: wrap; justify-content: center; gap: 1em 3em; }
.bp-bilan { display: inline-block; text-align: left; margin: .5em 0; padding: 0; line-height: 1.9; font-size: 1.1em; }
.bp-bilan li { list-style: none; }
.bp-bilan h3 { margin: .3em 0; text-align: left; }

/* Fractions, puissances, racines des questions */
.bp .tn-f { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .12em; line-height: 1.1; }
.bp .tn-f > span { padding: 0 .2em; }
.bp .tn-f > span:first-child { border-bottom: .08em solid currentColor; }
.bp .tn-rac { border-top: .08em solid currentColor; padding: 0 .1em; }
.bp sup { font-size: .6em; vertical-align: super; line-height: 0; }

#bp-toast { position: fixed; left: 50%; bottom: 1.5em; transform: translate(-50%, 1em); z-index: 10001; background: #333; color: #fff; padding: .6em 1.1em; border-radius: .8em; max-width: 90%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
#bp-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Plein écran (tablette projetée) */
.bp-outil:fullscreen { background: #fff; max-width: none; padding: .8em; overflow: auto; display: flex; flex-direction: column; justify-content: center; }
.bp-outil:fullscreen .bp-rgpd { display: none; }
.bp-outil:fullscreen .bp-toile { height: calc(100vh - 7.5em); }
.bp-outil:fullscreen .tactile .bp-toile { height: calc(100vh - 13em); }
.bp-outil:fullscreen .bp-ecran { max-height: calc(100vh - 2em); overflow: auto; }

@media (max-width: 640px) {
	.bp-intro { flex-direction: column; text-align: center; }
	.bp-classes, .bp-chronos, .bp-mondes { grid-template-columns: 1fr 1fr; }
}
