/* Layout général */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  margin: 0;
  background: #f4f4f7;
  color: #222;
}

/* Header */
.lt-header {
  background: linear-gradient(120deg, #1b3b73, #274b8f);
  color: #fff;
  padding: 18px 24px;
  /* plus de hauteur */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* espace entre gauche et droite */
  flex-wrap: wrap;
  /* permet de passer en 2 lignes sur petits écrans */
}

/* Bloc gauche : logo + textes */
.lt-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  /* prend la place disponible */
  min-width: 0;
  /* évite des débordements bizarres */
}

/* Titre / sous-titre */
.lt-title {
  margin: 0;
  font-size: 24px;
  /* un peu plus gros */
  letter-spacing: 0.03em;
}

.lt-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.9;
}

/* Bloc droit : saison / division */
.lt-header-right {
  text-align: right;
  font-size: 13px;
  flex: 0 0 auto;
  /* ne s’étire pas, reste compact */
  max-width: 40%;
  /* évite de pousser hors écran */
  white-space: nowrap;
  /* garde sur une ligne tant que possible */
}

.lt-info-select {
  padding: 2px 6px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #ccd3e0;
  background: #fff;
}

.lt-info-select:focus {
  outline: none;
  border-color: #2b6cb0;
}

.lt-season-name {
  font-weight: 600;
}

.lt-season-division {
  opacity: 0.9;
}

/* Responsive : centrer tout en pile sur petits écrans */
@media (max-width: 600px) {
  .lt-header {
    justify-content: center;
  }

  .lt-header-left,
  .lt-header-right {
    text-align: center;
    justify-content: center;
  }

  .lt-header-right {
    max-width: 100%;
    white-space: normal;
  }
}


/* Main layout */
.lt-main {
  max-width: 1200px;
  margin: 18px auto 32px;
  padding: 0 12px;
}

.lt-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
}

/* Sidebar */
.lt-sidebar-title {
  margin: 0 0 8px;
  font-size: 16px;
}

.lt-sidebar-card {
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e6f0;
}

