/* Existing styles */
header {
    background-color: #37463D;
    color: #F8FBF1;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    
    position: fixed; /* Keeps the header fixed at the top */
    z-index: 99;
    top: 0;
}

header .logo {
    font-size: 24px;
    font-weight: bold;
}

header .logo a {
    text-decoration: none; /* Supprime le soulignement */
    color: #F8FBF1; /* Change la couleur du lien */
    font-weight: bold; /* Gras */
    font-size: 1.2em; /* Agrandit la taille de la police */
    padding: 10px; /* Ajoute un espace autour du texte */
    transition: color 0.3s; /* Transition douce pour le changement de couleur */
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav ul li a {
    color: #F8FBF1;
    text-decoration: none;
    font-size: 16px;
}

header nav ul li a:hover{
    cursor: pointer;
}

/* New styles for mobile responsiveness */
.hamburger {
    display: none; /* Hide by default */
    background: none;
    border: none;
    color: #F8FBF1;
    cursor: pointer;
}

/* Media query for mobile */
@media (max-width: 768px) {
    header{
        height: 50px;
        padding-top: 25px;
    }
    header nav ul {
        display: none; /* Hide the navigation menu by default */
        flex-direction: column; /* Stack the items vertically */
        position: absolute; /* Position it absolutely */
        background-color: #37463D; /* Match the header background */
        top: 50px; /* Position below the header */
        left: 0;
        right: 0;
        padding: 5px 0; /* Padding for the menu */
        z-index: 98; /* Below the header */
        text-align: center;
    }

    header nav ul.active {
        display: flex; /* Show when active */
    }

    .hamburger {
        display: block; /* Show hamburger button */
    }
}

.headerHome {
    margin-left: auto;
}

.iconeMaison {
    height: 40px;
    width: 40px;
}

/* Styles pour la fenêtre de gestion des amis */
#amisContainer {
    display: none; /* Caché par défaut */
    position: absolute;
    top: 60px; /* Juste en dessous du header */
    right: 20px;
    width: 300px;
    background-color: #37463D !important;
    border: 2px solid #F8FBF1;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 100;
    color: #F8FBF1;
    font-size: 14px;
}

/* Tabs pour amis et demandes d'amis */
.tabs {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
    margin-bottom: 10px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    background: #37463D;
    color: #F8FBF1;
    border-radius: 5px 5px 0 0;
}

.tab.active {
    
    font-weight: bold;
}

.notification-dot {
    background-color: red;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: none;
    margin-left: 5px;
}

.notification-dot.visible {
    display: inline-block;
}

/* Contenu des onglets */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Liste des amis */
#amisContainer .amis-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto; /* Permet le défilement si trop d'amis */
}

#amisContainer .amis-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #F8FBF1;
}

#amisContainer .amis-list li:last-child {
    border-bottom: none;
}

#amisContainer .amis-list button {
    background-color: #FF5C5C;
    color: #F8FBF1;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

#amisContainer .amis-list button:hover {
    background-color: #E04444;
}

/* Liste des invitations */
#amisContainer .invitations-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

#amisContainer .invitations-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #F8FBF1;
}

#amisContainer .invitations-list button {
    background-color: #4CAF50;
    color: #F8FBF1;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

#amisContainer .invitations-list button:hover {
    background-color: #45A049;
}

/* Barre de recherche */
#amisContainer .search-bar {
    display: flex;
    margin-top: 10px;
    gap: 10px;
}

#amisContainer .search-bar input {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #F8FBF1;
    border-radius: 4px;
    background-color: #2D3A31;
    color: #F8FBF1;
}

#amisContainer .search-bar input::placeholder {
    color: #BCC6B6;
}

#amisContainer .search-bar button {
    background-color: #4CAF50;
    color: #F8FBF1;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#amisContainer .search-bar button:hover {
    background-color: #3E8E41;
}

#amisContainer {
    background: #F8FBF1;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    width: 300px;
}

/* Visibilité des sections */
.hidden {
    display: none;
}

.lienAmi{
    color:white;
    text-decoration: none;
}

.lienAmi:hover{
    cursor: pointer;
}

@media (max-width: 768px) {
    #amisContainer{
        width: 90%;
        margin: 0 auto; /* Centre horizontalement */
        left: 50%; /* Place au centre */
        transform: translateX(-50%);
    }
}