/* Carte d'annonce (partials/property_card.html) : accueil, liste /annonces/, profils publics. */
.pc {
    --pc-green: #0b4629;
    --pc-green-2: #157347;
    --pc-gold: #f5b301;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, rgba(15, 23, 42, .08));
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 23, 42, .06);
    transition: transform .25s ease, box-shadow .25s ease;
}
@media (hover: hover) {
    .pc:hover {
        transform: translateY(-4px);
        box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 36px rgba(15, 23, 42, .14);
    }
    .pc:hover .pc-slide.is-active { transform: scale(1.04); }
}

/* ---- Média / carrousel ---- */
.pc-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #e2e8f0;
    overflow: hidden;
}
.pc-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .7s ease, transform .6s ease;
}
.pc-slide.is-active { opacity: 1; }
.pc-media::after {            /* léger dégradé bas pour la lisibilité des pastilles */
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 38%;
    background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 2;
}

.pc-tags {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 52px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 5;
    pointer-events: none;
}
.pc-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    background: var(--pc-green);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.pc-tag--rent { background: #2563eb; }
.pc-tag--sale { background: #b45309; }
.pc-tag--stay { background: var(--pc-green-2); }
.pc-tag--hot  { background: var(--pc-gold); color: #3b2a00; }

.pc-verified {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .95);
    color: var(--pc-green);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    font-size: .9rem;
}

.pc-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .7);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.pc-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 5px;
    pointer-events: none;
}
.pc-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    transition: all .25s ease;
}
.pc-dots i.is-on { background: #fff; width: 16px; border-radius: 4px; }

.pc-nav {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border: 0;
    border-radius: 50%;
    display: none;
    place-items: center;
    background: rgba(255, 255, 255, .95);
    color: #0f172a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease, transform .15s ease;
}
.pc-nav:hover { transform: scale(1.08); }
.pc-prev { left: 10px; }
.pc-next { right: 10px; }
@media (hover: hover) {
    .pc.has-slides .pc-nav { display: grid; }
    .pc:hover .pc-nav, .pc-nav:focus-visible { opacity: 1; }
}

/* ---- Statut (vendu / loué / réservé) ---- */
.pc-status {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, .5);
    pointer-events: none;
}
.pc-status span {
    padding: 8px 26px;
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-size: .95rem;
    color: #fff;
    transform: rotate(-8deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
}
.pc-status--sold span { background: #dc2626; }
.pc-status--rented span { background: #ea580c; }
.pc-status--reserved span { background: #0284c7; }

/* ---- Corps ---- */
.pc-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 14px;
    gap: 6px;
}
.pc-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
    color: var(--pc-green);
}
.pc-price strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pc-price small { font-size: .78rem; font-weight: 600; color: var(--text-muted, #64748b); }
.pc-total { font-size: .75rem; color: var(--text-muted, #64748b); }

.pc-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main, #0f172a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.pc-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: .84rem;
    color: var(--text-muted, #64748b);
}
.pc-loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-loc i { color: #ef4444; flex-shrink: 0; }

.pc-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 4px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color, rgba(15, 23, 42, .08));
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-main, #334155);
}
.pc-specs span { display: inline-flex; align-items: center; gap: 6px; }
.pc-specs i { color: var(--pc-green-2); font-size: .85rem; }

.pc-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, rgba(15, 23, 42, .08));
}
.pc-owner { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-avatar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(11, 70, 41, .1);
    color: var(--pc-green);
    font-weight: 800;
    font-size: .78rem;
}
.pc-owner-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pc-owner-txt b { font-size: .8rem; font-weight: 700; color: var(--text-main, #0f172a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-owner-txt small { font-size: .72rem; color: var(--text-muted, #94a3b8); white-space: nowrap; }
.pc-wa {
    position: relative;
    z-index: 10;               /* au-dessus du lien étiré de la carte */
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #25d366;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(37, 211, 102, .45);
    transition: transform .15s ease;
}
.pc-wa:hover { transform: scale(1.1); color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .pc, .pc-slide, .pc-dots i { transition: none; }
    .pc:hover { transform: none; }
}
