/*
 * Discovery layer (P3): search bar, home sections, results, filters, cards. Mobile first; tokens only; no inline styles
 * (strict CSP): dynamic values (range slider) are CSS custom properties set from JavaScript.
 */

/* ---------- Search bar ---------- */
.sj-searchbar {
    display: grid;
    gap: var(--sj-space-2);
    padding: var(--sj-space-2);
    background: var(--sj-surface);
    border: 1px solid var(--sj-border);
    border-radius: var(--sj-radius-lg);
    box-shadow: var(--sj-shadow);
}

.sj-searchbar__field {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: var(--sj-space-2) var(--sj-space-3);
    border: 0;
    border-radius: var(--sj-radius);
    transition: background-color var(--sj-duration) var(--sj-ease);
}

.sj-searchbar__field:hover,
.sj-searchbar__field:focus-within { background: var(--sj-bg-subtle); }

.sj-searchbar__label {
    display: block;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    font-size: var(--sj-fs-xs);
    font-weight: var(--sj-fw-semibold);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--sj-text-muted);
}

.sj-searchbar__input {
    width: 100%;
    min-height: 32px;
    padding: 0;
    font: inherit;
    font-weight: var(--sj-fw-medium);
    color: var(--sj-text);
    background: transparent;
    border: 0;
    outline: none;
}

.sj-searchbar__input::placeholder { color: var(--sj-text-muted); opacity: 1; }

.sj-searchbar__field:focus-within { box-shadow: inset 0 0 0 2px var(--sj-brand); }

.sj-searchbar__dates {
    clear: left;
    display: flex;
    align-items: center;
    gap: var(--sj-space-2);
    color: var(--sj-text-muted);
}

.sj-searchbar__dates .sj-searchbar__input { min-width: 0; }

.sj-searchbar__summary {
    display: block;
    list-style: none;
    cursor: pointer;
}

.sj-searchbar__summary::-webkit-details-marker { display: none; }

.sj-searchbar__value {
    display: block;
    min-height: 32px;
    line-height: 32px;
    font-weight: var(--sj-fw-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sj-searchbar__submit {
    min-height: 52px;
    border-radius: var(--sj-radius);
}

@media (min-width: 992px) {
    .sj-searchbar {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 1fr) auto;
        align-items: stretch;
        padding: var(--sj-space-2);
        border-radius: var(--sj-radius-pill);
    }

    .sj-searchbar__field { padding-inline: var(--sj-space-5); border-radius: var(--sj-radius-pill); }
    /* Separator centred in the gap: a hovered field's background never touches it, on either side. */
    .sj-searchbar__field + .sj-searchbar__field::before {
        content: "";
        position: absolute;
        left: calc(var(--sj-space-2) / -2 - 0.5px);
        top: 25%;
        height: 50%;
        border-left: 1px solid var(--sj-border);
    }
    .sj-searchbar__submit { border-radius: var(--sj-radius-pill); padding-inline: var(--sj-space-6); }
}

.sj-searchbar--compact { box-shadow: none; }

@media (min-width: 992px) {
    .sj-searchbar--compact { padding: var(--sj-space-1); }
    .sj-searchbar--compact .sj-searchbar__field { padding-block: var(--sj-space-1); }
    .sj-searchbar--compact .sj-searchbar__submit { min-height: 44px; }
    .sj-searchbar--compact .sj-searchbar__submit-text { display: none; }
}

/* A legend renders on the fieldset border unless floated: align it with the other labels. */
legend.sj-searchbar__label { float: left; width: 100%; }

/* Flatpickr enhancement: one visible "dates" button replaces the two native inputs. */
.sj-datebutton {
    clear: left;
    display: block;
    width: 100%;
    min-height: 32px;
    padding: 0;
    font: inherit;
    font-weight: var(--sj-fw-medium);
    text-align: left;
    color: var(--sj-text);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.sj-datebutton[data-empty] { color: var(--sj-text-muted); }

/* ---------- Autocomplete ---------- */
.sj-suggest {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    left: 0;
    width: min(26rem, calc(100vw - 2 * var(--sj-gutter)));
    max-height: 22rem;
    overflow-y: auto;
    margin: 0;
    padding: var(--sj-space-2);
    list-style: none;
    background: var(--sj-surface);
    border: 1px solid var(--sj-border);
    border-radius: var(--sj-radius-lg);
    box-shadow: var(--sj-shadow-lg);
}

.sj-suggest__item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--sj-space-3);
    padding: var(--sj-space-2) var(--sj-space-3);
    border-radius: var(--sj-radius);
    cursor: pointer;
}

