/* Toc tournoi 2025*/

header {
  margin-bottom: 10vh;
}

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

menu {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

#menu-icones {
  display: flex;
  margin-top: 30px;
}

.icone-menu {
  transition: transform 0.1s ease, color 0.1s ease;
  max-width: 50px;
  margin-left: 30px;
  cursor: pointer;
}

.icone-menu:active {
  transform: scale(0.8);
  opacity: 0.5;
}


section {
    padding: 100px 10vw 50px 10vw;
    font-family: "Dosis", sans-serif;
    font-optical-sizing: auto;

}

section .equipe {
    display: flex;
    margin-bottom: 20px;
    padding: 5px;
    background-color: white;
}

h1 {
  font-size: 3rem;
  margin-bottom: 3rem;
}

h2 {
  font-size: 2.3rem;
}

h3 {
  font-size: 1.8rem;
}

h1,h2,h3 {
  text-align: center;
  margin-top: 20px;
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-style: normal;
}

p {
    font-size: 1.3rem;
}

.succes-texte {
  margin-top: 10px;
  text-align: center;
  color: green;
}

strong {
  font-weight: bold;
}

.bold {
  font-weight: bold;
}


.nom-equipe {
    display: flex;
}


.position {
    margin-right: 15px;
    min-width: 70px;
}

tr:nth-child(even) {
  background-color: #b1b1b142;
}


.chiffre {
  font-family: "Dosis", sans-serif;
  font-weight: 500;
  font-style: normal;
  letter-spacing:0.1rem;
  font-size: 1.5rem;
}

.flex-cellule-equipe {
  display: flex;
  justify-content: start;
  align-items: center;
}

footer {
  background-color: #59452c;
  padding: 60px 10vw 30px 10vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  font-family: "Dosis", sans-serif;
}

footer p {
  margin-bottom: 15px;
}

footer a {
  color: white;
  margin-bottom: 5px;
}

/* Define the animation keyframes */
@keyframes newOrleansGradient {
  0% {
      background-position: 0% 50%;
  }
  50% {
      background-position: 100% 50%;
  }
  100% {
      background-position: 0% 50%;
  }
}



/* Pour les pages générales equipe et joueur unique */

main {
  padding: 5vh 15vw;
}

textarea {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical; /* Permet à l'utilisateur d'ajuster la hauteur */
}


form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: auto;
}

form label {
  margin-top: 30px;
  margin-bottom: 15px;

}


.round-container {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.round-container h2 {
  width: 100%;
  margin-bottom: 30px;
}



/* Page index gpt ---------- */


#form-connexion-index {
  max-width: 600px;
  margin: auto;
}

.informations-erronees {
  padding: 10px 0px;
  text-align: center;
}

/* FIN Page index gpt ---------- */


#page-tous-les-tournois {
  background-image: url("../imgs/celezart-art-medieval-landscape.jpg");
  background-position: center;
  background-repeat: no-repeat;
}


/* faire une partie modification admin ? ou page css en plus différente */

#tournoi-infos {
  display: flex;
  justify-content: space-around;
}

.field-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 50px;

}


/* chat gpt ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 50px;
}

th, td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 1.3rem;
}

th {
  padding: 10px
}

td {
  padding: 11px 10px 13px 10px;
  /* a corriger selon page ou visibilité avec padding ? height: 60px; */
  vertical-align: middle;
}


.editable {
  cursor: pointer;
}

.editable:hover {
  background-color: #d0d6db;
}

.total {
  font-family: "Dosis", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  font-style: normal;
  letter-spacing:0.1rem;
}

button {
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
}

form button {
  margin: auto;
}

.conteneur-boutons {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-number {
  margin-bottom: 50px;
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
}

#input-rounds {
  margin-top: 10px;
  margin-right: 20px;
  margin-bottom: 10px;
}

.input-label {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 20px;
}

#ajouter_team {
  margin-top: 100px;
  max-width: 40%;
  display: flex;
  justify-content: center;
}

#plus-icone {
  max-width: 20px;
  margin-right: 20px;
}

#demarrer_tournoi {

}

.delete-btn {
  color: white;
  border: none;
}

.delete-btn:hover {
  background-color: #ff4c4c;
}



td:nth-child(2) {
  border-left: 0px;
}


td:nth-child(2),th:nth-child(2)  {
  border-right: solid 3px black;
}

td:nth-child(2n+4) {
    background-color: #00000008;
}


tbody th:last-child {
  /* background-color: white; */
  border: none;
}

td:last-child {
    /* a ameliorer en situation avec bouton supprimer equipe et quand matchs generes 
  border: none;
  background-color: white;
  */
}

.team-name {
  font-family: 'MorrisRoman', serif;
  max-width: min-content;
  font-size: 2rem;
}

