@font-face {
  font-family: pokemon;
  src: url("fonts/PokemonClassic.ttf");
}

:root {
  --identity-primary: #dc0a2d;

  --grayscale-dark: #212121;
  --grayscale-medium: #666666;
  --grayscale-light: #e0e0e0;
  --grayscale-background: #efefef;
  --grayscale-white: #ffffff;

  --headline-font-size: 24px;
  --body1-font-size: 14px;
  --body2-font-size: 12px;
  --body3-font-size: 10px;
  --subtitle1-font-size: 14px;
  --subtitle2-font-size: 12px;
  --subtitle3-font-size: 10px;
  --caption-font-size: 8px;

  --headline-line-height: 32px;
  --common-line-height: 16px;
  --caption-line-height: 12px;

  --font-weight-regular: 400;
  --font-weight-bold: 700;

  --drop-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.2);
  --drop-shadow-hover: 0px 3px 12px 3px rgba(0, 0, 0, 0.2);
  --drop-shadow-inner: 0px 1px 3px 1px rgba(0, 0, 0, 0.25) inset;
}

* {
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  font-family: pokemon;
}

html {
  background-image: url(images/day.png);
  background-size: cover;
  background-attachment: fixed;
  transition: background-image 0.5s ease-in-out;
  height: 100vh;
  width: 100vw;
}

body {
  text-align: center;
  margin: 0;
  height: 100vh;
  width: 100vw;
  box-sizing: border-box;
}

/* Styles communs */
.overlay {
  position:fixed;
  left:0;
  top:0;
  width:100vw;
  height:100vh;
  display:none;
  background-color:#000;
  opacity:0.5;
}

button {
  background: white;
  border: 2px solid black;
  border-radius: 10px;
  padding: .5rem;
  transition: all .2s ease-in-out;
  &:hover {
    cursor: pointer;
    transform: scale(1.02);
  }
}

#logo {
  display: flex;
  justify-content: center;
}

#logo-img {
  max-height: 16vmin;
  width: auto;
  padding-top: 20px;
}

#close-stats, #close-pseudo, #close-help, #close-pokedex, #close-pokedex-details, #close-results {
  font-size: 3vh;
  position: absolute;
  top: 10px;
  right: 20px;
  text-shadow: 1px 1px 1px rgba(0,0,0,.5);
  font-weight: 1000;
  z-index: 2;
  color: #000;

  &:hover {
    cursor: pointer;
    color: #f00;
  }
}

/* Tooltips */
.tooltip {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 1000;
}

.tooltip[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}

.tooltip[aria-hidden="true"] {
  pointer-events: none;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
}

.tooltip .tooltip-inner {
  background-color: white;
  border: 3px solid #534e41;
  font-size: 12px;
  border-radius: 8px;
  padding: 10px;
  max-width: 120px;
  text-align: center;
}

/* Navbar */ 
#navbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
}

@media screen and (max-width: 643px) {
  #img-open, #img-stats, #pokeball-results, #img-help, #img-music, #img-theme {
    width: 5vw!important;
  }

  td {
    font-size: 1.7vh!important;
    width: 5.5vh!important;
    height: 5.5vh!important;
  }

  .keyboard-button {
    width: 5vh!important;
    height: 5vh!important;
    font-size: 1.3vh!important;
  }
}
@media screen and (max-width: 520px) {
  td {
    font-size: 1vh!important;
    width: 4vh!important;
    height: 4vh!important;
  }

  .keyboard-button {
    width: 3vh!important;
    height: 3vh!important;
    font-size: .8vh!important;
  }
}

@media screen and (max-width: 434px) {
  .right-items {
    margin-right: 35px!important;
  }
}

@media screen and (max-width: 380px) {
  .right-items {
    margin-right: 25px!important;
  }

  td {
    font-size: .9vh!important;
    width: 3.5vh!important;
    height: 3.5vh!important;
  }
}

