/* Styles propres à l’outil de création de plan. */
@import url("/assets/css/palette.css?v=20260717-1");

:root {
  --room: #fdfcf8;
  --seat: var(--color-surface);
  --seat-hover: #eaf2ff;
  --placed: #eef1f4;
  --male-bg: #e8f2ff;
  --male-border: #70a5df;
  --male-text: #244f7f;
  --female-bg: #fdebf3;
  --female-border: #df88ad;
  --female-text: #7d3151;
  --neutral-bg: #f2f4f7;
  --neutral-border: #9aa4b2;
  --aesh-bg: #d9dde3;
  --aesh-border: #7d8794;
}
* { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--text);
      background: var(--bg);
      overflow: hidden;
    }

    button, input { font: inherit; }

    button {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      padding: 9px 12px;
      cursor: pointer;
      font-weight: 650;
    }

    button:hover { background: #f7f9fc; }

    button.primary {
      color: #fff;
      background: var(--primary);
      border-color: var(--primary);
    }

    button.primary:hover { background: var(--primary-dark); }
    button.danger { color: var(--danger); }

    .app {
      display: grid;
      grid-template-rows: auto auto 1fr;
      height: 100vh;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      background: var(--panel);
      border-bottom: 1px solid var(--border);
      z-index: 10;
    }

    .toolbar .title {
      font-size: 18px;
      font-weight: 850;
      margin-right: 8px;
    }

    .toolbar .separator {
      width: 1px;
      height: 28px;
      background: var(--border);
      margin: 0 4px;
    }

    .toolbar input[type="number"] {
      width: 74px;
      padding: 9px;
      border: 1px solid var(--border);
      border-radius: 8px;
    }

    .class-name-field {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 750;
    }

    .toolbar .class-name-input {
      width: 170px;
      padding: 9px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: #fff;
      font-weight: 750;
    }

    .share-menu-wrapper,
    .class-menu-wrapper {
      position: relative;
    }

    .share-button {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .share-button .share-icon {
      font-size: 17px;
      line-height: 1;
    }

    .share-menu {
      position: absolute;
      top: calc(100% + 7px);
      right: 0;
      width: 310px;
      max-width: calc(100vw - 28px);
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 11px;
      background: #fff;
      box-shadow: 0 14px 34px rgba(20, 30, 50, .18);
      z-index: 40;
    }

    .share-menu[hidden],
    .class-menu[hidden] { display: none; }

    .class-menu {
      position: absolute;
      top: calc(100% + 7px);
      left: 0;
      width: 305px;
      max-height: min(76vh, 660px);
      overflow-y: auto;
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 11px;
      background: #fff;
      box-shadow: 0 14px 34px rgba(20, 30, 50, .18);
      z-index: 45;
    }

    .class-menu button {
      width: 100%;
      display: grid;
      grid-template-columns: 30px 1fr;
      align-items: center;
      gap: 8px;
      padding: 10px;
      border: 0;
      background: transparent;
      text-align: left;
      font-weight: 800;
    }

    .class-menu button:hover {
      background: #f2f5f9;
    }

    .class-menu .menu-icon {
      display: grid;
      place-items: center;
      padding-top: 1px;
    }

    .class-menu .menu-icon .icon {
      width: 18px;
      height: 18px;
    }

    .class-menu button > span:last-child {
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .class-menu-separator {
      margin: 5px 6px;
      border-top: 1px solid var(--border);
    }

    .class-menu .menu-subtitle {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 500;
      line-height: 1.35;
    }

    .class-template-section {
      margin-top: 5px;
      padding: 9px 4px 2px;
      border-top: 1px solid var(--border);
    }

    .class-template-section-title {
      padding: 0 6px 5px;
      color: #344054;
      font-size: 11px;
      font-weight: 850;
    }

    .class-template-section button {
      grid-template-columns: 25px minmax(0, 1fr);
      padding: 8px 7px;
    }

    .share-menu button {
      width: 100%;
      /* min-height: 50px; */
      display: grid;
      grid-template-columns: 28px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border: 0;
      border-radius: 7px;
      background: transparent;
      text-align: left;
      font-weight: 700;
      line-height: 1.25;
    }

    .share-menu button:hover { background: #f2f5f9; }

    .share-menu .menu-icon {
      width: 28px;
      height: auto;
      display: grid;
      place-items: center;
      align-self: center;
      font-size: 13px;
      font-weight: 850;
      text-align: center;
      padding: 0;
    }

    .share-menu button > span:last-child {
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 0;
    }

    .share-menu .menu-subtitle {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 500;
      line-height: 1.35;
    }

    .toolbar .hint {
      margin-left: auto;
      color: var(--muted);
      font-size: 13px;
    }

    .workspace {
      position: relative;
      min-height: 0;
      display: grid;
      grid-template-columns: clamp(320px, 26vw, 420px) minmax(0, 1fr);
      transition: grid-template-columns .2s ease;
    }

    body.sidebar-collapsed .workspace {
      grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
      min-height: 0;
      display: grid;
      grid-template-rows: auto auto 1fr;
      background: var(--panel);
      border-right: 1px solid var(--border);
    }

    .sidebar-header { padding: 12px 12px 6px; }

    .sidebar-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 4px;
    }

    .sidebar-header h2 { margin: 0; font-size: 17px; }
    .stats { color: var(--muted); font-size: 12px; }

    .sidebar-heading-group {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    .sidebar-collapse-button {
      width: 29px;
      height: 29px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      padding: 0;
      border-radius: 8px;
      color: #667085;
      background: #f8fafc;
    }

    .sidebar-collapse-button:hover,
    .sidebar-collapse-button:focus-visible {
      color: var(--primary);
      border-color: #9db8ec;
      background: #eef4ff;
    }

    .sidebar-collapse-button .icon {
      width: 15px;
      height: 15px;
    }

    body.sidebar-collapsed .sidebar {
      display: none;
    }

    .open-sidebar-button {
      position: absolute;
      top: 10px;
      left: 10px;
      z-index: 30;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 32px;
      padding: 6px 10px;
      border: 1px solid #d0d5dd;
      border-radius: 999px;
      color: #475467;
      background: rgba(255,255,255,.96);
      box-shadow: 0 2px 8px rgba(20,30,50,.10);
      font-size: 11px;
      font-weight: 850;
      white-space: nowrap;
    }

    .open-sidebar-button:hover,
    .open-sidebar-button:focus-visible {
      color: var(--primary);
      border-color: #9db8ec;
      background: #fff;
    }

    .open-sidebar-button .icon {
      width: 15px;
      height: 15px;
    }

    body:not(.sidebar-collapsed) .open-sidebar-button {
      display: none;
    }

    .student-filter {
      padding: 6px 8px;
      border: 1px solid var(--border);
      border-radius: 7px;
      color: var(--text);
      background: #fff;
      font-size: 12px;
      font-weight: 650;
    }

    .search-box { padding: 6px 12px 8px; }
    .search-box input {
      width: 100%;
      padding: 8px 9px;
      border: 1px solid var(--border);
      border-radius: 8px;
    }

    .student-list {
      min-height: 0;
      overflow-y: auto;
      padding: 3px 8px 16px;
    }

    .student-card {
      border: 1px solid var(--neutral-border);
      border-left-width: 5px;
      border-radius: 8px;
      background: var(--neutral-bg);
      padding: 6px 8px;
      margin-bottom: 5px;
      cursor: grab;
      user-select: none;
      transition: opacity .15s, background .15s, transform .15s;
    }

    .student-card.gender-male {
      background: var(--male-bg);
      border-color: var(--male-border);
      color: var(--male-text);
    }

    .student-card.gender-female {
      background: var(--female-bg);
      border-color: var(--female-border);
      color: var(--female-text);
    }

    .student-card:hover {
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(20, 30, 50, .08);
    }

    .student-card:active { cursor: grabbing; }

    .student-card.placed {
      opacity: .62;
      filter: saturate(.55);
      cursor: pointer;
    }

    .student-card.placed:hover {
      opacity: .72;
    }

    .student-card.selected-for-placement {
      opacity: 1;
      filter: none;
      border-color: var(--primary);
      background: #eef4ff;
      box-shadow:
        0 0 0 3px rgba(37, 99, 235, .16),
        0 4px 12px rgba(20, 30, 50, .10);
      cursor: pointer;
    }

    .student-main-line {
      display: flex;
      align-items: center;
      gap: 4px;
      min-width: 0;
    }

    .student-card .name {
      min-width: 0;
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 850;
      font-size: 13px;
      line-height: 1.25;
    }

    .student-card-actions {
      opacity: 0;
      transition: opacity .15s ease;
    }

    .student-card:hover .student-card-actions,
    .student-card:focus-within .student-card-actions {
      opacity: 1;
    }

    @media (hover: none) {
      .student-card-actions { opacity: 1; }
    }

    .student-tags {
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      gap: 3px;
      min-width: 0;
    }

    .student-tags .compact-tag,
    .student-tags .score-tag {
      min-height: 19px;
      padding: 1px 5px;
      font-size: 9px;
    }

    .student-tags .aesh-tag {
      color: #805b00;
      background: #fff1cc;
      border-color: #e8c968;
    }

    .compact-tag {
      display: inline-grid;
      place-items: center;
      min-width: 25px;
      min-height: 20px;
      padding: 1px 5px;
      border: 1px solid rgba(70,80,95,.16);
      border-radius: 6px;
      background: rgba(255,255,255,.68);
      color: #475467;
      font-size: 10px;
      font-weight: 800;
      white-space: nowrap;
    }

    .constraint-line {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      margin-top: 3px;
      font-size: 10.5px;
      font-weight: 700;
      line-height: 1.2;
    }

    .constraint-line .with-student,
    .constraint-line .separate-student {
      min-width: 0;
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .constraint-line .with-student { color: #6941c6; }
    .constraint-line .separate-student { color: #b42318; }

    .constraint-line .aesh-indicator {
      flex: 0 0 auto;
      padding: 1px 5px;
      border-radius: 5px;
      background: #fff1cc;
      color: #805b00;
      white-space: nowrap;
    }

    .empty-message {
      color: var(--muted);
      text-align: center;
      padding: 30px 18px;
      line-height: 1.5;
    }

    .room-scroll {
      min-width: 0;
      min-height: 0;
      overflow: auto;
      padding: 18px;
    }

    .room-stage {
      position: relative;
      width: 1400px;
      height: 900px;
      transition: width .18s ease, height .18s ease;
    }

    .room-stage.fitted {
      margin-inline: auto;
    }

    .room {
      position: relative;
      width: 1400px;
      height: 900px;
      transform-origin: top left;
      transition: transform .18s ease;
      background-color: var(--room);
      background-image:
        linear-gradient(#eef0f2 1px, transparent 1px),
        linear-gradient(90deg, #eef0f2 1px, transparent 1px);
      background-size: 20px 20px;
      border: 2px solid #bcc4ce;
      border-radius: 10px;
      box-shadow: inset 0 0 0 1px #fff;
    }

    .room.exporting .desk-actions,
    .room.exporting .remove-student,
    .room.exporting .pin-student {
      display: none !important;
    }

    .room.exporting .seat.pinned {
      box-shadow: none;
    }

    .student-name-first {
      display: none;
    }

    .student-view-controls {
      display: none;
      position: fixed;
      top: 14px;
      right: 14px;
      z-index: 200;
      align-items: center;
      gap: 8px;
      padding: 7px;
      border: 1px solid rgba(208, 213, 221, .95);
      border-radius: 12px;
      background: rgba(255, 255, 255, .96);
      box-shadow: 0 10px 30px rgba(20, 30, 50, .18);
      backdrop-filter: blur(7px);
    }

    .student-view-name-toggle,
    .student-view-table-toggle {
      display: flex;
      align-items: center;
      gap: 3px;
      padding: 3px;
      border-radius: 9px;
      background: #eef2f6;
    }

    .student-view-name-toggle button,
    .student-view-table-toggle button,
    .student-view-exit-button {
      min-height: 32px;
      padding: 6px 10px;
      border-radius: 7px;
      font-size: 11px;
      font-weight: 850;
      white-space: nowrap;
    }

    .student-view-name-toggle button,
    .student-view-table-toggle button {
      border-color: transparent;
      color: #475467;
      background: transparent;
    }

    .student-view-name-toggle button.active,
    .student-view-table-toggle button.active {
      color: #fff;
      border-color: var(--primary);
      background: var(--primary);
    }

    .student-view-exit-button {
      color: #344054;
      background: #fff;
    }

    body.student-view {
      overflow: hidden;
      background: #eef2f6;
    }

    body.student-view .site-header,
    body.student-view .toolbar,
    body.student-view .sidebar,
    body.student-view .room-controls,
    body.student-view .app-legal-footer {
      display: none !important;
    }

    body.student-view .app {
      display: block;
      height: 100vh;
    }

    body.student-view .workspace {
      display: block;
      height: 100vh;
    }

    body.student-view .room-scroll {
      width: 100vw;
      height: 100vh;
      padding: 18px;
    }

    body.student-view .room-stage {
      margin-inline: auto;
      overflow: hidden;
      border: 2px solid #bcc4ce;
      border-radius: 10px;
      background: var(--room);
      box-shadow: inset 0 0 0 1px #fff;
    }

    body.student-view .student-view-controls {
      display: flex;
    }

    body.student-view .desk-actions,
    body.student-view .remove-student,
    body.student-view .pin-student,
    body.student-view .seat-score-tags,
    body.student-view .seat-aesh-tag {
      display: none !important;
    }

    body.student-view .seat,
    body.student-view .desk-header,
    body.student-view .teacher-desk-header {
      pointer-events: none;
      cursor: default;
    }

    body.student-view .seat.occupied,
    body.student-view .seat.occupied.gender-male,
    body.student-view .seat.occupied.gender-female,
    body.student-view .seat.occupied.gender-neutral {
      color: #273142;
      border-color: #c6ced8;
      background: #fff;
      box-shadow: none;
    }

    body.student-view .seat.disabled-seat {
      color: #667085;
      border-color: #aeb6c2;
      background:
        linear-gradient(
          to bottom right,
          transparent calc(50% - 1px),
          rgba(102, 112, 133, .42) 50%,
          transparent calc(50% + 1px)
        ),
        repeating-linear-gradient(
          135deg,
          #eef0f3,
          #eef0f3 8px,
          #e3e6ea 8px,
          #e3e6ea 16px
        );
    }

    body.student-view .seat .student-name {
      font-size: 13px;
      line-height: 1.25;
      max-width: 100%;
      overflow: hidden;
      overflow-wrap: normal;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    body.student-view .seat {
      padding-inline: 6px;
    }

    body.student-view.student-view-first-name .student-name-full {
      display: none;
    }

    body.student-view.student-view-first-name .student-name-first {
      display: inline;
    }

    body.student-view.student-view-hide-table-numbers .desk-header {
      display: none;
    }

    @media (max-width: 850px) {
      .student-view-controls {
        flex-wrap: wrap;
        justify-content: flex-end;
      }
    }

    @media (max-width: 650px) {
      .student-view-controls {
        top: 8px;
        right: 8px;
        left: 8px;
        justify-content: space-between;
      }

      .student-view-name-toggle,
      .student-view-table-toggle {
        flex: 1 1 calc(50% - 4px);
      }

      .student-view-name-toggle button,
      .student-view-table-toggle button {
        flex: 1;
      }

      .student-view-exit-button {
        flex: 1 1 100%;
      }
    }

    .room-class-name {
      position: absolute;
      top: 16px;
      left: 20px;
      max-width: 430px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding: 7px 11px;
      border: 1px solid #c6ced8;
      border-radius: 7px;
      background: rgba(255,255,255,.92);
      color: #344054;
      box-shadow: 0 2px 7px rgba(20,30,50,.08);
      font-size: 14px;
      font-weight: 850;
      pointer-events: none;
    }

    .board {
      position: absolute;
      border: 2px solid #40464d;
      border-radius: 4px;
      background: #2f5d50;
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 12px;
      font-weight: 850;
      letter-spacing: .18em;
      pointer-events: none;
      transition: top .18s ease, right .18s ease, bottom .18s ease, left .18s ease;
    }

    .board span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  padding-left: .18em;
  transform: translate(-50%, -50%);
  transform-origin: center;
}


    .board.position-top,
    .board.position-bottom {
      width: clamp(220px, 32vw, 360px);
      height: 42px;
      left: 50%;
      transform: translateX(-50%);
    }

    .board.position-top {
      top: 14px;
    }

    .board.position-bottom {
      bottom: 14px;
    }

    .board.position-left,
    .board.position-right {
      width: 42px;
      height: 360px;
      top: 50%;
      transform: translateY(-50%);
    }

    .board.position-left {
      left: 14px;
    }

    .board.position-right {
      right: 14px;
    }

 .board.position-left span {
  transform: translate(-50%, -50%) rotate(-90deg);
}

    .board.position-right span {
  transform: translate(-50%, -50%) rotate(90deg);
}

    .teacher-desk {
      position: absolute;
      width: 260px;
      height: 112px;
      border: 2px solid #66513a;
      border-radius: 10px;
      background: #a97845;
      box-shadow: var(--shadow);
      overflow: hidden;
      touch-action: none;
    }

    .teacher-desk.vertical {
      width: 120px;
      height: 240px;
    }

    .teacher-desk-header {
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      padding: 4px 6px 4px 10px;
      color: #fff;
      background: rgba(72, 45, 22, .48);
      border-bottom: 1px solid rgba(55, 34, 16, .35);
      cursor: move;
      user-select: none;
      font-size: 11px;
      font-weight: 850;
    }

    .teacher-desk.locked .teacher-desk-header {
      cursor: default;
    }

    .teacher-desk-title {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .teacher-desk-actions {
      display: flex;
      flex: 0 0 auto;
      gap: 3px;
    }

    .teacher-desk-actions button {
      width: 25px;
      height: 22px;
      padding: 0;
      border: 1px solid rgba(255,255,255,.38);
      border-radius: 5px;
      color: #4c3420;
      background: rgba(255,255,255,.72);
      font-size: 13px;
      line-height: 1;
    }

    .teacher-desk-body {
      height: calc(100% - 32px);
      display: grid;
      place-items: center;
      padding: 8px;
      color: #fff8ed;
      background:
        linear-gradient(135deg, rgba(255,255,255,.10), transparent 45%),
        #a97845;
      text-align: center;
      font-size: 13px;
      font-weight: 900;
      letter-spacing: .08em;
    }

    .teacher-desk.vertical .teacher-desk-header {
      padding-left: 6px;
    }

    .teacher-desk.vertical .teacher-desk-title {
      font-size: 10px;
    }

    .teacher-desk.vertical .teacher-desk-body span {
      transform: rotate(-90deg);
      white-space: nowrap;
    }

    .room.exporting .teacher-desk-actions,
    body.student-view .teacher-desk-actions {
      display: none !important;
    }

    .desk {
      position: absolute;
      width: 230px;
      min-height: 96px;
      border: 1px solid #8894a3;
      border-radius: 10px;
      background: #d6b88a;
      box-shadow: var(--shadow);
      overflow: hidden;
      touch-action: none;
    }

    .desk.vertical { width: 132px; }

    .desk-header {
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      padding: 4px 6px 4px 9px;
      color: #3f3323;
      background: rgba(255,255,255,.28);
      border-bottom: 1px solid rgba(70,50,20,.20);
      cursor: move;
      user-select: none;
      font-size: 12px;
      font-weight: 850;
    }

    .desk-actions { display: flex; gap: 3px; }

    .desk-actions button,
    .teacher-desk-actions button {
      position: relative;
    }

    /* Étend la cible sans grossir visuellement les commandes. */
    .desk-actions button::before,
    .teacher-desk-actions button::before {
      content: "";
      position: absolute;
      inset: -5px -4px;
    }

    .desk-actions [data-action="delete"],
    .teacher-desk-actions [data-action="delete"] {
      margin-left: 2px;
      border-color: rgba(180, 35, 24, .28);
      color: #8f2d24;
    }

    .desk-actions button:disabled,
    .teacher-desk-actions button:disabled {
      opacity: .42;
      cursor: not-allowed;
    }

    .desk-header > span:first-child {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    .desk.vertical .desk-header {
      gap: 2px;
      padding-left: 6px;
      padding-right: 4px;
      font-size: 11px;
    }

    .desk.vertical .desk-actions {
      gap: 1px;
    }

    .desk.vertical .desk-actions button {
      width: 21px;
    }

    .desk.vertical .desk-actions button.swap-button {
      width: 24px;
    }
    .desk-actions button {
      width: 24px;
      height: 22px;
      padding: 0;
      border-radius: 5px;
      background: rgba(255,255,255,.55);
      border-color: rgba(70,50,20,.25);
      font-size: 13px;
      line-height: 1;
    }

    .seats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px;
      padding: 6px;
    }

    .desk.vertical .seats { grid-template-columns: 1fr; }

    .seat {
      position: relative;
      min-width: 0;
      min-height: 58px;
      border: 2px dashed rgba(70, 80, 95, .30);
      border-radius: 7px;
      background: var(--seat);
      display: grid;
      place-items: center;
      padding: 6px 20px 6px 6px;
      text-align: center;
      font-size: 12px;
      font-weight: 700;
      color: #596273;
      overflow: hidden;
    }

    .seat.drag-over {
      background: var(--seat-hover);
      border-color: var(--primary);
    }

    .seat.student-located {
      z-index: 3;
      animation: studentLocatePulse 1.6s ease-out;
    }

    .seat.click-placement-target {
      cursor: pointer;
      border-color: #76a3ec;
      background: #f4f8ff;
      animation: clickPlacementPulse 1.4s ease-in-out infinite;
    }

    .seat.click-placement-target:hover {
      border-color: var(--primary);
      background: #e8f1ff;
    }

    @keyframes clickPlacementPulse {
      0%, 100% {
        box-shadow: inset 0 0 0 0 rgba(37, 99, 235, 0);
      }
      50% {
        box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .15);
      }
    }

    @keyframes studentLocatePulse {
      0%, 100% {
        outline: 0 solid rgba(37, 99, 235, 0);
        box-shadow: none;
      }
      20%, 65% {
        outline: 5px solid rgba(37, 99, 235, .32);
        outline-offset: 3px;
        box-shadow: 0 0 0 10px rgba(37, 99, 235, .12);
      }
    }

    .seat.occupied {
      border-style: solid;
      color: var(--text);
      cursor: grab;
    }

    .seat.occupied.pinned {
      cursor: default;
      box-shadow:
        inset 0 0 0 2px rgba(105, 65, 198, .72),
        0 0 0 2px rgba(105, 65, 198, .10);
    }

    .seat.occupied.gender-male {
      background: var(--male-bg);
      border-color: var(--male-border);
      color: var(--male-text);
    }

    .seat.occupied.gender-female {
      background: var(--female-bg);
      border-color: var(--female-border);
      color: var(--female-text);
    }

    .seat.occupied.gender-neutral {
      background: var(--neutral-bg);
      border-color: var(--neutral-border);
    }

    .seat.reserved-aesh {
      border-style: solid;
      border-color: var(--aesh-border);
      background:
        repeating-linear-gradient(
          135deg,
          #e2e5e9,
          #e2e5e9 8px,
          #d3d7dc 8px,
          #d3d7dc 16px
        );
      color: #4f5966;
      cursor: not-allowed;
      font-weight: 850;
    }

    .seat.reserved-aesh > div {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      padding: 6px;
      overflow: hidden;
    }

    .seat.reserved-aesh .reserved-accompaniment-title {
      max-width: 100%;
      font-size: 10px;
      line-height: 1.15;
      white-space: normal;
    }

    .seat.reserved-aesh .student-meta {
      max-width: 100%;
      font-size: 9px;
      line-height: 1.15;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .seat.disabled-seat {
      border-style: solid;
      border-color: #aeb6c2;
      color: #667085;
      background:
        linear-gradient(
          to bottom right,
          transparent calc(50% - 1px),
          rgba(102, 112, 133, .42) 50%,
          transparent calc(50% + 1px)
        ),
        repeating-linear-gradient(
          135deg,
          #eef0f3,
          #eef0f3 8px,
          #e3e6ea 8px,
          #e3e6ea 16px
        );
      cursor: pointer;
      font-size: 10px;
      font-weight: 850;
      letter-spacing: .04em;
    }

    .desk.locked .seat.disabled-seat {
      cursor: default;
    }

    .seat-availability-button {
      position: absolute;
      right: 3px;
      top: 3px;
      width: 19px;
      height: 19px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 0;
      border-radius: 50%;
      color: #667085;
      background: rgba(255,255,255,.88);
      font-size: 13px;
      font-weight: 900;
      line-height: 1;
    }

    .seat-availability-button:hover,
    .seat-availability-button:focus-visible {
      color: #b42318;
      background: #fff1f0;
    }

    .seat.disabled-seat .seat-availability-button:hover,
    .seat.disabled-seat .seat-availability-button:focus-visible {
      color: #175cd3;
      background: #eff8ff;
    }

    .room.exporting .seat-availability-button,
    body.student-view .seat-availability-button {
      display: none !important;
    }

    .seat .student-name {
      overflow: hidden;
      overflow-wrap: break-word;
      word-break: normal;
      hyphens: auto;
      line-height: 1.2;
      font-weight: 850;
    }

    .seat .student-name.long-name { font-size: 11px; }
    .seat .student-name.very-long-name { font-size: 10px; line-height: 1.15; }

    .seat .student-meta {
      margin-top: 3px;
      font-size: 10px;
      font-weight: 700;
      opacity: .86;
    }

    .seat .remove-student,
    .seat .pin-student {
      position: absolute;
      top: 3px;
      width: 18px;
      height: 18px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 0;
      border-radius: 50%;
      color: #667085;
      background: rgba(255,255,255,.82);
      line-height: 1;
    }

    /* Cible réelle d’environ 32 px, icône visuellement inchangée. */
    .seat .remove-student::before,
    .seat .pin-student::before {
      content: "";
      position: absolute;
      inset: -7px;
    }

    .seat .remove-student {
      right: 3px;
      font-size: 12px;
    }

    .seat .pin-student {
      left: 3px;
    }

    .seat .pin-student .icon {
      width: 12px;
      height: 12px;
    }

    .seat .pin-student:hover,
    .seat .pin-student:focus-visible {
      color: #6941c6;
      background: #f3efff;
    }

    .seat .pin-student.active {
      color: #fff;
      background: #6941c6;
    }

    .seat .remove-student:disabled {
      cursor: not-allowed;
      opacity: .38;
    }

    .drop-active {
      outline: 3px solid rgba(37, 99, 235, .25);
      outline-offset: -3px;
    }

    .file-note {
      display: none;
      position: fixed;
      right: 14px;
      bottom: 14px;
      max-width: 390px;
      padding: 11px 13px;
      border-radius: 9px;
      color: #fff;
      background: #273142;
      box-shadow: var(--shadow);
      z-index: 50;
      font-size: 13px;
    }

    .file-note.show {
      display: block;
      animation: fadeIn .2s ease-out;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 1050px) {
      body { overflow: auto; }
      .app { height: auto; min-height: 100vh; }
      .workspace { grid-template-columns: 1fr; }
      .sidebar {
        max-height: 38vh;
        border-right: 0;
        border-bottom: 1px solid var(--border);
      }
      .toolbar .hint { display: none; }
      .toolbar .class-name-input { width: 150px; }
      .room-scroll {
        height: 68dvh;
        min-height: 470px;
        padding: 10px;
      }

      .room-controls {
        top: 8px;
        right: 8px;
        gap: 4px;
        max-width: calc(100% - 16px);
      }

      .room-control-button {
        min-height: 29px;
        gap: 4px;
        padding: 5px 8px;
        font-size: 10px;
      }

      .room-control-button .icon {
        width: 14px;
        height: 14px;
      }

      .open-sidebar-button {
        top: 8px;
        left: 8px;
        min-height: 36px;
        padding: 7px 11px;
        font-size: 12px;
      }
    }
  

    button:disabled {
      cursor: not-allowed;
      opacity: .45;
      background: #f5f6f8;
    }

    .toolbar-group {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 3px 5px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #f8fafc;
    }

    .toolbar-group label {
      display: flex;
      align-items: center;
      gap: 5px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .toolbar select {
      max-width: 150px;
      min-width: 105px;
      padding: 7px 28px 7px 8px;
      border: 1px solid var(--border);
      border-radius: 7px;
      background: #fff;
      color: var(--text);
      font: inherit;
      font-weight: 700;
    }

    .mini-button {
      width: 30px;
      height: 30px;
      padding: 0;
      border-radius: 7px;
      line-height: 1;
      font-size: 15px;
    }

    .tool-button.active {
      color: #fff;
      background: #475467;
      border-color: #475467;
    }

    .generate-menu-wrapper {
      position: relative;
    }

    .generate-menu {
      position: absolute;
      top: calc(100% + 7px);
      left: 0;
      width: 300px;
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      box-shadow: 0 12px 30px rgba(20, 30, 50, .18);
      z-index: 40;
    }

    .generate-menu[hidden] { display: none; }

    .generate-menu button {
      width: 100%;
      display: grid;
      grid-template-columns: 34px 1fr;
      gap: 8px;
      align-items: center;
      padding: 10px;
      border: 0;
      text-align: left;
      font-weight: 800;
    }

    .generate-menu button:hover { background: #f2f5f9; }

    .generate-menu .menu-icon {
      font-size: 18px;
      text-align: center;
    }

    .generate-menu-separator {
      margin: 5px 6px;
      border-top: 1px solid var(--border);
    }

    .generate-menu-subtitle {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 500;
      line-height: 1.35;
    }

    .generate-options {
      margin-top: 5px;
      padding: 9px 10px 6px;
      border-top: 1px solid var(--border);
      color: #475467;
      font-size: 12px;
      font-weight: 700;
    }

    .generate-options label {
      display: flex;
      align-items: flex-start;
      gap: 7px;
      cursor: pointer;
    }

    .generate-options input { margin-top: 2px; }

    .desk.locked .desk-header {
      cursor: default;
    }

    .desk-actions button.swap-button {
      width: 28px;
      font-size: 15px;
    }

    .room-controls {
      position: absolute;
      top: 13px;
      right: 16px;
      z-index: 8;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
      max-width: calc(100% - 32px);
    }

    .room-control-button {
      min-height: 31px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 6px 10px;
      border: 1px solid #d0d5dd;
      border-radius: 999px;
      color: #475467;
      background: rgba(255,255,255,.94);
      box-shadow: 0 2px 7px rgba(20,30,50,.08);
      font-size: 11px;
      font-weight: 850;
      white-space: nowrap;
    }

    .room-control-button:hover {
      color: var(--primary);
      background: #fff;
      border-color: #9db8ec;
    }

    .room-control-button .icon {
      width: 15px;
      height: 15px;
    }


    .layout-menu-wrapper,
    .room-tools-menu-wrapper {
      position: relative;
    }

    .room-tools-menu {
      position: absolute;
      top: calc(100% + 7px);
      right: 0;
      width: 250px;
      max-width: calc(100vw - 40px);
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 11px;
      background: #fff;
      box-shadow: 0 14px 34px rgba(20, 30, 50, .18);
      z-index: 35;
    }

    .room-tools-menu[hidden] {
      display: none;
    }

    .room-tools-menu .room-control-button {
      width: 100%;
      justify-content: flex-start;
      min-height: 38px;
      padding: 8px 10px;
      border-radius: 10px;
      box-shadow: none;
      white-space: normal;
    }

    .room-tools-menu .room-control-button + .room-control-button {
      margin-top: 4px;
    }

    .room-tools-menu .room-control-button .icon {
      width: 16px;
      height: 16px;
    }

    .layout-menu {
      position: absolute;
      top: calc(100% + 7px);
      right: 0;
      width: 340px;
      max-height: min(78vh, 720px);
      overflow-y: auto;
      max-width: calc(100vw - 40px);
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 11px;
      background: #fff;
      box-shadow: 0 14px 34px rgba(20, 30, 50, .18);
      z-index: 35;
    }

    .layout-menu[hidden] {
      display: none;
    }

    .layout-menu button {
      width: 100%;
      display: grid;
      grid-template-columns: 38px 1fr;
      align-items: center;
      gap: 9px;
      padding: 10px;
      border: 0;
      background: transparent;
      text-align: left;
      font-weight: 800;
    }

    .layout-menu button:hover,
    .layout-menu button:focus-visible {
      background: #f2f5f9;
    }

    .layout-menu .menu-icon {
      display: grid;
      place-items: center;
      color: #475467;
    }

    .layout-menu .menu-icon .icon {
      width: 23px;
      height: 23px;
    }

    .layout-menu .menu-subtitle {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 500;
      line-height: 1.35;
    }

    .layout-menu-section {
      margin-top: 5px;
      padding: 10px 8px 5px;
      border-top: 1px solid var(--border);
    }

    .layout-menu-section-title {
      margin-bottom: 7px;
      color: #344054;
      font-size: 11px;
      font-weight: 850;
    }

    .room-template-empty {
      padding: 7px 8px 3px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .room-template-list {
      display: grid;
      gap: 3px;
      margin-top: 4px;
    }

    .room-template-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 34px;
      gap: 3px;
      align-items: stretch;
    }

    .layout-menu .room-template-row .room-template-apply {
      grid-template-columns: 28px minmax(0, 1fr);
      min-width: 0;
      padding: 8px;
      border-radius: 7px;
    }

    .layout-menu .room-template-row .room-template-apply > span:last-child {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .layout-menu .room-template-row .room-template-delete {
      display: grid;
      grid-template-columns: 1fr;
      place-items: center;
      width: 34px;
      min-width: 34px;
      padding: 0;
      border-radius: 7px;
      color: #b42318;
    }

    .layout-menu .room-template-row .room-template-delete:hover,
    .layout-menu .room-template-row .room-template-delete:focus-visible {
      color: #912018;
      background: #fff1f0;
    }

    .board-position-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 5px;
    }

    .layout-menu .board-position-grid button {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      padding: 6px 5px;
      border: 1px solid var(--border);
      border-radius: 7px;
      color: #475467;
      background: #fff;
      font-size: 11px;
      font-weight: 800;
      text-align: center;
    }

    .layout-menu .board-position-grid button:hover,
    .layout-menu .board-position-grid button:focus-visible {
      color: var(--primary);
      border-color: #9db8ec;
      background: #eef4ff;
    }

    .layout-menu .board-position-grid button.active {
      color: #fff;
      border-color: var(--primary);
      background: var(--primary);
    }

    .room-lock-button.active {
      color: #fff;
      background: #475467;
      border-color: #475467;
    }

    .room-lock-button.active:hover {
      color: #fff;
      background: #344054;
      border-color: #344054;
    }

    .modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgba(15, 23, 42, .42);
    }

    .modal-overlay[hidden] { display: none; }

    .modal-card {
      width: min(680px, 100%);
      max-height: min(760px, 88vh);
      display: grid;
      grid-template-rows: auto 1fr auto;
      overflow: hidden;
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
    }

    .modal-header,
    .modal-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 17px;
      border-bottom: 1px solid var(--border);
    }

    .modal-footer {
      justify-content: flex-end;
      border-top: 1px solid var(--border);
      border-bottom: 0;
    }

    .modal-header h3 { margin: 0; font-size: 18px; }

    .modal-body {
      overflow-y: auto;
      padding: 16px 17px;
    }

    .check-summary {
      margin-bottom: 14px;
      padding: 12px;
      border-radius: 10px;
      background: #f8fafc;
      color: #344054;
      font-weight: 750;
    }

    .check-section {
      margin: 15px 0;
    }

    .check-section h4 {
      margin: 0 0 7px;
      font-size: 14px;
    }

    .check-section ul {
      margin: 0;
      padding-left: 22px;
      color: #475467;
      line-height: 1.5;
    }

    .check-ok {
      padding: 16px;
      border: 1px solid #98d7b5;
      border-radius: 10px;
      color: #17663a;
      background: #ecfdf3;
      font-weight: 800;
    }

    .check-errors h4 { color: #b42318; }
    .check-warnings h4 { color: #9a6700; }
    .check-info h4 { color: #175cd3; }

    .toolbar-spacer { flex: 1 1 auto; }

    @media (max-width: 1300px) {
      .toolbar select { max-width: 125px; }
      .toolbar .separator { display: none; }
    }

    /* Pied de page légal */
    

    

    

    @media (max-width: 850px) {
      
    }


    /* Navigation du site */
    

    

    

    @media (max-width: 1250px) {
      
    }


    /* En-tête du site et améliorations de l’interface */
    

    

    
    
    

    .save-status-group {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-width: 36px;
      max-width: min(430px, 38vw);
    }

    .save-status-message {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: #b42318;
      font-size: 11px;
      font-weight: 750;
      line-height: 1.25;
    }

    .save-status-message[hidden] { display: none; }

    .save-status {
      width: 36px;
      min-width: 36px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0;
      padding: 0;
      border: 1px solid #b7dfc5;
      border-radius: 9px;
      color: #17663a;
      background: #eefbf3;
      font-size: 11px;
      font-weight: 800;
      white-space: nowrap;
      transition: opacity .15s, transform .15s;
    }

    .save-status.saving { opacity: .65; transform: scale(.98); }
    .save-status.local-only {
      color: #475467;
      border-color: #d0d5dd;
      background: #f8fafc;
    }
    .save-status.cloud-pending,
    .save-status.cloud-saving {
      color: #175cd3;
      border-color: #b9cff5;
      background: #eef4ff;
    }
    .save-status.cloud-saving .icon {
      animation: cloudSavePulse .85s ease-in-out infinite alternate;
    }
    .save-status.cloud-synced {
      color: #17663a;
      border-color: #b7dfc5;
      background: #eefbf3;
    }
    .save-status.cloud-error,
    .save-status.quota-error {
      color: #b42318;
      border-color: #f0aaa3;
      background: #fff1f0;
    }
    .save-status .icon { width: 15px; height: 15px; }

    @keyframes cloudSavePulse {
      from { transform: scale(.92); opacity: .58; }
      to { transform: scale(1.08); opacity: 1; }
    }

    .toolbar {
      overflow: visible;
      gap: 6px;
      padding: 8px 10px;
      box-shadow: 0 2px 9px rgba(20, 30, 50, .05);
    }

    .toolbar > button:not(.mini-button),
    .toolbar .share-button,
    .toolbar #generateBtn {
      padding: 8px 10px;
    }

    .toolbar-group {
      gap: 3px;
      padding: 3px 4px;
    }

    .toolbar button,
    .share-button,
    #generateBtn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .icon { width: 18px; height: 18px; flex: 0 0 auto; }
    .mini-button .icon { width: 16px; height: 16px; }
    .chevron { margin-left: 1px; color: var(--muted); font-size: 12px; }

    

    

    .sidebar {
      display: flex;
      flex-direction: column;
    }

    .sidebar-title-row { margin-bottom: 7px; }

    .sidebar-student-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 5px;
    }

    .add-student-button,
    .paste-student-list-button,
    .import-students-button {
      padding: 7px 9px;
      font-size: 12px;
    }

    .paste-student-list-button {
      color: #344054;
      background: #f8fafc;
    }

    .clear-student-list-button {
      width: 34px;
      min-width: 34px;
      height: 34px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      color: var(--danger);
      background: #fff;
      border-color: #efc1bc;
    }

    .clear-student-list-button:hover,
    .clear-student-list-button:focus-visible {
      color: #912018;
      background: #fff1f0;
      border-color: #e4776d;
    }

    .clear-student-list-button .icon {
      width: 15px;
      height: 15px;
    }

    .sidebar-student-actions {
      flex-wrap: nowrap;
    }

    .compact-student-action {
      width: 34px;
      min-width: 34px;
      height: 34px;
      padding: 0;
      font-size: 19px;
      line-height: 1;
    }

    .student-list-controls {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      padding: 4px 12px 2px;
    }

    .student-list-controls .student-filter { width: 100%; }

    .skill-legend {
      margin: 2px 12px 8px;
      padding: 7px 9px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--muted);
      background: #f8fafc;
      font-size: 11px;
    }

    .skill-legend summary { cursor: pointer; font-weight: 800; }
    .legend-items {
      display: grid;
      grid-template-columns: auto 1fr auto 1fr;
      align-items: center;
      gap: 5px 7px;
      margin-top: 8px;
    }

    .score-tag {
      display: inline-grid;
      place-items: center;
      min-height: 20px;
      padding: 2px 7px;
      border: 1px solid rgba(20,30,50,.14);
      border-radius: 6px;
      font-size: 10px;
      font-weight: 900;
      white-space: nowrap;
    }

    .score-1 { color: #fff; background: #d92d20; border-color: #b42318; }
    .score-2 { color: #5c4500; background: #f9d84a; border-color: #d3ad19; }
    .score-3 { color: #174d20; background: #a7df87; border-color: #73bd58; }
    .score-4 { color: #fff; background: #27864b; border-color: #176b36; }

    .student-card-actions {
      display: flex;
      flex: 0 0 auto;
      gap: 1px;
      margin-left: 1px;
    }

    .student-card-actions button {
      width: 24px;
      height: 22px;
      padding: 0;
      border: 0;
      color: currentColor;
      background: rgba(255,255,255,.62);
    }

    .student-card-actions .icon { width: 13px; height: 13px; }

    .empty-state {
      margin: 8px 4px;
      padding: 20px 16px;
      border: 1px dashed #b8c2cf;
      border-radius: 11px;
      color: #475467;
      background: #fbfcfe;
      text-align: left;
      line-height: 1.45;
      transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
    }

    .empty-state.file-drop-active {
      border-color: var(--primary);
      background: #eef4ff;
      box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .12);
      transform: translateY(-1px);
    }

    .empty-state h3 { margin: 0 0 7px; color: #273142; font-size: 15px; }
    .empty-state p { margin: 5px 0; }

    .empty-state .drop-hint {
      margin-top: 10px;
      color: #175cd3;
      font-size: 12px;
      font-weight: 800;
    }

    .empty-state.file-drop-active .drop-hint {
      color: var(--primary-dark);
    }
    .empty-state .column-order {
      margin-top: 9px;
      padding: 8px;
      border-radius: 7px;
      background: #eef4ff;
      color: #344054;
      font-size: 11px;
      font-weight: 750;
    }

    .empty-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
    .empty-actions button { padding: 7px 9px; font-size: 11px; }

    .seat-score-tags {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 4px;
      margin-top: 4px;
    }

    .seat-score-dot {
      display: inline-grid;
      place-items: center;
      width: 18px;
      height: 18px;
      border: 1px solid rgba(20,30,50,.14);
      border-radius: 50%;
      font-size: 9px;
      font-weight: 950;
      line-height: 1;
      cursor: help;
    }

    .seat-aesh-tag {
      display: grid;
      place-items: center;
      min-height: 19px;
      padding: 2px 5px;
      border-top: 1px solid #e8c968;
      color: #805b00;
      background: #fff1cc;
      font-size: 8px;
      font-weight: 900;
      line-height: 1;
    }

    .seat.occupied.has-accompaniment > div:first-child {
      padding-bottom: 21px;
    }

    .seat.occupied.has-accompaniment .seat-aesh-tag {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      border-radius: 0 0 5px 5px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 13px;
    }

    .form-grid label {
      display: grid;
      gap: 5px;
      color: #344054;
      font-size: 12px;
      font-weight: 800;
    }

    .form-grid input,
    .form-grid select {
      width: 100%;
      padding: 9px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: #fff;
      font: inherit;
      font-weight: 600;
    }

    .form-grid input:focus,
    .form-grid select:focus {
      outline: 3px solid rgba(37,99,235,.14);
      border-color: var(--primary);
    }

    .form-span-2 { grid-column: 1 / -1; }
    .form-help { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
    .student-modal-card { width: min(720px, 100%); }
    .student-modal-footer { justify-content: flex-start; }
    .modal-footer-spacer { flex: 1; }

    .bulk-student-card { width: min(820px, 100%); }

    .bulk-student-textarea {
      width: 100%;
      min-height: 160px;
      resize: vertical;
      padding: 11px 12px;
      border: 1px solid var(--border);
      border-radius: 9px;
      color: var(--text);
      background: #fff;
      font: inherit;
      line-height: 1.45;
    }

    .bulk-student-textarea:focus {
      outline: 3px solid rgba(37,99,235,.14);
      border-color: var(--primary);
    }

    .bulk-student-help {
      margin: 8px 0 12px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.45;
    }

    .bulk-student-preview-wrap {
      max-height: 285px;
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: 9px;
    }

    .bulk-student-preview {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .bulk-student-preview th,
    .bulk-student-preview td {
      padding: 7px;
      border-bottom: 1px solid #e8edf3;
      text-align: left;
    }

    .bulk-student-preview th {
      position: sticky;
      top: 0;
      z-index: 1;
      color: #344054;
      background: #f8fafc;
      font-size: 11px;
    }

    .bulk-student-preview tr:last-child td { border-bottom: 0; }

    .bulk-student-preview input {
      width: 100%;
      min-width: 120px;
      padding: 7px 8px;
      border: 1px solid var(--border);
      border-radius: 7px;
      font: inherit;
    }

    .bulk-student-empty {
      padding: 18px;
      color: var(--muted);
      text-align: center;
    }

    .smart-generate-button {
      color: #175cd3;
      background: #eef4ff !important;
      border-radius: 8px !important;
    }

    .smart-generate-button:hover,
    .smart-generate-button:focus-visible {
      color: #1849a9;
      background: #dbe9ff !important;
    }

    .smart-generation-card { width: min(720px, 100%); }

    .smart-intro {
      margin: 0 0 14px;
      color: #344054;
      line-height: 1.5;
    }

    .smart-option {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      margin-bottom: 14px;
      padding: 12px;
      border: 1px solid #b9cff5;
      border-radius: 10px;
      color: #1849a9;
      background: #eef4ff;
      font-weight: 800;
      line-height: 1.4;
    }

    .smart-option input { margin-top: 3px; }

    .smart-premium-settings {
      margin: 0 0 14px;
      padding: 12px;
      border: 1px solid #d8c8f5;
      border-radius: 10px;
      background: #faf8ff;
    }

    .smart-premium-settings-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 9px;
    }

    .smart-premium-settings-title {
      color: #53389e;
      font-size: 13px;
      font-weight: 900;
    }

    .smart-premium-badge {
      padding: 3px 7px;
      border-radius: 999px;
      color: #53389e;
      background: #eee7ff;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .smart-premium-locked {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: #667085;
      font-size: 11px;
      line-height: 1.45;
    }

    .smart-premium-locked button {
      flex: 0 0 auto;
      padding: 7px 9px;
      color: #53389e;
      border-color: #cbb8ef;
      background: #fff;
      font-size: 10px;
    }

    .smart-premium-control {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(145px, 190px);
      align-items: center;
      gap: 12px;
    }

    .smart-premium-control + .smart-premium-control {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid #e7def8;
    }

    .smart-premium-control-label {
      color: #344054;
      font-size: 12px;
      font-weight: 850;
    }

    .smart-premium-control-help {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 500;
      line-height: 1.35;
    }

    .smart-premium-control select {
      width: 100%;
      padding: 8px 9px;
      border: 1px solid #cbb8ef;
      border-radius: 8px;
      color: #344054;
      background: #fff;
      font: inherit;
      font-size: 11px;
      font-weight: 800;
    }

    .student-position-premium-field {
      padding: 11px 12px;
      border: 1px solid #d8c8f5;
      border-radius: 10px;
      background: #faf8ff;
    }

    .student-position-premium-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .student-position-premium-help {
      color: var(--muted);
      font-size: 10px;
      font-weight: 500;
      line-height: 1.4;
    }

    .student-position-premium-help a {
      color: #53389e;
      font-weight: 800;
      text-decoration: none;
    }

    .student-position-premium-help a:hover,
    .student-position-premium-help a:focus-visible {
      text-decoration: underline;
    }

    .student-position-premium-field.locked select {
      cursor: not-allowed;
      color: #98a2b3;
      background: #f2f4f7;
    }

    @media (max-width: 620px) {
      .smart-premium-locked,
      .smart-premium-control {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
      }

      .smart-premium-locked button { width: 100%; }
    }

    .smart-rules {
      margin: 0;
      padding: 12px 14px 12px 32px;
      border-radius: 10px;
      color: #475467;
      background: #f8fafc;
      font-size: 12px;
      line-height: 1.55;
    }

    .smart-rules li + li { margin-top: 4px; }

    .smart-plan-note {
      margin-top: 12px;
      padding: 10px 12px;
      border-left: 4px solid #12b76a;
      border-radius: 7px;
      color: #17663a;
      background: #ecfdf3;
      font-size: 12px;
      font-weight: 750;
      line-height: 1.45;
    }

    .smart-progress-card {
      width: min(600px, 100%);
      grid-template-rows: 1fr auto;
    }

    .smart-progress-body {
      display: grid;
      justify-items: center;
      align-content: center;
      min-height: 270px;
      padding: 26px;
      text-align: center;
    }

    .smart-spinner {
      width: 48px;
      height: 48px;
      margin-bottom: 18px;
      border: 5px solid #dbe7fb;
      border-top-color: var(--primary);
      border-radius: 50%;
      animation: smartSpin .8s linear infinite;
    }

    .smart-spinner[hidden] { display: none; }

    @keyframes smartSpin { to { transform: rotate(360deg); } }

    .smart-progress-body h3 { margin: 0 0 8px; font-size: 20px; }
    .smart-progress-body > p { margin: 0; color: var(--muted); line-height: 1.5; }

    .smart-foundation-report {
      width: 100%;
      margin-top: 18px;
      text-align: left;
    }

    .smart-foundation-summary {
      padding: 12px;
      border: 1px solid #b7dfc5;
      border-radius: 9px;
      color: #17663a;
      background: #eefbf3;
      font-weight: 800;
      line-height: 1.45;
    }

    .smart-foundation-report ul {
      margin: 12px 0 0;
      padding-left: 21px;
      color: #475467;
      line-height: 1.55;
    }


    .smart-quality-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px;
      border: 1px solid;
      border-radius: 12px;
      text-align: left;
    }

    .smart-quality-icon {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      flex: 0 0 42px;
      border-radius: 50%;
      font-size: 22px;
      font-weight: 950;
    }

    .smart-quality-kicker {
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .05em;
      opacity: .8;
    }

    .smart-quality-label {
      margin-top: 2px;
      font-size: 22px;
      font-weight: 900;
      line-height: 1.1;
    }

    .smart-quality-excellent {
      color: #17663a;
      border-color: #98d7b5;
      background: #ecfdf3;
    }

    .smart-quality-excellent .smart-quality-icon {
      color: #fff;
      background: #27864b;
    }

    .smart-quality-good {
      color: #7a5200;
      border-color: #e7c66a;
      background: #fff9e8;
    }

    .smart-quality-good .smart-quality-icon {
      color: #fff;
      background: #b7791f;
    }

    .smart-quality-review {
      color: #9f2a20;
      border-color: #f0aaa3;
      background: #fff1f0;
    }

    .smart-quality-review .smart-quality-icon {
      color: #fff;
      background: #c9362b;
    }

    .smart-final-summary,
    .smart-final-notices {
      margin-top: 12px;
      padding: 12px 14px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #f8fafc;
    }

    .smart-final-summary h4,
    .smart-final-notices h4 {
      margin: 0 0 7px;
      font-size: 13px;
    }

    .smart-final-summary ul,
    .smart-final-notices ul {
      margin: 0;
    }

    .smart-final-all-clear {
      margin-top: 12px;
      padding: 11px 13px;
      border: 1px solid #98d7b5;
      border-radius: 10px;
      color: #17663a;
      background: #ecfdf3;
      font-weight: 800;
      line-height: 1.45;
    }

    .smart-notice-critical { color: #9f2a20; }
    .smart-notice-warning { color: #7a5200; }

    .smart-report-modified {
      margin: 0 0 14px;
      padding: 12px 14px;
      border: 1px solid #e4c66c;
      border-radius: 10px;
      color: #6b4f00;
      background: #fff8df;
      line-height: 1.45;
    }

    .smart-report-modified strong {
      display: block;
      margin-bottom: 3px;
      color: #5f4500;
    }

    .smart-final-details {
      margin-top: 12px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
    }

    .smart-final-details > summary {
      cursor: pointer;
      color: #344054;
      font-size: 12px;
      font-weight: 850;
    }

    .generate-options .stacked-option {
      display: grid;
      gap: 5px;
      margin-top: 10px;
    }

    .generate-options select {
      width: 100%;
      max-width: none;
      padding: 7px 8px;
    }

    .generate-menu .menu-icon {
      display: grid;
      place-items: center;
    }

    .share-menu .menu-icon .icon {
      width: 19px;
      height: 19px;
    }

    .generate-menu .menu-icon .icon {
      width: 20px;
      height: 20px;
    }

    @media (max-width: 1250px) {
      
    }

    @media (max-width: 1180px) {
      
      
      
    }

    @media (max-width: 720px) {
      
      
      
      
      .form-grid { grid-template-columns: 1fr; }
      .form-span-2 { grid-column: auto; }
    }


    /* Compte utilisateur */
    

    

    /* L'attribut hidden doit toujours masquer le lien de compte inactif. */
    

    

    

    

    

    

    @media (max-width: 720px) {
      

      
    }


    /* Le menu Partager doit conserver sa grille malgré les règles générales de la toolbar. */
    .toolbar .share-menu button {
      display: grid;
      grid-template-columns: 28px minmax(0, 1fr);
      align-items: center;
      justify-content: stretch;
      gap: 10px;
    }

    .toolbar .share-menu button > span:last-child {
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 0;
    }

    .toolbar .share-menu .menu-icon {
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      align-self: center;
    }


    /* Contrôle du mode guidé dans la barre d’outils */
    .guided-mode-toggle {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 36px;
      padding: 5px 9px;
      border: 1px solid var(--border);
      border-radius: 9px;
      color: #475467;
      background: #f8fafc;
      cursor: pointer;
      user-select: none;
      white-space: nowrap;
      font-size: 12px;
      font-weight: 800;
    }

    .guided-mode-toggle:hover {
      border-color: #b8c6da;
      background: #f4f7fb;
    }

    .guided-mode-label {
      color: #344054;
    }

    .guided-mode-toggle input {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      opacity: 0;
      pointer-events: none;
    }

    .guided-mode-switch {
      position: relative;
      width: 34px;
      height: 20px;
      flex: 0 0 auto;
      border-radius: 999px;
      background: #cbd5e1;
      transition: background .16s ease;
    }

    .guided-mode-switch::after {
      content: "";
      position: absolute;
      top: 3px;
      left: 3px;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
      transition: transform .16s ease;
    }

    .guided-mode-toggle input:checked + .guided-mode-switch {
      background: var(--primary);
    }

    .guided-mode-toggle input:checked + .guided-mode-switch::after {
      transform: translateX(14px);
    }

    .guided-mode-toggle input:focus-visible + .guided-mode-switch {
      outline: 3px solid rgba(37, 99, 235, .18);
      outline-offset: 2px;
    }

    .guided-mode-state {
      min-width: 24px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
    }

    /* Le choix du mode se fait désormais uniquement depuis la toolbar. */
    .pdc-guide-mode {
      display: none !important;
    }

    /* En mode libre, le parcours disparaît complètement. */
    body.pdc-mode-free .pdc-guidebar {
      display: none !important;
    }

    body.pdc-mode-free.pdc-guide-ready .app {
      grid-template-rows: auto auto minmax(0, 1fr) !important;
    }


    /* Notifications : au-dessus du footer fixe */
    .file-note {
      bottom: 58px;
    }

    @media (max-width: 850px) {
      .file-note {
        bottom: 14px;
      }
    }


    /* Sur les fenêtres étroites, les commandes du plan deviennent compactes. */
    @media (max-width: 900px) {
      .room-controls > .room-control-button,
      .room-controls > .layout-menu-wrapper > .room-control-button,
      .room-controls > .room-tools-menu-wrapper > .room-control-button {
        width: 34px;
        min-width: 34px;
        padding: 6px;
        gap: 0;
      }

      .room-controls > .room-control-button > span,
      .room-controls > .layout-menu-wrapper > .room-control-button > span,
      .room-controls > .room-tools-menu-wrapper > .room-control-button > span {
        display: none;
      }
    }


    /* Bandeau réorganisé : contexte à gauche, Générer au centre, actions à droite */
    .toolbar.toolbar-redesigned {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items: center;
      gap: 18px;
      padding: 8px 10px;
    }

    .toolbar-left,
    .toolbar-right {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .toolbar-left {
      justify-content: flex-start;
    }

    .toolbar-center {
      display: flex;
      align-items: center;
      justify-content: center;
      padding-inline: 8px;
    }

    .toolbar-right {
      justify-content: flex-end;
    }

    .plan-actions-menu-wrapper {
      position: relative;
    }

    .plan-actions-menu {
      left: auto;
      right: 0;
      width: 275px;
    }

    .plan-actions-menu .danger {
      color: var(--danger);
    }

    .plan-actions-menu .danger:hover,
    .plan-actions-menu .danger:focus-visible {
      color: #912018;
      background: #fff1f0;
    }

    .toolbar-history-group {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 3px;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: #f8fafc;
    }

    .toolbar-history-group .mini-button {
      border-color: transparent;
      background: transparent;
    }

    .toolbar-history-group .mini-button:hover,
    .toolbar-history-group .mini-button:focus-visible {
      border-color: #cbd5e1;
      background: #fff;
    }

    .toolbar-zone-separator {
      width: 1px;
      height: 28px;
      margin: 0 2px;
      background: var(--border);
    }

    .toolbar-center .generate-menu-wrapper {
      position: relative;
    }

    .toolbar-center #generateBtn {
      min-height: 42px;
      padding: 9px 19px;
      border-color: var(--primary);
      border-radius: 11px;
      color: #fff;
      background: var(--primary);
      box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08),
        0 5px 14px rgba(37, 99, 235, .22);
      font-size: 14px;
      font-weight: 900;
    }

    .toolbar-center #generateBtn:hover,
    .toolbar-center #generateBtn:focus-visible {
      border-color: var(--primary-dark);
      color: #fff;
      background: var(--primary-dark);
      box-shadow:
        0 0 0 4px rgba(37, 99, 235, .12),
        0 7px 18px rgba(37, 99, 235, .28);
    }

    .toolbar-center #generateBtn .icon {
      width: 20px;
      height: 20px;
    }

    .toolbar-center .generate-menu {
      left: 50%;
      right: auto;
      transform: translateX(-50%);
    }

    .toolbar-right > button:not(.mini-button),
    .toolbar-right > .share-menu-wrapper > .share-button {
      min-height: 36px;
      padding: 8px 10px;
    }

    @media (max-width: 1450px) {
      .toolbar.toolbar-redesigned {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
          "left center"
          "right right";
        gap: 7px 14px;
      }

      .toolbar-left {
        grid-area: left;
        flex-wrap: wrap;
      }

      .toolbar-center {
        grid-area: center;
      }

      .toolbar-right {
        grid-area: right;
        flex-wrap: wrap;
      }
    }

    @media (max-width: 900px) {
      .toolbar.toolbar-redesigned {
        grid-template-columns: 1fr;
        grid-template-areas:
          "left"
          "center"
          "right";
      }

      .toolbar-left,
      .toolbar-right {
        justify-content: center;
        flex-wrap: wrap;
      }

      .toolbar-center {
        padding-block: 2px;
      }
    }


    /* Le menu Générer conserve un alignement régulier malgré les règles générales de la toolbar. */
    .toolbar .generate-menu button {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      align-items: center;
      justify-content: stretch;
      gap: 8px;
      width: 100%;
      text-align: left;
    }

    .toolbar .generate-menu button > span:last-child {
      min-width: 0;
      display: block;
      text-align: left;
    }

    .toolbar .generate-menu .menu-icon {
      width: 34px;
      display: grid;
      place-items: center;
      align-self: center;
    }

    .toolbar-center .generate-menu {
      left: 50%;
      right: auto;
      transform: translateX(-50%);
    }

    /* Le menu des actions du Plan conserve son alignement en grille
       malgré les règles générales des boutons de la toolbar. */
    .toolbar .plan-actions-menu button {
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr);
      align-items: center;
      justify-content: stretch;
      gap: 8px;
      width: 100%;
      text-align: left;
    }

    .toolbar .plan-actions-menu button > span:last-child {
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
    }

    .toolbar .plan-actions-menu .menu-icon {
      width: 30px;
      display: grid;
      place-items: center;
      align-self: center;
    }


/* Mode démonstration */
.demo-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  border-bottom: 1px solid #b7caf0;
  color: #243a63;
  background: #edf4ff;
  font-size: 12px;
  z-index: 19;
}
.demo-banner-copy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.demo-banner-copy strong { color: #1d4ed8; font-size: 13px; }
.demo-banner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.demo-banner button, .demo-banner a {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #a8bce3;
  border-radius: 7px;
  color: #284574;
  background: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.demo-banner .primary { color: #fff; border-color: #2563eb; background: #2563eb; }
.demo-mode .smart-premium-badge::after { content: " · Aperçu"; }
.demo-mode .smart-premium-locked { display: none !important; }
.demo-mode #smartPremiumControls { display: block !important; }
.demo-mode .smart-mixed-free-option { display: none !important; }
.demo-mode .student-position-premium-field.locked { opacity: 1; }
.demo-mode .student-position-premium-field select { pointer-events: auto; }
.demo-premium-note {
  margin: 0 0 12px;
  padding: 9px 10px;
  border: 1px solid #cbb8ef;
  border-radius: 8px;
  color: #53389e;
  background: #f8f5ff;
  font-size: 11px;
  line-height: 1.45;
}
.demo-premium-note a { color: inherit; font-weight: 850; }
.demo-export-notice {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 50;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(20,33,55,.88);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}
@media (max-width: 850px) {
  .demo-banner { align-items: stretch; flex-direction: column; }
  .demo-banner-actions { justify-content: center; }
}

/* Réserve la place des commandes d’épinglage et de retrait dans les sièges. */
.seat.occupied .student-name {
  padding-inline: 9px;
}

.mobile-generator-note {
  display: none;
  margin: 0;
  padding: 9px 14px;
  color: #475467;
  background: #fff8e8;
  border-bottom: 1px solid #f1d799;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 600px) {
  .mobile-generator-note { display: block; }
}


@media (max-width: 760px) {
  .save-status-group { max-width: 42vw; }
  .save-status-message { font-size: 10px; }
}


    /* Import Pronote : préparation rapide des profils. */
    .pronote-import-card {
      width: min(980px, 100%);
      max-height: min(860px, 92vh);
    }

    .pronote-import-card .modal-header > div { min-width: 0; }

    .pronote-import-summary {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
    }

    .pronote-import-body {
      display: grid;
      gap: 12px;
      min-height: 0;
    }

    .pronote-class-field {
      display: grid;
      grid-template-columns: auto minmax(180px, 310px);
      align-items: center;
      justify-content: start;
      gap: 10px;
      color: #344054;
      font-size: 13px;
      font-weight: 800;
    }

    .pronote-class-field input {
      width: 100%;
      padding: 9px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      background: #fff;
    }

    .pronote-class-field input:focus,
    .pronote-score-input:focus {
      outline: 3px solid rgba(37,99,235,.14);
      border-color: var(--primary);
    }

    .pronote-import-tools {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 7px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .pronote-import-tools button {
      padding: 7px 9px;
      font-size: 11px;
    }

    .pronote-keyboard-help {
      margin: -2px 0 0;
      padding: 9px 11px;
      border-radius: 8px;
      color: #344054;
      background: #f4f7fb;
      font-size: 11px;
      line-height: 1.45;
    }

    .pronote-table-wrap {
      min-height: 220px;
      max-height: 500px;
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: 10px;
    }

    .pronote-import-table {
      width: 100%;
      min-width: 650px;
      border-collapse: collapse;
      font-size: 12px;
    }

    .pronote-import-table th,
    .pronote-import-table td {
      padding: 7px 9px;
      border-bottom: 1px solid #e8edf3;
      text-align: left;
    }

    .pronote-import-table th {
      position: sticky;
      top: 0;
      z-index: 2;
      color: #344054;
      background: #f8fafc;
      font-size: 11px;
      text-align: center;
    }

    .pronote-import-table th:first-child { text-align: left; }
    .pronote-import-table tbody tr:last-child td { border-bottom: 0; }
    .pronote-import-table tbody tr:focus-within { background: #f5f8ff; }

    .pronote-student-name {
      min-width: 220px;
      font-weight: 800;
    }

    .pronote-center-cell { text-align: center !important; }

    .pronote-gender {
      display: inline-grid;
      place-items: center;
      min-width: 28px;
      min-height: 24px;
      border: 1px solid var(--neutral-border);
      border-radius: 6px;
      background: var(--neutral-bg);
      font-weight: 850;
    }

    .pronote-gender.gender-male {
      color: var(--male-text);
      background: var(--male-bg);
      border-color: var(--male-border);
    }

    .pronote-gender.gender-female {
      color: var(--female-text);
      background: var(--female-bg);
      border-color: var(--female-border);
    }

    .pronote-gender-select {
      min-width: 48px;
      min-height: 30px;
      border: 1px solid var(--neutral-border);
      border-radius: 7px;
      background: var(--neutral-bg);
      font: inherit;
      font-weight: 850;
      text-align: center;
      cursor: pointer;
    }

    .pronote-gender-select.gender-male {
      color: var(--male-text);
      background: var(--male-bg);
      border-color: var(--male-border);
    }

    .pronote-gender-select.gender-female {
      color: var(--female-text);
      background: var(--female-bg);
      border-color: var(--female-border);
    }

    .pronote-import-table input[type="checkbox"] {
      width: 19px;
      height: 19px;
      accent-color: var(--primary);
      cursor: pointer;
    }

    .pronote-score-input {
      width: 46px;
      height: 34px;
      padding: 5px;
      border: 1px solid var(--border);
      border-radius: 7px;
      text-align: center;
      font-weight: 850;
    }

    .pronote-position-select {
      min-width: 112px;
      height: 34px;
      padding: 5px 27px 5px 8px;
      border: 1px solid var(--border);
      border-radius: 7px;
      color: var(--text);
      background: #fff;
      font: inherit;
      font-weight: 750;
    }

    .pronote-premium-label {
      display: inline-block;
      margin-left: 3px;
      padding: 2px 5px;
      border-radius: 999px;
      color: #53389e;
      background: #eee7ff;
      font-size: 8px;
      font-weight: 900;
      letter-spacing: .03em;
      text-transform: uppercase;
      vertical-align: middle;
    }

    .pronote-footer-help {
      color: var(--muted);
      font-size: 11px;
    }

    /* Modification directe du niveau et du comportement. */
    .student-score-button {
      appearance: none;
      min-width: 0;
      padding: 1px 5px !important;
      border-radius: 6px;
      line-height: 1.2;
      cursor: pointer;
    }

    .student-score-button:not(.score-1):not(.score-2):not(.score-3):not(.score-4) {
      color: #667085;
      background: rgba(255,255,255,.7);
      border-color: rgba(70,80,95,.16);
    }

    .student-score-button:hover,
    .student-score-button:focus-visible {
      transform: translateY(-1px);
      outline: 2px solid rgba(37,99,235,.22);
      outline-offset: 1px;
    }

    .quick-score-popover {
      position: fixed;
      z-index: 2600;
      width: max-content;
      max-width: calc(100vw - 16px);
      padding: 9px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      box-shadow: 0 14px 36px rgba(15,23,42,.22);
    }

    .quick-score-popover[hidden] { display: none; }

    .quick-score-title {
      max-width: 280px;
      margin-bottom: 7px;
      overflow: hidden;
      color: #344054;
      font-size: 11px;
      font-weight: 800;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .quick-score-buttons {
      display: flex;
      gap: 5px;
    }

    .quick-score-buttons button {
      display: inline-grid;
      place-items: center;
      width: 34px;
      height: 32px;
      padding: 0;
      font-size: 12px;
      font-weight: 900;
    }

    .quick-score-buttons button[aria-pressed="true"] {
      outline: 3px solid rgba(37,99,235,.22);
      outline-offset: 1px;
    }

    @media (max-width: 700px) {
      .pronote-import-card { max-height: 94vh; }
      .pronote-class-field { grid-template-columns: 1fr; gap: 6px; }
      .pronote-import-tools { align-items: stretch; }
      .pronote-import-tools span { width: 100%; }
      .pronote-import-tools button { flex: 1; }
      .pronote-footer-help { display: none; }
    }


/* Correctif 2026-07-17 : menu Classe aligné et bandeau toujours sur une ligne. */
.toolbar .class-menu button {
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  column-gap: 10px;
  padding: 10px;
  text-align: left;
}

.toolbar .class-menu button > .menu-icon {
  width: 32px;
  min-width: 32px;
  display: grid;
  place-items: center;
  align-self: center;
  padding: 0;
}

.toolbar .class-menu button > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.toolbar .class-template-section button {
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 9px 10px;
}

.toolbar.toolbar-redesigned {
  display: grid !important;
  grid-template-columns: auto minmax(56px, 1fr) auto !important;
  grid-template-areas: none !important;
  align-items: center;
  column-gap: clamp(8px, 1.25vw, 22px);
  row-gap: 0;
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap !important;
}

.toolbar-left {
  grid-column: 1;
  justify-self: start;
  justify-content: flex-start;
}

.toolbar-center {
  grid-column: 2;
  width: 100%;
  justify-self: stretch;
  justify-content: center;
  padding-inline: 0;
  container-type: inline-size;
}

.toolbar-right {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
}

.toolbar-center .generate-menu-wrapper {
  max-width: 100%;
}

.toolbar-center #generateBtn {
  max-width: 100%;
  white-space: nowrap;
}

@container (max-width: 125px) {
  .toolbar-center #generateBtn {
    width: 44px;
    min-width: 44px;
    padding-inline: 0;
    gap: 0;
  }

  .toolbar-center #generateBtn > span {
    display: none;
  }
}

@media (max-width: 980px) {
  .toolbar.toolbar-redesigned {
    grid-template-columns: auto minmax(44px, 1fr) auto !important;
    overflow-x: auto;
    overflow-y: visible;
  }

  .toolbar-center #generateBtn > span {
    display: none;
  }

  .toolbar-center #generateBtn {
    width: 42px;
    min-width: 42px;
    padding-inline: 0;
    gap: 0;
  }
}


/* Correctif menus Classe / Plan : largeur maîtrisée et absence de débordement horizontal. */
.toolbar .class-menu,
.toolbar .plan-actions-menu {
  width: min(330px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  overflow-x: hidden;
}

.toolbar .class-menu button,
.toolbar .plan-actions-menu button {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
}

.toolbar .class-menu button > span:last-child,
.toolbar .plan-actions-menu button > span:last-child {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.toolbar .class-menu .menu-subtitle,
.toolbar .plan-actions-menu .menu-subtitle {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Bandeau principal — définition unique et responsive (2026-07-17). */
.toolbar.toolbar-redesigned {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center;
  gap: clamp(6px, .8vw, 12px);
  width: 100%;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: nowrap !important;
  min-width: 0;
}

.toolbar-left {
  flex: 0 1 auto;
  gap: 5px;
  overflow: visible;
}

.toolbar-center {
  flex: 1 1 90px;
  min-width: 44px;
  justify-content: center;
  container-type: inline-size;
}

.toolbar-right {
  position: relative;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 5px;
}

.toolbar-left > .toolbar-group {
  flex: 0 1 auto;
  min-width: 0;
}

.toolbar-group,
.toolbar-group label {
  min-width: 0;
  flex-wrap: nowrap;
}

.toolbar-group label {
  display: flex;
  align-items: center;
}

.toolbar-field-label {
  flex: 0 0 auto;
}

.toolbar select {
  min-width: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#classSelect {
  width: clamp(105px, 10vw, 145px);
  max-width: 145px;
}

#planSelect {
  width: clamp(82px, 8vw, 120px);
  max-width: 120px;
}

/* Ces anciennes actions ne doivent jamais réapparaître hors du menu « … ». */
.class-actions-legacy {
  display: none !important;
}

/* Ouvrir et Partager restent volontairement compacts, quelle que soit la largeur. */
#importPlanBtn,
#shareBtn {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0 !important;
}

#importPlanBtn > span,
#shareBtn > span,
.toolbar-zone-separator {
  display: none !important;
}

.toolbar-center .generate-menu-wrapper {
  max-width: 100%;
}

.toolbar-center #generateBtn {
  max-width: 100%;
  min-height: 42px;
  padding-inline: 16px;
  white-space: nowrap;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .10), 0 8px 18px rgba(37, 99, 235, .20);
}

/* Le libellé Générer disparaît dès que sa zone centrale devient étroite. */
@container (max-width: 132px) {
  .toolbar-center #generateBtn {
    width: 44px;
    min-width: 44px;
    padding-inline: 0;
    gap: 0;
  }

  .toolbar-center #generateBtn > span {
    display: none;
  }
}

#verifyBtn {
  min-height: 38px;
  padding-inline: 10px;
  gap: 5px;
}

.tracking-toolbar-button {
  min-height: 38px;
  padding-inline: 11px;
  gap: 6px;
  color: #174ea6;
  background: #eef4ff;
  border-color: #9dbaf3;
  white-space: nowrap;
}

.tracking-toolbar-button:hover,
.tracking-toolbar-button:focus-visible {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

@media (max-width: 1320px) {
  .tracking-toolbar-button {
    width: 38px;
    min-width: 38px;
    padding-inline: 0;
    gap: 0;
  }

  .tracking-toolbar-button > span {
    display: none;
  }
}

/* Réduction progressive, sans retour à la ligne ni chevauchement. */
@media (max-width: 1320px) {
  #verifyBtn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    gap: 0;
  }

  #verifyBtn > span {
    display: none;
  }

  #classSelect {
    width: clamp(96px, 9vw, 125px);
  }

  #planSelect {
    width: clamp(76px, 7vw, 105px);
  }
}

@media (max-width: 1160px) {
  .toolbar.toolbar-redesigned {
    gap: 6px;
    padding-inline: 7px;
  }

  #classSelect {
    width: 105px;
  }

  #planSelect {
    width: 82px;
  }

  .guided-mode-toggle {
    gap: 4px;
    padding-inline: 6px;
  }

  .guided-mode-state {
    display: none !important;
  }

  .toolbar-center #generateBtn > span {
    display: none;
  }

  .toolbar-center #generateBtn {
    width: 44px;
    min-width: 44px;
    padding-inline: 0;
    gap: 0;
  }
}

@media (max-width: 980px) {
  #classSelect {
    width: 88px;
  }

  #planSelect {
    width: 72px;
  }

  .toolbar-history-group {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .toolbar-field-label,
  .guided-mode-label {
    display: none !important;
  }

  #classSelect {
    width: 92px;
  }

  #planSelect {
    width: 76px;
  }
}

