@charset "UTF-8";
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #3d4c5e;
  --primary-dark: #26323e;
  --primary-light: #eef2f6;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warning-bg: #fef3c7;
  --warning-border: #fcd34d;
  --warning-text: #92400e;
  --rattrapage: #f97316;
  --rattrapage-light: #fff7ed;
  --rattrapage-border: #fed7aa;
  --color-h: #3b82f6;
  --color-h-bg: #eff6ff;
  --color-f: #ec4899;
  --color-f-bg: #fdf2f8;
  --color-mixte: #9465c8;
  --color-mixte-bg: #f6f4fc;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-900: #111827;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
  min-height: 100vh;
  padding-left: 240px;
}

.nav {
  background: #f9fafb;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 16px;
  flex-shrink: 0;
}

.nav-top-actions {
  display: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}

.nav-brand-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.125;
}

.nav-brand-title {
  font-weight: 800;
  color: #3d4c5e;
  font-size: 1.125rem;
}

.nav-brand-sub {
  font-weight: 400;
  font-size: 0.75rem;
  color: #6b7280;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px 16px;
  flex: 1;
}
.nav-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: #111827;
  background: #e5e7eb;
}
.nav-links a.active {
  color: white;
  background: #3d4c5e;
}

.nav-icon {
  display: flex;
  flex-shrink: 0;
}
.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: #3d4c5e;
  transition: fill 0.15s;
}

.nav-links a.active .nav-icon svg {
  fill: white;
}

.nav-account-group {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-divider {
  border-top: 1px solid #e5e7eb;
  margin: 6px 14px;
}

.nav-account-name {
  font-weight: 700;
  color: #111827;
  padding: 4px 14px;
  font-size: 0.85rem;
}

.bottom-nav {
  display: none;
}

@media (max-width: 1200px) {
  body {
    padding-left: 0;
    padding-top: 64px;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  .nav {
    flex-direction: row;
    width: 100%;
    height: 64px;
    bottom: auto;
    border-bottom: 1px solid #e5e7eb;
    overflow: visible;
  }
  .nav-top {
    width: 100%;
    padding: 0 16px;
  }
  .nav-links {
    display: none;
  }
  .nav-top-actions {
    display: flex;
    gap: 4px;
  }
  .nav-top-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    transition: background 0.15s;
  }
  .nav-top-icon svg {
    width: 31px;
    height: 31px;
    fill: #3d4c5e;
  }
  .nav-top-icon:active {
    background: #e5e7eb;
  }
  .bottom-nav {
    display: flex;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    z-index: 100;
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
  }
  .bottom-nav-item svg {
    width: 28px;
    height: 28px;
    fill: #6b7280;
    transition: fill 0.15s;
  }
  .bottom-nav-item.active {
    color: #3d4c5e;
  }
  .bottom-nav-item.active svg {
    fill: #3d4c5e;
  }
}
.page {
  padding: 32px 24px 64px;
  max-width: 1200px;
  margin: auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.page-header.page-header-center {
  justify-content: center;
  text-align: center;
}

.page-title {
  display: flex;
  flex-direction: column;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.5;
}
.page-title small {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  letter-spacing: 3px;
  color: #3d4c5e;
  font-weight: 600;
  margin-top: 4px;
}

.panel {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: #3d4c5e;
  color: white;
}
.btn-primary:hover {
  background: #26323e;
}
.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}
.btn-secondary:hover {
  background: #d1d5db;
}
.btn-danger {
  background: #fee2e2;
  color: #ef4444;
}
.btn-danger:hover {
  background: #fca5a5;
}
.btn-sm {
  padding: 7px 13px;
  font-size: 0.82rem;
}
.btn-lg {
  padding: 15px 28px;
  font-size: 1rem;
}
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  font-size: 0.95rem;
}

.counter {
  display: flex;
  align-items: center;
  gap: 10px;
}
.counter input {
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.counter-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  background: #3d4c5e;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.counter-btn:active {
  transform: scale(0.95);
}

.donut-brassage {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-track {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 4;
}

.donut-value {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.donut-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #3d4c5e;
}

.duree-estimee {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
}

.duree-icon {
  display: flex;
  flex-shrink: 0;
}
.duree-icon svg {
  width: 28px;
  height: 28px;
  fill: #3d4c5e;
}

.duree-valeur {
  font-size: 1.15rem;
  font-weight: 800;
  color: #3d4c5e;
}

.duree-estimee.alerte .duree-icon svg {
  fill: #ef4444;
}
.duree-estimee.alerte .duree-valeur {
  color: #ef4444;
}

#dureeMatchLabel {
  display: block;
  font-size: 0.75rem;
}

