:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #66717a;
  --line: #d8e0e5;
  --panel: #ffffff;
  --paper: #f3f6f7;
  --accent: #0b7285;
  --accent-dark: #075866;
  --role-accent: #0b7285;
  --role-accent-soft: #e7f5f7;
  --warm: #f59f00;
  --good: #2b8a3e;
  --soft: #e7f5f7;
  --shadow: 0 14px 40px rgba(18, 38, 48, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

[hidden] {
  display: none !important;
}

.app-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid #f1b7b7;
  border-radius: 8px;
  background: #fff5f5;
  box-shadow: 0 12px 28px rgba(20, 32, 44, 0.18);
  color: #9f1d16;
  font-size: 0.86rem;
  font-weight: 850;
}

.app-toast[hidden] {
  display: none;
}

body.role-live {
  --role-accent: #0b7285;
  --role-accent-soft: #e7f5f7;
  --logo-filter: none;
}

body.role-speaker {
  --role-accent: #d71920;
  --role-accent-soft: #fff0f0;
  --logo-filter: hue-rotate(125deg) saturate(1.25);
}

body.role-referee {
  --role-accent: #2b8a3e;
  --role-accent-soft: #eefaf1;
  --logo-filter: hue-rotate(235deg) saturate(1.05);
}

body.role-video {
  --role-accent: #6741d9;
  --role-accent-soft: #f0ecff;
  --logo-filter: hue-rotate(55deg) saturate(1.05);
}

body.role-computer {
  --role-accent: #e67700;
  --role-accent-soft: #fff4e6;
  --logo-filter: hue-rotate(155deg) saturate(1.15);
}

body.role-secretary {
  --role-accent: #0b7285;
  --role-accent-soft: #e7f8fb;
  --logo-filter: none;
}

body.profile-home-active {
  --role-accent: #0b7285;
  --role-accent-soft: #e7f5f7;
  --logo-filter: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.file-button {
  border: 0;
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--role-accent);
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-session-field {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 30px;
  padding: 0;
  border: 1px solid #dbe8ee;
  border-radius: 7px;
  background: #fbfdfe;
  min-width: 0;
  flex: 0 0 auto;
  justify-content: center;
  overflow: hidden;
}

.top-session-field > span {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.public-position-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: stretch;
  padding: 0 10px;
  border-left: 1px solid #dbe8ee;
  color: #004e61;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.public-position-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.public-position-switch {
  position: relative;
  width: 30px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cfdce1;
  box-shadow: inset 0 0 0 1px rgba(4, 38, 48, 0.08);
}

.public-position-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease;
}

.public-position-toggle:has(input:checked) {
  color: var(--accent-dark);
  background: #eef9fb;
}

.public-position-toggle:has(input:checked) .public-position-switch {
  background: var(--accent);
}

.public-position-toggle:has(input:checked) .public-position-switch::after {
  transform: translateX(14px);
}

.public-position-toggle:has(input:disabled) {
  opacity: 0.62;
  cursor: default;
}

.role-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f9fc;
}

.role-chip {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.role-chip.active {
  background: var(--role-accent);
  color: #ffffff;
}

body.role-referee.referee-tablet-mode .role-chip:not([data-role="referee"]) {
  display: none;
}

body.role-referee.referee-tablet-mode .role-chip[data-role="referee"]::after {
  content: "Ã°Å¸â€œÂ±";
  margin-left: 6px;
  font-size: 0.9em;
}

body.role-video.video-tablet-mode .role-chip:not([data-role="video"]),
body.role-computer.computer-tablet-mode .role-chip:not([data-role="computer"]) {
  display: none;
}

body.role-video.video-tablet-mode .role-chip[data-role="video"]::after,
body.role-computer.computer-tablet-mode .role-chip[data-role="computer"]::after {
  content: "Ã°Å¸â€œÂ±";
  margin-left: 6px;
  font-size: 0.9em;
}

.data-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #c9d8e5;
  border-radius: 8px;
  background: #f5f9fc;
  color: #42566b;
  font-size: 0.72rem;
  font-weight: 800;
}

.data-status[hidden] {
  display: none;
}

.data-status span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dce7ee;
}

.data-status .status-history {
  flex: 1 1 100%;
  justify-content: flex-start;
  border-radius: 6px;
  color: #52616b;
  font-weight: 750;
}

.firebase-dot {
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: #f59f00;
}

.firebase-dot.ok {
  background: #2f9e44;
}

.firebase-dot.error {
  background: #c92a2a;
}

.firebase-dot.pending {
  background: #f59f00;
}

.data-status.warning {
  border-color: #f2c94c;
  background: #fff8db;
  color: #6f5100;
}

.data-status.source {
  width: 100%;
}

.footer-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0 12px 12px;
}

.footer-status .data-status {
  flex: 1 1 auto;
}

.footer-speaker-info-button {
  flex: 0 0 auto;
}

.app-version {
  margin: 0;
  color: #8a98a2;
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.footer-status .app-version {
  margin-left: auto;
  padding-top: 4px;
}

.footer-lock-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #d6e5ea;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}

.footer-lock-button.confirm-button {
  border-color: #93c5a5;
  background: #eefaf1;
  color: #176232;
}

body.fullscreen-mode .footer-status {
  display: none;
}

body.fullscreen-mode .topbar {
  padding-top: 7px;
  padding-bottom: 7px;
}

body.fullscreen-mode .top-actions .ghost-button:not(#fullscreenBtn) {
  display: none;
}

.footer-credit {
  margin-left: auto;
  color: #6b7c86;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.app-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #60717c;
}

.firebase-header-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid #c9d8e5;
  border-radius: 999px;
  background: #f5f9fc;
  color: #52616b;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: none;
}

.firebase-header-status.ok {
  border-color: #b7dfc0;
  background: #eefaf1;
  color: #2b7a3b;
}

