/* Moteur de recherche hôtels (accueil, liste, fiche) — arrondi 5px conservé */
.se-home {
    --se-radius: 5px;
    --se-accent: #a83489;
    --se-accent-dark: #8e2b73;
    --se-accent-soft: #fbeef7;
    --se-navy: #00315b;
    --se-text: #1f1f24;
    --se-muted: #6b6b73;
    --se-line: #dcdce2;
    --se-hover: #f5f5f7;
    --se-danger: #d6293e;
    --se-shadow-pop: 0 18px 44px -10px rgba(0, 49, 91, .32), 0 2px 6px rgba(0, 49, 91, .06);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border-radius: var(--se-radius);
    box-shadow: 0 24px 60px -16px rgba(0, 49, 91, .35);
    font-family: 'Rethink Sans', sans-serif;
    color: var(--se-text);
}
.se-home *, .se-home *::before, .se-home *::after { box-sizing: border-box; }
.se-home button { font-family: inherit; }
.se-home [hidden] { display: none !important; }

/* En-tête */
.se-head { display: flex; flex-direction: column; gap: 6px; }
.se-kicker {
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: var(--se-radius);
    background: var(--se-accent-soft);
    color: var(--se-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.se-title { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.25; color: var(--se-navy); letter-spacing: -.01em; }

/* Groupe fusionné : un seul cadre, champs séparés par un trait fin */
.se-group {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--se-line);
    border-radius: var(--se-radius);
}
.se-group > .se-block + .se-block { border-top: 1px solid var(--se-line); }
.se-block { position: relative; display: flex; flex-direction: column; }
.se-cell { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.se-label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--se-muted);
    cursor: inherit;
}
.se-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 10px 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--se-navy);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}
.se-group > .se-block:first-child .se-control { border-radius: var(--se-radius) var(--se-radius) 0 0; }
.se-group > .se-block:last-child .se-control { border-radius: 0 0 var(--se-radius) var(--se-radius); }
.se-control:hover { background: #fafafb; }
.se-block.is-active .se-control,
.se-control:focus-within,
.se-control:focus-visible {
    outline: none;
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--se-accent);
}
.se-block.has-error .se-control { box-shadow: inset 0 0 0 2px var(--se-danger); }
.se-ico { flex: none; width: 17px; height: 17px; fill: #8a8a94; }
.se-block.is-active .se-ico, .se-control:focus-within .se-ico { fill: var(--se-accent); }
.se-caret { flex: none; width: 12px; height: 12px; margin-left: auto; fill: var(--se-muted); transition: transform .2s; }
.se-block.is-active .se-caret { transform: rotate(180deg); }
.se-error { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; font-size: 13px; font-weight: 500; color: var(--se-danger); }
.se-error::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--se-danger); color: #fff; font-size: 11px; font-weight: 700; }

