:root{--bg:#eef2f7;--card:#fff;--line:#dbe3ee;--text:#0f172a;--muted:#64748b;--blue:#2563eb;--green:#16a34a;--orange:#f59e0b;--red:#dc2626;--dark:#334155}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:Arial,sans-serif;color:var(--text)}.container{width:min(1440px,96vw);margin:18px auto}.nav{display:flex;gap:8px;flex-wrap:wrap;background:rgba(255,255,255,.82);border-radius:16px;padding:8px;margin-bottom:14px;box-shadow:0 8px 24px rgba(15,23,42,.06)}.nav a{padding:10px 13px;border-radius:11px;text-decoration:none;color:var(--dark);font-weight:800}.nav a:hover,.nav a.active{background:#eff6ff;color:#1d4ed8}.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px 20px;box-shadow:0 10px 28px rgba(15,23,42,.06);margin-bottom:14px}h1,h2,h3{margin-top:0}.hero{display:flex;align-items:center;justify-content:space-between;gap:16px}.muted,.small{color:var(--muted)}.small{font-size:13px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}th,td{padding:10px 12px;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top}tr:last-child td{border-bottom:0}th{background:#f1f5f9;color:#334155;font-size:12px;text-transform:uppercase;letter-spacing:.035em}.btn,button{display:inline-block;border:0;border-radius:10px;background:var(--blue);color:#fff;padding:9px 12px;font-weight:800;text-decoration:none;cursor:pointer}.btn.secondary{background:var(--dark)}.btn.danger{background:var(--red)}.btn.green{background:var(--green)}input,select,textarea{width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:11px;font-size:15px;background:#fff}label{display:block;font-weight:800;margin:10px 0 5px}.pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-weight:850;font-size:13px;border:1px solid var(--line);background:#f8fafc}.pill.good,.factor.green{background:#dcfce7;color:#166534;border-color:#bbf7d0}.pill.warn,.factor.orange{background:#fef3c7;color:#92400e;border-color:#fde68a}.pill.bad,.factor.red{background:#fee2e2;color:#991b1b;border-color:#fecaca}.pill.neutral{background:#eef2ff;color:#3730a3}.pill.muted{background:#f1f5f9;color:#64748b}.factor{border-radius:12px;padding:8px 10px;margin:4px 0;font-weight:800}.factor small{display:block;font-weight:600;color:inherit;opacity:.82;margin-top:2px}.dashboard-row{transition:.12s}.dashboard-row:hover td{background:#f8fafc}.priority{font-size:22px}.student-name{font-weight:900;color:#0f172a}.kpi{padding:14px;border-radius:16px;background:#f8fafc;border:1px solid var(--line)}.kpi strong{display:block;font-size:25px}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.import-card{border:1px solid var(--line);border-radius:16px;padding:14px;background:#fbfdff}.warning{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;border-radius:12px;padding:12px}.error-card{border-color:#fecaca}.table-scroll{overflow-x:auto}@media(max-width:850px){.grid,.grid3{grid-template-columns:1fr}.hero{display:block}.nav a,.btn,button{width:100%;text-align:center}table{font-size:13px}th,td{padding:8px}}



/* V1.3 — compteurs catégories corrigés */
.dashboard-hero { margin-bottom: 12px; }
.compact-subtitle { margin: 4px 0 0; }
.filter-form {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: wrap;
}
.filter-form > div { min-width: 170px; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(135px, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 10px 28px rgba(15,23,42,.055);
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #cbd5e1;
}
.stat-number {
    display: block;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.04em;
    color: #0f172a;
}
.stat-label {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.stat-total { background: #eff6ff; border-color: #bfdbfe; }
.stat-total::before { background: #2563eb; }
.stat-total .stat-number { color: #1d4ed8; }
.stat-premiere::before { background: #16a34a; }
.stat-terminale::before { background: #f59e0b; }
.stat-l1sps::before { background: #7c3aed; }
.stat-las2::before { background: #dc2626; }
.stat-autre::before { background: #64748b; }
@media(max-width:1100px){
    .stats-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}
@media(max-width:850px){
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-form { display: grid; grid-template-columns: 1fr; }
    .filter-form > div { min-width: 0; }
}
@media(max-width:520px){
    .stats-grid { grid-template-columns: 1fr; }
}

/* V1.5 — résumé de mise à jour étudiants */
.success-card {
    border-left: 6px solid #16a34a;
    background: #f0fdf4;
}
.update-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.update-summary div {
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 12px;
}
.update-summary strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: #166534;
}
.update-summary span {
    display: block;
    margin-top: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}
@media (max-width: 900px) {
    .update-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* V1.6 — filtre catégorie accueil */
.compact-info {
    padding: 12px 16px;
    border-left: 4px solid #2563eb;
}
.filter-form select {
    min-width: 190px;
}

/* V1.8 — imports : notes à corriger + zone de reset tests */
.section-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.section-title-row h2{margin-bottom:4px}
.badge{display:inline-flex;align-items:center;border-radius:999px;padding:7px 11px;font-weight:800;font-size:13px;white-space:nowrap}
.danger-badge{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}
.problem-pill{display:inline-flex;align-items:center;border-radius:999px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;padding:4px 8px;font-size:12px;font-weight:800}
.danger-zone{border-color:#fecaca;background:#fffafa}
.reset-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px;margin-top:12px}
.reset-grid form{margin:0}.reset-grid button{width:100%}.hard-danger{background:#7f1d1d!important}
@media(max-width:1000px){.reset-grid{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.section-title-row{display:block}.reset-grid{grid-template-columns:1fr}}

.actions-cell { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.actions-cell form { margin:0; }
.small-action { padding:7px 9px; border-radius:9px; font-size:12px; white-space:nowrap; }
button.ghost { background:#e2e8f0; color:#0f172a; }

/* V1.10 — résultats fac S1 */
.warning-badge{background:#fef3c7;color:#92400e;border:1px solid #fde68a}
.inline-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.inline-form input{max-width:130px;padding:9px 10px;border-radius:10px}
.inline-form button{white-space:nowrap}
.fac-edit-form{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px;margin-bottom:14px}
.fac-edit-form label{margin-top:0}
@media(max-width:700px){.inline-form{display:grid;grid-template-columns:1fr}.inline-form input{max-width:none}}

/* V1.12 — classement fac toujours visible */
.fac-cell strong { color:#1e3a8a; }
.fac-rank { background:#dbeafe; color:#1e40af; border-color:#bfdbfe; font-weight:900; }
@media (min-width: 900px) {
  .dashboard-row td:nth-child(5) { min-width: 150px; }
  .dashboard-row td:nth-child(6) { min-width: 190px; }
}

/* V1.14 — tri et classement fac plus lisible */
.dashboard-controls { grid-template-columns: 1fr 1fr 1fr 1fr auto; align-items:end; }
.dashboard-table th { white-space: nowrap; }
.sort-link { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.sort-link:hover { color: #2563eb; }
.fac-box { display:flex; flex-direction:column; gap:4px; align-items:flex-start; }
.fac-title { font-weight:800; color:#111827; }
.fac-ranking { display:inline-flex; align-items:center; border-radius:999px; padding:5px 10px; background:#eef2ff; border:1px solid #c7d2fe; color:#312e81; font-weight:900; font-size:15px; }
.fac-detail { color:#64748b; font-size:12px; line-height:1.25; }
@media (max-width: 980px) { .dashboard-controls { grid-template-columns: 1fr 1fr; } .dashboard-controls button { grid-column:1 / -1; } }
@media (max-width: 640px) { .dashboard-controls { grid-template-columns: 1fr; } }

/* V1.15 — tableau d'accueil plus compact */
.dashboard-table th,
.dashboard-table td {
    padding: 7px 10px;
    vertical-align: middle;
}
.dashboard-table .student-name {
    font-size: 15px;
    line-height: 1.1;
}
.dashboard-table .small {
    font-size: 12px;
    line-height: 1.15;
}
.dashboard-row td {
    height: auto;
}
.dashboard-table .pill {
    padding: 3px 8px;
    font-size: 12px;
    line-height: 1.1;
}
.dashboard-table .btn {
    padding: 8px 12px;
    border-radius: 10px;
}
.dashboard-table .fac-box {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.dashboard-table .fac-title {
    font-size: 13px;
    color: #1e293b;
}
.dashboard-table .fac-ranking {
    padding: 4px 8px;
    font-size: 14px;
    line-height: 1;
}
.dashboard-table .fac-detail {
    display: none;
}
.dashboard-table td:nth-child(6) strong {
    font-size: 13px;
    margin-right: 6px;
}
.dashboard-table td:nth-child(6) br {
    display: none;
}
.dashboard-table td:nth-child(6) .small {
    white-space: nowrap;
}
.dashboard-table .factor {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    max-width: 260px;
    margin: 0;
    padding: 7px 10px;
    border-radius: 12px;
    line-height: 1.1;
}
.dashboard-table .factor small {
    font-size: 11px;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 900px) {
    .dashboard-row td:nth-child(1) { min-width: 260px; }
    .dashboard-row td:nth-child(5) { min-width: 120px; }
    .dashboard-row td:nth-child(6) { min-width: 210px; }
    .dashboard-row td:nth-child(7) { min-width: 230px; }
}

/* V1.16 — 4 tableaux de bord distincts par catégorie */
.category-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}
.category-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 8px 22px rgba(15,23,42,.045);
}
.category-tab span { font-weight: 900; }
.category-tab strong {
    min-width: 36px;
    text-align: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f1f5f9;
    color: #334155;
}
.category-tab.active {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}
.category-tab.active strong { background: #2563eb; color: #fff; }
.slim-controls { grid-template-columns: minmax(180px, 260px) auto; }
.compact-stats { display: none; }
.dashboard-summary { margin-top: 0; }
.category-dashboard th,
.category-dashboard td { vertical-align: middle; }
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #312e81;
    font-weight: 950;
    line-height: 1;
}
.result-title {
    display: inline-block;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 850;
    margin-right: 8px;
    vertical-align: middle;
}
.result-line {
    display: inline-block;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}
.receive-badge {
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:4px 9px;
    font-size:12px;
    font-weight:900;
    border:1px solid var(--line);
}
.receive-badge.yes { background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.receive-badge.no { background:#f8fafc; color:#64748b; }
.category-dashboard.category-l1sps td:nth-child(3),
.category-dashboard.category-l1sps th:nth-child(3) { text-align: center; }
.category-dashboard.category-premiere_sante td:nth-child(2),
.category-dashboard.category-premiere_sante th:nth-child(2),
.category-dashboard.category-terminale_sante td:nth-child(2),
.category-dashboard.category-terminale_sante th:nth-child(2),
.category-dashboard.category-las2 td:nth-child(2),
.category-dashboard.category-las2 th:nth-child(2) { text-align: center; }
@media(max-width:900px){
    .category-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .slim-controls { grid-template-columns: 1fr; }
}
@media(max-width:560px){
    .category-tabs { grid-template-columns: 1fr; }
    .result-title, .result-line { display:block; white-space:normal; }
}

/* V1.18 — plusieurs résultats visibles + renommage évaluations */
.results-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 280px;
  max-width: 520px;
}
.result-mini {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  line-height: 1.12;
}
.result-mini-title {
  font-weight: 800;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-mini-meta {
  color: #475569;
  font-size: 12px;
  flex: 0 0 auto;
}
.category-dashboard th:nth-child(4),
.category-dashboard td:nth-child(4) {
  min-width: 360px;
}
.rename-eval-table input,
.rename-eval-table select {
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 13px;
}
.rename-eval-table th,
.rename-eval-table td {
  padding: 7px 8px;
  vertical-align: middle;
}
.rename-eval-table td:nth-child(4) { min-width: 260px; }
.rename-eval-table td:nth-child(5) { min-width: 140px; }
.rename-eval-table td:nth-child(6) { min-width: 105px; }
.rename-eval-form { margin: 0; }
@media (max-width: 900px) {
  .result-mini { white-space: normal; align-items: flex-start; flex-direction: column; gap: 1px; }
  .results-stack { min-width: 220px; }
}

/* V1.19 — résultats en colonnes comparables */
.dashboard-table th { white-space: nowrap; }
.dashboard-table th .sort-link { display:inline-flex; align-items:center; gap:4px; }
.eval-cell { white-space: nowrap; font-size: 13px; line-height: 1.15; }
.eval-cell strong { font-size: 14px; }
.eval-cell .small { margin-left: 3px; }
.mini-z { display:inline-flex; align-items:center; border-radius:999px; padding:2px 6px; font-size:11px; font-weight:800; margin-left:3px; }
.category-dashboard td { vertical-align: middle; }
.category-dashboard td:nth-child(n+4) { min-width: 105px; }
@media (max-width: 900px) {
    .eval-cell { font-size: 12px; }
    .eval-cell strong { font-size: 13px; }
}

/* V1.20 — tableau comparatif compact */
.dashboard-table {
  table-layout: auto;
  font-size: 13px;
}
.dashboard-table th,
.dashboard-table td {
  padding: 7px 10px;
  height: 38px;
}
.dashboard-table th {
  font-size: 11px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.student-link {
  color: #0f172a;
  text-decoration: none;
  font-weight: 900;
  font-size: 13.5px;
  white-space: nowrap;
}
.student-link:hover { color: #2563eb; text-decoration: underline; }
.category-dashboard td:first-child,
.category-dashboard th:first-child { min-width: 250px; }
.category-dashboard td:nth-child(n+4),
.category-dashboard th:nth-child(n+4) { min-width: 74px; max-width: 125px; text-align: center; }
.category-dashboard.category-l1sps td:nth-child(4),
.category-dashboard.category-l1sps th:nth-child(4) { min-width: 64px; max-width: 70px; text-align:center; }
.category-dashboard.category-l1sps td:nth-child(n+5),
.category-dashboard.category-l1sps th:nth-child(n+5) { min-width: 78px; max-width: 110px; text-align:center; }
.rank-badge {
  padding: 4px 8px;
  font-size: 13px;
  min-width: 46px;
}
.pill {
  padding: 4px 8px;
  font-size: 12px;
  min-width: 42px;
  justify-content: center;
}
.avg-score {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#0f172a;
}
.eval-score {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 42px;
  border-radius: 9px;
  padding: 4px 7px;
  font-weight: 900;
  line-height: 1;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  cursor: help;
}
.eval-score.good { background:#dcfce7; border-color:#bbf7d0; color:#166534; }
.eval-score.neutral { background:#f8fafc; border-color:#e2e8f0; color:#334155; }
.eval-score.warn { background:#fef3c7; border-color:#fde68a; color:#92400e; }
.eval-score.bad { background:#fee2e2; border-color:#fecaca; color:#991b1b; }
.receive-toggle { margin:0; display:flex; justify-content:center; }
.receive-check {
  width:24px;
  height:24px;
  border-radius:8px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#166534;
  font-weight:950;
  cursor:pointer;
  line-height:1;
}
.receive-check.checked { background:#dcfce7; border-color:#86efac; }
.receive-check:hover { border-color:#2563eb; }
.category-dashboard .btn { padding: 5px 8px; font-size: 12px; border-radius:8px; }
@media (max-width: 900px) {
  .category-dashboard td:first-child,
  .category-dashboard th:first-child { min-width: 210px; }
  .category-dashboard td:nth-child(n+4),
  .category-dashboard th:nth-child(n+4) { min-width: 70px; }
}

/* V2.0 — tableau L1SPS consolidé par vues */
.view-toolbar {
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    padding:10px 14px;
}
.segmented {
    display:inline-flex;
    border:1px solid #dbe3ee;
    background:#f8fafc;
    border-radius:12px;
    padding:4px;
    gap:4px;
}
.segmented a {
    text-decoration:none;
    color:#334155;
    font-weight:800;
    font-size:13px;
    padding:7px 10px;
    border-radius:9px;
}
.segmented a.active { background:#2563eb; color:white; }
.small-segmented a { padding:7px 12px; }
.ux-note { color:#64748b; font-size:13px; font-weight:700; }
.dashboard-table.view-synthese th,
.dashboard-table.view-synthese td,
.dashboard-table.view-matieres th,
.dashboard-table.view-matieres td {
    text-align:center;
    white-space:nowrap;
}
.dashboard-table.view-synthese th:first-child,
.dashboard-table.view-synthese td:first-child,
.dashboard-table.view-matieres th:first-child,
.dashboard-table.view-matieres td:first-child { text-align:left; }
.ue-score, .eval-score, .avg-score {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:42px;
    height:26px;
    padding:0 8px;
    border-radius:9px;
    font-weight:900;
    font-size:13px;
    border:1px solid #e2e8f0;
    background:#f8fafc;
    color:#0f172a;
}
.eval-score.good, .ue-score.good { background:#dcfce7; border-color:#bbf7d0; color:#166534; }
.eval-score.warn, .ue-score.warn { background:#fef3c7; border-color:#fde68a; color:#92400e; }
.eval-score.bad, .ue-score.bad { background:#fee2e2; border-color:#fecaca; color:#991b1b; }
.eval-score.neutral, .ue-score.neutral { background:#f8fafc; color:#334155; }
.ue-count {
    display:block;
    margin-top:2px;
    font-size:10px;
    color:#94a3b8;
    font-weight:700;
}
.ue24-col { background:#f8f5ff !important; }
th.ue24-col a::after { content:' '; }
.rank-badge {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:42px;
    height:26px;
    border-radius:999px;
    background:#eef2ff;
    color:#3730a3;
    font-weight:900;
    font-size:13px;
}
.dashboard-table td { height:38px; }
.dashboard-table th { font-size:12px; }
.student-link { font-weight:850; text-decoration:none; color:#0f172a; }
.student-link:hover { color:#2563eb; }
@media (max-width: 900px) {
    .view-toolbar { align-items:flex-start; }
    .segmented { overflow-x:auto; max-width:100%; }
}

/* V2.2 - Import créneaux TD en texte brut */
.td-raw-card textarea,
.td-raw-textarea {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre;
}
.compact-table th,
.compact-table td {
  padding: 7px 9px;
  font-size: 13px;
}
.compact-table .small { font-size: 12px; }

/* V2.6 — présence TD : pourcentage + mini-frise verticale */
.td-presence-compact {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1.05;
    white-space: nowrap;
    min-width: 48px;
}
.td-presence-compact .pill {
    line-height: 1;
}
.td-dot-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 12px;
}
.td-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.18);
    cursor: help;
}
.td-dot.present { background: #22c55e; }
.td-dot.absent { background: #ef4444; }

/* V2.7 — spécialités 1 / 2 */
.specialites-short {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:64px;
    border-radius:999px;
    padding:4px 8px;
    background:#f8fafc;
    border:1px solid #dbe3ee;
    color:#334155;
    font-weight:850;
    font-size:12px;
    white-space:nowrap;
}
.specialites-form {
    margin-top:10px;
    padding-top:10px;
    border-top:1px solid #e5e7eb;
}
.specialites-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.specialites-form label {
    margin-top:0;
    font-size:12px;
    color:#475569;
}
.specialites-form select {
    padding:8px 9px;
    border-radius:10px;
    font-size:14px;
}
.small-button {
    margin-top:8px;
    padding:7px 10px;
    border-radius:9px;
    font-size:13px;
}
@media(max-width:700px){
    .specialites-grid { grid-template-columns:1fr; }
}

/* V2.8 — sélection rapide Spé 1 / Spé 2 depuis le tableau */
.specialites-picker {
    position: relative;
    display: inline-block;
    text-align: left;
}
.specialites-picker summary {
    list-style: none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:76px;
    border-radius:999px;
    padding:4px 10px;
    background:#f8fafc;
    border:1px solid #dbe3ee;
    color:#334155;
    font-weight:850;
    font-size:12px;
    white-space:nowrap;
    cursor:pointer;
}
.specialites-picker summary::-webkit-details-marker { display:none; }
.specialites-picker[open] summary {
    background:#eff6ff;
    border-color:#93c5fd;
    color:#1d4ed8;
}
.specialites-picker form {
    position:absolute;
    z-index:50;
    right:0;
    top:calc(100% + 6px);
    width:250px;
    background:#ffffff;
    border:1px solid #dbe3ee;
    border-radius:14px;
    box-shadow:0 18px 45px rgba(15,23,42,.16);
    padding:10px;
}
.sp-picker-title {
    font-size:12px;
    font-weight:850;
    color:#0f172a;
    margin:2px 4px 8px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.sp-picker-head,
.sp-picker-row {
    display:grid;
    grid-template-columns: 1fr 48px 48px;
    align-items:center;
    gap:6px;
}
.sp-picker-head {
    color:#64748b;
    font-size:11px;
    font-weight:800;
    text-align:center;
    padding:0 4px 4px;
}
.sp-picker-head span:first-child { text-align:left; }
.sp-picker-row {
    min-height:30px;
    padding:4px;
    border-radius:9px;
    cursor:pointer;
    font-size:13px;
    font-weight:700;
    color:#334155;
}
.sp-picker-row:hover { background:#f8fafc; }
.sp-picker-row span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sp-picker-row input { width:auto; margin:auto; cursor:pointer; }
.sp-picker-row.muted-row { color:#64748b; font-weight:650; }
.sp-save {
    width:100%;
    margin-top:8px;
    padding:8px 10px;
    border-radius:10px;
    font-size:13px;
}
@media(max-width:700px){
    .specialites-picker form { left:0; right:auto; width:230px; }
}

/* V2.9 — édition flottante des spécialités depuis l'accueil */
.sp-popover {
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.sp-trigger {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:48px;
    min-height:28px;
    border-radius:999px;
    padding:4px 10px;
    background:#f8fafc;
    border:1px solid #dbe3ee;
    color:#334155;
    font-weight:850;
    font-size:12px;
    line-height:1;
    white-space:nowrap;
    cursor:pointer;
}
.sp-trigger:hover {
    background:#eff6ff;
    border-color:#93c5fd;
    color:#1d4ed8;
}
.sp-popover-panel {
    display:none;
    position:fixed;
    z-index:9999;
    width:280px;
    background:#ffffff;
    border:1px solid #dbe3ee;
    border-radius:14px;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
    padding:10px;
}
.sp-popover-panel.open { display:block; }
.sp-picker-title {
    font-size:12px;
    font-weight:850;
    color:#0f172a;
    margin:2px 4px 8px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.sp-picker-head,
.sp-picker-row {
    display:grid;
    grid-template-columns: 1fr 42px 42px;
    align-items:center;
    gap:6px;
}
.sp-picker-head {
    color:#64748b;
    font-size:11px;
    font-weight:800;
    text-align:center;
    padding:0 4px 4px;
}
.sp-picker-head span:first-child { text-align:left; }
.sp-picker-row {
    min-height:30px;
    padding:4px;
    border-radius:9px;
    cursor:pointer;
    font-size:13px;
    font-weight:700;
    color:#334155;
}
.sp-picker-row:hover { background:#f8fafc; }
.sp-picker-row span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sp-picker-row input { width:auto; margin:auto; cursor:pointer; }
.sp-picker-row.muted-row { color:#64748b; font-weight:650; }
.sp-actions {
    display:flex;
    justify-content:flex-end;
    gap:8px;
    margin-top:10px;
}
.sp-cancel,
.sp-save {
    width:auto;
    margin:0;
    padding:7px 10px;
    border-radius:10px;
    font-size:13px;
}
.sp-cancel {
    background:#e2e8f0;
    color:#334155;
}
.sp-save {
    background:#2563eb;
    color:white;
}
@media(max-width:700px){
    .sp-popover-panel { width:260px; }
}


/* V2.10 — liste des spécialités dans le popover */
.sp-popover-panel {
    width: 300px;
}
.sp-picker-row span {
    font-size: 13px;
    font-weight: 850;
}
.sp-picker-row input[type="radio"] {
    transform: scale(.95);
}

/* V2.13 — filtre spécialité sur le tableau L1SPS */
.specialite-filter-form {
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-left:auto;
    padding-left:8px;
}
.specialite-filter-form label {
    margin:0;
    color:#64748b;
    font-size:12px;
    font-weight:850;
    white-space:nowrap;
}
.specialite-filter-form select {
    width:auto;
    min-width:110px;
    padding:7px 30px 7px 10px;
    border-radius:10px;
    font-size:13px;
    font-weight:800;
}
@media(max-width:700px){
    .specialite-filter-form { margin-left:0; width:100%; }
    .specialite-filter-form select { flex:1; }
}

/* V2.14 — page étudiant QR code de présence */
.call-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:18px; background:#eef2f7; }
.call-card { width:min(560px, 100%); background:white; border-radius:24px; padding:24px; box-shadow:0 12px 40px rgba(15,23,42,.14); }
.call-card h1 { font-size:28px; text-align:center; margin-bottom:8px; }
.call-card .subtitle { text-align:center; color:#64748b; margin-bottom:24px; }
.search-box { position:relative; }
#searchInput { font-size:20px; padding:18px; border-radius:18px; }
.results { margin-top:10px; border-radius:16px; overflow:hidden; border:1px solid #e2e8f0; display:none; }
.result-item { padding:16px; background:white; border-bottom:1px solid #e2e8f0; cursor:pointer; font-size:18px; font-weight:800; }
.result-item:last-child { border-bottom:0; }
.result-item:hover, .result-item.selected { background:#eff6ff; }
.confirm-button { width:100%; margin-top:18px; padding:18px; border:0; border-radius:18px; background:#2563eb; color:white; font-size:21px; font-weight:900; cursor:pointer; }
.confirm-button:disabled { background:#94a3b8; cursor:not-allowed; }
.identity-card { background:#f8fafc; border:1px solid #e2e8f0; padding:16px; border-radius:16px; text-align:center; margin:14px 0; }
.identity-name { font-size:22px; font-weight:900; }
.thanks-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:18px; background:#eef2f7; }
.thanks-card { width:min(520px, 100%); background:white; border-radius:24px; padding:34px 24px; text-align:center; box-shadow:0 12px 40px rgba(15,23,42,.14); }
.thanks-icon { width:72px; height:72px; margin:0 auto 18px; border-radius:999px; background:#dcfce7; color:#166534; display:flex; align-items:center; justify-content:center; font-size:42px; font-weight:900; }
.thanks-card h1 { margin:0 0 10px; font-size:34px; }
.center { text-align:center; }
.qr-link { display:inline-flex; align-items:center; justify-content:center; min-width:34px; height:30px; border-radius:10px; background:#eef2ff; border:1px solid #c7d2fe; text-decoration:none; font-weight:900; color:#1d4ed8; }
.qr-link:hover { background:#e0e7ff; }
.scan-badge { display:inline-flex; border-radius:999px; padding:4px 8px; font-size:12px; font-weight:800; }
.scan-badge.associe { background:#dcfce7; color:#166534; }
.scan-badge.non_associe { background:#fee2e2; color:#991b1b; }

/* V2.16 — correction scans QR TD */
.inline-form { display:inline-flex; align-items:center; gap:8px; margin:8px 0 0; }
.scan-assoc-form { display:flex; align-items:center; gap:6px; min-width:260px; }
.scan-assoc-form select { min-width:190px; padding:7px 8px; border-radius:9px; font-size:13px; }
.scan-assoc-form .small-btn { padding:7px 9px; }
@media (max-width: 760px) {
  .scan-assoc-form { flex-direction:column; align-items:stretch; min-width:0; }
  .scan-assoc-form select, .scan-assoc-form .small-btn { width:100%; }
}

/* V2.17 — Page Présence aux TD : liste par semaine */
.td-tools-card details > summary,
.card > details > summary {
    cursor: pointer;
    font-weight: 800;
    color: #334155;
    list-style: none;
}
.td-tools-card details > summary::-webkit-details-marker,
.card > details > summary::-webkit-details-marker { display:none; }
.td-tools-card details > summary::before,
.card > details > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 8px;
    color: #2563eb;
    transition: transform .15s ease;
}
.td-tools-card details[open] > summary::before,
.card > details[open] > summary::before { transform: rotate(90deg); }
.td-tools-grid { margin-top: 14px; }
.td-week-separator {
    display:flex;
    align-items:center;
    gap:14px;
    margin:28px 0 12px;
    color:#0f172a;
    font-weight:900;
    letter-spacing:.02em;
}
.td-week-separator::after {
    content:"";
    flex:1;
    height:1px;
    background:#cbd5e1;
}
.td-week-separator span {
    background:#e0e7ff;
    color:#1e3a8a;
    padding:7px 13px;
    border-radius:999px;
    white-space:nowrap;
}
.td-week-list { display:flex; flex-direction:column; gap:8px; }
.td-global-row {
    background:#fff;
    border:1px solid #dbe3ee;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.td-global-row > summary {
    list-style:none;
    cursor:pointer;
    display:grid;
    grid-template-columns: minmax(260px,1fr) auto;
    align-items:center;
    gap:16px;
    padding:12px 16px;
}
.td-global-row > summary::-webkit-details-marker { display:none; }
.td-global-row > summary::before { content:''; display:none; }
.td-global-row[open] > summary { border-bottom:1px solid #e5e7eb; background:#f8fafc; }
.td-global-main { min-width:0; }
.td-global-main strong { display:block; font-size:15px; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.td-global-meta { display:block; margin-top:3px; font-size:12px; color:#64748b; font-weight:650; }
.td-global-counts { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.count-pill {
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:5px 9px;
    font-size:12px;
    font-weight:900;
    border:1px solid #e2e8f0;
    background:#f8fafc;
    white-space:nowrap;
}
.count-pill.present { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.count-pill.absent { background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.count-pill.neutral { background:#f1f5f9; color:#475569; }
.td-slot-list { padding:12px 16px 16px; background:#fbfdff; }
.td-slot-list .compact-table { margin:0; }
@media (max-width: 760px) {
    .td-global-row > summary { grid-template-columns:1fr; gap:10px; }
    .td-global-counts { justify-content:flex-start; }
}

/* ===============================
   V2.18 — Page Présence aux TD moderne
   =============================== */
.td-page-shell { display: flex; flex-direction: column; gap: 16px; }
.td-hero { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:24px 28px; }
.td-hero h1 { margin:0 0 6px; font-size:32px; letter-spacing:-.03em; }
.td-hero p { margin:0; color:#475569; font-size:16px; }
.td-hero-actions { display:flex; gap:10px; align-items:center; }
.td-btn { display:inline-flex; align-items:center; justify-content:center; border-radius:12px; padding:11px 16px; text-decoration:none; font-weight:800; border:1px solid #dbeafe; cursor:pointer; }
.td-btn.primary { background:#2563eb; color:white; border-color:#2563eb; box-shadow:0 10px 22px rgba(37,99,235,.18); }
.td-btn.soft { background:#f8fafc; color:#1e3a8a; }
.td-btn:hover { filter:brightness(.98); transform:translateY(-1px); }
.td-view-tabs { display:grid; grid-template-columns:1fr 1fr; max-width:720px; padding:8px; gap:8px; }
.td-view-tab { display:flex; align-items:center; gap:12px; padding:16px 18px; color:#334155; text-decoration:none; border-radius:14px; border:1px solid transparent; }
.td-view-tab.active { background:#eff6ff; border-color:#bfdbfe; color:#1d4ed8; }
.td-view-tab small { display:block; color:#64748b; font-weight:600; margin-top:2px; }
.td-view-tab .tab-icon { width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px; background:white; border:1px solid #dbeafe; }
.td-stat-grid { display:grid; grid-template-columns: repeat(5, minmax(150px,1fr)); gap:14px; }
.td-stat-card { background:white; border:1px solid #dbe3ee; border-radius:16px; padding:16px 18px; display:flex; align-items:center; gap:14px; box-shadow:0 10px 24px rgba(15,23,42,.05); }
.td-stat-card strong { display:block; font-size:25px; line-height:1; color:#0f172a; }
.td-stat-card span:not(.stat-icon) { color:#64748b; font-weight:650; font-size:13px; }
.stat-icon { width:48px; height:48px; border-radius:18px; display:inline-flex; align-items:center; justify-content:center; font-size:23px; font-weight:900; }
.stat-icon.purple { background:#ede9fe; color:#7c3aed; }
.stat-icon.green { background:#dcfce7; color:#16a34a; }
.stat-icon.blue { background:#dbeafe; color:#2563eb; }
.stat-icon.red { background:#fee2e2; color:#dc2626; }
.stat-icon.gray { background:#f1f5f9; color:#475569; }
.td-modern-grid, .td-subject-layout { display:grid; grid-template-columns:1fr; gap:16px; }
.td-panel { padding:18px; }
.td-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.td-panel-head h2 { margin:0; font-size:20px; }
.td-week-stack { display:flex; flex-direction:column; gap:10px; }
.td-week-card { border:1px solid #dbe3ee; border-radius:15px; overflow:hidden; background:#fbfdff; }
.td-week-card > summary { list-style:none; display:grid; grid-template-columns:150px 1fr auto; align-items:center; gap:12px; padding:13px 16px; cursor:pointer; background:#f8fafc; }
.td-week-card > summary::-webkit-details-marker { display:none; }
.week-title { font-weight:900; color:#0f172a; }
.week-date { color:#475569; font-weight:650; }
.week-count { justify-self:end; border:1px solid #bfdbfe; background:#eff6ff; color:#1d4ed8; border-radius:999px; padding:5px 10px; font-weight:900; font-size:13px; }
.td-week-items { padding:8px; display:flex; flex-direction:column; gap:8px; }
.td-item-card { border:1px solid #e2e8f0; border-radius:14px; background:white; overflow:hidden; }
.td-item-card[open] { border-color:#93c5fd; box-shadow:0 10px 24px rgba(37,99,235,.08); }
.td-item-card > summary { list-style:none; display:grid; grid-template-columns:44px minmax(240px,1fr) 120px 105px 120px 22px; gap:14px; align-items:center; padding:13px 16px; cursor:pointer; }
.td-item-card > summary::-webkit-details-marker { display:none; }
.td-icon { width:38px; height:38px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:17px; }
.td-icon.good { background:#dcfce7; color:#16a34a; }
.td-icon.warn { background:#fef3c7; color:#d97706; }
.td-icon.bad { background:#fee2e2; color:#dc2626; }
.td-icon.neutral { background:#f1f5f9; color:#64748b; }
.td-item-main strong { display:block; font-size:16px; color:#0f172a; }
.td-item-main small { color:#64748b; font-weight:650; margin-top:3px; display:block; }
.td-item-metric { text-align:right; }
.td-item-metric b { display:block; font-size:18px; color:#16a34a; }
.td-item-metric.absent b { color:#dc2626; }
.td-item-metric small { color:#64748b; font-size:12px; font-weight:650; }
.td-mini-rate { display:inline-flex; align-items:center; justify-content:center; min-width:78px; border-radius:999px; padding:7px 9px; border:1px solid #e2e8f0; font-weight:900; }
.td-mini-rate.good { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.td-mini-rate.warn { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.td-mini-rate.bad { background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.td-mini-rate.neutral { background:#f8fafc; color:#64748b; }
.td-chevron { color:#2563eb; font-size:24px; font-weight:900; }
.td-slot-list.modern { padding:0 16px 14px; background:#fbfdff; }
.td-slots-table { width:100%; border-collapse:separate; border-spacing:0; overflow:hidden; border:1px solid #e2e8f0; border-radius:13px; font-size:14px; }
.td-slots-table th { background:#f1f5f9; color:#334155; font-size:12px; text-transform:uppercase; letter-spacing:.035em; padding:10px; }
.td-slots-table td { padding:11px 10px; border-bottom:1px solid #e2e8f0; vertical-align:middle; }
.td-slots-table tr:last-child td { border-bottom:0; }
.slot-rate { display:inline-flex; align-items:center; justify-content:center; min-width:58px; border-radius:999px; padding:4px 8px; font-size:12px; font-weight:900; }
.slot-rate.good { color:#166534; background:#dcfce7; }
.slot-rate.warn { color:#92400e; background:#fef3c7; }
.slot-rate.bad { color:#991b1b; background:#fee2e2; }
.slot-rate.neutral { color:#64748b; background:#f1f5f9; }
.subject-list { display:flex; flex-direction:column; gap:12px; }
.subject-card { border:1px solid #dbe3ee; border-radius:16px; background:white; overflow:hidden; }
.subject-card > summary { list-style:none; display:grid; grid-template-columns:1fr 150px; align-items:center; gap:14px; padding:15px 18px; cursor:pointer; background:#f8fafc; }
.subject-card > summary::-webkit-details-marker { display:none; }
.subject-card strong { display:block; color:#0f172a; font-size:17px; }
.subject-card small { display:block; color:#64748b; font-weight:650; margin-top:3px; }
.subject-rate { text-align:right; }
.subject-rate b { display:block; font-size:22px; color:#1d4ed8; }
.subject-rate span { color:#64748b; font-size:12px; font-weight:650; }
.subject-td-list { padding:8px; display:flex; flex-direction:column; gap:6px; }
.subject-td-row { display:grid; grid-template-columns:1fr 100px 80px; gap:12px; align-items:center; padding:10px 12px; border:1px solid #e2e8f0; border-radius:12px; }
.subject-td-row span:first-child { font-weight:800; }
.td-tools-card { margin-top:2px; }
.td-tools-card > details > summary { cursor:pointer; font-weight:900; color:#334155; }
.scan-badge.associe { background:#dcfce7; color:#166534; border-radius:999px; padding:5px 8px; font-weight:800; }
.scan-badge.non_associe { background:#fee2e2; color:#991b1b; border-radius:999px; padding:5px 8px; font-weight:800; }
@media (max-width: 1000px) {
  .td-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .td-item-card > summary { grid-template-columns:36px 1fr; }
  .td-item-metric, .td-item-rate, .td-chevron { grid-column:2; text-align:left; }
  .td-week-card > summary { grid-template-columns:1fr; }
}
@media (max-width: 700px) {
  .td-hero { display:block; }
  .td-hero-actions { margin-top:14px; }
  .td-view-tabs { grid-template-columns:1fr; }
  .td-stat-grid { grid-template-columns:1fr; }
  .subject-card > summary, .subject-td-row { grid-template-columns:1fr; }
}

/* ===============================
   V2.19 — Menu vertical global
   =============================== */
body {
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.08), transparent 34%),
    #eef2f7;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255,255,255,.86);
  border-right: 1px solid #dbe3ee;
  backdrop-filter: blur(14px);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  box-shadow: 10px 0 30px rgba(15,23,42,.035);
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(37,99,235,.22);
}
.brand-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.brand-subtitle {
  margin-top: 3px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 850;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #334155;
  text-decoration: none;
  font-weight: 850;
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.side-nav a:hover {
  background: #f1f5f9;
  color: #1d4ed8;
  transform: translateX(2px);
}
.side-nav a.active {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 4px 0 0 #2563eb;
}
.side-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(37,99,235,.08);
  color: #2563eb;
  font-weight: 950;
  flex: 0 0 auto;
}
.side-nav a.active .side-icon {
  background: #2563eb;
  color: white;
}
.sidebar-help {
  margin-top: auto;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 16px;
  padding: 14px;
  color: #334155;
  font-size: 13px;
  box-shadow: 0 10px 22px rgba(15,23,42,.04);
}
.sidebar-help strong {
  display: block;
  color: #0f172a;
  margin-bottom: 4px;
}
.sidebar-help span {
  display: block;
  color: #64748b;
  line-height: 1.35;
}
.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 68px;
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid #dbe3ee;
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 80;
}
.topbar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.topbar-kicker {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.topbar-title strong {
  color: #0f172a;
  font-size: 16px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 38px;
  border: 1px solid #dbe3ee;
  background: #fff;
  border-radius: 12px;
  color: #0f172a;
  font-weight: 900;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 850;
}
.user-chip span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2563eb;
  color: white;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(37,99,235,.20);
}
.page-content {
  width: min(1500px, calc(100vw - 300px));
  margin: 24px auto;
  padding: 0 24px 32px;
}
/* Les anciennes pages utilisent parfois container/nav : on neutralise le menu horizontal. */
.app-shell .nav { display: none; }
.app-shell .container { width: auto; margin: 0; }
.card {
  border-radius: 20px;
}
.td-hero,
.dashboard-hero,
.card.hero {
  border-radius: 22px;
}
@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #dbe3ee;
    gap: 14px;
  }
  .brand-block { justify-content: center; }
  .side-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .side-nav a {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
  }
  .side-nav a.active { box-shadow: inset 0 -3px 0 #2563eb; }
  .sidebar-help { display: none; }
  .topbar {
    position: static;
    height: auto;
    padding: 12px 16px;
  }
  .page-content {
    width: 100%;
    margin: 16px 0;
    padding: 0 14px 24px;
  }
}
@media (max-width: 620px) {
  .topbar-title { display:none; }
  .topbar { justify-content:flex-end; }
  .user-chip { font-size:0; }
  .user-chip span { font-size:13px; }
}

/* ===============================
   V2.20 — Menu gauche renforcé, sans barre horizontale
   =============================== */
.app-shell {
  grid-template-columns: 270px minmax(0, 1fr);
}
.sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(96,165,250,.38), transparent 26%),
    linear-gradient(180deg, #0f2a5f 0%, #123b85 58%, #0f172a 100%);
  border-right: 0;
  color: #eaf2ff;
  box-shadow: 14px 0 36px rgba(15,23,42,.16);
}
.brand-icon {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  box-shadow: 0 12px 24px rgba(0,0,0,.16);
}
.brand-title { color: #fff; }
.brand-subtitle { color: #bfdbfe; }
.sidebar-context {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.sidebar-context span {
  display:block;
  color:#bfdbfe;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:4px;
}
.sidebar-context strong {
  display:block;
  color:#fff;
  font-size:22px;
  font-weight:950;
  letter-spacing:-.02em;
}
.side-nav a {
  color: #dbeafe;
}
.side-nav a:hover {
  background: rgba(255,255,255,.10);
  color: #fff;
}
.side-nav a.active {
  background: rgba(255,255,255,.16);
  color: #fff;
  box-shadow: inset 4px 0 0 #93c5fd;
}
.side-icon {
  background: rgba(255,255,255,.12);
  color: #dbeafe;
}
.side-nav a.active .side-icon {
  background: #fff;
  color: #1d4ed8;
}
.sidebar-help {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #dbeafe;
  box-shadow: none;
}
.sidebar-help strong { color:#fff; }
.sidebar-help span { color:#bfdbfe; }
.app-main {
  background:
    radial-gradient(circle at 20% 0%, rgba(37,99,235,.08), transparent 28%),
    #eef2f7;
}
.page-content {
  width: min(1540px, calc(100vw - 318px));
  margin: 34px auto;
  padding: 0 32px 38px;
}
.topbar { display:none !important; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    background: linear-gradient(135deg, #123b85, #0f2a5f);
    box-shadow: 0 12px 26px rgba(15,23,42,.14);
  }
  .sidebar-context {
    max-width: 220px;
    margin: 0 auto;
    text-align:center;
  }
  .page-content {
    width: 100%;
    margin: 16px 0;
    padding: 0 14px 24px;
  }
}

/* ===============================
   V2.21 — Interface compacte TD et menu optimisé
   =============================== */
.app-shell {
  grid-template-columns: 235px minmax(0, 1fr);
}
.sidebar {
  padding: 16px 12px;
  gap: 16px;
}
.brand-block {
  gap: 9px;
  min-height: 38px;
}
.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  font-size: 17px;
}
.brand-title {
  font-size: 14px;
  line-height: 1.05;
}
.brand-subtitle {
  font-size: 12px;
  margin-top: 2px;
}
.sidebar-context {
  padding: 10px 12px;
  border-radius: 15px;
}
.sidebar-context span {
  font-size: 10px;
  margin-bottom: 2px;
}
.sidebar-context strong {
  font-size: 18px;
}
.side-nav {
  gap: 4px;
}
.side-nav a {
  min-height: 38px;
  padding: 8px 9px;
  border-radius: 12px;
  gap: 10px;
  font-size: 14px;
}
.side-icon {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  font-size: 13px;
}
.sidebar-help {
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 12px;
}
.page-content {
  width: min(1640px, calc(100vw - 258px));
  margin: 18px auto;
  padding: 0 22px 26px;
}
.card {
  border-radius: 16px;
}

/* Page TD : densité augmentée sans sacrifier la lisibilité */
.td-page-shell {
  gap: 10px;
}
.td-hero {
  padding: 14px 18px;
  border-radius: 18px;
}
.td-hero h1 {
  font-size: 27px;
  margin: 0;
}
.td-hero p {
  display: none;
}
.td-hero-actions {
  gap: 8px;
}
.td-btn {
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 14px;
}
.td-view-tabs {
  max-width: 520px;
  padding: 4px;
  gap: 4px;
  border-radius: 15px;
}
.td-view-tab {
  padding: 10px 12px;
  gap: 9px;
  border-radius: 12px;
}
.td-view-tab .tab-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 15px;
}
.td-view-tab strong {
  font-size: 14px;
}
.td-view-tab small {
  font-size: 11px;
  margin-top: 0;
}
.td-stat-grid {
  gap: 10px;
  grid-template-columns: repeat(5, minmax(115px,1fr));
}
.td-stat-card {
  padding: 10px 12px;
  gap: 10px;
  border-radius: 14px;
  min-height: 74px;
}
.td-stat-card strong {
  font-size: 22px;
}
.td-stat-card span:not(.stat-icon) {
  font-size: 12px;
  line-height: 1.15;
}
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 18px;
}
.td-panel {
  padding: 12px;
}
.td-panel-head {
  margin-bottom: 9px;
}
.td-panel-head h2 {
  font-size: 18px;
}
.td-week-stack {
  gap: 7px;
}
.td-week-card {
  border-radius: 13px;
}
.td-week-card > summary {
  grid-template-columns: 120px 1fr auto;
  padding: 9px 12px;
  gap: 10px;
}
.week-title {
  font-size: 15px;
}
.week-date {
  font-size: 13px;
}
.week-count {
  padding: 3px 8px;
  font-size: 12px;
}
.td-week-items {
  padding: 6px;
  gap: 6px;
}
.td-item-card {
  border-radius: 12px;
}
.td-item-card > summary {
  grid-template-columns: 32px minmax(210px,1fr) 105px 88px 88px 16px;
  gap: 10px;
  padding: 8px 10px;
  min-height: 58px;
}
.td-icon {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  font-size: 14px;
}
.td-item-main strong {
  font-size: 14px;
  line-height: 1.12;
}
.td-item-main small {
  margin-top: 1px;
  font-size: 11.5px;
  line-height: 1.15;
}
.td-item-metric b {
  font-size: 15px;
}
.td-item-metric small {
  font-size: 10.5px;
}
.td-mini-rate {
  min-width: 64px;
  padding: 5px 7px;
  font-size: 12px;
}
.td-chevron {
  font-size: 19px;
}
.td-slot-list.modern {
  padding: 0 10px 10px;
}
.td-slots-table {
  font-size: 12.5px;
  border-radius: 11px;
}
.td-slots-table th {
  padding: 7px 8px;
  font-size: 10.5px;
}
.td-slots-table td {
  padding: 7px 8px;
}
.slot-rate {
  min-width: 48px;
  padding: 3px 6px;
  font-size: 11px;
}
.qr-link {
  padding: 4px 8px;
  border-radius: 9px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  text-decoration: none;
  font-weight: 900;
  color: #1d4ed8;
}
.subject-list {
  gap: 8px;
}
.subject-card {
  border-radius: 13px;
}
.subject-card > summary {
  padding: 10px 12px;
  grid-template-columns: 1fr 120px;
}
.subject-card strong {
  font-size: 15px;
}
.subject-card small {
  font-size: 11.5px;
}
.subject-rate b {
  font-size: 18px;
}
.subject-td-list {
  padding: 6px;
}
.subject-td-row {
  padding: 7px 9px;
  border-radius: 10px;
  grid-template-columns: 1fr 90px 70px;
  font-size: 13px;
}
.td-tools-card {
  margin-top: 0;
  padding: 12px;
}

@media (max-width: 1180px) {
  .td-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .td-item-card > summary { grid-template-columns: 30px minmax(180px,1fr) 90px 78px 78px 16px; }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { padding: 12px; gap: 10px; }
  .page-content { width: 100%; margin: 12px 0; padding: 0 12px 18px; }
}
@media (max-width: 700px) {
  .td-hero { display:block; }
  .td-hero-actions { margin-top:10px; }
  .td-view-tabs { grid-template-columns:1fr; max-width:none; }
  .td-stat-grid { grid-template-columns:1fr 1fr; }
}

/* V2.22 — TD : indicateurs plus utiles et plus compacts */
.td-stat-grid.compact {
  grid-template-columns: 1.2fr 1fr 1fr;
  max-width: 820px;
}
.td-stat-grid.compact .td-stat-card {
  min-height: 64px;
  padding: 9px 12px;
}
.td-stat-grid.compact .td-stat-card strong {
  font-size: 20px;
}
.td-stat-grid.compact .td-stat-card span:not(.stat-icon) {
  font-size: 11.5px;
}
.td-stat-grid.compact .stat-icon {
  width: 34px;
  height: 34px;
  font-size: 16px;
  border-radius: 12px;
}
@media (max-width: 980px) {
  .td-stat-grid.compact { grid-template-columns: 1fr; max-width: none; }
}

/* V2.23 — TD : page encore plus compacte + export présents/absents */
.td-stat-grid.compact {
  grid-template-columns: 1.1fr .95fr;
  max-width: 560px;
}
.td-panel-head .muted { display:none; }
.td-week-card > summary {
  grid-template-columns: 104px 1fr auto;
  padding: 7px 11px;
  min-height: 42px;
}
.week-title {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .01em;
}
.week-date {
  font-size: 11.5px;
  color: #64748b;
}
.week-count {
  font-size: 11px;
  padding: 2px 7px;
}
.td-item-card > summary {
  grid-template-columns: 30px minmax(210px,1fr) 96px 78px 74px 46px 14px;
  gap: 8px;
  min-height: 52px;
  padding: 7px 9px;
}
.td-export-mini {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:26px;
  padding:0 9px;
  border-radius:9px;
  background:#eef6ff;
  border:1px solid #bfdbfe;
  color:#1d4ed8;
  text-decoration:none;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
}
.td-export-mini:hover { background:#dbeafe; }
@media (max-width: 980px) {
  .td-stat-grid.compact { grid-template-columns: 1fr; max-width:none; }
  .td-item-card > summary { grid-template-columns: 28px 1fr; }
  .td-item-metric, .td-item-rate, .td-export-mini, .td-chevron { grid-column:2; justify-self:start; }
}

/* V2.24 — TD : densité + export par icône */
.td-stats-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 14px;
  width: auto;
  margin: 0;
}
.td-stats-strip span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.td-stats-strip strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.02em;
}
.td-week-card > summary {
  grid-template-columns: 82px 1fr auto;
  padding: 5px 9px;
  min-height: 34px;
  background: #f9fbff;
}
.week-title { font-size: 12px; color: #475569; }
.week-date { font-size: 10.5px; color: #64748b; }
.week-count { font-size: 10.5px; padding: 1px 6px; }
.td-week-items { padding: 5px; gap: 5px; }
.td-item-card > summary {
  grid-template-columns: 26px minmax(220px,1fr) 94px 92px 34px 12px;
  gap: 8px;
  min-height: 46px;
  padding: 6px 8px;
}
.td-icon {
  width: 25px;
  height: 25px;
  border-radius: 9px;
  font-size: 12px;
}
.td-item-main strong { font-size: 13.5px; }
.td-item-main small { font-size: 11px; }
.td-attendance-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.05;
  white-space: nowrap;
}
.td-attendance-compact strong {
  font-size: 14px;
  font-weight: 950;
  color: #0f172a;
}
.td-attendance-compact small {
  margin-top: 3px;
  font-size: 10px;
  color: #64748b;
  font-weight: 750;
}
.td-rate-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 76px;
}
.td-rate-compact span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 12px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
}
.td-rate-compact i {
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, currentColor var(--rate), #e5e7eb var(--rate));
  opacity: .95;
}
.td-rate-compact.good { color: #16a34a; }
.td-rate-compact.warn { color: #f59e0b; }
.td-rate-compact.bad { color: #dc2626; }
.td-rate-compact.neutral { color: #64748b; }
.td-export-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}
.td-export-icon:hover { background: #dbeafe; transform: translateY(-1px); }
.td-export-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.td-item-rate, .td-item-metric, .td-export-mini { display: none !important; }
@media (max-width: 980px) {
  .td-stats-strip { display: flex; flex-wrap: wrap; }
  .td-item-card > summary { grid-template-columns: 26px 1fr; }
  .td-attendance-compact, .td-rate-compact, .td-export-icon, .td-chevron { grid-column:2; justify-self:start; align-items:flex-start; }
}

/* ===============================
   V2.25 — TD : corrections rapides sans création de créneau
   =============================== */
.td-corrections-card {
    margin-top: 6px;
    padding: 12px 16px;
}
.td-corrections-card > details > summary {
    font-size: 14px;
    color: #1e3a8a;
    font-weight: 900;
}
.td-corrections-layout {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.2fr);
    gap: 18px;
    margin-top: 14px;
    align-items: start;
}
.td-correction-block {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 14px;
}
.td-correction-head h3 {
    margin: 0 0 4px;
    font-size: 16px;
}
.td-correction-head p { margin: 0 0 10px; }
.td-teacher-links { gap: 8px; }
.td-manual-presence-form label {
    margin-top: 8px;
    font-size: 13px;
}
.td-inline-add {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: end;
}
.td-inline-add button {
    min-height: 44px;
    border-radius: 12px;
    padding-inline: 16px;
}
@media (max-width: 900px) {
    .td-corrections-layout { grid-template-columns: 1fr; }
    .td-inline-add { grid-template-columns: 1fr; }
}

/* V2.27 — Associations matière → enseignant pour imports TD */
.teacher-map-card h2 { margin-bottom: 4px; }
.teacher-map-form { display:grid; grid-template-columns: 1fr 1fr auto; gap:10px; align-items:end; }
.teacher-map-form label { margin:0 0 4px; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.teacher-map-form button { height:42px; }
.teacher-map-list { margin-top:12px; display:grid; gap:7px; }
.teacher-map-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.teacher-map-row strong { display:block; font-size:14px; }
.teacher-map-row span { display:block; color:var(--muted); font-size:12px; margin-top:1px; }
.teacher-map-row form { margin:0; }
.teacher-map-row .ghost { background:#f1f5f9; color:#334155; width:28px; height:28px; padding:0; border-radius:9px; }
.teacher-map-empty { margin-top:12px; }
@media(max-width:900px){ .teacher-map-form { grid-template-columns:1fr; } .teacher-map-form button { width:100%; } }

/* V2.28 — Présence : sélection catégorie comme Résultats */
.presence-category-tabs {
  margin: 0 0 10px;
}
.presence-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 9px 14px;
  margin: 0 0 10px;
  border-left: 4px solid #2563eb;
  color: #475569;
  font-size: 14px;
}
.presence-context-pill strong {
  color: #0f172a;
  font-size: 15px;
}
@media (max-width: 900px) {
  .presence-context-pill { display:flex; width:100%; }
}

/* V2.32 — interface spécifique stages Première/Terminale Santé */
.stage-page-shell .compact-hero {
    min-height: 82px;
    padding: 18px 24px;
}
.stage-page-shell .compact-hero h1 { margin-bottom: 2px; }
.stage-page-shell .compact-hero p { margin: 0; color: var(--muted); }
.compact-tabs.category-tabs { margin-bottom: 12px; }
.stage-control-row {
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:16px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.stage-selector-form { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }
.stage-selector-form label { margin:0 0 5px; font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
.stage-selector-form select { min-width: 320px; height: 42px; padding: 8px 12px; }
.stage-view-switch {
    display:inline-flex;
    padding:4px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#f8fafc;
    gap:4px;
}
.stage-view-switch a {
    text-decoration:none;
    color:var(--dark);
    font-weight:800;
    padding:9px 14px;
    border-radius:11px;
}
.stage-view-switch a.active {
    background:var(--primary);
    color:white;
    box-shadow:0 8px 20px rgba(37,99,235,.18);
}
.stage-summary-card {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    padding: 14px 18px;
    margin-bottom:12px;
}
.stage-summary-card strong { font-size:20px; display:block; }
.stage-summary-card span { color:var(--muted); }
.stage-kpis-inline { display:flex; align-items:center; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.stage-kpis-inline span {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 10px;
    border-radius:999px;
    border:1px solid var(--line);
    background:#f8fafc;
    font-weight:800;
    color:var(--dark);
}
.stage-kpis-inline span.good, .stage-rate-pill.good { background:#dcfce7; border-color:#bbf7d0; color:#166534; }
.stage-kpis-inline span.warn, .stage-rate-pill.warn { background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.stage-kpis-inline span.bad, .stage-rate-pill.bad { background:#fee2e2; border-color:#fecaca; color:#991b1b; }
.stage-group-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.stage-group-card { padding:0; overflow:hidden; }
.stage-group-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    border-bottom:1px solid var(--line);
    background:linear-gradient(180deg,#fff,#f8fafc);
}
.stage-group-head h2 { margin:0 0 2px; font-size:20px; }
.stage-group-head small { color:var(--muted); font-weight:700; }
.stage-rate-pill {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:64px;
    padding:6px 10px;
    border-radius:999px;
    border:1px solid var(--line);
    background:#f1f5f9;
    font-weight:900;
    color:#334155;
    white-space:nowrap;
}
.stage-session-table-wrap { overflow-x:auto; }
.stage-session-table { font-size:14px; }
.stage-session-table th { font-size:12px; text-transform:uppercase; letter-spacing:.04em; background:#eef2f7; }
.stage-session-table td, .stage-session-table th { padding:9px 10px; }
.stage-activity-cell {
    max-width:240px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.stage-abs-mini {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:30px;
    height:26px;
    border-radius:999px;
    font-weight:900;
    background:#f1f5f9;
    color:#334155;
}
.stage-abs-mini.good { background:#dcfce7; color:#166534; }
.stage-abs-mini.bad { background:#fee2e2; color:#991b1b; }
.stage-absents-card h2 { margin-bottom:12px; }
.stage-empty-good {
    padding:14px;
    background:#dcfce7;
    color:#166534;
    border:1px solid #bbf7d0;
    border-radius:14px;
    font-weight:800;
}
.stage-absent-list { display:flex; flex-direction:column; gap:8px; }
.stage-absent-row {
    display:grid;
    grid-template-columns: 1fr auto auto;
    align-items:center;
    gap:12px;
    padding:10px 12px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
}
.stage-absent-row small { display:block; color:var(--muted); margin-top:2px; }
.stage-absent-pill {
    padding:7px 10px;
    border-radius:999px;
    background:#fee2e2;
    color:#991b1b;
    font-weight:900;
    white-space:nowrap;
}
@media (max-width: 1100px) {
    .stage-group-grid { grid-template-columns: 1fr; }
    .stage-summary-card { align-items:flex-start; flex-direction:column; }
    .stage-kpis-inline { justify-content:flex-start; }
}
@media (max-width: 760px) {
    .stage-control-row { align-items:stretch; flex-direction:column; }
    .stage-selector-form, .stage-selector-form select, .stage-view-switch { width:100%; }
    .stage-view-switch a { flex:1; text-align:center; }
    .stage-absent-row { grid-template-columns:1fr; }
}

/* V2.35 — Stages : grille date × groupes */
.stage-hero-tight { margin-bottom: 12px; }
.stage-control-compact { margin-bottom: 10px; }
.stage-summary-compact { padding: 12px 16px; }
.stage-planning-card { padding: 14px 16px 16px; }
.stage-planning-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:12px;
}
.stage-planning-head h2 { margin:0 0 3px; font-size:22px; }
.stage-planning-head p { margin:0; color:var(--muted); font-weight:650; font-size:14px; }
.stage-legend { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:flex-end; color:#475569; font-weight:750; font-size:13px; }
.stage-legend span { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.stage-legend .dot { width:10px; height:10px; border-radius:999px; display:inline-block; }
.stage-legend .dot.good { background:#22c55e; }
.stage-legend .dot.warn { background:#f59e0b; }
.stage-legend .dot.bad { background:#ef4444; }
.stage-legend .dot.neutral { background:#cbd5e1; }
.stage-matrix-wrap { overflow-x:auto; }
.stage-matrix-table {
    border-collapse:separate;
    border-spacing:0;
    min-width:840px;
    font-size:14px;
    border:1px solid var(--line);
    border-radius:16px;
    overflow:hidden;
}
.stage-matrix-table th {
    background:#eef2f7;
    color:#334155;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.05em;
    padding:9px 12px;
    text-align:left;
}
.stage-matrix-table td {
    border-top:1px solid var(--line);
    border-right:1px solid var(--line);
    padding:10px 12px;
    vertical-align:middle;
    background:#fff;
}
.stage-matrix-table td:last-child, .stage-matrix-table th:last-child { border-right:0; }
.stage-date-col { width:150px; }
.stage-date-cell {
    background:#f8fafc !important;
    white-space:nowrap;
}
.stage-date-cell strong { display:block; font-size:15px; }
.stage-date-cell span { display:block; margin-top:2px; color:#64748b; font-weight:800; font-size:13px; }
.stage-empty-cell {
    text-align:center;
    color:#94a3b8;
    background:#f8fafc !important;
}
.stage-empty-cell span { display:block; font-size:22px; line-height:1; }
.stage-empty-cell small { font-weight:750; font-size:12px; }
.stage-matrix-cell {
    position:relative;
    min-width:210px;
    background:#fff !important;
}
.stage-cell-main { display:inline-block; min-width:120px; max-width:150px; vertical-align:middle; }
.stage-cell-main strong {
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:14px;
}
.stage-cell-main small { display:block; margin-top:2px; color:#64748b; font-weight:800; }
.stage-cell-present {
    float:right;
    min-width:54px;
    padding:4px 6px;
    border-radius:12px;
    text-align:center;
    border:1px solid #dbeafe;
    background:#eff6ff;
    color:#1e3a8a;
    font-weight:900;
}
.stage-cell-present b { display:block; white-space:nowrap; font-size:17px; line-height:1.05; }
.stage-cell-present span { display:block; font-size:10px; font-weight:850; color:#64748b; opacity:.95; }
.stage-total-col { width:120px; text-align:center !important; }
.stage-total-cell {
    background:#f8fafc !important;
    text-align:center;
    min-width:120px;
    font-weight:900;
}
.stage-total-cell strong {
    display:block;
    color:#0f172a;
    font-size:16px;
    white-space:nowrap;
}
.stage-total-cell span {
    display:block;
    margin-top:2px;
    color:#64748b;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}
@media (max-width: 900px) {
    .stage-planning-head { flex-direction:column; }
    .stage-legend { justify-content:flex-start; }
    .stage-matrix-table { min-width:840px; }
}

/* V2.37 — Stages : total compact + liste des absents */
.stage-absents-col { width:105px; text-align:center !important; }
.stage-absents-cell {
    background:#fff !important;
    text-align:center;
    min-width:105px;
    position:relative;
}
.stage-no-absent {
    color:#94a3b8;
    font-weight:900;
}
.stage-absents-details {
    position:relative;
    display:inline-block;
}
.stage-absents-details summary {
    list-style:none;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:34px;
    height:30px;
    padding:0 10px;
    border-radius:999px;
    border:1px solid #cbd5e1;
    background:#f8fafc;
    color:#0f172a;
    font-weight:950;
}
.stage-absents-details summary::-webkit-details-marker { display:none; }
.stage-absents-details[open] summary {
    background:#2563eb;
    border-color:#2563eb;
    color:#fff;
}
.stage-absents-popover {
    position:absolute;
    right:0;
    top:38px;
    z-index:50;
    width:280px;
    max-height:320px;
    overflow:auto;
    padding:12px 14px;
    border:1px solid #cbd5e1;
    border-radius:16px;
    background:#fff;
    box-shadow:0 20px 45px rgba(15,23,42,.18);
    text-align:left;
}
.stage-absents-popover strong {
    display:block;
    margin-bottom:8px;
    font-size:13px;
    color:#0f172a;
}
.stage-absents-popover ul {
    margin:0;
    padding:0;
    list-style:none;
}
.stage-absents-popover li {
    padding:5px 0;
    border-top:1px solid #eef2f7;
    font-weight:750;
    color:#334155;
    font-size:13px;
}
.stage-total-cell span { display:none; }

/* V2.38 — page Résultats vraiment dédiée aux performances */
.results-hero{
    padding:14px 18px;
    margin-bottom:12px;
}
.results-hero h1{margin:0 0 4px;font-size:30px;letter-spacing:-.03em}
.results-year-form{align-items:end;gap:8px}
.results-year-form label{font-size:12px;margin:0 0 4px;color:#64748b;text-transform:uppercase;letter-spacing:.05em}
.results-year-form input{height:42px;min-width:170px}
.results-year-form button{height:42px}
.results-category-tabs{margin-bottom:12px}
.results-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:10px 12px;
    margin-bottom:10px;
}
.results-toolbar .segmented{margin:0}
.results-views a{padding:9px 12px}
.results-specialite-filter{display:flex;align-items:center;gap:8px;margin-left:auto}
.results-specialite-filter label{margin:0;color:#64748b;font-size:13px}
.results-specialite-filter select{min-width:135px;height:42px;padding:8px 10px}
.result-kpis{
    display:grid;
    grid-template-columns:repeat(4,minmax(150px,1fr));
    gap:10px;
    margin:0 0 10px;
}
.result-kpi{
    background:#fff;
    border:1px solid #dbe3ef;
    border-radius:16px;
    padding:10px 13px;
    box-shadow:0 8px 22px rgba(15,23,42,.045);
    display:flex;
    align-items:baseline;
    gap:8px;
}
.result-kpi strong{font-size:24px;line-height:1;font-weight:950;color:#0f172a}
.result-kpi span{font-size:13px;font-weight:800;color:#64748b}
.results-summary{padding:11px 14px;margin-bottom:10px}
.results-table-card{padding:12px}
.results-table{font-size:14px}
.results-table th,.results-table td{padding:8px 10px;vertical-align:middle;text-align:center;white-space:nowrap}
.results-table th:first-child,.results-table td:first-child{text-align:left;min-width:230px;position:sticky;left:0;background:#fff;z-index:1}
.results-table th:first-child{background:#f1f5f9;z-index:2}
.results-table .student-link{font-size:14px;font-weight:950;text-decoration:none;color:#0f172a;letter-spacing:.01em}
.results-table .student-link:hover{color:#2563eb}
.result-score,.results-table .avg-score,.results-table .rank-badge,.results-table .spec-badge,.results-table .z-mini{
    display:inline-flex;align-items:center;justify-content:center;
    min-width:46px;border-radius:12px;padding:5px 9px;font-weight:950;line-height:1;
}
.results-table .avg-score{background:#f8fafc;border:1px solid #dbe3ef;color:#0f172a}
.results-table .spec-badge{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af;min-width:auto}
.results-table .z-mini{background:#f1f5f9;border:1px solid #dbe3ef;color:#334155;min-width:auto}
.results-table .eval-score.good,.results-table .ue-score.good{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.results-table .eval-score.warn,.results-table .ue-score.warn{background:#fef3c7;color:#92400e;border-color:#fde68a}
.results-table .eval-score.bad,.results-table .ue-score.bad{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.results-table .eval-score.neutral,.results-table .ue-score.neutral{background:#f8fafc;color:#1e293b;border:1px solid #dbe3ef}
.results-table .ue-count{display:block;font-size:11px;color:#64748b;font-weight:800;margin-top:4px;line-height:1}
.results-table .receive-check{width:28px;height:28px;min-width:28px;border-radius:9px;padding:0;background:#fff;border:1px solid #cbd5e1;color:#2563eb}
.results-table .receive-check.checked{background:#2563eb;color:#fff;border-color:#2563eb}
@media(max-width:1000px){
    .results-toolbar{display:grid;grid-template-columns:1fr;align-items:stretch}
    .result-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
    .results-specialite-filter{margin-left:0;justify-content:space-between}
}
@media(max-width:640px){
    .result-kpis{grid-template-columns:1fr}
    .results-views{display:grid;grid-template-columns:1fr 1fr}
    .results-table th:first-child,.results-table td:first-child{position:static;min-width:180px}
}

/* V2.39 — Refonte compacte de la page Imports */
.imports-page{display:flex;flex-direction:column;gap:12px}.compact-page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px 16px;box-shadow:0 8px 22px rgba(15,23,42,.055)}.compact-page-head h1{margin:0;font-size:25px;letter-spacing:-.03em}.compact-page-head p{margin:3px 0 0;color:var(--muted);font-size:13px}.head-actions-mini{display:flex;gap:7px;flex-wrap:wrap}.mini-link{display:inline-flex;align-items:center;height:32px;border:1px solid #cbd5e1;border-radius:999px;padding:0 10px;text-decoration:none;color:#334155;background:#f8fafc;font-weight:850;font-size:12px}.mini-link:hover{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.import-feedback{border:1px solid #bbf7d0;background:#f0fdf4;color:#166534;border-radius:14px;padding:10px 12px;margin:0}.import-feedback strong{margin-right:10px}.import-feedback span,.import-feedback p{font-size:13px;margin:3px 0 0}.compact-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:8px 0}.compact-summary div{background:rgba(255,255,255,.65);border:1px solid #bbf7d0;border-radius:10px;padding:7px 8px}.compact-summary strong{display:block;font-size:20px}.compact-summary span{font-size:12px}.import-section{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:0 8px 22px rgba(15,23,42,.055)}.section-compact-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.section-compact-title h2{margin:0;font-size:18px}.section-compact-title p{margin:2px 0 0;color:var(--muted);font-size:12px}.primary-import-grid{display:grid;grid-template-columns:1fr 1.25fr 1fr;gap:12px}.quick-import-card{border:1px solid #dbe3ee;background:#fbfdff;border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:10px}.quick-import-card.highlight{background:linear-gradient(135deg,#eff6ff,#fff);border-color:#bfdbfe}.quick-import-head{display:flex;align-items:flex-start;gap:10px}.import-icon{width:34px;height:34px;border-radius:12px;background:#eef2ff;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.quick-import-card h3,.compact-import-block h3,.admin-box h3,.issue-box h3{margin:0 0 2px;font-size:16px}.quick-import-card p,.compact-import-block p{margin:0;color:var(--muted);font-size:12px}.compact-upload-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.compact-upload-form.notes-upload-form{grid-template-columns:150px minmax(0,1fr) auto}.compact-upload-form.slim{grid-template-columns:minmax(0,1fr) auto}.compact-upload-form input,.compact-upload-form select,.compact-stack-form select,.compact-teacher-form select,.compact-inline input,.compact-rename input,.compact-rename select{height:36px;padding:7px 9px;border-radius:10px;font-size:13px}.compact-upload-form button,.compact-stack-form button,.compact-teacher-form button,.compact-inline button{height:36px;padding:0 11px;border-radius:10px;white-space:nowrap;font-size:13px}.compact-stack-form{display:flex;flex-direction:column;gap:8px}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:8px}.compact-textarea{min-height:118px!important;height:118px;padding:9px 10px;border-radius:10px;font-size:13px;line-height:1.35}.small-textarea{min-height:86px!important;height:86px}.accordion-card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 22px rgba(15,23,42,.05);overflow:hidden}.accordion-card summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;font-weight:900}.accordion-card summary::-webkit-details-marker{display:none}.accordion-card summary span{font-size:17px}.accordion-card summary small{font-size:12px;color:var(--muted);font-weight:700}.accordion-card[open] summary{border-bottom:1px solid #e5e7eb;background:#fbfdff}.secondary-import-grid{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:12px;padding:12px}.compact-import-block,.admin-box,.issue-box{border:1px solid #e5e7eb;background:#fbfdff;border-radius:14px;padding:12px}.compact-import-block.wide{min-width:0}.admin-import-layout{display:grid;grid-template-columns:380px minmax(0,1fr);gap:12px;padding:12px}.compact-teacher-form{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center}.compact-map-list{max-height:260px;overflow:auto}.compact-map-list .teacher-map-row{padding:6px 8px}.compact-table-scroll{max-height:420px;overflow:auto;border-radius:12px}.compact-table th,.compact-table td{padding:7px 9px;font-size:13px}.compact-table th{font-size:11px}.compact-table input,.compact-table select{height:32px;padding:5px 7px;border-radius:8px;font-size:12px}.compact-table button,.small-action{padding:6px 9px!important;border-radius:8px!important;font-size:12px!important}.compact-rename{display:contents}.issues-grid{display:grid;grid-template-columns:1.2fr 1fr .8fr;gap:12px;padding:12px}.compact-title-row{margin-bottom:8px}.compact-title-row h3{margin:0}.compact-title-row p{margin:2px 0 0;color:var(--muted);font-size:12px}.compact-actions{display:flex;gap:4px;flex-wrap:wrap}.compact-inline{display:grid;grid-template-columns:70px auto;gap:6px}.history-reset-grid{display:grid;grid-template-columns:minmax(0,1.3fr) 380px;gap:12px;padding:12px}.compact-danger-zone{background:#fff7f7;border:1px solid #fecaca;border-radius:14px;padding:12px}.compact-reset-grid{display:grid;grid-template-columns:1fr;gap:7px}.compact-reset-grid button{width:100%;height:34px;text-align:left;font-size:12px}.danger-zone{border-color:#fecaca;background:#fff7f7}.teacher-map-row{display:flex;justify-content:space-between;align-items:center;gap:8px;border-bottom:1px solid #e5e7eb}.teacher-map-row:last-child{border-bottom:0}.teacher-map-row span{display:block;color:var(--muted);font-size:12px}@media(max-width:1200px){.primary-import-grid,.secondary-import-grid,.admin-import-layout,.issues-grid,.history-reset-grid{grid-template-columns:1fr}.compact-upload-form.notes-upload-form{grid-template-columns:1fr}.compact-page-head{display:block}.head-actions-mini{margin-top:10px}.compact-teacher-form{grid-template-columns:1fr}.compact-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.compact-upload-form,.compact-upload-form.slim{grid-template-columns:1fr}.two-cols{grid-template-columns:1fr}.accordion-card summary{align-items:flex-start;flex-direction:column}.primary-import-grid{gap:10px}.compact-page-head h1{font-size:22px}}

/* V2.40 — Imports : historique AJAX compact */
.import-history-accordion .import-history-panel {
  padding: 10px 14px 14px;
}
.history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 10px;
}
.history-toolbar h3 { margin: 0 0 3px; }
.history-toolbar p { margin: 0; }
.history-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 420px;
}
.history-controls select,
.history-controls input {
  height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.history-controls select { max-width: 170px; }
.import-history-list.loading {
  opacity: .55;
  pointer-events: none;
}
.history-count {
  font-size: 12px;
  color: var(--muted, #64748b);
  margin: 0 0 6px;
}
.import-history-table th,
.import-history-table td {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}
.import-history-row {
  cursor: pointer;
}
.import-history-row:hover td {
  background: #f8fafc;
}
.history-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.history-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.history-status.ok { background: #ecfdf5; color: #166534; }
.history-status.warn { background: #fff7ed; color: #9a3412; }
.history-delete-form { margin: 0; }
.ajax-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}
.ajax-pagination button {
  min-width: 30px;
  height: 30px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #334155;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
}
.ajax-pagination button.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.ajax-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.ajax-pagination span { color: #94a3b8; padding: 0 3px; }
.import-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15,23,42,.22);
  display: none;
  justify-content: flex-end;
}
.import-drawer.open { display: flex; }
.import-drawer-card {
  width: min(420px, 92vw);
  height: 100%;
  background: #fff;
  box-shadow: -18px 0 35px rgba(15,23,42,.16);
  padding: 22px;
  overflow: auto;
}
.import-drawer-card h3 { margin: 0 0 16px; }
.drawer-close {
  float: right;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.import-drawer-card dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 14px;
  margin: 0;
}
.import-drawer-card dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.import-drawer-card dd {
  margin: 0;
  color: #0f172a;
  font-weight: 650;
  word-break: break-word;
}
.standalone-danger-zone {
  padding: 14px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #fee2e2;
}
@media (max-width: 860px) {
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .history-controls { min-width: 0; width: 100%; flex-direction: column; }
  .history-controls select, .history-controls input { max-width: none; width: 100%; }
}

/* V2.41 — Analyse limitée aux L1SPS / LAS2 */
.analysis-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 10px;
    margin: 0 0 12px;
}
.analysis-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15,23,42,.045);
}
.analysis-tab span { font-weight: 950; }
.analysis-tab strong {
    min-width: 38px;
    text-align: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f1f5f9;
    color: #334155;
}
.analysis-tab.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.analysis-tab.active strong { background:#2563eb; color:white; }
.analysis-toolbar {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding-top:12px;
    padding-bottom:12px;
}
.analysis-table th,
.analysis-table td { vertical-align: middle; }
.spe-badge {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:42px;
    border-radius:999px;
    padding:4px 9px;
    background:#f8fafc;
    border:1px solid #cbd5e1;
    color:#334155;
    font-weight:900;
    font-size:12px;
}
@media(max-width:760px){
    .analysis-tabs { grid-template-columns:1fr; }
    .analysis-toolbar { display:block; }
}

/* V2.42 - distinction classement S1 validé / non validé */
.rank-badge-nv{
    background:#fff7ed !important;
    border:1px solid #fed7aa !important;
    color:#9a3412 !important;
}

/* V2.43 - Vue résultats fac */
.results-table.view-fac td,
.results-table.view-fac th{ text-align:center; }
.results-table.view-fac .student-col,
.results-table.view-fac td:first-child{ text-align:left; }
.fac-note-input{
  width:58px;
  padding:6px 8px;
  border:1px solid #cbd8ea;
  border-radius:12px;
  background:#fff;
  text-align:center;
  font-weight:800;
  font-size:.92rem;
  color:#07142e;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.fac-note-input:focus{ border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.fac-note-input.saved{ background:#dcfce7; border-color:#86efac; }
.fac-note-input.error{ background:#fee2e2; border-color:#fca5a5; }
.fac-avg{
  display:inline-flex;
  min-width:58px;
  justify-content:center;
  padding:6px 9px;
  border-radius:12px;
  font-weight:900;
  border:1px solid #dbe6f5;
  background:#f8fafc;
}
.fac-avg.fac-ok{ background:#dcfce7; border-color:#86efac; color:#166534; }
.fac-avg.fac-ko{ background:#fee2e2; border-color:#fca5a5; color:#991b1b; }
.rank-badge-nv{ background:#ffedd5 !important; border-color:#fdba74 !important; color:#9a3412 !important; }


/* V2.44 — compactage interface portable et résultats Fac */
@media (min-width: 981px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr) !important; }
  .sidebar { padding: 13px 10px !important; gap: 12px !important; }
  .brand-block { gap: 8px !important; min-height: 32px !important; }
  .brand-icon { width: 30px !important; height: 30px !important; border-radius: 11px !important; font-size: 14px !important; }
  .brand-title { font-size: 13px !important; line-height: 1.05 !important; }
  .brand-subtitle { font-size: 11px !important; margin-top: 1px !important; }
  .sidebar-context { padding: 8px 10px !important; border-radius: 13px !important; }
  .sidebar-context span { font-size: 9px !important; margin-bottom: 1px !important; }
  .sidebar-context strong { font-size: 16px !important; }
  .side-nav { gap: 3px !important; }
  .side-nav a { min-height: 34px !important; padding: 7px 8px !important; border-radius: 11px !important; gap: 8px !important; font-size: 13px !important; }
  .side-icon { width: 22px !important; height: 22px !important; border-radius: 8px !important; font-size: 12px !important; }
  .sidebar-help { padding: 9px 10px !important; border-radius: 12px !important; font-size: 11px !important; }
  .page-content { width: min(1680px, calc(100vw - 228px)) !important; padding: 0 16px 24px !important; margin: 16px auto !important; }
}

.results-table.view-fac { font-size: 13px; }
.results-table.view-fac th,
.results-table.view-fac td { padding: 6px 7px; }
.results-table.view-fac th:first-child,
.results-table.view-fac td:first-child { min-width: 190px; max-width: 230px; }
.results-table.view-fac .student-link { font-size: 13px; }
.results-table.view-fac .rank-col,
.results-table.view-fac .rank-col-cell { width: 72px; min-width: 72px; max-width: 72px; }
.results-table.view-fac .rank-badge { min-width: 50px; padding: 4px 7px; border-radius: 999px; font-size: 13px; }
.results-table.view-fac .fac-note-input { width: 48px; height: 34px; padding: 4px 5px; border-radius: 10px; font-size: 13px; }
.results-table.view-fac .fac-avg { min-width: 48px; height: 34px; padding: 5px 7px; border-radius: 10px; font-size: 13px; }
.results-table.view-fac .spec-badge { padding: 4px 7px; border-radius: 999px; font-size: 12px; }
.results-table.view-fac .receive-check { width: 24px; height: 24px; min-width: 24px; border-radius: 8px; }
.results-table.view-fac th { font-size: 11px; letter-spacing: .025em; }
.results-table.view-fac th a,
.results-table.view-fac .sort-link { gap: 3px; }
.results-table.view-fac th:nth-child(6),
.results-table.view-fac th:nth-child(9) { min-width: 82px; }
.results-table.view-fac td:nth-child(6),
.results-table.view-fac td:nth-child(9) { min-width: 82px; }
@media (max-width: 1450px) {
  .results-hero h1 { font-size: 26px; }
  .results-category-tabs .category-tab { padding: 10px 12px; }
  .results-table.view-fac th:first-child,
  .results-table.view-fac td:first-child { min-width: 170px; max-width: 200px; }
  .results-table.view-fac .fac-note-input { width: 44px; }
  .results-table.view-fac .fac-avg { min-width: 44px; }
}

/* V2.45 — scans TD non associés */
.td-unassoc-card{
  border:1px solid #fed7aa;
  background:#fff7ed;
  padding:0;
  overflow:hidden;
}
.td-unassoc-card details{ margin:0; }
.td-unassoc-card summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:12px 16px;
  color:#7c2d12;
}
.td-unassoc-card summary::-webkit-details-marker{ display:none; }
.td-unassoc-card summary small{ color:#9a3412; font-weight:700; }
.td-unassoc-content{
  border-top:1px solid #fed7aa;
  background:#fff;
  padding:10px 12px 12px;
}
.td-unassoc-actions{
  display:flex;
  justify-content:flex-end;
  margin-bottom:8px;
}
.td-btn.small{
  padding:7px 10px;
  font-size:12px;
  border-radius:10px;
}
.td-unassoc-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.td-unassoc-table th,
.td-unassoc-table td{
  padding:7px 9px;
  border-bottom:1px solid #edf2f7;
  vertical-align:middle;
}
.td-unassoc-table th{
  background:#f8fafc;
  color:#475569;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.td-associate-scan-form{
  display:flex;
  align-items:center;
  gap:8px;
}
.td-associate-scan-form select{
  min-width:330px;
  max-width:430px;
  padding:7px 9px;
  border-radius:10px;
  border:1px solid #cbd5e1;
  font-size:13px;
}
.td-associate-scan-form button{
  border:0;
  background:#2563eb;
  color:#fff;
  border-radius:10px;
  padding:8px 10px;
  font-weight:800;
  cursor:pointer;
}
@media(max-width:760px){
  .td-unassoc-card summary{ display:block; }
  .td-associate-scan-form{ flex-direction:column; align-items:stretch; }
  .td-associate-scan-form select{ min-width:0; max-width:none; width:100%; }
}

/* V2.46 — panneau compact des scans TD non associés */
.compact-anomaly-card{
  border:1px solid #fde68a;
  background:#fffbeb;
  padding:0;
  overflow:visible;
}
.td-unassoc-summary{
  padding:10px 14px !important;
  color:#713f12 !important;
}
.td-unassoc-title{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.td-unassoc-title small{
  color:#92400e !important;
  font-weight:600 !important;
}
.warning-dot{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#f59e0b;
  color:#fff;
  font-weight:900;
  font-size:12px;
}
.td-unassoc-toolbar{ display:flex; align-items:center; gap:8px; }
.link-action{
  border:0;
  background:transparent;
  color:#1d4ed8;
  font-weight:800;
  cursor:pointer;
  padding:4px 6px;
  border-radius:8px;
}
.link-action:hover{ background:#eff6ff; }
.td-unassoc-list{
  border-top:1px solid #fde68a;
  background:#fff;
  padding:6px 8px;
}
.td-unassoc-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:7px 8px;
  border-bottom:1px solid #eef2f7;
  min-height:44px;
}
.td-unassoc-row:last-child{ border-bottom:0; }
.scan-main{
  display:grid;
  grid-template-columns:90px minmax(180px,1fr) 110px;
  gap:12px;
  align-items:center;
  flex:1;
  min-width:0;
}
.scan-time{ font-weight:900; color:#0f172a; white-space:nowrap; }
.scan-student{ min-width:0; }
.scan-student strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.scan-student span{ color:#64748b; font-size:12px; font-weight:700; }
.scan-teacher{ color:#334155; font-weight:800; white-space:nowrap; }
.scan-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  position:relative;
}
.icon-danger,
.scan-picker > summary{
  border:1px solid #cbd5e1;
  background:#f8fafc;
  color:#334155;
  width:34px;
  height:34px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-weight:900;
  list-style:none;
}
.scan-picker > summary::-webkit-details-marker{ display:none; }
.icon-danger:hover{ background:#fee2e2; border-color:#fecaca; }
.scan-picker > summary:hover{ background:#eff6ff; border-color:#bfdbfe; }
.scan-picker{ position:relative; }
.scan-picker-panel{
  position:absolute;
  right:0;
  top:40px;
  z-index:20;
  width:min(520px, calc(100vw - 40px));
  background:#fff;
  border:1px solid #dbe5f2;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(15,23,42,.16);
  padding:10px;
}
.td-associate-scan-form.compact{
  display:flex;
  gap:8px;
  align-items:center;
}
.td-associate-scan-form.compact select{
  min-width:0;
  max-width:none;
  flex:1;
}
.td-associate-scan-form.compact button{
  flex:0 0 auto;
}
@media(max-width:760px){
  .td-unassoc-summary{ display:block !important; }
  .td-unassoc-toolbar{ margin-top:6px; }
  .td-unassoc-row{ align-items:flex-start; }
  .scan-main{ grid-template-columns:1fr; gap:2px; }
  .scan-actions{ align-self:center; }
  .scan-picker-panel{ right:-44px; }
}

/* V2.49 — stages suivis par créneau */
.stage-slot-cell small{
    display:block;
    margin-top:3px;
    color:#64748b;
    font-size:11px;
    font-weight:700;
    max-width:160px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.stage-cell-tools{
    position:relative;
    margin-top:6px;
}
.stage-cell-tools > summary{
    list-style:none;
    cursor:pointer;
    display:inline-flex;
    width:24px;
    height:20px;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:#f1f5f9;
    color:#475569;
    font-weight:900;
}
.stage-cell-tools > summary::-webkit-details-marker{display:none}
.stage-cell-tools-panel{
    position:absolute;
    z-index:30;
    right:0;
    top:26px;
    width:260px;
    background:#fff;
    border:1px solid #dbe3ee;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
    border-radius:14px;
    padding:12px;
    text-align:left;
}
.stage-mini-form label{
    margin:6px 0 3px;
    font-size:11px;
    color:#475569;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.stage-mini-form input{
    padding:7px 8px;
    border-radius:9px;
    font-size:13px;
}
.stage-mini-form button,
.stage-delete-btn{
    width:100%;
    margin-top:8px;
    padding:7px 9px;
    border-radius:9px;
    font-size:13px;
}
.stage-mini-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.stage-absents-soft{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    min-width:28px;
    height:24px;
    border-radius:999px;
    background:#f1f5f9;
    color:#475569;
    font-weight:900;
    cursor:help;
}
.stage-matrix-cell{
    position:relative;
}
.stage-matrix-cell .stage-cell-main strong{
    max-width:130px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* V2.50 — gestion des groupes de stage */
.stage-group-head{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    white-space:nowrap;
}
.stage-group-delete{
    border:0;
    background:transparent;
    color:#9ca3af;
    cursor:pointer;
    font-size:13px;
    line-height:1;
    padding:2px 4px;
    border-radius:6px;
}
.stage-group-delete:hover{
    background:#fee2e2;
    color:#b91c1c;
}

/* V2.54 — sélection multiple scans non associés */
.scans-bulk-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.scan-bulk-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.scan-bulk-select{min-width:260px;max-width:420px;height:34px;border:1px solid #cbd5e1;border-radius:10px;padding:0 10px;background:#fff;font-weight:700;color:#0f172a}
.mini-action{height:34px;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:10px;padding:0 10px;font-weight:800;cursor:pointer}
.mini-action.danger{border-color:#fecaca;background:#fff1f2;color:#b91c1c}
.scan-select-all{display:flex;align-items:center;gap:8px;margin:8px 12px 6px;font-size:.86rem;font-weight:800;color:#475569}
.scan-check{display:flex;align-items:center;justify-content:center;width:34px;flex:0 0 34px}
.scan-check input,.scan-select-all input{width:16px;height:16px;accent-color:#2563eb}
.td-unassoc-row{gap:6px}
@media(max-width:900px){.scan-bulk-select{min-width:180px;max-width:100%}.scans-bulk-toolbar{justify-content:flex-start}.scan-bulk-form{width:100%}}

/* V2.55 - Page étudiants : filtre catégorie */
.students-category-tabs { margin-bottom: 12px; }
.students-hero { margin-bottom: 12px; }
.students-table-card { padding: 0; }
.students-table th, .students-table td { white-space: nowrap; }
.students-table td:first-child { min-width: 240px; }
.btn-sm { padding: 8px 12px; border-radius: 12px; font-size: 13px; }
.compact-section-state {
    margin: 10px 0 14px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid #dbe5f2;
    box-shadow: 0 10px 25px rgba(15,23,42,.05);
}
.right { text-align: right; }
@media (max-width: 900px) {
    .students-table td:first-child { min-width: 180px; }
}

/* V2.56 — export Excel des séances de stage + compacité */
.stage-export-icon{
    width:26px;
    height:26px;
    border-radius:9px;
    margin-top:6px;
    margin-right:6px;
    background:#f0fdf4;
    border-color:#bbf7d0;
    color:#15803d;
    vertical-align:middle;
}
.stage-export-icon:hover{ background:#dcfce7; }
.stage-matrix-cell .stage-cell-tools{
    display:inline-block;
    vertical-align:middle;
    margin-top:6px;
}

/* V2.57 - taux de présence par séance de stage */

.stage-cell-present em,
.stage-total-cell small{
    display:block;
    margin-top:2px;
    font-size:.72rem;
    font-style:normal;
    color:#64748b;
    line-height:1.05;
}


/* Parcours étudiant — information compacte dans les tableaux */
.parcours-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  margin-left:4px;
  border-radius:50%;
  background:#eef2ff;
  border:1px solid #c7d2fe;
  color:#3730a3;
  font-size:10px;
  font-weight:900;
  line-height:1;
  vertical-align:middle;
  cursor:help;
  user-select:none;
}




/* Administration — sous-menu discret et intégré à la navigation */
.admin-nav{
  margin:2px 0 0;
}
.admin-nav > summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:44px;
  padding:8px 10px;
  border-radius:12px;
  color:#dbeafe;
  font-weight:700;
  cursor:pointer;
  user-select:none;
  transition:background .15s ease,color .15s ease;
}
.admin-nav > summary::-webkit-details-marker{display:none}
.admin-nav > summary:hover{
  background:rgba(255,255,255,.07);
  color:#fff;
}
.admin-nav > summary.active{
  color:#fff;
}
.admin-nav-title{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.admin-nav > summary .admin-icon{
  width:28px;
  height:28px;
  border-radius:9px;
  background:rgba(255,255,255,.10);
  color:#bfdbfe;
}
.admin-nav > summary.active .admin-icon{
  background:rgba(255,255,255,.13);
  color:#fff;
}
.admin-chevron{
  color:#bfdbfe;
  font-size:11px;
  opacity:.85;
  transition:transform .16s ease;
}
.admin-nav[open] .admin-chevron{
  transform:rotate(180deg);
}

/* Enfants : pas de gros boutons ni d'icônes carrées */
.admin-nav-links{
  position:relative;
  display:grid;
  gap:1px;
  margin:1px 0 5px 25px;
  padding:2px 0 2px 17px;
}
.admin-nav-links::before{
  content:"";
  position:absolute;
  left:5px;
  top:3px;
  bottom:3px;
  width:1px;
  background:rgba(191,219,254,.25);
}
.side-nav .admin-nav-links a{
  position:relative;
  min-height:34px;
  padding:7px 9px;
  border-radius:9px;
  gap:8px;
  color:#cbd5e1;
  background:transparent;
  box-shadow:none;
  font-size:12px;
  font-weight:650;
}
.side-nav .admin-nav-links a:hover{
  color:#fff;
  background:rgba(255,255,255,.055);
}
.side-nav .admin-nav-links a.active{
  color:#fff;
  background:rgba(255,255,255,.10);
  box-shadow:none;
}
.admin-child-dot{
  width:5px;
  height:5px;
  border-radius:50%;
  background:#93c5fd;
  flex:0 0 auto;
}
.side-nav .admin-nav-links a.active .admin-child-dot{
  width:6px;
  height:6px;
  background:#fff;
}


/* Patch TD — édition directe discrète, suppression et nettoyage de la rangée */
.td-item-card > summary {
  grid-template-columns: 26px minmax(240px,1fr) 88px 88px 34px 30px 30px 12px;
  overflow: visible;
}
.td-item-main { min-width: 0; }
.td-inline-title-form {
  margin: 0;
  display: inline-block;
  max-width: 100%;
}
.td-inline-title {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  max-width: 100%;
  min-width: 8ch;
  border: 0 !important;
  border-bottom: 1px dashed transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 1px 2px !important;
  border-radius: 0 !important;
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.15;
  cursor: text;
}
.td-inline-title:hover {
  border-bottom-color: #cbd5e1 !important;
}
.td-inline-title:focus {
  outline: none;
  border-bottom-color: #2563eb !important;
  background: rgba(239,246,255,.55) !important;
}
.td-delete-form { margin: 0; display: inline-flex; align-items: center; justify-content: center; }
.td-delete-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 13px;
}
.td-delete-icon:hover { background: #fff1f2; border-color:#fecdd3; color:#be123c; transform: translateY(-1px); }
.td-chevron { justify-self: center; }
@media (max-width: 980px) {
  .td-item-card > summary { grid-template-columns: 26px 1fr; }
  .td-attendance-compact,
  .td-rate-compact,
  .td-stats-toggle-form,
  .td-export-icon,
  .td-delete-form,
  .td-chevron { grid-column:2; justify-self:start; align-items:flex-start; }
}

/* Patch TD UX — titre éditable plus naturel + actions non coupées */
.td-week-card,
.td-week-items,
.td-item-card {
  overflow: visible !important;
}
.td-item-card > summary {
  grid-template-columns: 26px minmax(360px, 1fr) 86px 72px 32px 32px 30px 14px !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  box-sizing: border-box;
  width: 100%;
}
.td-item-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.td-inline-title-form {
  display: block !important;
  width: min(100%, 620px) !important;
  max-width: min(100%, 620px) !important;
  margin: 0 !important;
}
.td-inline-title {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 18ch !important;
  border: 0 !important;
  border-bottom: 1px solid transparent !important;
  background: rgba(248, 250, 252, .9) !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  color: #0f172a !important;
  text-overflow: ellipsis;
}
.td-inline-title:hover {
  background: #f1f5f9 !important;
  border-bottom-color: #cbd5e1 !important;
}
.td-inline-title:focus {
  outline: 2px solid rgba(37, 99, 235, .18) !important;
  outline-offset: 1px !important;
  background: #ffffff !important;
  border-bottom-color: #2563eb !important;
}
.td-stats-toggle-form,
.td-delete-form {
  justify-self: center;
  align-self: center;
}
.td-export-icon,
.td-delete-icon,
.td-stats-toggle {
  flex: 0 0 auto;
}
.td-export-icon {
  width: 30px !important;
  height: 30px !important;
  justify-self: center;
  margin-right: 2px;
}
.td-delete-icon {
  width: 28px !important;
  height: 28px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: #94a3b8 !important;
}
.td-delete-icon:hover {
  background: #fee2e2 !important;
  border-color: #fecaca !important;
  color: #be123c !important;
}
.td-chevron {
  justify-self: center;
  min-width: 10px;
}
@media (max-width: 1180px) {
  .td-item-card > summary {
    grid-template-columns: 26px minmax(260px,1fr) 78px 66px 30px 30px 28px 12px !important;
    gap: 6px !important;
  }
  .td-inline-title-form { max-width: 100% !important; }
}
@media (max-width: 980px) {
  .td-item-card > summary {
    grid-template-columns: 26px 1fr !important;
  }
  .td-attendance-compact,
  .td-rate-compact,
  .td-stats-toggle-form,
  .td-export-icon,
  .td-delete-form,
  .td-chevron {
    grid-column: 2;
    justify-self: start;
    align-items: flex-start;
  }
}

/* Patch TD parcours — métadonnées modifiables discrètes */
.td-meta-row{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin-top:4px;
}
.td-meta-form{margin:0;display:inline-flex;align-items:center;max-width:100%;}
.td-meta-input,
.td-meta-select{
  width:auto;
  max-width:260px;
  min-height:22px;
  border:0;
  background:#f8fafc;
  color:#334155;
  border-radius:999px;
  padding:4px 9px;
  font-size:11px;
  font-weight:800;
  line-height:1.1;
  box-shadow:inset 0 0 0 1px #e2e8f0;
}
.td-meta-input{min-width:120px;}
.td-meta-matiere .td-meta-input{font-weight:900;color:#1e293b;background:#eef6ff;box-shadow:inset 0 0 0 1px #bfdbfe;}
.td-meta-select{cursor:pointer;appearance:none;padding-right:18px;}
.td-meta-select:hover,
.td-meta-input:hover{background:#eff6ff;box-shadow:inset 0 0 0 1px #93c5fd;}
.td-meta-select:focus,
.td-meta-input:focus{outline:2px solid rgba(37,99,235,.18);background:#fff;box-shadow:inset 0 0 0 1px #60a5fa;}
.td-meta-parcours{background:#f5f3ff;color:#4c1d95;box-shadow:inset 0 0 0 1px #ddd6fe;}
.td-meta-chip{display:inline-flex;align-items:center;border-radius:999px;background:#f1f5f9;color:#64748b;padding:4px 9px;font-size:11px;font-weight:800;box-shadow:inset 0 0 0 1px #e2e8f0;}
.td-item-main{min-width:0;}
.td-item-card > summary{overflow:visible;}
@media(max-width:900px){
  .td-meta-row{gap:4px;}
  .td-meta-input,.td-meta-select{max-width:180px;font-size:10.5px;}
}

/* Patch TD métadonnées — champs matière/catégorie/parcours en petits badges discrets */
.td-item-card > summary .td-item-main {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.td-item-card > summary .td-inline-title-form {
  width: min(100%, 620px) !important;
  max-width: min(100%, 620px) !important;
  display: block !important;
}

.td-item-card > summary .td-meta-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-top: 0 !important;
  width: auto !important;
  max-width: 100% !important;
}

.td-item-card > summary .td-meta-form {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.td-item-card > summary .td-meta-input,
.td-item-card > summary .td-meta-select {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 190px !important;
  height: 20px !important;
  min-height: 20px !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 2px 7px !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
  background: rgba(241,245,249,.75) !important;
  color: #475569 !important;
  box-shadow: none !important;
  outline: none !important;
}

.td-item-card > summary .td-meta-input {
  min-width: 76px !important;
}

.td-item-card > summary .td-meta-matiere .td-meta-input {
  max-width: 170px !important;
  font-weight: 800 !important;
  background: rgba(239,246,255,.8) !important;
  color: #1d4ed8 !important;
}

.td-item-card > summary .td-meta-select {
  cursor: pointer !important;
  appearance: auto !important;
  -webkit-appearance: menulist !important;
  padding-right: 4px !important;
}

.td-item-card > summary .td-meta-parcours {
  max-width: 150px !important;
  background: rgba(245,243,255,.8) !important;
  color: #6d28d9 !important;
}

.td-item-card > summary .td-meta-input:hover,
.td-item-card > summary .td-meta-select:hover {
  background: #eff6ff !important;
  box-shadow: inset 0 0 0 1px rgba(147,197,253,.9) !important;
}

.td-item-card > summary .td-meta-input:focus,
.td-item-card > summary .td-meta-select:focus {
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px #60a5fa !important;
}

.td-item-card > summary .td-meta-chip {
  height: 20px !important;
  padding: 2px 7px !important;
  font-size: 10.5px !important;
  font-weight: 750 !important;
  background: rgba(241,245,249,.75) !important;
  color: #64748b !important;
  box-shadow: none !important;
}