.firebase-header-status.error {
  border-color: #ffc9c9;
  background: #fff0f0;
  color: #c92a2a;
}

.firebase-header-status.pending {
  border-color: #ffe3a3;
  background: #fff8db;
  color: #8a6200;
}

.firebase-header-status .firebase-dot {
  margin-right: 0;
}

.livepalmes-logo {
  display: inline-flex;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 6px;
}

.livepalmes-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: var(--logo-filter, none);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
}

#meetTitle {
  margin-top: 2px;
  color: #6c7b86;
  font-size: clamp(0.82rem, 1.25vw, 1rem);
  font-weight: 750;
  line-height: 1.18;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.session-end-note {
  margin-left: 6px;
  color: #8a5a00;
  font-size: 0.72rem;
  font-weight: 900;
  vertical-align: middle;
  white-space: nowrap;
}

.program-race-button .session-end-note {
  font-size: 0.68rem;
  color: #7a5a12;
}

h3 {
  font-size: 1rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-actions #roleLockBtn {
  display: none;
}

body.profile-home-active .top-actions #roleLockBtn {
  display: inline-flex;
}

.role-computer #dataDiagnosticBtn,
.role-computer #adminSeriesBtn,
.role-computer #exportDsqPdfBtn,
.role-computer #resetHistoryBtn {
  display: none !important;
}

body.profile-home-active .top-session-field,
body.profile-home-active .top-actions > :not(#roleLockBtn),
body.profile-home-active .footer-status {
  display: none;
}

body.profile-home-active .top-actions {
  display: flex;
  margin-left: auto;
}

.profile-home {
  width: min(1120px, calc(100% - 28px));
  margin: 24px auto 40px;
  display: grid;
  gap: 16px;
}

.profile-home[hidden] {
  display: none;
}

.profile-home-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border: 1px solid #d9e7ed;
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(6, 42, 58, 0.08);
}

.top-lock-button {
  width: 38px;
  height: 38px;
  border-color: #c9d8e5;
  color: var(--accent-dark);
}

.profile-home-hero h2 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.profile-home-hero p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 800;
}

.profile-home-hero .profile-mode-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin-top: 10px;
  padding: 0 10px;
  border: 1px solid #ffe3a3;
  border-radius: 999px;
  background: #fff8db;
  color: #8a6200;
  font-size: 0.78rem;
  font-weight: 950;
}

.profile-home-hero .profile-mode-status.active {
  border-color: #b7dfc0;
  background: #eefaf1;
  color: #2b7a3b;
}

.public-results-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-card {
  --profile-color: var(--accent);
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dfe9ee;
  border-top: 5px solid var(--profile-color);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(6, 42, 58, 0.06);
}

.profile-card:hover,
.profile-card:focus-visible {
  border-color: var(--profile-color);
  box-shadow: 0 12px 30px rgba(6, 42, 58, 0.12);
  transform: translateY(-1px);
}

.profile-card strong {
  font-size: 1.05rem;
}

.profile-presence {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f6f8;
  color: #52636e;
  font-size: 0.68rem;
  font-weight: 950;
}

.profile-actions-count {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff4dc;
  color: #8a4f00;
  font-size: 0.68rem;
  font-weight: 950;
}

.profile-actions-count[hidden] {
  display: none;
}

.profile-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 780;
  line-height: 1.35;
}

.profile-home > .app-version {
  justify-self: end;
  padding: 0 4px;
}

.profile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--profile-color) 14%, #ffffff);
  color: var(--profile-color);
  font-size: 1rem;
  font-weight: 950;
}

