/* Recherche : champ, suggestions et résultats */
.rch { position: relative; }
.rch-champ { position: relative; }
.rch-champ .form-control { padding-left: 3rem; padding-right: 8.5rem; }
.rch-loupe { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: #097db2; z-index: 1; }
.rch-ok { position: absolute; right: .35rem; top: .35rem; bottom: .35rem; padding: 0 1.1rem; }
.rch-liste { margin-top: .5rem; border: 1px solid #e3edf3; border-radius: 16px; overflow: hidden; background: #fff; }
.rch-page .rch-liste { position: absolute; left: 0; right: 0; z-index: 1020; box-shadow: 0 8px 28px rgba(0, 0, 0, .15); }
.rch-item { display: flex; align-items: center; gap: .8rem; padding: .5rem .9rem; color: inherit; text-decoration: none; min-width: 0; }
.rch-item + .rch-item { border-top: 1px solid #f0f4f7; }
.rch-item:hover, .rch-item[aria-selected="true"] { background: #eef6fb; color: inherit; }
.rch-item img, .rch-item .rch-vide { flex: 0 0 34px; width: 34px; height: 48px; object-fit: cover; border-radius: 5px; }
.rch-item .rch-vide { display: flex; align-items: center; justify-content: center; background: #f2f6fa; color: #9db8c8; }
.rch-item .rch-texte { flex: 1; min-width: 0; }
.rch-item .rch-texte b, .rch-item .rch-texte small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rch-item .rch-texte small { color: #6c757d; }
.rch-type { flex: none; font-size: .72rem; color: #097db2; background: #eef6fb; border-radius: 999px; padding: .1rem .55rem; }
.rch-tout { justify-content: center; color: #097db2; font-weight: 600; }
.rch mark, .rch-page mark { padding: 0; background: #fff0c2; color: inherit; border-radius: 2px; }
@media (min-width: 768px) {
    #rechercheModal .modal-dialog { margin-top: 5vh; }
    .rch-onglets { flex-wrap: wrap; }
}
@media (max-width: 767.98px) {
    #rechercheModal .modal-content { border-radius: 0 !important; }
}

.rch-onglets { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
.rch-onglets::-webkit-scrollbar { display: none; }
.rch-onglets a { flex: none; padding: .35rem .9rem; border: 1px solid #cfe3ee; border-radius: 999px; text-decoration: none; color: #097db2; white-space: nowrap; }
.rch-onglets a:hover { background: #eef6fb; }
.rch-onglets a.actif { background: #097db2; border-color: #097db2; color: #fff; }
.rch-onglets small { opacity: .75; }
.rch-groupe { margin-top: 2rem; }
.rch-groupe > h2 { font-size: 1.25rem; color: #097db2; font-family: "ptserif"; }
.rch-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.5rem; }
.rch-ligne { display: flex; gap: 1rem; padding: .85rem 0; border-top: 1px solid #edf2f5; }
.rch-ligne:first-of-type { border-top: 0; }
@media (min-width: 768px) {
    /* fiches sur 2 puis 3 colonnes, passages et citations sur 2 : une ligne de texte reste lisible */
    .rch-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; margin-top: .75rem; }
    .rch-ligne, .rch-ligne:first-of-type { padding: .9rem; border: 1px solid #e6eef3; border-radius: 16px; background: #fff; }
    .rch-ligne:hover { border-color: #b9d8e8; }
}
@media (min-width: 1200px) {
    .rch-grille:not(.large) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.rch-ligne .rch-img { flex: 0 0 60px; width: 60px; height: 88px; border-radius: 8px; object-fit: cover; box-shadow: 0 1px 5px rgba(0, 0, 0, .18); }
.rch-ligne .rch-img.rond { height: 60px; border-radius: 50%; }
.rch-ligne .rch-img.vide { display: flex; align-items: center; justify-content: center; background: #f2f6fa; color: #b5c9d6; box-shadow: none; font-size: 1.4rem; }
.rch-ligne .rch-corps { flex: 1; min-width: 0; }
.rch-ligne .rch-titre { font-family: "ptserif"; font-weight: bold; font-size: 1.1rem; color: #212529; text-decoration: none; }
.rch-ligne .rch-titre:hover { color: #097db2; }
.rch-ligne .rch-sous { color: #6c757d; }
.rch-ligne .rch-extrait { margin: .25rem 0 0; color: #444; }
.rch-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.rch-actions a { font-size: .82rem; padding: .12rem .7rem; border: 1px solid #cfe3ee; border-radius: 999px; text-decoration: none; color: #097db2; }
.rch-actions a:hover { background: #eef6fb; }
@media (max-width: 575.98px) {
    .rch-champ .form-control { padding-right: 3.4rem; font-size: 1.05rem; }
    .rch-ok { width: 2.6rem; padding: 0; font-size: 0; }
    .rch-ok::after { content: "→"; font-size: 1.2rem; }
    .rch-type { display: none; }
}