.sj-suggest__item[aria-selected="true"], .sj-suggest__item:hover { background: var(--sj-brand-subtle); }
.sj-suggest__name { font-weight: var(--sj-fw-semibold); }
.sj-suggest__name mark { padding: 0; background: none; color: var(--sj-brand); }
.sj-suggest__context { display: block; font-size: var(--sj-fs-sm); color: var(--sj-text-muted); }
.sj-suggest__count { font-size: var(--sj-fs-xs); color: var(--sj-text-muted); white-space: nowrap; }
.sj-suggest__heading { padding: var(--sj-space-2) var(--sj-space-3) var(--sj-space-1); font-size: var(--sj-fs-xs); font-weight: var(--sj-fw-semibold); letter-spacing: 0.04em; text-transform: uppercase; color: var(--sj-text-muted); }
.sj-suggest__empty { padding: var(--sj-space-3); font-size: var(--sj-fs-sm); color: var(--sj-text-muted); }

/* ---------- Popover (travellers) and steppers ---------- */
.sj-popover { position: static; }

.sj-popover__panel {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    gap: var(--sj-space-3);
    width: min(22rem, calc(100vw - 2 * var(--sj-gutter)));
    padding: var(--sj-space-4);
    background: var(--sj-surface);
    border: 1px solid var(--sj-border);
    border-radius: var(--sj-radius-lg);
    box-shadow: var(--sj-shadow-lg);
}

@media (max-width: 991.98px) {
    .sj-popover__panel { left: 0; right: auto; }
}

.sj-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sj-space-3);
}

.sj-stepper__label { display: grid; font-weight: var(--sj-fw-medium); }
.sj-stepper__label .sj-muted { font-size: var(--sj-fs-sm); font-weight: var(--sj-fw-regular); }

.sj-stepper__input {
    width: 4.5rem;
    min-height: var(--sj-tap);
    font: inherit;
    text-align: center;
    border: 1px solid var(--sj-border-strong);
    border-radius: var(--sj-radius);
}

.sj-stepper__controls { display: inline-flex; align-items: center; gap: var(--sj-space-3); }
.sj-stepper__controls .sj-stepper__input { width: 2.5rem; border: 0; padding: 0; appearance: textfield; -moz-appearance: textfield; }
.sj-stepper__controls .sj-stepper__input::-webkit-inner-spin-button,
.sj-stepper__controls .sj-stepper__input::-webkit-outer-spin-button { appearance: none; margin: 0; }

.sj-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sj-tap);
    height: var(--sj-tap);
    padding: 0;
    font: inherit;
    color: var(--sj-text);
    background: var(--sj-surface);
    border: 1px solid var(--sj-border-strong);
    border-radius: var(--sj-radius-pill);
    cursor: pointer;
}

.sj-iconbtn:hover:not([disabled]) { border-color: var(--sj-text); }
.sj-iconbtn[disabled] { opacity: 0.35; cursor: not-allowed; }
.sj-iconbtn:focus-visible { outline: none; box-shadow: var(--sj-focus-ring); }

.sj-switch {
    display: flex;
    align-items: center;
    gap: var(--sj-space-3);
    min-height: var(--sj-tap);
    cursor: pointer;
}

.sj-switch input {
    flex-shrink: 0;
    width: 2.75rem;
    height: 1.5rem;
    appearance: none;
    background: var(--sj-border-strong);
    border-radius: var(--sj-radius-pill);
    position: relative;
    cursor: pointer;
    transition: background-color var(--sj-duration) var(--sj-ease);
}