.score-btn {
  min-width: 38px;
  height: 38px;
  aspect-ratio: 1;
  padding: 0 6px;
  border: none;
  border-radius: 99px;
  background: #3d4c5e;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.score-btn:active {
  transform: scale(0.93);
}
.score-btn.r {
  background: #f97316;
}
.score-btn.ten {
  min-width: 32px;
}
.score-btn.hidden-btn {
  visibility: hidden;
  pointer-events: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-weight: 700;
  font-size: 0.88rem;
}

input[type=text],
input[type=date],
input[type=search],
input[type=number],
input[type=password],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type=text]:focus,
input[type=date]:focus,
input[type=search]:focus,
input[type=number]:focus,
input[type=password]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3d4c5e;
  box-shadow: 0 0 0 3px #eef2f6;
}

input[type=number]:not(.input-number-spin) {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type=number]:not(.input-number-spin)::-webkit-inner-spin-button {
  display: none;
}

.field-error {
  font-size: 0.78rem;
  color: #ef4444;
}

.form-panel {
  max-width: 568px;
  margin: 0 auto;
}

.field-hint {
  display: block;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 4px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch input:checked + .toggle-slider {
  background: #3d4c5e;
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}
.toggle-switch .toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}
.toggle-switch .toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 540px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-grid-nomtype {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 780px) {
  .form-grid-nomtype {
    grid-template-columns: 1fr;
  }
}

.form-grid-3 {
  display: flex;
  gap: 12px;
}
.form-grid-3 > * {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 780px) {
  .form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    text-align: center;
  }
  .form-grid-3 .donut-brassage {
    margin: 0 auto;
  }
  .form-grid-3 .duree-estimee {
    justify-content: center;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 9px 12px;
  background: #f3f4f6;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table th:hover {
  color: #3d4c5e;
}
.data-table th.sorted {
  color: #3d4c5e;
}
.data-table th .sort-arrow {
  margin-left: 4px;
  opacity: 0.5;
}
.data-table th.sorted .sort-arrow {
  opacity: 1;
}
.data-table td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover td {
  background: #f9fafb;
}

.match-row-teams {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.match-row-team {
  color: #6b7280;
  white-space: nowrap;
}
.match-row-team.winner {
  color: #111827;
  font-weight: 700;
}

.match-row-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f3f4f6;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.match-row-score.win {
  background: #dcfce7;
  color: #166534;
}
.match-row-score.loss {
  background: #fee2e2;
  color: #ef4444;
}

.match-row-vs {
  color: #9ca3af;
  font-size: 0.8rem;
}

.match-row-date {
  white-space: nowrap;
  color: #9ca3af;
  padding-left: 4px;
}

#tableMatchs tbody tr {
  display: flex;
  align-items: stretch;
}

#tableMatchs td {
  display: flex;
  align-items: center;
  vertical-align: middle;
  padding: 0 12px 0 22px;
  height: 4rem;
}

#tableMatchs td.match-row-teams {
  flex: 1;
}

#tableMatchs .table-loader-row {
  height: auto;
}
#tableMatchs .table-loader-row td {
  height: auto;
  min-height: 220px;
  width: 100%;
  flex: 1;
  justify-content: center;
}

#tableMatchs .col-actions {
  white-space: nowrap;
  justify-content: flex-end;
}
#tableMatchs .col-actions .btn {
  padding: 7px 9px;
}
#tableMatchs .col-actions .btn + .btn {
  margin-left: 6px;
}

@media (max-width: 640px) {
  .match-row-teams {
    gap: 6px;
  }
}
.genre-picto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
}
.genre-picto.h {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #3b82f6;
}
.genre-picto.f {
  border-color: #ec4899;
  background: #fdf2f8;
  color: #ec4899;
}

.genre-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.genre-radio {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-weight: 700;
}
.genre-radio input[type=radio] {
  display: none;
}
.genre-radio .picto {
  font-size: 1.4rem;
}
.genre-radio.selected-h {
  border-color: #3b82f6;
  background: #eff6ff;
}
.genre-radio.selected-f {
  border-color: #ec4899;
  background: #fdf2f8;
}

