/* CMOSC + RDCM : thème sombre accessible, v2026-10-25b. Le thème clair reste par défaut. */
.ui-theme-bar{display:flex;justify-content:flex-end;position:relative;z-index:5;margin:9px 0 2px;min-height:33px}
.ui-theme-control{display:inline-flex;gap:3px;padding:3px;border-radius:999px;border:1px solid rgba(255,255,255,.22);background:rgba(10,24,39,.36);box-shadow:0 2px 8px rgba(0,0,0,.12);max-width:100%}
.ui-theme-button{border:0!important;margin:0!important;width:auto!important;min-width:0!important;height:28px!important;padding:0 10px!important;border-radius:999px!important;background:transparent!important;color:#f7fbff!important;font:700 11px/1 Arial,Helvetica,sans-serif!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;box-shadow:none!important;cursor:pointer!important;white-space:nowrap}
.ui-theme-button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.ui-theme-button.is-active{background:#7CCBEE!important;color:#fff!important}
.ui-theme-outside{padding:8px 12px;margin:0!important}
.ui-theme-outside .ui-theme-control{background:#173b50}
.ui-theme-icon{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;flex:0 0 15px}
.ui-theme-icon svg{display:block;width:15px;height:15px;stroke:#fff;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ui-theme-label{display:inline-block;color:inherit!important}
@media(max-width:380px){.ui-theme-button{font-size:10px!important;padding:0 7px!important}.ui-theme-label{display:none}.ui-theme-button{width:32px!important;padding:0!important}.ui-theme-control{gap:4px}}

html[data-theme="dark"]{color-scheme:dark;
 --ink:#E9F1F6;--muted:#B3C5D0;--bg:#121D28;--card:#1D2B38;
 --cmosc-ink:#E9F1F6;--cmosc-muted:#B3C5D0;
 --blue:#76BEEA;--blue2:#88D0F1;--main:#69C5EC;--main2:#A4DFF6;
 --navy:#8ECFEF;--rose:#FF799D;--cmosc-blue:#8ECFEF;--cmosc-rose:#FF799D;
 --orange:#84D6F7;--accent:#7CCBEE;--yellow:#453923;--ok:#86D8BB;--green:#86D8BB;
 --cmosc-yellow:#453923;
}
html[data-theme="dark"] body{background:#0B141E!important;color:#E9F1F6!important}
html[data-theme="dark"] .app{background:#121D28!important;color:#E9F1F6}
/* Branding and photos are intentionally not inverted. */
html[data-theme="dark"] .hero{color:#fff!important;background:linear-gradient(140deg,#102D44 0%,#164563 58%,#1F5779 100%)!important}
html[data-theme="dark"] .hero h1,html[data-theme="dark"] .hero p,html[data-theme="dark"] .hero .kicker,html[data-theme="dark"] .hero .logo,html[data-theme="dark"] .hero .brand,html[data-theme="dark"] .hero .labname{color:#fff!important}
html[data-theme="dark"] .bottom{background:rgba(10,25,39,.97)!important;color:#D8E8F3!important;border:1px solid #334555!important;border-bottom:0!important}
html[data-theme="dark"] .bottom .nav.active{color:#7CCBEE!important}
html[data-theme="dark"][data-app-theme="cmosc"] .bottom .nav.active{color:#7CCBEE!important}
/* Panels, learning content, teacher interface, flashcards, dashboard. */
html[data-theme="dark"] :is(.card,.chapter,.unit,.mission,.quiz,.stat,.workcard,.panel,.workitem,.qitem,.student-card,.ex-row,.cmosc-rewards,.cmosc-flashcards-shell,.cmosc-mission-brief-block,.cmosc-medal.unlocked,.feedbackbox,.feedback-card,.access-btn,.access,.table-card,.history,.step-card,.session-card,.block,.block-card,.edit-card,.summary-card,.teacher-card){background:#1D2B38!important;color:#E9F1F6!important;border-color:#354A5B!important;box-shadow:0 4px 14px rgba(0,0,0,.13)!important}
html[data-theme="dark"] :is(.mini,.note,.chip,.part,.pill,.empty,.classify,.cmosc-flashcards-locked,.cmosc-mission-brief,.chapter-switch,.comment,.notice,.feedbackbox,.cmosc-medal,.q,.workcontent,.source,.review,.quiz-result,.revision-card,.smalltrack,.bar,.pbar,.cmosc-sticky-progress,.sticky-progress){border-color:#344858!important}
html[data-theme="dark"] :is(.mini,.note,.chip,.part,.empty,.classify,.cmosc-flashcards-locked,.cmosc-mission-brief,.comment,.feedbackbox,.review,.revision-card){background:#253746!important;color:#E6F0F5!important}
html[data-theme="dark"] :is(.notice,.objective,.continue,.danger){background:#433923!important;border-color:#746137!important;color:#F6E8C3!important}
html[data-theme="dark"] :is(.continue,.objective,.notice,.danger) :is(b,span,em,p,a){color:inherit!important}
html[data-theme="dark"] :is(.cmosc-flashcard-back){background:#403721!important;color:#F6E8C3!important}
html[data-theme="dark"] :is(.cmosc-flashcard-a,.cmosc-flashcard-exp){color:#E8F0F6!important}
html[data-theme="dark"] :is(.cmosc-flashcard-front){background:linear-gradient(145deg,#12466A,#173650)!important}
html[data-theme="dark"] :is(.pill,.btn.secondary,.tab:not(.active),.cmosc-flashcard-actions button:not(.primary)){background:#28465D!important;color:#C4E9FC!important}
html[data-theme="dark"] :is(.smalltrack,.bar,.pbar,.cmosc-sticky-track,.sticky-progress .trackp){background:#364858!important}
html[data-theme="dark"] .sticky-progress{background:rgba(26,43,58,.97)!important;border-color:#3A5267!important}
html[data-theme="dark"] .sticky-progress .rowp{color:#F0F5FB!important}
html[data-theme="dark"] :is(.head p,.chapter p,.chapter-meta,.section-label,.muted,.legend,.source,.date,.student.head,.stat span,.cmosc-rewards-head span,.cmosc-flashcards-head span,.cmosc-medal small,.cmosc-flashcard-count){color:#B5C5D2!important}
html[data-theme="dark"] :is(.workcontent,.body,.mini p,.mini li,.note p,.cmosc-mission-brief-block p,.cmosc-mission-brief-block li,.cmosc-flashcard-exp,.comment,.chapterrow,.student,.workitem,.qitem,.access-btn,.access){color:#E4EDF4!important}
html[data-theme="dark"] :is(h2,h3,h4,.score,.stat b,.stat strong,.mini b,.workcard summary,.cmosc-rewards-head h3,.cmosc-flashcards-head h3,.cmosc-medal a,.cmosc-mission-brief h4,.feedbackbox label,.pill,.result){color:#8ED3F7!important}
html[data-theme="dark"] .hero :is(h2,h3,h4){color:#fff!important}
html[data-theme="dark"] :is(.cmosc-mission-brief-block b,.activity){color:#FF9DB3!important}
/* Forms, quiz buttons and corrections. */
html[data-theme="dark"] :is(input,textarea,select,option,.ans,.toolbar input,.toolbar select,.feedbackbox textarea,.feedbackbox input,.feedbackbox select,.edit-fields input,.edit-fields select,.edit-fields textarea){background:#14232F!important;border-color:#486076!important;color:#EEF6FB!important;caret-color:#EEF6FB}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#9CAEBB!important;opacity:1}
html[data-theme="dark"] :is(input,textarea,select,.ans):focus-visible{outline:2px solid #76BEEA!important;outline-offset:1px}
html[data-theme="dark"] .ans{background:#253846!important;color:#E9F1F6!important}
html[data-theme="dark"] :is(.ans.good,.qitem.good,.classify.good,.access-btn.open,.access.open){background:#1A403B!important;border-color:#348774!important;color:#E6F7EE!important}
html[data-theme="dark"] :is(.ans.bad,.qitem.bad,.classify.bad){background:#4B2833!important;border-color:#9B4C64!important;color:#FCE1E9!important}
html[data-theme="dark"] :is(.pill.done,.alert){background:#244A3D!important;color:#A4EBCB!important}
html[data-theme="dark"] :is(.pill.wait,.alert.warn){background:#493522!important;color:#FFD1A6!important}
html[data-theme="dark"] :is(.btn:not(.secondary),.save,.tab.active,.next-chapter-btn,.cmosc-flashcard-actions .primary,form>button:not(.ui-theme-button),button[type="submit"]:not(.ui-theme-button)){background:#25668F!important;color:#fff!important}
html[data-theme="dark"] .badge,html[data-theme="dark"] .num,html[data-theme="dark"] .cnum{color:#fff!important}
html[data-theme="dark"] .access-btn.closed span{color:#FFACB5!important}
html[data-theme="dark"] :is(.student:not(.head):hover,.chapterrow:hover){background:#263B4A!important}
html[data-theme="dark"] :is(.cmosc-medal:not(.unlocked),.cmosc-medal-icon){background:#283A49!important}
html[data-theme="dark"] :is(.cmosc-medal.unlocked.gold .cmosc-medal-icon){background:#8A6B26!important}
html[data-theme="dark"] :is(.cmosc-medal.unlocked.silver .cmosc-medal-icon){background:#536777!important}
html[data-theme="dark"] :is(.cmosc-medal.unlocked.bronze .cmosc-medal-icon){background:#78533D!important}
html[data-theme="dark"] table{color:#E9F1F6!important}
html[data-theme="dark"] :is(th,td,.chapterrow,.student.head,.quiz .q,.review){border-color:#34495A!important}
html[data-theme="dark"] :is(th,.table-head){background:#203545!important;color:#E9F1F6!important}
html[data-theme="dark"] hr{border-color:#374C5B}
html[data-theme="dark"] a:not(.nav):not(.chapter):not(.btn):not(.continue):not(.back){color:#9BDCFF}
/* Compact navigation stays untouched by the theme bar and respects notch insets. */
@media (max-width:620px){.ui-theme-control{max-width:100%}.ui-theme-bar{margin-top:10px}}


/* V3 — sélecteur de thème discret, intégré à l'en-tête. */
.hero { container-type: inline-size; }
.ui-theme-bar {
  min-height: 0;
  margin: 0 !important;
  padding: 0;
  z-index: 6;
}
.ui-theme-control {
  gap: 2px;
  padding: 3px;
  border-radius: 100px;
  background: rgba(9, 34, 55, .48);
  border: 1px solid rgba(255,255,255,.27);
  box-shadow: none;
}
.ui-theme-button {
  min-width: 36px !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 100px !important;
}
.ui-theme-button.is-active {
  background: #70C7EB !important;
  color: #ffffff !important;
}
.ui-theme-button .ui-theme-icon,
.ui-theme-button .ui-theme-icon svg {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}
.ui-theme-button .ui-theme-icon svg {
  stroke: #ffffff !important;
  fill: none !important;
  stroke-width: 1.8px;
}
.ui-theme-label { display: none !important; }
.ui-theme-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}
.ui-theme-header-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}
.ui-theme-header-stack > .ui-theme-bar {
  align-self: flex-end;
}
.ui-theme-outside {
  padding: 8px 12px;
  justify-content: flex-end;
}
.ui-theme-outside .ui-theme-control {
  background: #173B50;
}
@container (min-width: 650px) {
  .ui-theme-button {
    width: auto !important;
    padding: 0 12px !important;
    min-width: 70px !important;
  }
  .ui-theme-label { display: inline-block !important; }
}
@media (max-width: 420px) {
  .ui-theme-header-actions { gap: 7px; }
  .ui-theme-control { padding: 2px; gap: 1px; }
  .ui-theme-button {
    min-width: 34px !important;
    width: 34px !important;
    height: 34px !important;
  }
}


/* Accessibilité / contraste du thème sombre · 2026-10-27.
   Les exercices et flashcards créés en JavaScript utilisent parfois une surface
   claire par défaut : éviter le texte clair sur ces fonds clairs. */
html[data-theme="dark"] {
  --surface: #263b4d;
  --field-surface: #142635;
  color-scheme: dark;
}
/* Entrées éditables, listes et menus natifs : fond foncé + texte réellement lisible. */
html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select,[contenteditable="true"],.tile-group-title select) {
  background-color: #142635 !important;
  color: #f2f7fb !important;
  border-color: #698397 !important;
  caret-color: #f2f7fb !important;
  -webkit-text-fill-color: #f2f7fb;
}
html[data-theme="dark"] :is(input,textarea)::placeholder {
  color: #c3d4df !important;
  opacity: 1 !important;
}
html[data-theme="dark"] select option {
  color: #f2f7fb !important;
  background-color: #142635 !important;
}
html[data-theme="dark"] :is(input,select,textarea)[disabled] {
  color: #c5d5df !important;
  -webkit-text-fill-color: #c5d5df;
  background-color: #2a3a48 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] :is(input,select,textarea):focus-visible,
html[data-theme="dark"] [contenteditable="true"]:focus-visible {
  outline: 2px solid #76c9ef !important;
  outline-offset: 2px;
}
/* Boutons d'exercices générés dynamiquement et faces de cartes de révision. */
html[data-theme="dark"] :is(
  .mini-quiz .mini-option,
  .revision-cards .revision-flip,
  .revision-cards .revision-actions button,
  .revision-cards .revision-flip.is-back,
  .classify-check,
  .step,
  .ex-answer
) {
  background-color: #263b4d !important;
  color: #eef5fa !important;
  border-color: #587489 !important;
}
html[data-theme="dark"] .mini-quiz .mini-option:disabled {
  opacity: 1 !important;
}
html[data-theme="dark"] .mini-quiz .mini-option.mini-correct {
  background-color: #1b493e !important;
  color: #e0faed !important;
  border-color: #62b28e !important;
}
html[data-theme="dark"] .mini-quiz .mini-option.mini-incorrect {
  background-color: #512d39 !important;
  color: #ffe4e8 !important;
  border-color: #ce8698 !important;
}
html[data-theme="dark"] .mini-quiz :is(.mini-info,.mini-counter,.mini-feedback,.mini-result,.mini-q strong),
html[data-theme="dark"] .revision-cards :is(.revision-count,.revision-face,.revision-hint) {
  color: #e6f0f7 !important;
}
html[data-theme="dark"] .mini-quiz .mini-counter {
  color: #9cdcff !important;
}
html[data-theme="dark"] .mini-quiz .mini-retry {
  background: #25698d !important;
  color: #fff !important;
  border: 1px solid #65a8c8 !important;
}
/* Options de groupe : corriger le fond beige clair + texte clair. */
html[data-theme="dark"] .tile-group-row,
html[data-theme="dark"] .tile-group-row.is-on {
  background: #263b4d !important;
  color: #eef5fa !important;
  border-color: #537086 !important;
}
html[data-theme="dark"] .tile-group-row.is-on {
  border-color: #ddaa73 !important;
  box-shadow: inset 4px 0 0 #ddaa73;
}
html[data-theme="dark"] .tile-group-row span,
html[data-theme="dark"] .tile-group-title label,
html[data-theme="dark"] #tileGroupNotice {
  color: #e7f1f8 !important;
}
html[data-theme="dark"] .tile-group-instruction {
  background: #433624 !important;
  color: #faedcf !important;
  border-color: #d89b57 !important;
}
/* Les états validé / erreur sont lisibles, y compris les éléments des évaluations. */
html[data-theme="dark"] :is(.qitem.good,.classify.good,.ans.good) {
  background-color: #1b493e !important;
  color: #dff8ea !important;
  border-color: #62a78c !important;
}
html[data-theme="dark"] :is(.qitem.bad,.classify.bad,.ans.bad) {
  background-color: #512d39 !important;
  color: #ffe3e9 !important;
  border-color: #bf798e !important;
}
html[data-theme="dark"] :is(.workitem,.qitem,.ex-row,.review,.feedbackbox,.mini,.note) :is(p,span,em,label,strong) {
  color: inherit;
}



/* =========================================================
   LAB STUDENT UI 2026-10-28
   One responsive structure and six-item nav across all pages.
   Only applies to student pages marked by theme.js: the
   teacher dashboard, login and registration remain unchanged.
   ========================================================= */
html[data-app-theme="cmosc"]{
  --lab-hero:linear-gradient(135deg,#124878 0%,#17578d 58%,#69b2d5 100%);
  --lab-accent:#e6245a;
  --lab-nav-active:#ffdb62;
  --lab-shortcut:#e4f4fc;
}
html[data-app-theme="rdcm"]{
  --lab-hero:linear-gradient(135deg,#173b50 0%,#247fa9 58%,#33a2db 100%);
  --lab-accent:#f27023;
  --lab-nav-active:#ffb17e;
  --lab-shortcut:#e6f3fb;
}
html.lab-student-page{
  scroll-padding-bottom:110px;
}
html.lab-student-page body{
  margin:0;
  min-width:0;
  overflow-x:hidden;
  background:#eaf0f3;
}
html.lab-student-page .app,
html.lab-student-page .app.training-shell{
  box-sizing:border-box;
  width:min(100%,1120px)!important;
  max-width:1120px!important;
  min-width:0;
  min-height:100vh;
  padding-bottom:calc(106px + env(safe-area-inset-bottom,0px))!important;
  margin:0 auto!important;
  background:#f4f8fa;
  border-radius:0;
  box-shadow:0 0 36px rgba(17,42,61,.08);
  overflow:visible;
}
html.lab-student-page .hero{
  background:var(--lab-hero)!important;
  color:#fff!important;
  border-radius:26px!important;
  margin:clamp(10px,2vw,23px)!important;
  padding:clamp(20px,3vw,38px)!important;
  min-width:0;
}
html.lab-student-page .hero :is(h1,h2,h3,p,.kicker){
  max-width:100%;
  overflow-wrap:break-word;
}
html.lab-student-page .wrap{
  box-sizing:border-box;
  width:100%;
  max-width:none!important;
  padding:12px clamp(16px,3.5vw,38px) 32px!important;
  min-width:0;
}
html.lab-student-page :is(.wrap,.stats,.grid,.chapter-top,.workcard,.panel,.card,.unit,.lesson-map,.head,.chapter,.stat){
  min-width:0;
}
html.lab-student-page :is(img,video,canvas,svg,iframe){
  max-width:100%;
}
html.lab-student-page :is(input,select,textarea){
  max-width:100%;
}
html.lab-student-page .card,
html.lab-student-page .chapter,
html.lab-student-page .stat{
  max-width:100%;
}
html.lab-student-page #chapters{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:14px;
  align-items:stretch;
}
html.lab-student-page #chapters > .activity{
  grid-column:1/-1;
}
html.lab-student-page #chapters > .chapter{
  margin:6px 0;
  height:calc(100% - 12px);
}
html.lab-student-page #chapters .chapter-top > div:not(.badge){
  min-width:0;
}
html.lab-student-page #chapters h3{
  overflow-wrap:anywhere;
}
html.lab-student-page .stats{
  gap:10px;
}
html.lab-student-page .stat{
  min-width:0;
}
/* Navigation fixe, toujours identique : Retours ET Réviser. */
html.lab-student-page nav.bottom.lab-student-bottom{
  box-sizing:border-box;
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  transform:translateX(-50%)!important;
  width:min(1080px,calc(100% - 24px))!important;
  max-width:1080px!important;
  height:calc(72px + env(safe-area-inset-bottom,0px))!important;
  padding:7px 10px max(8px,env(safe-area-inset-bottom,0px))!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  align-items:center!important;
  justify-content:stretch!important;
  gap:3px!important;
  z-index:9999!important;
  background:rgba(22,55,78,.98)!important;
  color:#dfeef7!important;
  border:1px solid rgba(255,255,255,.15)!important;
  border-bottom:0!important;
  border-radius:22px 22px 0 0!important;
  box-shadow:0 -5px 20px rgba(15,38,54,.17)!important;
  backdrop-filter:blur(12px);
}
html.lab-student-page nav.bottom.lab-student-bottom > a.nav{
  all:unset;
  box-sizing:border-box;
  display:flex!important;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  align-self:stretch;
  width:100%;
  min-width:0!important;
  padding:4px 2px!important;
  gap:2px;
  border-radius:12px;
  color:#deebf4!important;
  cursor:pointer;
  font:800 clamp(8px,.9vw,11px)/1.25 Arial,Helvetica,sans-serif!important;
  text-align:center;
  text-decoration:none!important;
  -webkit-tap-highlight-color:transparent;
}
html.lab-student-page nav.bottom.lab-student-bottom > a.nav b{
  display:block;
  font-size:20px;
  font-weight:800;
  line-height:1.1;
  color:inherit!important;
}
html.lab-student-page nav.bottom.lab-student-bottom > a.nav .lab-nav-label{
  display:block;
  width:100%;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:inherit!important;
}
html.lab-student-page nav.bottom.lab-student-bottom > a.nav.active,
html.lab-student-page nav.bottom.lab-student-bottom > a.nav[aria-current="page"]{
  background:rgba(255,255,255,.09);
  color:var(--lab-nav-active)!important;
}
html.lab-student-page nav.bottom.lab-student-bottom > a.nav:hover{
  background:rgba(255,255,255,.11);
}
html.lab-student-page nav.bottom.lab-student-bottom > a.nav:focus-visible{
  outline:2px solid #8ed3f7;
  outline-offset:-2px;
}
/* Training screen shares the same header, width and bottom nav. */
html.lab-student-page .app.training-shell .hero.training-hero{
  margin:clamp(10px,2vw,23px)!important;
  padding:clamp(20px,3vw,38px)!important;
}
html.lab-student-page .training-hero .top > .brandright.ui-theme-header-stack{
  flex-direction:row!important;
  align-items:flex-start!important;
  justify-content:flex-end!important;
  flex-wrap:nowrap;
  gap:8px!important;
  max-width:calc(100% - 90px);
}
html.lab-student-page .training-hero .top > .brandright.ui-theme-header-stack > .ui-theme-bar{
  align-self:flex-start!important;
  flex:0 0 auto;
}
html.lab-student-page .training-hero .top > .brandright.ui-theme-header-stack > .avatar{
  flex:0 0 auto;
}
html.lab-student-page .training-grid,
html.lab-student-page .training-panel{
  min-width:0;
}
/* Fix colors that used to switch between light and dark surfaces incorrectly. */
html.lab-student-page[data-theme="dark"] body{
  background:#0b141e!important;
}
html.lab-student-page[data-theme="dark"] .app{
  background:#121d28!important;
}
html.lab-student-page[data-theme="dark"] .hero{
  background:linear-gradient(135deg,#102d44 0%,#164563 58%,#1f5779 100%)!important;
}
html.lab-student-page[data-app-theme="rdcm"][data-theme="dark"]{
  --lab-nav-active:#ffb17e;
  --accent:#ffaf7f;
  --orange:#ffaf7f;
}
html.lab-student-page[data-app-theme="cmosc"][data-theme="dark"]{
  --lab-nav-active:#f5d670;
}
html.lab-student-page[data-theme="dark"] .continue{
  background:#334c5e!important;
  color:#f5faff!important;
  border:1px solid #567a93!important;
}
html.lab-student-page[data-theme="dark"] .continue :is(b,small,span,strong){
  color:inherit!important;
}
html.lab-student-page[data-theme="dark"] #chapters .chapter{
  background:#1d2b38!important;
  color:#e9f1f6!important;
}
/* Desktop, tablet, mobile. */
@media(max-width:750px){
  html.lab-student-page .app,
  html.lab-student-page .app.training-shell{
    width:100%!important;
    max-width:100%!important;
  }
  html.lab-student-page .hero,
  html.lab-student-page .app.training-shell .hero.training-hero{
    margin:12px!important;
    padding:23px 20px!important;
    border-radius:23px!important;
  }
  html.lab-student-page .wrap{
    padding:10px 17px 24px!important;
  }
  html.lab-student-page nav.bottom.lab-student-bottom{
    width:calc(100% - 12px)!important;
    padding-left:4px!important;
    padding-right:4px!important;
  }
}
@media(max-width:580px){
  html.lab-student-page #chapters{
    grid-template-columns:1fr;
    gap:0;
  }
  html.lab-student-page #chapters > .chapter{
    height:auto;
    margin:7px 0;
  }
  html.lab-student-page .hero,
  html.lab-student-page .app.training-shell .hero.training-hero{
    margin:9px!important;
    padding:20px 17px!important;
    border-radius:21px!important;
  }
  html.lab-student-page .wrap{
    padding:8px 13px 20px!important;
  }
  html.lab-student-page nav.bottom.lab-student-bottom{
    border-radius:17px 17px 0 0!important;
    height:calc(65px + env(safe-area-inset-bottom,0px))!important;
    gap:0!important;
    padding:5px 2px max(6px,env(safe-area-inset-bottom,0px))!important;
  }
  html.lab-student-page nav.bottom.lab-student-bottom > a.nav{
    font-size:9px!important;
    padding:4px 0!important;
  }
  html.lab-student-page nav.bottom.lab-student-bottom > a.nav b{
    font-size:19px;
  }
  html.lab-student-page .training-hero .top > .brandright.ui-theme-header-stack{
    gap:5px!important;
  }
}
@media(max-width:355px){
  html.lab-student-page nav.bottom.lab-student-bottom > a.nav{font-size:8px!important}
  html.lab-student-page nav.bottom.lab-student-bottom > a.nav b{font-size:17px}
  html.lab-student-page .training-hero .top > .brandright.ui-theme-header-stack{max-width:calc(100% - 72px)}
}


/* Les séances verrouillées doivent rester lisibles : l'opacité à 48 % de
   l'ancien garde d'accès RDCM atténuait les textes même en mode sombre. */
html.lab-student-page a.chapter[aria-disabled="true"],
html.lab-student-page a.continue[aria-disabled="true"]{
  opacity:1!important;
  filter:none!important;
  cursor:not-allowed!important;
}
html.lab-student-page a.chapter[aria-disabled="true"]{
  border:1px dashed #b3c6d0!important;
  color:#40576a!important;
}
html.lab-student-page a.continue[aria-disabled="true"]{
  background:#e9f0f3!important;
  border:1px dashed #afc4d0!important;
  color:#455b6a!important;
}
html.lab-student-page[data-theme="dark"] a.chapter[aria-disabled="true"],
html.lab-student-page[data-theme="dark"] a.continue[aria-disabled="true"]{
  background:#253849!important;
  border-color:#4c687e!important;
  color:#d7e7f1!important;
}
html.lab-student-page a[aria-disabled="true"] .rdcm-lock-label{
  color:#a5473b!important;
  font-weight:900;
}
html.lab-student-page[data-theme="dark"] a[aria-disabled="true"] .rdcm-lock-label{
  color:#ffbf99!important;
}


/* L'icône des flashcards reprend l'illustration originale carte_01.png,
   sans recoloration du dessin créé par le graphiste. */
html.lab-student-page nav.bottom.lab-student-bottom > a.nav b.lab-nav-card-icon{
  display:inline-grid!important;
  place-items:center;
  align-self:center;
  flex:0 0 auto;
  background:#f7fbfd!important;
  border:1px solid rgba(16,49,69,.2);
  width:25px;
  height:26px;
  border-radius:6px;
  padding:2px;
  margin:0;
}
html.lab-student-page nav.bottom.lab-student-bottom > a.nav b.lab-nav-card-icon img{
  display:block;
  width:20px;
  height:21px;
  object-fit:contain;
  opacity:1;
  filter:none;
}
html.lab-student-page .training-shortcut-icon{
  background:#fff!important;
  border:1px solid #c2dbe7;
}
html.lab-student-page .training-shortcut-icon img{
  display:block;
  width:29px;
  height:32px;
  object-fit:contain;
  filter:none!important;
}
html.lab-student-page[data-theme="dark"] .training-shortcut-icon{
  background:#fff!important;
  border-color:#95b2c4;
}
@media(max-width:355px){
  html.lab-student-page nav.bottom.lab-student-bottom > a.nav b.lab-nav-card-icon{
    width:23px;height:24px;
  }
  html.lab-student-page nav.bottom.lab-student-bottom > a.nav b.lab-nav-card-icon img{
    width:18px;height:19px;
  }
}