.sj-switch input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(1.5rem - 6px);
    height: calc(1.5rem - 6px);
    background: var(--sj-surface);
    border-radius: 50%;
    transition: transform var(--sj-duration) var(--sj-ease);
}

.sj-switch input:checked { background: var(--sj-brand); }
.sj-switch input:checked::after { transform: translateX(1.25rem); }
.sj-switch input:focus-visible { outline: none; box-shadow: var(--sj-focus-ring); }

.js .sj-popover__close { display: inline-flex; }

/* ---------- Sections ---------- */
.sj-section--subtle { background: var(--sj-bg-subtle); }
.sj-section__head { margin-bottom: var(--sj-space-5); }
.sj-section__head h2 { margin-bottom: var(--sj-space-1); }
.sj-section__head p { margin: 0; }
.sj-results__grid {
    display: grid;
    gap: var(--sj-space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---------- Results page ---------- */
.sj-searchhead {
    position: sticky;
    top: var(--sj-header-h);
    z-index: 50;
    padding-block: var(--sj-space-2);
    background: var(--sj-header-bg);
    border-bottom: 1px solid var(--sj-border);
    backdrop-filter: saturate(180%) blur(8px);
}

.sj-searchhead__summary {
    display: none;
    align-items: center;
    gap: var(--sj-space-3);
    width: 100%;
    min-height: 52px;
    padding: var(--sj-space-2) var(--sj-space-4);
    font: inherit;
    text-align: left;
    color: var(--sj-text);
    background: var(--sj-surface);
    border: 1px solid var(--sj-border-strong);
    border-radius: var(--sj-radius-pill);
    box-shadow: var(--sj-shadow-sm);
    cursor: pointer;
}

.sj-searchhead__summary > span { display: grid; min-width: 0; font-size: var(--sj-fs-sm); line-height: 1.3; }
.sj-searchhead__summary strong, .sj-searchhead__summary .sj-muted { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 991.98px) {
    /* Mobile: compact summary, tap to edit (the form expands below it). */
    .js .sj-searchhead__summary { display: flex; }
    .js .sj-searchhead__form { display: none; padding-top: var(--sj-space-2); }
    .js .sj-searchhead[data-open] .sj-searchhead__form { display: block; }
}

.sj-results-layout {
    display: grid;
    gap: var(--sj-space-5);
    padding-block: var(--sj-space-4) var(--sj-space-7);
}

@media (min-width: 992px) {
    .sj-results-layout { grid-template-columns: 18.5rem minmax(0, 1fr); gap: var(--sj-space-6); align-items: start; }
}

.sj-results-actions { display: none; gap: var(--sj-space-2); }
.js .sj-results-actions { display: flex; }

@media (min-width: 992px) {
    .js .sj-results-actions { display: none; }
}

.sj-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.35rem;
    font-size: var(--sj-fs-xs);
    color: var(--sj-brand-contrast);
    background: var(--sj-brand);
    border-radius: var(--sj-radius-pill);
}

.sj-results__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sj-space-3);
    margin-bottom: var(--sj-space-4);
}

.sj-results__title { margin: 0 0 var(--sj-space-1); font-size: var(--sj-fs-2xl); }
.sj-results__count { margin: 0; color: var(--sj-text-muted); }
.sj-results__count strong { color: var(--sj-text); }
.js .sj-results__sort { display: none; }

@media (min-width: 992px) {
    .js .sj-results__sort { display: block; }
}

.sj-results__active { margin-bottom: var(--sj-space-4); }
.sj-results__disclaimer { margin: 0 0 var(--sj-space-4); font-size: var(--sj-fs-sm); }
.sj-results .sj-alert { margin-bottom: var(--sj-space-4); }

.sj-results__grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: var(--sj-space-6) var(--sj-space-5); }
.sj-results__grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }

[data-role="results"][aria-busy="true"] .sj-results__grid { opacity: 0.45; transition: opacity var(--sj-duration) var(--sj-ease); }

.sj-chip--removable { gap: var(--sj-space-1); text-decoration: none; }
.sj-chip--removable .sj-icon { width: 0.75em; height: 0.75em; }

