/* RC Champigneulles — événements de match (dashboard et fiche joueur).
 * Feuille autonome chargée après rcc-equipe.css ou rcc-fiche.css.
 * Pas de sélecteurs globaux pouvant casser le thème v2. */
body.rcc-equipe-page #resultat .rcc-match-events,
body.rcc-player-page #rcc-player-games .rcc-match-events {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(50px,80px) minmax(0,1fr);
  gap: 10px;
  width: 100%;
  padding: 0 16px 18px;
  margin: 0;
  background: #fff;
  color: #172033;
  font-family: inherit;
}

body.rcc-equipe-page #resultat .rcc-match-events *,
body.rcc-player-page #rcc-player-games .rcc-match-events * {
  box-sizing: border-box;
}

body.rcc-equipe-page #resultat .rcc-match-events-inner,
body.rcc-player-page #rcc-player-games .rcc-match-events-inner {
  grid-column: 1;
  min-width: 0;
  width: 100%;
  padding: 13px 14px 12px;
  background: #f8fafc;
  border: 1px solid #e4eaf2;
  border-left: 3px solid #b90e13;
  border-radius: 12px;
}
body.rcc-equipe-page #resultat .rcc-match-events--away .rcc-match-events-inner,
body.rcc-player-page #rcc-player-games .rcc-match-events--away .rcc-match-events-inner {
  grid-column: 3;
  border-left: 1px solid #e4eaf2;
  border-right: 3px solid #b90e13;
  text-align: right;
}
body.rcc-player-page #rcc-player-games .rcc-match-events--neutral .rcc-match-events-inner {
  grid-column: 1 / -1;
}

.rcc-match-events .rcc-event-eyebrow {
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid #e3e9f1;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #9e1921;
}
.rcc-match-events .rcc-event-group + .rcc-event-group {
  margin-top: 14px;
}
.rcc-match-events .rcc-event-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
  color: #334155;
}
.rcc-match-events .rcc-event-group-head svg {
  color: #ad161b;
}
.rcc-match-events--away .rcc-event-group-head {
  justify-content: flex-end;
}
.rcc-match-events .rcc-event-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
  padding: 5px 0;
}
.rcc-match-events .rcc-event-person + .rcc-event-person {
  border-top: 1px dashed #e7eaf0;
}
.rcc-match-events--away .rcc-event-person {
  flex-direction: row-reverse;
}
.rcc-match-events .rcc-event-person-link {
  min-width: 0;
  flex: 1 1 auto;
  color: #172033;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: color .15s ease;
}
.rcc-match-events .rcc-event-person-link:hover,
.rcc-match-events .rcc-event-person-link:focus-visible {
  color: #b90e13;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rcc-match-events .rcc-event-person-link:focus-visible {
  outline: 2px solid #d6aa4b;
  outline-offset: 2px;
}
/* Les cartons jaunes et rouges restent côte à côte dans une seule ligne joueur. */
.rcc-match-events .rcc-event-cards {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  max-width: 100%;
}
.rcc-match-events .rcc-event-repeats {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  color: #b90e13;
}
.rcc-match-events .rcc-event-repeats svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.rcc-match-events .rcc-event-count {
  color: #8f151d;
  font-size: 11px;
  font-weight: 850;
}
.rcc-match-events .rcc-event-card-mark {
  display: inline-block;
  flex: 0 0 9px;
  width: 9px;
  height: 13px;
  border-radius: 2px;
  border: 1px solid rgba(15,23,42,.1);
  box-shadow: 0 1px 2px rgba(15,23,42,.12);
  transform: rotate(-5deg);
}
.rcc-match-events .rcc-event-card-mark--jaunes { background: #f7c93b; }
.rcc-match-events .rcc-event-card-mark--rouges { background: #d62835; }

/* Fiche : pas de nom de joueur, seulement les événements non nuls. */
body.rcc-player-page #rcc-player-games .rcc-match-events--player {
  padding-bottom: 15px;
}
body.rcc-player-page #rcc-player-games .rcc-match-events--player .rcc-match-events-inner {
  padding: 12px 13px;
}
body.rcc-player-page #rcc-player-games .rcc-match-events--player .rcc-event-eyebrow {
  margin-bottom: 9px;
  padding-bottom: 7px;
}
.rcc-match-events .rcc-event-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rcc-match-events--away .rcc-event-chips { justify-content: flex-end; }
.rcc-match-events .rcc-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 650;
  white-space: normal;
}
.rcc-match-events .rcc-event-chip svg {
  flex: none;
  color: #b90e13;
}
.rcc-match-events .rcc-event-chip strong { color: #9e1921; font-weight: 900; }
.rcc-match-events .rcc-event-chip--jaunes { background: #fffcf0; border-color: #f3e4b7; }
.rcc-match-events .rcc-event-chip--rouges { background: #fff4f4; border-color: #f3d1d5; }

@media (max-width: 767px) {
  body.rcc-equipe-page #resultat .rcc-match-events,
  body.rcc-player-page #rcc-player-games .rcc-match-events {
    display: block;
    padding: 0 10px 13px;
  }
  body.rcc-equipe-page #resultat .rcc-match-events-inner,
  body.rcc-player-page #rcc-player-games .rcc-match-events-inner {
    width: min(94%, 400px);
    padding: 12px 11px;
    margin-right: auto;
    margin-left: 0;
  }
  body.rcc-equipe-page #resultat .rcc-match-events--away .rcc-match-events-inner,
  body.rcc-player-page #rcc-player-games .rcc-match-events--away .rcc-match-events-inner {
    margin-left: auto;
    margin-right: 0;
  }
  body.rcc-player-page #rcc-player-games .rcc-match-events--neutral .rcc-match-events-inner {
    width: 100%;
  }
  .rcc-match-events .rcc-event-person-link { font-size: 11px; }
}
@media (max-width: 370px) {
  .rcc-match-events .rcc-event-repeats svg { width: 12px; height: 12px; }
  .rcc-match-events .rcc-event-person { gap: 4px; }
  .rcc-match-events .rcc-event-chip { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .rcc-match-events .rcc-event-person-link { transition: none; }
}
