/* ======================= Import Google Font Orbitron ======================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* ======================= Reset / Global ======================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-image: url(/stylesheet/images/body_background.webp);
  font-family: 'Orbitron', sans-serif;
  color: #00f2ff; /* texte principal */
  line-height: 1.5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ======================= Main Container ======================= */
#main-container {
  max-width: 1024px;
  background-image: url(/stylesheet/images/fiche_background.webp);
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
}

#center {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0;
}

#container {
  flex: 1;
  width: 90%;
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(to bottom right, #0a0a0a, #1a1a1a);
  color: #00f2ff;
  padding: 25px;
  border: 2px solid #00f2ff;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,242,255,0.7), 0 0 25px rgba(0,242,255,0.4) inset;
}

/* ======================= Header & Subheader ======================= */
#header {
  position: relative;
  background-image: url(/stylesheet/images/banniere.png);
  background-repeat: no-repeat;
  height: 185px;
}

#header-img { display: none; }

#subheader {
  height: 35px;
  background-image: url(/stylesheet/images/menu_horizontal.png);
  background-repeat: no-repeat;
}

#menu-subheader {
  display: flex;
  justify-content: center;
  list-style: none;
  padding-left: 188px;
  gap: 20px;
}

#menu-subheader li a {
  text-decoration: none;
  color: #00f2ff;
  font-weight: bold;
  transition: color 0.3s;
}

#menu-subheader li a:hover,
#menu-subheader li a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* ======================= Menu Desktop ======================= */
#menu {
  width: 188px;
  background-image: url(/stylesheet/images/menu_gauche.webp);
  color: #00f2ff;
  height: auto;
  display: block;
}

#menu > ul { list-style: none; }

#menu > ul > li.rubrique > .rubrique-header {
  position: relative;
  background: url('/stylesheet/images/rubrique.png') no-repeat left center;
  min-height: 50px;
  line-height: 50px;
  font-weight: bold;
  font-size: 1.2em;
  padding-left: 16px;
  color: #00f2ff;
}

#menu > ul > li.rubrique ul {
  padding-left: 10px;
  font-size: 0.9em;
  margin-top: 0;
  list-style: disc inside;
}

/* Sous-menus par catégorie avec couleurs distinctes */
#menu > ul > li.site-heberge ul li a { color: #cce6ff; }
#menu > ul > li.emulateurs ul li a { color: #a0fff0; }
#menu > ul > li.partenaires ul li a { color: #ffe0b3; }

#menu > ul > li.rubrique ul li a:hover,
#menu > ul > li.rubrique ul li a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* ======================= Container Content ======================= */
#container h1, #container h2, #container h3, #container h4, #container h5, #container h6 {
  color: #00f2ff;
  margin-bottom: 15px;
}

#container p { margin-bottom: 15px; color: #00f2ff; }

/* ======================= Liens par catégorie ======================= */
#container a {
  color: #ffe0b3; /* couleur partenaires par défaut pour liens génériques */
  text-decoration: none;
  transition: color 0.3s;
}

#container a:hover,
#container a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* Liens dans les listes */
ul li a, ol li a {
  color: #ffe0b3;
  text-decoration: none;
  transition: color 0.3s;
}

ul li a:hover, ol li a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* Liens par catégorie spécifiques */
a.news-category-site-heberge { color: #cce6ff; }
a.news-category-emulateurs { color: #a0fff0; }
a.news-category-partenaires { color: #ffe0b3; }

/* ======================= Listes ======================= */
ul li, ol li {
  color: #00dfff; /* couleur des listes harmonisée */
}

/* ======================= News Cards par catégorie ======================= */
.news-category-site-heberge { color: #cce6ff; }
.news-category-emulateurs { color: #a0fff0; }
.news-category-partenaires { color: #ffe0b3; }

/* ======================= Footer ======================= */
#footer {
  height: 23px;
  background-image: url(/stylesheet/images/bg_footer.png);
  background-color: #0a0a0a;
  background-repeat: no-repeat;
  text-align: center;
  padding: 5px 0;
  color: #00f2ff;
  font-size: 0.9em;
}

/* ======================= Hamburger & Mobile Menu ======================= */
#hamburger-btn {
  display: none;
  position: absolute;
  top: 15px;
  right: 20px;
  width: 40px;
  height: 30px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 2000;
}

#hamburger-btn span {
  display: block;
  height: 4px;
  background-color: #00f2ff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

#hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
#hamburger-btn.active span:nth-child(2) { opacity: 0; }
#hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background-color: #0a0a0a;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-top: 60px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1500;
}

#mobile-menu.active { transform: translateX(0); }

#mobile-menu ul { list-style: none; padding: 0 20px; }

#mobile-menu li a {
  color: #00f2ff;
  display: block;
  padding: 8px 0;
  font-weight: bold;
  text-decoration: none;
}

#mobile-menu li a:hover,
#mobile-menu li a:focus { color: #ffffff; }

/* ======================= Focus Accessibility ======================= */
a:focus {
  outline: 2px dashed #00f2ff;
  outline-offset: 3px;
}

/* ======================= Responsive ======================= */
@media screen and (max-width: 1024px) {
  #menu { display: none; }
  #hamburger-btn { display: flex; }
  #center { flex-direction: column; }
  #container { width: 90%; margin-top: 20px; }
  #header { background-image: none; height: auto; }
  #header-img { display: block; }
  .archives-pagination { grid-template-columns: repeat(8, 1fr); }
}

@media screen and (max-width: 768px) {
  #center { flex-direction: column; margin-left: 0; gap: 15px; padding: 10px; }
  #container { width: 100%; margin: 0 auto; padding: 15px; border-radius: 10px; text-align: center; }
  .news-card { width: 100%; flex-direction: column; padding: 10px; border-radius: 12px; }
  .title-category { padding: 10px 15px; flex-direction: column; gap: 6px; }
  .title-category h2 { font-size: 1.2em; }
  .title-category .category { font-size: 0.85em; }
  .news-meta { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 0.85em; padding: 10px 15px; }
  .news-meta .news-share a { width: 28px; height: 28px; }
  .news-meta .news-share a svg { width: 16px; height: 16px; }
  .archives-pagination { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .archives-pagination a, .archives-pagination span.active { padding: 5px 8px; font-size: 0.85em; }

  .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  #container h1 { font-size: 0; line-height: 0; margin: 0; padding: 0; }
  #menu-subheader { padding-left: 0; justify-content: center; }
  #menu-subheader li { display: inline-block; margin-right: 15px; }
  #menu-subheader li a { display: inline-block; text-align: center; }
}