.profile-svg-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.profile-svg-icon rect,
.profile-svg-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-speaker .profile-svg-icon rect,
.profile-video .profile-svg-icon rect {
  fill: color-mix(in srgb, var(--profile-color) 18%, #ffffff);
}

.profile-live .profile-icon {
  background: color-mix(in srgb, var(--profile-color) 14%, #ffffff);
  overflow: hidden;
}

.profile-clap-icon {
  width: 19px;
  height: 19px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(34%) sepia(78%) saturate(1135%) hue-rotate(181deg) brightness(88%) contrast(88%);
}

.profile-referee .profile-icon {
  position: relative;
  background: color-mix(in srgb, var(--profile-color) 14%, #ffffff);
  color: var(--ink);
  overflow: hidden;
}

.profile-whistle-icon {
  width: 23px;
  height: 23px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(34%) sepia(45%) saturate(855%) hue-rotate(83deg) brightness(91%) contrast(89%);
}

.profile-video .profile-icon {
  border-radius: 8px;
}

.profile-live {
  --profile-color: #1971c2;
}

.profile-speaker {
  --profile-color: #d71920;
}

.profile-referee {
  --profile-color: #2b8a3e;
}

.profile-video {
  --profile-color: #6741d9;
}

.profile-computer {
  --profile-color: #e67700;
}

.profile-secretary {
  --profile-color: #0b7285;
}

.live-toggle.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.icon-button,
.ghost-button,
.file-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 750;
}

.icon-button {
  width: 42px;
  padding: 0;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 1.25rem;
}

.ghost-button,
.file-button {
  background: #edf2f4;
  color: var(--ink);
}

#fullscreenBtn {
  border: 1px solid color-mix(in srgb, var(--role-accent) 28%, #d8e0e5);
  background: var(--role-accent-soft);
  color: var(--role-accent);
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-import-button {
  border: 1px solid color-mix(in srgb, var(--role-accent) 24%, #d8e0e5);
}

.admin-series-dialog {
  width: min(640px, 100%);
}

.admin-series-options {
  display: grid;
  gap: 8px;
}

.admin-series-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
  cursor: pointer;
}

.admin-series-option input {
  grid-row: 1 / 3;
  margin-top: 3px;
}

.admin-series-option strong {
  font-size: 0.9rem;
}

.admin-series-option span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.reset-session-select {
  grid-column: 2;
  width: min(210px, 100%);
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #cfdce1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
}

.admin-series-option.warning-option {
  border-color: #ffd8a8;
  background: #fff9ef;
}

.admin-series-option.warning-option strong {
  color: #9a5b00;
}

.admin-session-field {
  display: grid;
  gap: 6px;
  width: min(220px, 100%);
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.admin-session-field input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  color: var(--text);
  background: #ffffff;
}

.admin-series-help {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #d8e8ee;
  border-radius: 8px;
  background: #f6fbfd;
  color: #52616b;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-series-help strong {
  color: var(--accent-dark);
}

.admin-series-file {
  width: fit-content;
}

.admin-series-file.loading {
  opacity: 0.65;
  pointer-events: none;
}

.upload-progress-message {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #f3cc7a;
  border-radius: 8px;
  background: #fff6dc;
  color: #875900;
  font-size: 0.78rem;
  font-weight: 900;
}

.upload-progress-message[hidden] {
  display: none;
}

/* Bloc console deplace dans console.css. */

/* Styles publics deplaces dans public.css. */

.pdf-viewer-page {
  overflow: hidden;
}

.pdf-viewer-page .public-results-header {
  gap: 8px;
  box-sizing: border-box;
  min-height: 0;
  height: 36px;
  padding: 6px 10px;
  border-top-width: 2px;
}

.pdf-viewer-page .public-results-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.pdf-viewer-page .app-name {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.68rem;
}

.pdf-meet-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.pdf-meet-meta:empty {
  display: none;
}

.pdf-viewer-page .livepalmes-logo {
  width: 18px;
  height: 18px;
}

.pdf-viewer-page .public-results-header h1 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-viewer-page .public-meet-meta {
  display: none;
}

.pdf-viewer-page .public-results-header .ghost-button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 0.72rem;
}

.pdf-header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.pdf-header-actions .ghost-button[hidden] {
  display: none;
}

.pdf-viewer-shell {
  display: grid;
  gap: 8px;
  height: calc(100vh - 36px);
  padding: 6px;
}

.pdf-frame {
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pdf-canvas-viewer {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf3f6;
}

.pdf-canvas-viewer[hidden] {
  display: none;
}

.pdf-canvas-viewer canvas {
  display: block;
  width: 100%;
  max-width: 980px;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(6, 42, 58, 0.14);
}

.pdf-fallback {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 8px;
}

.pdf-fallback[hidden] {
  display: none;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.9rem;
}

.file-button input {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 18px;
  padding: 18px;
}

.app-shell[hidden] {
  display: none;
}

.sidebar,
.race-panel {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 102px;
  align-self: start;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

select,
input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

.series-field,
.series-controls,
.session-controls {
  display: flex;
  align-items: center;
  align-self: stretch;
}

.session-select {
  min-height: 28px;
  width: 64px;
  border: 0;
  border-radius: 0;
  padding: 0 8px 0 2px;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  outline: none;
}

.series-nav,
.floating-series-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.program-button {
  min-height: 36px;
  justify-content: center;
}

.nav-icon-button,
.nav-program-button {
  width: 36px;
  min-width: 36px;
  padding-inline: 0;
  font-size: 1.05rem;
  font-weight: 950;
}

.nav-program-button {
  width: 44px;
}

.series-controls .program-button {
  display: inline-flex;
  width: auto;
  min-width: 90px;
  min-height: 28px;
  padding-inline: 10px;
  border-radius: 7px;
  font-size: 0.76rem;
}

.referee-progress-button {
  min-height: 28px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referee-progress-button:disabled {
  opacity: 1;
  cursor: default;
}

.referee-progress-button.is-pointed {
  border-color: #2b8a3e;
  background: #2b8a3e;
  color: #ffffff;
}

.series-chip,
.session-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 34px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 850;
}

.series-chip span {
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.78;
}

.series-chip em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2b8a3e;
  color: #ffffff;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
}

.series-chip.ja-current {
  border-color: #2b8a3e;
  box-shadow: inset 0 0 0 2px rgba(43, 138, 62, 0.12);
}

.series-chip.active,
.session-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.series-chip.final-chip {
  border-color: #8d6b00;
  background: #fff8db;
  color: #6f5100;
}

.series-chip.final-chip.active {
  border-color: #b88500;
  background: #b88500;
  color: #ffffff;
}

.series-chip:hover,
.session-chip:hover {
  border-color: var(--accent-dark);
}

.no-series-note {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 9px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.stat-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-strip div,
.quick-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-strip div {
  padding: 14px;
}

.stat-strip span {
  display: block;
  font-size: 1.45rem;
  font-weight: 850;
}

.stat-strip small {
  color: var(--muted);
  font-weight: 700;
}

.quick-card,
.panel {
  padding: 16px;
}

.quick-card h2 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.race-panel {
  display: grid;
  gap: 18px;
}

/* Bloc console deplace dans console.css. */

.race-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.race-header > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.race-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.race-meta-line .eyebrow {
  margin: 0;
}

.race-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.race-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid #d7e6ea;
  border-radius: 999px;
  background: #f7fbfc;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  max-width: 280px;
}

.race-stats .best-entry-stat {
  max-width: min(560px, 100%);
  padding-inline: 10px;
}

.race-stats strong {
  color: var(--accent-dark);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.race-stats small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
}

.race-stats .stat-label {
  color: #5c7180;
}

.header-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  max-width: 980px;
}

.ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--cat-color) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat-bg) 68%, #ffffff);
  color: var(--cat-color);
  font-size: 0.76rem;
  font-weight: 850;
}

.ref-chip-button {
  cursor: pointer;
}

.ref-chip-button:hover,
.active-ref {
  border-color: var(--cat-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cat-color) 14%, transparent);
}

