* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    text-decoration: none;   
    list-style: none;
    font-family: "Nunito", sans-serif;
}

#logo-spink-nav {   
    cursor: pointer;
    width: 1.8rem;
    height: auto;
}

button {
    background-color: transparent;
}

.titleBarBtns {     
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    height: 40px;
    background-color: rgb(218, 219, 255);
    padding: 0.5rem;
    -webkit-app-region: drag; /* SUPER important pour permettre de déplacer la fenêtre*/
    margin-bottom: 0.5rem;
}

.topBtn {
    cursor: pointer;
    -webkit-app-region: no-drag;    
    color: rgb(150, 152, 253);
    font-size: 1.3rem;        
}

.topBtn:hover {
    color: rgb(103, 106, 255);
}

/* formulaire */
#form { 
    display: flex; 
    gap: 6px; 
    align-items: center; 
    background-color: #3C467B;
    border-radius: 20px;
    padding: 1rem;
    width: 700px;
    max-width: 100%; 
    height: 60px;
}

#links-list input {
    width: 100%;
    color: rgb(65, 65, 65);
    font-size: 1rem;   
    padding: 1rem;       
    border-radius: 10px;
    width: 550px;
    height: 20px;
}

#links-list input::placeholder {
    color: rgb(185, 185, 185);
}

#emojiToggle { 
    cursor: pointer; 
    font-size: 36px;    
}

#emojiToggle:hover {
    border-radius: 20px;
}

.emoji-tooltip {
    position: absolute;
    top: 33%;
    left: 50%;    
    background: #ffffffe5;   
    padding: 6px;
    border-radius: 8px;
    display: none; /* caché par défaut */
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    z-index: 30;
    white-space: nowrap;
}

.emoji-tooltip.show { 
    display: flex; 
    gap: 6px; 
    flex-wrap: wrap; 
}

.emoji-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.emoji-btn:hover { 
    background: rgba(0,0,0,0.05); 
    border-radius: 20px;
}

.list-items {
    display: flex;
    gap: 1rem;
    margin-top: 0.8rem;
}

.item { 
    display: flex; 
    flex-direction: column;
    align-items: center;     
    margin: 3px 0; 
}

.icon { 
    width: 44px; 
    height: 44px;      
}

.linkItem {
    width: 58px;
    height: 58px;
    background-color: rgb(255, 239, 209);
    border-radius : 20px;  
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
}

.linkItem:hover {
    background-color: rgb(172, 173, 255);
}

.btn-delete { 
    margin-left: 3px; 
    color: rgb(215, 214, 255);
    font-size: 1.3rem;  
    cursor: pointer;
}

.btn-delete:hover {
    color: orange;
}

#links-list {
    background-color: white;
    color: black;
    width: 100%;
    padding: 1.3rem;
}

#addButton {
    width: 4rem;
    height: 4rem;
    font-size: 47px;
    cursor: pointer;   
    color: white; 
}

#addButton:hover {
    border-radius: 20px;
}

/* bouton "+" caché par défaut */
#miniAddBtn {
  display: none;
  font-size: 1.7rem;
  color: rgb(150, 152, 253);
  cursor: pointer;
  -webkit-app-region: no-drag; /* pour cliquer dessus sans bouger la fenêtre */
}

#miniAddBtn:hover {
    color: #3C467B;
} 

/* Responsive à partir de 700px pour le formulaire */
@media (max-width: 700px) {
    #form {
        width: 90%;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
        height: auto;
    }

    #links-list input {
        width: 100%;
        padding: 0.5rem;
    }
}

/* Responsive en tiny layout à partir de 152px  */
@media (max-width: 152px) {
    /* cacher complètement le formulaire */
    #form {
        display: none;        
        height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
        margin-bottom: 1rem;
    }

    #form.show {
        display: flex; /* réafficher en colonne au clic du bouton "+" */
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
        height: auto;
        visibility: visible;
    }

    #miniAddBtn {
    display: block;
    margin: 0 auto; 
  }

    /* liste en colonne */
    .list-items {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        margin-top: 0.4rem;
    }

    .item {
        margin: 2px 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .linkItem {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        flex-shrink: 0;
    }

    /* barre de titre adaptée */
    .titleBarBtns {
        padding: 0.25rem 0.5rem;
        height: 36px;
    }

    .topBtn {
        font-size: 1rem;
        padding: 0 0.25rem;
    }

    #logo-spink-nav {
        width: 1.4rem;
    }

    #addButton {
        width: 3rem;
        height: 3rem;
        font-size: 32px;
    }

    .emoji-tooltip {
    position: fixed !important;     
    z-index: 9999 !important;    
    top: 12%;
    left: 16%;
    display: none;               
    max-width: calc(100% - 2rem); 
    width: auto;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
    white-space: normal; 
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 10px;
    background: #ffffffee;
  }
 
  .emoji-tooltip.show {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 6px; 
  justify-items: center; 
  align-items: center;   
  }
}
