/*
 * Styles de base du connecteur Hektor. Volontairement sobres et peu
 * spécifiques (pas d'!important, classes simples) pour rester facile à
 * surcharger depuis le CSS personnalisé d'Elementor côté Agnès.
 */

.ohc-annonces__filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.ohc-annonces__filter {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
}

.ohc-annonces__filter.is-active {
    background: #222;
    border-color: #222;
    color: #fff;
}

.ohc-annonces__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.ohc-annonce-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.ohc-annonce-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ohc-annonce-card__photo {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f2f2f2;
    overflow: hidden;
}

.ohc-annonce-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ohc-annonce-card__photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eee, #ddd);
}

.ohc-annonce-card__badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: capitalize;
}

.ohc-annonce-card__body {
    padding: 1rem;
}

.ohc-annonce-card__title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

.ohc-annonce-card__location {
    margin: 0 0 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.ohc-annonce-card__meta {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    font-size: 0.85rem;
    color: #444;
}

.ohc-annonce-card__price {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.ohc-annonce-detail__back {
    display: inline-block;
    margin-bottom: 1rem;
    text-decoration: none;
}

.ohc-annonce-detail__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.ohc-annonce-detail__gallery img {
    display: block;
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: opacity 0.15s ease;
}

.ohc-annonce-detail__photo {
    display: block;
    cursor: zoom-in;
}

.ohc-annonce-detail__photo:hover img,
.ohc-annonce-detail__photo:focus-visible img {
    opacity: 0.85;
}

/* ---- Visionneuse plein écran ---- */
.ohc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    touch-action: pan-y;
}

.ohc-lightbox[hidden] {
    display: none;
}

.ohc-lightbox__img {
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
    user-select: none;
}

.ohc-lightbox__btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.ohc-lightbox__btn:hover,
.ohc-lightbox__btn:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}

.ohc-lightbox__close { top: 1rem; right: 1rem; }
.ohc-lightbox__prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.ohc-lightbox__next  { right: 1rem; top: 50%; transform: translateY(-50%); }

.ohc-lightbox__counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.ohc-lightbox--single .ohc-lightbox__prev,
.ohc-lightbox--single .ohc-lightbox__next,
.ohc-lightbox--single .ohc-lightbox__counter {
    display: none;
}

@media (max-width: 600px) {
    .ohc-lightbox__prev,
    .ohc-lightbox__next {
        top: auto;
        bottom: 0.75rem;
        transform: none;
    }
    .ohc-lightbox__img {
        max-width: 100vw;
        max-height: 78vh;
    }
}

body.ohc-lightbox-open {
    overflow: hidden;
}

.ohc-annonce-detail__meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.ohc-annonce-detail__description {
    line-height: 1.6;
}
