/* ========================
   COULEURS PAR SECTION
   Chaque page choisit son thème avec <body data-theme="...">
   Sans data-theme : bleu (page d'accueil)
======================== */

:root {
  --accent: #0d6edd;        /* fond des boutons, barres, bordures */
  --accent-hover: #0a5abe;  /* bouton survolé */
  --on-accent: #ffffff;     /* texte posé sur --accent */
  --accent-text: #0d6edd;   /* texte et liens sur fond blanc */
  --accent-soft: #e7f0fc;   /* fond clair (encadrés, pastilles) */
}

/* jaune / orange : partie électricité */
[data-theme="electric"] {
  --accent: #f5a30b;
  --accent-hover: #dc9000;
  --on-accent: #1f1500;
  --accent-text: #b45309;
  --accent-soft: #fef3d0;
}

/* vert : partie Minecraft */
[data-theme="minecraft"] {
  --accent: #26803a;
  --accent-hover: #1d6a2f;
  --on-accent: #ffffff;
  --accent-text: #1f7a2e;
  --accent-soft: #e3f4e6;
}

/* violet : partie scan / mangas */
[data-theme="scan"] {
  --accent: #7c3aed;
  --accent-hover: #6428c9;
  --on-accent: #ffffff;
  --accent-text: #6d28d9;
  --accent-soft: #efe8fd;
}

/* ========================
   RESET
======================== */

* {
  box-sizing: border-box;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* ========================
   LAYOUT GLOBAL
   Le footer est dans le flux de la page : il n'apparait qu'en bas.
   Page courte : collé en bas de l'écran. Page longue : tout en bas.
======================== */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f6fa;
}

main {
  flex: 1;
  width: 100%;
}

/* ========================
   HEADER / NAVIGATION
======================== */

header {
  width: 100%;
  background: white;
  border-bottom: 3px solid var(--accent);
}

nav {
  max-width: 1000px;
  margin: auto;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 15px 20px;
}

nav h1 {
  margin: 0;
  font-size: 22px;
  color: var(--accent-text);
}

/* le titre ramène à l'accueil (jamais souligné) */
nav h1 a {
  color: inherit;
  text-decoration: none;
}

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

.nav-links a {
  text-decoration: none;
  font-weight: bold;
  color: var(--accent-text);
  transition: transform 0.15s;
}

/* petit zoom au survol */
.nav-links a:hover {
  transform: scale(1.12);
}

@media (prefers-reduced-motion: reduce) {
  .nav-links a {
    transition: none;
  }
}

/* page actuelle : soulignée */
.nav-links a.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ========================
   FOOTER
======================== */

#footer {
  margin-top: auto;
}

footer {
  width: 100%;
  background: white;
  border-top: 1px solid #ddd;

  padding: 6px 10px;
  text-align: center;

  color: #666;
  font-size: 12px;
}

footer p {
  margin: 0;
}

/* ========================
   BOUTONS GENERIQUES
======================== */

.button-primary {
  display: inline-block;

  padding: 12px 25px;

  background: var(--accent);
  color: var(--on-accent);

  border: none;
  border-radius: 10px;

  text-decoration: none;
  cursor: pointer;

  font-size: 16px;
}

.button-primary:hover {
  background: var(--accent-hover);
}

/* ========================
   UTILITAIRES
======================== */

.hidden {
  display: none !important;
}

/* ========================
   MOBILE
======================== */

@media (max-width: 768px) {

  nav {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
  }

}
