/* =========================================================
   IM10P Front CSS (clean)
   ========================================================= */

/* Prevent scroll when lightbox open */
html.im10p-noscroll,
html.im10p-noscroll body {
    overflow: hidden;
}

/* =========================================================
   SINGLE (property page)
   ========================================================= */

.im10p-single {
    margin: 0;
}

.im10p-title {
    margin: 0 0 12px;
}

/* If you still use a 2-col layout somewhere */
.im10p-single-grid {
    display: grid;
    grid-template-columns: minmax(0,520px) minmax(0,1fr);
    gap: 18px;
    align-items: start;
}

@media (max-width:980px) {
    .im10p-single-grid {
        grid-template-columns: 1fr;
    }
}

.im10p-cardbox {
    border: 1px solid #eee;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.im10p-cardbox-pad {
    padding: 14px;
}

/* ===== Carousel ===== */
.im10p-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #eee;
    background: #fafafa;
}

.im10p-track {
    display: flex;
    transition: transform .25s ease;
    will-change: transform;
}

.im10p-slide {
    min-width: 100%;
}

    .im10p-slide img {
        display: block;
        width: 100%;
        height: 340px;
        object-fit: cover;
        cursor: zoom-in;
    }

@media (max-width:980px) {
    .im10p-slide img {
        height: 260px;
    }
}

@media (max-width:520px) {
    .im10p-slide img {
        height: 220px;
    }
}

.im10p-prev,
.im10p-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 22px;
    line-height: 42px;
    text-align: center;
    z-index: 3;
}

.im10p-prev {
    left: 10px;
}

.im10p-next {
    right: 10px;
}

/* ===== Lightbox ===== */
.im10p-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.82);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .im10p-lightbox[aria-hidden="false"] {
        display: flex;
    }

.im10p-lightbox-inner {
    position: relative;
    max-width: 1100px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.im10p-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.im10p-lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: #fff;
    color: #111;
    font-size: 26px;
    line-height: 44px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* ===== Infos table ===== */
.im10p-table {
    width: 100%;
    border-collapse: collapse;
}

    .im10p-table th,
    .im10p-table td {
        padding: 10px 12px;
        border-bottom: 1px solid #eee;
        vertical-align: top;
    }

    .im10p-table tr:last-child th,
    .im10p-table tr:last-child td {
        border-bottom: 0;
    }

    .im10p-table th {
        width: 42%;
        font-weight: 700;
    }

/* Amenities list */
.im10p-amenities {
    margin: 10px 0 0;
    padding-left: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 6px 14px;
}

@media (max-width:520px) {
    .im10p-amenities {
        grid-template-columns: 1fr;
    }
}

/* ===== Contact block ===== */
.im10p-contact-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    align-items: start;
}

@media (max-width:520px) {
    .im10p-contact-grid {
        grid-template-columns: 1fr;
    }
}

.im10p-small {
    font-size: 13px;
    opacity: .85;
}

/* Contact form layout (2 cols on desktop) */
.im10p-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
}

@media (max-width:700px) {
    .im10p-form-grid {
        grid-template-columns: 1fr;
    }
}

.im10p-contact-form input,
.im10p-contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
}

.im10p-contact-form button.im10p-btn {
    background: #2c7be5;
    color: #fff;
    border: 0;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
}

    .im10p-contact-form button.im10p-btn:hover {
        opacity: .9;
    }

/* =========================================================
   SEARCH + MAP
   ========================================================= */

.im10p-search {
    margin: 10px 0;
}

/* Main search grid */
.im10p-search-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    gap: 12px;
    align-items: end;
}

/* Field wrapper (label + input/select) */
.im10p-field {
    grid-column: span 2;
}

    .im10p-field label {
        display: block;
        font-weight: 600;
        font-size: 13px;
        margin: 0 0 6px;
        white-space: nowrap;
    }

    .im10p-field input,
    .im10p-field select {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 12px;
        border: 1px solid #ddd;
        border-radius: 10px;
    }

/* Place is wider */
.im10p-field--place {
    grid-column: span 4;
}

/* Submit button */
.im10p-field--submit {
    grid-column: span 2;
}

    .im10p-field--submit button {
        width: 100%;
        padding: 11px 12px;
        border-radius: 10px;
        border: 0;
        cursor: pointer;
    }

/* Responsive search */
@media (max-width:1100px) {
    .im10p-field {
        grid-column: span 4;
    }

    .im10p-field--place {
        grid-column: span 8;
    }

    .im10p-field--submit {
        grid-column: span 4;
    }
}