.type-radio-group {
  display: flex;
  flex-wrap: wrap;
}

.type-radio {
  flex: 1;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
}
.type-radio:not(:first-child) {
  margin-left: -2px;
}
.type-radio:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}
.type-radio:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}
.type-radio:hover {
  position: relative;
  z-index: 1;
}
.type-radio.sel-h, .type-radio.sel-f, .type-radio.sel-mixte {
  position: relative;
  z-index: 2;
}
.type-radio input {
  display: none;
}
.type-radio .t-icon {
  font-size: 1.5rem;
}
.type-radio.sel-h {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #3b82f6;
}
.type-radio.sel-f {
  border-color: #ec4899;
  background: #fdf2f8;
  color: #ec4899;
}
.type-radio.sel-mixte {
  border-color: #9465c8;
  background: #f6f4fc;
  color: #9465c8;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-h {
  border-color: #3b82f6;
  background: #3b82f6;
  color: white;
}
.badge-f {
  border-color: #ec4899;
  background: #ec4899;
  color: white;
}
.badge-mixte {
  border-color: #9465c8;
  background: #9465c8;
  color: white;
}
.badge-active {
  background: #dcfce7;
  color: #166534;
}
.badge-done {
  background: #e5e7eb;
  color: #6b7280;
}

.ga-badge {
  font-size: 0.875rem;
  font-weight: 900;
  padding: 8px 12px 10px;
  border-radius: 99px;
  min-width: 38px;
  text-align: center;
  white-space: nowrap;
  line-height: 0.875rem;
}
.ga-badge.ga-positive {
  background: #dcfce7;
  color: #166534;
}
.ga-badge.ga-negative {
  background: #fee2e2;
  color: #991b1b;
}
.ga-badge.ga-zero {
  background: #f3f4f6;
  color: #9ca3af;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  text-align: center;
  background: white;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.stat-title {
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 6px;
  font-weight: 600;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
}

.tournament-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tournament-item {
  padding-bottom: 14px;
  border-bottom: 1px solid #f3f4f6;
}
.tournament-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.tournament-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.tournament-name {
  font-weight: 700;
  margin-bottom: 3px;
}

.tournament-players {
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 3px;
  font-weight: 700;
}

.tournament-meta {
  font-size: 0.82rem;
  color: #6b7280;
}

.tournament-podium {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.podium-item {
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}
.modal h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.nav-choice-modal .nav-choice-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-choice-modal .nav-choice-actions .btn {
  width: 100%;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #9ca3af;
}
.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 0.92rem;
}

.detail-placeholder {
  text-align: center;
  padding: 60px 24px;
  color: #9ca3af;
}
.detail-placeholder .icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.alert {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.alert-warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}
.alert-info {
  background: #eef2f6;
  border: 1px solid #3d4c5e;
  color: #26323e;
}
.alert-danger {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}
@media (max-width: 780px) {
  .player-grid {
    max-height: none;
    overflow-y: visible;
  }
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.88rem;
  font-weight: 600;
  user-select: none;
  background: white;
}
.player-chip:hover {
  border-color: #9ca3af;
}
.player-chip.selected-h {
  border-color: #3b82f6;
  background: #eff6ff;
}
.player-chip.selected-f {
  border-color: #ec4899;
  background: #fdf2f8;
}
.player-chip .picto {
  font-size: 1rem;
  flex-shrink: 0;
}

#stepCreation,
#stepJeu {
  display: none;
}
#stepCreation.active,
#stepJeu.active {
  display: block;
}

.step-tabs {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 28px;
}

.step-tab {
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #9ca3af;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: default;
}
.step-tab.active {
  color: #3d4c5e;
  border-bottom-color: #3d4c5e;
}
.step-tab.done {
  color: #6b7280;
}

