:root {
  --maroc-night: #06272e;
  --maroc-green: #145d46;
  --maroc-bright: #178264;
  --maroc-border: #b5d2c6;
  --maroc-ivory: #f4f6ed;
  --maroc-gold: #f4cc69;
  --maroc-red: #bd1938;
  --maroc-text: #17372f;
  --sports-navy: var(--maroc-night);
  --sports-ink: var(--maroc-text);
  --sports-line: var(--maroc-border);
  --sports-blue: #0c6d56;
  --sports-surface: #e8f1eb;
  --sports-shadow: 0 5px 14px #00192133;
  --maroc-paper: #faf5e7;
  --maroc-paper-green: #e0eee3;
  --maroc-ink-soft: #3e6254;
  --maroc-paper-white: #fffdf5;
  --maroc-paper-gold: #f5e8c7;
  --maroc-ribbon: linear-gradient(120deg,#ac1537,#941335 70%,#6b1833);
}
.home-weekly-agenda { display: none; }
.lesson-objective-sentence {
  padding: 13px 15px;
  margin: 10px 0;
  border: 1px solid #d9e3d6;
  border-radius: 12px;
  background: #fffefa;
  color: #254539;
  font-weight: 600;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.lesson-objective-editor {
  min-width: 0;
  margin: 13px 0;
}
.lesson-objective-editor textarea { min-height: 92px; }
@media screen {
  body { min-width: 0; background: var(--maroc-night); }
  .workspace {
    --blue: #0d6b52;
    --green: var(--maroc-bright);
    --navy: var(--maroc-night);
    --navy2: #06252e;
    --line: var(--maroc-border);
    --muted: var(--maroc-ink-soft);
    --surface: var(--maroc-ivory);
    background: radial-gradient(ellipse at 88% 8%,#12654f72,transparent 48rem),linear-gradient(154deg,#0b4940,#062d34 49%,#072631);
  }
  .sidebar { background: linear-gradient(164deg,#0c353a,#06252e 77%); border-color: #226252; }
  .sidebar .brand::after { background: linear-gradient(90deg,transparent,#488e71,var(--maroc-gold),transparent); }
  .sidebar .brand strong span,.sidebar .side-caption { color: #a7e5c6; }
  .sidebar :is(.side-nav a,.work-nav-action) { color: #e9faf1; }
  .sidebar .side-nav a.active { background: linear-gradient(145deg,#e0314b,#ae1030 78%); border-color: #f36774; }
  .sidebar .side-nav a:hover,.sidebar .work-nav-action:hover { background-color: #1a554c; }
  .sidebar .work-mode-switch-side { border-color: #568c7b; }
  .maroc-sidebar-zellige {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: clamp(3px,1.2vw,12px);
    min-height: 46px;
    margin-top: 10px;
    border: 1px solid #b79b5c73;
    border-radius: 9px;
    background:
      linear-gradient(45deg,transparent 47%,#c0a66d24 48% 51%,transparent 52%) center / 19px 19px,
      linear-gradient(-45deg,transparent 47%,#c0a66d24 48% 51%,transparent 52%) center / 19px 19px,
      linear-gradient(105deg,#0e3539,#17524b,#0e3539);
  }
  .maroc-sidebar-zellige i {
    --zellige-star: polygon(50% 0,63% 20%,85% 15%,80% 37%,100% 50%,80% 63%,85% 85%,63% 80%,50% 100%,37% 80%,15% 85%,20% 63%,0 50%,20% 37%,15% 15%,37% 20%);
    display: grid;
    place-items: center;
    width: 15px;
    aspect-ratio: 1;
    background: #c2a264;
    clip-path: var(--zellige-star);
  }
  .maroc-sidebar-zellige i:nth-child(2) { width: 27px; background: #eed196; }
  .maroc-sidebar-zellige i::after {
    content: "";
    width: 78%;
    aspect-ratio: 1;
    background: #16534b;
    clip-path: var(--zellige-star);
  }
  .workspace { container: eps-workspace / inline-size; }
  .sports-entry-frame { container: eps-entry / inline-size; }
  .workspace .sports-masthead,.sports-entry-frame .sports-masthead {
    --masthead-height: clamp(60px,7.6vw,105px);
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: clamp(8px,2vw,32px);
    min-height: var(--masthead-height);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    padding-inline-start: clamp(9px,2.1vw,32px);
    border-bottom: 2px solid #caa757;
    background:
      radial-gradient(ellipse at 38% 0%,#23806582,transparent 66%),
      repeating-linear-gradient(127deg,transparent 0 31px,#8cdcac14 31px 32px),
      linear-gradient(111deg,#082a34,#10433d 58%,#082e35);
  }
  .maroc-wordmark {
    display: flex;
    align-self: center;
    align-items: center;
    gap: clamp(6px,1.2vw,15px);
    color: #fff;
    min-width: 0;
    padding-block: 7px;
  }
  .maroc-wordmark > span { min-width: 0; }
  .maroc-wordmark > img { width: clamp(31px,5.8vw,66px); height: auto; flex: none; object-fit: contain; }
  .maroc-wordmark b { display: block; font-size: clamp(1rem,3.5vw,2.65rem); font-style: italic; font-weight: 900; line-height: 1; letter-spacing: -.035em; white-space: nowrap; }
  .maroc-wordmark b small { border-radius: 4px; padding: 2px 5px; background: var(--maroc-red); color: #fff; font-size: .4em; letter-spacing: .035em; vertical-align: middle; }
  .maroc-wordmark > span > small { display: block; color: #f9dfa1; margin-top: 4px; font-weight: 800; font-size: clamp(.56rem,1.1vw,.88rem); line-height: 1.16; overflow-wrap: break-word; }
  .sports-ministry {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: clamp(12px,1.5vw,24px);
    padding: 6px max(132px,calc(var(--masthead-height) * 1.82)) 6px 0;
    color: #f1f6f0;
  }
  .sports-ministry-copy {
    display: grid;
    gap: 3px;
    max-inline-size: clamp(150px,18vw,230px);
    font-size: clamp(.68rem,1.05vw,.82rem);
    line-height: 1.25;
    text-wrap: pretty;
  }
  .sports-ministry-copy strong { color: #ffe6a5; font-size: clamp(.76rem,1.21vw,.98rem); }
  .sports-ministry-crest {
    display: block;
    flex: none;
    width: clamp(34px,5.2vw,62px);
    height: auto;
    filter: drop-shadow(0 2px 4px #06191bc9);
  }
  .sports-ministry-flag {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    z-index: -1;
    aspect-ratio: 1.82;
    background: url("maroc-banniere-reference.jpg") right center / auto 100% no-repeat;
    -webkit-mask-image: linear-gradient(90deg,transparent,#000 28%);
    mask-image: linear-gradient(90deg,transparent,#000 28%);
  }
  .workspace .topbar {
    --toolbar-line: #568d81;
    --toolbar-surface: #174d48;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: 7px clamp(5px,1cqi,14px);
    height: auto;
    min-height: 61px;
    max-width: 100%;
    padding: 6px clamp(7px,1.5cqi,18px);
    background: linear-gradient(105deg,#072e34,#0b604e 60%,#542437 100%);
    border-bottom-color: #cca958;
  }
  .topbar-leading { grid-area: 1 / 1; display: flex; align-items: center; gap: 5px; }
  .work-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: none;
    min-width: 44px;
    min-height: 44px;
    padding: 4px 8px;
    border: 1px solid #71a298;
    border-radius: 9px;
    background: #174d48;
    color: #f6fbf5;
    font: 750 .82rem/1.15 "DM Sans","Segoe UI",sans-serif;
    text-decoration: none;
    cursor: pointer;
  }
  .work-back svg { flex: none; }
  .work-back:hover { background: #246a5e; color: #fff; }
  .work-back[aria-disabled="true"] { opacity: .58; cursor: default; }
  .work-back:focus-visible { outline: 2px solid var(--maroc-gold); outline-offset: 2px; }
  .work-entry-back-row { grid-column: 1 / -1; padding: 7px clamp(10px,2cqi,24px); background: #0b363a; }
  .sports-choices-content > .work-back { margin-bottom: 12px; }
  .workspace .topbar .work-mode-switch { color: #eafbf3; background: #174e47; border-color: #70a99d; }
  html[data-work-mode="terrain"] .workspace .topbar .work-mode-switch { background: var(--maroc-gold); border-color: #ffe098; color: #272415; }
  .workspace .topbar :is(.menu-toggle,.profile-badge,.top-search,.top-alert,#eps-context-help):hover { background: #246a5e; }
  .workspace .topbar .profile-badge:hover { background: #f4f6ed; }
  .workspace .topbar :is(.sync-badge,.profile-badge) { border-color: #79ab9d; }
  .workspace .topbar .breadcrumb {
    grid-area: 1 / 2;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 2px 7px;
    min-width: 0;
    margin: 0;
    white-space: normal;
    overflow: visible;
  }
  .workspace .topbar .breadcrumb .header-logo { grid-row: 1 / span 2; }
  .workspace .topbar .header-logo img { width: clamp(32px,5cqi,49px); height: auto; }
  .workspace .topbar #page-crumb {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
  }
  .workspace .topbar .top-meta { grid-area: 1 / 3; display: flex; min-width: 0; gap: 5px; flex-wrap: nowrap; justify-content: flex-end; }
  .workspace .topbar :is(.top-search,.top-alert) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
  .topbar-more,.topbar-commands { display: none; }
  .topbar-more {
    position: relative;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--toolbar-line);
    border-radius: 9px;
    background: var(--toolbar-surface);
    color: #f6fbf5;
    cursor: pointer;
  }
  .topbar-more:is(:hover,[aria-expanded="true"]) { background: #246a5e; }
  .topbar:has(#reminder-count:not([hidden])) .topbar-more::after {
    content: "";
    position: absolute;
    inset: 5px 5px auto auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--maroc-gold);
  }
  .topbar-commands {
    position: absolute;
    z-index: 1;
    inset: calc(100% + 4px) 7px auto auto;
    width: min(242px,calc(100% - 14px));
    gap: 2px;
    padding: 5px;
    border: 1px solid #a4bcad;
    border-radius: 11px;
    background: var(--maroc-paper);
    box-shadow: 0 8px 24px #031b2459;
  }
  .topbar-commands :is(a,button) {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--maroc-text);
    font: inherit;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
  }
  .topbar-commands :is(a,button):hover { background: #e1ece1; }
  .topbar-commands :is(.compact-mode-command,.compact-search-command) { display: none; }
  .maroc-teacher-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .71rem; color: #f6e6b2; }
  .workspace .topbar #school-year { padding: 6px 9px; border-radius: 9px; background: linear-gradient(145deg,#98203b,#542032); border: 1px solid #e8c36c; }

  #main[data-sports-page="accueil"] > :is(.dashboard-calendar-strip,.maroc-overview,.maroc-home-tools,.sports-dashboard,.start-persistent) {
    max-width: 1260px;
    margin-inline: auto;
  }
  .dashboard-calendar-strip {
    margin-block: 0 14px;
    border: 1px solid #c5a96d;
    border-radius: 13px;
    background: linear-gradient(106deg,#f6e7c5,#fffaf0 52%,#e1efe3);
    box-shadow: 0 6px 16px #0320274f;
    color: #183d32;
  }
  .dashboard-calendar-link {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr)) auto;
    align-items: stretch;
    color: inherit;
    text-decoration: none;
    border-radius: inherit;
  }
  .dashboard-calendar-link:focus-visible { outline: 3px solid var(--maroc-gold); outline-offset: 3px; }
  .dashboard-calendar-entry {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-content: center;
    align-items: center;
    column-gap: 9px;
    row-gap: 2px;
    min-width: 0;
    min-height: 64px;
    padding: 9px clamp(9px,1.4vw,20px);
    border-inline-end: 1px solid #cab786;
  }
  .dashboard-calendar-entry:not(:has(.dashboard-calendar-countdown)) { grid-template-columns: 1fr; }
  .dashboard-calendar-entry strong { font-size: .92rem; overflow-wrap: anywhere; }
  .dashboard-calendar-label,.dashboard-calendar-dates { grid-column: 1; font-size: .73rem; line-height: 1.25; color: #425e51; }
  .dashboard-calendar-label { font-weight: 800; color: #255d49; }
  .dashboard-calendar-countdown {
    grid-area: 1 / 2 / span 3;
    justify-self: start;
    padding: 4px 8px;
    border-radius: 6px;
    background: #d9ebdc;
    color: #164f37;
    font-size: .73rem;
    line-height: 1.25;
    font-weight: 800;
  }
  .dashboard-calendar-entry[data-calendar-kind="holiday"] .dashboard-calendar-countdown { background: #f6e5b9; color: #704812; }
  .dashboard-calendar-icon { display: flex; align-items: center; gap: 6px; padding-inline: 13px; color: #255d49; font-size: .76rem; font-weight: 750; }
  .dashboard-calendar-icon svg { width: 19px; height: 19px; }
  .dashboard-calendar-link:hover .dashboard-calendar-caption { text-decoration: underline; }
  .class-groups-layout { display: grid; grid-template-columns: minmax(175px,.7fr) minmax(0,1.55fr); align-items: start; gap: 14px; }
  .class-groups-list,.class-group-editor { min-width: 0; }
  .class-groups-list { display: grid; gap: 8px; }
  .class-groups-list h2,.class-group-editor h2 { font-size: 1.06rem; }
  .class-group-editor h2 { scroll-margin-block-start: 78px; }
  .class-groups-list h2 { margin: 7px 0 1px; }
  .class-groups-list .btn { min-height: 44px; justify-content: flex-start; text-align: start; white-space: normal; }
  .class-groups-list .class-group-choice { justify-content: space-between; gap: 8px; }
  .class-group-choice span { min-width: 0; overflow-wrap: anywhere; }
  .class-group-choice small { flex: none; }
  .class-groups-list [aria-pressed="true"] { border-color: #2a7057; background: #e0eee3; color: #143e32; }
  .class-group-pupils {
    display: grid;
    gap: 4px;
    min-width: 0;
    max-height: min(52vh,29rem);
    overflow: auto;
    margin: 14px 0;
    padding: 7px;
    border: 1px solid #b9ccba;
    border-radius: 10px;
    background: #fbf8ed;
  }
  .class-group-pupils legend { padding-inline: 6px; font-weight: 800; color: #265847; }
  .class-group-pupil {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
  }
  .class-group-pupil:has(input:checked) { background: #e0eee3; border-color: #97bea7; }
  .class-group-pupil span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
  .class-group-pupil small { max-width: 42%; color: #466457; overflow-wrap: anywhere; }
  .class-group-pupil input[type="checkbox"] { flex: none; display: block; width: 20px; height: 20px; margin: 0; accent-color: #146349; }
  .class-group-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  .class-group-actions output { flex: 1 1 130px; font-size: .83rem; font-weight: 750; color: #265847; }
  @media (max-width: 760px) {
    .dashboard-calendar-entry { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
    .dashboard-calendar-countdown { margin-top: auto; }
    .dashboard-calendar-caption { display: none; }
    .dashboard-calendar-icon { padding-inline: 7px; }
    .dashboard-calendar-icon svg { width: 16px; height: 16px; }
  }
  @media (max-width: 420px) {
    .dashboard-calendar-link { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-calendar-entry:last-of-type { border-inline-end: 0; }
    .dashboard-calendar-icon { display: none; }
    .dashboard-calendar-entry strong { font-size: .84rem; }
    .dashboard-calendar-label { font-size: .68rem; }
  }
  @media (max-width: 630px) {
    .class-groups-layout { grid-template-columns: minmax(0,1fr); }
  }
  .maroc-overview { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
  .maroc-dashboard-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  .maroc-dashboard-heading .work-save-status { flex: 1 1 100px; min-width: 0; margin: 0; overflow-wrap: anywhere; }
  .home-shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; min-width: 0; }
  .home-shortcuts .btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    min-height: 44px;
    padding: 6px 11px;
    border: 1px solid #7dafa0;
    background: #143e42;
    color: #f7eed6;
    font-size: .85rem;
    font-weight: 750;
    line-height: 1.18;
    text-align: start;
    white-space: normal;
    text-decoration: none;
  }
  .home-shortcuts .btn svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--maroc-gold); }
  .home-shortcuts .btn:hover { background: #1c564e; color: #fff; }
  .home-shortcuts .btn:focus-visible { outline: 2px solid var(--maroc-gold); outline-offset: 2px; }
  .entry-shortcuts { width: fit-content; max-width: 100%; margin-bottom: 14px; }
  @media (max-width: 650px) {
    .maroc-dashboard-heading .home-shortcuts { flex-basis: 100%; order: 1; }
    .entry-shortcuts { width: 100%; }
  }
  .maroc-overview-main,.maroc-daily { min-width: 0; }
  .maroc-daily { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .home-pupil-search {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    gap: 8px 14px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid #7dafa0;
    border-radius: 13px;
    background: #143e42;
    color: #f7eed6;
  }
  .home-pupil-search label { font-weight: 800; }
  .home-pupil-field { position: relative; min-width: 0; }
  .home-pupil-field > span {
    display: grid;
    place-items: center;
    position: absolute;
    inset: 0 auto 0 12px;
    color: #29604d;
    pointer-events: none;
  }
  .home-pupil-field svg { width: 20px; height: 20px; }
  .home-pupil-field input {
    width: 100%;
    min-height: 44px;
    padding-inline-start: 42px;
    border: 1px solid #a7c5b2;
    border-radius: 9px;
    background: #fffdf4;
    color: #17372f;
  }
  #home-pupil-status,#home-pupil-options { grid-column: 1 / -1; }
  #home-pupil-status { color: #e4f2e7; font-size: .85rem; }
  #home-pupil-status:empty,#home-pupil-options[hidden] { display: none; }
  #home-pupil-options { display: grid; gap: 5px; }
  .home-pupil-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 48px;
    padding: 8px 11px;
    border: 1px solid #b7cbb0;
    border-radius: 8px;
    background: #f6f3e7;
    color: #173d32;
    text-align: start;
    cursor: pointer;
  }
  .home-pupil-option:hover { background: #e3f0e3; }
  .home-pupil-search :focus-visible { outline: 2px solid var(--maroc-gold); outline-offset: 2px; }
  .home-pupil-option :is(b,small) { display: block; overflow-wrap: anywhere; }
  .home-pupil-option small { color: #416456; }
  #pupil-profile-editor { scroll-margin-top: 112px; }
  #main[data-sports-page="accueil"] .sports-dashboard-layout { grid-template-columns: minmax(0,1fr); }
  #main[data-sports-page="accueil"] .sports-dashboard-rail {
    grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr));
    align-items: stretch;
  }
  #main .maroc-daily .card { margin: 0; border-radius: 14px; }
  #main .maroc-daily :is(.sports-agenda,.sports-reminders) {
    background-color: var(--maroc-paper);
    border-color: #c7ad70;
  }
  #main .maroc-daily .sports-panel-head {
    background: linear-gradient(115deg,#f2e2bb,#fbf6e8);
    border-bottom-color: #d9c99e;
  }
  #main .maroc-daily .sports-panel-head > span { background: #e6eddd; color: #245a46; }
  #main .maroc-daily .sports-reminders .sports-panel-head > span { background: #f6eac8; color: #745423; }
  .maroc-hero {
    min-height: 203px;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1.1fr);
    overflow: hidden;
    isolation: isolate;
    border: 1px solid #ab9459;
    border-radius: 18px;
    background: #082e35;
    box-shadow: 0 9px 22px #0018224d;
    color: #fff;
  }
  .maroc-hero-scene .maroc-photo-picture::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,#082e35,transparent 9%);
  }
  .maroc-courtyard-scene {
    display: grid;
    min-width: 0;
    overflow: hidden;
    background: #123c3e;
    pointer-events: none;
  }
  .maroc-photo-picture {
    position: relative;
    overflow: hidden;
    container-type: size;
    aspect-ratio: 2.85 / 1;
  }
  .maroc-hero-scene {
    grid-area: 1 / 2;
    align-self: center;
  }
  .maroc-courtyard-panorama {
    position: absolute;
    top: 50%;
    left: -4%;
    width: 153%;
    aspect-ratio: 1600 / 372;
    transform: translateY(-50%);
    container-type: inline-size;
  }
  .maroc-courtyard-scene img {
    display: block;
    width: 100%;
    height: auto;
  }
  .maroc-field-banner {
    grid-column: 1 / -1;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 0;
    border: 1px solid #b3cbb4;
    border-radius: 14px;
    background: #0a3438;
  }
  .maroc-field-picture { overflow: hidden; container-type: inline-size; }
  .maroc-field-composition { position: relative; }
  @container (max-width: 560px) {
    .maroc-field-composition { width: 150%; margin-left: -4%; }
  }
  .maroc-field-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1600 / 372;
    object-fit: cover;
  }
  .maroc-photo-ink {
    position: absolute;
    min-width: 0;
    visibility: hidden;
    text-align: center;
    font: 750 clamp(9px,2.2cqw,28px)/1.08 "DM Sans","Segoe UI",Arial,sans-serif;
  }
  .maroc-photo-ink[data-photo-fit="ink"] { visibility: visible; }
  .maroc-photo-ink bdi {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    min-width: 0;
    -webkit-text-size-adjust: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
    /* Font sizes are measured synchronously before painting. */
    transition-property: none;
  }
  .maroc-photo-ink bdi:dir(rtl) { line-height: 1.22; }
  .maroc-photo-ink[data-photo-ink="school"] {
    top: 29.7%;
    left: 55%;
    width: 22%;
    height: 19.5%;
    color: #2b271e;
    text-shadow: 0 1px #fff3d157;
    transform: translate(-50%,-50%) rotate(-1.4deg);
  }
  .maroc-photo-ink[data-photo-ink="teacher"] {
    top: 69%;
    left: 12.3%;
    width: 15%;
    height: 18.5%;
    font-size: clamp(10px,1.8cqw,21px);
    font-weight: 850;
    color: #fffdf5;
    text-shadow: 0 1px 2px #081629;
    transform: translate(-50%,-50%) rotate(-2deg);
  }
  .maroc-photo-enseignante .maroc-photo-ink[data-photo-ink="teacher"] {
    top: 73.7%;
    left: 14.8%;
    height: 16.7%;
  }
  .maroc-hero-content {
    grid-area: 1 / 1;
    align-self: center;
    min-width: 0;
    padding: clamp(16px,2.25vw,30px);
  }
  .maroc-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; font-size: .78rem; }
  .maroc-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #c5a75e;
    border-radius: 6px;
    background: #123c3e;
    padding: 5px 8px;
    color: #ffe19a;
    font-weight: 800;
  }
  .maroc-hero-meta svg { width: 14px; height: 14px; }
  .maroc-hero-meta time { color: #e6f7ef; text-transform: capitalize; }
  .maroc-board-ribbon {
    width: fit-content;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 9px 34px 9px 13px;
    border-radius: 5px 0 0 5px;
    clip-path: polygon(0 0,100% 0,calc(100% - 20px) 100%,0 100%);
    background: linear-gradient(175deg,#ffffff22,transparent 55%),var(--maroc-ribbon);
    box-shadow: inset 0 -2px #e6b85c;
    color: #fff;
    font-size: clamp(1.25rem,3vw,2.25rem);
    font-style: italic;
    font-weight: 900;
    line-height: 1.17;
  }
  .maroc-board-ribbon svg { flex: none; width: 1em; height: 1em; color: #ffdfa0; }
  .maroc-hero p { margin: 8px 0 0; color: #e0f4ec; font-weight: 650; overflow-wrap: anywhere; }
  .maroc-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
  .maroc-hero-actions .btn { min-height: 44px; padding: 7px 12px; font-weight: 800; font-size: .86rem; }
  .maroc-hero-actions svg { width: 18px; height: 18px; }
  .maroc-hero-actions .maroc-hero-call { color: #241d12; background: var(--maroc-gold); border-color: #ffdda0; }
  .maroc-hero-actions .maroc-hero-call:hover:not(:disabled) { background: #ffe7ab; }
  .maroc-hero-actions .maroc-hero-link { color: #f6fff9; background: #113e42; border-color: #81ac9b; }
  .maroc-hero-actions .maroc-hero-link:hover { background: #1c564e; }
  .maroc-hero-actions .btn:focus-visible { outline-color: var(--maroc-gold); }
  #main .sports-indicators { margin-block: 10px 14px; }
  #main .maroc-overview .sports-indicators { margin: 10px 0 0; }
  .maroc-overview .sports-indicator,.maroc-home-tools .work-tool {
    --tile-light: #087aba;
    --tile-dark: #043a77;
    --tile-edge: #6acef5;
    color: #fff;
    background:
      repeating-radial-gradient(ellipse at 108% 148%,transparent 0 15px,#ffffff13 16px 17px,transparent 18px 22px),
      linear-gradient(138deg,#ffffff43,transparent 33%),
      linear-gradient(157deg,var(--tile-light),var(--tile-dark) 76%);
    border: 1px solid var(--tile-edge);
    box-shadow: inset 0 1px #ffffff60,inset 0 -2px #00000036,0 4px 11px #00172052;
  }
  .maroc-overview .sports-indicator:nth-child(2),.maroc-home-tools .work-tool:nth-child(5n+3) {
    --tile-light: #0a8c5f;
    --tile-dark: #00503a;
    --tile-edge: #69db9e;
  }
  .maroc-overview .sports-indicator:nth-child(3),.maroc-home-tools .work-tool:nth-child(5n+4) {
    --tile-light: #bd7907;
    --tile-dark: #804100;
    --tile-edge: #ffe091;
  }
  .maroc-overview .sports-indicator:nth-child(4),.maroc-home-tools .work-tool:nth-child(5n+5) {
    --tile-light: #9549c9;
    --tile-dark: #4b2280;
    --tile-edge: #ddb4ff;
  }
  .maroc-home-tools .work-tool:nth-child(5n+2) {
    --tile-light: #b93152;
    --tile-dark: #81132f;
    --tile-edge: #ff97a7;
  }
  .maroc-overview .sports-indicator {
    justify-content: center;
    min-width: 0;
    min-height: 73px;
    padding: 8px;
    border-radius: 11px;
    text-shadow: 0 1px 2px #00141f90;
  }
  .maroc-overview .sports-indicator:is(:hover,:focus-visible) { filter: brightness(1.1); color: #fff; }
  .maroc-overview .sports-indicator:focus-visible,.maroc-home-tools .work-tool:focus-visible { outline-color: var(--maroc-gold); }
  .maroc-overview .sports-indicator > svg { color: #fff; }
  .maroc-overview .sports-indicator > span { display: flex; flex-direction: column-reverse; }
  .maroc-overview .sports-indicator strong { font-variant-numeric: tabular-nums; }
  .maroc-home-tools { margin: 16px 0; min-width: 0; }
  .maroc-home-tools h2 { display: flex; align-items: center; gap: 8px; color: #f8e0a7; font-size: 1.04rem; margin: 0 0 8px; }
  .maroc-home-tools h2 svg { width: 20px; height: 20px; }
  .maroc-home-tools :is(.work-tool-grid,.terrain-tools) {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
    margin: 0;
    padding: 5px;
    border: 1px solid #ded0a5;
    border-radius: 13px;
    background: var(--maroc-paper);
  }
  .maroc-home-tools .terrain-tools { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .maroc-home-tools .work-tool {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 83px;
    padding: 8px;
    border-radius: 10px;
    text-align: center;
    text-shadow: 0 1px 2px #00141fc0;
  }
  .maroc-home-tools .work-tool:hover { filter: brightness(1.12); color: #fff; }
  .maroc-home-tools .work-tool > span:nth-child(2) { flex: none; }
  .maroc-home-tools .work-tool b { font-size: .88rem; }
  .maroc-home-tools .work-tool small { display: none; }
  .maroc-home-tools .work-tool-icon { flex: none; width: 31px; height: 29px; color: #fff; background: transparent; }
  .maroc-home-tools .work-tool-icon svg { width: 26px; height: 26px; }
  .maroc-home-tools .work-tool > span:last-child[aria-hidden="true"] { display: none; }
  #main[data-sports-page="accueil"] > .start-persistent { margin-top: 15px; }

  #main .card { border-color: var(--maroc-border); background-color: var(--maroc-ivory); }
  #main :is(.sports-module-hero,.sports-hero,.terrain-session) {
    border-color: #bea359 !important;
    background-color: #103d3b;
    background-image: linear-gradient(95deg,#06262ef7 12%,#0a4a3ceb 58%,#166f525f),var(--module-art,url("sports-stadium.webp")) !important;
  }
  #main .sports-module-hero h1,#main .sports-hero h1 { color: #fff; }
  #main .sports-module-hero {
    min-height: 0;
    padding: clamp(13px,2vw,21px);
  }
  #main .sports-module-hero .eyebrow { display: none; }
  #main .sports-module-hero p { max-width: 68ch; margin: 4px 0 0; }
  #main .work-page-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block: 0 14px;
  }
  #main .work-directory .work-page-links { margin-bottom: 0; }
  .work-directory h2 { margin-top: 0; }
  #main .work-page-links > .btn { min-height: 44px; white-space: normal; }
  #main :is(#annual-planner,#calendrier-scolaire,#emploi-du-temps) { scroll-margin-top: 104px; }
  .work-disclosure {
    min-width: 0;
    margin: 0 0 14px;
    border: 1px solid #b9ccbc;
    border-radius: 12px;
    background: var(--maroc-paper);
    color: var(--maroc-text);
  }
  .work-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 9px 13px;
    cursor: pointer;
    list-style: none;
    font-weight: 750;
  }
  .work-disclosure > summary::-webkit-details-marker { display: none; }
  .work-disclosure > summary::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  .work-disclosure[open] > summary { border-bottom: 1px solid #c7d4c6; }
  .work-disclosure[open] > summary::after { transform: rotate(225deg); }
  .work-disclosure > summary:focus-visible { outline: 2px solid #927037; outline-offset: 2px; }
  .work-disclosure-body { display: grid; min-width: 0; gap: 10px; padding: 10px; }
  #main .work-disclosure-body > .card { margin: 0 !important; box-shadow: none; }
  #main .work-format-options { margin: 0; }
  .work-format-options .work-disclosure-body { display: flex; flex-wrap: wrap; }
  #main .document-type-field { grid-column: 1 / -1; }
  .document-zoom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    max-width: 1100px;
    margin: 0 auto 8px;
    padding: 6px 10px;
    border: 1px solid var(--maroc-border);
    border-radius: 12px;
    background: var(--maroc-paper);
    color: var(--maroc-text);
    font-weight: 750;
  }
  .document-zoom-controls { display: flex; align-items: center; gap: 5px; }
  #main .document-zoom-controls .btn { min-width: 44px; min-height: 44px; padding: 5px 8px; }
  #main .document-zoom-controls [data-doc-zoom="reset"] { min-width: 68px; font-variant-numeric: tabular-nums; }
  .document-zoom-viewport { min-width: 0; max-width: 100%; overflow: auto; }
  .document-zoom-viewport.doc-preview { max-width: 1100px; }
  .document-zoom-viewport > :is(.document-sheet,.document-snapshot) {
    box-sizing: border-box;
    inline-size: var(--document-preview-width,100%);
    max-inline-size: none;
    margin-inline: auto;
    zoom: var(--document-preview-scale,1);
  }
  .document-zoom-viewport:focus-visible { outline: 2px solid var(--maroc-gold); outline-offset: 2px; }
  #main .sports-module-hero .sports-title-icon { background: #e2f0e7; border-color: #a9d0bd; color: #155d49; }
  #main :is(.sports-module-hero,.terrain-session,.sports-hero) .eyebrow { color: #f6d880; }
  #main .maroc-overview-main > .terrain-session {
    margin: 0;
  }
  #main .maroc-field-overview .terrain-session {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 170px;
    background: #103f42 !important;
  }
  .maroc-slot-photo {
    position: absolute;
    z-index: -2;
    inset: 0 0 0 auto;
    width: 68%;
    height: 100%;
    object-fit: cover;
    object-position: 72% 42%;
  }
  .maroc-field-overview .terrain-session::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg,#082f36 25%,#0b353be8 43%,#0a363b61 68%,#07343512 100%),
      linear-gradient(0deg,#092e35aa,transparent 60%);
  }
  #main #maroc-slot-title {
    display: inline-block;
    margin: 0 0 7px;
    padding: 4px 8px;
    border: 1px solid #c5a45d;
    border-radius: 5px;
    background: #0b3739;
    color: #f7dc97;
    font-size: .77rem;
    font-weight: 800;
    letter-spacing: .035em;
  }
  .maroc-overview-main .terrain-session h2 {
    margin: 0 0 6px;
    font-size: clamp(1.45rem,3.8vw,2.1rem);
    line-height: 1.18;
  }
  .maroc-overview-main .terrain-session :is(h2,p) {
    max-width: min(100%,35rem);
    overflow-wrap: anywhere;
    text-shadow: 0 1px 5px #001c2499;
  }
  #main .maroc-field-overview .terrain-session { padding: clamp(14px,2.6vw,22px) !important; }
  .maroc-field-overview .terrain-session .terrain-hour {
    margin: 0 0 4px;
    font-size: clamp(1.55rem,4.4vw,2.22rem);
  }
  .maroc-field-overview .terrain-session p { margin: 4px 0 0; }
  .maroc-field-overview .terrain-session .terrain-lesson { margin-top: 10px; padding-top: 9px; }
  .maroc-field-overview .terrain-session-actions { gap: 8px; margin-top: 12px; }
  .maroc-field-overview .terrain-session-actions .btn { min-height: 44px; padding: 8px 14px; }
  #main .home-weekly {
    background: var(--maroc-paper);
    border-color: #c6ac71;
    border-top-width: 1px;
  }
  .home-weekly-head {
    justify-content: flex-start;
    margin: -1px 0 12px;
    padding: 10px 12px;
    border: 1px solid #89b89d;
    border-radius: 11px;
    background: linear-gradient(135deg,#073b45,#0a7156);
    color: #fff;
  }
  .home-weekly-head h2 { color: #fff; font-size: clamp(1rem,2.05vw,1.28rem); }
  .home-weekly-head .home-weekly-count {
    margin-inline-start: auto;
    padding: 4px 8px;
    border-radius: 7px;
    color: #ffe6a5;
    background: #083b39;
  }
  .home-weekly-icon { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #3a3022; background: var(--maroc-gold); }
  .home-weekly-icon svg { width: 19px; height: 19px; }
  .home-weekly-grid { border-color: #b8cdb9; }
  .home-weekly-grid th,.home-weekly-grid td { border-color: #cfddcd; }
  .home-weekly-grid thead th { background: linear-gradient(#1d6554,#0b4840); }
  .home-weekly-grid tbody th,.home-weekly-grid tbody td { background: #fffcf2; color: #1b523f; }
  .home-weekly-grid tbody th small { color: #4c685b; }
  .home-weekly-grid .home-weekly-break th,.home-weekly-grid .home-weekly-break td { background: #f1e5c7; color: #654d2e; }
  .home-weekly-grid .home-weekly-course {
    padding: 4px;
    color: #154b3a;
    background: #dceedd;
    border-inline-start: 3px solid #278767;
  }
  .home-weekly-grid .home-weekly-afternoon .home-weekly-course { background: #f7e9c7; border-inline-start-color: #ae741d; color: #624913; }
  .home-weekly-grid .home-weekly-free { color: #859d8f; }
  #main .home-weekly .home-weekly-footer .btn {
    justify-content: center;
    min-height: 44px;
    background: linear-gradient(140deg,#167458,#0a533f);
    border-color: #0b5843;
    color: #fff;
  }
  #main :is(.page-head:not(.sports-module-hero),.work-extra,.section-title) :is(h1,h2,p,a,.eyebrow,.muted) { color: #effbf2; }
  #main .sports-section-title,#main .sports-section-title svg { color: #f7df9f; }
  #main :is(.terrain-week>summary,.work-save-status) { color: #e5f6ed; }
  #main .work-save-status:is([data-state="draft"],[data-state="error"],[data-state="conflict"]) { color: #ffe19c; }
  #main .sports-panel-head { background: linear-gradient(120deg,#e9f3e9,#f9f7eb); border-bottom-color: #d0ded0; }
  #main :is(.sports-panel-link,.sports-reminder-actions a,.sports-agenda li span) { color: #165d48; }
  #main .sports-panel-head .ui-icon { color: #1c6d53; }
  #main .sports-reminders .sports-panel-head > span { background: #f6eac8; color: #745423; }
  #main :is(.table-wrap,.weekly-panel) table thead th { color: #fff; background: linear-gradient(180deg,#176552,#0c473c); }
  #main .table-wrap tbody tr:nth-child(even) { background-color: #eef4eb; }
  #main .btn.primary { border-color: #0f7457; background: linear-gradient(145deg,#16825e,#0d644d); color: #fff; }
  #main .btn.primary:hover:not(:disabled) { background: #0b5c46; }
  #main .btn.soft { border-color: #abd3c3; background: #e1f0e8; color: #14523f; }
  #main .btn.success { background: #087252; color: #fff; }
  #main .terrain-session .btn.success { background: var(--maroc-gold); color: #292511; border-color: #f7d58d; }
  #main .segmented button.active { background: #12614d; color: #fff; }

  #main :is(.card,.table-wrap,.document-sheet) { color: var(--maroc-text); }
  #main :is(.card:not(.runner,.run-clock,.feature-card) h2,.card:not(.runner,.run-clock,.feature-card) h3,.document-sheet h2,.document-sheet h3) { color: var(--maroc-text); }
  #main :is(.card .muted,.table-wrap small,.document-sheet header p) { color: var(--maroc-ink-soft); }
  #main :is(.card,.grid,.field) { min-width: 0; }
  #main :is(.field,.filterbar,.filters,.form-grid) label { color: var(--maroc-ink-soft); }
  #main :is(.card,.schedule-dialog,.form-grid) :is(input:not([type=checkbox],[type=radio],[type=range],[type=file]),select,textarea):not(.quick-attendance-dialog *) {
    border-color: #a9c5b5;
    background-color: var(--maroc-paper-white);
    color: var(--maroc-text);
    max-width: 100%;
  }
  #main :is(input[type=radio],input[type=checkbox],input[type=range]) { accent-color: #137455; }
  #main :is(.card,.schedule-dialog,.form-grid,.search-panel) :is(a,button,input,select,textarea,summary):focus-visible {
    outline: 2px solid #927037;
    outline-offset: 2px;
  }
  #main .btn.ghost {
    color: #164b3d;
    background-color: var(--maroc-paper-white);
    border-color: #b9cbbd;
  }
  #main .btn.ghost:hover:not(:disabled) { background-color: #e6f1e6; }
  #main :is(.notice:not(.warn,.ok,.error),.pill:not(.green,.orange,.purple,.red,.danger)) {
    border-color: #b7cfbc;
    background-color: #e3efe5;
    color: #174e3d;
  }
  #main .notice.warn { border-color: #d8bc7d; background: var(--maroc-paper-gold); color: #6e4714; }
  #main .notice.ok { border-color: #b1d2bb; background: #e4f4e9; color: #15513c; }
  #main :is(.table-wrap,.weekly-table-wrap,.document-table) { border-color: #c4d4c4; }
  #main :is(.table-wrap,.weekly-grid,.document-sheet,table.home-weekly-grid) th a { color: inherit; }
  #main :is(.card,.search-panel) :is(.search-result,.list-row,.weekly-course,.sports-cycle-tile) {
    border-color: #bdcfbf;
  }
  #main .search-result { color: #194c3e; background: #fffdf4; }
  #main .search-result small { color: var(--maroc-ink-soft); }
  #main .search-result:is(:hover,:focus-visible) { background: var(--maroc-paper-green); border-color: #8db39c; }
  #main :is(.document-picker,.tabs,.segmented) button:not(.active,[aria-selected=true],[aria-pressed=true]) {
    border-color: #b8caba;
    background-color: var(--maroc-paper-white);
    color: #1f4d40;
  }
  #main :is(.document-picker,.tabs,.segmented) button:is(.active,[aria-selected=true],[aria-pressed=true]) {
    border-color: #0c624b;
    background: #12614d;
    color: #fff;
  }
  #main .document-sheet { background: #fff; border-color: #c6d5c7; }
  #main .document-sheet > header,#main .document-sheet > footer { border-color: #b39657; }
  #main .document-sheet th { color: #fff; background: #145d46; }
  #main .document-sheet :is(th,td) { border-color: #b7cbbd; }
  #main .document-sheet tbody tr:nth-child(even) { background-color: #faf5e7; }
  #main :is(.segmented,.cycle-workflow,.physical-chart-switch,.start-record,.progress,.pupil-avatar,.account-details > div) {
    background-color: var(--maroc-paper-green);
    border-color: #bdd3c3;
  }
  #main :is(.annual-semesters,.sports-cycle-tile,.run-pyramid-figure,.physical-quality-conclusion) {
    background-color: var(--maroc-paper-white);
    border-color: #bdd3c3;
  }
  #main :is(.sports-cycle-selected,.start-list-step.selected,.run-modes button.active,.run-method-cards button[aria-pressed=true]) {
    background-color: var(--maroc-paper-green);
    border-color: #72a88d;
    box-shadow: 0 0 0 2px #12725512;
  }
  #main :is(.account-details dt,.test-progress summary,.run-roster summary,.run-observation-group > summary,.run-observation-pupil > summary) {
    color: var(--maroc-text);
  }
  #main .lesson-log-preview { background-color: #e7efe7; }
  #main .btn.soft:is(.page-hero *,.sports-page-hero *) {
    border-color: #afd1c0;
    background-color: var(--maroc-paper-green);
    color: #14523f;
  }
  #main :is(.run-modes,.run-method-cards) button:not(.active,[aria-pressed=true]) {
    border-color: #b4cbb9;
    background-color: var(--maroc-paper-white);
    color: var(--maroc-text);
  }
  #main :is(.run-modes,.run-method-cards) button:not(.active,[aria-pressed=true]):hover {
    border-color: #72a88d;
    background-color: #edf4eb;
  }
  #main .run-modes button.active { color: #164b3d; }
  #main :is(.run-summary,.run-fundamental-metrics > div) {
    background-color: var(--maroc-paper-green);
    border-color: #bdd3c3;
    color: var(--maroc-text);
  }
  #main .run-summary :is(b,span) { color: var(--maroc-text); }
  #main .run-pyramid li > span { background: linear-gradient(#178264,#104f42); }
  #main .run-pyramid li.is-peak > span {
    background: linear-gradient(#e0b65b,#f4cc69);
    color: #3d290c;
  }
  :is(.schedule-dialog,.audit-dialog,.curriculum-dialog,.pupil-camera-dialog) {
    color: var(--maroc-text);
    border-color: #b99d6d;
    background: var(--maroc-paper);
  }
  :is(.schedule-dialog,.audit-dialog,.curriculum-dialog,.pupil-camera-dialog)::backdrop { background: #041e25b3; }
  :is(.audit-dialog .form-actions,.curriculum-dialog footer) {
    background: var(--maroc-paper);
    border-top: 1px solid #c7d7c8;
  }
  .curriculum-dialog > p { color: var(--maroc-ink-soft); }
  :is(.curriculum-dialog,.pupil-camera-dialog) .btn.ghost {
    color: #164b3d;
    background: var(--maroc-paper-white);
    border-color: #b9cbbd;
  }
  #main .schedule-editor-head {
    background: linear-gradient(115deg,#082d34,#14614e);
    padding: 12px;
    border-radius: 10px;
    border-bottom: 2px solid #c7aa60;
    color: #fff;
  }
  #main .schedule-dialog .schedule-editor-head h2 { color: #fff; }
  #main .schedule-dialog .schedule-editor-head .eyebrow { color: #f7d886; }
  #main :is(.runner,.run-clock).card {
    color: #f1fbf6;
    background: linear-gradient(135deg,#082f36,#125848);
    border-color: #7da797;
  }
  #main :is(.runner,.run-clock) :is(h2,h3,.field label,.muted) { color: #eef9f2; }
  #main :is(.runner,.run-clock) .eyebrow { color: #fae1a6; }
  #main :is(.terrain-fold,.run-sequence,.run-load-components > div) {
    background-color: var(--maroc-ivory);
    border-color: #b5cab9;
    color: var(--maroc-text);
  }
  #main :is(.terrain-fold > summary,.run-sequence h3,.run-sequence h4) { color: var(--maroc-text); }
  html:has(.quick-attendance-dialog[open]) { overflow: hidden; }
  .quick-attendance-dialog {
    --attendance-border: #c4cfb8;
    max-width: calc(100% - 14px);
    min-width: 0;
    background: #0b363a;
    border-color: #bc9c5d;
    color: var(--maroc-text);
    box-shadow: 0 20px 65px #00141780;
  }
  .quick-attendance-dialog::backdrop { background: #051c22bc; }
  .quick-attendance-dialog :is(form,.quick-attendance-body,.quick-attendance-footer) { min-width: 0; }
  .quick-attendance-dialog .quick-attendance-head {
    border-color: var(--maroc-gold);
    background: linear-gradient(115deg,#082e34,#14634f 66%,#642238);
  }
  .quick-attendance-dialog .quick-attendance-head-icon { background: var(--maroc-gold); color: #25362b; }
  .quick-attendance-dialog .quick-attendance-head [data-quick-attendance-close] {
    background: #123d3b;
    border-color: #7fae96;
    color: #fff;
  }
  .quick-attendance-dialog .quick-attendance-head [data-quick-attendance-close]:hover { background: #20594d; }
  .quick-attendance-dialog .quick-attendance-body {
    background:
      repeating-linear-gradient(135deg,transparent 0 30px,#c2a56a10 30px 31px),
      linear-gradient(154deg,#114441,#0a2c35);
    scrollbar-color: #73a68e #10383a;
  }
  .quick-attendance-dialog .quick-attendance-body:focus-visible { outline-color: var(--maroc-gold); }
  .quick-attendance-dialog :is(.quick-attendance-context,.quick-attendance-outcome,.quick-attendance-history) {
    background: var(--maroc-paper);
    border-color: #c4ac74;
  }
  .quick-attendance-dialog :is(.quick-attendance-fields,.quick-attendance-outcome) label.field,
  .quick-attendance-dialog :is(.quick-attendance-fields,.quick-attendance-outcome) .field > label { color: var(--maroc-text); }
  .quick-attendance-dialog :is(.quick-attendance-fields,.quick-attendance-outcome) :is(select,input:not([type="radio"]),textarea) {
    max-width: 100%;
    background-color: #f9fcf4;
    border-color: #a7c6b3;
    color: #12362d;
  }
  .quick-attendance-dialog :is(.quick-attendance-slot,.quick-attendance-roster-head) {
    background: var(--maroc-paper-green);
    border-color: #a7c6b3;
  }
  .quick-attendance-dialog :is(.quick-attendance-slot svg,.quick-attendance-roster-head svg) { color: #12614a; }
  .quick-attendance-dialog :is(.quick-attendance-slot span,.quick-attendance-slot small,.quick-attendance-help,.quick-attendance-outcome small,.quick-attendance-legacy,.quick-attendance-recent span) { color: var(--maroc-ink-soft); }
  .quick-attendance-dialog .quick-attendance-outcome legend {
    padding: 2px 9px;
    border-radius: 5px;
    background: #254a3e;
    color: #ffe4a3;
    max-width: 100%;
  }
  .quick-attendance-dialog .quick-attendance-outcome .quick-attendance-choice { background: #fffcf2; }
  .quick-attendance-dialog .quick-attendance-outcome .quick-attendance-choice:has(input:checked) { background: var(--choice-background); }
  .quick-attendance-dialog .quick-attendance-roster-head .pill { background: #f7f4e9; color: #355849; }
  .quick-attendance-dialog .quick-attendance-roster-head .pill.green { background: #c8e8d2; color: #13523d; }
  .quick-attendance-dialog .quick-attendance-roster-head .pill.attendance-count-absent { background: #f8dfe4; color: #90213c; }
  .quick-attendance-dialog .quick-attendance-roster-head .pill.orange { background: #f9e8bb; color: #704810; }
  .quick-attendance-dialog .quick-attendance-pupil { min-width: 0; background: #fbf8ed; border-inline-start-color: #478b6d; }
  .quick-attendance-dialog .quick-attendance-pupil:nth-child(even) { background: #f0f6e9; }
  .quick-attendance-dialog .quick-attendance-pupil.is-absent { background: #faedf0; border-color: #e1a3b0; border-inline-start-color: #a92142; }
  .quick-attendance-dialog .quick-attendance-recent { color: var(--maroc-text); }
  .quick-attendance-dialog .quick-attendance-statuses {
    grid-template-columns: repeat(6,minmax(0,1fr));
    gap: clamp(3px,.8vw,7px);
  }
  .quick-attendance-statuses .quick-attendance-choice {
    position: relative;
    min-height: 44px;
    padding: 0;
    border-color: #b7cdbd;
    border-radius: 8px;
    background: #f4f7ee;
    font-size: .96rem;
    font-weight: 850;
    line-height: 1;
  }
  .quick-attendance-statuses .quick-attendance-choice input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }
  .quick-attendance-statuses .quick-attendance-choice span { pointer-events: none; }
  .quick-attendance-statuses .quick-attendance-choice:hover { border-color: var(--choice-color); background: var(--choice-background); }
  .quick-attendance-statuses .quick-attendance-choice:has(input:checked) {
    background: var(--choice-color);
    border-color: var(--choice-color);
    color: white;
    box-shadow: inset 0 0 0 2px #ffffff6b;
  }
  .quick-attendance-statuses .quick-attendance-choice:has(input:focus-visible) {
    outline: 2px solid #153732;
    outline-offset: 2px;
  }
  .quick-attendance-statuses .status-no_kit { --choice-color: #165d9b; --choice-background: #e4f1ff; }
  .quick-attendance-statuses .status-exempt { --choice-color: #78531c; --choice-background: #faedcc; }
  .quick-attendance-statuses .status-other { --choice-color: #076970; --choice-background: #e1f6f4; }
  .quick-attendance-dialog .quick-attendance-footer {
    background: linear-gradient(110deg,#0a3036,#115044);
    border-top-color: #c8ab66;
    box-shadow: 0 -5px 15px #061c2466;
  }
  .quick-attendance-dialog .quick-attendance-footer p { color: #e7f2e6; }
  .quick-attendance-dialog .quick-attendance-footer .form-actions { flex-wrap: wrap; }
  #quick-attendance-dialog .quick-attendance-footer .btn {
    border-color: #7cae98;
    color: #fff;
    background: #184940;
    white-space: normal;
  }
  #quick-attendance-dialog .quick-attendance-footer .btn:hover:not(:disabled) { background: #246254; }
  #quick-attendance-dialog .quick-attendance-footer .btn.success {
    border-color: #ffe0a1;
    color: #272414;
    background: var(--maroc-gold);
  }
  #quick-attendance-dialog .quick-attendance-footer .btn.success:hover:not(:disabled) { background: #ffe09a; }
  .quick-attendance-dialog :is(.quick-attendance-footer .btn,.quick-attendance-head button):focus-visible { outline-color: var(--maroc-gold); }
  #mobile-nav { background: linear-gradient(145deg,#174954,#051a24); border-top: 1px solid #79ad9f; border-radius: 13px 13px 0 0; }
  #mobile-nav :is(a,.work-nav-action),#mobile-nav :is(a,.work-nav-action) .nav-ico { color: #f3fff9; }
  #mobile-nav a.active { border: 1px solid #ff967e; color: #fff; background: linear-gradient(155deg,#ea4151,#a81631); }
  #mobile-nav a.active .nav-ico { color: #fff; }
  #mobile-nav :is(a,.work-nav-action):focus-visible { outline: 2px solid var(--maroc-gold); outline-offset: -2px; }
  .sports-entry-footer { background: linear-gradient(105deg,#072d33,#0c5947); }
  .work-entry.sports-entry-frame { border-color: #9c9a65; background: #0a3438; }
  .sports-choices-content {
    color: #f4faf3;
    background: radial-gradient(ellipse at 90% 0,#17654e85,transparent 65%),#0a3438;
  }
  .sports-choices-content h1 { color: #f7faf3; }
  .sports-choices-content .work-entry-intro h1 {
    padding-inline-start: 10px;
    border-inline-start: 3px solid var(--maroc-gold);
  }
  .sports-choices-content .work-mode-card.terrain {
    isolation: isolate;
    border-color: #c0a15e;
    background: linear-gradient(100deg,#063439,#0c5948b8),url("maroc-cour-personnalisable.webp") 53% center / cover;
  }
  .sports-choices-content .work-mode-card.terrain:has(.maroc-chooser-scene) {
    --choice-pad: clamp(15px,2.5vw,24px);
    padding: var(--choice-pad);
    overflow: hidden;
    background: linear-gradient(140deg,#123e3d,#0a3037);
  }
  .maroc-chooser-scene {
    grid-column: 1 / -1;
    margin: calc(-1 * var(--choice-pad)) calc(-1 * var(--choice-pad)) 3px;
    border-block-end: 1px solid #c0a15e70;
  }
  .maroc-chooser-scene .maroc-photo-picture::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,#0a303950,transparent 42%);
  }
  .sports-choices-content .work-mode-card.preparation {
    color: #183b32;
    border-color: #c5ad74;
    background: linear-gradient(150deg,#fbf8eb,#edf3e6);
    box-shadow: 0 7px 16px #031d2340;
  }
  .sports-choices-content .preparation .work-mode-icon { color: #175d49; background: #dceee1; }
  .sports-choices-content .preparation .work-mode-description { color: #3a5b50; }
  .sports-choices-content .work-entry-footer { color: #d4e9df; }
  .sports-choices-content .offline-entry-readiness {
    background: #153e40;
    color: #e5f4eb;
    border-color: #799d89;
  }
  .sports-choices-content .offline-entry-readiness p { color: #e5f4eb; }
  .sports-choices-content .work-mode-card:focus-visible { outline-color: var(--maroc-gold); }
  .sports-entry-page {
    font-family: "DM Sans","Segoe UI",Arial,sans-serif;
    line-height: 1.5;
  }
  .sports-entry-page .sports-entry-frame {
    background: #0c373a;
    border-color: #b9a06a;
    box-shadow: 0 15px 44px #041b2480;
  }
  .sports-offline-grid .sports-entry-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    justify-content: flex-end;
    min-height: 330px;
    background: #0c353b;
  }
  .maroc-offline-scene {
    margin: calc(-1 * var(--photo-entry-block)) calc(-1 * var(--photo-entry-inline)) 17px;
    border-block-end: 1px solid #c0a15e70;
  }
  .sports-offline-grid .sports-entry-hero:has(.maroc-offline-scene) {
    --photo-entry-block: clamp(23px,5vw,57px);
    --photo-entry-inline: var(--photo-entry-block);
    padding: var(--photo-entry-block) var(--photo-entry-inline);
    justify-content: flex-start;
  }
  .maroc-offline-scene .maroc-photo-picture::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,#0a303860,transparent 45%);
  }
  .sports-offline-grid .sports-entry-kicker {
    align-self: flex-start;
    padding: 4px 9px;
    border: 1px solid #d4b773;
    border-radius: 5px;
    background: #133f41;
    color: #ffe2a0;
  }
  .sports-offline-panel {
    background: var(--maroc-paper);
    border-inline-start: 1px solid #cab074;
    color: var(--maroc-text);
  }
  .sports-offline-panel h2 {
    padding-inline-start: 10px;
    border-inline-start: 3px solid #a9822d;
    line-height: 1.24;
    font-size: clamp(1.22rem,2.5vw,1.6rem);
    letter-spacing: -.025em;
  }
  .sports-offline-panel .sports-offline-status {
    margin: 0 0 12px;
    background: #e1eee5;
    border-color: #a9cbb8;
    color: #184f3e;
  }
  .sports-offline-panel .sports-offline-status[data-state="setup"] {
    background: #f7ebcb;
    border-color: #d4b46d;
    color: #644416;
  }
  .sports-offline-panel .sports-offline-status[data-state="error"] {
    background: #fae8e9;
    border-color: #dfadb4;
    color: #831c36;
  }
  .sports-offline-panel :is(.offline-entry-help,.offline-entry-date) { color: #34594b; }
  .sports-offline-panel .offline-entry-form input {
    border-color: #9dbfa9;
    color: #17372f;
    background: #fffdf6;
  }
  .sports-offline-panel .auth-submit,.sports-choices-content .work-mode-enter { background: #11664e; }
  .sports-offline-panel .auth-submit { background: linear-gradient(145deg,#14775b,#0b5a45); }
  .sports-offline-panel .auth-submit:hover { background: #0a503e; }
  .sports-offline-panel .sports-online-link {
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    padding: 6px 12px;
    border: 1px solid #93b6a3;
    border-radius: 9px;
    background: #f9fcf2;
    color: #174f3f;
    text-align: center;
  }
  .sports-offline-panel .sports-online-link:hover { background: #e3efe5; text-decoration: none; }
  .sports-offline-panel :focus-visible { outline-color: #9c7025; }
  .sports-entry-page .sports-online-panel { background: var(--maroc-paper); }
  .sports-online-panel :is(.auth-lead,.auth-small,.auth-switch,.auth-bottom) { color: var(--maroc-ink-soft); }
  .sports-online-panel :is(.auth-form-wrap a,.auth-password button) { color: #175c48; }
  .sports-online-panel .auth-field :is(input,select) { border-color: #a9c5b5; background-color: var(--maroc-paper-white); }
  .sports-online-panel .auth-message.pending { border-color: #bed1bf; background: #e4efe5; color: #184b3e; }
  .sports-offline-grid .sports-entry-hero:has(#auth-hero-title) {
    background: linear-gradient(0deg,#092e37 2%,#0c383d70 90%),url("maroc-cour-personnalisable.webp") 56% center / cover;
  }
  .sports-choices-content .terrain .work-mode-enter { background: var(--maroc-gold); }
  .sports-entry-page,.work-entry-stage,html[data-work-mode="choose"] #main { background: linear-gradient(145deg,#094940,#052c36); }
}
@media screen {
  @container eps-workspace (max-width: 1050px) {
    .workspace .topbar .top-meta :is(.top-search > span,.top-search > kbd,#school-year,.sync-badge) { display: none; }
    .workspace .topbar .top-meta :is(.top-search,.top-alert,#eps-context-help,.profile-badge) { flex: 0 0 44px; min-width: 44px; padding-inline: 0; }
  }
  @container eps-workspace (max-width: 820px) {
    .workspace .topbar .breadcrumb { display: block; }
    .workspace .topbar :is(.header-logo,.maroc-teacher-name) { display: none; }
    .workspace .topbar .top-meta :is(.top-alert,#eps-context-help,.profile-badge) { display: none; }
    .topbar-more { display: inline-flex; }
    .topbar-commands:not([hidden]) { display: grid; }
    .workspace .topbar .work-mode-switch { min-height: 44px; }
  }
  @container eps-workspace (max-width: 480px) {
    .workspace .topbar .work-back span { display: none; }
    .workspace .topbar #page-crumb { font-size: .95rem; }
  }
  @container eps-workspace (max-width: 450px) {
    .workspace .topbar .work-mode-switch { display: none; }
    .topbar-commands .compact-mode-command { display: flex; }
  }
  @container eps-workspace (max-width: 360px) {
    .workspace .topbar .top-search { display: none; }
    .topbar-commands .compact-search-command { display: flex; }
  }
}
@media print {
  .document-zoom-bar { display: none !important; }
  @page epsDocument { size: A4 portrait; margin: 12mm; }
  #doc-preview > .document-sheet:not(.session-sheet-document,.lesson-log-document) { page: epsDocument; }
  html:has(#doc-preview .document-sheet),
  body:has(#doc-preview .document-sheet),
  body:has(#doc-preview .document-sheet) :is(.app-shell,.workspace,#main) {
    background: #fff !important;
  }
  #main:has(> #doc-preview .document-sheet) > :not(#doc-preview) { display: none !important; }
  .document-sheet :is(h2,h3,header span) { color: #145d46; }
  .document-sheet :is(th,td) { border-color: #b7cbbd; }
  .document-sheet thead th { color: #17372f; background-color: #e4efe5; }
  .document-sheet tbody tr:nth-child(even) { background-color: #faf5e7; }
  .document-sheet :is(th,.session-sheet-stage) {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .document-sheet > header,.document-sheet > footer { border-color: #b39657; }
}
@media screen and (max-width: 650px) {
  .workspace .sports-masthead,.sports-entry-frame .sports-masthead {
    --masthead-flag-width: clamp(46px,15vw,94px);
    grid-template-columns: minmax(0,.85fr) minmax(0,1.4fr);
    gap: clamp(5px,1.5vw,10px);
    min-height: clamp(62px,13vw,83px);
    padding-inline-start: clamp(7px,2vw,13px);
  }
  .maroc-wordmark { gap: clamp(4px,1.25vw,8px); }
  .maroc-wordmark > img { width: clamp(24px,7.3vw,41px); }
  .maroc-wordmark b { font-size: clamp(.86rem,4.15vw,1.55rem); white-space: normal; }
  .maroc-wordmark b small { display: inline-block; }
  .maroc-wordmark > span > small { font-size: clamp(.57rem,2.15vw,.7rem); }
  .maroc-wordmark-prefix { display: none; }
  .maroc-wordmark-discipline { display: block; }
  .maroc-wordmark-discipline::first-letter { text-transform: uppercase; }
  .sports-ministry { gap: clamp(4px,1.45vw,9px); padding-inline-end: var(--masthead-flag-width); }
  .sports-ministry-crest { width: clamp(26px,8vw,43px); }
  .sports-ministry-copy {
    min-width: 0;
    max-inline-size: none;
    gap: 2px;
    font-size: clamp(.625rem,2.55vw,.76rem);
    line-height: 1.18;
    overflow-wrap: anywhere;
  }
  .sports-ministry-copy strong { font-size: clamp(.66rem,2.65vw,.82rem); }
  .sports-ministry-flag {
    --masthead-fabric-height: calc(var(--masthead-flag-width) * .87);
    width: var(--masthead-flag-width);
    aspect-ratio: auto;
    background: linear-gradient(90deg,transparent,#741d2c);
  }
  .sports-ministry-flag::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    height: var(--masthead-fabric-height);
    transform: translateY(-50%);
    background: url("maroc-banniere-reference.jpg") right calc(var(--masthead-fabric-height) * -.45) center / auto 100% no-repeat;
    -webkit-mask-image: linear-gradient(0deg,transparent,#000 14% 86%,transparent);
    mask-image: linear-gradient(0deg,transparent,#000 14% 86%,transparent);
  }
  .sports-offline-grid .sports-entry-hero { min-height: 256px; }
  .sports-offline-panel { border-inline-start: 0; border-top: 1px solid #cab074; }
}
@media screen and (max-width: 345px) {
  .maroc-wordmark b small { display: none; }
}
@media screen and (max-width: 319px) {
  .sports-choices-content > .work-back { margin-bottom: 8px; }
}
@media screen and (max-width: 800px) {
  #mobile-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; padding-inline: 4px; }
  #mobile-nav :is(a,.work-nav-action) { padding-inline: 1px; min-width: 0; }
  #mobile-nav :is(a,.work-nav-action) .nav-ico + span { white-space: nowrap; font-size: clamp(.64rem,2.1vw,.78rem); }
  #mobile-nav .nav-ico svg { width: 20px; height: 20px; }
  .home-weekly .home-weekly-grid,.home-weekly .home-weekly-extra { display: none; }
  .home-weekly .home-weekly-agenda { display: block; }
  .home-weekly-days {
    display: grid;
    grid-template-columns: repeat(7,minmax(0,1fr));
    gap: clamp(3px,.9vw,7px);
    margin-block: 12px;
  }
  .home-weekly-days button {
    display: grid;
    place-items: center;
    gap: 4px;
    min-width: 0;
    min-height: 54px;
    padding: 5px 0;
    border: 1px solid #c0d1c0;
    border-radius: 9px;
    background: #fdfbf1;
    color: #164c3f;
    cursor: pointer;
  }
  .home-weekly-days button abbr { font-size: clamp(.62rem,1.7vw,.8rem); text-decoration: none; }
  .home-weekly-days button strong { font-size: .97rem; line-height: 1; }
  .home-weekly-days button[aria-pressed="true"] {
    border-color: #e48d81;
    color: #fff;
    background: linear-gradient(140deg,#b02a45,#8e1530);
  }
  .home-weekly-agenda h3 { margin: 0 0 7px; color: #173c34; font-size: 1rem; }
  .home-weekly-sessions { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
  .home-weekly-sessions li,.home-weekly-empty {
    margin: 0;
    padding: 9px;
    border: 1px solid #c6d8c8;
    border-radius: 10px;
    background: #fffdf4;
    color: #264e41;
  }
  .home-weekly-sessions li { display: flex; align-items: center; gap: 9px; }
  .home-weekly-sessions li > span { flex: none; padding: 4px 6px; border-radius: 6px; background: #dcefe3; color: #134e39; font-size: .76rem; font-weight: 800; font-variant-numeric: tabular-nums; }
  .home-weekly-sessions :is(b,small) { display: block; overflow-wrap: anywhere; }
}
@media screen and (min-width: 801px) and (max-width: 1180px) {
  .maroc-sidebar-zellige { min-height: 35px; gap: 3px; }
  .maroc-sidebar-zellige i { width: 8px; }
  .maroc-sidebar-zellige i:nth-child(2) { width: 17px; }
}
@media screen and (max-width: 560px) {
  .home-pupil-search { grid-template-columns: minmax(0,1fr); }
  .home-weekly-head { padding: 8px; gap: 6px; }
  .home-weekly-icon { width: 26px; height: 26px; }
  .home-weekly-icon svg { width: 15px; height: 15px; }
  .home-weekly-head .home-weekly-count { padding-inline: 4px; }
  .maroc-overview { gap: 10px; }
  .maroc-hero { grid-template-columns: minmax(0,1fr); border-radius: 14px; min-height: 0; }
  .maroc-hero-scene { grid-area: 1 / 1; }
  .maroc-hero-scene .maroc-photo-picture::after { display: none; }
  .sports-offline-grid .sports-entry-hero:has(.maroc-offline-scene) { --photo-entry-block: 23px; --photo-entry-inline: 17px; }
  .maroc-hero-content { grid-area: 2 / 1; padding: 13px; }
  .maroc-slot-photo { width: 100%; }
  .maroc-field-overview .terrain-session::before {
    background: linear-gradient(90deg,#082f36f5,#083538a8 80%),linear-gradient(0deg,#092e35,transparent);
  }
  .maroc-hero p { margin-top: 5px; font-size: .86rem; }
  .maroc-hero-actions { margin-top: 12px; }
  .maroc-hero-actions .btn { min-height: 44px; padding-inline: 8px; font-size: .81rem; }
  .maroc-overview .sports-indicator { min-height: 66px; }
  .maroc-daily { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .maroc-home-tools :is(.terrain-tools,.work-tool-grid) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.document-batch-dialog {
  width: min(560px, calc(100% - 24px));
}
.document-batch-dialog > header h2 { margin: 0; }
.document-batch-choices { display: grid; gap: 8px; }
.document-batch-choices .btn {
  display: grid;
  justify-items: start;
  gap: 2px;
  width: 100%;
  padding: 10px 14px;
  text-align: start;
  white-space: normal;
}
.document-batch-choices small { font-weight: 500; }
.document-batch-progress { width: 100%; margin-top: 16px; accent-color: #126347; }
.document-batch-dialog [role="status"]:empty { display: none; }
.document-batch-dialog footer { align-items: center; }
.document-batch-dialog footer [hidden] { display: none; }

.document-batch-choices { margin-top: 16px; }
.document-batch-choice { display: grid; gap: 6px; min-width: 0; }
.document-batch-fields { display: grid; gap: 4px; padding: 2px 0; }
.document-batch-fields label { font-weight: 650; font-size: .88rem; }
.document-batch-fields select { width: 100%; min-width: 0; }