.ref-chip strong {
  color: var(--ink);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.qualification-chip {
  border-color: #9db2c6;
  background: #f5f8fb;
  color: #42566b;
  border-style: dashed;
}

.qualification-chip strong {
  color: #42566b;
}

.header-ref-details {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  max-width: 760px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.header-ref-details[hidden] {
  display: none;
}

.header-ref-details strong,
.header-ref-details span {
  display: block;
}

.header-ref-details span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 850;
}

.reference-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-mini {
  background: var(--cat-bg);
  color: var(--cat-color);
}

.badge.muted {
  background: var(--role-accent-soft);
  color: var(--role-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--role-accent) 30%, #ffffff);
}

.record-alert {
  background: #ffe9e6;
  color: #9f1d16;
  box-shadow: inset 0 0 0 1px #f2b5ad;
}

.swimmer-info-badge {
  background: #fff4d6;
  color: #714b00;
  box-shadow: inset 0 0 0 1px #f2c96d;
}

.holder-alert {
  background: #fff3c4;
  color: #755100;
  box-shadow: inset 0 0 0 1px #ead06f;
}

.international-alert {
  background: #e7f0ff;
  color: #1d4f9a;
  box-shadow: inset 0 0 0 1px #b7ccf0;
}

.edf-note {
  background: #edf4ff;
  color: #17437c;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.entrants-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.reference-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.single-reference {
  grid-template-columns: 1fr;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.entrant-heading {
  min-width: 120px;
}

.entrant-heading h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-entrant-count {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef7f9;
  border: 1px solid #cce7ee;
  color: #00576b;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.panel-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.soft-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.line-order-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
  color: #52616b;
  font-size: 0.76rem;
  font-weight: 900;
}

.line-order-button:hover {
  border-color: var(--accent);
  background: #eef6fa;
  color: var(--accent-dark);
}

#previousSeriesInlineBtn,
#nextSeriesInlineBtn {
  width: auto;
  min-width: 128px;
  padding-inline: 10px;
  font-size: 0.76rem;
  line-height: 1.1;
}

#previousSeriesInlineBtn::before {
  content: "\2190";
  margin-right: 6px;
}

#nextSeriesInlineBtn::after {
  content: "\2192";
  margin-left: 6px;
}