.lt-sidebar-label {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

.lt-sidebar-value {
  font-size: 14px;
  font-weight: 600;
}

.lt-sidebar-help {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.8;
}

/* Content */
.lt-content {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e6f0;
}

/* Tabs */
.lt-tabs {
  display: flex;
  border-bottom: 1px solid #dde2ee;
  margin-bottom: 10px;
}

.lt-tab-btn {
  border: none;
  background: transparent;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  color: #555;
}

.lt-tab-btn-active {
  border-bottom-color: #1b3b73;
  color: #1b3b73;
  font-weight: 600;
}

.lt-tab-panel {
  display: none;
}

.lt-tab-panel-active {
  display: block;
}

.lt-panel-title {
  margin: 8px 0 10px;
  font-size: 18px;
}

/* Cards & home grid */
.lt-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.lt-card {
  background: #fafbff;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid #e1e5f2;
}

.lt-card-full {
  margin-top: 4px;
}

.lt-card-title {
  margin: 0 0 8px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lt-card-badge {
  background: #f0d600;
  color: #333;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Lists */
.lt-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 13px;
}

.lt-list li {
  padding: 4px 0;
  border-bottom: 1px dashed #e0e4f0;
}

.lt-list li:last-child {
  border-bottom: none;
}

/* Tables */
.lt-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.lt-table th,
.lt-table td {
  border: 1px solid #e0e3ef;
  padding: 6px 8px;
}

.lt-table th {
  background: #f0f2f7;
  text-align: left;
}

.lt-table tr:nth-child(even) td {
  background: #fafbff;
}

/* Status badges */
.status-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
}

.status-scheduled {
  background: #e3f2fd;
  color: #1b3b73;
}

.status-final {
  background: #e8f5e9;
  color: #1b5e20;
}

/* States */
.lt-loading {
  font-size: 13px;
  opacity: 0.8;
}

.lt-error {
  color: #c62828;
  margin-top: 6px;
  font-size: 13px;
}

.lt-empty {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.8;
}

/* Filters */
.lt-filters {
  margin-bottom: 8px;
  font-size: 13px;
}

.lt-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Rivalry box */
.lt-rivalry {
  font-size: 13px;
}

.lt-rivalry-main {
  font-weight: 600;
}

.lt-rivalry-secondary {
  margin-top: 4px;
  opacity: 0.8;
}

/* Players grid */
.lt-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.lt-player-card {
  border-radius: 8px;
  border: 1px solid #e1e5f2;
  padding: 8px 10px;
  background: #fafbff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lt-player-name {
  font-size: 14px;
  font-weight: 600;
}

.lt-player-meta {
  font-size: 11px;
  opacity: 0.8;
}

.lt-player-stats {
  font-size: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.lt-player-btn {
  margin-top: 6px;
  align-self: flex-start;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: none;
  background: #1b3b73;
  color: #fff;
  cursor: pointer;
}

/* Player detail */
.lt-player-detail {
  margin-top: 16px;
  border-radius: 8px;
  border: 1px solid #e1e5f2;
  padding: 10px 12px;
  background: #fdfdfd;
}

.lt-player-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lt-player-detail-name {
  margin: 0;
  font-size: 16px;
}

.lt-player-detail-close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lt-player-detail-stats {
  margin-top: 6px;
  font-size: 13px;
}

.lt-player-detail-matches-title {
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
}

.lt-player-detail-table th,
.lt-player-detail-table td {
  font-size: 12px;
}

/* Responsive */
@media (max-width: 900px) {
  .lt-layout {
    grid-template-columns: 1fr;
  }

  .lt-home-grid {
    grid-template-columns: 1fr;
  }
}

/* Bracket des séries */

.lt-bracket-premium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.lt-bracket-round {
  position: relative;
  display: flex;
  flex-direction: column;
}

.lt-bracket-round-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 14px;
}

.lt-bracket-round-body {
  position: relative;
  flex: 1;
}

.lt-bracket-slot {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 92px;
}

.lt-bracket-slot.qf:nth-child(1) {
  margin-top: 0;
}

.lt-bracket-slot.qf:nth-child(2) {
  margin-top: 34px;
}

.lt-bracket-slot.qf:nth-child(3) {
  margin-top: 34px;
}

.lt-bracket-slot.qf:nth-child(4) {
  margin-top: 34px;
}

.lt-bracket-slot.sf:nth-child(1) {
  margin-top: 63px;
}

.lt-bracket-slot.sf:nth-child(2) {
  margin-top: 158px;
}

.lt-bracket-slot.f:nth-child(1) {
  margin-top: 175px;
}

.lt-bracket-card {
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.lt-bracket-card.final {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.lt-bracket-card.champion {
  border-color: #facc15;
  background: linear-gradient(180deg, #fffdf2 0%, #fff8db 100%);
  box-shadow: 0 6px 18px rgba(250, 204, 21, 0.2);
}

.lt-bracket-player {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 14px;
}

.lt-bracket-player+.lt-bracket-player {
  border-top: 1px solid #f1f5f9;
}

.lt-bracket-player-name {
  font-weight: 600;
}

.lt-bracket-player-muted {
  opacity: 0.6;
}

.lt-bracket-player-winner {
  color: #166534;
  font-weight: 800;
}

.lt-bracket-player-score {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lt-bracket-card-meta {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.72;
}

.lt-bracket-champion-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #facc15;
  color: #4a3410;
  font-size: 12px;
  font-weight: 800;
}

.lt-bracket-connector-right::after {
  content: '';
  position: absolute;
  right: -14px;
  top: 50%;
  width: 14px;
  border-top: 2px solid #d1d5db;
}

.lt-bracket-connector-mid::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 14px;
  border-top: 2px solid #d1d5db;
}

.lt-bracket-connector-v-up::after {
  content: '';
  position: absolute;
  right: -14px;
  top: 50%;
  width: 2px;
  height: 110px;
  background: #d1d5db;
}

.lt-bracket-connector-v-down::after {
  content: '';
  position: absolute;
  right: -14px;
  top: calc(50% - 110px);
  width: 2px;
  height: 110px;
  background: #d1d5db;
}

.lt-bracket-round.sf .lt-bracket-slot:nth-child(1)::before,
.lt-bracket-round.sf .lt-bracket-slot:nth-child(2)::before,
.lt-bracket-round.f .lt-bracket-slot:nth-child(1)::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 14px;
  border-top: 2px solid #d1d5db;
}

.lt-bracket-empty {
  padding: 12px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  color: #64748b;
  background: #fafafa;
}

@media (max-width: 980px) {
  .lt-bracket-premium {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .lt-bracket-slot,
  .lt-bracket-slot.qf:nth-child(2),
  .lt-bracket-slot.qf:nth-child(3),
  .lt-bracket-slot.qf:nth-child(4),
  .lt-bracket-slot.sf:nth-child(1),
  .lt-bracket-slot.sf:nth-child(2),
  .lt-bracket-slot.f:nth-child(1) {
    margin-top: 0;
    min-height: auto;
  }

  .lt-bracket-slot::before,
  .lt-bracket-slot::after,
  .lt-bracket-round.sf .lt-bracket-slot:nth-child(1)::before,
  .lt-bracket-round.sf .lt-bracket-slot:nth-child(2)::before,
  .lt-bracket-round.f .lt-bracket-slot:nth-child(1)::before {
    display: none;
  }
}

.lt-player-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.lt-stat-box {
  border: 1px solid #e1e5f2;
  background: #fafbff;
  border-radius: 10px;
  padding: 10px 12px;
}

.lt-stat-label {
  font-size: 11px;
  opacity: 0.75;
  margin-bottom: 6px;
}

.lt-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #1b3b73;
}

.lt-stat-box-form {
  grid-column: span 2;
}

.lt-stat-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lt-form-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.lt-form-win {
  background: #e8f5e9;
  color: #1b5e20;
}

.lt-form-loss {
  background: #ffebee;
  color: #b71c1c;
}

.lt-form-neutral {
  background: #eceff1;
  color: #455a64;
}

.lt-empty-inline {
  font-size: 12px;
  opacity: 0.75;
}

button {
  padding: 6px 10px;
  cursor: pointer;
}

.badge {
  background: #4caf50;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
}

.lt-score-submitted-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e8f5e9;
  color: #1b5e20;
}

.lt-player-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 700;
}

