/* Adaptation autonome de l’identité visuelle JJBFight. */
:root {
  color-scheme: dark;
  --condensed: "Barlow Condensed", "Arial Narrow", sans-serif;
  --corps: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --display: var(--condensed);
  --body: var(--corps);
}
body.study-page {
  min-height: 100vh;
  background: #0e1013;
  font-family: var(--corps);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.study-page h1,
.study-page h2,
.study-page h3,
.study-page h4,
.study-brand strong { font-family: var(--condensed); }
.study-page button { font-family: var(--corps); }
.study-page .primary,
.study-page .study-section-entry,
.study-page .search-entry,
.study-page .folder,
.study-page .study-search-form button,
.study-page .competition-open,
.study-page .competition-back,
.study-page .run-add,
.auth-card button {
  font-family: var(--condensed);
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.eyebrow,
.count,
.source-badge,
.competition-count,
.run-marker,
.run-stage,
.run-watch,
.competition-year,
.competition-visual-source { font-family: var(--mono); }

.study-page .shell {
  grid-template-columns: 220px minmax(0,1fr);
  min-height: 100vh;
}
.study-page .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px 22px;
  border-right: 1px solid var(--line);
  background: #111418;
}
.study-brand { margin: 0 8px 32px; }
.study-brand strong {
  color: var(--ink);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.study-brand strong::first-letter { color: var(--blue); }
.study-brand span { margin-top: 2px; color: var(--muted); letter-spacing: .16em; }
.study-section-menu { gap: 3px; }
.study-section-entry { border-radius: 3px !important; font-size: 12px; font-weight: 600; }
.study-section-entry.active { box-shadow: inset 2px 0 var(--blue); }
.folder-navigation { border-color: var(--line); }
.study-page .search-entry,
.study-page .folder {
  border-radius: 3px;
  color: var(--muted);
  font-size: 12px;
}
.study-page .search-entry:hover,
.study-page .search-entry.active,
.study-page .folder:hover,
.study-page .folder.active {
  border-color: transparent;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 2px 0 var(--blue);
}
.sidebar-footer { border-top: 1px solid var(--line); padding-top: 18px; }
.sidebar-footer #logout { color: var(--muted); }

.study-page main { width: 100%; max-width: 1680px; margin: 0 auto; padding: 34px 42px 64px; }
.study-search { width: min(980px,100%); margin-top: clamp(44px,9vh,110px); }
.study-search::before {
  content: 'COMBATS';
  display: block;
  margin-bottom: 12px;
  color: var(--blue);
  font: 700 10px ui-monospace,monospace;
  letter-spacing: .18em;
}
.study-search h1 { font-weight: 700; letter-spacing: .045em; }
.study-search-form { border-color: #697078; }
.study-search-form:focus-within { border-color: var(--blue); }
.study-search-form input,
.study-search-form select,
.athlete-search-form input {
  color: var(--ink);
  caret-color: var(--blue);
}
.study-search-form input::placeholder,
.athlete-search-form input::placeholder { color: #6f777e; }
.study-search-form select { background: transparent; }
.study-search-form select option { background: var(--surface); }
.search-context { color: var(--muted); }
.study-results { border-top-color: var(--line); }
.search-result { border-color: var(--line); }
.source-badge { background: #17283b; color: #78aee9; }

.athlete-sheet-head,
.athlete-competition,
.competition-detail { box-shadow: none; }
.athlete-sheet-head { border-top-width: 2px; }
.athlete-avatar { border-color: #49515a; background: #173e61; }
.athlete-stats strong { color: #71a8e6; }
.competition-visual { background: radial-gradient(circle at 76% 20%,#245d91 0,transparent 42%),linear-gradient(135deg,#132332,#080d12); }
.run-outcome.win { background: #183526; color: #70c795; }
.run-outcome.loss { background: #3b2020; color: #df9898; }

.auth-screen {
  min-height: 100vh;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px;
  grid-template-columns: minmax(0,1.25fr) minmax(330px,.75fr);
}
.auth-intro .eyebrow { color: var(--blue); }
.auth-intro h1 {
  margin: 14px 0 20px;
  color: var(--ink);
  font-size: clamp(58px,8vw,104px);
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.auth-intro h1 span { color: var(--blue); }
.auth-intro > p { max-width: 420px; color: var(--muted); font-size: 15px; }
.auth-card {
  padding: 30px;
  border-color: var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: none;
}
.auth-card h2 { color: var(--ink); font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.auth-card label { color: var(--muted); }
.auth-card input {
  border-color: #30363c;
  border-radius: 3px;
  background: #0e1013;
  color: var(--ink);
}
.auth-card input:focus { border-color: var(--blue); outline: 1px solid var(--blue); }
.auth-card .primary { min-height: 45px; border-radius: 3px; }

.study-page dialog { color: var(--ink); }
.study-page dialog input { background: #0e1013; }
.transfer-fight,.transfer-folders { border-color: var(--line); background: #111418; }

@media(max-width:900px) {
  .study-page .shell { grid-template-columns: 1fr; }
  .study-page .sidebar { position: relative; height: auto; padding: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .study-brand { margin-bottom: 16px; }
  .study-page main { padding: 28px 22px 50px; }
}
@media(max-width:700px) {
  .auth-screen { padding: 24px 18px; grid-template-columns: 1fr; }
  .auth-intro h1 { font-size: 58px; }
  .study-page main { padding-inline: 16px; }
}
