/* Recherche site — coquille index.htm */

.site-search {
    position: relative;
    z-index: 25;
    width: min(96%, 72rem);
    max-width: 72rem;
    margin: 0.35rem auto 0.25rem;
    box-sizing: border-box;
}

.site-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 1px solid #084586;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.95);
    color: #084586;
    cursor: pointer;
    flex: 0 0 auto;
}

.site-search-toggle:hover,
.site-search-toggle:focus-visible {
    background: #eef4fb;
    outline: 2px solid #084586;
    outline-offset: 1px;
}

.site-search-toggle-icon {
    display: block;
}

.site-search-panel {
    display: none;
}

.site-search--open .site-search-panel {
    display: block;
}

.site-search--open .site-search-toggle {
    background: #084586;
    color: #fff;
}

.site-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.site-search-label {
    flex: 0 0 auto;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #084586;
    white-space: nowrap;
}

.site-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid #084586;
    border-radius: 4px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.95rem;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.95);
}

.site-search-input:focus-visible {
    outline: 3px solid #084586;
    outline-offset: 1px;
}

@media (min-width: 901px) {
    .site-search {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.35rem;
        margin: 0.05rem 0 0.1rem 0.35rem;
    }

    .site-search--open .site-search-panel {
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-search-form {
        gap: 0.35rem;
    }

    .site-search-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .site-search-input {
        padding: 0.2rem 0.45rem;
        font-size: 0.82rem;
        line-height: 1.25;
        min-height: 1.65rem;
    }
}

.site-search-results {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0;
    right: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    max-height: 24rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #084586;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(8, 69, 134, 0.18);
}

.site-search-summary {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e8eef5;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #084586;
    background: #f0f5fb;
}

.site-search-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.site-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-search-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-bottom: 1px solid #e8eef5;
    background: transparent;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.site-search-item:last-child {
    border-bottom: 0;
}

.site-search-item:hover,
.site-search-item:focus-visible {
    background: #eef4fb;
    outline: none;
}

.site-search-item-title {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #084586;
}

.site-search-item-meta {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.78rem;
    color: #555;
}

.site-search-item-snippet {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #333;
    margin-top: 0.15rem;
}

.site-search-mark {
    background: #fff3a8;
    color: inherit;
    padding: 0 0.1em;
    border-radius: 2px;
    font-weight: 600;
}

.site-search-more {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.4rem 0.75rem;
    border-top: 1px solid #e8eef5;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.75rem;
    color: #555;
    background: #f8fafc;
    text-align: center;
}

.site-search-empty {
    margin: 0;
    padding: 0.75rem;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.9rem;
    color: #555;
}

@media (max-width: 900px) {
    .site-search {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        width: 98%;
        margin-top: 0.15rem;
        margin-bottom: 0.1rem;
    }

    .site-search--open {
        flex-wrap: wrap;
    }

    .site-search--open .site-search-panel {
        flex: 1 1 100%;
        order: 2;
    }

    .site-search--open .site-search-results {
        left: 0;
        right: 0;
    }

    .site-search-label {
        display: none;
    }
}
