/* ===== Barre de recherche globale ===== */

#rg-wrapper {
    position: absolute;
    bottom: 58px;
    left: 550px;
    right: 0px;

    margin: 0 auto;
    width: 340px;
    z-index: 200;
}

#rg-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 14px 7px 34px;
    border: 1px solid #aab06a;
    border-radius: 20px;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23889448" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 10px center;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

#rg-input:focus {
    border-color: #86934b;
    box-shadow: 0 0 0 3px rgba(134, 147, 75, .2);
}

#rg-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #aab06a;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
    max-height: 420px;
    overflow-y: auto;
    z-index: 300;
}

#rg-results.visible {
    display: block;
}

.rg-cat {
    padding: 4px 12px 2px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    background: #86934b;
}

.rg-item {
    display: block;
    padding: 7px 14px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f2e8;
    line-height: 1.3;
    transition: background .15s;
}

.rg-item:hover,
.rg-item.active {
    background: #dfe5c5;
    color: #333;
}

.rg-item span.rg-sous {
    display: block;
    font-size: 11px;
    color: #888;
}

.rg-empty {
    padding: 10px 14px;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* ===== Item info-bulle dans la recherche de navigation ===== */

.rg-item--info {
    cursor: help;
    display: block;
    padding: 7px 14px;
    color: #333;
    border-bottom: 1px solid #f0f2e8;
    line-height: 1.3;
    transition: background .15s;
    user-select: none;
}

.rg-item--info:hover {
    background: #dfe5c5;
}

.ns-info-icon {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #86934b;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: bold;
    text-align: center;
    line-height: 15px;
    margin-right: 5px;
    vertical-align: middle;
}

.ns-tooltip {
    background: #fffde8;
    border: 1px solid #c8b46a;
    border-radius: 6px;
    padding: 9px 30px 9px 12px;
    font-size: 12px;
    color: #444;
    line-height: 1.6;
    position: relative;
}

.ns-tooltip a {
    color: #5a7a2a;
    font-weight: bold;
    text-decoration: underline;
}

.ns-tooltip a:hover {
    color: #3a5a0a;
}

.ns-tooltip-close {
    position: absolute;
    top: 5px;
    right: 7px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #999;
    padding: 0;
    line-height: 1;
}

.ns-tooltip-close:hover {
    color: #333;
}

/* Mise en évidence des mots trouvés */
#ns-results mark,
#rg-results mark {
    background: #fff176;
    color: inherit;
    font-weight: bold;
    padding: 0 1px;
    border-radius: 2px;
}

/* Adaptation mobile */
@media (max-width: 760px) {

    #rg-wrapper,
    #ns-wrapper {
        position: static;
        transform: none;
        width: 100%;
        margin: 6px 0;
    }
}

/* ===== Recherche de navigation (pages) ===== */

#ns-wrapper {
    position: absolute;
    bottom: 58px;
    left: 200px;
    width: 300px;
    z-index: 200;
}

#ns-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 14px 7px 34px;
    border: 1px solid #8ca87a;
    border-radius: 20px;
    background: #f6f8ee url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="%23555" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>') no-repeat 10px center;
    font-size: 13px;
    color: #333;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

#ns-input:focus {
    border-color: #5a7a3a;
    box-shadow: 0 0 0 3px rgba(90, 122, 58, .18);
    background-color: #fff;
}

#ns-results {
    display: none;
    position: absolute;
    /* bottom: calc(100% + 4px); */
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #8ca87a;
    border-radius: 8px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .13);
    max-height: 380px;
    overflow-y: auto;
    z-index: 300;
}

#ns-results.visible {
    display: block;
}