/* Mise en page de l'application : barre du haut, pages enseignant et élève. */

/* ---------- démarrage, connexion */
.boot, .loading { min-height: 40vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 17px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; place-items: safe center; align-content: center; align-content: safe center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); position: relative; overflow-x: clip; overflow-y: visible; background: radial-gradient(circle at 15% 20%, #fff4d9 0, transparent 38%), radial-gradient(circle at 85% 80%, #e1f0ee 0, transparent 40%), var(--bg); }
.login-card { position: relative; z-index: 1; width: min(440px, 100%); background: #fff; border-radius: 28px; box-shadow: var(--shadow-lift); padding: 32px 30px 26px; }
.login-card h1 { font-size: 40px; margin: 18px 0 6px; }
.login-form { margin-top: 18px; }
.login-form .btn { width: 100%; margin-top: 8px; }
.form-error { color: #a33a26; min-height: 1.4em; margin: 6px 0; font-weight: 600; }
.login-card-hint { font-size: 14.5px; color: var(--muted); margin: 16px 0 0; display: flex; align-items: center; gap: 6px; }
.login-art .bubble { position: absolute; font-size: 54px; filter: drop-shadow(0 8px 14px rgb(0 0 0 / 10%)); animation: float 7s ease-in-out infinite; }
.b1 { left: 8%; top: 14%; } .b2 { right: 10%; top: 18%; animation-delay: -2s !important; } .b3 { left: 12%; bottom: 14%; animation-delay: -4s !important; } .b4 { right: 14%; bottom: 12%; animation-delay: -1s !important; }
@keyframes float { 50% { transform: translateY(-14px) rotate(4deg); } }

/* ---------- marque, barre du haut */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--title-font); font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand.big { font-size: 22px; }
.brand small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: -3px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #2a8a93, #185c63); color: #fff; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 24px; box-shadow: 0 3px 8px rgb(20 80 90 / 30%); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px max(16px, env(safe-area-inset-left)); background: rgb(255 255 255 / 94%); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line-2); }
.topbar.slim { padding-top: 6px; padding-bottom: 6px; }
.mainnav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.navlink { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-family: var(--title-font); font-weight: 500; font-size: 15px; white-space: nowrap; }
.navlink:hover { background: var(--bg); color: var(--ink); }
.navlink[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.navlink .ico { width: 19px; height: 19px; }
.topbar-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.who { font-weight: 600; font-size: 15px; color: var(--ink-2); }
.topbar .back { margin-right: auto; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-family: var(--title-font); font-weight: 700; flex: none; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgb(0 0 0 / 12%); }

/* ---------- pages */
.page { max-width: 1240px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-left)) 60px; }
.page.focus { max-width: none; padding: 0 0 40px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; margin: 4px 0 20px; }
.page-head h1 { font-size: 34px; }
.page-head .grow { flex: 1; min-width: 240px; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.section-title { font-size: 21px; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.empty { text-align: center; padding: 40px 20px; }
.empty-art { display: inline-flex; width: 64px; height: 64px; border-radius: 20px; align-items: center; justify-content: center; background: var(--sun-soft); color: #b07a00; margin-bottom: 10px; }
.empty-art .ico { width: 32px; height: 32px; }
.error-card { max-width: 600px; margin: 40px auto; }
.note-box { background: var(--sun-soft); border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.note-box.danger { background: var(--coral-soft); color: #7e2e1d; }
.fam-notes { margin: 0 0 18px; }
.pres-controls { display: grid; gap: 10px; margin: 6px 0 14px; }
.pres-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pres-field > span { min-width: 170px; font-weight: 600; }
.pres-summary { margin-bottom: 10px; }
.pres-summary p { margin: 0 0 6px; }
.pres-notes { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted, #555); }
.pres-preview { overflow-x: auto; background: #eef0ec; border-radius: 12px; padding: 10px; min-height: 120px; }
.pres-preview .sheets { flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: flex-start; gap: 10px; padding: 0; }
.pres-preview.lisible .sheets { flex-direction: column; align-items: center; }
.pres-size { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.pres-hint { margin: -4px 0 0; }
.fam-assemble { margin: -4px 0 12px; }
.asm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; margin: 4px 0 14px; }
.asm-summary { margin: 12px 0 0; font-size: 15.5px; }
.pres-preview .sheet { box-shadow: 0 1px 3px rgb(30 40 50 / 15%); }
.info-box { background: var(--sky-soft); border-radius: 14px; padding: 12px 16px; font-size: 15px; color: #1e3f7e; }
.kbd { font-family: ui-monospace, monospace; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.lvl { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 7px; border-radius: 8px; font-family: var(--title-font); font-weight: 700; font-size: 13px; background: #e8eef7; color: #2d4f86; }
.lvl-2 { background: #efe8fb; color: #56389f; } .lvl-3 { background: #fdebd9; color: #97501a; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-family: var(--title-font); font-weight: 500; font-size: 14.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }

/* ---------- journée (enseignant) */
.day-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-nav .date-input { min-height: 44px; border-radius: 999px; padding: 6px 16px; border: 1.5px solid var(--line); background: #fff; font-size: 16px; }
.slot-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.slot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.slot-time { font-family: var(--title-font); font-weight: 700; font-size: 22px; }
.slot-subject { font-weight: 600; color: var(--ink-2); }
.slot-body { padding: 8px 12px 14px; }
.pupil-row { display: grid; grid-template-columns: minmax(170px, 1.1fr) auto minmax(220px, 2fr) auto; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 14px; }
.pupil-row + .pupil-row { border-top: 1px solid var(--line-2); border-radius: 0; }
.pupil-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.pupil-name small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.pupil-name .passages { font-size: 12px; color: #7a5600; background: var(--sun-soft); border-radius: 999px; padding: 1px 7px; margin-left: 4px; font-weight: 700; }
.attend { display: inline-flex; gap: 4px; }
.attend button { min-width: 38px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; color: var(--muted); }
.attend button.on-present { background: var(--leaf-soft); border-color: #8fd0aa; color: #1d6b41; }
.attend button.on-absent { background: var(--coral-soft); border-color: #eeb2a3; color: #9a3a25; }
.work-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.work-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); font-size: 14px; cursor: pointer; }
.work-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: #c9c2b2; }
.work-chip.started .dot { background: var(--sun); }
.work-chip.submitted .dot { background: var(--leaf); }
.work-chip.help { box-shadow: 0 0 0 2px var(--coral); }
.help-banner { display: flex; align-items: center; gap: 12px; background: var(--coral-soft); color: #7e2e1d; border-radius: 16px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }

/* ---------- bibliothèque */
.lib-layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.lib-side { position: sticky; top: 84px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 14px; }
.lib-side h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 8px 6px; }
.lib-filter { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 12px; text-align: left; font-size: 15px; color: var(--ink); }
.lib-filter:hover { background: var(--bg); }
.lib-filter[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.lib-filter .count { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.lib-filter .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lib-search { position: relative; flex: 1; min-width: 220px; }
.lib-search .input { padding-left: 42px; border-radius: 999px; }
.lib-search .ico { position: absolute; left: 14px; top: 13px; color: var(--muted); }
.lib-group-title { font-family: var(--title-font); font-weight: 700; font-size: 15px; color: var(--muted); margin: 22px 4px 10px; text-transform: capitalize; }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.fam-card { position: relative; display: flex; flex-direction: column; gap: 8px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 16px 16px 14px; text-decoration: none; color: inherit; border-top: 5px solid var(--c, #607080); transition: transform .12s, box-shadow .12s; }
.fam-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.fam-card h3 { font-size: 19px; }
.fam-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; color: var(--muted); }
.fam-emoji { font-size: 22px; }
.fam-icons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.fam-icons .tag { font-size: 12px; padding: 2px 9px; }
.fam-card.archived { opacity: .55; }

/* ---------- page d'une notion */
.fam-hero { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 22px 24px; border-left: 8px solid var(--c, var(--brand)); margin-bottom: 18px; }
.fam-hero h1 { font-size: 34px; }
.fam-hero .emoji { font-size: 44px; line-height: 1; }
.level-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.level-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.level-card h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.level-card .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.thumb { position: relative; height: 150px; overflow: hidden; border-radius: 12px; background: #eef0ec; border: 1px solid var(--line-2); }
.thumb .sheets { transform-origin: 0 0; padding: 0; align-items: flex-start; }
.thumb .sheet { box-shadow: none; }

/* ---------- visionneuse de fiche (enseignant et élève) */
.viewer-bar { position: sticky; top: var(--topbar-h, 55px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; background: rgb(244 242 236 / 95%); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.viewer-bar .title { font-family: var(--title-font); font-weight: 700; font-size: 18px; margin-right: 8px; }
.viewer { padding: 18px 12px 40px; }
.work-body .ls-bar { position: relative; top: auto; }
.viewer.step .sheets { display: none; }
.save-status { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.save-status.pending .dot { background: var(--sun); }
.save-status.error .dot { background: var(--coral); }

/* mode pas à pas */
.steps-view { max-width: 980px; margin: 0 auto; }
.step-card { background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 20px 20px 24px; }
.step-card .sheet-stage { overflow: hidden; border-radius: 14px; background: #fff; }
.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.step-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.step-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-weight: 700; font-family: var(--title-font); color: var(--muted); }
.step-dot.now { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.step-dot.done { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.step-dot.part { background: var(--sun-soft); border-color: var(--sun); color: #7a5600; }
.step-ex { zoom: var(--step-zoom, 1.6); }
.step-ex .ex { margin: 0; }
.step-ex.sheet-like { font-family: SheetSans, 'DejaVu Sans', sans-serif; color: #252525; font-size: 11.8pt; padding: 8pt 10pt; }
.check-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.feedback-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 700; }
.feedback-pill.ok { background: var(--leaf-soft); color: #1d6b41; }
.feedback-pill.retry { background: var(--coral-soft); color: #8c3522; }
.feedback-pill.partial { background: var(--sun-soft); color: #7a5600; }
.feedback-pill.review { background: var(--sky-soft); color: #244d9e; }

/* ---------- élève : accueil */
body[data-role="student"] { background: linear-gradient(180deg, #fbf7ee 0, #f4f2ec 320px); }
.hello { display: flex; align-items: center; gap: 18px; margin: 8px 0 22px; }
.hello h1 { font-size: 38px; }
.hello p { margin: 4px 0 0; color: var(--ink-2); font-size: 18px; }
.task-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.task { position: relative; display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 20px; border: 3px solid transparent; }
.task.today { border-color: var(--sun); }
.task-top { display: flex; align-items: center; gap: 12px; }
.task-emoji { width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; background: var(--c-soft, #eef2f6); flex: none; }
.task h3 { font-size: 21px; }
.task .sub { color: var(--muted); font-size: 15px; }
.task .btn.big { width: 100%; }
.task-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.practice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.practice-card { display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 18px; text-decoration: none; color: inherit; border-bottom: 6px solid var(--c, var(--brand)); transition: transform .12s; }
.practice-card:hover { transform: translateY(-3px); }
.practice-card h3 { font-size: 20px; }
.stars { color: #ddd6c4; letter-spacing: 2px; font-size: 20px; }
.stars .on { color: var(--sun); }
.big-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.big-choice button, .big-choice a { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border-radius: 22px; border: 2px solid var(--line); background: #fff; text-align: left; text-decoration: none; color: inherit; font-size: 17px; }
.big-choice button:hover, .big-choice a:hover { border-color: var(--brand); background: #f7fbfa; }
.big-choice .big-emoji { font-size: 36px; }
.big-choice strong { font-family: var(--title-font); font-size: 20px; }

/* ---------- entraînement */
.practice-tools { margin: 0 0 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 2; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 16px 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-family: var(--title-font); font-weight: 500; font-size: 15.5px; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--c, var(--brand)); border-color: var(--c, var(--brand)); color: #fff; }
.practice-notion .ls-head { border-top: 6px solid var(--c, var(--brand)); }
.parcours .big-choice { margin-bottom: 8px; }
.parcours .big-choice button { min-height: 150px; }
.parcours-emoji { font-size: 1.1em; }
.parcours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.parcours-box { border: 1.5px solid var(--line-2); border-radius: 20px; padding: 16px 18px; background: #fcfbf8; font-size: 16px; }
.parcours-box .ls-h3 { font-size: 19px; }
.parcours-line { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.parcours-line .grow { flex: 1; }
.parcours-box .spark { height: 70px; margin: 8px 0; }

/* ---------- progrès */
.progress-bar { height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5fc28b, #2e9d62); }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.progress-card { gap: 6px; }
.progress-card .what { min-width: 86px; font-weight: 600; font-size: 14.5px; }
.progress-card .parcours-line { padding: 4px 0; font-size: 15px; }
.trend { font-weight: 700; font-size: 13px; border-radius: 999px; padding: 2px 8px; }
.trend.up { background: var(--leaf-soft); color: #1d6b41; }
.stat-emoji { font-size: .8em; }
.small { font-size: 13px; }
.evolution .spark { height: 110px; margin-bottom: 10px; }
.evolution .feedback-pill { margin: 8px 0 0; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 46px; }
.spark span { flex: 1; min-width: 8px; border-radius: 4px 4px 2px 2px; background: #9fd3b3; }
.spark span.low { background: #f3c26a; }
.spark span.bad { background: #ef9a86; }

/* ---------- tableaux */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.table th { text-align: left; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: #faf9f5; border-bottom: 1px solid var(--line-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fbfaf6; }

/* ---------- planning */
.prog-row { display: grid; grid-template-columns: 70px 1.6fr 1fr 1fr 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.prog-row .input { min-height: 40px; font-size: 15px; padding: 6px 10px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px; }
.stat .n { font-family: var(--title-font); font-size: 30px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 14px; }
.stat.good .n { color: var(--leaf); }
.plan-slot { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.plan-slot .when { font-weight: 700; }
.plan-slot .when small { display: block; font-weight: 500; color: var(--muted); }
.plan-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin-bottom: 6px; }
.code-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 26px; padding: 0 8px; border-radius: 8px; font-family: var(--title-font); font-weight: 700; font-size: 13.5px; background: var(--brand-soft); color: var(--brand-ink); }
.code-badge.rev { background: var(--sun-soft); color: #7a5600; }

/* ---------- impression (cahier journal, grille, cartes) */
.print-page { background: #fff; color: #111; }
.print-only { display: none; }
@media print {
  body { background: #fff !important; }
  .topbar, .viewer-bar, .no-print, #toast { display: none !important; }
  .page, .page.focus { padding: 0 !important; max-width: none !important; }
  .print-only { display: block; }
}

/* ---------- petits écrans */
@media (max-width: 980px) {
  .lib-layout { grid-template-columns: 1fr; }
  .lib-side { position: static; }
  .pupil-row { grid-template-columns: 1fr auto; }
  .pupil-row .work-chips { grid-column: 1 / -1; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .navlink span, .hide-s { display: none; }
  .navlink { padding: 9px 11px; }
  .who { display: none; }
  .page-head h1 { font-size: 28px; }
  .hello h1 { font-size: 30px; }
  .prog-row { grid-template-columns: 60px 1fr; }
  .plan-slot { grid-template-columns: 1fr; }
}

/* ---------- journée : compléments */
.plan-input { max-width: 320px; min-height: 38px; padding: 6px 12px; font-size: 15px; border-radius: 999px; background: var(--bg); border-color: transparent; }
.plan-input:hover { border-color: var(--line); }
.pupil-row.absent { opacity: .55; }
.pupil-name { text-decoration: none; color: inherit; }
.pupil-name:hover span:first-of-type { text-decoration: underline; }
.slot-head .btn.small .ico { width: 16px; height: 16px; }
.help-banner .grow { flex: 1; }

/* ---------- donner une activité */
.assign-h { font-size: 16px; margin: 18px 0 10px; color: var(--ink-2); }
.assign-h:first-child { margin-top: 0; }
.assign-fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 10px; max-height: 300px; overflow: auto; padding: 2px; }
.assign-fam { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; border-left: 5px solid var(--c, var(--line)); }
.assign-fam strong { display: block; font-size: 15px; }
.assign-fam small { display: block; color: var(--muted); font-size: 12.5px; }
.assign-fam .grow { flex: 1; min-width: 0; }
.assign-fam[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.assign-class { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: start; margin-top: 10px; }
.assign-class-name { font-weight: 700; font-size: 13.5px; color: var(--muted); padding-top: 8px; }
.assign-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; overflow: hidden; }
.pchip.on { border-color: var(--brand); background: var(--brand-soft); }
.pchip-name { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 4px 12px 4px 4px; font-size: 14.5px; font-weight: 600; min-height: 36px; }
.pchip-name .avatar { box-shadow: none; }
.pchip:not(.on) .pchip-name { color: var(--ink-2); font-weight: 500; }
.pchip-level { border: 0; margin-right: 5px; cursor: pointer; }
.assign-opts { display: flex; flex-direction: column; gap: 10px; }
.field.inline { flex-direction: row; align-items: center; gap: 12px; margin: 0; flex-wrap: wrap; }
.field.inline > span { min-width: 70px; }
.field.inline .input { width: auto; }
.assign-summary { margin: 0 auto 0 0; align-self: center; }
@media (max-width: 720px) { .assign-class { grid-template-columns: 1fr; } }

/* ---------- bibliothèque : compléments */
.lib-top { margin-bottom: 4px; }
.lib-check { padding: 6px 10px; font-size: 14.5px; }
.count-line { color: var(--ink-2); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 20px; border: 2.5px dashed #c9d9d6; border-radius: 20px; background: #f7fbfa; cursor: pointer; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.drop-ico { display: inline-flex; width: 54px; height: 54px; border-radius: 16px; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.drop-ico .ico { width: 28px; height: 28px; }
.dropzone strong { font-family: var(--title-font); font-size: 19px; }
.dropzone .muted { max-width: 620px; font-size: 14.5px; }
.import-plan { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.import-row { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line-2); border-left: 6px solid var(--c, var(--line)); }
.import-row.skipped { opacity: .45; }
.import-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.import-fields .input { min-height: 40px; padding: 6px 10px; font-size: 15px; }
.import-fields .input.title { font-weight: 700; font-size: 16.5px; }
.import-fields .row .input { flex: 1; min-width: 140px; width: auto; }
.import-files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.import-files details { width: 100%; }
.import-files summary { cursor: pointer; color: var(--muted); }
.import-files ul { margin: 6px 0 0; padding-left: 20px; }
.ignored { margin-top: 10px; color: var(--muted); font-size: 14px; }
.import-report { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.import-report > li { padding: 10px 14px; border-radius: 14px; background: var(--leaf-soft); }
.import-report > li.ko { background: var(--coral-soft); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 14px; }
.json-area { min-height: 260px; margin-bottom: 10px; white-space: pre; }
.json-result { margin-top: 12px; }
.problems { background: var(--coral-soft); color: #7e2e1d; border-radius: 14px; padding: 12px 16px; }
.problems ul { margin: 6px 0; padding-left: 20px; }
.json-ok { background: var(--leaf-soft); border-radius: 14px; padding: 12px 16px; }
.json-ok ul { margin: 4px 0; padding-left: 20px; }
.kit-steps { padding-left: 22px; }
.kit-steps li { margin-bottom: 6px; }
.kit-pre { white-space: pre-wrap; background: #f7f6f2; border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; font-size: 13.5px; max-height: 50vh; overflow: auto; margin-top: 12px; }

/* ---------- notion : compléments */
.back-link { margin: -4px 0 10px -8px; }
.fam-hero .grow { flex: 1; min-width: 260px; }
.fam-hero .fam-meta { margin-top: 8px; }
.hero-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.comp-list { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.steps-list { margin: 8px 0 12px; padding-left: 22px; }
.steps-list li { margin-bottom: 5px; }
.teacher-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 26px; font-size: 15px; }
.teacher-notes h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.level-kind { align-self: flex-start; font-size: 12px; margin-top: -4px; }
.level-card.unpublished { opacity: .6; }
.level-toggles { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.level-toggles .check { font-size: 14px; }
.thumb { display: block; }
.thumb-pdf { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; }
.fam-danger { margin-top: 28px; }
@media (max-width: 720px) { .hero-actions { flex-direction: row; flex-wrap: wrap; } }

/* ---------- projection */
.present-page .ls-head-inner, .present-page .ls-bar-inner, .present-page .ls-main { max-width: 1480px; }
.present-sheet { padding: 16px 16px 20px; }
.present-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.present-stage .viewer { padding: 6px 0 10px; }

/* ---------- planning : compléments */
.plan-card { margin-bottom: 20px; }
.plan-card > .row:first-child { margin-bottom: 8px; }
.grow-title { flex: 1; font-size: 22px; min-width: 220px; }
.prog-rows { margin: 10px 0 14px; }
.prog-row { grid-template-columns: 76px minmax(220px, 2fr) 170px 190px 130px 42px; }
.prog-row.head { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.prog-row.revision { background: linear-gradient(90deg, var(--sun-soft), transparent 60%); border-radius: 12px; }
.prog-row.generale { background: linear-gradient(90deg, var(--plum-soft), transparent 60%); border-radius: 12px; }
.prog-row .input.code { font-family: var(--title-font); font-weight: 700; text-align: center; }
.prog-fiche { display: flex; flex-direction: column; gap: 4px; }
.prog-fiche .small-input { min-height: 34px; font-size: 13.5px; }
.day-chips { display: flex; gap: 4px; }
.day-chip { min-width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--muted); padding: 0 6px; }
.day-chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.plan-day { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 22px 0 4px; padding-top: 12px; border-top: 2px solid var(--line-2); }
.plan-pupil { display: inline-flex; align-items: center; gap: 3px; }
.plan-pupil .lvl { height: 18px; min-width: 22px; font-size: 11px; padding: 0 4px; }
.plan-others { margin-top: 16px; color: var(--ink-2); font-size: 14.5px; }
.plan-apply { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.plan-apply .grow { flex: 1; min-width: 240px; margin: 0; }
@media (max-width: 980px) {
  .prog-row { grid-template-columns: 70px 1fr; }
  .prog-row.head { display: none; }
  .prog-row > :nth-child(n+3) { grid-column: 2; }
}

/* ---------- documents à imprimer (grille de la semaine, cahier journal) */
.print-sheet-wrap { padding: 18px 12px 48px; overflow-x: auto; }
.print-sheet { background: #fff; color: #161616; margin: 0 auto; box-shadow: var(--shadow); padding: 12mm 12mm 10mm; font-family: SheetSans, 'DejaVu Sans', Verdana, sans-serif; font-size: 9.5pt; line-height: 1.3; }
.print-sheet.landscape { max-width: 297mm; min-width: 900px; }
.print-sheet.portrait { max-width: 210mm; }
.print-sheet h1, .print-sheet h2 { font-family: SheetSans, 'DejaVu Sans', Verdana, sans-serif; letter-spacing: 0; }
.wg-title { font-size: 19pt; margin-bottom: 2pt; }
.wg-sub, .wg-legend, .wg-foot, .wg-sign { font-size: 8.5pt; margin: 3pt 0 6pt; }
.wg-legend { display: flex; flex-wrap: wrap; gap: 4pt 10pt; align-items: center; }
.wg-swatch { display: inline-flex; align-items: center; gap: 4pt; margin-left: 8pt; }
.wg-swatch i { display: inline-block; width: 12pt; height: 9pt; border-radius: 2pt; }
.wg-sign { text-align: right; color: #444; }
.week-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.week-grid th, .week-grid td { border: .6pt solid #9a9a9a; padding: 3pt 4pt; vertical-align: top; }
.week-grid th { font-size: 9pt; font-weight: 700; }
.week-grid th small { font-weight: 400; color: #555; }
.wg-time { width: 46pt; text-align: center; font-size: 8.5pt; }
.wg-cell.other { background: var(--bg); }
.wg-head { font-weight: 700; font-size: 9.6pt; margin-bottom: 2pt; }
.wg-line { font-size: 8.2pt; line-height: 1.28; }
.wg-class { color: #333; }
.journal .cj-title { font-size: 20pt; margin-bottom: 2pt; }
.cj-date { font-size: 11.5pt; margin: 0; }
.cj-who { font-size: 9pt; margin: 2pt 0 8pt; }
.cj-legend { font-size: 8.6pt; margin: 2pt 0; }
.cj-slot { margin-top: 12pt; break-inside: avoid; page-break-inside: avoid; }
.cj-h { font-size: 11pt; margin: 0 0 4pt; }
.cj-table { width: 100%; border-collapse: collapse; font-size: 8.6pt; }
.cj-table th { text-align: left; font-weight: 700; border-bottom: 1pt solid #555; padding: 2pt 4pt; }
.cj-table td { border-bottom: .5pt solid #bdbdbd; padding: 2.5pt 4pt; }
.cj-table .c { text-align: center; width: 30pt; }
.cj-table th:first-child { width: 36%; }
.cj-box { display: inline-block; width: 8pt; height: 8pt; border: .8pt solid #333; vertical-align: -1pt; }
.cj-act.other { background: var(--bg); }
.cj-summary { font-size: 8.8pt; margin: 4pt 0 2pt; }
.cj-comp { font-size: 8.4pt; margin: 2pt 0; color: #333; }
.cj-bilan { font-size: 8.8pt; margin-top: 3pt; }
.cj-bilan-input { width: 100%; margin-top: 6px; border: 1.5px dashed var(--line); border-radius: 10px; padding: 6px 10px; font: 14px var(--ui-font); background: #fcfcfa; resize: vertical; }
.cj-prepare ul { margin: 2pt 0; padding-left: 14pt; font-size: 9pt; }
.cj-foot { margin-top: 16pt; font-size: 8pt; color: #555; }
.cj-empty { margin-top: 20pt; font-size: 11pt; }
.date-input { min-height: 40px; border-radius: 999px; padding: 4px 14px; border: 1.5px solid var(--line); background: #fff; font-size: 15px; }
@media print {
  .print-sheet-wrap { padding: 0; overflow: visible; }
  .print-sheet { box-shadow: none; padding: 0; max-width: none; min-width: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .week-grid tr { break-inside: avoid; }
}

/* ---------- élèves */
.students-search { display: block; max-width: 420px; margin-bottom: 6px; }
.pupil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.pupil-card { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; color: inherit; transition: transform .12s; }
.pupil-card:hover { transform: translateY(-2px); }
.pupil-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pupil-card strong { font-size: 17px; }
.pupil-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pupil-tags .tag { font-size: 12px; padding: 1px 8px; }
.account-box { font-size: 20px; background: var(--bg); border-radius: 14px; padding: 14px 18px; line-height: 1.8; }
.avatar-btn { border: 0; background: transparent; padding: 0; border-radius: 50%; }
.student-hero { align-items: center; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 22px; margin-top: 12px; }
.domain-levels { margin: 6px 0 16px; }
.domain-levels summary { cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 14.5px; }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 22px; margin-top: 10px; }
.domain-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; }
.domain-row .seg button { padding: 5px 10px; font-size: 13.5px; }
.comfort-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 18px; }
.check.comfort { background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.avatar-choice { height: 64px; border-radius: 18px; border: 2px solid var(--line-2); background: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; }
.avatar-choice.on { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- copies */
.copy-list { display: flex; flex-direction: column; gap: 8px; }
.copy-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 0; border-radius: 18px; box-shadow: var(--shadow); padding: 10px 16px; font-size: 15px; }
.copy-row:hover { box-shadow: var(--shadow-lift); }
.copy-row .grow { flex: 1; min-width: 0; }
.small-row { gap: 6px; font-size: 14px; color: var(--ink-2); }
.score-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.score-pill.good { background: var(--leaf-soft); color: #1d6b41; }
.score-pill.mid { background: var(--sun-soft); color: #7a5600; }
.score-pill.low { background: var(--coral-soft); color: #9a3a25; }
.copy-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0 12px; align-items: start; }
.copy-panel { position: sticky; top: calc(var(--topbar-h, 56px) + 64px); padding: 16px 16px 30px 0; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - var(--topbar-h, 56px) - 70px); overflow: auto; }
.copy-card h3 { font-size: 17px; margin-bottom: 8px; }
.copy-all { margin-top: 10px; }
.copy-all summary { cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.unit-row { border-top: 1px solid var(--line-2); padding: 8px 0; font-size: 14px; }
.unit-row.big { font-size: 15px; }
.unit-head { display: flex; justify-content: space-between; gap: 8px; }
.unit-n { font-weight: 700; color: var(--ink-2); }
.unit-mark { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.unit-mark.ok { color: #1d6b41; } .unit-mark.retry { color: #9a3a25; } .unit-mark.partial { color: #7a5600; } .unit-mark.review { color: #244d9e; }
.unit-answer { color: #1c4fa8; margin: 3px 0; overflow-wrap: anywhere; }
.unit-ink { display: block; background: #fbfbf8; border-radius: 8px; border: 1px solid var(--line-2); }
.unit-ink svg { display: block; width: 100%; height: auto; min-height: 36px; stroke: #1c4fa8; }
.unit-expected { color: #c0392b; font-size: 13px; }
.unit-marks { display: flex; gap: 6px; margin-top: 4px; }
.mark-btn { width: 38px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 16px; }
.mark-btn.ok[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.mark-btn.partial[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); }
.mark-btn.retry[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }
.small-check { font-size: 14px; align-items: center; }
.small-check input { width: 18px; height: 18px; }
@media (max-width: 1100px) {
  .copy-layout { grid-template-columns: 1fr; }
  .copy-panel { position: static; max-height: none; padding: 0 16px 30px; }
}

/* ---------- cartes de connexion */
.cards-page { padding-top: 16px; }
.cards-pick { margin-bottom: 18px; }
.cards-grid { display: grid; grid-template-columns: repeat(2, 92mm); gap: 6mm; justify-content: center; }
.login-card-print { width: 92mm; min-height: 86mm; box-sizing: border-box; border: 1px dashed #9aa; border-radius: 5mm; padding: 4mm 5mm; background: #fff; display: flex; flex-direction: column; align-items: center; break-inside: avoid; page-break-inside: avoid; font-family: var(--title-font); }
.lcp-top { display: flex; align-items: center; gap: 3mm; align-self: stretch; }
.lcp-top strong { display: block; font-size: 13pt; line-height: 1.1; }
.lcp-top small { color: #555; font-size: 9pt; }
.lcp-qr { width: 50mm; height: 50mm; margin: 2mm 0 1mm; }
.lcp-qr svg { width: 100%; height: 100%; display: block; }
.lcp-help { font-size: 9pt; margin: 0; text-align: center; }
.lcp-login { font-family: var(--ui-font); font-size: 7.5pt; color: #666; margin: 1mm 0 0; }
.lcp-link { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 3mm; font-family: var(--ui-font); text-align: center; }
@media print { .login-card-print { height: 86mm; } }
@media print {
  .cards-page { padding: 0 !important; }
  .cards-grid { gap: 5mm; }
}

/* ---------- réglages */
.settings-body { min-width: 0; }
.settings-body .card h2 { font-size: 21px; margin-bottom: 8px; }
.lib-side .lib-filter .ico { width: 18px; height: 18px; }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pill-x { border: 0; background: transparent; font-size: 16px; line-height: 1; padding: 0 0 0 4px; color: var(--muted); }
.row .input[type="date"], .row select.input { width: auto; }
.tt-wrap { overflow-x: auto; margin-top: 10px; }
.tt { border-collapse: separate; border-spacing: 4px; min-width: 820px; width: 100%; }
.tt th { font-size: 13px; color: var(--muted); text-align: left; }
.tt-time { width: 58px; font-size: 12.5px; text-align: center !important; }
.tt td { background: var(--bg); border-radius: 12px; padding: 6px; vertical-align: top; }
.tt td.tt-empty { background: transparent; }
.tt-subject { min-height: 32px; padding: 3px 8px; font-size: 13.5px; font-weight: 600; border-radius: 8px; }
.tt-pupils { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.tt-pupil { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12.5px; }
.tt-pupil.fixed { background: var(--plum-soft); border-color: #cfc2f0; }
.tt-pupil small { color: #4f3596; }
.totp-setup { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.totp-qr { width: 190px; height: 190px; flex: none; }
.totp-qr svg { width: 100%; height: 100%; }
.totp-setup ol { padding-left: 20px; margin-top: 0; }
.totp-setup .input { max-width: 200px; font-size: 22px; letter-spacing: .2em; text-align: center; }
.table.flat { box-shadow: none; border: 1px solid var(--line-2); }

/* ---------- confort des élèves */
body.comfort-big { font-size: 19.5px; }
body.comfort-big .btn { font-size: 17px; }
body.comfort-big .task h3, body.comfort-big .practice-card h3 { font-size: 23px; }
body.comfort-dys { --ui-font: Verdana, 'DejaVu Sans', Tahoma, Arial, sans-serif; letter-spacing: .02em; word-spacing: .08em; }
body.comfort-dys .lesson { line-height: 1.8; letter-spacing: .03em; word-spacing: .12em; }
body.comfort-dys .step-sheet { letter-spacing: .03em; word-spacing: .1em; }
.upcoming { display: flex; flex-wrap: wrap; gap: 10px; }
.upcoming-item { display: flex; align-items: center; gap: 10px; background: rgb(255 255 255 / 70%); border: 1.5px dashed var(--line); border-radius: 18px; padding: 8px 14px 8px 8px; min-width: 260px; }
.upcoming-item .grow { flex: 1; }
.upcoming-item small { color: var(--muted); }
.task-emoji.small { width: 38px; height: 38px; font-size: 20px; border-radius: 12px; background: var(--bg); }
.level-prefer { font-size: 13.5px; }
.level-prefer .seg button { padding: 5px 10px; font-size: 13px; }

/* exemples fournis */
.ex-list { display: grid; gap: 10px; margin-top: 8px; }
.ex-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-left: 6px solid var(--c, var(--brand)); border-radius: 16px; background: #fff; flex-wrap: wrap; }
.ex-row .grow { flex: 1; min-width: 220px; }
.ex-emoji { font-size: 28px; }
.ex-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ex-tags .tag { font-size: 12px; padding: 2px 9px; }
.ex-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row.center { justify-content: center; }

/* réglages : pause, voix */
.settings-h3 { font-size: 17px; margin: 20px 0 10px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.big-check { padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; margin-bottom: 8px; }
.big-check input { margin-top: 4px; }
.voice-panel { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.voice-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.voice-row .field { flex: 1; min-width: 240px; }
.voice-row .btn { margin-bottom: 14px; }
.home-foot { margin: 30px 0 10px; text-align: center; }
.note-box.shake { animation: note-shake .35s; border-color: #e3b35c; }
@keyframes note-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* connexion de la classe (élève) */
.login-ways { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.login-way { width: 100%; }
.class-login { display: flex; flex-direction: column; gap: 10px; }
.cl-step { font-size: 26px; margin: 4px 0 0; }
.cl-code-input { font-family: var(--title-font); font-size: 34px; font-weight: 700; letter-spacing: .2em; text-align: center; text-transform: uppercase; height: 72px; }
.cl-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 6px; }
.cl-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: min(56vh, 520px); overflow: auto; padding: 4px; }
.cl-name { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 17px; }
.cl-name:hover { border-color: var(--brand); background: var(--brand-soft); }
.cl-who { display: flex; align-items: center; gap: 14px; }
.cl-who p { margin: 0; }
.cl-dots { display: flex; justify-content: center; gap: 16px; margin: 14px 0 4px; }
.cl-dots span { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--brand); }
.cl-dots span.on { background: var(--brand); }
.cl-dots.shake { animation: note-shake .35s; }
.cl-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 6px auto 0; width: 100%; }
.cl-key { height: 64px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; font-family: var(--title-font); font-size: 28px; font-weight: 700; }
.cl-key:active { background: var(--brand-soft); }
.cl-key.quiet { color: var(--muted); }
.login-card:has(.cl-names) { width: min(860px, 100%); }
.login-card:has(.cl-names) .cl-names { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* connexion de la classe (enseignant) */
.cl-open { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px 18px; border-radius: 18px; background: var(--brand-soft); margin: 10px 0 14px; }
.cl-open.closed { background: var(--bg-2); }
.cl-open .grow { flex: 1; min-width: 220px; }
.cl-code { font-family: var(--title-font); font-size: 44px; font-weight: 700; letter-spacing: .12em; color: var(--brand-ink); background: #fff; border-radius: 14px; padding: 6px 18px; }
.cl-until { font-weight: 700; margin: 0 0 8px; }
.cl-pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; margin-top: 10px; }
.cl-pin { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.cl-pin .grow { flex: 1; }
.cl-pin-code { font-family: var(--title-font); letter-spacing: .15em; font-size: 18px; }
.cl-board { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; background: #0f3d43; color: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 24px; }
.cl-board[open] { display: flex; }
.cl-board::backdrop { background: #0f3d43; }
.cl-board p { font-size: clamp(20px, 3vw, 34px); margin: 0; opacity: .9; }
.cl-board-code { font-family: var(--title-font); font-weight: 700; font-size: clamp(90px, 18vw, 260px); letter-spacing: .08em; line-height: 1; }
.cl-board-steps { font-size: clamp(16px, 2vw, 24px) !important; opacity: .75 !important; white-space: pre-wrap; }
/* page des codes personnels (#/codes), à l'écran et à l'impression */
.codes-sheet { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; max-width: 900px; margin: 0 auto; }
.codes-sheet h1 { font-size: 22px; margin: 0 0 6px; }
.codes-help { margin: 0 0 18px; }
.codes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.codes-card { border: 1.5px dashed #b9b4a8; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; break-inside: avoid; page-break-inside: avoid; }
.codes-who { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.codes-who small { color: var(--muted); font-weight: 500; }
.codes-card b { font-family: var(--title-font); font-size: 30px; letter-spacing: .18em; }
.codes-card small { color: #555; font-size: 12px; }
@media print {
  .codes-page { padding: 0; }
  .codes-sheet { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
  .codes-sheet h1 { font-size: 16pt; }
  .codes-grid { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .codes-card { border: .4mm dashed #999; border-radius: 3mm; padding: 4mm; }
  .codes-card b { font-size: 22pt; }
  .codes-card small { font-size: 8pt; }
}

/* en direct (enseignant) */
.live-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 18px; }
.live-box.frozen { box-shadow: 0 0 0 3px var(--sun), var(--shadow); }
.live-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-head h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.live-head .spacer { flex: 1; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: #c8d3d8; }
.live-dot.on { background: var(--leaf); box-shadow: 0 0 0 4px var(--leaf-soft); }
.live-frozen { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--sun-soft); font-weight: 600; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
.live-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1.5px solid var(--line-2); border-radius: 14px; color: inherit; text-decoration: none; position: relative; overflow: hidden; }
a.live-chip:hover { border-color: var(--brand); }
.live-chip .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.live-chip small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p); background: var(--leaf); }

/* écran figé (élève) */
.freeze { position: fixed; inset: 0; z-index: 2000; background: rgb(15 61 67 / 96%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px; }
.freeze-eyes { font-size: 110px; animation: freeze-look 2.4s ease-in-out infinite; }
.freeze p { font-family: var(--title-font); font-size: clamp(26px, 4vw, 48px); font-weight: 700; max-width: 900px; margin: 0; }
@keyframes freeze-look { 0%, 100% { transform: translateX(-10px); } 50% { transform: translateX(10px); } }
@media (prefers-reduced-motion: reduce) { .freeze-eyes { animation: none; } }
/* charte pour l'IA : bloc « Ma classe » */
.kit-classe-box { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 16px; background: #fbfaf6; }
.kit-classe-box h3 { margin: 0 0 4px; font-family: var(--title-font); font-size: 16px; }
.kit-classe { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; margin: 8px 0; }
.kit-details { margin-top: 12px; }
.kit-details summary { cursor: pointer; font-weight: 600; }
/* import d'une réponse d'IA : contrôle en trois parties et aperçu */
.diag { border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 14px; margin-top: 10px; background: #fff; }
.diag.ok { border-color: #bfe3cc; background: #f3fbf6; }
.diag.warn { border-color: #f0d9a8; background: #fffaf0; }
.diag.bad { border-color: #f1c2bd; background: #fff5f4; }
.diag-head { display: flex; align-items: center; gap: 8px; }
.diag-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; background: #3b9a62; flex: none; }
.diag.warn .diag-dot { background: #d69a2d; }
.diag.bad .diag-dot { background: #c0392b; }
.diag ul { margin: 6px 0 4px 30px; padding: 0; }
.diag li { margin-bottom: 3px; }
.diag .row { margin-top: 6px; }
.small-select { width: auto; min-width: 150px; }
.json-preview { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.json-preview .seg { flex-wrap: wrap; }
.json-preview-stage { max-height: 62vh; overflow: auto; background: #f1efe9; border-radius: 12px; margin-top: 8px; padding: 10px 6px 20px; }
/* petit éditeur */
.ed-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.ed-group { border: 1px solid var(--line-2); border-radius: 14px; background: #fff; padding: 8px 14px; }
.ed-group summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.ed-fields { display: grid; gap: 8px; padding: 6px 0 8px; }
.ed-field > span { font-size: 13px; color: var(--muted); }
.ed-field textarea { resize: vertical; }
.ed-field.hit > span { color: var(--ink); font-weight: 700; } .ed-field.hit .input { border-color: #d69a2d; box-shadow: 0 0 0 3px rgb(214 154 45 / 18%); }
/* mandalas à imprimer : une feuille A4 portrait par mandala */
.mdp-pages { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 18px 12px 40px; }
.mdp-page { width: 210mm; height: 297mm; box-sizing: border-box; padding: 14mm 14mm 10mm; background: #fff; box-shadow: 0 10px 34px rgb(30 40 50 / 12%); display: flex; flex-direction: column; color: #1d1d1d; font-family: SheetSans, 'DejaVu Sans', Verdana, sans-serif; }
.mdp-head { display: flex; justify-content: space-between; font-size: 12pt; }
.mdp-art { flex: 1; display: flex; align-items: center; justify-content: center; }
.mdp-art svg { width: 182mm; height: 182mm; }
.mdp-foot { display: flex; justify-content: space-between; font-size: 8.5pt; color: #666; }
@media print {
  .mdp-pages { padding: 0; gap: 0; display: block; }
  .mdp-page { box-shadow: none; break-after: page; page-break-after: always; margin: 0; }
}
.site-box { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-2); } .site-box h3 { margin: 0 0 4px; font-family: var(--title-font); }