.table-wrap {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 410px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap.series-table {
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  min-width: 0;
}

.series-table table {
  table-layout: fixed;
  min-width: 0;
}

.series-table th:nth-child(1),
.series-table td:nth-child(1) {
  width: 54px;
}

.series-table th:nth-child(2),
.series-table td:nth-child(2) {
  width: 38%;
}

.series-table th:nth-child(3),
.series-table td:nth-child(3) {
  width: 88px;
}

.series-table th:nth-child(4),
.series-table td:nth-child(4) {
  width: 96px;
}

.series-table th:nth-child(5),
.series-table td:nth-child(5) {
  width: 27%;
}

th,
td {
  padding: 8px 9px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafb;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  font-size: 0.88rem;
}

.series-table th,
.series-table td {
  padding: 5px 7px;
}

.series-table tbody tr {
  height: 46px;
}

.series-table .name-cell,
.series-table .time-cell,
.series-table .name-cell {
  overflow: hidden;
}

.series-table td:nth-child(5) {
  overflow: visible;
}

.series-table .swimmer-button,
.series-table .club-name,
.series-table .seed-source {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.series-table .swimmer-button {
  display: block;
}

.series-table .reference-badges {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3px;
  overflow: visible;
}

.series-table .badge {
  max-width: 100%;
  min-height: 20px;
  padding: 1px 5px;
  font-size: clamp(0.58rem, 0.92vw, 0.68rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
}

.floating-next {
  display: none;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(7, 88, 102, 0.32);
}

.floating-series-nav {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 30;
  display: none;
  grid-template-columns: 1fr 0.7fr 1fr;
  max-width: 260px;
  margin-inline: auto;
}

.floating-series-nav .floating-next {
  width: 100%;
}

.floating-previous {
  background: #3f5f66;
}

.floating-program {
  background: #176c7b;
}

.floating-next:disabled {
  opacity: 0.45;
}

.antoine-overlay {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 40px;
  background: transparent;
  pointer-events: none;
}

.antoine-overlay[hidden] {
  display: none;
}

.antoine-overlay img {
  width: min(46vw, 440px);
  max-height: 72vh;
  object-fit: contain;
  opacity: 0.055;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.1);
}

.live-mode .search-field,
.live-mode .category-field {
  display: none;
}

.live-mode .app-shell {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
}

.live-mode .sidebar {
  position: static;
  display: grid;
  grid-template-columns: minmax(190px, 0.58fr) minmax(360px, 1.42fr);
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.live-mode .sidebar > .field:first-child {
  order: 1;
}

.live-mode .series-field {
  order: 2;
}

.live-mode .sidebar > .program-button {
  display: none;
}

.live-mode.role-video .sidebar,
.live-mode.role-computer .sidebar,
.live-mode.role-secretary .sidebar {
  display: none;
}

.live-mode .sidebar label {
  font-size: 0.68rem;
}

.live-mode .sidebar select {
  min-height: 34px;
  padding: 0 9px;
  font-size: 0.86rem;
}

.live-mode .series-field {
  gap: 5px;
}

.live-mode .series-controls {
  gap: 4px;
}

.live-mode .series-chip {
  min-height: 28px;
  min-width: 30px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.76rem;
}

.live-mode .series-chip span {
  font-size: 0.66rem;
}

.live-mode .series-nav button,
.live-mode .program-button {
  min-height: 30px;
  margin-top: 2px;
}

.role-live .floating-series-nav,
.role-speaker .floating-series-nav {
  display: none !important;
}

.role-live .series-nav,
.role-speaker .series-nav,
.role-referee .series-nav {
  display: flex;
}

.role-live #previousSeriesBtn,
.role-live #nextSeriesBtn,
.role-speaker #previousSeriesBtn,
.role-speaker #nextSeriesBtn,
.role-referee #previousSeriesBtn,
.role-referee #nextSeriesBtn {
  display: none;
}

.role-live .series-nav .program-button,
.role-speaker .series-nav .program-button,
.role-referee .series-nav .program-button {
  display: inline-flex;
  width: auto;
  min-width: 96px;
  min-height: 30px;
  padding-inline: 10px;
  font-size: 0.76rem;
}

.live-mode .race-panel {
  gap: 10px;
}

.live-mode .reference-grid {
  gap: 10px;
}

.live-mode .reference-grid .panel {
  padding: 10px;
}

.live-mode .reference-grid .panel-title {
  margin-bottom: 8px;
}

.live-mode .ranking-columns {
  gap: 8px;
}

.live-mode .race-header {
  padding: 12px;
  align-items: stretch;
}

.live-mode .race-header h2 {
  font-size: 1.25rem;
}

.live-mode .header-refs {
  gap: 4px;
}

.live-mode .ref-chip-button,
.live-mode .badge {
  min-height: 24px;
  padding: 0 7px;
  font-size: 0.72rem;
}

.live-mode .badge-row {
  display: none;
}

.live-mode.role-referee .race-header .badge-row {
  display: flex;
}

.live-mode .entrants-panel {
  border-color: #9dd2da;
  box-shadow: 0 10px 26px rgba(7, 88, 102, 0.13);
}

.live-mode .entrants-panel .panel-title {
  align-items: center;
  padding: 2px 2px 8px;
  border-bottom: 1px solid var(--line);
}

.role-speaker #filteredCount,
.role-live #filteredCount,
.role-referee #filteredCount {
  display: none;
}

.role-speaker .entrants-panel .panel-title,
.role-live .entrants-panel .panel-title {
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.role-speaker .entrant-heading,
.role-live .entrant-heading {
  display: block;
  min-width: 0;
}

.role-speaker .panel-actions,
.role-live .panel-actions {
  gap: 6px;
  padding-top: 1px;
}

.role-speaker .panel-actions .program-button,
.role-live .panel-actions .program-button,
.role-referee .panel-actions .program-button {
  display: inline-flex;
  width: auto;
  min-width: 96px;
  min-height: 30px;
  padding-inline: 10px;
  font-size: 0.76rem;
}

.speaker-panel-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.speaker-panel-refs .ref-chip {
  min-height: 23px;
  padding: 0 7px;
  font-size: 0.7rem;
}

.speaker-panel-ref-details {
  display: flex;
  margin-top: 6px;
}

.live-mode #entrantsTitle {
  color: var(--accent-dark);
  font-size: 1.22rem;
}

.live-mode .panel-subtitle {
  color: #0b7285;
}

.live-mode .table-wrap.series-table {
  border-color: #c5e4e9;
}

.entrants-panel {
  padding: 12px;
}

.entrants-panel .panel-title {
  margin-bottom: 8px;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover,
.selected-row {
  background: #f1fafb;
}

.dsq-row {
  background: #f1f3f5;
  color: #6f7d87;
}

.dsq-row:hover,
.dsq-row.selected-row {
  background: #eceff2;
}

.dsq-row .swimmer-button,
.dsq-row .club-name,
.dsq-row .category-pill,
.dsq-row .time,
.dsq-row .seed-source,
.dsq-row .badge {
  opacity: 0.62;
}

.line-alert-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-left: 0;
  vertical-align: middle;
  opacity: 1;
}

.line-time-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.line-time-status strong {
  font-weight: 950;
  color: #5b2b2b;
}

.line-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1;
  opacity: 1;
}

.dsq-line-badge {
  background: #d71920;
  color: #ffffff;
}

.line-alert-reasons {
  color: #9f1d16;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.abs-line-badge {
  background: #343a40;
  color: #ffffff;
}

.abd-line-badge {
  background: #8a4b00;
  color: #ffffff;
}

.dsq-row .line-alert-badges,
.dsq-row .line-alert-badge {
  opacity: 1;
}

.imported-forfait-row {
  background: #f4f5f7;
}

.imported-status-label {
  color: #7a4d00;
  font-weight: 800;
}

.imported-status-badges .line-alert-reasons {
  color: #7a4d00;
}

.category-row {
  border-left: 5px solid transparent;
  cursor: pointer;
}

.cat-minime {
  --cat-color: #c2255c;
  --cat-bg: #fff0f6;
  border-left-color: var(--cat-color);
}

.cat-cadet {
  --cat-color: #e67700;
  --cat-bg: #fff4e6;
  border-left-color: var(--cat-color);
}

.cat-junior {
  --cat-color: #2f9e44;
  --cat-bg: #ebfbee;
  border-left-color: var(--cat-color);
}

.cat-senior {
  --cat-color: #1971c2;
  --cat-bg: #e7f5ff;
  border-left-color: var(--cat-color);
}

.cat-master {
  --cat-color: #6741d9;
  --cat-bg: #f3f0ff;
  border-left-color: var(--cat-color);
}

.cat-master-30 {
  --cat-color: #7048e8;
  --cat-bg: #f3f0ff;
  border-left-color: var(--cat-color);
}

.cat-master-40 {
  --cat-color: #9c36b5;
  --cat-bg: #f8f0fc;
  border-left-color: var(--cat-color);
}

.cat-master-50 {
  --cat-color: #c2255c;
  --cat-bg: #fff0f6;
  border-left-color: var(--cat-color);
}

.cat-master-60 {
  --cat-color: #e8590c;
  --cat-bg: #fff4e6;
  border-left-color: var(--cat-color);
}

