/* =========================================================================
   CYLIMETRICS — styles communs aux pages d'outils (riders, managers, Cylimit)
   À charger APRÈS css/cylimetrics-theme.css. Remplace l'ancien styles.css et tous les
   <style> intégrés aux pages. Les blocs « PAGE : … » en bas ne s'appliquent qu'à une page.
   ========================================================================= */

/* Anciennes variables (au cas où un morceau de page les utilise encore) */
:root {
  --card: var(--bg-card); --card-bg: var(--bg-card); --bg-color: var(--bg);
  --cy-blue: var(--accent-cyan); --primary: var(--accent-cyan); --accent: var(--accent-cyan);
  --c-blue: var(--accent-cyan); --c-pink: var(--accent-pink); --c-yellow: var(--accent-amber);
}

/* ---------- Structure ---------- */
body.pg { text-align: left; }
.pg .cm-main { max-width: 1320px; text-align: center; }
.pg .cm-main > .container, .pg .cm-main .container { max-width: 1100px; margin: 0 auto; }
.pg h1, .pg h2, .pg h3, .pg h4 { font-family: var(--font-display); letter-spacing: .02em; }
.pg .page-title { display: flex; align-items: center; justify-content: center; text-align: center; margin: .4rem 0 1.4rem; }
.pg .page-title::before { flex: none; }
.pg .section-title { font-size: 1.15rem; text-align: center; margin-bottom: 1rem; color: var(--accent-cyan); text-transform: uppercase; letter-spacing: .06em; }
.pg .cm-main p { color: var(--text-secondary); line-height: 1.6; }
.pg .cm-main strong, .pg .cm-main b { color: var(--text-primary); }
.pg .cm-main small { color: var(--text-muted); }
.pg .cm-main a:hover { color: var(--accent-cyan); }

/* Blocs / cartes */
.pg .section {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 1.4rem; max-width: 1320px; margin: 1.4rem auto;
}
.pg .section > h2, .pg .section > h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-cyan); margin-bottom: 1rem; text-align: center; }
.pg .section canvas { background: transparent; padding: 0; }
.pg canvas { max-width: 100%; border-radius: var(--radius-md); }
.pg .charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.pg .table-container, .pg .table-wrapper, .pg .table-responsive { width: 100%; overflow-x: auto; }