/* Destination */
.se-control-input { cursor: text; }
.se-input {
    flex: 1;
    min-width: 0;
    height: 24px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--se-navy);
    font: inherit;
    text-overflow: ellipsis;
}
.se-input::placeholder { color: #9b9ba3; font-weight: 500; }
.se-clear {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--se-hover);
    cursor: pointer;
}
.se-clear svg { width: 10px; height: 10px; fill: var(--se-muted); }
.se-clear:hover { background: #e9e9ee; }

/* Popovers */
.se-pop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 50;
    width: 100%;
    background: #fff;
    border-radius: var(--se-radius);
    box-shadow: var(--se-shadow-pop);
    animation: se-pop-in .16s ease-out;
}
@keyframes se-pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.se-sheet-head { display: none; }
.se-pop-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid #eeeef2;
}
.se-btn-primary {
    flex: none;
    padding: 10px 22px;
    border: 0;
    border-radius: var(--se-radius);
    background: var(--se-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.se-btn-primary:hover { background: var(--se-accent-dark); }
.se-btn-primary:disabled { background: #d9c3d3; cursor: not-allowed; }

/* Autocomplete */
.se-ac { max-height: 380px; overflow-y: auto; padding: 8px; }
.se-ac-group { padding: 10px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--se-muted); }
.se-ac-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--se-radius); cursor: pointer; }
.se-ac-item:hover, .se-ac-item.is-active { background: var(--se-hover); }
.se-ac-item.is-active { box-shadow: inset 3px 0 0 var(--se-accent); }
.se-ac-ico { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--se-radius); background: var(--se-accent-soft); }
.se-ac-ico svg { width: 15px; height: 15px; fill: var(--se-accent); }
.se-ac-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.se-ac-title { font-size: 15px; font-weight: 600; color: var(--se-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-ac-title mark { padding: 0; background: none; color: var(--se-accent); }
.se-ac-sub { font-size: 12px; color: var(--se-muted); }
.se-ac-empty { display: flex; align-items: center; gap: 10px; padding: 16px 12px; font-size: 14px; color: var(--se-muted); }
.se-spinner { width: 16px; height: 16px; border: 2px solid #e3d0de; border-top-color: var(--se-accent); border-radius: 50%; animation: se-spin .7s linear infinite; }
@keyframes se-spin { to { transform: rotate(360deg); } }

/* Dates : deux cellules Arrivée | Départ, badge du nombre de nuits posé sur le séparateur */
.se-dates-trigger { padding: 0; gap: 0; align-items: stretch; }
.se-date-part { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 16px; line-height: 1.2; }
.se-date-part[data-part="in"] { padding-right: 38px; }
.se-date-part[data-part="out"] { border-left: 1px solid var(--se-line); padding-left: 38px; }
.se-date-cap { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--se-muted); }
.se-date-val { font-size: 16px; font-weight: 600; color: var(--se-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-nights-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
    padding: 2px 7px;
    border: 1px solid var(--se-line);
    border-radius: var(--se-radius);
    background: #fff;
    color: var(--se-muted);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.se-block.is-active .se-nights-badge { border-color: var(--se-accent); color: var(--se-accent); }

.se-cal { width: 640px; }
.se-cal-hint { padding: 16px 20px 0; font-size: 13px; font-weight: 600; color: var(--se-muted); }
.se-cal-body { position: relative; padding: 8px 16px 12px; }
.se-cal-months { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.se-cal-nav {
    position: absolute;
    top: 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--se-line);
    border-radius: var(--se-radius);
    background: #fff;
    cursor: pointer;
}
.se-cal-nav[data-nav="-1"] { left: 16px; }
.se-cal-nav[data-nav="1"] { right: 16px; }
.se-cal-nav svg { width: 10px; height: 10px; fill: var(--se-navy); }
.se-cal-nav:hover:not(:disabled) { border-color: var(--se-accent); }
.se-cal-nav:disabled { opacity: .35; cursor: default; }
.se-month-title { height: 54px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: var(--se-navy); text-transform: capitalize; }
.se-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.se-dow { padding-bottom: 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--se-muted); }
.se-day {
    position: relative;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: var(--se-radius);
    background: transparent;
    color: var(--se-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.se-day:hover:not(:disabled) { background: var(--se-hover); }
.se-day:disabled { color: #c8c8cf; font-weight: 400; cursor: default; }
.se-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--se-accent); }
.se-day.in-range { border-radius: 0; background: var(--se-accent-soft); color: var(--se-accent); }
.se-day.in-range.is-preview { background: #fdf5fa; }
.se-day.is-start, .se-day.is-end { background: var(--se-accent) !important; color: #fff; }
.se-day.is-start::after, .se-day.is-end::after { background: #fff; }
.se-day.is-start { border-radius: var(--se-radius) 0 0 var(--se-radius); }
.se-day.is-single { border-radius: var(--se-radius); }
.se-day.is-end { border-radius: 0 var(--se-radius) var(--se-radius) 0; }
.se-day.is-start.is-end { border-radius: var(--se-radius); }
.se-cal-summary { font-size: 14px; font-weight: 600; color: var(--se-navy); }

/* Chambres & occupation */
.se-occ-summary { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-occ { padding-top: 6px; }
.se-occ-rooms { max-height: 380px; overflow-y: auto; padding: 0 18px; }
.se-room { padding: 14px 0; border-bottom: 1px solid #eeeef2; }
.se-room-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.se-room-head strong { font-size: 15px; color: var(--se-navy); }
.se-room-del { padding: 0; border: 0; background: none; color: var(--se-muted); font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.se-room-del:hover { color: var(--se-danger); }
.se-step-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.se-step-label { display: flex; flex-direction: column; font-size: 15px; font-weight: 600; line-height: 1.25; }
.se-step-label small { font-size: 12px; font-weight: 400; color: var(--se-muted); }
.se-stepper { display: flex; align-items: center; gap: 4px; }
.se-stepper button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #c9c9d1;
    border-radius: var(--se-radius);
    background: #fff;
    color: var(--se-navy);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.se-stepper button:hover:not(:disabled) { border-color: var(--se-accent); color: var(--se-accent); background: var(--se-accent-soft); }
.se-stepper button:disabled { border-color: #ececf0; color: #cdcdd4; cursor: not-allowed; }
.se-stepper output { min-width: 32px; text-align: center; font-size: 16px; font-weight: 700; color: var(--se-navy); }
.se-ages { margin-top: 8px; padding: 12px; border-radius: var(--se-radius); background: var(--se-hover); }
.se-ages-title { margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--se-muted); }
.se-ages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.se-age { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12px; font-weight: 600; color: var(--se-muted); }
.se-age select {
    height: 38px;
    padding: 0 8px;
    border: 1px solid var(--se-line);
    border-radius: var(--se-radius);
    background: #fff;
    color: var(--se-navy);
    font-size: 14px;
    font-weight: 600;
}
.se-occ.show-missing .se-age.is-empty select { border-color: var(--se-danger); box-shadow: 0 0 0 3px rgba(214, 41, 62, .12); }
.se-occ-add {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 18px 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--se-accent);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.se-occ-add span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: var(--se-radius); font-size: 15px; line-height: 1; }
.se-occ-add:hover { color: var(--se-accent-dark); }
.se-occ-total { font-size: 13px; font-weight: 600; color: var(--se-muted); }

/* Bouton rechercher */
.se-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    margin-top: 0;
    border: 0;
    border-radius: var(--se-radius);
    background: var(--se-accent);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(168, 52, 137, .6);
    transition: background .15s, transform .1s, box-shadow .15s;
}
.se-submit svg { width: 17px; height: 17px; fill: currentColor; }
.se-submit:hover { background: var(--se-accent-dark); }
.se-submit:active { transform: translateY(1px); }
.se-home.is-loading .se-submit { pointer-events: none; opacity: .8; }
.se-home.is-loading .se-submit svg { display: none; }
.se-home.is-loading .se-submit::before { content: ""; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: se-spin .7s linear infinite; }

/* Tablette : calendrier sur 1 mois */
@media (max-width: 767px) {
    .se-cal { width: 100%; }
    .se-cal-months { grid-template-columns: 1fr; }
}

/* Mobile : calendrier et occupation en panneau plein écran par le bas */
@media (max-width: 575px) {
    .se-home { padding: 18px; gap: 14px; box-shadow: 0 6px 22px rgba(0, 49, 91, .12); }
    .se-title { font-size: 19px; }
    .se-cal, .se-occ {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1060;
        width: 100%;
        max-height: 88vh;
        display: flex;
        flex-direction: column;
        border-radius: var(--se-radius) var(--se-radius) 0 0;
        animation: se-sheet-in .22s ease-out;
    }
    @keyframes se-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
    .se-cal-body, .se-occ-rooms { flex: 1; max-height: none; overflow-y: auto; }
    .se-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #eeeef2; font-size: 16px; color: var(--se-navy); }
    .se-sheet-close { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--se-hover); font-size: 22px; line-height: 1; color: var(--se-navy); cursor: pointer; }
    .se-backdrop { position: fixed; inset: 0; z-index: 1055; background: rgba(11, 10, 18, .45); }
    .se-day { height: 44px; }
    .se-pop-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
body.se-lock { overflow: hidden; }

/* Desktop : card centrée verticalement dans le slider, sans déborder sur la section suivante */
@media (min-width: 1024px) {
    .z-moteur:has(.se-home) { top: 50%; transform: translateY(-50%); }
    .se-home { gap: 12px; padding: 20px 22px; }
    .se-title { font-size: 20px; }
    .se-control { min-height: 60px; }
    .se-date-part { padding-top: 8px; padding-bottom: 8px; }
}

/* Conteneur des champs : pile verticale par défaut (card) */
.se-fields { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1024px) {
    .se-card .se-fields { gap: 12px; }
}

/* Variante barre horizontale : liste d'hôtels et fiche hôtel */
.se-bar { padding: 12px; box-shadow: 0 8px 28px -14px rgba(0, 49, 91, .28); border: 1px solid #ececf0; }
@media (min-width: 992px) {
    .se-bar .se-fields { display: flex; flex-direction: row; align-items: stretch; gap: 10px; }
    .se-bar .se-group { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr) minmax(0, 1fr); }
    .se-bar[data-destination="0"] .se-group { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
    .se-bar .se-group > .se-block + .se-block { border-top: 0; border-left: 1px solid var(--se-line); }
    .se-bar .se-group > .se-block .se-control { border-radius: 0; }
    .se-bar .se-group > .se-block:first-child .se-control { border-radius: var(--se-radius) 0 0 var(--se-radius); }
    .se-bar .se-group > .se-block:last-child .se-control { border-radius: 0 var(--se-radius) var(--se-radius) 0; }
    .se-bar .se-control { min-height: 58px; height: 100%; }
    .se-bar .se-block-submit { flex: none; }
    .se-bar .se-submit { width: auto; height: 100%; min-height: 58px; min-width: 150px; padding: 0 24px; }
    .se-bar .se-occ { width: 380px; }
    .se-bar .se-ac { width: max(100%, 420px); }
    .se-bar .se-block-dates .se-cal { width: 640px; }
    .se-bar .se-block-occ .se-pop { left: auto; right: 0; }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .se-bar .se-submit { min-width: 0; padding: 0 18px; }
    .se-bar .se-submit span { display: none; }
}

/* Dans le panneau "Modifier la recherche" (mobile) et dans la carte tarifs de la fiche */
.offcanvas-body .se-home { padding: 0; box-shadow: none; border: 0; }
.hf-card .se-bar { padding: 0; box-shadow: none; border: 0; }
.card-body .se-bar { padding: 0; box-shadow: none; border: 0; }