/* Menus Classe et Plan : une colonne d’icônes stable, aucun débordement horizontal. */
.toolbar .class-menu,
.toolbar .plan-actions-menu {
  width: min(305px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  overflow-x: hidden;
}

.toolbar .class-menu button,
.toolbar .plan-actions-menu button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 10px;
  text-align: left;
}

.toolbar .class-menu button > .menu-icon,
.toolbar .plan-actions-menu button > .menu-icon {
  width: 32px;
  min-width: 32px;
  display: grid;
  place-items: center;
  padding: 0;
}

.toolbar .class-menu button > span:last-child,
.toolbar .plan-actions-menu button > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.toolbar .class-menu .menu-subtitle {
  white-space: normal;
}

/* Harmonisation des menus Partager, Classe et Plan. */

.toolbar .share-menu button {

  width: 100%;

  min-width: 0;

  min-height: 0;

  display: grid;

  grid-template-columns: 32px minmax(0, 1fr);

  align-items: center;

  justify-content: stretch;

  column-gap: 10px;

  padding: 10px;

  border: 0;

  text-align: left;

  font-weight: 800;

  line-height: normal;

}

.toolbar .share-menu button > .menu-icon {

  width: 32px;

  min-width: 32px;

  height: auto;

  display: grid;

  place-items: center;

  align-self: center;

  padding: 0;

}

.toolbar .share-menu button > span:last-child {

  min-width: 0;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  justify-content: center;

  padding: 0;

  text-align: left;

  white-space: normal;

}
