:root {
  --rp-moyen: color-mix(in srgb, var(--ds-text, #18181b) 55%, var(--ds-surface, #fff));
  --rp-clair: color-mix(in srgb, var(--ds-text, #18181b) 25%, var(--ds-surface, #fff));
  --rp-vide: color-mix(in srgb, var(--ds-text, #18181b) 10%, var(--ds-surface, #fff));
}
.rp-voile {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: color-mix(in srgb, var(--ds-bg, #f3f3f4) 60%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s ease;
}
.rp-voile.rp-visible {
  opacity: 1;
}
.rp-fenetre {
  position: fixed;
  z-index: 951;
  left: 50%;
  top: 50%;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ds-surface, #fff);
  color: var(--ds-text, #18181b);
  border: 1px solid var(--ds-border, #ebebed);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .16);
  transform: translate(-50%, -48%) scale(.97);
  opacity: 0;
  transition: opacity .3s ease, transform .45s cubic-bezier(.32, .72, 0, 1);
  outline: none;
}
.rp-fenetre.rp-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.rp-tete {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 30px 20px;
  background: var(--ds-surface, #fff);
  border-bottom: 1px solid var(--ds-border, #ebebed);
}
.rp-sur {
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ds-text-3, #71717a);
}
.rp-tete h2 {
  margin: 4px 0 2px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.rp-tete p {
  margin: 0;
  font-size: 13px;
  color: var(--ds-text-3, #71717a);
}
.rp-nav {
  display: flex;
  gap: 6px;
}
.rp-rond {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ds-border, #ebebed);
  border-radius: 50%;
  background: var(--ds-surface, #fff);
  color: var(--ds-text-2, #52525b);
  cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.rp-rond:hover:not(:disabled) {
  background: var(--ds-hover);
  color: var(--ds-text, #18181b);
}
.rp-rond:active:not(:disabled) {
  transform: scale(.94);
}
.rp-rond:disabled {
  opacity: .35;
  cursor: default;
}
.rp-rond svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rp-corps {
  display: grid;
  gap: 14px;
  padding: 22px 30px 30px;
}
.rp-entre .rp-corps > * {
  animation: rp-monte .5s cubic-bezier(.22, 1, .36, 1) backwards;
}
.rp-entre .rp-corps > :nth-child(2) { animation-delay: .05s; }
.rp-entre .rp-corps > :nth-child(3) { animation-delay: .1s; }
.rp-entre .rp-corps > :nth-child(4) { animation-delay: .15s; }
.rp-entre .rp-corps > :nth-child(5) { animation-delay: .2s; }
@keyframes rp-monte {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.rp-chiffres {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--ds-border, #ebebed);
  border-radius: 16px;
  overflow: hidden;
}
.rp-chiffre {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-right: 1px solid var(--ds-border, #ebebed);
  border-bottom: 1px solid var(--ds-border, #ebebed);
}
.rp-chiffre:nth-child(3n) {
  border-right: 0;
}
.rp-chiffre:nth-last-child(-n + 3) {
  border-bottom: 0;
}
.rp-lib {
  font-size: 12.5px;
  color: var(--ds-text-3, #71717a);
}
.rp-chiffre > b {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.rp-chiffre > b small {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ds-text-3, #71717a);
}
.rp-vs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: baseline;
  font-size: 12px;
  color: var(--ds-text-3, #71717a);
}
.rp-ecart {
  font-weight: 600;
  color: var(--ds-text-2, #52525b);
  font-variant-numeric: tabular-nums;
}
.rp-hausse {
  color: var(--ds-success, #3f7a59);
}
.rp-baisse {
  color: var(--ds-danger, #b4443a);
}
.rp-bloc {
  padding: 18px 20px;
  border: 1px solid var(--ds-border, #ebebed);
  border-radius: 16px;
}
.rp-bloc h3 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ds-text-3, #71717a);
}
.rp-points {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  align-items: end;
  gap: 2px;
  height: 150px;
}
.rp-col {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
}
.rp-col i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ds-text, #18181b);
}
.rp-col.rp-ancien i {
  background: var(--rp-clair);
}
.rp-col i.rp-v {
  width: 3px;
  height: 3px;
  background: var(--rp-vide);
}
.rp-col:hover i:not(.rp-v) {
  background: #3B82F6;
}
.rp-pied {
  display: grid;
  margin-top: 12px;
  font-family: var(--ds-mono, ui-monospace, Menlo, monospace);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ds-text, #18181b);
}
.rp-pied .rp-ancien {
  color: var(--ds-text-3, #a1a1aa);
}
.rp-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ds-text-3, #71717a);
}
.rp-conf {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.rp-taux {
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.rp-taux small {
  font-size: 30px;
}
.rp-pilules {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 5px;
  height: 34px;
}
.rp-pilules i {
  border-radius: 99px;
  background: var(--rp-vide);
}
.rp-pilules i.on {
  background: var(--ds-text, #18181b);
}
.rp-entre .rp-pilules i.on {
  animation: rp-pilule .4s ease calc(var(--i) * 25ms + .2s) backwards;
}
@keyframes rp-pilule {
  from {
    background: var(--rp-vide);
  }
}
.rp-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--ds-text-2, #52525b);
}
.rp-legende li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rp-legende i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.rp-legende b {
  margin-left: 2px;
  color: var(--ds-text, #18181b);
  font-variant-numeric: tabular-nums;
}
.rp-deux {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 14px;
}
.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rp-table th {
  padding: 0 0 8px;
  text-align: right;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ds-text-3, #71717a);
}
.rp-table th:first-child,
.rp-table td:first-child {
  text-align: left;
}
.rp-table td {
  padding: 10px 0;
  border-top: 1px solid var(--ds-border, #ebebed);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rp-table td:first-child {
  font-weight: 500;
}
.rp-mini {
  display: inline-block;
  width: 44px;
  height: 5px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 99px;
  background: var(--rp-vide);
  overflow: hidden;
}
.rp-mini i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ds-text, #18181b);
}
.rp-six {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.rp-six-col {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--ds-text-3, #71717a);
}
.rp-six-pts {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  height: 92px;
  justify-content: flex-start;
}
.rp-six-pts i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rp-clair);
}
.rp-six-pts i.rp-v {
  width: 4px;
  height: 4px;
  background: var(--rp-vide);
}
.rp-actuel .rp-six-pts i:not(.rp-v) {
  background: var(--ds-text, #18181b);
}
.rp-six-col b {
  font-size: 13px;
  color: var(--ds-text, #18181b);
  font-variant-numeric: tabular-nums;
}
.rp-six-col small {
  font-size: 10.5px;
}
.rp-retenir ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.5;
}
.rp-vide {
  color: var(--ds-text-3, #71717a);
}
.rp-rien {
  padding: 30px 0;
  text-align: center;
}
@media (max-width: 767px) {
  .rp-fenetre {
    top: auto;
    bottom: 0;
    width: 100vw;
    max-height: calc(100vh - 40px);
    border-radius: 22px 22px 0 0;
    transform: translate(-50%, 8%);
  }
  .rp-fenetre.rp-visible {
    transform: translate(-50%, 0);
  }
  .rp-tete,
  .rp-corps {
    padding-left: 18px;
    padding-right: 18px;
  }
  .rp-chiffres {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rp-chiffre:nth-child(3n) {
    border-right: 1px solid var(--ds-border, #ebebed);
  }
  .rp-chiffre:nth-child(2n) {
    border-right: 0;
  }
  .rp-chiffre:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--ds-border, #ebebed);
  }
  .rp-chiffre:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
  .rp-chiffre > b {
    font-size: 24px;
  }
  .rp-conf,
  .rp-deux {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .rp-pilules {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    height: 56px;
    row-gap: 6px;
  }
  .rp-points {
    height: 90px;
  }
  .rp-col i {
    width: 3px;
    height: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rp-voile,
  .rp-fenetre {
    transition: none;
  }
  .rp-entre .rp-corps > *,
  .rp-entre .rp-pilules i.on {
    animation: none;
  }
}
.rp-page {
  max-width: 980px;
  background: var(--ds-surface, #fff);
  border: 1px solid var(--ds-border, #ebebed);
  border-radius: 22px;
  overflow: clip;
  outline: none;
}
.rp-page .rp-tete {
  position: static;
}
@media (max-width: 767px) {
  .rp-page {
    border-radius: 18px;
  }
}
.rp-ecran {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.rp-ecran .rp-page {
  max-width: none;
}
.rp-liste {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 16px 10px;
  background: var(--ds-surface, #fff);
  border: 1px solid var(--ds-border, #ebebed);
  border-radius: 18px;
}
.rp-liste h3 {
  margin: 0 8px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ds-text-3, #71717a);
}
.rp-liste ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rp-mois {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  text-align: left;
  color: var(--ds-text, #18181b);
  cursor: pointer;
  transition: background-color .15s ease;
}
.rp-mois:hover {
  background: var(--ds-hover);
}
.rp-mois.on {
  background: var(--ds-active);
}
.rp-mois b {
  font-size: 13.5px;
  font-weight: 500;
}
.rp-mois.on b {
  font-weight: 600;
}
.rp-mois span {
  font-size: 12px;
  color: var(--ds-text-3, #71717a);
}
.rp-mois-vide b {
  color: var(--ds-text-3, #71717a);
}
.rp-mois:focus-visible {
  outline: 2px solid var(--ds-text, #18181b);
  outline-offset: -2px;
}
@media (max-width: 1099px) {
  .rp-ecran {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .rp-liste {
    position: static;
    max-height: none;
    padding: 12px;
    overflow-x: auto;
  }
  .rp-liste h3 {
    margin: 0 4px 8px;
  }
  .rp-liste ol {
    display: flex;
    gap: 6px;
  }
  .rp-mois {
    width: max-content;
    min-width: 132px;
    border: 1px solid var(--ds-border, #ebebed);
  }
  .rp-mois.on {
    border-color: var(--ds-text, #18181b);
    background: transparent;
  }
}

/* Couleurs du rapport */
.rp-page,
.rp-fenetre,
.rp-liste {
  --rp-bleu: #3B82F6;
  --rp-violet: #8B5CF6;
  --rp-orange: #F59E0B;
  --rp-vert: #10B981;
  --rp-cyan: #06B6D4;
  --rp-rose: #EC4899;
  --rp-bleu-pale: color-mix(in srgb, #3B82F6 32%, var(--ds-surface, #fff));
}
.rp-chiffre .rp-lib::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 1px;
  background: var(--t, var(--rp-bleu));
}
.rp-col i {
  background: var(--rp-bleu);
}
.rp-col.rp-ancien i {
  background: var(--rp-bleu-pale);
}
.rp-col:hover i:not(.rp-v) {
  background: #1D4ED8;
}
.rp-pied span:not(.rp-ancien) {
  color: var(--rp-bleu);
}
.rp-taux {
  color: var(--rp-vert);
}
.rp-pilules i.on {
  background: var(--rp-vert);
}
.rp-mini i {
  background: var(--rp-vert);
}
.rp-six-pts i {
  background: var(--rp-bleu-pale);
}
.rp-actuel .rp-six-pts i:not(.rp-v) {
  background: var(--rp-bleu);
}
.rp-actuel b {
  color: var(--rp-bleu);
}
.rp-retenir li::marker {
  color: var(--rp-bleu);
}
.rp-mois.on {
  box-shadow: inset 3px 0 0 var(--rp-bleu);
}
.rp-mois.on b {
  color: var(--rp-bleu);
}
@media (max-width: 1099px) {
  .rp-mois.on {
    box-shadow: none;
    border-color: var(--rp-bleu);
  }
}

/* Taux de confirmation : rouge < 30 %, orange < 60 %, vert au-delà (22/11) */
.rp-conf { --rp-niv: var(--rp-vert); }
.rp-conf.rp-niv-bas { --rp-niv: #EF4444; }
.rp-conf.rp-niv-moyen { --rp-niv: var(--rp-orange); }
.rp-conf .rp-taux { color: var(--rp-niv); }
.rp-conf .rp-pilules i.on { background: var(--rp-niv); }
