/* Répétition, les actions (U35, lot B). Dash charge `assets/` par ordre alphabétique : cette
   feuille passe avant `rp.css`. Classes `rp-rep-*` à elle seule ; ce qui touche une classe
   commune est limité à la carte « Construire une boucle » (#rp-repetition-construire). */
#rp-repetition-construire .rp-bouton,
.rp-rep-fenetre .rp-bouton {
  background: var(--rp-accent);
  color: var(--rp-surface) !important;
  border: 1px solid var(--rp-accent);
  height: auto;
  font-family: var(--rp-police-texte);
  font-size: var(--rp-taille-corps);
}
#rp-repetition-construire .rp-bouton-contour,
.rp-rep-fenetre .rp-bouton-contour {
  background: transparent;
  color: var(--rp-accent) !important;
}
#rp-repetition-construire .rp-bouton[data-disabled],
#rp-repetition-construire .rp-bouton:disabled { opacity: 0.6; cursor: default; }
#rp-repetition-construire .rp-rep-petit { min-height: 36px; padding: 0 var(--rp-espace-3); font-size: var(--rp-taille-secondaire); }
.rp-rep-champs {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--rp-espace-3);
}
.rp-rep-message:empty { display: none; }
.rp-rep-ok { color: var(--rp-accent); font-weight: 600; }
.rp-rep-props { display: flex; flex-direction: column; gap: var(--rp-espace-2); }
.rp-rep-prop {
  padding: var(--rp-espace-3);
  border: 1px solid var(--rp-ligne);
  border-radius: var(--rp-rayon-moyen);
  background: var(--rp-surface);
}
.rp-rep-prop[data-checked] { border-color: var(--rp-accent); box-shadow: inset 0 0 0 1px var(--rp-accent); }
.rp-rep-prop-tete { display: flex; justify-content: space-between; gap: var(--rp-espace-3); }
.rp-rep-choix-liste { display: flex; flex-direction: column; gap: var(--rp-espace-2); }
#rp-repetition-construire .rp-rep-choix {
  height: auto;
  min-height: 44px;
  padding: var(--rp-espace-2) var(--rp-espace-3);
  background: var(--rp-surface);
  color: var(--rp-texte);
  border: 1px solid var(--rp-ligne-forte);
  border-radius: var(--rp-rayon-moyen);
  font-weight: 400;
  text-align: left;
  justify-content: flex-start;
}
#rp-repetition-construire .rp-rep-choix:hover { border-color: var(--rp-accent); }
.rp-rep-choix .mantine-Button-label { white-space: normal; height: auto; }
.rp-rep-choix .mantine-Button-inner { justify-content: flex-start; }
.rp-rep-choix-texte { text-align: left; }
.rp-rep-fenetre { display: flex; flex-direction: column; gap: var(--rp-espace-3); }
.rp-rep-choix-texte { display: flex; flex-direction: column; gap: 2px; }
.rp-rep-faits-liste { margin: 0; padding-left: var(--rp-espace-5); font-size: var(--rp-taille-secondaire); }
.rp-rep-aller { display: flex; align-items: center; gap: var(--rp-espace-2); padding: var(--rp-espace-1) 0; font-size: var(--rp-taille-secondaire); }
.rp-rep-boucle:empty { display: none; }
.rp-rep-boucle { display: flex; flex-direction: column; gap: var(--rp-espace-3); border-top: 1px solid var(--rp-ligne); padding-top: var(--rp-espace-4); }
.rp-rep-savoir { margin: var(--rp-espace-1) 0 0; padding-left: var(--rp-espace-5); font-size: var(--rp-taille-secondaire); }
.rp-rep-boucle-corps { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--rp-espace-4); align-items: start; }
.rp-rep-trace { width: 100%; height: auto; }
.rp-rep-boucle-liste { display: flex; flex-direction: column; gap: var(--rp-espace-2); }
.rp-rep-passage.rp-rep-passage-3 { grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; }
.rp-rep-onglets { margin-top: var(--rp-espace-2); }
.rp-rep-lien {
  background: none;
  border: 0;
  padding: 0 var(--rp-espace-1);
  color: var(--rp-accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  min-height: 32px;
}
@media (max-width: 767px) {
  .rp-rep-champs { grid-template-columns: minmax(0, 1fr); }
  .rp-rep-boucle-corps { grid-template-columns: minmax(0, 1fr); }
  .rp-rep-trace { max-width: 240px; }
}