/* Sort menu */
.sj-menu { position: relative; }
.sj-menu > summary { list-style: none; }
.sj-menu > summary::-webkit-details-marker { display: none; }

.sj-menu__list {
    position: absolute;
    z-index: 40;
    right: 0;
    top: calc(100% + 6px);
    min-width: 13rem;
    margin: 0;
    padding: var(--sj-space-2);
    list-style: none;
    background: var(--sj-surface);
    border: 1px solid var(--sj-border);
    border-radius: var(--sj-radius-lg);
    box-shadow: var(--sj-shadow-lg);
}

.sj-results-actions .sj-menu__list { left: 0; right: auto; }

.sj-menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sj-space-3);
    min-height: var(--sj-tap);
    padding: 0 var(--sj-space-3);
    color: var(--sj-text);
    text-decoration: none;
    border-radius: var(--sj-radius);
}

.sj-menu__item:hover { background: var(--sj-bg-subtle); color: var(--sj-text); }
.sj-menu__item[aria-current="true"] { font-weight: var(--sj-fw-semibold); color: var(--sj-brand); }

/* Pagination / empty state */
.sj-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sj-space-3) var(--sj-space-5);
    margin-top: var(--sj-space-7);
    text-align: center;
}

.sj-pagination__status { width: 100%; margin: 0; font-size: var(--sj-fs-sm); }

.sj-empty {
    display: grid;
    justify-items: center;
    gap: var(--sj-space-2);
    padding: var(--sj-space-7) var(--sj-space-4);
    text-align: center;
    background: var(--sj-bg-subtle);
    border-radius: var(--sj-radius-lg);
}

.sj-empty__icon { width: 2.5rem; height: 2.5rem; color: var(--sj-brand); }
.sj-empty__title { font-size: var(--sj-fs-xl); margin: var(--sj-space-2) 0 0; }
.sj-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sj-space-2); margin: var(--sj-space-3) 0 0; padding: 0; list-style: none; }

/* ---------- Filters: a column on desktop, a bottom sheet (dialog) on mobile ---------- */
.sj-filters {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
}

/* Desktop, or no JavaScript: the dialog is shown inline as a normal column. */
.sj-filters:not([open]) { display: block; position: static; }


@media (max-width: 991.98px) {
    .js .sj-filters:not([open]) { display: none; }

    .sj-filters[open] {
        position: fixed;
        inset: auto 0 0 0;
        width: 100%;
        height: min(92vh, 100%);
        max-height: none;
        background: var(--sj-surface);
        border-radius: var(--sj-radius-lg) var(--sj-radius-lg) 0 0;
        box-shadow: var(--sj-shadow-lg);
        animation: sj-sheet-in 220ms var(--sj-ease);
    }

    .sj-filters::backdrop { background: var(--sj-overlay); }
    .sj-filters[open] .sj-filters__form { height: 100%; }
}

@keyframes sj-sheet-in {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.sj-filters__form { display: flex; flex-direction: column; }

.sj-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--sj-space-2);
}

.sj-filters__title { margin: 0; font-size: var(--sj-fs-xl); }
.sj-filters__head .sj-iconbtn { display: none; }

.sj-filters__body { flex: 1 1 auto; }

.sj-filters__foot .sj-btn { white-space: nowrap; }

.sj-filters__foot {
    display: flex;
    justify-content: space-between;
    gap: var(--sj-space-3);
    padding-top: var(--sj-space-4);
}

/* With JavaScript on desktop, the results follow the form live: no apply button needed. */
@media (min-width: 992px) {
    .js .sj-filters__foot [data-role="apply"] { display: none; }
}

@media (max-width: 991.98px) {
    .sj-filters[open] .sj-filters__head { padding: var(--sj-space-4) var(--sj-space-4) var(--sj-space-2); border-bottom: 1px solid var(--sj-border); }
    .sj-filters[open] .sj-filters__head .sj-iconbtn { display: inline-flex; }
    .sj-filters[open] .sj-filters__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sj-space-4); }
    .sj-filters[open] .sj-filters__foot { padding: var(--sj-space-3) var(--sj-space-4) calc(var(--sj-space-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--sj-border); background: var(--sj-surface); }
    .sj-filters[open] .sj-filters__foot [data-role="apply"] { flex: 1; }
}

