/* Theme Name: mon theme
   URI: http://www.VOTRE-SITE.COM
   Description: DESCRIPTION DE VOTRE THEME.
   Version: 1.0
   Author: Demir Aliyar 
*/

@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");

:root {
  --orange: #e96829;
  --brun: #310f00;
  --rouge: #df0101;
  --vert: #04ab2e;
  --jaune: #f3d933;
  --blanc: #ffffff;
  --noir: #000000;
  --gris: #2a2a2a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--gris);
  color: white;
  font-family: "Rubik", sans-serif;
  font-weight: 400;
  scroll-behavior: smooth;
}

.marge {
  margin-inline: 10%;
}
/* -------------------- */
/* Cadre info + indices */
/* -------------------- */

#game-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.game-frame-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-bottom: 40px;
}

.svg-container {
  width: 100%;
}

.svg-top,
.svg-middle,
.svg-bottom {
  width: 100%;
  display: block;
}

.svg-top {
  height: auto;
}

.svg-middle {
  min-height: 50px;
  height: auto;
  /* La hauteur s'adaptera au contenu */
}

.svg-bottom {
  height: auto;
}

.frame-content-wrapper {
  position: relative;
}

.frame-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 30px;
  box-sizing: border-box;
}

.frame-header {
  color: var(--blanc);
  padding: 5px 15px;
  border-radius: 0 0 5px 5px;
  position: absolute;
  top: 12px;
  left: 50px;
  z-index: 10;
  display: flex;
  align-items: center;
}

.title {
  font-weight: bold;
  font-size: 1.2em;
  transform: translateY(-50%) translateX(-30%);
}

.content-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 15px;
  border-radius: 5px;
}

.middle-content {
  padding-top: 20px;
  /* padding-bottom: 10px; */
}

/*------ */
/* input */
/*------ */

.svg-form-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: auto;
}

.svg-frame {
  width: 100%;
  height: auto;
  display: block;
}

.svg-form {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;

  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
}

.svg-input {
  flex: 1;
  font-size: 1.1rem;
  padding: 0.8rem 1.2rem;
  font-family: inherit;
  background: transparent;
  border: none;
  color: var(--blanc);
  outline: none;
}

.svg-submit {
  background: none;
  border: none;
  padding: 0 0 0 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
  transform: scale(0.9);
}

.svg-submit:hover {
  transform: scale(1);
}

.submit-icon {
  width: 40px;
  height: auto;
}

/* ------- */
/* tableau */
/* ------- */

.table-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;

  table {
    border-collapse: collapse;
    width: 70%;
    height: auto;
    margin: auto;
  }
  td {
    padding: 10px;
    text-align: center;
    color: var(--blanc);
  }
  th {
    padding: 20px;
    text-align: center;
    color: var(--blanc);
    font-weight: bold;
    width: 156px;
  }
}

.rounded-frame {
  display: inline-block;
  padding: 4px; /* épaisseur de la bordure extérieure */
  border-radius: 20px; /* coins arrondis */
  background-color: var(--brun); /* Brun */
  transform: rotateY(90deg);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.rounded-frame.show {
  transform: rotateY(0deg);
  opacity: 1;
}
.rounded-frame:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.inner-frame {
  padding: 4px; /* épaisseur de la bordure intérieure */
  border-radius: 16px; /* légèrement plus petit pour garder l'arrondi visible */
  background-color: var(--orange); /* Orange */
}

.indice-container {
  border-radius: 12px;
  overflow: hidden; /* pour que l'image suive l'arrondi */
  width: 7rem; /* largeur de l'image */
  aspect-ratio: 1 / 1; /* pour garder le ratio 1:1 */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.indice-container img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.nom-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--blanc);
  font-size: 1rem;
  font-weight: bold;
  border-radius: 12px;
  opacity: 0; /* invisible par défaut */
  transition: opacity 0.3s ease; /* transition pour l'apparition */
}
.indice-container:hover .nom-hover {
  opacity: 1; /* visible au survol */
}

.true {
  background-color: var(--vert);
}

.false {
  background-color: var(--rouge);
}

.false-true {
  background-color: var(--jaune);
  color: var(--noir);
}

