:root {
  /* Définition des variables de couleur pour une utilisation globale */
  --gray-clr: hsl(0, 0%, 20%);
  --very-dark-blue-clr: hsl(220, 13%, 13%);
  --dark-grayish-blue-clr: hsl(219, 9%, 45%);
  --grayish-blue-clr: hsl(220, 14%, 75%);
  --light-grayish-blue-clr: hsl(223, 64%, 98%);
  --white-clr: hsl(0, 0%, 100%);
  --black-clr: hsl(0, 0%, 0%);
}

html.--overflow-hidden,
body.--overflow-hidden {
  /* Gestion de l'overflow caché pour empêcher le défilement de la page */
  overflow: hidden;
}

button {
  /* Curseur de type main pour les boutons */
  cursor: pointer;
}

h1,
h3,
h4,
p {
  /* Réinitialisation des marges et des rembourrages pour les titres et les paragraphes */
  margin: 0;
  padding: 0;
}

.page-container {
  /* Style pour centrer le contenu de la page verticalement */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Pour s'assurer que la div couvre la hauteur de la fenêtre */
}

footer {
  /* Marge négative pour le pied de page pour le rendre plus réactif */
  margin-top: calc(-12.5vh);
}

/* Styles pour la section du slider de produit */
.product__slider .image-box__src {
  width: 241px;
  height: 340px;
}

.product__slider {
  /* Style pour centrer le contenu du slider de produit */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%; /* Assurez-vous que la section product__slider occupe toute la hauteur */
  position: relative;
}

.product__slider img {
  /* Empêche l'image de dépasser la taille du conteneur */
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle; /* Pour aligner l'image verticalement */
}

/* Styles généraux pour la page de produit */
.product__page {
  font-size: 1.5rem;
  font-weight: 700;
  background-color: #ecf0f1;
  margin-bottom: 0.5em;
  color: #333;
  padding: 0.5em 1em;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.game__title {
  /* Style pour les titres de jeu */
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  background-color: #ecf0f1;
  margin-bottom: 0.5em;
}

/* Classe d'accessibilité pour éléments invisibles */
.sr-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Conteneur par défaut avec une largeur maximale */
.default-container {
  max-width: 450px;
  margin: 0 auto;
}

/* Styles pour les icônes */
.icon {
  display: inline-block;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  background-color: #69707d;
}

.icon-cart {
  /* Style pour l'icône de panier */
  mask-image: url(../images/icon-cart.svg);
  -webkit-mask-image: url(../images/icon-cart.svg);
  min-width: 22px;
  min-height: 22px;
}

.icon-minus {
  /* Style pour l'icône de réduction (-) */
  mask-image: url(../images/icon-minus.svg);
  -webkit-mask-image: url(../images/icon-minus.svg);
}

.icon-plus {
  /* Style pour l'icône d'augmentation (+) */
  mask-image: url(../images/icon-plus.svg);
  -webkit-mask-image: url(../images/icon-plus.svg);
}

.icon-minus,
.icon-plus {
  /* Taille minimale des icônes de réduction et d'augmentation */
  min-width: 12px;
  min-height: 12px;
}

/* Styles pour le contenu du produit */
.product__content {
  padding: 1.2em;
}

.product {
  /* Style général pour les produits */
  padding-bottom: 3em;
}

.product__name {
  /* Masquer le nom du produit */
  display: none;
}

.product__title {
  /* Style pour le titre du produit */
  font-size: 1.72rem;
}

.product__description {
  /* Style pour la description du produit */
  margin: 1.2em 0 2em;
  color: var(--dark-grayish-blue-clr);
  line-height: 1.5em;
  font-size: 0.95rem;
}

.discount-price__value {
  /* Style pour la valeur du prix réduit */
  font-size: 1.7rem;
  font-weight: 700;
}

.product__content .cart-form {
  /* Style pour le formulaire de panier dans le contenu du produit */
  --bd-radius: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 1.5em;
  font-size: 0.97rem;
}

.cart-form__input-container {
  /* Style pour le conteneur d'entrée du formulaire de panier */
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 1em;
  background-color: var(--light-grayish-blue-clr);
  overflow: hidden;
  border-radius: var(--bd-radius);
  box-sizing: border-box;
}

#product__quantity {
  /* Style pour l'entrée de quantité du formulaire */
  color: black;
  position: relative;
  padding: 1em 0.8em;
  max-width: 35%;
  text-align: center;
  font-weight: 700;
  border: none;
  background-color: inherit;
  appearance: textfield;
}