.sj-filter {
    min-width: 0;
    margin: 0;
    padding: var(--sj-space-4) 0;
    border: 0;
    border-bottom: 1px solid var(--sj-border);
}

.sj-filter__legend {
    float: left;
    width: 100%;
    margin-bottom: var(--sj-space-3);
    font-size: var(--sj-fs-md);
    font-weight: var(--sj-fw-semibold);
}

.sj-filter__legend + * { clear: left; }

.sj-filter__more { margin-top: var(--sj-space-3); }
.sj-filter__more > summary { cursor: pointer; font-size: var(--sj-fs-sm); font-weight: var(--sj-fw-semibold); color: var(--sj-brand); margin-bottom: var(--sj-space-3); }

/* Checkbox/radio inputs presented as chips (real form controls: keyboard and screen readers work natively). */
.sj-chipbox {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* .sj-chip--locked: the page's own criterion without a panel chip (locked capacity, D-99), styled as a selected chip. */
.sj-chipbox:checked + .sj-chip,
.sj-chip--locked {
    background: var(--sj-brand-subtle);
    border-color: var(--sj-brand);
    color: var(--sj-brand-active);
}

.sj-chipbox:focus-visible + .sj-chip { box-shadow: var(--sj-focus-ring); }
.sj-chipbox:disabled + .sj-chip { opacity: 0.4; cursor: not-allowed; }
/* The page's own criterion (envie page, D-99): applied and fixed — shown as selected, not as unavailable. */
.sj-chipbox:checked:disabled + .sj-chip { opacity: 1; cursor: default; }
.sj-chip--locked { gap: var(--sj-space-1); cursor: default; }
.sj-chip.sj-chip--locked .sj-icon { width: 0.875em; height: 0.875em; color: currentColor; }
.sj-chip__count { font-size: var(--sj-fs-xs); font-weight: var(--sj-fw-regular); color: var(--sj-text-muted); }
.sj-chip .sj-icon { color: var(--sj-text-muted); }
.sj-filter .sj-chip { min-height: 36px; padding-inline: var(--sj-space-3); }

/* ---------- Dual-handle price slider ---------- */
.sj-range__histogram { display: block; width: 100%; height: 40px; }
.sj-range__histogram rect { fill: var(--sj-border-strong); opacity: 0.35; }
.sj-range__histogram rect[data-in] { fill: var(--sj-brand); opacity: 0.55; }

.sj-range {
    --lo: 0%;
    --hi: 100%;
    position: relative;
    height: 28px;
    margin-top: -6px;
}

.sj-range::before, .sj-range::after {
    content: "";
    position: absolute;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
}

.sj-range::before { left: 0; right: 0; background: var(--sj-border); }
.sj-range::after { left: var(--lo); right: calc(100% - var(--hi)); background: var(--sj-brand); }

.sj-range__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 28px;
    margin: 0;
    background: none;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    z-index: 1;
}

.sj-range__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--sj-surface);
    border: 2px solid var(--sj-brand);
    border-radius: 50%;
    box-shadow: var(--sj-shadow-sm);
    cursor: grab;
    pointer-events: auto;
}

.sj-range__input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--sj-surface);
    border: 2px solid var(--sj-brand);
    border-radius: 50%;
    cursor: grab;
    pointer-events: auto;
}

.sj-range__input::-moz-range-track { background: none; }
.sj-range__input:focus-visible { outline: none; }
.sj-range__input:focus-visible::-webkit-slider-thumb { box-shadow: var(--sj-focus-ring); }
.sj-range__input:focus-visible::-moz-range-thumb { box-shadow: var(--sj-focus-ring); }

.sj-range__values { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sj-space-3); margin-top: var(--sj-space-3); }
.sj-range__field { display: grid; gap: var(--sj-space-1); font-size: var(--sj-fs-xs); color: var(--sj-text-muted); }
.sj-range__money { display: flex; align-items: center; gap: var(--sj-space-1); color: var(--sj-text); }
.sj-range__money .sj-input { min-height: 40px; }

