/* Palette des rapports existants (report.py / report_visual.py), reprise de la maquette. */
:root {
  --bg: #11151c; --panel: #161a22; --panel-2: #1f2633; --line: #262b36; --line-2: #2c3546;
  --text: #e8ecf2; --text-2: #c7cbd3; --muted: #8b95a7; --dim: #5d6678;
  --accent: #4c8dff; --accent-2: #93c5fd; --accent-hover: #6aa0ff;
  --bad: #fca5a5; --good: #86efac; --warn: #fcd34d;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--accent-2); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.grow { flex: 1 0 auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.topbar { border-bottom: 1px solid #1f2633; }
.topbar-in { min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: -.01em; margin-right: 12px; }
.brand-lg { font-size: 18px; justify-content: center; margin: 0 0 20px; }
.nav { display: flex; gap: 2px; flex-grow: 1; align-self: stretch; }
.tab { display: inline-flex; align-items: center; padding: 0 12px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.tab:hover { color: var(--text); }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 5px; border-radius: 20px; color: var(--text-2); cursor: pointer; list-style: none; user-select: none; }
.account-btn::-webkit-details-marker { display: none; }
.account-btn:hover, .account[open] .account-btn { background: #1c2230; color: var(--text); }
.account-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-label { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: var(--muted); transition: transform .15s; }
.account[open] .chevron { transform: rotate(180deg); }
.account-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.45); overflow: hidden; }
.account-head { display: flex; align-items: center; gap: 12px; padding: 14px; }
.account-id { min-width: 0; }
.account-name { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.account-num { color: var(--muted); font-weight: 400; }
.account-hint { font-size: 12px; color: var(--muted); }
.account-section { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); }
.account-section .account-hint { margin-bottom: 6px; }
.team-line { display: flex; align-items: center; gap: 8px; padding: 2px 0; color: var(--text-2); font-weight: 600; }
.team-tag { padding: 1px 6px; border-radius: 6px; background: rgba(76,141,255,.14); color: var(--accent-2); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.account-empty { color: var(--dim); font-size: 13px; }
.account-links { display: flex; flex-direction: column; padding: 6px 6px; }
.account-links a { display: block; padding: 8px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.account-links a:hover, .account-links a[aria-current="page"] { background: #1c2230; color: var(--text); }
.ghost.account-logout { width: calc(100% + 16px); height: 36px; text-align: left; margin: 0 -8px; padding: 0 8px; }
.avatar-lg { width: 40px; height: 40px; font-size: 16px; flex: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #232b39; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--text-2); }
.footer { padding: 16px; text-align: center; font-size: 11px; color: #3d4556; }

/* Boutons : un seul gabarit, celui d'« Analyser » (hauteur, arrondi, graisse), en trois variantes —
   primary (action principale, plein), secondary (action secondaire, bordé), danger (destructrice, rouge) —,
   chacune en taille normale ou `small` ; `wide` : toute la largeur. `ghost` : élément de menu, pas un bouton. */
.primary, .secondary, .danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; }
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); }
.secondary { background: transparent; border-color: var(--line-2); color: var(--text); }
.secondary:hover { background: #232b39; border-color: #3a4558; }
.danger { background: #dc2626; color: #fff; }
.danger:hover { background: #ef4444; }
.primary.small, .secondary.small, .danger.small { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.primary.wide, .secondary.wide, .danger.wide { width: 100%; margin-top: 16px; }
.ghost { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 0 10px; height: 32px; }
.ghost:hover { background: #232b39; color: var(--text); }
.icon-btn { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #232b39; color: var(--text); }
.link-btn { border: 0; background: none; color: var(--accent-2); font-weight: 700; padding: 0; }
.input { height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; width: 100%; }
.input:focus { outline: none; border-color: var(--accent); }

/* Connexion */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; }
.field-label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.alert.error { color: var(--bad); background: rgba(239,68,68,.12); padding: 8px 12px; border-radius: 8px; margin: 0 0 8px; }
.discord { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border: 0; border-radius: 10px; background: #5865f2; color: #fff; font-weight: 700; }
.discord:hover { background: #6d78f5; }
.twitch { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border: 0; border-radius: 10px; background: #9146ff; color: #fff; font-weight: 700; }
.twitch:hover { background: #a970ff; }
.discord.wide, .twitch.wide { width: 100%; }
.social-logins { display: flex; flex-direction: column; gap: 10px; }
/* « Comptes connectés » (templates/socialaccount/connections.html) */
.connections { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.connection { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.connection-brand { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--line-2); }
.connection-brand.discord { background: #5865f2; }
.connection-brand.twitch { background: #9146ff; }
.connect-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.connect-buttons .discord, .connect-buttons .twitch { padding: 0 18px; }
.local-login { margin-top: 18px; }
.local-login summary { cursor: pointer; color: var(--muted); font-size: 12px; text-align: center; list-style: none; }
.local-login summary::-webkit-details-marker { display: none; }
.local-login[open] summary { margin-bottom: 4px; }
.login-form { margin: 0; }
.entrance-title { margin: 0 0 10px; font-size: 18px; }
.login-card p { color: var(--text-2); }

/* Autres pages d'allauth (déconnexion, erreur Discord...) : éléments génériques */
.entrance { display: flex; align-items: center; justify-content: center; padding: 16px; }
.entrance > h1, .entrance > p, .entrance > form { width: 100%; max-width: 420px; }
.entrance { flex-direction: column; gap: 12px; min-height: 70vh; }
.entrance h1 { font-size: 20px; margin: 0; }
.entrance form button { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; }
.entrance input:not([type=hidden]):not([type=checkbox]) { height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; width: 100%; }

/* Barre de lien */
.hero { padding-top: clamp(24px, 5vw, 40px); padding-bottom: clamp(18px, 3vw, 28px); }
.submit-form { max-width: 760px; margin: 0 auto; }
.hero-title { display: block; text-align: center; font-size: clamp(21px, 4vw, 26px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; }
.cmd { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; }
.cmd:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(76,141,255,.16); }
.cmd input { flex: 1 1 auto; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.cmd .primary[disabled] { background: #232b39; color: var(--dim); cursor: default; }
.verdict { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.verdict-invalid, .verdict-rejected { color: var(--bad); background: rgba(239,68,68,.12); }
.verdict-current { color: var(--good); background: rgba(34,197,94,.12); }
.verdict-queued { color: var(--text-2); background: #232b39; }
.verdict-full, .verdict-quota, .verdict-busy { color: var(--warn); background: rgba(252,211,77,.10); }
.verdict-new { color: var(--accent-2); background: rgba(76,141,255,.14); }
.verdict-title { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-btn { position: relative; flex: 0 1 auto; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer; min-width: 0; max-width: 180px; }
.cmd .source-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; flex: none; }
.source-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) { .source-btn { padding: 0 10px; } .source-btn span { display: none; } }
.quota { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 12px; font-size: 12px; color: var(--dim); }
.quota-full { color: var(--warn); }

/* Liste */
.list { padding-bottom: 56px; display: flex; flex-direction: column; gap: 18px; }
.group { display: flex; flex-direction: column; gap: 10px; }
.group [data-progress] { display: flex; flex-direction: column; gap: 10px; }  /* cartes en cours, rafraîchies en place */
.group h3 { margin: 2px 0 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters input[type=search] { flex: 1 1 220px; }
.filters select { flex: 0 1 auto; width: auto; max-width: 100%; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pager-info { font-size: 12px; color: var(--muted); }
.empty a { color: var(--accent-2); }
.empty { margin: 0; padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed #263042; border-radius: 14px; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: #232b39; color: var(--text); }
.toast form { margin: 0; }
.toast-error { background: rgba(239,68,68,.14); color: var(--bad); }

/* Carte */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card-running { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(76,141,255,.12), 0 10px 30px rgba(76,141,255,.10); }
.card-row { display: flex; align-items: center; gap: 12px; padding: clamp(11px, 2.4vw, 16px) clamp(12px, 2.6vw, 18px); }
.card-row form { margin: 0; }
.card-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.title-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(15px, 2.6vw, 16px); font-weight: 700; }
.title-line .icon-btn { width: 28px; height: 28px; }
.rename { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rename .input { flex: 1 1 220px; height: 32px; border-color: var(--accent); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.status { font-weight: 700; color: var(--text-2); }
.status-bad { color: var(--bad); }
.fail-help { margin: 0; font-size: 12px; color: var(--text-2); }
.fail-help a { font-weight: 600; }
.lead-icon { flex: none; }
.waiting { animation: pulse 2s ease-in-out infinite; }
.vod { flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--panel-2); display: inline-flex; align-items: center; justify-content: center; }
.vod:hover { background: #2c3546; }
.report-btn { flex: none; }
.eta { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; padding: 0 4px; }
.eta b { font-size: clamp(20px, 4.4vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.eta span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-2); }

/* Analyse en cours */
.halo { flex: none; width: clamp(40px, 8vw, 48px); height: clamp(40px, 8vw, 48px); border-radius: 50%; background: rgba(76,141,255,.16); display: inline-flex; align-items: center; justify-content: center; animation: halo 1.6s ease-in-out infinite; }
.halo svg { width: 70%; height: 70%; }
.spin { animation: spin .8s linear infinite; }
.run-band { padding: 0 clamp(12px, 2.6vw, 18px) clamp(12px, 2.4vw, 16px); display: flex; flex-direction: column; gap: 8px; }
.run-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13px; }
.run-line b { color: var(--accent-2); }
.run-line span { color: var(--muted); }
.segments { display: flex; gap: 3px; height: 8px; }
.seg { flex: 1 1 0; border-radius: 2px; background: #232b39; }
.seg-done, .seg-current { background: var(--accent); }
.seg-current { animation: pulse 1.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes halo { 0%, 100% { box-shadow: 0 0 0 0 rgba(76,141,255,.45); } 50% { box-shadow: 0 0 0 8px rgba(76,141,255,0); } }

@media (max-width: 560px) {
  .topbar-in { padding-top: 6px; padding-bottom: 6px; gap: 4px 8px; }
  .brand { margin-right: 0; }
  .brand-text, .account-label { display: none; }
  .tab { min-height: 44px; padding: 0 10px; }
  .account { margin-left: auto; }
  /* Plus d'onglets que de place (Classement, Admin) : ils défilent, le compte reste sur la ligne. */
  .nav { flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .filters input[type=search] { flex-basis: 100%; }
  .filters select { flex: 1 1 0; min-width: 0; }
  .card-row { gap: 8px; }
  .report-btn { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .spin, .halo, .seg-current, .waiting { animation: none; }
}
.confirm { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--text); }
.confirm::backdrop { background: rgba(5, 8, 12, .6); }
.confirm form { margin: 0; }
.confirm h2 { margin: 0 0 8px; font-size: 16px; }
.confirm-name { margin: 0 0 8px; color: var(--text-2); font-weight: 600; overflow-wrap: anywhere; }
.confirm-note { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Accès en attente, refus, invitation */
.notice { max-width: 560px; margin: 0 auto; text-align: center; color: var(--text-2); }
.notice p { margin: 0 0 8px; }
.muted { color: var(--muted); }

/* Workers */
.workers-page { padding-top: 28px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel h2 { margin: 0 0 6px; font-size: 17px; }
.panel p { margin: 0 0 12px; }
.steps { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.steps code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12px; overflow-wrap: anywhere; }
.downloads { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 6px; }
.pair-form { display: flex; flex-wrap: wrap; gap: 8px; }
.pair-form .input { flex: 1 1 180px; }
.code-input { font-family: ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; max-width: 200px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dim); }
.dot-on { background: var(--good); box-shadow: 0 0 0 4px rgba(34,197,94,.15); }
.dot-off { background: var(--bad); }
.pair-confirm { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(76,141,255,.12); }
.downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; }
.small-note { font-size: 12px; }
.docker-help { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.docker-help summary { cursor: pointer; }
.docker-help code { overflow-wrap: anywhere; }

/* Classement des équipes */
.ranking-page { padding-top: 24px; }
.ranking-ref { margin: 4px 0 0; }
.ranking-meta { margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.filters-count { align-self: center; font-size: 13px; white-space: nowrap; }
.filters [hidden], .ranking tr[hidden] { display: none !important; }
/* Encart de l'équipe de référence, mêmes couleurs que sa ligne du tableau */
.ref-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; margin-top: 14px;
  padding: 12px 16px 12px 18px; border: 1px solid rgba(76,141,255,.40); border-radius: 12px;
  background: linear-gradient(90deg, rgba(76,141,255,.20), rgba(76,141,255,.05) 75%); box-shadow: inset 4px 0 0 var(--accent); }
.ref-who { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.ref-who .ref-pill { margin-left: 0; }
.ref-who b { font-size: 17px; color: var(--accent-2); }
.ref-who .muted { font-size: 13px; font-variant-numeric: tabular-nums; }
.ref-card p { margin: 0; font-size: 13px; }
.ref-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .ref-card { grid-template-columns: 1fr; }
  .ref-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 6px; }
}
.ranking tr.is-ref { scroll-margin-top: 90px; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
table.ranking { width: 100%; border-collapse: collapse; font-size: 14px; }
.ranking th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ranking td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ranking tr:last-child td { border-bottom: 0; }
.ranking .num { text-align: right; font-variant-numeric: tabular-nums; }
.ranking .team { font-weight: 600; }
.ranking small.sub { display: block; font-size: 12px; font-weight: 400; margin-top: 1px; }
.ranking th.rank, .ranking td.rank { padding-right: 4px; }
.ranking td.rank b { display: inline-block; min-width: 3ch; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ranking td.rank .delta { margin-left: 6px; }
.ranking .comp { display: flex; align-items: center; gap: 10px; }
.ranking .comp .tier-b { min-width: 42px; text-align: center; }
.ranking .tip { text-decoration: underline dotted rgba(139,149,167,.6); text-underline-offset: 3px; cursor: help; }
.ranking a.ext { color: var(--text); text-decoration: none; }
.ranking a.ext:hover { color: var(--accent-2); text-decoration: underline; }
/* Équipe de référence : fond teinté, barre d'accent à gauche, nom et pastille en accent */
.ranking tr.is-ref { background: linear-gradient(90deg, rgba(76,141,255,.22), rgba(76,141,255,.06) 75%); }
.ranking tr.is-ref td { border-bottom-color: rgba(76,141,255,.45); }
.ranking tr:has(+ tr.is-ref) td { border-bottom-color: rgba(76,141,255,.45); }
.ranking tr.is-ref td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.ranking tr.is-ref .team { color: var(--accent-2); }
.ref-pill { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--accent); vertical-align: 1px; cursor: help; }
.ref-base { font-size: 12px; font-weight: 600; color: var(--accent-2); }
.ranking .forfeits { color: var(--warn); font-weight: 600; }
.delta { display: inline-block; font: 600 12px/1 ui-monospace, monospace; padding: 3px 5px; border-radius: 4px; white-space: nowrap; }
.delta.up { color: var(--good); background: rgba(34,197,94,.14); }
.delta.down { color: var(--bad); background: rgba(239,68,68,.14); }
.delta.flat { color: var(--muted); }
.delta.new { color: var(--accent-2); background: rgba(76,141,255,.14); font-family: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.tier-b { display: inline-block; padding: 3px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.tier-b.pro { color: #11151c; background: var(--text); }
.tier-b.chal { color: var(--text); background: #4d5a85; }
.tier-b.loc { color: var(--text); background: rgba(139,149,167,.16); box-shadow: inset 0 0 0 1px var(--line); }
.tier-b.div1 { color: #1c1604; background: #d9ad2b; box-shadow: none; }
.tier-b.div2 { color: #11151c; background: #b4bfcf; box-shadow: none; }
.tier-b.div3 { color: #fff4ea; background: #a5652f; box-shadow: none; }
.tier-b.div4 { color: #c7cbd3; background: #3a4152; box-shadow: none; }
.insights-page { padding-top: 24px; display: grid; gap: 14px; }
.insights-refresh { margin: 10px 0 0; }
.insight-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.insight-kpis .kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.insight-kpis .kpi b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.insight-kpis .kpi span { font-size: 13px; color: var(--muted); }
.insight-table td { white-space: normal; }
.insight-table td:first-child { white-space: nowrap; }
.insight-table tr.sub td:first-child { padding-left: 26px; }
.insight-table tr.sub2 td:first-child { padding-left: 44px; }
.insight-table tr.sub3 td:first-child { padding-left: 62px; }
.insight-table tr.used td { font-weight: 600; }
.insight-actions { display: grid; gap: 10px; margin-top: 10px; }
.insight-actions form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.q-good { color: var(--good); }
.q-warn { color: var(--warn); }
.q-bad { color: var(--bad); font-weight: 600; }
.insight-kpis .kpi.q-good b { color: var(--good); }
.insight-kpis .kpi.q-warn b { color: var(--warn); }
.insight-kpis .kpi.q-bad b { color: var(--bad); }
.quality-table th { white-space: normal; min-width: 64px; }
.quality-table td.wrap { white-space: normal; }
.quality-defs dt { font-weight: 600; margin-top: 8px; }
.quality-defs dd { margin: 2px 0 0; color: var(--muted); }
.flagged-more { margin-top: 10px; }

/* Stats EVA : VOD analysées d'une journée */
.vod-count { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vod-count.has { color: var(--accent-2); font-weight: 600; }
.vod-count svg { width: 16px; height: 16px; }
.ranking .actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.ranking td.wrap { white-space: normal; }
.ranking .team a { color: var(--text); text-decoration: none; }
.ranking .team a:hover { color: var(--accent-2); text-decoration: underline; }

/* Stats EVA : rencontres d'une journée, une carte par map */
.series-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.series-head h3 { margin: 0 0 2px; font-size: 17px; }
.series-head p { margin: 0 !important; font-size: 13px; }
.series-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 12px; }
.mcard { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.mcard.is-void { opacity: .6; }
.mcard { position: relative; }
.mcard .anchor { position: absolute; top: -80px; }
.mcard:has(.anchor:target) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
/* Résultats : un bloc par jour, une ligne par rencontre ; type en badge (ligue, coupe, scrim), bilan V/D */
.res-intro-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.res-intro-head h2 { margin: 0; }
.res-intro p:last-child { margin-bottom: 0; }
.res-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.res-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.res-toolbar .filters { margin-left: auto; }
.res-legend a.rtype { height: 26px; padding: 0 11px; text-decoration: none; transition: opacity .15s, box-shadow .15s; }
.res-legend a.rtype:hover { box-shadow: 0 0 0 2px var(--line-2); }
.res-legend.is-filtered a.rtype:not(.is-active) { opacity: .45; }
.res-legend.is-filtered a.rtype:not(.is-active):hover { opacity: 1; }
.res-legend a.rtype.is-active { box-shadow: 0 0 0 2px var(--text-2); }
.res-back { display: inline-block; margin-bottom: 6px; font-size: 13px; color: var(--muted); text-decoration: none; }
.res-back:hover { color: var(--text); }
.res-help { margin-top: 12px; }
.res-help summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.res-help summary:hover { color: var(--text); }
.res-help p { margin: 8px 0 0 !important; font-size: 13px; }
.rtype { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.rtype.kind-league { color: #fff; background: var(--accent); }
.rtype.kind-cup { color: #e9d5ff; background: rgba(168,85,247,.22); }
.rtype.kind-scrim { color: var(--muted); background: rgba(139,149,167,.14); }
.rdays { display: grid; gap: 12px; }
.rday { display: grid; grid-template-columns: 92px 1fr; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; }
.rday-date { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 12px 6px;
  background: var(--panel-2); border-right: 1px solid var(--line); color: var(--text); text-decoration: none; text-align: center; }
.rday-date:hover { background: #232b39; }
.rday-date b { font-size: 26px; line-height: 1.1; font-weight: 700; }
.rday-dow, .rday-month { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.rday-dow { font-weight: 600; color: var(--text-2); }
.rday-list { display: flex; flex-direction: column; min-width: 0; }
.rsess { display: grid; grid-template-columns: 138px minmax(0, 1fr) 96px 72px 264px; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); min-height: 52px; }
.rsess:last-child { border-bottom: 0; }
.rsess.kind-league { background: linear-gradient(90deg, rgba(76,141,255,.10), rgba(76,141,255,0) 60%); box-shadow: inset 3px 0 0 var(--accent); }
.rsess.kind-cup { box-shadow: inset 3px 0 0 rgba(168,85,247,.7); }
.rsess .rtype { justify-self: start; }
.rpairs { display: flex; flex-wrap: wrap; gap: 4px 6px; color: var(--text); text-decoration: none; font-weight: 600; }
.rpairs:hover .rpair { border-color: var(--accent); color: var(--accent-2); }
.rpair { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 7px; background: rgba(255,255,255,.02); white-space: nowrap; }
/* Soirée de ligue : équipes dans l'ordre du classement de la division, rang, monte / descend, la sienne en avant */
.rpair.is-own { border-color: rgba(76,141,255,.7); background: rgba(76,141,255,.16); color: var(--text); font-weight: 700; }
.rrank { display: inline-block; min-width: 1.1em; margin-right: 5px; color: var(--muted); font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums; text-align: center; }
.rpair.is-own .rrank { color: var(--accent-2); }
.rpair .move { margin-left: 4px; font-size: 10px; }
.rrec b, .session-meta b { font-weight: 700; white-space: nowrap; }
.is-win { color: var(--good); }
.is-loss { color: var(--bad); }
.is-even { color: var(--text-2); }
/* Pick & ban : un rôle proposé par map du pool et par adversaire */
.pb-pool { display: grid; gap: 8px; }
.pb-maps { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-hp { padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 700; color: #1a1300; background: var(--warn); }
.pb-new { padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); }
.pb-draft { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); }
.pb-ours { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pb-our { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-2);
  border-radius: 10px; background: var(--panel-2); font-size: 13px; }
.pb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pb-head h2 { margin: 0 0 2px; font-size: 18px; }
.pb-head p { margin: 0 !important; font-size: 13px; }
.pb-theirs { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 8px 12px; border-radius: 10px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); }
.pb-theirs b { color: var(--bad); }
.pb-table td.wrap { font-size: 13px; color: var(--text-2); }
.pb-role { display: inline-block; min-width: 76px; text-align: center; padding: 3px 9px; border-radius: 999px; font-size: 11px;
  font-weight: 700; letter-spacing: .03em; color: var(--muted); background: rgba(139,149,167,.14); }
.pb-role.role-ban1, .pb-role.role-ban2, .pb-role.role-ban3 { color: #fff; background: #b4374a; }
.pb-role.role-ban3 { background: rgba(180,55,74,.55); }
.pb-role.role-pick1, .pb-role.role-pick2 { color: #06210f; background: var(--good); }
.pb-role.role-decider { color: #fff; background: var(--accent); }
.pb-role.role-backup { color: var(--good); background: rgba(34,197,94,.14); }
.pb-role.role-avoid { color: var(--warn); background: rgba(252,211,77,.14); }
.rcount { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.rvod { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; min-width: 150px; }
@media (max-width: 760px) {
  .rday { grid-template-columns: 1fr; }
  .rday-date { flex-direction: row; justify-content: flex-start; gap: 6px; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rday-date b { font-size: 15px; }
  .rsess { grid-template-columns: 1fr auto; gap: 8px; }
  .rsess .rpairs { grid-column: 1 / -1; order: -1; }
  .rcount { text-align: left; }
  .rvod { min-width: 0; }
  .rrec { justify-self: end; }
}
/* Page du jour : un bandeau par rencontre, raccourcis en tête */
.res-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rsess-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--line-2);
  border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: 13px; font-weight: 600; }
.rsess-chip:hover { border-color: var(--accent); color: var(--text); }
.session-head { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding: 12px 16px;
  border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); scroll-margin-top: 80px; }
.session-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* Équipes de la rencontre : « A vs B » en titre, ou une carte par match d'une soirée (lien vers ses résultats) */
.session-title { margin: 0; font-size: 19px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.session-head .side { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; color: var(--text-2); }
.session-head .side.is-own { color: var(--text); }
.session-head .side.is-own::before { content: ""; align-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.session-head .side .team-tag { font-size: 11px; }
.session-head .vs { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.pair-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pair-chip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-size: 14px; }
a.pair-chip:hover { border-color: var(--accent); background: rgba(76,141,255,.08); }
.team-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.team-chip { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.03); border: 1px solid var(--line-2); font-size: 14px; }
.team-chip.is-own { border-color: rgba(76,141,255,.6); background: rgba(76,141,255,.10); }
.fixtures a.fx-link { color: inherit; text-decoration: underline dotted rgba(139,149,167,.7); text-underline-offset: 4px; }
.fixtures a.fx-link:hover { color: var(--text); text-decoration-color: var(--accent); }
.series:target, .fixtures tr:target { outline: 2px solid var(--accent); outline-offset: 2px; scroll-margin-top: 16px; }
.session-head.kind-league { border-color: rgba(76,141,255,.55); background: linear-gradient(90deg, rgba(76,141,255,.16), var(--panel-2) 70%); }
.session-head.kind-cup { border-color: rgba(168,85,247,.5); }
.session-head:target { box-shadow: 0 0 0 2px var(--accent); }
.session-meta { color: var(--muted); font-size: 13px; }
.fixtures h3 { margin: 0 0 10px; font-size: 15px; }
.fixtures .ranking tr.is-own td { background: rgba(76,141,255,.07); }
.fixtures .ranking tr.is-own td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.fixtures .standings-title { margin-top: 18px; }
.fixtures .standings tr.is-own td { background: rgba(76,141,255,.07); }
.fixtures .standings tr.is-own td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.fixtures .standings tr.is-own td.team { font-weight: 700; }
/* Blocs d'équipe d'une soirée : rang au classement de la division, monte / descend, son équipe en avant */
.team-block h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.team-block.is-own { border-color: rgba(76,141,255,.6); box-shadow: inset 4px 0 0 var(--accent); }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px;
  padding: 0 6px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12px;
  font-weight: 700; font-variant-numeric: tabular-nums; }
.team-block.is-own .rank-badge { background: var(--accent); border-color: var(--accent); color: #fff; }
.own-badge { padding: 1px 7px; border-radius: 6px; background: rgba(76,141,255,.14); color: var(--accent-2);
  font-size: 11px; font-weight: 700; }
.move { font-size: 12px; font-weight: 600; white-space: nowrap; }
.move.up { color: var(--good, #22c55e); }
.move.down { color: var(--bad, #ef4444); }
.fset { display: inline-block; margin: 1px 10px 1px 0; color: var(--text-2); white-space: nowrap; }
.fset b { color: var(--text); }
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.badge { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--muted); background: rgba(139,149,167,.16); }
.badge.win { color: var(--good); background: rgba(34,197,94,.14); }
.badge.loss { color: var(--bad); background: rgba(239,68,68,.14); }
.mscore { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 6px; font-size: 18px; font-variant-numeric: tabular-nums; }
.vod-chip { margin-left: auto; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--accent-2); background: rgba(76,141,255,.14); }
a.vod-chip { text-decoration: none; }
a.vod-chip:hover { background: rgba(76,141,255,.26); }
.mini { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.mini th:first-child { width: 36%; }
.mini th:nth-child(n+2):nth-child(-n+4) { width: 8%; }
.mini th { font-size: 11px; font-weight: 600; color: var(--muted); text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line-2); }
.mini th:first-child { text-align: left; color: var(--text-2); }
.mini td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.mini tr:last-child td { border-bottom: 0; }
.mini td.pn { text-align: left; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mvp { padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 700; color: #1a1300; background: var(--warn); }

/* Pages de coaching (contenu calculé par eva_insights, mêmes classes que ses pages autonomes, aux couleurs du site) */
.coach { --surface: var(--panel-2); --ring: var(--line-2); --grid: var(--line); --ink: var(--text); --ink2: var(--text-2);
  --base: #3a4458; --pos: #4c8dff; --neg: #f87171; --zero: var(--muted); --ok: rgba(76,141,255,.20);
  --mid: rgba(139,149,167,.20); --no: rgba(248,113,113,.16); }
.coach-back { margin: 0; }
/* Version essentielle (par défaut) ou complète d'une page de coaching (`data-level` des sections) */
.coach[data-view="simple"] [data-level="full"], .coach[data-view="full"] [data-level="simple"] { display: none; }
.coach-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.coach-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.coach-toggle button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px;
  font-weight: 600; padding: 6px 14px; cursor: pointer; }
.coach-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.coach-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Onglet « Stratégie » : tuiles des modules (grisées sans les droits), fil d'Ariane dans un module */
.strat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }  /* 2 par ligne (Stratégie, Coaching) */
@media (max-width: 640px) { .strat-tiles { grid-template-columns: 1fr; } }
.strat-tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
a.strat-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.strat-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: var(--accent); background: rgba(76,141,255,.12); }
.strat-title { font-size: 17px; font-weight: 700; }
.strat-text { color: var(--muted); line-height: 1.45; flex: 1; }
/* Bouton « Ouvrir » d'une tuile : le primary du site, au bas de la tuile (toute la tuile est le lien) */
.strat-open { align-self: flex-start; margin-top: 4px; }
a.strat-tile:hover .strat-open { background: var(--accent-hover); }
.strat-meta { color: var(--muted); font-size: 12px; }
.strat-tile.is-locked { cursor: not-allowed; filter: grayscale(1); opacity: .55; }
.strat-tile.is-locked .strat-icon { color: var(--muted); background: rgba(139,149,167,.14); }
.strat-lock { display: flex; gap: 6px; align-items: baseline; color: var(--text-2); font-size: 13px; }
.strat-crumb { margin: 0; }
.strat-crumb a { color: var(--accent); text-decoration: none; }
.strat-crumb a:hover { text-decoration: underline; }
.kill-frame { display: block; box-sizing: content-box; width: calc(100% - 2px); height: 900px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.coach h1 { margin: 0 0 6px; font-size: 22px; }
.coach .panel h2 { margin: 0 0 10px; font-size: 18px; }
.coach h3 { margin: 18px 0 8px; font-size: 15px; }
.coach .panel p { color: var(--ink2); max-width: 860px; }
.coach .panel > :last-child, .coach .model > :last-child { margin-bottom: 0; }
.coach b { color: var(--ink); }
.coach ul { color: var(--ink2); padding-left: 20px; margin: 0 0 10px; }
.coach li { margin: 5px 0; }
.coach .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.coach .kpi, .coach .card, .coach .model { background: var(--surface); border: 1px solid var(--ring); border-radius: 12px; padding: 12px 14px; }
.coach .kpi b { display: block; font-size: 24px; }
.coach .kpi span, .coach .card span { font-size: 13px; color: var(--ink2); }
.coach .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 12px 0; }
.coach .card b.big { display: block; font-size: 28px; line-height: 1.1; margin-bottom: 4px; }
.coach .tw { overflow-x: auto; border: 1px solid var(--ring); border-radius: 12px; margin: 10px 0; }
.coach table { border-collapse: collapse; width: 100%; font-size: 14px; }
.coach th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.coach td { padding: 8px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; white-space: nowrap; }
.coach tr:last-child td { border-bottom: 0; }
.coach td.lbl { white-space: normal; min-width: 180px; font-weight: 600; }
.coach td.wrap-cell { white-space: normal; min-width: 260px; font-size: 13px; }
.coach .num { font-variant-numeric: tabular-nums; }
.coach .r { display: inline-block; min-width: 40px; margin: 0 4px; font-variant-numeric: tabular-nums; }
.coach .chip { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.coach .chip.ok { background: var(--ok); }
.coach .chip.mid { background: var(--mid); }
.coach .chip.no { background: transparent; box-shadow: inset 0 0 0 1px var(--base); color: var(--ink2); }
.coach .chip.none { background: transparent; }
.coach .hv { width: 92px; height: 18px; vertical-align: middle; }
.coach .hv.rg { width: 140px; }
.coach .hv-axis { stroke: var(--base); stroke-width: 1; }
.coach .hv-half { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.coach .hv-dot { stroke: var(--panel); stroke-width: 1.5; }
.coach .hv-dot.ok, .coach .hv-dot.pos { fill: var(--pos); }
.coach .hv-dot.mid, .coach .hv-dot.zero, .coach .hv-dot.none { fill: var(--zero); }
.coach .hv-dot.neg { fill: var(--neg); }
.coach .hv-dot.no { fill: var(--panel); stroke: var(--zero); stroke-width: 2; }
.coach .rg-ci { stroke-width: 2.5; stroke-linecap: round; }
.coach .rg-ci.pos { stroke: var(--pos); }
.coach .rg-ci.neg { stroke: var(--neg); }
.coach .rg-ci.zero { stroke: var(--zero); }
.coach .legend { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.coach details { background: var(--surface); border: 1px solid var(--ring); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.coach summary { cursor: pointer; font-weight: 600; }
.coach .models { display: grid; gap: 12px; margin: 10px 0; }
.coach .model h3 { margin: 0 0 6px; }
.coach .heat-pair { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-top: 8px; }
.coach .heat-pair p { flex-basis: 100%; margin: 0; }
.coach .heat-fig { margin: 0; width: min(260px, 100%); }
.coach .heat-box { position: relative; background: var(--bg); border-radius: 10px; overflow: hidden; }
.coach .heat-box img { display: block; width: 100%; height: auto; opacity: .75; }
.coach .heat-nobg { padding-top: 100%; }
.coach .heat { position: absolute; inset: 0; width: 100%; height: 100%; }
.coach .heat-fig figcaption { font-size: 13px; color: var(--ink2); margin-top: 4px; }
.coach .kpi b { overflow-wrap: anywhere; }
.coach .kpi small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.coach .kpi.neg b { color: var(--neg); }
.coach .kpi.pos b { color: var(--pos); }
.coach .callout { border-left: 4px solid var(--pos); background: var(--surface); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 8px 0 0; }
.coach .callout.neg { border-left-color: var(--neg); }
.coach .callout p { margin: 0 0 8px; color: var(--ink2); }
.coach .callout p:last-child { margin: 0; }
.coach .levers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 10px 0 0; }
.coach .lever { background: var(--surface); border: 1px solid var(--ring); border-left: 4px solid var(--pos); border-radius: 12px; padding: 12px 14px; }
.coach .lever.neg { border-left-color: var(--neg); }
.coach .lever.mid { border-left-color: var(--base); }
.coach .lv-top { display: flex; align-items: baseline; gap: 8px; font-weight: 600; color: var(--ink); }
.coach .lv-rank { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--mid); }
.coach .lv-fig { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 8px 0 2px; }
.coach .lv-fig b { font-size: 26px; line-height: 1.1; }
.coach .lever.neg .lv-fig b { color: var(--neg); }
.coach .lever.pos .lv-fig b { color: var(--pos); }
.coach .lv-fig span { font-size: 13px; color: var(--ink2); }
.coach .lv-meter { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; color: var(--ink2); }
.coach .lv-meter svg { flex: none; }
.coach .lv-meter .hv.rg { width: 110px; }
.coach .lv-meter span { white-space: nowrap; }
.coach .lv-why { font-size: 13px; color: var(--ink2); margin: 6px 0 0 !important; }
.coach .lv-help { display: block; margin-top: 6px; }
/* Courbe « Ta progression » (eva_insights/progression.py) : SVG en ligne, sans couleur héritée */
.coach .prog { width: 100%; max-width: 720px; height: auto; display: block; margin: 8px 0; }
.coach .pg-grid { stroke: var(--grid); stroke-width: 1; }
.coach .pg-tick { font-size: 11px; fill: var(--muted); }
.coach .pg-lab { font-size: 12px; fill: var(--ink2); }
.coach .pg-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.coach .pg-line.pos, .coach .pg-avg.pos { stroke: var(--pos); }
.coach .pg-line.neg, .coach .pg-avg.neg { stroke: var(--neg); }
.coach .pg-avg { stroke-width: 1; stroke-dasharray: 4 4; }
.coach .pg-dot { stroke: var(--surface); stroke-width: 2; transition: r .1s; }
/* Survol d'un graphique (coach_charts.js) : point et curseur vertical, tooltip au style des rapports */
.coach .pg-dot.is-on { r: 7; stroke: #e8e8ea; }
.coach .pg-cursor { stroke: #9aa0ab; stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.coach svg.prog { touch-action: pan-y; cursor: crosshair; }
.chart-tip { position: fixed; z-index: 50; background: #1a1d24; border: 1px solid #333846; border-radius: 4px;
  padding: 6px 10px; font-size: 12px; line-height: 1.4; max-width: min(360px, calc(100vw - 16px)); pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.chart-tip[hidden] { display: none; }
.chart-tip .tt-header { color: #c7cbd3; font-weight: 600; margin-bottom: 2px; }
.chart-tip .tt-value { color: #e8e8ea; }
.coach .pg-band { fill: var(--pos); opacity: .16; stroke: none; }
.coach .pg-base { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.coach .pg-dot.pos { fill: var(--pos); }
.coach .pg-dot.neg { fill: var(--neg); }
.coach .pg-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink2); }
.coach .pg-key i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.coach .pg-key .pos { background: var(--pos); }
.coach .pg-key .neg { background: var(--neg); }
.flagged-more summary { cursor: pointer; color: var(--muted); }
.level { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text); }
.level-hi { background: rgba(220,38,38,.22); }
.level-eq { background: rgba(234,179,8,.20); }
.level-lo { background: rgba(76,141,255,.18); }
.level-far { background: rgba(139,149,167,.18); }