td.scores.bonus.bonus-unused {
    background: repeating-linear-gradient(
        45deg,
        #f2f2f2,
        #f2f2f2 8px,
        #e6e6e6 8px,
        #e6e6e6 16px
    );
}



.rouge-elimine {
  background-color: #ff7f7f;
}

.overflowhidden {
  overflow: hidden;
}

input {
  font-size: 1.3rem;
  height: 40px;
}



.match {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: burlywood;
  padding: 10px 50px 30px 50px;
  border-radius: 10px;
  margin: 10px 15px 30px 15px;
  min-width: 160px;
}

.match-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.team-label {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.btn-non-joue  {
  margin-top: 20px;
}

.non-joue button {
 background-color: #ff7f7f;
}


/* animation chat gpt inputs score entrée pas valide */

.score-error {
  animation: score-shake .25s ease-in-out 0s 2, score-flash .6s ease-in-out 1;
  border-color: #e53935 !important;
  outline: none !important;
}
@keyframes score-shake {
  0%{transform:translateX(0)}25%{transform:translateX(-4px)}
  50%{transform:translateX(4px)}75%{transform:translateX(-3px)}
  100%{transform:translateX(0)}
}
@keyframes score-flash {
  0%{ box-shadow: 0 0 0 2px rgba(229,57,53,.25); }
  100%{ box-shadow: none; }
}










/* animation chat gpt déplacement classement (qui marche plus / plus utilisé pour l'instant) ------------- */

@keyframes move-up {
  from {
      transform: translateY(100%);
      opacity: 0;
  }
  to {
      transform: translateY(0);
      opacity: 1;
  }
}

@keyframes move-down {
  from {
      transform: translateY(-100%);
      opacity: 0;
  }
  to {
      transform: translateY(0);
      opacity: 1;
  }
}

.move-up {
  animation: move-up 0.5s ease-in-out;
}

.move-down {
  animation: move-down 0.5s ease-in-out;
}






/* .dore  */
.new-dore {
  margin: 0px;
  background: linear-gradient(45deg, #d28953, #CE9E39, #D08F06, #f7af25);
  background-size: 400% 400%;
  animation: newOrleansGradient 6s ease infinite;
  color: white;
  font-weight: bold;
}


/* Apply the animated gradient background to the desired element */
.dore {
  margin: 0px;
  background: linear-gradient(45deg, #d28953, #CE9E39, #D08F06, #f7af25);
  background-size: 400% 400%;
  animation: newOrleansGradient 6s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-family: Arial, sans-serif;
  font-weight: bold;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* .dore-texte  */

/* effect-shine */
.dore-texte {
  color: #d2980d;
  -webkit-mask-image: linear-gradient(-75deg, rgba(236, 171, 0, 0.6) 30%, #e6c200 50%, rgba(255, 255, 255, 0.6) 70%);
  -webkit-mask-size: 200%;
  animation: shine 2s infinite;
  font-weight: bold;
}

@-webkit-keyframes shine {
  from {
    -webkit-mask-position: 150%;
  }
  
  to {
    -webkit-mask-position: -50%;
  }
}






/* MENU */


/* Icône du menu burger */
#burger-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 35px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1000;
}

.bar {
  width: 100%;
  height: 5px;
  background-color: #333;
  border-radius: 5px;
  transition: 0.3s;
}

/* Sidebar */
#sidebar {
  position: fixed;
  top: 0;
  right: -25vw; /* Caché par défaut */
  width: 25vw;
  height: 100vh;
  background: #333;
  color: white;
  padding-top: 30px;
  transition: right 0.3s ease-in-out;
  z-index: 999;
}

#sidebar ul {
  list-style: none;
  padding: 0;
}

#sidebar ul li {
  padding: 10px 15px;
  text-align: center;
  font-family: "Anton", sans-serif;
  letter-spacing: 0.05rem;
}

#sidebar ul li a {
  color: white;
  font-size: 1.5rem;
  padding: 7px 0px 10px 0px;
  text-decoration: none;
  display: block;
  transition: 0.3s;
}

#sidebar ul li a:hover {
  background: #444;
}

/* Bouton de fermeture */
#close-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  cursor: pointer;
  padding-bottom: 5px;
}

#close-btn button{
  top: 10px;
  right: 15px;
  font-size: 3rem;
  border: none;
  background: none;
  color: white;
}

/* Overlay pour flouter le fond */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 998;
}





/* Styles page tous les tournois */


#tournaments-container, #equipes-container, #joueurs-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}
.tournament-card, .equipe-carte, .joueur-carte {
  color: black;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  width: 30%;
  min-width: 300px;
  min-height: 200px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s;
}
.tournament-card:hover, .equipe-carte:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.tournament-title, .equipe-titre {
  font-size: 2.3rem;
  line-height: 2.6rem;
  font-weight: 500;
  margin-bottom: 15px;
}
.tournament-date, .tournament-winner, .equipe-joueur-nom {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 6px;
}