#product__quantity::-webkit-outer-spin-button,
#product__quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

#product__quantity:focus {
  /* Supprimer l'outline lorsqu'il est en focus */
  outline: none;
}

.cart-form__add-btn {
  /* Style pour le bouton d'ajout au panier */
  display: flex;
  justify-content: center;
  padding: 1.15em 1em;
  min-width: 109px;
  color: var(--white-clr);
  background-color: var(--gray-clr);
  font-weight: 700;
  border: none;
  border-radius: var(--bd-radius);
}

.cart-form__add-btn .icon-cart {
  /* Style pour l'icône de panier dans le bouton d'ajout au panier */
  min-width: 18px;
  min-height: 18px;
  margin-right: 1em;
  background-color: white;
}

.cart-form__input-container .btn-changeValue {
  /* Style pour les boutons d'ajustement de la quantité */
  position: relative;
  background: inherit;
  max-height: max-content;
  padding: 0.5em 1em;
  border: none;
  color: #333;
}

/* Style for the quantity input that matches your existing theme */
.quantity-input {
  width: 60px; /* Adjust the width to fit your design */
  padding: 0.5em; /* Matches other form input paddings */
  margin: 0.5em; /* Provides some space around the input */
  border: 1px solid var(--grayish-blue-clr); /* Border color from your palette */
  border-radius: 4px; /* Consistent with your button border-radius */
  background-color: var(--light-grayish-blue-clr); /* Light background color */
  font-size: 1rem; /* Matches the general font size for inputs */
  color: var(--very-dark-blue-clr); /* Text color from your palette */
  text-align: center; /* Centers the text */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); /* Subtle inner shadow for depth */
}

/* Additional style to ensure the quantity input fits nicely with your design */
.product-quantity {
  display: flex; /* Flex to center child elements */
  justify-content: center; /* Horizontally centers the input in the cell */
  align-items: center; /* Vertically centers the input in the cell */
}

.user-container:focus img {
  /* Style pour l'outline de l'image dans le conteneur d'utilisateur en focus */
  outline: solid 2px var(--gray-clr);
}

.thumb-item__btn:focus img {
  /* Opacité réduite pour l'image en focus dans les boutons de vignettes */
  opacity: 0.5;
}

.nav-item:focus {
  /* Style pour les éléments de navigation en focus */
  color: black;
  outline: none;
}

.nav-item:focus::after {
  /* Fond coloré pour les éléments de navigation en focus */
  background-color: var(--gray-clr);
}

.cart-form__add-btn:active,
.btn-changeValue:active .icon {
  /* Opacité réduite pour les boutons lorsqu'ils sont enfoncés */
  opacity: 0.7;
}

@media (hover: hover) and (pointer: fine) {
  /* Styles pour les interactions au survol et au clic (souris) */
  .user-container:hover img {
    outline: solid 2px var(--gray-clr);
  }

  .thumb-item__btn:hover img {
    opacity: 0.5;
  }

  .nav-item:hover {
    color: black;
    outline: none;
  }

  .nav-item:hover::after {
    background-color: var(--gray-clr);
  }
}

@media screen and (min-width: 576px) {
  /* Styles pour les écrans de largeur minimale de 576px */
  .top-header {
    padding-left: 3em;
    padding-right: 3em;
  }

  .main-nav__content-container {
    width: 55%;
  }

  .product__thumbs {
    display: flex;
  }

  .product__content {
    margin-top: 1em;
  }
}