.cat-master-70 {
  --cat-color: #5c940d;
  --cat-bg: #f4fce3;
  border-left-color: var(--cat-color);
}

.cat-master-80 {
  --cat-color: #0b7285;
  --cat-bg: #e3fafc;
  border-left-color: var(--cat-color);
}

.cat-other {
  --cat-color: #5f6b73;
  --cat-bg: #f1f3f5;
  border-left-color: var(--cat-color);
}

.lane {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #172026;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 850;
}

.name-cell strong {
  display: block;
}

.swimmer-button {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
  text-align: left;
}

.swimmer-button:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.birth-year {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.non-selectable-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: #111827;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
}

.edf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  border: 1px solid #d8dee8;
  border-radius: 3px;
  background: linear-gradient(90deg, #1e4fa8 0 33%, #ffffff 33% 66%, #d9272e 66% 100%);
  color: #111827;
  font-size: 0.72rem;
  font-weight: 950;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #d7e2ea;
  border-radius: 999px;
  background: #fffaf0;
  color: #6f4b00;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
}

.stat-badge.youngest-male {
  background: #e7f2ff;
  color: #155fa0;
}

.stat-badge.youngest-female {
  background: #fff0f2;
  color: #a31927;
}

.stat-badge.oldest-male,
.stat-badge.oldest-female {
  background: #f4f0ff;
  color: #5530b0;
}

.name-cell span,
.muted-text {
  color: var(--muted);
  font-size: 0.82rem;
}

