/* =====================================================================
   Thème inspiré de Material UI (palette et typographie par défaut) :
   barre d'application bleue, onglets soulignés, « Paper », tableaux,
   champs « outlined », puces, accordéons.
   ===================================================================== */
:root {
  --primary: #1976d2;
  --primary-dark: #1565c0;
  --primary-rgb: 25, 118, 210;
  --secondary: #9c27b0;
  --success: #2e7d32;
  --error: #d32f2f;
  --warning: #ed6c02;
  --grey-500: #9e9e9e;
  --text: rgba(0, 0, 0, .87);
  --text-2: rgba(0, 0, 0, .6);
  --text-disabled: rgba(0, 0, 0, .38);
  --divider: rgba(224, 224, 224, 1);
  --divider-2: rgba(0, 0, 0, .12);
  --input-border: rgba(0, 0, 0, .23);
  --hover: rgba(0, 0, 0, .04);
  --selected: rgba(0, 0, 0, .08);
  --chip: rgba(0, 0, 0, .08);
  --bg: #fff;
  --paper: #fff;
  --root-border: #e5e4e7;
  --appbar: #1976d2;
  --chart-grid: #ccc;
  --chart-text: #666;
  --shadow-1: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
  --shadow-4: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12);
  --alert-info-bg: rgb(229, 246, 253);   --alert-info-fg: rgb(1, 67, 97);
  --alert-warn-bg: rgb(255, 244, 229);   --alert-warn-fg: rgb(102, 60, 0);
  --alert-error-bg: rgb(253, 237, 237);  --alert-error-fg: rgb(95, 33, 33);
  --alert-ok-bg: rgb(237, 247, 237);     --alert-ok-fg: rgb(30, 70, 32);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(0,0,0,0.54)' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  --font: "Roboto", "Helvetica", "Arial", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #90caf9;
    --primary-dark: #42a5f5;
    --primary-rgb: 144, 202, 249;
    --secondary: #ce93d8;
    --success: #66bb6a;
    --error: #f44336;
    --warning: #ffa726;
    --grey-500: #757575;
    --text: #fff;
    --text-2: rgba(255, 255, 255, .7);
    --text-disabled: rgba(255, 255, 255, .5);
    --divider: rgba(81, 81, 81, 1);
    --divider-2: rgba(255, 255, 255, .12);
    --input-border: rgba(255, 255, 255, .23);
    --hover: rgba(255, 255, 255, .08);
    --selected: rgba(255, 255, 255, .16);
    --chip: rgba(255, 255, 255, .16);
    --bg: #16171d;
    --paper: #1e1f26;
    --root-border: #2e303a;
    --appbar: #272a35;
    --chart-grid: #3a3d48;
    --chart-text: #9ca3af;
    --shadow-1: 0 2px 1px -1px rgba(0,0,0,.5), 0 1px 1px 0 rgba(0,0,0,.4), 0 1px 3px 0 rgba(0,0,0,.4);
    --shadow-4: 0 2px 4px -1px rgba(0,0,0,.5), 0 4px 5px 0 rgba(0,0,0,.4), 0 1px 10px 0 rgba(0,0,0,.4);
    --alert-info-bg: rgb(7, 19, 24);       --alert-info-fg: rgb(184, 231, 251);
    --alert-warn-bg: rgb(25, 18, 7);       --alert-warn-fg: rgb(255, 226, 183);
    --alert-error-bg: rgb(22, 11, 11);     --alert-error-fg: rgb(244, 199, 199);
    --alert-ok-bg: rgb(12, 19, 13);        --alert-ok-fg: rgb(204, 232, 205);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.7)' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: .00938em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; }

/* ----- Colonne centrale (comme le #root du site de référence) ----- */
#root {
  width: 1126px; max-width: 100%; min-height: 100svh; margin: 0 auto;
  display: flex; flex-direction: column;
  border-inline: 1px solid var(--root-border);
}
.container { width: 100%; max-width: 1200px; margin: 32px auto 0; padding: 0 24px 48px; text-align: center; }
@media (max-width: 599px) { .container { padding: 0 16px 40px; margin-top: 24px; } }