.lt-player-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.lt-advanced-card {
  border: 1px solid #e1e5f2;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
}

.lt-advanced-value {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
}

.lt-top-performers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.lt-top-performer-card {
  border: 1px solid #e1e5f2;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
}

.lt-top-performer-label {
  font-size: 11px;
  opacity: 0.75;
  margin-bottom: 6px;
}

.lt-top-performer-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.lt-top-performer-value {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1b3b73;
}

.score-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.score-modal-card {
  background: white;
  width: min(520px, 94vw);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.score-match-info {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 12px 0 18px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
  text-align: center;
}

.score-vs {
  font-weight: 800;
  color: #64748b;
}

.score-grid {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.score-grid input {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
}

.score-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.lt-login-modal {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.22), transparent 35%),
    rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lt-login-card {
  background: #ffffff;
  width: min(420px, 92vw);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.lt-login-card h3 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
}

.lt-login-card label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  margin-top: 14px;
}

.lt-login-card input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font-size: 15px;
  outline: none;
  background: #f8fafc;
}

.lt-login-card input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.lt-login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.lt-login-actions button {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}

#playerLoginSubmit {
  background: #2563eb;
  color: #fff;
}

#playerLoginSubmit:hover {
  background: #1d4ed8;
}

#playerLoginCancel {
  background: #f1f5f9;
  color: #334155;
}

#playerLoginCancel:hover {
  background: #e2e8f0;
}

.lt-login-error {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.lt-player-session {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lt-player-welcome {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.lt-player-session button {
  border: none;
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 800;
  cursor: pointer;
}

#playerLoginBtn {
  background: #ffffff;
  color: #0f172a;
}

#playerLogoutBtn {
  background: #fee2e2;
  color: #991b1b;
}

.lt-match-me {
  background: #eff6ff !important;
  box-shadow: inset 4px 0 0 #2563eb;
}

.lt-match-me td {
  font-weight: 700;
}

.lt-my-match-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
}

.lt-link-button {
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 800;
  cursor: pointer;
}

/* section evenements */

.lt-news-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.lt-news-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 14px 18px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.lt-news-image {
  width: 100%;
  display: block;
  background: #fff;
}

.lt-news-content {
  padding: 20px;
}

.lt-news-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #1e293b;
}

.lt-news-content p {
  color: #475569;
  line-height: 1.5;
}

.lt-news-button {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.lt-news-button:hover {
  background: #1d4ed8;
}