*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0c0e14;
  color: #d8d8e0;
  min-height: 100vh;
  padding: 0.1rem 1rem 3.5rem;
}

a {
  color: #e8c547;
}

h1 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #e8c547;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.dates-content>.date-item {
  border-bottom: none;
}

.card {
  background: #161820;
  border: 1px solid #252733;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.card::after {
  content: '↗ Ouvrir';
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #e8c547;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.18s;
}

a.card:hover {
  transform: translateY(-5px);
  border-color: #e8c547;
  box-shadow: 0 10px 30px rgba(232, 197, 71, 0.12);
}

a.card:hover::after {
  opacity: 1;
}

a.card.no-hover,
a.card.no-hover:focus,
a.card.no-hover:active {
  transform: none !important;
  border-color: #252733 !important;
  box-shadow: none !important;
  outline: none !important;
}

a.card.no-hover::after {
  opacity: 0 !important;
}

.card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #0c0e14;
  display: block;
}

.card-img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #0c0e14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #2a2d3a;
}

.card-body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.table-scroll {
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e8c547 #1a1c28;
}

.table-scroll::-webkit-scrollbar {
  width: 6px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #1a1c28;
  border-radius: 3px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #e8c547;
  border-radius: 3px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #f0d060;
}

.card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.dates-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #d1d1d1;
  margin-bottom: 0.1rem;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  background: #fff;
  border-radius: 4px;
  color: #e53935;
  margin-left: 0.4rem;
  vertical-align: middle;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.map-link:hover {
  background: #f0f0f0;
  color: #c62828;
}

.map-icon {
  width: 1.3rem;
  height: 1.3rem;
  pointer-events: none;
}

.tables-count {
  font-size: 1em;
  color: #e8c547;
  white-space: nowrap;
}

.mini-ranking-toggle {
  background: none;
  border: 1px solid #252733;
  border-radius: 6px;
  color: #8d909e;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: border-color 0.15s, color 0.15s;
}

.mini-ranking-toggle:hover,
.mini-ranking-toggle.open {
  border-color: #e8c547;
  color: #e8c547;
}

.mini-ranking-table {
  display: none;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-top: 0.3rem;
}

.mini-ranking-table.open {
  display: table;
}

.mini-ranking-table td {
  padding: 0.18rem;
  border-bottom: 1px solid #1e2030;
  color: #d8d8e0;
}

.mini-ranking-table tr:last-child td {
  border-bottom: none;
}

.mini-ranking-table td:first-child {
  color: #e8c547;
  font-weight: 700;
  width: 1.6rem;
}

.mini-ranking-table td:last-child {
  color: #8d909e;
  text-align: right;
}

.date-item {
  font-size: 1rem;
  color: #8ecf8e;
  padding: 0.3rem 0;
  text-decoration: underline;
  border-bottom: 1px solid #1e2030;
  line-height: 1.3;
  font-weight: bold;
}

.date-item:last-child {
  border-bottom: none;
}

.no-dates {
  font-size: 1.1rem;
  color: #8d909e;
  font-style: italic;
}

.tourney-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-bottom: 1px solid #1e2030;
  font-size: 0.85rem;
  padding-bottom: 10px;
  border-bottom: 1px solid #1e2030;
}

.tourney-count {
  color: #e8c547;
  font-weight: 600;
}

.tourney-waiting {
  color: #e07b4f;
  font-size: 0.8rem;
  line-height: 1.4;
  word-break: break-word;
}

.tourney-no-wait {
  color: #8ecf8e;
  font-size: 0.8rem;
}

.trophy-badge {
  cursor: help;
}

#trophy-tooltip {
  position: fixed;
  background: #1e2030;
  color: #e8c547;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #3a3d50;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

