/* Variables globales */
:root {
  --background-color: #101524;
  --main-color: #f9cf87;
  --important-color: #a40239;
}

/* Polices (déclarations @font-face) */
@font-face {
  font-family: "Berylium";
  src: url("../fonts/berylium/Berylium\ Rg.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

/* Italique régulier */
@font-face {
  font-family: "Berylium";
  src: url("../fonts/berylium/Berylium\ Rg\ It.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
}

/* Gras */
@font-face {
  font-family: "Berylium";
  src: url("../fonts/berylium/Berylium\ Bd.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

/* Gras italique */
@font-face {
  font-family: "Berylium";
  src: url("../fonts/berylium/Berylium\ Bd\ It.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
}

/* Styles globaux du document */
body {
  font-family: "Berylium", sans-serif;
  background-color: var(--background-color);
  color: var(--main-color);
  padding: 0;
  margin: 0;
}

/* En-tête (header) et sa structure interne */
.header {
  background-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 30px 0 var(--important-color);
}

.header > .inner {
  display: flex;
  justify-content: space-between;
  margin: 0 10%;
}

.header a {
  text-align: center;
  margin: 15px 0px;
  padding: 20px 0px;
  width: 20%;
  background-color: var(--important-color);
  transition: linear 0.5s;
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  font-family: "Pixelify sans";
  border-radius: 10px;
}

h1 {
  font-family: "Berylium", sans-serif;
  color: var(--important-color);
}

.inner {
  margin: auto;
}

.article > img {
  width: 50%;
  border-radius: 5px;
}

.jeux,
.goodies {
  text-align: center;
}

.jeux h2,
.goodies h2 {
  text-transform: uppercase;
  color: var(--main-color);
  border-top: solid 2px var(--main-color);
  border-bottom: solid 2px var(--main-color);
  margin: 30px 0;
}

.jeux > a > img {
  transition: linear 0.5s;
}

.jeux > a:hover > img {
  transition: linear 0.5s;
  opacity: 0.5;
}

.dlc {
  margin-top: 30px;
}

.dlc > a,
.goodies a {
  transition: ease-in-out 0.5s;
}
.dlc > a:hover,
.goodies a:hover {
  transition: ease-in-out 0.5s;
  transform: translateY(-10px);
  box-shadow: 0 0 50px 10px var(--important-color);
}

.jeux > a > img {
  width: 100%;
  max-height: 10rem;
  object-fit: cover;
  object-position: center;
}

.dlc,
.image {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 5%;
}

.dlc > a,
.image > a,
.dlc > a > img,
.image > a > img {
  max-width: 100%;
}

.dlc > a > img,
.image > a > img {
  object-fit: cover;
}

.dlc > a > .prix,
.image > a > .prix {
  background-color: var(--background-color);
  color: var(--main-color);
  position: absolute;
  bottom: 10px;
  left: 10%;
  padding: 20px;
  border-radius: 20px;
  display: none;
  border: 1px solid var(--main-color);
}

.dlc > a:hover > .prix,
.image > a:hover > .prix {
  display: block;
}

/* Cas spécifique pour la DLC 1 (position droite) */
a:has(img[alt="DLC 1"]) > .prix {
  left: auto;
  right: 10%;
}

/* Contenu principal (corps) : texte et tableaux */
.corps {
  margin: 5% 10%;
  text-align: justify;
}

.corps h1 {
  text-transform: uppercase;
  color: var(--main-color);
  margin: 0;
  padding: 20px;
  font-size: 32px;
}

.corps p {
  line-height: 1.5rem;
  margin-top: 0;
  font-size: 20px;
}

/* Pour les mentions légales */
.corps table {
  width: 100%;
  margin-top: 2%;
  text-align: center;
}

.corps th {
  text-transform: uppercase;
}

.corps table,
.corps th,
.corps td {
  border: 1px solid var(--main-color);
  border-collapse: collapse;
  padding: 10px;
}

td a,
p a {
  color: var(--main-color);
}

td a:hover,
p a:hover {
  color: var(--important-color);
  background-color: var(--main-color);
  border-radius: 10px;
  padding: 0.25%;
}

.mail {
  text-transform: lowercase;
  text-decoration: underline;
}

.corps:has(.presentation) {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.presentation {
  width: 100%;
  height: 475px;
  background: url("../img/gif2-page-ouverture.gif") center / cover no-repeat;

  display: flex;
  flex-direction: column; /* pour empiler le texte et l'image */
  align-items: center; /* centrer horizontalement */
  justify-content: center; /* centrer verticalement */
  text-align: center;
  border-bottom: 2px solid var(--main-color);
}

.presentation > a > .image-presentation {
  width: calc(20% + 50px);
  height: auto;
  margin-top: 20px;
  z-index: 2;
  opacity: 0.85;
}

.baniere {
  background-color: #101524;
  height: 160px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 3px solid var(--main-color);
}

.baniere > .image-logo {
  width: 150px;
  height: auto;
}

.text-1 h2,
.text-2 h2,
.text-3 h2 {
  color: var(--important-color);
}

.image1-accueil {
  justify-content: center;
  display: flex;
  flex-direction: column-reverse;
  height: 300px;
  background: url("../img/img-acceuil-1-1.jpg") bottom/cover no-repeat;
  border-bottom: 3px solid var(--main-color);
}

.text-1,
.text-3 {
  margin-left: 20px;
  padding: 10px;
  border-radius: 10px;
  width: 25%;
  background-color: rgba(0, 0, 0, 0.8);
  margin: 0 10%;
}

.image2-accueil {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  height: 300px;
  background: url("../img/img-accueil-2.jpg") bottom/cover no-repeat;
  border-bottom: 3px solid var(--main-color);
}

.text-2 {
  margin-right: 20px;
  padding: 10px;
  border-radius: 10px;
  width: 25%;
  background-color: rgba(0, 0, 0, 0.8);
  margin: 0 10%;
  text-align: right;
}

.image3-accueil {
  justify-content: center;
  display: flex;
  flex-direction: column-reverse;
  height: 300px;
  background: url("../img/boss.png") bottom/cover no-repeat;
  border-bottom: #f9cf87 3px solid;
}

.corps:has(.article) {
  background-color: rgba(0, 0, 0, 0.08);
  margin: 0;
  margin-top: 20px;
  padding: 0 8%;
}

.article {
  background-color: var(--background-color);
  margin: auto;
  padding: 0 2.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.article h1 {
  text-align: center;
}

/* Ajuste le footer sur la page de présentation */
body:has(.article) > .footer {
  margin-top: 20px;
}

/* Pied de page (footer) et sa structure interne */
.footer {
  background-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 -4px 30px 0 var(--important-color);
  padding: 50px 0;
}

.footer > .inner {
  margin: 0 10%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.footer a {
  font-family: "Berylium";
  color: var(--main-color);
  text-decoration: none;
  font-size: 20px;
  text-transform: capitalize;
}

@media screen and ((max-width: 768px) or (orientation: portrait) or (max-height: 599px)) {
  .corps {
    margin: 0% 5%;
  }

  .corps:has(.jeux) > .inner {
    margin: 0 5.5%;
  }

  .footer {
    margin-top: 50px;
  }

  .jeux > a > img {
    max-height: 100%;
  }

  .dlc,
  .image {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .dlc > a,
  .image > a,
  .dlc > a > img,
  .image > a > img {
    width: 100%;
  }
  .dlc > a > .prix,
  .image > a > .prix {
    left: 5%;
    width: 10%;
    border-radius: 20px;
    display: none;
  }

  .text-1,
  .text-2,
  .text-3 {
    width: 80%;
    margin: 0 auto;
    text-align: center;
  }
  
  .article > img {
  	width: 80%;
  }

  .header a {
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    word-wrap: break-word;
    white-space: normal;
    margin: 0;
    width: 80%;
  }

  .header > .inner {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 0;
  }

  .header > .inner::before {
  	transition: linear 0.5s;
    content: "▼";
    align-self: self-end;
    margin: 10px 10%;
    background-color: var(--important-color);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
  }

  .header > .inner:hover::before,
  .header > .inner:focus-within:before {
  	transition: linear 0.5s;
    content: "▲";
  }

  .header > .inner > a {
  	transition: linear 0.5s;
    display: none;
  }

  .header > .inner:hover > a,
  .header > .inner:focus-within > a {
  	transition: linear 0.5s;
    display: block;
  }

  .header > .inner > a:last-child {
    margin-bottom: 10px;
  }

  .header a:hover {
  	transition: linear 0.5s;
    background-color: color-mix(
      in srgb,
      var(--important-color),
      transparent 20%
    );
  }
}
