.study-brand { display: grid; gap: 1px; margin: 0 4px 25px; }
.study-brand strong { color: #fff; font: 800 25px var(--display); letter-spacing: -.02em; }
.study-brand span { color: #9fb9d0; font: 700 9px ui-monospace,monospace; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-footer #logout { display: block; margin-top: 11px; padding: 5px 0; border: 0; background: transparent; color: #a9bed2; font-size: 11px; }
.sidebar-footer #logout:hover { border: 0; background: transparent; color: #fff; }
.source-help { min-height: 18px; margin: 9px 0 2px !important; }
.study-section-menu { display: grid; gap: 5px; margin-bottom: 18px; }
.study-section-entry { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px; border-color: transparent !important; background: transparent !important; color: var(--muted) !important; text-align: left; }
.study-section-entry:hover { color: var(--ink) !important; background: var(--surface) !important; }
.study-section-entry.active { color: var(--ink) !important; background: var(--surface) !important; box-shadow: inset 2px 0 var(--blue); }
.study-section-entry .count { color: var(--muted); }
.folder-navigation { min-height: 0; padding-top: 17px; border-top: 1px solid var(--line); }
.study-page .sidebar #folders { max-height: calc(100vh - 410px); overflow: auto; scrollbar-width: thin; }
.result-heading { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-result > div { min-width: 0; }
.source-badge {
  padding: 3px 7px;
  border-radius: 20px;
  background: #e3eff8;
  color: var(--blue);
  font: 700 9px ui-monospace, monospace;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.search-entry {
  width: 100%;
  margin-bottom: 10px;
  border-color: transparent;
  background: transparent;
  color: #d4e1ed;
  text-align: left;
}
.search-entry:hover,
.search-entry.active {
  border-color: #416888;
  background: #254763;
  color: #fff;
}
.search-entry.active { box-shadow: inset 3px 0 var(--accent); }
.athlete-nav { margin-top: 30px; padding-top: 22px; border-top: 1px solid #ffffff1a; }
.athlete-nav > .eyebrow { display: block; margin: 0 10px 8px; color: #8fa9c1; }
.athletes-entry {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-color: transparent;
  background: transparent;
  color: #d4e1ed;
  text-align: left;
}
.athletes-entry:hover,
.athletes-entry.active { border-color: #416888; background: #254763; color: #fff; }
.athletes-entry.active { box-shadow: inset 3px 0 var(--accent); }
.empty-folder {
  display: grid;
  min-height: 45vh;
  place-items: center;
  color: var(--muted);
  text-align: center;
}
.empty-folder p { margin: 0; }
.athletes-view { width: 100%; max-width: 1380px; margin: 0 auto; }
.athletes-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.athletes-heading h1 { margin: 0 0 5px; font: 700 clamp(34px,4vw,52px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.athletes-heading p { margin: 0; color: var(--muted); }
.athlete-search-form { display: block; width: min(720px,100%); margin-top: 30px; border-bottom: 2px solid var(--ink); transition: border-color .2s ease; }
.athlete-search-form:focus-within { border-color: var(--blue); }
.athlete-search-form input { width: 100%; min-width: 0; padding: 9px 2px 13px; border: 0; border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; font-size: 18px; outline: 0; }
.athlete-search-form input::placeholder { color: var(--muted); opacity: .72; }
#athlete-search-status { min-height: 18px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.athletes-board { margin-top: 34px; }
.athlete-collection h2 { margin: 0 0 21px; font: 700 19px/1 var(--display); letter-spacing: .055em; text-transform: uppercase; }
.favorite-athletes { margin-bottom: 44px; padding-bottom: 38px; border-bottom: 1px solid var(--line); }
.athlete-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(142px,1fr)); gap: 28px 20px; }
.athlete-card { width: 100%; min-width: 0; display: grid; justify-items: center; gap: 13px; padding: 6px; border: 0; background: transparent; text-align: center; }
.study-page .athlete-card,.study-page .athlete-card:hover { border: 0; background: transparent; }
.athlete-card-copy { min-width: 0; }
.athlete-card-copy strong { display: block; overflow-wrap: anywhere; font: 700 18px/1.05 var(--display); letter-spacing: .01em; }
.athlete-card-copy small { display: block; min-height: 11px; margin-top: 6px; color: var(--muted); font: 600 10px/1.1 ui-monospace,monospace; letter-spacing: .035em; }
.athlete-card-copy small.saved { color: #d99b32; }
.athlete-image-preloads { position: fixed; top: -2px; left: -2px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.athlete-image-preloads img { width: 1px; height: 1px; }
.athlete-card:hover { border-color: transparent; background: transparent; color: #71a8e6; }
.athlete-card:hover .athlete-avatar,.athlete-card:focus-visible .athlete-avatar { border-color: #fff; }
.athlete-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 7px; }
.athlete-card .athlete-avatar { transition: border-color .18s ease; }
.athletes-board.has-selection #athlete-browser { display: none; }
.study-page .athlete-back { margin: 0 0 18px; padding: 7px 0; border: 0; background: transparent; color: var(--muted); }
.study-page .athlete-back:hover { border: 0; background: transparent; color: var(--ink); }
.athlete-sheet { min-width: 0; }
.athlete-sheet-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 25px 26px; border: 1px solid var(--line); border-top: 4px solid var(--blue); background: var(--surface); box-shadow: 0 12px 35px #172f4808; }
.athlete-identity { min-width: 0; display: flex; align-items: center; gap: clamp(18px,3vw,30px); }
.athlete-identity-copy { min-width: 0; }
.athlete-name-row { display: flex; align-items: center; gap: 11px; }
.athlete-sheet-head h2 { margin: 0; font: 700 clamp(30px,3vw,46px)/1 var(--display); letter-spacing: .005em; overflow-wrap: anywhere; }
.athlete-flag { flex: 0 0 auto; font-size: clamp(24px,2.4vw,34px); filter: saturate(.88); }
.athlete-affiliation { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.athlete-socials { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 15px; margin-top: 8px; font-size: 12px; }
.athlete-socials a { font-weight: 650; }
.athlete-socials span { color: var(--blue); font: 700 11px ui-monospace,monospace; }
.athlete-avatar { position: relative; width: 118px; height: 118px; flex: 0 0 118px; display: grid; place-items: center; overflow: hidden; border: 1px solid #fff; border-radius: 50%; background: #205f96; color: #fff; font: 800 31px/1 var(--display); letter-spacing: .04em; }
.athlete-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s ease; }
.athlete-avatar.has-photo img { opacity: 1; }
.athlete-avatar.small { width: 44px; height: 44px; flex-basis: 44px; font-size: 14px; }
.athlete-stats { display: grid; grid-template-columns: repeat(4,1fr); border-block: 1px solid var(--line); }
.athlete-stats div { padding: 16px 18px; border-left: 1px solid var(--line); }
.athlete-stats div:first-child { border-left: 0; }
.athlete-stats strong,.athlete-stats span { display: block; }
.athlete-stats strong { font: 700 28px/1 var(--display); color: var(--blue); }
.athlete-stats span { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.athlete-sheet-body { display: grid; gap: 30px; padding-top: 24px; }
.athlete-watch { max-width: 1080px; scroll-margin-top: 24px; }
.athlete-video-actions { display: flex; align-items: center; gap: 14px; }
.athlete-video-actions .quiet { padding: 0; color: var(--muted); font-size: 11px; }
.external-player { min-height: 280px; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 36px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 0,color-mix(in srgb,var(--blue) 13%,transparent),transparent 58%),var(--surface); text-align: center; }
.external-player h3,.external-player p { margin: 0; }
.external-player h3 { font: 700 clamp(20px,3vw,32px)/1.05 var(--display); text-transform: uppercase; }
.external-player p { color: var(--muted); font-size: 12px; }
.external-player a { margin-top: 8px; padding: 10px 14px; border: 1px solid var(--blue); border-radius: 4px; color: var(--blue); font-weight: 700; text-decoration: none; }
.external-player.empty { color: var(--muted); }
.player > .external-player { width: 100%; height: 100%; min-height: 0; border: 0; }
.athlete-fight-detail { padding-top: 16px; }
.athlete-fight-detail h3 { margin: 9px 0 4px; font: 700 25px var(--display); text-transform: uppercase; }
.athlete-fight-detail p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.athlete-fight-actions,.result-actions { display: flex; align-items: center; gap: 9px; }
.athlete-archive > h3 { margin: 0 0 15px; font: 700 22px var(--display); letter-spacing: .05em; text-transform: uppercase; }
.athlete-archive { width: 100%; }
.athlete-competitions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 18px; }
.athlete-competitions.detail { grid-template-columns: minmax(0,900px); }
.athlete-competition { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 14px 34px #07131f0d; }
.study-page .competition-open { width: 100%; display: block; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; }
.study-page .competition-open:hover { border: 0; background: transparent; }
.study-page .competition-open:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.competition-visual { position: relative; height: 132px; display: grid; place-items: center; overflow: hidden; isolation: isolate; background: radial-gradient(circle at 76% 20%,#397dbf 0,transparent 42%),linear-gradient(135deg,#10263a,#07131f); color: #ffffff28; }
.competition-visual::after { content: ''; position: absolute; z-index: 2; inset: 0; background: linear-gradient(180deg,transparent 48%,#06101ac7 100%); pointer-events: none; }
.competition-visual img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.015); transition: opacity .25s ease,transform .35s ease; }
.competition-visual.has-image img { opacity: 1; }
.athlete-competition:hover .competition-visual img { transform: scale(1.045); }
.competition-visual-fallback { font: 800 clamp(34px,4vw,55px)/1 var(--display); letter-spacing: .09em; }
.competition-visual-source,.competition-year { position: absolute; z-index: 3; bottom: 12px; padding: 5px 8px; border: 1px solid #ffffff42; border-radius: 3px; background: #07131fb8; color: #fff; font: 700 9px ui-monospace,monospace; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(5px); }
.competition-visual-source { left: 14px; }
.competition-year { right: 14px; }
.athlete-competition-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 15px; background: linear-gradient(100deg,color-mix(in srgb,var(--blue) 7%,var(--surface)),var(--surface) 48%); }
.athlete-competition-head h4 { margin: 4px 0 3px; font: 700 clamp(17px,1.8vw,22px)/1.08 var(--display); letter-spacing: .015em; }
.athlete-competition-head p { margin: 0; color: var(--muted); font-size: 11px; }
.competition-count { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--blue); font: 700 9px ui-monospace,monospace; letter-spacing: .05em; text-transform: uppercase; }
.competition-detail { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 14px 34px #07131f0d; }
.competition-detail > .competition-visual { height: clamp(220px,30vw,360px); }
.competition-detail > .athlete-competition-head { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.competition-detail > .athlete-competition-head h4 { font-size: clamp(23px,3vw,34px); }
.study-page .competition-back { margin: 0; padding: 13px 16px; width: 100%; border-bottom: 1px solid var(--line); text-align: left; }
.competition-run { margin: 0; padding: 0; list-style: none; counter-reset: run; }
.run-step { position: relative; margin: 0; }
.run-step.has-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.run-step:not(:last-child)::after { content: ''; position: absolute; z-index: 1; top: 40px; bottom: -10px; left: 41px; width: 1px; background: color-mix(in srgb,var(--blue) 35%,var(--line)); }
.study-page .run-fight { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 14px 20px; border: 0; border-radius: 0; background: transparent; text-align: left; }
.study-page .run-fight:hover { border: 0; background: color-mix(in srgb,var(--blue) 6%,transparent); }
.study-page .run-fight.active { background: color-mix(in srgb,var(--blue) 11%,transparent); box-shadow: inset 3px 0 var(--blue); }
.run-marker { width: 42px; height: 28px; display: grid; place-items: center; border: 1px solid color-mix(in srgb,var(--blue) 42%,var(--line)); border-radius: 50%; background: var(--surface); color: var(--blue); font: 700 9px ui-monospace,monospace; letter-spacing: .04em; }
.run-copy,.run-copy strong,.run-copy small { display: block; min-width: 0; }
.run-stage { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--blue); font: 700 9px ui-monospace,monospace; letter-spacing: .07em; text-transform: uppercase; }
.run-copy strong { margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.run-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.run-outcome { padding: 2px 5px; border-radius: 3px; }
.run-outcome.win { background: #e4f4ea; color: #287048; }
.run-outcome.loss { background: #f7e9e8; color: #9b4541; }
.run-watch { color: var(--muted); font: 700 9px ui-monospace,monospace; letter-spacing: .04em; text-transform: uppercase; }
.run-fight:hover .run-watch,.run-fight.active .run-watch { color: var(--blue); }
.study-page .run-fight:disabled { cursor: default; opacity: .58; }
.study-page .run-add { margin-right: 16px; padding: 7px 9px; border-color: var(--line); background: transparent; color: var(--blue); font-size: 10px; white-space: nowrap; }
.study-page .run-add:hover { border-color: var(--blue); background: color-mix(in srgb,var(--blue) 7%,transparent); }
.athlete-no-fight { color: var(--muted); }
.follow-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.follow-athlete { padding: 5px 8px; border-color: var(--line); background: transparent; color: var(--muted); font-size: 10px; font-weight: 650; }
.follow-athlete:hover { color: var(--blue); }
.follow-athlete.saved { color: #f2bb55; border-color: #b87912; background: #eba93e12; }
.study-star {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  font: 25px/1 system-ui,sans-serif;
}
.study-star:hover { border-color: #b87912; background: #eba93e0e; color: #f2bb55; }
.study-star.saved { border-color: #b87912; background: #eba93e12; color: #f2bb55; }
.study-star:disabled { opacity: .5; cursor: wait; }
.athlete-sheet-star { align-self: flex-start; margin-top: 2px; }
.match-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.match-actions .study-star { margin-right: 2px; }

/* La recherche est l'entrée principale de Study, dans le langage visuel de Combats. */
.study-page .shell { min-height: 100vh; }
.study-search {
  width: min(920px, 100%);
  margin: clamp(24px, 7vh, 76px) auto 58px;
  scroll-margin-top: 24px;
}
.study-search h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font: 700 clamp(34px, 4vw, 48px)/1 var(--display);
  letter-spacing: .035em;
  text-transform: uppercase;
}
.study-search-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: stretch;
  border-bottom: 2px solid var(--ink);
  transition: border-color .2s ease;
}
.study-search-form:focus-within { border-color: var(--blue); }
.study-search-form input,
.study-search-form select,
.study-search-form button {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.study-search-form input {
  padding: 8px 2px 13px;
  font-size: 19px;
  outline: 0;
}
.study-search-form input::placeholder { color: var(--muted); opacity: .72; }
.study-search-form select {
  margin: 3px 8px 7px 0;
  padding: 5px 30px 5px 10px;
  color: var(--muted);
  font-size: 12px;
}
.study-search-form select option { background: var(--surface); color: var(--ink); }
.study-search-form button {
  padding: 8px 2px 10px 18px;
  font: 700 17px var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.study-search-form button span { margin-left: 8px; font: 22px/1 system-ui,sans-serif; }
.study-search-form button:hover { background: transparent; color: #71a8e6; }
.study-search-form :disabled { opacity: .42; cursor: not-allowed; }
.search-context {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}
.search-context p { margin: 0; }
#search-status { min-height: 20px; margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.study-results:not(:empty) {
  max-height: 390px;
  margin-top: 8px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-color: var(--muted) transparent;
}
.study-results .search-result:first-child { border-top-color: var(--ink); }
.study-page .heading { padding-top: 28px; border-top: 1px solid var(--line); }
.study-page main:has(.study-search:not([hidden])) {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: safe center;
}
.study-page main:has(.study-search:not([hidden])) .study-search {
  margin-block: auto;
  padding-block: 28px;
}

@media(max-width:950px) {
  .athlete-competitions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .athlete-competitions.detail { grid-template-columns: 1fr; }
}

@media(max-width:700px) {
  .study-section-menu { grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
  .folder-navigation { padding-top: 12px; }
  .study-page .sidebar #folders { display: grid; max-height: 230px; margin-top: 10px; overflow: auto; }
  .search-entry { width: auto; margin: 0 8px 0 0; }
  .athlete-nav { display: inline-block; margin: 0 0 0 8px; padding: 0; border: 0; vertical-align: top; }
  .athlete-nav > .eyebrow { display: none; }
  .athletes-entry { width: auto; }
  .athlete-sheet-body { grid-template-columns: 1fr; }
  .athlete-competitions { grid-template-columns: 1fr; gap: 14px; }
  .competition-visual { height: 142px; }
  .competition-detail > .competition-visual { height: clamp(190px,52vw,280px); }
  .athlete-competition-head { padding: 14px 15px; }
  .study-page .run-fight { grid-template-columns: 34px minmax(0,1fr); gap: 11px; padding: 13px 14px; }
  .run-step.has-actions { grid-template-columns: 1fr; }
  .study-page .run-add { margin: 0 14px 12px 59px; justify-self: start; }
  .run-marker { width: 34px; height: 25px; }
  .run-step:not(:last-child)::after { left: 30px; }
  .run-watch { grid-column: 2; margin-top: -5px; }
  .athlete-video-actions { gap: 9px; }
  .athlete-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px 12px; }
  .athlete-card { padding: 4px; }
  .athlete-sheet-head { padding: 20px; align-items: flex-start; }
  .athlete-identity { align-items: flex-start; }
  .athlete-avatar:not(.small) { width: 84px; height: 84px; flex-basis: 84px; border-width: 1px; font-size: 23px; }
  .athlete-name-row { align-items: flex-start; gap: 7px; }
  .athlete-sheet-head h2 { font-size: 29px; }
  .athlete-flag { font-size: 23px; }
  .athlete-affiliation { font-size: 13px; }
  .athlete-stats { grid-template-columns: repeat(2,1fr); }
  .athlete-stats div:nth-child(3) { border-left: 0; }
  .athlete-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .study-search { margin: 16px auto 38px; }
  .study-search h1 { font-size: 34px; }
  .study-search-form { grid-template-columns: minmax(0,1fr) auto; }
  .study-search-form select { grid-column: 1 / -1; grid-row: 2; width: max-content; margin: 0 0 8px; padding-left: 0; }
  .study-search-form button { grid-column: 2; grid-row: 1; font-size: 15px; }
  .search-context { display: block; }
  .search-context p + p { margin-top: 4px; }
  .study-page main:has(.study-search:not([hidden])) { min-height: calc(100vh - 155px); }
}
@media(max-width:460px) {
  .athlete-sheet-head { position: relative; }
  .athlete-identity { display: grid; }
  .athlete-sheet-star { position: absolute; top: 14px; right: 14px; }
  .athlete-name-row { padding-right: 42px; }
}