.skeleton {
  background: linear-gradient(90deg, #1e2030 25%, #252840 50%, #1e2030 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.skeleton-line {
  height: 0.82rem;
  margin: 0.3rem 0;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.long {
  width: 90%;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: #a9aab1;
  background: #0c0e14;
  border-top: 1px solid #1e2030;
  z-index: 100;
}

footer a {
  color: #e8c547;
}

footer a:hover {
  text-decoration: underline;
}

.warning-banner {
  position: relative;
  text-align: center;
  color: #856404;
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 6px 2.5rem 6px 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.warning-dismiss {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #856404;
  opacity: 0.6;
  padding: 0 0.2rem;
  transition: opacity 0.15s;
}

.warning-dismiss:hover {
  opacity: 1;
}

.menu-burger {
  display: none;
}

.back-to-top {
  display: none;
}

@media (max-width: 600px) {

  .tab-bar,
  #news-panel {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1 1 auto;
  }

  .menu-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #161820;
    border: 1px solid #252733;
    border-radius: 8px;
    color: #d8d8e0;
    font-size: 1.1rem;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
    flex: 0 0 auto;
    transition: border-color 0.18s, color 0.18s;
  }

  .menu-burger:hover {
    border-color: #3a3d50;
    color: #e8c547;
  }

  .tab-bar.compact {
    flex-wrap: nowrap;
  }

  .tab-bar.compact .tab-btn:not(.active) {
    display: none;
  }

  .back-to-top {
    position: fixed;
    bottom: 0.6rem;
    right: 1rem;
    background: #1c1e2a;
    border: 1px solid #e8c547;
    border-radius: 50%;
    color: #e8c547;
    font-size: 1.1rem;
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 999;
  }

  .back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .card-img,
  .card-img-placeholder,
  .skeleton-img {
    max-height: 280px;
  }

  #grid-dates {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  #grid-dates .day-label {
    display: block;
    grid-column: span 2;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #e8c547;
    padding: 0.3rem 0.1rem 0.1rem;
    border-bottom: 1px solid #252733;
    margin-bottom: 0.1rem;
  }

  #grid-dates .card-img,
  #grid-dates .card-img-placeholder,
  #grid-dates .skeleton-img {
    max-height: 150px;
  }

  #grid-dates .card-body {
    padding: 0.55rem 0.65rem 0.7rem;
    gap: 0.2rem;
  }

  #grid-dates .card-name {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
  }

  #grid-dates .dates-label {
    font-size: 0.7rem;
  }

  #grid-dates .date-item,
  #grid-dates .no-dates {
    font-size: 0.85rem;
  }

  .dates-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #d1d1d1;
    margin-bottom: 0.1rem;
  }

  .warning-banner {
    position: relative;
    text-align: center;
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 6px 2.5rem 6px 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }

  .warning-dismiss {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: #856404;
    opacity: 0.6;
    padding: 0 0.2rem;
    transition: opacity 0.15s;
  }

  .warning-dismiss:hover {
    opacity: 1;
  }

}

.day-label {
  display: none;
}

.tab-bar {
  display: flex;
  gap: 0.5rem;
  max-width: 1100px;
  margin: 0 auto 1.25rem;
}

#intro-articles {
  margin-bottom: 15px;
}

.text-intro,
#news-panel {
  max-width: 1100px;
  margin: 0 auto 0.25rem;
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.75;
  color: #c8c8d4;
}

.sep-cell {
  padding: 0px !important;
}

.sep-row td {
  padding: 0;
  position: relative;
  border-bottom: none !important;
}

.sep-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #676767;
}

.sep-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: #1e2030;
  border: 1.5px solid #676767;
  color: #9a9aaa;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  z-index: 1;
}

.sep-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #2a2d3a;
  color: #e8c547;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.sep-badge:hover .sep-tooltip,
.sep-badge:focus .sep-tooltip,
.sep-badge.show-tip .sep-tooltip {
  opacity: 1;
}

.card-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.card-name-row .card-name {
  margin-bottom: 0;
  min-width: 0;
}

.card-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.tab-btn {
  background: #161820;
  border: 1px solid #252733;
  border-radius: 8px;
  color: #8d909e;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  white-space: nowrap;
  width: 100%;
}

.tab-btn.active {
  border-color: #e8c547;
  color: #e8c547;
  background: #1c1e2a;
}

.tab-btn:hover:not(.active) {
  border-color: #3a3d50;
  color: #d8d8e0;
}

.season-selector {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1100px;
  margin: 0 auto 1.25rem;
}