.name-cell .edf-badge {
  color: #111827;
  font-size: 0.72rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--cat-bg);
  color: var(--cat-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.time {
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.time-cell {
  min-width: 82px;
}

.time-cell .time,
.seed-source {
  display: block;
}

.seed-source {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.record-gap {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #fff3c4;
  color: #755100;
  font-size: clamp(0.58rem, 0.9vw, 0.68rem);
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
}

.record-gap.under-record {
  background: #ffe9e6;
  color: #9f1d16;
}

.reference-stack {
  display: grid;
  gap: 12px;
}

.reference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.reference-section {
  display: grid;
  gap: 7px;
}

.reference-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-reference {
  padding: 9px 10px;
}

.compact-reference.cat-minime,
.compact-reference.cat-cadet,
.compact-reference.cat-junior,
.compact-reference.cat-senior,
.compact-reference.cat-master,
.compact-reference.cat-master-30,
.compact-reference.cat-master-40,
.compact-reference.cat-master-50,
.compact-reference.cat-master-60,
.compact-reference.cat-master-70,
.compact-reference.cat-master-80,
.compact-reference.cat-other {
  background: linear-gradient(90deg, var(--cat-bg), #ffffff 72%);
}

.compact-reference .reference-time {
  font-size: 0.98rem;
}

.compact-empty {
  padding: 10px;
}

.reference-item strong {
  display: block;
}

.reference-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.reference-time {
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.highlight-panel {
  border-color: #b8dde3;
}

.ranking-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ranking-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.ranking-list.cat-minime,
.ranking-list.cat-cadet,
.ranking-list.cat-junior,
.ranking-list.cat-senior,
.ranking-list.cat-master,
.ranking-list.cat-master-30,
.ranking-list.cat-master-40,
.ranking-list.cat-master-50,
.ranking-list.cat-master-60,
.ranking-list.cat-master-70,
.ranking-list.cat-master-80,
.ranking-list.cat-other {
  border-left: 3px solid var(--cat-color);
}

.ranking-list h4 {
  margin: 0;
  padding: 5px 8px;
  background: #f8fafb;
  font-size: 0.74rem;
  line-height: 1.1;
}

.ranking-list.cat-minime h4,
.ranking-list.cat-cadet h4,
.ranking-list.cat-junior h4,
.ranking-list.cat-senior h4,
.ranking-list.cat-master h4,
.ranking-list.cat-master-30 h4,
.ranking-list.cat-master-40 h4,
.ranking-list.cat-master-50 h4,
.ranking-list.cat-master-60 h4,
.ranking-list.cat-master-70 h4,
.ranking-list.cat-master-80 h4,
.ranking-list.cat-other h4 {
  background: var(--cat-bg);
  color: var(--cat-color);
}

.ranking-list ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 5px;
  min-height: 26px;
  padding: 4px 7px;
  border-top: 1px solid var(--line);
  align-items: center;
  font-size: 0.74rem;
  line-height: 1.15;
}

.rank {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.ranking-list strong {
  font-size: 0.76rem;
}

.result-detail-dialog .final-withdrawal-group + .final-withdrawal-group {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.result-detail-dialog li.closed {
  list-style: none;
}

.ranking-list .muted-text {
  display: inline;
  margin-left: 4px;
  font-size: 0.66rem;
}

.ranking-list .time {
  font-size: 0.74rem;
}

.empty {
  color: var(--muted);
  padding: 8px;
  text-align: center;
}

.import-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

.csv-tools {
  display: grid;
  gap: 10px;
}

.swimmer-details {
  padding: 14px;
  border: 1px solid #b8dde3;
  border-radius: 8px;
  background: #f7fcfd;
  position: sticky;
  top: 12px;
}

.details-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.swimmer-identity {
  min-width: 0;
}

.details-title h4 {
  margin: 0 0 3px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.details-title span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.stat-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.stat-detail-list strong {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff7e6;
  color: #704800;
  font-size: 0.72rem;
  font-weight: 950;
}

.compact-program {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  min-width: 160px;
}

.compact-program span {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  min-height: 20px;
  padding: 0 6px;
  border-left: 3px solid var(--cat-color);
  border-radius: 5px;
  background: var(--cat-bg);
  color: var(--cat-color);
  font-size: 0.68rem;
  font-weight: 900;
}

.compact-program strong {
  color: var(--cat-color);
}

.compact-program small {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1.1;
  white-space: nowrap;
}

.compact-program-rank {
  color: var(--cat-color);
  font-weight: 950;
}

.close-details {
  width: 34px;
  height: 34px;
  min-height: 34px;
  font-size: 1.25rem;
}

.entry-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.entry-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.entry-pill.cat-minime,
.entry-pill.cat-cadet,
.entry-pill.cat-junior,
.entry-pill.cat-senior,
.entry-pill.cat-master,
.entry-pill.cat-master-30,
.entry-pill.cat-master-40,
.entry-pill.cat-master-50,
.entry-pill.cat-master-60,
.entry-pill.cat-master-70,
.entry-pill.cat-master-80,
.entry-pill.cat-other {
  border-left: 5px solid var(--cat-color);
  background: linear-gradient(90deg, var(--cat-bg), #ffffff 70%);
}

.entry-pill span {
  color: var(--accent-dark);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.detail-section {
  margin-top: 12px;
}

.detail-section h5 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.swimmer-info-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.swimmer-info-list strong {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #f2c96d;
  border-radius: 7px;
  background: #fff8e6;
  color: #714b00;
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-list {
  display: grid;
  gap: 7px;
}

.detail-row {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.detail-row.cat-minime,
.detail-row.cat-cadet,
.detail-row.cat-junior,
.detail-row.cat-senior,
.detail-row.cat-master,
.detail-row.cat-master-30,
.detail-row.cat-master-40,
.detail-row.cat-master-50,
.detail-row.cat-master-60,
.detail-row.cat-master-70,
.detail-row.cat-master-80,
.detail-row.cat-other {
  border-left: 5px solid var(--cat-color);
  background: linear-gradient(90deg, var(--cat-bg), #ffffff 72%);
}

.detail-row span:last-child {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.record-detail {
  display: block;
  min-height: 0;
  padding: 4px 0 4px 7px;
  border: 0;
  border-left: 3px solid var(--cat-color);
  border-radius: 0;
  background: transparent;
  font-size: 0.78rem;
}

.record-detail.cat-minime,
.record-detail.cat-cadet,
.record-detail.cat-junior,
.record-detail.cat-senior,
.record-detail.cat-master,
.record-detail.cat-master-30,
.record-detail.cat-master-40,
.record-detail.cat-master-50,
.record-detail.cat-master-60,
.record-detail.cat-master-70,
.record-detail.cat-master-80,
.record-detail.cat-other {
  background: transparent;
}

.record-detail span {
  color: var(--muted);
}

.record-detail strong {
  color: var(--ink);
}

.record-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 18px;
  margin-right: 5px;
  padding: 0 4px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: linear-gradient(90deg, #1e4fa8 0 33%, #ffffff 33% 66%, #d9272e 66% 100%);
  color: #111827;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
  vertical-align: middle;
}

.record-category-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 18px;
  margin-right: 5px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--cat-bg);
  color: var(--cat-color);
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}

.compact-achievement-list {
  display: grid;
  gap: 4px;
}

.compact-achievement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 25px;
  padding: 3px 0 3px 7px;
  border-left: 3px solid var(--cat-color);
  color: var(--muted);
  font-size: 0.78rem;
}

.compact-achievement strong {
  color: var(--ink);
}

.compact-achievement-list:not(.france-compact) .compact-achievement {
  grid-template-columns: auto minmax(0, 1fr);
}

.compact-achievement-list:not(.france-compact) .compact-achievement span:last-child {
  justify-self: start;
}

.compact-achievement span:last-child {
  color: var(--muted);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.france-compact .compact-achievement {
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  min-height: 22px;
  opacity: 0.86;
}

.medal-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  color: transparent;
  font-size: 0.65rem;
  line-height: 1;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.medal-gold {
  background: linear-gradient(135deg, #fff1a8, #d6a21e 58%, #9a6b00);
}

.medal-silver {
  background: linear-gradient(135deg, #ffffff, #b9c0c8 58%, #747b84);
}

.medal-bronze {
  background: linear-gradient(135deg, #ffd2a1, #b56a2a 58%, #704016);
}

.medal-neutral {
  background: linear-gradient(135deg, #f1f3f5, #adb5bd);
}

@media (max-width: 1040px) {
  .app-shell,
  .grid-two,
  .reference-grid,
  .entrants-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .swimmer-details {
    position: static;
  }

  .details-title {
    flex-wrap: wrap;
  }

  .compact-program {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar,
  .race-header {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    gap: 8px;
    padding: 8px 12px;
  }

  .profile-home {
    width: calc(100% - 16px);
    margin: 10px auto 24px;
    gap: 10px;
  }

  .profile-home-hero {
    display: grid;
    align-items: start;
    padding: 14px;
  }

  .profile-home-hero h2 {
    font-size: 1.45rem;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .profile-card {
    min-height: 92px;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 6px 10px;
    padding: 12px;
  }

  .profile-card small {
    grid-column: 2;
  }

  .profile-card .profile-presence,
  .profile-card .profile-actions-count {
    grid-column: 2;
  }

  .eyebrow {
    font-size: 0.68rem;
    margin-bottom: 2px;
  }

  .top-actions,
  .badge-row {
    justify-content: flex-start;
  }

  .role-switch {
    justify-content: flex-start;
    overflow-x: hidden;
  }

  .top-actions .ghost-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .app-shell {
    gap: 10px;
    padding: 8px;
  }

  .sidebar {
    gap: 8px;
  }

  .field {
    gap: 4px;
  }

  .series-controls,
  .session-controls {
    gap: 5px;
  }

  select,
  input,
  textarea {
    min-height: 36px;
    padding: 0 9px;
  }

  .series-chip,
  .session-chip {
    min-height: 30px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 0.78rem;
  }

  .race-header {
    gap: 8px;
    padding: 10px;
  }

  .decision-form,
  .queue-item,
  .alert-card,
  .history-item {
    grid-template-columns: 1fr;
  }

  .decision-form .wide-field {
    grid-column: span 1;
  }

  .history-action {
    grid-column: 1;
    justify-self: stretch;
  }

  .history-list.compact-scroll {
    max-height: 520px;
  }

  /* Styles publics responsives deplaces dans public.css. */

  .decision-modal {
    align-items: end;
    padding: 8px;
  }

  .decision-dialog {
    width: 100%;
    max-height: 96vh;
    gap: 8px;
    padding: 10px;
    border-radius: 12px 12px 8px 8px;
  }

  .decision-modal-head {
    gap: 8px;
  }

  .decision-modal-head span,
  .decision-comment,
  .decision-length-input {
    font-size: 0.64rem;
  }

  .decision-modal-head h2 {
    font-size: 1rem;
  }

  .decision-title-line {
    gap: 7px;
  }

  .decision-line-pill {
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    font-size: 1.18rem;
  }

  .decision-modal-head p {
    margin-top: 2px;
    font-size: 0.74rem;
  }

  .decision-modal-head .decision-race-info {
    font-size: 0.72rem;
  }

  .decision-choice-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .decision-existing-row {
    align-items: stretch;
    flex-direction: column;
  }

  .decision-choice {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.8rem;
    border-radius: 7px;
  }

  .decision-existing,
  .decision-extra {
    gap: 6px;
    padding: 8px;
    border-radius: 7px;
  }

  .decision-extra p {
    font-size: 0.78rem;
  }

  .decision-extra-buttons {
    gap: 6px;
  }

  .decision-extra-button {
    min-width: calc(50% - 4px);
    min-height: 34px;
    padding: 7px 8px;
    font-size: 0.78rem;
    border-radius: 7px;
  }

  .decision-comment textarea {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  .role-code-grid label {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .role-code-grid {
    grid-template-columns: 1fr;
  }

  .archive-item {
    grid-template-columns: 1fr;
  }

  .archive-actions {
    justify-content: stretch;
  }

  .archive-actions button {
    flex: 1 1 auto;
  }

  .admin-extra-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .length-stepper {
    grid-template-columns: 36px 70px 36px;
    gap: 5px;
  }

  .stepper-button {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }

  .decision-length-input input {
    max-width: 70px;
    padding: 7px 9px;
    font-size: 0.9rem;
  }

  .decision-modal-actions {
    position: sticky;
    bottom: -10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 0 -10px -10px;
    padding: 8px 10px 10px;
    border-top: 1px solid #d7e7eb;
    background: #ffffff;
    box-shadow: 0 -8px 18px rgba(255, 255, 255, 0.94);
  }

  .decision-modal-actions button {
    min-height: 38px;
    padding: 7px 10px;
  }

  .alert-detail-grid,
  .alert-timeline-row,
  .final-withdrawal-list {
    grid-template-columns: 1fr;
  }

  .secretary-final-card,
  .final-withdrawal-group li {
    grid-template-columns: 1fr;
  }

  .race-stats {
    width: 100%;
  }

.race-stats > span {
    max-width: 100%;
  }

  .race-header h2 {
    font-size: 1.12rem;
  }

  .session-end-note {
    display: inline-block;
    margin: 5px 0 0;
  }

  .entrants-panel {
    padding: 8px;
  }

  .entrants-panel .panel-title {
    align-items: flex-start;
    gap: 8px;
  }

  .panel-actions {
    gap: 6px;
  }

  .soft-count {
    width: 100%;
    font-size: 0.76rem;
  }

  .table-wrap.series-table {
    overflow-x: hidden;
  }

  .series-table table {
    min-width: 0;
  }

  .series-table tbody tr {
    height: 43px;
  }

  .series-table th,
  .series-table td {
    padding: 4px 6px;
  }

  .live-mode .topbar {
    position: static;
  }

  .live-mode .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    padding: 8px;
  }

  .live-mode .field:first-child,
  .live-mode .series-field,
  .live-mode .program-button {
    grid-column: 1 / -1;
  }

  .live-mode .race-header {
    padding: 8px;
  }

  .live-mode .badge-row,
  .role-live #previousSeriesInlineBtn,
  .role-live #nextSeriesInlineBtn {
    display: none;
  }

  .compact-program-dialog .decision-modal-head {
    padding-bottom: 6px;
  }

  .compact-program-dialog .decision-modal-head h2 {
    font-size: 1rem;
  }

  .compact-program-dialog .decision-modal-head p,
  .compact-program-dialog .speaker-program-marker {
    margin-top: 2px;
    font-size: 0.72rem;
  }

  .compact-program-dialog .program-list {
    gap: 4px;
  }

  .compact-program-dialog .program-row {
    gap: 4px;
    padding: 6px;
    border-radius: 6px;
  }

  .compact-program-dialog .program-race-button {
    gap: 6px;
    font-size: 0.78rem;
    line-height: 1.18;
  }

  .compact-program-dialog .program-race-button small {
    font-size: 0.68rem;
  }

  .compact-program-dialog .program-series-line {
    gap: 4px;
  }

  .compact-program-dialog .program-series-chip {
    min-height: 24px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 0.72rem;
  }

  .compact-program-dialog .program-series-chip span {
    font-size: 0.64rem;
  }

  .ranking-columns {
    grid-template-columns: 1fr;
  }
}

@media print {
  .top-actions,
  .import-panel,
  .sidebar .field,
  .program-button {
    display: none;
  }

  body {
    background: #ffffff;
  }

  .topbar,
  .app-shell {
    padding: 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar,
  .panel,
  .race-header {
    box-shadow: none;
    break-inside: avoid;
    margin-bottom: 12px;
  }
}
