/* Lumea — École à la maison. Palette : forêt, mangue, lagune. Le cahier ligné est l'élément signature. */
:root {
  --forest: #0E3B2E;
  --forest-2: #175341;
  --mango: #F6A623;
  --mango-soft: #FDEBC8;
  --lagoon: #1C6E8C;
  --lagoon-soft: #DCEEF4;
  --ink: #17221E;
  --muted: #5B6B64;
  --line: #DCE3DF;
  --bg: #EEF3F0;
  --card: #FFFFFF;
  --ok: #23845A;
  --ok-soft: #DDF3E8;
  --bad: #C8402F;
  --bad-soft: #FBE3DF;
  --rule: #B9D3E6;
  --margin: #E46A5B;
  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 1px 2px rgba(14, 59, 46, .08), 0 6px 18px rgba(14, 59, 46, .06);
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body.lm-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.lm-body a { color: var(--lagoon); }
:where(.lm-body) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.lm-body :focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .4em; color: var(--forest); }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------------------------------------------------------------- login */
.lm-login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.lg-side { background: var(--forest); color: #E8F1EC; padding: 56px 6vw; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.lg-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: var(--mango); opacity: .14; }
.lg-brand { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: #fff; margin-bottom: 36px; }
.lg-side h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 14ch; }
.lg-side p { max-width: 46ch; color: #C6DAD0; font-size: 1.05rem; }
.lg-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; max-width: 360px; }
.lg-steps li { display: flex; gap: 12px; align-items: baseline; border-left: 3px solid var(--mango); padding: 4px 0 4px 12px; color: #C6DAD0; }
.lg-steps b { color: #fff; font-family: var(--display); min-width: 96px; }
.lg-card { align-self: center; justify-self: center; width: min(420px, 92vw); padding: 40px 0; }
.lg-card h1 { font-size: 2.2rem; }
.lg-sub { color: var(--muted); }
.lg-card form p { margin: 0 0 14px; }
.lg-card label { display: block; font-weight: 700; margin-bottom: 4px; }
.lg-card input[type=text], .lg-card input[type=password] { width: 100%; padding: 13px 14px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 1.05rem; }
.lg-card input:focus { border-color: var(--lagoon); outline: none; }
.lg-card .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.lg-card input[type=submit] { width: 100%; padding: 14px; border: 0; border-radius: var(--r-sm); background: var(--forest); color: #fff; font-family: var(--display); font-size: 1.15rem; font-weight: 700; cursor: pointer; }
.lg-card input[type=submit]:hover { background: var(--forest-2); }
.lg-err { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-weight: 700; }
@media (max-width: 820px) {
  .lm-login { grid-template-columns: 1fr; }
  .lg-side { padding: 32px 20px; }
  .lg-brand { margin-bottom: 16px; }
  .lg-steps { display: none; }
  .lg-card { padding: 28px 0 48px; }
}

/* ---------------------------------------------------------------- shell */
.lm-loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.spin { width: 36px; height: 36px; border: 4px solid var(--line); border-top-color: var(--mango); border-radius: 50%; animation: lmspin 1s linear infinite; }
@keyframes lmspin { to { transform: rotate(360deg); } }

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--forest); color: #D3E4DB; padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: #fff; padding: 0 8px 18px; text-decoration: none; }
.side .who { margin: 0 6px 16px; padding: 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .07); }
.side .who b { display: block; color: #fff; font-size: 1rem; }
.side .who span { font-size: .85rem; color: var(--mango); font-weight: 700; }
.nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); color: #D3E4DB; text-decoration: none; font-weight: 700; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.on { background: var(--mango); color: var(--forest); }
.nav a .ic { width: 22px; text-align: center; font-size: 1.1rem; }
.nav a .cnt { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: .75rem; padding: 0 7px; }
.nav a.on .cnt { background: var(--forest); }
.side .out { margin-top: auto; color: #9FBDAF; text-decoration: none; padding: 10px 12px; font-weight: 700; }
.side .out:hover { color: #fff; }
.main { padding: 28px clamp(16px, 4vw, 44px) 80px; min-width: 0; max-width: 1180px; width: 100%; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.top h1 { margin: 0; }
.top .sub { color: var(--muted); margin: 2px 0 0; }
.crumb { font-size: .9rem; margin-bottom: 6px; }
.crumb a { text-decoration: none; font-weight: 700; }

.tabbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 16px 96px; }
  .mtop { display: flex; align-items: center; justify-content: space-between; background: var(--forest); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 20; }
  .mtop .brand { display: flex; gap: 8px; align-items: center; font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: #fff; text-decoration: none; }
  .mtop .out { color: #C6DAD0; font-size: .85rem; text-decoration: none; font-weight: 700; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 30; overflow-x: auto; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font-size: .7rem; font-weight: 700; color: var(--muted); text-decoration: none; text-align: center; }
  .tabbar a .ic { font-size: 1.25rem; }
  .tabbar a.on { color: var(--forest); box-shadow: inset 0 3px 0 var(--mango); }
  h1 { font-size: 1.6rem; }
}
@media (min-width: 901px) { .mtop { display: none; } }

/* ---------------------------------------------------------------- blocks */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.sp { flex: 1; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--display); font-size: 1.8rem; color: var(--forest); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stats .stat { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-sm); padding: 11px 18px; font-weight: 800; cursor: pointer; text-decoration: none; background: var(--forest); color: #fff; font-size: .98rem; line-height: 1.2; }
.lm-body a.btn { color: #fff; }
.btn:hover { background: var(--forest-2); }
.btn.sun { background: var(--mango); color: var(--forest); }
.lm-body a.btn.sun { color: var(--forest); }
.btn.sun:hover { background: #F9B848; }
.btn.ghost { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 2px var(--line); }
.lm-body a.btn.ghost { color: var(--forest); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--forest); background: transparent; }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad-soft); }
.btn.sm { padding: 7px 12px; font-size: .88rem; }
.btn.big { padding: 15px 26px; font-size: 1.1rem; font-family: var(--display); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 2px 10px; font-size: .8rem; font-weight: 800; background: var(--lagoon-soft); color: var(--lagoon); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.sun { background: var(--mango-soft); color: #8A5A00; }
.pill.grey { background: #EDF0EE; color: var(--muted); }

.bar { display: block; height: 8px; background: #E5ECE8; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.bar.sun i { background: var(--mango); }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .big { font-size: 2.4rem; display: block; margin-bottom: 6px; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 800; }
.list .s { color: var(--muted); font-size: .88rem; }
.list a.rowlink { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; }
.list a.rowlink:hover .t { color: var(--lagoon); }

.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 800; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.on { color: var(--forest); border-bottom-color: var(--mango); }

table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; color: var(--muted); font-size: .82rem; font-weight: 800; padding: 8px 10px; border-bottom: 2px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tblwrap { overflow-x: auto; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .lbl { font-weight: 800; font-size: .92rem; }
.field .help { font-size: .82rem; color: var(--muted); }
.inp, .field input[type=text], .field input[type=password], .field input[type=email], .field input[type=date], .field input[type=number], .field select, .field textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.field textarea { min-height: 84px; resize: vertical; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--lagoon); outline: none; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; max-height: 280px; overflow: auto; padding: 4px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.checks label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.checks label:hover { background: var(--bg); }
.checks .grp { grid-column: 1 / -1; font-weight: 800; color: var(--muted); font-size: .8rem; padding: 6px 8px 0; }
.err { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; margin-bottom: 12px; }
.note { background: var(--mango-soft); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 14px; }

.qedit { border: 2px solid var(--line); border-radius: var(--r); padding: 14px; background: #FBFCFB; margin-bottom: 12px; }
.qedit .qhead { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.qedit .qnum { font-family: var(--display); font-weight: 800; color: var(--forest); font-size: 1.2rem; }
.opt-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.opt-row input[type=text] { flex: 1; }

.step { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; margin-bottom: 8px; }
.step .ico { font-size: 1.3rem; }
.step .grow { flex: 1; min-width: 0; }
.step input[type=date] { width: 150px; padding: 6px 8px; border: 2px solid var(--line); border-radius: 8px; }
.iconbtn { background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 6px; border-radius: 6px; color: var(--muted); }
.iconbtn:hover { background: var(--bg); color: var(--ink); }

/* ---------------------------------------------------------------- student */
.hello { background: var(--forest); color: #E3EEE8; border-radius: 20px; padding: 26px 28px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; position: relative; overflow: hidden; }
.hello::before { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: var(--mango); opacity: .9; }
.hello > * { position: relative; }
.hello h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 4px; }
.hello .lvl { display: inline-block; background: var(--mango); color: var(--forest); font-family: var(--display); font-weight: 800; padding: 2px 12px; border-radius: 99px; margin-bottom: 10px; }
.hello .sun { font-size: 3.4rem; line-height: 1; }
.hello .meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.hello .meta b { color: #fff; font-family: var(--display); font-size: 1.4rem; display: block; }
@media (max-width: 600px) { .hello { grid-template-columns: 1fr; padding: 22px; } .hello .sun { display: none; } .hello::before { width: 150px; height: 150px; right: -70px; top: -70px; opacity: .35; } }

.subj { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; border-top: 6px solid var(--c, var(--lagoon)); }
.subj:hover { transform: translateY(-2px); transition: transform .15s; }
.subj .ico { font-size: 2rem; line-height: 1; }
.subj h3 { margin: 0; }
.subj .s { color: var(--muted); font-size: .88rem; }

.trim { margin-bottom: 18px; }
.trim h4 { font-family: var(--display); color: var(--lagoon); margin: 0 0 6px; font-size: 1rem; }
.trim ol { margin: 0; padding-left: 22px; }
.trim li { padding: 3px 0; }

.lesson-row { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-sm); background: #fff; border: 2px solid var(--line); text-decoration: none; color: inherit; margin-bottom: 10px; }
.lesson-row:hover { border-color: var(--lagoon); }
.lesson-row .n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; background: var(--lagoon-soft); color: var(--lagoon); flex: none; }
.lesson-row.done .n { background: var(--ok); color: #fff; }
.lesson-row .grow { flex: 1; min-width: 0; }

/* The signature : lessons are written in an exercise book. */
.cahier { background: #fff; border-radius: 6px 18px 18px 6px; box-shadow: var(--shadow); position: relative; padding: 30px clamp(18px, 4vw, 48px) 34px clamp(48px, 7vw, 92px);
  background-image: linear-gradient(to right, transparent calc(clamp(36px, 5.5vw, 74px)), var(--margin) calc(clamp(36px, 5.5vw, 74px)), var(--margin) calc(clamp(36px, 5.5vw, 74px) + 2px), transparent calc(clamp(36px, 5.5vw, 74px) + 2px)),
    repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--rule) 31px, var(--rule) 32px);
  background-position: 0 0, 0 14px; line-height: 32px; font-size: 1.06rem; }
.cahier::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; border-radius: 6px 0 0 6px; background: var(--c, var(--lagoon)); }
.cahier h2.lt { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--c, var(--forest)); line-height: 1.2; margin: 0 0 16px; text-decoration: underline; text-decoration-color: var(--mango); text-underline-offset: 6px; text-decoration-thickness: 3px; }
.cahier p, .cahier li { margin: 0 0 0; }
.cahier p + p, .cahier ul, .cahier ol, .cahier table, .cahier .box, .cahier h4 { margin-top: 32px; }
.cahier h4 { font-family: var(--display); color: var(--lagoon); font-size: 1.15rem; margin-bottom: 0; line-height: 32px; }
.cahier ul, .cahier ol { padding-left: 24px; margin-bottom: 0; }
.cahier .box { border-radius: 10px; padding: 0 16px; background: rgba(246, 166, 35, .12); border-left: 5px solid var(--mango); }
.cahier .box.rule { background: rgba(28, 110, 140, .09); border-left-color: var(--lagoon); }
.cahier .box.ex { background: rgba(35, 132, 90, .09); border-left-color: var(--ok); }
.cahier .box h4 { margin-top: 0; }
.cahier .box > h4 + * { margin-top: 0; }
.cahier table { border-collapse: collapse; background: #fff; line-height: 1.4; }
.cahier th, .cahier td { border: 1px solid var(--line); padding: 6px 10px; }
.cahier th { background: var(--lagoon-soft); }
.lesson-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------------------------------------------------------------- exercise runner */
.runner { max-width: 760px; margin: 0 auto; }
.runner .prog { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.runner .prog .bar { flex: 1; height: 12px; }
.runner .prog .bar i { background: var(--mango); transition: width .3s; }
.qcard { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 26px; }
.qtext { font-size: 1.25rem; font-weight: 700; line-height: 1.5; margin-bottom: 18px; }
.qtext input.box-in { width: 7em; padding: 4px 8px; border: 0; border-bottom: 3px solid var(--lagoon); background: var(--lagoon-soft); border-radius: 6px 6px 0 0; font-weight: 800; text-align: center; font-size: 1.1rem; }
.qtext input.box-in:focus { outline: none; border-bottom-color: var(--mango); }
.say { background: var(--lagoon-soft); color: var(--lagoon); border: 0; border-radius: 99px; padding: 4px 12px; font-weight: 800; cursor: pointer; font-size: .85rem; margin-bottom: 10px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.opt { text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; font-weight: 700; cursor: pointer; font-size: 1.05rem; }
.opt:hover { border-color: var(--lagoon); }
.opt.sel { border-color: var(--lagoon); background: var(--lagoon-soft); }
.opt.good { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.words { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 10px; border-radius: 12px; }
.words.target { border: 2px dashed var(--lagoon); background: var(--lagoon-soft); margin-bottom: 10px; }
.word { background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 8px 14px; font-weight: 800; cursor: pointer; font-size: 1.05rem; }
.word:hover { border-color: var(--mango); }
.word.used { visibility: hidden; }
.qcard textarea { width: 100%; min-height: 150px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; font-size: 1.05rem; }
.feedback { margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-weight: 700; }
.feedback.good { background: var(--ok-soft); color: var(--ok); }
.feedback.wrong { background: var(--bad-soft); color: var(--bad); }
.feedback .ex { font-weight: 600; color: var(--ink); margin-top: 4px; }
.hint { margin-top: 12px; font-size: .92rem; color: var(--muted); }
.runner .actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

.result { text-align: center; padding: 36px 24px; }
.result .score { font-family: var(--display); font-size: 4.2rem; font-weight: 800; color: var(--forest); line-height: 1; }
.result .ring { width: 170px; height: 170px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: conic-gradient(var(--c, var(--ok)) calc(var(--p) * 1%), #E5ECE8 0); }
.result .ring > div { width: 136px; height: 136px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.badge-pop { display: inline-flex; gap: 8px; align-items: center; background: var(--mango-soft); border-radius: 99px; padding: 6px 14px; font-weight: 800; margin: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .result .ring { animation: pop .5s ease-out; }
  @keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}

.review-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; }
.review-item .q { font-weight: 700; margin-bottom: 6px; }
.review-item .a { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .95rem; }
.review-item .open-ans { white-space: pre-wrap; background: var(--bg); padding: 10px 12px; border-radius: 8px; margin: 6px 0; }

/* ---------------------------------------------------------------- reports */
.kid { display: flex; flex-direction: column; gap: 12px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; text-decoration: none; color: inherit; }
.kid:hover { box-shadow: 0 0 0 2px var(--lagoon), var(--shadow); }
.kid .head { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: #fff; background: var(--lagoon); flex: none; font-size: 1.1rem; }
.kid .nm { font-weight: 800; font-size: 1.05rem; }
.kid .mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.kid .mini b { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--forest); }
.kid .mini span { font-size: .75rem; color: var(--muted); }
.kid .last { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.days { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.days i { flex: 1; background: var(--lagoon); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.days i.zero { background: #DCE3DF; }
.days-l { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.subj-line { display: grid; grid-template-columns: 30px 1fr 120px 52px; gap: 10px; align-items: center; padding: 8px 0; }
.subj-line .pc { text-align: right; font-weight: 800; }
.msg { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--mango-soft); margin-bottom: 8px; }
.msg .st { font-size: 1.8rem; }
.msg.read { background: #F3F6F4; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.bdg { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; text-align: center; padding: 12px 6px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); font-size: .8rem; font-weight: 700; }
.bdg .i { font-size: 2rem; }
.bdg.off { opacity: .35; filter: grayscale(1); }

.lvl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lvl-card { background: #fff; border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 14px; text-decoration: none; color: inherit; border-left: 5px solid var(--lagoon); }
.lvl-card b { display: block; font-family: var(--display); font-size: 1.2rem; color: var(--forest); }
.lvl-card span { color: var(--muted); font-size: .85rem; }
.cyc-h { margin: 22px 0 10px; color: var(--lagoon); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--forest); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 800; z-index: 99; box-shadow: var(--shadow); max-width: 90vw; }
.toast.bad { background: var(--bad); }
@media (max-width: 900px) { .toast { bottom: 84px; } }

.modal-bg { position: fixed; inset: 0; background: rgba(14, 59, 46, .45); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 18px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 22px; }

/* ---------------------------------------------------------------- préscolaire : grand format */
.little .qtext { font-size: 1.7rem; text-align: center; }
.little .opts { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.little .opt { text-align: center; font-size: 1.8rem; padding: 22px 10px; border-radius: 18px; }
.little .word { font-size: 1.7rem; padding: 12px 18px; }
.little .cahier { font-size: 1.25rem; }
.little .subj .ico { font-size: 2.8rem; }

@media print {
  .side, .tabbar, .mtop, .btn, .lesson-actions { display: none !important; }
  .shell { display: block; }
}
.tbl td .avatar { width: 32px; height: 32px; display: inline-grid; vertical-align: middle; margin-right: 8px; font-size: .78rem; }
.split > .card + .card, .grid > .card + .card { margin-top: 0; }

/* Lumea 1.1 — présentation adaptée aux cycles */
:root{--bg:#f4f7f3;--line:#dfe9e2;--shadow:0 8px 26px rgba(14,59,46,.07);--r:18px}
.lg-side{background:linear-gradient(90deg,rgba(8,45,35,.96),rgba(8,45,35,.70)),url('young.jpg') center/cover}.lg-side::after{display:none}.lg-card{padding:42px;background:#fff;border-radius:24px;box-shadow:0 20px 55px #173c3020}.lg-card input[type=submit]{border-radius:12px}.side{background:linear-gradient(160deg,#103e31,#092d26)}.main{max-width:1320px}.card{border:1px solid #e8efeb;box-shadow:var(--shadow);padding:23px}.btn,.card,.lesson-row,.subj,.kid{transition:transform .22s ease,box-shadow .22s ease}.btn:hover,.lesson-row:hover,.subj:hover,.kid:hover{transform:translateY(-3px);box-shadow:0 12px 26px #143b3020}.btn:focus-visible,.lm-body a:focus-visible{outline:3px solid #f6a623;outline-offset:3px}
.hello{min-height:295px;padding:34px;border-radius:24px;background:linear-gradient(90deg,rgba(9,54,42,.97) 0%,rgba(9,54,42,.89) 48%,rgba(9,54,42,.25) 100%),url('older.jpg') center/cover;box-shadow:0 18px 40px #143f3220}.hello::before{display:none}.hello>div:first-child{max-width:570px}.hello .sun{display:none}.hello h1{font-size:clamp(1.9rem,4vw,3rem);letter-spacing:-.035em}.hello .lvl{padding:5px 13px}.hello .meta{margin-top:18px}.hello .meta>div{border-left:1px solid #ffffff80;padding-left:12px}.age-prescolaire .hello,.age-primaire .hello{background-image:linear-gradient(90deg,rgba(10,56,45,.97) 0%,rgba(10,56,45,.84) 48%,rgba(10,56,45,.18) 100%),url('young.jpg')}.age-prescolaire .hello{border-radius:30px}.age-prescolaire .card{border-radius:24px}.age-prescolaire .btn{min-height:48px}.age-prescolaire .nav a{font-size:1.05rem}.age-secondaire .hello .lvl{background:#f6cf7f}.age-secondaire h1,.age-secondaire h2,.age-secondaire h3{letter-spacing:-.025em}
@media(prefers-reduced-motion:no-preference){.hello,.main>.top,.main>.card{animation:lm-arrive .55s ease both}@keyframes lm-arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}}
@media(max-width:820px){.lg-card{width:min(92vw,480px);margin:22px auto 42px;padding:26px}.lg-side{min-height:250px}.hello{min-height:280px;padding:26px;background-position:60% center}.hello .meta{gap:10px 16px}}
@media(max-width:500px){.hello{min-height:270px}.hello h1{font-size:1.9rem}.hello .meta{font-size:.82rem}.hello .meta b{font-size:1.15rem}.card{padding:18px}}
@media(prefers-reduced-motion:reduce){.lm-body *, .lm-body *::before,.lm-body *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
