/* Progression du parcours (js/cv-progress.js) — 28/11/2026.
   Charte : vert #00A78E (remplissage texte blanc : --cvg-green-fill #007A68 pour le contraste),
   texte #293651, police héritée (Comfortaa). Aucune transition « all ». */

/* Ligne sous le stepper */
.cvp-line { margin: 6px 24px 2px; }
.cvp-track { height: 4px; border-radius: 999px; background: var(--md-surface-container-highest, #E6E9EE); overflow: hidden; }
.cvp-fill { height: 100%; width: 0; border-radius: inherit; background: #00A78E; transition: width .35s ease; }
.cvp-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--md-on-surface, #293651); font-variant-numeric: tabular-nums; }
.cvp-step { font-weight: 600; }
.cvp-save { display: inline-flex; align-items: center; gap: 6px; color: var(--md-on-surface-variant, #5F6B7A); }
.cvp-save::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .55; }
.cvp-save--ok { color: var(--cvg-green-text, #007A68); }
.cvp-save--ok::before { opacity: 1; }
.cvp-save--busy::before { animation: cvp-pulse 1s ease-in-out infinite; }
.cvp-save--warn { color: #9A5B00; }
.cvp-milestone { flex-basis: 100%; color: var(--cvg-green-text, #007A68); font-weight: 600; }
@keyframes cvp-pulse { 50% { opacity: .15; } }
.cvp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Étape passée (facultative) */
.step-circle.skipped { background: var(--md-surface-container-highest, #E6E9EE); color: var(--md-on-surface-variant, #5F6B7A); border: 2px dashed var(--md-outline-variant, #C4CAD3); }

/* Sommaire des rubriques (étape 4) */
.cvp-rubrics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.cvp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--md-outline-variant, #DDE2E8); background: var(--md-surface, #fff); color: var(--md-on-surface, #293651); font: inherit; font-size: 13px; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.cvp-chip .material-icons-round { font-size: 18px; }
.cvp-chip:hover { border-color: #00A78E; }
.cvp-chip:focus-visible { outline: 2px solid var(--cvg-green-fill, #007A68); outline-offset: 2px; }
.cvp-chip.is-done { border-color: color-mix(in srgb, #00A78E 45%, transparent); background: color-mix(in srgb, #00A78E 8%, transparent); }
.cvp-chip.is-done .material-icons-round { color: var(--cvg-green-text, #007A68); }
.cvp-chip.is-todo .material-icons-round { color: #B26A00; }
.cvp-chip.is-opt { color: var(--md-on-surface-variant, #5F6B7A); }
.cvp-chip--all { border-style: dashed; color: var(--md-on-surface-variant, #5F6B7A); }

/* Rubriques repliables */
.cvp-toggle { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-top: -8px; margin-bottom: -8px; border: 0; border-radius: 8px; background: transparent; color: var(--md-on-surface-variant, #5F6B7A); cursor: pointer; transition: background-color .15s ease; }
.cvp-toggle:hover { background: color-mix(in srgb, #00A78E 10%, transparent); }
.cvp-toggle:focus-visible { outline: 2px solid var(--cvg-green-fill, #007A68); outline-offset: 1px; }
.cvp-toggle .material-icons-round { font-size: 22px; transition: transform .2s ease; }
.cvp-toggle[aria-expanded="false"] .material-icons-round { transform: rotate(-90deg); }
.cv-editor-section-header .lp-ctrls + .cvp-toggle,
.cv-editor-section-header .lp-inline + .cvp-toggle { margin-left: 4px; }
#cv-edit-pane .cvp-collapsed .cv-editor-body { display: none !important; }
#cv-edit-pane .cvp-collapsed { margin-bottom: 8px; }

/* Mobile : une ligne compacte */
@media (max-width: 640px) {
  .cvp-line { margin: 4px 12px 0; }
  .cvp-text { font-size: 12px; gap: 2px 10px; }
  .cvp-chip { padding: 0 10px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .cvp-fill, .cvp-toggle .material-icons-round { transition: none; }
  .cvp-save--busy::before { animation: none; }
}

html.dark .cvp-text { color: #E3E6EA; }
html.dark .cvp-chip { background: #2D2E2F; border-color: #3C4043; color: #E3E6EA; }
html.dark .cvp-chip.is-done { background: #0F3A34; border-color: #1E5F56; }
html.dark .cvp-chip.is-done .material-icons-round, html.dark .cvp-save--ok, html.dark .cvp-milestone { color: #7DD3C4; }
html.dark .step-circle.skipped { background: #2D2E2F !important; border-color: #5F6368 !important; color: #9AA0A6 !important; }
