*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "VT323", monospace;
    font-weight: 400;
}

body {
  margin: 0;
  min-height: 100%;
  flex-direction: column;
  display: flex;
}

header{
    background-color:#f7cd89;
    width: 100vw;
    height: 150px;
    padding: 0 40px;
    box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

}

header ul {
    display: flex;
    gap: 40px;
    align-items: center;
    font-size: 1.7rem;
}


header li {
    list-style: none;
    font-weight: 600;
}

header ul li a {
    text-decoration: none;
    color: black;
}


/*Sous menu*/
header #sous-menu {
    height: 0;
    width: 100%;
    background-color: #f4f0f0;
    overflow: hidden;
    text-align: left;
    transition: all ease 0.3s;
    position: absolute;
}

header li:has(#sous-menu) {
    position: relative;
}

header li:hover #sous-menu {
    display: block;
    height: auto;
    width: auto;
    overflow: visible;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    
}

header #sous-menu li {
    padding: 10px;
}
/*navigation*/
.navbar {
    height: 150px;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: space-around;
    
}

.left{
    display: flex;
    align-items: center;
    gap: 90px;
}

#loupe{
    width: 45px;
    height: 45px;
}

#search-input {
  width: 0;
  opacity: 0;
  border: none;
  outline: none;
  transition: all 0.4s ease;
}

/* Quand actif */
#search-input.active {
  width: 200px;
  border-radius: 9px;
  opacity: 1;
  border: 4px solid #a3cfdb;
  padding: 7px;
  font-size: 15px;
}


#logo{
    width: 460px;
    height: 160px;
    
    
    
}


#icon{
    display: flex;
    gap: 20px;
}

#loadMoreBtn {
  margin: 20px auto;
  padding: 10px 30px;
  border: none;
  border-radius: 10px;
  background: hsl(37, 84%, 63%);
  color: rgb(0, 0, 0);
  cursor: pointer;
  font-size: 20px;
  display: block;
}




footer{
    display: flex;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    background-color:#f7cd89;
    width: 100vw;
    height: 150px;
    padding: 0 40px;
    box-shadow: 0 5px 8px 8px rgba(0, 0, 0, 0.4);
     margin-top: 425px;

}


.ico-foot{
    display: flex;
    gap: 20px;
}   /*Tout les pokémon*/
/* SECTION */
#allPokemon {
  padding: 90px;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

/* CARTE */
.pokemon-card {
  background: rgb(255, 200, 155);
  padding: 75px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  FONT-SIZE: 32px;
}

/* IMAGE */
.pokemon-card img {
  width: 170px;
}

/* TYPES */
.types {
  margin-top: 10px;
 
}

.type {
  display: inline-block;
  background: #ddd;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 32px;
  margin: 2px;
}

/* BOUTON */
.pokemon-card button {
  margin-top: 15px;
  padding: 5px 70px;
  border: none;
  border-radius: 10px;
  background: #d32f2f;
  color: white;
  cursor: pointer;
  font-size: 32px;
}




.star {
  cursor: pointer;
  font-size: 20px;
  float: right;
}

/*Animation étoile*/.star {
  cursor: pointer;
  font-size: 42px;
  float: right;
  transition: transform 0.2s;
}

.star.active {
  transform: scale(1.5) rotate(20deg);
}

#loadMore {
  flex-wrap: wrap;
  padding: 10px 100px;
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  
  display: flex;  
  margin-left: auto;
  margin-right: auto;
}

.autocomplete {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  background: #222;
  border-radius: 8px;
  width: 250px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
}

.autocomplete-item {
  padding: 10px;
  cursor: pointer;
  color: white;
}

.autocomplete-item:hover {
  background: #3a3939;
}

/* ========================= */
/* RESPONSIVE TABLETTE */
/* ========================= */
@media (max-width: 1024px) {

  #logo {
    width: 250px;
    height: auto;
  }

  .left {
    gap: 30px;
  }

  header ul {
    gap: 20px;
    font-size: 1.3rem;
  }

  #icon img {
    width: 50px;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}


/* ========================= */
/* RESPONSIVE MOBILE */
/* ========================= */
@media (max-width: 768px) {

  header {
    height: auto;
    padding: 10px;
  }

  .navbar {
    flex-direction: column;
    gap: 15px;
  }

  .left {
    flex-direction: column;
    gap: 15px;
  }

  header ul {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  #logo {
    width: 180px;
  }

  #icon {
    justify-content: center;
  }

  #icon img {
    width: 40px;
  }

  /* barre recherche */
  #search-input.active {
    width: 150px;
  }

  /* GRID plus compact */
  .grid {
    grid-template-columns: 1fr;
  }

  .pokemon-card button {
    padding: 10px;
    font-size: 20px;
  }

  .type {
    font-size: 20px;
    padding: 6px 10px;
  }

  footer {
    flex-direction: column;
    height: auto;
    gap: 10px;
    text-align: center;
  }
}