/* --- STYLE INSPIRÉ D'INSTAGRAM (VERSION DESKTOP) --- */

/* Base de la page */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fafafa;
    color: #262626;
    margin: 0;
    padding: 20px;
}

/* Conteneur principal */
.container {
    max-width: 800px;
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 12px;
    padding: 20px 40px 40px 40px;
}

/* Conteneur du logo */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 180px;
    height: auto;
}

h1, h2 {
    text-align: center;
    font-weight: 600;
    color: #262626;
}

h2 {
    font-size: 1.2em;
    border-bottom: 1px solid #efefef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Zone de recherche */
.search-container {
    position: relative;
    margin-bottom: 40px;
}

#searchInput {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    background-color: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    box-sizing: border-box;
}

#searchInput:focus {
    outline: none;
    border-color: #a8a8a8;
}

#searchLaterBtn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    background-color: #c94a38;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
}

/* Suggestions */
#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dbdbdb;
    margin-top: 4px;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#suggestions li {
    list-style-type: none;
    padding: 12px 15px;
    cursor: pointer;
}

#suggestions li:not(:last-child) {
    border-bottom: 1px solid #efefef;
}

#suggestions li:hover {
    background-color: #fafafa;
}

/* Conteneur des deux listes de résultats */
.results-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Deux colonnes sur grand écran */
    gap: 30px;
}

.list-section {
    background-color: #ffffff;
    border-radius: 8px;
}

.list-section ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.list-section li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    font-size: 0.9em;
}

.list-section li:not(:last-child) {
    border-bottom: 1px solid #efefef;
}

#confirmedList li img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.delete-btn {
    margin-left: auto;
    color: #8e8e8e;
    font-weight: bold;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
}

.delete-btn:hover {
    color: #e74c3c;
    background-color: #fafafa;
}


/* --- AJOUTS POUR LA RESPONSIVITÉ (MOBILE) --- */
/* Ce code s'applique seulement si l'écran fait 768px de large ou moins */

@media screen and (max-width: 768px) {
    body {
        padding: 0; /* Enlève le padding du body sur mobile */
    }

    .container {
        margin: 0;
        padding: 15px; /* Réduit le padding intérieur */
        border: none; /* Enlève la bordure pour un look plein écran */
        border-radius: 0; /* Enlève les coins arrondis */
    }

    .logo-container img {
        max-width: 150px; /* Logo légèrement plus petit */
    }

    h1 {
        font-size: 1.4em; /* Titre un peu plus petit */
    }

    .results-container {
        grid-template-columns: 1fr; /* Passage à une seule colonne */
        gap: 25px; /* Espace entre les deux listes */
    }

    #searchInput {
        padding: 12px;
    }
}