@media (max-width:650px) {
    .im10p-search-form {
        grid-template-columns: 1fr;
    }

    .im10p-field,
    .im10p-field--place,
    .im10p-field--submit {
        grid-column: 1 / -1;
    }
}

/* Map */
.im10p-map-wrap {
    margin: 14px 0 18px;
}

.im10p-map {
    width: 100% !important;
    height: 420px !important;
    min-height: 420px !important;
    display: block !important;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f3f3f3;
}

@media (max-width:900px) {
    .im10p-map {
        height: 320px !important;
        min-height: 320px !important;
    }
}

/* =========================================================
   RESULTS GRID
   ========================================================= */

.im10p-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
}

@media (max-width:900px) {
    .im10p-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width:600px) {
    .im10p-grid {
        grid-template-columns: 1fr;
    }
}

.im10p-card {
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

    .im10p-card a {
        text-decoration: none;
        display: block;
        color: inherit;
    }

.im10p-card-img img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.im10p-card-content {
    padding: 12px;
}

    .im10p-card-content h3 {
        margin: 0;
        font-size: 16px;
    }

/* Pagination */
.im10p-pagination ul {
    list-style: none;
    padding: 0;
    margin: 18px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.im10p-pagination li {
    margin: 0;
}

.im10p-pagination a,
.im10p-pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-decoration: none;
}

.im10p-pagination .current {
    font-weight: 700;
}

/* =========================================================
   Utilities
   ========================================================= */

.im10p-h2 {
    margin: 0 0 10px;
}

.im10p-h3 {
    margin: 14px 0 8px;
}


/* Bouton fiche PDF */
.im10p-pdf-actions { margin: 10px 0 0; }
.im10p-pdf-btn { display: inline-block; text-decoration: none; }


.im10p-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-top: 8px;
    font-size: 13px;
    color: #4b5563;
}

.im10p-card-meta span {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    line-height: 1.3;
}

.im10p-card-meta .im10p-card-price {
    font-weight: 700;
    color: #111827;
    background: #eef7ff;
}


.im10p-msg {
    padding: 12px 14px;
    border-radius: 12px;
    margin: 0 0 14px;
    font-weight: 600;
}

.im10p-msg--ok {
    background: #e8f7ee;
    border: 1px solid #b7e2c6;
    color: #166534;
}

.im10p-msg--err {
    background: #fff0f0;
    border: 1px solid #f0b5b5;
    color: #b42318;
}

.im10p-recaptcha-wrap {
    margin: 12px 0;
}


.im10p-amenities {
    list-style:none;
    padding-left:0;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:10px;
}

.im10p-amenities li {
    display:flex;
    align-items:center;
    gap:8px;
}

.im10p-amenity-icon {
    width:26px;
    height:26px;
    object-fit:contain;
    filter:grayscale(1);
}


/* Recherche biens - version compacte */
.im10p-search-form {
    display: grid;
    grid-template-columns:
        minmax(130px, 1.2fr)
        minmax(64px, .55fr)
        minmax(64px, .55fr)
        minmax(72px, .65fr)
        minmax(72px, .65fr)
        minmax(78px, .7fr)
        minmax(78px, .7fr)
        minmax(120px, 1fr);
    gap: 6px 8px;
    align-items: end;
}

.im10p-search-form .im10p-field {
    margin: 0;
}

.im10p-search-form label {
    display: block;
    margin: 0 0 3px;
    font-size: 12px;
    line-height: 1.15;
}

.im10p-search-form input,
.im10p-search-form select {
    width: 100%;
    min-height: 36px;
    padding: 5px 8px;
}

.im10p-search-form .im10p-field--place {
    min-width: 120px;
}

.im10p-search-form .im10p-field--submit {
    grid-column: span 4;
}

.im10p-search-form .im10p-field--submit button {
    width: 100%;
    min-height: 36px;
    padding: 6px 12px;
}

@media (max-width: 980px) {
    .im10p-search-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .im10p-search-form .im10p-field--submit {
        grid-column: span 4;
    }
}

@media (max-width: 640px) {
    .im10p-search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .im10p-search-form .im10p-field--submit,
    .im10p-search-form .im10p-field--place {
        grid-column: span 2;
    }
}


.im10p-related-widget {
    margin: 0 0 22px;
}

.im10p-related-title {
    margin: 0 0 12px;
    font-size: 18px;
}

.im10p-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.im10p-related-item a {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.im10p-related-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 54px;
    overflow: hidden;
    border-radius: 8px;
    background: #f3f4f6;
}

.im10p-related-thumb img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    display: block;
}

.im10p-related-text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.im10p-related-name {
    font-weight: 700;
    line-height: 1.25;
}

.im10p-related-price {
    font-size: 13px;
    opacity: .75;
}
