.gma-comp { padding: 14px 0; border-bottom: .5px solid rgba(0,0,0,.10); }
.gma-comp:last-child { border-bottom: none; }
.gma-comp-nom { font-size: 14px; color: #1f2933; margin-bottom: 12px; }
.gma-tag { font-size: 11px; color: #5f5e5a; background: #f1efe8; border-radius: 8px; padding: 2px 7px; margin-left: 4px; white-space: nowrap; }

.gma-track { display: flex; align-items: flex-start; padding: 0 4px; overflow-x: auto; }
.gma-step { display: flex; flex-direction: column; align-items: center; width: 96px; flex-shrink: 0; }
.gma-step.is-solo { width: 130px; }
.gma-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; box-sizing: border-box; }
.is-acquis  .gma-dot { background: #639922; color: #fff; }
.is-objectif .gma-dot { background: #faeeda; border: 2px solid #ba7517; color: #854f0b; }
.is-a_venir .gma-dot { background: #f1efe8; border: 1.5px dashed #b4b2a9; color: #888780; font-size: 15px; }

.gma-conn { flex: 1; height: 4px; margin-top: 16px; border-radius: 2px; min-width: 12px; }
.gma-conn.is-done { background: #639922; }
.gma-conn.is-todo { background: #d3d1c7; }

.gma-lab { font-size: 12px; color: #444441; margin-top: 7px; text-align: center; line-height: 1.3; }
.gma-lab i { font-size: 13px; vertical-align: -1px; }
.gma-sub { font-size: 11px; color: #888780; margin-top: 1px; text-align: center; }
.gma-st  { font-size: 11px; margin-top: 3px; text-align: center; }
.gma-st-acquis { color: #3b6d11; } .gma-st-objectif { color: #854f0b; } .gma-st-a_venir { color: #888780; }

.gma-status { font-size: 13px; margin-top: 12px; display: flex; align-items: flex-start; gap: 7px; line-height: 1.4; }
.gma-status i { font-size: 16px; flex: none; margin-top: 2px; }
.gma-status-obj  { color: #854f0b; } .gma-status-full { color: #3b6d11; }
.gma-status-warn { color: #854f0b; } .gma-status-todo { color: #888780; }

.gma-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: #e7e5dd; margin-top: 8px; }
.gma-bar .gma-seg { display: block; height: 100%; }
.seg-n1 { background: #c0dd97; } .seg-n2 { background: #97c459; } .seg-n3 { background: #3b6d11; }
.gma-pip { width: 14px; height: 14px; border-radius: 3px; display: inline-block; flex-shrink: 0; }

.gma-chap-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.gma-chap-titre { font-size: 15px; font-weight: 500; margin: 0; }
.gma-chap-resume { margin-left: auto; font-size: 13px; color: #5f5e5a; }
.gma-legende { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 14px; font-size: 13px; }
.gma-leg { display: flex; align-items: center; gap: 7px; }

.gma-resume { margin-bottom: 1rem; }
.gma-resume-txt { margin: 0 0 0.5rem; line-height: 1.45; }

.gma-chapitre .gma-comp-list { padding: 0 1rem 1rem; border-top: 1px solid #f1f5f9; }

/* « Revoir le cours » — une invitation, pas un bouton d'action : l'élève est
   venu voir où il en est, le renvoi se propose sans prendre la vedette. */
.gma-renvoi-cours { margin: 0.75rem 0 0.25rem; font-size: 13px; }
.gma-renvoi-cours a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3B6D11;
  text-decoration: none;
  border-bottom: 1px solid rgba(59, 109, 17, 0.35);
  padding-bottom: 1px;
}
.gma-renvoi-cours a:hover,
.gma-renvoi-cours a:focus-visible { border-bottom-color: #3B6D11; }

.gma-fragile .gma-comp-nom::after {
  content: "";
}

.progression-legende-detail {
  display: block;
  font-size: 0.85em;
  color: #64748b;
  font-weight: normal;
  margin-top: 0.25rem;
}

.gma-prog-titre { font-size: 15px; color: #1f2933; }
.gma-prog-sous  { font-size: 12px; color: #888780; margin-bottom: 12px; }
.gma-prog-legende { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; font-size: 12px; color: #5f5e5a; }
.gma-prog-legende > span { display: flex; align-items: center; gap: 6px; }
.gma-line { width: 20px; display: inline-block; }
.gma-prog-tip { position: absolute; pointer-events: none; background: #fff; border: 0.5px solid #d3d1c7;
  border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #1f2933; min-width: 120px; z-index: 2; }
.gma-tip-date { font-weight: 500; margin-bottom: 4px; }
.gma-tip-row { display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.gma-tip-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

body.lecture-confort .gma-prog-titre { font-size: 17px; }
body.lecture-confort .gma-prog-sous,
body.lecture-confort .gma-prog-legende,
body.lecture-confort .gma-prog-tip { font-size: 14px; }

body.lecture-confort .gma-comp-nom { font-size: 17px; letter-spacing: .3px; }
body.lecture-confort .gma-lab { font-size: 14px; }
body.lecture-confort .gma-sub { font-size: 13px; }
body.lecture-confort .gma-st  { font-size: 13px; }
body.lecture-confort .gma-status { font-size: 15px; }
body.lecture-confort .gma-comp { padding: 20px 0; }
body.lecture-confort .gma-dot { width: 42px; height: 42px; }
body.lecture-confort .gma-step { width: 108px; }

/* ── Mode sombre (suit le réglage du système) ──────────────── */
@media (prefers-color-scheme: dark) {
  .gma-comp { border-bottom-color: rgba(255, 255, 255, .12); }
  .gma-comp-nom,
  .gma-prog-titre { color: #e2e8f0; }
  .gma-tag { color: #cbd5e1; background: #334155; }
  .gma-lab { color: #cbd5e1; }
  .gma-sub,
  .gma-prog-sous,
  .progression-legende-detail { color: #94a3b8; }
  .gma-chap-resume,
  .gma-prog-legende { color: #94a3b8; }
  .gma-chapitre .gma-comp-list { border-top-color: #334155; }
  .gma-renvoi-cours a { color: #a3d977; border-bottom-color: rgba(163, 217, 119, 0.4); }
  .gma-renvoi-cours a:hover,
  .gma-renvoi-cours a:focus-visible { border-bottom-color: #a3d977; }

  /* Étapes du parcours de compétence */
  .is-objectif .gma-dot { background: #3a2f0b; border-color: #ba7517; color: #fcd34d; }
  .is-a_venir .gma-dot { background: #334155; border-color: #64748b; color: #cbd5e1; }
  .gma-conn.is-todo { background: #475569; }
  .gma-bar { background: #334155; }

  /* Statuts textuels */
  .gma-st-acquis, .gma-status-full { color: #86efac; }
  .gma-st-objectif, .gma-status-obj, .gma-status-warn { color: #fcd34d; }
  .gma-st-a_venir, .gma-status-todo { color: #94a3b8; }

  /* Info-bulle du graphe de progression */
  .gma-prog-tip { background: #1e293b; border-color: #475569; color: #e2e8f0; }
}
