/* ============================================================
   TITULATOR — Styles
   ============================================================ */

:root {
  --color-e:   #1a6e1a;
  --color-tbp: #2e8b2e;
  --color-tb:  #3da83d;
  --color-bp:  #5cb85c;
  --color-b:   #80c780;
  --color-ab:  #a8d5a2;
  --color-s:   #f0c040;
  --color-f:   #e8a020;
  --color-fi:  #d06010;
  --color-i:   #c0392b;
}

body { background: #f8f9fa; }

/* Mentions */
.mention-badge {
  display: inline-block;
  padding: 0.2em 0.55em;
  border-radius: 4px;
  font-weight: 700;
  font-size: .85em;
  color: #fff;
  min-width: 2.5rem;
  text-align: center;
}
.mention-e   { background: var(--color-e);   }
.mention-tbp { background: var(--color-tbp); }
.mention-tb  { background: var(--color-tb);  }
.mention-bp  { background: var(--color-bp); color: #222; }
.mention-b   { background: var(--color-b);  color: #222; }
.mention-ab  { background: var(--color-ab); color: #222; }
.mention-s   { background: var(--color-s);  color: #222; }
.mention-f   { background: var(--color-f);  }
.mention-fi  { background: var(--color-fi); }
.mention-i   { background: var(--color-i);  }

/* Résultats : colorisation des cellules */
.pct-fail { background: #fde8e8 !important; color: #c0392b; font-weight: 600; }
.pct-warn { background: #fef8e8 !important; }
.pct-ok   { background: #eafaf1 !important; }

/* Synthèse tableau */
.synth-table th { font-size: .78rem; white-space: nowrap; }
.synth-table td { font-size: .82rem; }
.synth-table th.course-col,
.synth-table td.course-col { writing-mode: horizontal-tb; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }

/* Photo élève */
.student-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dee2e6;
}
.student-initials {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Cards dashboard */
.class-card { cursor: pointer; transition: box-shadow .15s; }
.class-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.class-card.active-class { border: 2px solid #0d6efd; }

/* ============================================================
   IMPRESSION / PDF
   ============================================================ */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .container-fluid { padding: 0 !important; }
  .synth-table th, .synth-table td { font-size: 8pt; padding: 3px 4px !important; }
  .mention-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pct-fail, .pct-warn, .pct-ok { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { text-decoration: none; color: inherit; }
  .print-header { display: block !important; }
  .page-break { page-break-after: always; }
}

.print-header { display: none; }

/* Encoding grid */
.encoding-grid input[type=number] {
  width: 80px;
  text-align: right;
}

/* Drag handle pour réordonnancement */
.drag-handle { cursor: move; color: #aaa; }
.drag-handle:hover { color: #333; }