.season-past-label {
  font-size: 0.75rem;
  color: #8d909e;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 0.25rem;
}

.season-btn {
  background: #161820;
  border: 1px solid #252733;
  border-radius: 8px;
  color: #8d909e;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.season-btn.active {
  border-color: #e8c547;
  color: #e8c547;
  background: #1c1e2a;
}

.season-btn:hover:not(.active) {
  border-color: #3a3d50;
  color: #d8d8e0;
}

.season-btn small {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.75;
  margin-left: 0.3rem;
}

.grid-panel {
  display: none;
}

.grid-panel.active {
  display: block;
}

#panel-qualifies {
  max-width: 420px;
  margin: 0 auto;
}

.qualifies-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.qualifies-congrats {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8c547;
  margin-bottom: 0.5rem;
}

.qualifies-legend {
  text-align: left;
  font-size: 0.9rem;
  color: #e8c547;
}

.qualifies-info {
  font-size: 1rem;
  color: #8ecf8e;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.qualifies-info a {
  font-size: 0.9rem;
  color: #e8c547;
  text-decoration: underline;
}

.qualifies-card {
  background: #161820;
  border: 1px solid #252733;
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.qualifies-card .table-scroll {
  max-height: none;
}

.table-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  color: #d8d8e0;
}

.table-content th {
  color: #e8c547;
  font-weight: 600;
  border-bottom: 1px solid #2a2d3a;
  padding: 0.35rem 0.4rem;
  text-align: left;
  white-space: nowrap;
}

.table-content td {
  padding: 0.28rem 0.4rem;
  border-bottom: 1px solid #1e2030;
}

.table-content tr:last-child td {
  border-bottom: none;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}

.article-card {
  background: #161820;
  border: 1px solid #252733;
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.article-card:hover {
  border-color: #e8c547;
  box-shadow: 0 6px 20px rgba(232, 197, 71, 0.1);
}

.article-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.article-card-meta {
  font-size: 0.78rem;
  color: #8d909e;
}

.article-view {
  max-width: 720px;
  margin: 0 auto;
}

.article-back {
  background: none;
  border: 1px solid #252733;
  border-radius: 8px;
  color: #8d909e;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: border-color 0.18s, color 0.18s;
}

.article-back:hover {
  border-color: #e8c547;
  color: #e8c547;
}

.article-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.article-author {
  font-size: 0.82rem;
  color: #e8c547;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.article-body {
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.75;
  color: #c8c8d4;
}

.article-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8c547;
  margin: 1.6rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1rem;
  text-indent: 26px;
}

.article-body blockquote {
  border-left: 3px solid #e8c547;
  margin: 1.2rem 0;
  padding: 0.5rem 1rem;
  color: #e0e0ea;
  font-style: italic;
  background: #1a1c28;
  border-radius: 0 6px 6px 0;
}

.article-signature {
  text-align: right;
  font-weight: 700;
  color: #e8c547;
  font-size: 0.95rem;
}

.reglement-view {
  max-width: 720px;
  margin: 0 auto;
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1c1e2a;
  border: 1px solid #e8c547;
  border-radius: 10px;
  color: #e8c547;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: background 0.18s, box-shadow 0.18s;
}

.pdf-btn:hover {
  background: #252840;
  box-shadow: 0 4px 16px rgba(232, 197, 71, 0.15);
}

.reglement-body {
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.75;
  color: #c8c8d4;
}

.reglement-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8c547;
  margin: 1.4rem 0 0.5rem;
}

.reglement-body p {
  margin-bottom: 1rem;
  text-indent: 26px;
}

.reglement-body ul {
  padding-left: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.reglement-body li {
  line-height: 1.6;
}

.img-article {
  display: block;
  border-radius: 10px;
  margin: 1rem 0;
  width: 100%;
}

@media (min-width: 601px) {
  .img-article {
    width: 68%;
    margin: 1rem auto;
  }
}

.dunning-img {
  display: block;
  border-radius: 10px;
  margin: 1rem auto;
  width: 100%;
}

@media (orientation: landscape) {
  .dunning-img {
    width: auto;
    max-height: 600px;
    transform: rotate(270deg);
    margin: -8rem auto;
  }
}