/* Search presentation only, enqueued on the five public module archives. */
body.erc-module-search-page .erc-module-search {
    box-sizing:border-box;
    display:block;
    position:relative;
    min-width:0;
    max-width:100%;
    margin:0 0 30px;
    padding:24px;
    border:1px solid #e5eaf0;
    border-radius:14px;
    background:#fff;
    box-shadow:none;
    overflow:visible;
}
body.erc-module-search-page .erc-module-search .hp-form__header { margin:0 0 20px; }
body.erc-module-search-page .erc-module-search .erc-module-search__title {
    grid-column:1 / -1;
    margin:0 0 20px;
    padding:0;
    color:#183e64;
    font-size:1.25rem;
    font-weight:700;
    line-height:1.3;
    overflow-wrap:anywhere;
}
body.erc-module-search-page .erc-module-search .hp-form__header .erc-module-search__title { margin:0; }
body.erc-module-search-page .erc-module-search .hp-form__fields,
body.erc-module-search-page form.erc-local-directory__filters.erc-module-search {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    align-items:start;
    gap:18px;
}
body.erc-module-search-page .erc-module-search .hp-form__field {
    position:relative;
    flex:none;
    width:auto;
    min-width:0;
    margin:0;
    padding:0;
    border:0;
}
body.erc-module-search-page .erc-module-search :is(.hp-field__label, label > span) {
    display:block;
    position:static;
    width:auto;
    height:auto;
    margin:0 0 7px;
    padding:0;
    clip:auto;
    clip-path:none;
    overflow:visible;
    color:#344054;
    font-size:.875rem;
    font-weight:700;
    line-height:1.4;
}
body.erc-module-search-page .erc-module-search label { min-width:0; gap:0; }
/* Option captions are not field headings: keep each input and its caption
   together without changing names, checked values or native event handling. */
body.erc-module-search-page .hp-form--listing-filter.erc-module-search
    label:has(> input:is([type=checkbox], [type=radio])) {
    display:flex;
    align-items:flex-start;
    gap:8px;
    margin:0;
    padding:3px 0;
    font-size:.875rem;
    line-height:1.4;
    cursor:pointer;
}
body.erc-module-search-page .hp-form--listing-filter.erc-module-search
    label > input:is([type=checkbox], [type=radio]) {
    flex:0 0 16px;
    width:16px;
    height:16px;
    min-height:0;
    margin:2px 0 0;
}
body.erc-module-search-page .hp-form--listing-filter.erc-module-search
    label:has(> input:is([type=checkbox], [type=radio])) > span {
    flex:1;
    min-width:0;
    margin:0;
    font:inherit;
    line-height:1.4;
    overflow-wrap:anywhere;
}
body.erc-module-search-page .hp-form--listing-filter.erc-module-search
    :is(.hp-field--checkboxes, .hp-field--radio) li { margin-bottom:2px; }
body.erc-module-search-page .hp-form--listing-filter.erc-module-search
    :is(.hp-field--checkboxes, .hp-field--radio) ul ul { margin:3px 0 0 20px; }
body.erc-module-search-page .hp-form--listing-filter.erc-module-search .hp-form__fields { gap:14px; }
/* HivePress puts the status next to a span inside the label. Keep that span
   inline: making it a block adds a second line above optional controls. */
body.erc-module-search-page .erc-module-search .hp-form__field > .hp-field__label {
    display:flex;
    align-items:baseline;
    flex-wrap:nowrap;
    gap:.3em;
    min-height:1.4em;
    margin:0 0 7px;
}
body.erc-module-search-page .erc-module-search .hp-field__label > span {
    display:inline;
    margin:0;
    font:inherit;
    line-height:inherit;
}
body.erc-module-search-page .erc-module-search .hp-field__label > small {
    display:inline;
    flex:0 0 auto;
    margin:0;
    color:#526779;
    font-size:.75rem;
    font-weight:400;
    line-height:inherit;
    white-space:nowrap;
}
/* The main form already supplies the module heading. Keep the sidebar fields
   and live messages, but omit its duplicate heading only when both exist. */