@media screen and (max-width: 350px) {
  .right-items {
    margin-right: 15px!important;
  }

  td {
    font-size: .8vh!important;
    width: 3vh!important;
    height: 3vh!important;
  }

  #left-title, #right-title {
    font-size: 1vh!important;
  }

  #navbar {
    gap: 25px!important;
  }
}

@media screen and (max-width: 330px) {
  #navbar {
    gap: 20px!important;
  }

  .keyboard-button {
    width: 2vh!important;
    height: 2vh!important;
    font-size: .5vh!important;
  }

  td {
    font-size: .6vh!important;
    width: 2.5vh!important;
    height: 2.5vh!important;
  }
}

@media screen and (max-width: 300px) {
  #navbar {
    gap: 10px!important;
  }
}

.left-items {
  display: flex;
  flex-direction: column;
  margin-left: 50px;
  margin-right: auto;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.bag {
  background-color: #f8f7d8;
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 15px;
  border: 2px solid;
  gap: 30px;
}

#img-open {
  width: 20vw;
  max-width: 50px;
}

#img-stats {
  width: 20vw;
  max-width: 50px;
}

#pokeball-results {
  width: 20vw;
  max-width: 50px;
}

.disabled {
  pointer-events: none;
  cursor: default;
  filter: grayscale(1)
}

.right-items {
  display: flex;
  flex-direction: column;
  margin-right: 50px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#img-help {
  width: 20vw;
  max-width: 55px;
}

#img-music {
  width: 20vw;
  max-width: 55px;
}

#img-theme {
  width: 20vw;
  max-width: 45px;
}

#img-open, #img-stats, #pokeball-results, #img-help, #img-music, #img-theme {
  cursor: pointer;
  transition: all .2s ease-in-out;
  &:hover{
    transform: scale(1.05);
  }
}

/* Grille */
.containerGrid {
  position: relative;
  z-index: -1;
}

.container {
  width: 100%;
}

#word-grid {
  margin-left: auto;
  margin-right: auto;
}

td {
  font-size: 3vh;
  width: 7vh;
  height: 7vh;
  backdrop-filter: blur(5px);
  transition: background-color .3s ease;
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px #000;
}

@media screen and (max-width: 1550px) {
  #word-grid {
    margin-top: 40px;
  }
}

/* Clavier */
#virtual-keyboard {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.keyboard-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.keyboard-button {
  width: 7vh;
  height: 7vh;
  font-size: 1.2rem;
  border: 2px solid #000;
  border-radius: 5px;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: pokemon;
  display: flex;
  justify-content: center;
  align-items: center;
}

.keyboard-button:hover {
  transform: scale(1.05);
}

.keyboard-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Fenêtre de statistiques */
#stats {
  font-size: 15px;
  padding: 20px;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f7d8;
  border: 2px solid white;
  border-radius: 10px;
  box-shadow: 0 1px 0 1px black, inset 0 1px 0 1px black, 0 0 0 1px black, inset 0 0 0 1px black;
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: none;
  transform: translate(-50%, -50%);
  overflow-y: auto;
  box-sizing: border-box;
}

#pseudo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

#date-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

#container-found-catch {
  display: flex;
  gap: 50px;
  margin-top: 15px;
}

#form-changer-pseudo {
  position: absolute;
  z-index: 2;
  font-size: 15px;
  padding: 20px;
  width: 100%;
  height: 100%;
  max-width: 450px;
  max-height: 15vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f7d8;
  border: 2px solid white;
  border-radius: 10px;
  box-shadow: 0 1px 0 1px black, inset 0 1px 0 1px black, 0 0 0 1px black, inset 0 0 0 1px black;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#chart {
  width: 100%;
  height: 100%;
  margin-top: 30px;
  aspect-ratio: 2 / 1;
}

/* Fenêtre changement de pseudo */
#pseudo-input {
  border-radius: 20px;
  border: 2px solid black;
  text-decoration: none;
  line-height: 0;
  padding: 10px;
}

#pseudo-overlay {
  z-index: 1;
}