.round-block {
  background: white;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.round-header {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.round-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.round-rest {
  font-size: 0.82rem;
  color: #6b7280;
}

.courts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.court {
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.court-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9ca3af;
  margin-bottom: 1rem;
  text-align: center;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  margin-bottom: 12px;
}

.team-side {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  text-align: right;
}
.team-side .filler {
  color: #9ca3af;
  font-weight: 400;
  font-style: italic;
}
.team-side-r {
  text-align: left;
}

.player-link {
  color: inherit;
  text-decoration: none;
}
.player-link:hover {
  text-decoration: underline;
}

.match-vs {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9ca3af;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.match-pronostic {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  margin: -6px 0 12px;
}

.pronostic-pct {
  flex: 1;
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
  text-align: right;
}
.pronostic-pct:last-child {
  text-align: left;
}
.pronostic-pct.fav {
  color: #3d4c5e;
}

.pronostic-sep {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
  flex-shrink: 0;
}

.match-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.team-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.team-score-l {
  align-items: end;
}
.team-score-r {
  align-items: start;
}

.score-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.score-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}
.score-controls .score-btn:nth-child(3) {
  margin-left: 10px;
}

.score-input {
  font-size: 1.5rem;
  font-weight: 800;
  height: 3rem;
  width: 4rem !important;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  padding: 0;
  -moz-appearance: textfield;
}
.score-input::-webkit-outer-spin-button, .score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.score-input:focus {
  outline: 2px solid #3d4c5e;
  border-color: transparent;
}
.score-input[readonly] {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.sep {
  color: #d1d5db;
  font-weight: 700;
  font-size: 1rem;
}

.rattrapage-section {
  margin-top: 3.5rem;
  padding: 20px;
  border: 2px solid #f97316;
  border-radius: 12px;
  background: white;
}

.rattrapage-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #f97316;
  text-align: center;
  margin-bottom: 14px;
}

.ranking-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.ranking-block {
  margin-bottom: 24px;
}
.ranking-block h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
  color: #111827;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.88rem;
}
.rank-row:last-child {
  border-bottom: none;
}

.rank-pos {
  width: 22px;
  color: #9ca3af;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.rank-name {
  flex: 1;
  font-weight: 700;
}

.rank-medal {
  font-size: 1rem;
  margin-right: 2px;
}

.rank-ga {
  font-weight: 800;
  min-width: 44px;
  text-align: right;
}
.rank-ga.pos {
  color: #166534;
}
.rank-ga.neg {
  color: #ef4444;
}

.rank-played {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: right;
  min-width: 64px;
}

#enCoursGrid {
  margin-bottom: 24px;
}

#terminesGrid {
  margin-bottom: 48px;
}

.tournoi-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
  color: #6b7280;
  padding-bottom: 10px;
  margin-top: 32px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.tournoi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1200px) {
  .tournoi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .tournoi-grid {
    grid-template-columns: 1fr;
  }
}
.tournoi-grid .detail-placeholder {
  grid-column: 1/-1;
}

.tournoi-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  gap: 12px;
  flex-wrap: wrap;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.12s;
}
.tournoi-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 2px #eef2f6;
}
.tournoi-card.active {
  background: #eef2f6;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 2px #3d4c5e;
}

.tournoi-name {
  font-weight: 800;
  margin-bottom: 3px;
}

.tournoi-meta {
  font-size: 0.82rem;
  color: #6b7280;
}