.false-down {
  background-image: url(images/arrow_down.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.false-up {
  background-image: url(images/arrow_up.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  max-height: calc(70px * 5);
  overflow-y: scroll;
  position: absolute;
  top: 90%;
  width: 400px;
  z-index: 10;
}

.suggestions-list::-webkit-scrollbar {
  width: 16px; /* largeur de la barre */
}

.suggestions-list::-webkit-scrollbar-track {
  background: var(--brun); /* couleur de fond de la piste */
  /* border-radius: 10px; */
}

.suggestions-list::-webkit-scrollbar-thumb {
  background-color: var(--orange); /* couleur de la poignée */
  border-radius: 10px;
  border: 2px solid var(--brun); /* crée un espace autour */
}

.suggestions-list::-webkit-scrollbar-thumb:hover {
  background-color: #b04e1e;
}

.suggestion-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: var(--brun);
  border: solid 2px var(--orange);
  width: 100%;
  transition: all 0.2s ease-in-out;
}

.suggestion-item.selected {
  background-color: #882b03;
}

.suggestion-item:hover {
  background-color: #882b03;
  /* border: solid 2px var(--brun); */
  /* color: var(--blanc); */
  cursor: pointer;
}

.suggestion-item-image {
  width: 75px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;

  img {
    width: 90%;
    height: 90%;
    border-radius: 10px;
    object-fit: cover;
  }
}

#no-suggestions-container {
  position: absolute;
  top: 90%;
  margin-top: 20px;
  display: flex;
}

.no-suggestions {
  width: 400px;
  background-color: var(--rouge);
  color: var(--blanc);
  padding: 16px;
  text-align: center;
}

#result-section {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0%;
  z-index: 1000;
  background-color: #00000082;
}

#result-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40%;
  height: 70%;
  background-color: var(--vert);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  display: inline-block;
  padding: 8px; /* épaisseur de la bordure extérieure */
  border-radius: 20px; /* coins arrondis */
  background-color: var(--brun); /* Brun */

  .inner-frame {
    width: 100%;
    height: 100%;
    padding: 8px; /* épaisseur de la bordure intérieure */
  }

  .indice-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-inline: 4rem;
    position: relative;

    h2 {
      font-size: 1.5rem;
      text-align: center;
      margin-bottom: 1rem;
    }
    #result-nom {
      font-size: 1.2rem;
      text-align: center;
    }
    img {
      width: 60%;
      border-radius: 20px;
      object-fit: cover;
      margin: 1.5rem;
      margin-top: 0%;
    }
    p {
      font-size: 1rem;
      text-align: center;
      margin-bottom: 1rem;
    }
    #btn-replay {
      text-decoration: none;
      background-color: var(--orange);
      color: var(--blanc);
      padding: 10px 20px;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      font-size: 1.2rem;
      transform: scale(1);
      transition: transform 0.3s ease;

      &:hover {
        transform: scale(1.05);
      }
    }
    #btn-close {
      font-weight: bold;
      font-size: 1.5rem;
      color: var(--blanc);
      text-decoration: none;
      text-align: center;
      position: absolute;
      top: 2%;
      right: 3%;
      cursor: pointer;
    }
  }
}

.winner {
  display: flex !important;
}

#btn-replay2 {
  display: none;
  text-decoration: none;
  background-color: var(--orange);
  color: var(--blanc);
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2rem;
  transform: scale(1);
  transition: transform 0.3s ease;
  width: fit-content;
  margin: auto;

  &:hover {
    transform: scale(1.05);
  }
}

/* ------ */
/* header */
/* ------ */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  color: var(--blanc);
  font-size: 1.2rem;
  font-weight: bold;

  nav ul {
    display: flex;
    align-items: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
  }

  a {
    text-decoration: none;
    color: var(--blanc);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
  }

  a:hover {
    color: var(--orange);
  }
}

.current-menu-item a {
  color: var(--rouge);
  font-weight: bold;
}

/* ---------- */
/* front-page */
/* ---------- */

.btn-play {
  display: block;
  background-color: var(--orange);
  color: var(--blanc);
  padding: 10px 20px;
  margin-block: 2rem;
  width: fit-content;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2rem;
  text-decoration: none;
  transform: scale(1);
  transition: transform 0.3s ease;
}
.btn-play:hover {
  transform: scale(1.05);
}
.btn-play:active {
  transform: scale(0.95);
}

.front-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  height: 80vh;
  text-align: center;
  /* color: var(--blanc); */
}

.content {
  display: flex;
  flex-direction: column;

  font-size: 1.2rem;
  font-weight: 400;
}

h1 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  align-self: center;
}

#regles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-block: 2rem;

  .content {
    padding-bottom: 2rem;
  }
  .indice-container {
    width: 100px;
  }
}

#personnages {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-block: 2rem;

  .indice-container {
    background-color: var(--gris);
    font-size: 1rem;
    padding: 4px;
  }

  h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
    align-self: center;
  }

  tr {
    border-bottom: dotted 2px var(--blanc);
  }

  td {
    padding: 10px;
    text-align: center;
    color: var(--blanc);
  }
  th {
    padding: 20px;
    text-align: center;
    color: var(--blanc);
    font-weight: bold;
    width: 156px;
  }
}