#input-change-pseudo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* Fenêtre de résultats */
#results {
  font-size: 15px;
  padding: 20px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f8f7d8;
  border: 2px solid white;
  border-radius: 10px;
  box-shadow: 0 1px 0 1px black, inset 0 1px 0 1px black, 0 0 0 1px black, inset 0 0 0 1px black;
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: left;
  overflow-y: auto;
  box-sizing: border-box;
}

#results-text {
  text-align: center;
}

#results-pokemon {
  width: 30%;
  max-width: 350px;
  max-height: 250px;
  margin: 2rem;
}

#share {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 18px;
  margin-bottom: 20px;
  text-align: center;

  &:hover {
    text-decoration: underline;
    cursor: pointer;
  }
}

hr {
  width: 98%;
  border: 1.5px solid black;
  border-radius: 15px;
}

#next {
  margin-bottom: 25px; 
  font-size: 20px; 
  margin-top: 20px;
}

.col {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    width: -webkit-fill-available;
}

.col input {
    width: 35%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    text-align: center;
    font-size: 25px;
    padding: 5px;
}

.col-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#results-buttons {
  display: flex;
  gap: 20px;
}

/* Fenêtre d'aide */
#help {
  font-size: 15px;
  padding: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  background: #f8f7d8;
  border: 2px solid white;
  border-radius: 10px;
  box-shadow: 0 1px 0 1px black, inset 0 1px 0 1px black, 0 0 0 1px black, inset 0 0 0 1px black;
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: none;
  transform: translate(-50%, -50%);
  text-align: left;
  overflow-y: auto;
  box-sizing: border-box;
}

@media screen and (max-width: 1000px) {
  #help, #stats {
    max-width: 80vw;
  }
}

@media screen and (max-width: 900px) {
  #stats, #changer-pseudo {
    font-size: 12px!important;
  }
}

@media screen and (max-width: 755px) {
  .help-title, #results-titre, #next, #pseudo-container {
    margin-top: 30px;
  }

  #results {
    max-width: 80vw;
  }
}

@media screen and (max-width: 650px) {
  #pseudo-container {
    flex-direction: column;
    margin-bottom: 10px;
  }
}

@media screen and (max-width: 552px) {
  #next, .col-item {
    font-size: 15px;
  }

  .col input {
    font-size: 18px!important;
  }

  #form-changer-pseudo {
    max-width: 80vw;

    button {
      font-size: 12px!important;
    }
  }

  #pseudo-input {
    font-size: 12px!important;
  }

  #input-change-pseudo {
    margin-top: 50px;
  }
}

@media screen and (max-width: 475px) {
  .col input {
    font-size: 15px!important;
  }

  .col-item {
    font-size: 10px!important;
  }
}

@media screen and (max-width: 426px) {
  #help, #results, #share, #stats {
    font-size: 10px;
  }

  #share img {
    width: 20px;
  }

  .help-title, #close-help, #results-titre, #close-results, #next {
    font-size: 13px!important;
  }

  #pokedex_after_game, #stats_after_game {
    font-size: 10px!important;
  }

  #form-changer-pseudo button{
    font-size: 8px!important;
  }

  #pseudo-input {
    font-size: 8px!important;
  }
}

@media screen and (max-width: 375px) {
  #next {
    font-size: 10px!important;
  }

  .col input {
    font-size: 10px!important;
  }
}

@media screen and (max-width: 350px) {
  #pokedex_after_game, #stats_after_game {
    font-size: 6px!important;
  }

  #stats, #changer-pseudo {
    font-size: 8px!important;
  }
}

@media screen and (max-width: 323px) {
  #next, .col-item {
    font-size: 7px!important;
  }

  #pokedex_after_game, #stats_after_game {
    font-size: 5px!important;
  }
}

