:root{--ink:#17231e;--muted:#626e67;--paper:#f5f3ec;--surface:#fffefa;--line:#dedfd8;--green:#1e5b45;--green-2:#dcebe3;--lime:#d7ed70;--red:#a33d34;--shadow:0 18px 50px rgba(31,45,38,.09);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
:root[data-theme=dark]{--ink:#e7ece7;--muted:#aebbb2;--paper:#16231d;--surface:#203129;--line:#3b4e42;--green:#a3d5b8;--green-2:#30493a;--lime:#d7ed70;--red:#ffa69b;--shadow:0 18px 50px #0002;color-scheme:dark}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--green);outline-offset:3px}h1,h2,h3,p{margin-top:0}h1,h2{font-family:Georgia,"Times New Roman",serif;line-height:1.12}h1{font-size:clamp(2rem,4vw,3.6rem);letter-spacing:-.04em;margin-bottom:.7rem}h2{font-size:1.5rem}h3{font-size:1rem}p{line-height:1.6}.muted,small{color:var(--muted)}small{display:block;margin-top:.2rem}.eyebrow{font-size:.72rem;font-weight:750;letter-spacing:.15em;text-transform:uppercase;color:var(--green)}.brand{display:flex;align-items:center;gap:.7rem;font-weight:750;font-size:1.12rem}.brand img{width:38px;height:38px}.loading{min-height:100vh;display:grid;place-content:center}.button{border:1px solid var(--line);background:var(--surface);padding:.7rem 1rem;border-radius:10px;font-weight:600;white-space:nowrap}.button:hover{background:var(--green-2)}.primary{background:var(--green);color:var(--surface);border-color:var(--green)}.primary:hover{filter:brightness(.92);background:var(--green)}.danger{color:var(--red)}.small{padding:.4rem .65rem;font-size:.85rem}.link{border:0;background:transparent;color:var(--green);font-weight:650;text-align:left;padding:.2rem 0;white-space:normal;overflow-wrap:anywhere}.link:hover{text-decoration:underline}
.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.story{background:#1e5b45;color:#fffefa;padding:clamp(2rem,7vw,7rem);display:flex;flex-direction:column;justify-content:space-between;gap:5rem}.story .eyebrow{color:#d7ed70}.story p{color:#dcebe3}.story h1{font-size:clamp(2.8rem,5vw,5rem)}.auth-panel{display:grid;place-items:center;padding:2rem}.auth-card{max-width:420px;width:100%}.auth-card .button{width:100%;margin-top:1.4rem}.auth-card h2{font-size:2rem}.auth-card label{margin-top:1.5rem}.shell{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100vh}.sidebar{padding:2rem 1.4rem;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:2rem;background:var(--surface);position:sticky;top:0;height:100vh}.nav{display:grid;gap:.5rem}.nav button{border:0;background:transparent;border-radius:10px;text-align:left;padding:1rem;font-weight:600;display:flex;gap:1rem}.nav button span{font-size:.75rem;color:var(--muted);align-self:center}.nav button.active{background:var(--green-2);color:var(--green)}.identity{margin-top:auto;overflow-wrap:anywhere}.identity strong{font-size:.9rem}.identity .button{margin-top:1rem;width:100%}.workspace{padding:2.5rem clamp(1rem,4vw,4rem);min-width:0;max-width:1500px;width:100%;margin:0 auto}.topline{display:flex;justify-content:flex-end;margin-bottom:2rem}.heading,.toolbar,.row-actions{display:flex;align-items:center;gap:.8rem;justify-content:space-between;flex-wrap:wrap}.heading{margin-bottom:1.8rem}.heading h1{overflow-wrap:anywhere}.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:1.5rem;box-shadow:var(--shadow);margin-bottom:1.4rem}.toolbar{margin-bottom:1rem;justify-content:flex-start}.toolbar input{flex:1;min-width:160px}.toolbar select{max-width:260px}.toolbar .count{margin-left:auto;font-size:.85rem;color:var(--muted)}input:not([type=checkbox]):not([type=radio]),select{border:1px solid var(--line);border-radius:9px;padding:.7rem .8rem;background:var(--surface);min-width:0;width:100%}label{display:grid;gap:.5rem;font-size:.9rem;font-weight:550}input[type=checkbox],input[type=radio]{width:18px;height:18px;accent-color:var(--green);cursor:pointer}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.9rem}th{text-align:left;font-size:.73rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:650}th,td{padding:.9rem .65rem;border-bottom:1px solid var(--line)}td{overflow-wrap:anywhere}td:first-child,th:first-child{padding-left:0}tr:last-child td{border-bottom:0}.numeric{text-align:right;white-space:nowrap}.empty{padding:3rem 1rem;text-align:center;color:var(--muted)}.empty h2{color:var(--ink)}.badge{display:inline-block;background:var(--green-2);color:var(--green);border-radius:6px;padding:.3rem .55rem;font-size:.78rem;white-space:nowrap}.subnav{display:flex;gap:1rem;border-bottom:1px solid var(--line);margin-bottom:1.5rem}.subnav button{padding:.8rem .2rem;border:0;border-bottom:3px solid transparent;background:none;color:var(--muted);font-weight:650}.subnav button.active{border-bottom-color:var(--green);color:var(--green)}.groups{display:flex;gap:.6rem;flex-wrap:wrap}.group-chip{display:flex;align-items:center;gap:.6rem;background:var(--paper);padding:.6rem .8rem;border-radius:9px;border:1px solid var(--line)}.group-chip .link{font-size:.8rem}.bulk{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin-bottom:1rem;padding:.8rem;background:var(--green-2);border-radius:10px}.bulk select{width:auto;max-width:230px}.bulk strong{font-size:.85rem;margin-right:auto}.profile{max-width:650px}.profile label{margin:1.2rem 0}.profile dl{display:grid;grid-template-columns:100px 1fr;gap:.8rem}.profile dd{margin:0;overflow-wrap:anywhere}.profile dt{color:var(--muted)}.form-message{font-size:.9rem;margin-top:1rem}.error{color:var(--red)}#notice{position:fixed;bottom:1.5rem;right:1.5rem;max-width:min(480px,90vw);z-index:20;background:var(--ink);color:var(--surface);padding:1rem 1.3rem;border-radius:12px;box-shadow:var(--shadow)}#notice.error{background:var(--red);color:var(--paper)}dialog{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:16px;padding:2rem;width:min(540px,calc(100vw - 2rem));box-shadow:var(--shadow)}dialog::backdrop{background:#10251c88}dialog label{margin:1rem 0}dialog .row-actions{justify-content:flex-end;margin-top:1.5rem}.busy #root{pointer-events:none;opacity:.75}.busy{cursor:progress}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:900px){.shell{grid-template-columns:1fr}.sidebar{position:static;height:auto;padding:1rem;border-right:0;border-bottom:1px solid var(--line);gap:1rem}.sidebar .brand{justify-content:center}.nav{display:flex;justify-content:center}.nav button{padding:.7rem}.nav button span{display:none}.identity{display:none}.workspace{padding:1.4rem}.topline{margin-bottom:1.2rem}.auth{grid-template-columns:1fr}.story{padding:2rem;gap:2rem}.story h1{font-size:2.6rem}.story>small{display:none}.auth-panel{padding:2rem 1.5rem}.heading{align-items:flex-start}.card{padding:1rem}.toolbar select{max-width:none;flex:1}.bulk .button{white-space:normal}}
textarea{font:inherit;color:inherit;background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:.7rem .8rem;resize:vertical;width:100%;min-width:0}textarea:focus-visible{outline:3px solid var(--green);outline-offset:3px}.check-label{display:flex;align-items:center;gap:.7rem;font-weight:500}.check-label input{flex-shrink:0}.resource-summary{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}.resource-summary p,.resource-summary li{overflow-wrap:anywhere}.section-heading{margin-top:1.8rem;border-top:1px solid var(--line);padding-top:1rem}.picker,.preview{max-height:55vh;overflow:auto}.pick-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-bottom:1px solid var(--line);padding:.5rem 0}.pick-row label{flex:1;overflow-wrap:anywhere}.pick-row input[type=number]{width:75px}.import-warning{padding:.6rem;background:var(--green-2);border-radius:8px}.source-code{white-space:pre-wrap;overflow-wrap:anywhere;max-height:45vh;overflow:auto;font:13px/1.5 ui-monospace,monospace;padding:1rem;background:var(--paper);border-radius:8px}.statement-frame{width:100%;height:55vh;border:1px solid var(--line);background:white}dialog{max-height:90vh;overflow:auto;width:min(780px,calc(100vw - 2rem))}.group-chip{max-width:100%}.group-chip strong{min-width:0;overflow-wrap:anywhere}.subnav{flex-wrap:wrap}.nav button{min-width:0}
@media(max-width:900px){.nav{flex-wrap:wrap}.resource-summary{grid-template-columns:1fr}.row-actions{justify-content:flex-start}dialog{padding:1.2rem}.bulk .button{width:auto}.pick-row{gap:.4rem}}

@media(max-width:650px){.extension-table table{min-width:620px}}

/* Les dialogues restent interactifs pendant le choix. */
.busy dialog{cursor:auto}.check-label span{min-width:0;overflow-wrap:anywhere}

.request-progress { position: fixed; bottom: 1rem; right: 1rem; z-index: 1000; background: Canvas; color: CanvasText; border: 1px solid; padding: .75rem; border-radius: .5rem; }

.grade-complete { background:#e3f4e6; color:#164d25; }
.grade-pending,.grade-review { background:#fff0ce; color:#704600; }
.grade-override { background:#efe2fa; color:#54216b; }
.grade-empty { background:#eee; color:#555; }

.permission-none { color:#666; }
.permission-read { color:#246399; }
.permission-assess { color:#7c489c; }
.permission-admin { color:#a33b24; }

.grade-restricted { background:#dceafb; color:#163b65; }

/* Keep both axes in the same scroll container so sticky cells share its viewport. */
.grade-grid{max-width:100%;max-height:65vh;overflow:auto;position:relative;isolation:isolate}
.grade-grid table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}
.grade-grid th,.grade-grid td{min-width:160px;max-width:300px}
.grade-grid thead th{position:sticky;top:0;z-index:2;background:var(--surface);box-shadow:0 1px 0 var(--line)}
.grade-grid th:first-child,.grade-grid td:first-child{position:sticky;left:0;z-index:1;background:var(--surface);min-width:200px;width:240px;max-width:240px;padding-left:.65rem;box-shadow:1px 0 0 var(--line)}
.grade-grid thead th:first-child{z-index:3}

.language-control{display:flex;align-items:center;gap:.5rem;font-size:.85rem}.language-control select{width:auto;min-width:8rem}.auth-panel>.language-control{margin-bottom:1rem;justify-content:flex-end}

.submission-scores{display:grid;grid-template-columns:max-content 1fr;gap:.25rem 1rem}.submission-scores dd{margin:0}.evaluator-comments{white-space:pre-wrap;overflow-wrap:anywhere}

.help-chat { max-width: 960px; }
.help-message { border-bottom: 1px solid var(--line); padding: 0.75rem 0; }
.help-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.help-chat textarea { width: 100%; }

/* Keep the Google logo at its normal size even before Google styles load. */
#google-signin{width:fit-content;max-width:100%;margin-bottom:1rem;cursor:pointer;transition:filter .12s ease}
#google-signin:hover,#google-signin:focus-within{filter:brightness(.92)}
#google-signin svg{width:18px;height:18px;flex-shrink:0}

.assessment-layout{display:grid;grid-template-columns:minmax(260px, .8fr) minmax(0, 1.7fr);gap:1.25rem;margin-top:1rem;align-items:start}
.assessment-layout>div{min-width:0}
.assessment-layout .grade-grid{max-height:75vh}
.assessment-layout .grade-grid table{width:100%;min-width:0}
.assessment-layout .grade-grid th,.assessment-layout .grade-grid td{min-width:110px;max-width:none;width:auto}
.assessment-layout .grade-grid td:first-child,.assessment-layout .grade-grid th:first-child{min-width:140px;width:auto;max-width:190px}
.assessment-panel{min-width:0;max-height:75vh;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:1rem;background:var(--surface)}
.assessment-panel label{margin:1rem 0}
.assessment-panel .row-actions{justify-content:flex-start;margin-bottom:1rem}
.assessment-panel .source-code{max-height:40vh}
.assessment-selected td,.assessment-selected td:first-child{background:var(--green-2);box-shadow:inset 0 2px var(--green),inset 0 -2px var(--green)}
.assessment-selected [aria-pressed=true]{outline:3px solid var(--green);outline-offset:2px}
@media(max-width:1050px){.assessment-layout{grid-template-columns:1fr}.assessment-layout .grade-grid{max-height:35vh}.assessment-panel{max-height:none}}

.grade-grid .exercise-heading{font:inherit;letter-spacing:inherit;text-transform:inherit;text-align:left;text-decoration:underline;text-underline-offset:.2em;white-space:normal}
.grade-grid .exercise-heading[aria-pressed=true]{font-weight:750}
