/* Simulateur classement FIFA estimé — table cliquable + matchs éditables. */
/* Sélecteur de période (segmented control). */
.rs-fifa-sim__periods { display: inline-flex; gap: 0; margin: 2px 0 6px; padding: 3px;
    border-radius: 12px; background: color-mix(in srgb, var(--rs-text,#1b2733) 7%, transparent);
    border: 1px solid var(--rs-border, rgba(0,0,0,.10)); flex-wrap: wrap; }
.rs-fifa-sim__period { border: 0; background: none; cursor: pointer; padding: 7px 14px;
    border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--rs-muted, #777);
    transition: background .15s, color .15s; }
.rs-fifa-sim__period:hover { color: var(--rs-text, #1b2733); }
.rs-fifa-sim__period.is-active { background: var(--rs-bg-card, #fff); color: var(--rs-text, #1b2733);
    box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.rs-fifa-sim__perioddesc { margin: 0 0 12px; font-size: .85em; opacity: .75; line-height: 1.4; }

.rs-fifa-sim__table { width: 100%; }
.rs-fifa-sim__row { cursor: pointer; }
.rs-fifa-sim__row:hover { background: color-mix(in srgb, var(--rs-text, #1b2733) 5%, transparent); }
.rs-fifa-sim__rank { width: 2.2em; text-align: center; opacity: .7; font-variant-numeric: tabular-nums; }
.rs-fifa-sim__team { display: flex; align-items: center; gap: 8px; }
.rs-fifa-sim__team > span { font-weight: 600; }
.rs-fifa-sim__note { font-variant-numeric: tabular-nums; font-weight: 700; }
.rs-fifa-sim__nm { opacity: .55; font-size: .85em; white-space: nowrap; }
.rs-fifa-sim__chev { font-style: normal; opacity: .5; transition: transform .15s; display: inline-block; }
.rs-fifa-sim__row.is-open .rs-fifa-sim__chev { transform: rotate(90deg); }
.rs-fifa-sim__flag { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; flex: 0 0 auto;
    display: inline-block; vertical-align: middle; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

.rs-fifa-sim__detail > td { padding: 0 !important; background: color-mix(in srgb, var(--rs-text, #1b2733) 4%, transparent); }
.rs-fifa-sim__matches { padding: 6px 10px 12px; }
.rs-fifa-sim__mtable { width: 100%; border-collapse: collapse; }
.rs-fifa-sim__match > td { padding: 6px 8px; border-bottom: 1px solid color-mix(in srgb, var(--rs-text,#1b2733) 8%, transparent); font-size: .92em; }
.rs-fifa-sim__match.is-edited { background: color-mix(in srgb, #e8a13a 16%, transparent); }
.rs-fifa-sim__match.is-edited > td:first-child { box-shadow: inset 3px 0 0 #e8a13a; }
.rs-fifa-sim__date { white-space: nowrap; opacity: .65; font-variant-numeric: tabular-nums; width: 6.5em; }
.rs-fifa-sim__orig { display: block; font-size: .8em; color: #c47d12; opacity: .9; font-weight: 600; }
html[data-theme="dark"] .rs-fifa-sim__orig { color: #f0b252; }
/* Domicile à droite (vers le centre/score), extérieur à gauche (vers le centre). */
.rs-fifa-sim__home { text-align: right; }
.rs-fifa-sim__home, .rs-fifa-sim__away { white-space: nowrap; width: 40%; }
.rs-fifa-sim__home > span, .rs-fifa-sim__away > span { font-weight: 600; vertical-align: middle; }
.rs-fifa-sim__home .rs-fifa-sim__flag { margin-left: 6px; }
.rs-fifa-sim__away .rs-fifa-sim__flag { margin-right: 6px; }
.rs-fifa-sim__sc { width: 1px; white-space: nowrap; text-align: center; }
.rs-fifa-sim__sc--h { padding: 0 14px 0 6px !important; }  /* espace entre les scores A/B */
.rs-fifa-sim__sc--a { padding: 0 6px 0 14px !important; }
.rs-fifa-sim__step { display: inline-flex; align-items: center; gap: 4px; }
.rs-fifa-sim__step b { min-width: 1.1em; text-align: center; font-variant-numeric: tabular-nums; }
.rs-fifa-sim__step button {
    width: 22px; height: 22px; line-height: 1; border-radius: 6px; cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--rs-text,#1b2733) 22%, transparent);
    background: var(--rs-surface, #fff); color: inherit; font-size: 14px; padding: 0;
}
.rs-fifa-sim__step button:hover { border-color: var(--rs-accent, #1b6f3a); }
.rs-fifa-sim__pts { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; width: 5em; }
.rs-evo--up { color: #1b9e4b; }
.rs-evo--down { color: #d23b3b; }

/* Mods-bar : le conteneur .rs-mods-bar est stylé/thémé par le thème (overrides.css
   + theme.css). Ici on ne style que les pills, avec des tokens de thème génériques
   (→ lisibles en clair ET en sombre). */
.rs-fifa-sim__modsbar .rs-mods-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rs-fifa-sim__modsbar .rs-mods-actions { display: flex; align-items: center; gap: 10px; }
.rs-fifa-sim__modsbar .rs-mod-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px;
    border-radius: 999px; font-size: 12px; font-weight: 600; max-width: 100%;
    background: var(--rs-bg-card, #fff); color: var(--rs-text, #1b2733);
    border: 1px solid var(--rs-border, rgba(0,0,0,.12));
}
.rs-fifa-sim__modsbar .rs-mod-pill-lbl { display: inline-flex; align-items: center; gap: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-fifa-sim__modsbar .rs-mod-pill-lbl b { font-variant-numeric: tabular-nums; }
.rs-fifa-sim__modsbar .rs-mod-pill .rs-fifa-sim__flag { width: 18px; height: 12px; }
.rs-fifa-sim__modsbar .rs-mod-pill-x {
    display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
    padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
    color: var(--rs-muted, #888); font-size: 13px; line-height: 1; flex-shrink: 0;
}
.rs-fifa-sim__modsbar .rs-mod-pill-x:hover { background: color-mix(in srgb, #d23b3b 18%, transparent); color: #d23b3b; }
/* Bouton « Tout réinitialiser » — même look bouton que les autres sports. */
.rs-fifa-sim__reset {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; cursor: pointer;
    border: 1px solid var(--rs-border, rgba(0,0,0,.14)); border-radius: 10px;
    background: var(--rs-bg-card, #fff); color: var(--rs-muted, #777);
    font-weight: 700; font-size: 13px; line-height: 1.2; white-space: nowrap;
    transition: color .15s, border-color .15s, background .15s;
}
.rs-fifa-sim__reset > svg { width: 16px; height: 16px; flex-shrink: 0; }
.rs-fifa-sim__reset:hover { color: #d23b3b; border-color: #d23b3b;
    background: color-mix(in srgb, #d23b3b 12%, transparent); }
.rs-fifa-sim__empty { opacity: .6; padding: 4px 2px; }

html[data-theme="dark"] .rs-fifa-sim__step button { background: rgba(255,255,255,.06); }
html[data-theme="dark"] .rs-evo--up { color: #4ade80; }
html[data-theme="dark"] .rs-evo--down { color: #f87171; }

@media (max-width: 560px) {
    .rs-fifa-sim__date { display: none; }
    .rs-fifa-sim__nm { display: none; }
}
