/* RedStats : profils et notations. Reprend les couleurs du thème Redstonia (--red-*),
   avec des valeurs de repli pour fonctionner sous n'importe quel thème Azuriom. */

.rs {
    --rs-surface: var(--red-surface, #1b2130);
    --rs-surface-2: var(--red-surface-2, #232a3b);
    --rs-border: var(--red-border, rgba(255, 255, 255, .08));
    --rs-text: var(--red-text, #e5e9f2);
    --rs-muted: var(--red-muted, #8b94a8);
    --rs-primary: var(--red-secondary, #6366f1);
    --rs-accent: var(--rs-primary);
    --rs-radius: var(--red-radius, 12px);
    color: var(--rs-text);
    padding-bottom: 3rem;
}

.rs .rs-muted { color: var(--rs-muted); }
.rs .rs-empty { color: var(--rs-muted); text-align: center; padding: 1.5rem 0; margin: 0; }
.rs-link { color: #a78bfa; text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
.rs-link:hover { color: #c4b5fd; text-decoration: underline; }

.rs-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #6b7280; flex: none; }
.rs-dot.is-on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.rs-online { color: #4ade80; display: inline-flex; align-items: center; gap: .45rem; }

.rs-flag { width: 1.4rem; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }

/* ------------------------------------------------------------------ profil : en-tête */
.rs-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.75rem;
    padding: 2.5rem 0 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--rs-border);
}
.rs-head {
    width: 110px; height: 110px;
    border-radius: 14px;
    image-rendering: pixelated;
    flex: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.rs-name { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700; margin: 0 0 .5rem; line-height: 1.1; }
.rs-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; color: var(--rs-muted); font-size: .92rem; }
.rs-meta-item { display: inline-flex; align-items: center; gap: .45rem; }
.rs-bio {
    margin: 1.1rem 0 0;
    padding: .2rem 0 .2rem 1rem;
    border-left: 3px solid var(--rs-primary);
    font-style: italic;
    color: var(--rs-text);
}
.rs-bio-edit { margin-top: .9rem; font-size: .88rem; }
.rs-bio-edit summary { cursor: pointer; color: var(--rs-muted); list-style: none; }
.rs-bio-edit summary::-webkit-details-marker { display: none; }
.rs-bio-form { display: flex; gap: .5rem; margin-top: .6rem; max-width: 560px; }

/* ------------------------------------------------------------------- profil : chiffres */
.rs-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.rs-stat {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--rs-surface);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    min-height: 130px;
}
.rs-stat-icon {
    width: 2.6rem; height: 2.6rem;
    border-radius: 10px;
    display: grid; place-items: center;
    background: var(--rs-surface-2);
    color: #818cf8;
    font-size: 1.15rem;
    flex: none;
}
.rs-stat:nth-child(2) .rs-stat-icon { color: #38bdf8; }
.rs-stat-label { color: var(--rs-muted); font-size: .82rem; }
.rs-stat-value { font-size: 1.3rem; font-weight: 700; }

.rs-stat-sanctions { flex-direction: column; gap: .7rem; }
.rs-stat-head { color: var(--rs-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; display: flex; gap: .45rem; align-items: center; }
.rs-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.rs-pill {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .75rem;
    padding: .15rem .55rem;
    border-radius: 6px;
    background: var(--rs-surface-2);
}
.rs-pill.is-danger { background: rgba(248, 113, 113, .15); color: #fca5a5; }
.rs-pill.is-ok { background: rgba(74, 222, 128, .12); color: #86efac; }
.rs-btn-soft {
    width: 100%;
    margin-top: auto;
    padding: .55rem .8rem;
    border: 0;
    border-radius: 8px;
    background: var(--rs-surface-2);
    color: var(--rs-text);
    font-weight: 600;
    font-size: .9rem;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    transition: background .15s;
}
.rs-btn-soft:hover { background: rgba(129, 140, 248, .18); }

/* ------------------------------------------------------------------ profil : serveurs */
.rs-section-title { font-size: 1.25rem; font-weight: 700; display: flex; gap: .55rem; align-items: center; margin-bottom: 1rem; }
.rs-section-title i { color: #818cf8; }

.rs-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .25rem;
    padding: .3rem;
    margin: 0 0 1rem;
    list-style: none;
    background: var(--rs-surface);
    border: 1px solid var(--rs-border);
    border-radius: 10px;
}
.rs-tab {
    border: 0;
    background: transparent;
    color: var(--rs-muted);
    padding: .4rem .8rem;
    border-radius: 7px;
    font-size: .9rem;
    display: inline-flex; align-items: center; gap: .45rem;
}
.rs-tab:hover { color: var(--rs-text); }
.rs-tab.active { background: var(--rs-surface-2); color: var(--rs-text); font-weight: 600; }

.rs-panel {
    background: var(--rs-surface);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    overflow: hidden;
}
.rs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem 1.5rem;
    padding: 1.6rem 1.5rem;
}
.rs-field-label { color: var(--rs-muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; }
.rs-field-value { font-weight: 600; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rs-money { color: #4ade80; }
.rs-crown { width: 1.05rem; height: 1.05rem; color: #facc15; }
.rs-panel-foot {
    padding: .9rem 1.5rem;
    border-top: 1px solid var(--rs-border);
    display: flex; justify-content: flex-end;
    font-size: .92rem;
}

/* ----------------------------------------------------------- historique de sanctions */
.rs-modal .modal-content {
    background: var(--red-surface, #1b2130);
    color: var(--red-text, #e5e9f2);
    border: 1px solid var(--red-border, rgba(255, 255, 255, .1));
    border-radius: 14px;
}
.rs-modal .modal-header { border: 0; padding: 1.4rem 1.5rem .5rem; }
.rs-modal .modal-title { font-size: 1.15rem; font-weight: 700; display: flex; gap: .55rem; align-items: center; margin: 0; }
.rs-modal .modal-body { padding: .5rem 1.5rem 1.4rem; }
.rs-close {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    border: 1px solid #818cf8;
    background: transparent;
    color: var(--red-text, #e5e9f2);
    display: grid; place-items: center;
    margin-left: auto;
}
.rs-close:hover { background: rgba(129, 140, 248, .15); }

.rs-sanction {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--red-border, rgba(255, 255, 255, .08));
}
.rs-sanction:last-child { border-bottom: 0; }
.rs-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .65rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.rs-badge.is-warn { color: #facc15; background: rgba(250, 204, 21, .08); }
.rs-badge.is-mute { color: #60a5fa; background: rgba(96, 165, 250, .08); }
.rs-badge.is-tempban { color: #f87171; background: rgba(248, 113, 113, .08); }
.rs-badge.is-ban { color: #fff; background: #b91c1c; border-color: #b91c1c; }
.rs-sanction-reason { font-weight: 600; }
.rs-sanction-meta { color: var(--red-muted, #8b94a8); font-size: .82rem; margin-top: .2rem; }
.rs-sanction-date { color: var(--red-muted, #8b94a8); font-size: .82rem; white-space: nowrap; }
.rs-revoked { color: #86efac; }
.rs-running { color: #fca5a5; }

/* ======================================================================== notations */
.rs-n-hero {
    text-align: center;
    padding: 2.5rem 0 2rem;
    position: relative;
}
.rs-n-hero::before {
    content: "";
    position: absolute;
    inset: -2rem 15% auto;
    height: 320px;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--rs-accent) 28%, transparent), transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.rs-n-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 700;
    margin: 0 0 1.5rem;
    background: linear-gradient(90deg, #60a5fa, var(--rs-accent), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.rs-week-label { color: var(--rs-muted); letter-spacing: .14em; text-transform: uppercase; font-size: .85rem; margin-bottom: .5rem; }
.rs-week { display: inline-flex; align-items: center; gap: 2.5rem; margin-bottom: 2rem; }
.rs-week-arrow { color: var(--rs-text); font-size: 1.1rem; text-decoration: none; padding: .3rem; }
.rs-week-arrow:hover { color: #a5b4fc; }
.rs-week-arrow.is-disabled { opacity: .25; pointer-events: none; }
.rs-week-date {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .55rem 1.1rem;
    border-radius: 10px;
    background: var(--rs-surface);
    border: 1px solid var(--rs-border);
    font-weight: 700;
    font-size: 1.1rem;
}
.rs-week-date i { color: #818cf8; font-size: .95rem; }

.rs-n-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.rs-n-tab {
    --rs-tab: #6366f1;
    padding: .45rem .9rem;
    border-radius: 8px;
    border: 1px solid var(--rs-border);
    background: var(--rs-surface);
    color: var(--rs-text);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
}
.rs-n-tab:hover { border-color: var(--rs-tab); color: var(--rs-text); }
.rs-n-tab.active { background: var(--rs-tab); border-color: var(--rs-tab); color: #fff; }

.rs-card {
    background: var(--rs-surface);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    margin-top: 1.5rem;
}
.rs-card-title { font-size: 1.4rem; font-weight: 700; display: flex; gap: .6rem; align-items: center; padding: 1.4rem 1.5rem; margin: 0; }
.rs-card-title i { color: #818cf8; }

.rs-table { width: 100%; border-collapse: collapse; }
.rs-table thead th {
    background: var(--rs-surface-2);
    padding: .9rem .75rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
}
.rs-table tbody td { padding: 1.05rem .75rem; border-top: 1px solid var(--rs-border); text-align: center; vertical-align: middle; }
.rs-table tbody tr { transition: background .15s; }
.rs-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.rs-table .rs-col-pos { width: 3.5rem; text-align: center; color: var(--rs-muted); font-weight: 600; }
.rs-table .rs-col-country { text-align: left; min-width: 220px; }
.rs-table .rs-col-bank { text-align: right; padding-right: 1.5rem; }
.rs-table thead .rs-col-bank, .rs-table thead th:last-child { text-align: right; padding-right: 1.5rem; }
.rs-table tr.rs-hl { background: rgba(129, 140, 248, .12); box-shadow: inset 3px 0 0 #818cf8; }

.rs-gold { color: #facc15; font-size: 1.15rem; }
.rs-silver { color: #cbd5e1; font-size: 1.15rem; }
.rs-bronze { color: #f59e0b; font-size: 1.15rem; }

.rs-country { display: flex; align-items: center; gap: .8rem; }
.rs-flag-lg { width: 2.5rem; height: 1.65rem; object-fit: cover; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.rs-flag-none { display: inline-block; background: var(--rs-surface-2); }
.rs-country-name { font-weight: 700; }
.rs-country-server { color: var(--rs-muted); font-size: .76rem; display: flex; align-items: center; gap: .35rem; margin-top: .1rem; }

.rs-chip {
    display: inline-block;
    min-width: 3rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: var(--rs-surface-2);
    font-weight: 700;
    font-size: .82rem;
}
.rs-chip.is-total { background: #6366f1; color: #fff; }
.rs-bank { color: #4ade80; font-weight: 700; white-space: nowrap; }
.rs-bank-delta { color: var(--rs-muted); font-size: .78rem; white-space: nowrap; border-bottom: 1px dashed currentColor; display: inline-block; }
.rs-bank-delta.is-down { color: #f87171; }

/* Info-bulles des colonnes */
.rs-tip { position: relative; cursor: help; text-decoration: underline dotted rgba(255, 255, 255, .25); text-underline-offset: 4px; }
.rs-tip-box {
    position: absolute;
    bottom: calc(100% + .7rem);
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    padding: .7rem .8rem;
    border-radius: 8px;
    background: #111522;
    border: 1px solid var(--rs-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    color: var(--rs-muted);
    font-size: .78rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s;
    z-index: 20;
}
.rs-tip-box strong { display: block; color: var(--rs-text); font-size: .85rem; margin-bottom: .2rem; }
.rs-tip:hover .rs-tip-box, .rs-tip:focus .rs-tip-box { opacity: 1; visibility: visible; }
/* Le tableau défile horizontalement sur mobile : la bulle s'ouvre vers le bas pour ne pas être coupée. */
.rs-table .rs-tip-box { bottom: auto; top: calc(100% + .7rem); }
.rs .table-responsive { overflow-y: visible; }

.rs-footnote { color: var(--rs-muted); font-size: .82rem; padding: 1rem 1.5rem 1.3rem; margin: 0; border-top: 1px solid var(--rs-border); }

/* ------------------------------------------------------------------ pages d'erreur */
.rs-message { text-align: center; padding: 4rem 0; }
.rs-message img { image-rendering: pixelated; border-radius: 12px; margin-bottom: 1rem; }
.rs-message-icon { font-size: 3rem; color: var(--rs-muted); }
.rs-message h1 { font-size: 1.8rem; font-weight: 700; margin: 1rem 0 .5rem; }
.rs-message p { color: var(--rs-muted); margin-bottom: 1.5rem; }

/* --------------------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
    .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .rs-hero { flex-direction: column; align-items: center; text-align: center; }
    .rs-meta { justify-content: center; }
    .rs-bio { text-align: left; }
    .rs-stats { grid-template-columns: 1fr; }
    .rs-stat { min-height: 0; }
    .rs-sanction { grid-template-columns: 1fr; gap: .4rem; }
    .rs-week { gap: 1rem; }
}
