/* Klass'Up Maths — un style par année : y6 (Stickers BD), y5 (Clair et coloré), y4 (Néon), y3 (Sobre). */
@font-face { font-family: 'Unbounded'; font-weight: 400; font-display: swap; src: url(/fonts/unbounded/unbounded-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Unbounded'; font-weight: 600; font-display: swap; src: url(/fonts/unbounded/unbounded-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Unbounded'; font-weight: 800; font-display: swap; src: url(/fonts/unbounded/unbounded-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url(/fonts/manrope/manrope-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url(/fonts/manrope/manrope-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url(/fonts/manrope/manrope-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bowlby One'; font-weight: 400; font-display: swap; src: url(/fonts/bowlby/bowlby-one-latin-400-normal.woff2) format('woff2'); }

/* ---------- Variables par année ---------- */
body.y6 {
  --bg: #FFF3D6; --bg-img: radial-gradient(#E8D6A8 1.5px, transparent 1.5px); --bg-size: 18px 18px;
  --ink: #111111; --muted: #4A3F2A; --card: #FFFFFF; --card-ink: #111111; --border: 3px solid #111111; --shadow: 4px 4px 0 #111111; --radius: 16px;
  --accent: #FFE14D; --accent-ink: #111111; --accent2: #4DD9FF; --accent2-ink: #111111; --boss: #111111; --boss-ink: #FFE14D;
  --good: #7CF07C; --bad: #FF5FA2; --track: #FFFFFF; --track-border: 3px solid #111111; --fill: #7CF07C;
  --title: 'Bowlby One', sans-serif; --title-w: 400; --title-tt: uppercase;
  --c1: #FF5FA2; --c2: #FFE14D; --c3: #4DD9FF; --c4: #7CF07C; --c5: #FF8A3D; --c6: #C9A7FF; --c7: #FFD1E3; --c-ink: #111111;
  --tilt: 1; --nav-bg: #FFFFFF; --nav-on: #FFE14D; --input-bg: #FFFFFF; --fig-fill: #FFFFFF; --fig-acc: #FF5FA2; --grid: #E5D7B5; --focus: #111111;
}
body.y5 {
  --bg: #FFF9F0; --bg-img: none; --bg-size: auto;
  --ink: #1A1A2E; --muted: #5B5E78; --card: #FFFFFF; --card-ink: #1A1A2E; --border: 1px solid #F0E6D6; --shadow: 0 6px 18px rgba(26,26,46,.08); --radius: 20px;
  --accent: #2F6BFF; --accent-ink: #FFFFFF; --accent2: #FFC93C; --accent2-ink: #1A1A2E; --boss: #FF6B5B; --boss-ink: #1A1A2E;
  --good: #2EC4A6; --bad: #FF6B5B; --track: #F0E6D6; --track-border: 0; --fill: #FFC93C;
  --title: 'Unbounded', sans-serif; --title-w: 800; --title-tt: none;
  --c1: #2F6BFF; --c2: #FF6B5B; --c3: #FFC93C; --c4: #2EC4A6; --c5: #9B6BFF; --c6: #1A1A2E; --c7: #FF9F45; --c-ink: #FFFFFF;
  --tilt: 0; --nav-bg: #FFFFFF; --nav-on: #2F6BFF; --input-bg: #FFFFFF; --fig-fill: #EEF3FF; --fig-acc: #2F6BFF; --grid: #EFE7DA; --focus: #2F6BFF;
}
body.y4 {
  --bg: #14162E; --bg-img: none; --bg-size: auto;
  --ink: #F4F2EC; --muted: #C5C8EC; --card: #1E2147; --card-ink: #F4F2EC; --border: 1.5px solid #2C3166; --shadow: none; --radius: 18px;
  --accent: #C9F73A; --accent-ink: #14162E; --accent2: #7C5CFF; --accent2-ink: #14162E; --boss: #FF8A3D; --boss-ink: #14162E;
  --good: #C9F73A; --bad: #FF6B8A; --track: #2C3166; --track-border: 0; --fill: #C9F73A;
  --title: 'Unbounded', sans-serif; --title-w: 800; --title-tt: none;
  --c1: #1E2147; --c2: #1E2147; --c3: #1E2147; --c4: #1E2147; --c5: #1E2147; --c6: #1E2147; --c7: #1E2147; --c-ink: #F4F2EC;
  --tilt: 0; --nav-bg: #1E2147; --nav-on: #C9F73A; --input-bg: #14162E; --fig-fill: #262A57; --fig-acc: #C9F73A; --grid: #2C3166; --focus: #C9F73A;
}
body.y3 {
  --bg: #0F1024; --bg-img: none; --bg-size: auto;
  --ink: #ECEBF5; --muted: #A9ABCF; --card: #181A38; --card-ink: #ECEBF5; --border: 1px solid #2A2D55; --shadow: none; --radius: 12px;
  --accent: #9D86FF; --accent-ink: #0F1024; --accent2: #2A2D55; --accent2-ink: #ECEBF5; --boss: #9D86FF; --boss-ink: #0F1024;
  --good: #7FE0B5; --bad: #FF8FA3; --track: #2A2D55; --track-border: 0; --fill: #9D86FF;
  --title: 'Unbounded', sans-serif; --title-w: 400; --title-tt: none;
  --c1: #181A38; --c2: #181A38; --c3: #181A38; --c4: #181A38; --c5: #181A38; --c6: #181A38; --c7: #181A38; --c-ink: #ECEBF5;
  --tilt: 0; --nav-bg: #0F1024; --nav-on: #ECEBF5; --input-bg: #0F1024; --fig-fill: #1F2245; --fig-acc: #9D86FF; --grid: #23264A; --focus: #B9A8FF;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background-color: var(--bg); background-image: var(--bg-img); background-size: var(--bg-size); color: var(--ink); font-family: 'Manrope', system-ui, sans-serif; font-size: 16px; line-height: 1.45; transition: background-color .5s; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.screen { flex: 1; padding: 20px 16px 110px; display: flex; flex-direction: column; gap: 16px; }
.screen.nonav { padding-bottom: 32px; }
.title { font-family: var(--title); font-weight: var(--title-w); text-transform: var(--title-tt); margin: 0; line-height: 1.1; }
h1.title { font-size: 26px; }
h2.title { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
body.y6 .label, body.y5 .label { color: var(--ink); }
body.y5 .label { color: var(--accent); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hidden { display: none !important; }

.card { background: var(--card); color: var(--card-ink); border: var(--border); box-shadow: var(--shadow); border-radius: var(--radius); padding: 16px; }
body.y6 .card.tilt-l { transform: rotate(-1deg); }
body.y6 .card.tilt-r { transform: rotate(1deg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 20px; border-radius: var(--radius); border: var(--border); box-shadow: var(--shadow); background: var(--accent); color: var(--accent-ink); font-family: var(--title); font-weight: var(--title-w); text-transform: var(--title-tt); font-size: 15px; text-decoration: none; transition: transform .1s; }
body.y4 .btn, body.y5 .btn { border: 0; }
body.y3 .btn { border: 1px solid var(--accent); }
.btn:active { transform: translateY(2px); }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.ghost { background: transparent; color: var(--ink); }
body.y6 .btn.ghost { background: #FFFFFF; }
.btn.alt { background: var(--accent2); color: var(--accent2-ink); }
.btn.boss { background: var(--boss); color: var(--boss-ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; background: var(--card); border: var(--border); color: var(--card-ink); }
body.y6 .chip { background: #FF8A3D; box-shadow: 3px 3px 0 #111; }
body.y5 .chip { background: #FFC93C; border: 0; }
.chip svg { width: 16px; height: 16px; }
a.chip { text-decoration: none; }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: var(--border); background: var(--card); color: var(--card-ink); padding: 0; overflow: hidden; }
body.y6 .iconbtn { box-shadow: 3px 3px 0 #111; }

/* barres */
.track { height: 10px; border-radius: 999px; background: var(--track); border: var(--track-border); overflow: hidden; }
body.y6 .track { height: 16px; }
body.y3 .track { height: 4px; }
.fill { height: 100%; background: var(--fill); border-radius: 999px; transition: width .6s; }
body.y6 .fill { border-right: 3px solid #111; }

/* logo */
.logo { display: inline-flex; align-items: flex-start; font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 19px; line-height: 1; white-space: nowrap; }
.logo svg { width: 10px; height: 10px; margin: 1px 1px 0 2px; }
.logo .up { color: var(--accent); }
body.y5 .logo .up { color: #2F6BFF; }
body.y3 .logo { font-weight: 400; letter-spacing: .5px; }
body.y3 .logo .up { color: #B9A8FF; }
.logo-bd { display: none; padding: 6px 12px; background: #FFE14D; border: 3px solid #111; border-radius: 12px; box-shadow: 3px 3px 0 #111; transform: rotate(-3deg); font-family: 'Bowlby One', sans-serif; font-size: 18px; line-height: 1; color: #111; }
body.y6 .logo { display: none; }
body.y6 .logo-bd { display: inline-block; }

/* avatars Lina & Noé */
.duo { display: flex; flex: none; }
.duo .av { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--accent); }
.duo .av + .av { margin-left: -14px; background: var(--accent2); border: 2px solid var(--card); }
.duo .av img { display: block; width: 100%; height: 130%; margin-top: -6%; }
body.y6 .duo .av { border: 3px solid #111; }
body.y6 .duo .av:first-child { transform: rotate(-6deg); }
body.y6 .duo .av + .av { transform: rotate(6deg); border: 3px solid #111; }
body.y3 .duo .av { border-radius: 12px; background: #2A2D55; }
body.y3 .duo .av + .av { margin-left: 6px; border: 0; }

/* carte épisode */
.episode { display: flex; gap: 12px; align-items: center; background: var(--accent2); color: var(--accent2-ink); }
body.y5 .episode { background: #2F6BFF; color: #FFF; }
body.y4 .episode { background: #7C5CFF; color: #14162E; border: 0; }
body.y3 .episode { background: #181A38; color: var(--ink); }
.episode .t { font-size: 14px; font-weight: 700; line-height: 1.35; }

/* chapitres */
.chap { display: flex; flex-direction: column; gap: 8px; min-height: 112px; text-decoration: none; background: var(--cc, var(--card)); color: var(--c-ink); }
body.y6 .chap { color: #111; }
body.y5 .chap.light { color: #1A1A2E; }
.chap .name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.chap .meta { font-size: 12px; font-weight: 700; margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.chap .track { height: 6px; }
body.y6 .chap .track { height: 10px; border-width: 2px; }
body.y5 .chap .track { background: rgba(255,255,255,.35); }
body.y5 .chap.light .track { background: rgba(26,26,46,.15); }
body.y5 .chap .fill { background: #FFFFFF; }
body.y5 .chap.light .fill { background: #1A1A2E; }
.badge-boss { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--boss); color: var(--boss-ink); }
body.y4 .chap .pct { color: var(--accent); }
body.y3 .chap .pct { color: #B9A8FF; }

/* barre de navigation */
nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--nav-bg); border-top: var(--border); padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); }
nav.bottom .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
nav.bottom a { min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 800; text-decoration: none; color: var(--muted); border-radius: 12px; }
nav.bottom a svg { width: 22px; height: 22px; }
nav.bottom a.on { color: var(--nav-on); }
body.y6 nav.bottom a.on { background: #FFE14D; color: #111; border: 2px solid #111; }
body.y6 nav.bottom a { color: #111; }

/* séance */
.qhead { display: flex; align-items: center; gap: 10px; }
.dots { display: flex; gap: 5px; flex: 1; }
.dots i { flex: 1; height: 8px; border-radius: 999px; background: var(--track); }
.dots i.ok { background: var(--good); }
.dots i.ko { background: var(--bad); }
.dots i.cur { background: var(--accent); }
body.y6 .dots i { border: 2px solid #111; height: 12px; }
.prompt { font-size: 18px; font-weight: 700; line-height: 1.45; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .92em; line-height: 1.1; margin: 0 2px; }
.frac > span:first-child { border-bottom: 2px solid currentColor; padding: 0 3px; }
.frac > span:last-child { padding: 0 3px; }
.fig { display: block; width: 100%; max-width: 380px; height: auto; margin: 4px auto 0; }
.fig .f-line { stroke: var(--ink); stroke-width: 2; fill: none; }
.fig .f-linefill { fill: var(--ink); }
.fig .f-grid { stroke: var(--grid); stroke-width: 1; }
.fig .f-acc { fill: var(--fig-acc); }
.fig .f-shape { fill: var(--fig-fill); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.fig .f-txt { fill: var(--ink); font-family: 'Manrope', sans-serif; }
.fig .f-acctxt { fill: var(--ink); font-family: 'Manrope', sans-serif; }
.fig .f-accline { stroke: var(--fig-acc); stroke-width: 3; }
.figbox { background: var(--card); border: var(--border); border-radius: var(--radius); padding: 10px; color: var(--card-ink); }
body.y6 .figbox { box-shadow: var(--shadow); }

.blocks { display: flex; flex-direction: column; gap: 3px; font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 800; }
.blk { align-self: flex-start; padding: 8px 12px; border-radius: 8px; color: #FFFFFF; border-bottom: 3px solid rgba(0,0,0,.18); }
.blk.event { background: #FFBF00; color: #3A2A00; border-radius: 16px 16px 8px 8px; }
.blk.motion { background: #4C97FF; }
.blk.control { background: #FFAB19; color: #3A2A00; }
.blk.var { background: #FF8C1A; color: #2B1600; }
.blk.look { background: #9966FF; }
.blk.sense { background: #5CB1D6; color: #062635; }
.blk.in1 { margin-left: 24px; }
.blk.in2 { margin-left: 48px; }

.answer { display: flex; flex-direction: column; gap: 10px; }
.inp { width: 100%; min-height: 56px; padding: 12px 14px; border-radius: var(--radius); border: var(--border); background: var(--input-bg); color: var(--ink); font-size: 20px; font-weight: 700; }
body.y4 .inp, body.y3 .inp { border: 1.5px solid var(--accent); }
body.y5 .inp { border: 2px solid #E5DBC9; }
.inp-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.inp-wrap .unit { font-weight: 800; color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; }
.keys button { min-width: 44px; min-height: 44px; border-radius: 10px; border: var(--border); background: var(--card); color: var(--card-ink); font-weight: 800; font-size: 18px; }
.choices { display: grid; grid-template-columns: 1fr; gap: 10px; }
.choice { text-align: left; min-height: 56px; padding: 12px 16px; border-radius: var(--radius); border: var(--border); background: var(--card); color: var(--card-ink); font-weight: 700; font-size: 16px; box-shadow: var(--shadow); }
body.y4 .choice { border-color: #2C3166; }
.choice.sel { outline: 3px solid var(--accent); }
.choice.good { background: var(--good); color: #111; }
.choice.bad { background: var(--bad); color: #111; }

.feedback { border-radius: var(--radius); padding: 14px 16px; border: var(--border); display: flex; flex-direction: column; gap: 6px; }
.feedback.ok { background: var(--good); color: #111; }
.feedback.ko { background: var(--card); color: var(--card-ink); border-color: var(--bad); border-width: 2px; }
body.y6 .feedback.ko { border: 3px solid #111; background: #FFD1E3; color: #111; }
.feedback .big { font-family: var(--title); font-weight: var(--title-w); font-size: 18px; text-transform: var(--title-tt); }
.rich { font-size: 15px; }
.timer { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 8px; border: var(--border); }

/* écran boss */
.bossbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--boss); color: var(--boss-ink); font-family: var(--title); font-weight: var(--title-w); text-transform: var(--title-tt); }
body.y6 .bossbar { box-shadow: 4px 4px 0 #FF5FA2; }

/* bilan */
.score { font-family: var(--title); font-weight: var(--title-w); font-size: 56px; line-height: 1; }
.reward { display: flex; align-items: center; gap: 12px; }
.reward .ic { width: 52px; height: 52px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); }
.reward .ic svg { width: 28px; height: 28px; }

/* carte joueur */
.pcard { border-radius: 26px; padding: 3px; background: var(--accent); }
body.y6 .pcard { background: #111; }
.pcard .in { border-radius: 23px; background: var(--card); color: var(--card-ink); padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.rating { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 46px; line-height: 1; color: var(--accent); }
body.y6 .rating, body.y5 .rating { color: var(--ink); }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: var(--bg); }
body.y6 .stat { border: 2px solid #111; background: #FFF3D6; }
.stat b { font-family: 'Unbounded', sans-serif; font-size: 22px; }
.stat span { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.bdg { padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--accent2); color: var(--accent2-ink); }
.bdg.boss { background: var(--boss); color: var(--boss-ink); }
.bdg.off { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }
body.y6 .bdg { border: 2px solid #111; }
body.y5 .bdg { background: #FFC93C; }

/* chambre */
.room { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.obj { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 14px; padding: 6px; text-align: center; font-size: 10px; font-weight: 800; line-height: 1.1; }
.obj svg { width: 28px; height: 28px; }
.obj.on { background: var(--accent2); color: var(--accent2-ink); }
body.y5 .obj.on { background: #2F6BFF; color: #FFF; }
body.y6 .obj.on { border: 3px solid #111; box-shadow: 3px 3px 0 #111; }
.obj.off { border: 2px dashed var(--muted); color: var(--muted); opacity: .6; }

/* univers */
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.theme { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 96px; padding: 14px; border-radius: var(--radius); border: var(--border); background: var(--card); color: var(--card-ink); text-align: left; box-shadow: var(--shadow); }
.theme svg { width: 26px; height: 26px; color: var(--accent); }
body.y6 .theme svg, body.y5 .theme svg { color: var(--ink); }
.theme.sel { background: var(--accent); color: var(--accent-ink); }
.theme.sel svg { color: var(--accent-ink); }
.theme b { font-size: 15px; }
.theme span { font-size: 12px; opacity: .8; }

/* connexion */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 24px 16px; }
.login .hero { display: flex; justify-content: center; }
.login .hero .duo .av { width: 96px; height: 96px; }
.login .hero .duo .av + .av { margin-left: -26px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 14px; }
.err { color: var(--bad); font-weight: 800; }
body.y6 .err, body.y5 .err { color: #C0003C; }

/* histoire */
.ep { display: flex; gap: 12px; }
.ep .n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--accent); color: var(--accent-ink); }
.ep.lock .n { background: transparent; border: 2px dashed var(--muted); color: var(--muted); }

/* jauge brevet */
.gauge { display: flex; flex-direction: column; gap: 8px; }
.gauge .v { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 24px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 800; z-index: 20; max-width: 90vw; }

/* ---------- Animation de nouvelle saison ---------- */
#overlay { position: fixed; inset: 0; z-index: 50; overflow: hidden; }
#overlay .wipe { position: absolute; left: 50%; top: 50%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax; border-radius: 50%; transform: scale(0); transition: transform 1s cubic-bezier(.7,0,.3,1); }
#overlay .layer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 28px 22px; text-align: center; opacity: 0; transform: translateY(30px); transition: opacity .6s, transform .6s; pointer-events: none; }
#overlay .layer.on { opacity: 1; transform: none; pointer-events: auto; }
#overlay .layer.gone { opacity: 0; transform: translateY(-30px); }
#overlay .big { font-family: var(--title); font-weight: var(--title-w); text-transform: var(--title-tt); font-size: 44px; line-height: 1.05; }
#overlay .toise { position: relative; width: 300px; height: 300px; }
#overlay .toise img { position: absolute; bottom: 0; transition: height 1.2s cubic-bezier(.2,1.4,.4,1) .3s, width 1.2s cubic-bezier(.2,1.4,.4,1) .3s; }
#overlay .toise .ghost { opacity: .22; filter: grayscale(1); }
#overlay .mark { position: absolute; left: 0; right: 0; border-top: 2px dashed currentColor; font-size: 11px; font-weight: 800; text-align: left; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (min-width: 700px) { .screen { padding-top: 32px; } }

/* ---------- Matières ---------- */
.subjects { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.subj { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; background: var(--sc); color: #FFFFFF; }
.subj.soon { background: transparent; color: var(--muted); border: 1.5px dashed var(--muted); }
.subj small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
body.y6 .subj.on { border: 2px solid #111; box-shadow: 2px 2px 0 #111; }

/* ---------- Planning ---------- */
.big-ic { width: 34px; height: 34px; flex: none; color: var(--accent); }
body.y6 .big-ic, body.y5 .big-ic { color: var(--ink); }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: 13px; }
.iconbtn.sm { width: 40px; height: 40px; flex: none; }
.iconbtn.sm svg { width: 18px; height: 18px; }
.inp.sm { min-height: 46px; font-size: 16px; padding: 8px 12px; font-weight: 600; }
select.inp { appearance: auto; }
.agenda-it { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: calc(var(--radius) - 4px); background: var(--bg); }
body.y6 .agenda-it { background: #FFF3D6; border: 2px solid #111; }
body.y5 .agenda-it { background: #FFF9F0; }
.agenda-it.done { opacity: .55; }
.agenda-it.done b { text-decoration: line-through; }
.kind { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; background: var(--accent2); color: var(--accent2-ink); }
.agenda-it.controle .kind { background: var(--boss); color: var(--boss-ink); }
.agenda-it.oral .kind { background: var(--accent); color: var(--accent-ink); }
.tick { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; }
.tick input { width: 22px; height: 22px; accent-color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: var(--radius); background: var(--card); border: var(--border); }
.tabs2 button { min-height: 44px; border: 0; border-radius: calc(var(--radius) - 4px); background: transparent; font-weight: 800; color: var(--muted); }
.tabs2 button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.day.today { outline: 2px solid var(--accent); }
.slot { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--track); }
.slot .t { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 12px; white-space: nowrap; min-width: 96px; }
details summary { cursor: pointer; min-height: 28px; }
.fiche-link { text-decoration: none; }
.fiche-link svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
body.y6 .fiche-link svg, body.y5 .fiche-link svg { color: var(--ink); }

/* ---------- Fiches de révision : papier sérieux, quelle que soit l'année ---------- */
.fiche { background: #FFFDF8; color: #1B1D2E; border-radius: 18px; overflow: hidden; border: 1px solid #E7E1D3; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 15.5px; }
body.y6 .fiche { border: 3px solid #111; box-shadow: 5px 5px 0 #111; }
.fiche-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 20px 20px 16px; background: #2F6BFF; color: #FFFFFF; }
.fiche-head h1 { margin: 4px 0 0; font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 21px; line-height: 1.15; }
.fiche-sub { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; opacity: .9; }
.fiche-logo { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 12px; opacity: .85; white-space: nowrap; }
.fiche section { padding: 16px 20px; border-top: 1px solid #EDE7DA; }
.fiche h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: 'Unbounded', sans-serif; font-size: 15px; font-weight: 600; color: #1B3FAF; }
.fiche h2 .n { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: #E6EDFF; color: #1B3FAF; font-size: 13px; }
.fiche h3 { margin: 10px 0 6px; font-size: 15px; }
.fiche ul, .fiche ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.fiche li::marker { color: #2F6BFF; font-weight: 800; }
.fiche .ex { background: #F2F6FF; }
.fiche .ex .q { margin: 0 0 8px; font-weight: 700; }
.fiche .warn { background: #FFF5E6; }
.fiche .warn h2 { color: #9A4A00; }
.fiche .warn h2 .n { background: #FFE2B8; color: #9A4A00; }
.fiche .warn li::marker { color: #D9730D; }
.fiche-tip { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid #EDE7DA; font-size: 14px; }
.fiche-tip img { flex: none; }
.fiche-tip p { margin: 0; }
.fiche .frac { font-size: .92em; }
@media print {
  body { background: #FFFFFF !important; }
  .no-print, nav.bottom, #overlay { display: none !important; }
  .screen { padding: 0 !important; }
  .fiche { box-shadow: none !important; border: 1px solid #999 !important; font-size: 12pt; }
  .fiche-head, .fiche .ex, .fiche .warn, .fiche h2 .n { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fiche section { break-inside: avoid; }
}

/* ---------- Visite guidée ---------- */
.tuto { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); gap: 0; max-width: 560px; margin: 0 auto; }
.tuto-img { width: min(240px, 52vw); height: auto; margin-bottom: -18px; position: relative; z-index: 1; animation: pop .5s ease; }
.tuto .bubble { width: 100%; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 2; }
.tuto .bubble p { margin: 0; }
@keyframes pop { from { transform: translateY(20px) scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.faq summary { list-style: none; }
.faq summary::-webkit-details-marker { display: none; }

/* ---------- Ajouts : rôles, codes, duels, contrôles ---------- */
.tabs2.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.code { font-family: 'Unbounded', sans-serif; letter-spacing: 2px; }
hr.sep { border: 0; border-top: 1px solid var(--track); margin: 4px 0; width: 100%; }
.lk { width: 14px; height: 14px; vertical-align: -2px; }
.exam-card { background: var(--boss); color: var(--boss-ink); }
.exam-card .label, .exam-card .title { color: var(--boss-ink); }
body.y6 .exam-card { background: #FF5FA2; color: #111; }
body.y6 .exam-card .label, body.y6 .exam-card .title { color: #111; }
.agenda-it.ok { outline: 2px solid var(--good); }
.agenda-it.ko { opacity: .8; }

/* ---------- Espace parents / enseignants ---------- */
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; min-height: 44px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.chart7 { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.chart7 > div { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.chart7 i { display: block; width: 100%; max-width: 44px; min-height: 3px; border-radius: 6px 6px 0 0; background: var(--accent); }
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 8px; border-bottom: 1px solid var(--track); text-align: left; vertical-align: middle; }
.tbl th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.tbl .heat { text-align: center; font-weight: 800; border-radius: 6px; background: hsl(calc(var(--v) * 1.2) 70% 88%); color: #1A1A2E; min-width: 46px; }
.tbl tr.avg td { border-top: 2px solid var(--ink); }
body.espace .card a { color: var(--accent); }
[hidden] { display: none !important; }
body .exam-card .label { color: var(--boss-ink); }
body.y6 .exam-card .label { color: #111; }
body.espace #app { max-width: none; }
.tbl .heat.zero { background: var(--track); color: var(--muted); }

/* ---------- Sciences : dessins ---------- */
.fig .f-bg { fill: var(--card); stroke: none; }
.fig.sci { max-width: 420px; }
.fig.mini { width: 60px; height: 40px; margin: 0; display: inline-block; vertical-align: middle; }

/* ---------- Plusieurs matières : tuiles, scènes, histoires ---------- */
.subj-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.subj-tiles.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: var(--radius); border: var(--border); background: var(--card); color: var(--card-ink); box-shadow: var(--shadow); font: inherit; cursor: pointer; transition: transform .15s, background .2s; --tile-acc: var(--sc); }
.stile svg { width: 38px; height: 38px; color: var(--sc); }
.stile b { font-size: 13px; line-height: 1.15; text-align: center; }
.stile .sp { font-size: 12px; font-weight: 800; opacity: .8; }
.stile .sbar { width: 70%; }
.stile:active { transform: scale(.97); }
.stile.on { background: var(--sc); color: #FFFFFF; --tile-acc: #FFFFFF; transform: translateY(-2px); }
.stile.on svg { color: #FFFFFF; }
body.y6 .stile.on { color: #111; } body.y6 .stile.on svg { color: #111; }
.sbar { display: block; height: 6px; border-radius: 99px; background: color-mix(in srgb, currentColor 16%, transparent); overflow: hidden; }
.sbar i { display: block; height: 100%; border-radius: 99px; background: var(--sc, var(--accent)); }
.stile.on .sbar i { background: #FFFFFF; } body.y6 .stile.on .sbar i { background: #111; }
.scene { display: block; border-radius: var(--radius); overflow: hidden; border: var(--border); box-shadow: var(--shadow); line-height: 0; }
.scene-svg { display: block; width: 100%; height: auto; }
body .episode.subj-ep { background: var(--sc); color: #FFFFFF; }
body.y6 .episode.subj-ep { color: #111; }
body.y3 .episode.subj-ep { background: color-mix(in srgb, var(--sc) 30%, #181A38); color: var(--ink); }
.subj-title { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--sc); color: #FFFFFF; font-family: var(--title); font-weight: var(--title-w); font-size: 16px; text-transform: none; letter-spacing: 0; }
.subj-title.sm { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 12px; padding: 3px 10px; align-self: flex-start; }
body.y6 .subj-title { border: 2px solid #111; }
.stories { display: grid; gap: 10px; }
.stories .st { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); border: var(--border); background: var(--card); color: var(--card-ink); box-shadow: var(--shadow); font: inherit; cursor: pointer; }
.stories .st.on { outline: 3px solid var(--sc); outline-offset: 1px; }
.stories .st .badge { width: 46px; height: 46px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--sc); color: #FFFFFF; --tile-acc: rgba(255,255,255,.25); }
.stories .st .badge svg { width: 30px; height: 30px; }
.stories .st .sbar { margin-top: 6px; }
.subj-eps .ep:not(.lock) .n { background: var(--sc); color: #FFFFFF; }
.subj-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.subj-sum .ss { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--radius); border: var(--border); background: var(--card); color: var(--card-ink); }
.subj-sum .ss b { color: var(--sc); font-size: 13px; }
.subj-sum .ss .v { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 20px; }
.subj-tabs button[aria-selected="true"] { background: var(--sc) !important; color: #FFFFFF !important; }
.fiche-link { border-left: 6px solid var(--sc, var(--accent)) !important; }
.bdg.boss[style] { background: var(--sc); color: #FFFFFF; }
.dotc { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
details.subj-det > summary { list-style: none; cursor: pointer; }
details.subj-det > summary h2 { display: inline-flex; align-items: center; gap: 8px; }
details.subj-det > summary h2::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--sc); }

/* ---------- Exercices « remettre dans l'ordre » ---------- */
.order { display: flex; flex-direction: column; gap: 8px; touch-action: none; }
.oit { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); border: var(--border); background: var(--card); color: var(--card-ink); box-shadow: var(--shadow); font-weight: 700; cursor: grab; user-select: none; transition: box-shadow .15s, background .2s; }
.oit .num { width: 30px; height: 30px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.oit .ico, .it .ico { flex: none; line-height: 0; }
.oit .ico svg, .it .ico svg { width: 40px; height: 40px; }
.oit .lbl { flex: 1; min-width: 0; }
.oit .grip { display: flex; flex-direction: column; gap: 3px; }
.oit .grip button { width: 34px; height: 24px; border-radius: 8px; border: var(--border); background: var(--input-bg); color: var(--ink); font-size: 11px; padding: 0; }
.oit.drag { outline: 3px solid var(--accent); position: relative; z-index: 3; cursor: grabbing; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.oit.moved { background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.order.locked .oit { cursor: default; }
.order.locked .grip { display: none; }
.order.locked.good .oit { outline: 2px solid var(--good); }
.order.locked.bad .oit { opacity: .8; }

/* ---------- Exercices « relier » ---------- */
.link { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; row-gap: 10px; }
.link .it { position: relative; z-index: 1; min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); border: var(--border); background: var(--card); color: var(--card-ink); box-shadow: var(--shadow); font: inherit; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer; }
.link .it .lbl { flex: 1; min-width: 0; }
.link .it.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.link .it.done { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.link .it .dot { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); }
.link .it.l .dot { right: -8px; } .link .it.r .dot { left: -8px; }
.link .wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.link .wires path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.link.locked .it { cursor: default; }
.link.locked.good .wires path { stroke: var(--good); }
.link.locked.bad .wires path { stroke: var(--bad); stroke-dasharray: 6 6; }
@media (max-width: 380px) { .link { column-gap: 30px; } .link .it { font-size: 13px; padding: 8px; } .link .it .ico svg { width: 30px; height: 30px; } }

/* ---------- Fiches : couleur de la matière et schéma ---------- */
.fiche { --ink: #1B1D2E; --card: #FFFFFF; --card-ink: #1B1D2E; --fig-fill: #EEF3FF; --fig-acc: var(--fc, #2F6BFF); --grid: #E3E6EF; }
.fiche h2 { color: color-mix(in srgb, var(--fc, #2F6BFF) 70%, #1B1D2E); }
.fiche h2 .n { background: color-mix(in srgb, var(--fc, #2F6BFF) 16%, #FFFFFF); color: color-mix(in srgb, var(--fc, #2F6BFF) 75%, #1B1D2E); }
.fiche li::marker { color: var(--fc, #2F6BFF); }
.fiche .ex { background: color-mix(in srgb, var(--fc, #2F6BFF) 7%, #FFFFFF); }
.fiche .schema { background: #FFFFFF; }
.fiche-fig { display: flex; justify-content: center; }
.fiche-fig .fig { max-width: 420px; }
@media print { .fiche .schema, .fiche-fig svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.subj-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .subj-tabs button { font-size: 13px; padding: 0 4px; }
.fig.mini .f-bg { fill: transparent; }

/* ---------- Cartes (Histoire-Géo) ---------- */
:root { --m-sea: #CFE8F7; --m-sea2: #BFE0F4; --m-land: #FFFFFF; --m-line: #8D9AB0; --m-txt: #1A1A2E; --m-grat: rgba(255,255,255,.55); }
body.y6 { --m-sea: #BDE7FF; --m-land: #FFFDF5; --m-line: #111111; }
body.y4 { --m-sea: #18204A; --m-sea2: #1B2556; --m-land: #2C3270; --m-line: #5A62B0; --m-txt: #F4F2EC; --m-grat: rgba(255,255,255,.08); }
body.y3 { --m-sea: #141632; --m-sea2: #171A3C; --m-land: #262A57; --m-line: #4A4F8A; --m-txt: #ECEBF5; --m-grat: rgba(255,255,255,.06); }
.kmap { display: block; }
.kmap-svg { display: block; width: 100%; height: auto; border-radius: calc(var(--radius) - 4px); }
.kmap .m-sea { fill: var(--m-sea); }
.kmap .m-sea2 { fill: var(--m-sea2); }
.kmap .m-grat { fill: none; stroke: var(--m-grat); stroke-width: .6; }
.kmap .m-land { fill: var(--m-land); stroke: var(--m-line); stroke-width: .5; stroke-linejoin: round; transition: fill .15s; }
body.y6 .kmap .m-land { stroke-width: .8; }
.kmap .m-dim { opacity: .55; }
.kmap .m-inset { fill: var(--m-sea2); stroke: var(--m-line); stroke-width: 1; }
.kmap .m-ins-t, .kmap .m-lab { font: 800 calc(8px / var(--kz, 1)) 'Manrope', sans-serif; fill: var(--m-txt); text-anchor: middle; paint-order: stroke; stroke: var(--m-land); stroke-width: calc(2.5px / var(--kz, 1)); }
.kmap .m-route { fill: none; stroke-width: 2.5; stroke-dasharray: 6 4; stroke-linecap: round; }
.kmap .m-dot { fill: #E5484D; stroke: #FFFFFF; stroke-width: 1.5; }
.kmap .m-dot-c { fill: #FFFFFF; pointer-events: none; }
.kmap .m-pt-t { font: 800 calc(9px / var(--kz, 1)) 'Manrope', sans-serif; fill: var(--m-txt); paint-order: stroke; stroke: var(--m-sea); stroke-width: calc(3px / var(--kz, 1)); }
.kmap .m-pt-t.sea { font-style: italic; font-weight: 700; fill: #2F6BB5; stroke: none; }
body.y4 .kmap .m-pt-t.sea, body.y3 .kmap .m-pt-t.sea { fill: #8FB8FF; }
.kmap .m-tap { cursor: pointer; outline: none; }
.kmap path.m-tap:hover, .kmap path.m-tap:focus { fill: color-mix(in srgb, var(--accent) 35%, var(--m-land)); }
.kmap path.m-sel { fill: var(--accent) !important; }
.kmap g.m-tap .m-dot { fill: #FFB020; }
.kmap g.m-tap:hover .m-dot, .kmap g.m-tap:focus .m-dot { fill: var(--accent); }
.kmap g.m-sel .m-dot { fill: var(--accent); stroke: var(--ink); stroke-width: 2.5; }
.kmap path.m-good { fill: #2EC4A6 !important; } .kmap g.m-good .m-dot { fill: #2EC4A6; }
.kmap path.m-bad { fill: #FF5A5F !important; } .kmap g.m-bad .m-dot { fill: #FF5A5F; }
.kmap .m-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; font-weight: 700; }
.kmap .m-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--m-line); }
.locked .kmap .m-tap { cursor: default; }
.kmap-ph { padding: 30px; text-align: center; color: var(--muted); }
.fiche { --m-sea: #CFE8F7; --m-sea2: #BFE0F4; --m-land: #FFFFFF; --m-line: #8D9AB0; --m-txt: #1A1A2E; }
.fiche .reperes { background: #FFFFFF; } .fiche .vocab { background: color-mix(in srgb, var(--fc, #2F6BFF) 5%, #FFFFFF); }
.subj-tiles.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.subj-tiles.n4 .stile { padding: 10px 4px 8px; }
.subj-tiles.n4 .stile svg { width: 32px; height: 32px; }
.subj-tiles.n4 .stile b { font-size: 11.5px; }
.kmap-view { position: relative; overflow: hidden; border-radius: calc(var(--radius) - 4px); touch-action: pan-y; }
.kmap.zoomed .kmap-view { touch-action: none; }
.kmap-zoom { position: absolute; left: 6px; bottom: 6px; display: flex; flex-direction: column; gap: 4px; }
.kmap-zoom button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--m-line); background: var(--m-land); color: var(--m-txt); font-size: 18px; font-weight: 800; line-height: 1; padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.fiche .kmap-zoom { display: none; }
@media print { .kmap-zoom { display: none; } }
.fig .f-halo { paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }

.kmap .m-land, .kmap .m-grat, .kmap .m-route { vector-effect: non-scaling-stroke; }
.kmap .m-land { stroke-width: .7; }

/* ---------- Chronogramme (vu en cours) ---------- */
.tabs2.tabs3 button { font-size: 13px; padding-left: 6px; padding-right: 6px; }
.chap .chap-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.85); color: #1A1A2E; }
.chap .chap-tag svg { width: 12px; height: 12px; }
.chap.upcoming { opacity: .62; filter: saturate(.7); }
.chap.upcoming .chap-tag { background: rgba(0,0,0,.18); color: inherit; }
.chrono-link { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); text-decoration: none; }
.chrono-link svg { width: 18px; height: 18px; flex: none; }
.seen-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding: 10px 14px; border-radius: var(--radius); border: 2px dashed var(--line, rgba(127,127,127,.35)); font-weight: 700; font-size: 14px; }
.seen-box.on { border-style: solid; border-color: #2EC4A6; background: color-mix(in srgb, #2EC4A6 12%, transparent); }
.seen-box.on > svg { width: 18px; height: 18px; color: #2EC4A6; }
.seen-box.on > span { flex: 1; }
.chrono-it { display: flex; align-items: center; gap: 10px; border-left: 6px solid color-mix(in srgb, var(--sc) 30%, transparent); }
.chrono-it.on { border-left-color: var(--sc); }
.chrono-it select { max-width: 46%; }
.chrono-fig { overflow: hidden; }
.cg-svg { display: block; width: 100%; height: auto; font-family: 'Manrope', sans-serif; }
.cg-svg .cg-m { font-size: 8px; font-weight: 700; fill: var(--muted); }
.cg-svg .cg-grid { stroke: var(--muted); stroke-opacity: .2; stroke-width: 1; }
.cg-svg .cg-base { stroke: var(--muted); stroke-opacity: .45; stroke-width: 2; stroke-linecap: round; }
.cg-svg .cg-row { font-size: 9.5px; font-weight: 800; }
.cg-svg .cg-dot { stroke: var(--card, #fff); stroke-width: 2; }
.cg-svg .cg-now { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 3; }
.cg-svg .cg-nowt { font-size: 8px; font-weight: 800; fill: var(--accent); }
/* 5 matières ou plus : une rangée qui défile horizontalement */
.subj-tiles.n5, .subj-tiles.n6, .subj-tiles.n7, .subj-tiles.n8 { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding-bottom: 6px; margin: 0 -2px; scrollbar-width: none; }
.subj-tiles.n5::-webkit-scrollbar, .subj-tiles.n6::-webkit-scrollbar, .subj-tiles.n7::-webkit-scrollbar, .subj-tiles.n8::-webkit-scrollbar { display: none; }
.subj-tiles.n5 .stile, .subj-tiles.n6 .stile, .subj-tiles.n7 .stile, .subj-tiles.n8 .stile { flex: 0 0 calc((100% - 24px) / 4.3); scroll-snap-align: start; padding: 10px 4px 8px; }
.subj-tiles.n5 .stile svg, .subj-tiles.n6 .stile svg, .subj-tiles.n7 .stile svg, .subj-tiles.n8 .stile svg { width: 30px; height: 30px; }
.subj-tiles.n5 .stile b, .subj-tiles.n6 .stile b, .subj-tiles.n7 .stile b, .subj-tiles.n8 .stile b { font-size: 11.5px; }
/* Schémas de SVT (« Touche le schéma ») */
.kschema .sch-svg { display: block; width: 100%; height: auto; font-family: 'Manrope', sans-serif; }

.kschema .m-tap { cursor: pointer; outline: none; transition: filter .15s; }
.kschema .m-tap:hover, .kschema .m-tap:focus { filter: brightness(1.08) drop-shadow(0 0 4px var(--accent)); }
.kschema .m-sel > * { stroke: var(--accent) !important; stroke-width: 4 !important; }
.kschema .m-good > * { fill: #2EC4A6 !important; stroke: #0E7C66 !important; stroke-width: 3 !important; }
.kschema .m-bad > * { fill: #FF5A5F !important; stroke: #A3161B !important; stroke-width: 3 !important; }
.kschema .sch-hi > * { stroke: #E8A400 !important; stroke-width: 4 !important; }
.locked .kschema .m-tap { cursor: default; }
.tabs2.tabs3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.subj-tabs { display: flex; overflow-x: auto; scrollbar-width: none; } .subj-tabs::-webkit-scrollbar { display: none; }
.subj-tabs button { flex: 1 0 auto; padding: 0 12px; white-space: nowrap; }
.chrono-it select { max-width: none; width: 168px; flex: none; font-size: 13.5px; padding-left: 10px; padding-right: 6px; }
.chrono-fig { max-width: 640px; }
/* ---------- Animations des schémas de SVT (classes sv-*) ---------- */
.kschema .sv-beat, .kschema .sv-breathe, .kschema .sv-spin, .kschema .sv-ripple, .kschema .sv-glow2 { transform-box: fill-box; transform-origin: center; }
.kschema .sv-sway { transform-box: view-box; }
.kschema .sv-beat { animation: svbeat 1s ease-in-out infinite; }
.kschema .sv-breathe { animation: svbreathe 3.4s ease-in-out infinite; }
.kschema .sv-flow { animation: svflow 1.1s linear infinite; }
.kschema .sv-flow-r { animation: svflowr 1.1s linear infinite; }
.kschema .sv-rise { animation: svrise 2.8s ease-out infinite; }
.kschema .sv-rise2 { animation: svrise2 4s ease-in-out infinite; }
.kschema .sv-drop { animation: svdrop 1.2s linear infinite; }
.kschema .sv-float { animation: svfloat 3.2s ease-in-out infinite; }
.kschema .sv-sway { animation: svsway 4.5s ease-in-out infinite; }
.kschema .sv-spin { animation: svspin 14s linear infinite; }
.kschema .sv-ripple { animation: svripple 2.4s ease-out infinite; }
.kschema .sv-shake { animation: svshake .6s ease-in-out infinite; }
.kschema .sv-travel { animation: svtravel 2s linear infinite; }
.kschema .sv-down { animation: svdown 2.4s ease-in infinite; }
.kschema .sv-glow { animation: svglow 2s ease-in-out infinite; }
.kschema .sv-glow2 { animation: svglow2 2.6s ease-in-out infinite; }
.kschema .sv-drift { animation: svdrift 6s ease-in-out infinite; }
@keyframes svbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.13); } 28% { transform: scale(1); } 42% { transform: scale(1.07); } 56% { transform: scale(1); } }
@keyframes svbreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes svflow { to { stroke-dashoffset: -24; } }
@keyframes svflowr { to { stroke-dashoffset: 24; } }
@keyframes svrise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
@keyframes svrise2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes svdrop { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
@keyframes svfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes svsway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes svspin { to { transform: rotate(360deg); } }
@keyframes svripple { 0% { transform: scale(.15); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes svshake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.6px); } 75% { transform: translateX(1.6px); } }
@keyframes svtravel { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(190px); opacity: 0; } }
@keyframes svdown { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(56px); opacity: 0; } }
@keyframes svglow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes svglow2 { 0%, 100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.04); filter: brightness(1.12); } }
@keyframes svdrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .kschema * { animation: none !important; } }
@media print { .kschema * { animation: none !important; } }
.kschema .m-good * { fill: #2EC4A6 !important; } .kschema .m-bad * { fill: #FF5A5F !important; }
.kschema .sch-bg { stroke: rgba(0,0,0,.06); stroke-width: 1.5; }

/* ---------- Anglais : images, écoute, BD, lecture ---------- */
.en-ic { display: inline-block; vertical-align: middle; }
.en-pic { position: relative; display: grid; place-items: center; margin: 4px auto 0; width: 190px; height: 170px; border-radius: 26px; background: radial-gradient(circle at 30% 25%, #FFFFFF 0 18%, transparent 19%), var(--pc, #FFF4D6); box-shadow: inset 0 -6px 0 rgba(0,0,0,.06), 0 8px 22px rgba(0,0,0,.12); overflow: hidden; }
.en-pic::before { content: ''; position: absolute; inset: auto -20px -40px auto; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.45); }
.en-pic .en-ic { position: relative; animation: enpop .5s cubic-bezier(.3,1.6,.5,1) both; filter: drop-shadow(0 4px 0 rgba(0,0,0,.08)); }
.en-pic .cap { position: absolute; bottom: 8px; font-weight: 800; font-size: 13px; color: #2B2D42; }
@keyframes enpop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.en-listen { display: flex; gap: 10px; justify-content: center; align-items: center; padding: 18px 0 8px; }
.tts { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 800; color: #FFFFFF; background: linear-gradient(160deg, #E8364F, #B5112B); border-radius: 999px; padding: 14px 22px; box-shadow: 0 6px 0 #7E0A1D, 0 10px 22px rgba(200,16,46,.35); transition: transform .1s; }
.tts:active { transform: translateY(3px); box-shadow: 0 3px 0 #7E0A1D; }
.tts.slow { background: linear-gradient(160deg, #3B6FE0, #1F3F8F); box-shadow: 0 6px 0 #142B66, 0 10px 22px rgba(31,63,143,.3); padding: 10px 16px; font-size: 14px; }
.tts.on { animation: ttspulse .8s ease-in-out infinite; }
.tts svg { flex: none; }
@keyframes ttspulse { 50% { transform: scale(1.06); } }
.en-listen .tts:not(.slow)::after { content: ''; position: absolute; }
.en-comic { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 20px; background: repeating-linear-gradient(45deg, #FFF7E0 0 12px, #FFF2D0 12px 24px); border: 3px solid #2B2D42; box-shadow: 4px 4px 0 #2B2D42; }
.en-comic .row { display: flex; align-items: flex-end; gap: 10px; }
.en-comic .row.r { flex-direction: row-reverse; }
.en-comic .av { flex: none; width: 58px; text-align: center; }
.en-comic .av-img { width: 54px; height: 54px; border-radius: 50%; background: #FFFFFF; border: 2.5px solid #2B2D42; object-fit: cover; display: block; margin: 0 auto; }
.en-comic .nm { display: block; font-size: 11px; font-weight: 800; color: #2B2D42; margin-top: 2px; }
.en-comic .bub { position: relative; background: #FFFFFF; color: #2B2D42; border: 2.5px solid #2B2D42; border-radius: 18px; padding: 10px 14px; font-weight: 700; font-size: 16px; line-height: 1.3; max-width: 76%; }
.en-comic .row.l .bub::after, .en-comic .row.r .bub::after { content: ''; position: absolute; bottom: 10px; width: 14px; height: 14px; background: #FFFFFF; border: 2.5px solid #2B2D42; border-top: 0; border-right: 0; }
.en-comic .row.l .bub::after { left: -9px; transform: rotate(45deg); }
.en-comic .row.r .bub::after { right: -9px; transform: rotate(-135deg); }
.en-comic .bub.q { background: #FFD84D; font-size: 26px; font-weight: 900; text-align: center; min-width: 70px; animation: ttspulse 1.4s ease-in-out infinite; }
.en-comic .row.l .bub.q::after, .en-comic .row.r .bub.q::after { background: #FFD84D; }
.en-read { display: flex; gap: 12px; align-items: flex-start; background: #FFFDF6; color: #2B2D42; border-radius: 18px; padding: 14px; border: 1px solid #F0E3C0; box-shadow: 0 6px 18px rgba(0,0,0,.08); text-align: left; }
.en-read p { margin: 6px 0 0; line-height: 1.5; font-size: 15px; }
.en-read .en-ic { flex: none; }
.en-board { background: linear-gradient(180deg, #EAF2FF, #FFFFFF); border-radius: 18px; padding: 12px; color: #2B2D42; }
.en-board .t { font-weight: 900; font-size: 16px; margin-bottom: 8px; text-align: center; }
.en-board .g { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.en-board .it { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: #FFFFFF; border-radius: 14px; padding: 8px 4px; box-shadow: 0 3px 0 rgba(43,45,66,.12); cursor: pointer; font: inherit; color: inherit; }
.en-board .it b { font-size: 13px; } .en-board .it span { font-size: 11px; color: #5B5E78; }
.en-board .it.on { outline: 3px solid #C8102E; }
body.y6 .en-comic, body.y6 .en-pic { border-width: 3px; }
body.y3 .en-pic, body.y4 .en-pic { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.35); }
@media (prefers-reduced-motion: reduce) { .en-pic .en-ic, .tts.on, .en-comic .bub.q { animation: none; } }
body.y6 .stile.on[data-subject="anglais"] { color: #FFFFFF; } body.y6 .stile.on[data-subject="anglais"] svg { color: #FFFFFF; } body.y6 .stile.on[data-subject="anglais"] .sbar i { background: #FFFFFF; }
.en-board { width: 100%; box-sizing: border-box; } .fiche-fig .en-board .g { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 420px) { .fiche-fig .en-board .g { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== Salle de jeu (parties en direct) ===== */
.lv-av { --s: 46px; position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; background: var(--av, var(--accent)); color: #14162E; font-family: var(--title); font-weight: var(--title-w); font-size: calc(var(--s) * .44); line-height: 1; border: 3px solid var(--card); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
body.y6 .lv-av { border-color: #111; }
.lv-av.sm { --s: 34px; border-width: 2px; }
.lv-av.xs { --s: 26px; border-width: 2px; font-size: 12px; }
.lv-av.ghost { background: transparent; border: 2px dashed var(--muted); color: var(--muted); }
.lv-crown { position: absolute; top: -13px; left: 50%; transform: translateX(-50%) rotate(-8deg); width: 22px; height: 22px; color: #FFB020; }
.lv-crown svg { width: 100%; height: 100%; fill: #FFC93C; stroke: #8A5A00; stroke-width: 1.5; }
.lv-stack { display: flex; align-items: center; }
.lv-stack .lv-av + .lv-av { margin-left: -12px; }
.lv-stack.sm .lv-av + .lv-av { margin-left: -10px; }
.lv-vs { width: 40px; height: 40px; margin-left: 8px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; animation: lv-pulse 1.6s ease-in-out infinite; }
.lv-vs svg { width: 22px; height: 22px; }
.lv-hero { display: flex; flex-direction: column; gap: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent2) 30%, var(--card)), var(--card)); }
.lv-hero .lv-av:nth-child(2) { animation: lv-bob 2.4s ease-in-out .3s infinite; }
.lv-hero .lv-av:nth-child(1), .lv-hero .lv-av:nth-child(3) { animation: lv-bob 2.4s ease-in-out infinite; }
.lv-home { gap: 12px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card)); }
.lv-home > svg { width: 20px; height: 20px; flex: none; }
.lv-resume { border-color: var(--accent); }
.lv-code-in { text-align: center; font-family: var(--title); font-size: 30px; letter-spacing: 14px; padding-left: 28px; text-transform: uppercase; }
.lv-subj { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-subj button { padding: 8px 14px; border-radius: 999px; border: 2px solid var(--sc); background: var(--card); color: var(--card-ink); font-weight: 800; font-size: 14px; cursor: pointer; }
.lv-subj button[aria-checked="true"] { background: var(--sc); color: #fff; }
body.y6 .lv-subj button[aria-checked="true"] { color: #111; }
.lv-rules { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.lv-rules svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.lv-code { display: flex; gap: 10px; justify-content: center; margin: 4px 0; }
.lv-code span { width: 60px; height: 72px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-family: var(--title); font-size: 38px; border: var(--border); box-shadow: var(--shadow); animation: lv-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 90ms); }
.lv-code span:nth-child(even) { background: var(--accent2); color: var(--accent2-ink); }
.lv-lobby { text-align: center; align-items: center; }
.lv-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.lv-pl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 10px; border-radius: var(--radius); background: var(--card); color: var(--card-ink); border: var(--border); box-shadow: var(--shadow); animation: lv-pop .4s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 60ms); }
.lv-pl .nm { font-weight: 800; font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.lv-pl.off { opacity: .45; }
.lv-pl.wait { border-style: dashed; box-shadow: none; background: transparent; animation: lv-breathe 1.8s ease-in-out infinite; }
.lv-x { position: absolute; top: 4px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.lv-go:not(:disabled) { animation: lv-pulse 1.4s ease-in-out infinite; }
.lv-go:disabled { opacity: .6; }
.lv-wait { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 800; }
.lv-dots { display: inline-flex; gap: 4px; }
.lv-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: lv-dot 1s ease-in-out infinite; }
.lv-dots i:nth-child(2) { animation-delay: .15s; } .lv-dots i:nth-child(3) { animation-delay: .3s; }
.lv-react { position: sticky; bottom: 14px; align-self: center; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--card); border: var(--border); box-shadow: var(--shadow); z-index: 5; }
.lv-react button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; font-weight: 900; color: var(--card-ink); cursor: pointer; transition: transform .15s; }
.lv-react button:last-child { font-size: 15px; font-family: var(--title); }
.lv-react button:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.lv-react button.pop { transform: scale(1.35); }
.lv-float { position: fixed; bottom: 80px; z-index: 30; display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: lv-rise 2.4s ease-out forwards; }
.lv-float .e { font-size: 38px; font-weight: 900; font-family: var(--title); color: var(--accent); text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.lv-float .n { font-size: 11px; font-weight: 800; background: var(--ink); color: var(--bg); padding: 2px 8px; border-radius: 999px; }
.lv-qn { flex: 1; font-family: var(--title); font-weight: var(--title-w); font-size: 20px; }
.lv-qn small { font-size: 14px; opacity: .6; }
.lv-timer { --p: 1; position: relative; width: 54px; height: 54px; flex: none; }
.lv-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lv-timer circle { fill: none; stroke-width: 5; }
.lv-timer .bg { stroke: color-mix(in srgb, var(--ink) 14%, transparent); fill: var(--card); }
.lv-timer .fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p) * 100); transition: stroke-dashoffset .1s linear; }
body.y6 .lv-timer .fg { stroke: #2EC4A6; }
.lv-timer .n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--title); font-size: 19px; color: var(--card-ink); }
.lv-timer.hurry .fg { stroke: var(--bad); }
.lv-timer.hurry { animation: lv-pulse .5s ease-in-out infinite; }
.lv-timer.big { width: 150px; height: 150px; margin: 10px auto; }
.lv-timer.big .n { font-size: 64px; }
.lv-center { align-items: center; justify-content: center; text-align: center; min-height: 80vh; }
.lv-strip { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 30px; }
.lv-chip { position: relative; display: inline-flex; opacity: .55; transition: opacity .2s, transform .2s; }
.lv-chip.done { opacity: 1; transform: translateY(-2px); }
.lv-chip.off { filter: grayscale(1); }
.lv-chip .ck { position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; padding: 2px; border-radius: 50%; background: var(--good); color: #111; stroke-width: 4; }
.choice.picked { outline: 4px solid var(--accent); outline-offset: 2px; }
.lv-sent { display: flex; align-items: center; gap: 12px; animation: lv-pop .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.lv-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 18px; border-radius: var(--radius); border: var(--border); box-shadow: var(--shadow); animation: lv-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.lv-banner.ok { background: var(--good); color: #111; }
.lv-banner.ko { background: var(--card); color: var(--card-ink); border-color: var(--bad); border-width: 3px; flex-direction: column; align-items: flex-start; gap: 2px; }
.lv-banner .big { font-family: var(--title); font-weight: var(--title-w); text-transform: var(--title-tt); font-size: 22px; }
.lv-banner .pts { margin-left: auto; font-family: var(--title); font-size: 30px; animation: lv-pop .5s .25s cubic-bezier(.3, 1.6, .5, 1) both; }
.lv-banner .chip { background: #111; color: #FFE14D; border-color: #111; }
.lv-choices { display: grid; gap: 6px; }
.lv-ch { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 2px solid color-mix(in srgb, var(--card-ink) 20%, transparent); font-weight: 700; }
.lv-ch span { flex: 1; }
.lv-ch.good { background: var(--good); color: #111; border-color: transparent; }
.lv-ch.bad { background: color-mix(in srgb, var(--bad) 35%, var(--card)); }
.lv-ch b { min-width: 22px; text-align: right; opacity: .8; }
.lv-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-rk { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; animation: lv-slide .4s ease-out both; animation-delay: calc(var(--i) * 70ms); }
.lv-rk.me { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.lv-rk.gone { opacity: .5; }
.lv-rk .pos { width: 22px; font-family: var(--title); text-align: center; }
.lv-rk .nm { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-rk .up { color: #1FA35B; font-size: 12px; }
.lv-rk .plus { font-size: 12px; font-weight: 800; color: #1FA35B; }
body.y4 .lv-rk .plus, body.y3 .lv-rk .plus, body.y4 .lv-rk .up, body.y3 .lv-rk .up { color: #7CF07C; }
.lv-rk .sc { font-family: var(--title); min-width: 52px; text-align: right; }
.lv-sep { text-align: center; opacity: .5; }
.lv-next { --p: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; border-radius: var(--radius); background: var(--card); color: var(--card-ink); border: var(--border); font-weight: 800; }
.lv-next::after { content: ''; position: absolute; left: 0; bottom: 0; height: 5px; width: calc(var(--p) * 100%); background: var(--accent); }
.lv-next .btn { min-height: 40px; }
.lv-next .btn svg { width: 18px; height: 18px; }
.lv-end { position: relative; overflow: hidden; }
.lv-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin-top: 8px; }
.lv-podium .col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.lv-podium .nm { font-weight: 800; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-podium .sc { font-family: var(--title); font-size: 15px; }
.lv-podium .step { width: 100%; display: grid; place-items: start center; padding-top: 8px; border-radius: 12px 12px 0 0; border: var(--border); border-bottom: 0; font-family: var(--title); font-size: 30px; color: #111; transform-origin: bottom; animation: lv-grow .7s cubic-bezier(.3, 1.4, .5, 1) both; }
.lv-podium .p1 .step { height: 130px; background: #FFC93C; animation-delay: .5s; }
.lv-podium .p2 .step { height: 95px; background: #D9DEE8; animation-delay: .25s; }
.lv-podium .p3 .step { height: 70px; background: #F0A36B; }
.lv-podium .p1 .lv-av { --s: 64px; animation: lv-pop .5s 1.1s cubic-bezier(.3, 1.6, .5, 1) both; }
.lv-podium .col.me .nm { text-decoration: underline 3px var(--accent); }
.lv-me { border-color: var(--accent); }
.lv-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.lv-confetti i { position: absolute; top: -20px; left: calc(var(--x) * 1%); width: 9px; height: 14px; background: var(--c); border-radius: 2px; transform: rotate(var(--r)); animation: lv-fall 3.2s ease-in var(--d) both; }
.lv-end > *:not(.lv-confetti) { position: relative; z-index: 1; }
@keyframes lv-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lv-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes lv-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes lv-breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes lv-dot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-5px); opacity: 1; } }
@keyframes lv-rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { transform: translateY(-20px) scale(1.1); opacity: 1; } 100% { transform: translateY(-260px) scale(1); opacity: 0; } }
@keyframes lv-slide { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lv-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lv-fall { 0% { transform: translateY(0) rotate(var(--r)); opacity: 1; } 100% { transform: translateY(105vh) rotate(calc(var(--r) + 540deg)); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .lv-confetti { display: none; } }
.lv-av.xs .lv-crown { display: none; }

/* ===== Salle de jeu : vue projetée (prof) ===== */
body.lvp-on { background: #14162E; --bg: #14162E; --card: #1E2147; --card-ink: #F4F2EC; --ink: #F4F2EC; --muted: #B8B9D9; --accent: #C9F73A; --accent-ink: #14162E; --accent2: #7C5CFF; --accent2-ink: #fff; --border: 2px solid #2C3270; --shadow: 0 6px 0 rgba(0,0,0,.35); --good: #7CF07C; --bad: #FF5FA2; color: #F4F2EC; }
.lvp { position: relative; overflow: hidden; min-height: 100vh; padding: 20px clamp(16px, 3vw, 48px) 40px; display: flex; flex-direction: column; gap: 24px; font-size: clamp(16px, 1.6vw, 24px); }
.lvp-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lvp-brand { font-family: var(--title); color: var(--accent); font-size: .85em; }
.lvp-t { flex: 1; color: var(--muted); font-weight: 700; font-size: .8em; }
.lvp-bar .btn.ghost { color: var(--muted); }
.lvp-join { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 4vw; align-items: start; }
.lvp-how { font-size: 1.15em; margin: 0 0 18px; }
.lvp-code { justify-content: flex-start; }
.lvp-code span { width: clamp(70px, 9vw, 150px); height: clamp(88px, 11vw, 180px); font-size: clamp(48px, 7vw, 120px); border-radius: 22px; }
.lvp-pl .lv-players { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-top: 14px; }
.lvp-pl .lv-av { --s: 58px; }
.lvp-foot { display: flex; justify-content: center; margin-top: auto; }
.lvp-big { min-height: 72px; font-size: 1.1em; padding: 14px 48px; }
.lvp-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.lvp-center .title { font-size: 3em; }
.lvp-ring.big { width: clamp(120px, 14vw, 240px); height: clamp(120px, 14vw, 240px); }
.lvp-ring.big .n { font-size: clamp(44px, 5vw, 96px); }
.lvp-q { display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 22vw, 360px); gap: 3vw; align-items: start; }
.lvp-main { display: flex; flex-direction: column; gap: 18px; }
.lvp-prompt { font-size: clamp(24px, 2.6vw, 44px); font-weight: 800; line-height: 1.25; }
.lvp-fig { background: var(--card); border-radius: 18px; padding: 14px; max-width: 900px; }
.lvp-fig svg { max-height: 46vh; }
.lvp-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lvp-ch { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 18px 20px; min-height: 84px; border-radius: 16px; background: var(--qc); color: #fff; font-weight: 800; font-size: 1.15em; transition: opacity .3s, transform .3s; }
.lvp-ch .k { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.25); font-family: var(--title); }
.lvp-ch .tx { flex: 1; position: relative; z-index: 1; }
.lvp-ch .d { position: absolute; left: 0; bottom: 0; height: 8px; width: calc(var(--w) * 100%); background: rgba(255,255,255,.75); }
.lvp-ch .cnt { font-family: var(--title); font-size: 1.3em; position: relative; z-index: 1; }
.lvp-ch.dim { opacity: .35; }
.lvp-ch.good { transform: scale(1.03); box-shadow: 0 0 0 5px #fff, 0 8px 0 rgba(0,0,0,.3); }
.lvp-rv { background: var(--card); border-radius: 16px; padding: 16px 20px; border-left: 8px solid var(--good); }
.lvp-rv p { margin: 0 0 8px; font-size: 1.2em; }
.lvp-side { display: flex; flex-direction: column; align-items: center; gap: 18px; position: sticky; top: 20px; }
.lvp-count { --p: 0; position: relative; width: 100%; margin: 0; padding: 12px; text-align: center; border-radius: 14px; background: var(--card); overflow: hidden; }
.lvp-count::before { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 100%); background: color-mix(in srgb, var(--accent) 30%, transparent); transition: width .3s; }
.lvp-count b { font-family: var(--title); font-size: 1.6em; position: relative; }
.lvp-ok { display: flex; flex-direction: column; align-items: center; font-family: var(--title); font-size: 2.6em; line-height: 1; color: var(--good); }
.lvp-ok span { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: .32em; color: var(--muted); margin-top: 6px; }
.lvp-rank { width: 100%; background: var(--card); padding: 10px; border-radius: 16px; }
.lvp-rank .lv-rk .nm { font-size: .9em; }
.lvp-end { display: flex; flex-direction: column; align-items: center; gap: 24px; position: relative; z-index: 1; }
.lvp-end .title { font-size: 2.6em; }
.lvp-podium { width: min(900px, 100%); }
.lvp-podium .lv-av { --s: 72px; }
.lvp-podium .p1 .lv-av { --s: 96px; }
.lvp-podium .nm { font-size: 1.1em; }
.lvp-podium .sc { font-size: 1.2em; }
.lvp-podium .p1 .step { height: 220px; } .lvp-podium .p2 .step { height: 160px; } .lvp-podium .p3 .step { height: 115px; }
.lvp-podium .step { font-size: 56px; border: 0; }
.lvp-rest { width: min(700px, 100%); columns: 2; display: block; }
.lvp-rest .lv-rk { break-inside: avoid; margin-bottom: 6px; }
.lvp-on .lv-float .e { font-size: 64px; }
@media (max-width: 800px) { .lvp-join, .lvp-q { grid-template-columns: 1fr; } .lvp-choices { grid-template-columns: 1fr; } .lvp-rest { columns: 1; } }
.lvp-ok { white-space: nowrap; }

/* ===== Français : cahier, mots à toucher, conjugaison, livre ===== */
.fr-cahier { position: relative; background: #FFFDF6; color: #1A1A2E; border-radius: 14px; padding: 18px 16px 18px 34px; border: 2px solid #E9E2CF; background-image: repeating-linear-gradient(transparent 0 33px, #CFE0F5 33px 34px); background-position: 0 14px; }
.fr-cahier::before { content: ''; position: absolute; left: 22px; top: 0; bottom: 0; width: 2px; background: #F2A3A3; }
.fr-cahier .ktap-box { margin: 0; font: 600 20px/34px 'Manrope', sans-serif; letter-spacing: .1px; word-spacing: 2px; }
.fr-cahier .fr-w { border-radius: 8px; padding: 1px 3px; }
.fr-cahier .fr-w.hi { font-weight: 900; background: #FFE14D; box-shadow: 0 0 0 2px #FFE14D; color: #111; }
.fr-cahier .m-tap { cursor: pointer; transition: background .15s, transform .1s; outline: none; box-shadow: inset 0 -2px 0 rgba(47, 107, 255, .25); }
.fr-cahier .m-tap:hover, .fr-cahier .m-tap:focus-visible { background: #E3ECFF; }
.fr-cahier .m-tap:active { transform: scale(.96); }
.fr-cahier .m-tap.m-sel { background: #2F6BFF; color: #fff; box-shadow: none; }
.fr-cahier .m-tap.m-good { background: #2EC4A6; color: #fff; box-shadow: none; }
.fr-cahier .m-tap.m-bad { background: #E5484D; color: #fff; box-shadow: none; text-decoration: line-through; }
.fr-cahier.show .ktap-box { line-height: 52px; }
.fr-cahier.show .fr-w.lab { position: relative; display: inline-block; line-height: 26px; padding: 0 4px; margin: 0 1px 14px; border-bottom: 3px solid var(--tc); }
.fr-cahier.show .fr-w.lab i { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 3px; font: 800 10px/1 'Manrope', sans-serif; font-style: normal; color: #fff; background: var(--tc); padding: 3px 5px; border-radius: 5px; white-space: nowrap; }
.fr-conj-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fr-conj { background: #FFFDF6; color: #1A1A2E; border: 2px solid #E9E2CF; border-radius: 12px; overflow: hidden; }
.fr-conj-h { background: #D6336C; color: #fff; font: 800 13px/1.2 'Manrope', sans-serif; padding: 7px 10px; }
.fr-conj table { width: 100%; border-collapse: collapse; font: 600 14px/1.3 'Manrope', sans-serif; }
.fr-conj td { padding: 5px 10px; border-top: 1px solid #EFE8D6; }
.fr-conj td.p { color: #8A7F66; width: 1%; white-space: nowrap; padding-right: 4px; }
.fr-conj td.v { font-weight: 800; }
.fr-conj tr.hi td { background: #FFF3B0; }
.fr-book { position: relative; background: #FFFBF0; color: #2A2418; border-radius: 6px 14px 14px 6px; padding: 16px 18px 14px 22px; border: 1px solid #E8DCC0; box-shadow: inset 8px 0 10px -6px rgba(120, 90, 40, .35), 0 3px 0 #E8DCC0; font: 500 16px/1.6 Georgia, 'Times New Roman', serif; }
.fr-book-h { font: 800 13px/1.3 'Manrope', sans-serif; text-transform: uppercase; letter-spacing: 1px; color: #D6336C; margin-bottom: 8px; display: flex; flex-direction: column; gap: 2px; }
.fr-book-h span { text-transform: none; letter-spacing: 0; font-weight: 600; font-style: italic; color: #8A7F66; }
.fr-book p { margin: 0 0 8px; }
.fr-book p:last-child { margin-bottom: 0; }
.fr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.fr-cards-h { grid-column: 1 / -1; font: 800 13px/1 'Manrope', sans-serif; text-transform: uppercase; letter-spacing: 1px; color: #D6336C; }
.fr-card { background: #FFFDF6; color: #1A1A2E; border-radius: 12px; padding: 10px 12px; border: 2px solid #EFE8D6; border-left: 6px solid var(--tc); display: flex; flex-direction: column; gap: 3px; }
.fr-card b { font: 800 14px/1.2 'Manrope', sans-serif; }
.fr-card span { font: 500 13px/1.35 'Manrope', sans-serif; color: #4A4E6A; }
.fr-listen .tts:first-child { background: #D6336C; color: #fff; }
textarea.fr-in { resize: vertical; min-height: 54px; font: 600 18px/1.4 'Manrope', sans-serif; }
@media (max-width: 420px) { .fr-cahier .ktap-box { font-size: 18px; } }
body.y6 .stile.on[data-subject="francais"] { color: #FFFFFF; } body.y6 .stile.on[data-subject="francais"] svg { color: #FFFFFF; } body.y6 .stile.on[data-subject="francais"] .sbar i { background: #FFFFFF; }
