/* esken-logement.css — fiche logement façon Airbnb ([esken_logement]) */
.esk-lg {
    --esk-accent: #C68E58;
    --esk-accent-dark: #b07840;
    --esk-text: #222;
    --esk-muted: #6a6a6a;
    --esk-line: #e6e6e6;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px 40px;
    color: var(--esk-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
}
.esk-lg *, .esk-lg *::before, .esk-lg *::after { box-sizing: border-box; }

/* ── En-tête ─────────────────────────────────────────── */
.esk-lg__head { padding: 24px 0 16px; }
.esk-lg__title { font-size: clamp(28px, 3vw, 36px); line-height: 1.2; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.esk-lg__loc { margin: 0; color: var(--esk-muted); font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }

/* ── Grille photos (1 grande + 4 petites) ───────────── */
.esk-lg__gallery {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: 460px;
    border-radius: 14px;
    overflow: hidden;
}
.esk-lg__gallery--n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.esk-lg__gallery--n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.esk-lg__gallery--n3 { grid-template-columns: 2fr 1fr; }
.esk-lg__gallery--n4 .esk-lg__shot:nth-child(4) { grid-column: span 2; }
.esk-lg__shot {
    all: unset;
    display: block;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #f2f2f2;
    min-height: 0;
}
.esk-lg__shot--main { grid-row: 1 / span 2; }
.esk-lg__gallery--n2 .esk-lg__shot--main,
.esk-lg__gallery--n1 .esk-lg__shot--main { grid-row: auto; }
.esk-lg__gallery--n3 .esk-lg__shot--main { grid-row: 1 / span 2; }
.esk-lg__shot img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
    transition: filter .2s ease, transform .4s ease;
}
.esk-lg__shot:hover img { filter: brightness(.88); }
.esk-lg__all {
    position: absolute;
    right: 16px;
    bottom: 16px;
    background: #fff;
    color: var(--esk-text);
    border: 1px solid var(--esk-text);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.esk-lg__all:hover { background: #f7f7f7; }

/* ── Visionneuse plein écran ─────────────────────────── */
.esk-lg__lightbox[hidden] { display: none !important; }
.esk-lg__lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, .94);
    display: flex;
    align-items: center;
    justify-content: center;
}
.esk-lg__lb-figure { margin: 0; text-align: center; max-width: 92vw; }
.esk-lg__lb-figure img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 6px; }
.esk-lg__lb-figure figcaption { color: #ddd; font-size: 14px; margin-top: 10px; }
.esk-lg__lb-close, .esk-lg__lb-nav {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 24px;
    line-height: 44px;
    cursor: pointer;
}
.esk-lg__lb-close { top: 18px; left: 18px; font-size: 18px; }
.esk-lg__lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.esk-lg__lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.esk-lg__lb-close:hover, .esk-lg__lb-nav:hover { background: rgba(255, 255, 255, .25); }

/* ── Corps : contenu + colonne réservation ───────────── */
.esk-lg__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 64px;
    margin-top: 32px;
    align-items: start;
}
.esk-lg__section { padding: 28px 0; border-bottom: 1px solid var(--esk-line); }
.esk-lg__section:first-child { padding-top: 0; }
.esk-lg__section:last-child { border-bottom: 0; }
.esk-lg__section h2 { font-size: 21px; font-weight: 600; margin: 0 0 16px; line-height: 1.3; }
.esk-lg__intro h2 { margin-bottom: 4px; }
.esk-lg__facts { margin: 0; font-size: 16px; color: var(--esk-text); }