#personnages table {
  margin-top: 2rem;

  border-collapse: collapse;
}

.top {
  width: 75px;
  height: 75px;
  position: fixed;
  bottom: 2%;
  right: 2%;
  z-index: 1000;

  a {
    display: block;
    width: 100%;
    height: 100%;
  }
  div {
    width: 100%;
    height: 100%;
  }
}

#liste-arcs {
  visibility: hidden;
  position: absolute;
  opacity: 0;
  top: 12%;
  left: 2%;

  .frame-content-wrapper {
    height: auto;
    max-height: 300px;
    overflow-y: scroll;
  }

  .frame-content-wrapper::-webkit-scrollbar {
    width: 8px; /* largeur de la barre */
  }
  .frame-content-wrapper::-webkit-scrollbar-track {
    background: var(--brun); /* couleur de fond de la piste */
    /* border-radius: 10px; */
  }
  .frame-content-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--orange); /* couleur de la poignée */
    border-radius: 10px;
    border: 2px solid var(--brun); /* crée un espace autour */
  }
  .frame-content-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #b04e1e;
  }
}

#liste-arcs.show {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#aide-arcs {
  font-size: 0.9rem;
}
.clicked {
  background-color: var(--rouge);
}

.arcs-container {
  li {
    padding-bottom: 4px;
  }
}

#reponse-abandon {
  font-size: 0.8rem;
  margin-bottom: 1rem;
  display: none;
}
#reponse-abandon.show {
  display: inline-block;
}
#reponse {
  display: none;
}
#reponse.show {
  display: inline-block;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #00000082;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.loader {
  border: 8px solid var(--blanc);
  border-top: 8px solid var(--orange);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#table-header {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#table-header.visible {
  display: table-header-group;
  opacity: 1;
}

#blog {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  gap: 2rem;

  .rounded-frame {
    width: 70%;
  }

  .indice-container {
    background-color: var(--gris);
    font-size: 1rem;
    padding: 2rem;
    gap: 1rem;
    text-align: center;
    width: auto;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .rounded-frame:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
  }
}

#btnCommentaire {
  width: 4rem;
  position: fixed;
  bottom: 2%;
  left: 2%;
  cursor: pointer;
  z-index: 1000;
  transform: scale(1);
  transition: transform 0.3s ease;

  &:hover {
    transform: scale(1.05);
  }
}

#commentaires-form {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0%;
  left: 0%;
  background-color: #00000082;
  z-index: 1000;

  #result-container {
    height: auto;
  }
  .indice-container {
    background-color: var(--gris);
  }
  #respond {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
  }
  form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }
  .comment-form-comment {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    gap: 1rem;
  }
  textarea {
    width: 100%;
    min-height: 15rem;
    padding: 1rem;
    border-radius: 1rem;
    border: none;
    font-size: 1rem;
    resize: none;
  }
  textarea:focus {
    outline: none;
    border: 2px solid var(--orange);
  }
  input[type="submit"] {
    width: 100%;
    padding: 0.7rem 1.4rem;
    border-radius: 1rem;
    border: none;
    font-size: 1rem;
    background-color: var(--orange);
    cursor: pointer;
    transform: scale(1);
    transition: all 0.3s ease;
  }
  input[type="submit"]:hover {
    background-color: var(--rouge);
    transform: scale(1.05);
  }
}
#commentaires-form.show {
  display: flex;
  opacity: 1;
}

.grid {
  column-count: 1;
  column-gap: 2rem;
  width: 100%;
  padding-inline: 4rem;
}
.grid-item {
  width: 25%;
  box-sizing: border-box;
}

#commentaires {
  margin-block: 2rem;
  padding-inline: 10rem;

  .indice-container {
    background-color: var(--gris);
    font-size: 1rem;
    padding: 2rem;
    gap: 1rem;
    text-align: center;
    width: auto;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    transition: all 0.3s ease;
  }
  .rounded-frame:hover {
    transform: scale(1.03);
    z-index: 2;
  }
  .rounded-frame {
    margin: 1.3rem;
  }
}

select {
  width: 100%;
  padding: .5rem;
  border-radius: 1rem;
  border: none;
  font-size: 1rem;
  background-color: var(--blanc);
  color: var(--noir);
}

input[type="reset"] {
  width: fit-content;
  height: fit-content;
  padding: 0.7rem 1.4rem;
  border-radius: 1rem;
  border: none;
  font-size: 1rem;
  background-color: var(--orange);
  cursor: pointer;
  transform: scale(1);
  transition: all 0.3s ease;
}

#filters {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
}