/* ----- Typographie ----- */
.h5 { font-size: 1.5rem; font-weight: 400; line-height: 1.334; margin: 0; }
.h6 { font-size: 1.25rem; font-weight: 500; line-height: 1.6; letter-spacing: .0075em; margin: 0 0 .35em; }
.subtitle2 { font-size: .875rem; font-weight: 700; line-height: 1.57; letter-spacing: .00714em; color: var(--text-2); margin: 0 0 .35em; }
.body2 { font-size: .875rem; line-height: 1.43; letter-spacing: .01071em; margin: 0; }
.caption { font-size: .75rem; line-height: 1.66; letter-spacing: .03333em; color: var(--text-2); margin: 0; }
.note { margin-top: 16px; }
.text-secondary { color: var(--text-2); }
.text-disabled { color: var(--text-disabled); }
.text-success { color: var(--success); }
.text-error { color: var(--error); margin-top: 16px; }
td.text-error { margin: 0; }
.txt-v { color: var(--success); }
.txt-d { color: var(--error); }
.bold { font-weight: 700; }
.medium { font-weight: 500; }
.small { font-size: .75rem; }
.nowrap { white-space: nowrap; }
.align-left { text-align: left !important; }
.align-center { text-align: center !important; }
.align-right { text-align: right !important; }
.color-primary { color: var(--primary); }
.color-secondary { color: var(--secondary); }
.color-disabled { color: var(--text-disabled); }