@media screen and (min-width: 768px) {
  /* Styles pour les écrans de largeur minimale de 768px */
  .default-container {
    max-width: 580px;
  }

  .main-nav__content-container {
    width: 40%;
  }

  .top-header {
    padding-top: 1em;
  }

  .top-header__btn-cart {
    margin-right: 1.5em;
  }

  .user-container img {
    width: 40px;
  }

  .cart-form__add-btn .icon-cart {
    min-width: 20px;
    min-height: 20px;
  }

  .cart-section__body.--with-items {
    padding: 1.25em 1em 2em;
  }

  .cart-section__products .list-item {
    grid-template-columns: 17% 65% 10%;
    grid-auto-rows: 70px;
    justify-content: center;
  }

  .list-item__abstract {
    align-self: start;
    font-size: 1.05rem;
    padding: 0.2em 0;
  }

  .list-item__abstract .title {
    margin-bottom: 0.1em;
  }

  .cart-section__products .btn-del-product {
    margin: -10px 0 0;
  }

  .product {
    --max-width-box: 455px;
  }

  .product__title {
    margin-top: 0.55em;
    font-size: 2rem;
  }

  .product__description {
    font-size: 1.15rem;
  }

  .product__price {
    flex-direction: column;
    align-items: flex-start;
  }

  .product__price .full-price {
    margin-top: 0.5em;
    font-size: 1.05rem;
  }

  .product__content .cart-form {
    flex-direction: row;
    justify-content: space-between;
  }

  .cart-form__input-container {
    margin-bottom: 0;
    width: 40%;
  }

  #product__quantity {
    padding: 1em 0;
    max-width: 10%;
  }

  .cart-form__add-btn {
    width: 57%;
  }
}

@media screen and (min-width: 992px) {
  /* Styles pour les écrans de largeur minimale de 992px */
  .default-container {
    margin: 0;
  }

  body {
    --max-width: 85%;
  }

  .top-header {
    max-width: var(--max-width);
    margin: 0 auto 3.5em;
    padding: 1.5em 0 2em;
    border-bottom: solid 1px rgba(241, 241, 241, 0.945);
  }

  .main-nav__links {
    display: flex;
    align-items: flex-start;
    margin-top: 0;
  }

  .nav-item {
    color: var(--dark-grayish-blue-clr);
    font-size: 1rem;
    font-weight: 400;
    padding-bottom: 0;
  }

  .nav-item::after {
    content: "";
    position: relative;
    top: 2.3em;
    display: inline-block;
    width: 100%;
    height: 3px;
    background-color: transparent;
    transition: background-color 0.5s ease-in;
  }

  .main-nav__close-btn {
    display: none;
  }

  .cart-section {
    right: 0%;
    left: 0%;
    transform: translateX(calc(100vw - 400px - 3em));
  }

  .product {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2em;
    justify-items: center;
    margin: 0 auto;
    max-width: var(--max-width);
    box-sizing: border-box;
  }

  .product__content {
    align-self: center;
  }

  .product__thumbs {
    margin-top: 2em;
  }
}

@media screen and (min-width: 1200px) {
  /* Styles pour les écrans de largeur minimale de 1200px */
  .product {
    column-gap: 5em;
    --max-width-box: 457px;
    margin-bottom: 1em;
  }

  .product__title {
    font-size: 2.75rem;
  }

  .discount-price__value {
    font-size: 1.8rem;
  }
}

@media screen and (min-width: 1400px) {
  /* Styles pour les écrans de largeur minimale de 1400px */
  body {
    --max-width: 80%;
  }

  .main-nav__links li {
    margin-right: 0.75em;
  }

  .user-container img {
    width: 50px;
  }

  .top-header__btn-cart {
    margin-right: 2em;
  }

  .product {
    --max-width: 78%;
  }

  .product__content {
    justify-self: start;
    margin-top: -5%;
  }

  .product__content .cart-form {
    margin-top: 2.85em;
  }

  .cart-form__input-container {
    width: 35%;
  }

  .cart-form__add-btn {
    width: 60%;
  }
}

@media screen and (min-width: 1900px) {
  /* Styles pour les écrans de largeur minimale de 1900px */
  body {
    --max-width: 85%;
  }
}
