:root{
    --primary-color: #00ffd5;
    --secondary-color: #00c9a7;
    --primary-color-admin: #ee82ee;
    --secondary-color-admin: #d11dc8;
    --background: #f4f4f4;
}

/* Réinitialisation de certains styles par défaut */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoia UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    height: 100vh;
    
}

button {
    all: unset;
    background-color: var(--background);
    border: 1px solid black;
    border-radius: 5px;
    margin-top: 5px;
    width: 150px;
    
}


.container{
    flex: 1;
    text-align: center;
}

nav{
    background-color: grey;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

#menu-player{
    background-color: var(--primary-color);
}

#menu-touroperator{
    background-color: var(--primary-color-admin);
}

#menu-touroperator a:hover{
    background-color: var(--secondary-color-admin);
}

#sidebar-touroperator a:hover{
    background-color: var(--primary-color-admin);
}


#menu-supervisor{
    background-color: orange;
}

#menu-supervisor a:hover{
    background-color: orange;
}

#sidebar-supervisor a:hover{
    background-color: orange;
}


.status{
    position: absolute;
    width: 120px;
    font-size: 10px;
    bottom: -20px;
    right: 3vw
}

nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li {
    height: 50px;
}

.content {
    text-align: center;
    padding: 50px;
}

.container form{
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.container form button{
    margin: auto;
    margin-top: 15px;
}

footer {
    text-align: center;
    background-color: #333;
    color: white;
    padding: 10px;
    bottom: 0;
    width: 100%;
    /* Je ne suis pas sûr de ce que veut Papa */
    position: sticky;
    bottom: 0;
    left: 0;
}

h1 {
    text-align: center;
    margin: 20px;
}

p {
    text-align: center;
}

.tournament-container{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 5%;
}

.tournament-container a{
    margin: 1%;
    text-decoration: none;
    font-size: 2.5vh;
    font-weight: bold;
}

.tournament-item{
    width: 60vw;
    height: 10vh;
    padding: 2%;

    border-radius: 10px;
    border:black solid 2.8px;

    text-decoration: none;
    color: black;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    position: relative;
}

.tournament-item.registered {
    background-color: lightgreen;
}

.tournament-item.not-registered {
    background-color: lightcoral;
}

.tournament-item p {
    position: absolute;
    bottom: 0;
    right: 1%;
    font-size: x-small;
}

nav a {
    height: 100%;
    padding: 0 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: black
}

nav a:hover {
    background-color: var(--secondary-color);
    color: white;
}

nav :first-child{
    margin-right: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    z-index: 999;
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar li {
    width: 100%;
}

.sidebar a {
    width: 100%;
}

.match-table {
    margin-left: 100px;
}

.sep{
    width: 80%;
    height: 3px;
    background-color: black;
    margin: auto;
    margin-top: 50px;
    margin-bottom: 50px;
    
}

header{
    position: sticky;
    top: 0;
    z-index: 999;
}

.ranking-container{
    display: flex;
    flex-direction: column;
    border:black solid 2.8px;
    border-radius: 10px;
    width: fit-content;
    justify-content: left;
    margin: auto;
}
.ranking-container p{
    text-align: left;
    padding: 2px;
}

.ranking-child p:nth-child(1){
    width: 100px;
}

.ranking-child p:nth-child(2){
    width: 300px;
}

.ranking-child p:nth-child(3){
    width: 100px;
}

.center {
    margin: auto;
    width: fit-content;
}

.chart-container {
    width: 70%;
    margin: auto;
}

/* boîte de notification */
.popup {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 250px;
  padding: 15px 20px;
  border-radius: 6px;
  color: #fff;
  font-family: sans-serif;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease;
  z-index: 9999;
}

/* états */
.popup.show {
  opacity: 1;
  transform: translateY(0);
}

.popup.success { background-color: #4caf50; }   /* vert */
.popup.error { background-color: #f44336; }     /* rouge */
.popup.info { background-color: #2196f3; }      /* bleu */
.popup.warning { background-color: #ff9800; }   /* orange */




/* Animation d'apparition */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


@media(max-width: 800px){ 
    .hideOnMobile{
        display: none;
    }

    .tournament-item{
        width: 90vw;
    }


}

@media(max-width:400px){
    .sidebar{
        width: 100%;
        height: 100%;
    }

    
}