.joueur-carte {
  color: black;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  width: 20%;
  min-width: 200px;
  max-width: 300px;
  min-height: 200px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s;
}
.joueur-carte:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-view {
  font-size: 1.2rem;
  display: inline-block;
  padding: 8px 12px;
  background: rgb(32, 77, 125);
  color: #fff;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  margin-top: 20px;
}
.btn-view:hover {
  background: #0b315a;
}





.date-picker-wrapper {
  position: relative;
  display: inline-block;
}

.date-picker-wrapper input[type="date"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
}

#calendarTrigger {
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  width: fit-content;
}

#calendarTrigger:hover {
  opacity: 80%;
}


.date-visible {
  display: inline-block;
  margin-top: 5px;
  color: #333;
  font-weight: bold;
  font-size: 1.2rem;
}



/* TEST PLAYOFF ------------------------------- */


#generation-playoff {
  padding: 0px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

/* couleurs de statut */
.team-playoff { position: relative; cursor: pointer; user-select: none; }
.team-playoff.winner { background: #e7f1ff; }         /* gagnant QF/SF */
.team-playoff.bronze { background: #f5e1b9; }         /* 3e place */
.team-playoff.gold   { background: #ffe28a; }         /* 1er */
.team-playoff.silver { background: #e6edf6; }         /* 2e */

/* bouton dropdown (petite flèche à droite) */
.team-playoff .pick-btn {
  background: transparent; border: 1px solid #0003; border-radius: 4px;
  font-size: 12px; line-height: 1; padding: 2px 6px; cursor: pointer;
  height: 100%;
  max-width: 30%;

}

/* menu déroulant */
.team-playoff .picker {
  position: absolute; right: 6px; top: 26px;
  background: #fff; border: 1px solid #ddd; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  min-width: 220px; max-height: 260px; overflow: auto; z-index: 10; display: none;
}
.team-playoff .picker.open { display: block; }
.team-playoff .picker-item {
  padding: 6px 10px; font-size: 13px; display: flex; justify-content: space-between;
}
.team-playoff .picker-item:hover { background: #f2f6ff; }

/* conteneur bracket (on réutilise ton grid) */
.bracket-4 {
  display: grid;
  grid-template-columns: repeat(22, 70px);
  grid-template-rows: repeat(10, 60px);
  background: #fff;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  position: relative;
  margin-top: 16px;
}

/* carte match */
.match-playoff {
  grid-column: span 4;
  grid-row: span 2;
  display: grid;
  grid-template-rows: 1fr 1fr;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.team-playoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1;
  border-top: 1px solid #1112;
}
.team-playoff:first-child { border-top: 0; }

/* traits */
.h-line { border-top: 2px solid #000; }
.v-line { border-left: 2px solid #000; }





/* TABLETTE ---------------------------- TABLETTE */

/* A FAIRE */


/* TELEPHONE ---------------------------- TELEPHONE */


/* A PEAUFINER */

@media screen and (max-width: 480px) {


  body  {
    padding: 0px;
  }

  header {
    margin-bottom: 5vh;
    margin-top: 3vh;
    padding: 20px;
  }

  .icone-menu {
    margin-right: 30px;
  }

  #menu-icones{
    justify-content: start;
    margin-top: 20px;
  }

  section {
    padding: 0vh 20px 10vh 20px;
  }

  .overflowhidden {
    padding-left: 20px;
   }

  #tableau-scores-container {
    overflow-x: auto;
    padding-bottom: 5vh;
    scrollbar-width: none;
    padding-left: 0px;
    padding-right: 0px;
    margin-bottom: 40px;
  }

  td, th {
    min-height: 80px;
    min-width: 70px;
    vertical-align: middle;
  }

  .flex {
    flex-wrap: wrap;
  }
  
  .position {
    min-width: 20px;
  }

  .team-name {
    min-width: 30vw;
    font-size: 1.3rem;
  }

  #sidebar {
    right: -75vw;
    width: 75vw;
  }

  .sticky-mobile-1 {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  }
  
  .team-name:nth-child(1n) {
    min-width: 40vw;
    background-color: #f4f4f9;
  }


  tr:nth-child(even) td:first-child {
    background-color: #e4e4e4;
  }
  

  .team-name-th {
    background-color: #f4f4f9;
  }

  table {
    border-collapse: separate;
    margin-bottom: 0px;
  }

  #demarrer_tournoi {
    margin-top: 40px;
  }

   #close-btn {
    font-size: 5rem;
   }




}


.displaynone {
  display: none;
}