/* Bandeau d'infos / filtres */
.pg .filters { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .8rem 1.2rem; margin: .6rem auto 1rem; }
.pg .filters.ranking-stats, .pg .ranking-stats { text-align: center; }
.pg .filters.ranking-stats { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.2rem 1.4rem; max-width: 980px; }
.pg .stats { text-align: center; }
.pg .stats h2 { font-size: 1.1rem; margin: .2rem 0 .6rem; }
.pg .stats p { margin: .3rem 0; font-size: .92rem; }
.pg .year-tag {
  display: inline-block; padding: .18rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-green); border: 1px solid rgba(124,255,61,.3); background: rgba(124,255,61,.07);
}
.pg .checkbox-group { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem .9rem; }
.pg .filter-group { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.pg label { cursor: pointer; color: var(--text-secondary); font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; }
.pg input[type=checkbox] { accent-color: var(--accent-green); width: 1rem; height: 1rem; }
.pg select, .pg input[type=text], .pg input[type=search], .pg input[type=number], .pg input[type=date], .pg input:not([type]) {
  min-height: 42px;
}
.pg select { cursor: pointer; padding-right: 2rem; }
.pg input::placeholder { color: var(--text-muted); }

/* Boutons */
.pg .cm-main button, .pg .cm-main .btn-like {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer;
  padding: .6rem 1.1rem; min-height: 42px; border-radius: var(--radius-sm); border: 1px solid rgba(124,255,61,.4);
  background: rgba(124,255,61,.08); color: var(--accent-green); font-family: var(--font-display); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
  transition: background .2s, box-shadow .2s, transform .15s;
}
.pg .cm-main button:hover { background: rgba(124,255,61,.16); box-shadow: var(--shadow-glow-green); }
.pg .cm-main button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

/* Formulaires posés directement sur la page (classements, packs…) */
.pg-rider-ranking form, .pg-manager-ranking form, .pg-packs form, .pg-winometer form {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .8rem 1.4rem; margin-bottom: 1.4rem;
}

/* Suggestions (champs de recherche coureur) */
.pg div[id*="uggestions"] {
  background: var(--bg-card); border: 1px solid var(--cyan-line, #2a4a5a); box-shadow: var(--shadow-card);
  text-align: left; min-width: 100%; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.pg .suggestion-item, .pg .sug-item { padding: .55rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border-soft); color: var(--text-primary); font-size: .9rem; }
.pg .suggestion-item:hover, .pg .sug-item:hover { background: rgba(47,211,255,.12); color: var(--accent-cyan); }

/* Tableaux */
.pg .cm-main table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 0 auto; }
.pg .cm-main th {
  padding: .7rem .8rem; text-align: center; font-family: var(--font-display); font-size: .72rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.pg .cm-main td { padding: .65rem .8rem; text-align: center; border-bottom: 1px solid var(--border-soft); color: var(--text-secondary); }
.pg .cm-main tbody tr:hover td { background: var(--bg-card-hover); color: var(--text-primary); }
.pg .cm-main td a, .pg .cm-main a.rider-link { color: var(--accent-cyan); font-weight: 600; }
.pg .cm-main td a:hover { text-decoration: underline; }
.pg .table-container > table, .pg .table-wrapper > table, .pg .table-responsive > table, .pg table.market-table, .pg #victory-table, .pg .rankingwin {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; border-collapse: separate; border-spacing: 0;
}
.pg .cm-main td:first-child { font-weight: 600; color: var(--text-primary); }

/* Pagination */
.pg .pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem; margin: 1.4rem 0 .5rem; }
.pg .pagination a, .pg .pagination span, .pg .page-link, .pg .pagination button:not(.pagination-btn) {
  min-width: 38px; height: 38px; padding: 0 .7rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); font-size: .85rem; font-weight: 600;
}
.pg .pagination a:hover, .pg .page-link:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.pg .pagination span, .pg .pagination a.active, .pg .pagination .active, .pg .pagination button.active, .pg .active-page {
  background: rgba(47,211,255,.14); border-color: var(--accent-cyan); color: var(--accent-cyan);
}
.pg .pagination-btn { padding: 0 1rem; }
.pg .pagination-info { color: var(--text-secondary); font-size: .9rem; }

/* ---------- Fiche coureur : infos, rôles, classements, ventes ---------- */
.pg .rider-info.section { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.6rem; text-align: left; }
.pg .rider-info.section img { border-radius: var(--radius-md); border: 1px solid var(--border); width: 180px; height: auto; object-fit: cover; margin: 0 !important; }
.pg .rider-info.section h2 { text-align: left; color: var(--text-primary); text-transform: none; font-size: 1.5rem; letter-spacing: .01em; margin-bottom: .6rem; }
.pg .rider-info.section h2 a { color: var(--text-primary); }
.pg .rider-info.section h2 a:hover { color: var(--accent-cyan); }
.pg .rider-info.section h2 span { color: var(--text-muted); font-weight: 400; font-size: 1.1rem; }
.pg .rider-info.section p { margin: .25rem 0; }
.pg .estimate-link { display: inline-block; padding: .25rem .7rem; border-radius: 999px; border: 1px solid rgba(255,200,87,.45); background: rgba(255,200,87,.1); color: var(--accent-amber) !important; font-size: .8rem; font-weight: 600; }
.pg .estimate-link:hover { background: rgba(255,200,87,.2); }

.pg .role-stats, .pg .role-stats2 { display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; margin: 0 auto 1.2rem; }
.pg .role-stats2 { grid-template-columns: repeat(3, 1fr); }
.pg .role-box {
  --role-color: var(--accent-cyan);
  display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .8rem .4rem;
  background: var(--bg-alt); border: 1px solid var(--border); border-top: 3px solid var(--role-color); border-radius: var(--radius-md);
}
.pg .role-box.best-role { background: var(--bg-card-hover); box-shadow: 0 0 22px color-mix(in srgb, var(--role-color) 35%, transparent); border-color: var(--role-color); }
.pg .role-icon { width: 34px; height: 34px; object-fit: contain; }
.pg .role-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pg .role-score { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--role-color); }