body.erc-module-search-page:has(.hp-form--listing-search.erc-module-search)
    .hp-form--listing-filter.erc-module-search .erc-module-search__title { display:none; }
body.erc-module-search-page:has(.hp-form--listing-search.erc-module-search)
    .hp-form--listing-filter.erc-module-search .hp-form__header { margin-bottom:0; }
body.erc-module-search-page .erc-module-search :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]), select) {
    box-sizing:border-box;
    display:block;
    width:100%;
    min-width:0;
    max-width:100%;
    min-height:46px;
    margin:0;
    padding:10px 12px;
    border:1px solid #cbd5e1;
    border-radius:8px;
    background:#fff;
    color:#183e64;
    font:inherit;
    font-size:1rem;
    line-height:1.5;
}
body.erc-module-search-page .erc-module-search .select2-container { width:100% !important; min-width:0; }
body.erc-module-search-page .erc-module-search :is(.select2-selection--single, .select2-selection--multiple) {
    min-height:46px;
    border:1px solid #cbd5e1;
    border-radius:8px;
}
body.erc-module-search-page .erc-module-search .select2-selection--single .select2-selection__rendered { line-height:44px; }
body.erc-module-search-page .erc-module-search .select2-selection--single .select2-selection__arrow { height:44px; }
body.erc-module-search-page .erc-module-search .select2-selection--single {
    box-sizing:border-box;
    height:46px;
    padding:0 12px;
}
body.erc-module-search-page .erc-module-search .select2-selection--single .select2-selection__rendered {
    padding-top:0;
    padding-bottom:0;
}
body.erc-module-search-page .erc-module-search .hp-form__footer {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:18px;
    margin-top:20px;
    padding:0;
}
body.erc-module-search-page .erc-module-search :is(button[type=submit], input[type=submit]) {
    box-sizing:border-box;
    min-height:46px;
    max-width:100%;
    margin:0;
    padding:11px 24px;
    border:0;
    border-radius:8px;
    background:#075f7c;
    color:#fff;
    font:inherit;
    font-weight:700;
    line-height:1.5;
    white-space:normal;
    cursor:pointer;
}
body.erc-module-search-page .erc-module-search :is(button[type=submit], input[type=submit]):hover { background:#05465c; }
body.erc-module-search-page .erc-module-search :is(.erc-module-search__reset, .erc-local-directory__reset) {
    display:inline-flex;
    align-items:center;
    min-height:46px;
    max-width:100%;
    margin:0;
    color:#075f7c;
    font-weight:600;
    text-decoration:underline;
    text-underline-offset:3px;
    overflow-wrap:anywhere;
}
/* Replace the legacy pseudo-title and duplicate reset, preserving the native modal. */
body.erc-module-search-page:not(.erc-module-archive--evenements) .hp-widget--listing-filter:has(.erc-module-search) {
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    overflow:visible;
}
body.erc-module-search-page:not(.erc-module-archive--evenements) .hp-widget--listing-filter:has(.erc-module-search)::before,
body.erc-module-search-page .erc-module-search .erc-annonces-reset { display:none; }
body.erc-module-search-page .erc-module-search :is(a, button, input, select):focus-visible { outline:3px solid #267b96; outline-offset:3px; }
@media (max-width:991px) {
    body.erc-module-search-page .erc-module-search .hp-form__fields,
    body.erc-module-search-page form.erc-local-directory__filters.erc-module-search { grid-template-columns:repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
}
@media (max-width:600px) {
    body.erc-module-search-page .erc-module-search { padding:18px; }
    body.erc-module-search-page .erc-module-search .hp-form__fields,
    body.erc-module-search-page form.erc-local-directory__filters.erc-module-search { grid-template-columns:minmax(0, 1fr); }
    body.erc-module-search-page .erc-module-search .hp-form__footer { flex-direction:column; align-items:stretch; }
    body.erc-module-search-page .erc-module-search :is(button[type=submit], input[type=submit]) { width:100%; }
}
