/* Nouveau front (v3) : feuille autonome. Les couleurs d'ambiance (--a1, --a2) changent avec la surface de la speciale. */
:root {
  color-scheme: dark;
  --a1: #d9564a;
  --a2: #d4aa55;
  --bg: #07080c;
  --glass: rgba(255, 255, 255, 0.045);
  --glass2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f6fb;
  --muted: #98a2b3;
  --ok: #4cc79b;
  --bad: #e5697b;
  --gold: #e3c079;
  --silver: #d6dde8;
  --bronze: #e8935a;
  --side: 224px;
  --mono: "Cascadia Mono", Consolas, monospace;
  --grad: linear-gradient(120deg, var(--a1), var(--a2));
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 13px/1.4 system-ui, "Segoe UI", sans-serif; position: relative; overflow-x: hidden; }

/* Aurore animee en fond : deux nappes de couleur qui derivent lentement. */
body::before, body::after { content: ""; position: fixed; z-index: -1; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(110px); opacity: 0.14; pointer-events: none; }
body::before { top: -30vmax; right: -20vmax; background: radial-gradient(circle, var(--a1), transparent 65%); animation: drift 22s ease-in-out infinite alternate; }
body::after { bottom: -35vmax; left: -10vmax; background: radial-gradient(circle, var(--a2), transparent 65%); animation: drift 28s ease-in-out infinite alternate-reverse; opacity: 0.08; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
:focus-visible { outline: 2px solid var(--a2); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.gap { color: var(--muted); }
.sp { flex: 1; }

/* ---- Barre laterale en verre ---- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); display: flex; flex-direction: column; gap: 18px; padding: 18px 12px; background: rgba(10, 12, 18, 0.72); backdrop-filter: blur(22px) saturate(1.4); border-right: 1px solid var(--line); overflow-y: auto; z-index: 40; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px; font-weight: 800; letter-spacing: 0.02em; text-decoration: none; }
.logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--grad); box-shadow: 0 4px 14px -6px var(--a1); font-size: 13px; font-weight: 900; color: #0a0a0f; }
.grp small { display: block; padding: 0 10px 6px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 14.5px; border-radius: 10px; color: var(--muted); text-decoration: none; transition: background 0.2s, color 0.2s, transform 0.2s; }
.nav:hover { background: var(--glass2); color: var(--text); transform: translateX(2px); }
.nav.on { background: linear-gradient(90deg, color-mix(in srgb, var(--a1) 30%, transparent), transparent); color: var(--text); box-shadow: inset 3px 0 0 var(--a1); }
.nav i { width: 20px; text-align: center; font-style: normal; }
.nav .old { margin-left: auto; padding: 0 7px; border: 1px solid var(--line); border-radius: 99px; font-size: 10px; }
.account { margin-top: auto; display: grid; gap: 8px; }
.account .me { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); }
.account .me small { display: block; color: var(--muted); font-size: 11px; }
.link, .back { color: var(--muted); font-size: 12px; text-align: center; }
.back { text-decoration: none; }
.av { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden; box-sizing: border-box; border: 2px solid rgba(245, 197, 66, 0.7); background: linear-gradient(135deg, #2c3440, #1a1f29); font-size: 12px; font-weight: 800; }

/* ---- Haut ---- */
.main { margin-left: var(--side); min-width: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; padding: 8px 22px; background: rgba(7, 8, 12, 0.6); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 480px; display: flex; gap: 8px; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass); transition: border-color 0.2s, box-shadow 0.2s; }
.search:focus-within { border-color: var(--a2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 18%, transparent); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; }
kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; }
.page { max-width: 1180px; padding: 16px 22px 60px; display: grid; gap: 12px; }
.btn { display: inline-block; padding: 6px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass); font-weight: 700; text-decoration: none; text-align: center; transition: transform 0.15s, background 0.2s, box-shadow 0.2s; }
.btn:hover { background: var(--glass2); transform: translateY(-1px); }
.btn.primary { border: 0; background: var(--grad); color: #0a0a0f; box-shadow: 0 6px 18px -10px var(--a1); }
.btn.primary:hover { box-shadow: 0 8px 22px -8px var(--a1); }
.btn.block { display: block; width: 100%; }

/* ---- Hero ---- */
.hero { position: relative; display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: end; justify-content: space-between; padding: 16px 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 10%, transparent), transparent 55%), var(--glass); overflow: hidden; animation: rise 0.6s both; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; background: conic-gradient(from 90deg, transparent, var(--a1), var(--a2), transparent 70%); filter: blur(60px); opacity: 0.12; pointer-events: none; }
.kicker { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.05; font-weight: 900; letter-spacing: -0.02em; color: var(--text); text-shadow: 0 0 40px color-mix(in srgb, var(--a1) 35%, transparent); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; background: rgba(0, 0, 0, 0.25); font-size: 12px; font-weight: 700; }
.surf { display: flex; gap: 2px; width: min(420px, 100%); height: 16px; margin-top: 10px; border-radius: 99px; overflow: hidden; }
.surf span { display: grid; place-items: center; min-width: 6px; font-size: 10.5px; font-weight: 800; color: #0a0a0f; }
.s-tarmac { background: linear-gradient(90deg, #5b8fd6, #8a7fd1); }
.s-gravel { background: linear-gradient(90deg, #d9803f, #d9b45a); }
.s-snow { background: linear-gradient(90deg, #6fb8d4, #d4e8f0); }
.hero-main, .hero-stats { position: relative; z-index: 1; }
.hero-stats { display: flex; gap: 22px; }
.hero-stats b { display: block; font-size: 1.25rem; line-height: 1.1; }
.hero-stats small { color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; font-weight: 800; }

/* ---- Contexte ---- */
.ctx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); backdrop-filter: blur(10px); }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 2px 4px 2px 12px; border: 1px solid var(--line); border-radius: 99px; background: rgba(0, 0, 0, 0.25); transition: border-color 0.2s; }
.chip:hover, .chip:focus-within { border-color: var(--a1); }
.chip span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.chip select { max-width: 200px; padding: 4px; border: 0; background: none; color: var(--text); font-weight: 700; }
.chip select option, .chip select optgroup { background: #12151d; color: var(--text); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 99px; background: rgba(0, 0, 0, 0.25); }
.seg button { padding: 4px 12px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-weight: 700; }
.seg button.on { background: var(--grad); color: #0a0a0f; }

/* ---- Podium ---- */
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 14px; align-items: end; }
.pod { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); color: inherit; text-align: center; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; animation: rise 0.6s both; }
.pod:hover { transform: translateY(-4px); }
.pod::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, var(--tint), transparent 65%); opacity: 0.16; pointer-events: none; }
.pod.p1 { --tint: var(--gold); padding-top: 18px; border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 14px 40px -24px var(--gold); animation-delay: 0.05s; }
.pod.p2 { --tint: var(--silver); animation-delay: 0.15s; }
.pod.p3 { --tint: var(--bronze); animation-delay: 0.25s; }
.pod.p1::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.07) 50%, transparent 65%); transform: translateX(-100%); animation: shine 4s ease-in-out infinite 1s; pointer-events: none; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.pod.mine { outline: 2px solid var(--a1); }
.medal { font-size: 1.2rem; }
.ring { padding: 3px; border-radius: 50%; background: conic-gradient(var(--tint), transparent 40%, var(--tint)); }
.pod .av { width: 40px; height: 40px; font-size: 13px; border: 2px solid var(--bg); }
.pname { margin-top: 2px; font-size: 0.95rem; }
.ptime { font-size: 1.05rem; font-weight: 800; }
.p1 .ptime { font-size: 1.3rem; color: var(--gold); }
.pgap { color: var(--muted); font-size: 12px; }
.pcar { color: var(--muted); }

/* ---- Cartes ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.kpi { position: relative; padding: 10px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); overflow: hidden; animation: rise 0.6s both; }
.kpi:nth-child(2) { animation-delay: 0.08s; } .kpi:nth-child(3) { animation-delay: 0.16s; } .kpi:nth-child(4) { animation-delay: 0.24s; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.kpi small { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.kpi strong { display: block; margin-top: 2px; font-size: 1.1rem; }
.kpi em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--ok); }
.kpi em.bad { color: var(--bad); }
.kpi.cta { display: grid; gap: 8px; align-content: center; }
#page[data-shown] .hero, #page[data-shown] .kpi, #page[data-shown] .rundetail { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---- Tableau et detail ---- */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--glass); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: 8px 12px; text-align: left; background: rgba(0, 0, 0, 0.3); color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
td { white-space: nowrap; padding: 6px 12px; border-top: 1px solid var(--line); }
tbody tr { cursor: pointer; transition: background 0.15s, box-shadow 0.15s; }
tbody tr:hover, tbody tr.sel { background: linear-gradient(90deg, color-mix(in srgb, var(--a1) 9%, transparent), transparent); box-shadow: inset 3px 0 0 var(--a1); }
tr.me-row { background: linear-gradient(90deg, color-mix(in srgb, var(--a2) 12%, transparent), transparent); box-shadow: inset 3px 0 0 var(--a2); }
.pos { width: 48px; font-weight: 900; color: var(--muted); }
.p1 { color: var(--gold); }
.who { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.who .av { width: 22px; height: 22px; font-size: 9px; }
.pace { display: block; width: 70px; height: 3px; margin-top: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--a1), var(--a2)) 0 0 / var(--w) 100% no-repeat, var(--glass2); }
.you-sticky { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--a2) 25%, transparent), transparent); }
.more { margin: 0; padding: 10px 14px; color: var(--muted); font-size: 12px; }
.detail { position: sticky; top: 60px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); backdrop-filter: blur(14px); }
.detail.empty { color: var(--muted); }
.detail .close { display: none; position: absolute; top: 10px; right: 12px; border: 0; background: none; color: var(--muted); font-size: 16px; }
.detail h3 { font-size: 1.15rem; }
.big { font-size: 1.5rem; font-weight: 800; }
.secs { display: grid; gap: 8px; margin: 14px 0; }
.sec { display: grid; grid-template-columns: 26px minmax(0, 1fr) 56px; gap: 8px; align-items: center; }
.bar { height: 6px; border-radius: 8px; background: var(--glass2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #0fb58a, var(--ok)); }
.bar i.bad { background: linear-gradient(90deg, #ff8a3d, var(--bad)); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.notes { padding: 8px 12px; border-left: 3px solid var(--a1); border-radius: 0 10px 10px 0; background: var(--glass); color: var(--muted); }
.links { display: flex; gap: 8px; margin: 12px 0 0; }
.empty-state { padding: 48px 16px; text-align: center; border: 1px dashed var(--line); border-radius: 20px; }

/* ---- Selecteur de speciale et barre de filtres ---- */
.ctxwrap { display: grid; gap: 8px; }
.stagebtn { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px 6px 16px; border: 1px solid color-mix(in srgb, var(--a1) 55%, transparent); border-radius: 99px; background: color-mix(in srgb, var(--a1) 14%, transparent); transition: background 0.2s, transform 0.15s; }
.stagebtn:hover { background: color-mix(in srgb, var(--a1) 24%, transparent); transform: translateY(-1px); }
.stagebtn > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.stagebtn b { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchchip { padding-right: 14px; }
.csearch { width: 150px; border: 0; background: none; outline: 0; }
.morebtn { padding: 6px 10px; border: 0; background: none; color: var(--muted); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.morebtn:hover { color: var(--text); }
.ctx.more { border-style: dashed; }
.tagc { margin-left: 8px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10.5px; }
.rankbody { display: grid; gap: 16px; }
dialog.picker { width: min(1100px, 94vw); max-height: 88vh; padding: 20px; overflow-y: auto; }
.picker .phead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.picker .pbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.picker .pbar input { flex: 1; min-width: 220px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 99px; background: rgba(0, 0, 0, 0.3); }
.picker .rhead { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.srow.cur { background: color-mix(in srgb, var(--a1) 18%, transparent); box-shadow: inset 3px 0 0 var(--a1); }
.picker .icon { font-size: 18px; }

/* ---- Terrains (grille du selecteur) ---- */
.resume { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--a1) 12%, transparent), transparent), var(--glass); }
.resume p { margin: 2px 0 0; }
.rtitle { display: block; font-size: 1.05rem; }
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.rcard { position: relative; padding: 18px 18px 12px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(160deg, color-mix(in srgb, var(--a1) 13%, transparent), transparent 45%), var(--glass); overflow: hidden; animation: rise 0.6s both; }
.rcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--a1), var(--a2)); }
.rcard header { display: grid; gap: 10px; margin-bottom: 8px; }
.rcard h2 { font-size: 1.4rem; font-weight: 800; }
.surf.small { height: 8px; margin-top: 0; }
.gtitle { display: block; margin: 10px 0 2px; color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 34px; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: none; color: inherit; text-align: left; transition: background 0.15s, transform 0.15s; }
.srow:hover, .srow:focus-visible { background: color-mix(in srgb, var(--a1) 14%, transparent); transform: translateX(3px); }
.sname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.srec { font-size: 13px; }
.spil { font-size: 12px; min-width: 70px; text-align: right; }
.srank { text-align: center; font-size: 12px; font-weight: 800; color: var(--text); padding: 1px 0; border-radius: 99px; background: var(--glass2); }
.srank.top { background: var(--gold); color: #1a1405; }
.srank.none { background: none; }

/* ---- Formulaire d'ajout ---- */
.hero.slim { padding: 14px 20px; }
.hero.slim h1 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.formcard { padding: 22px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 820px; }
.field { display: grid; gap: 6px; align-content: start; }
.field.wide { grid-column: 1 / -1; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.field input, .field select { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.3); }
.field select option, .field select optgroup { background: #12151d; color: var(--text); }
.field input:focus, .field select:focus { border-color: var(--a2); outline: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 15%, transparent); }
.field input.time { font-size: 1.7rem; text-align: center; letter-spacing: 0.05em; padding: 10px; }
.field.row { display: flex; flex-wrap: wrap; gap: 10px; }
.hint { color: var(--muted); font-size: 13px; min-height: 1.2em; }
.hint.good { color: var(--ok); }
.hint.warn { color: var(--bad); }
.drop { display: grid; gap: 4px; justify-items: center; padding: 22px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.drop:hover, .drop.over { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 8%, transparent); }
.preview { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.preview:empty { display: none; }
.preview img { max-height: 120px; border-radius: 10px; border: 1px solid var(--line); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---- Mes chronos ---- */
.chart { padding: 16px 18px; }
.chart-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; margin-bottom: 12px; }
.axis { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: end; }
.axis > span { font-size: 11px; padding-bottom: 2px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.rb { position: relative; flex: 1; min-width: 6px; padding: 0; border: 0; border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--a1), color-mix(in srgb, var(--a1) 30%, transparent)); opacity: 0.7; transition: opacity 0.15s, transform 0.15s; }
.rb:hover, .rb:focus-visible, .rb.on { opacity: 1; transform: scaleY(1.04); transform-origin: bottom; }
.rb.pb { background: linear-gradient(var(--gold), color-mix(in srgb, var(--gold) 30%, transparent)); opacity: 0.95; }
.rb.on { outline: 2px solid var(--text); outline-offset: 2px; }
.rb:hover::after, .rb:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 10; padding: 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(16, 19, 28, 0.97); color: var(--text); font-size: 12px; white-space: nowrap; pointer-events: none; }
.rundetail { padding: 14px 16px; animation: rise 0.35s both; }
.rd-head { display: flex; justify-content: space-between; gap: 12px; }
.pbtag { color: var(--gold); font-weight: 700; }
.rundetail .secs { max-width: 440px; }
.rundetail .facts { max-width: 440px; }
.bar2 { height: 6px; border-radius: 8px; background: var(--glass2); overflow: hidden; }
.bar2 i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #0fb58a, var(--ok)); }
.bar2 i.bad { background: linear-gradient(90deg, #ff8a3d, var(--bad)); }
tbody tr.sel td:first-child { font-weight: 800; }
.dot { color: var(--gold); }
.scroll { overflow-x: auto; }
.pbcell { color: var(--gold); font-weight: 800; }
.bestsec { color: var(--ok); }
.icon { border: 0; background: none; opacity: 0.5; font-size: 15px; }
.icon:hover { opacity: 1; }

/* ---- Messages ---- */
.toast { position: fixed; right: 20px; bottom: 24px; z-index: 100; padding: 12px 18px; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 14px; background: rgba(16, 19, 28, 0.96); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); animation: rise 0.35s both; transition: opacity 0.5s; }
.toast.bad { border-left-color: var(--bad); }
.toast.out { opacity: 0; }

/* ---- Connexion ---- */
/* Pas de backdrop-filter sur dialog : il en ferait le repere des elements en position fixe, et les listes deroulantes (dropdown.js) s'ouvriraient decalees et coupees. */
dialog { width: min(380px, 92vw); padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: rgba(16, 19, 28, 0.92); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
dialog::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); }
dialog form { display: grid; gap: 12px; }
dialog label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
dialog input, dialog select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.3); }
dialog .row { display: flex; gap: 8px; }
.err { min-height: 1em; margin: 0; color: var(--bad); }

