/* RoundZero - les affichages V1 a V3 de la page Compare (js/compare_vues.js), 08/11/2026. La V0 garde le style de style.css (.cmp-*). */
.cv {
    --pv-r: rgb(var(--da-rgb, 210, 10, 17));
    --pv-r-d: rgba(var(--da-rgb, 210, 10, 17), .16);
    --pv-b: #3b82f6;
    --pv-b-d: rgba(59, 130, 246, .16);
    --pv-or: var(--gold, #f5a623);
    --pv-ko: #ef4444;
    --pv-dec: #94a3b8;
    --pv-sub: #a855f7;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    margin-top: 14px;
}
.cv * { min-width: 0; }
.cv .r { color: var(--pv-r); }
.cv .b { color: var(--pv-b); }
.cv-select { margin: 0 0 4px; }
/* les grandes cartes du haut de la page font doublon avec l'en-tete des versions V1-V3 : seuls les champs de recherche restent */
.versus-grid.cv-on .vs-card { display: none; }
.versus-grid.cv-on { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); justify-content: stretch; gap: 14px; align-items: center; }
.versus-grid.cv-on .vs-picker { padding: 10px 14px 12px; }
.versus-grid.cv-on .vs-picker label { margin-bottom: 5px; }
.versus-grid.cv-on .vs-center { flex-direction: row; padding-top: 0; min-width: 0; gap: 10px; }
.versus-grid.cv-on .vs-circle { width: 44px; height: 44px; font-size: 17px; margin-bottom: 0; box-shadow: 0 0 0 3px rgba(var(--da-rgb), .08); }
@media (max-width: 900px) {
    .versus-grid.cv-on { grid-template-columns: 1fr; }
    .versus-grid.cv-on .vs-center { justify-content: center; }
}
.cv-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cv-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; align-items: start; }

/* ---- le haut : les deux combattants face a face ---- */
.cv-hero {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, var(--pv-r-d), transparent 38%, transparent 62%, var(--pv-b-d)),
        var(--bg-elev-1);
}
.cv-hero-f { display: flex; align-items: center; gap: 18px; }
.cv-hero-f.b { flex-direction: row-reverse; text-align: right; }
.cv-hero-ph {
    flex: none;
    width: 112px; height: 112px;
    border-radius: 50%;
    overflow: hidden;
    display: grid; place-items: center;
    background: var(--bg-elev-3);
    border: 3px solid var(--pv-r);
}
.cv-hero-f.b .cv-hero-ph { border-color: var(--pv-b); }
.cv-hero-ph img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.cv-hero-ph i, .cv-sh-ph i { font-style: normal; font-family: var(--font-display); font-size: 30px; color: var(--text-dim); }
.cv-hero-id { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.cv-hero-f.b .cv-hero-id { align-items: flex-end; }
.cv-hero-nom { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 34px); line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; color: var(--text); }
.cv-hero-nom:hover { color: var(--primary-2); }
.cv-hero-nick { color: var(--text-muted); font-size: 13px; font-style: italic; }
.cv-hero-rec { font-family: var(--font-display); font-size: 26px; letter-spacing: .04em; color: var(--pv-r); }
.cv-hero-f.b .cv-hero-rec { color: var(--pv-b); }
.cv-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-hero-f.b .cv-hero-tags { justify-content: flex-end; }
.cv-hero-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.cv-hero-mid b { font-family: var(--font-display); font-size: 40px; line-height: 1; letter-spacing: .06em; color: var(--text); }
.cv-hero-mid em { font-style: normal; font-size: 13px; color: var(--text); font-weight: 600; }
.cv-hero-mid small { color: var(--text-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }

/* ---- une categorie : lignes en miroir ---- */
.cv-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; align-items: start; }
.cv-score { margin-left: auto; font-family: var(--font-display); font-size: 15px; letter-spacing: .06em; color: var(--text-dim); }
.cv-score b { font-size: 17px; }
.cv-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(104px, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid var(--border-soft);
}
.cv-row:first-of-type { border-top: 0; }
.cv-l { text-align: center; font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; line-height: 1.25; }
.cv-v { position: relative; display: flex; align-items: center; height: 30px; border-radius: 6px; overflow: hidden; background: var(--bg-elev-2); }
.cv-v.r { justify-content: flex-end; }
.cv-v b { position: relative; z-index: 1; padding: 0 10px; font-size: 14px; font-weight: 600; color: var(--text-muted); font-family: var(--font-body); }
.cv-v.is-up b { color: var(--text); font-weight: 700; }
.cv-bar { position: absolute; top: 0; bottom: 0; opacity: .32; }
.cv-bar.r { right: 0; background: var(--pv-r); }
.cv-bar.b { left: 0; background: var(--pv-b); }
.cv-v.is-up .cv-bar { opacity: .62; }

