/* Reset de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #0f1c24; /* bleu très foncé, proche du noir */
  background: url('images/stupspawn.webp') no-repeat center center fixed;
  background-size: cover;
  color: #e6f1f5; /* texte gris clair légèrement bleuté */
  line-height: 2;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 28, 36, 0.7);
  z-index: -1;
}

/* --- HEADER / MENU --- */
header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #102a33;
  color: #00c8d6;
  padding: 12px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.logo {
  font-weight: bold;
  font-size: 1.3em;
}

.nav-menu {
  display: flex;
  gap: 20px;
}

.nav-menu a {
  color: #e6f1f5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: #00c8d6;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: #00c8d6;
  cursor: pointer;
}

/* --- CONTENU PRINCIPAL --- */
main {
  padding: 90px 20px 40px;
  max-width: 900px;
  margin: auto;
}

section {
  margin-bottom: 70px;
}

h1 {
  margin-bottom: 30px;
}

h3,
h4 {
  margin-top: 30px;
}

#accueil {
  text-align: center;
}

ul,
ol {
  padding-left: 2em;
}

/* --- WIKI NAV --- (par défaut visible, ajusté en responsive plus bas) */
.wiki-nav a {
  display: inline-block;
  margin: 5px 10px 5px 0;
  padding: 6px 12px;
  border: 1px solid #00c8d6;
  border-radius: 4px;
  color: #e6f1f5;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  font-size: 0.85em;
}

.wiki-nav a:hover,
.wiki-nav a.active {
  background: #00c8d6;
  color: #0f1c24;
}

/* Sections visibles en continu */
.wiki-section {
  display: block;
  background: #152f3a;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #1f3b47;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
  scroll-margin-top: 100px; /* espace sous le header */
}

.wiki-section,
h2,
h3,
h4 {
  scroll-margin-top: 100px; /* espace en haut quand on clique sur un lien */
}

.wiki-section h2 {
  color: #00c8d6;
  margin-bottom: 10px;
}

/* --- BOUTONS / ELEMENTS SPECIAUX --- */
button {
  background: #00c8d6;
  color: #0f1c24;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #00a6b3;
}

/* --- LIENS SPÉCIAUX --- */
a {
  color: #00c8d6;
}

a:hover {
  color: #00e6f2;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* IFRAMES, VIDEOS ET IMAGES */
iframe,
video,
img {
  display: block;
  margin: 20px auto;
  max-width: 100% !important;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

iframe {
  max-width: 800px;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 20px auto;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-container {
  position: relative;
  width: 80%;
  max-width: 560px;
  margin: 20px auto;
  height: 560px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* FOOTER */
footer {
  bottom: 0;
  position: fixed;
  width: 100%;
  text-align: center;
  background-color: #0f1c24;
}

/* --- RESPONSIVE --- */

/* Menu latéral desktop */
@media (min-width: 1024px) {
  .wiki-nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 220px;
    height: calc(100% - 80px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #152f3a;
    border-right: 3px solid #00c8d6;
    padding: 15px;
    border-radius: 0;
    gap: 8px;
    z-index: 900;
  }

  main {
    margin-left: 240px;
    max-width: 900px;
  }

  .wiki-nav a {
    text-align: left;
    margin: 0;
  }
}

/* Menu horizontal tablette/mobile */
@media (max-width: 1023px) {
  header {
    flex-direction: column;
  }
  h1 {
    font-size: 1.85em;
  }
  .wiki-nav {
    position: relative;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    border: none;
    border-bottom: 3px solid #00c8d6;
    margin-bottom: 20px;
    padding: 12px;
    background: #152f3a;
    border-radius: 6px;
    gap: 10px;
  }

  .wiki-nav a {
    min-width: 120px;
    text-align: center;
  }

  main {
    margin-left: 0;
    padding: 90px 15px 40px;
  }
}

@media (max-width: 500px) {
  .wiki-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .wiki-nav a {
    width: 100%;
  }
}

.back-to-top {
  text-align: right;
  margin-top: 20px;
}

.back-to-top a {
  font-size: 0.8em;
  color: #00c8d6;
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid #00c8d6;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.back-to-top a:hover {
  background: #00c8d6;
  color: #0f1c24;
}

/* N'afficher le lien retour qu'en responsive */
@media (min-width: 1024px) {
  .back-to-top {
    display: none;
  }
}
