/* Recherche : Élégante et intuitive (ajouts pour fonctionnalité) */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
}

.search-hero { /* FIX : Style proéminent pour visibilité immédiate, sans double bordure */
    max-width: 800px; /* Plus large */
    margin: 1rem auto !important;
    background: rgba(255,255,255,0.95); /* Fond contrasté */
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(107,88,76,0.15); /* Ombre visible */
    /* FIX : Padding supprimé pour éviter bordure blanche externe */
}

#search-input {
    width: 100%;
    padding: 12px 20px 12px 45px; /* Espace pour icône loupe */
    border: 1px solid #6b584c; /* Bordure brun thématique (seule visible) */
    border-radius: 50px;
    font-family: 'Times New Roman', serif;
    font-size: 1rem;
    background: rgba(255,255,255,0.69); /* Subtil transparent */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

#search-input:focus {
    border-color: #8b4513; /* Brun foncé au focus */
    box-shadow: 0 0 0 3px rgba(107,88,76,0.1); /* Glow subtil */
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b584c;
    font-size: 1.1rem;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.8); /* FIX : Transparence subtile */
    backdrop-filter: blur(10px); /* FIX : Effet blurry raffiné (frosted glass) */
    border: none; /* FIX : Enlève bordures pour élégance */
    border-radius: 0 0 20px 20px; /* Réduit pour plus compact */
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin; /* Fine pour Firefox */
    scrollbar-color: #6b584c transparent; /* Thumb brun, track transparent (Firefox) */
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 8px 32px rgba(107,88,76,0.15); /* Ombre sophistiquée, brun dilué */
    z-index: 1000;
    display: none; /* Caché par défaut */
}

#search-results::-webkit-scrollbar {
    width: 8px; /* Largeur fine verticale */
}

#search-results::-webkit-scrollbar-track {
    background: transparent; /* Transparent */
}

#search-results::-webkit-scrollbar-thumb {
    background: #6b584c; /* Brun thématique */
    border-radius: 4px;
    transition: background 0.3s ease;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background: #8b4513; /* Plus foncé au hover */
}

#search-results.show {
    display: block;
    animation: slideDown 0.3s ease; /* Slide-down élégant */
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#search-results li {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(107,88,76,0.05); /* Bordure interne subtile, diluée */
    transition: background 0.2s ease;
    font-family: 'Times New Roman', serif;
}

#search-results li:hover {
    background: linear-gradient(to right, rgba(245,240,230,0.2), rgba(107,88,76,0.03)); /* Striped élégant : Dégradé beige/brun très dilué */
}

#search-results li:last-child {
    border-bottom: none;
}

#search-results a {
    color: var(--bs-primary);
    text-decoration: none;
    display: block;
}

#search-results .author {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 4px;
}

/* Highlight match : Gras + couleur brun pour lettres trouvées */
#search-results mark {
    background: none;
    color: #8b4513;
    font-weight: bold;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive recherche */
@media (max-width: 768px) {
    .search-container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    #search-input {
        padding: 12px 15px 12px 50px; /* FIX : Padding ajusté pour centrer l'icône loupe */
        font-size: 1rem;
        background: white; /* FIX : Fond blanc solide pour éviter double bordure visuelle */
    }
    .search-icon {
        left: 20px; /* FIX : Position ajustée pour meilleur centrage sur mobile */
        font-size: 1.2rem;
    }
    #search-results {
        position: absolute; /* FIX : Absolute pour s'afficher directement sous la barre (pas fixed bottom) */
        top: 100%; /* FIX : Juste en dessous de l'input */
        left: 0;
        right: 0;
        background: white; /* FIX : Simple et solide pour mobile (pas de transparence/blur) */
        border: 1px solid #dee2e6; /* FIX : Bordure simple */
        border-radius: 0 0 8px 8px; /* FIX : Coins arrondis légers */
        max-height: 50vh;
        overflow-y: auto;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* FIX : Ombre légère, pas surchargée */
        z-index: 1000;
        display: none;
    }
    #search-results li:hover {
        background: #f8f9fa; /* FIX : Hover simple pour mobile */
    }
    .search-hero {
        box-shadow: none; /* FIX : Pas d'ombre sur mobile pour simplicité */
        background: none; /* FIX : Pas de fond, simple container */
    }
}