/* ---- les courbes d'Elo superposees ---- */
.cv-elo { width: 100%; height: auto; display: block; overflow: visible; }
.cv-elo-l { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.cv-elo-l.r { stroke: var(--pv-r); }
.cv-elo-l.b { stroke: var(--pv-b); }
.cv-elo-d.r { fill: var(--pv-r); }
.cv-elo-d.b { fill: var(--pv-b); }
.cv-elo-g { stroke: var(--border-soft); stroke-width: 1; }
.cv-elo-y { fill: var(--text-dim); font-size: 11px; text-anchor: end; font-family: var(--font-mono); }
.cv-elo-x { fill: var(--text-dim); font-size: 11px; font-family: var(--font-mono); }
.cv-elo-x.end { text-anchor: end; }

/* ---- V2 : la feuille ---- */
.cv-sheet { padding: 0; overflow: clip; }
.cv-sheet-head {
    position: sticky;
    top: var(--cv-top, 0px);
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--bg-elev-2);
    border-bottom: 1px solid var(--border);
}
.cv-sheet-head > span { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 17px; text-transform: uppercase; letter-spacing: .03em; }
.cv-sheet-head > span.b { justify-content: flex-end; text-align: right; }
.cv-sheet-head a { color: inherit; }
.cv-sheet-head small { font-family: var(--font-body); font-size: 12px; color: var(--text-muted); letter-spacing: 0; }
.cv-sheet-head em { font-style: normal; text-align: center; font-size: 11px; line-height: 1.3; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }
.cv-sheet-head em b { font-family: var(--font-display); font-size: 20px; }
.cv-sh-ph { flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--bg-elev-3); }
.cv-sh-ph img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cv-sh-ph i { font-size: 14px; }
.cv-sheet-g { padding: 8px 18px; background: var(--bg-elev-2); font-family: var(--font-display); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); border-top: 1px solid var(--border); }
.cv-sheet .cv-row { padding: 6px 18px; }
.cv-go { align-self: flex-start; }

/* ---- V3 : le visuel ---- */
.cv-bigradar .radar-svg { max-width: 460px; }
.cv-rings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: center; }
.cv-rings > div > b { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: 13px; margin-bottom: 6px; }
.cv-ring { position: relative; width: 132px; margin: 0 auto; }
.cv-ring svg { width: 100%; height: auto; display: block; }
.cv-ring-f { fill: none; stroke: var(--bg-elev-3); stroke-width: 15; }
.cv-ring-s { fill: none; stroke-width: 15; }
.cv-ring-s.ko { stroke: var(--pv-ko); }
.cv-ring-s.sub { stroke: var(--pv-sub); }
.cv-ring-s.dec { stroke: var(--pv-dec); }
.cv-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.cv-ring-c b { font-family: var(--font-display); font-size: 26px; color: var(--text); }
.cv-ring-c small { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.cv-ring-vide { padding: 36px 0; color: var(--text-dim); font-size: 13px; }
.cv-ring-leg { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; }
.cv-ring-leg span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: currentColor; }
.cv-ring-leg .ko { color: var(--pv-ko); }
.cv-ring-leg .sub { color: var(--pv-sub); }
.cv-ring-leg .dec { color: var(--pv-dec); }
.cv-l5 { display: flex; flex-direction: column; gap: 16px; }
.cv-l5 > div { display: flex; flex-direction: column; gap: 6px; }
.cv-l5 b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: 13px; }
.cv-l5 span { display: flex; gap: 6px; }
.cv-pill { font-style: normal; width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
.cv-pill.w { background: var(--success); }
.cv-pill.l { background: var(--danger); }
.cv-pill.d { background: var(--text-dim); }
.cv-mini { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border-soft); font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.cv-mini:first-child { border-top: 0; }
.cv-mini b { font-family: var(--font-display); font-size: 20px; }
.cv-mini i { font-style: normal; color: var(--text-dim); }

/* ---- les historiques ---- */
.cv .cmp-fl { max-height: 460px; overflow-y: auto; }

@media (max-width: 900px) {
    .cv-2col, .cv-3col { grid-template-columns: 1fr; }
    .cv-cats { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .cv-hero { grid-template-columns: 1fr 1fr; padding: 16px 14px; gap: 12px; }
    .cv-hero-f, .cv-hero-f.b { flex-direction: column; text-align: center; gap: 10px; }
    .cv-hero-id, .cv-hero-f.b .cv-hero-id { align-items: center; }
    .cv-hero-tags, .cv-hero-f.b .cv-hero-tags { justify-content: center; }
    .cv-hero-ph { width: 84px; height: 84px; }
    .cv-hero-mid { grid-column: 1 / -1; order: 3; }
    .cv-hero-mid b { font-size: 30px; }
    .cv-row { grid-template-columns: minmax(0, 1fr) minmax(86px, .9fr) minmax(0, 1fr); gap: 5px; }
    .cv-l { font-size: 10.5px; }
    .cv-v b { padding: 0 6px; font-size: 13px; }
    .cv-sheet-head { padding: 10px 10px; gap: 6px; }
    .cv-sheet-head > span { font-size: 13px; }
    .cv-sh-ph { display: none; }
    .cv-sheet .cv-row { padding: 6px 10px; }
    .cv-rings { gap: 8px; }
    .cv-ring { width: 108px; }
}