.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.edit-banner {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.hidden {
  display: none !important;
}

.hp-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.text-muted {
  color: #6b7280;
  font-size: 0.85rem;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: #6b7280;
}

.nowrap {
  white-space: nowrap;
}

.flex-between {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.flex-start {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
}

.match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.panel-flush {
  padding: 0;
  overflow: hidden;
}

.p-32 {
  padding: 32px;
}

.mt-4 {
  margin-top: 4px;
}

.mt-6 {
  margin-top: 6px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-64 {
  margin-top: 4rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-4 {
  margin-bottom: 4px;
}

.mb-6 {
  margin-bottom: 6px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-24 {
  margin-bottom: 24px;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 800;
}

h2.panel-title {
  font-size: 1.4rem;
  color: #3d4c5e;
}

.filter-panel {
  padding: 1rem;
  margin-bottom: 16px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-bar-wrap {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.search-compact {
  flex: 1 1 180px;
  font-size: 0.9rem;
  height: 44px;
}

.genre-filter-group {
  flex: 0 0 auto;
}
.genre-filter-group .type-radio {
  min-width: 72px;
  padding: 10px 14px;
  font-size: 0.85rem;
}

.search-flex {
  flex: 1;
  min-width: 120px;
}

#filterGenre {
  max-width: 160px;
  flex: 1 1 140px;
  font-size: 0.9rem;
  height: 44px;
  padding: 8px 12px;
}

#filterType {
  max-width: 160px;
  flex: 1 1 120px;
}

#filterStatut {
  max-width: 170px;
  flex: 1 1 130px;
}

th[data-col=genre] {
  width: 56px;
}

.col-actions {
  width: 100px;
  text-align: right;
  cursor: default;
}

#msgSuppr {
  color: #6b7280;
  line-height: 1.5;
}

.counter-input {
  max-width: 80px;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.classement-title {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.ranking-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.player-grid-empty {
  padding: 20px;
  grid-column: 1/-1;
}

.player-grid-break {
  grid-column: 1/-1;
  height: 0;
}

.picto-h {
  color: #3b82f6;
}

.picto-f {
  color: #ec4899;
}

.tournoi-card-info {
  flex: 1;
  min-width: 0;
}

.tournoi-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.detail-meta {
  font-size: 0.82rem;
  color: #6b7280;
}

.streak-count {
  font-size: 1.6rem;
  font-weight: 800;
  color: #166534;
}

.streak-label {
  color: #6b7280;
  font-size: 0.88rem;
  margin-left: 6px;
}

.streak-hint {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 6px;
}

.duo-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.78rem;
  color: #3d4c5e;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding-inline: 1rem;
  margin-bottom: 2rem;
}
.duo-group-title::before, .duo-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.podium-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  .podium-groups {
    grid-template-columns: 1fr;
  }
}
.podium-col {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 8px 0;
}

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 170px;
  margin-bottom: 8px;
}

.podium-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.podium-player {
  margin-bottom: 8px;
}

.podium-name {
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: break-word;
}

.podium-stat {
  font-size: 0.7rem;
  color: #6b7280;
  text-align: center;
}

.podium-block {
  width: 100%;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 10px;
  font-weight: 800;
  font-size: 1.4rem;
  color: #6b7280;
  background: #e5e7eb;
}

.podium-step.rank-1 .podium-block {
  height: 100px;
}

.podium-step.rank-2 .podium-block {
  height: 72px;
}

.podium-step.rank-3 .podium-block {
  height: 60px;
}

.record-body {
  flex: 1;
}

.rel-name.empty {
  color: #9ca3af;
}

.stats-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.ts-wl {
  font-size: 0.82rem;
  color: #6b7280;
}

.player-identity-panel {
  padding: 16px 20px;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#tablePlayers th {
  white-space: normal;
  max-width: 100px;
  line-height: 1.3;
  vertical-align: middle;
}

#tablePlayers th,
#tablePlayers td {
  text-align: center;
}

#tablePlayers th .sort-arrow {
  display: block;
  margin-left: 0;
  margin-top: 3px;
  text-align: center;
}

#tablePlayers td.pos {
  color: #166534;
  font-weight: 700;
}

#tablePlayers td.neg {
  color: #ef4444;
  font-weight: 700;
}

#tablePlayers td sup {
  color: #000;
  opacity: 0.75;
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  flex-shrink: 0;
}
.player-avatar.h {
  background: #eff6ff;
  color: #3b82f6;
}
.player-avatar.f {
  background: #fdf2f8;
  color: #ec4899;
}

.player-info-name {
  font-size: 1.3rem;
  font-weight: 800;
}

.player-info-sub {
  font-size: 0.82rem;
  color: #6b7280;
  margin-top: 2px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  position: relative;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
}
.kpi-card.accent-green {
  border-color: #86efac;
  background: #dcfce7;
}
.kpi-card.accent-green .kpi-value {
  color: #166534;
}
.kpi-card.accent-red {
  border-color: #fee2e2;
  background: #fee2e2;
}
.kpi-card.accent-red .kpi-value {
  color: #ef4444;
}
.kpi-card.accent-blue {
  border-color: #eff6ff;
  background: #eff6ff;
}
.kpi-card.accent-blue .kpi-value {
  color: #3b82f6;
}
.kpi-card.accent-purple {
  border-color: #eef2f6;
  background: #eef2f6;
}
.kpi-card.accent-purple .kpi-value {
  color: #3d4c5e;
}
.kpi-card[data-tip]::before {
  content: "ⓘ";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.7rem;
  color: #d1d5db;
}
.kpi-card[data-tip]::after {
  content: attr(data-tip);
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  background: #111827;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 20;
}
.kpi-card.tip-open[data-tip]::after {
  display: block;
}

.kpi-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6b7280;
  font-weight: 600;
}

.kpi-sub {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 4px;
}

.section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #6b7280;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  margin-top: 8px;
}
.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #111827;
  color: white;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 8px));
  transition: opacity 0.1s;
  z-index: 5;
}
.chart-tooltip.visible {
  opacity: 1;
}