@media screen and (max-width: 252px) {
  #help, #results {
    font-size: 8px;
  }

  .help-title, #close-help, #results-titre, #close-results {
    font-size: 10px!important;
  }

  #pokedex_after_game, #stats_after_game {
    font-size: 4px!important;
  }

  .col input {
    font-size: 8px!important;
  }

  .col-item {
    font-size: 5px!important;
  }
}

.help-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding-bottom: .2rem;
  border-bottom: 2px solid #000;
}

.links {
  text-decoration: none;
  color: black;

  &:hover {
    cursor: pointer;
    text-decoration: underline;
  }
}

/* Mot invalide */
.notification {
  position: fixed;
  left: 2em;
  bottom: -4em;
  font-size: 1.2em;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  color: white;
  text-align: center;
  padding: 1em;
  opacity: 0;
  transform: translateZ(180deg);
  transition: bottom 0.5s, opacity 0.5s;
  z-index: 9999;
}

#mot-invalide {
  font-size: 17px;
  padding: 8px;
  width: 90%;
  max-width: 480px;
  height: 100px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid white;
  border-radius: 10px;
  box-shadow: 0 1px 0 1px black,
              inset 0 1px 0 1px black,
              0 0 0 1px black,
              inset 0 0 0 1px black;

  position: fixed;
  z-index: 9999;
  transition: all ease-in-out 0.7s;
  left: 50%;
  transform: translate(-50%);
}
  
/* Pokédex */
h2,
h3,
h4,
.body1-fonts,
.body2-fonts,
.body3-fonts {
  line-height: var(--common-line-height);
}

h1 {
  font-size: var(--headline-font-size);
  line-height: var(--headline-line-height);
}

h2 {
  font-size: var(--subtitle1-font-size);
}

h3 {
  font-size: var(--subtitle2-font-size);
}

h4 {
  font-size: var(--subtitle3-font-size);
}

.body1-fonts {
  font-size: var(--body1-font-size);
}

.body2-fonts {
  font-size: var(--body2-font-size);
}

.body3-fonts {
  font-size: var(--body3-font-size);
}

.caption-fonts {
  font-size: var(--caption-font-size);
  line-height: var(--caption-line-height);
}

input:focus-visible {
  outline: 0;
}

.featured-img a.arrow.hidden {
  display: none;
}