.pg .ranking-card { flex: 1 1 300px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; }
.pg .ranking-card h4 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: .8rem; }
.pg .ranking-line, .pg .saling-line { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.pg .rank-item, .pg .saling-item { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 110px; }
.pg .rank-label, .pg .saling-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pg .rank-value, .pg .saling-value { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.pg .rank-top { padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; border: 1px solid var(--border); color: var(--text-secondary); }
.pg .top-excellent { color: var(--accent-green); border-color: rgba(124,255,61,.4); background: rgba(124,255,61,.08); }
.pg .top-good { color: var(--accent-amber); border-color: rgba(255,200,87,.4); background: rgba(255,200,87,.08); }
.pg .top-bad { color: var(--accent-red); border-color: rgba(255,77,109,.4); background: rgba(255,77,109,.08); }
.pg .saling-card { flex: 1 1 200px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; }
.pg .saling-stats { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* Ces deux pages affichent déjà des cartes dans le bandeau : pas de double cadre */
.pg-rider-stats .filters.ranking-stats, .pg-h2h .filters.ranking-stats { background: none; border: 0; padding: 0; max-width: none; box-shadow: none; }

/* Comparateur */
.pg .page-container { max-width: 1320px; margin: 0 auto; }
.pg .panels { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: flex-start; }
.pg .panel { flex: 1 1 48%; min-width: 280px; }
.pg .panel .section { margin: 0 0 1rem; }
.pg .common-charts { display: flex; flex-direction: column; gap: 1.4rem; margin-top: 1.4rem; }

/* ---------- Roster ---------- */
.pg .rider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; margin: 1.2rem 0; }
.pg .rider-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; cursor: pointer; text-align: left;
  transition: transform .18s, border-color .2s, box-shadow .2s;
}
.pg .rider-card:hover { transform: translateY(-4px); border-color: var(--accent-cyan); box-shadow: var(--shadow-glow-cyan); }
.pg .rider-card > img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: var(--bg-alt); }
.pg .rider-card .rider-info { padding: .8rem .9rem 1rem; }
.pg .rider-card .rider-info h3 { font-size: 1rem; margin-bottom: .4rem; color: var(--text-primary); }
.pg .rider-card .rider-info p { font-size: .8rem; margin: .15rem 0; }

/* ---------- Estimation ---------- */
.pg .search-box { position: relative; display: flex; justify-content: center; margin: 1rem 0 1.6rem; }
.pg .search-box form { position: relative; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.pg #riderInput { width: min(360px, 90vw); }
.pg #suggestions { position: absolute; top: 100%; left: 0; width: min(360px, 90vw); z-index: 999; display: none; max-height: 260px; overflow-y: auto; margin-top: 2px; }
.pg .rider { text-align: center; }
.pg .rider h1 { font-size: 1.8rem; margin: .4rem 0; }
.pg .rider h1 a { color: var(--text-primary); }
.pg .photo-frame { max-height: 250px; border-radius: var(--radius-md); border: 2px solid var(--accent-cyan); object-fit: cover; margin-bottom: 1rem; box-shadow: var(--shadow-glow-cyan); }
.pg .price-hero { font-family: var(--font-display); font-size: clamp(2.8rem, 8vw, 5rem); font-weight: 700; margin: 1rem 0; background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pg .badge-floor { display: inline-block; padding: .25rem .8rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--accent-red); border: 1px solid rgba(255,77,109,.4); background: rgba(255,77,109,.08); }
.pg .stats-summary { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.6rem 0; }
.pg .stat-item { flex: 1 1 180px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; }
.pg .stat-item p { color: var(--text-primary) !important; }
.pg .trend-badge { display: inline-block; padding: .25rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 700; margin-top: .6rem; }
.pg .trend-up { background: rgba(124,255,61,.1); color: var(--accent-green); border: 1px solid rgba(124,255,61,.45); }
.pg .trend-down { background: rgba(255,77,109,.1); color: var(--accent-red); border: 1px solid rgba(255,77,109,.45); }
.pg .trend-stable { background: rgba(47,211,255,.1); color: var(--accent-cyan); border: 1px solid rgba(47,211,255,.45); }
.pg .trend-neutral { background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border); }

