/* Charte commune : les contrastes ne dépendent plus des anciennes couleurs sombres. */
:root { --rugby-green: #087a36; --rugby-green-dark: #07552a; --ink: #15261b; --muted: #496052; --line: #b9d5bd; }
* { box-sizing: border-box; }
body { line-height: 1.5; }
/* Une seule famille et une échelle commune, y compris les cartes dynamiques. */
:root { --font-ui: Arial, Helvetica, sans-serif; --font-body: .875rem; --font-caption: .75rem; --font-title: 1.25rem; --font-subtitle: 1rem; --font-display: 1.5rem; }
body { font-family: var(--font-ui); font-size: var(--font-body); }
body * { font-family: var(--font-ui) !important; }
body :is([class~="text-[8px]"], [class~="text-[9px]"], [class~="text-[10px]"], [class~="text-[11px]"], [class~="text-[12px]"], .text-xs) { font-size: var(--font-caption) !important; line-height: 1.5 !important; }
body :is(.text-sm, button, input, select, textarea, td, th) { font-size: var(--font-body); line-height: 1.5; }
body .text-xl { font-size: var(--font-title) !important; line-height: 1.3 !important; }
body h2, body h2[class] { font-size: var(--font-title) !important; line-height: 1.3 !important; }
body :is(h3, h4, h5, h6), body :is(h3, h4, h5, h6)[class] { font-size: var(--font-subtitle) !important; line-height: 1.4 !important; }
body h1, body h1[class] { font-size: var(--font-display) !important; line-height: 1.25 !important; }
body :is(.text-2xl, .text-3xl, .text-4xl):not(:is(h1, h2, h3, h4, h5, h6, button, input, select, textarea)) { font-size: var(--font-display) !important; line-height: 1.25; }
body :is(.text-lg, .text-base):not(:is(h1, h2, h3, h4, h5, h6, button, input, select, textarea)) { font-size: var(--font-subtitle) !important; }
svg text { font-family: var(--font-ui); }
body :is(h1, h2, h3, h4, h5, h6, .font-black) { font-weight: 700; }
body :is(.font-mono, #global-budget, #global-value) { font-variant-numeric: tabular-nums; }
body :is(button, label, h2, h3) { overflow-wrap: anywhere; }
/* Après les tailles compactes : un champ ne doit jamais hériter de son label
   ni varier selon une ancienne classe text-xs/text-[10px]. */
body :is(button, input, select, textarea, option), body :is(button, input, select, textarea, option)[class] { font-size: var(--font-body) !important; line-height: 1.5 !important; font-weight: 400; letter-spacing: normal !important; }
body button, body button[class] { font-weight: 600; }
body label { font-size: var(--font-caption) !important; font-weight: 600 !important; line-height: 1.5 !important; letter-spacing: normal !important; text-transform: none !important; overflow-wrap: normal; }
body :is(h1, h2, h3, h4, h5, h6) { letter-spacing: normal !important; }
button { touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [draggable]:focus-visible {
  outline: 3px solid #12619a; outline-offset: 3px;
}
button:disabled { cursor: not-allowed; opacity: .65; }
:is(#page-home, #page-auth, #page-creation, #page-password-forgot, #page-password-reset) { background: #fff !important; color: var(--ink); border-color: var(--line) !important; }
:is(#page-home, #page-auth, #page-creation, #page-password-forgot, #page-password-reset) :is(.text-white, .text-slate-200, .text-slate-300) { color: var(--ink) !important; }
:is(#page-home, #page-auth, #page-creation, #page-password-forgot, #page-password-reset) :is(.text-slate-400, .text-slate-500) { color: var(--muted) !important; }
:is(#page-home, #page-auth, #page-creation, #page-password-forgot, #page-password-reset) :is(.text-emerald-300, .text-emerald-400) { color: #07552a !important; }
:is(#page-home, #page-auth, #page-creation, #page-password-forgot, #page-password-reset) :is(input, select, textarea) { background: #fff !important; color: var(--ink) !important; border-color: #9dbfa3 !important; min-height: 40px; }
:is(#page-home, #page-auth, #page-creation, #page-password-forgot, #page-password-reset) :is(button.bg-emerald-500, button.bg-sky-500) { background: #087a36 !important; color: #fff !important; }
:is(#main-game, #super-admin-page, #match-center-modal, #game-header) :is(.text-emerald-200, .text-emerald-300, .text-emerald-400) { color: #07552a !important; }
:is(#main-game, #super-admin-page, #match-center-modal, #game-header) :is(.text-amber-200, .text-amber-300, .text-amber-400, .text-yellow-400) { color: #854600 !important; }
:is(#main-game, #super-admin-page, #match-center-modal, #game-header) :is(.text-sky-200, .text-sky-300, .text-sky-400, .text-blue-400) { color: #075985 !important; }
:is(#main-game, #super-admin-page, #match-center-modal) :is(.text-violet-300, .text-violet-400, .text-purple-300, .text-purple-400) { color: #6d28d9 !important; }
:is(#main-game, #super-admin-page, #match-center-modal) :is(.text-rose-200, .text-rose-300, .text-rose-400, .text-red-400) { color: #b42318 !important; }
:is(#main-game, #super-admin-page, #match-center-modal) :is(.bg-slate-800, .bg-slate-800\/50, .bg-slate-900\/50, .bg-slate-950\/50) { background-color: #f5faf5 !important; color: var(--ink) !important; border-color: var(--line) !important; }
:is(#main-game, #super-admin-page, #match-center-modal) :is([class*="bg-slate-900/"], [class*="bg-slate-950/"], [class*="bg-slate-800/"], .bg-slate-700) { background-color: #f3f9f2 !important; color: var(--ink) !important; border-color: var(--line) !important; }
:is(#main-game, #super-admin-page, #match-center-modal) [class*="bg-emerald-950"] { background: #e7f4e8 !important; color: #07552a !important; }
:is(#main-game, #super-admin-page, #match-center-modal) [class*="bg-rose-950"] { background: #fff1f2 !important; color: #9f1239 !important; }
#admin-health-cards { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
#admin-health-cards button { min-height: 85px; }
#admin-health-cards button > div { font-size: var(--font-caption); line-height: 1.5; }
#game-header :is(h1, #account-club-name, #paris-game-clock) { color: #07552a !important; }
#game-header #super-admin-page-trigger { color: #fff !important; }
#game-header #account-club-list { background: #fff !important; border-color: var(--line) !important; color: var(--ink); }
#game-header #account-club-list :is(.text-slate-200, .text-slate-300) { color: var(--ink) !important; }
#game-header #account-club-list :is(.text-slate-400, .text-slate-500) { color: var(--muted) !important; }
#main-game > nav { scrollbar-width: thin; scrollbar-color: #91c89c #07552a; }
#main-game > nav button { min-height: 40px; white-space: nowrap; }
#main-game > nav :is(button.bg-emerald-500, button.bg-emerald-600) { background: #fff !important; color: #07552a !important; }
:is(#main-game, #super-admin-page, #match-center-modal) :is(button.bg-emerald-500, button.bg-emerald-600, button.bg-emerald-700, button.bg-sky-500, button.bg-sky-600) { background: #087a36 !important; color: #fff !important; }
:is(#main-game, #super-admin-page, #match-center-modal) :is(button.bg-rose-500, button.bg-rose-600, button.bg-red-600) { background: #b42318 !important; color: #fff !important; }
#main-game :is(h2, h3), #super-admin-page :is(h2, h3) { line-height: 1.35; }
#main-game section, #main-game section > div, #main-game article, #super-admin-page section { min-width: 0; }
#main-game :is(p, td), #super-admin-page :is(p, td) { overflow-wrap: anywhere; }
#main-game :is(h2, h3), #super-admin-page :is(h2, h3) { overflow-wrap: normal; }
#tab-match-sheet aside:first-child > div:first-child { flex-wrap: wrap; }
#main-game :is(input, select, textarea), #super-admin-page :is(input, select, textarea) { min-height: 36px; border-width: 1px; border-radius: 6px; }
#main-game input[type="radio"], #main-game input[type="checkbox"] { min-height: auto; accent-color: #087a36; }
#main-game input[type="range"], #super-admin-page input[type="range"] { min-height: auto; }
#match-sheet-pitch, #match-sheet-pitch *, #match-sheet-pack-weight,
#match-sheet-pitch + div { color: #fff !important; }
#match-sheet-pitch { font-size: var(--font-caption); line-height: 1.5; }
#match-sheet-pitch > div > div { background: #07552a !important; border-color: #a7dfb5 !important; min-height: 30px; display: flex; align-items: center; justify-content: center; }
#tab-match-sheet section:has(> #match-sheet-pitch) > h3 { color: #fff !important; }
#match-center-modal .finance-table-heading, #main-game .finance-table-heading { color: #fff !important; }
#match-center-modal :is(.bg-slate-800, .bg-slate-700) { background: #f3f9f2 !important; }
#match-center-modal :is(.text-emerald-300, .text-sky-300, .text-blue-400, .text-white) { color: #15261b !important; }
/* Même barre de filtres pour Coupe et Championnat. Le titre a sa ligne,
   chaque libellé reste avec son champ et les groupes peuvent revenir à la ligne. */
.competition-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.competition-toolbar > h2 { flex: 1 0 100%; margin: 0; }
.competition-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; width: 100%; }
.competition-filter { display: flex; flex: 0 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
.competition-filter > label { white-space: nowrap; }
.competition-filter > select { width: auto; min-width: 116px; max-width: 100%; height: 40px; padding: 8px 32px 8px 10px !important; }
.competition-filter--round { flex: 1 1 170px; }
.competition-filter--round > select { width: 100%; }
:is(#main-game, #super-admin-page, #match-center-modal) .flex:has(> :is(h2, h3, h4)) { flex-wrap: wrap; gap: 12px; }
:is(#main-game, #super-admin-page) [role="tablist"] { flex-wrap: wrap; gap: 8px; }
@media (max-width: 420px) {
  .competition-filter { flex: 1 1 100%; }
  .competition-filter > select { width: 100%; }
}
@media (max-width: 767px) {
  #game-header { align-items: stretch; }
  #game-header > div:last-child { gap: 8px; }
  #game-header > div:last-child > div { flex: 1 1 130px; min-width: 0; }
  #main-game > section { padding: 16px; }
  #tab-match-sheet > div:first-child { flex-wrap: wrap; gap: 12px; }
  #match-sheet-player-pool { max-height: 260px; }
  #match-center-modal { padding: 8px; }
  #match-center-modal > div { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