.main {
  margin: 0;
  padding: 0;
  background-color: var(--identity-primary);
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrapper > h1 {
  color: var(--grayscale-white);
}

.logo-wrapper > img {
  margin-right: 16px;
}

.pokemon-list {
  background-color: var(--grayscale-white);
  box-shadow: var(--drop-shadow-inner);
  border-radius: 0.75rem;
  min-height: calc(85.5% - 1rem);
  width: calc(100% - 1rem);
  max-height: 100px;
  overflow-y: auto;
}

.list-wrapper {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.list-item {
  border-radius: 8px;
  box-shadow: var(--drop-shadow);
  background-color: var(--grayscale-white);
  width: 8.85rem;
  height: 8.85rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all .3s ease;

  &:hover {
    transform: scale(1.05);
  }
}

.list-item .number-wrap {
  min-height: 16px;
  text-align: right;
  padding: 0 8px;
  color: var(--grayscale-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-item .name-wrap {
  border-radius: 7px;
  background-color: var(--grayscale-background);
  padding: 24px 8px 4px 8px;
  color: var(--grayscale-dark);
  margin-top: -18px;
}

.list-item .img-wrap {
  width: 72px;
  height: 72px;
  margin: auto;
}

.list-item .img-wrap img {
  width: 100%;
  height: 100%;
}

/* Détails d'un Pokémon */
#return-pokedex {
  font-size: 5vh;
  position: absolute;
  top: 10px;
  left: 20px;
  text-shadow: 1px 1px 1px rgba(0,0,0,.5);
  font-weight: 1000;
  z-index: 2;

  &:hover {
    cursor: pointer;
    color: rgb(255, 255, 255);
  }
}

.detail-main .header {
  padding: 20px 20px 24px 20px;
  position: relative;
  z-index: 2;
}

.detail-main .header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 15px;
}

.detail-main .header-wrap {
  display: flex;
  align-items: center;
  column-gap: 8px;
}

.detail-main .back-btn-wrap {
  max-height: 32px;
}

.detail-main .back-btn-wrap path,
.detail-main .header-wrapper p,
.detail-main .header-wrapper h1 {
  fill: var(--grayscale-white);
  color: var(--grayscale-white);
}

.detail-main .pokemon-id-wrap p {
  font-weight: var(--font-weight-bold);
}

.detail-img-wrapper {
  width: 200px;
  height: 200px;
  margin: auto;
  margin-right: 50px;
  margin-left: 50px;
  position: relative;
  z-index: 3;
}

.detail-img-wrapper img {
  width: 100%;
  height: 100%;
}

.detail-card-detail-wrapper {
  border-radius: 8px;
  background-color: var(--grayscale-white);
  box-shadow: var(--drop-shadow-inner);
  padding: 56px 20px 20px 20px;
  margin-top: -50px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.power-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.power-wrapper > p {
  border-radius: 10px;
  padding: 2px 8px;
  font-weight: var(--font-weight-bold);
  color: var(--grayscale-white);
  text-transform: capitalize;
  background-color: #74cb48;
}

.pokemon-detail.move p {
  text-transform: capitalize;
  word-break: break-all;
}

.list-item .name-wrap p {
  text-transform: capitalize;
}

.detail-card-detail-wrapper .about-text {
  font-weight: var(--font-weight-bold);
  text-align: center;
}

.pokemon-detail-wrapper {
  display: flex;
  align-items: flex-end;
}

.pokemon-detail-wrapper .pokemon-detail-wrap {
  flex: 1;
  text-align: center;
  position: relative;
}

.pokemon-detail-wrap:before {
  content: "";
  background-color: var(--grayscale-light);
  width: 1px;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
}

.pokemon-detail-wrap:last-child::before {
  display: none;
}

.pokemon-detail {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 20px;
  gap: 8px;
}

.pokemon-detail-wrapper {
  min-height: 76px;
}

.pokemon-detail.move {
  flex-direction: column;
  gap: 0;
  align-items: center;
  padding: 8px 5px;
}

.pokemon-detail-wrap > .caption-fonts {
  color: var(--grayscale-medium);
}

.pokemon-detail-wrap .straighten {
  transform: rotate(90deg);
}

.detail-card-detail-wrapper .pokemon-description {
  color: var(--grayscale-dark);
  text-align: center;
}

.stats-wrap {
  display: flex;
  align-items: center;
}

.stats-wrap p {
  color: var(--grayscale-dark);
  margin-right: 8px;
  min-width: 19px;
}

.stats-wrap p.stats {
  text-align: right;
  padding-right: 8px;
  min-width: 35px;
  border-right: 1px solid var(--grayscale-light);
  font-weight: var(--font-weight-bold);
}

.stats-wrap .progress-bar {
  flex: 1;
  border-radius: 4px;
  height: 4px;
}

.stats-wrap .progress-bar::-webkit-progress-bar {
  border-radius: 4px;
}

.stats-wrap .progress-bar::-webkit-progress-value {
  border-radius: 4px;
}

.detail-bg {
  position: absolute;
  z-index: 1;
  right: 8px;
  top: 8px;
  opacity: 0.1;
}

.detail-bg path {
  fill: var(--grayscale-white);
}

div#not-found-message {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 600;
}

.arrow img {
  -webkit-filter: brightness(0) grayscale(1) invert(1);
  filter: brightness(0) grayscale(1) invert(1);
  width: 70px;
}

.featured-img {
  position: relative;
}

.featured-img a.arrow {
  display: inline-block;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
}

.featured-img a.arrow.left-arrow {
  left: -2rem;
}

.featured-img a.arrow.right-arrow {
  right: -2rem;
}

.detail-main.main {
  border-color: transparent;
  background-color: transparent;
}