/* ChronoVerbs — feuille de style unique. Pile de polices système, aucune ressource externe. */
:root {
  --bg: #f7fbff; --bg2: #eaf3fc; --card: #ffffff; --ink: #10243e; --muted: #4f5f76; --line: #d9e4f1;
  --brand: #187dbb; --brand-ink: #0f5d8f; --brand-soft: #e3f1fb;
  --b: #1c64c8; --b-soft: #e5efff; --p: #b45309; --p-soft: #fff1df; --pp: #6d3fd0; --pp-soft: #f1eaff;
  --good: #137a3a; --good-soft: #e3f6ea; --bad: #b42318; --bad-soft: #fdeceb; --warn: #8a5a00; --warn-soft: #fff6dc;
  --gold: #e8a400; --radius: 18px; --shadow: 0 1px 2px rgba(16, 36, 62, .06), 0 6px 22px rgba(16, 36, 62, .07);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
html.text-large { font-size: 112.5%; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font);
  background-image: radial-gradient(1200px 500px at 85% -10%, #dff0ff 0, transparent 60%), radial-gradient(900px 420px at -10% 0, #f3ecff 0, transparent 55%);
  background-repeat: no-repeat; overflow-x: hidden;
}
a { color: var(--brand-ink); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: .4rem 0; }
code { font-size: .85em; background: var(--bg2); padding: .05rem .3rem; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: calc(var(--sat) + .5rem); z-index: 50; background: var(--card); padding: .5rem 1rem; border-radius: 10px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 8px; }

.app-shell { max-width: 760px; margin: 0 auto; padding: calc(var(--sat) + 12px) calc(var(--sar) + 16px) calc(var(--sab) + 28px) calc(var(--sal) + 16px); outline: none; }
.loading { text-align: center; color: var(--muted); padding: 1rem; }
.static-intro ul { padding-left: 1.2rem; }

/* Cartes et boutons */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin: 14px 0; }
.card.calm { background: linear-gradient(180deg, #fff, #f6fbff); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: .6rem 1.05rem; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 600 1rem var(--font); cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; touch-action: manipulation;
}
.btn:hover { border-color: #b7cbe3; background: #fbfdff; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(24, 125, 187, .28); }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-ink); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { color: var(--bad); border-color: #f2c4c0; }
.btn.danger:not(.ghost) { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.small { min-height: 44px; padding: .4rem .8rem; font-size: .92rem; }
.btn.big { min-height: 52px; padding: .7rem 1.4rem; font-size: 1.05rem; }
.btn .ic { width: 20px; height: 20px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--bg2); }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.qactions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.qactions.center { justify-content: center; }
.qactions > .btn.primary.big { margin-left: auto; }

/* Accueil */
.hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 4px 0 2px; }
.logo { width: 56px; height: 56px; }
.hero > div { min-width: 0; }
.brand { font-size: clamp(1.35rem, 6.4vw, 1.7rem); letter-spacing: -.02em; margin: 0; font-weight: 800; }
.brand span { color: var(--brand); }
.tag { margin: 0; color: var(--muted); font-size: .92rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; max-width: 42vw; padding: .3rem .8rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font: 600 .9rem var(--font); color: var(--ink); cursor: pointer; }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.welcome h2 { font-size: 1.4rem; }
.demo { margin: 12px 0 4px; }
.resume, .due { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.resume > div:first-child, .due > div:first-child { flex: 1 1 260px; }
.due { border-left: 6px solid var(--brand); }
.due.calm { border-left-color: var(--good); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--brand-ink); margin: 0 0 .2rem; }
.tiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 14px 0; }
.tile-btn { display: flex; gap: 12px; align-items: flex-start; text-align: left; min-height: 76px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; font: inherit; transition: transform .12s ease, box-shadow .15s ease; }
.tile-btn:hover:not([disabled]) { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16, 36, 62, .1); }
.tile-btn[disabled] { opacity: .6; cursor: not-allowed; }
.tile-btn .tico { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.tile-btn .ttxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-btn .ttxt span { color: var(--muted); font-size: .88rem; }
.tile-btn.big { grid-column: 1 / -1; background: linear-gradient(120deg, #ffffff 30%, #eef6ff); }
.foot { text-align: center; margin-top: 22px; }

/* Barre du haut */
.topbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; margin: calc(-1 * var(--sat) - 12px) -16px 6px; padding: calc(var(--sat) + 6px) 12px 6px; background: rgba(247, 251, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ttitle { font-size: 1.1rem; text-align: center; margin: 0; }
.intro-line { color: var(--muted); }

/* Formes : couleur + symbole + libellé */
.ftag { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 999px; background: var(--bg2); color: var(--ink); white-space: nowrap; vertical-align: middle; }
.ftag span { text-transform: none; letter-spacing: 0; }
.ft-b { background: var(--b-soft); color: var(--b); } .ft-p { background: var(--p-soft); color: var(--p); } .ft-pp { background: var(--pp-soft); color: var(--pp); }
.fm { width: 11px; height: 11px; fill: currentColor; flex: none; }
.machine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.mod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; border: 2px solid var(--line); background: #fff; text-align: center; min-width: 0; }
.mod-b { border-color: #bcd3f6; background: linear-gradient(180deg, var(--b-soft), #fff 70%); }
.mod-p { border-color: #f3cf9f; background: linear-gradient(180deg, var(--p-soft), #fff 70%); }
.mod-pp { border-color: #d6c4f6; background: linear-gradient(180deg, var(--pp-soft), #fff 70%); }
.mod.hl { box-shadow: 0 0 0 3px rgba(24, 125, 187, .18); }
.mform { font-size: clamp(1.05rem, 4.6vw, 1.45rem); font-weight: 800; overflow-wrap: anywhere; line-height: 1.15; }
.mform.muted { color: #9aa8bb; }
.ipa { font-size: .8rem; color: var(--muted); font-family: ui-serif, Georgia, serif; }
.listen { width: 44px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--brand-ink); display: inline-grid; place-items: center; cursor: pointer; }
.listen[disabled] { opacity: .35; cursor: not-allowed; }
.listen .ic { width: 18px; height: 18px; }

/* Séance */
.sbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px auto 1fr auto auto; gap: 10px; align-items: center; margin: calc(-1 * var(--sat) - 12px) -16px 8px; padding: calc(var(--sat) + 6px) 12px 6px; background: rgba(247, 251, 255, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.stitle { font-weight: 700; font-size: .92rem; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { height: 10px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.sfill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--b), var(--pp) 60%, var(--p)); transition: width .35s ease; }
.scount, .sclock { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); }
.qcard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); animation: enter .22s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mech { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: 0 0 8px; }
.mech span:first-child { font-weight: 800; color: var(--brand-ink); text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; }
.mdesc { color: var(--muted); font-size: .88rem; }
.vhead { text-align: center; }
.vtitle { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1.6rem, 7vw, 2.2rem); margin: .2rem 0 0; font-weight: 800; letter-spacing: -.01em; }
.vtitle span { text-transform: uppercase; }
.vfr { color: var(--muted); font-size: 1.05rem; margin: .1rem 0 .3rem; }
.prompt { font-size: 1.1rem; }
.context { font-style: italic; }
.form-rows { display: grid; gap: 12px; margin: 14px 0 6px; }
.frow { display: grid; gap: 6px; }
.frow .ftag { justify-self: start; font-size: .82rem; }
input.typein, .text, .search, .select, .paste {
  font: 500 1.125rem var(--font); /* ≥ 16 px : pas de zoom automatique sur iPhone */
  width: 100%; min-height: 50px; padding: .55rem .8rem; border-radius: 14px; border: 2px solid #c7d6e8; background: #fff; color: var(--ink);
}
input.typein { font-size: 1.25rem; font-weight: 700; letter-spacing: .01em; }
input.typein:focus, .text:focus, .search:focus, .select:focus, .paste:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px rgba(24, 125, 187, .16); }
input.typein.inline { display: inline-block; width: 9.5em; max-width: 60vw; min-height: 44px; padding: .25rem .5rem; margin: 0 .2rem; vertical-align: baseline; text-align: center; }
.select { font-size: 1rem; appearance: auto; }
.paste { min-height: 120px; resize: vertical; font-size: 1rem; }
.hint-out { min-height: 1.5em; color: var(--warn); font-weight: 600; }
.hint-line { color: var(--muted); font-size: .9rem; text-align: center; }
.examples { display: grid; gap: 10px; margin: 12px 0; }
.example { background: #fbfdff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.example.big { font-size: 1.15rem; padding: 14px; }
.sentence { margin: .35rem 0 .15rem; font-size: 1.08em; }
.sform { color: var(--brand-ink); background: linear-gradient(transparent 60%, #ffe7a3 60%); padding: 0 .1rem; }
.trans { color: var(--muted); font-size: .92rem; font-style: italic; margin: 0; }
.usage { font-size: .9rem; color: var(--muted); margin: .2rem 0; }
.tip { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border-radius: 14px; padding: 10px 12px; margin: 10px 0; color: #5a3d00; }
.tip p { margin: 0; } .tip .ic { color: var(--warn); margin-top: 2px; }
.tip-inline { background: var(--warn-soft); border-radius: 12px; padding: 8px 12px; }

/* Réparateur */
.slot { cursor: pointer; font: inherit; color: var(--ink); min-height: 92px; border-style: dashed; }
.slot.sel { border-style: solid; box-shadow: 0 0 0 4px rgba(24, 125, 187, .2); }
.slot.ok { border-style: solid; border-color: var(--good); background: var(--good-soft); }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0; }
.tile { min-height: 48px; min-width: 64px; padding: .5rem .9rem; border-radius: 14px; border: 2px solid #c7d6e8; border-bottom-width: 4px; background: #fff; font: 700 1.1rem var(--font); color: var(--ink); cursor: pointer; transition: transform .1s ease; }
.tile:active { transform: translateY(2px); }
.tile[disabled] { opacity: .25; cursor: default; }
.rmsg { text-align: center; color: var(--bad); font-weight: 600; min-height: 1.4em; }

/* Corrections */
.feedback { border-radius: 16px; padding: 12px 14px; margin: 12px 0; animation: pop .28s ease both; }
.feedback.good { background: var(--good-soft); border: 1.5px solid #a9dfbd; }
.feedback.bad { background: var(--bad-soft); border: 1.5px solid #f3c1bc; }
.ftitle { font-weight: 800; font-size: 1.12rem; margin: 0 0 .3rem; }
.feedback.good .ftitle { color: var(--good); } .feedback.bad .ftitle { color: var(--bad); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.vlines { list-style: none; padding: 0; margin: .3rem 0; display: grid; gap: 6px; }
.vline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vmark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.vline.good .vmark { background: var(--good); } .vline.bad .vmark { background: var(--bad); }
.vmark .ic { width: 16px; height: 16px; stroke-width: 3; }
.vgot { font-size: 1.1rem; } .vgot s { color: var(--bad); }
.vmsg { flex-basis: 100%; font-size: .92rem; color: #6b2a1d; padding-left: 34px; }
.vline.good .vmsg { color: var(--good); }
.soft { color: var(--muted); font-size: .92rem; }

/* Bilan */
.bilan { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 18px; box-shadow: var(--shadow); animation: enter .25s ease both; }
.bilan .qactions { justify-content: center; }
.bilan .qactions > .btn.primary.big { margin-left: 0; }
.art { width: 120px; height: 80px; }
.a-ring { fill: #eef6ff; stroke: var(--brand); stroke-width: 3; } .a-hand { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.a-b { fill: var(--b); } .a-p { fill: var(--p); } .a-pp { fill: var(--pp); } .a-spark { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.stars { display: flex; justify-content: center; gap: 6px; }
.star .ic { width: 34px; height: 34px; fill: #e3e9f2; stroke: #c9d3e1; }
.star.on .ic { fill: var(--gold); stroke: #c58a00; animation: pop .35s ease both; }
.bstats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.bstats li { background: #fbfdff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; }
.bstats strong { font-size: 1.6rem; } .bstats .good strong { color: var(--good); } .bstats .warn strong { color: var(--warn); }
.review-list { text-align: left; } .review-list ul { padding-left: 1.1rem; } .review-list li { margin: 6px 0; }
.review-list .ftag { margin-left: 4px; }
.next { font-weight: 600; }
.exam-report .score { font-size: 1.3rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.exam-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; table-layout: fixed; }
.exam-table th:first-child { width: 28%; }
.exam-table .ftag { font-size: .7rem; padding: .1rem .35rem; }
.exam-table th, .exam-table td { padding: 8px 4px; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); vertical-align: top; }
.exam-table td.good { color: var(--good); } .exam-table td.bad s { color: var(--bad); }

/* Aventure */
.zone.locked { opacity: .7; }
.zhead h2 { display: flex; align-items: center; gap: 8px; }
.zprog { font-weight: 600; font-size: .9rem; }
.missions { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.mission { width: 100%; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.mission[disabled] { cursor: not-allowed; color: #8a97a8; background: #f7f9fc; }
.mission.next { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(24, 125, 187, .12); }
.mission.done { background: #fbfffc; }
.mnum { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--bg2); }
.mission.next .mnum { background: var(--brand); color: #fff; } .mission.done .mnum { background: var(--good-soft); color: var(--good); }
.mverbs { font-weight: 600; overflow-wrap: anywhere; }
.mstars { display: flex; gap: 2px; } .mstars .ic { width: 18px; height: 18px; } .mstars .star .ic { width: 18px; height: 18px; }
.go-tag { font-weight: 700; color: var(--brand-ink); font-size: .9rem; }

/* Formulaires */
.form .field, .field { display: grid; gap: 6px; margin: 10px 0; }
.field > span { font-weight: 600; font-size: .95rem; }
.switch { display: flex; gap: 12px; align-items: center; min-height: 44px; margin: 6px 0; cursor: pointer; }
.switch input { width: 24px; height: 24px; accent-color: var(--brand); flex: none; }
.switch span { display: flex; flex-direction: column; }
.seg { border: 0; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; width: 100%; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.seg input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid #f59e0b; outline-offset: 2px; }
.warn-text { color: var(--warn); font-weight: 600; font-size: .92rem; } .ok-text { color: var(--good); font-weight: 600; }

/* Listes, carnet, progression */
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: .8rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--bg2); color: var(--ink); white-space: nowrap; }
.st-new { background: #eef2f7; color: #4f5f76; } .st-learning { background: var(--b-soft); color: var(--b); } .st-consolidate { background: var(--warn-soft); color: var(--warn); }
.st-recent { background: #e6f7f4; color: #0d6b5c; } .st-anchored { background: var(--good-soft); color: var(--good); }
.lists { list-style: none; padding: 0; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.lopen { flex: 1; display: flex; flex-direction: column; align-items: flex-start; min-height: 48px; justify-content: center; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.lhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; }
.vchips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { display: inline-flex; align-items: center; gap: 2px; padding: 0 0 0 .7rem; border-radius: 999px; font-weight: 700; border: 1px solid var(--line); background: #fff; }
.vchip .x { width: 40px; height: 40px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--muted); border-radius: 50%; }
.vchip .x .ic { width: 16px; height: 16px; }
.searchbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.searchbar .search { flex: 1 1 220px; } .searchbar .select { flex: 0 1 200px; }
.sico { color: var(--muted); display: grid; place-items: center; }
.results { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.result { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.result .ic { margin-left: auto; width: 18px; height: 18px; color: var(--brand); }
.report ul { padding-left: 1rem; } .report li { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bad-entry { font-weight: 600; }
.dict { list-style: none; padding: 0; display: grid; gap: 6px; }
.drow { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; min-height: 56px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.dforms { font-size: 1.02rem; overflow-wrap: anywhere; } .dfr { grid-column: 1; color: var(--muted); font-size: .9rem; } .drow .chip { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat strong { font-size: 1.5rem; } .stat small { color: var(--muted); font-size: .78rem; }
.sbars, .fams { list-style: none; padding: 0; display: grid; gap: 8px; }
.sbars li { display: grid; grid-template-columns: 9.5rem 1fr 2.5rem; gap: 8px; align-items: center; }
.fams li { display: grid; gap: 4px; }
.fbar { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.bar { height: 10px; border-radius: 999px; background: var(--bg2); overflow: hidden; display: block; }
.barfill { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.fragile, .hist { list-style: none; padding: 0; display: grid; gap: 8px; }
.hist li { display: flex; flex-direction: column; }
.ustates { list-style: none; padding: 0; display: grid; gap: 6px; } .ustates li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.steps { padding-left: 1.2rem; } .steps li { margin: 8px 0; } .steps .ic { width: 18px; height: 18px; vertical-align: -3px; }
.tuto h2 { font-size: 1.4rem; }
.profiles { list-style: none; padding: 0; display: grid; gap: 8px; }
.profile { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; font: 600 1.05rem var(--font); color: var(--ink); cursor: pointer; }
.profile.current { border-color: var(--brand); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; }
.c0 { background: #187dbb; } .c1 { background: #b45309; } .c2 { background: #6d3fd0; } .c3 { background: #137a3a; } .c4 { background: #be185d; } .c5 { background: #475569; }
.oops { text-align: center; }

/* Modales, notifications */
dialog.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - var(--sat) - var(--sab) - 24px); border: 0; border-radius: 22px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 24px 70px rgba(16, 36, 62, .3); overflow: auto; }
dialog.modal.wide { width: min(720px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(16, 36, 62, .45); }
.modal-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 6px 18px; background: var(--card); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 4px 18px 8px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 8px 18px 18px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--sab) + 18px); z-index: 60; max-width: min(520px, calc(100vw - 32px)); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; box-shadow: var(--shadow); font-weight: 600; text-align: center; }
.upd-banner { position: fixed; left: calc(var(--sal) + 12px); right: calc(var(--sar) + 12px); bottom: calc(var(--sab) + 12px); z-index: 55; max-width: 620px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; background: #fff; border: 1.5px solid var(--brand); box-shadow: 0 12px 30px rgba(16, 36, 62, .18); font-weight: 600; }
.upd-banner.top { bottom: auto; top: calc(var(--sat) + 64px); }
.upd-banner span { flex: 1 1 200px; }
.net { position: fixed; top: calc(var(--sat) + 6px); right: calc(var(--sar) + 10px); z-index: 40; margin: 0; padding: 3px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .8rem; font-weight: 700; }
body[data-route="seance"] .net { top: auto; bottom: calc(var(--sab) + 8px); }

@media (max-width: 380px) {
  .hero { grid-template-columns: auto 1fr; }
  .mod .ftag { font-size: .68rem; padding: .1rem .3rem; gap: .2rem; }
  .hero .pill { grid-column: 1 / -1; justify-self: start; max-width: 100%; }
  .app-shell { padding-left: calc(var(--sal) + 12px); padding-right: calc(var(--sar) + 12px); }
  .topbar, .sbar { margin-left: -12px; margin-right: -12px; }
  .card, .qcard { padding: 14px; }
  .machine { gap: 6px; } .mod { padding: 10px 3px 8px; }
  .sbars li { grid-template-columns: 7.5rem 1fr 2rem; }
  .stitle { display: none; } .sbar { grid-template-columns: 44px 1fr auto auto; }
}
@media (min-width: 900px) { .app-shell { padding-top: calc(var(--sat) + 22px); } .brand { font-size: 2rem; } }
@media (max-height: 500px) and (orientation: landscape) { .tile-btn { min-height: 60px; } .bilan-art { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }

/* Professeur et listes de la classe */
.class-lists h2, .mine-t { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 1.15rem; }
.lrow.class { border-left: 5px solid var(--pp); }
.vchip.ro { padding-right: .7rem; min-height: 36px; }
.warn-card { background: var(--warn-soft); border-color: #f0d48a; }
.ptable { width: 100%; border-collapse: collapse; font-size: .92rem; text-align: left; }
.ptable th, .ptable td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: break-word; hyphens: auto; }
.ptable tbody th { min-width: 7.5rem; }
.ptable thead th { font-size: .8rem; color: var(--muted); font-weight: 700; }
.ptable.verbs .chip { font-size: .72rem; }
.plink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: none; }
.avatar.sm { width: 30px; height: 30px; font-size: .85rem; flex: none; }
.pin-in { letter-spacing: .5em; text-align: center; font-size: 1.5rem; max-width: 12rem; display: block; margin: 8px auto; }
body[data-route="prof"] .app-shell { max-width: 980px; }
@media print {
  body { background: #fff; }
  .topbar button, .no-print, .foot, .toast, .upd-banner, .net, .skip { display: none !important; }
  .topbar { position: static; border: 0; margin: 0 0 8px; }
  .card, .stat { box-shadow: none; break-inside: avoid; }
  .app-shell { max-width: none; padding: 0; }
}