.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.relation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.relation-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.relation-card .rel-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.relation-card .rel-name {
  font-weight: 800;
  font-size: 0.95rem;
}
.relation-card .rel-stat {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
}
.relation-card.best {
  border-color: #86efac;
  background: #dcfce7;
}
.relation-card.worst {
  border-color: #fca5a5;
  background: #fee2e2;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 16px;
}

.badge-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.badge-image-wrap {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.badge-fallback-icon {
  display: none;
  font-size: 2.8rem;
}

.badge-image-wrap.badge-fallback .badge-fallback-icon {
  display: flex;
}

.badge-caption {
  font-weight: 800;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

.badge-detail {
  font-size: 0.68rem;
  color: #6b7280;
  line-height: 1.25;
}

.streak-bar {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: nowrap;
  margin-top: 10px;
}

.streak-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 6px;
}

.streak-dot {
  flex: 1 1 0;
  min-width: 0;
  max-width: 44px;
  aspect-ratio: 1/1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.55rem, 3.6vw, 1rem);
  font-weight: 800;
}
.streak-dot.w {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.streak-dot.l {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.tournoi-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #f3f4f6;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.tournoi-stat-row:last-child {
  border-bottom: none;
}

.ts-name {
  font-weight: 700;
  flex: 1;
}

.ts-date {
  color: #9ca3af;
  font-size: 0.78rem;
  white-space: nowrap;
}

.ts-rank {
  font-weight: 800;
  min-width: 28px;
  text-align: right;
}

.ts-ga {
  min-width: 44px;
  text-align: right;
  font-weight: 700;
}
.ts-ga.pos {
  color: #166534;
}
.ts-ga.neg {
  color: #ef4444;
}

.stats-hint {
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.stats-placeholder {
  text-align: center;
  padding: 64px 24px;
  color: #9ca3af;
}
.stats-placeholder .icon {
  font-size: 3rem;
  margin-bottom: 14px;
}
.stats-placeholder p {
  font-size: 0.95rem;
}

.loading-state {
  text-align: center;
  padding: 64px 24px;
  color: #9ca3af;
}
.loading-state p {
  margin-top: 14px;
  font-size: 0.92rem;
}

.rally-loader {
  display: block;
  margin: 0 auto;
  mix-blend-mode: multiply;
  filter: hue-rotate(-162deg);
}

.record-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.88rem;
}
.record-row:last-child {
  border-bottom: none;
}

.record-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.record-label {
  color: #6b7280;
  flex: 1;
}

.record-value {
  font-weight: 800;
}
.record-value.pos {
  color: #166534;
}
.record-value.neg {
  color: #ef4444;
}

.record-detail {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 1px;
}

.page-avis {
  display: flex;
  flex-direction: column;
  max-width: 992px;
  height: 100svh;
  padding: 24px 24px 16px;
}

@media (max-width: 1200px) {
  .page-avis {
    height: calc(100svh - 64px);
  }
}
.comments-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comments-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 4px 20px;
}

.comment-item {
  padding: 16px 4px;
  border-bottom: 1px solid #f3f4f6;
}
.comment-item:last-child {
  border-bottom: none;
}
.comment-item.deleted .comment-author, .comment-item.deleted .comment-date, .comment-item.deleted .comment-deleted-tag, .comment-item.deleted .comment-message {
  opacity: 0.5;
}

.comment-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.comment-author {
  font-weight: 800;
  color: #111827;
}

.comment-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

.comment-deleted-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #991b1b;
  background: #fee2e2;
  padding: 2px 9px;
  border-radius: 999px;
}

.comment-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.comment-delete:hover {
  color: #ef4444;
}

.comment-hard-delete {
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  background: #ef4444;
  border: none;
  border-radius: 999px;
  padding: 4px 11px;
}
.comment-hard-delete:hover {
  background: #991b1b;
  color: white;
}

.comment-message {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-composer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 16px;
}
.comment-composer textarea {
  resize: vertical;
}
.comment-composer .btn {
  align-self: flex-end;
}

.comment-login-prompt {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 16px;
}

@media (max-width: 640px) {
  .page {
    padding: 16px 12px 48px;
  }
  .page-title {
    font-size: 1.4rem;
  }
  .modal {
    padding: 20px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .match-scores {
    gap: 1rem;
  }
}
