/*Position fermée*/
#menu-button {
    position: fixed;
    height: 100%;
    width: 50px;
    top: 0;
    right: 0;
/*    background-color: rgba(0,0,0,0.3);*/
    color: rgba(255, 250, 250, .5);
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 5px 0 0 5px;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}
#menu-button .fa {
    font-size: 40px;
    transform: scaleY(2);
    line-height: 1;
}
#menu-button:hover {
    background-color: rgba(0,0,0,0.6);
}

/*Position ouverte*/
#sideNav-button {
    position: absolute;
    height: 100%;
    width: 50px;
    top: 0;
    left: 0;
/*    background-color: rgba(0,0,0,0.3);*/
    color: rgba(255, 250, 250, .5);
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 5px 0 0 5px;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}
#sidenav .fa {
    font-size: 40px;
    transform: scaleY(2);
    line-height: 1;
}

#sideNav {
    position: fixed;
    top: 190px;
    right: -300px;
    width: 250px;
    display: flex;
    flex-direction: column;
    padding: 20px 0px 20px 20px;
    z-index: 1000;
    transition: right 0.3s;
}
#sideNav.active {
    right: 0;
}
#sideNav li {
    margin: 10px 0;
    padding: 5px 20px;
    list-style: none;
}
#sideNav li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1em;
    display: block;
}


#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.3);
    z-index: 999;
    display: none;
}
#overlay.active {
    display: block;
}

/* Par défaut, l'icône de chat est en position fixe */
.chat-icon {
  position: absolute;
  right: 0px;
  bottom: 0px;
  color: white;
  padding: 2px;
  width: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1150;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

/* Changement de couleur au survol de l'icône */
.chat-icon:hover {
  background-color: #218838;
}

/* Lors de l'ouverture de la sidebar, positionner l'icône en absolute dans la sidebar */
#sideNav.open .chat-icon {
  position: absolute;
  width: 100%;
  right: 0px; 
  bottom: 0px; 
  z-index: 1160; 
}

/* Modale de chat */
.chat-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1060;
  justify-content: center;
  align-items: center;
}

.chat-modal-content {
    position: relative;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 400px;
    max-width: 90%;
    text-align: center;
}

.close-chat {
  top: 10px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
  color: #888;
}

.close-chat:hover {
  color: black;
}

@media (max-width: 768px) {
    h1 img {
        margin: 0 auto;
        display: block;
        max-width: 60vw;
    }
    #menu-button {
        width: 40px;
        height: 50px;
        padding: 5px;
        background-color: rgba(0,0,0,0.6);
    }

    #menu-button .fa {
        font-size: 24px;
        transform: none;
    }

    #sideNav {
        top: 70px;
        width: 75vw;
        right: -75vw; /* même valeur négative */
    }

    #sideNav.active {
        right: 0;
    }

    #sideNav li a {
        font-size: 0.9em;
    }
}
/*@media (max-width: 768px) {
    #sideNav {
        top: 70px;
        width: 75vw;
        right: -75vw; 
    }

    #sideNav.active {
        right: 0;
    }

    #menu-button {
        width: 40px;
        height: 50px;
    }
}*/