/* Grouvel — Styles de la page « Ma progression » (pages/fondamental/progression.html)
   Complète revisions.css ; chargé uniquement par cette page. */

/* ---------- Sélecteur d'enfant ---------- */
.rvp-enfants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  align-items: center;
}
.rvp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  padding: 0.5em 1.1em;
  border: 2px solid var(--rv-border, rgba(0,0,0,.12));
  border-radius: 999px;
  background: var(--rv-card-solid, #fff);
  color: var(--rv-text, #333);
  font: 600 1rem/1.2 inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.rvp-chip:hover { transform: translateY(-1px); }
.rvp-chip.active {
  border-color: var(--rv-accent, #0e7490);
  background: var(--rv-accent, #0e7490);
  color: #fff;
}
.rvp-chip.ghost { border-style: dashed; opacity: 0.85; }
.rvp-add-form {
  display: none;
  gap: 0.5em;
  flex-wrap: wrap;
  align-items: center;
}
.rvp-add-form.show { display: flex; }
.rvp-add-form input {
  min-height: 44px;
  padding: 0.5em 0.9em;
  font-size: 16px; /* évite le zoom auto iOS */
  border: 2px solid var(--rv-border, rgba(0,0,0,.15));
  border-radius: 10px;
  background: var(--rv-card-solid, #fff);
  color: inherit;
  box-sizing: border-box;
  width: 12em;
  max-width: 100%;
}

/* ---------- Barres de progression par cycle ---------- */
.rvp-bars { display: grid; gap: 0.7em; margin: 1em 0; }
.rvp-bar-row {
  display: grid;
  grid-template-columns: 7.5em 1fr 5.5em;
  gap: 0.7em;
  align-items: center;
  font-size: 0.95rem;
}
.rvp-bar-track {
  height: 14px;
  border-radius: 999px;
  background: var(--rv-border, rgba(0,0,0,.1));
  overflow: hidden;
}
.rvp-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rv-accent, #0e7490), #22c55e);
  transition: width 0.5s ease;
}
.rvp-bar-label { font-weight: 600; }
.rvp-bar-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--rv-text-muted, #666); }

/* ---------- « Que réviser ensuite » ---------- */
.rvp-next { display: grid; gap: 0.8em; }
.rvp-next-card {
  border: 1px solid var(--rv-border, rgba(0,0,0,.1));
  border-left: 4px solid var(--rv-accent, #0e7490);
  border-radius: 12px;
  padding: 0.9em 1.1em;
  background: var(--rv-card-solid, #fff);
}
.rvp-next-card h4 { margin: 0 0 0.25em; font-size: 1.02rem; }
.rvp-next-card p { margin: 0.15em 0; font-size: 0.92rem; color: var(--rv-text-muted, #555); }
.rvp-next-card .rvp-debloque { font-size: 0.85rem; }
.rvp-next-card .rv-btn { margin-top: 0.6em; }

/* ---------- Checklist ---------- */
.rvp-cycle { margin: 1em 0; border: 1px solid var(--rv-border, rgba(0,0,0,.1)); border-radius: 12px; overflow: hidden; }
.rvp-cycle > summary {
  cursor: pointer;
  padding: 0.9em 1.1em;
  font-weight: 700;
  background: color-mix(in srgb, var(--rv-accent, #0e7490) 8%, transparent);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6em;
  min-height: 44px;
  box-sizing: border-box;
}
.rvp-cycle > summary::-webkit-details-marker { display: none; }
.rvp-cycle > summary::after { content: '▾'; opacity: 0.55; transition: transform 0.2s; }
.rvp-cycle[open] > summary::after { transform: rotate(180deg); }
.rvp-domaine { padding: 0.4em 1em 0.8em; }
.rvp-domaine h4 { margin: 0.7em 0 0.3em; font-size: 0.95rem; opacity: 0.85; }
.rvp-notion {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.35em 0;
  border-bottom: 1px dashed var(--rv-border, rgba(0,0,0,.08));
}
.rvp-notion:last-child { border-bottom: 0; }
.rvp-etat {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s;
}
.rvp-etat:hover { transform: scale(1.15); }
.rvp-notion-nom { flex: 1 1 auto; font-size: 0.95rem; }
.rvp-notion-nom small { display: block; color: var(--rv-text-muted, #666); font-size: 0.82rem; }
.rvp-notion .rvp-lien {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1.1rem;
}
.rvp-notion .rvp-lien:hover { background: color-mix(in srgb, var(--rv-accent, #0e7490) 12%, transparent); }
.rvp-notion.est-2 .rvp-notion-nom { opacity: 0.65; }

/* ---------- Carte des connaissances ---------- */
.rvp-carte-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rv-border, rgba(0,0,0,.1));
  border-radius: 12px;
  background: var(--rv-card-solid, #fff);
}
.rvp-carte-wrap svg { display: block; margin: 0 auto; }
.rvp-carte-node { cursor: pointer; }
.rvp-carte-node rect {
  fill: var(--rv-card-solid, #fff);
  stroke-width: 2.5;
  transition: filter 0.15s;
}
.rvp-carte-node.est-0 rect { stroke: #94a3b8; }
.rvp-carte-node.est-1 rect { stroke: #f59e0b; fill: color-mix(in srgb, #f59e0b 12%, var(--rv-card-solid, #fff)); }
.rvp-carte-node.est-2 rect { stroke: #22c55e; fill: color-mix(in srgb, #22c55e 14%, var(--rv-card-solid, #fff)); }
.rvp-carte-node.selected rect { stroke-width: 4; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25)); }
.rvp-carte-node text {
  fill: var(--rv-text, #333);
  font-size: 11px;
  pointer-events: none;
}
.rvp-carte-edge { fill: none; stroke: #94a3b8; stroke-width: 1.6; opacity: 0.6; }
.rvp-carte-edge.soft { stroke-dasharray: 5 4; opacity: 0.4; }
.rvp-detail {
  margin-top: 1em;
  padding: 1em 1.2em;
  border: 1px solid var(--rv-border, rgba(0,0,0,.1));
  border-left: 4px solid var(--rv-accent, #0e7490);
  border-radius: 12px;
  background: var(--rv-card-solid, #fff);
}
.rvp-detail h4 { margin: 0 0 0.3em; }
.rvp-detail .rvp-prereq-list { margin: 0.5em 0; padding-left: 1.2em; font-size: 0.92rem; }
.rvp-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  font-size: 0.85rem;
  color: var(--rv-text-muted, #666);
  margin: 0.6em 0;
}

/* ---------- Divers ---------- */
.rvp-vide {
  text-align: center;
  padding: 1.5em;
  color: var(--rv-text-muted, #666);
}
.rvp-attribution {
  font-size: 0.8rem;
  color: var(--rv-text-muted, #777);
  margin-top: 1.4em;
}
.rvp-attribution a { color: inherit; }

@media (prefers-color-scheme: dark) {
  .rvp-chip { border-color: rgba(255, 255, 255, 0.18); }
  .rvp-notion { border-bottom-color: rgba(255, 255, 255, 0.08); }
}

@media (max-width: 640px) {
  .rvp-bar-row { grid-template-columns: 5.5em 1fr 4.5em; font-size: 0.85rem; }
  .rvp-chip { padding: 0.5em 0.9em; font-size: 0.95rem; }
  .rvp-domaine { padding: 0.3em 0.7em 0.7em; }
}

@media print {
  .rvp-etat, .rvp-lien, .rv-nav, .rvp-add-form { display: none !important; }
}