/* ---- Etroit : barre du bas, detail en feuille ---- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .detail.open { position: fixed; inset: auto 0 0 0; z-index: 60; max-height: 72vh; overflow-y: auto; border-radius: 26px 26px 0 0; background: rgba(14, 17, 25, 0.96); box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6); }
  .detail .close { display: block; }
  .detail.empty { display: none; }
}
@media (max-width: 760px) {
  body { padding-bottom: 70px; }
  .main { margin-left: 0; }
  .side { inset: auto 0 0 0; width: auto; flex-direction: row; gap: 0; padding: 6px; overflow-x: auto; border-right: 0; border-top: 1px solid var(--line); }
  .side .brand, .side .account, .side .back, .grp small { display: none; }
  .side nav { display: flex; gap: 2px; }
  .grp { display: contents; }
  .nav { flex: none; flex-direction: column; gap: 2px; padding: 6px 12px; font-size: 11px; white-space: nowrap; }
  .nav.on { box-shadow: inset 0 -3px 0 var(--a1); background: none; }
  .nav .old { display: none; }
  .top { padding: 10px 12px; }
  .search kbd { display: none; }
  .page { padding: 14px 12px; }
  .hero { padding: 20px 18px; border-radius: 20px; }
  .hero-stats { gap: 18px; }
  .podium { gap: 8px; }
  .pod { padding: 14px 6px; border-radius: 16px; }
  .pod .av { width: 40px; height: 40px; }
  .ptime { font-size: 1rem; }
  .p1 .ptime { font-size: 1.15rem; }
  .pcar { display: none; }
  .hide-s { display: none; }
  .regions { grid-template-columns: 1fr; }
  .spil { display: none; }
  .srow { grid-template-columns: minmax(0, 1fr) auto 34px; }
  .btn.primary { padding: 8px 12px; }
  .form { grid-template-columns: 1fr; }
  .toast { right: 12px; left: 12px; bottom: 78px; }
}

/* Selecteur : les noms de speciales passent a la ligne au lieu d'etre coupes. */
.picker .sname { white-space: normal; overflow: visible; }
.picker .spil { min-width: 0; }
.picker .regions { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }

/* ---- Accueil des classements : cartes de speciales ---- */
.rsections { display: grid; gap: 14px; }
.rsec { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--a1) 11%, transparent), transparent 40%), var(--glass); overflow: hidden; }
.rsec::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--a1), var(--a2)); }
.rsec-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: end; margin-bottom: 6px; }
.rsec-head h2 { font-size: 1.2rem; font-weight: 800; }
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 6px; }
.scard { display: grid; gap: 7px; align-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0, 0, 0, 0.22); color: inherit; text-align: left; transition: transform 0.18s, border-color 0.18s, background 0.18s; }
.scard:hover, .scard:focus-visible { transform: translateY(-3px); border-color: var(--a1); background: color-mix(in srgb, var(--a1) 10%, transparent); }
.scard.mine { border-color: color-mix(in srgb, var(--a2) 60%, transparent); }
.shead { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.shead b { font-size: 1rem; }
.stop { display: grid; gap: 3px; }
.sline { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 12.5px; }
.sline i { font-style: normal; }
.sdrv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.sline .num { font-size: 12px; }
.sempty { font-size: 12.5px; padding: 8px 0; }
.sfoot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.sfoot .srank { margin-left: auto; padding: 1px 9px; }
.hot { color: var(--a2); font-weight: 700; }
.togglebtn { padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(0, 0, 0, 0.25); color: var(--muted); font-weight: 700; }
.togglebtn.on { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 18%, transparent); color: var(--text); }
.csearch.wide { width: 260px; }
.resume { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 16px 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(90deg, color-mix(in srgb, var(--a1) 12%, transparent), transparent), var(--glass); }
.resume p { margin: 2px 0 0; }
.rtitle { display: block; font-size: 1.25rem; }
.crumbs { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 14px; width: 100%; }
.crumbs a { color: var(--text); font-weight: 700; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .btn { padding: 5px 12px; font-size: 12px; }
.arrow { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--glass); font-size: 18px; line-height: 1; }
.arrow:hover:not(:disabled) { background: var(--glass2); }
.arrow:disabled { opacity: 0.3; cursor: default; }
@media (max-width: 760px) { .csearch.wide { width: 100%; } .scards { grid-template-columns: 1fr; } .rsec { padding: 14px; } }

/* ---- Densite : un seul affichage, compact ---- */
body { zoom: 0.9; }

/* ---- Defis ---- */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --ang: 360deg; } }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.75); } }
.esec { display: grid; gap: 10px; }
.esec-title { font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.nbadge { margin-left: auto; padding: 0 7px; border-radius: 99px; background: var(--grad); color: #0a0a0f; font-size: 10.5px; font-weight: 800; }
.live { position: relative; padding: 2px; border-radius: 22px; background: conic-gradient(from var(--ang), var(--a1), var(--a2), transparent 38%, var(--a1)); animation: spin 7s linear infinite, rise 0.6s both; }
.live .inner { display: grid; gap: 12px; padding: 18px 20px; border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--a1) 12%, #0d1017), #0b0d13 60%); }
.lhead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.livebadge { display: inline-flex; gap: 7px; align-items: center; font-size: 11px; font-weight: 900; letter-spacing: 0.14em; color: var(--a2); }
.livebadge i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 10px var(--bad); animation: pulse 1.4s ease-in-out infinite; }
.live h2 { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.01em; }
.ldesc { margin: 0; max-width: 70ch; }
.lrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: end; }
.lleft { display: grid; gap: 8px; }
.lright { display: grid; gap: 6px; }
.cd.big { display: flex; gap: 8px; }
.cdbox { display: grid; justify-items: center; min-width: 58px; padding: 6px 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.35); }
.cdbox b { font-size: 1.6rem; line-height: 1.1; }
.cdbox small { color: var(--muted); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.prog { height: 5px; border-radius: 5px; background: var(--glass2); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 5px; transition: width 1s linear; }
.lfoot { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding-top: 4px; border-top: 1px solid var(--line); }
.myrow { display: inline-flex; gap: 8px; align-items: center; }
.myrow .bad { color: var(--bad); }
.sline.me { color: var(--text); }
.sline.me .sdrv { color: var(--a2); font-weight: 700; }
.ecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ecard { position: relative; display: grid; gap: 6px; align-content: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); color: inherit; text-decoration: none; transition: transform 0.18s, border-color 0.18s, background 0.18s; }
.ecard:hover, .ecard:focus-visible { transform: translateY(-3px); border-color: var(--a1); background: color-mix(in srgb, var(--a1) 9%, transparent); }
.ecard.played { border-color: color-mix(in srgb, var(--a2) 45%, transparent); }
.etag { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--a2); }
.etag.done { color: var(--muted); }
.efoot { font-size: 12px; }
.ecr { justify-self: start; padding: 1px 9px; }
.livehero { border-color: color-mix(in srgb, var(--a1) 55%, transparent); }
.livehero .kicker { color: var(--a2); }
.hero-stats .cdbox b { font-size: 1.3rem; }
.sectchips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 4px 6px; }
.sectchip { display: grid; justify-items: center; min-width: 74px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.sectchip small { color: var(--muted); font-size: 10px; }
.sectchip em { font-style: normal; font-size: 11px; }
.sectchip.slow em { color: var(--bad); }
.sectchip.fast em { color: var(--ok); }
.subrow td { padding: 2px 12px 8px; border-top: 0; background: color-mix(in srgb, var(--a1) 6%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) { .lrow { grid-template-columns: 1fr; } .live h2 { font-size: 1.25rem; } .cdbox { min-width: 50px; } .cdbox b { font-size: 1.3rem; } }

/* ---- Barres de secteurs : couleur = gravite, longueur = ampleur de l'ecart ---- */
.bar i.t-ref { background: linear-gradient(90deg, var(--a1), var(--a2)); }
.bar i.t-fast { background: linear-gradient(90deg, #0fb58a, var(--ok)); }
.bar i.t-ok { background: linear-gradient(90deg, #5fbf8c, #9ad9b2); }
.bar i.t-mid { background: linear-gradient(90deg, #d99a3f, #e8b95e); }
.bar i.t-slow { background: linear-gradient(90deg, #ff8a3d, var(--bad)); }
.detail .secs, .rundetail .secs { max-width: 440px; }
.setupmark { margin-left: 6px; font-size: 11px; opacity: 0.8; }

/* ---- Setup ---- */
dialog.setupdlg { width: min(980px, 94vw); }
.setuptabs { flex-wrap: wrap; margin-bottom: 12px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.sgp { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); }
.sgp h3 { margin-bottom: 8px; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--a2); }
.sgrow { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-top: 1px solid var(--line); }
.sgrow:first-of-type { border-top: 0; }
.sgrow b small { color: var(--muted); font-weight: 600; }
.sfooter { margin: 12px 0 0; font-size: 12px; }

/* ---- Pastille SETUP : bien visible, cliquable ---- */
.setuppill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border: 1px solid color-mix(in srgb, var(--a2) 70%, transparent); border-radius: 99px; background: linear-gradient(120deg, color-mix(in srgb, var(--a1) 32%, transparent), color-mix(in srgb, var(--a2) 32%, transparent)); color: var(--text); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; white-space: nowrap; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.setuppill:hover, .setuppill:focus-visible { transform: translateY(-1px); box-shadow: 0 6px 16px -8px var(--a2); }
.who .setuppill { margin-left: 8px; }
.pod .setuppill { margin-top: 4px; }
.togglebtn { padding: 5px 12px; font-size: 12px; }

/* ---- Bouton Setup : sobre, avec une icone vectorielle ---- */
.ico { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.setuppill { gap: 5px; padding: 3px 9px; border: 1px solid color-mix(in srgb, var(--a2) 55%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--a2) 12%, transparent); color: var(--a2); font-size: 10.5px; letter-spacing: 0.1em; }
.setuppill:hover, .setuppill:focus-visible { background: var(--a2); color: #0a0a0f; box-shadow: none; transform: none; }
.links .btn .ico, .togglebtn .ico { margin-right: 5px; vertical-align: -0.12em; }

/* ---- Feuille de detail : elle ne cache plus la fin de la liste ---- */
tbody tr { scroll-margin: 80px 0 56vh; }
@media (max-width: 1100px) {
  .detail.open { max-height: 50vh; }
  body.sheet-open .page { padding-bottom: 54vh; }
}

/* ---- Indicateurs discrets (setup, capture) dans les tableaux ---- */
.marks { display: inline-flex; gap: 5px; vertical-align: middle; }
.mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--a2) 14%, transparent); color: var(--a2); }
.mark.cam { background: var(--glass2); color: var(--muted); }
.mark .ico { width: 13px; height: 13px; }
.who .mark { margin-left: 8px; }

/* ---- Photos d'ambiance : fondu vers le contenu, jamais derriere le texte important ---- */
.bgphoto { position: relative; isolation: isolate; }
.bgphoto::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--photo, none) var(--pos, 50% 50%) / cover no-repeat; opacity: 0.6; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); pointer-events: none; }
.bgphoto::after { z-index: -1; }
.hero.bgphoto::before { opacity: 0.55; }
.rsec-head.bgphoto { margin: -14px -14px 8px; padding: 18px 16px; min-height: 110px; align-content: end; border-radius: 18px 18px 0 0; overflow: hidden; }
.rsec-head.bgphoto::before { opacity: 0.6; }
.live .inner.bgphoto::before { opacity: 0.32; }
.ephoto { display: block; height: 70px; margin: -12px -14px 4px; border-radius: 14px 14px 0 0; background: linear-gradient(transparent 35%, rgba(8, 10, 14, 0.85)), var(--photo, none) var(--pos, 50% 50%) / cover no-repeat; }
.linkbtn { border: 0; background: none; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.credits { padding-left: 18px; line-height: 1.7; }
.credits a { color: var(--a2); }

/* ---- Piste de course ---- */
.track { position: relative; height: 138px; margin-top: 6px; }
.road { position: absolute; inset: 14px 0 22px 0; border-radius: 14px; background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.06) 18px 20px), linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)); border: 1px solid var(--line); }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed rgba(255, 255, 255, 0.1); }
.finish { position: absolute; right: -2px; top: -4px; font-size: 20px; z-index: 2; }
.car { position: absolute; z-index: 1; display: grid; justify-items: center; gap: 2px; transform: translateX(-50%); transition: left 1.1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.car.lane0 { top: 6px; } .car.lane1 { top: 46px; } .car.lane2 { top: 86px; }
.cdot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #2c3440, #1a1f29); border: 2px solid var(--line); font-size: 11px; font-weight: 800; }
.car.lead .cdot { border-color: var(--gold); box-shadow: 0 0 14px color-mix(in srgb, var(--gold) 55%, transparent); }
.car.me .cdot { border-color: var(--a1); background: var(--grad); color: #0a0a0f; box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 22%, transparent); animation: pulse 2s ease-in-out infinite; }
.clabel { font-size: 10px; color: var(--muted); white-space: nowrap; }
.car.me .clabel, .car.lead .clabel { color: var(--text); }
.ltrack { display: grid; gap: 2px; }
.goal { display: grid; gap: 2px; align-content: end; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, 0.28); }
.goal b { font-size: 1.5rem; line-height: 1.1; }
.detailtop { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; align-items: stretch; }
.trackcard { padding: 12px 16px; }

/* ---- Palmares et frise ---- */
.twocol { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ecards.one { grid-template-columns: 1fr; }
.hallcard { padding: 8px 14px; }
.hrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 90px auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.hrow:first-child { border-top: 0; }
.hrow.me .hname { color: var(--a2); font-weight: 800; }
.hname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar { height: 5px; border-radius: 5px; background: var(--glass2); overflow: hidden; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 40%, transparent)); border-radius: 5px; }
.frise { padding: 14px 16px 10px; }
.frise-line { position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 6px 4px 14px; scrollbar-width: thin; }
.frise-line::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: var(--line); }
.fnode { position: relative; display: grid; justify-items: center; gap: 4px; min-width: 38px; color: var(--muted); text-decoration: none; }
.fnode i { width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); z-index: 1; transition: transform 0.15s; }
.fnode small { font-size: 10px; }
.fnode:hover i { transform: scale(1.35); }
.fnode.win i, .fdot.win { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 60%, transparent); }
.fnode.podium i, .fdot.podium { background: var(--silver); border-color: var(--silver); }
.fnode.played i, .fdot.played { background: var(--a1); border-color: var(--a1); }
.fnode.skipped i, .fdot.skipped { background: var(--bg); border-color: var(--muted); opacity: 0.6; }
.fnode.live i, .fdot.live { background: var(--bad); border-color: var(--bad); animation: pulse 1.4s ease-in-out infinite; }
.fnode.soon i, .fdot.soon { background: var(--bg); border: 2px dashed var(--a2); }
.flegend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.fdot { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; border: 2px solid var(--line); vertical-align: -1px; }
@media (max-width: 900px) { .twocol, .detailtop { grid-template-columns: 1fr; } .track { height: 130px; } }
.fnode.live i, .fdot.live { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 10px color-mix(in srgb, var(--ok) 70%, transparent); }