/* ----- Barre d'application ----- */
.appbar { background: var(--appbar); color: #fff; box-shadow: var(--shadow-4); position: relative; z-index: 10; }
.toolbar { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 0 24px; }
.appbar-titre {
  flex-grow: 1; min-width: 0; color: inherit; text-align: left;
  font-size: 1.25rem; font-weight: 500; line-height: 1.6; letter-spacing: .0075em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-titre:hover { text-decoration: none; }
.btn-texte {
  color: inherit; padding: 6px 8px; margin-right: 8px; border-radius: 4px;
  font-size: .875rem; font-weight: 500; letter-spacing: .02857em; text-transform: uppercase; white-space: nowrap;
}
.btn-texte:hover { text-decoration: none; background: rgba(255, 255, 255, .1); }
.appbar-recherche { display: flex; gap: 8px; }
.appbar-recherche select, .appbar-recherche input {
  font: inherit; font-size: 1rem; height: 40px; padding: 8.5px 14px; color: #fff;
  background-color: transparent; border: 1px solid rgba(255, 255, 255, .5); border-radius: 4px;
}
.appbar-recherche select {
  appearance: none; padding-right: 32px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 7px center / 24px;
}
.appbar-recherche select option { color: #000; background: #fff; }
.appbar-recherche input { width: 220px; }
.appbar-recherche input::placeholder { color: rgba(255, 255, 255, .7); }
.appbar-recherche select:hover, .appbar-recherche input:hover { border-color: #fff; }
.appbar-recherche select:focus, .appbar-recherche input:focus { outline: none; border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
@media (max-width: 599px) {
  .toolbar { flex-wrap: wrap; min-height: 56px; padding: 0 16px; }
  .appbar-recherche { order: 3; width: 100%; padding-bottom: 10px; }
  .appbar-recherche input { flex: 1; width: auto; min-width: 0; }
}

/* ----- Onglets ----- */
.tabs { display: flex; min-height: 48px; }
.tabs-scroll { overflow-x: auto; scrollbar-width: none; margin-bottom: 24px; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  min-width: 90px; max-width: 360px; min-height: 48px; padding: 12px 16px;
  color: var(--text-2); font-size: .875rem; font-weight: 500; line-height: 1.25;
  letter-spacing: .02857em; text-transform: uppercase; text-align: center;
  border-bottom: 2px solid transparent; transition: color .2s, background-color .2s;
}
.tab:hover { text-decoration: none; background: var(--hover); }
.tab.selected { color: var(--primary); border-bottom-color: var(--primary); }
.tabs-bar { border-bottom: 1px solid var(--divider-2); margin-bottom: 24px; }
.tabs-bar .tabs { margin-bottom: -1px; overflow-x: auto; scrollbar-width: none; }
.tabs-bar-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }

/* ----- En-tête de club ----- */
.entete-club { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; text-align: left; }

/* ----- Paper / cartes / grilles ----- */
.paper { background: var(--paper); color: var(--text); border-radius: 4px; box-shadow: var(--shadow-1); text-align: left; }
.paper-outlined { box-shadow: none; border: 1px solid var(--divider-2); }
.card { padding: 16px 16px 24px; }
.card-titre { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: .35em; }
.card-titre .h6 { margin: 0; }
.link-inherit { color: inherit; text-align: left; }
.grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.grid-gap-2 { gap: 16px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stack { display: flex; flex-direction: column; }
.stack-3 { gap: 24px; }
.stack-4 { gap: 32px; }
.stack-row { display: flex; gap: 16px; margin-bottom: 24px; }
.stack-left { justify-content: flex-start; margin-bottom: 16px; }
@media (max-width: 599px) { .stack-row:not(.stack-left) { flex-direction: column; } }
.grow { flex: 1; }
.full { width: 100%; }
.bloc-mb { margin-bottom: 24px; }
.bloc-mb-sm { margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-top: 8px; }
.kpi { display: flex; flex-direction: column; align-items: center; padding: 12px; background: var(--hover); border-radius: 4px; }
.kpi-val { font-size: 1.5rem; font-weight: 500; line-height: 1.3; }

/* ----- Tableaux ----- */
.table-container { width: 100%; overflow-x: auto; }
.table-sticky { max-height: 70vh; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.43; letter-spacing: .01071em; text-align: left; }
.table th, .table td { padding: 16px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.table th { font-weight: 500; line-height: 1.5rem; color: var(--text); }
.table-small th, .table-small td { padding: 6px 16px; }
.table tbody tr:last-child > td { border-bottom: none; }
.table-dense th, .table-dense td { padding-left: 8px; padding-right: 8px; }
@media (max-width: 599px) { .table-dense th, .table-dense td { padding-left: 4px; padding-right: 4px; } }
.row-selected { background: var(--selected); font-weight: 700; }
.row-hl, .row-group { background: var(--hover); }
.row-group > td, .row-no-border > td { border-bottom: none !important; }
.row-hover:hover { background: var(--hover); }
.collapse-cell { padding-top: 0 !important; padding-bottom: 0 !important; }
.collapse-inner { margin: 8px; }
.collapse-indent { padding-left: 16px; }
.ellipsis { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 600px) { .ellipsis { max-width: 180px; } }
@media (min-width: 900px) { .ellipsis { max-width: none; } }
@media (max-width: 599px) { .hide-xs { display: none; } }
@media (max-width: 899px) { .hide-sm { display: none; } }
.feuille { padding: 0 !important; background: var(--hover); }
.sticky-header thead th { position: sticky; top: 0; z-index: 2; background: var(--paper); }
.sticky-col { position: sticky; left: 0; z-index: 1; background: var(--paper); min-width: 150px; font-weight: 500; }
th.sticky-col { z-index: 3; font-weight: 700; }
th.col-total { background: color-mix(in srgb, var(--paper), var(--text) 8%); font-weight: 700; }
.table-sticky th { font-weight: 700; }

/* Étiquette de tri (TableSortLabel) */
.sort-label { display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.sort-label:hover { color: var(--text-2); }
.sort-label:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
.sort-icon { margin-left: 4px; opacity: 0; transition: opacity .2s, transform .2s; }
.sort-icon svg { width: 18px; height: 18px; }
.sort-label:hover .sort-icon { opacity: .5; }
.sort-label.active { color: var(--text); }
.sort-label.active .sort-icon { opacity: 1; color: var(--text-2); }
.sort-label.asc .sort-icon { transform: rotate(180deg); }

/* ----- Icônes, boutons, puces ----- */
.svg-icon { display: inline-flex; vertical-align: middle; }
.svg-icon svg, .icon-btn svg { width: 24px; height: 24px; fill: currentColor; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 8px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn-small { padding: 5px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 64px;
  font: inherit; font-size: .875rem; font-weight: 500; line-height: 1.75; letter-spacing: .02857em;
  text-transform: uppercase; border-radius: 4px; cursor: pointer; transition: background-color .25s, border-color .25s;
}
.btn-outlined { padding: 5px 15px; color: var(--primary); background: transparent; border: 1px solid rgba(var(--primary-rgb), .5); }
.btn-outlined:hover { background: rgba(var(--primary-rgb), .04); border-color: var(--primary); }
.btn:disabled { color: var(--text-disabled); border-color: var(--divider-2); cursor: default; background: transparent; }
.link { color: var(--primary); }
.link-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.chips { text-align: left; }
.chip {
  display: inline-flex; align-items: center; height: 32px; max-width: 100%; margin: 0 8px 8px 0;
  border-radius: 16px; background: var(--chip); color: var(--text); font-size: .8125rem; vertical-align: middle;
}
.chip-label { padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-delete { display: inline-flex; padding: 0; margin: 0 5px 0 -6px; border: 0; background: none; color: var(--text-disabled); cursor: pointer; }
.chip-delete:hover { color: var(--text-2); }
.chip-delete svg { width: 22px; height: 22px; fill: currentColor; }
.chip-primary { background: var(--primary); color: #fff; padding: 0 12px; margin: 0; }
@media (prefers-color-scheme: dark) { .chip-primary { color: rgba(0, 0, 0, .87); } }

/* ----- Champs « outlined » (TextField / Select) ----- */
.textfield { position: relative; min-width: 0; text-align: left; }
.textfield.full { margin-bottom: 24px; }
.textfield input, .textfield select {
  display: block; width: 100%; height: 56px; padding: 16.5px 14px;
  font: inherit; font-size: 1rem; color: var(--text); background-color: transparent;
  border: 1px solid var(--input-border); border-radius: 4px; transition: border-color .15s;
}
.textfield input::-webkit-search-cancel-button { cursor: pointer; }
.textfield input:hover, .textfield select:hover { border-color: var(--text); }
.textfield input:focus, .textfield select:focus { outline: none; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.textfield select { appearance: none; padding-right: 32px; cursor: pointer; background: var(--select-arrow) no-repeat right 7px center / 24px; }
.textfield select option { background: var(--paper); color: var(--text); }
.textfield label {
  position: absolute; left: 10px; top: 16px; padding: 0 4px; max-width: calc(100% - 24px);
  color: var(--text-2); font-size: 1rem; line-height: 1.4375em; pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform-origin: left top; transition: transform .2s, top .2s, color .2s;
}
.textfield input:focus ~ label,
.textfield input:not(:placeholder-shown) ~ label,
.textfield.shrink label { top: -9px; transform: scale(.75); max-width: calc(133% - 24px); background: var(--bg); }
.textfield input:focus ~ label, .textfield select:focus ~ label { color: var(--primary); }
.textfield .adornment { position: absolute; right: 8px; top: 8px; }
.textfield .adornment ~ label { max-width: calc(100% - 64px); }
.textfield:has(.adornment:not([hidden])) input { padding-right: 52px; }
.textfield-small input { height: 40px; padding: 8.5px 14px 8.5px 40px; }
.start-adornment { position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; fill: var(--text-2); pointer-events: none; }
.select-field.full select, .textfield.shrink select { margin: 0; }
form > .textfield.full { margin-bottom: 24px; }

/* ----- Cases à cocher (Checkbox + FormControlLabel) ----- */
.panneau-filtres { margin-bottom: 24px; padding: 16px; background: var(--hover); border-radius: 4px; }
.form-group { display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.checkbox { display: inline-flex; align-items: center; cursor: pointer; font-size: 1rem; text-align: left; }
.checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox .box {
  position: relative; flex: none; width: 18px; height: 18px; margin: 12px 12px 12px 3px;
  border: 2px solid var(--text-2); border-radius: 2px; transition: background-color .15s, border-color .15s;
}
.checkbox input:checked + .box { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked + .box::after {
  content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px;
  border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.checkbox input:focus-visible + .box { box-shadow: 0 0 0 8px rgba(var(--primary-rgb), .2); }

/* ----- Accordéons (calendrier) ----- */
.accordion { background: var(--paper); border-radius: 4px; box-shadow: var(--shadow-1); overflow: hidden; text-align: left; }
.accordion-summary {
  display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 16px;
  list-style: none; cursor: pointer; background: var(--hover); border-left: 4px solid var(--grey-500);
}
.accordion-summary::-webkit-details-marker { display: none; }
.accordion-summary .expand-icon { width: 24px; height: 24px; fill: var(--text-2); transition: transform .2s; flex: none; }
.accordion[open] .expand-icon { transform: rotate(180deg); }
.issue-win { border-left-color: var(--success); }
.issue-loss { border-left-color: var(--error); }
.issue-draw { border-left-color: var(--warning); }

/* ----- Alertes / progression / chargement ----- */
.alerte { margin: 0 0 16px; padding: 14px 16px; border-radius: 4px; font-size: .875rem; line-height: 1.43; text-align: left;
  background: var(--alert-error-bg); color: var(--alert-error-fg); }
.alerte-error { background: var(--alert-error-bg); color: var(--alert-error-fg); }
.alerte-info, .alerte-douce { background: var(--alert-info-bg); color: var(--alert-info-fg); }
.alerte-warning { background: var(--alert-warn-bg); color: var(--alert-warn-fg); }
.alerte-success { background: var(--alert-ok-bg); color: var(--alert-ok-fg); }
.alerte code { background: rgba(127, 127, 127, .15); padding: 1px 6px; border-radius: 4px; }
.progress { height: 10px; margin-top: 10px; border-radius: 5px; overflow: hidden; background: rgba(var(--primary-rgb), .3); }
.progress-barre { height: 100%; background: var(--primary); transition: width .4s; }
.spinner {
  width: 40px; height: 40px; margin: 32px auto; border-radius: 50%;
  border: 3.6px solid var(--primary); border-right-color: transparent; animation: tourne 1.4s linear infinite;
}
.spinner[hidden] { display: none; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ----- Graphique (Comparer les joueurs) ----- */
.graph { position: relative; width: 100%; text-align: left; }
.chart { display: block; max-width: 100%; }
.chart .grid { stroke: var(--chart-grid); stroke-dasharray: 5 5; }
.chart .axis { stroke: var(--chart-text); }
.chart .tick { fill: var(--chart-text); font-size: 12px; }
.chart .cursor { stroke: var(--chart-grid); }
.chart-tooltip {
  position: absolute; z-index: 5; min-width: 140px; max-width: 220px; padding: 10px; pointer-events: none;
  background: var(--paper); border: 1px solid var(--chart-grid); font-size: .875rem; white-space: nowrap;
}
.chart-tooltip p { margin: 0; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; }
.chart-tooltip-label { margin-bottom: 4px !important; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 8px 0 0; padding: 0; list-style: none; font-size: .875rem; }
.legend-line { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; }

/* ----- Pied de page ----- */
.pied { margin-top: auto; padding: 16px 24px 24px; border-top: 1px solid var(--divider-2); color: var(--text-2); font-size: .75rem; line-height: 1.66; text-align: center; }
.pied p { margin: 0 auto; max-width: 760px; }

/* =====================================================================
   Pages existantes (accueil, résultats, fiche joueur) au même style
   ===================================================================== */
.fil { font-size: .875rem; color: var(--text-2); margin-bottom: 16px; text-align: left; }

.hero { padding: 24px 0 8px; }
.hero h1 { font-size: clamp(1.75rem, 4.4vw, 3rem); font-weight: 400; line-height: 1.167; margin: 0 0 12px; }
.hero-sous { font-size: 1rem; color: var(--text-2); max-width: 620px; margin: 0 auto 24px; }
.hero-recherche { max-width: 640px; margin: 0 auto; background: var(--paper); border-radius: 4px; box-shadow: var(--shadow-1); padding: 16px; text-align: left; }
.onglets { display: flex; margin-bottom: 16px; border-bottom: 1px solid var(--divider-2); }
.onglet {
  position: relative; padding: 12px 16px; color: var(--text-2); cursor: pointer;
  font-size: .875rem; font-weight: 500; letter-spacing: .02857em; text-transform: uppercase;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.onglet input { position: absolute; opacity: 0; }
.onglet:has(input:checked) { color: var(--primary); border-bottom-color: var(--primary); }
.hero-champ { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-champ input {
  flex: 1; min-width: 150px; height: 56px; padding: 16.5px 14px; font: inherit; color: var(--text);
  background: transparent; border: 1px solid var(--input-border); border-radius: 4px;
}
.hero-champ input:focus { outline: none; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.champ-prenom { max-width: 180px; }
.champ-prenom[hidden] { display: none; }
.hero-champ button, .bouton {
  display: inline-flex; align-items: center; padding: 6px 22px; min-height: 56px; border: 0; border-radius: 4px;
  font: inherit; font-size: .9375rem; font-weight: 500; letter-spacing: .02857em; text-transform: uppercase;
  background: var(--primary); color: #fff; box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
  cursor: pointer;
}
.bouton { min-height: 0; padding: 8px 22px; }
.hero-champ button:hover, .bouton:hover { background: var(--primary-dark); text-decoration: none; }
@media (prefers-color-scheme: dark) { .hero-champ button, .bouton { color: rgba(0, 0, 0, .87); } }

.cartes-info, .grille-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 32px; }
.carte { background: var(--paper); border-radius: 4px; box-shadow: var(--shadow-1); padding: 16px; text-align: left; }
.carte h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 500; }
.carte p { margin: 0; color: var(--text-2); font-size: .875rem; }

.titre-page { font-size: 1.5rem; font-weight: 400; margin: 4px 0 6px; text-align: left; }
.compte { color: var(--text-2); font-size: .875rem; margin: 0 0 16px; text-align: left; }
.compte-inline { color: var(--text-2); font-weight: 400; font-size: .75em; }

.liste-resultats { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: 4px; box-shadow: var(--shadow-1); text-align: left; }
.ligne-resultat { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; color: var(--text); border-bottom: 1px solid var(--divider); }
.liste-resultats li:last-child .ligne-resultat { border-bottom: 0; }
.ligne-resultat:hover { background: var(--hover); text-decoration: none; }
.lr-nom { font-weight: 500; }
.lr-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); font-size: .8125rem; }
.puce { background: var(--chip); padding: 3px 10px; border-radius: 16px; }
.badge-clast { background: rgba(var(--primary-rgb), .12); color: var(--primary); font-weight: 500; padding: 3px 10px; border-radius: 16px; font-size: .8125rem; }

.entete-joueur { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; text-align: left;
  background: var(--appbar); color: #fff; border-radius: 4px; padding: 24px; box-shadow: var(--shadow-1); }
.ej-avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; background: rgba(255,255,255,.2);
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 500; }
.ej-ident { flex: 1; min-width: 180px; }
.ej-ident h1 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 400; }
.ej-club { margin: 0; }
.ej-club a { color: #fff; font-weight: 500; }
.ej-lic { margin: 2px 0 0; font-size: .8125rem; opacity: .8; }
.ej-points { display: flex; gap: 12px; }
.pt-bloc { background: rgba(255,255,255,.16); border-radius: 4px; padding: 12px 18px; text-align: center; min-width: 96px; }
.pt-val { display: block; font-size: 1.75rem; font-weight: 500; line-height: 1; }
.pt-lbl { display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; margin-top: 6px; }
.pt-mensuel { background: rgba(255,255,255,.1); }
@media (max-width: 599px) { .ej-points { width: 100%; } }

.grille-infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 16px; text-align: left; }
.info { background: var(--paper); border: 1px solid var(--divider-2); border-radius: 4px; padding: 8px 12px; }
.info-lbl { display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.info-val { display: block; font-weight: 500; margin-top: 2px; word-break: break-word; }

.bloc { background: var(--paper); border-radius: 4px; padding: 16px; box-shadow: var(--shadow-1); margin-top: 24px; text-align: left; }
.bloc h2 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 500; }

.spark-cadre { background: var(--hover); border-radius: 4px; padding: 12px; margin-bottom: 16px; }
.sparkline { width: 100%; height: 90px; display: block; }
.spark-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--primary); opacity: .1; }
.spark-pt { fill: var(--primary); }

.tableau-enveloppe { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.43; }
.tableau th { text-align: left; font-weight: 500; padding: 6px 16px; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.tableau td { padding: 6px 16px; border-bottom: 1px solid var(--divider); }
.tableau tbody tr:last-child td { border-bottom: none; }
.tableau tbody tr:hover { background: var(--hover); }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; }
.pd-date { white-space: nowrap; color: var(--text-2); }
.pd-epr { color: var(--text-2); font-size: .8125rem; }

.issue { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 16px; font-size: .8125rem; background: var(--chip); color: var(--text-2); }
.issue-v { background: var(--success); color: #fff; }
.issue-d { background: var(--error); color: #fff; }
@media (prefers-color-scheme: dark) { .issue-v, .issue-d { color: rgba(0, 0, 0, .87); } }

.badge-attente {
  display: inline-flex; align-items: center; height: 20px; margin-left: 8px; padding: 0 8px;
  border-radius: 10px; font-size: .6875rem; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
  vertical-align: middle; color: var(--alert-warn-fg); background: var(--alert-warn-bg);
  border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent);
}
.entete-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.entete-actions form { display: flex; align-items: center; gap: 8px; }
.sets { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-2); }
.set { display: inline-flex; align-items: center; gap: 2px; margin-right: 6px; }
.set:last-child { margin-right: 0; }
.set-g {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.75em; height: 1.75em; padding: 0 3px; box-sizing: border-box;
  border: 1.5px solid currentColor; border-radius: 999px; font-weight: 500;
}
.set-v { color: var(--success); }
.set-d { color: var(--error); }
.vide { text-align: center; color: var(--text-2); padding: 24px; background: var(--hover); border-radius: 4px; }
.brut { margin-top: 24px; text-align: left; }
.brut summary { cursor: pointer; color: var(--text-2); font-size: .875rem; padding: 8px 0; }