/* ---------- Accommodation card ---------- */
.sj-acard {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sj-acard__media { position: relative; }
.sj-acard__media .sj-media { border-radius: var(--sj-radius-lg); }
.sj-acard__media img { transition: transform 400ms var(--sj-ease); }
.sj-acard:hover .sj-acard__media img { transform: scale(1.03); }
.sj-acard__nophoto { display: grid; place-items: center; font-size: 2rem; color: var(--sj-border-strong); }

.sj-acard__badge {
    position: absolute;
    top: var(--sj-space-3);
    left: var(--sj-space-3);
    box-shadow: var(--sj-shadow-sm);
}

.sj-acard__body {
    display: flex;
    flex-direction: column;
    gap: var(--sj-space-1);
    flex: 1;
    padding: var(--sj-space-3) var(--sj-space-1) 0;
}

.sj-acard__kicker { margin: 0; font-size: var(--sj-fs-sm); color: var(--sj-text-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.sj-acard__title {
    margin: 0;
    font-size: var(--sj-fs-md);
    font-weight: var(--sj-fw-semibold);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sj-acard__link { color: inherit; text-decoration: none; }
/* The whole card is clickable through the title link (one link per card, readable by screen readers). */
.sj-acard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--sj-radius-lg); }
.sj-acard__link:focus-visible { outline: none; }
.sj-acard__link:focus-visible::after { box-shadow: var(--sj-focus-ring); }

.sj-acard__facts { margin: 0; font-size: var(--sj-fs-sm); color: var(--sj-text-muted); }

.sj-acard__features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sj-space-1) var(--sj-space-3);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--sj-fs-xs);
    color: var(--sj-text-muted);
}

.sj-acard__features li { display: inline-flex; align-items: center; gap: var(--sj-space-1); }

.sj-acard__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sj-space-1) var(--sj-space-3);
    margin-top: auto;
    padding-top: var(--sj-space-2);
}

.sj-acard__rating { display: inline-flex; align-items: center; gap: var(--sj-space-1); margin: 0; font-size: var(--sj-fs-sm); font-weight: var(--sj-fw-semibold); }
.sj-acard__rating .sj-icon { color: var(--sj-text); }

.sj-acard__price { margin: 0 0 0 auto; text-align: right; font-size: var(--sj-fs-sm); line-height: 1.35; }
.sj-acard__price strong { font-size: var(--sj-fs-lg); color: var(--sj-text); }
.sj-acard__pernight { display: block; font-size: var(--sj-fs-xs); }

/* ---------- Flatpickr theming (tokens; scoped: the library stylesheet loads after ours) ---------- */
.sj-datesheet .flatpickr-calendar {
    font-family: var(--sj-font-ui);
    border-radius: var(--sj-radius-lg);
    box-shadow: var(--sj-shadow-lg);
    border: 1px solid var(--sj-border);
}

.sj-datesheet .flatpickr-day.selected, .sj-datesheet .flatpickr-day.startRange, .sj-datesheet .flatpickr-day.endRange, .sj-datesheet .flatpickr-day.selected:hover, .sj-datesheet .flatpickr-day.startRange:hover, .sj-datesheet .flatpickr-day.endRange:hover {
    background: var(--sj-brand);
    border-color: var(--sj-brand);
}

.sj-datesheet .flatpickr-day.inRange { background: var(--sj-brand-subtle); border-color: var(--sj-brand-subtle); box-shadow: -5px 0 0 var(--sj-brand-subtle), 5px 0 0 var(--sj-brand-subtle); }
.sj-datesheet .flatpickr-day.today { border-color: var(--sj-border-strong); }
.sj-datesheet .flatpickr-day.flatpickr-disabled, .sj-datesheet .flatpickr-day.flatpickr-disabled:hover { color: rgba(20, 33, 61, 0.25); }
/* Not a possible departure for the chosen arrival: looks inactive, still lets the range cross it (date-sheet.js). */
.sj-datesheet .flatpickr-day.sj-day--unavailable, .sj-datesheet .flatpickr-day.sj-day--unavailable:hover { color: rgba(20, 33, 61, 0.25); font-weight: var(--sj-fw-regular); cursor: default; }
.sj-datesheet .flatpickr-day.sj-day--unavailable:not(.inRange):hover { background: transparent; border-color: transparent; }