/* ---- Mobile : rien ne depasse de l'ecran ---- */
@media (max-width: 760px) {
  td { padding: 6px 8px; }
  th { padding: 6px 8px; }
  .who .av { display: none; }
  .pace { display: none; }
  .pos { width: 28px; }
  .card { overflow-x: auto; }
  .hero-stats { flex-wrap: wrap; gap: 14px; width: 100%; }
  .hero-stats .cd.big { gap: 5px; }
  .cdbox { min-width: 46px; padding: 4px 6px 3px; }
  .cdbox b { font-size: 1.15rem; }
  .axis { grid-template-columns: 1fr; }
  .axis > span { display: none; }
  .bars { gap: 2px; }
  .rb { min-width: 3px; }
  .live .inner { padding: 14px; }
  .lrow { gap: 12px; }
  .goal b { font-size: 1.25rem; }
  .track { height: 124px; }
  .cdot { width: 26px; height: 26px; font-size: 10px; }
  .car.lane1 { top: 42px; } .car.lane2 { top: 78px; }
}

/* ---- Duel ---- */
.good { color: var(--ok); }
.bad { color: var(--bad); }
.dpick { display: grid; gap: 10px; }
.dpick-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.rchip { display: inline-flex; gap: 8px; align-items: center; padding: 4px 12px 4px 5px; border: 1px solid var(--line); border-radius: 99px; background: rgba(0, 0, 0, 0.25); color: inherit; transition: border-color 0.15s, transform 0.15s; }
.rchip:hover, .rchip:focus-visible { border-color: var(--a1); transform: translateY(-1px); }
.rchip.on { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 16%, transparent); }
.rchip .av { width: 22px; height: 22px; font-size: 9px; }
.duelhero { display: grid; grid-template-columns: 1fr minmax(220px, 1.1fr) 1fr; gap: 16px; align-items: center; padding: 18px 20px; }
.dface { display: grid; justify-items: center; gap: 8px; text-align: center; }
.dring { padding: 3px; border-radius: 50%; background: conic-gradient(var(--c), transparent 45%, var(--c)); }
.dface.me { --c: var(--a2); }
.dface.rival { --c: var(--a1); }
.dring .av { width: 62px; height: 62px; font-size: 18px; border: 2px solid var(--bg); }
.dscore { display: grid; justify-items: center; gap: 6px; text-align: center; }
.dnum { display: flex; gap: 14px; align-items: baseline; font-size: 2.6rem; font-weight: 900; line-height: 1; }
.dnum span { color: var(--muted); font-size: 1.6rem; }
.dtug { display: flex; width: 100%; height: 8px; border-radius: 8px; overflow: hidden; background: var(--glass2); }
.dtug i { display: block; height: 100%; background: linear-gradient(90deg, #0fb58a, var(--ok)); }
.dtug i.lose { margin-left: auto; background: linear-gradient(90deg, var(--bad), #ff8a3d); }
.dverdict { font-size: 12px; font-weight: 700; }
.duelrows { display: grid; gap: 6px; }
.duelrow { border: 1px solid var(--line); border-radius: 14px; background: var(--glass); overflow: hidden; }
.duelrow.open { border-color: color-mix(in srgb, var(--a1) 50%, transparent); }
.dhead { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(170px, 1fr) minmax(140px, 1.2fr) 90px; gap: 12px; align-items: center; width: 100%; padding: 9px 14px; border: 0; background: none; color: inherit; text-align: left; }
.dhead:hover { background: color-mix(in srgb, var(--a1) 7%, transparent); }
.dstage { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtimes { font-size: 12.5px; white-space: nowrap; }
.dgap { text-align: right; font-weight: 800; white-space: nowrap; }
.diverge { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 8px; border-radius: 8px; background: var(--glass2); overflow: hidden; }
.diverge::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--bg); }
.dl, .dr { display: flex; height: 100%; }
.dl { justify-content: flex-end; }
.diverge i { display: block; height: 100%; }
.diverge i.win { background: linear-gradient(270deg, #0fb58a, var(--ok)); border-radius: 8px 0 0 8px; }
.diverge i.lose { background: linear-gradient(90deg, #ff8a3d, var(--bad)); border-radius: 0 8px 8px 0; }
.ddetail { display: grid; gap: 12px; padding: 4px 14px 14px; }
.druns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drun { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.drun b { font-size: 1.3rem; }
.dsecs { display: grid; gap: 4px; }
.dsec { display: grid; grid-template-columns: 30px 70px minmax(100px, 1fr) 70px 64px; gap: 10px; align-items: center; font-size: 12.5px; }
.dsec.head { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.dsec .num:last-child { text-align: right; font-weight: 700; }
.dpotential { margin: 0; padding: 9px 12px; border-left: 3px solid var(--a2); border-radius: 0 10px 10px 0; background: var(--glass); color: var(--muted); }
@media (max-width: 900px) { .duelhero { grid-template-columns: 1fr; } .dhead { grid-template-columns: 1fr auto; } .dhead .diverge { grid-column: 1 / -1; grid-row: 2; } .dtimes { display: none; } .dsec { grid-template-columns: 26px 54px minmax(60px, 1fr) 54px 52px; gap: 6px; } .druns { grid-template-columns: 1fr; } }

/* ---- Defis : onglets, origine, creation et gestion ---- */
.pill.site { border-color: color-mix(in srgb, var(--a2) 60%, transparent); background: color-mix(in srgb, var(--a2) 14%, transparent); color: var(--a2); font-weight: 700; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.badges .pill { display: inline-flex; gap: 4px; align-items: center; }
.etabs { flex-wrap: wrap; }
.etabs .tcount { margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--glass2); font-size: 10.5px; }
.etabs button.on .tcount { background: rgba(0, 0, 0, 0.25); }
.esec-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.hint-card { padding: 16px 18px; }
.hint-card p { margin: 4px 0 0; }
.ejoin { justify-self: start; }
.manage-pill { justify-self: start; }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 55%, transparent); color: var(--bad); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.managecard { display: grid; gap: 0; }
.mrow { display: grid; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: 0; }
.mrow p { margin: 0; }
.mrow.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.invite { display: flex; flex-wrap: wrap; gap: 8px; }
.invite input { flex: 1 1 280px; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: var(--text); font-size: 12px; }
.people { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.person { display: flex; gap: 10px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person > span { flex: 1; }
.person.removed { opacity: 0.55; }
dialog.eform { width: min(760px, 94vw); }
.eform .form { max-width: none; }
.eform textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.3); color: var(--text); font: inherit; resize: vertical; }
.accesses { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.access { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.22); cursor: pointer; }
.access.on { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 12%, transparent); }
.access input { position: absolute; opacity: 0; pointer-events: none; }
.notice { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--a2); border-radius: 0 10px 10px 0; background: var(--glass); }
details.webhook { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
details.webhook summary { cursor: pointer; font-weight: 700; }
details.webhook .field { margin: 8px 0; }
.checks { display: grid; gap: 6px; margin-top: 8px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 13px; font-weight: 500; }
.eform .row { margin-top: 14px; }
@media (max-width: 760px) { .accesses { grid-template-columns: 1fr; } }

/* ---- Termines : liste legere, une ligne par defi, groupee par mois ---- */
.drows { display: grid; gap: 4px; }
.dmonth { margin: 14px 0 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.dmonth:first-child { margin-top: 4px; }
.dbody { display: grid; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); overflow: hidden; }
.drow { display: grid; grid-template-columns: 54px minmax(0, 1.6fr) minmax(0, 1.2fr) 44px; gap: 12px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; transition: background 0.15s; }
.drow:first-child { border-top: 0; }
.drow:hover, .drow:focus-visible { background: color-mix(in srgb, var(--a1) 9%, transparent); }
.drow.played { box-shadow: inset 3px 0 0 var(--a2); }
.dtitle { display: grid; gap: 1px; min-width: 0; }
.dtitle b, .dtitle small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dwin { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 12.5px; }
.dwin i { font-style: normal; }
.drow .srank { justify-self: end; }
@media (max-width: 760px) { .drow { grid-template-columns: 46px minmax(0, 1fr) 40px; } .dwin { display: none; } }

.hallbox { border: 1px solid var(--line); border-radius: 14px; background: var(--glass); padding: 8px 14px; }
.hallbox summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.hallbox .esec-title { display: none; }
.hallbox .hallcard { border: 0; background: none; padding: 4px 0; }
.dwin span.num { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- Piste : ma voiture ressort, une legende explique les reperes ---- */
.car.me { z-index: 3; }
.car.me .cdot { width: 40px; height: 40px; font-size: 11px; font-weight: 900; letter-spacing: 0.04em; border-width: 3px; border-color: var(--a2); }
.car.me .clabel { padding: 1px 8px; border-radius: 99px; background: var(--grad); color: #0a0a0f; font-weight: 800; }
.trackwrap { display: grid; gap: 4px; }
.tlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 11px; color: var(--muted); }
.tlegend span { display: inline-flex; gap: 6px; align-items: center; }
.lg { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 50%; border: 2px solid var(--line); background: linear-gradient(135deg, #2c3440, #1a1f29); font-style: normal; font-size: 10px; font-weight: 800; color: var(--text); }
.lg.me { border-color: var(--a2); background: var(--grad); color: #0a0a0f; border-radius: 99px; }
.car.lane0 { top: 4px; } .car.lane1 { top: 46px; } .car.lane2 { top: 88px; }

.car.ghost { transition: none; opacity: 0.9; }
.car.ghost .cdot { width: 40px; height: 40px; background: rgba(0, 0, 0, 0.35); border: 2px dashed var(--a2); color: var(--a2); font-size: 11px; font-weight: 900; box-shadow: none; animation: none; }
.car.ghost .clabel { padding: 1px 8px; border-radius: 99px; background: rgba(0, 0, 0, 0.45); border: 1px dashed var(--a2); color: var(--a2); font-weight: 700; }

/* ---- Page d'un pilote ---- */
.pilot-id { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.pring { display: inline-block; padding: 3px; border-radius: 50%; background: conic-gradient(var(--a2), transparent 45%, var(--a1)); }
.pring .av { width: 54px; height: 54px; font-size: 16px; border: 2px solid var(--bg); overflow: hidden; }
.pring.big .av { width: 84px; height: 84px; font-size: 26px; }
.av img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pactions { flex-wrap: wrap; gap: 8px; align-items: center; }
.pill.gold { border-color: color-mix(in srgb, var(--gold) 60%, transparent); color: var(--gold); }
.pgrid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pcol { display: grid; gap: 14px; }
.plist { display: grid; }
.pline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 9px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; text-align: left; text-decoration: none; transition: background 0.15s; }
.pline:first-child { border-top: 0; }
.pline:hover, .pline:focus-visible { background: color-mix(in srgb, var(--a1) 9%, transparent); }
.pl-main { display: grid; gap: 1px; min-width: 0; }
.pl-main b, .pl-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pactivity { padding: 14px 16px; }
.pbars { display: flex; align-items: flex-end; gap: 5px; height: 90px; }
.pbars i { flex: 1; min-height: 6px; border-radius: 5px 5px 2px 2px; background: var(--glass2); }
.pbars i.on { background: linear-gradient(var(--a2), color-mix(in srgb, var(--a1) 55%, transparent)); }
.paxis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; }
.pfacts { margin: 0; padding: 12px 16px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 10px; }
.crumbs { margin-bottom: 4px; }
@media (max-width: 900px) { .pgrid { grid-template-columns: 1fr; } }

.dres { display: flex; gap: 10px; align-items: center; justify-content: flex-end; font-size: 12.5px; white-space: nowrap; }

/* ---- Mon compte ---- */
.settings { display: grid; padding: 4px 0; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 24px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.setting:first-child { border-top: 0; }
.stext { display: grid; gap: 2px; }
.stext small { font-size: 12px; }
.scontrol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.scontrol.col { display: grid; justify-items: stretch; gap: 10px; }
.sinput { width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.3); color: var(--text); font: inherit; }
.scontrol .sinput { flex: 1 1 180px; }
.sinput:focus { border-color: var(--a2); outline: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 15%, transparent); }
.sinput option { background: #12151d; color: var(--text); }
.sextra { grid-column: 1 / -1; display: grid; gap: 8px; }
.sstatus { min-height: 1em; font-size: 12px; }
.setting.last { background: rgba(0, 0, 0, 0.18); }
.idrow .idcard { display: flex; gap: 14px; align-items: center; }
.bigname { font-size: 1.3rem; }
.accesses.three { grid-template-columns: repeat(3, 1fr); }
.keys { display: grid; gap: 4px; }
.keyrow { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 7px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.tokenbox { display: grid; gap: 6px; padding: 12px 14px; border: 1px dashed var(--a2); border-radius: 12px; background: color-mix(in srgb, var(--a2) 8%, transparent); }
.tokenbox p { margin: 0; }
.cstep { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); }
.cstep:first-child { border-top: 0; }
.cnum { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #0a0a0f; font-weight: 900; }
.cbody { display: grid; gap: 8px; justify-items: start; }
.cbody .invite, .cbody .keys, .cbody .tokenbox { width: 100%; }
.cbody p { margin: 0; }
.settings > .notice, .settings > .pendingbox { margin: 12px 20px; }
.danger-row { border-top-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.tdot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--muted); }
.tdot.ok { background: var(--ok); }
.tdot.warn { background: var(--gold); }
.accesses.three .access { min-width: 0; }
@media (max-width: 900px) { .setting { grid-template-columns: 1fr; } .scontrol { justify-content: flex-start; } .accesses.three { grid-template-columns: 1fr; } }

/* ---- Activite : calendrier de chaleur ---- */
.astats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; margin-bottom: 14px; }
.astat { display: grid; gap: 1px; }
.astat b { font-size: 1.2rem; }
.astat small { font-size: 11px; }
.heat { display: grid; grid-template-columns: 14px 1fr; gap: 6px; align-items: start; }
.heatdays { display: grid; grid-template-rows: repeat(7, 16px); gap: 3px; font-size: 9px; line-height: 16px; }
.heatgrid { display: grid; grid-template-rows: repeat(7, 16px); grid-auto-flow: column; grid-auto-columns: minmax(10px, 1fr); gap: 3px; }
.hday { display: block; border-radius: 4px; background: var(--glass2); transition: transform 0.12s; }
.hday:hover { transform: scale(1.25); }
.hday.future { background: none; }
.hday.l1 { background: color-mix(in srgb, var(--a2) 28%, var(--glass2)); }
.hday.l2 { background: color-mix(in srgb, var(--a2) 52%, var(--glass2)); }
.hday.l3 { background: color-mix(in srgb, var(--a1) 70%, var(--a2) 20%); }
.hday.l4 { background: var(--a1); box-shadow: 0 0 10px color-mix(in srgb, var(--a1) 55%, transparent); }
.hlegend { display: inline-flex; gap: 3px; align-items: center; }
.hlegend .hday { width: 11px; height: 11px; }
.ahabit { margin: 8px 0 0; font-size: 12.5px; }

/* ---- Banniere de profil : choix et moderation ---- */
.bannerprev { position: relative; height: 120px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, 0.3); overflow: hidden; }
.bannerprev::before { opacity: 0.85; -webkit-mask-image: none; mask-image: none; }
.bannerlabel { position: absolute; left: 10px; bottom: 8px; padding: 2px 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.6); font-size: 11px; }
.bgallery { display: grid; gap: 10px; }
.bgroup { display: grid; gap: 4px; }
.bthumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.bthumb { width: 92px; height: 54px; padding: 0; border: 2px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: var(--text); overflow: hidden; transition: transform 0.12s, border-color 0.12s; }
.bthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bthumb:hover { transform: translateY(-1px); border-color: var(--a1); }
.bthumb.on { border-color: var(--a2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 25%, transparent); }
.bauto { width: auto; min-width: 92px; height: 34px; padding: 0 14px; font-size: 12px; font-weight: 700; justify-self: start; }
.moderation { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-left-color: var(--bad); }

/* ---- Calendrier d'activite : jours nommes, bulle au survol, detail au clic ---- */
.heat { grid-template-columns: 30px 1fr; }
.heatdays { font-size: 10px; }
.heatwrap { position: relative; }
button.hday { padding: 0; border: 0; cursor: pointer; }
button.hday:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.hday.sel { outline: 2px solid var(--text); outline-offset: 1px; transform: scale(1.15); }
.htip { position: absolute; z-index: 6; transform: translate(-50%, -100%); padding: 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(16, 19, 28, 0.97); color: var(--text); font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45); }
.ahint { margin: 6px 0 0; font-size: 11.5px; }
.heatday { display: grid; gap: 2px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.heatday .pline { padding: 6px 4px; }

/* ---- Defis epures : quoi, quand, ou j'en suis, une action ---- */
.live .inner { gap: 10px; }
.ltitle { color: inherit; text-decoration: none; }
.ltitle:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.lrule { margin: -4px 0 0; }
.ltime { display: grid; gap: 6px; font-size: 14px; }
.ltime b { font-size: 1.05rem; }
.lstatus { font-weight: 700; }
.lmore { text-decoration: none; font-size: 12.5px; }
.lmore:hover { color: var(--text); }
.bigcd { font-size: 1.6rem; display: block; }
.trackcard { padding: 12px 16px; }

/* ---- Cadrage : point focal de chaque photo (le pilote peut le regler pour son image) ---- */
[style*="/alsace.jpg"] { --pos: 50% 45%; }
[style*="/alsace2.jpg"] { --pos: 50% 55%; }
[style*="/alsace3.jpg"] { --pos: 50% 58%; }
[style*="/greece.jpg"] { --pos: 50% 50%; }
[style*="/greece2.jpg"] { --pos: 40% 52%; }
[style*="/greece3.jpg"] { --pos: 65% 42%; }
[style*="/wales.jpg"] { --pos: 78% 40%; }
[style*="/wales2.jpg"] { --pos: 50% 68%; }
[style*="/wales3.jpg"] { --pos: 50% 72%; }
[style*="/wales4.jpg"] { --pos: 50% 55%; }
[style*="/montecarlo.jpg"] { --pos: 35% 72%; }
[style*="/montecarlo2.jpg"] { --pos: 62% 55%; }
[style*="/montecarlo3.jpg"] { --pos: 40% 64%; }
[style*="/livigno.jpg"] { --pos: 70% 62%; }
[style*="/livigno2.jpg"] { --pos: 50% 55%; }
[style*="/livigno3.jpg"] { --pos: 50% 50%; }
.framing { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.framing input[type=range] { flex: 1 1 200px; accent-color: var(--a2); }
.framing > span { font-size: 12px; font-weight: 700; color: var(--muted); }

.rivalbar .rchip a { color: inherit; text-decoration: none; }
.rivalbar .rchip a:hover { text-decoration: underline; }
.dpick-head .icon { margin-left: auto; font-size: 16px; }

/* ---- Championnats ---- */
.featured { border-color: color-mix(in srgb, var(--a2) 45%, transparent); }
.champcard .sline { margin-top: 2px; }
.champcard .btn { justify-self: start; }
.teamdot { display: inline-block; width: 10px; height: 10px; margin-left: 8px; border-radius: 50%; vertical-align: middle; }
.teamdot.big { width: 14px; height: 14px; margin: 0 6px 0 0; }
.dropped { text-decoration: line-through; opacity: 0.45; }
.evocard { padding: 14px 16px; display: grid; gap: 6px; }
.evo { width: 100%; height: auto; max-height: 220px; }
.evolegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.evolegend span { display: inline-flex; gap: 6px; align-items: center; }
.evolegend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.planline { grid-template-columns: minmax(0, 1fr) auto; }
.teamcard { align-content: start; }
.teamcard .etag span { display: inline-flex; align-items: center; }

/* ---- Championnats : refonte joueur ---- */
.crows { display: grid; gap: 8px; }
.crow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.crow:hover { border-color: var(--a1); transform: translateY(-1px); }
.crow.mine { border-left: 3px solid var(--a2); }
.cmain { display: grid; gap: 2px; min-width: 0; }
.cmain b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clead { font-size: 13px; }
.cend { display: flex; justify-content: flex-end; }
.cend .srank { padding: 3px 12px; white-space: nowrap; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seasoncard { align-items: stretch; }
.seasonmain { display: grid; gap: 4px; }
.seasonmain .scontrol { margin-top: 6px; }
.seasonstand { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 0 18px; border-left: 1px solid var(--line); }
.seasonstand b { font-size: 2.4rem; line-height: 1; color: var(--a2); }
.trackcard { padding: 14px 16px; display: grid; gap: 8px; }
.racehead { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.car.ghost { opacity: 0.45; }
.nights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nightcard { padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.nightcard .btn { justify-self: start; }
.avrow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.avrow .av { width: 26px; height: 26px; font-size: 10px; }
.avrow .pill { display: inline-flex; gap: 5px; align-items: center; padding: 2px 10px 2px 3px; }
.hallbox { border: 1px solid var(--line); border-radius: 14px; background: var(--glass); padding: 10px 14px; display: grid; gap: 10px; }
.hallbox summary { cursor: pointer; font-weight: 700; }
.teambars { padding: 14px 16px; display: grid; gap: 14px; }
.tbar { display: grid; gap: 4px; }
.tbar.mine .tbtrack { outline: 1px solid var(--a2); }
.tbhead { display: flex; gap: 8px; align-items: center; }
.tbhead .sp { flex: 1; }
.tbtrack { display: block; height: 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.3); overflow: hidden; }
.tbtrack i { display: block; height: 100%; border-radius: 99px; }
.plist { display: grid; }
.pline { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: center; padding: 10px 16px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.pline:first-child { border-top: 0; }
.pline:hover { background: var(--glass2); }
.pl-main { display: grid; gap: 2px; }
.notice { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.sectchips { display: flex; flex-wrap: wrap; gap: 8px; }
.sectchip { display: grid; gap: 1px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.2); font-size: 12px; }
.sectchip em { font-style: normal; color: var(--muted); }
.bestsec { color: var(--ok); font-weight: 700; }
@media (max-width: 720px) {
  .crow { grid-template-columns: minmax(0, 1fr) auto; }
  .clead { display: none; }
  .nights { grid-template-columns: minmax(0, 1fr); }
  .seasonstand { border-left: 0; padding: 0; justify-items: start; }
}

/* ---- Championnats : classement et manche en lignes ---- */
.srows, .rres { display: grid; }
.srow { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) auto minmax(90px, 0.7fr); gap: 12px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--line); }
.srow:first-child, .rres > :first-child { border-top: 0; }
.srow.me-row, .rrow.me-row { background: color-mix(in srgb, var(--a1) 12%, transparent); }
.wname { display: grid; min-width: 0; }
.wname b, .wname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nights-mini { display: inline-flex; gap: 3px; align-items: end; height: 26px; }
.nm { display: grid; align-items: end; width: 8px; height: 100%; }
.nm i { display: block; width: 100%; border-radius: 2px; background: var(--grad); }
.nm.dropped i { opacity: 0.3; }
.stotal { display: grid; gap: 3px; justify-items: end; }
.stotal .tbtrack { width: 100%; height: 5px; }
.stotal .tbtrack i { background: var(--grad); }
.rrow { display: grid; grid-template-columns: 28px minmax(0, 1.6fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.rrow:hover { background: var(--glass2); }
.rrow.sel { background: color-mix(in srgb, var(--a2) 10%, transparent); }
.rtime { display: grid; justify-items: end; }
.rpts { font-weight: 800; min-width: 38px; text-align: right; }
.rdetail { display: grid; gap: 10px; padding: 12px 16px 14px 56px; background: rgba(0, 0, 0, 0.22); border-top: 1px solid var(--line); }
.rstage { display: grid; gap: 6px; }
.rstage.slow { grid-auto-flow: column; justify-content: space-between; }
.rshead { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.rshead b { flex: 1 1 160px; }
.secbars { display: grid; gap: 4px; max-width: 460px; }
@media (max-width: 720px) {
  .srow { grid-template-columns: 24px minmax(0, 1fr) minmax(70px, auto); }
  .nights-mini { display: none; }
  .rrow { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .rrow .rpts, .rrow .btn { grid-column: 2 / 4; justify-self: start; }
  .rdetail { padding-left: 16px; }
}

.cmp { padding: 14px 16px; display: grid; gap: 12px; }
.cmphead { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.cmpsel { max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: inherit; font-weight: 700; }
.cmpsum { margin: 0; }
.cmpsum .num { color: var(--bad); }
.rstages { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.rstage .slow, .rshead .slow { color: var(--bad); }
.rrow.ref { box-shadow: inset 3px 0 0 var(--gold); }
.rrow.sel { box-shadow: inset 3px 0 0 var(--a1); }

.clines { display: grid; gap: 2px; }
.cline { border-radius: 10px; }
.cline.open { background: rgba(0, 0, 0, 0.22); }
.cline.off { display: flex; justify-content: space-between; padding: 8px 10px; }
.chead { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(60px, 1fr) 64px; gap: 12px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.chead:hover { background: var(--glass2); border-radius: 10px; }
.cname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.cbar i { display: block; height: 100%; border-radius: 99px; background: var(--bad); }
.cdelta { text-align: right; font-weight: 800; }
.loss { color: var(--bad); }
.gain { color: var(--ok); }
.cline .secbars { padding: 2px 10px 10px; }
.cmpsum { font-size: 1.02rem; }
@media (max-width: 720px) { .chead { grid-template-columns: minmax(0, 1fr) auto 58px; } .chead .cbar { display: none; } }

.cmpsum .gain { color: var(--ok); }
.mswitch { flex-wrap: nowrap; }
.mswitch .cmpsel { flex: 1; min-width: 0; }
.chead:disabled, .chead[tabindex="-1"] { cursor: default; }
.chead[tabindex="-1"]:hover { background: none; }

/* ---- Championnats : densite proche des Defis (moins de gros blocs) ---- */
.podium.compact { gap: 8px; }
.podium.compact .pod { padding: 6px 8px; gap: 1px; border-radius: 12px; }
.podium.compact .pod.p1 { padding-top: 8px; }
.podium.compact .pod .av { width: 26px; height: 26px; font-size: 10px; }
.podium.compact .pname { font-size: 0.82rem; margin-top: 0; }
.podium.compact .ptime { font-size: 0.9rem; }
.podium.compact .pgap { font-size: 11px; }
.podium.compact .pcar, .podium.compact .medal { display: none; }
.rrow { padding: 6px 14px; gap: 10px; font-size: 13px; }
.rrow .btn { padding: 3px 10px; font-size: 12px; }
.rrow .av, .srow .av { width: 24px; height: 24px; font-size: 9px; }
.srow { padding: 6px 14px; font-size: 13px; }
.chead { padding: 5px 8px; font-size: 13px; }
.cmp { padding: 10px 12px; gap: 8px; }
.cmpsum { font-size: 0.92rem; }
.cmpsel { padding: 4px 8px; font-size: 13px; }
.nightcard { padding: 10px 12px; gap: 4px; font-size: 13px; }
.trackcard { padding: 10px 14px; }
.pline { padding: 7px 14px; font-size: 13px; }
.crow, .ecard.champ { font-size: 13px; }
.mswitch { padding: 4px; }

/* ---- Vue d'ensemble d'une manche (case par spéciale) ---- */
.rres { overflow-x: auto; }
.rres .rrow { min-width: max-content; width: 100%; }
.rhead { cursor: default; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.rhead:hover { background: none; }
.hc { display: grid; place-items: center; height: 24px; border-radius: 6px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hc.h0 { background: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.hc.h1 { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.hc.h2 { background: color-mix(in srgb, var(--a2) 22%, transparent); }
.hc.h3 { background: color-mix(in srgb, var(--bad) 26%, transparent); }
.hc.off, .hc.hlab { background: none; color: var(--muted); }
.cellsmode { display: flex; gap: 8px; align-items: center; }
.rrow .rtime, .rrow .rpts, .rrow .rspeed { white-space: nowrap; }
.rrow .rspeed { text-align: right; }
.rhead .rtime, .rhead .rpts, .rhead .rspeed { text-align: right; justify-items: end; }
.rrow > :last-child { justify-self: end; }

.nights-mini { height: 40px; gap: 4px; }
.nm { position: relative; width: 22px; justify-items: center; align-content: end; text-align: center; }
.nm em { font-style: normal; font-size: 10px; line-height: 1; color: var(--muted); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.nm.dropped em { text-decoration: line-through; opacity: 0.6; }
.nm i { max-height: 22px; }
.shead { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.shead .nm { height: auto; font-size: 10px; display: block; }
.shead .nights-mini { height: auto; align-items: center; }
/* Points par manche : des chiffres lisibles, sous un en-tête M1, M2... */
.nm i { display: none; }
.nights-mini { height: auto; gap: 6px; align-items: center; }
.nm { width: 28px; display: block; }
.nm em { font-size: 12.5px; color: var(--text); margin: 0; }
.shead .nm { font-size: 10.5px; }

/* ---- Championnats : organisateur ---- */
.mblock { padding: 12px 16px; display: grid; gap: 10px; font-size: 13px; }
.mtitle { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.mrows { display: grid; gap: 8px; }
.mrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mrow .grow { flex: 1 1 160px; min-width: 0; }
.mrow input[type=text], .mrow input[type=datetime-local], .mrow input[type=number], .mfield input[type=number], .mfield input[type=text], .mblock > input[type=text] { padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: inherit; min-width: 0; }
.mrow input[type=text] { flex: 1 1 150px; }
.mrow input[type=number], .mfield input[type=number] { width: 84px; }
.mrow input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; }
.mfield { display: grid; gap: 4px; }
.mlabel { font-weight: 700; }
.mcopy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mcopy input { flex: 1 1 220px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: inherit; font-family: var(--mono, monospace); font-size: 12px; min-width: 0; }
.mcheck { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.mactions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.mrow .btn { padding: 4px 10px; font-size: 12px; }
.mcopy input[type=number] { flex: 0 0 84px; }

/* ---- Accueil : terrains repliables ---- */
.rsec-head { cursor: pointer; }
.rsec-actions { display: flex; gap: 10px; align-items: center; }
.chev { display: inline-block; font-size: 18px; transition: transform 0.2s; transform: rotate(-90deg); color: var(--muted); }
.rsec.open .chev { transform: none; }
.rsec:not(.open) .rsec-head { margin-bottom: 0; }
.rsec-head:hover .chev { color: var(--text); }

/* ---- Defis : la speciale et la voiture, bien separees ---- */
.lrule, .erule { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; }
.rule-stage, .rule-car { display: grid; gap: 1px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.25); min-width: 0; }
.rule-stage { border-color: color-mix(in srgb, var(--a2) 50%, transparent); background: color-mix(in srgb, var(--a2) 12%, transparent); flex: 1 1 200px; }
.rule-car { flex: 0 1 auto; }
.rule-stage small, .rule-car small { font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em; color: var(--muted); }
.rule-stage b { font-size: 1rem; }
.rule-car b { font-size: 0.9rem; font-weight: 700; }
.erule { gap: 6px; }
.erule .rule-stage, .erule .rule-car { padding: 4px 10px; flex: 1 1 100%; }
.erule .rule-stage b, .erule .rule-car b { font-size: 0.85rem; }
/* Gerer : des boutons a leur taille, pas etires sur toute la largeur */
.mblock { justify-items: start; }
.mblock > .mrows, .mblock > .mfield, .mblock > .mcopy, .mblock > input { justify-self: stretch; }
.mfield { justify-items: start; }
.mfield > .mcopy { justify-self: stretch; }
.mfield .btn, .mblock > .btn { padding: 5px 14px; font-size: 12.5px; }
.mblock { gap: 8px; padding: 10px 14px; }

/* Importer une manche */
.importdlg { width: min(460px, calc(100vw - 32px)); padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg2, #12121a); color: var(--text); }
.importdlg::backdrop { background: rgba(0, 0, 0, 0.6); }
.importdlg h3 { margin: 0 0 12px; font-size: 1rem; }
.importdlg.sharedlg { width: min(760px, calc(100vw - 32px)); }
.sharecanvas { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 12px; background: #0c0e12; display: block; margin: 10px 0 4px; }
.dropzone { display: grid; gap: 4px; justify-items: center; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.dropzone:hover, .dropzone.over, .dropzone:focus-visible { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 10%, transparent); }
.importdlg .mactions { margin-top: 12px; }

/* Piste epuree : une ligne, de petits points, trois reperes (leader, moi, ma cible) */
.track.slim { height: 86px; }
.track.slim .road { inset: 8px 0 18px 0; }
.track.slim .car.lane1 { top: 12px; }
.track.slim .finish { top: -2px; }
.car.tiny .cdot { width: 12px; height: 12px; border-width: 1.5px; opacity: 0.75; }
.car.tiny { top: 20px !important; }
.car.target .cdot { border-color: var(--a2); }
.car.target .clabel { color: var(--a2); font-weight: 700; }

/* Autour de moi (defis) */
.around { display: grid; gap: 4px; padding: 8px 4px; }
.nrow { display: grid; grid-template-columns: 26px minmax(70px, 140px) minmax(40px, 1fr) auto 74px; gap: 10px; align-items: center; padding: 5px 10px; border-radius: 10px; font-size: 13px; }
.nrow.me { background: color-mix(in srgb, var(--a1) 18%, transparent); font-weight: 800; }
.nrow.target { background: color-mix(in srgb, var(--a2) 12%, transparent); }
.nrank { text-align: center; font-weight: 800; color: var(--muted); }
.nrow.me .nrank { color: var(--a1); }
.nname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.nbar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.nrow.lead .nbar i { background: var(--gold); }
.ntime { color: var(--muted); }
.ngap { text-align: right; font-weight: 700; }
.nrow.target .ngap { color: var(--a2); }
.nsep { text-align: center; color: var(--muted); line-height: 0.6; }
.nghost { margin: 2px 10px 0; }
@media (max-width: 560px) { .nrow { grid-template-columns: 22px minmax(0, 1fr) auto 64px; } .nbar { display: none; } }

.evo { width: 100%; height: auto; max-height: 300px; color: var(--text); }
.evrank { font-size: 10.5px; fill: var(--muted); }
.evname { font-size: 11.5px; font-weight: 700; }

.pill.kpublic { background: color-mix(in srgb, var(--ok) 16%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill.kprivate { background: color-mix(in srgb, var(--a2) 16%, transparent); border-color: color-mix(in srgb, var(--a2) 40%, transparent); }
.scopebar { padding: 4px 8px; gap: 8px; }
.pill.krequest { background: color-mix(in srgb, var(--a1) 14%, transparent); border-color: color-mix(in srgb, var(--a1) 40%, transparent); }

/* Agenda des soirees suivantes */
.arow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); }
.adate { display: grid; justify-items: center; line-height: 1.05; padding: 4px 0; border-radius: 10px; background: color-mix(in srgb, var(--a2) 14%, transparent); }
.adate b { font-size: 1.15rem; }
.adate small { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.amain { display: grid; gap: 1px; color: inherit; text-decoration: none; min-width: 0; }
.amain b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow .btn { padding: 4px 10px; font-size: 12px; }
@media (max-width: 640px) { .arow { grid-template-columns: 46px minmax(0, 1fr); } .arow .scontrol { grid-column: 1 / -1; } }

.boardswitch { display: flex; gap: 8px; align-items: center; justify-content: flex-end; font-size: 12px; }
.boardswitch .seg button { padding: 2px 10px; font-size: 12px; }
/* Photos de voitures : en bandeau en haut des cartes de defi, plus en fond sous le texte */
.live .inner.bgphoto::before { inset: 0 0 auto 0; height: 118px; opacity: 0.6; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.live .inner { padding-top: 20px; }

.evo.hl .evline:not(.on) { opacity: 0.18; }
.evline { transition: opacity 0.15s; }
.evname { font-size: 12px; font-weight: 800; }
.evocard .evo { max-width: 760px; }

/* ---- Podium en marches (page du defi) ---- */
.steps { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 6px; align-items: end; padding: 4px 0 0; }
.step { display: grid; align-content: end; justify-items: center; }
.swho { display: grid; justify-items: center; gap: 2px; padding: 0 6px 10px; text-align: center; }
.swho .av { width: 40px; height: 40px; font-size: 13px; }
.step.s1 .swho .av { width: 48px; height: 48px; border: 2px solid var(--gold); }
.swho .pname { font-size: 0.92rem; margin-top: 4px; }
.swho .ptime { font-size: 1.05rem; font-weight: 800; }
.step.s1 .swho .ptime { color: var(--gold); font-size: 1.2rem; }
.swho .pgap, .swho .pcar { font-size: 11.5px; color: var(--muted); }
.sblock { display: grid; place-items: center; width: 100%; font-size: 2rem; font-weight: 900; color: rgba(255, 255, 255, 0.85); border-radius: 12px 12px 0 0; border: 1px solid var(--line); border-bottom: 0; background: linear-gradient(180deg, var(--tint), color-mix(in srgb, var(--tint) 18%, transparent)); }
.step.s1 { --tint: var(--gold); } .step.s2 { --tint: var(--silver); } .step.s3 { --tint: var(--bronze); }
.step.s1 .sblock { height: 92px; } .step.s2 .sblock { height: 64px; } .step.s3 .sblock { height: 44px; }
.step.mine .swho .av { outline: 2px solid var(--a1); }
@media (max-width: 560px) { .swho .pcar { display: none; } .swho .pname { font-size: 0.82rem; } }
/* Podium en marches : compact et centre, pas sur toute la largeur */
.steps { max-width: 520px; margin: 0 auto; gap: 4px; }
.step.s1 .sblock { height: 58px; font-size: 1.5rem; } .step.s2 .sblock { height: 40px; font-size: 1.25rem; } .step.s3 .sblock { height: 28px; font-size: 1.05rem; }
.swho { padding-bottom: 6px; gap: 1px; }
.swho .av { width: 32px; height: 32px; font-size: 11px; }
.step.s1 .swho .av { width: 38px; height: 38px; }
.swho .pname { font-size: 0.85rem; margin-top: 2px; }
.swho .ptime { font-size: 0.95rem; }
.step.s1 .swho .ptime { font-size: 1.05rem; }
.swho .pgap, .swho .pcar { font-size: 11px; }
.swho .pcar { display: none; }

/* Podium + evolution cote a cote */
.duo { display: grid; grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.5fr); gap: 14px; align-items: stretch; }
.duo > .card { margin: 0; }
.duo > .card:only-child { grid-column: 1 / -1; }
.podcard { position: relative; padding: 12px 14px 0; display: grid; grid-template-rows: auto 1fr; gap: 6px; overflow: hidden; }
.podcard::before { content: ""; position: absolute; left: 50%; top: 18%; width: 70%; height: 70%; transform: translateX(-50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--gold) 26%, transparent), transparent); pointer-events: none; }
.podcard.final::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--gold) 40%, transparent), transparent); }
.podcard .steps { position: relative; max-width: none; margin: 0; align-self: end; }
.step { animation: rise 0.7s both; }
.step.s1 { animation-delay: 0.05s; } .step.s2 { animation-delay: 0.2s; } .step.s3 { animation-delay: 0.35s; }
.crown { font-size: 18px; line-height: 1; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--gold) 60%, transparent)); }
.sblock { border-radius: 10px 10px 0 0; }
@media (max-width: 860px) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* Evolution : une ligne par pilote (place, courbe, variation) */
.evocard { padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.erows { display: grid; gap: 2px; }
.erow { display: grid; grid-template-columns: 22px minmax(70px, 1fr) 150px 64px; gap: 10px; align-items: center; padding: 4px 8px; border-radius: 10px; font-size: 13px; }
.erow.me { background: color-mix(in srgb, var(--a1) 18%, transparent); font-weight: 800; }
.ename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.espark { width: 150px; height: 30px; color: var(--muted); }
.erow.me .espark { color: var(--a1); }
.erow:first-child .espark { color: var(--gold); }
.etrend { text-align: right; font-weight: 800; font-size: 12px; }
.etrend.up { color: var(--ok); } .etrend.down { color: var(--bad); } .etrend.flat, .etrend.new { color: var(--muted); font-weight: 600; }
@media (max-width: 520px) { .erow { grid-template-columns: 22px minmax(0, 1fr) 100px 54px; } .espark { width: 100px; } }

.mv { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; font-size: 13px; }
.mv.me { background: color-mix(in srgb, var(--a1) 18%, transparent); }
.mvwhen { font-size: 12px; }
.mvtime { color: var(--muted); }

.evrank.first { fill: var(--gold); font-weight: 800; }
.evocard .evo { max-width: none; }

.duocol { display: grid; gap: 14px; align-content: start; }
.mypos { margin: 0; padding: 8px 4px 10px; font-size: 13px; text-align: center; position: relative; }
.account a.me { color: inherit; text-decoration: none; }
.account a.me:hover b { text-decoration: underline; }

/* Tableau d'honneur du palmares */
.honors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.honor { position: relative; display: grid; justify-items: center; gap: 2px; padding: 14px 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); text-align: center; overflow: hidden; }
.honor::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, var(--tint), transparent 70%); opacity: 0.22; pointer-events: none; }
.honor.h1 { --tint: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.honor.h2 { --tint: var(--silver); } .honor.h3 { --tint: var(--bronze); }
.honor.mine { outline: 2px solid var(--a1); }
.hmedal { font-size: 2rem; line-height: 1; }
.hwho { margin-top: 4px; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.hcount { font-size: 0.9rem; color: var(--muted); }
.hcount b { font-size: 1.6rem; color: var(--text); margin-right: 4px; }
.honor.h1 .hcount b { color: var(--gold); }
@media (max-width: 520px) { .honors { gap: 6px; } .hmedal { font-size: 1.6rem; } }
.claimed { display: inline-flex; gap: 6px; align-items: center; justify-self: end; font-size: 12px; }
.claimed .icon { font-size: 12px; opacity: 0.7; }
.claimed .icon:hover { opacity: 1; color: var(--bad); }

.dlines { display: grid; gap: 2px; }
.dline { display: grid; grid-template-columns: minmax(90px, 1.2fr) 1fr 1fr; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 10px; font-size: 13px; }
.dline:hover { background: var(--glass2); }
.dname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcell { display: grid; line-height: 1.2; }
.dcell.win b { color: var(--ok); }
.dcell.off { font-size: 12px; }
/* Trois colonnes de meme largeur : marches des podiums et cartes du palmares */
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.podium2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.honors { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.honor { align-content: start; min-width: 0; }

/* ---- Mes setups ---- */
.scards2 { display: grid; gap: 8px; }
.scard2 { border: 1px solid var(--line); border-radius: 14px; background: var(--glass); overflow: hidden; }
.scard2.archived { opacity: 0.7; }
.srow2 { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; }
.smain { display: grid; gap: 1px; min-width: 0; }
.smain b { display: flex; gap: 8px; align-items: center; overflow: hidden; text-overflow: ellipsis; }
.sacts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.sacts .btn { padding: 4px 10px; font-size: 12px; }
.star { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.star.on { color: var(--gold); }
.svers { display: grid; gap: 4px; padding: 6px 14px 12px 60px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); }
.sver { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.sver .btn { padding: 3px 10px; font-size: 12px; }
@media (max-width: 720px) { .srow2 { grid-template-columns: 30px minmax(0, 1fr); } .sacts { grid-column: 1 / -1; justify-content: flex-start; } .svers { padding-left: 14px; } }

/* Mes setups : colonne de voitures a gauche, liste compacte a droite (comme l'ancien ecran) */
.setups2 { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.srail { display: grid; gap: 4px; position: sticky; top: 12px; }
.scar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); color: inherit; text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.scar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scar:hover { border-color: var(--a1); }
.scar.on { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 16%, transparent); font-weight: 700; }
.scar small { color: var(--muted); }
.scontent { display: grid; gap: 10px; min-width: 0; }
.scontent .ctx .grow { flex: 1 1 220px; }
.scards2 { gap: 6px; }
.srow2 { padding: 8px 12px; gap: 10px; }
.smain small { font-size: 12px; }
.sacts { flex-direction: row; }
@media (max-width: 860px) { .setups2 { grid-template-columns: minmax(0, 1fr); } .srail { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; } .scar { flex: none; } }

/* ---- Visionneuse de setup : l'ecran du jeu (photo de rallye, reglages aux quatre coins) ---- */
.setupdlg { width: min(880px, calc(100vw - 24px)); }
.sg { display: grid; gap: 8px; }
.sg-title { margin: 0; font-size: 1.3rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 900; }
.sg-title i { font-style: normal; margin: 0 10px; color: var(--muted); }
.sg-title span { color: var(--muted); }
.sg-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.sg-tabs { display: flex; flex-wrap: wrap; gap: 2px; background: rgba(40, 32, 70, 0.7); border-radius: 8px 8px 0 0; }
.sg-tab { padding: 8px 14px; border: 0; background: none; color: var(--text); font-weight: 800; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.sg-tab[aria-selected="true"] { background: var(--bad, #d6403a); color: #fff; }
.sg-screen { position: relative; min-height: 460px; border-radius: 0 0 12px 12px; background: linear-gradient(rgba(6, 8, 14, 0.35), rgba(6, 8, 14, 0.55)), var(--photo, none) center / cover no-repeat; overflow: hidden; }
.sg-corners { position: relative; min-height: 460px; }
.sg-centre { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.sg-panel { width: 240px; max-width: 46%; background: rgba(12, 12, 24, 0.82); border-bottom: 3px solid var(--bad, #d6403a); }
.sg-corners .sg-panel { position: absolute; }
.sg-panel.tl { top: 10px; left: 10px; } .sg-panel.tr { top: 10px; right: 10px; }
.sg-panel.bl { bottom: 10px; left: 10px; } .sg-panel.br { bottom: 10px; right: 10px; }
.sg-rows { display: grid; }
.sg-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 10px; font-size: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.sg-label { color: var(--muted); }
.sg-value { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; text-align: right; }
.sg-value.sg-text { font-size: 0.9rem; }
.sg-value small { margin-left: 3px; font-size: 10px; color: var(--muted); font-weight: 600; }
.sg-name { padding: 8px; text-align: center; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; background: rgba(40, 32, 70, 0.9); }
.sg-line { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; padding: 12px; min-height: 460px; }
@media (max-width: 700px) { .sg-screen, .sg-corners { min-height: 0; } .sg-corners { display: grid; gap: 10px; padding: 10px; } .sg-corners .sg-panel, .sg-centre { position: static; transform: none; width: auto; max-width: none; } .sg-centre { display: grid; } }

/* ---- Visionneuse v2 : voiture vue de dessus ---- */
.sg-screen { background: radial-gradient(ellipse at 50% 40%, rgba(60, 70, 110, 0.35), transparent 70%), linear-gradient(180deg, #0c1018, #090b12); border-radius: 14px; border: 1px solid var(--line); }
.sg-carwrap { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.sg-car { height: 74%; max-height: 360px; width: auto; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5)); }
.sg-car .body { fill: #1b2233; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.5; }
.sg-car .glass { fill: rgba(120, 160, 255, 0.18); stroke: rgba(255, 255, 255, 0.15); stroke-width: 1; }
.sg-car .wheel { fill: #0a0c12; stroke: rgba(255, 255, 255, 0.25); stroke-width: 1.2; }
.sg-car .wing { fill: rgba(255, 255, 255, 0.3); }
.sg-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sg-link { fill: none; stroke: color-mix(in srgb, var(--a2) 70%, transparent); stroke-width: 1.4; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.sg-panel { background: rgba(14, 18, 30, 0.78); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; z-index: 1; }
.sg-name { padding: 7px 10px; text-align: left; font-size: 11px; letter-spacing: 0.1em; background: color-mix(in srgb, var(--a2) 20%, transparent); border-bottom: 1px solid var(--line); }
.sg-row { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 10px; }
.sg-label { font-size: 11px; }
.sg-value { font-size: 1.15rem; text-align: left; }
.sg-tabs { background: none; gap: 6px; padding: 2px 0; }
.sg-tab { border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; background: var(--glass); }
.sg-tab[aria-selected="true"] { background: var(--grad); color: #0a0a0f; border-color: transparent; }
@media (max-width: 700px) { .sg-carwrap, .sg-links { display: none; } }
/* ---- Mes setups v2 ---- */
.vbadge { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, var(--a2) 22%, transparent); }
.smenu { position: relative; }
.smenu summary { list-style: none; cursor: pointer; padding: 4px 10px; font-size: 14px; line-height: 1.1; }
.smenu summary::-webkit-details-marker { display: none; }
.smenulist { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 170px; display: grid; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2, #12121a); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); }
.smenuitem { text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.smenuitem:hover { background: var(--glass2); }
.smenuitem.danger { color: var(--bad); }
.carbadge { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-style: normal; font-size: 10px; font-weight: 800; background: color-mix(in srgb, var(--a2) 22%, transparent); flex: none; }
.scar span { flex: 1; }

/* ---- Listes déroulantes maison ---- */
.ddwrap { display: inline-block; position: relative; min-width: 0; max-width: 100%; vertical-align: middle; }
.field .ddwrap, .sinput.ddwrap { display: block; }
.dd { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: var(--text); font: inherit; font-weight: 700; font-size: 13px; text-align: left; cursor: pointer; transition: border-color 0.15s; }
.dd:hover, .dd[aria-expanded="true"] { border-color: var(--a1); }
.dd:disabled { opacity: 0.5; cursor: not-allowed; }
.ddlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ddchev { flex: none; color: var(--muted); font-size: 12px; transition: transform 0.15s; }
.dd[aria-expanded="true"] .ddchev { transform: rotate(180deg); }
.field .dd, dialog .dd { width: 100%; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: inherit; }
.chip .dd { border: 0; background: none; padding: 4px 6px; max-width: 220px; }
.ddlist { position: fixed; z-index: 2000; display: grid; gap: 4px; max-height: 340px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2, #12151d); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6); }
.dditems { display: grid; gap: 1px; overflow-y: auto; max-height: 280px; }
.ddsearch { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.35); color: var(--text); }
.dditem { display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dditem:hover, .dditem:focus-visible { background: var(--glass2); outline: none; }
.dditem.on { background: color-mix(in srgb, var(--a2) 20%, transparent); font-weight: 800; }
.dditem:disabled { opacity: 0.45; cursor: not-allowed; }
.brandname { line-height: 1.1; font-size: 0.95rem; }
.brand img.logo { width: 30px; height: 30px; border-radius: 8px; background: none; box-shadow: none; object-fit: cover; flex: none; }

/* ---- Administration ---- */
.ulist { display: grid; }
.urow { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) auto auto auto; gap: 12px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.urow:first-child { border-top: 0; }
.urow.evrow { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.urow.conflict { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.umain { display: grid; gap: 1px; min-width: 0; }
.umain b { display: flex; gap: 8px; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obadge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; background: var(--glass2); white-space: nowrap; }
.obadge.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.obadge.wait { background: color-mix(in srgb, var(--a2) 22%, transparent); }
.obadge.bad { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.obad { color: var(--bad); font-size: 12px; }
.orow { display: grid; grid-template-columns: 130px auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.orow:first-child { border-top: 0; }
.otext { display: grid; gap: 1px; min-width: 0; word-break: break-word; }
.ostat { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; font-size: 13px; }
.dchecks { display: grid; }
.dcheck { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: start; }
.dcheck:first-child { border-top: 0; }
.dtext { display: grid; gap: 2px; }
.dtodo { color: var(--a2); }
.dpill { justify-self: start; padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.dcheck.warn .dpill { background: color-mix(in srgb, var(--a2) 24%, transparent); color: var(--a2); }
.dcheck.error .dpill { background: color-mix(in srgb, var(--bad) 24%, transparent); color: var(--bad); }
.dcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ddl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; margin: 0; font-size: 13px; }
.ddl dd { margin: 0; text-align: right; font-weight: 700; }
.dtable { font-size: 13px; font-variant-numeric: tabular-nums; }
.dtable th, .dtable td { padding: 6px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.dtable td { white-space: normal; overflow-wrap: anywhere; }
.dtable td code { white-space: nowrap; }
.dtable td:last-child:not(:first-child) { min-width: 220px; }
.dtable thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted, inherit); }
.ticker { display: flex; align-items: center; gap: 12px; flex: 0 1 auto; min-width: 0; padding: 5px 6px 5px 14px; border: 1px solid rgba(245, 196, 81, 0.45); border-radius: 12px; background: rgba(255, 255, 255, 0.04); font-size: 13px; }
.ticker[hidden] { display: none; }
.tk-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold, #f5c451); animation: tk-pulse 1.8s ease-in-out infinite; }
@keyframes tk-pulse { 50% { opacity: 0.3; } }
.soon .tk-dot { animation: none; opacity: 0.45; }
.tk-label { flex: none; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.tk-msg { display: flex; align-items: baseline; gap: 10px; min-width: 0; color: inherit; text-decoration: none; white-space: nowrap; transition: opacity 0.35s; }
.tk-msg.out { opacity: 0; }
.tk-msg > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tk-msg b { flex: none; max-width: 30ch; }
.tk-msg .tk-part { flex: 0 1 auto; }
.tk-msg small { flex: none; }
.tk-msg:hover b { text-decoration: underline; }
.tk-cta { flex: none; padding: 6px 12px; border-radius: 8px; background: var(--gold, #f5c451); color: #1a1405; font-size: 12.5px; font-weight: 800; text-decoration: none; }
.tk-cta:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) { .tk-dot { animation: none; } .tk-msg { transition: none; } }
@media (max-width: 700px) { .ticker { display: none; } }
.dwide { grid-column: span 2; }
.dfunnel { font-size: 13px; font-variant-numeric: tabular-nums; }
.dfunnel th, .dfunnel td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.dfunnel th:first-child { text-align: left; font-weight: 400; color: var(--muted, inherit); }
.dfunnel thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted, inherit); }
.dfunnel td { font-weight: 700; }
.dfunnel tr.dpct th, .dfunnel tr.dpct td { font-style: italic; border-bottom-style: dashed; }
@media (max-width: 720px) { .dwide { grid-column: auto; } }
.dlogs { display: grid; gap: 2px; max-height: 360px; overflow-y: auto; }
.dlog { display: grid; grid-template-columns: 130px 56px minmax(0, 1fr); gap: 10px; font-size: 12px; padding: 3px 4px; word-break: break-word; }
.dlog.error b, .dlog.warn b { color: var(--bad); }
.tplgroup { border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.tplgroup summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.tplgroup[open] { display: grid; gap: 8px; }
.mfield textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: inherit; font: inherit; resize: vertical; }
.mfield > input[type=text], .mfield > input[type=number], .mfield > input[type=datetime-local] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: inherit; }
.adminform { width: min(620px, calc(100vw - 24px)); max-height: 92vh; overflow-y: auto; }
.adminform .mrow > .mfield { flex: 1 1 140px; }
.importdlg h3 { margin: 0 0 8px; }
.importdlg .mfield { margin-top: 8px; }
.linkbtn { border: 0; background: none; color: var(--a2); font: inherit; font-size: 12px; cursor: pointer; margin-left: 10px; }
@media (max-width: 720px) { .urow, .urow.evrow, .urow.conflict { grid-template-columns: minmax(0, 1fr) auto; } .urow .av { display: none; } .orow { grid-template-columns: minmax(0, 1fr); } .dcheck { grid-template-columns: minmax(0, 1fr); } .dlog { grid-template-columns: minmax(0, 1fr); } }

/* Mobile : barre du bas = 4 ecrans + « Plus » */
.navmore { display: none; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
@media (max-width: 760px) {
  .side { overflow-x: visible; justify-content: space-around; }
  .side nav { flex: 1; justify-content: space-around; }
  .nav[data-rest] { display: none; }
  .navmore { display: flex; align-items: center; }
  .navmore i { font-style: normal; }
}
.moresheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; padding: 10px 12px 18px; border: 1px solid var(--line); border-radius: 22px 22px 0 0; background: var(--bg2, #12151d); color: var(--text); display: none; gap: 2px; }
.moresheet[open] { display: grid; }
.moresheet::backdrop { background: rgba(0, 0, 0, 0.55); }
.moreitem { display: flex; gap: 12px; align-items: center; padding: 12px 10px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.moreitem:hover { background: var(--glass2); }
.moreitem i { width: 24px; text-align: center; font-style: normal; }
.moresheet hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
/* Mobile : resultats d'une manche en lignes simples (les cases par speciale restent sur grand ecran, le comparateur donne le detail) */
@media (max-width: 760px) {
  .rres .rrow { grid-template-columns: 26px minmax(0, 1fr) auto !important; min-width: 0; width: auto; gap: 4px 10px; }
  .rres .rrow .hc, .rres .rhead, .rres .rrow .rspeed { display: none; }
  .rres .rrow .rpts { grid-column: 2; justify-self: start; text-align: left; }
  .rres .rrow > :last-child { grid-column: 3; justify-self: end; }
  .rres { overflow-x: hidden; }
}

/* Choix de la langue */
.langsw { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 99px; }
.langsw button { padding: 3px 10px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.langsw button[aria-pressed="true"] { background: var(--glass2); color: var(--text); }
.side > .langsw { align-self: flex-start; margin: 0 8px; }
.moreitem.langrow { justify-content: space-between; cursor: default; }
@media (max-width: 760px) { .side > .langsw { display: none; } }

/* Meilleur de chaque classe : une ligne fine sous le podium */
.classband { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12px; }
.cchip { display: inline-flex; gap: 8px; align-items: center; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass); color: inherit; font: inherit; font-size: 12px; cursor: pointer; transition: border-color 0.15s; }
.cchip:hover { border-color: var(--a1); }
.cchip b { color: var(--a2); }
@media (max-width: 560px) { .classband { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .cchip { flex: none; } }
/* Liste déroulante : les lignes gardent leur hauteur, c'est la liste qui défile */
.ddlist { display: flex; flex-direction: column; }
.dditems { display: flex; flex-direction: column; gap: 1px; min-height: 0; overflow-y: auto; }
.dditem { flex: none; min-height: 34px; line-height: 1.3; }
.ddsearch { flex: none; margin-bottom: 4px; }

/* ---- Mes setups v3 : voitures en pastilles, setups en cartes ---- */
.setupsbody { display: grid; gap: 12px; }
.carchips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.cchip2 { flex: none; display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass); color: inherit; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color 0.15s; }
.cchip2:hover { border-color: var(--a1); }
.cchip2.on { border-color: transparent; background: var(--grad); color: #0a0a0f; }
.cchip2 small { opacity: 0.75; }
.sgrid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.scard3 { position: relative; display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); }
.scard3.archived { opacity: 0.7; }
.scard3 .sphoto { position: relative; height: 72px; border-radius: 15px 15px 0 0; background: linear-gradient(180deg, transparent 30%, var(--glass)), var(--photo, none) center / cover no-repeat; }
.scard3 .vbadge { position: absolute; left: 10px; bottom: 8px; background: rgba(0, 0, 0, 0.55); }
.scard3 .star { position: absolute; right: 8px; top: 6px; font-size: 20px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.scard3 .sbody { display: grid; gap: 2px; padding: 8px 14px 4px; align-content: start; }
.scard3 .sname { display: flex; gap: 8px; align-items: center; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard3 small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12px; }
.scard3 .sfoot { display: flex; gap: 8px; align-items: center; padding: 8px 14px 12px; }
.scard3 .sfoot .btn.primary { flex: 1; }
.scard3 .svers { padding-left: 14px; border-radius: 0 0 15px 15px; }

/* ---- Visionneuse de setup v3 : l'ancien modèle (photo, panneaux aux coins, nom en bas) dans le style V3 ---- */
.sg-screen { background: linear-gradient(180deg, rgba(8, 10, 16, 0.25), rgba(8, 10, 16, 0.55)), var(--photo, none) center / cover no-repeat; }
.sg-carwrap, .sg-links { display: none; }
.sg-panel { backdrop-filter: blur(10px); background: rgba(12, 15, 24, 0.7); }
.sg-name { text-align: center; padding: 8px; border-bottom: 0; border-top: 2px solid var(--a2); background: color-mix(in srgb, var(--a2) 22%, rgba(12, 15, 24, 0.9)); }
.sg-row { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 7px 12px; }
.sg-value { text-align: right; }
@media (max-width: 700px) { .sg-screen { min-height: 0; } }

/* ---- Bloc compte : une seule carte, avatar à anneau, rôle en pastille, déconnexion en bouton rond ---- */
.account .mecard { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); }
.account .mecard .me { flex: 1; min-width: 0; padding: 0; border: 0; background: none; }
.account .mecard .av { width: 38px; height: 38px; font-size: 13px; background: linear-gradient(#171b24, #171b24) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.account .mewho { min-width: 0; display: grid; gap: 3px; }
.account .mewho b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .role { justify-self: start; padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--a1) 14%, transparent); color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; }
.account .role.admin { background: var(--grad); color: #0a0a0f; }
.account .melogout { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.account .melogout:hover { color: #ff6b6b; border-color: #ff6b6b; }

/* Bloc compte plus compact : plus de barre de défilement dans le menu */
.account { gap: 4px; }
.account .mecard { padding: 5px 6px 5px 8px; border-radius: 12px; gap: 4px; }
.account .mecard .av { width: 30px; height: 30px; font-size: 11px; border-width: 2px; }
.account .mewho { gap: 0; }
.account .mewho b { font-size: 13px; line-height: 1.2; }
.account .role, .account .role.admin { padding: 0; background: none; color: var(--a2); font-size: 10.5px; line-height: 1.2; }
.account .melogout { width: 28px; height: 28px; font-size: 13px; }

/* Voitures des setups : pastilles qui passent à la ligne, plus de défilement horizontal */
.carchips { flex-wrap: wrap; overflow: visible; }
.carchips .ddwrap .dd { border-radius: 99px; padding: 6px 14px; font-size: 13px; font-weight: 700; }

/* ---- Version du jeu : choix sous le menu, et dans la feuille « Plus » sur mobile ---- */
.moreitem
.vlist { display: grid; gap: 8px; margin: 10px 0; }
.vrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.vrow input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--glass); color: inherit; font: inherit; }
.vrow input:first-child { width: 90px; }

/* Setup : le panneau du centre garde sa largeur, les libellés longs passent à la ligne, les valeurs chiffrées restent sur une ligne */
.sg-centre .sg-panel { width: 260px; max-width: none; }
.sg-label { min-width: 0; overflow-wrap: anywhere; }
.sg-value { flex: none; max-width: 58%; white-space: nowrap; }
.sg-value.sg-text { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 820px) { .sg-screen, .sg-corners { min-height: 0; } .sg-corners { display: grid; gap: 10px; padding: 10px; } .sg-corners .sg-panel, .sg-centre { position: static; transform: none; width: auto; max-width: none; } .sg-centre { display: grid; } .sg-centre .sg-panel { width: auto; } }

/* Setup : les quatre coins sont une grille (pas de superposition quand un panneau a beaucoup de réglages) ; la photo reste visible au milieu */
.sg-corners { display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr) minmax(250px, 310px); gap: 10px; padding: 10px; align-items: start; }
.sg-corners .sg-panel, .sg-centre { position: static; transform: none; width: auto; max-width: none; }
.sg-panel.tl { grid-column: 1; grid-row: 1; } .sg-panel.tr { grid-column: 3; grid-row: 1; }
.sg-panel.bl { grid-column: 1; grid-row: 2; } .sg-panel.br { grid-column: 3; grid-row: 2; }
.sg-centre { grid-column: 2; grid-row: 1; display: grid; gap: 10px; justify-self: center; width: min(100%, 280px); }
.sg-centre .sg-panel { width: auto; }
@media (max-width: 1000px) { .sg-corners { grid-template-columns: 1fr 1fr; } .sg-panel.tl, .sg-panel.bl { grid-column: 1; } .sg-panel.tr, .sg-panel.br { grid-column: 2; } .sg-centre { grid-column: 1 / -1; grid-row: 3; width: auto; justify-self: stretch; } }
@media (max-width: 700px) { .sg-corners { grid-template-columns: 1fr; } .sg-corners .sg-panel, .sg-centre { grid-column: 1; grid-row: auto; } }

.vrow code { min-width: 90px; }
.vdate { min-width: 80px; }
.vwarn { color: #e0a43a; flex-basis: 100%; }
.vguess { display: grid; gap: 6px; margin: 10px 0; }
.vguess select { max-width: 280px; }
.vgroup { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; }
.vgroup > summary { cursor: pointer; padding: 4px 0; }
.vnew { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.vrow select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--glass); color: inherit; font: inherit; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; padding: 8px 12px; border: 1px solid var(--a1); border-radius: 12px; background: var(--glass); }
.bulkbar[hidden] { display: none; }
.selcell { width: 32px; }

/* Drapeaux en image (Windows n'affiche pas les emojis drapeaux) */
.flag { display: inline-block; width: 15px; height: 11px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32); flex: none; }
.kicker .flag { margin-right: 8px; }

/* ---- Page visiteur ---- */
.wl-hero { position: relative; margin-bottom: 26px; padding: clamp(28px, 6vw, 64px) clamp(20px, 4vw, 44px); border: 1px solid var(--line); border-radius: 22px; background-size: cover; background-position: center; overflow: hidden; }
.wl-hero::after { content: ""; position: absolute; inset: auto -10% -70% auto; width: 55%; aspect-ratio: 1; background: conic-gradient(from 90deg, transparent, var(--a1), var(--a2), transparent 70%); opacity: 0.16; filter: blur(60px); pointer-events: none; }
.wl-hero-in { position: relative; z-index: 1; max-width: 720px; }
.wl-hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.05; font-weight: 900; letter-spacing: -0.025em; margin: 6px 0 14px; text-shadow: 0 0 50px color-mix(in srgb, var(--a1) 35%, transparent); }
.wl-sub { font-size: 1.05rem; opacity: 0.9; max-width: 58ch; }
.wl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.wl-stats { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 28px; }
.wl-stat { display: grid; }
.wl-stat b { font-size: 1.7rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wl-stat small { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.wl-open h2, .wl-h2, .wl-discord h2, .wl-final h2 { margin: 0 0 14px; }
.wl-h2 { margin-top: 18px; }
.wl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 40px; }
.wl-live { display: grid; gap: 8px; align-content: start; padding: 16px; text-decoration: none; color: inherit; transition: transform 0.15s, border-color 0.15s; }
.wl-live:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--a2) 55%, transparent); }
.wl-tag { letter-spacing: 0.14em; font-size: 10.5px; color: var(--a2); font-weight: 800; }
.wl-lt { font-size: 1.12rem; }
.wl-rows { display: grid; gap: 6px; }
.wl-prow { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.wl-prow.p1 { background: linear-gradient(90deg, rgba(227, 192, 121, 0.18), transparent); }
.wl-rank { font-weight: 900; color: var(--muted); text-align: center; }
.wl-prow.p1 .wl-rank { color: var(--gold); }
.wl-prow .av { width: 28px; height: 28px; font-size: 10px; }
.wl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.wl-big { display: flex; align-items: baseline; gap: 8px; }
.wl-big b { font-size: 2.2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wl-go { color: var(--a2); font-weight: 700; font-size: 13px; margin-top: 4px; }
.wl-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 32px; align-items: center; margin: 0 0 46px; }
.wl-step.flip .wl-text { order: 2; }
.wl-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-size: 22px; background: var(--grad); box-shadow: 0 8px 24px color-mix(in srgb, var(--a1) 35%, transparent); }
.wl-text h2 { margin: 12px 0 10px; font-size: 1.5rem; }
.wl-text p { opacity: 0.85; line-height: 1.6; }
.wl-step img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.wl-discord { padding: 22px; margin-bottom: 40px; }
.wl-discord ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.5; }
.wl-final { text-align: center; padding: 28px 8px 56px; }
.wl-final .btn { font-size: 1.05rem; padding: 12px 26px; }
@media (max-width: 860px) { .wl-step { grid-template-columns: minmax(0, 1fr); gap: 14px; } .wl-step.flip .wl-text { order: 0; } }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; text-decoration: none; }
.btn.discord:hover { filter: brightness(1.1); }
.wl-actions.center { justify-content: center; }
.back.discordlink { color: #aab4ff; }
.btn.discord::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.292a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.1.246.198.373.293a.077.077 0 0 1-.006.127 12.3 12.3 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.292a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.1.246.198.373.293a.077.077 0 0 1-.006.127 12.3 12.3 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z'/%3E%3C/svg%3E") center / contain no-repeat; }
.side-discord, .moreitem-discord { display: flex; justify-content: center; align-items: center; margin: 6px 10px; }
.news-discord { padding: 22px; margin-bottom: 24px; }
.news-discord h2, .news-title { margin: 0 0 10px; }
.news-version { padding: 14px 22px; margin-bottom: 10px; }
.news-version summary { cursor: pointer; padding: 4px 0; }
.news-discord-line { margin-top: 24px; }
.idea-form { padding: 18px 22px; margin-bottom: 20px; display: grid; gap: 10px; }
.idea-form h2 { margin: 0; }
.idea-form input, .idea-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.25); }
.idea-form textarea { resize: vertical; }
.idea-group h3 { margin: 22px 0 10px; }
.idea { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 18px; margin-bottom: 10px; }
.idea.hidden { opacity: 0.6; }
.idea-main { min-width: 0; }
.idea-main p { margin: 4px 0; }
.idea-main small { display: block; }
.idea-vote { flex: none; white-space: nowrap; }
.ideaLang { margin-left: 8px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--muted); vertical-align: middle; }
.idea-vote[aria-pressed="true"] { border-color: var(--accent, #6fb0f0); font-weight: 700; }
.idea-admin { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.idea-version { width: 90px; }
.teamcol { width: 64px; padding-right: 0; }
.teamchip { display: inline-block; min-width: 44px; text-align: center; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: #fff; background: var(--tc, #6b7280); box-sizing: border-box; }
.pilotteam { margin-left: 12px; vertical-align: middle; text-decoration: none; font-size: 13px; }
.podteam { display: flex; justify-content: center; align-items: center; min-height: 26px; }
.teamlogo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: rgba(255, 255, 255, 0.06); flex: none; }
.teamlogo.big { width: 84px; height: 84px; border-radius: 14px; }
.teamtag.big { min-width: 84px; padding: 22px 12px; font-size: 1.4rem; border-radius: 14px; }
.teamhero { position: relative; isolation: isolate; margin: 12px 0 14px; padding: 26px 24px 22px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 30%, #0c0e12), #0c0e12); overflow: hidden; }
.teamhero.withbanner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--banner) var(--bpos, 50% 50%) / cover no-repeat; opacity: 0.55; }
.teamhero::after { content: ""; position: absolute; top: 0; bottom: 0; right: -40px; width: 160px; background: var(--tc); transform: skewX(-14deg); opacity: 0.85; z-index: -1; }
.teamhero-main { display: flex; align-items: center; gap: 18px; min-height: 110px; padding-right: 90px; }
.teamhero h2 { margin: 0; font-size: 1.7rem; }
.teamdesc { margin: 4px 0 8px; color: #e1e4ea; }
.teamhero .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.teamhero .chip { padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.28); font-size: 0.8rem; background: rgba(0, 0, 0, 0.35); }
.teamhero .chip.rec-open { border-color: #2d6a43; color: #7fd39a; }
.teamhero .chip.rec-full { border-color: #7a3a3a; color: #f2a0a0; }
.teamlink { padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.28); font-size: 0.8rem; color: inherit; text-decoration: none; }
.teamkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.teamkpis .tkpi { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.teamkpis .tkpi b { display: block; font-size: 1.5rem; }
.teampinned { padding: 14px 18px; margin: 14px 0; border-left: 4px solid var(--tc); }
.teampinned p { margin: 4px 0 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid rgba(255, 255, 255, 0.25); cursor: pointer; padding: 0; }
.teamform { padding: 18px 22px; margin: 16px 0; display: grid; gap: 10px; }
.teamform h2, .teamform h3 { margin: 0; }
.teamform input:not([type="checkbox"]) { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.25); }
.teamrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.teamrow input { flex: 1 1 200px; }
.teamrow .teamtag-input { flex: 0 0 90px; text-transform: uppercase; }
.teamform input[type="color"], .teamrow input[type="color"] { width: 56px; height: 40px; flex: 0 0 56px; padding: 3px; cursor: pointer; }
.teamlist { display: grid; gap: 10px; margin-top: 16px; }
.teamcard { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; color: inherit; }
.teamcard > div { flex: 1; min-width: 0; }
.teamcard p { margin: 2px 0 0; }
.teamhead { display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin: 12px 0; }
.teamhead h2 { margin: 0; }
.teamtag { display: inline-block; min-width: 3.2em; text-align: center; padding: 4px 10px; border-radius: 6px; background: var(--grad); color: #0a0a0f; font-weight: 800; letter-spacing: 0.06em; }
.teammembers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.teammembers li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.news-version[open] summary { margin-bottom: 8px; }
.news-tab { margin-top: 10px; }
.news-tab > b { display: block; margin-bottom: 4px; color: var(--accent, #fff); }
.news-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.news-tabs .btn[aria-pressed="true"] { background: var(--glass2); color: var(--text); border-color: var(--text); }
.news-version ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.5; }
.pubfoot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 18px 16px 28px; font-size: 12px; }
.pubfoot a { color: var(--muted); text-decoration: none; }
.pubfoot a:hover { color: var(--text); }
.bulkrows { display: grid; gap: 10px; margin: 12px 0; }
.bulkrow { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.bulkrow small { grid-column: 2; }
.bulkuse { display: flex; gap: 8px; align-items: center; font-weight: 700; cursor: pointer; }
.bulkrow select:disabled { opacity: 0.4; }
@media (max-width: 560px) { .bulkrow { grid-template-columns: 1fr; } .bulkrow small { grid-column: 1; } }
.weathercell { font-size: 1.15rem; text-align: center; }
th.ctr, td.ctr { text-align: center; }
th.carcol, td.carcol { width: 1%; white-space: nowrap; padding-right: 28px; }
th.ctr, td.ctr { width: 11%; }
.bars { justify-content: center; gap: 6px; }
.rb { flex: 0 1 34px; max-width: 34px; }
.pen { color: var(--bad); font-weight: 700; }
.good { color: var(--ok); font-weight: 700; }
.bad { color: var(--bad); }
.block { display: block; }
.sessions { display: grid; gap: 10px; margin-top: 4px; }
.sess { padding: 0; overflow: hidden; }
.sess > summary { display: grid; grid-template-columns: minmax(150px, 1.6fr) 1fr 1fr 1fr; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; }
.sess > summary::-webkit-details-marker { display: none; }
.sess[open] > summary { background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--line); }
.sess table { width: 100%; }
.sess td, .sess th { padding: 8px 16px; text-align: left; }
.sess th { font-weight: 600; color: var(--muted); font-size: 12px; }
.sess tbody tr { border-top: 1px solid var(--line); }
@media (max-width: 760px) { .sess > summary { grid-template-columns: 1fr 1fr; } }
.kpis.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 10px; }
.kpis:not(.two) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .kpis:not(.two), .kpis.two { grid-template-columns: 1fr; } }

/* Fenetre de connexion : trois modes (connexion, creation de compte, mot de passe oublie) ; chaque champ n'apparait que dans ses modes. */
#loginDialog label[hidden], #loginDialog .authlinks button[hidden] { display: none; }
.authlinks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 12px; }
.reccode { display: block; padding: 12px 14px; border: 1px dashed var(--line, #444); border-radius: 10px; font-size: 18px; letter-spacing: 0.04em; word-break: break-all; user-select: all; }

/* « Comment envoyer tes temps » sur les ecrans vides. */
.howto { display: grid; gap: 10px; padding: 18px 20px; max-width: 640px; margin: 0 auto 14px; text-align: left; }
.howsteps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.howto .btn { justify-self: start; }
.wl-early { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

/* Aide et guides : cartes, guide pas a pas (sommaire collant, etapes, captures), contact. */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
.help-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px; color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.2s, background 0.2s; }
.help-card:hover { border-color: var(--a1); background: var(--glass2); transform: translateY(-2px); }
.help-card b { font-size: 15px; line-height: 1.25; }
.help-card small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.help-card .pill { margin-top: auto; }
.help-ic { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.25); font-size: 19px; }
.help-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 12px; }
.help-layout.solo { grid-template-columns: minmax(0, 1fr); }
.help-toc { position: sticky; top: 12px; display: grid; gap: 2px; padding: 12px; }
.help-toc small { padding: 0 4px 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.help-toc a { padding: 5px 8px; border-radius: 8px; color: var(--muted); font-size: 13px; line-height: 1.3; text-decoration: none; }
.help-toc a:hover { background: var(--glass2); color: var(--text); }
.help-steps { display: grid; gap: 12px; min-width: 0; }
.help-step { padding: 16px 18px; }
.help-step h2 { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.25; scroll-margin-top: 14px; }
.help-step h2:not(:first-child) { margin-top: 18px; }
.help-step p, .help-step li { max-width: 74ch; line-height: 1.55; }
.help-step p { margin: 4px 0; }
.help-step ul { margin: 6px 0; padding-left: 20px; }
.help-step li { margin: 3px 0; }
.help-step strong { color: var(--text); }
.help-step a { color: var(--text); text-decoration-color: var(--a2); text-underline-offset: 3px; }
.help-step code { padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.3); font-family: "Cascadia Mono", Consolas, monospace; font-size: 0.92em; }
.help-step blockquote { margin: 10px 0; padding: 10px 14px; max-width: 74ch; border-left: 3px solid var(--a2); border-radius: 0 10px 10px 0; background: rgba(0, 0, 0, 0.25); color: var(--muted); }
.help-shot { display: block; width: fit-content; max-width: 100%; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(0, 0, 0, 0.3); text-decoration: none; }
.help-shot img { display: block; width: auto; max-width: 100%; height: auto; transition: transform 0.25s; }
.help-shot:hover img { transform: scale(1.01); }
.help-around { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; margin-top: 14px; }
.help-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; padding: 14px 18px; }
.help-contact .gap { flex: 1 1 260px; }
@media (max-width: 900px) { .help-layout { grid-template-columns: minmax(0, 1fr); } .help-toc { position: static; } }

/* Setup : un peu plus compact pour que la fenêtre n'ait pas de barre de défilement (amortisseurs : 4 panneaux de 4 à 6 réglages) */
dialog.setupdlg { max-height: 94vh; padding: 14px 18px; }
.setupdlg .sg-row { padding: 3px 10px; }
.setupdlg .sg-value { font-size: 0.95rem; }
.setupdlg .sg-label { font-size: 10.5px; }
.setupdlg .sg-name { padding: 5px; font-size: 11px; }
.setupdlg .sg-corners { min-height: 0; gap: 8px; padding: 8px; }
.setupdlg .sg-title { margin-bottom: 2px; }
.setupdlg .sg-line { min-height: 0; justify-content: flex-start; padding: 10px; }

/* Avant à gauche, arrière à droite, centre au milieu (trois panneaux de même largeur) */
.setupdlg .sg-line.axle { justify-content: space-between; }
.setupdlg .sg-line.axle .sg-panel { width: min(320px, 31.5%); max-width: none; }
@media (max-width: 820px) { .setupdlg .sg-line.axle .sg-panel { width: 100%; } }

/* Mes setups : « 3 versions » est un bouton qui déroule les versions, sans passer par le menu */
.pill.vlink { cursor: pointer; border: 1px solid var(--a1); background: color-mix(in srgb, var(--a1) 14%, transparent); color: inherit; font: inherit; font-size: 12px; font-weight: 800; }
.pill.vlink:hover, .pill.vlink.on { background: var(--grad); color: #0a0a0f; border-color: transparent; }

/* Médailles */
.medals { --gold: #f5c542; --silver: #c6ccd6; --bronze: #d98a43; display: flex; flex-direction: column; gap: 18px; }
.mdisc { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.35); }
.mdisc.or { background: radial-gradient(circle at 32% 28%, #fff4bd, var(--gold) 48%, #a8730a); }
.mdisc.argent { background: radial-gradient(circle at 32% 28%, #ffffff, var(--silver) 48%, #6f7887); }
.mdisc.bronze { background: radial-gradient(circle at 32% 28%, #ffd9b0, var(--bronze) 48%, #8a4a17); }
.mdisc.vide { background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 2px var(--line); }
.mhero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 22px 26px; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--a1) 26%, transparent), transparent 60%), var(--glass); }
.mring { --p: 0; position: relative; width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.09) 0); display: grid; place-items: center; }
.mring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #10131b; }
.mring span { position: relative; z-index: 1; font-size: 32px; font-weight: 900; line-height: 1; text-align: center; }
.mring small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.mtitle { margin: 0 0 4px; font-size: 26px; font-weight: 900; letter-spacing: -0.01em; }
.mtitle + .gap { margin: 0 0 14px; }
.mbig { display: flex; flex-wrap: wrap; gap: 10px; }
.mbig div { display: flex; gap: 10px; align-items: center; min-width: 96px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, 0.25); }
.mbig .mdisc { width: 26px; height: 26px; }
.mbig b { font-size: 24px; line-height: 1; }
.mbig small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.mtabs { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.msum { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.mtot { font-size: 28px; line-height: 1; font-weight: 900; }
.mtot small { color: var(--muted); font-size: 15px; font-weight: 600; }
.mcount { display: inline-flex; gap: 12px; }
.mc { display: inline-flex; gap: 5px; align-items: center; font-weight: 800; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 16px; color: inherit; text-align: left; overflow: hidden; transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s; }
.mcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); opacity: 0.8; }
.mcard:hover, .mcard:focus-visible { border-color: var(--a1); transform: translateY(-3px); box-shadow: 0 14px 30px -18px var(--a1); }
.mcard.full { border-color: color-mix(in srgb, var(--gold) 60%, transparent); box-shadow: inset 0 0 40px -22px var(--gold); }
.mcard.full::before { background: linear-gradient(90deg, #a8730a, var(--gold), #fff4bd); opacity: 1; }
.mcard b { font-size: 17px; font-weight: 800; }
.mcard .mtot { font-size: 30px; }
.mbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.mbar i { display: block; height: 100%; }
.mbar .or { background: var(--gold); }
.mbar .argent { background: var(--silver); }
.mbar .bronze { background: var(--bronze); }
.mback { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.mlist { display: flex; flex-direction: column; }
.mrow { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 18px 14px 20px; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: 0; }
.mrow::before { content: ""; position: absolute; inset: 8px auto 8px 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--line); }
.mrow.m-or::before { background: var(--gold); }
.mrow.m-argent::before { background: var(--silver); }
.mrow.m-bronze::before { background: var(--bronze); }
.mrow.todo { opacity: 0.6; }
.mrow > .mdisc { width: 30px; height: 30px; }
.minfo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.minfo b { font-size: 15px; }
.minfo .gap, .mres .gap { font-size: 12px; }
.mladder { display: flex; gap: 10px; }
.mstep { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }
.mstep .mdisc { width: 18px; height: 18px; opacity: 0.28; filter: grayscale(0.4); }
.mstep.on .mdisc { opacity: 1; filter: none; }
.mstep.on { color: var(--text); font-weight: 800; }
.mres { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 96px; font-variant-numeric: tabular-nums; }
.mres b { font-size: 18px; }
@media (max-width: 760px) { .mhero { grid-template-columns: auto minmax(0, 1fr); } .mtabs { grid-column: 1 / -1; align-items: stretch; } .mring { width: 100px; height: 100px; } .mring span { font-size: 24px; } }
@media (max-width: 640px) { .mrow { grid-template-columns: auto minmax(0, 1fr); } .mladder, .mres { grid-column: 2; align-items: flex-start; } .mres { align-items: flex-start; } }
.mphoto { display: block; height: 104px; margin: -18px -18px 0; background: linear-gradient(transparent 30%, rgba(8, 10, 14, 0.92)), var(--photo, none) 50% 40% / cover no-repeat; transition: transform 0.4s; }
.mcard { gap: 10px; }
.mcard::before { display: none; }
.mcard:hover .mphoto { transform: scale(1.04); }
.mcard .mtot { margin-top: -26px; position: relative; z-index: 1; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.mcard b { position: relative; z-index: 1; }
.mhero.bgphoto::before { opacity: 0.7; }
a.kpi.kmedal { display: block; color: inherit; text-decoration: none; transition: border-color 0.2s, transform 0.15s; }
a.kpi.kmedal:hover, a.kpi.kmedal:focus-visible { border-color: var(--gold, #f5c542); transform: translateY(-2px); }
a.kpi.kmedal .mcount { margin-top: 4px; gap: 10px; font-size: 13px; }
a.kpi.kmedal .mdisc { width: 13px; height: 13px; }
:root { --gold: #f5c542; --silver: #c6ccd6; --bronze: #d98a43; }
.mhero.bgphoto::before { opacity: 0.5; -webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 100%); mask-image: linear-gradient(90deg, transparent 38%, #000 100%); }
.mhero .mtitle, .mhero .gap, .mhero .mbig { position: relative; z-index: 1; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.mcard b { margin-top: -38px; font-size: 18px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9); }
.mcard .mtot { margin-top: 0; text-shadow: none; font-size: 28px; }
div.kpi.kmedal .mcount { margin-top: 4px; gap: 10px; font-size: 13px; }
div.kpi.kmedal .mdisc { width: 13px; height: 13px; }

/* Classements des médailles */
.rk-stack { display: flex; flex-direction: column; gap: 14px; }
.rk-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.rk-ring { width: 96px; height: 96px; }
.rk-ring span { font-size: 38px; }
.rk { display: flex; flex-direction: column; }
.rk-head, .rk-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto minmax(110px, auto); gap: 14px; align-items: center; padding: 11px 18px; }
.rk-head { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line); }
.rk-row { border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rk-head + .rk-row { border-top: 0; }
.rk-row.me { background: color-mix(in srgb, var(--a1) 12%, transparent); box-shadow: inset 3px 0 0 var(--a1); }
.rk-cols { display: grid; grid-template-columns: repeat(3, 76px); gap: 6px; text-align: center; }
.rk-cols.one { grid-template-columns: 110px; text-align: right; }
.rk-head .rk-cols span { display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.rk-end { text-align: right; }
.rk-name { color: inherit; font-weight: 800; text-decoration: none; }
.rk-name:hover { text-decoration: underline; }
.rk-name small { color: var(--a1); font-weight: 700; }
.rk-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.rk-disc { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); font-size: 13px; font-weight: 900; color: var(--muted); }
.rk-disc.r1 { background: radial-gradient(circle at 32% 28%, #fff4bd, var(--gold) 55%, #a8730a); color: #1a1405; border-color: transparent; }
.rk-disc.r2 { background: radial-gradient(circle at 32% 28%, #fff, var(--silver) 55%, #6f7887); color: #14161a; border-color: transparent; }
.rk-disc.r3 { background: radial-gradient(circle at 32% 28%, #ffd9b0, var(--bronze) 55%, #8a4a17); color: #1c1006; border-color: transparent; }
.rk-disc.off { opacity: 0.4; }
.rk.partial { opacity: 0.8; }
.rk-empty { padding: 18px; text-align: center; }
@media (max-width: 640px) { .rk-head, .rk-row { grid-template-columns: 34px minmax(0, 1fr) auto; } .rk-cols { display: none; } .rk-cols.one { display: none; } }
.ai-tag { margin-left: 10px; padding: 2px 8px; border: 1px solid var(--a2); border-radius: 99px; color: var(--a2); font-size: 11px; font-weight: 800; letter-spacing: 0.03em; vertical-align: 2px; white-space: nowrap; }

/* Médailles : en-tête et lignes au style du site */
.medals .hero .gap { margin: 6px 0 0; }
.medals .hero .mtabs { flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: 12px; gap: 10px; }
.mbn { display: inline-flex; gap: 7px; align-items: center; }
.mbn .mdisc { width: 15px; height: 15px; }
.hero-stats b.num .mdisc { vertical-align: -2px; }
.medals .podium { margin-bottom: 4px; }
.medals .pod .mdisc { width: 15px; height: 15px; vertical-align: -2px; }
.mtab td, .mtab th { white-space: nowrap; }
.mtab .cnt { text-align: center; font-variant-numeric: tabular-nums; }
.mtab th.cnt .mdisc { margin-right: 6px; vertical-align: -2px; }
.mtab .tot { text-align: right; font-variant-numeric: tabular-nums; }
.mtab tbody tr { cursor: default; }
.mtab .who a { color: inherit; font-weight: 700; text-decoration: none; }
.mtab .who a:hover { text-decoration: underline; }
.mtab .who small { color: var(--a2); font-weight: 700; }
.mpartial { opacity: 0.85; margin-top: 12px; }
@media (max-width: 640px) { .mtab .hide-s { display: none; } }
.medals a.pod { text-decoration: none; color: inherit; }
.medals .pod .pgap .mdisc { margin: 0 2px; }
@media (max-width: 640px) {
  .mtab th, .mtab td { padding: 6px 7px; }
  .mtab th.cnt { font-size: 0; }
  .mtab .who { gap: 6px; }
  .mtab .who a { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
  .mtab .who small { display: none; }
}
/* Cloche des notifications. */
.bell { position: relative; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.bell > span:first-child { filter: grayscale(1) brightness(1.1); opacity: 0.55; }
.bell:hover > span:first-child { opacity: 0.85; }
.bell.has > span:first-child { filter: none; opacity: 1; }
.bell:hover { color: var(--text); border-color: var(--muted); }
.bell.has { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 16%, transparent); color: var(--text); box-shadow: 0 0 14px -4px var(--a2); }
.bellcount { position: absolute; top: -6px; right: -6px; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.notif-panel { position: fixed; top: 54px; right: 16px; z-index: 30; width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); box-shadow: 0 20px 50px -20px #000; }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-list { display: grid; }
.notif { display: grid; gap: 2px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; cursor: pointer; }
.notif:hover { background: var(--glass); }
.notif.unread { box-shadow: inset 3px 0 0 var(--a2); }
.notif.unread b::before { content: "● "; color: var(--a2); }
.notif-empty { margin: 0; padding: 22px 14px; text-align: center; }
.notifstack { display: grid; gap: 14px; }
.notifsub { margin: 6px 4px 0; font-size: 15px; color: var(--muted); }

.ndot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--grad); }
.notif-all { display: block; padding: 10px 14px; text-align: center; font-size: 0.85rem; font-weight: 700; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.notifpage { max-width: 720px; }
.notifpage .notif { width: 100%; }
.notifpage .tabs { display: flex; gap: 8px; margin: 12px 0; }
.notif-row { display: flex; align-items: stretch; gap: 6px; }
.notif-row .notif { flex: 1; }
.notif-del { background: none; border: 0; color: inherit; opacity: 0.55; cursor: pointer; padding: 0 10px; font-size: 1rem; }
.notif-del:hover { opacity: 1; }
/* Classement : la classe de la voiture passe sous son nom (une seule ligne pour le nom) plutot que d'elargir le tableau. */
td.carcell { white-space: nowrap; }
td.carcell .tagc { display: table; margin: 2px 0 0; }

/* Trace de conduite d'un chrono (prototype). */
.tracecard { margin: 10px 0; }
.tracebody { display: grid; gap: 10px; margin-top: 12px; }
.tmap { position: relative; }
.tmap svg, .tchart svg { width: 100%; height: auto; display: block; border-radius: 14px; background: #0b0e15; }
.tmap svg { max-height: 50vh; }
.tgrid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.tcol { display: grid; gap: 8px; align-content: start; }
@media (max-width: 900px) { .tgrid { grid-template-columns: 1fr; } }
.tchart svg { max-height: 120px; border: 1px solid var(--line); }
.tlabel { color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.tinfo { display: flex; flex-wrap: wrap; gap: 8px; min-height: 58px; align-items: stretch; }
.tchip { display: grid; gap: 2px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.tchip small { color: var(--muted); font-size: 11px; font-weight: 700; }
.tchip b { font-size: 16px; }
.tchip.big { border-color: var(--c, var(--line)); box-shadow: 0 0 0 1px var(--c, transparent) inset; }
.tchip.big b { font-size: 22px; color: var(--c, inherit); }
.tchip.late b { color: #f08a82; }
.tchip.early b { color: #6fe3a1; }
.tlegend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; }
.tlegend .tbar { width: 160px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(96,128,212), rgb(84,176,158) 35%, rgb(222,192,104) 65%, rgb(220,112,98)); }
.tlegend .tghost { margin-left: auto; }
.tsect { width: 100%; border-collapse: collapse; font-size: 13px; }
.tsect th { padding: 4px 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: left; }
.tsect td { padding: 6px 8px; border-top: 1px solid var(--line); }
dialog.tracedlg { width: min(1360px, 97vw); max-height: 94vh; }
dialog.tracedlg .tmap svg { max-height: 66vh; }
/* Classement : colonnes plus serrees pour que la derniere (date) ne soit pas rognee avec la colonne vitesse moyenne et le panneau de detail. */
.rtable th, .rtable td { padding-left: 8px; padding-right: 8px; }
.tracecard small { margin-left: 6px; }

/* Mes medailles : une ligne qui a des secteurs se deplie au clic (comme dans les defis). */
.mrow.expandable { cursor: pointer; }
.mrow.expandable:hover { background: var(--glass2); }
.mchev { margin-left: 6px; color: var(--muted); font-size: 12px; transition: transform 0.15s; }
.mrow.open .mchev { transform: rotate(180deg); }
.mrow .msec-panel { grid-column: 1 / -1; flex: 0 0 100%; justify-content: flex-end; padding: 6px 4px 2px; }
/* Classement d'une epreuve : secteurs sous le temps des trois premiers, lignes depliables au-dela. */
.pod .psec { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
tr.xrow { cursor: pointer; }
tr.xrow:hover { background: var(--glass2); }

.firststeps { display: grid; gap: 14px; padding: 18px 22px; border: 2px solid var(--a1); background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 26%, transparent), color-mix(in srgb, var(--a1) 8%, transparent)), var(--glass); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 14%, transparent); }
.fshead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.fshead > div > b { font-size: 20px; }
.fshead p, .fstep p { margin: 2px 0 0; }
.fsteps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.fstep { display: grid; gap: 4px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--bg, #000) 40%, transparent); }
.fstep.on { border: 2px solid var(--a1); padding: 11px; background: color-mix(in srgb, var(--a1) 16%, transparent); }
.fstep.on .btn { padding: 10px 16px; font-size: 15px; }

/* Administration, Imports : une carte par joueur et par cause. */
.prob { padding: 14px 16px; margin: 10px 0; }
.prob-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 8px; }
.prob-who { display: flex; flex-direction: column; gap: 2px; }
.prob-flag { color: var(--bad, #ef6a6a); font-size: .85em; font-weight: 600; }
.prob p { margin: 4px 0; overflow-wrap: anywhere; }
.prob > div + div { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.prob-ctx ul { margin: 4px 0 4px 18px; padding: 0; }
.prob-ctx li { margin: 2px 0; }
.prob-tech { margin-top: 8px; }
.prob-tech summary { cursor: pointer; }
.prob.verdict { font-size: 1.1em; }
.prob.verdict.ok { border-color: rgba(61,220,132,.4); }
.prob.verdict.todo { border-color: rgba(240,166,74,.5); }