.esk-lg__desc { font-size: 16px; line-height: 1.6; white-space: normal; }
.esk-lg__desc p { margin: 0 0 12px; }
.esk-lg__desc.is-clamped { max-height: 9.6em; overflow: hidden; position: relative; }
.esk-lg__desc.is-clamped::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3em;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.esk-lg__more {
    all: unset;
    margin-top: 10px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* Espaces */
.esk-lg__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.esk-lg__card img, .esk-lg__card-ph {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: #f2f2f2;
}
.esk-lg__card span { display: block; margin-top: 8px; font-weight: 600; font-size: 15px; }

/* Équipements */
.esk-lg__equip { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.esk-lg__equip li { display: flex; gap: 12px; align-items: center; font-size: 16px; }
.esk-lg__equip li[hidden] { display: none; }
.esk-lg__check { color: var(--esk-accent); font-weight: 700; width: 20px; text-align: center; flex-shrink: 0; }
.esk-lg__btn-outline {
    background: #fff;
    border: 1px solid var(--esk-text);
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: var(--esk-text);
}
.esk-lg__btn-outline:hover { background: #f7f7f7; }

/* Services */
.esk-lg__services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.esk-lg__services li { display: flex; gap: 12px; align-items: center; font-size: 16px; }
.esk-lg__services img { width: 32px !important; height: 32px !important; object-fit: contain; flex-shrink: 0; }

/* À savoir */
.esk-lg__times { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 14px; font-size: 15px; }
.esk-lg__note { font-size: 15px; line-height: 1.6; color: #444; }
.esk-lg__note p { margin: 0 0 10px; }

/* Carte */
.esk-lg__map { height: 380px; border-radius: 14px; overflow: hidden; z-index: 0; background: #eef1f4; }
.esk-lg__map-note { color: var(--esk-muted); font-size: 13px; margin: 10px 0 0; }
.esk-lg__pin {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--esk-accent); border: 4px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

/* Colonne réservation collante */
.esk-lg__aside { position: sticky; top: 100px; }
.esk-lg__booking {
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    background: #fff;
}
.esk-lg__price { margin: 0 0 16px; font-size: 15px; color: var(--esk-muted); }
.esk-lg__price strong { font-size: 22px; color: var(--esk-text); }
.esk-lg__booking .esken-booking-widget { border: 0; box-shadow: none; padding: 0; }
.esk-lg__secure { text-align: center; color: var(--esk-muted); font-size: 13px; margin: 14px 0 0; }

/* Barre mobile */
.esk-lg__mobilebar { display: none; }

/* ── Tablette / mobile ──────────────────────────────── */
@media (max-width: 960px) {
    .esk-lg__body { grid-template-columns: 1fr; gap: 0; }
    .esk-lg__aside { position: static; margin-top: 8px; scroll-margin-top: 80px; }
}
@media (max-width: 744px) {
    .esk-lg { padding: 0 0 90px; }
    .esk-lg__head, .esk-lg__body { padding-left: 20px; padding-right: 20px; }
    .esk-lg__title { font-size: 26px; }
    /* Galerie : carrousel horizontal à balayer */
    .esk-lg__gallery {
        display: flex;
        height: 300px;
        border-radius: 0;
        gap: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .esk-lg__shot { flex: 0 0 100%; scroll-snap-align: start; }
    .esk-lg__all { display: none; } /* sur mobile : toucher une photo ouvre la visionneuse */
    .esk-lg__equip, .esk-lg__services { grid-template-columns: 1fr; }
    .esk-lg__mobilebar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 9999;
        background: #fff;
        border-top: 1px solid var(--esk-line);
        padding: 12px 20px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        font-size: 14px;
    }
    .esk-lg__mobilebar strong { font-size: 16px; }
    /* Le cadre de réservation est masqué : il s'ouvre dans la fenêtre « Détail du prix » */
    .esk-lg__aside { display: none; }
    .esk-lg__mobilebtn {
        background: var(--esk-accent);
        color: #fff !important;
        text-decoration: none;
        font-weight: 700;
        padding: 12px 26px;
        border-radius: 8px;
    }
    .esk-lg__mobilebtn:hover { background: var(--esk-accent-dark); }
}

/* ── Disponibilités ─────────────────────────────────── */
.esk-lg__avail-cal { min-height: 120px; }
.esk-lg__avail-loading { color: var(--esk-muted); font-size: 14px; padding: 20px 0; }
.esk-lg__legend { display: flex; gap: 18px; margin: 12px 0 0; font-size: 13px; color: var(--esk-muted); }
.esk-lg__legend span { display: inline-flex; align-items: center; gap: 6px; }
.esk-lg__legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid #e3e3e3; background: #fff; }
.esk-lg__legend i.is-blocked { background: #fdecec; border-color: #f5c6c6; }
.esk-lg__legend i.is-selected { background: #C9A776; border-color: #C9A776; }

/* ── Barre mobile façon Airbnb (montant + dates dessous) ─ */
.esk-lg__mb-info {
    all: unset;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    cursor: pointer;
    color: var(--esk-text);
}
.esk-lg__mb-price { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esk-lg__mb-price u { text-underline-offset: 3px; }
.esk-lg__mb-dates { font-size: 13px; color: var(--esk-text); text-decoration: underline; text-underline-offset: 2px; }
.esk-lg__mb-dates:empty { display: none; }
.esk-lg__mobilebtn { border: 0; cursor: pointer; font-size: 15px; white-space: nowrap; flex-shrink: 0; }

/* ── Fenêtre « Détail du prix » (mobile) ─────────────── */
.esk-lg__sheet[hidden] { display: none !important; }
.esk-lg__sheet { position: fixed; inset: 0; z-index: 100001; }
.esk-lg__sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s ease; }
.esk-lg__sheet-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
    transform: translateY(100%);
    transition: transform .22s ease;
    color: var(--esk-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.esk-lg__sheet.is-open .esk-lg__sheet-backdrop { opacity: 1; }
.esk-lg__sheet.is-open .esk-lg__sheet-panel { transform: translateY(0); }
.esk-lg__sheet-x {
    position: absolute; top: 14px; right: 14px;
    width: 36px; height: 36px; border-radius: 50%;
    border: 0; background: transparent; color: var(--esk-text);
    font-size: 18px; cursor: pointer;
}
.esk-lg__sheet-x:hover { background: #f2f2f2; }
.esk-lg__sheet-title { font-size: 22px; font-weight: 600; margin: 4px 0 18px; }
.esk-lg__sheet-dates {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--esk-line, #e6e6e6);
}
.esk-lg__sheet-dates strong { display: block; font-size: 15px; margin-bottom: 2px; }
.esk-lg__sheet-dates span { font-size: 15px; }
.esk-lg__sheet-dates button {
    all: unset; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: underline;
}
/* Dans la fenêtre : pas de cadre, pas de champs de date (on choisit dans le calendrier « Disponibilités ») */
.esk-lg__sheet .esk-lg__booking { border: 0; box-shadow: none; padding: 0; }
.esk-lg__sheet .esk-lg__price,
.esk-lg__sheet .esken-dates-row { display: none; }
html.esk-sheet-open, html.esk-sheet-open body { overflow: hidden; }

/* Champ technique du calendrier « Disponibilités » (jamais visible) */
.esk-avail-anchor { display: none !important; }
