html, body {
  margin:0; height:100%; font-family:'Segoe UI',sans-serif;
  background:linear-gradient(to bottom,#dcdcdc,#000); color:#fff; display:flex; flex-direction:column;
}
table {
  width:80%; border-collapse:collapse; background:#111;
  border-radius:10px; overflow:hidden; box-shadow:0 0 10px rgba(0,0,0,0.5);
}
th, td {padding:0.75rem; text-align:center; border-bottom:1px solid #333;}
th {background:#222; color:#00ffcc;}
td {color:#ccc;}
.points {color:#00ff90; font-weight:bold;}
header {background-color: #222; color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center;}
header h1 {margin: 0; font-size: 1.8rem;}
nav a {color: white; text-decoration: none; margin-left: 1.5rem; font-weight: bold;}
h2 {color: red;}
.dropdown {display: inline-block; position: relative;}
.dropdown-content {
  display: none; position: absolute; background-color: #1e1e1e;
  min-width: 160px; z-index: 1; border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.dropdown-content a {display: block; padding: 10px; color: white; text-decoration: none;}
.dropdown-content a:hover {background-color: #333;}
@media (max-width: 600px) {header h1 {font-size: 1.4rem;} nav a {margin-left: 1rem;}}
  .dropdown {
    display: inline-block;
    position: relative;
  }

  .dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e1e1e;
    min-width: 160px;
    z-index: 1;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  }

  .dropdown-content a {
    display: block;
    padding: 10px;
    color: white;
    text-decoration: none;
  }

  .dropdown-content a:hover {
    background-color: #333;
  }

/* Desert page theme - local to this page/section */
:root {
  --bg: #f3efe6;
  --panel: #fffaf0;
  --panel-2: #f4e6bd;
  --gold: #d6b448;
  --gold-hover: #c79f28;
  --brown: #9a6b46;
  --brown-dark: #50321d;
  --ink: #1f1710;
  --text: #1f1710;
  --muted: rgba(31, 23, 16, 0.72);
  --line: rgba(90, 61, 36, 0.18);
  --shadow: rgba(80, 50, 20, 0.15);
  --hero-image: url("https://images.unsplash.com/photo-1524661135-423995f22d0b?auto=format&fit=crop&w=1800&q=80");
}

body {
  background:
    linear-gradient(180deg, rgba(244, 230, 189, 0.45), transparent 320px),
    var(--bg) !important;
  color: var(--ink) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  min-height: 100vh;
}

body, button, input, select, textarea {
  font-family: Georgia, "Times New Roman", serif !important;
}

header,
.site-header,
.container > header {
  background: var(--panel) !important;
  border-bottom: 2px solid var(--brown) !important;
  color: var(--ink) !important;
  box-shadow: 0 4px 14px var(--shadow);
}

header h1,
header h2,
.site-header h1 {
  color: var(--ink) !important;
}

.header-right,
header nav,
.toolbar {
  gap: 12px;
  flex-wrap: wrap;
}

.home-btn,
header nav a,
.play-btn,
.primary-button,
.logout-button,
.nav-mois a,
.clear-search,
button,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold) !important;
  color: var(--ink) !important;
  border: 2px solid var(--brown) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px var(--shadow);
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.home-btn:hover,
header nav a:hover,
.play-btn:hover,
.primary-button:hover,
.logout-button:hover,
.nav-mois a:hover,
.clear-search:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: var(--gold-hover) !important;
  transform: translateY(-1px);
}

.dropdown {
  position: relative;
}

.dropdown-content {
  background: var(--panel) !important;
  border: 2px solid var(--brown) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px var(--shadow);
  padding: 10px;
  z-index: 1000;
}

.page-info-box,
.country-hero,
.command-hero,
.forum-hero,
.hero {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 2px solid var(--brown) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px var(--shadow);
  background:
    linear-gradient(rgba(55, 37, 24, 0.72), rgba(55, 37, 24, 0.72)),
    var(--hero-image) !important;
  background-position: center !important;
  background-size: cover !important;
  color: #fff7ea !important;
  display: flex;
  align-items: flex-end;
  padding: 36px;
}

.page-info-box,
.hero {
  width: min(1320px, 92%);
  margin: 30px auto 24px;
}

.page-info-box {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.page-info-box span,
.country-kicker,
.command-kicker,
.forum-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 247, 234, 0.32);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.16);
  color: #fff7ea !important;
  font-size: 0.95rem;
  font-weight: 700;
}

.page-info-box h2,
.country-hero h2,
.command-hero h2,
.forum-hero h2,
.hero h2 {
  color: #fff7ea !important;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  margin: 0 0 12px;
}

.page-info-box p,
.country-hero p,
.command-hero p,
.forum-hero p,
.hero p {
  max-width: 860px;
  color: rgba(255, 247, 234, 0.92) !important;
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0;
}

.games-intro,
.section,
.content,
.categories,
.panel,
.section-panel,
.forum-panel,
.command-panel,
.country-panel,
.game-card,
.news-card,
.summary-item,
.box,
.modal-box,
.container,
.card,
article.game-card,
article.news-card {
  background: var(--panel) !important;
  border-color: var(--brown) !important;
  color: var(--ink) !important;
  box-shadow: 0 8px 18px var(--shadow);
}

.games-intro,
.section,
.content,
.categories,
.panel,
.forum-panel,
.command-panel,
.country-panel,
.game-card,
.news-card,
.summary-item,
.box,
.modal-box,
.container,
.card {
  border: 2px solid var(--brown);
  border-radius: 14px;
}

h1, h2, h3, h4,
.section-title {
  color: var(--brown-dark) !important;
}

p,
.muted,
.label,
.forum-row-text p {
  color: var(--muted) !important;
}

input,
select,
textarea {
  background: #fffdf8 !important;
  color: var(--ink) !important;
  border: 2px solid var(--brown) !important;
  border-radius: 10px !important;
}

table {
  background: var(--panel) !important;
  border: 2px solid var(--brown);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 18px var(--shadow);
}

th {
  background: var(--panel-2) !important;
  color: var(--brown-dark) !important;
}

td {
  background: #fffdf8 !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

.tags span,
.forum-meta,
.status,
.country-count,
.command-count,
.command-list span,
.historical-list span {
  background: #fffdf8 !important;
  border: 1px solid var(--line) !important;
  color: var(--brown-dark) !important;
}

footer,
.site-footer,
.footer {
  background: var(--panel) !important;
  border-top: 2px solid var(--brown) !important;
  color: var(--brown-dark) !important;
}

@media (max-width: 760px) {
  .page-info-box,
  .hero {
    width: min(94%, 1320px);
    min-height: 210px;
    padding: 26px;
  }

  .country-hero,
  .command-hero,
  .forum-hero {
    min-height: 210px;
    padding: 26px;
  }

  .page-info-box h2,
  .country-hero h2,
  .command-hero h2,
  .forum-hero h2,
  .hero h2 {
    font-size: 2rem;
  }
}

/* Desert local category/navigation controls */
.categories a,
.category-btn,
.sidebar a,
aside a,
.tab,
.tabs a,
.tabs button,
.filter-btn,
.menu-btn,
.ghost-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: var(--gold) !important;
  color: var(--ink) !important;
  border: 2px solid var(--brown) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px var(--shadow);
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.categories a:hover,
.category-btn:hover,
.sidebar a:hover,
aside a:hover,
.tab:hover,
.tabs a:hover,
.tabs button:hover,
.filter-btn:hover,
.menu-btn:hover,
.ghost-button:hover,
.categories a.active,
.category-btn.active,
.tab.active,
.tabs .active {
  background: var(--gold-hover) !important;
  color: var(--ink) !important;
  transform: translateY(-1px);
}

/* Desert local page flow */
body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  height: auto !important;
}

body > .container,
body > .box {
  align-self: center;
  margin-bottom: 36px;
}

/* Desert layout repair - larger navigation and stable page widths */
header,
.site-header,
.container > header {
  min-height: 76px;
  padding: 18px 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  flex-wrap: wrap !important;
}

header h1,
.site-header h1 {
  font-size: clamp(1.9rem, 2.2vw, 2.6rem) !important;
  line-height: 1.1 !important;
}

header nav,
.header-right,
.toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  flex: 1 1 760px;
}

.home-btn,
header nav a,
.play-btn,
.primary-button,
.logout-button,
.nav-mois a,
.clear-search,
button,
input[type="submit"],
input[type="button"] {
  min-height: 44px !important;
  padding: 12px 18px !important;
  font-size: 1rem !important;
  line-height: 1.12 !important;
  margin-left: 0 !important;
}

.dropdown-content a {
  width: 100% !important;
  margin: 0 0 8px !important;
}

.page-info-box,
.country-hero,
.command-hero,
.forum-hero,
.hero {
  width: min(1500px, calc(100% - 96px)) !important;
  max-width: 1500px !important;
  min-height: 280px !important;
  margin: 32px auto !important;
}

.games-page,
.section,
.games-intro,
.wiki-container,
.forum-page,
.command-page,
.country-page {
  width: min(1500px, calc(100% - 96px)) !important;
  max-width: 1500px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.section,
.games-intro {
  padding: 34px !important;
  margin-bottom: 30px !important;
}

.discover-section {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 28px !important;
}

.discover-text {
  flex: 1 1 420px !important;
  min-width: 280px !important;
}

.discover-img {
  flex: 0 1 380px !important;
  min-width: 260px !important;
}

.news-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
}

.news-card {
  width: auto !important;
  max-width: none !important;
}

.wiki-container {
  display: grid !important;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
  gap: 32px !important;
  align-items: start !important;
  padding: 0 !important;
}

.categories {
  width: auto !important;
  margin-right: 0 !important;
  padding: 18px !important;
}

.categories a,
.category-btn,
.sidebar a,
aside a,
.tab,
.tabs a,
.tabs button,
.filter-btn,
.menu-btn,
.ghost-button {
  min-height: 50px !important;
  padding: 14px 16px !important;
  font-size: 1.05rem !important;
  line-height: 1.15 !important;
  width: 100% !important;
}

.content {
  max-height: none !important;
  min-height: 520px;
  padding: 24px !important;
}

@media (max-width: 980px) {
  header nav,
  .header-right,
  .toolbar {
    justify-content: flex-start !important;
    flex-basis: 100%;
  }

  .page-info-box,
  .country-hero,
  .command-hero,
  .forum-hero,
  .hero,
  .games-page,
  .section,
  .games-intro,
  .wiki-container,
  .forum-page,
  .command-page,
  .country-page {
    width: min(94%, 1500px) !important;
  }

  .wiki-container {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  header,
  .site-header,
  .container > header {
    padding: 16px 20px !important;
  }

  .home-btn,
  header nav a,
  .play-btn,
  .primary-button,
  .logout-button,
  .nav-mois a,
  .clear-search,
  button,
  input[type="submit"],
  input[type="button"] {
    width: 100% !important;
  }
}

/* Desert sizing guard */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Desert root background fix */
html {
  background: var(--bg) !important;
  min-height: 100% !important;
  height: auto !important;
}

body {
  background:
    linear-gradient(180deg, rgba(244, 230, 189, 0.45), transparent 320px),
    var(--bg) !important;
  min-height: 100vh !important;
  height: auto !important;
}

/* Classement page final desert polish */
body {
  overflow-x: hidden;
}

.ranking-panel {
  width: min(1500px, calc(100% - 96px));
  max-width: 1500px;
  margin: 0 auto 48px;
  padding: 30px;
  background: var(--panel);
  border: 2px solid var(--brown);
  border-radius: 14px;
  box-shadow: 0 14px 30px var(--shadow);
  color: var(--ink);
}

.ranking-panel h2 {
  margin: 0 0 24px;
  color: var(--brown-dark) !important;
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  line-height: 1.15;
  text-align: left;
}

.ranking-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 2px solid var(--brown);
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.ranking-panel table,
table {
  width: 100% !important;
  min-width: 560px;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fffdf8 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ranking-panel th,
.ranking-panel td,
th,
td {
  padding: 15px 16px !important;
  border-bottom: 1px solid var(--line) !important;
  text-align: center !important;
  color: var(--ink) !important;
}

.ranking-panel th,
th {
  background: var(--panel-2) !important;
  color: var(--brown-dark) !important;
  font-weight: 800;
}

.ranking-panel td,
td {
  background: #fffdf8 !important;
  font-size: 1rem;
}

.ranking-panel tbody tr:nth-child(even) td {
  background: #fbf2de !important;
}

.ranking-panel tbody tr:hover td {
  background: #f5e6bf !important;
}

.ranking-panel .points,
.points {
  color: var(--brown-dark) !important;
  font-weight: 800;
}

@media (max-width: 980px) {
  .ranking-panel {
    width: min(94%, 1500px);
    padding: 20px;
  }
}


/* Warzone classement additions */
.warzone-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.warzone-toolbar h2 {
  margin: 0 !important;
}

.warzone-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.warzone-filter label {
  color: var(--brown-dark) !important;
  font-weight: 800;
}

.warzone-filter input[type="date"],
.warzone-filter select {
  min-height: 44px;
  padding: 10px 12px;
}

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

.warzone-card {
  background: #fffdf8;
  border: 2px solid var(--brown);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 18px var(--shadow);
}

.warzone-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted) !important;
  font-weight: 700;
}

.warzone-card strong {
  display: block;
  color: var(--brown-dark) !important;
  font-size: 1.7rem;
  line-height: 1.1;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--brown-dark);
  font-weight: 900;
}

.ranking-panel tbody tr:first-child .rank-badge {
  background: var(--gold);
  border-color: var(--brown);
}

.empty-ranking {
  padding: 24px;
  color: var(--muted) !important;
  text-align: center;
  font-weight: 700;
}

.updated-cell {
  font-size: 0.92rem !important;
  color: var(--muted) !important;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .warzone-toolbar {
    align-items: stretch;
  }

  .warzone-filter,
  .warzone-filter input,
  .warzone-filter select,
  .warzone-filter button,
  .warzone-filter a {
    width: 100% !important;
  }
}


.warzone-period-info {
  margin: 8px 0 0;
  color: var(--muted) !important;
  font-weight: 700;
}