/* ---------- Classement des prix / valeur des cartes ---------- */
.pg .rarity-nav { display: flex; justify-content: center; gap: .6rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.pg .btn-r { padding: .45rem 1.3rem; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .08em; border: 1px solid; }
.pg .btn-blue, .pg .rarity-tag.blue { color: var(--accent-cyan); background: rgba(47,211,255,.08); border-color: rgba(47,211,255,.5); }
.pg .btn-pink, .pg .rarity-tag.pink { color: var(--accent-pink); background: rgba(244,114,182,.08); border-color: rgba(244,114,182,.5); }
.pg .btn-yellow, .pg .rarity-tag.yellow { color: var(--accent-amber); background: rgba(255,200,87,.08); border-color: rgba(255,200,87,.5); }
.pg .btn-r.active { color: #08120a !important; }
.pg .btn-blue.active { background: var(--accent-cyan); } .pg .btn-pink.active { background: var(--accent-pink); } .pg .btn-yellow.active { background: var(--accent-amber); }
.pg .rarity-tag { display: inline-block; padding: .15rem .5rem; border-radius: 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; border: 1px solid; }
.pg .market-table { table-layout: fixed; }
.pg .market-table th, .pg .market-table td { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg .col-rank { width: 65px; } .pg .col-score { width: 100px; } .pg .col-price { width: 150px; text-align: right !important; }
.pg .rider-img { width: 35px; height: 50px; border-radius: 6px; border: 1px solid var(--border); object-fit: cover; margin-right: .6rem; vertical-align: middle; }
.pg .price-tag { font-family: var(--font-display); font-weight: 700; color: var(--accent-green); font-size: 1.05rem; }
.pg .header-val { text-align: center; padding: 1.4rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 1.2rem; }
.pg .price-total { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; color: var(--accent-green); }

/* ---------- Tableaux spécifiques managers ---------- */
.pg .table-leagues { background: transparent; }
.pg .table-leagues .global td { background: rgba(47,211,255,.08); color: var(--text-primary); font-weight: 700; }
.pg .filters-row { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; justify-content: center; margin: 1rem 0; }
.pg .cm-main td.manager-cell { text-align: left; }
.pg .manager-cell img { vertical-align: middle; margin-right: .7rem; }
.pg-lefevere .table-container, .pg-manager-ranking .table-container { max-width: 960px; margin: 0 auto; }
.pg .manager-cell img { border: 2px solid var(--border); border-radius: 50%; }
.pg .lefevere-challenge { text-align: center; }
.pg .lefevere-challenge ul { color: var(--text-secondary); }

/* ---------- Marché / stats cartes ---------- */
.pg .stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1.4rem; }
.pg .stats > h2, .pg .stats > p { flex: 1 1 100%; }
.pg .stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 1.6rem; box-shadow: var(--shadow-glow-cyan); color: var(--text-primary); }
.pg .custom-select { background: var(--bg-alt); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pg .kpi { display: inline-block; margin: .5rem; padding: .8rem 1.4rem; background: rgba(47,211,255,.08); border: 1px solid rgba(47,211,255,.35); border-radius: var(--radius-md); color: var(--text-secondary); }
.pg .kpi b { color: var(--accent-cyan); font-family: var(--font-display); font-size: 1.15rem; margin-left: .3rem; }
.pg .chart { width: 100%; }
.pg .top5win { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-bottom: 1.6rem; }
.pg .top5winriders, .pg .top5winteams { flex: 1 1 320px; min-width: 0; }
.pg .select-group select { width: min(400px, 90vw); }

/* ---------- Guides ---------- */
.pg-guides .home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.pg-guides .card { padding: 0; overflow: hidden; text-align: center; transition: transform .2s, border-color .2s, box-shadow .2s; }
.pg-guides .card:hover { transform: translateY(-5px); border-color: var(--accent-cyan); box-shadow: var(--shadow-glow-cyan); }
.pg-guides .card-image { height: 420px; background-size: cover; background-position: 50% 20%; filter: brightness(.8); transition: filter .3s; }
.pg-guides .card:hover .card-image { filter: brightness(1); }
.pg-guides .card-content { padding: 1.2rem; }
.pg-guides .card-content h2 { display: flex; align-items: center; justify-content: center; gap: .6rem; font-size: 1.1rem; margin-bottom: .6rem; }
.pg-guides .card-content a { color: var(--accent-cyan); font-weight: 600; }

/* ---------- Fantasy Cup ---------- */
.pg iframe { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); }
.pg-fantasy-cup .tournament-wrapper { width: 100%; max-height: 90vh; overflow: auto; padding: 10px; scrollbar-width: thin; scrollbar-color: var(--accent-cyan) var(--bg-alt); }
.pg-fantasy-cup .tournament { display: flex; gap: 60px; padding-bottom: 20px; }
.pg-fantasy-cup .round { position: relative; min-width: 220px; }
.pg-fantasy-cup .match { width: 200px; position: absolute; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .2s, box-shadow .2s; }
.pg-fantasy-cup .match:hover { transform: scale(1.04); border-color: var(--accent-cyan); box-shadow: var(--shadow-glow-cyan); }
.pg-fantasy-cup .match.highlight { border-color: var(--accent-amber); box-shadow: 0 0 14px rgba(255,200,87,.5); }
.pg-fantasy-cup .player { width: 100%; padding-left: 6px; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; color: var(--text-secondary); }
.pg-fantasy-cup .player.winner { color: var(--accent-green); font-weight: 700; }
.pg-fantasy-cup .connector-vertical, .pg-fantasy-cup .connector-horizontal { position: absolute; background: var(--border); z-index: 0; }
.pg-fantasy-cup .connector-vertical { width: 2px; } .pg-fantasy-cup .connector-horizontal { height: 2px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .pg .charts { grid-template-columns: 1fr; }
  .pg .role-stats { grid-template-columns: repeat(3, 1fr); }
  .pg .panel { flex-basis: 100%; }
}
@media (max-width: 768px) {
  .pg .cm-main { padding: 1.2rem .8rem 2.4rem; }
  .pg .section { padding: 1rem; }
  .pg .cm-main th, .pg .cm-main td { padding: .5rem .45rem; font-size: .82rem; }
  .pg .hide-mobile, .pg .hide-on-mobile { display: none !important; }
  .pg-rider-ranking th:nth-child(3), .pg-rider-ranking td:nth-child(3), .pg-rider-ranking th:nth-child(5), .pg-rider-ranking td:nth-child(5),
  .pg-manager-ranking th:nth-child(n+3):nth-child(-n+6), .pg-manager-ranking td:nth-child(n+3):nth-child(-n+6),
  .pg-winometer #victory-table th:nth-child(3), .pg-winometer #victory-table td:nth-child(3), .pg-winometer #victory-table th:nth-child(4), .pg-winometer #victory-table td:nth-child(4),
  .pg-winometer #victory-table th:nth-child(6), .pg-winometer #victory-table td:nth-child(6),
  .pg-manager-stats .table-leagues th:nth-child(n+3):nth-child(-n+5), .pg-manager-stats .table-leagues td:nth-child(n+3):nth-child(-n+5),
  .pg-participation table th:nth-child(n+4), .pg-participation table td:nth-child(n+4),
  .pg-market #custom-sales-table th:nth-child(2), .pg-market #custom-sales-table td:nth-child(2), .pg-market #custom-sales-table th:nth-child(4), .pg-market #custom-sales-table td:nth-child(4),
  .pg-market #custom-sales-table th:nth-child(5), .pg-market #custom-sales-table td:nth-child(5), .pg-market #custom-sales-table th:nth-child(n+7), .pg-market #custom-sales-table td:nth-child(n+7) { display: none; }
  .pg .top5win { flex-direction: column; }
  .pg .role-stats2 { gap: .4rem; }
  .pg .select-group select { width: 180px; }
  .pg .checkbox-group { gap: .4rem .7rem; }
  .pg-guides .card-image { height: 300px; }
  .pg .rider-info.section { flex-direction: column; text-align: center; }
  .pg .rider-info.section h2 { text-align: center; }
}

/* Retouches */
.pg .stats br, .pg .ranking-stats br { display: none; }
.pg .filters.ranking-stats .stats { gap: .2rem; }
.pg .panel .rider-info.section { flex-direction: column; text-align: center; gap: .4rem; }
.pg .panel .rider-info.section h2 { text-align: center; }
.pg .common-charts canvas { width: 100%; }

.pg input:not([type]), .pg input[list] {
  background: var(--bg-alt); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .6rem .8rem; font: inherit; font-size: .9rem; color-scheme: dark;
}
.pg input:not([type]):focus, .pg input[list]:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(47,211,255,.15); }
.pg-manager-stats .section { margin-left: auto; margin-right: auto; }
.pg-manager-cards form { display: flex; justify-content: center; margin-bottom: 1.2rem; }
.pg-manager-cards .container input { width: 100%; max-width: 280px; }
.pg-winometer h2:not(.page-title):not(.year-tag) { font-size: 1.05rem; color: var(--accent-cyan); text-transform: uppercase; letter-spacing: .08em; text-align: center; margin: 1.2rem 0 .8rem; }
.pg-winometer h2.year-tag { font-size: 1.1rem !important; padding: .4rem 1.2rem; }
.pg-winometer .lefevere-challenge > img, .pg-market .lefevere-challenge > img { max-width: 180px; border-radius: var(--radius-md); }
.pg canvas { max-height: 700px; }
.pg-participation canvas, .pg-manager-stats canvas { width: 100% !important; height: 400px !important; }
@media (max-width: 800px) { .pg canvas { max-height: 350px; } .pg-participation canvas, .pg-manager-stats canvas { height: 300px !important; } }
/* Boutons de rareté : garder leur couleur au survol */
.pg .cm-main a.btn-r:hover { filter: brightness(1.25); }
.pg .cm-main a.btn-blue:hover { color: var(--accent-cyan); }
.pg .cm-main a.btn-pink:hover { color: var(--accent-pink); }
.pg .cm-main a.btn-yellow:hover { color: var(--accent-amber); }
.pg .cm-main a.btn-r.active:hover { color: #08120a; }
/* Packs : données plus lisibles */
.pg-packs .cm-main td { color: var(--text-primary); }
.pg-packs .cm-main td:first-child { color: #fff; }

/* Roster : cartes plus petites sur mobile (2 par ligne) */
@media (max-width: 600px) {
  .pg .rider-grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
  .pg .rider-card .rider-info { padding: .55rem .6rem .7rem; }
  .pg .rider-card .rider-info h3 { font-size: .85rem; }
  .pg .rider-card .rider-info p { font-size: .7rem; }
}

/* Comparateur : graphiques plus grands */
.pg-h2h .common-charts .section:has(#radar) { height: 680px; position: relative; }
.pg-h2h .common-charts .section:has(#line), .pg-h2h .common-charts .section:has(#scatter) { height: 560px; position: relative; }
.pg-h2h #line, .pg-h2h #scatter { width: 100% !important; height: 100% !important; max-height: none; }
.pg-h2h #radar, .pg-h2h #line, .pg-h2h #scatter { width: 100% !important; height: 100% !important; max-height: none; }
@media (max-width: 800px) {
  .pg-h2h .common-charts .section:has(#radar) { height: 460px; }
  .pg-h2h .common-charts .section:has(#line), .pg-h2h .common-charts .section:has(#scatter) { height: 400px; }
  .pg-h2h #line, .pg-h2h #scatter { max-height: none; }
}
