:root {
    --main-color: #2b7a4b;   /* Couleur principale par défaut */
    --bg-color: #f5f7fa;     /* Couleur de fond par défaut */
}

body {
    background-color: var(--bg-color);
}

h1, h2, h3,
.descriptions li,
ul li,
ul.stats li::before {
    color: var(--main-color);
    border-color: var(--main-color);
}

h2 {
    border-bottom: 2px solid var(--main-color);
}

ul.stats li .bar::after {
    background-color: var(--main-color);
}

ul li {
    background: var(--list-bg);
}

/* RESET DE BASE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    color: #333;
}

/* TITRES */
h1, h2, h3 {
    margin-bottom: 10px;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid;
    display: inline-block;
    padding-bottom: 4px;
}

h3 {
    font-size: 1.2rem;
    margin-top: 20px;
}

/* IMAGE DU POKEMON */
.Sprite {
    max-width: 360px;
    max-height: 360px;
    display: block;
    margin: 15px auto;
}
.famille {
    max-width: 180px;
    max-height: 180px;
    display: block;
    margin: 15px auto;
}

/* SECTIONS */
section {
    margin-bottom: 30px;
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* LISTES */
ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}

ul li {
    margin: 6px 0;
    padding: 10px;
    border-radius: 6px;
}

ul.types li {
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
}

#evolutions{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

ul li {
    margin: 5px;
}

/* DESCRIPTIONS */
.descriptions li {
    margin-bottom: 20px;
    text-align: left;
    padding: 12px;
    border-left: 4px solid;
    border-radius: 6px;
}

.descriptions h3 {
    margin-bottom: 5px;
}

/* ÉVOLUTIONS */
ul.evolutions {
  list-style: none;
  padding: 0;
  margin: 1rem auto;
  max-width: 300px;
  text-align: center;
}

ul.evolutions li {
  font-weight: bold;
  font-size: 1rem;
  position: relative;
}
/* STATS façon Poképédia */
ul.stats {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

ul.stats h2 {
  display: block;
}

ul.stats li {
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

ul.stats li::before {
  content: attr(data-label);
  flex: 0 0 120px;
  font-weight: bold;
}

ul.stats li .bar {
  flex-grow: 1;
  height: 10px;
  border-radius: 5px;;
  position: relative;
  overflow: hidden;
}

ul.stats li .bar::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--value, 50%);
}

ul.stats p {
  margin-top: 1rem;
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
}

h1 {
font-size: 2.5rem;
}

ul.stats li {
font-size: 1.1rem;
}

#types{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

ul li {
    margin: 5px;
}
a.familink{
    text-decoration: none;
}
a.familink :hover{
    transform: scale(1.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background-color: var(--bg-color);
    border-bottom: 2px solid var(--main-color);
    border-radius: 16px;
    position: relative;
}

.navbar a {
    color: var(--main-color);
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: 2px solid var(--main-color);
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}

.navbar a:hover {
    background-color: var(--main-color);
    color: var(--bg-color);
}

.nav-title {
    margin: 0;
    color: var(--main-color);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1; /* Pour que le titre soit toujours au-dessus des boutons */
}

.navbar .prev {
    position: absolute;
    left: 1rem; /* Positionne le bouton Prev toujours à gauche */
}

.navbar .next {
    position: absolute;
    right: 1rem; /* Positionne le bouton Next toujours à droite */
}