.sj-datesheet {
    width: min(42rem, 100vw);
    max-width: 100vw;
    padding: 0;
    border: 0;
    border-radius: var(--sj-radius-lg);
    box-shadow: var(--sj-shadow-lg);
}

.sj-datesheet::backdrop { background: var(--sj-overlay); }
.sj-datesheet__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sj-space-4) var(--sj-space-4) var(--sj-space-2); }
.sj-datesheet__head h2 { margin: 0; font-size: var(--sj-fs-lg); }
.sj-datesheet__status { margin: 0; padding: 0 var(--sj-space-4); font-size: var(--sj-fs-sm); color: var(--sj-text-muted); min-height: 1.5em; }
.sj-datesheet__quick { padding: var(--sj-space-2) var(--sj-space-4); }
.sj-datesheet__calendar { display: flex; justify-content: center; padding: var(--sj-space-2); }
.sj-datesheet__calendar .flatpickr-calendar { box-shadow: none; border: 0; }
.sj-datesheet__foot { display: flex; justify-content: space-between; gap: var(--sj-space-3); padding: var(--sj-space-3) var(--sj-space-4) var(--sj-space-4); border-top: 1px solid var(--sj-border); }

@media (max-width: 767.98px) {
    .sj-datesheet[open] { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; border-radius: var(--sj-radius-lg) var(--sj-radius-lg) 0 0; }
}

/* Without JavaScript the handles cannot move: the min/max fields remain. */
html:not(.js) .sj-range { display: none; }

/* ---------- Geography / theme / landing pages (P6) ---------- */
.sj-hub { padding-block: var(--sj-space-4) var(--sj-space-7); }
.sj-hub__preview { margin-block: var(--sj-space-3) 0; }
.sj-hub__head { margin-block: var(--sj-space-4) var(--sj-space-5); max-width: 72ch; }
.sj-hub__title { margin: 0 0 var(--sj-space-3); font-size: var(--sj-fs-2xl); line-height: var(--sj-lh-tight); }
.sj-hub__summary { margin: 0; color: var(--sj-text); }
.sj-hub__intro { margin-top: var(--sj-space-4); }
.sj-hub__search { margin-bottom: var(--sj-space-4); }
/* Envie page (D-99): the search head follows the introduction closely — the visitor reaches the listings fast. */
.sj-envie { padding-bottom: 0; }
.sj-envie .sj-hub__head { margin-bottom: var(--sj-space-4); }
.sj-hub__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--sj-space-3);
    margin-bottom: var(--sj-space-5);
}
.sj-hub__chips { min-width: 0; margin: 0; padding: 0; border: 0; }
.sj-hub__label {
    margin-bottom: var(--sj-space-2);
    font-size: var(--sj-fs-sm);
    font-weight: var(--sj-fw-semibold);
    color: var(--sj-text-muted);
}
.sj-hub__body { margin-block: var(--sj-space-6); max-width: 72ch; }
.sj-hub__section { margin-top: var(--sj-space-6); }
.sj-hub__section h2 { margin-bottom: var(--sj-space-3); font-size: var(--sj-fs-xl); }
.sj-hub__places, .sj-hub__links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    gap: var(--sj-space-2) var(--sj-space-4);
    padding: 0;
    margin: 0;
    list-style: none;
}
.sj-hub__places li, .sj-hub__links li { display: flex; justify-content: space-between; gap: var(--sj-space-2); min-height: var(--sj-tap); align-items: center; border-bottom: 1px solid var(--sj-border); }
.sj-hub__note { margin-top: var(--sj-space-6); font-size: var(--sj-fs-sm); }

@media (min-width: 768px) {
    .sj-hub__title { font-size: var(--sj-fs-3xl); }
}
